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

:root {
    --green-700: #2e6029;
    --green-600: #3b8137;
    --green-500: #4a9d3e;
    --green-100: #e7f1e3;
    --green-50:  #f4f9f1;
    --orange:    #ed7728;
    --gray-900:  #1a1a1a;
    --gray-700:  #4a4a4a;
    --gray-500:  #888;
    --gray-300:  #d0d0d0;
    --gray-200:  #e7e7e7;
    --gray-100:  #f4f4f4;
    --bg:        #fafaf7;
    --red:       #c4322c;
    --yellow:    #d4a72c;

    --radius: 8px;
    --shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.04);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --max-width: 1200px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--gray-900);
    background: var(--bg);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.25; margin: 1.2em 0 .5em; color: var(--green-700); }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

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: var(--green-600);
    color: white;
    padding: .8em 1em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1em;
}
.topnav .brand { font-weight: bold; font-size: 1.2em; color: white; text-decoration: none; }
.topnav a       { color: white; text-decoration: none; padding: .25em .5em; }
.topnav a:hover { text-decoration: underline; }
.topnav .user   { margin-left: auto; opacity: .9; font-size: .9em; }
.role { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: .75em; background: rgba(255,255,255,.2); 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; }

.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-weight: 600; font-size: .9em; }
.data-table tbody tr:hover { background: var(--gray-100); }
.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;
}
.table-scroll .data-table { margin: 0; box-shadow: none; }
.assessments-table .comment-cell { min-width: 18em; max-width: 32em; word-break: break-word; }

/* ---- Login ---- */
.login-page { background: linear-gradient(135deg, var(--green-600), var(--green-500)); min-height: 100vh; }
.login-page .main { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.login-card { max-width: 420px; width: 100%; }
.login-card h1 { color: var(--green-600); margin-top: 0; text-align: center; font-size: 2.5em; }

/* ---- 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); }

/* ---- 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: var(--green-50);
    padding: 1em;
    border-radius: var(--radius);
    margin: 1em 0;
}
.session-header h1 { margin: 0; }

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

.task-list, .chore-list { list-style: none; padding: 0; margin: 0; }
.task {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    margin: .5em 0;
    transition: all .15s;
}
.task-row { display: flex; justify-content: space-between; align-items: center; padding: .75em 1em; gap: 1em; }
.task-info { flex: 1; min-width: 0; }
.task-claimed { background: #fff8e6; border-color: var(--yellow); }
.task-done    { opacity: .6; background: var(--gray-100); }

.chore { display: block; padding: .5em; cursor: pointer; }
.chore input { margin-right: .5em; transform: scale(1.3); vertical-align: middle; }

/* ---- 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; }
.score-block.score-4 { background: #6d28d9; border-color: #4c1d95; }            /* Uitmuntend */
.score-block.score-3 { background: var(--green-500); border-color: var(--green-700); }
.score-block.score-2 { background: var(--yellow); border-color: #a07e1e; color: #3d2f06; }
.score-block.score-1 { background: var(--red); border-color: #8c2420; }

.score {
    display: inline-block;
    padding: .15em .6em;
    border-radius: 999px;
    font-weight: bold;
    color: white;
    font-size: .85em;
}
.score-4 { background: #6d28d9; }
.score-3 { background: var(--green-500); }
.score-2 { background: var(--yellow); color: #3d2f06; }
.score-1 { background: var(--red); }

/* 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); }

/* 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; }

/* Tellen */
.count-list { list-style: none; padding: 0; margin: .5em 0; }
.count-row { display: flex; align-items: center; gap: .75em; padding: .5em 0; border-bottom: 1px solid var(--gray-200, #e5e7eb); }
.count-photo { flex: none; width: 56px; height: 56px; border-radius: var(--radius); object-fit: cover; background: var(--gray-100, #f3f4f6); display: grid; place-items: center; font-size: 1.6em; }
.count-main { flex: 1; display: flex; flex-direction: column; gap: .2em; }
.count-info summary { cursor: pointer; color: var(--green-700, #2f6b29); font-size: .85em; }
.count-info dl { margin: .3em 0 0; display: grid; grid-template-columns: auto 1fr; gap: .1em .6em; font-size: .9em; }
.count-info dt { font-weight: 600; color: var(--gray-700, #374151); }
.count-info dd { margin: 0; }
.count-input { width: 4.5em; font-size: 1.2em; text-align: center; }

/* 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: #ede9fe; border-color: #6d28d9; }
.score-radio.score-3:has(input:checked) { background: var(--green-100); border-color: var(--green-500); }
.score-radio.score-2:has(input:checked) { background: #fff5d6; border-color: var(--yellow); }
.score-radio.score-1:has(input:checked) { background: #fde8e6; border-color: var(--red); }

/* ---- 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); }

.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: 220px;
    background: white;
    border-right: 1px solid var(--gray-200);
    padding: 1em;
    flex-shrink: 0;
}
.sidebar h2 { margin-top: 0; font-size: 1em; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; }
.sidebar nav { display: flex; flex-direction: column; }
.sidebar nav a { padding: .4em .5em; border-radius: 4px; color: var(--gray-700); text-decoration: none; }
.sidebar nav a:hover { background: var(--green-50); color: var(--green-700); }
.sidebar nav strong { padding: .4em .5em; font-size: .8em; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; }
.sidebar nav hr { margin: .5em 0; }
.admin-main { flex: 1; padding: 1em 1.5em; 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: var(--green-50);
        color: var(--green-700);
        border-radius: 4px;
        font-weight: 600;
        cursor: pointer;
        user-select: none;
    }
    .sidebar nav { display: none; flex-direction: row; flex-wrap: wrap; gap: .25em; margin-top: .5em; }
    .sidebar-toggle-cb:checked ~ nav { display: flex; }
}

/* ---- Stat grid ---- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75em;
    margin: 1em 0;
}
.stat {
    background: white;
    border-radius: var(--radius);
    padding: 1em;
    border: 1px solid var(--gray-200);
    text-align: center;
}
.stat-num { display: block; font-size: 2em; font-weight: bold; color: var(--green-600); line-height: 1; }
.stat span:not(.stat-num) { font-size: .85em; color: var(--gray-500); }

/* ---- Tabs ---- */
.dept-tabs { display: flex; gap: .25em; 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-700);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.dept-tabs .tab.active {
    color: var(--green-700);
    border-bottom-color: var(--green-600);
    font-weight: 600;
}
.dept-single { margin: 1em 0; }
td.dept-assign { white-space: nowrap; }
.cb-inline { display: inline-block; margin-right: .6em; font-weight: 400; font-size: .9em; }
.cb-inline input { margin-right: .25em; vertical-align: middle; }

/* ---- Grant page ---- */
.grant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}
@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 ---- */
.two-col { display: grid; grid-template-columns: 220px 1fr; gap: 1em; }
@media (max-width: 700px) { .two-col { grid-template-columns: 1fr; } }
.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(140px, 1fr)); gap: .5em; 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; }

.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: move; color: var(--gray-500); font-size: 1.2em; padding: 0 .5em; }

.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); } }

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