/* Chalet Bosvallei: zelfde huisstijl als het Boodschappen Dashboard (zwart, goud, Rajdhani) */
:root {
    --gold: #bd9b5f;
    --gold-dark: #a67c3d;
    --gold-10: rgba(189, 155, 95, 0.1);
    --gold-05: rgba(189, 155, 95, 0.05);
    --line: rgba(189, 155, 95, 0.3);
    --line-soft: rgba(189, 155, 95, 0.18);
    --bg: #000;
    --surface: #111;
    --text: #fff;
    --text-2: rgba(255, 255, 255, 0.7);
    --text-3: rgba(255, 255, 255, 0.5);
    --danger: #e74c3c;
    /* datakleuren, gevalideerd op donkere achtergrond */
    --c-present: #b08a3e;
    --c-slept: #4f86d0;
    --c-none: #1c1c1c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    font-weight: 400;
    letter-spacing: 0.5px;
    -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea { font-family: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.app-hidden { display: none !important; }

/* ---------- Login ---------- */
.login-screen {
    position: fixed; inset: 0; background: var(--bg);
    display: flex; align-items: center; justify-content: center; z-index: 2000;
}
.login-container {
    background: var(--surface); border: 1px solid var(--line);
    padding: 50px; max-width: 400px; width: 90%;
}
.login-logo {
    font-size: 1.6em; color: var(--gold); text-transform: uppercase;
    font-weight: 600; letter-spacing: 3px; text-align: center; margin-bottom: 30px;
}
.login-sub {
    text-align: center; color: var(--text-3); text-transform: uppercase;
    letter-spacing: 2px; font-size: 0.8em; margin: 6px 0 30px;
}
.login-container h2 { text-align: center; margin-bottom: 30px; font-weight: 500; }
.form-group { margin-bottom: 20px; }
.form-group label, .field-label {
    display: block; margin-bottom: 8px; color: var(--text-2);
    text-transform: uppercase; font-size: 0.85em; letter-spacing: 1px;
}
.login-container .input-field { width: 100%; min-width: 0; }
.login-error { color: #ff6b6b; margin-bottom: 15px; text-align: center; font-size: 0.9em; min-height: 20px; }

/* ---------- Navigatie ---------- */
.top-nav {
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 0 40px; position: sticky; top: 0; z-index: 100;
    padding-top: env(safe-area-inset-top);
}
.nav-container { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.logo {
    font-size: 1.4em; color: var(--gold); text-transform: uppercase; font-weight: 600;
    letter-spacing: 3px; padding: 20px 0; text-decoration: none; transition: color 0.3s ease;
}
.logo span { color: var(--text); font-weight: 400; }
.logo:hover { color: var(--text); }
.main-menu { display: flex; margin-left: auto; }
.menu-item {
    padding: 25px 35px; font-size: 1em; font-weight: 600; text-transform: uppercase;
    letter-spacing: 2px; color: var(--text-2); text-decoration: none;
    border-bottom: 2px solid transparent; transition: all 0.3s ease;
}
.menu-item:hover { color: var(--text); background: var(--gold-10); }
.menu-item.active { color: var(--gold); border-bottom-color: var(--gold); }
.logout-btn {
    padding: 20px 0 20px 25px; font-size: 1.2em; cursor: pointer;
    background: transparent; color: var(--text-2); border: none; transition: color 0.3s ease;
}
.logout-btn:hover { color: var(--gold); }

.bottom-nav { display: none; }

/* ---------- Layout ---------- */
.container { max-width: 1400px; margin: 0 auto; padding: 40px 20px 60px; }
.page-section { display: none; }
.page-section.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.page-header { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.page-header h1 { font-size: 2.2em; color: var(--gold); text-transform: uppercase; font-weight: 600; letter-spacing: 4px; }
.page-header p { color: var(--text-3); margin-top: 10px; font-size: 1.1em; letter-spacing: 1px; }
.page-header-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }

.panel {
    background: var(--gold-05); border: 1px solid var(--line);
    border-radius: 8px; padding: 20px; margin-bottom: 24px;
}
.panel-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-header h2 { font-size: 1.1em; font-weight: 600; color: var(--gold); text-transform: uppercase; letter-spacing: 2px; }
.panel-sub { color: var(--text-3); font-size: 0.95em; margin: -6px 0 14px; }

h3 { text-transform: uppercase; letter-spacing: 2px; font-weight: 600; color: var(--gold); }

/* ---------- Hero ---------- */
.hero { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.hero-kicker { color: var(--text-3); text-transform: uppercase; letter-spacing: 2px; font-size: 0.85em; }
.hero h1 { font-size: 2.2em; color: var(--gold); text-transform: uppercase; font-weight: 600; letter-spacing: 4px; margin: 6px 0; }
.hero-status { color: var(--text-2); font-size: 1.1em; }
.hero-status strong { color: var(--text); font-weight: 600; }
.pulse {
    display: inline-block; width: 9px; height: 9px; border-radius: 50%;
    background: #3fa36a; margin-right: 8px; vertical-align: 1px;
    box-shadow: 0 0 0 0 rgba(63, 163, 106, 0.6); animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(63, 163, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 163, 106, 0); } }

/* ---------- Kleine cijfers onderaan de homepage ---------- */
.mini-stats { border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 8px; }
.mini-stats-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.mini-stats-title { color: var(--text-3); text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.8em; font-weight: 600; }
.segmented-sm button { padding: 5px 10px; font-size: 0.75em; }
.mini-tiles { display: flex; gap: 10px; }
.mini-tile {
    flex: 1; display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; cursor: pointer;
    border: 1px solid var(--line-soft); background: transparent; color: var(--text-2); text-align: left;
    font-size: 0.95em; transition: border-color 0.2s ease;
}
.mini-tile:hover { border-color: var(--gold); }
.mini-tile b { color: var(--gold); font-size: 1.4em; font-weight: 600; font-variant-numeric: tabular-nums; }
.mini-tile .arrow { margin-left: auto; color: var(--text-3); }

/* ---------- Stat tiles ---------- */
.tile-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stats-grid-2 { grid-template-columns: repeat(2, 1fr); }
.stat-card {
    background: transparent; border: 1px solid rgba(189, 155, 95, 0.4);
    padding: 24px 16px; text-align: center; transition: all 0.3s ease; position: relative;
}
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable::after {
    content: '›'; position: absolute; right: 10px; top: 6px;
    color: var(--text-3); font-size: 1.5em; line-height: 1;
}
.stat-card:hover { border-color: var(--gold); background: var(--gold-05); }
.stat-card .stat-value { font-size: 2.4em; color: var(--gold); font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-card .stat-label { color: var(--text-2); font-size: 0.95em; text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }
.stat-card .stat-sub { color: var(--text-3); font-size: 0.85em; margin-top: 4px; }
.stat-icon { font-size: 1.1em; margin-right: 4px; }

.stats-strip { display: flex; gap: 24px; flex-wrap: wrap; color: var(--text-2); margin-bottom: 20px; font-size: 1.05em; }
.stats-strip strong { color: var(--gold); font-size: 1.3em; font-weight: 600; margin-right: 4px; font-variant-numeric: tabular-nums; }

/* ---------- Buttons ---------- */
.btn {
    padding: 12px 25px; font-size: 1em; font-weight: 600; cursor: pointer;
    transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 2px;
    min-height: 46px; display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; gap: 8px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-brown { background: var(--gold); color: #000; border: 1px solid var(--gold); }
.btn-brown:hover:not(:disabled) { background: transparent; color: var(--gold); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--text); }
.btn-ghost:hover { background: var(--text); color: #000; }
.btn-subtle { background: transparent; color: var(--text-3); border: 1px solid rgba(255, 255, 255, 0.3); }
.btn-subtle:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.6); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-small { padding: 8px 14px; min-height: 36px; font-size: 0.85em; letter-spacing: 1px; }
.btn-full { width: 100%; }
.btn-link {
    background: none; border: none; color: var(--gold); cursor: pointer; font-size: 0.95em;
    text-decoration: none; font-weight: 600; letter-spacing: 1px; padding: 4px 0;
}
.btn-link:hover { color: var(--text); }
.btn-icon {
    background: transparent; border: 1px solid var(--line); color: var(--gold);
    width: 38px; height: 38px; cursor: pointer; font-size: 1.1em; transition: all 0.2s ease;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; flex-shrink: 0;
}
.btn-icon:hover { border-color: var(--gold); background: var(--gold-10); }
.btn-icon.danger:hover { border-color: var(--danger); color: var(--danger); background: transparent; }

/* ---------- Inputs ---------- */
.input-field {
    padding: 13px 16px; font-size: 16px; background: transparent;
    border: 1px solid rgba(189, 155, 95, 0.4); color: var(--text); transition: border-color 0.3s ease;
    border-radius: 0; min-width: 0;
}
.input-field:focus { outline: none; border-color: var(--gold); }
.input-field::placeholder { color: rgba(255, 255, 255, 0.4); }
.input-sm { padding: 8px 12px; font-size: 15px; }
select.input-field { background: #000; }
textarea.input-field { width: 100%; min-height: 80px; resize: vertical; line-height: 1.4; }
input[type="date"].input-field, input[type="time"].input-field { color-scheme: dark; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); }
.check input { accent-color: var(--gold); width: 18px; height: 18px; }
.hint { color: var(--text-3); font-size: 0.95em; margin-top: 10px; min-height: 1em; }
.hint.warn { color: #e0b060; }

/* ---------- Segmented / chips ---------- */
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.segmented button {
    background: transparent; border: none; color: var(--text-2); padding: 8px 16px; cursor: pointer;
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 0.85em; transition: all 0.2s ease;
}
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button.active { background: var(--gold); color: #000; }
.segmented-lg { margin-bottom: 20px; }
.segmented-lg button { padding: 11px 26px; font-size: 0.95em; }

.filter-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    background: transparent; border: 1px solid var(--line); color: var(--text-2);
    padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 0.95em; font-weight: 600;
    letter-spacing: 0.5px; transition: all 0.2s ease; white-space: nowrap;
}
.chip:hover { border-color: var(--gold); color: var(--text); }
.chip.active { background: var(--gold); border-color: var(--gold); color: #000; }
.custom-period { display: flex; align-items: center; gap: 8px; color: var(--text-3); }

/* ---------- Activiteit-formulier ---------- */
.ef-section { margin-bottom: 22px; }
.ef-section-title {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    color: var(--text-2); text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.85em;
    font-weight: 600; margin-bottom: 10px;
}
.ef-step {
    display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center;
    background: var(--gold); color: #000; font-size: 0.85em; margin-right: 8px;
}

.ef-cols { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 0 40px; }
.ef-cols > * { min-width: 0; }
@media (max-width: 900px) { .ef-cols { grid-template-columns: minmax(0, 1fr); } }

/* Kalender */
.cal { max-width: 420px; }
.cal-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cal-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-quick .chip { padding: 5px 12px; font-size: 0.9em; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cal-title { font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--text); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { text-align: center; color: var(--text-3); font-size: 0.8em; text-transform: uppercase; padding: 4px 0; letter-spacing: 1px; }
.cal-day {
    aspect-ratio: 1 / 1; min-height: 40px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.03);
    color: var(--text); cursor: pointer; font-size: 1.05em; font-weight: 500; position: relative;
    display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: background 0.15s ease;
    user-select: none; font-variant-numeric: tabular-nums;
}
.cal-day:hover { border-color: var(--line); }
.cal-day.out { visibility: hidden; }
.cal-day.today { border-color: rgba(255, 255, 255, 0.5); }
.cal-day.sel { background: var(--gold); color: #000; font-weight: 700; }
.cal-day.pending { outline: 2px dashed var(--text); outline-offset: -4px; }
/* Gekleurde puntjes per aanwezig gezinslid */
.cal-dots { position: absolute; bottom: 4px; left: 2px; right: 2px; display: flex; flex-wrap: wrap; justify-content: center; gap: 1px 2px; pointer-events: none; }
.cal-dots i { display: block; width: 5px; height: 5px; border-radius: 50%; }
.cal-dots i.guest, .cal-legend i.guest { background: #777; }
.cal-day.sel .cal-dots i { box-shadow: 0 0 0 1px #000; }
.cal-day > span:first-child { margin-top: -6px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; color: var(--text-3); font-size: 0.85em; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* Formulier: één rij per dag */
.ef-legend { color: var(--text-3); font-size: 0.85em; margin: -4px 0 8px; }
.day-rows { display: flex; flex-direction: column; gap: 6px; }
.day-row { border: 1px solid var(--line-soft); border-radius: 6px; background: rgba(0, 0, 0, 0.3); }
.day-row.open { border-color: var(--line); }
.dr-head { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; }
.dr-day { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dr-sub { color: var(--text-3); font-size: 0.88em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-btns { display: flex; gap: 4px; flex-shrink: 0; }
.ibtn {
    min-width: 40px; height: 40px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-soft); background: transparent;
    color: var(--text-2); font-size: 1.1em; cursor: pointer; transition: all 0.15s ease; font-family: inherit;
}
.ibtn:hover { border-color: var(--gold); }
.ibtn.on { border-color: var(--gold); background: var(--gold-10); color: var(--gold); }
.ibtn.on-sleep { background: var(--c-slept); border-color: var(--c-slept); }
.ibtn.empty, .ibtn[data-sleepday]:not(.on-sleep) { filter: grayscale(1); opacity: 0.5; }
.ibtn[data-dopen] { color: var(--gold); font-weight: 600; }
.weather-pick { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 12px 12px; align-items: center; }
.weather-pick .wbtn {
    aspect-ratio: auto; width: auto; display: inline-flex; flex-direction: column; align-items: center; gap: 1px;
    padding: 5px 8px; min-width: 58px; font-size: 1.2em; opacity: 0.6; filter: grayscale(0.6);
}
.weather-pick .wbtn small { font-size: 0.55em; color: var(--text-2); }
.weather-pick .wbtn.on { opacity: 1; filter: none; }
.dr-detail { padding: 4px 12px 12px; border-top: 1px solid var(--line-soft); margin-top: 2px; padding-top: 10px; }

/* Dagboek: grote kalender */
#view-kalender:not(.hidden) { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 0 24px; align-items: start; }
@media (max-width: 900px) { #view-kalender:not(.hidden) { grid-template-columns: minmax(0, 1fr); } }
.big-cal-sum { text-align: center; color: var(--text-2); margin: 2px 0 12px; }
.big-cal-sum strong { color: var(--gold); }
.big-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bc-day {
    position: relative; aspect-ratio: 1 / 1; min-height: 42px; border: 1px solid transparent; border-radius: 6px; background: rgba(255, 255, 255, 0.03);
    color: var(--text-2); cursor: pointer; padding: 5px 5px 16px; text-align: left; font-family: inherit; transition: border-color 0.15s ease;
}
.bc-day.out { visibility: hidden; }
.bc-day:hover { border-color: var(--line); }
.bc-day.has { background: rgba(189, 155, 95, 0.12); color: var(--text); }
.bc-day.today { border-color: rgba(255, 255, 255, 0.5); }
.bc-day.picked { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.bc-top { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.bc-num { font-weight: 600; font-size: 1.05em; font-variant-numeric: tabular-nums; }
.bc-moon, .bc-w { font-size: 0.8em; line-height: 1; }
.bc-day .cal-dots { bottom: 6px; justify-content: flex-start; left: 5px; }
.bc-day .cal-dots i { width: 7px; height: 7px; }

/* Dagboek: inklapbare rijen */
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.list-toolbar .stats-strip { margin-bottom: 0; }
.entry-list .entry-row { border: 1px solid var(--line-soft); border-radius: 6px; background: rgba(0, 0, 0, 0.35); }
.entry-row.open { border-color: var(--line); }
.er-head {
    width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: transparent; border: none;
    color: var(--text); cursor: pointer; text-align: left; font-family: inherit; font-size: 1em;
}
.er-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.er-date { font-weight: 600; }
.er-sum { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.95em; }
.er-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.er-dots { position: static; justify-content: flex-end; }
.er-dots i { width: 8px; height: 8px; }
.er-meta { color: var(--text-3); font-size: 0.9em; white-space: nowrap; }
.er-chev { color: var(--text-3); font-size: 1.4em; transition: transform 0.2s ease; flex-shrink: 0; }
.entry-row.open .er-chev { transform: rotate(90deg); color: var(--gold); }
.er-body { padding: 0 10px 10px; }
.er-body .entry { border: none; background: transparent; padding: 4px; }
@media (max-width: 600px) {
    .bc-day { padding: 3px 3px 14px; }
    .bc-w { display: none; }
    .bc-num { font-size: 0.95em; }
    .bc-day .cal-dots { left: 3px; bottom: 4px; gap: 1px; }
    .bc-day .cal-dots i { width: 5px; height: 5px; }
    .big-cal-grid { gap: 3px; }
}
.cal-summary { margin-top: 10px; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 28px; }
.cal-summary strong { color: var(--gold); }
.cal-hint { color: var(--text-3); font-size: 0.9em; margin-top: 4px; }

/* Personen kiezen */
.person-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip {
    display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--text);
    border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px 9px 12px; cursor: pointer;
    font-size: 1.05em; font-weight: 600; transition: all 0.15s ease; min-height: 42px;
}
.pchip .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pchip:hover { border-color: var(--gold); }
.pchip.on { background: var(--gold); border-color: var(--gold); color: #000; }
.pchip.on .dot { box-shadow: 0 0 0 2px #000; }
.pchip-more { border-style: dashed; color: var(--text-2); }
.others-box { margin-top: 10px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; }
.others-box .empty { color: var(--text-3); font-size: 0.95em; }

.name-add { display: flex; gap: 8px; margin-top: 12px; position: relative; max-width: 420px; }
.name-add .input-field { flex: 1; }
.name-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.name-suggest .label { color: var(--text-3); font-size: 0.9em; }
.dup-box {
    margin-top: 10px; padding: 12px; border: 1px solid #e0b060; border-radius: 6px; color: var(--text);
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; max-width: 520px;
}
.dup-box p { width: 100%; }

.selected-people { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.sp-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 8px 10px 8px 14px; border: 1px solid var(--line-soft); border-radius: 6px; background: rgba(0, 0, 0, 0.3);
}
.sp-name { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.05em; }
.sp-name .dot { width: 10px; height: 10px; border-radius: 50%; }
.sp-meta { color: var(--text-3); font-size: 0.85em; font-weight: 400; }
.sp-actions { display: flex; align-items: center; gap: 8px; }
.sleep-toggle {
    display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: transparent;
    color: var(--text-2); padding: 7px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 0.95em;
    min-height: 38px; transition: all 0.15s ease; white-space: nowrap;
}
.sleep-toggle.on { background: var(--c-slept); border-color: var(--c-slept); color: #fff; }
.sp-remove { background: none; border: none; color: var(--text-3); font-size: 1.2em; cursor: pointer; padding: 4px 6px; }
.sp-remove:hover { color: var(--danger); }
.sp-bulk { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* Slapen per dag */
.sleep-list { display: flex; flex-direction: column; gap: 6px; }
.sleep-row {
    display: flex; flex-direction: column; gap: 8px;
    padding: 8px 8px 8px 14px; border: 1px solid var(--line-soft); border-radius: 6px; background: rgba(0, 0, 0, 0.3);
}
.sleep-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.weather-row { display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; max-width: 380px; }
.wbtn {
    aspect-ratio: 1 / 1; min-height: 30px; border: 1px solid var(--line-soft); border-radius: 6px; background: transparent;
    font-size: 1.05em; cursor: pointer; opacity: 0.45; filter: grayscale(0.7); transition: all 0.15s ease; padding: 0;
}
.wbtn:hover { opacity: 0.8; }
.wbtn.on { opacity: 1; filter: none; border-color: var(--gold); background: var(--gold-10); }

.act-box { margin-top: 12px; }
.act-day { margin-bottom: 10px; }
.act-day-label { color: var(--text-2); font-weight: 600; font-size: 0.95em; margin-bottom: 4px; }
.act-item { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.act-item .input-field { flex: 1; }
.act-add {
    background: transparent; border: 1px dashed var(--line); color: var(--gold); border-radius: 6px;
    padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 0.95em;
}
.act-add:hover { border-color: var(--gold); background: var(--gold-10); }
[data-open] { cursor: pointer; }
.entry-main[data-open]:hover .entry-when { color: var(--gold); }
.entry-days { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.entry-day-label { color: var(--text-3); font-size: 0.9em; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.entry-guests { color: var(--text-2); margin-top: 2px; }
.entry-acts { margin: 2px 0 0 18px; color: var(--text-2); line-height: 1.5; }

/* Per dag: activiteiten en gasten in het formulier */
.day-block { border: 1px solid var(--line-soft); border-radius: 6px; background: rgba(0, 0, 0, 0.3); padding: 10px 12px; margin-bottom: 8px; }
.day-block-label { font-weight: 600; margin-bottom: 8px; }
.day-block-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; }
.mini-label { color: var(--text-3); font-size: 0.75em; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; margin-bottom: 6px; }
.guest-col .guest-chips { margin-bottom: 8px; }
.guest-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.guest-col .name-add { margin-top: 0; }
@media (max-width: 600px) { .day-block-cols { grid-template-columns: minmax(0, 1fr); gap: 10px; } }
.entry-acts li::marker { color: var(--gold); }
.ef-extras { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.guest-box { margin-top: 12px; padding: 12px; border: 1px dashed var(--line); border-radius: 8px; }
.guest-box .name-add { margin-top: 8px; }
.guest-chips .pchip { padding: 7px 12px 7px 10px; min-height: 36px; font-size: 1em; }
.ef-banner {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 12px 14px; margin-bottom: 18px; border: 1px solid var(--gold); border-radius: 6px; background: var(--gold-10);
}
.entry-weather { margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; font-size: 1.05em; }
.sleep-day { font-weight: 600; display: flex; flex-direction: column; line-height: 1.2; }
.sleep-day .sp-meta { font-weight: 400; }

/* Matrix per dag */
.matrix-toggle { margin-top: 10px; }
.matrix-wrap { overflow-x: auto; margin-top: 10px; border: 1px solid var(--line-soft); border-radius: 6px; }
.matrix { border-collapse: collapse; font-size: 0.95em; }
.matrix th, .matrix td { padding: 6px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.matrix th { color: var(--text-3); font-weight: 600; font-size: 0.85em; text-transform: uppercase; white-space: nowrap; }
.matrix th.pname, .matrix td.pname {
    text-align: left; position: sticky; left: 0; background: #0b0b0b; white-space: nowrap; padding-left: 10px; color: var(--text);
    text-transform: none; font-size: 1em;
}
.mcell {
    width: 38px; height: 38px; border-radius: 4px; border: 1px solid var(--line-soft); background: transparent;
    cursor: pointer; font-size: 1em; color: var(--text-3);
}
.mcell.v1 { background: var(--c-present); border-color: var(--c-present); color: #000; }
.mcell.v2 { background: var(--c-slept); border-color: var(--c-slept); color: #fff; }
.matrix-legend { color: var(--text-3); font-size: 0.85em; padding: 8px 10px; }

.more-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.more-fields .full { grid-column: 1 / -1; }
.more-fields .input-field { width: 100%; }

.ef-footer { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 6px; }
.ef-footer .btn-brown { flex: 1 1 220px; }
.ef-summary { color: var(--text-3); font-size: 0.95em; width: 100%; }

/* ---------- Tijdlijn ---------- */
.month-group { margin-bottom: 28px; }
.month-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; margin-bottom: 12px;
}
.month-head h3 { font-size: 1.1em; }
.month-head span { color: var(--text-3); font-size: 0.95em; }
.entry-list { display: flex; flex-direction: column; gap: 10px; }
.entry {
    display: flex; gap: 16px; padding: 14px; border: 1px solid var(--line-soft); background: rgba(0, 0, 0, 0.35);
    border-radius: 6px; transition: border-color 0.2s ease;
}
.entry:hover { border-color: var(--line); }
.entry-date {
    flex-shrink: 0; width: 64px; text-align: center; border-right: 1px solid var(--line-soft); padding-right: 14px;
    display: flex; flex-direction: column; justify-content: center;
}
.entry-date .d { font-size: 1.7em; color: var(--gold); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.entry-date .d small { font-size: 0.55em; }
.entry-date .m { color: var(--text-3); text-transform: uppercase; font-size: 0.8em; letter-spacing: 1px; margin-top: 4px; }
.entry-main { flex: 1; min-width: 0; }
.entry-when { color: var(--text); font-weight: 600; font-size: 1.05em; }
.entry-when .meta { color: var(--text-3); font-weight: 400; margin-left: 6px; }
.entry-title { color: var(--gold); font-weight: 600; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 1px; font-size: 0.95em; }
.entry-people { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
    display: inline-flex; align-items: center; gap: 6px; font-size: 0.9em; padding: 3px 10px;
    border: 1px solid var(--line-soft); border-radius: 999px; color: var(--text-2);
}
.tag .dot { width: 8px; height: 8px; border-radius: 50%; }
.tag .moon { color: #8fb3e6; }
.entry-note { color: var(--text-2); margin-top: 8px; white-space: pre-wrap; line-height: 1.4; overflow-wrap: anywhere; }
.entry-times { color: var(--text-3); margin-top: 6px; font-size: 0.95em; }
.entry-actions { display: flex; flex-direction: column; gap: 6px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-3); }
.empty-state .big { font-size: 2.4em; margin-bottom: 10px; }

/* ---------- Inzichten ---------- */
.legend { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-2); font-size: 0.9em; margin-bottom: 12px; }
.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }
.lg-present { background: var(--c-present); }
.lg-slept { background: var(--c-slept); }
.lg-none { background: var(--c-none); border: 1px solid #2a2a2a; }
.year-switch { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1em; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px 16px; }
.ym-title { color: var(--text-2); text-transform: uppercase; letter-spacing: 1px; font-size: 0.85em; margin-bottom: 6px; display: flex; justify-content: space-between; }
.ym-title span { color: var(--text-3); }
.ym-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ym-cell { aspect-ratio: 1 / 1; border-radius: 2px; background: var(--c-none); cursor: default; }
.ym-cell.empty { background: transparent; }
.ym-cell.p { background: var(--c-present); cursor: pointer; }
.ym-cell.s { background: var(--c-slept); cursor: pointer; }
.ym-cell.today { outline: 1px solid #fff; outline-offset: -1px; }
.ym-cell.picked { outline: 2px solid #fff; outline-offset: 0; }
.day-detail { margin-top: 16px; color: var(--text-2); min-height: 1.4em; }
.day-detail strong { color: var(--gold); }

.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
.chart-box { position: relative; height: 280px; }
.chart-box-sm { height: 220px; }

.data-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { padding: 10px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); text-align: right; }
.data-table th { color: var(--text-3); font-weight: 600; text-transform: uppercase; font-size: 0.8em; letter-spacing: 1px; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table td:first-child { display: flex; align-items: center; gap: 8px; }
.data-table .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------- Uitsplitsing ---------- */
.bd-row { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.bd-name { display: flex; align-items: center; gap: 8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-name .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.bd-bars { display: flex; flex-direction: column; gap: 3px; }
.bd-bar { height: 8px; border-radius: 0 4px 4px 0; }
.bd-bar.p { background: var(--c-present); }
.bd-bar.s { background: var(--c-slept); }
.bd-val { text-align: right; color: var(--text-2); font-size: 0.95em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bd-val b { color: var(--text); }
.bd-total { color: var(--text-2); margin-bottom: 12px; }
.bd-total strong { color: var(--gold); font-size: 1.2em; }
.bd-row, .data-table tr[data-person] { cursor: pointer; }
.bd-row:hover .bd-name, .data-table tr[data-person]:hover td:first-child { color: var(--gold); }
.mini-tile.static { cursor: default; }
.mini-tile.static:hover { border-color: var(--line-soft); }
.dot-lg { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; }
.pd-year { color: var(--gold); font-weight: 600; letter-spacing: 2px; margin: 14px 0 6px; }
.pd-run { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }

/* ---------- Instellingen ---------- */
.person-list { display: flex; flex-direction: column; gap: 8px; }
.person-row {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-soft);
    background: rgba(0, 0, 0, 0.35); border-radius: 6px; flex-wrap: wrap;
}
.person-row input[type="color"] {
    width: 34px; height: 34px; border: 1px solid var(--line); background: transparent; padding: 2px; cursor: pointer; border-radius: 4px;
}
.person-row .pr-name { flex: 1 1 120px; min-width: 100px; }
.person-row .pr-name input { width: 100%; }
.person-row .pr-meta { color: var(--text-3); font-size: 0.9em; min-width: 70px; }
.person-row .pr-actions { display: flex; gap: 6px; margin-left: auto; }
.add-person-form, .password-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.add-person-form .input-field, .password-form .input-field { flex: 1 1 200px; }
.account-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Modals ---------- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.9); z-index: 1000; display: none;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal-content {
    background: var(--surface); border: 1px solid var(--line); max-width: 600px; width: 100%;
    max-height: 90vh; overflow-y: auto; overscroll-behavior: contain;
}
.modal-lg { max-width: 1000px; }
.modal-sm { max-width: 420px; }
.modal-header {
    padding: 18px 22px; border-bottom: 1px solid var(--line-soft); display: flex; justify-content: space-between;
    align-items: center; gap: 15px; position: sticky; top: 0; background: var(--surface); z-index: 2;
}
.modal-header h3 { margin: 0; }
.modal-close {
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.3); color: #fff; width: 36px; height: 36px;
    cursor: pointer; font-size: 1.1em; transition: all 0.3s ease; flex-shrink: 0;
}
.modal-close:hover { border-color: var(--danger); color: var(--danger); }
.modal-body { padding: 22px; }
.confirm-text { color: var(--text-2); margin-bottom: 20px; line-height: 1.5; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast {
    position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px); opacity: 0;
    background: var(--gold); color: #000; padding: 12px 22px; font-weight: 600; letter-spacing: 1px;
    z-index: 3000; transition: all 0.3s ease; pointer-events: none; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .chart-grid { grid-template-columns: 1fr; }
    .menu-item { padding: 25px 18px; }
}

@media (max-width: 768px) {
    .top-nav { padding: 0 16px; padding-top: env(safe-area-inset-top); }
    .main-menu { display: none; }
    .logo { padding: 16px 0; font-size: 1.2em; }
    .container { padding: 20px 16px calc(100px + env(safe-area-inset-bottom)); }
    .page-header h1, .hero h1 { font-size: 1.7em; letter-spacing: 3px; }
    .page-header { margin-bottom: 20px; }
    .page-header p { font-size: 1em; }
    .page-header-row .btn { display: none; }
    .panel { padding: 16px; border-radius: 6px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-card { padding: 18px 10px; }
    .stat-card .stat-value { font-size: 2em; }
    .stat-card .stat-label { font-size: 0.85em; }
    .cal { max-width: none; }
    .name-add { max-width: none; }
    .segmented-lg { display: flex; }
    .segmented-lg button { flex: 1; }
    .filter-row { gap: 10px; }
    .chip-group { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 2px; scrollbar-width: none; }
    .chip-group::-webkit-scrollbar { display: none; }
    #personFilter { width: 100%; }
    .entry { gap: 12px; padding: 12px; }
    .entry-date { width: 52px; padding-right: 10px; }
    .entry-date .d { font-size: 1.4em; }
    .entry { flex-wrap: wrap; }
    .entry-actions { flex-direction: row; width: 100%; justify-content: flex-end; }
    .more-fields { grid-template-columns: 1fr 1fr; }
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal-content { max-height: 94vh; border-left: none; border-right: none; border-bottom: none; border-radius: 12px 12px 0 0; }
    .modal-body { padding: 18px 16px calc(24px + env(safe-area-inset-bottom)); }
    .bd-row { grid-template-columns: 90px 1fr auto; }
    .year-grid { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
    .ym-grid { gap: 1.5px; }
    .chart-box { height: 240px; }
    .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
    .person-row .pr-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
    .person-row .btn-icon { width: 36px; height: 36px; }

    .bottom-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 500; background: rgba(0, 0, 0, 0.96);
        border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
        backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    }
    .bottom-nav a {
        flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
        padding: 8px 0 6px; text-decoration: none; color: var(--text-3); font-size: 0.7em; text-transform: uppercase;
        letter-spacing: 0.3px; font-weight: 600; min-height: 58px; min-width: 0;
    }
    .bottom-nav a .bn-icon { font-size: 1.7em; line-height: 1; }
    .bottom-nav a.active { color: var(--gold); }
    .bottom-nav .bn-add .bn-icon {
        width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: #000; display: flex;
        align-items: center; justify-content: center; font-size: 2em; font-weight: 400; margin-top: -18px;
        box-shadow: 0 0 0 4px #000;
    }
}

@media (max-width: 400px) {
    .pchip { padding: 8px 13px 8px 10px; font-size: 1em; }
    .cal-day { min-height: 38px; }
    .sp-row { flex-wrap: wrap; }
    .person-row .pr-meta { min-width: 0; }
}
