/* ============================================================
   Admin Panel — basisstijl (donker thema, strak, Discord-achtig)
   Eén stylesheet, geen thema-varianten.
   ============================================================ */

:root {
    /* -- oppervlaktes -- */
    --bg-primary: #08090d;
    --bg-secondary: #0f1117;
    --bg-card: #14161e;
    --bg-elevated: #191c26;   /* modals, dropdowns, toasts — boven kaartniveau */
    --bg-hover: #1a1d27;
    --bg-overlay: rgba(4, 5, 8, 0.72);
    --overlay-blur: 8px;

    /* -- randen -- */
    --border-color: #21242f;
    --border-strong: #2c303e;
    --border-soft: rgba(124, 92, 255, 0.28);
    --border-hairline: rgba(255, 255, 255, 0.06);

    /* -- tekst -- */
    --text-primary: #f5f6f8;
    --text-secondary: #9aa1ae;
    --text-muted: #5b6270;
    --text-faint: #3a3f4b;

    /* -- accent & merk -- */
    --accent: #7c5cff;       /* paars-blauwe gradient accent, marketplace-vibe */
    --accent-2: #5865F2;     /* discord blurple, secundair */
    --accent-hover: #6a4ce8;
    --accent-soft: rgba(124, 92, 255, 0.14);
    --accent-glow: rgba(124, 92, 255, 0.45);
    --gradient-brand: linear-gradient(135deg, #7c5cff, #5865F2);
    --gradient-brand-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.14), rgba(88, 101, 242, 0.14));

    /* -- statuskleuren -- */
    --success: #23a559;
    --success-soft: rgba(35, 165, 89, 0.14);
    --danger: #f23f43;
    --danger-soft: rgba(242, 63, 67, 0.14);
    --warning: #f0b232;
    --warning-soft: rgba(240, 178, 50, 0.14);
    --violet: #a855f7;
    --violet-soft: rgba(168, 85, 247, 0.14);
    --gold: #e8b923;
    --gold-soft: rgba(232, 185, 35, 0.14);

    /* -- maten & beweging -- */
    --radius: 14px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    --shadow-lift: 0 16px 48px rgba(0, 0, 0, 0.55);
    --ease: cubic-bezier(.4, 0, .2, 1);

    /* -- typografie (één lettertype-familie, geen extra's) -- */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
}

.gradient-text {
    background: linear-gradient(90deg, #7c5cff, #5865F2 60%, #9d7cff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.glow-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.glow-bg::before,
.glow-bg::after {
    content: '';
    position: absolute;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.28;
}

.glow-bg::before { background: #7c5cff; top: -180px; left: -120px; }
.glow-bg::after { background: #5865F2; bottom: -200px; right: -140px; }

a { color: inherit; text-decoration: none; }

.app-layout { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px 12px;
    flex-shrink: 0;
}

.sidebar-logo { font-weight: 700; font-size: 18px; padding: 8px 12px 24px; letter-spacing: -0.02em; }

/* Merkblok bovenaan de sidebar */
.sidebar { display: flex; flex-direction: column; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 6px 10px 26px; }
.sidebar-brand-mark {
    width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
    background: var(--gradient-brand); display: flex; align-items: center; justify-content: center;
    font-size: 17px; box-shadow: 0 6px 16px rgba(124, 92, 255, .35);
}
.sidebar-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.sidebar-brand-text strong { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.sidebar-brand-text span { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

.sidebar-nav { flex: 1; }
.sidebar-nav-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 20px 0 6px;
    padding: 0 12px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-faint);
    position: relative;
}
.sidebar-nav-heading:first-child { margin-top: 0; }
.sidebar-nav-heading i {
    font-size: 10px;
    width: 12px;
    text-align: center;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: .9;
}
.sidebar-nav-heading::after {
    content: '';
    flex: 1;
    height: 1px;
    margin-left: 4px;
    background: linear-gradient(90deg, var(--border-hairline), transparent);
}
.sidebar-nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: var(--radius);
    color: var(--text-secondary); font-weight: 500; margin-bottom: 2px;
    position: relative;
    transition: background .15s var(--ease), color .15s var(--ease), transform .15s var(--ease);
}
.sidebar-nav a i { width: 16px; text-align: center; font-size: 13px; color: var(--text-muted); transition: color .15s var(--ease); }
.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: -12px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 0;
    border-radius: 0 4px 4px 0;
    background: var(--gradient-brand);
    transition: height .18s var(--ease);
}
.sidebar-nav a:hover { background: var(--bg-hover); color: var(--text-primary); transform: translateX(1px); }
.sidebar-nav a:hover i { color: var(--text-primary); }
.sidebar-nav a.active {
    background: var(--gradient-brand-soft);
    color: #fff;
    box-shadow: inset 0 0 0 1px var(--border-soft);
}
.sidebar-nav a.active i {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.sidebar-nav a.active::before { height: 60%; }

.sidebar-foot { border-top: 1px solid var(--border-color); padding-top: 12px; margin-top: 12px; }
.sidebar-logout {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px; border-radius: var(--radius);
    color: var(--text-muted); font-weight: 500; font-size: 13px;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.sidebar-logout i { width: 16px; text-align: center; font-size: 13px; }
.sidebar-logout:hover { background: var(--danger-soft); color: var(--danger); }

/* ---- Main content ---- */
.main-content { flex: 1; padding: 28px 36px; max-width: 1400px; }

.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.topbar h1 { font-size: 22px; font-weight: 700; margin: 0; }
.topbar-desc { margin: 4px 0 0; font-size: 13px; color: var(--text-secondary); }

/* Paginakop voor secties binnen main-content: titel + omschrijving + acties */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; margin: 0; }
.page-head .page-head-desc { color: var(--text-secondary); font-size: 13px; margin-top: 4px; line-height: 1.5; }
.page-head-actions { display: flex; gap: 10px; flex-shrink: 0; }

.user-chip {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    padding: 6px 14px 6px 6px; border-radius: 999px;
}
.user-chip img { width: 28px; height: 28px; border-radius: 50%; }
.user-chip { transition: border-color .15s var(--ease); }
.user-chip:hover { border-color: var(--border-soft); }
.user-chip-caret { font-size: 10px; color: var(--text-muted); }

/* ---- Cards / stats ---- */
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 20px; }

.stat-card {
    position: relative; overflow: hidden;
    transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.stat-card:hover { border-color: var(--border-soft); transform: translateY(-2px); }
.stat-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.stat-card-icon {
    width: 38px; height: 38px; border-radius: var(--radius-sm); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 15px;
    background: var(--accent-soft); color: var(--accent);
}
.stat-card-icon.success { background: var(--success-soft); color: var(--success); }
.stat-card-icon.warning { background: var(--warning-soft); color: var(--warning); }
.stat-card-icon.violet  { background: var(--violet-soft);  color: var(--violet); }
.stat-card .stat-label { color: var(--text-secondary); font-size: 13px; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 28px; font-weight: 700; }
.stat-card .stat-delta { font-size: 12px; margin-top: 6px; font-weight: 600; color: var(--text-muted); }
.stat-delta.up { color: var(--success); }
.stat-delta.down { color: var(--danger); }

/* Kaartkop met icoon, voor secties zoals "Recente transacties" */
.section-head { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; }
.section-head i { color: var(--accent); font-size: 13px; }
.section-head h3 { margin: 0; font-size: 15px; font-weight: 700; }

/* Zoekveld met icoon, voor toolbars */
.search-input-wrap { position: relative; flex: 1; min-width: 160px; }
.search-input-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 13px; pointer-events: none; }
.search-input-wrap input { padding-left: 36px; }

/* Rij in een activiteitenlijst (transacties, reviews) */
.activity-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border-hairline); }
.activity-row:last-child { border-bottom: none; }
.activity-title { font-size: 13px; color: var(--text-primary); }
.activity-amount { font-weight: 700; font-size: 13px; }
.activity-amount.in { color: var(--success); }
.activity-amount.out { color: var(--danger); }
.activity-date { color: var(--text-muted); font-size: 12px; }

.review-row { padding: 12px 0; border-bottom: 1px solid var(--border-hairline); }
.review-row:last-child { border-bottom: none; }
.review-row-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.review-row-top strong { font-size: 13px; }
.review-stars { color: var(--gold); font-size: 12px; letter-spacing: 1px; }
.review-comment { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }
.review-meta { color: var(--text-muted); font-size: 12px; margin-top: 4px; display: block; }

/* Compacte stat-tegel (icoon + label/waarde), gebruikt in samenvattingsrijen */
.mini-stat-tile {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 14px 16px;
}
.mini-stat-tile .mst-icon {
    width: 36px; height: 36px; border-radius: var(--radius-sm); flex-shrink: 0;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-size: 0.95rem;
}
.mini-stat-tile .mst-label { font-size: 12px; color: var(--text-secondary); }
.mini-stat-tile .mst-value { font-size: 17px; font-weight: 700; color: var(--text-primary); }

/* ---- Tables ---- */
table { width: 100%; border-collapse: collapse; }

th { text-align: left; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--border-color); }
td { padding: 12px 14px; border-bottom: 1px solid var(--border-color); }
tr:hover td { background: var(--bg-hover); }

/* Variant: tabel binnen een kaart, met dunnere randen — site-brede standaard voor datalijsten */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; color: var(--text-secondary); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--border-hairline); }
.data-table td { padding: 12px; border-bottom: 1px solid var(--border-hairline); font-size: 13px; color: var(--text-primary); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-hover); }

/* ---- Badges ---- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-online  { background: rgba(35, 165, 89, .15); color: var(--success); }
.badge-offline { background: rgba(242, 63, 67, .15); color: var(--danger); }
.badge-draft   { background: rgba(240, 178, 50, .15); color: var(--warning); }

/* Statusbadge — brede pil met rand, voor workflowstatussen (opdrachten/beoordelingen/verlof) */
.status-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 11px; border-radius: 999px;
    font-size: 11px; font-weight: 700; text-transform: none;
    border: 1px solid transparent;
}
.status-badge.behandeling  { color: var(--warning); background: var(--warning-soft); border-color: rgba(240, 178, 50, .35); }
.status-badge.goedgekeurd  { color: var(--success); background: var(--success-soft); border-color: rgba(35, 165, 89, .35); }
.status-badge.afgewezen    { color: var(--danger);  background: var(--danger-soft);  border-color: rgba(242, 63, 67, .35); }
.status-badge.inkomst { color: var(--success); background: var(--success-soft); border-color: rgba(35, 165, 89, .35); }
.status-badge.uitgave { color: var(--danger);  background: var(--danger-soft);  border-color: rgba(242, 63, 67, .35); }
.status-badge.actief      { color: var(--success); background: var(--success-soft); border-color: rgba(35, 165, 89, .35); }
.status-badge.ingetrokken { color: var(--danger);  background: var(--danger-soft);  border-color: rgba(242, 63, 67, .35); }
.status-badge.geschorst   { color: var(--warning); background: var(--warning-soft); border-color: rgba(240, 178, 50, .35); }
.status-badge.verwijderd  { color: var(--text-muted); background: rgba(255,255,255,0.05); border-color: var(--border-hairline); }

/* Usages.status (3.4) — status van het binnengekomen verzoek zelf */
.status-badge.valid           { color: var(--success); background: var(--success-soft); border-color: rgba(35, 165, 89, .35); }
.status-badge.invalid-key     { color: var(--text-muted); background: rgba(255,255,255,0.05); border-color: var(--border-hairline); }
.status-badge.revoked-key     { color: var(--warning); background: var(--warning-soft); border-color: rgba(240, 178, 50, .35); }
.status-badge.owner-mismatch  { color: var(--danger);  background: var(--danger-soft);  border-color: rgba(242, 63, 67, .35); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: var(--radius);
    border: none; font-weight: 600; font-size: 14px; cursor: pointer;
    background: var(--accent); color: #fff;
    transition: background .15s var(--ease);
}
.btn:hover { background: var(--accent-hover); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-hover); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-danger { background: var(--danger); }
.btn-ghost {
    background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-sm { padding: 7px 12px; font-size: 12px; }

/* ---- Forms ---- */
input, textarea, select,
.f-input, .f-select, .f-textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
}
input:focus, textarea:focus, select:focus,
.f-input:focus, .f-select:focus, .f-textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.f-textarea { resize: vertical; min-height: 100px; }

label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }

/* Groep afvinkbare opties (rechten, permissies, checklists) */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.check-grid label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; color: var(--text-primary); cursor: pointer; }
.check-grid input[type="checkbox"] { width: auto; }

/* ---- Tabs ---- */
.tab-nav { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.tab-btn {
    background: none; border: none; cursor: pointer;
    padding: 10px 16px; font-size: 13px; font-weight: 600;
    color: var(--text-secondary); border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s var(--ease), border-color .15s var(--ease);
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active-tab { color: var(--accent); border-bottom-color: var(--accent); }

/* ---- Meldingen: inline banner & losse toast ---- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 13px; font-weight: 600; }
.alert-success { background: rgba(35, 165, 89, .12); color: var(--success); border: 1px solid rgba(35, 165, 89, .3); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid rgba(242, 63, 67, .35); }

.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 16px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    background: var(--bg-elevated); border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lift);
    margin-bottom: 10px;
}
.toast.succes { background: var(--success-soft); border-color: rgba(35, 165, 89, .4); color: var(--success); }
.toast.fout { background: var(--danger-soft); border-color: rgba(242, 63, 67, .4); color: var(--danger); }

/* ---- Uitklapbaar "nieuw item"-paneel ---- */
.create-collapse { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .25s var(--ease), opacity .2s var(--ease); }
.create-collapse.open { max-height: 2000px; opacity: 1; }

/* ---- Modal ---- */
.modal-backdrop {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: var(--bg-overlay);
    backdrop-filter: blur(var(--overlay-blur));
    align-items: center; justify-content: center;
}
.modal-backdrop.show { display: flex; }
.modal-box {
    width: 100%; max-width: 440px; margin: 20px;
    background: var(--bg-elevated); border: 1px solid var(--border-strong);
    border-radius: var(--radius); box-shadow: var(--shadow-lift);
    padding: 24px;
}

.empty-state { text-align: center; padding: 48px 24px; color: var(--text-secondary); }
.empty-state .btn { margin-top: 14px; }
.text-muted { color: var(--text-muted); }
.inline-form { display: contents; }

/* ============================================================
   Login / landingspagina — clearlydev-achtige marketplace hero
   ============================================================ */

.login-wrap { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; z-index: 1; padding: 20px; }

.login-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(124, 92, 255, 0.12); border: 1px solid rgba(124, 92, 255, 0.35);
    color: #b6a4ff; font-size: 12px; font-weight: 600;
    padding: 5px 14px; border-radius: 999px; margin-bottom: 22px;
}

.login-card {
    position: relative; width: 420px; max-width: 100%; text-align: center;
    padding: 48px 36px 40px; border-radius: 20px;
    background: linear-gradient(180deg, rgba(20, 22, 30, 0.9), rgba(15, 17, 23, 0.9));
    border: 1px solid var(--border-color); box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
}

.login-logo {
    width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 16px;
    background: var(--gradient-brand);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}

.login-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.login-sub { color: var(--text-secondary); font-size: 14px; line-height: 1.5; margin-bottom: 30px; }

.btn-discord {
    width: 100%; justify-content: center;
    background: var(--gradient-brand);
    padding: 13px 16px; font-size: 15px; border-radius: var(--radius-sm);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.35);
}
.btn-discord:hover { filter: brightness(1.08); }

.login-error {
    background: rgba(242, 63, 67, .12); color: var(--danger);
    border: 1px solid rgba(242, 63, 67, .3); border-radius: var(--radius-sm);
    padding: 10px 14px; font-size: 13px; margin-bottom: 20px; text-align: left;
}

.login-footer { margin-top: 26px; font-size: 12px; color: var(--text-muted); }

/* ============================================================
   Producten
   ============================================================ */

.products-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.products-filters { display: flex; gap: 10px; flex: 1; min-width: 280px; }
.products-filters input, .products-filters select { width: auto; }
.products-filters input[type="text"] { flex: 1; min-width: 160px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }

.product-card {
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column;
    transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.product-card:hover { border-color: var(--accent); }

.product-thumb { position: relative; aspect-ratio: 16 / 10; background: var(--bg-secondary); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; opacity: .4; }

.product-label {
    position: absolute; top: 10px; left: 10px;
    background: var(--gradient-brand); color: #fff;
    font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
    box-shadow: 0 4px 14px rgba(124, 92, 255, .4);
}
.product-label-stack { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.product-label-stack .product-label { position: static; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }

.product-body { padding: 16px 16px 4px; flex: 1; }
.product-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 4px; }
.product-title { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.product-price { font-weight: 700; font-size: 17px; color: var(--text-primary); margin-bottom: 10px; }
.product-meta { margin-bottom: 6px; }

.product-actions { display: flex; gap: 8px; padding: 14px 16px 16px; border-top: 1px solid var(--border-color); margin-top: 10px; }

/* ---- Formulier ---- */
.product-form .card { margin-bottom: 0; }
.product-form label { margin-top: 16px; }
.product-form label:first-child { margin-top: 0; }
.label-hint { color: var(--text-muted); font-weight: 400; text-transform: none; font-size: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.upload-drop {
    border: 1.5px dashed var(--border-color); border-radius: var(--radius);
    padding: 26px 16px; text-align: center; cursor: pointer;
    transition: border-color .15s var(--ease), background .15s var(--ease);
    color: var(--text-secondary); font-size: 13px;
}
.upload-drop:hover, .upload-drop.drag-active { border-color: var(--accent); background: rgba(124, 92, 255, .06); }
.upload-browse { color: var(--accent); font-weight: 600; }
.upload-hint { color: var(--text-muted); font-size: 12px; margin-top: 4px; }

.upload-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; margin-top: 12px; }
.upload-preview-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-color); }

.upload-file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.upload-file-item { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 8px 12px; font-size: 13px; }

.existing-list { margin-top: 14px; }
.existing-list-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; margin-bottom: 8px; }
.existing-item { position: relative; display: inline-block; margin: 0 8px 8px 0; }
.existing-item img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-color); }

.existing-remove {
    position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--danger); color: #fff; border: none; cursor: pointer;
    font-size: 11px; line-height: 20px; padding: 0;
}
.existing-file-row {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    padding: 8px 12px; font-size: 13px; margin-bottom: 6px;
}
.existing-file-row .existing-remove { position: static; }

.label-checkboxes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.label-checkbox {
    display: flex; align-items: center; gap: 6px;
    background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 999px;
    padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; margin: 0;
    text-transform: none; color: var(--text-primary);
}
.label-checkbox input { width: auto; margin: 0; }
.label-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

.existing-image-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.existing-star {
    position: absolute; bottom: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--bg-secondary); color: var(--text-muted); border: 1px solid var(--border-color);
    cursor: pointer; font-size: 11px; line-height: 18px; padding: 0;
}
.existing-star.is-main { background: var(--warning); color: #fff; border-color: var(--warning); }


/* ============================================================
   CONFIGURATIEPAGINA — flags & paginatoegang
   ============================================================ */

/* ════════════════════════════════════════════════════════════════════════
   CONFIGURATIEPAGINA — flags & paginatoegang (Adminpaneel)
   Bouwt volledig voort op de tokens uit style.css (kleuren, radii, fonts,
   .card/.stat-card/.tab-nav/.check-grid/.modal-box). Geen eigen kleuren
   of maten die niet al als variabele bestaan.
   ════════════════════════════════════════════════════════════════════════ */

.cfg-wrap { max-width: 960px; margin: 0 auto; }

/* ── Toast-meldingen (los van de statische .alert-stijl: deze zweven) ── */
.cfg-toast-stack {
    position: fixed; top: 22px; right: 22px; z-index: 10000;
    display: flex; flex-direction: column; gap: 10px;
    max-width: 340px;
}
.cfg-toast {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 16px; border-radius: var(--radius-sm);
    font-size: 0.86rem; font-weight: 600;
    box-shadow: var(--shadow-lift);
    animation: cfgToastIn .3s var(--ease) both;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
}
.cfg-toast.succes { background: var(--success-soft); border-color: rgba(22,201,138,.4); color: var(--success); }
.cfg-toast.fout { background: var(--danger-soft); border-color: rgba(241,73,90,.4); color: var(--danger); }
.cfg-toast.uit { animation: cfgToastUit .25s var(--ease) both; }
@keyframes cfgToastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@keyframes cfgToastUit { from { opacity: 1; } to { opacity: 0; transform: translateX(24px); } }

/* ── Statusoverzicht (stat-grid/stat-card zijn site-brede componenten) ── */
.cfg-stat-grid { margin-bottom: 22px; }

/* ── "Nieuwe flag" formulier — hangt aan de site-brede .create-collapse ── */
.create-collapse#cfgCreatePanel.open { margin-bottom: 22px; }
.cfg-create-inner { padding: 2px; }

.cfg-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .cfg-form-grid { grid-template-columns: 1fr; } }
.cfg-form-grid .field-span-2 { grid-column: 1 / -1; }

/* ── Live preview van het icoon terwijl je typt ── */
.cfg-icon-input-row { display: flex; align-items: center; gap: 10px; }
.cfg-icon-preview {
    width: 42px; height: 42px; border-radius: var(--radius-sm);
    background: var(--accent-soft); border: 1px solid var(--border-soft);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 1rem; flex-shrink: 0;
    transition: background .2s, color .2s, border-color .2s;
}

/* ── Kleurenkiezer: 6 klikbare swatches ── */
.cfg-kleur-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.cfg-kleur-swatch {
    width: 34px; height: 34px; border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer; position: relative;
    display: flex; align-items: center; justify-content: center;
    transition: transform .15s var(--ease), border-color .15s;
}
.cfg-kleur-swatch:hover { transform: scale(1.08); }
.cfg-kleur-swatch.actief { border-color: var(--text-primary); }
.cfg-kleur-swatch.actief i { opacity: 1; }
.cfg-kleur-swatch i { color: #fff; font-size: 0.72rem; opacity: 0; transition: opacity .15s; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.cfg-kleur-swatch[data-kleur="accent"] { background: var(--accent); }
.cfg-kleur-swatch[data-kleur="violet"] { background: var(--violet); }
.cfg-kleur-swatch[data-kleur="amber"]  { background: var(--warning); }
.cfg-kleur-swatch[data-kleur="green"]  { background: var(--success); }
.cfg-kleur-swatch[data-kleur="red"]    { background: var(--danger); }
.cfg-kleur-swatch[data-kleur="gold"]   { background: var(--gold); }

.cfg-form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ── Flaggrid — losse tegels i.p.v. een platte lijst ── */
.flag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.flag-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
    transition: border-color .18s, box-shadow .18s, opacity .18s;
    animation: fadeUp .4s var(--ease) both;
}
.flag-tile:hover { border-color: var(--border-soft); box-shadow: var(--shadow); }
.flag-tile.slepen { opacity: 0.35; }
.flag-tile.zweeft-boven { outline: 2px dashed var(--accent); outline-offset: 3px; }

.flag-tile-head { display: flex; align-items: flex-start; gap: 12px; }

.flag-tile-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; flex-shrink: 0;
    border: 1px solid var(--border-soft);
}
.flag-tile-icon.accent { background: var(--accent-soft); color: var(--accent); }
.flag-tile-icon.violet { background: var(--violet-soft); color: var(--violet); }
.flag-tile-icon.amber  { background: var(--warning-soft);  color: var(--warning); }
.flag-tile-icon.green  { background: var(--success-soft);  color: var(--success); }
.flag-tile-icon.red    { background: var(--danger-soft);    color: var(--danger); }
.flag-tile-icon.gold   { background: var(--gold-soft);   color: var(--gold); }

.flag-tile-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.flag-tile-title strong { font-family: var(--font-display); font-size: 0.94rem; font-weight: 800; color: var(--text-primary); line-height: 1.25; }
.cfg-flag-key {
    font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted);
    background: rgba(255,255,255,.06); padding: 1px 8px; border-radius: 8px;
    width: fit-content;
}

.flag-drag-handle {
    color: var(--text-faint); cursor: grab; font-size: 0.9rem;
    padding: 4px; flex-shrink: 0; touch-action: none;
    transition: color .15s;
}
.flag-drag-handle:hover { color: var(--accent); }
.flag-drag-handle:active { cursor: grabbing; }

.flag-tile-desc {
    margin: 0; font-size: 0.8rem; color: var(--text-muted); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.flag-tile-foot {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border-hairline);
}

/* ── Zoekveld boven paginatoegang ── */
.cfg-search-field { position: relative; margin-bottom: 18px; }
.cfg-search-field .f-input { padding-left: 38px; }
.cfg-search-field i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; pointer-events: none; }

/* ── Groepen (native <details>) ── */
.cfg-group {
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
    background: rgba(0,0,0,.12);
}
.cfg-group:last-child { margin-bottom: 0; }

.cfg-group-summary {
    cursor: pointer; list-style: none;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px;
    font-family: var(--font-display); font-weight: 800; font-size: 0.85rem;
    color: var(--text-primary);
    transition: background .15s;
}
.cfg-group-summary:hover { background: rgba(255,255,255,.02); }
.cfg-group-summary::-webkit-details-marker { display: none; }
.cfg-group-summary .chev { color: var(--text-muted); font-size: 0.7rem; margin-right: 8px; transition: transform .2s var(--ease); }
details[open] > .cfg-group-summary .chev { transform: rotate(90deg); }
.cfg-group-count { font-size: 0.7rem; color: var(--text-muted); font-weight: 700; text-transform: none; letter-spacing: 0; }

.cfg-group-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }

/* ── Groep-toolbar: "+ Tussenkop"-knop, direct onder de summary ── */
.cfg-group-toolbar { display: flex; justify-content: flex-end; padding: 0 14px 10px; }
.cfg-group-toolbar .btn-ghost { font-size: 0.76rem; padding: 6px 12px; }

/* ── Tussenkop-header + rename/verwijder-knopjes ── */
.cfg-menu-tussenkop-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin: 6px 0 0 4px;
}
.cfg-menu-tussenkop { font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.cfg-tussenkop-acties { display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity .15s; }
.cfg-menu-tussenkop-row:hover .cfg-tussenkop-acties { opacity: 1; }
.cfg-tussenkop-mini-btn {
    width: 22px; height: 22px; border-radius: 6px; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: transparent; color: var(--text-faint); font-size: 0.68rem;
    transition: background .15s, color .15s;
}
.cfg-tussenkop-mini-btn:hover { background: var(--accent-soft); color: var(--accent); }
.cfg-tussenkop-verwijder-btn:hover { background: var(--danger-soft); color: var(--danger); }

/* ── Paginarijen ── */
.page-row {
    display: flex; align-items: center; gap: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    transition: border-color .18s, background .18s;
}
.page-row:hover { border-color: var(--border-soft); }

.page-row-icon {
    width: 36px; height: 36px; border-radius: 9px;
    background: var(--accent-soft); border: 1px solid var(--border-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; flex-shrink: 0;
}

.page-row-info { flex: 1; min-width: 0; }
.page-row-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-row-title strong { font-family: var(--font-display); font-size: 0.88rem; font-weight: 700; color: var(--text-primary); }
.page-row-url { font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); display: block; margin-top: 2px; }
.page-row-badges { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Bevestigingsmodal voor verwijderen (herbruikt .modal-backdrop/.modal-box) ── */
.cfg-modal-flagnaam { color: var(--accent); font-weight: 800; }

/* ════════════════════════════════════════════════════════════════════════
   GELDZAKEN — bewerkbare tabellen + sticky SAVE-balk
   ════════════════════════════════════════════════════════════════════════ */
.gz-wrap { display: flex; flex-direction: column; gap: 22px; padding-bottom: 90px; }

.gz-wrap .data-table .gz-input {
    background: transparent; border: 1px solid transparent;
    padding: 6px 8px; border-radius: 6px; width: 100%; min-width: 90px;
    color: var(--text-primary); font-family: var(--font-body); font-size: 0.85rem;
    transition: border-color .15s, background .15s;
}
.gz-wrap .data-table .gz-input:hover { border-color: var(--border-hairline); }
.gz-wrap .data-table .gz-input:focus { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.gz-wrap .data-table input[type="checkbox"].gz-input { width: auto; min-width: 0; }
.gz-wrap .data-table td.gz-readonly { color: var(--text-muted); font-size: 0.82rem; }

.gz-wrap .data-table tr.gz-gewijzigd { background: rgba(243, 167, 18, 0.06); }
.gz-wrap .data-table tr.gz-gewijzigd td:first-child { border-left: 3px solid var(--warning); }
.gz-wrap .data-table tr.gz-verwijderd { opacity: 0.4; text-decoration: line-through; background: var(--danger-soft); }

.gz-save-bar {
    position: sticky; bottom: 16px; margin-top: 18px;
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 14px 18px; border-radius: var(--radius-md);
    background: var(--bg-elevated); border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lift);
    opacity: 0.55; pointer-events: none; transition: opacity .2s;
}
.gz-save-bar.actief { opacity: 1; pointer-events: auto; }
.gz-save-bar #gzWijzigingenTeller { font-size: 0.82rem; color: var(--text-secondary); font-weight: 600; }

/* ============================================================
   OPDRACHTEN & BEOORDELINGEN
   ============================================================ */

/* ═══════════════════════════════════════════════════════════════════
   Opdracht- & Beoordelingssysteem — aanvullende stijlen
   Bouwt voort op style.css (zelfde CSS-variabelen, zelfde componenten:
   .card, .btn-primary/.btn-secondary, .f-input/.f-select/.f-textarea,
   .data-table, .status-badge, .page-head, .mini-stat-tile, enz).
   Laad dit bestand NA style.css.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Extra statuskleuren (bovenop .behandeling/.goedgekeurd/.afgewezen uit style.css) ── */
.status-badge.nieuw          { color: var(--text-muted); background: rgba(255,255,255,0.05); border-color: var(--border-hairline); }
.status-badge.ingeleverd     { color: var(--accent); background: var(--accent-soft); border-color: var(--border-soft); }
.status-badge.in-review      { color: var(--warning); background: var(--warning-soft); border-color: rgba(243,167,18,.35); }
.status-badge.aanpassen      { color: var(--warning); background: var(--warning-soft); border-color: rgba(243,167,18,.35); }
.status-badge.klaar          { color: var(--success); background: var(--success-soft); border-color: rgba(22,201,138,.35); }
.status-badge.toegewezen     { color: var(--violet); background: var(--violet-soft); border-color: rgba(168,85,247,.35); }
.status-badge.gepubliceerd   { color: var(--success); background: var(--success-soft); border-color: rgba(22,201,138,.35); }
.status-badge.afgekeurd      { color: var(--danger); background: var(--danger-soft); border-color: rgba(241,73,90,.35); }

/* ── Subnavigatie (partials/navigatie.ejs) — tabbladen per rol ── */
.obs-subnav {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
    background: var(--bg-card); border: 1px solid var(--border-soft);
    border-radius: var(--radius-md); padding: 6px; margin-bottom: 22px;
}
.obs-subnav a {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 15px; border-radius: 8px; text-decoration: none;
    font-size: 0.82rem; font-weight: 700; color: var(--text-muted);
    transition: background .15s, color .15s;
}
.obs-subnav a i { font-size: 0.78rem; }
.obs-subnav a:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }
.obs-subnav a.active { color: var(--accent); background: var(--accent-soft); }
.obs-subnav a .obs-subnav-count {
    font-size: 0.66rem; font-weight: 800; background: rgba(255,255,255,0.08);
    padding: 1px 7px; border-radius: 20px; color: var(--text-secondary);
}
.obs-subnav a.active .obs-subnav-count { background: var(--accent); color: #042018; }

/* ── Checklist (partials/checklist.ejs) ── */
.obs-checklist { display: flex; flex-direction: column; gap: 10px; }
.obs-check-item {
    background: rgba(0,0,0,0.18); border: 1px solid var(--border-hairline);
    border-radius: 10px; padding: 13px 14px; transition: border-color .15s;
}
.obs-check-item.is-ok { border-color: rgba(22,201,138,.35); }
.obs-check-item.is-fout { border-color: rgba(241,73,90,.35); }
.obs-check-item-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.obs-check-item-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.obs-check-item-label strong { font-size: 0.88rem; color: var(--text-primary); font-weight: 700; }
.obs-check-item-label small { font-size: 0.72rem; color: var(--text-muted); }
.obs-check-item-actions { display: flex; gap: 8px; flex-shrink: 0; }
.obs-check-item-actions button { border: none; }
.obs-check-item-actions .is-active.btn-goed { background: var(--success); color: #042018; }
.obs-check-item-actions .is-active.btn-afwijs { background: var(--danger); color: #fff; }
.obs-check-item-feedback { margin-top: 10px; }
.obs-check-status-pill {
    font-size: 0.62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
    padding: 3px 9px; border-radius: 20px; color: var(--text-muted); background: rgba(255,255,255,0.05);
}
.obs-check-item.is-ok .obs-check-status-pill { color: var(--success); background: var(--success-soft); }
.obs-check-item.is-fout .obs-check-status-pill { color: var(--danger); background: var(--danger-soft); }
.obs-checklist-readonly .obs-check-item-actions { display: none; }

/* ── Geschiedenis / tijdlijn (partials/geschiedenis.ejs) ── */
.obs-timeline { display: flex; flex-direction: column; gap: 0; }
.obs-timeline-item { position: relative; padding: 0 0 22px 26px; border-left: 2px solid var(--border-hairline); }
.obs-timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.obs-timeline-dot {
    position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--bg-elevated); border: 2px solid var(--accent);
}
.obs-timeline-dot.ok { border-color: var(--success); }
.obs-timeline-dot.fout { border-color: var(--danger); }
.obs-timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.obs-timeline-head strong { font-size: 0.88rem; color: var(--text-primary); }
.obs-timeline-head time { font-size: 0.72rem; color: var(--text-muted); }
.obs-timeline-body { margin-top: 6px; font-size: 0.84rem; color: var(--text-secondary); line-height: 1.5; }
.obs-timeline-file {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
    font-size: 0.78rem; color: var(--accent); text-decoration: none; font-weight: 600;
}
.obs-timeline-file:hover { text-decoration: underline; }

/* ── Scoreformulier (beoordelingen/formulier.ejs) ── */
.obs-score-field { display: flex; flex-direction: column; gap: 8px; }
.obs-score-stars { display: flex; gap: 6px; }
.obs-score-stars input { position: absolute; opacity: 0; width: 0; height: 0; }
.obs-score-stars label {
    width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.03); border: 1px solid var(--border-hairline); color: var(--text-muted);
    font-weight: 800; font-size: 0.9rem; cursor: pointer; transition: all .15s;
}
.obs-score-stars input:checked + label,
.obs-score-stars label:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.obs-scores-summary { display: flex; gap: 10px; flex-wrap: wrap; }
.obs-scores-summary .mini-stat-tile { flex: 1; min-width: 130px; }

/* ── Kaart-grids voor lijsten ── */
.obs-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.obs-item-card {
    background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
    padding: 18px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit;
    box-shadow: var(--shadow); transition: transform .18s var(--ease), border-color .18s var(--ease);
}
.obs-item-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.obs-item-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.obs-item-card h3 { font-size: 1rem; font-weight: 800; color: var(--text-primary); line-height: 1.3; }
.obs-item-card .obs-cat { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.obs-item-card p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.obs-item-card-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 0.74rem; color: var(--text-muted); padding-top: 10px; border-top: 1px solid var(--border-hairline); }
.obs-item-card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.obs-item-card-meta i { color: var(--accent); }

/* ── Publieke beoordelingskaarten (geen sidebar/topbar) ── */
.obs-public-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 24px 60px; }
.obs-public-header { text-align: center; margin-bottom: 32px; }
.obs-public-header h1 { font-size: 1.9rem; font-weight: 900; }
.obs-public-header p { color: var(--text-muted); margin-top: 6px; }
.obs-public-detail-file { background: var(--bg-elevated); border: 1px solid var(--border-hairline); border-radius: var(--radius-md); padding: 16px; display: flex; align-items: center; gap: 12px; }

/* ── Detailpagina layout ── */
.obs-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 980px) { .obs-detail-grid { grid-template-columns: 1fr; } }
.obs-meta-list { display: flex; flex-direction: column; gap: 12px; }
.obs-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.85rem; padding: 10px 0; border-bottom: 1px solid var(--border-hairline); }
.obs-meta-row:last-child { border-bottom: none; }
.obs-meta-row .lbl { color: var(--text-muted); display: flex; align-items: center; gap: 7px; }
.obs-meta-row .lbl i { color: var(--accent); width: 14px; }
.obs-meta-row .val { color: var(--text-primary); font-weight: 600; text-align: right; }
.obs-file-box {
    display: flex; align-items: center; gap: 12px; background: var(--bg-elevated);
    border: 1px solid var(--border-hairline); border-radius: var(--radius-md); padding: 14px;
}
.obs-file-box i { font-size: 1.4rem; color: var(--accent); }
.obs-file-box .obs-file-info { min-width: 0; flex: 1; }
.obs-file-box .obs-file-info strong { display: block; font-size: 0.86rem; color: var(--text-primary); word-break: break-all; }
.obs-file-box .obs-file-info small { color: var(--text-muted); font-size: 0.72rem; }


/* ============================================================
   VERLOF / AFMELD BEHEER
   ============================================================ */

/* ════════════════════════════════════════════════════════════════════════
   VERLOF / AFMELD BEHEER — pagina-specifieke CSS (v5 — nieuw ontwerp)
   Bouwt volledig op de bestaande tokens uit style.css (var(--...)).
   Alle class-namen die verlof.js / afmeldBeheer.js gebruiken om dynamische
   content in te schieten (hist-*, afm-item*, kv-*, mw-*, notitie-box,
   beoordeel-actions, vxt-loading-row) zijn ONGEWIJZIGD gelaten — er is
   alleen herontworpen wat puur visueel/structureel is.
   Voeg dit bestand toe NA style.css:
     <link rel="stylesheet" href="/css/style.css">
     <link rel="stylesheet" href="/css/verlof-afmeld.css">
   ════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────── Zijvenster (slide-over paneel) ───────────────────────
   Gedeeld door "Vraag verlof aan" / "Handmatig toevoegen" / detailweergave.
   Nieuw: een dunne verlichte rand-lijn bovenaan (sheen) en een ronde "ring"
   om het kop-icoon i.p.v. een vierkant vlak. */
.zv-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(var(--overlay-blur, 7px));
    z-index: 9999;
}
.zv-backdrop.show { display: block; }

.zv-panel {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 100%;
    max-width: 480px;
    max-height: 100vh;
    max-height: 100dvh;
    background: var(--bg-elevated);
    border-left: 1px solid var(--border-strong);
    box-shadow: var(--shadow-lift);
    display: flex;
    flex-direction: column;
    min-height: 0;
    transform: translateX(100%);
    transition: transform .32s var(--ease);
    z-index: 10000;
    overflow: hidden;
}
.zv-backdrop.show .zv-panel { transform: translateX(0); }
.zv-panel.wide { max-width: 560px; }

/* dunne verlichte lijn bovenaan het paneel — signature detail */
.zv-panel::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-brand);
    opacity: .8;
}

.zv-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 24px 22px 18px;
    border-bottom: 1px solid var(--border-hairline);
    flex-shrink: 0;
    position: relative;
}
.zv-head-icon {
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--accent-soft);
    border: 1px solid var(--border-soft);
    box-shadow: 0 0 0 4px var(--bg-elevated), 0 0 0 5px var(--border-hairline);
    color: var(--accent); display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem; flex-shrink: 0;
}
.zv-head-text { flex: 1; min-width: 0; }
.zv-head-text h3 { font-size: 1.06rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.zv-head-text p { margin: 4px 0 0; font-size: 0.8rem; color: var(--text-muted); line-height: 1.4; }
.zv-close {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 9px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border-hairline);
    color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s var(--ease); font-size: 0.85rem;
}
.zv-close:hover { background: var(--danger-soft); color: var(--danger); border-color: rgba(241,73,90,.3); }

/* Het <form>-element zit in de EJS tussen .zv-panel en .zv-body/.zv-foot in.
   Zonder deze regel is dat <form> gewoon display:block (de browserdefault),
   waardoor het niet meedoet als flex-item en gewoon uitrekt tot de volledige
   inhoud past — dan heeft .zv-body's overflow-y hieronder niets om tegenaan
   te scrollen. Dit maakt het form zelf ook een flex-column die de resterende
   ruimte in .zv-panel opvult. */
.zv-panel form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.zv-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.zv-foot {
    flex-shrink: 0;
    padding: 16px 22px;
    border-top: 1px solid var(--border-hairline);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: rgba(0,0,0,0.1);
}

/* ─────────────────────── Key/value detailweergave ─────────────────────── */
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.kv-grid.full { grid-template-columns: 1fr; }
.kv-item { display: flex; flex-direction: column; gap: 4px; }
.kv-item.span-2 { grid-column: span 2; }
.kv-label {
    font-size: 0.65rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    color: var(--text-muted); font-family: var(--font-display);
    display: flex; align-items: center; gap: 6px;
}
.kv-label::before {
    content: ""; width: 4px; height: 4px; border-radius: 50%;
    background: var(--accent); flex-shrink: 0; opacity: .7;
}
.kv-value { font-size: 0.92rem; color: var(--text-primary); line-height: 1.5; white-space: pre-line; }
.kv-value.muted { color: var(--text-muted); font-style: italic; }
.kv-divider { height: 1px; background: var(--border-hairline); margin: 4px 0; }

.kv-person {
    display: flex; align-items: center; gap: 13px;
    background: rgba(0,0,0,0.16);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}
.kv-person-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--gradient-brand-soft); border: 1px solid var(--border-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem;
    flex-shrink: 0; text-transform: uppercase;
}
.kv-person-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); }
.kv-person-sub { font-size: 0.76rem; color: var(--text-muted); margin-top: 1px; }

/* ─────────────────────── Discord-waarschuwing ─────────────────────── */
.discord-warn {
    display: flex; align-items: flex-start; gap: 12px;
    background: rgba(88,101,242,0.08); border: 1px solid rgba(88,101,242,0.28);
    color: var(--text-primary);
    padding: 14px 16px; border-radius: var(--radius-md); font-size: 0.85rem; line-height: 1.5;
}
.discord-warn i {
    color: var(--accent-2); font-size: 1.1rem; margin-top: 1px; flex-shrink: 0;
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(88,101,242,0.14);
    display: flex; align-items: center; justify-content: center;
}
.discord-warn a { color: var(--accent-2); font-weight: 700; text-decoration: underline; }

/* ─────────────────────── Geschiedenis: toolbar (chips i.p.v. tabs) ───────────
   Gescopeerd op .vf-toolbar zodat de globale .tab-nav/.tab-btn elders op de
   site onaangeroerd blijven — hier krijgen ze een eigen "pill chip" look. */
.vf-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.vf-toolbar .tab-nav {
    margin-bottom: 0; flex: 1; border-bottom: none; gap: 8px;
}
.vf-toolbar .tab-btn {
    border: 1px solid var(--border-hairline);
    border-radius: 999px;
    padding: 7px 15px;
    background: rgba(0,0,0,0.14);
}
.vf-toolbar .tab-btn.active-tab {
    background: var(--accent-soft);
    border-color: var(--border-strong);
    color: var(--accent);
}
.vf-search { position: relative; width: 230px; max-width: 100%; }
.vf-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.8rem; }
.vf-search input { padding-left: 36px; border-radius: 999px; }

/* ─────────────────────── Geschiedenis: verticaal spoor (rail) ───────────────
   Signature-element: elke aanvraag hangt als een genummerd/gekleurd
   knooppunt aan een doorlopende lijn — leest als een tijdlijn i.p.v. een
   kale tabel. De <table>/<thead>/<tbody id="vf-geschiedenis-body"> structuur
   blijft functioneel identiek (JS injecteert nog steeds <tr><td>), dit is
   een pure oplaag via CSS. */
.vf-history-card { position: relative; }
.vf-history-card .data-table thead { display: none; }
.vf-history-card .data-table,
.vf-history-card .data-table tbody,
.vf-history-card .data-table tr,
.vf-history-card .data-table td { display: block; width: 100%; }

.vf-history-card #vf-geschiedenis-body {
    position: relative;
    padding-left: 6px;
}
.vf-history-card #vf-geschiedenis-body::before {
    content: "";
    position: absolute;
    left: 27px;
    top: 6px; bottom: 6px;
    width: 2px;
    background: linear-gradient(to bottom, var(--border-strong), var(--border-hairline) 92%);
    z-index: 0;
}
.vf-history-card .data-table tbody tr {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 4px 14px;
    padding: 12px 14px 12px 4px;
    border-bottom: none;
    border-radius: var(--radius-md);
    position: relative;
}
.vf-history-card .data-table tbody tr:hover { background: var(--accent-soft); }
.vf-history-card .data-table td { padding: 0; border-bottom: none; }
.vf-history-card .data-table td:nth-child(3),
.vf-history-card .data-table td:nth-child(4) { grid-column: 2; }
.vf-history-card .data-table td:nth-child(4) { display: none; } /* "taken uitvoerbaar" — alleen zichtbaar in detail-modal */
.vf-history-card .data-table td:last-child { grid-column: 4; }

.hist-row-main { display: flex; align-items: center; gap: 11px; }
.hist-type-dot {
    width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0;
    position: relative; z-index: 1;
    box-shadow: 0 0 0 5px var(--bg-elevated), 0 0 0 6px var(--border-hairline);
}
.hist-type-dot.verlof { background: var(--accent); box-shadow: 0 0 0 5px var(--bg-elevated), 0 0 10px var(--accent-glow); }
.hist-type-dot.ziekte { background: var(--danger); box-shadow: 0 0 0 5px var(--bg-elevated), 0 0 10px rgba(241,73,90,.35); }
.hist-type-dot.anders { background: var(--violet); box-shadow: 0 0 0 5px var(--bg-elevated), 0 0 10px rgba(168,85,247,.35); }
.hist-period { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; }
.hist-reden-cell {
    grid-column: 2; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
    white-space: nowrap; font-size: 0.8rem; color: var(--text-muted); margin-top: 2px;
}

@media (max-width: 760px) {
    .vf-history-card .data-table tbody tr { grid-template-columns: auto 1fr; }
    .vf-history-card .data-table td:last-child { grid-column: 2; justify-self: start; margin-top: 4px; }
}

/* ─────────────────────── Afmeld beheer: board-indeling ───────────────────────
   "Lopend" (vandaag afwezig) staat los, breed uitgelicht bovenaan — dat is
   de eerste vraag die een teamleider heeft. De rest volgt als 3-koloms rij,
   gesorteerd op urgentie: actie nodig → aankomend → verlopen. */
.afm-board { display: flex; flex-direction: column; gap: 18px; }
.afm-buckets-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
@media (max-width: 1100px) { .afm-buckets-row { grid-template-columns: 1fr; } }

.afm-bucket-head { display: flex; align-items: center; gap: 10px; }
.afm-bucket-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.afm-bucket.openstaand .afm-bucket-dot { background: var(--warning); box-shadow: 0 0 8px var(--warning-soft); }
.afm-bucket.lopend .afm-bucket-dot { background: var(--accent); }
.afm-bucket.verlopen .afm-bucket-dot { background: var(--text-muted); }
.afm-bucket.aankomend .afm-bucket-dot { background: var(--violet); }

/* levend-stipje voor de uitgelichte "lopend" bucket */
.afm-bucket.afm-bucket-featured .afm-bucket-dot {
    animation: afm-pulse 1.8s var(--ease) infinite;
}
@keyframes afm-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
    50% { box-shadow: 0 0 0 6px transparent; }
}

.afm-bucket.openstaand { border-color: rgba(243,167,18,.22); }

/* ── Uitgelichte bucket: horizontale roster-strip van vandaag afwezige mensen ── */
.afm-bucket-featured .afm-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
    padding-bottom: 4px;
    margin-top: 16px;
}
.afm-bucket-featured .afm-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    min-width: 108px;
    padding: 14px 10px 12px;
}
.afm-bucket-featured .afm-item-avatar { width: 46px; height: 46px; font-size: 1rem; }
.afm-bucket-featured .afm-item-body { width: 100%; }
.afm-bucket-featured .afm-item-name {
    justify-content: center; font-size: 0.82rem; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; display: block;
}
.afm-bucket-featured .afm-item-meta { justify-content: center; }
.afm-bucket-featured .afm-item-chevron { display: none; }

.afm-list {
    display: flex; flex-direction: column; gap: 8px;
    max-height: 420px; overflow-y: auto; margin-top: 16px;
    padding-right: 2px;
}
.afm-item {
    display: flex; align-items: center; gap: 12px;
    background: rgba(0,0,0,0.18);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    cursor: pointer;
    transition: all .15s var(--ease);
}
.afm-item:hover { border-color: var(--border-soft); background: var(--accent-soft); }
.afm-item.is-urgent { border-left: 3px solid var(--warning); }
.afm-item-avatar {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    background: var(--accent-soft); border: 1px solid var(--border-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .82rem;
    text-transform: uppercase;
}
.afm-item-body { flex: 1; min-width: 0; }
.afm-item-name { font-weight: 700; font-size: 0.87rem; color: var(--text-primary); display: flex; align-items: center; gap: 7px; }
.afm-item-meta { font-size: 0.74rem; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.afm-item-chevron { color: var(--text-muted); font-size: 0.78rem; flex-shrink: 0; }

.afm-list:empty::after {
    content: "Niemand in deze lijst.";
    display: block; text-align: center; color: var(--text-muted);
    font-size: 0.8rem; padding: 18px 0;
}

/* ─────────────────────── Medewerker-autocomplete (handmatig toevoegen) ─────────────────────── */
.mw-autocomplete { position: relative; }
.mw-results {
    position: absolute; left: 0; right: 0; top: calc(100% + 6px);
    background: var(--bg-elevated); border: 1px solid var(--border-strong);
    border-radius: var(--radius-md); box-shadow: var(--shadow);
    max-height: 260px; overflow-y: auto; z-index: 40;
    display: none;
}
.mw-results.show { display: block; }
.mw-result-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 13px; cursor: pointer; transition: background .12s;
}
.mw-result-item:hover, .mw-result-item.active { background: var(--accent-soft); }
.mw-result-avatar {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    background: var(--accent-soft); border: 1px solid var(--border-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .74rem;
    text-transform: uppercase;
}
.mw-result-name { font-size: 0.86rem; font-weight: 700; color: var(--text-primary); }
.mw-result-empty { padding: 14px; text-align: center; font-size: 0.8rem; color: var(--text-muted); }

.mw-selected {
    display: flex; align-items: center; gap: 10px;
    background: var(--accent-soft); border: 1px solid var(--border-soft);
    border-radius: var(--radius-md); padding: 10px 12px; margin-top: 8px;
}
.mw-selected-name { flex: 1; font-size: 0.87rem; font-weight: 700; color: var(--text-primary); }
.mw-selected-clear { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: .85rem; padding: 4px; }
.mw-selected-clear:hover { color: var(--danger); }

/* ─────────────────────── Notitie-blok bij beoordeling ─────────────────────── */
.notitie-box {
    background: rgba(0,0,0,0.18);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-md);
    padding: 13px 15px;
}
.notitie-box .kv-label { margin-bottom: 6px; }

.beoordeel-actions { display: flex; gap: 10px; }
.beoordeel-actions .btn-goed, .beoordeel-actions .btn-afwijs {
    flex: 1; justify-content: center; padding: 12px 16px; font-size: 0.84rem; font-weight: 800;
    border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-display);
    display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent;
    transition: transform .12s var(--ease);
}
.beoordeel-actions .btn-goed:active, .beoordeel-actions .btn-afwijs:active { transform: scale(.97); }
.beoordeel-actions .btn-goed { background: var(--success-soft); color: var(--success); border-color: rgba(22,201,138,.3); }
.beoordeel-actions .btn-afwijs { background: var(--danger-soft); color: var(--danger); border-color: rgba(241,73,90,.3); }

/* ─────────────────────── Skeletons / loading states ─────────────────────── */
.vxt-loading-row { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 30px; color: var(--text-muted); font-size: 0.85rem; }
.vxt-loading-row i { animation: vxt-spin 0.8s linear infinite; }
@keyframes vxt-spin { to { transform: rotate(360deg); } }

/* ─────────────────────── Toast container (eigen positionering) ─────────────────────── */
.vf-toast-stack {
    position: fixed; bottom: 22px; right: 22px; z-index: 99999;
    display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.vf-toast-stack .toast { margin-bottom: 0; box-shadow: var(--shadow); animation: fadeUp .3s var(--ease) both; }

/* ─────────────────────── Fieldset helper voor optionele velden ─────────────────────── */
.optioneel-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; font-weight: 700; color: var(--accent);
    background: none; border: none; cursor: pointer; padding: 0;
}
.optioneel-toggle i { transition: transform .2s var(--ease); font-size: .7rem; }
.optioneel-toggle.open i { transform: rotate(180deg); }
.optioneel-velden { display: none; flex-direction: column; gap: 14px; margin-top: 4px; }
.optioneel-velden.open { display: flex; }
/* ---------- Orders module ---------- */
.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}
.btn-link:hover { opacity: .8; }

/* ============================================================
   Mailings-module (mailing/index.php, mailing/view.php)
   Hergebruikt overal .card, .btn, .f-input, .data-table, .status-badge,
   .modal-backdrop/.modal-box zoals de rest van het paneel.
   ============================================================ */

.mg-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .mg-layout { grid-template-columns: 1fr; } }

.mg-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.mg-section { margin-bottom: 22px; }
.mg-section:last-child { margin-bottom: 0; }

/* -- Toolbar -- */
.mg-toolbar {
    display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
    background: var(--bg-hover); border: 1px solid var(--border-color);
    border-bottom: none; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    padding: 6px;
}
.mg-toolbar button {
    background: transparent; border: 1px solid transparent; color: var(--text-secondary);
    width: 32px; height: 32px; border-radius: 7px; cursor: pointer; font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.mg-toolbar button:hover { background: var(--bg-elevated); color: var(--text-primary); }
.mg-toolbar #mgMergeNaam, .mg-toolbar #mgMergeId { width: auto; padding: 0 10px; font-family: monospace; font-size: 11px; }
.mg-toolbar-sep { width: 1px; height: 20px; background: var(--border-color); margin: 0 4px; }

/* -- Editor -- */
.mg-editor {
    min-height: 220px; max-height: 420px; overflow-y: auto;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    padding: 14px 16px; font-size: 14px; line-height: 1.65; color: var(--text-primary);
}
.mg-editor:focus { outline: none; border-color: var(--accent); }
.mg-editor:empty::before { content: attr(data-placeholder); color: var(--text-faint); }
.mg-editor a { color: var(--accent); text-decoration: underline; }
.mg-editor h2 { font-size: 18px; margin: 10px 0; color: var(--text-primary); }
.mg-editor ul { padding-left: 20px; }

/* -- Doelgroep-groepen -- */
.mg-audience-tab-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.mg-groups { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mg-group-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg-hover); border: 1px solid var(--border-color);
    border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}
.mg-group-pill:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--text-primary); }
.mg-group-pill input { width: auto; margin: 0; accent-color: var(--accent); }

/* -- Klant-zoeker + chips -- */
.mg-search-wrap { position: relative; margin-top: 10px; }
.mg-search-wrap > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 12px; }
.mg-search-wrap .f-input { padding-left: 36px; }
.mg-search-results {
    display: none; position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
    background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lift); max-height: 260px; overflow-y: auto;
}
.mg-search-result { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--border-hairline); }
.mg-search-result:last-child { border-bottom: none; }
.mg-search-result:hover { background: var(--bg-hover); }
.mg-search-result-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.mg-search-result-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.mg-search-empty { padding: 12px 14px; font-size: 13px; color: var(--text-muted); }

.mg-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mg-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent-soft); border: 1px solid var(--border-soft);
    color: var(--text-primary); border-radius: 999px; padding: 6px 8px 6px 12px; font-size: 12px; font-weight: 600;
}
.mg-chip button {
    background: transparent; border: none; color: var(--text-secondary); cursor: pointer;
    width: 18px; height: 18px; border-radius: 50%; font-size: 14px; line-height: 1;
}
.mg-chip button:hover { background: rgba(255,255,255,.1); color: var(--text-primary); }

.mg-audience-count {
    margin-top: 16px; padding: 12px 14px; background: var(--bg-hover); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); font-size: 13px; color: var(--text-secondary);
}
.mg-audience-count i { color: var(--accent); margin-right: 6px; }

.mg-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* -- Historie-kaart -- */
.mg-history-head { font-weight: 700; font-size: 14px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.mg-history-head i { color: var(--accent); }
.mg-history-list { display: flex; flex-direction: column; gap: 8px; }
.mg-history-item {
    display: block; padding: 12px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); text-decoration: none; color: inherit;
    transition: border-color .15s var(--ease), background .15s var(--ease);
}
.mg-history-item:hover { border-color: var(--border-strong); background: var(--bg-hover); }
.mg-history-item-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mg-history-subject { font-size: 13px; font-weight: 700; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-history-item-meta { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }

/* -- Weergave van de mail-inhoud op de detailpagina -- */
.mg-view-body { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 18px 20px; font-size: 14px; line-height: 1.7; }
.mg-view-body a { color: var(--accent); }
