/* RetailSnap design system — 1:1 port van retailsnap-desktop-v2.html (zonder prototype-balk) */
:root {
  /* ===== Brand ===== */
  --ink:        #022551;
  --ink-700:    #0A3A6B;
  --ink-800:    #06224a;
  --blue:       #1473d0;
  --blue-600:   #1064b8;
  --blue-50:    #EAF2FB;
  --blue-100:   #D9E8F8;

  /* ===== Neutrals ===== */
  --white:      #FFFFFF;
  --bg:         #F5F8FC;
  --surface:    #FFFFFF;
  --line:       #E7ECF4;
  --line-2:     #D8E0EC;
  --text:       #16233B;
  --muted:      #58657C;
  --faint:      #6B7589;

  /* ===== Semantic (soft) ===== */
  --green:      #15784C;  --green-bg: #E6F4EC;  --green-line:#BFE3CE;
  --amber:      #9A5B00;  --amber-bg: #FBF1DC;  --amber-line:#F0DCAE;
  --red:        #B5392B;  --red-bg:   #FBEBE8;  --red-line: #F2C9C2;

  /* ===== Radius ===== */
  --r-xs: 7px; --r-sm: 9px; --r: 12px; --r-lg: 16px; --r-xl: 22px;

  /* ===== Shadow ===== */
  --sh-xs: 0 1px 2px rgba(2,37,81,0.05);
  --sh-sm: 0 1px 2px rgba(2,37,81,0.05), 0 2px 6px rgba(2,37,81,0.04);
  --sh-md: 0 6px 20px rgba(2,37,81,0.08);
  --sh-lg: 0 18px 44px rgba(2,37,81,0.14);

  --sidebar-w: 248px;
  --ring: 2px solid var(--blue);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  font-feature-settings: 'cv02','cv03','cv04','cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== Focus (accessibility) ===== */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, .nav-link:focus-visible,
.v-chip:focus-visible, .score-btn:focus-visible, .row-card:focus-visible {
  outline: var(--ring); outline-offset: 2px;
}

/* ===== Icons ===== */
.icon { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor;
  stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 26px; height: 26px; }

/* ===== App shell ===== */
.app { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w); background: var(--ink);
  background-image: linear-gradient(180deg, #052a5c 0%, #022551 60%);
  min-height: 100vh;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
}
.sidebar-logo { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,0.09); }
.sidebar-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-section {
  padding: 14px 12px 6px; font-size: 10.5px; font-weight: 700;
  color: rgba(255,255,255,0.40); text-transform: uppercase; letter-spacing: 0.09em;
}
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.72);
  cursor: pointer; border: none; background: none; width: 100%;
  text-align: left; transition: all .15s; border-radius: var(--r-sm); position: relative;
  text-decoration: none;
}
.nav-link .icon { width: 19px; height: 19px; opacity: .85; }
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; }
.nav-link.active .icon { opacity: 1; }
.nav-link.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; background: var(--blue); border-radius: 0 3px 3px 0;
}
.nav-badge {
  margin-left: auto; background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 700; min-width: 20px; text-align: center;
  padding: 1px 7px; border-radius: 999px;
}
.sidebar-footer {
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.09);
  display: flex; align-items: center; gap: 11px;
}
.sidebar-avatar {
  width: 36px; height: 36px; background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; letter-spacing: .02em;
}
.sidebar-user-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.sidebar-user-role { font-size: 11.5px; color: rgba(255,255,255,0.50); margin-top: 1px; }
.sidebar-logout { background: none; border: none; cursor: pointer; color: rgba(255,255,255,0.55); margin-left: auto; padding: 6px; border-radius: var(--r-xs); display: flex; transition: all .15s; }
.sidebar-logout:hover { color: #fff; background: rgba(255,255,255,0.10); }

/* ===== Main ===== */
.main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ===== Topbar ===== */
.topbar {
  background: rgba(255,255,255,0.85); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line); min-height: 68px;
  display: flex; align-items: center; padding: 0 32px; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.topbar-title { font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; line-height: 1.2; }
.topbar-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.topbar-grow { flex: 1; }

/* ===== Page ===== */
.page { padding: 28px 32px 40px; flex: 1; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.07em; }

/* ===== Cards ===== */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.card-header {
  padding: 17px 22px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.005em; }
.card-title-row { display: flex; align-items: center; gap: 9px; }
.card-title-row .icon { color: var(--blue); width: 18px; height: 18px; }
.card-body { padding: 20px 22px; }

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

/* ===== Stat cards ===== */
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--sh-sm); display: flex; align-items: center; gap: 16px;
}
/* Hover-animatie op de stat-cards verwijderd (klant-feedback 31/07/2026). */
.stat-icon {
  width: 46px; height: 46px; border-radius: var(--r); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-50); color: var(--blue);
}
.stat-icon.amber { background: var(--amber-bg); color: var(--amber); }
.stat-icon.red { background: var(--red-bg); color: var(--red); }
.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat-value { font-size: 30px; font-weight: 800; line-height: 1; color: var(--ink); letter-spacing: -0.02em; }
.stat-value.amber { color: var(--amber); } .stat-value.red { color: var(--red); } .stat-value.green { color: var(--green); }
.stat-label { font-size: 12.5px; color: var(--muted); margin-top: 5px; font-weight: 500; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 17px; border-radius: var(--r-sm);
  font: 600 14px 'Inter', sans-serif; border: 1px solid transparent;
  cursor: pointer; transition: all .15s; white-space: nowrap; letter-spacing: -0.005em;
  text-decoration: none;
}
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--sh-xs); }
.btn-primary:hover { background: var(--ink-700); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: var(--sh-xs); }
.btn-blue:hover { background: var(--blue-600); }
.btn-secondary { background: var(--blue-50); color: var(--ink); }
.btn-secondary:hover { background: var(--blue-100); }
.btn-ghost { background: var(--white); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }
.btn-success { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.btn-success:hover { background: #DBEFE3; }
.btn-danger { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.btn-danger:hover { background: #F8DED9; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 33px; padding: 0 12px; font-size: 13px; border-radius: var(--r-xs); }
.btn[disabled], .btn.is-disabled { opacity: .45; cursor: not-allowed; }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-draft { background: var(--amber-bg); color: var(--amber); }
.badge-finalized { background: var(--green-bg); color: var(--green); }
.badge-pending { background: var(--blue-50); color: var(--blue-600); }
.badge-closed { background: #EEF1F6; color: var(--muted); }
.badge-danger { background: var(--red-bg); color: var(--red); }
.badge-neutral { background: #EEF1F6; color: var(--muted); }

/* ===== Table ===== */
.table { width: 100%; border-collapse: collapse; }
.table th {
  padding: 12px 18px; font-size: 11px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: 0.06em; background: var(--bg);
  text-align: left; border-bottom: 1px solid var(--line);
}
.table td { padding: 15px 18px; font-size: 14px; border-bottom: 1px solid var(--line); color: var(--text); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: var(--blue-50); }
.table strong { font-weight: 600; color: var(--ink); }

/* ===== Vestiging logo ===== */
.vestiging-logo {
  width: 38px; height: 38px; border-radius: 10px; background: var(--blue-50);
  color: var(--blue); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden; border: 1px solid var(--line);
}
.vestiging-logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }

/* ===== Score pills ===== */
.score-pill {
  width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(2,37,81,0.04);
}
.s1 { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px var(--red-line); }
.s2 { background: var(--amber-bg); color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-line); }
.s3 { background: var(--blue-50); color: var(--blue-600); box-shadow: inset 0 0 0 1px var(--blue-100); }
.s4 { background: #E6F0E9; color: #2C7A52; box-shadow: inset 0 0 0 1px #C8E3D2; }
.s5 { background: var(--green-bg); color: var(--green); box-shadow: inset 0 0 0 1px var(--green-line); }
.sna { background: #EEF1F6; color: var(--faint); font-size: 10px; box-shadow: inset 0 0 0 1px var(--line-2); }
/* To-do-aantal: zelfde pill-vorm als de score, neutraal gekleurd */
.stodo { background: #EEF1F6; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.stodo.has { background: var(--blue-50); color: var(--blue-600); box-shadow: inset 0 0 0 1px var(--blue-100); }

/* ===== Forms ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--ink); }
.form-input {
  padding: 11px 13px; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  font: 400 14.5px 'Inter', sans-serif; color: var(--text); background: var(--white);
  outline: none; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.form-input::placeholder { color: var(--faint); }
.form-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,115,208,0.14); }
textarea.form-input { resize: vertical; min-height: 84px; line-height: 1.5; }
/* Datum/tijd-velden: iOS rendert deze standaard te breed → forceer binnen de container */
input[type="date"].form-input,
input[type="time"].form-input,
input[type="datetime-local"].form-input {
  -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%;
}
.form-hint { font-size: 12px; color: var(--muted); }
.form-error { font-size: 12.5px; color: var(--red); font-weight: 500; }

/* ===== Score picker ===== */
.score-picker { display: flex; gap: 9px; }
.score-btn {
  width: 46px; height: 46px; border-radius: var(--r-sm); border: 1.5px solid var(--line-2);
  background: #fff; font: 700 16px 'Inter', sans-serif; cursor: pointer; color: var(--muted);
  transition: all .14s;
  display: flex; align-items: center; justify-content: center; text-align: center; line-height: 1;
}
.score-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }
.score-btn.sel-1 { border-color: var(--red); background: var(--red); color: #fff; }
.score-btn.sel-2 { border-color: var(--amber); background: var(--amber); color: #fff; }
.score-btn.sel-3 { border-color: var(--blue); background: var(--blue); color: #fff; }
.score-btn.sel-4 { border-color: #2C7A52; background: #2C7A52; color: #fff; }
.score-btn.sel-5 { border-color: var(--green); background: var(--green); color: #fff; }
.score-btn.sel-na { border-color: var(--faint); background: var(--faint); color: #fff; font-size: 12px; }
/* De radio/checkbox zelf is onzichtbaar (opacity:0); toon de focusring op de zichtbare knop. */
.score-picker label:focus-within .score-btn { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ===== Categorie-toggle (ingevulde categorieën verbergen) ===== */
.cat-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink); user-select: none; }
.cat-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.cat-toggle .switch { width: 38px; height: 22px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; flex-shrink: 0; }
.cat-toggle .switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-xs); transition: transform .15s; }
.cat-toggle input:checked + .switch { background: var(--blue); }
.cat-toggle input:checked + .switch::after { transform: translateX(16px); }
#audit-cats.hide-done .score-form.is-done { display: none; }

/* ===== Accordion (audit-categorieën + vestiging-groepen inklapbaar) ===== */
details.score-form > summary,
details.v-accordion > summary { list-style: none; cursor: pointer; user-select: none; }
details.score-form > summary::-webkit-details-marker,
details.v-accordion > summary::-webkit-details-marker { display: none; }
details.score-form > summary::marker,
details.v-accordion > summary::marker { content: ''; }
.accordion-summary { border-bottom-color: transparent; transition: background .12s; }
.accordion-summary:hover { background: var(--bg); }
details.score-form[open] > .accordion-summary,
details.v-accordion[open] > .accordion-summary { border-bottom-color: var(--line); }
.accordion-chevron { transition: transform .18s; color: var(--faint); }
details.score-form[open] > summary .accordion-chevron,
details.v-accordion[open] > summary .accordion-chevron { transform: rotate(90deg); }

/* ===== Lightbox (foto's openen in een overlay) ===== */
.photo-slot[data-lightbox] { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(2,37,81,0.82); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.lightbox.open { display: flex; }
.lightbox-img { max-width: 100%; max-height: 100%; border-radius: var(--r); box-shadow: var(--sh-lg); background: #fff; }
.lightbox-close { position: absolute; top: 18px; right: 22px; width: 42px; height: 42px; border: none; border-radius: 50%; background: rgba(255,255,255,0.92); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-md); }
.lightbox-close:hover { background: #fff; }

/* ===== Photo slots ===== */
.photo-slots { display: flex; gap: 10px; flex-wrap: wrap; }
.photo-slot {
  width: 92px; height: 92px; border-radius: var(--r-sm); border: 1.5px dashed var(--line-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer; color: var(--faint); background: var(--bg); transition: all .14s; font-size: 11px;
}
.photo-slot .icon { width: 22px; height: 22px; }
.photo-slot:hover:not(.filled) { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }
.photo-slot.filled { background: var(--white); border-style: solid; border-color: var(--line); color: var(--muted); }
.photo-slot.filled .thumb { width: 100%; height: 100%; border-radius: var(--r-sm); background: linear-gradient(135deg,#dce7f4,#eef3f9); display:flex; align-items:center; justify-content:center; color: var(--blue); }
.photo-slot.filled img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); }

/* ===== Foto-kiezer (meerdere foto's naast elkaar met voorbeeld) ===== */
.photo-picker { margin-bottom: 8px; }
.photo-picker-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.photo-slot.picker-thumb { position: relative; cursor: default; }
.photo-slot.picker-add { font-family: inherit; padding: 0; }
.photo-slot .picker-plus { font-size: 26px; line-height: 1; font-weight: 300; }
.picker-remove { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border: none; border-radius: 50%; background: var(--ink); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-md); }
.picker-remove:hover { background: var(--red, #c0392b); }

/* ===== Progress ===== */
.progress-wrap { background: var(--line); border-radius: 999px; height: 7px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--blue); border-radius: 999px; }
.progress-bar.ink { background: var(--ink); }

/* ===== Alerts ===== */
.alert { padding: 14px 16px; border-radius: var(--r); font-size: 13.5px; line-height: 1.5; display: flex; gap: 12px; align-items: flex-start; border: 1px solid transparent; }
.alert .icon { width: 19px; height: 19px; margin-top: 1px; }
.alert-info { background: var(--blue-50); color: var(--ink); border-color: var(--blue-100); }
.alert-info .icon { color: var(--blue); }
.alert-warning { background: var(--amber-bg); color: #6e4400; border-color: var(--amber-line); }
.alert-warning .icon { color: var(--amber); }
.alert-success { background: var(--green-bg); color: #0f5536; border-color: var(--green-line); }
.alert-success .icon { color: var(--green); }
.alert-danger { background: var(--red-bg); color: #7d2419; border-color: var(--red-line); }
.alert-danger .icon { color: var(--red); }
.alert strong { font-weight: 700; }

/* ===== Todo cards ===== */
.todo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; border-left: 3px solid var(--line-2); box-shadow: var(--sh-xs); }
.todo-card.open { border-left-color: var(--amber); }
.todo-card.confirmed { border-left-color: var(--green); }
.todo-card.disputed { border-left-color: var(--red); }

/* ===== Category rows ===== */
.cat-list { padding: 8px; }
.cat-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-sm); cursor: pointer; transition: background .12s; text-decoration: none; }
.cat-row:hover { background: var(--bg); }
.cat-row.current { background: var(--blue-50); }
.cat-num { width: 26px; height: 26px; border-radius: 8px; background: #EEF1F6; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.cat-num .icon { width: 15px; height: 15px; }
.cat-num.done { background: var(--ink); color: #fff; }
.cat-num.current { background: var(--blue); color: #fff; }
.cat-name { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--text); }

/* ===== Notifications ===== */
.notif-item { display: flex; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.notif-item:last-child { border-bottom: none; }
.notif-ico { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--blue-50); color: var(--blue); }
.notif-ico.green { background: var(--green-bg); color: var(--green); }
.notif-ico.red { background: var(--red-bg); color: var(--red); }
.notif-ico.amber { background: var(--amber-bg); color: var(--amber); }
.notif-unread { width: 8px; height: 8px; background: var(--blue); border-radius: 50%; flex-shrink: 0; margin: 6px 0 0 -4px; }

/* ===== Chips ===== */
.chip-row { display: flex; gap: 9px; flex-wrap: wrap; }
.v-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--white); color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; padding: 7px 15px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .14s; }
.v-chip:hover:not(.selected) { border-color: var(--blue); color: var(--blue); }
.v-chip.selected { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ===== Steps ===== */
.steps { display: flex; align-items: center; gap: 0; }
.step { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--faint); }
.step.active { color: var(--ink); }
.step.done { color: var(--green); }
.step-circle { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.step-circle .icon { width: 14px; height: 14px; }
.step.active .step-circle { border-color: var(--ink); background: var(--ink); color: #fff; }
.step.done .step-circle { border-color: var(--green); background: var(--green); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--line); min-width: 24px; margin: 0 6px; border-radius: 2px; }

/* ===== Divider ===== */
.divider { height: 1px; background: var(--line); }

/* ===== Misc helpers ===== */
.row { display: flex; align-items: center; gap: 10px; }
.stack { display: flex; flex-direction: column; }
.avatar-i { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.avatar-store { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-50); color: var(--blue); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ===== Login ===== */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  background:
    radial-gradient(110% 70% at 50% -8%, #E4F0FB 0%, rgba(245,248,252,0) 55%),
    radial-gradient(80% 60% at 88% 108%, #DCEBFB 0%, rgba(245,248,252,0) 50%),
    var(--bg);
}
.login-rings { position: absolute; inset: 0; pointer-events: none; opacity: .5; width: 100%; height: 100%; }
.login-box { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-lg); width: 432px; max-width: calc(100vw - 32px); overflow: hidden; }
.login-top { padding: 32px 36px 8px; }
.login-body { padding: 8px 36px 32px; display: flex; flex-direction: column; gap: 18px; }
.login-foot { padding: 16px 36px; border-top: 1px solid var(--line); background: var(--bg); display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.login-foot .icon { width: 15px; height: 15px; color: var(--blue); }
.link { color: var(--blue); font-weight: 600; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ===== Brand logo ===== */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 40px; height: 40px; border-radius: 11px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-xs); flex-shrink: 0; overflow: hidden; padding: 4px; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-word { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.brand-word .snap { color: var(--blue); }
.brand--light .brand-mark { background: #fff; border-color: rgba(255,255,255,0.4); }
.brand--light .brand-word { color: #fff; }
.brand--light .brand-word .snap { color: #6BB2F2; }

.scroll-area { overflow-y: auto; }

/* ============================================================
   RESPONSIVE — fluid van mobile -> tablet -> desktop
   Desktop-gedrag hierboven blijft de basis; onderstaande regels
   passen tablet- en mobiel-schermen aan.
   ============================================================ */

/* Bottom-nav: standaard verborgen, enkel zichtbaar op mobiel */
.bottom-nav { display: none; }

/* Tabel-wrapper: brede tabellen scrollen horizontaal i.p.v. te overflowen */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Tablet (<= 1024px) ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 0 24px; }
  .page   { padding: 24px 24px 36px; }
}

/* ---------- Mobiel (<= 767px) ---------- */
@media (max-width: 767px) {
  /* Voorkom horizontale overflow (anders rekt de fixed bottom-nav mee) */
  html, body { overflow-x: clip; }

  /* Shell: sidebar weg; .app van flex -> block zodat brede inhoud
     (bv. een tabel) de .main niet breder dan het scherm duwt */
  .app     { display: block; }
  .sidebar { display: none; }
  .main    { margin-left: 0; min-width: 0; }

  /* Alle grids worden 1 kolom */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: 14px; }

  /* Topbar compacter; titel kapt af i.p.v. de actieknop weg te duwen */
  .topbar       { padding: 0 14px; min-height: 56px; gap: 10px; }
  .topbar .stack{ min-width: 0; }
  .topbar-title { font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-sub   { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-actions .btn       { height: 36px; padding: 0 13px; font-size: 13.5px; }
  .topbar-actions .btn .icon { width: 16px; height: 16px; }

  /* Page: minder padding + ruimte onderaan voor de bottom-nav */
  .page { padding: 16px 14px calc(80px + env(safe-area-inset-bottom, 0px)); gap: 14px; }

  /* Cards / stats iets compacter */
  .card-header { padding: 14px 16px; }
  .card-body   { padding: 16px; }
  .stat-card   { padding: 16px; gap: 13px; }
  .stat-icon   { width: 42px; height: 42px; }
  .stat-value  { font-size: 26px; }

  /* Brede tabellen scrollen horizontaal binnen hun wrapper */
  .table-wrap .table { min-width: 600px; }

  /* Touch-vriendelijker */
  .score-picker { gap: 7px; }
  .score-btn    { flex: 1; height: 50px; }
  .photo-slot   { width: 84px; height: 84px; }

  /* ===== Bottom-nav ===== */
  .bottom-nav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    width: 100%; max-width: 100%; box-sizing: border-box; overflow: hidden;
    background: rgba(255,255,255,0.95);
    backdrop-filter: saturate(180%) blur(8px);
    border-top: 1px solid var(--line);
    padding: 8px 2px calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 12px rgba(2,37,81,0.05);
  }
  .bottom-nav > .nav-item,
  .bottom-nav > form { flex: 1 1 0; min-width: 0; }
  .bottom-nav > form { display: flex; }
  .bottom-nav > form > .nav-item { width: 100%; }
  .nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    min-width: 0; padding: 4px 2px; border: none; background: none; cursor: pointer;
    color: var(--muted); text-decoration: none; overflow: hidden;
  }
  .nav-item .icon      { width: 23px; height: 23px; color: var(--faint); }
  .nav-item .nav-label { font-size: 10.5px; font-weight: 600; color: var(--muted);
                         max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
                         display: inline-flex; align-items: center; gap: 4px; }
  .nav-item.active .icon      { color: var(--blue); }
  .nav-item.active .nav-label { color: var(--blue); }
  .nav-item .notif-dot { width: 7px; height: 7px; background: var(--red);
                         border-radius: 50%; display: inline-block; }
}

/* ============================================================
   LOGIN — subtiele achtergrond-animatie
   Ringen ademen zacht vanuit het midden; blauwe blobs driften traag.
   Uitgeschakeld bij 'prefers-reduced-motion'.
   ============================================================ */

/* Blauwe "blobs" die traag fluïde bewegen, achter alles */
.login-page::before,
.login-page::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(64px); pointer-events: none; z-index: 0;
  will-change: transform;
}
.login-page::before {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  left: -8%; top: -16%; opacity: .55;
  background: radial-gradient(circle, #BFDDF8 0%, rgba(191,221,248,0) 70%);
  animation: loginBlobA 26s ease-in-out infinite alternate;
}
.login-page::after {
  width: 52vw; height: 52vw; max-width: 680px; max-height: 680px;
  right: -10%; bottom: -18%; opacity: .5;
  background: radial-gradient(circle, #D2E5F8 0%, rgba(210,229,248,0) 70%);
  animation: loginBlobB 34s ease-in-out infinite alternate;
}
@keyframes loginBlobA {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, 30px) scale(1.12); }
  100% { transform: translate(12px, 64px) scale(1.05); }
}
@keyframes loginBlobB {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-44px, -26px) scale(1.1); }
  100% { transform: translate(-16px, -56px) scale(1.04); }
}

/* Concentrische ringen ademen zacht vanuit het midden naar buiten */
.login-rings {
  transform-origin: center; will-change: transform;
  animation: loginRingsBreathe 13s ease-in-out infinite;
}
@keyframes loginRingsBreathe {
  0%   { transform: scale(1);    opacity: .42; }
  50%  { transform: scale(1.07); opacity: .60; }
  100% { transform: scale(1);    opacity: .42; }
}

/* Kaart + ringen boven de blobs */
.login-rings { z-index: 1; }
.login-box   { z-index: 2; }

/* Respecteer 'verminder beweging' */
@media (prefers-reduced-motion: reduce) {
  .login-page::before, .login-page::after, .login-rings { animation: none; }
}
