/* =============================================================================
   e-zoo / Aeres MBO Barneveld — hoofdstylesheet
   Mobiel-first, frisse groen-witte huisstijl.
   ========================================================================== */

/* Lokaal gehoste fonts (geen externe dienst) */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/fredoka-500.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/fredoka-600.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/fredoka-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/nunito-400.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/nunito-600.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/nunito-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/nunito-800.woff2') format('woff2'); }

:root {
    --green-700: #1f5c39;
    --green-600: #2e7d4f;
    --green-500: #43a06a;
    --green-100: #e3f1e6;
    --green-50:  #f1f7f0;
    --orange:    #ed7728;
    --honey:     #f5b836;   /* signatuur: XP / uilen / levels */
    --honey-deep:#d9930f;
    --purple:    #604580;   /* logokleur E-zoo (uil) — beheerbalk */
    --purple-deep:#4d3866;
    --ink:       #16271f;   /* diep dennen, voor koppen/tekst */
    --gray-900:  #16271f;
    --gray-700:  #46514b;
    --gray-500:  #7c857f;
    --gray-300:  #cdd4ce;
    --gray-200:  #e4e9e3;
    --gray-100:  #f1f4f0;
    --bg:        #f4f7f0;
    --red:       #c4322c;
    --yellow:    #d4a72c;

    --font-display: 'Fredoka', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, -apple-system, sans-serif;

    --radius: 12px;
    --shadow: 0 1px 2px rgba(20,40,30,.08), 0 6px 18px rgba(20,40,30,.07);
    --shadow-sm: 0 1px 2px rgba(20,40,30,.06);
    --max-width: 1200px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    color: var(--gray-900);
    background: var(--bg);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    /* Geen dubbeltik-zoom; pinch-zoom is al uit via de viewport-meta. */
    touch-action: manipulation;
    overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; margin: 1.2em 0 .5em; color: var(--ink); font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.85rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.12rem; }

p { margin: .5em 0; }
hr { border: none; border-top: 1px solid var(--gray-200); margin: 1em 0; }

a { color: var(--green-600); }
a:hover { color: var(--green-700); }

code { background: var(--gray-100); padding: 1px 6px; border-radius: 3px; font-size: .9em; }

.muted    { color: var(--gray-500); }
.small    { font-size: .85em; }
.inline   { display: inline; }
.inline-form { display: flex; gap: .5em; align-items: center; }

/* ---- Topnav ---- */
.topnav {
    background: #fff;
    color: var(--purple);
    padding: .8em 1em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
/* Witte balk: het logo staat al in kleur, dus geen chipje meer nodig. */
.topnav .brand {
    font-weight: bold; font-size: 1.2em; color: var(--purple); text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.topnav a       { color: var(--purple); text-decoration: none; padding: .25em .5em; }
.topnav a:hover { text-decoration: underline; }
.topnav .user   { margin-left: auto; opacity: .9; font-size: .9em; }
/* Subtiele alert-knop: openstaande toegangsverzoeken */
.topnav-alert {
    display: inline-flex; align-items: center; gap: .4em;
    background: var(--honey); color: var(--ink) !important;
    padding: .25em .7em; border-radius: 999px;
    font-size: .85em; font-weight: 600; text-decoration: none !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.18); line-height: 1.4;
}
.topnav-alert[hidden] { display: none; }  /* anders overschrijft display:inline-flex het hidden-attribuut */
.topnav-alert:hover { background: var(--honey-deep); }
/* Tweede alert: nog te beoordelen sessies — andere kleur dan de toegangsverzoeken */
.topnav-alert-review { background: #bcd9f5; }
.topnav-alert-review:hover { background: #a3c8ef; }
/* Derde alert: openstaande praktijkhandeling-aanvragen */
.topnav-alert-skill { background: #cdeacf; }
.topnav-alert-skill:hover { background: #b6dfb9; }
.topnav-alert svg { display: block; flex-shrink: 0; }
.topnav-alert .topnav-alert-count {
    background: #c0392b; color: #fff; border-radius: 999px;
    min-width: 1.5em; text-align: center; padding: 0 .3em; font-variant-numeric: tabular-nums;
}
@media (max-width: 700px) { .topnav-alert .topnav-alert-label { display: none; } }
.role { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: .75em; background: rgba(96,69,128,.14); color: var(--purple); margin-left: .5em; text-transform: uppercase; }

.main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1em;
}

/* ---- Cards ---- */
.card {
    background: white;
    border-radius: var(--radius);
    padding: 1em;
    margin: 1em 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}
.card details summary { cursor: pointer; }

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: .65em 1.1em;
    font-size: 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: var(--gray-100);
    color: var(--gray-900);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    font-weight: 500;
    transition: background .15s, transform .05s;
}
.btn:hover { background: var(--gray-200); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green-600); color: white; border-color: var(--green-600); }
.btn-primary:hover { background: var(--green-700); }
.btn-secondary { background: white; border-color: var(--gray-300); }
.btn-danger { background: var(--red); color: white; border-color: var(--red); }
.btn-danger:hover { background: #a4271f; }
.btn-small { padding: .35em .7em; font-size: .9rem; }

/* ---- Forms ---- */
form label {
    display: block;
    margin: .8em 0;
    font-weight: 500;
    color: var(--gray-700);
}
form input[type="text"],
form input[type="email"],
form input[type="number"],
form input[type="search"],
form input[type="date"],
form input[type="file"],
form select,
form textarea {
    width: 100%;
    max-width: 100%;
    padding: .55em .7em;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: white;
    font-family: inherit;
    margin-top: .25em;
}
form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="number"]:focus,
form select:focus,
form textarea:focus {
    outline: 2px solid var(--green-500);
    outline-offset: 1px;
    border-color: var(--green-500);
}
form .cb { font-weight: 400; }
form .cb input { margin-right: .4em; vertical-align: middle; }
form fieldset {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin: 1em 0;
    padding: .75em 1em;
}
form fieldset legend { padding: 0 .5em; font-weight: 500; color: var(--gray-700); }
form .radio { display: inline-block; margin: 0 1em .5em 0; font-weight: 400; }
form .form-actions { display: flex; gap: .5em; flex-wrap: wrap; margin-top: 1em; }
form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1em; }
@media (max-width: 600px) { form .form-grid { grid-template-columns: 1fr; } }

.filter-bar { display: flex; gap: .5em; flex-wrap: wrap; margin: 1em 0; align-items: flex-end; }
.filter-bar label { margin: 0; display: flex; flex-direction: column; gap: .2em; }
.filter-bar input, .filter-bar select { flex: 1; max-width: 300px; }
/* Op smal scherm: Van/Tot delen één rij (elk ~halve breedte), de knop komt
   op een eigen volle regel — zo passen date-inputs + knop netjes. */
@media (max-width: 700px) {
    .filter-bar { display: grid; grid-template-columns: 1fr 1fr; gap: .5em .9em; align-items: end; }
    .filter-bar label { min-width: 0; margin: 0; font-size: .9em; }
    .filter-bar input, .filter-bar select { width: 100%; max-width: none; min-width: 0; box-sizing: border-box; }
    /* date-inputs compact houden zodat ze ook op iOS naast elkaar passen */
    .filter-bar input[type="date"] { font-size: .9em; padding: .4em .3em; }
    .filter-bar > .btn { grid-column: 1 / -1; }  /* knop op een eigen volle regel */
}

.code-input {
    font-size: 2em;
    text-align: center;
    letter-spacing: 0.4em;
    font-family: monospace;
    max-width: 8em;
    margin: 0 auto;
    display: block;
}

/* ---- Flash ---- */
.flash {
    padding: .7em 1em;
    border-radius: var(--radius);
    margin: .5em 0;
    background: var(--green-100);
    border-left: 4px solid var(--green-600);
}
.flash-error { background: #fde8e6; border-color: var(--red); }
.error { color: var(--red); margin: .5em 0; }

/* ---- Tables ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 1em 0;
}
.data-table th, .data-table td {
    padding: .6em .8em;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}
.data-table th { background: var(--green-50); color: var(--green-700); font-family: var(--font-display); font-weight: 600; font-size: .88em; letter-spacing: .01em; }
.data-table tbody tr:hover { background: var(--green-50); }
.data-table.compact td, .data-table.compact th { padding: .35em .55em; font-size: .9em; }
.table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 1em 0;
    /* Zichtbare, slanke scrollbalk als hint dat een brede tabel
       horizontaal te scrollen is. */
    scrollbar-width: thin;
    scrollbar-color: var(--green-500) var(--green-50);
}
.table-scroll::-webkit-scrollbar { height: 9px; }
.table-scroll::-webkit-scrollbar-track { background: var(--green-50); border-radius: 0 0 var(--radius) var(--radius); }
.table-scroll::-webkit-scrollbar-thumb { background: var(--green-500); border-radius: 6px; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: var(--green-600); }
.table-scroll .data-table { margin: 0; box-shadow: none; width: auto; min-width: 100%; }
.assessments-table .comment-cell { min-width: 18em; max-width: 32em; word-break: break-word; white-space: normal; }
@media (max-width: 700px) {
    /* Houd kolommen leesbaar en laat de tabel horizontaal scrollen i.p.v.
       de pagina open te breken. */
    .table-scroll .data-table th,
    .table-scroll .data-table td { white-space: nowrap; }
    .table-scroll .data-table .comment-cell,
    .table-scroll .data-table .wrap-cell,
    .table-scroll .data-table .dept-assign { white-space: normal; }
    /* Volgorde-/#-kolom verbergen op smal scherm. */
    .data-table .col-num { display: none; }
}

/* ---- Login (student-stijl) ---- */
.login-page {
    min-height: 100vh;
    background:
        radial-gradient(rgba(255,255,255,.10) 1.6px, transparent 1.7px) 0 0 / 30px 30px,
        radial-gradient(rgba(255,255,255,.07) 1.6px, transparent 1.7px) 15px 15px / 30px 30px,
        radial-gradient(125% 125% at 50% 0%, #7a5ca0 0%, var(--purple) 45%, var(--purple-deep) 100%);
}
.login-page .main { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 1.2em; }
.login-card {
    position: relative; overflow: hidden;
    max-width: 400px; width: 100%; border: none; border-radius: 22px;
    padding: 2em 1.8em 1.7em; text-align: center;
    box-shadow: 0 10px 34px rgba(20,40,30,.28), 0 2px 6px rgba(20,40,30,.14);
}
/* (Honing-gloed achter het logo verwijderd op verzoek — schonere kaart.) */
.login-card::before { display: none; }
.login-card > * { position: relative; z-index: 1; }

/* Zelfde stippen-sfeer als het inlogscherm, subtiel op de lichte lobby-achtergrond. */
body.lobby-page {
    background:
        radial-gradient(rgba(46,125,79,.06) 1.6px, transparent 1.7px) 0 0 / 30px 30px,
        radial-gradient(rgba(46,125,79,.045) 1.6px, transparent 1.7px) 15px 15px / 30px 30px,
        var(--bg);
    background-attachment: fixed;
}
.login-logo { display: block; width: min(230px, 78%); height: auto; margin: .2em auto .6em; }
.login-tagline { color: var(--gray-500); font-family: var(--font-display); font-weight: 500; margin: 0 0 1.4em; font-size: .98rem; }
.login-card form { text-align: left; }
.login-card label { display: block; font-family: var(--font-display); font-weight: 500; color: var(--gray-700); margin-bottom: 1em; }
.login-card input[type=email], .login-card input[type=text] {
    width: 100%; margin-top: .35em; padding: .8em .9em; border-radius: 13px;
    border: 1.5px solid var(--gray-200); background: var(--gray-100); font-size: 1.05rem;
}
.login-card input:focus { outline: none; border-color: var(--green-500); background: #fff; box-shadow: 0 0 0 3px var(--green-100); }
.login-card .btn-primary { width: 100%; padding: .85em; border-radius: 13px; font-size: 1.05rem; margin-top: .2em; }
.login-card .code-input { text-align: center; letter-spacing: .5em; font-size: 1.6rem; font-family: var(--font-display); padding-left: .5em; }
.login-card p { color: var(--gray-700); }
.login-card > p.muted, .login-card form > p.muted { text-align: center; }
.login-card .error { border-radius: 13px; text-align: left; }

/* ---- Student dashboard ---- */
.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1em;
    margin: 1em 0;
}
.dept-card-form { margin: 0; }
.dept-card {
    width: 100%;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5em 1em;
    text-align: left;
    cursor: pointer;
    transition: all .15s;
    display: block;
}
.dept-card:hover { border-color: var(--green-500); transform: translateY(-2px); box-shadow: var(--shadow); }
.dept-card { overflow: hidden; text-decoration: none; color: inherit; }  /* clearfix + link reset */
.dept-card .dept-name { font-weight: 800; font-size: 1.6em; display: block; color: var(--gray-900); line-height: 1.2; }
.dept-card .dept-stars { float: right; margin-left: .5em; }
.dept-card .dept-stars .stars { font-size: 1.4em; }
.dept-card .dept-meta { color: var(--green-600); font-size: .85em; display: block; margin-top: .3em; clear: both; }

/* ---- Department keuze-pagina (verzorging vs algemene info) ---- */
.back-link { margin: 0 0 .5em; }
.back-link a { text-decoration: none; color: var(--gray-700); font-size: .95em; }
.back-link a:hover { color: var(--green-700); }

.dept-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1em;
    margin: 1.5em 0;
}
.dept-choice-form { margin: 0; }
.dept-choice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35em;
    width: 100%;
    padding: 1.6em 1.4em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    color: white;
    font: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.dept-choice:hover { transform: translateY(-2px); box-shadow: var(--shadow); filter: brightness(1.05); }
.dept-choice:active { transform: translateY(0); filter: brightness(.95); }
.dept-choice-icon { font-size: 2em; line-height: 1; }
.dept-choice-title { font-weight: 800; font-size: 1.4em; }
.dept-choice-sub { font-size: .9em; opacity: .9; }

.dept-choice-care { background: linear-gradient(135deg, var(--green-500), var(--green-700)); }
.dept-choice-info { background: linear-gradient(135deg, #5b8dee, #3b5fbf); }
.dept-choice-title { font-family: var(--font-display); font-weight: 700; }

/* Afdeling-hero (department.php) */
.dept-hero {
    position: relative; border-radius: var(--radius); overflow: hidden; min-height: 170px;
    display: flex; align-items: flex-end; padding: 1.2em 1.3em; color: #fff;
    background: linear-gradient(135deg, var(--green-700), var(--green-600));
    background-size: cover; background-position: center; box-shadow: var(--shadow); margin: .4em 0 1.2em;
}
.dept-hero.has-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,40,30,.1), rgba(20,40,30,.75)); }
.dept-hero > * { position: relative; z-index: 1; }
.dept-hero h1 { color: #fff; margin: 0; font-size: 2rem; }
.dept-hero-meta { display: inline-flex; align-items: center; gap: .45em; color: rgba(255,255,255,.92); font-size: .9rem; }

/* Beheer: afdelingsafbeelding (preview + tabel-thumb) */
.dept-thumb { width: 56px; height: 38px; object-fit: cover; border-radius: 6px; display: block; }
.dept-image-edit { margin: .5em 0 1em; }
.dept-image-preview { max-width: 240px; width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); display: block; margin-bottom: .6em; }

/* ---- Algemene info pagina ---- */
.info-section { margin: 1.5em 0; }
.info-section h2 { color: var(--green-700); margin-bottom: .4em; }
.info-list { margin: .25em 0; padding-left: 1.2em; }
.info-list li { margin: .2em 0; }

.pending-card { text-align: center; padding: 2em; }
.pending-card h2 { color: var(--orange); }

/* ---- Care view ---- */
.session-header {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1em;
    background: linear-gradient(135deg, var(--green-700), var(--green-600));
    color: #fff; padding: 1.1em 1.3em; border-radius: var(--radius); margin: 1em 0;
    box-shadow: var(--shadow);
}
.session-header h1 { margin: 0; color: #fff; }
.session-header .muted { color: rgba(255,255,255,.85); }
.session-header .btn-primary { background: var(--honey); border-color: var(--honey); color: var(--ink); }
.session-header .btn-primary:hover { background: var(--honey-deep); border-color: var(--honey-deep); }

.care-progress { display: flex; align-items: center; gap: .8em; margin: 0 0 1.4em; }
.care-progress-bar { flex: 1; height: 12px; border-radius: 7px; background: var(--gray-200); overflow: hidden; }
.care-progress-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-500), var(--honey)); border-radius: 7px; transition: width .5s ease; }
.care-progress-label { font-family: var(--font-display); font-weight: 600; color: var(--green-700); white-space: nowrap; font-size: .95rem; }
.care-progress.is-complete .care-progress-bar > span { background: var(--honey); }
.care-progress.is-complete .care-progress-label { color: var(--honey-deep); }

.category { margin: 1.5em 0; }
.category h2 { font-size: 1.15rem; color: var(--green-700); border-bottom: 2px solid var(--green-100); padding-bottom: .3em; }

.task-list, .chore-list { list-style: none; padding: 0; margin: 0; }
.task {
    background: #fff; border-radius: var(--radius);
    border: 1px solid var(--gray-200); border-left: 5px solid var(--green-500);
    margin: .5em 0; transition: box-shadow .15s ease;
}
.task:hover { box-shadow: var(--shadow-sm); }
.task-row { display: flex; justify-content: space-between; align-items: center; padding: .8em 1em; gap: 1em; }
.task-info { flex: 1; min-width: 0; }
.task-info strong { font-family: var(--font-display); font-weight: 600; }
.task-claimed { border-left-color: var(--honey); background: #fffaf0; }
.task-done { border-left-color: var(--gray-300); background: var(--gray-100); opacity: .75; }
.task-done .task-info strong { text-decoration: line-through; text-decoration-color: var(--gray-300); }

/* Werklijst-kop: dezelfde tegel als het afdeling-startscherm */
.care-head { display: flex; flex-direction: column; gap: .55em; margin: .3em 0 1.1em; }
.care-head-tile { width: 100%; }
.care-head-sub { font-size: .82rem; color: var(--gray-700); margin-top: .15em; }
.care-head-end { align-self: flex-end; margin: 0; }

/* Dierjournaal-kaart bovenaan de werklijst */
.care-journal { margin: 0 0 1em; padding: 1em 1.1em; }
.care-journal > summary { display: flex; align-items: center; gap: .6em; cursor: pointer; list-style: none; }
.care-journal > summary::-webkit-details-marker { display: none; }
.care-journal-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.care-journal-ic svg { width: 22px; height: 22px; }
.care-journal-title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--purple); }
.care-journal-new { background: #fdf2dc; color: var(--honey-deep); font-weight: 600; font-size: .8rem; padding: .25em .7em; border-radius: 999px; }
.care-journal-chev { margin-left: auto; color: var(--purple); transition: transform .15s; }
.care-journal[open] .care-journal-chev { transform: rotate(180deg); }
.care-journal-chev svg { width: 20px; height: 20px; display: block; }
.care-journal-list { list-style: none; padding: 0; margin: .7em 0 .4em; }
.care-journal-list li { display: flex; align-items: flex-start; gap: .6em; padding: .3em 0; }
.care-journal-kind { flex-shrink: 0; width: 26px; height: 26px; display: grid; place-items: center; color: var(--gray-500); }
.care-journal-kind svg { width: 22px; height: 22px; }
.care-journal-body { line-height: 1.3; }
.care-journal-more { display: inline-flex; align-items: center; gap: .3em; margin-top: .4em; color: var(--purple); font-weight: 600; text-decoration: none; }
.care-journal-more:hover { text-decoration: underline; }
.kind-gezondheid { color: #e0a020; } .kind-sterfte { color: #c0392b; } .kind-behandeling { color: var(--purple); }
.kind-geboorte { color: var(--green-600); } .kind-voeding { color: var(--honey-deep); } .kind-verblijf { color: #2c6fd6; }
.kind-gedrag { color: #2a9d8f; } .kind-overig { color: var(--gray-500); }

/* Volledige journaalpagina (student) */
.journal-full { list-style: none; padding: 0; margin: 1em 0; }
.journal-full-item { display: flex; gap: .7em; padding: .7em .2em; border-bottom: 1px solid var(--gray-100); }
.journal-full-item.is-pinned { background: #faf8fd; border-radius: 10px; padding: .7em; }
.journal-full-body { flex: 1; }

/* dag-vinkjes in beheer-formulieren */
.days-pick { display: inline-flex; flex-wrap: wrap; gap: .5em; }

/* Werklijst-tiles — kaartstijl in lijn met het afdeling-startscherm (.dhome-tile) */
.task-tiles { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6em; }
.task-tile { display: flex; align-items: center; gap: .9em; background: #fff; padding: .85em 1em; border-radius: 16px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); }
.task-tile-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--green-100); color: var(--green-700); flex-shrink: 0; }
.task-tile-ic svg { width: 24px; height: 24px; }
.task-tile-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: .05em; }
.task-tile-txt strong { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.15; }
.task-tile-txt span { font-size: .88rem; color: var(--gray-700); }
.task-tile-meta { font-size: .8rem; }
.task-tile-action { flex-shrink: 0; }
.task-tile-badge { font-size: .8rem; font-weight: 600; padding: .3em .7em; border-radius: 999px; background: var(--gray-100); color: var(--gray-700); white-space: nowrap; }
.task-tile.task-claimed { background: #fffaf0; }
.task-tile.task-claimed .task-tile-ic { background: #fce9c8; color: var(--honey-deep); }
.task-tile.task-done { opacity: .7; }
.task-tile.task-done .task-tile-ic { background: var(--green-600); color: #fff; }
.task-tile.task-done .task-tile-txt strong { text-decoration: line-through; text-decoration-color: var(--gray-300); }

.chore { display: flex; align-items: center; gap: .6em; padding: .6em .8em; cursor: pointer; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); margin: .4em 0; }
.chore input { transform: scale(1.3); accent-color: var(--green-600); flex: none; }

/* ---- Run page ---- */
.run-page .run-header { background: var(--green-100); padding: 1em; border-radius: var(--radius); margin: 1em 0; }
.run-page .run-header .back { display: inline-block; margin-bottom: .5em; }
.run-page .run-header h1 { margin: 0; }

.instruction { background: white; }
.instruction-start { border-left: 4px solid var(--green-500); }
.step-photo { max-width: 100%; border-radius: var(--radius); margin-top: .5em; }

.feed-rules { background: var(--green-50); }
.feed-table { width: 100%; }
.feed-table td { padding: .25em .5em; }

.run-form .suffix { display: inline-block; margin-left: .5em; color: var(--gray-500); }
.run-form .photo-field { margin-top: 1em; }

/* ---- Profile / score ---- */
.score-summary {
    display: flex;
    gap: 1em;
    margin: 1em 0;
    flex-wrap: wrap;
}
.score-block {
    flex: 1;
    min-width: 100px;
    border-radius: var(--radius);
    padding: 1em;
    text-align: center;
    border: 2px solid transparent;
    color: white;
}
.score-block .score-value { display: block; font-size: 2.5em; font-weight: bold; line-height: 1; }
/* Paars-verloop diep → licht (Uitmuntend → Ontwikkelpunt) */
.score-block.score-4 { background: #604580; border-color: #4d3866; }                  /* Uitmuntend */
.score-block.score-3 { background: #8367a6; border-color: #6b5090; }                  /* Goed */
.score-block.score-2 { background: #b3a0cd; border-color: #9880ba; color: #3a2b52; }  /* Voldoende */
.score-block.score-1 { background: #e7ddf2; border-color: #cdbce4; color: #4d3866; }  /* Ontwikkelpunt */

.score {
    display: inline-block;
    padding: .15em .6em;
    border-radius: 999px;
    font-weight: bold;
    color: white;
    font-size: .85em;
}
.score-4 { background: #604580; }
.score-3 { background: #8367a6; }
.score-2 { background: #b3a0cd; color: #3a2b52; }
.score-1 { background: #e7ddf2; color: #4d3866; }

/* Angry-Birds-stijl sterren — alleen hele sterren */
.stars { display: inline-flex; gap: 2px; line-height: 1; font-size: 1.5em; }
.score-summary .stars { font-size: 2em; margin: .25em 0; }

.score-average {
    display: flex;
    align-items: center;
    gap: .75em;
    margin: 1em 0 1.5em;
    padding: .75em 1em;
    background: var(--gray-100, #f3f4f6);
    border-radius: var(--radius);
}
.score-average .stars { font-size: 2.5em; }
.star { display: inline-flex; width: 1em; height: 1em; }
.star-svg { width: 100%; height: 100%; display: block; stroke-width: 1; }
.star-on .star-svg { fill: #fbbf24; stroke: #92400e; filter: drop-shadow(0 1px 1px rgba(146, 64, 14, .4)); }
.star-off .star-svg { fill: #e5e7eb; stroke: #9ca3af; }
/* Op gekleurde achtergronden (admin score-blokken) iets transparanter */
.score-block .star-off .star-svg { fill: rgba(255, 255, 255, .25); stroke: rgba(255, 255, 255, .5); }

/* Uilen (vaardigheidsstatus per afdeling) */
.owl-grid { display: flex; flex-wrap: wrap; gap: .75em; margin: .5em 0 1em; }
.owl-card {
    display: flex; flex-direction: column; gap: .25em;
    padding: .75em 1em; min-width: 180px;
    background: var(--gray-100, #f3f4f6);
    border-radius: var(--radius);
    border-left: 4px solid var(--gray-300, #d1d5db);
}
.owl-card:has(.owl-brons)  { border-left-color: #cd7f32; }
.owl-card:has(.owl-zilver) { border-left-color: #c0c0c0; }
.owl-card:has(.owl-goud)   { border-left-color: #fbbf24; }
.owl-dept { font-weight: 600; }
.owl { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; }
.owl-icon { font-size: 1.4em; line-height: 1; }
.owl-brons  { color: #b8702a; }
.owl-zilver { color: #6b7280; }
.owl-goud   { color: #b8860b; }
.owl-geen   { color: var(--gray-500, #9ca3af); }
.owl-geen .owl-icon { filter: grayscale(1) opacity(.6); }

/* XP & levels */
.level-card { display: flex; align-items: center; gap: 1em; }
.level-badge {
    flex: none; display: grid; place-items: center;
    width: 64px; height: 64px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fbbf24, #b8860b);
    color: #3d2f06; font-weight: 700; font-size: .9em; text-align: center; line-height: 1.1;
    box-shadow: 0 2px 6px rgba(146, 64, 14, .35);
}
.level-meta { flex: 1; display: flex; flex-direction: column; gap: .25em; }
.xp-bar { height: 10px; border-radius: 6px; background: var(--gray-200, #e5e7eb); overflow: hidden; }
.xp-bar > span { display: block; height: 100%; background: var(--green-500, #56a544); border-radius: 6px; }
.xp-recent { margin: .5em 0 1em; }
.xp-recent summary { cursor: pointer; color: var(--green-700, #2f6b29); font-weight: 600; }

/* Hoe verdien je XP — uitleglijst */
.xp-howto { list-style: none; margin: .4em 0 1.3em; padding: 0; display: flex; flex-direction: column; gap: .5em; }
.xp-howto li { display: flex; align-items: center; gap: .8em; }
.xp-howto-pts {
    flex: none; min-width: 3.4em; text-align: center;
    font-family: var(--font-display); font-weight: 700; font-size: .95rem;
    color: var(--green-700, #2f6b29); background: var(--green-50, #eef7ea);
    border-radius: 9px; padding: .3em .5em;
}
.xp-howto-txt { color: var(--gray-700, #374151); }
.xp-howto-txt strong { color: inherit; }

/* Recente XP — platte lijst */
.xp-recent-list { list-style: none; margin: .3em 0 1em; padding: 0; display: flex; flex-direction: column; gap: .3em; }
.xp-recent-list li { display: flex; align-items: baseline; gap: .5em; }
.xp-recent-pts { flex: none; font-weight: 700; color: var(--green-700, #2f6b29); }
.xp-recent-date { margin-left: auto; white-space: nowrap; opacity: .8; }

/* ---- Groei: één XP-tegel (trofee + totaal + balk) ---- */
.growth-head { margin: .2em 0 .8em; }
.growth-head h1 { margin: 0; }
.growth-head p { margin: .1em 0 0; }
/* "Mijn gegevens"-kaart op het profiel (avatar linkt hierheen). */
.profile-me-title { margin: 0 0 .5em; font-size: 1.05rem; }
.profile-me-list { display: grid; grid-template-columns: auto 1fr; gap: .45em 1.1em; margin: 0; }
.profile-me-list dt { color: var(--gray-500); font-weight: 600; }
.profile-me-list dd { margin: 0; color: var(--gray-900); word-break: break-word; }
.growth-xp { display: flex; align-items: center; gap: 1em; margin: 0 0 1.4em; }
.growth-xp-ic {
  flex: none; width: 54px; height: 54px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--purple-100, #ede9fb); color: var(--purple-700, #5b3fb8);
}
.growth-xp-body { flex: 1 1 auto; min-width: 0; }
.growth-xp-num { font-size: 2.1em; font-weight: 800; line-height: 1; color: var(--purple-700, #5b3fb8); }
.growth-xp-unit { font-size: .5em; font-weight: 700; margin-left: .35em; letter-spacing: .05em; }
.growth-xp-label { color: var(--gray-600, #4b5563); font-size: .92em; margin: .2em 0 .5em; }
.growth-xp-bar { height: 9px; border-radius: 6px; background: var(--gray-200, #e5e7eb); overflow: hidden; }
.growth-xp-bar > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #5b3fb8, #8b6ff0); }

/* ---- XP per diergroep (Groei-tab) ---- */
.xp-dept-list { list-style: none; margin: .4em 0 1.4em; padding: 0; display: flex; flex-direction: column; gap: .7em; }
.xp-dept { display: flex; align-items: center; gap: .8em; }
.xp-dept-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background-color: var(--green-100, #e6f0e2); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--green-700, #2f6b29); text-decoration: none;
}
.xp-dept-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .3em; }
.xp-dept-top { display: flex; align-items: baseline; justify-content: space-between; gap: .6em; }
.xp-dept-bar { display: block; height: 8px; border-radius: 5px; background: var(--gray-200, #e5e7eb); overflow: hidden; }
.xp-dept-bar > span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #3f8f36, #7bc36f); }

/* Aanbevolen afdeling */
.xp-recommend {
  display: block; position: relative; margin: .2em 0 1.4em; border-radius: 14px; overflow: hidden;
  text-decoration: none; color: #fff; background: var(--green-700, #2f6b29); min-height: 96px;
}
.xp-recommend.has-image { background-size: cover; background-position: center; }
.xp-recommend-in { display: block; position: relative; z-index: 1; padding: .9em 1.1em; background: linear-gradient(90deg, rgba(20,50,18,.82), rgba(20,50,18,.35)); }
.xp-recommend-tag { display: inline-block; font-size: .78em; font-weight: 700; opacity: .95; }
.xp-recommend-in strong { display: block; font-size: 1.25em; margin: .1em 0 .3em; }
.xp-recommend-go { display: inline-block; font-weight: 600; font-size: .9em; opacity: .95; }

/* ---- Beoordeling-tab: sectie-blokken ---- */
.beoordeling-block { margin: 0 0 1.8em; }
.fb-entry { margin: 0 0 .8em; }

/* ---- Beheer: tabbalk + overzicht-kop ---- */
.tabbar { display: flex; gap: .3em; border-bottom: 2px solid var(--gray-200, #e5e7eb); margin: 0 0 1em; }
.tabbar-item {
  padding: .5em .9em; text-decoration: none; color: var(--gray-600, #4b5563);
  border-bottom: 3px solid transparent; margin-bottom: -2px; font-weight: 600;
}
.tabbar-item.is-active { color: var(--green-700, #2f6b29); border-bottom-color: var(--green-700, #2f6b29); }
.overview-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; }
.overview-head h2 { margin: .3em 0; }

/* ---- Inhalen: melding op het startscherm ---- */
.makeup-alert {
  display: flex; align-items: center; gap: .8em; text-decoration: none; color: inherit;
  border-left: 5px solid var(--amber, #d99a2b);
}
.makeup-alert.is-urgent { border-left-color: var(--red, #d64545); background: #fdf1ef; }
.makeup-alert-ic { flex: none; font-size: 1.5em; }
.makeup-alert-txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: .15em; }
.makeup-alert-txt span { color: var(--gray-600, #4b5563); font-size: .92em; }
.makeup-alert-chev { flex: none; font-size: 1.2em; opacity: .6; }

/* Inhaal-voorstellen + inhaaldagen */
.makeup-summary p { margin: .3em 0; }
.makeup-fullday { border-left: 5px solid var(--red, #d64545); }
.makeup-list, .makeup-days { list-style: none; margin: .4em 0 1.4em; padding: 0; display: flex; flex-direction: column; gap: .5em; }
.makeup-item, .makeup-days li {
  display: flex; align-items: center; gap: .8em; flex-wrap: wrap;
  padding: .7em .9em; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 10px; background: #fff;
}
.makeup-when, .makeup-day-date { display: flex; flex-direction: column; min-width: 10em; }
.makeup-dept { flex: 1 1 auto; display: flex; flex-direction: column; }
.makeup-reason { font-style: italic; }
.makeup-item form, .makeup-days li form { margin-left: auto; }

/* Uitklapbare feedback per manager (360°-dashboard) */
.fb-manager { margin: 0 0 .7em; }
.fb-manager > summary { cursor: pointer; font-weight: 600; padding: .2em 0; }
.fb-manager[open] > summary { margin-bottom: .6em; padding-bottom: .5em; border-bottom: 1px solid var(--gray-200, #e5e7eb); }
.care-action-primary { font-weight: 700; background: var(--green-700, #2f6b29); color: #fff; }

/* Bevestig-checkbox (taaktype checkbox) */
.chore-confirm { display: flex; align-items: center; gap: .6em; font-weight: 600; padding: .3em 0; }
.chore-confirm input { width: 1.25em; height: 1.25em; flex: none; }

/* ---- Profiel: gamified hero ---- */
.profile-hero {
    display: flex; align-items: center; gap: 1.2em;
    background: linear-gradient(135deg, var(--green-700), var(--green-600));
    color: #fff; border-radius: var(--radius); padding: 1.2em 1.4em; margin: 1em 0;
    box-shadow: var(--shadow);
}
.profile-hero h1 { color: #fff; margin: 0 0 .35em; font-size: 1.7rem; }
.hero-medallion {
    flex: none; width: 96px; height: 96px; border-radius: 50%; position: relative;
    display: grid; place-items: center;
    background: radial-gradient(circle at 35% 28%, #ffe79a, var(--honey-deep));
    box-shadow: 0 6px 16px rgba(0,0,0,.28), inset 0 2px 8px rgba(255,255,255,.55);
}
.hero-owl { font-size: 2.7rem; filter: drop-shadow(0 2px 2px rgba(0,0,0,.25)); }
.hero-level {
    position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
    background: var(--ink); color: var(--honey); font-family: var(--font-display);
    font-weight: 700; font-size: .78rem; padding: 2px 11px; border-radius: 999px;
    box-shadow: 0 2px 5px rgba(0,0,0,.3); white-space: nowrap;
}
.hero-meta { flex: 1; min-width: 0; }
.hero-xp-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5em; font-size: 1.05rem; }
.hero-xp-line strong { font-family: var(--font-display); font-size: 1.25rem; }
.hero-next { opacity: .85; font-size: .85rem; }
.hero-xp .xp-bar { margin-top: .4em; height: 11px; background: rgba(255,255,255,.28); }
.hero-xp .xp-bar > span { background: var(--honey); transition: width .5s ease; }
.hero-stars { margin-top: .55em; display: flex; align-items: center; gap: .5em; }
.hero-stars .stars { font-size: 1.3em; }
.hero-stars-label { font-size: .82rem; opacity: .85; }

/* ---- Tabs ---- */
.tabs {
    display: flex; gap: .3em; margin: 1.3em 0 1.15em; padding: .32em;
    background: var(--gray-100); border-radius: 15px; overflow-x: auto;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05);
}
.tab {
    flex: 1 1 0; text-align: center; white-space: nowrap;
    font-family: var(--font-display); font-weight: 700; font-size: clamp(.8rem, 3.3vw, .98rem);
    background: none; border: none; padding: .64em .5em; cursor: pointer;
    color: var(--gray-500); border-radius: 11px;
    transition: background .16s, color .16s, box-shadow .16s, transform .16s;
}
.tab:hover { color: var(--green-700); }
.tab.is-active {
    color: var(--green-700); background: #fff;
    box-shadow: 0 2px 8px rgba(45, 30, 10, .12); transform: translateY(-1px);
}
.tab-panel { display: none; }
.tab-panel.is-active { display: block; animation: cardpop .2s ease both; }
.tab-panel > h2:first-child, .tab-panel > h3:first-child { margin-top: .2em; }
.tab-panel h2 { font-size: 1.18rem; }
/* Legsel-formulier in sub-tabs: fieldset kaal — tab + card zijn de groepering. */
.clutch-form .card fieldset { border: 0; padding: 0; margin: 0; }
.clutch-form .card fieldset legend { display: none; }

/* ---- Uil-badges (verzamelbaar) ---- */
.owl-grid { display: flex; flex-wrap: wrap; gap: 1.1em; margin: .6em 0 1em; }
.owl-badge { display: flex; flex-direction: column; align-items: center; gap: .15em; width: 110px; text-align: center; }
a.owl-badge { text-decoration: none; color: inherit; transition: transform .12s; }
a.owl-badge:hover { transform: translateY(-2px); }
.profile-scope { display: flex; align-items: center; justify-content: space-between; gap: .6em 1em; flex-wrap: wrap; margin-bottom: .9em; padding: .55em .9em; background: #efe9f7; border-radius: 12px; }
.profile-scope-here { display: inline-flex; align-items: center; gap: .35em; font-weight: 700; color: var(--purple); }

/* XP-showcase op profile.php — groot cijfer met glans/effect */
.xp-showcase {
  position: relative; overflow: hidden; text-align: center;
  margin: 1.1em 0 1.2em; padding: 1.5em 1.2em 1.6em; border-radius: 20px;
  background: radial-gradient(120% 140% at 50% -20%, #6a3fb0 0%, #4b2e83 45%, #2a1c4a 100%);
  color: #fff; box-shadow: 0 12px 34px rgba(75, 46, 131, .4);
}
.xp-showcase-num {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(2.8rem, 15vw, 4.6rem); line-height: 1;
  background: linear-gradient(180deg, #fff7d6 0%, #ffdf6e 40%, #f7a200 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 3px 10px rgba(255, 190, 50, .45));
  animation: xp-pop .5s cubic-bezier(.2, 1.3, .4, 1) both;
}
.xp-showcase-unit {
  -webkit-text-fill-color: #ffd45a; color: #ffd45a; font-size: .34em; font-weight: 700;
  margin-left: .3em; vertical-align: .28em; letter-spacing: 0;
}
.xp-showcase-meta { position: relative; z-index: 1; margin-top: .5em; font-weight: 600; color: #e7ddf7; }
.xp-showcase-bar {
  position: relative; z-index: 1; height: 9px; max-width: 320px; margin: .9em auto 0;
  background: rgba(255, 255, 255, .18); border-radius: 999px; overflow: hidden;
}
.xp-showcase-bar > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #ffdf6e, #f7a200); box-shadow: 0 0 12px rgba(255, 190, 50, .7);
}
.xp-showcase::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent);
  transform: skewX(-20deg); animation: xp-shine 3.6s ease-in-out infinite;
}
.xp-showcase-spark { position: absolute; color: #ffd45a; filter: drop-shadow(0 0 6px rgba(255, 200, 60, .7)); }
.xp-showcase-spark.spark-a { width: 26px; height: 26px; top: 14px; right: 18px; animation: xp-twinkle 2.2s ease-in-out infinite; }
.xp-showcase-spark.spark-b { width: 16px; height: 16px; bottom: 16px; left: 22px; animation: xp-twinkle 2.8s ease-in-out .6s infinite; }
@keyframes xp-shine { 0% { left: -60%; } 55%, 100% { left: 120%; } }
@keyframes xp-twinkle { 0%, 100% { transform: scale(.8); opacity: .4; } 50% { transform: scale(1.15); opacity: .95; } }
@keyframes xp-pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .xp-showcase::after, .xp-showcase-spark, .xp-showcase-num { animation: none; } }
.owl-badge-ring {
    width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center;
    box-shadow: var(--shadow), inset 0 2px 6px rgba(255,255,255,.4);
    border: 3px solid rgba(255,255,255,.6);
}
.owl-badge-owl { font-size: 2.1rem; }
.owl-badge.owl-brons  .owl-badge-ring { background: radial-gradient(circle at 35% 30%, #e7a868, #b06a26); }
.owl-badge.owl-zilver .owl-badge-ring { background: radial-gradient(circle at 35% 30%, #f3f6f9, #9aa4ae); }
.owl-badge.owl-goud   .owl-badge-ring { background: radial-gradient(circle at 35% 30%, #ffe48c, var(--honey-deep)); }
.owl-badge.owl-geen   .owl-badge-ring { background: var(--gray-200); border-color: var(--gray-300); }
.owl-badge.owl-geen   .owl-badge-owl { filter: grayscale(1); opacity: .4; }
.owl-badge-dept { font-family: var(--font-display); font-weight: 600; margin-top: .35em; line-height: 1.15; }
.owl-badge-tier { font-size: .82rem; color: var(--gray-500); }

/* ---- Leer-tegels ---- */
.learn-grid { display: flex; flex-wrap: wrap; gap: .8em; margin: .5em 0 1em; }
.learn-tile {
    flex: 1 1 160px; display: flex; align-items: center; gap: .7em;
    padding: 1em 1.1em; background: #fff; border: 1px solid var(--gray-200);
    border-radius: var(--radius); text-decoration: none; color: var(--ink);
    font-family: var(--font-display); font-weight: 600; box-shadow: var(--shadow-sm);
    transition: transform .1s ease, box-shadow .1s ease;
}
.learn-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--green-700); }
.learn-emoji { font-size: 1.8rem; }

/* ---- Student-lobby (app.php) ---- */
.lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; flex-wrap: wrap; margin: 1em 0 1.3em; }
.lobby-hi { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; color: var(--ink); line-height: 1.1; }
.lobby-sub { color: var(--gray-500); }
.lobby-hud { display: flex; align-items: center; gap: .7em; text-decoration: none; background: #fff; border: 1px solid var(--gray-200); border-radius: 999px; padding: .4em 1em .4em .4em; box-shadow: var(--shadow-sm); }
.lobby-hud:hover { box-shadow: var(--shadow); }
.lobby-medallion { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: radial-gradient(circle at 35% 28%, #9b7fc4, var(--purple)); box-shadow: inset 0 1px 4px rgba(255,255,255,.35), 0 2px 5px rgba(0,0,0,.18); }
.lobby-medallion svg { width: 27px; height: 27px; }
.lobby-lvl { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: .62rem; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.lobby-xp { display: flex; flex-direction: column; gap: .3em; }
.lobby-xp strong { font-family: var(--font-display); color: var(--ink); font-size: .95rem; }
.lobby-xp .xp-bar { width: 120px; height: 8px; }

.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9em; margin: .5em 0 1.2em; }
.dept-tile { display: flex; align-items: center; gap: .8em; min-width: 0; overflow: hidden; padding: .8em .9em; border-radius: 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .12s ease; }
.dept-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.dept-photo { position: relative; width: 84px; height: 84px; border-radius: 50%; background: #fff center/cover no-repeat; flex-shrink: 0; box-shadow: 0 1px 4px rgba(0,0,0,.12); display: grid; place-items: center; }
.dept-photo-fallback { font-size: 1.9rem; }
.dept-score { position: absolute; top: -3px; left: -3px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
.dept-score svg { width: 19px; height: 19px; color: #fff; }
.dept-score-xp { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); background: #fff; color: var(--gray-700); font-size: .72rem; font-weight: 700; line-height: 1; padding: .28em .55em; border-radius: 999px; box-shadow: var(--shadow-sm); white-space: nowrap; }
.dept-score.owl-geen   { background: #9aa4ae; }
.dept-score.owl-geen svg { opacity: .85; }
.dept-score.owl-brons  { background: linear-gradient(135deg, #e7a868, #b06a26); }
.dept-score.owl-zilver { background: linear-gradient(135deg, #eef1f4, #9aa4ae); }
.dept-score.owl-zilver svg { color: #5a636d; }
.dept-score.owl-goud   { background: linear-gradient(135deg, #ffe48c, var(--honey-deep)); }
.dept-tile-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.dept-tile-name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; line-height: 1.1; }
.dept-tile-meta { color: var(--gray-500); font-size: .88rem; display: flex; align-items: center; gap: .4em; margin-top: .1em; flex-wrap: wrap; }
.dept-tile-xp { font-weight: 700; }
.dept-tile-sep { opacity: .45; }
.dept-chevron { flex-shrink: 0; opacity: .55; display: inline-flex; }
.dept-chevron svg { width: 18px; height: 18px; }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #37b24d; box-shadow: 0 0 0 3px rgba(55,178,77,.2); flex: none; }
.dept-tile.t-green  { background: var(--green-50); } .dept-tile.t-green  .dept-tile-name, .dept-tile.t-green  .dept-tile-xp, .dept-tile.t-green  .dept-chevron { color: var(--green-700); }
.dept-tile.t-purple { background: #efe9f7; }         .dept-tile.t-purple .dept-tile-name, .dept-tile.t-purple .dept-tile-xp, .dept-tile.t-purple .dept-chevron { color: var(--purple); }
.dept-tile.t-orange { background: #fdf2dc; }         .dept-tile.t-orange .dept-tile-name, .dept-tile.t-orange .dept-tile-xp, .dept-tile.t-orange .dept-chevron { color: var(--honey-deep); }
.dept-tile.t-teal   { background: #e0f0ee; }         .dept-tile.t-teal   .dept-tile-name, .dept-tile.t-teal   .dept-tile-xp, .dept-tile.t-teal   .dept-chevron { color: #1f7a70; }

/* Quiz-editor */
.quiz-opts { list-style: none; padding: 0; margin: .5em 0; }
.quiz-opts li { display: flex; align-items: center; gap: .5em; padding: .35em .5em; border-radius: var(--radius); }
.quiz-opts li.opt-correct { background: var(--green-100, #e3f3e0); }
.quiz-opts .opt-actions { margin-left: auto; display: inline-flex; gap: .3em; }
.quiz-take-opt { display: flex; align-items: center; gap: .5em; padding: .35em .25em; }
.quiz-take-opt input { flex: none; }
.quiz-q-meta textarea { width: 100%; }
.quiz-q-meta-row { display: flex; flex-wrap: wrap; gap: .6em 1em; align-items: flex-end; margin-top: .4em; }
.quiz-q-meta-row label { margin: 0; }
.quiz-q-meta-row input[type="file"] { max-width: 15em; }
.quiz-q-thumb { display: inline-flex; flex-direction: column; gap: .2em; font-size: .85em; }
.quiz-q-thumb img { height: 48px; border-radius: 6px; }
.quiz-opt-letter { display: inline-flex; align-items: center; justify-content: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--green-600); color: #fff; font-weight: 700; flex-shrink: 0; }
.quiz-opt-edit { display: flex; gap: .4em; flex: 1; align-items: center; flex-wrap: wrap; }
.quiz-opt-edit .quiz-opt-label { width: 9em; }
.quiz-opt-edit .quiz-opt-reason { flex: 1; min-width: 10em; }
/* Mobiel: opties netjes stapelen i.p.v. rommelig wrappen. */
@media (max-width: 600px) {
    .quiz-opts li { flex-wrap: wrap; align-items: flex-start; }
    .quiz-opt-letter { margin-top: .3em; }
    .quiz-opt-edit .quiz-opt-label { width: 100%; }
    .quiz-opt-edit .quiz-opt-reason { flex: 1 1 100%; min-width: 0; }
    .quiz-opts .opt-actions { margin-left: 0; }
    .quiz-opts .btn-small { white-space: nowrap; }
}

/* Quiz-afname (Kahoot-stijl) */
.quiz-play { max-width: 720px; margin: 0 auto; }
.quiz-progress { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: .4em; }
.quiz-time-left { font-variant-numeric: tabular-nums; }
.quiz-timer { height: 10px; background: var(--gray-200); border-radius: 999px; overflow: hidden; margin-bottom: 1em; }
.quiz-timer > span { display: block; height: 100%; width: 100%; background: var(--green-500); transition: width .25s linear; }
.quiz-timer.is-low > span { background: #c0392b; }
.quiz-q-image { text-align: center; margin-bottom: 1em; }
.quiz-q-image img { max-width: 100%; max-height: 38vh; border-radius: var(--radius); }
.quiz-question { font-size: 1.3em; font-family: var(--font-display); margin: .3em 0 1em; text-align: center; color: var(--ink); }
.quiz-answers { display: grid; grid-template-columns: 1fr 1fr; gap: .7em; }
.quiz-ans { display: flex; align-items: center; gap: .6em; padding: 1.1em 1em; border: 1px solid transparent; border-radius: var(--radius); color: var(--ink); font-size: 1.05em; font-weight: 600; font-family: inherit; text-align: left; cursor: pointer; min-height: 64px; box-shadow: var(--shadow-sm); transition: transform .08s; }
.quiz-ans:active { transform: scale(.98); }
.quiz-ans:disabled { cursor: default; }
.quiz-ans-letter { display: inline-flex; align-items: center; justify-content: center; width: 1.8em; height: 1.8em; border-radius: 50%; background: rgba(0,0,0,.12); color: #fff; font-weight: 800; flex-shrink: 0; }
/* Zachte "blok"-kleuren van het afdeling-startscherm: groen, paars, oranje, wit */
.quiz-ans-a { background: var(--green-50); color: var(--green-700); }
.quiz-ans-a .quiz-ans-letter { background: var(--green-600); }
.quiz-ans-b { background: #efe9f7; color: var(--purple); }
.quiz-ans-b .quiz-ans-letter { background: var(--purple); }
.quiz-ans-c { background: #fdf2dc; color: var(--honey-deep); }
.quiz-ans-c .quiz-ans-letter { background: var(--honey-deep); }
.quiz-ans-d { background: #fff; color: var(--ink); border-color: var(--gray-200); }
.quiz-ans-d .quiz-ans-letter { background: var(--gray-500); }
.quiz-ans.is-correct { outline: 4px solid var(--green-600); outline-offset: 1px; }
.quiz-ans.is-wrong { outline: 4px solid #e2483d; }
.quiz-ans.dimmed { opacity: .4; }
.quiz-feedback { margin-top: 1em; padding: 1em 1.1em; border-radius: var(--radius); background: white; box-shadow: var(--shadow-sm); }
.quiz-feedback.good { border-left: 6px solid #3aa657; }
.quiz-feedback.bad { border-left: 6px solid #e2483d; }
.quiz-feedback h3 { margin: .1em 0 .5em; }
.quiz-feedback .quiz-reason { margin: .3em 0; }
.quiz-feedback .quiz-correct-line { margin: .4em 0 .1em; color: var(--green-700); font-weight: 600; }
.quiz-feedback .btn { margin-top: .8em; }

@media (max-width: 700px) {
    /* Antwoorden en feedback lopen gewoon mee in de scrollbare pagina (niet
     * meer vast onderaan, waar ze achter de onderbalk verdwenen). */
    .quiz-play { padding-bottom: 90px; }   /* ruimte voor de vaste onderbalk */
    .quiz-answers { gap: .5em; }
    .quiz-ans { min-height: 72px; padding: .9em; }
}

/* Tellen — één dier per keer (stepper) */
.counter { max-width: 440px; margin: .5em auto 0; }
.counter-card { display: none; text-align: center; }
.counter-card.is-active { display: block; animation: cardpop .22s ease both; }
@keyframes cardpop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }

.counter-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5em; font-size: .9rem; }
.counter-progress { font-family: var(--font-display); font-weight: 600; color: var(--green-700); }
.counter-loc { color: var(--gray-500); }

.counter-photo {
    width: 100%; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden;
    background: var(--green-50); display: grid; place-items: center;
    box-shadow: var(--shadow); border: 1px solid var(--gray-200);
}
.counter-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.counter-photo-fallback { font-size: 5rem; opacity: .6; }

.counter-name { font-family: var(--font-display); font-size: 1.6rem; margin: .5em 0 .1em; color: var(--ink); }
.counter-info { max-width: 320px; margin: 0 auto .3em; text-align: left; }
.counter-info summary { cursor: pointer; color: var(--green-700); font-weight: 600; font-size: .9em; }
.counter-info dl { margin: .3em 0 0; display: grid; grid-template-columns: auto 1fr; gap: .15em .7em; font-size: .9em; }
.counter-info dt { font-weight: 700; color: var(--gray-700); }
.counter-info dd { margin: 0; }

.counter-control { display: flex; align-items: center; justify-content: center; gap: 1.1em; margin: .4em 0 .2em; }
.step-btn {
    width: 68px; height: 68px; border-radius: 50%; border: none; cursor: pointer;
    font-size: 2.2rem; font-weight: 700; line-height: 1; display: grid; place-items: center;
    box-shadow: 0 3px 0 rgba(20,40,30,.18); transition: transform .08s ease, box-shadow .08s ease;
    -webkit-tap-highlight-color: transparent;
}
.step-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(20,40,30,.18); }
.step-minus { background: var(--gray-200); color: var(--ink); }
.step-plus  { background: var(--green-600); color: #fff; }
.step-value {
    width: 2.4em; font-family: var(--font-display); font-weight: 700; font-size: 3.2rem;
    text-align: center; border: none; background: transparent; color: var(--ink);
    -moz-appearance: textfield;
}
.step-value::-webkit-outer-spin-button, .step-value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.counter-expected { color: var(--gray-500); margin: 0 0 1.1em; font-size: .95rem; }
.counter-nav { display: flex; gap: .6em; }
.counter-nav .btn { flex: 1; }

@media (prefers-reduced-motion: reduce) {
    .counter-card.is-active { animation: none; }
    .step-btn { transition: none; }
}

/* Restweging */
.weigh-block { margin-top: 1em; }
.weigh-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5em; padding: .4em 0; }
.weigh-name { flex-basis: 100%; font-weight: 600; }
.weigh-remaining { font-weight: 600; color: var(--green-700, #2f6b29); }

/* Soort-info (publiek) */
.count-info-dl { display: grid; grid-template-columns: auto 1fr; gap: .25em .8em; margin: .25em 0 0; }
.count-info-dl dt { font-weight: 600; color: var(--gray-700, #374151); }
.count-info-dl dd { margin: 0; }

/* QR-codes */
.qr-grid { display: flex; flex-wrap: wrap; gap: 1em; }
.qr-card { display: flex; flex-direction: column; align-items: center; gap: .4em; padding: 1em; border: 1px solid var(--gray-200, #e5e7eb); border-radius: var(--radius); background: white; text-align: center; }
.qr-card a { word-break: break-all; }
@media print { .no-print, .topnav, .sidebar { display: none !important; } }

.score-picker { display: flex; gap: .5em; flex-wrap: wrap; }
.score-radio { flex: 1; min-width: 120px; padding: 1em; text-align: center; border: 2px solid var(--gray-300); border-radius: var(--radius); cursor: pointer; }
.score-radio input { display: none; }
.score-radio:has(input:checked) { border-width: 3px; font-weight: bold; }
.score-radio.score-4:has(input:checked) { background: #ede8f6; border-color: #604580; }
.score-radio.score-3:has(input:checked) { background: #f0eaf7; border-color: #8367a6; }
.score-radio.score-2:has(input:checked) { background: #f4eff9; border-color: #b3a0cd; }
.score-radio.score-1:has(input:checked) { background: #f8f4fc; border-color: #cdbce4; }

/* ---- Bar chart (simpel) ---- */
.bar-chart {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 140px;
    padding: 0 0 1.5em;
    border-bottom: 1px solid var(--gray-300);
    overflow-x: auto;
}
.bar { flex: 1; min-width: 30px; max-width: 60px; display: flex; flex-direction: column; align-items: center; height: 100%; position: relative; }
.bar-fill { width: 80%; background: linear-gradient(to top, var(--green-600), var(--green-500)); border-radius: 3px 3px 0 0; min-height: 2px; }
.bar-label { position: absolute; bottom: -1.3em; font-size: .8em; color: var(--gray-500); }

/* ---- Pills / badges ---- */
.pill {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 12px;
    font-size: .8em;
    background: var(--gray-200);
    color: var(--gray-700);
}
.pill-open      { background: var(--gray-200); }
.pill-claimed   { background: #fff5d6; color: #8a6c08; }
.pill-done      { background: var(--green-100); color: var(--green-700); }
.pill-invoer    { background: #e0eaff; color: #2c5cd4; }
.pill-janee     { background: #ffe9d6; color: #aa5320; }
.pill-checkbox  { background: var(--gray-200); }
.pill-instructie{ background: var(--green-100); color: var(--green-700); }
.pill-warn      { background: #ffe9d6; color: #aa5320; margin-left: .4em; }
.pill-werkweek  { background: var(--gray-200); }
.pill-weekend   { background: #e0eaff; color: #2c5cd4; }
.pill-vakantie  { background: #ffe9d6; color: #aa5320; }
.pill-tekst     { background: #f1d6ff; color: #7820aa; }
.pill-klus      { background: var(--gray-100); }
/* Verenkleed-pills bij dier-/soortfoto's */
.pill-winter    { background: #dbe9ff; color: #1f54c0; }   /* winterkleed — koel blauw */
.pill-zomer     { background: #ffeec2; color: #8a6308; }   /* zomerkleed — warm honing */
.pill-overgang  { background: var(--gray-200); color: var(--ink); } /* overgangskleed — neutraal */

.badge { background: var(--green-600); color: white; padding: 1px 8px; border-radius: 12px; font-size: .8em; margin-left: .5em; }
.badge-warn { background: var(--orange); color: white; padding: 1px 8px; border-radius: 12px; font-size: .8em; }

/* ---- Admin shell ---- */
.admin-page .main { padding: 0; max-width: none; }
.admin-shell {
    display: flex;
    min-height: calc(100vh - 56px);
}
.sidebar {
    width: 232px;
    background: var(--ink);
    color: rgba(255, 255, 255, .82);
    padding: 1.1em .9em;
    flex-shrink: 0;
}
.sidebar h2 { margin: .2em .3em .9em; font-family: var(--font-display); font-size: 1.1em; font-weight: 600; color: #fff; text-transform: none; letter-spacing: 0; }
.sidebar nav { display: flex; flex-direction: column; gap: 1px; }
.sidebar nav a { padding: .5em .7em; border-radius: 9px; color: rgba(255, 255, 255, .82); text-decoration: none; font-weight: 500; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.sidebar nav a.active { background: rgba(245, 184, 54, .18); color: var(--honey); font-weight: 700; }
.sidebar nav a.nav-top { font-family: var(--font-display); font-weight: 600; display: flex; align-items: center; gap: .55em; }
.nav-ico { flex-shrink: 0; width: 20px; display: inline-flex; align-items: center; justify-content: center; }
.nav-ico svg { width: 18px; height: 18px; display: block; }
/* Inklapbare groepen */
.nav-group { margin-top: .25em; }
.nav-group > summary {
    list-style: none;
    cursor: pointer;
    padding: .55em .7em;
    border-radius: 9px;
    font-family: var(--font-display);
    font-size: .74em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .5);
    display: flex;
    align-items: center;
    gap: .55em;
    user-select: none;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary .nav-ico { font-size: 1em; }
.nav-group > summary::after {
    content: '▸';
    margin-left: auto;
    font-size: 1.1em;
    transition: transform .15s ease;
    color: rgba(255, 255, 255, .4);
}
.nav-group[open] > summary { color: rgba(255, 255, 255, .8); }
.nav-group[open] > summary::after { transform: rotate(90deg); }
.nav-group > summary:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-group > a { display: block; margin-left: 1.7em; font-size: .95em; }
/* Sectiekop ("Dagelijks" / "Instellen") — maakt de indeling van het menu
   zichtbaar; gedempt zodat het de groepen zelf niet overstemt. */
.sidebar nav .nav-section {
    margin: 1.1em .2em .15em;
    padding-top: .5em;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
}
.sidebar nav .nav-section:first-of-type { border-top: none; padding-top: 0; }

/* ============================================================================
   Werkboek-lezer (interactief e-book) — .wb-*  (accentkleur via --wb-accent)
   ============================================================================ */
.wb-reader { max-width: 720px; margin: 0 auto; }
.wb-card { display: none; }
.wb-card.is-active { display: block; animation: wb-fade .25s ease; }
@keyframes wb-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wb-cover { text-align: center; padding: 1.5em 1em 2em; }
.wb-cover img { max-width: 240px; width: 60%; border-radius: 12px; box-shadow: 0 10px 34px rgba(0,0,0,.20); margin-bottom: 1em; }
.wb-cover h1 { margin: .2em 0; }
.wb-sub { color: var(--muted); margin-top: 0; }
.wb-cover .wb-next { margin-top: 1.2em; }
.wb-eyebrow { display: block; color: var(--wb-accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; margin-bottom: .2em; }
.wb-chapter h2 { color: var(--wb-accent); margin-top: .1em; }
.wb-hero { width: 100%; height: auto; border-radius: 12px; margin: .6em 0 1em; display: block; }
.wb-body { line-height: 1.7; font-size: 1.02rem; }
.wb-body > *:first-child { margin-top: 0; }
.wb-body h3 { color: var(--wb-accent); margin: 1.1em 0 .3em; }
.wb-body img { max-width: 100%; border-radius: 10px; }
.wb-body .wb-callout { border-left: 4px solid var(--wb-accent); background: rgba(96,69,128,.06); padding: .7em 1em; border-radius: 8px; margin: 1em 0; }
.wb-quiz { margin-top: 1.5em; padding: 1em 1.1em; border: 1px solid var(--gray-200); border-left: 4px solid var(--wb-accent); border-radius: 10px; background: rgba(96,69,128,.03); }
.wb-q { font-weight: 700; margin: 0 0 .7em; }
.wb-opts { display: flex; flex-direction: column; gap: .5em; }
.wb-opt { text-align: left; padding: .7em .9em; border: 1.5px solid var(--gray-300); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; transition: border-color .15s; }
.wb-opt:hover { border-color: var(--wb-accent); }
.wb-opt.is-picked { border-color: var(--wb-accent); box-shadow: 0 0 0 2px rgba(96,69,128,.15); }
.wb-opt.is-correct-mark { border-color: var(--green-600); background: rgba(59,129,55,.08); }
.wb-feedback { margin: .8em 0 0; font-weight: 600; }
.wb-feedback.is-good { color: var(--green-700); }
.wb-feedback.is-bad { color: #c0392b; }
.wb-nav { display: flex; justify-content: space-between; align-items: center; gap: .5em; margin-top: 1.6em; }
.wb-hint { color: #c0392b; margin: .5em 0 0; font-size: .92rem; }
.wb-done { text-align: center; padding: 2.5em 1em; }
.wb-done-badge { font-size: 1.8rem; width: 64px; height: 64px; line-height: 64px; border-radius: 50%; background: var(--wb-accent); color: #fff; margin: 0 auto .6em; }
.admin-main { flex: 1; padding: 1.2em 1.6em; min-width: 0; max-width: var(--max-width); }
.sidebar-toggle-label { display: none; }
@media (max-width: 800px) {
    .admin-shell { flex-direction: column; }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        padding: .5em;
    }
    .sidebar h2 { display: none; }
    .sidebar-toggle-label {
        display: flex;
        align-items: center;
        padding: .6em .75em;
        background: rgba(255, 255, 255, .1);
        color: #fff;
        border-radius: 9px;
        font-family: var(--font-display);
        font-weight: 600;
        cursor: pointer;
        user-select: none;
    }
    .sidebar nav { display: none; flex-direction: column; gap: 1px; margin-top: .5em; }
    .sidebar-toggle-cb:checked ~ nav { display: flex; }
    .admin-main { padding: 1em .8em; }
}

/* ---- Stat grid ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75em;
    margin: 1em 0;
}
.stat {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.1em 1em;
    border: 1px solid var(--gray-200);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform .1s ease, box-shadow .1s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-num { display: block; font-family: var(--font-display); font-size: 2.1em; font-weight: 700; color: var(--honey-deep); line-height: 1; }
.stat span:not(.stat-num) { font-size: .85em; color: var(--gray-500); }

/* ---- Tabs ---- */
.dept-tabs { display: flex; gap: .2em; flex-wrap: wrap; margin: 1em 0; border-bottom: 2px solid var(--gray-200); }
.dept-tabs .tab {
    padding: .6em 1em;
    text-decoration: none;
    color: var(--gray-500);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-family: var(--font-display);
    font-weight: 600;
}
.dept-tabs .tab:hover { color: var(--green-700); }
.dept-tabs .tab.active {
    color: var(--green-700);
    border-bottom-color: var(--honey);
}
.dept-single { margin: 1em 0; }
td.dept-assign { white-space: normal; min-width: 240px; max-width: 340px; }
.cb-inline { display: inline-flex; align-items: center; gap: .25em; margin: .12em .7em .12em 0; font-weight: 400; font-size: .9em; white-space: nowrap; }
.cb-inline input { vertical-align: middle; }

/* ---- Grant page ---- */
.grant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}
/* Kolommen mogen krimpen onder hun inhoud, anders duwt een brede tabel
   in een kaart de hele grid over de schermrand. */
.grant-grid > * { min-width: 0; }
@media (max-width: 900px) { .grant-grid { grid-template-columns: 1fr; } }
.request-list, .active-list { list-style: none; padding: 0; margin: 0; }
.request-item, .active-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75em 0;
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
    gap: .5em;
}
.request-item:last-child, .active-list li:last-child { border-bottom: none; }
.request-item .actions { display: flex; gap: .25em; }

/* ---- Run cards (assess) ---- */
.run-list { list-style: none; padding: 0; }
.run-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: .75em 1em;
    margin: .5em 0;
}
.run-card.run-claimed   { border-left: 4px solid var(--orange); }
.run-card.run-done      { border-left: 4px solid var(--green-500); }
.run-card.run-abandoned { opacity: .5; }
.run-head { display: flex; gap: .5em; align-items: center; flex-wrap: wrap; }
.run-body { font-size: .9em; margin-top: .25em; }
.run-photos { display: flex; gap: .5em; margin-top: .5em; flex-wrap: wrap; }
.run-photos img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); }

/* ---- Animals page ---- */
/* Compacte bezettingstabel: smalle getalvelden + begrensd opmerkingveld
   zodat de tabel binnen de kolom past i.p.v. horizontaal te scrollen. */
.bezet-table .num-sm { width: 3.1em; }
.bezet-table .opm-sm { width: 100%; min-width: 6em; }
.bezet-table td:nth-child(5) { width: 11em; }
.bezet-table select { max-width: 11em; }
.bezet-table .btn-small { padding: .25em .5em; }
.two-col { display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); gap: 1.5em; align-items: start; }
/* Grid-items mogen smaller worden dan hun inhoud, anders blaast een brede
   tabel (table-scroll) de kolom — en de hele pagina — op. */
.two-col > * { min-width: 0; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
/* Stappenlijst in mission_edit: nette rij met titel links, pijlen rechts (niet wrappen) */
.mission-steps { list-style: none; padding: 0; margin: .5em 0 1em; counter-reset: step; }
.mission-steps li { display: flex; align-items: center; gap: .5em; margin: .3em 0; }
.mission-steps li::before { counter-increment: step; content: counter(step) "."; flex: none; min-width: 1.3em; color: var(--gray-500, #6b7280); font-weight: 600; }
.mission-steps li.muted::before { content: ""; }
.mission-steps li > a { flex: 1 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: .4em; }
.mission-steps li.active > a { font-weight: 700; }
.mission-steps .step-actions { flex: none; display: inline-flex; gap: .25em; }
.mission-steps .step-actions form { margin: 0; }
.enc-list, .mix-list { list-style: none; padding: 0; }
.enc-list li, .mix-list li { margin: .15em 0; }
.enc-list a, .mix-list a {
    display: block;
    padding: .35em .6em;
    border-radius: 4px;
    text-decoration: none;
    color: var(--gray-700);
}
.enc-list a:hover, .mix-list a:hover { background: var(--green-50); }
.enc-list a.active, .mix-list a.active { background: var(--green-600); color: white; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .6em; margin: 1em 0; }
.photo-tile { background: white; padding: .5em; border-radius: var(--radius); border: 1px solid var(--gray-200); }
.photo-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }
/* Bulk-opslaanbalk (o.a. gebruikersbeheer) — blijft onderaan in beeld */
.save-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .6em 1em; padding: .7em .2em; margin-top: .3em; background: linear-gradient(to top, var(--bg) 78%, transparent); }
.save-bar .muted { margin-right: auto; }
/* In de gebruikerstabel forceert de basisregel width:100% (hogere specificiteit);
   min-width geeft de velden een bruikbare minimale breedte zodat ze niet tot
   één letter platdrukken. */
.naam-input { min-width: 10em; }
.klas-input { min-width: 5.5em; }
.rol-select { min-width: 9em; }
/* "Nieuw"-knop die een aanmaakformulier openklapt (gedeelde CRUD-helper) */
/* Lijst → edit-view CRUD */
.crud-list tbody tr.crud-row { cursor: pointer; }
.crud-list tbody tr.crud-row:hover { background: var(--green-50, #eef7ea); }
.crud-list tbody tr.crud-row td:last-child::after { content: '›'; float: right; color: var(--gray-400, #9ca3af); font-weight: 700; }
.crud-edit { max-width: 640px; }
.crud-edit h2, .crud-edit h3 { margin-top: 0; }
.crud-back { margin: 0 0 .6em; }
.crud-edit .form-grid label.full { grid-column: 1 / -1; }

details.crud-new { margin: 1em 0; }
details.crud-new > summary { display: inline-block; list-style: none; cursor: pointer; }
details.crud-new > summary::-webkit-details-marker { display: none; }
details.crud-new[open] > summary { margin-bottom: .7em; }

.photo-tile .plumage-edit { margin: .35em 0 .15em; }
.photo-tile .plumage-edit select { width: 100%; font-size: .82em; padding: .2em .3em; border-radius: 6px; border: 1px solid var(--gray-200); background: var(--green-50); }

.cb-tiny { display: inline-block; margin-right: .25em; font-size: .85em; font-weight: 400; }
.cb-tiny input { vertical-align: middle; }

/* ---- Search results ---- */
.search-results { list-style: none; padding: 0; }
.search-results li a { display: block; padding: .5em; border-radius: var(--radius); text-decoration: none; color: var(--gray-900); }
.search-results li a:hover { background: var(--green-50); }

/* ---- Schedule grid ---- */
.schedule-grid { width: 100%; border-collapse: collapse; }
.schedule-grid th, .schedule-grid td { border: 1px solid var(--gray-200); padding: .35em; text-align: center; }
.schedule-grid th { background: var(--green-50); color: var(--green-700); }
.schedule-grid select { width: 100%; min-width: 5em; }

/* ---- Step list ---- */
.step-list { list-style: none; padding: 0; counter-reset: step; }
.step-list li {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin: .5em 0;
    padding: .75em 1em;
    display: flex;
    gap: 1em;
    counter-increment: step;
    position: relative;
}
.step-list li::before { content: counter(step) "."; color: var(--green-600); font-weight: bold; min-width: 1.5em; }
.step-body { flex: 1; }
.drag-handle { cursor: grab; color: var(--gray-500); font-size: 1.2em; padding: 0 .5em; user-select: none; -webkit-user-select: none; touch-action: none; width: 1.6em; text-align: center; white-space: nowrap; }
.drag-handle:active { cursor: grabbing; }
.data-table td.drag-handle:hover { color: var(--gray-700, #444); }
tr[draggable="true"], li[draggable="true"] { background: var(--honey-50, #fff8e1); }

.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .25em; }

/* ---- Type-blocks ---- */
.type-block { display: none; }
.type-block.is-visible { display: block; }
/* fallback: js zorgt voor toggle */

/* ---- Animations ---- */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}
[data-poll-pending] .pending-card h2 { animation: pulse 2s infinite; }

.waiting-card { text-align: center; padding: 2em 1em; max-width: 480px; margin: 2em auto; }
.waiting-card h1 { margin-top: 0; }
.spinner {
    display: inline-block;
    width: 1em; height: 1em;
    border: 2px solid var(--gray-200);
    border-top-color: var(--green-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: -2px;
    margin-right: .25em;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Meetwaarden: student-invoer (run.php) ---- */
.measure-grid { display: flex; flex-direction: column; gap: .55em; margin: .3em 0 .5em; }
.measure-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .3em .8em; }
.measure-label { font-weight: 600; }
.measure-input { display: inline-flex; align-items: center; gap: .3em; }
.measure-input input { width: 6.5em; }
.measure-hint { grid-column: 1 / -1; margin-top: -.15em; }

/* ---- Meetwaarden: docent-overzicht kleuren (measurements.php) ---- */
.mv { font-weight: 700; text-align: center; }
.mv-groen  { background: #e6f6e6; color: #1c6b1c; border-radius: 6px; padding: .05em .35em; }
.mv-oranje { background: #fdefd3; color: #9a5b00; border-radius: 6px; padding: .05em .35em; }
.mv-rood   { background: #fbe0e0; color: #a01919; border-radius: 6px; padding: .05em .35em; }
.mv-table td.mv { font-variant-numeric: tabular-nums; }

/* ---- Meetwaarden: beheer-editor (tasks_edit.php) ---- */
.measure-def { border: 1px solid var(--gray-200, #e5e7eb); border-radius: 10px; padding: .8em; margin: .6em 0; background: var(--gray-50, #fafafa); }
.measure-def-head { display: flex; flex-wrap: wrap; gap: .8em; align-items: flex-end; }
.measure-def-head label { margin: 0; }
.measure-del { color: var(--danger, #b91c1c); font-weight: 600; }
.thr-details { margin-top: .6em; }
.thr-details summary { cursor: pointer; font-weight: 600; color: var(--green-700, #2f6b29); }
.thr-table { border-collapse: collapse; margin-top: .5em; font-size: .9rem; }
.thr-table th, .thr-table td { padding: .25em .4em; text-align: left; }
.thr-table thead th { font-weight: 600; color: var(--gray-600, #4b5563); }
.thr-table tbody th { font-weight: 600; white-space: nowrap; }
/* input[type=number] i.p.v. input, anders wint de bredere basisregel (specificiteit). */
.thr-table input[type="number"] { width: 5.5em; }
/* Mobiel: 5 kolommen laten passen zonder horizontaal scrollen. */
@media (max-width: 600px) {
    .thr-table { font-size: .78rem; width: 100%; }
    .thr-table th, .thr-table td { padding: .2em .18em; }
    .thr-table tbody th { white-space: normal; }
    .thr-table input[type="number"] { width: 100%; min-width: 2.6em; }
}

/* ---- Soorten & info: info-rijen (tabel op desktop, kaartjes op mobiel) ---- */
.info-rows { margin: 1em 0; }
.info-rows-head, .info-row { display: grid; grid-template-columns: 1.4em 1fr 1fr 9em auto; gap: .5em; align-items: end; }
.info-rows-head { padding: 0 .2em .3em; font-family: var(--font-display); font-weight: 600; font-size: .88em; color: var(--green-700); }
.info-row { padding: .45em .2em; border-bottom: 1px solid var(--gray-200); }
.info-row .drag-handle { align-self: center; padding: 0; width: auto; font-size: 1.1em; }
.info-f { margin: 0; }
.info-f-lbl { display: none; }
.info-actions { display: inline-flex; gap: .3em; align-items: end; }
@media (max-width: 600px) {
    .info-rows-head { display: none; }
    .info-row {
        grid-template-columns: 1fr; gap: .45em;
        border: 1px solid var(--gray-200); border-radius: 10px;
        padding: .7em; margin-bottom: .6em; background: var(--gray-50, #fafafa);
    }
    .info-f-lbl { display: block; font-size: .8em; color: var(--gray-600, #4b5563); }
    .info-actions { justify-content: flex-start; margin-top: .1em; }
}

/* ---- Dieren: bewerkrijen (raster op desktop, kaartjes op mobiel) ---- */
.animal-rows { margin: 1em 0; }
.animal-rows-head, .animal-row { display: grid; grid-template-columns: minmax(8em, 1.7fr) auto minmax(10.5em, 1.7fr) minmax(6em, 1.2fr) auto; gap: .5em .6em; align-items: start; }
.animal-row > .af > select, .animal-row .mvn-inputs input, .animal-row .af-opm input { margin-top: 0; }
.animal-row .af-actions { padding-top: .1em; }
.animal-rows-head { padding: 0 .2em .3em; font-family: var(--font-display); font-weight: 600; font-size: .88em; color: var(--green-700); }
.animal-row { padding: .5em .2em; border-bottom: 1px solid var(--gray-200); }
.animal-row .af { margin: 0; }
.af-lbl { display: none; }
.mvn-inputs { display: inline-flex; gap: .3em; }
.mvn-inputs input[type="number"] { width: 3.1em; margin-top: 0; }
.af-veren { display: flex; flex-wrap: wrap; gap: .3em; align-items: center; }
.af-actions { display: inline-flex; gap: .3em; align-items: end; }
@media (max-width: 700px) {
    .animal-rows-head { display: none; }
    .animal-row {
        grid-template-columns: 1fr; gap: .5em;
        border: 1px solid var(--gray-200); border-radius: 10px;
        padding: .8em; margin-bottom: .7em; background: var(--gray-50, #fafafa);
    }
    .af-lbl { display: block; font-size: .8em; color: var(--gray-600, #4b5563); }
    .af-actions { justify-content: flex-start; margin-top: .2em; }
}

/* ---- Print: never! ---- */
@media print { .topnav, .sidebar, .btn { display: none; } }

/* --- Afdeling-switch in de topbalk ------------------------------------ */
.dept-pill {
    display: inline-flex; align-items: center; gap: .42em;
    padding: .34em .8em; border-radius: 999px; line-height: 1.2;
    font-family: var(--font-display); font-weight: 600; font-size: .92rem;
    color: var(--purple); background: rgba(96,69,128,.07);
    border: 1px solid rgba(96,69,128,.35); white-space: nowrap;
}
.dept-pill svg { flex-shrink: 0; }
.dept-switch { position: relative; }
.dept-switch > summary { list-style: none; cursor: pointer; }
.dept-switch > summary::-webkit-details-marker { display: none; }
.dept-switch > summary:hover { background: rgba(96,69,128,.12); }
.dept-switch[open] > summary { background: rgba(96,69,128,.15); }
.dept-switch .chev { transition: transform .15s ease; margin-left: .1em; }
.dept-switch[open] .chev { transform: rotate(180deg); }
.dept-switch-menu {
    position: absolute; top: calc(100% + .45em); left: 0; z-index: 60;
    min-width: 190px; padding: .4em;
    background: #fff; border: 1px solid var(--gray-200); border-radius: 14px;
    box-shadow: var(--shadow); display: grid; gap: .3em;
}
.topnav .dept-switch-menu a {
    display: block; padding: .42em .95em; border-radius: 999px;
    background: var(--green-50); color: var(--ink);
    font-family: var(--font-display); font-weight: 600; font-size: .92rem;
    text-align: center; text-decoration: none; white-space: nowrap;
}
.topnav .dept-switch-menu a:hover { background: var(--green-100); color: var(--green-700); text-decoration: none; }
.topnav .dept-switch-menu a.active { background: var(--green-600); color: #fff; }
@media (max-width: 700px) {
    .dept-switch-name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; }
}

/* --- E-Zoo logo in de topbalk ---------------------------------------- */
.topnav .brand { display: inline-flex; align-items: center; padding: 0; }
.topnav .brand-logo { height: 30px; width: auto; display: block; }
@media (max-width: 700px) { .topnav .brand-logo { height: 26px; } }

/* --- Tellen: meerdere geslacht-tellers per soort --------------------- */
.counter-sex + .counter-sex { margin-top: 1.1em; padding-top: 1.1em; border-top: 1px dashed var(--gray-300); }
.counter-sex-label {
    display: inline-block; margin: .55em 0 .1em; padding: .1em .8em; border-radius: 999px;
    font-family: var(--font-display); font-weight: 600; font-size: .95rem;
    background: var(--green-50); color: var(--green-700); text-transform: capitalize;
}

/* --- Seizoens-periode kiezer (Soorten & info) ------------------------ */
.period-pick { display: inline-flex; align-items: center; gap: .3em; flex-wrap: wrap; font-weight: 400; }
.period-pick select, .period-pick input { width: auto; min-width: 4.5em; margin-top: 0; padding: .3em .5em; display: inline-block; }
.period-pick input[type="number"] { width: 4em; }
.period-edit { display: flex; align-items: center; gap: .4em; flex-wrap: wrap; margin: .4em 0 .2em; }
/* Mobiel: foto-tegels 1 per rij zodat verenkleed-/seizoenvelden bruikbaar zijn. */
@media (max-width: 600px) {
    .photo-grid { grid-template-columns: 1fr; gap: .8em; }
    .photo-tile img { aspect-ratio: auto; height: 200px; }
}

/* --- Voeren: swipe-flow per voersoort -------------------------------- */
.feed-card { display: none; text-align: center; }
.feed-card.is-active { display: block; animation: cardpop .22s ease both; }
.feed-top { color: var(--gray-500); font-size: .9rem; margin-bottom: .3em; }
.feed-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); margin: .2em 0 .3em; }
.feed-text { white-space: pre-line; }
.feed-soort { font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; color: var(--green-700); margin: .2em 0; }
.feed-soort-row { display: flex; align-items: center; justify-content: center; gap: .6em; margin: .2em 0; }
.feed-soort-photo { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); flex-shrink: 0; }
.feed-amount { font-size: 2rem; font-family: var(--font-display); font-weight: 700; color: var(--ink); margin: .1em 0; }
.feed-amount-note { display: block; font-size: .8rem; font-weight: 400; }
.feed-ingredients { list-style: none; margin: .3em auto .5em; padding: .5em .7em; max-width: 300px; background: var(--green-50); border-radius: 10px; }
.feed-ingredients li { display: flex; align-items: baseline; gap: .4em; padding: .15em 0; font-size: .95rem; }
.feed-ingredients .feed-ing-name { flex: 1; text-align: left; }
.feed-ingredients .feed-ing-amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.feed-ingredients .feed-ing-pct { font-size: .82em; }
.feed-bowl-photo { margin: .6em auto; max-width: 260px; }
.feed-bowl-photo img { width: 100%; border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.feed-birds { display: flex; flex-wrap: wrap; gap: .6em; justify-content: center; margin: .5em 0; }
.feed-bird { margin: 0; width: 84px; }
.feed-bird img { width: 84px; height: 64px; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow-sm); }
.feed-bird-fallback { font-size: 2.4rem; }
.feed-bird figcaption { font-size: .78rem; color: var(--gray-700); margin-top: .2em; line-height: 1.15; text-align: center; overflow-wrap: anywhere; hyphens: auto; }
.feed-nav { display: flex; gap: .6em; justify-content: space-between; margin-top: 1.2em; }
.feed-card .weigh-row { justify-content: center; margin: .6em 0; flex-wrap: wrap; }

/* --- Voer-flow herontwerp (Voerbak vullen) --- */
.back-standalone { display: inline-block; margin: .2em 0 .5em; text-decoration: none; color: var(--purple); font-weight: 600; }
.feed-head { width: 100%; margin: 0 0 1em; }
.feed-head .dhome-tile-txt strong { font-size: 1.4rem; }
.feed-head-birds { display: flex; margin-left: auto; padding-left: .5em; gap: .35em; }
.feed-head-bird { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 2px solid #fff; background: #fff; display: grid; place-items: center; box-shadow: var(--shadow-sm); flex: none; }
.feed-head-bird img { width: 100%; height: 100%; object-fit: cover; }
.feed-head-bird .feed-bird-fallback { font-size: 1.3rem; }

.feed-top { display: flex; flex-direction: column; align-items: center; gap: .55em; margin-bottom: .8em; color: inherit; }
.feed-progress-pill { background: #efe9f7; color: var(--purple); font-weight: 700; font-size: .82rem; padding: .35em .9em; border-radius: 999px; }
.feed-dots { display: flex; gap: .5em; align-items: center; }
.feed-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--gray-200); }
.feed-dot.done { background: var(--purple); }
.feed-dot.current { background: #fff; border: 3px solid var(--purple); width: 13px; height: 13px; }

.feed-bowl-circle { width: 210px; height: 210px; margin: .4em auto .9em; border-radius: 50%; border: 2px solid #e6def3; display: grid; place-items: center; overflow: hidden; background: #faf8fd; }
.feed-bowl-circle img { width: 84%; height: 84%; object-fit: contain; }
.feed-bowl-circle-empty span { font-size: 4rem; }

.feed-howto { list-style: none; margin: 0 auto .9em; padding: 0; max-width: 340px; text-align: left; }
.feed-howto li { display: flex; align-items: center; gap: .6em; padding: .28em 0; color: var(--ink); }
.feed-howto svg { width: 26px; height: 26px; color: var(--purple); flex-shrink: 0; }

.feed-soort-card { display: flex; align-items: center; gap: .9em; background: var(--green-50); border-radius: 16px; padding: .8em 1em; margin: .2em auto .4em; max-width: 380px; text-align: left; }
.feed-soort-card-photo { width: 84px; height: 84px; object-fit: cover; border-radius: 14px; flex-shrink: 0; }
.feed-soort-card-txt { display: flex; flex-direction: column; }
.feed-soort-card .feed-soort { color: var(--green-700); font-size: 1.15rem; margin: 0; }
.feed-soort-card .feed-amount { font-size: 2rem; margin: 0; line-height: 1.05; }
.feed-for { margin: .7em auto .1em; }
.feed-for-label { display: block; margin-bottom: .1em; }
.feed-hoklist { list-style: none; padding: 0; margin: .3em auto .4em; max-width: 340px; text-align: left; }
.feed-hoklist .chore { margin: .35em 0; }
/* admin: soorten koppelen aan een voerregel */
.feed-species-card { margin: .6em 0; }
.feed-species-head { display: flex; align-items: center; gap: .9em; flex-wrap: wrap; margin-bottom: .5em; }
/* opfok-groepen ("linten") overzicht */
.opfok-box { padding: .8em 1em; }
.opfok-box h3 { margin: 0 0 .5em; }
.opfok-cohort { display: flex; flex-wrap: wrap; align-items: center; gap: .5em 1em; padding: .55em 0; border-top: 1px solid var(--gray-100); }
.opfok-cohort:first-of-type { border-top: none; }
.opfok-cohort-main { display: flex; align-items: center; gap: .55em; flex-wrap: wrap; }
.opfok-cohort-actions { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; margin-left: auto; }
.opfok-cohort-actions form { margin: 0; }

/* --- Ontdekmissies: overzicht + doorloop ----------------------------- */
.mission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8em; margin: .6em 0 1.4em; }
.mission-tile { display: flex; flex-direction: column; gap: .35em; padding: .9em 1em; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); text-decoration: none; color: var(--ink); transition: transform .08s, box-shadow .15s; }
.mission-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.mission-tile.is-done { opacity: .72; }
.mission-tile-top { display: flex; flex-wrap: wrap; gap: .3em; }
.mission-tile-title { font-family: var(--font-display); font-size: 1.1rem; line-height: 1.15; }
.mission-tile-body { color: var(--gray-700); font-size: .9rem; }
.pill-diff-1 { background: #e3f1e6; color: var(--green-700); }
.pill-diff-2 { background: #fdf0d8; color: var(--honey-deep); }
.pill-diff-3 { background: #fbe3e0; color: var(--red); }

.mission-hero { margin: .3em 0 1em; }
.mission-hero h1 { margin: 0 0 .3em; }
.mission-hero-meta { display: flex; flex-wrap: wrap; gap: .35em; }

.missionflow { text-align: center; }
.mission-card { display: none; }
.mission-card.is-active { display: block; animation: cardpop .22s ease both; }
.mission-top { color: var(--gray-500); font-size: .9rem; margin-bottom: .3em; }
.mission-step-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); margin: .2em 0 .4em; }
.mission-text { white-space: pre-line; }
.mission-question { font-weight: 600; font-size: 1.1rem; }
.mission-nav { display: flex; gap: .6em; justify-content: space-between; margin-top: 1.4em; }
.mission-media img { max-width: 100%; border-radius: 14px; box-shadow: var(--shadow); }
.mission-audio { width: 100%; margin: .6em 0; }
.mission-video { width: 100%; max-height: 60vh; border-radius: 14px; }
.mission-card textarea { text-align: left; }

/* Spel: meerkeuze / of-of */
.game-mc { display: grid; gap: .55em; margin: .6em 0; }
.game-ofof { grid-template-columns: 1fr 1fr; }
.game-opt { padding: 1em; border: 1px solid var(--gray-300); border-radius: var(--radius); background: #fff; font-size: 1.05rem; font-weight: 600; font-family: inherit; cursor: pointer; }
.game-opt:hover:not(:disabled) { background: var(--green-50); }
.game-opt.is-correct { background: var(--green-100); border-color: var(--green-500); color: var(--green-700); }
.game-opt.is-wrong { background: #fbe3e0; border-color: var(--red); color: var(--red); }
.game-feedback { min-height: 1.4em; margin: .4em 0 0; }
/* Spel: foto's matchen */
.game-match { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7em; margin: .6em 0; }
.match-item { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: .5em; box-shadow: var(--shadow-sm); }
.match-item img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; }
.match-item .match-select { margin-top: .4em; }
.match-mark { display: block; font-weight: 700; font-size: 1.2rem; min-height: 1.4em; }
.match-mark.is-correct { color: var(--green-600); }
.match-mark.is-wrong { color: var(--red); }

/* --- Ontdekmissie-tegel met achtergrondfoto -------------------------- */
.mission-tile.has-image { background-size: cover; background-position: center; color: #fff; border: none; min-height: 150px; justify-content: flex-end; }
.mission-tile.has-image .mission-tile-title { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.mission-tile.has-image .mission-tile-body { color: rgba(255,255,255,.92); text-shadow: 0 1px 5px rgba(0,0,0,.5); }
.mission-tile.has-image .mission-tile-meta { color: rgba(255,255,255,.85) !important; text-shadow: 0 1px 5px rgba(0,0,0,.5); }

/* === Afdeling-startscherm (student dashboard) ======================== */
body.student-app { --purple: #6a4c93; padding-bottom: 74px; }
body.dept-home .main { padding: 0; max-width: 100%; }
.apphead { display: flex; align-items: center; justify-content: space-between; gap: 1em; background: #fff; padding: .6em 1em; border-bottom: 1px solid var(--gray-200); position: sticky; top: 0; z-index: 50; }
.apphead-home { color: var(--purple); display: inline-flex; }
.apphead-logo { height: 30px; width: auto; display: block; }
.apphead-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; text-decoration: none; }

.dhome { max-width: 560px; margin: 0 auto; padding: 1em; display: flex; flex-direction: column; gap: .9em; }
.dhome-hero { border-radius: 18px; overflow: hidden; min-height: 168px; background: radial-gradient(135% 135% at 12% 0%, #f5a24e 0%, #e07a34 46%, #a83c1a 100%) #c85a2a center/cover no-repeat; color: #fff; display: flex; align-items: flex-end; padding: 1em 1.1em; position: relative; }
.dhome-hero.has-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(40,20,60,.55), rgba(20,40,30,.22)); }
.dhome-hero-in { position: relative; z-index: 1; }
.dhome-hero h1 { color: #fff; margin: 0; font-size: 1.9rem; }
.dhome-hero p { margin: .1em 0 .55em; opacity: .95; }
.dhome-loc { display: inline-flex; align-items: center; gap: .35em; background: #fff; color: var(--purple); font-weight: 600; padding: .35em .8em; border-radius: 999px; font-size: .92rem; }
.dhome-loc svg { width: 16px; height: 16px; }
a.dhome-loc { text-decoration: none; }
a.dhome-loc:hover { background: #f3eefb; }
.dhome-xp { display: inline-flex; align-items: center; gap: .3em; margin-left: .45em; background: #fff; color: var(--honey-deep); font-weight: 600; padding: .35em .8em; border-radius: 999px; font-size: .92rem; }
.dhome-xp strong { font-weight: 800; }

.dhome-summary { margin: 0; }
.dhome-summary-title { font-family: var(--font-display); font-weight: 700; color: var(--purple); margin-bottom: .55em; letter-spacing: .02em; }
.dhome-stats { display: flex; justify-content: space-around; gap: .5em; text-align: center; }
.dhome-stat { display: flex; flex-direction: column; align-items: center; gap: .15em; flex: 1; }
.dhome-stat strong { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); }
.dhome-stat > span:last-child { font-size: .78rem; color: var(--gray-700); line-height: 1.1; }
.dhome-stat-ic { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; margin-bottom: .15em; }
.dhome-stat-ic svg { width: 22px; height: 22px; }
.ic-care { background: var(--green-600); } .ic-disc { background: var(--purple); } .ic-feed { background: var(--honey-deep); }

.dhome-tileform { margin: 0; }
.dhome-tile { display: flex; align-items: center; gap: .9em; width: 100%; padding: 1em 1.1em; border-radius: 16px; text-decoration: none; text-align: left; border: none; cursor: pointer; font-family: inherit; box-shadow: var(--shadow-sm); }
.dhome-tile-ic { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.dhome-tile-txt { display: flex; flex-direction: column; flex: 1; }
.dhome-tile-txt strong { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; }
.dhome-tile-txt span { font-size: .9rem; color: var(--gray-700); }
.dhome-tile-badge { font-size: .8rem; font-weight: 600; padding: .3em .7em; border-radius: 999px; background: rgba(255,255,255,.72); white-space: nowrap; color: var(--ink); }
.tile-care { background: var(--green-50); } .tile-care .dhome-tile-ic { background: var(--green-600); } .tile-care .dhome-tile-txt strong { color: var(--green-700); }
.tile-disc { background: #efe9f7; } .tile-disc .dhome-tile-ic { background: var(--purple); } .tile-disc .dhome-tile-txt strong { color: var(--purple); }
.tile-dev  { background: #fdf2dc; } .tile-dev .dhome-tile-ic  { background: var(--honey-deep); } .tile-dev .dhome-tile-txt strong  { color: var(--honey-deep); }
.tile-quiz { background: #efe9f7; } .tile-quiz .dhome-tile-ic { background: var(--purple); } .tile-quiz .dhome-tile-txt strong { color: var(--purple); }
.tile-guide { background: #e2eeec; } .tile-guide .dhome-tile-ic { background: #2c6e63; } .tile-guide .dhome-tile-txt strong { color: #2c6e63; }

/* --- Soortengids (soorten.php) --- */
.soort-search { width: 100%; padding: .7em 1em; border: 1px solid var(--gray-200); border-radius: 12px; font-size: 1rem; margin: 0 0 1em; background: #fff; box-shadow: var(--shadow-sm); }
.soort-search:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px var(--green-100); }
.soort-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .8em; margin: 0 0 1.5em; }
.soort-card { display: flex; flex-direction: column; gap: .55em; align-items: center; text-align: center; text-decoration: none; background: #fff; border: 1px solid var(--gray-200); border-radius: 14px; padding: .85em .6em; box-shadow: var(--shadow-sm); color: var(--gray-900); transition: transform .12s ease, border-color .12s ease; }
.soort-card:hover { border-color: var(--green-500); transform: translateY(-2px); }
.soort-card[hidden] { display: none; }   /* nodig: .soort-card{display:flex} overschreef het hidden-attribuut, waardoor de zoekfilter niets deed */
.soort-card-photo { width: 84px; height: 84px; border-radius: 50%; background: var(--green-50) center/cover no-repeat; display: grid; place-items: center; font-size: 2rem; box-shadow: inset 0 0 0 1px var(--gray-200); }
.soort-card-name { font-family: var(--font-display); font-weight: 600; font-size: .9rem; line-height: 1.15; }

.soort-detail-head { margin: .2em 0 1em; }
.soort-detail-head h1 { margin: 0; }
.soort-binomial { display: block; font-style: italic; color: #2c6e63; font-size: 1.05rem; margin-top: .1em; }
.soort-dept { display: inline-block; margin-top: .5em; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-500); }
.soort-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8em; margin: 0 0 1.2em; }
.soort-photo { margin: 0; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-sm); }
.soort-photo img { display: block; width: 100%; height: 150px; object-fit: cover; }
.soort-photo figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: .4em; padding: .55em .6em; }
.soort-sex { display: inline-flex; align-items: center; gap: .3em; font-size: .74rem; font-weight: 700; padding: .28em .6em; border-radius: 999px; }
.soort-sex.m { background: #e0ecf3; color: #285a78; }
.soort-sex.v { background: #f5e2ec; color: #8c3361; }
.soort-sex.n { background: #e8ebe1; color: var(--gray-700); }
.soort-plume { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-700); padding: .3em .55em; border: 1px solid var(--gray-200); border-radius: 999px; }
.soort-cap { font-style: italic; font-size: .84rem; color: var(--gray-700); }
.soort-facts { margin: 0; padding: .4em 1.1em; }
.soort-fact { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; padding: .65em 0; border-bottom: 1px solid var(--gray-200); }
.soort-fact:last-child { border-bottom: 0; }
.soort-fact dt { flex: 0 0 auto; max-width: 48%; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-500); }
.soort-fact dd { margin: 0; text-align: right; font-weight: 600; color: var(--gray-900); word-break: break-word; }
.soort-fact .aud { font-weight: 500; color: #2c6e63; font-size: .82em; }

/* --- Soorten oefenen (soorten_oefen.php) --- */
.soort-oefen-btn { display: inline-flex; align-items: center; gap: .4em; margin: 0 0 1em; }
.oefen { max-width: 520px; margin: 0 auto; }
.oefen-bar { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-weight: 600; color: var(--gray-700); margin: 0 0 .6em; }
.oefen-score { color: var(--green-700); }
.oefen-photo { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); background: var(--green-50); margin: 0 0 1em; }
.oefen-photo img { display: block; width: 100%; height: 300px; object-fit: cover; }
.oefen-options { display: grid; gap: .6em; }
.oefen-opt { padding: .9em 1em; border-radius: 14px; border: 2px solid var(--gray-200); background: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--gray-900); cursor: pointer; text-align: left; transition: border-color .12s ease, background .12s ease; }
.oefen-opt:hover:not(:disabled) { border-color: var(--green-500); }
.oefen-opt:disabled { cursor: default; }
.oefen-opt.correct { border-color: var(--green-600); background: var(--green-50); color: var(--green-700); }
.oefen-opt.wrong { border-color: #e06666; background: #fdecec; color: #b03030; }
.oefen-next { margin-top: 1em; text-align: center; }
.oefen-nextbtn { min-width: 60%; }
.oefen-result { text-align: center; padding: 1.6em 1.2em; }
.oefen-result-score { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; color: var(--green-700); line-height: 1; }
.oefen-result-msg { font-size: 1.1rem; margin: .4em 0 .6em; }
.oefen-today { color: var(--green-700); font-weight: 600; }
.oefen-xp { margin: .8em 0 0; text-align: center; font-family: var(--font-display); font-weight: 700; color: var(--green-700); background: var(--green-50); border: 1px solid var(--green-100); border-radius: 12px; padding: .6em .8em; animation: cardpop .25s ease both; }
.oefen-result-today { font-size: 1rem; color: var(--gray-700); margin: 0 0 1.1em; }

/* --- Reflectie-antwoorden (admin/mission_edit.php) --- */
.reflectie-list { list-style: none; padding: 0; margin: .6em 0 0; display: grid; gap: .6em; }
.reflectie-list li { padding: .7em .9em; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--green-50); }
.reflectie-answer { color: var(--gray-900); }
.reflectie-meta { margin-top: .35em; }

.dhome-news { display: flex; flex-direction: column; gap: .2em; margin: 0; }
.dhome-news strong { font-family: var(--font-display); color: var(--ink); }
.dhome-news span { color: var(--gray-700); font-size: .92rem; }

.appnav { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--gray-200); display: flex; justify-content: space-around; padding: .3em .2em; z-index: 50; }
.appnav-item { display: flex; flex-direction: column; align-items: center; gap: .1em; color: var(--gray-500); text-decoration: none; font-size: .7rem; padding: .35em .4em; }
.appnav-item svg { width: 22px; height: 22px; }
.appnav-item.is-active { color: var(--purple); }
.profile-logout { text-align: center; margin: 1.6em 0 .5em; }

/* --- CSV-import (admin/import.php) --- */
.import-tabs { display: flex; gap: .4em; margin: .8em 0 1.2em; flex-wrap: wrap; }
.import-textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9rem; white-space: pre; }
.import-actions { margin-top: 1em; }
.import-badge { display: inline-block; padding: .1em .55em; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.import-new { background: var(--green-50); color: #1c6b32; }
.import-dup { background: #fff4e0; color: #8a5a00; }
.import-err { background: #fde5e5; color: #a11; }
.import-preview .imp-error td { background: #fdf1f1; }
.import-preview .imp-dup td { color: var(--gray-500); }
.import-preview td .import-badge + .small { margin-left: .4em; }
.import-warn { border-left: 4px solid #e0a800; }
.import-result { border-left: 4px solid var(--green-500, #2e9c4e); }

/* --- "Zet op beginscherm"-tegel (app.php lobby) --- */
.a2hs { position: relative; display: flex; align-items: center; gap: .9em; margin: 0 0 1.1em; padding: .9em 1em; border-radius: 16px; border: 1px solid var(--green-100); background: linear-gradient(180deg, #fff, var(--green-50)); }
.a2hs-ic { width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; box-shadow: var(--shadow-sm); background: #fff; }
.a2hs-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1em; }
.a2hs-txt strong { font-family: var(--font-display); }
.a2hs-sub { color: var(--gray-700); font-size: .88rem; line-height: 1.35; }
.a2hs-btn { flex-shrink: 0; }
.a2hs-close { position: absolute; top: 4px; right: 8px; border: none; background: none; color: var(--gray-500); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: .1em .25em; }
.a2hs-close:hover { color: var(--gray-900); }
@media (max-width: 460px) {
  .a2hs { flex-wrap: wrap; padding-right: 1.6em; }
  .a2hs-btn { width: 100%; margin-top: .2em; }
}

/* --- Verzorgrooster (admin/rooster.php) --- */
.quota-grid th { text-align: center; vertical-align: bottom; }
.quota-grid td.quota-cell { text-align: center; white-space: nowrap; }
/* Eerste kolom = afdelingsnaam. Op smal scherm drukte de brede min/max-cel
   deze kolom naar breedte 0 (namen onzichtbaar). Vaste minimumbreedte + sticky
   houdt de namen altijd in beeld, ook bij meerdere periodes / horizontaal scrollen. */
.quota-grid th:first-child,
.quota-grid td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 8em;
    text-align: left;
    background: #fff;
    box-shadow: 1px 0 0 var(--gray-200, #e5e7eb);
}
.quota-grid thead th:first-child { background: var(--green-50); }
.quota-cell .mm { display: inline-flex; align-items: center; gap: .2em; font-size: .78rem; color: var(--gray-600, #666); margin: 0 .15em; }
.quota-cell .mm input[type="number"] { width: 3.2em; }
.rooster-moment { margin: .6em 0; }
.rooster-moment h4 { margin: 0 0 .4em; }
.rooster-moment table { margin: 0; }

/* --- Startscherm: eerstvolgende verzorging + Mijn rooster --- */
.care-next { display: flex; align-items: center; gap: .8em; background: var(--green-50, #eef6f0); border: 1px solid var(--green-200, #cfe6d8); border-radius: 16px; padding: .8em 1em; margin: .2em 0 1em; text-decoration: none; color: var(--ink, #1f2937); }
.care-next-ic { font-size: 1.8rem; flex: none; }
.care-next-txt { display: flex; flex-direction: column; min-width: 0; }
.care-next-label { font-size: .78rem; color: var(--green-700, #2e7d4f); font-weight: 600; }
.care-next-dept { font-size: 1.15rem; line-height: 1.15; }
.care-next-when { font-size: .9rem; color: var(--gray-600, #555); }
.care-next-chev { margin-left: auto; flex: none; }
.care-next-chev svg { width: 20px; height: 20px; color: var(--gray-400, #9ca3af); }
.rooster-period { font-size: 1.05rem; margin: 1.1em 0 .3em; }
.rooster-list { list-style: none; padding: 0; margin: 0; }
.rooster-item { display: flex; align-items: center; gap: .7em; background: #fff; border: 1px solid var(--gray-200, #e5e7eb); border-radius: 12px; padding: .6em .8em; margin: .35em 0; }
.rooster-item.is-today { border-color: var(--green-400, #6bbf8f); background: var(--green-50, #eef6f0); }
.rooster-item-ic { font-size: 1.3rem; flex: none; }
.rooster-item-txt { display: flex; flex-direction: column; }

/* --- Verzorgrooster: overzicht per moment (bezetting per afdeling) --- */
.rooster-overview th, .rooster-overview td { text-align: center; vertical-align: middle; }
.rooster-overview td:first-child, .rooster-overview th:first-child { text-align: left; white-space: nowrap; }
.rooster-overview td.occ-ok, .rooster-overview td.occ-low, .rooster-overview td.occ-over { font-weight: 700; }
.rooster-overview td.occ-ok   { background: #d6f0dd; color: #1c6b39; }
.rooster-overview td.occ-low  { background: #f7d4d4; color: #a12020; }
.rooster-overview td.occ-over { background: #fce8c8; color: #9a6412; }
.occ { display: inline-block; min-width: 1.5em; padding: .08em .4em; border-radius: 6px; font-weight: 700; }
.occ.occ-ok   { background: #d6f0dd; color: #1c6b39; }
.occ.occ-low  { background: #f7d4d4; color: #a12020; }
.occ.occ-over { background: #fce8c8; color: #9a6412; }

/* --- Verzorgrooster: dagdeel-advies --- */
.rooster-advies { background: #fffbea; border-color: #f0e4b8; }
.advies-slots, .advies-sugg { list-style: none; padding: 0; margin: .3em 0 .7em; }
.advies-slots li, .advies-sugg li { padding: .28em 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.advies-slots li:last-child, .advies-sugg li:last-child { border-bottom: 0; }
.advies-slots .occ { margin-left: .3em; font-size: .78rem; }
.rooster-advies h4 { margin: .5em 0 .2em; }

/* --- Voorstel-dagdelen + overzicht-matrix (verzorgrooster) --- */
.rooster-suggest { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; margin: .4em 0 .8em; }
.rooster-suggest .btn[disabled] { opacity: .5; cursor: not-allowed; }
.rooster-matrix th, .rooster-matrix td { vertical-align: top; }
.rooster-matrix td:first-child, .rooster-matrix th:first-child { white-space: nowrap; }
.rooster-matrix td { min-width: 8em; }

/* --- "Bekijk als student" (impersonatie) --- */
.imp-banner { position: sticky; top: 0; z-index: 200; display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap;
  background: #8a5a12; color: #fff6e2; padding: 8px 16px; font-size: .92rem; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.imp-banner-txt { display: inline-flex; align-items: center; gap: 8px; }
.imp-banner .imp-role { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; background: rgba(255,255,255,.2); padding: 2px 7px; border-radius: 999px; }
.imp-banner-form { margin: 0; }
.imp-banner-btn { cursor: pointer; font: inherit; font-weight: 600; color: #8a5a12; background: #ffe6ab; border: 1px solid #f0cf87; border-radius: 8px; padding: 5px 12px; }
.imp-banner-btn:hover { background: #ffdd90; }

/* --- Student-rooster: agenda-knop per moment --- */
.rooster-item-cal { margin-left: auto; flex: none; text-decoration: none; font-size: .9rem; padding: .35em .55em; border-radius: 8px; background: var(--green-50, #eef6f0); color: var(--green-700, #2e7d4f); white-space: nowrap; }

/* --- Stapsgewijze feedback (feedback.php) --- */
.fb-step { display: none; }
.fb-step.is-active { display: block; animation: cardpop .2s ease both; }
.fb-progress { display: flex; align-items: center; gap: .6em; margin: .2em 0 .7em; font-size: .85rem; color: var(--gray-600,#555); }
.fb-bar { flex: 1; height: 7px; background: var(--gray-200,#e5e7eb); border-radius: 999px; overflow: hidden; }
.fb-bar-fill { display: block; height: 100%; width: 20%; background: var(--green-600,#2e7d4f); transition: width .2s ease; }
.fb-item { padding: .5em 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.fb-item:last-child { border-bottom: 0; }
.fb-item-label { display: block; margin-bottom: .4em; }
.fb-scale { display: flex; gap: .4em; }
.fb-dot { flex: 1; position: relative; margin: 0; }
.fb-dot input { position: absolute; opacity: 0; width: 0; height: 0; }
.fb-dot span { display: block; text-align: center; padding: .55em 0; border: 1.5px solid var(--gray-300,#d1d5db); border-radius: 10px; cursor: pointer; font-weight: 700; }
.fb-dot input:checked + span { background: var(--green-600,#2e7d4f); color: #fff; border-color: var(--green-600,#2e7d4f); }
.fb-dot input:focus-visible + span { outline: 2px solid var(--green-600,#2e7d4f); outline-offset: 2px; }
.fb-nav { display: flex; gap: .6em; margin-top: 1.1em; }
.fb-nav .btn { flex: 1; }

/* --- Startscherm: rol-acties (feedback/leerdoelen) --- */
.care-actions { display: flex; flex-wrap: wrap; gap: .5em; margin: 0 0 1em; }
.care-action { flex: 1 1 45%; text-decoration: none; background: var(--green-50,#eef6f0); border: 1px solid var(--green-200,#cfe6d8); color: var(--green-700,#2e7d4f); border-radius: 12px; padding: .7em .8em; font-weight: 600; text-align: center; }
.fb-nav .btn[hidden] { display: none !important; }

/* --- 360°-feedback: status + herinnering --- */
.fb-status-list { list-style: none; padding: 0; margin: .3em 0 .6em; display: flex; flex-wrap: wrap; gap: .4em 1em; }
.fb-status-list li { display: flex; align-items: center; gap: .35em; }
.fb-reminder-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 1em; z-index: 1000; }
.fb-reminder-overlay[hidden] { display: none !important; }
.fb-reminder { max-width: 380px; margin: 0; }

/* --- Compacte gebruikers-tabel (veel gebruikers, 1 regel per rij) --- */
.users-table td, .users-table th { padding: .25em .5em; vertical-align: middle; }
.users-table input, .users-table select { padding: .25em .4em; }
.users-table .naam-input { min-width: 7em; width: 100%; }
.users-table .klas-input { min-width: 4.5em; width: 5.5em; }
.users-table .rol-select { min-width: 8em; }
.users-table .u-email { color: var(--gray-600,#555); font-size: .82rem; }
.users-table td.dept-assign { min-width: 0; max-width: none; white-space: nowrap; }
.dept-details > summary { cursor: pointer; color: var(--purple,#6b46c1); font-size: .85rem; white-space: nowrap; list-style: none; user-select: none; }
.dept-details > summary::-webkit-details-marker { display: none; }
.dept-details > summary::after { content: ' \25BE'; color: var(--gray-400,#9ca3af); }
.dept-details[open] > summary::after { content: ' \25B4'; }
.dept-details .checkbox-grid { margin-top: .4em; min-width: 220px; }
.dept-link { color: var(--purple,#6b46c1); text-decoration: none; white-space: nowrap; font-size: .85rem; }
.dept-link:hover { text-decoration: underline; }

/* --- Afdelingen-popup (gebruikers) --- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 1em; z-index: 1000; }
.modal-overlay[hidden] { display: none !important; }
.modal { position: relative; max-width: 460px; width: 100%; max-height: 85vh; overflow: auto; margin: 0; }
.modal-close { position: absolute; top: .3em; right: .55em; background: none; border: 0; font-size: 1.7rem; line-height: 1; cursor: pointer; color: var(--gray-500,#777); }
.modal-title { margin-top: 0; padding-right: 1.4em; }
.modal .checkbox-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.form-error { margin: 0 0 .8em; padding: .55em .7em; border-radius: 8px; background: #fde8e6; border: 1px solid var(--red, #d64545); color: #8a1c13; font-size: .92em; }

/* --- Inline actief-toggle (gebruikerslijst) --- */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; vertical-align: middle; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; background: var(--gray-300,#cbd5e1); border-radius: 999px; transition: background .15s; }
.switch-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + .switch-slider { background: var(--green-600,#2e7d4f); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }
.switch input:focus-visible + .switch-slider { outline: 2px solid var(--green-600,#2e7d4f); outline-offset: 2px; }

/* --- Feedback aan manager (verzorgscherm) --- */
.care-fb-link { display: flex; align-items: center; gap: .6em; text-decoration: none; background: var(--green-50,#eef6f0); border: 1px solid var(--green-200,#cfe6d8); color: var(--green-800,#245e3d); border-radius: 14px; padding: .8em 1em; margin: 0 0 1em; font-weight: 600; }
.care-fb-link .care-fb-chev { margin-left: auto; font-size: 1.2em; }
.fb-locked-mgr { background: var(--green-50,#eef6f0); border-radius: 10px; padding: .6em .8em; margin: 0 0 .8em; }

/* --- Weekend-/vakantierooster (dienstrooster) ------------------------------ */
.dv-block { padding: 0; margin: 10px 0; }
.dv-block > summary { list-style: none; cursor: pointer; padding: 12px 14px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dv-block > summary::-webkit-details-marker { display: none; }
.dv-block > summary::before { content: '▸'; color: #9aa; transition: transform .15s; }
.dv-block[open] > summary::before { transform: rotate(90deg); }
.dv-block.dv-inactive { opacity: .6; }
.dv-sum-right { margin-left: auto; }
.dv-kind { font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.dv-kind-weekend  { background: #e3f0ff; color: #1f5fa8; }
.dv-kind-vakantie { background: #fdeede; color: #a5661a; }
.dv-block-body { padding: 4px 14px 16px; border-top: 1px solid #eee; }
.dv-days { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.dv-day { background: #f4f6f4; border-radius: 8px; padding: 4px 10px; font-size: 13px; }
.dv-edit-row { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.dv-cap-form { display: flex; align-items: flex-end; gap: 8px; margin: 0; }
.dv-classes-label { font-weight: 600; margin: 6px 0; }
.dv-class-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dv-class-chip { display: inline-flex; align-items: center; gap: 5px;
  background: #f4f6f4; border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.dv-class-chip input { margin: 0; }

/* --- Weekend-/vakantiedienst (student-inschrijving) ------------------------ */
.dienst-block { }
.dienst-block.is-signed { border-color: #3b8137; box-shadow: 0 0 0 1px #3b8137 inset; }
.dienst-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.dienst-badge { margin-left: auto; color: #3b8137; font-weight: 700; font-size: 13px; }
.dienst-days { list-style: none; padding: 0; margin: 8px 0; }
.dienst-days > li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.dienst-days.dienst-pick > li { border: 0; padding: 3px 0; }
.dienst-day { display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer;
  background: #f4f6f4; border-radius: 8px; padding: 8px 12px; }
.dienst-day input { margin: 0; }
.dienst-day > span:last-child { margin-left: auto; }
.dienst-day.is-full { opacity: .55; cursor: not-allowed; }
.dienst-actions { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.dienst-alert { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.dienst-alert.is-signed { border-color: #3b8137; }
.dienst-alert-ic { font-size: 26px; }
.dienst-alert-txt { display: flex; flex-direction: column; }
.dienst-alert-txt strong { color: #2b6a2b; }
.dienst-alert-chev { margin-left: auto; color: #9aa; font-size: 20px; }

/* --- Dienst: per-blok beheer (OA / diergroepen / indeling) ----------------- */
.dv-group-form { border: 1px solid #eee; border-radius: 10px; padding: 12px; margin: 10px 0; }
.dv-group-new { margin-top: 12px; }
.dv-group-new > summary { cursor: pointer; color: #2b6a2b; font-weight: 600; }
.dv-student-row { border: 1px solid #eee; border-radius: 10px; padding: 12px; margin: 10px 0; }
.dv-student-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.dv-student-group { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.dv-daypick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dienst-group { background: #f1f7f1; border-radius: 8px; padding: 8px 12px; margin: 8px 0 0; }

/* --- Dienst: beoordeling (Fase 4) ------------------------------------------ */
.dienst-review { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dienst-review-status.is-open { color: #a5661a; font-weight: 600; }
.dienst-review-status.is-done { color: #2b6a2b; font-weight: 600; }
.dv-student-head .dienst-badge { margin-left: auto; }
.dv-student-head .dienst-badge + a { margin-left: 0; }

/* --- Dienst: dag-bewerking & individuele studenten ------------------------- */
.dv-day-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0;
  padding: 6px 8px; background: #f8faf8; border-radius: 8px; }
.dv-day-label { min-width: 9em; font-weight: 600; }
.dv-day-add { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid #eee; }
.dv-indiv-list { list-style: none; padding: 0; margin: 8px 0; }
.dv-indiv-list > li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 0; border-bottom: 1px solid #f0f0f0; }

/* --- Dienst: onderling ruilen ---------------------------------------------- */
.dienst-swap { margin-top: 10px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.dienst-swap-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; padding: 6px 0; }
.dienst-swap-row.is-in { background: #fff7e6; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; }
.dienst-swap-new { margin-top: 6px; }
.dienst-swap-new > summary { cursor: pointer; color: #2b6a2b; font-weight: 600; }
.dienst-swap-new form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; }

/* --- Gebruikers: bulk per klas & snelle afdeling --------------------------- */
.bulk-class { margin-bottom: 14px; }
.bulk-class > summary { cursor: pointer; }
.bulk-class-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 12px 0 6px; }
.u-dept .quick-dept { margin-left: 6px; font-size: 12px; max-width: 8.5em; }

/* --- Klas-overzicht: aanwezigheid aftekenen -------------------------------- */
.att-pick { white-space: nowrap; }
.att-pick label { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; }

/* --- Student-view (app-preview voor staf) ---------------------------------- */
.imp-banner-preview { background: #2b6a2b; }
.imp-banner-preview .imp-banner-btn { background: rgba(255,255,255,.18); }

/* --- Ontdekmissie: ingesloten (YouTube-)video ------------------------------ */
.mission-video-wrap { position: relative; width: 100%; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background:#000; }
.mission-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* --- Dienstrooster: publiceren --------------------------------------------- */
.dv-publish { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.dv-publish.is-published { border-color: #3b8137; box-shadow: 0 0 0 1px #3b8137 inset; }
.dv-publish.is-draft { border-color: #a5661a; box-shadow: 0 0 0 1px #e8c99a inset; }
.dv-publish-txt { flex: 1 1 15em; }
