:root {
    --olive: #6E6D00; --olive-dark: #4f4e00; --orange: #E38019; --teal: #324E4E; --teal-dark: #23383d;
    --green-light: #e6f2da; --bg: #f4f3ec; --ink: #22261f; --muted: #6a6f64; --line: #e3e3d8; --danger: #b8392a;
    --radius: 14px; --shadow: 0 6px 24px -12px rgba(35, 56, 61, .25);
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 "Barlow", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2 { font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; color: var(--olive); line-height: 1.1; margin: 0 0 .4em; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.45rem; }
a { color: var(--olive); }
code { background: var(--green-light); padding: .1em .35em; border-radius: 5px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .7rem 1.2rem; border: 2px solid transparent; border-radius: 999px; font: 600 .95rem/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; transition: .2s; }
.btn-primary { background: var(--olive); color: #fff; }
.btn-primary:hover { background: var(--olive-dark); }
.btn-ghost { background: transparent; color: var(--olive); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--olive); }
.btn-sm { padding: .4rem .8rem; font-size: .85rem; }
.btn-block { width: 100%; }
.danger { color: var(--danger) !important; }

.alert { padding: .9rem 1.1rem; border-radius: 12px; margin-bottom: 1.2rem; font-weight: 600; }
.alert-success { background: var(--green-light); color: var(--olive-dark); }
.alert-error { background: #fbe6e2; color: #a5311f; }

.field { display: grid; gap: .3rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: .9rem; color: var(--teal); }
.field input[type=text], .field input[type=email], .field input[type=url], .field input[type=password], .field input[type=date], .field input[type=time], .field select, .field textarea, .thumb input[type=text] {
    width: 100%; padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .thumb input:focus { outline: none; border-color: var(--olive); box-shadow: 0 0 0 3px rgba(110, 109, 0, .14); }
.field small { color: var(--muted); display: block; margin-top: .3rem; }
.file-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.preview { width: 140px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(600px 400px at 80% 0%, rgba(227, 128, 25, .15), transparent), linear-gradient(160deg, var(--olive), #3b3a05); }
.login-card { width: min(400px, 100%); background: #fff; padding: 2.2rem; border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .4); }
.login-logo { width: 200px; margin: 0 auto 1rem; display: block; }
.login-card h1 { text-align: center; font-size: 1.8rem; }
.back-link { display: block; text-align: center; margin-top: 1rem; font-size: .9rem; color: var(--muted); }

/* App-layout */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; height: 64px; padding: 0 1.25rem; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 800 1.4rem "Barlow Condensed", sans-serif; text-transform: uppercase; color: var(--olive); }
.topbar-brand img { width: 36px; height: 36px; }
.topbar-actions { margin-left: auto; display: flex; gap: .5rem; }
.topbar-actions form { margin: 0; }
.nav-toggle { display: none; width: 42px; height: 42px; border: 0; border-radius: 10px; background: var(--olive); position: relative; cursor: pointer; }
.nav-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: #fff; }
.nav-toggle span:nth-child(1) { top: 14px; } .nav-toggle span:nth-child(2) { top: 20px; } .nav-toggle span:nth-child(3) { top: 26px; }

.layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 64px); }
.sidebar { padding: 1.25rem .75rem; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: .2rem; position: sticky; top: 64px; height: calc(100vh - 64px); }
.sidebar a { display: flex; justify-content: space-between; align-items: center; padding: .7rem 1rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.sidebar a:hover { background: var(--bg); }
.sidebar a.is-active { background: var(--olive); color: #fff; }
.badge { background: var(--orange); color: #fff; border-radius: 999px; padding: 0 .5rem; font-size: .8rem; }
.badge-live { background: #c0392b; }

.banner-callout { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-left: 5px solid var(--line); }
.banner-callout.is-live { border-left-color: #c0392b; background: #fff6f4; }
.banner-callout p { margin: .25rem 0 0; }

.switch-row {
    display: flex; align-items: center; gap: .9rem; padding: 1.1rem 1.25rem; margin-bottom: 1.25rem;
    border-radius: 12px; background: var(--green-light); cursor: pointer;
}
.switch-row input { width: 22px; height: 22px; accent-color: var(--olive); flex-shrink: 0; }
.switch-row strong { display: block; color: var(--olive-dark); }

/* Nieuws in beheer */
.news-item-row.is-new { border-color: var(--orange); background: #fff8f0; }
.news-item-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.news-item-head strong { font-size: 1.1rem; color: var(--olive); }
.news-item-controls { display: flex; align-items: center; gap: .75rem; }
.pub-check { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem; cursor: pointer; }
.pub-check input { width: 18px; height: 18px; accent-color: var(--olive); }
.content { padding: 2rem clamp(1rem, 3vw, 2.5rem) 4rem; max-width: 1100px; width: 100%; }

.panel { background: #fff; border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); border: 1px solid var(--line); }
details.panel { padding: 0; }
details.panel summary { padding: 1.1rem 1.5rem; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.panel summary::-webkit-details-marker { display: none; }
details.panel summary::after { content: "+"; font-size: 1.6rem; color: var(--olive); line-height: 1; }
details[open].panel summary::after { content: "–"; }
details.panel summary h2 { margin: 0; }
.panel-body { padding: 0 1.5rem 1rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.grid-2 .panel { margin: 0; }
.tip { margin-top: 1.25rem; background: var(--green-light); border: 0; }
.tip ul { margin: 0; padding-left: 1.2rem; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.5rem 0; }
.stat { background: #fff; border-radius: var(--radius); padding: 1.2rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line); transition: .2s; }
.stat:hover { border-color: var(--olive); transform: translateY(-2px); }
.stat strong { display: block; font: 800 2.4rem/1 "Barlow Condensed", sans-serif; color: var(--orange); }
.stat span { color: var(--muted); font-size: .9rem; }
.list { list-style: none; padding: 0; margin: 0 0 1rem; }
.list li { display: grid; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.list li span { color: var(--muted); font-size: .9rem; }
.list li.unread strong::before { content: "● "; color: var(--orange); }

.form-actions { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.sticky-actions { position: sticky; bottom: 0; padding: 1rem 0; background: linear-gradient(transparent, var(--bg) 35%); justify-content: flex-end; }

/* Agenda */
.events { display: grid; gap: .75rem; }
.event-row { position: relative; display: grid; grid-template-columns: 170px 140px 1fr 40px; gap: 0 .75rem; padding: 1rem 1rem .25rem; border: 1px solid var(--line); border-radius: 12px; background: #fcfcf8; }
.event-row .field-full { grid-column: 1 / 4; }
.event-row .icon-btn { grid-column: 4; grid-row: 1; align-self: center; }
.event-row.is-past { opacity: .55; }
.event-row.is-new { border-color: var(--orange); background: #fff8f0; }
.tag { position: absolute; top: -.6rem; right: 3.5rem; background: var(--muted); color: #fff; font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; color: var(--ink); }
.icon-btn:hover { border-color: var(--olive); }
.icon-btn.danger:hover { background: #fbe6e2; border-color: var(--danger); }

/* Foto's */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin: 1rem 0; }
.thumb { background: #fcfcf8; border: 1px solid var(--line); border-radius: 12px; padding: .6rem; display: grid; gap: .5rem; cursor: grab; }
.thumb.is-dragging { opacity: .4; }
.thumb-img { position: relative; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--bg); }
.thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.drag { position: absolute; top: .4rem; left: .4rem; background: rgba(255, 255, 255, .9); border-radius: 6px; padding: 0 .35rem; }
.thumb input[type=text] { padding: .5rem .6rem; font-size: .9rem; }
.thumb-actions { display: flex; gap: .4rem; }
.thumb-actions .danger { margin-left: auto; }
.dropzone { display: grid; place-items: center; gap: .2rem; text-align: center; padding: 2rem 1rem; border: 2px dashed #c9c9b8; border-radius: 14px; cursor: pointer; color: var(--muted); transition: .2s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--olive); background: var(--green-light); }
.dropzone strong { color: var(--olive); font-size: 1.1rem; }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.dz-files { font-weight: 600; color: var(--orange); }

/* Aanvragen / Backlog */
.message header { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.message h2 { margin: .25rem 0 0; }
.message.status-pending { border-left: 5px solid var(--orange); }
.message.status-accepted { border-left: 5px solid var(--olive); }
.message.status-rejected { opacity: .65; }
.req-title-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.status-pill {
    display: inline-flex; align-items: center; padding: .2rem .65rem; border-radius: 999px;
    font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.status-pill.is-pending { background: #fff1e0; color: #b85b05; }
.status-pill.is-accepted { background: var(--green-light); color: var(--olive-dark); }
.status-pill.is-rejected { background: #fbe6e2; color: var(--danger); }
.tag-inline { background: var(--bg); color: var(--teal); padding: .15rem .5rem; border-radius: 6px; font-size: .8rem; font-weight: 600; margin-left: .4rem; }
.msg-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: flex-start; }
.msg-actions form { margin: 0; }
.message dl { display: grid; grid-template-columns: 150px 1fr; gap: .45rem 1rem; margin: 0; }
.message dt { font-weight: 600; color: var(--teal); }
.message dd { margin: 0; }
.req-options-list { margin: 0; padding-left: 1.15rem; font-weight: 600; color: var(--olive-dark); }
.message blockquote { margin: 1rem 0 0; padding: 1rem; background: var(--bg); border-radius: 10px; }

.accept-box {
    margin-top: 1.25rem; border-radius: 12px; border: 1.5px solid #d5e2c4; background: #f8fbf3; overflow: hidden;
}
.accept-box summary {
    padding: .85rem 1.15rem; font-weight: 700; color: var(--olive-dark); cursor: pointer;
    background: var(--green-light); list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.accept-box summary::-webkit-details-marker { display: none; }
.accept-box summary::after { content: "▾"; font-size: 1.1rem; }
.accept-form { padding: 1.15rem 1.15rem .8rem; }
.grid-3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: .85rem; }
.req-options-edit { display: flex; flex-wrap: wrap; gap: .75rem 1.4rem; padding: .7rem .9rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.req-options-edit select { padding: .35rem .6rem; border-radius: 8px; border: 1px solid var(--line); font: inherit; }
.accept-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.reject-form { padding: 0 1.15rem 1rem; margin: 0; display: flex; justify-content: flex-end; }

@media (max-width: 860px) {
    .nav-toggle { display: block; }
    .topbar-actions .btn { padding: .5rem .75rem; font-size: .85rem; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: fixed; top: 64px; left: 0; bottom: 0; width: 260px; z-index: 30; transform: translateX(-100%); transition: transform .25s; box-shadow: 10px 0 30px -10px rgba(0, 0, 0, .2); height: auto; }
    .nav-open .sidebar { transform: none; }
    .grid-2, .stats { grid-template-columns: 1fr 1fr; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .event-row { grid-template-columns: 1fr 1fr 40px; }
    .event-row .field-grow, .event-row .field-full { grid-column: 1 / 3; }
    .event-row .icon-btn { grid-column: 3; }
}
@media (max-width: 520px) {
    .topbar-actions .btn-ghost[target] { display: none; }
    h1 { font-size: 2rem; }
    .message dl { grid-template-columns: 1fr; }
    .message dd { margin-bottom: .4rem; }
}
