/* Stipt v2 — Aventra crew app. Full re-layout: a persistent sidebar shell
   on desktop/tablet instead of a top bar + horizontal tabs, a bottom tab
   bar on phones. Brand colours: plum #7A3A5C + amber #F5A623 on white/
   near-white; the wordmark colour switches to amber on dark. Quicksand
   is now the ONLY typeface on the site — body text, headings, data,
   everything — at a range of weights to keep the same visual hierarchy
   Inter/IBM Plex Mono used to carry. No gradients, no drop-shadow "pop",
   no bouncy hover states: quiet surfaces, thin hairline borders,
   restrained colour. */

:root {
  --paper: #F7F2F4;
  --surface: #FFFFFF;
  --surface-2: #F1E4EB;
  --ink: #251621;
  --ink-soft: #6E5A67;
  --line: #E3D6DE;
  --plum: #7A3A5C;
  --amber: #F5A623;
  --brand: var(--plum); /* wordmark + emphasis: plum in light, amber in dark */
  --shadow: rgba(50, 20, 38, 0.10);
  --ok: #6F7F3A;
  --ok-bg: rgba(156, 168, 58, 0.14);
  --warn: #B23A4C;
  --warn-bg: rgba(196, 59, 75, 0.12);
  --sidebar-w: 236px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #170F15; --surface: #211720; --surface-2: #291D28;
    --ink: #F4EBF1; --ink-soft: #C3AFBC; --line: #3B2A38;
    --brand: var(--amber);
    --shadow: rgba(0, 0, 0, 0.45);
    --ok: #B7C46A; --ok-bg: rgba(156, 168, 58, 0.18);
    --warn: #E0899A; --warn-bg: rgba(196, 59, 75, 0.2);
  }
}
:root[data-theme="dark"] {
  --paper: #170F15; --surface: #211720; --surface-2: #291D28;
  --ink: #F4EBF1; --ink-soft: #C3AFBC; --line: #3B2A38;
  --brand: var(--amber);
  --shadow: rgba(0, 0, 0, 0.45);
  --ok: #B7C46A; --ok-bg: rgba(156, 168, 58, 0.18);
  --warn: #E0899A; --warn-bg: rgba(196, 59, 75, 0.2);
}
:root[data-theme="light"] { --brand: var(--plum); }

* { box-sizing: border-box; }
body {
  background: var(--paper); color: var(--ink); font-family: 'Quicksand', 'Segoe UI', sans-serif; margin: 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.side-pad { padding-inline: max(20px, env(safe-area-inset-left,0px)); }
a { color: inherit; }

:root { --card-radius: 12px; --card-shadow: 0 1px 2px rgba(20,10,20,0.04); }

/* ---------- app shell (sidebar + main) ----------
   The whole point of this pass: a persistent left sidebar carries
   navigation, brand and account on desktop/tablet, instead of a top bar
   with a horizontal tab row. Below --sidebar-breakpoint it disappears in
   favour of the bottom tab bar (mobile-tabbar, further down this file). */
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar {
  flex: none; width: var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--line);
  padding: max(22px, env(safe-area-inset-top, 0px)) 18px 18px;
  display: flex; flex-direction: column; gap: 22px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; color: var(--brand); }
.brand-mark svg { display: block; }
.brand-word { font-family: 'Quicksand', sans-serif; font-weight: 500; font-size: 1.3rem; color: var(--brand); letter-spacing: -0.005em; }
.brand-tag { display: block; font-family: 'Quicksand', sans-serif; font-weight: 500; font-size: 0.72rem; color: var(--ink-soft); margin: -14px 0 0 33px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
  display: flex; align-items: center; gap: 11px;
  font-family: 'Quicksand', sans-serif; font-size: 0.86rem; font-weight: 500;
  text-decoration: none; color: var(--ink-soft); padding: 10px 12px; border-radius: 10px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link-icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
.nav-link-icon svg { width: 100%; height: 100%; display: block; }
.nav-link:hover:not(.active) { color: var(--ink); background: var(--surface-2); }
.nav-link.active { color: var(--brand); background: var(--surface-2); font-weight: 600; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.conn-status { display: flex; align-items: center; gap: 6px; font-family: 'Quicksand', sans-serif; font-size: 0.62rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); }
.conn-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }
.conn-status.offline .conn-dot { background: var(--warn); }

.controls { display: flex; align-items: center; gap: 10px; }
.theme-btn {
  font-size: 1rem; line-height: 1; width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: border-color 0.15s ease;
}
.theme-btn:hover { border-color: var(--brand); }
.theme-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.lang-switch { position: relative; display: flex; gap: 2px; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.lang-indicator {
  position: absolute; top: 3px; left: 0; bottom: 3px; width: 30px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.22s ease, width 0.22s ease; z-index: 0;
}
.lang-btn {
  position: relative; z-index: 1;
  font-family: 'Quicksand', sans-serif; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.03em;
  padding: 6px 11px; border-radius: 999px; border: none; background: transparent; color: var(--ink-soft);
  cursor: pointer; transition: color 0.15s ease;
}
.lang-btn.active { color: var(--brand); }
.lang-btn:hover:not(.active) { color: var(--ink); }
.lang-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }

/* ---------- login page top bar (login.html only — it has no sidebar,
   there's nothing to navigate to before you're signed in) ---------- */
.appbar {
  background: var(--surface);
  border-bottom: 2px solid var(--amber);
  padding-top: env(safe-area-inset-top, 0px);
}
.appbar-inner {
  max-width: 1040px; margin: 0 auto; padding-block: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---------- main column ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  padding-block: max(14px, env(safe-area-inset-top, 0px)) 4px;
}
.wrap { max-width: 900px; margin-inline: auto; padding-block: 22px 64px; display: flex; flex-direction: column; gap: 36px; }

/* ---------- hero (home) ---------- */
.hero { display: flex; flex-direction: column; gap: 10px; }
.hero h1 { font-family: 'Quicksand', sans-serif; font-weight: 500; font-size: 2.15rem; margin: 0; letter-spacing: -0.01em; color: var(--ink); }
.hero p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; max-width: 620px; line-height: 1.55; }
.route-divider { display: none; }

/* ---------- last-updated / manual refresh (home) ---------- */
.refresh-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.refresh-note { font-family: 'Quicksand', sans-serif; font-size: 0.66rem; letter-spacing: 0.04em; color: var(--ink-soft); }
.refresh-btn {
  font-family: 'Quicksand', sans-serif; font-size: 0.76rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 6px 12px; border-radius: 999px;
  cursor: pointer; transition: border-color 0.15s ease;
}
.refresh-btn:hover { border-color: var(--brand); }
.refresh-btn svg { width: 13px; height: 13px; transition: transform 0.5s ease; }
.refresh-btn.spinning svg { animation: refresh-spin 0.7s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }

/* ---------- stat row ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2,1fr); } }
.stat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 16px 18px; }
.stat-num { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 1.85rem; font-variant-numeric: tabular-nums; color: var(--ink); }
.stat-label { font-family: 'Quicksand', sans-serif; font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.stat-tile.ok .stat-num { color: var(--ok); }
.stat-tile.warn .stat-num { color: var(--warn); }
.stat-tile.training .stat-num { color: var(--brand); }

/* ---------- section ---------- */
section { display: flex; flex-direction: column; gap: 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
h2 { font-family: 'Quicksand', sans-serif; font-weight: 500; font-size: 1.24rem; margin: 0; letter-spacing: -0.005em; color: var(--ink); }
.section-note { font-family: 'Quicksand', sans-serif; font-size: 0.68rem; color: var(--ink-soft); letter-spacing: 0.03em; }
.empty-note { font-size: 0.84rem; color: var(--ink-soft); }

/* ---------- live/cache badge ---------- */
.src-badge {
  font-family: 'Quicksand', sans-serif; font-size: 0.58rem; letter-spacing: 0.07em; text-transform: uppercase; font-weight: 600;
  padding: 3px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); margin-left: 8px;
}
.src-badge.cache { background: var(--surface-2); color: var(--ink-soft); }
.src-badge:not(.cache) { position: relative; padding-left: 15px; }
.src-badge:not(.cache)::before {
  content: ""; position: absolute; left: 6px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px;
  border-radius: 50%; background: var(--ok); animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(111,127,58,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(111,127,58,0); }
}

/* ---------- live telemetry ---------- */
.live-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.live-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.live-card.workshop { border-color: var(--warn); }
.live-top { display: flex; justify-content: space-between; align-items: baseline; }
.live-id { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 0.92rem; }
.live-badge { font-family: 'Quicksand', sans-serif; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); }
.live-badge.warn { background: var(--warn-bg); color: var(--warn); }
.live-model { font-size: 0.8rem; color: var(--ink-soft); }
.live-row { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--ink-soft); }
.live-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 6px; }
.live-fuel-bar { height: 5px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.live-fuel-fill { height: 100%; background: var(--amber); }

/* ---------- staff cards ---------- */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.staff-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.staff-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.staff-name { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 0.96rem; }
.staff-title { font-family: 'Quicksand', sans-serif; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--ink-soft); }
.staff-row { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--ink-soft); }
.staff-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.staff-row-warn b { color: var(--warn); }
.staff-rank { font-family: 'Quicksand', sans-serif; font-size: 0.72rem; font-weight: 700; color: var(--brand); margin-right: 7px; }

/* ---------- folders / concessions ---------- */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.folder-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.folder-name { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 0.96rem; }
.folder-row { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--ink-soft); }
.folder-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- "what's new" banner ---------- */
.whatsnew-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--amber); border-radius: var(--card-radius); padding: 14px 40px 14px 18px; }
.whatsnew-title { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.whatsnew-list { margin: 0; padding-left: 16px; font-size: 0.82rem; color: var(--ink-soft); display: flex; flex-direction: column; gap: 3px; }
.whatsnew-list li::marker { color: var(--amber); }
.whatsnew-close { position: absolute; top: 8px; right: 10px; width: 24px; height: 24px; border-radius: 999px; border: none; background: transparent; color: var(--ink-soft); font-size: 1rem; line-height: 1; cursor: pointer; }
.whatsnew-close:hover { background: var(--surface-2); }

/* ---------- announcement bar — public mededelingen only, never a
   mailed-to-Postvak personal item (see renderAnnouncements()'s filter) ---------- */
#announcementBar:not(:empty) { padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.announcement-bar {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 1040px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: var(--card-radius); padding: 13px 16px; box-shadow: var(--card-shadow);
}
.announcement-icon { flex: none; font-size: 1rem; line-height: 1; }
.announcement-tag { font-family: 'Quicksand', sans-serif; font-size: 0.62rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand); flex: none; }
.announcement-text { font-size: 0.85rem; color: var(--ink); flex: 1 1 200px; }
.announcement-close {
  margin-left: auto; width: 24px; height: 24px; border-radius: 999px; border: none; background: transparent;
  color: var(--ink-soft); font-size: 1rem; line-height: 1; cursor: pointer; flex: none; transition: background 0.15s ease;
}
.announcement-close:hover { background: var(--surface-2); }

/* ---------- account badge (appbar) ---------- */
#authBadge { display: flex; align-items: center; }
.settings-gear {
  font-size: 1rem; line-height: 1; width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none;
  display: flex; align-items: center; justify-content: center; flex: none; transition: border-color 0.15s ease;
}
.settings-gear:hover, .settings-gear:focus-visible { border-color: var(--brand); }

/* ---------- login / register ---------- */
.auth-wrap { align-items: center; }
.auth-card {
  max-width: 440px; margin: 24px auto 0; width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--card-radius); padding: 26px 24px; box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 16px;
}
.auth-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.auth-tabs[hidden] { display: none; }
.auth-tab {
  flex: 1; font-family: 'Quicksand', sans-serif; font-size: 0.82rem; font-weight: 600;
  border: none; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-soft);
  padding: 9px 6px; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease;
}
.auth-tab.active { color: var(--ink); border-bottom-color: var(--amber); }
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-form[hidden] { display: none; }
.auth-label { display: flex; flex-direction: column; gap: 6px; font-size: 0.8rem; font-weight: 500; color: var(--ink); }
.auth-label input, .auth-label textarea {
  font-family: 'Quicksand', sans-serif; font-size: 0.88rem; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 12px; background: var(--paper); color: var(--ink); transition: border-color 0.15s ease;
}
.auth-label textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.auth-label input:focus, .auth-label textarea:focus { outline: none; border-color: var(--brand); }
.auth-hint { font-size: 0.78rem; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.auth-error { color: var(--warn); font-size: 0.8rem; margin: 0; }
.auth-submit {
  font-family: 'Quicksand', sans-serif; font-size: 0.88rem; font-weight: 600; border: none; border-radius: 9px;
  background: var(--plum); color: #fff; padding: 11px 18px; cursor: pointer; transition: opacity 0.15s ease;
}
.auth-submit:hover { opacity: 0.9; }
.auth-submit:active { opacity: 0.8; }
.auth-submit:disabled { opacity: 0.5; cursor: default; }
.auth-link-btn {
  align-self: center; background: none; border: none; color: var(--brand); font-family: 'Quicksand', sans-serif;
  font-size: 0.8rem; font-weight: 500; cursor: pointer; padding: 4px; text-decoration: underline;
}
.auth-link-btn:hover { opacity: 0.8; }

/* ---------- register: example BCS screenshot ---------- */
.auth-screenshot-example { margin: 0; display: flex; flex-direction: column; gap: 9px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px; }
.auth-screenshot-example img { display: block; width: 100%; height: auto; border-radius: 7px; border: 1px solid var(--line); }
.auth-screenshot-example figcaption { font-size: 0.76rem; line-height: 1.5; color: var(--ink-soft); margin: 0 2px; }

/* ---------- inbox — collapsed rows (title only) that expand on click into
   the full text plus archive/delete actions. The toggle above the list
   reuses .settings-choice-row/.settings-choice-btn (same look as the
   language/theme pickers on account.html) rather than a bespoke tab
   style. ---------- */
.inbox-view-toggle { margin-bottom: 4px; }
.inbox-list { display: flex; flex-direction: column; gap: 10px; }
.inbox-item { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--brand); border-radius: var(--card-radius); overflow: hidden; }
.inbox-item.personal { border-left-color: var(--amber); }
.inbox-item-head {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; margin: 0;
  background: none; border: none; text-align: left; cursor: pointer; font: inherit; color: inherit;
}
.inbox-item-head:hover { background: var(--surface-2); }
.inbox-item-headline { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.inbox-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.inbox-tag { font-family: 'Quicksand', sans-serif; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.05em; color: var(--brand); text-transform: uppercase; }
.inbox-item.personal .inbox-tag { color: var(--amber); }
.inbox-date { font-family: 'Quicksand', sans-serif; font-size: 0.66rem; color: var(--ink-soft); flex: none; }
.inbox-title { font-size: 0.88rem; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-chevron { flex: none; color: var(--ink-soft); font-size: 0.9rem; transition: transform 0.15s ease; }
.inbox-item.expanded .inbox-chevron { transform: rotate(180deg); }
.inbox-body { padding: 0 16px 14px; }
.inbox-text { margin: 0 0 12px; font-size: 0.88rem; line-height: 1.55; white-space: pre-wrap; }
.inbox-actions { display: flex; gap: 8px; }
.inbox-action-btn {
  font-family: 'Quicksand', sans-serif; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease;
}
.inbox-action-btn:hover { border-color: var(--brand); }
.inbox-action-btn.danger { color: var(--warn); border-color: var(--warn-bg); background: var(--warn-bg); }
.inbox-action-btn.danger:hover { background: var(--warn); color: #fff; }

/* ---------- news page (nieuws.html) — the full mededelingen archive,
   separate from the transient dismissable banner and from Postvak's
   personal mail. Same card language as .inbox-item, always expanded
   (there's no personal content here to hide behind a click). ---------- */
.news-list { display: flex; flex-direction: column; gap: 10px; }
.news-item { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--brand); border-radius: var(--card-radius); padding: 14px 16px; }
.news-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.news-date { font-family: 'Quicksand', sans-serif; font-size: 0.66rem; color: var(--ink-soft); flex: none; }
.news-title { margin: 0 0 4px; font-size: 0.92rem; font-weight: 700; color: var(--ink); }
.news-text { margin: 0; font-size: 0.88rem; line-height: 1.55; white-space: pre-wrap; }
.news-severity-tag {
  font-family: 'Quicksand', sans-serif; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.02em;
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.news-severity-normaal { background: var(--ok-bg); color: var(--ok); }
.news-severity-verstoord { background: rgba(245,166,35,0.16); color: var(--amber); }
.news-severity-ernstig { background: var(--warn-bg); color: var(--warn); }

/* ---------- greeting (home) ---------- */
.greeting { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 0.98rem; color: var(--brand); margin: 0; }

/* ---------- attention card (home) — replaces the old popup toasts with
   a plain, always-there card that says what needs a look, or that
   nothing does. ---------- */
.attention-card { background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--warn); border-radius: var(--card-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.attention-card.ok { border-left-color: var(--ok); }
.attention-head { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 0.86rem; color: var(--ink); }
.attention-empty { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.attention-list { display: flex; flex-direction: column; gap: 2px; }
.attention-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none;
  color: var(--ink); font-size: 0.85rem; padding: 8px 8px; margin-inline: -8px; border-radius: 8px;
  transition: background 0.15s ease;
}
.attention-item:hover { background: var(--surface-2); }
.attention-arrow { color: var(--brand); font-family: 'Quicksand', sans-serif; font-weight: 600; flex: none; }

/* ---------- milestone achievements (home) — a quiet card instead of the
   old celebratory popup toasts. ---------- */
.achievements-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.achievements-title { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 0.86rem; color: var(--ink); }
.achievements-list { display: flex; flex-wrap: wrap; gap: 8px; }
.achievement-chip {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); color: var(--ink);
  font-size: 0.78rem; font-weight: 500; padding: 6px 11px; border-radius: 999px;
}
.achievement-chip svg { color: var(--ok); flex: none; }

/* ---------- inbox unread badge (sidebar + tab bar) ---------- */
.nav-link-icon, .tab-icon { position: relative; }
.inbox-badge {
  position: absolute; top: -5px; right: -7px; min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 999px; background: var(--warn); color: #fff; font-family: 'Quicksand', sans-serif;
  font-size: 0.56rem; font-weight: 700; line-height: 15px; text-align: center; box-shadow: 0 0 0 2px var(--surface);
}
.inbox-badge[hidden] { display: none; }

/* ---------- scroll reveal (subtle) ---------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar-input, .toolbar-select { font-family: 'Quicksand', sans-serif; font-size: 0.84rem; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; background: var(--surface); color: var(--ink); }
.toolbar-input { flex: 1 1 220px; min-width: 0; }
.toolbar-select { flex: 0 0 auto; }
.toolbar-input:focus, .toolbar-select:focus { outline: none; border-color: var(--brand); }

/* ---------- install / QR (lives on account.html now, see Settings) ---------- */
.install-card { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 18px 20px; flex-wrap: wrap; }
.install-qr { border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 6px; flex: none; }
.install-text { flex: 1 1 220px; }
.install-text p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- next-milestone progress ---------- */
.progress-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.progress-label { font-size: 0.88rem; font-weight: 500; color: var(--ink); }
.progress-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; width: 0%; background: var(--amber); transition: width 1s ease; }

/* ---------- account page ---------- */
.account-card { max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 20px 22px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 14px; }
.account-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.account-row-label { font-family: 'Quicksand', sans-serif; font-size: 0.64rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.account-row-value { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 0.98rem; }
.account-logout-btn {
  align-self: flex-start; font-family: 'Quicksand', sans-serif; font-size: 0.84rem; font-weight: 600;
  border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 8px 15px; border-radius: 9px;
  cursor: pointer; transition: border-color 0.15s ease;
}
.account-logout-btn:hover { border-color: var(--brand); }
.account-password-success { color: var(--ok); font-size: 0.83rem; margin: 0; font-weight: 500; }

/* ---------- settings/preferences ---------- */
.settings-choice-row { display: flex; gap: 6px; flex-wrap: wrap; }
.settings-choice-btn {
  font-family: 'Quicksand', sans-serif; font-size: 0.8rem; font-weight: 500;
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
  padding: 8px 15px; border-radius: 999px; cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.settings-choice-btn:hover:not(.active) { border-color: var(--brand); color: var(--ink); }
.settings-choice-btn.active { background: var(--plum); color: #fff; border-color: var(--plum); }
.settings-toggle-row { display: flex; align-items: center; gap: 9px; font-size: 0.86rem; cursor: pointer; }
.settings-toggle-row input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--plum); cursor: pointer; }

/* ---------- inline search (postvak.html / nieuws.html) ---------- */
.list-search-row { position: relative; margin: 12px 0 4px; max-width: 360px; }
.list-search-input {
  width: 100%; box-sizing: border-box; font-family: 'Quicksand', sans-serif; font-size: 0.86rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 9px 34px 9px 13px; border-radius: 10px; transition: border-color 0.15s ease;
}
.list-search-input:focus { outline: none; border-color: var(--plum); }
.list-search-input::-webkit-search-cancel-button { display: none; }
.list-search-clear {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center; border: none; background: none;
  color: var(--ink-soft); cursor: pointer; border-radius: 50%; font-size: 0.78rem; line-height: 1;
}
.list-search-clear:hover { background: var(--surface-2); color: var(--ink); }

.account-danger-card { max-width: 480px; background: var(--surface); border: 1px solid var(--line); border-left: 2px solid var(--warn); border-radius: var(--card-radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.account-danger-head { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 1rem; color: var(--warn); margin: 0; }
.account-danger-desc { font-size: 0.83rem; color: var(--ink-soft); margin: 0; line-height: 1.55; }
.account-danger-btn {
  align-self: flex-start; font-family: 'Quicksand', sans-serif; font-size: 0.86rem; font-weight: 600;
  border: 1px solid var(--warn); background: transparent; color: var(--warn); padding: 9px 16px; border-radius: 9px;
  cursor: pointer; transition: background 0.15s ease;
}
.account-danger-btn:hover { background: var(--warn-bg); }
.account-danger-btn:disabled { opacity: 0.5; cursor: default; }
.account-danger-error { color: var(--warn); font-size: 0.8rem; margin: 0; }

/* ---------- confirmation modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,10,18,0.45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; }
.modal-overlay[hidden] { display: none; }
.modal-card { max-width: 380px; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--card-radius); padding: 22px; box-shadow: 0 20px 44px -20px rgba(0,0,0,0.35); display: flex; flex-direction: column; gap: 12px; }
.modal-title { font-family: 'Quicksand', sans-serif; font-weight: 600; font-size: 1.02rem; margin: 0; color: var(--warn); }
.modal-desc { font-size: 0.85rem; color: var(--ink-soft); margin: 0; line-height: 1.55; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 4px; }
.modal-btn { font-family: 'Quicksand', sans-serif; font-size: 0.84rem; font-weight: 600; border-radius: 9px; padding: 9px 15px; cursor: pointer; }
.modal-btn-cancel { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.modal-btn-cancel:hover { background: var(--surface-2); }
.modal-btn-danger { border: none; background: var(--warn); color: #fff; }
.modal-btn-danger:hover { opacity: 0.9; }
.modal-btn-danger:disabled { opacity: 0.5; cursor: default; }

/* ---------- reviews page (reviews.html) — one review per chauffeur, plus
   its current moderation status. The star picker is a row of plain SVG-
   icon buttons (same stroke language as the nav icons), not an imported
   icon font; the status badge reuses the ok/amber/warn palette the news
   severity tags already use, just under its own class names since the
   states here (pending/approved/rejected) don't map onto normaal/
   verstoord/ernstig. ---------- */
.review-status-badge {
  display: inline-block; font-family: 'Quicksand', sans-serif; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.02em; border-radius: 999px; padding: 4px 12px;
}
.review-status-pending { background: rgba(245,166,35,0.16); color: var(--amber); }
.review-status-approved { background: var(--ok-bg); color: var(--ok); }
.review-status-rejected { background: var(--warn-bg); color: var(--warn); }
.review-star-row { display: flex; gap: 4px; }
.review-star { background: none; border: none; padding: 2px; margin: 0; cursor: pointer; color: var(--line); transition: color 0.15s ease, transform 0.1s ease; }
.review-star:hover { transform: scale(1.08); color: var(--amber); }
.review-star.filled { color: var(--amber); }
.review-char-count { align-self: flex-end; font-size: 0.74rem; color: var(--ink-soft); }
.review-char-count.over-limit { color: var(--warn); }
.review-edit-note { font-size: 0.8rem; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.review-edit-note[hidden] { display: none; }

/* ---------- responsive: sidebar (desktop/tablet) vs bottom tab bar (phone) ---------- */
@media (min-width: 881px) {
  .topbar { display: none; } /* nothing needed up top once the sidebar carries brand + account */
}
.mobile-tabbar { display: none; }
@media (max-width: 880px) {
  .sidebar { display: none; }
  .app-shell { display: block; }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
  .mobile-tabbar {
    display: flex; align-items: stretch; gap: 2px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px max(8px, env(safe-area-inset-left, 0px)) max(6px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px));
  }
  .tab-link {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    text-decoration: none; color: var(--ink-soft); background: none; border: none; cursor: pointer;
    font-family: 'Quicksand', sans-serif; padding: 6px 2px; border-radius: 10px;
  }
  .tab-icon { width: 19px; height: 19px; display: inline-flex; }
  .tab-icon svg { width: 100%; height: 100%; display: block; }
  .tab-label { font-family: 'Quicksand', sans-serif; font-size: 0.6rem; font-weight: 600; letter-spacing: 0.01em; }
  .tab-link.active { color: var(--brand); }
  .tab-link:active { opacity: 0.7; }
}

/* ---------- "Meer" sheet ---------- */
.more-sheet-overlay { position: fixed; inset: 0; background: rgba(20,10,18,0.4); z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.more-sheet-overlay[hidden] { display: none; }
.more-sheet { width: 100%; max-width: 480px; background: var(--surface); border-radius: 16px 16px 0 0; padding: 8px 16px max(16px, env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 2px; box-shadow: 0 -16px 40px -20px rgba(0,0,0,0.35); animation: sheet-up 0.2s ease; }
@keyframes sheet-up { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.more-sheet-handle { width: 36px; height: 4px; border-radius: 999px; background: var(--line); margin: 4px auto 8px; }
.more-sheet-link { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.92rem; padding: 13px 6px; border-radius: 10px; }
.more-sheet-link .tab-icon { width: 18px; height: 18px; color: var(--ink-soft); }
.more-sheet-link:hover, .more-sheet-link:active { background: var(--surface-2); }
.more-sheet-link.active { color: var(--brand); }
.more-sheet-link.active .tab-icon { color: var(--brand); }
