/*
 * Florijn client-app demo — design tokens per handoff README.
 * BEG-291: mobile-first responsive framework. Breakpoints at 640px and 1024px.
 * The device-frame mockup is retired at every width (BEG-289 superseded):
 * the app fills the viewport and the nav reflows bottom -> rail -> sidebar.
 */
:root {
  /* blues */
  --blue: #2f55f3;
  --blue-dark: #2545d8;
  --blue-light: #5b82ff;
  --blue-rim: #80a0ff;
  --blue-soft: #eaf0fe;
  /* text */
  --navy: #15213f;
  --secondary: #6b7488;
  --muted: #8b93a3;
  --faint: #aab2c0;
  /* surfaces */
  --bg: #f5f6fb;
  --canvas: #eef0f6;
  --card: #ffffff;
  /* borders */
  --border-1: #e6e8f0;
  --border-2: #ececf3;
  --border-3: #f1f2f6;
  /* success */
  --green-text: #107a51;
  --green-accent: #1f9d6b;
  --green-soft: #e7f6ef;
  /* amber */
  --amber-text: #9a6a14;
  --amber-accent: #c98718;
  --amber-soft: #fbf2df;
  --amber-border: #f6dca8;
  --amber-tint: #fffdf6;
  /* dark */
  --camera: #0c0e14;
  --card-shadow: 0 1px 2px rgba(21,33,63,0.04), 0 8px 22px rgba(21,33,63,0.05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Plus Jakarta Sans', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--navy);
}
button { font-family: inherit; cursor: pointer; }

/* =======================================================================
   App shell — mobile-first (default = phone, fullscreen bottom-bar app)
   ======================================================================= */
.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}
/* content region between chrome */
.viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* side/rail navs hidden on mobile */
.nav-sidebar, .nav-rail { display: none; }

/* ---- Screen shell ---- */
.screen {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg);
  animation: fade 180ms ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.app--scan .screen { background: var(--camera); }

/* ---- Persistent "Voorbeeld" demo pill (BEG-293) ----
   Pinned to the bottom-right of the content area on every screen. Anchored to
   .viewport, so on mobile it floats just above the (sibling) bottom bar and on
   tablet/desktop it clears the left nav. z-index keeps it under the modals
   (overlay z-index 100, rail overlay 90) so it never blocks a dismiss. */
.demo-pill {
  position: absolute;
  right: 14px;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  pointer-events: none;
  padding: 4px 11px;
  border-radius: 20px;
  background: var(--blue-soft);
  color: var(--secondary);
  border: 1px solid #dbe4fb;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(21,33,63,0.08);
  user-select: none;
}
/* legible variant over the dark Scan camera canvas. Lifted clear of the
   camera's bottom cluster (instruction + "Gescande documenten" bar). */
.demo-pill--dark {
  bottom: 168px;
  background: rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.92);
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.screen__scroll {
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* header — safe-area top padding on mobile fullscreen */
.hdr { flex: 0 0 auto; padding: 24px 20px 12px; padding-top: max(24px, env(safe-area-inset-top)); }
.hdr--tight { padding: 20px 20px 10px; padding-top: max(20px, env(safe-area-inset-top)); }
.hdr__row { display: flex; align-items: center; justify-content: space-between; }
.hdr__row--end { align-items: flex-end; }
.hdr__title-with-sub { display: flex; align-items: baseline; gap: 9px; }

/* shared content width cap (overridden per breakpoint) */
.content-max { width: 100%; }

.member-scroll { padding: 10px 16px 16px; font-variant-numeric: tabular-nums; }

/* ---- Header pieces ---- */
.title { font-size: 28px; font-weight: 800; color: var(--navy); letter-spacing: -0.6px; }
.subtle { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.brandslot { display: flex; align-items: center; gap: 8px; }
.brandslot__tile {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.brandslot__mono { font-size: 10px; font-weight: 800; color: #fff; letter-spacing: 0.2px; }
.brandslot__name { font-size: 13.5px; font-weight: 800; color: var(--navy); letter-spacing: -0.2px; }

.section-label {
  font-size: 11.5px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.6px;
  padding: 16px 4px 8px;
}
.section-label:first-child { padding-top: 6px; }

/* ---- Segmented toggle ---- */
.toggle {
  display: flex; gap: 6px;
  background: var(--blue-soft);
  padding: 4px; border-radius: 10px;
}
.toggle button {
  font-size: 12.5px; font-weight: 700; color: #5566a0;
  padding: 5px 11px; border: none; background: transparent;
  border-radius: 7px; line-height: 1;
}
.toggle button.is-active { color: #fff; background: var(--blue); }

/* ---- Cards & rows ---- */
.card { background: var(--card); border-radius: 18px; box-shadow: var(--card-shadow); overflow: hidden; }
.card--20 { border-radius: 20px; }
.body-pad { padding: 6px 16px 16px; }
.body-pad--tight { padding: 4px 16px 16px; }

.row { display: flex; gap: 12px; align-items: center; padding: 13px 14px; }
.row__divider { height: 1px; background: var(--border-3); margin: 0 14px; }
.row__divider--15 { margin: 0 15px; }
.row__grow { flex: 1; min-width: 0; }
.row__t { font-size: 14px; font-weight: 700; color: var(--navy); }
.row__t--15 { font-size: 14.5px; }
.row__sub { font-size: 12px; color: var(--secondary); margin-top: 1px; }
.row__sub--muted { color: var(--muted); }
.row__sub--amber { color: var(--amber-accent); }
.row__date { font-size: 12.5px; font-weight: 700; color: var(--muted); flex: 0 0 auto; }

.icon-tile {
  width: 32px; height: 32px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.icon-tile--amber { background: var(--amber-soft); }
.icon-tile--neutral { background: #f1f3f9; }
.icon-tile--check { border-radius: 50%; background: var(--green-soft); }
.chevron-tile {
  width: 28px; height: 28px; border-radius: 8px; background: var(--blue-soft);
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}

/* clickable affordance */
.clickable { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 120ms ease; }
.clickable:active { background: #f7f8fc; }

/* ---- Taken grid (single column on mobile) ---- */
.taken-grid { display: block; }
.taken-sec { display: block; }

/* ---- Cijfers ---- */
/* mobile/tablet: grid shows the card matching the toggle; both are in the DOM */
.cijfers-grid { display: block; }
.cijfers-cell { display: none; }
.cijfers-grid--resultaten .cijfers-cell--resultaten { display: block; }
.cijfers-grid--balans .cijfers-cell--balans { display: block; }

/* ---- Cijfers W&V ---- */
.wv { background: var(--card); border-radius: 20px; padding: 18px 16px 16px; box-shadow: var(--card-shadow); font-variant-numeric: tabular-nums; }
.wv__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.wv__title { font-size: 16px; font-weight: 700; color: var(--navy); }
.wv__line { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.wv__line--top { border-top: 1px solid var(--border-3); }
.wv__k { font-size: 14.5px; font-weight: 600; color: var(--navy); }
.wv__k--muted { color: var(--secondary); font-weight: 400; }
.wv__v { font-size: 14.5px; font-weight: 700; color: var(--navy); }
.wv__v--muted { font-weight: 600; color: var(--secondary); }
.wv__total { display: flex; justify-content: space-between; align-items: flex-start; padding: 10px 0; margin-top: 2px; border-top: 2px solid var(--navy); }
.wv__total--result { padding: 11px 0 2px; }
.wv__total-k { font-size: 14.5px; font-weight: 800; color: var(--navy); }
.wv__total-v { font-size: 14.5px; font-weight: 800; color: var(--navy); text-align: right; }
.wv__total-pct { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 1px; text-align: right; }
.wv__total--result .wv__total-k { font-size: 15px; color: var(--green-text); }
.wv__total--result .wv__total-v { font-size: 17px; color: var(--green-text); }
.wv__total--result .wv__total-pct { color: var(--green-accent); }

/* ---- Balans ---- */
.balans { background: var(--card); border-radius: 20px; padding: 18px 16px; box-shadow: var(--card-shadow); font-variant-numeric: tabular-nums; }
.balans__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.balans__cols { display: flex; gap: 16px; }
.balans__col { flex: 1; }
.balans__sep { width: 1px; background: #edeef3; }
.balans__coltitle { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.balans__line { display: flex; justify-content: space-between; padding: 7px 0; }
.balans__line span:first-child { font-size: 13px; color: var(--secondary); }
.balans__line span:last-child { font-size: 13px; font-weight: 600; color: var(--navy); }
.balans__total { display: flex; justify-content: space-between; padding: 9px 0 0; margin-top: 3px; border-top: 1.5px solid #edeef3; }
.balans__total span:first-child { font-size: 13px; font-weight: 700; color: var(--navy); }
.balans__total span:last-child { font-size: 13px; font-weight: 800; color: var(--blue); }

/* ---- Team summary ---- */
.team-summary {
  background: linear-gradient(150deg, #3a62ff, #2545d8);
  border-radius: 20px; padding: 16px 18px;
  box-shadow: 0 8px 22px rgba(47,85,243,0.28);
  color: #fff;
}
.team-summary__label { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,0.78); }
.team-summary__amount { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.team-summary__amount b { font-size: 30px; font-weight: 800; letter-spacing: -0.8px; }
.team-summary__amount span { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.78); }
.team-summary__stats { display: flex; gap: 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.18); }
.team-summary__stats b { font-size: 17px; font-weight: 800; display: block; }
.team-summary__stats span { font-size: 11px; color: rgba(255,255,255,0.72); }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.member-amount { font-size: 14px; font-weight: 700; color: var(--navy); }

.dashed-btn {
  margin-top: 13px; width: 100%;
  background: #fff; color: var(--blue);
  border: 1.5px dashed #c3cdf6;
  font-size: 14px; font-weight: 700;
  padding: 13px; border-radius: 14px;
}

/* teams list */
.team-tile {
  width: 38px; height: 38px; border-radius: 11px; background: #eef2ff;
  display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}

/* ---- Back link ---- */
.backlink { display: flex; align-items: center; gap: 10px; cursor: pointer; width: max-content; }
.backlink__tile { width: 34px; height: 34px; border-radius: 10px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; }
.backlink__text { font-size: 12px; font-weight: 700; color: var(--blue); letter-spacing: 0.6px; text-transform: uppercase; }

/* ---- Prognose ---- */
.badge { display: flex; align-items: center; gap: 6px; background: var(--green-soft); padding: 5px 11px; border-radius: 30px; }
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-accent); }
.badge__text { font-size: 12.5px; font-weight: 700; color: var(--green-text); }

.prognose-charts { display: block; }
.chart-card { background: #fff; border-radius: 20px; padding: 16px; margin-top: 13px; box-shadow: var(--card-shadow); }
.chart-card__title { font-size: 15px; font-weight: 700; color: var(--navy); }
.chart-legend { display: flex; align-items: center; gap: 16px; margin-top: 7px; }
.chart-legend span.leg { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--secondary); }
.leg__swatch { width: 11px; height: 11px; border-radius: 3px; box-sizing: border-box; }
.leg__swatch--omzet { background: linear-gradient(180deg, #5b82ff, #2f55f3); }
.leg__swatch--omzet-f { background: repeating-linear-gradient(135deg, #c4d2f8, #c4d2f8 3px, #dee7fb 3px, #dee7fb 6px); border: 1px dashed #2f55f3; }
.leg__swatch--bank { background: linear-gradient(180deg, #5ec7a0, #1f9d6b); }
.leg__swatch--bank-f { background: repeating-linear-gradient(135deg, #bfe7d6, #bfe7d6 3px, #dcf1e8 3px, #dcf1e8 6px); border: 1px dashed #1f9d6b; }

.plot { position: relative; padding-left: 30px; }
.plot__axis {
  position: absolute; left: 0; top: 0; bottom: 0; width: 26px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end;
  padding-right: 5px;
}
.plot__axis span { font-size: 9px; font-weight: 600; color: var(--faint); line-height: 1; }
.plot__grid { position: absolute; left: 30px; right: 0; }
.plot__bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 3px; height: 100%; position: relative; }
.plot__col { flex: 1; display: flex; align-items: flex-end; height: 100%; }
.plot__bar { width: 100%; border-radius: 3px 3px 2px 2px; }
.plot__bar--omzet { background: linear-gradient(180deg, #5b82ff, #2f55f3); }
.plot__bar--omzet-f { background: repeating-linear-gradient(135deg, #c4d2f8, #c4d2f8 4px, #dee7fb 4px, #dee7fb 8px); border: 1px dashed #2f55f3; box-sizing: border-box; }
.plot__bar--bank { background: linear-gradient(180deg, #5ec7a0, #1f9d6b); }
.plot__bar--bank-f { background: repeating-linear-gradient(135deg, #bfe7d6, #bfe7d6 4px, #dcf1e8 4px, #dcf1e8 8px); border: 1px dashed #1f9d6b; box-sizing: border-box; }
.plot__months { display: flex; justify-content: space-between; gap: 3px; margin-top: 7px; padding-left: 30px; }
.plot__months span { flex: 1; text-align: center; font-size: 9.5px; font-weight: 600; color: var(--muted); }

.kpi-row { display: flex; gap: 9px; }
.kpi { flex: 1; background: #fff; border-radius: 16px; padding: 12px; box-shadow: var(--card-shadow); }
.kpi__label { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.kpi__value { font-size: 17px; font-weight: 800; color: var(--navy); margin-top: 2px; }
.kpi__note { font-size: 11px; font-weight: 700; color: var(--green-accent); margin-top: 1px; }

/* ---- Documenten ---- */
.doc-summary { display: flex; gap: 11px; }
.doc-summary__card { flex: 1; background: #fff; border-radius: 16px; padding: 12px 14px; box-shadow: var(--card-shadow); }
.doc-summary__n { font-size: 19px; font-weight: 800; }
.doc-summary__n--green { color: var(--green-text); }
.doc-summary__n--amber { color: var(--amber-accent); }
.doc-summary__label { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.doc-thumb { width: 34px; height: 42px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border-1); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.doc-thumb--amber { background: #fff; border-color: #f0e3c0; }
.doc-amount { font-size: 14px; font-weight: 700; color: var(--navy); }
.pill { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; }
.pill--geboekt { color: var(--green-text); background: var(--green-soft); }
.pill--controle { color: var(--amber-text); background: var(--amber-soft); }
.pill--behandeling { color: var(--blue); background: var(--blue-soft); }
.row--amber-tint { background: var(--amber-tint); }

/* ---- Member detail ---- */
.profile { background: #fff; border-radius: 20px; padding: 22px 18px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; align-items: center; text-align: center; }
.profile__avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 22px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.profile__name { font-size: 19px; font-weight: 800; color: var(--navy); margin-top: 12px; }
.profile__role { font-size: 13px; color: var(--muted); margin-top: 2px; }
.profile__chips { display: flex; gap: 7px; margin-top: 10px; }
.chip { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.chip--blue { color: var(--blue); background: var(--blue-soft); }
.chip--green { color: var(--green-text); background: var(--green-soft); }

.kv { display: flex; justify-content: space-between; align-items: center; padding: 12px 15px; }
.kv span:first-child { font-size: 13.5px; color: var(--secondary); }
.kv span:last-child { font-size: 13.5px; font-weight: 700; color: var(--navy); }
.loon { background: #fff; border-radius: 18px; padding: 16px 15px; box-shadow: var(--card-shadow); }
.loon__line { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; }
.loon__line--top { border-top: 1px solid var(--border-3); }
.loon__line span:first-child { font-size: 14px; color: var(--secondary); }
.loon__line span:last-child { font-size: 14px; font-weight: 600; color: var(--secondary); }
.loon__line--first span:last-child { font-weight: 700; color: var(--navy); }
.loon__total { display: flex; justify-content: space-between; align-items: flex-start; padding: 11px 0 2px; margin-top: 2px; border-top: 2px solid var(--navy); }
.loon__total-k { font-size: 14.5px; font-weight: 800; color: var(--navy); }
.loon__total-v { font-size: 16px; font-weight: 800; color: var(--navy); text-align: right; }
.loon__total-y { font-size: 11px; font-weight: 600; color: var(--muted); margin-top: 1px; text-align: right; }
.detail-actions { display: flex; gap: 10px; margin-top: 14px; }
.btn-primary { flex: 1; background: var(--blue); color: #fff; border: none; font-size: 14px; font-weight: 700; padding: 12px; border-radius: 12px; }
.btn-outline { flex: 0 0 auto; background: #fff; color: var(--secondary); border: 1px solid #e3e6ef; font-size: 14px; font-weight: 700; padding: 12px 16px; border-radius: 12px; }

/* ---- Scan (camera) — mobile/tablet ---- */
/* dropzone hidden below desktop; shown (as flex column) at >=1024px */
.cam { flex: 1 1 auto; min-height: 0; position: relative; overflow: hidden; background: radial-gradient(120% 80% at 50% 32%, #1a1f2b 0%, #0c0e14 70%); cursor: pointer; }
.cam__top { position: absolute; top: 0; left: 0; right: 0; padding: 24px 20px 0; padding-top: max(24px, env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; z-index: 5; }
.cam__ctrl { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; }
.cam__title { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: 0.2px; }
.cam__frame { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: 262px; height: 332px; }
.cam__sheet { position: absolute; inset: 18px; background: #fbfbfc; border-radius: 6px; transform: rotate(-1.4deg); box-shadow: 0 18px 40px rgba(0,0,0,0.45); padding: 20px 18px; font-variant-numeric: tabular-nums; }
.cam__bracket { position: absolute; width: 34px; height: 34px; }
.cam__bracket--tl { left: 0; top: 0; border-top: 3px solid var(--blue-light); border-left: 3px solid var(--blue-light); border-radius: 6px 0 0 0; }
.cam__bracket--tr { right: 0; top: 0; border-top: 3px solid var(--blue-light); border-right: 3px solid var(--blue-light); border-radius: 0 6px 0 0; }
.cam__bracket--bl { left: 0; bottom: 0; border-bottom: 3px solid var(--blue-light); border-left: 3px solid var(--blue-light); border-radius: 0 0 0 6px; }
.cam__bracket--br { right: 0; bottom: 0; border-bottom: 3px solid var(--blue-light); border-right: 3px solid var(--blue-light); border-radius: 0 0 6px 0; }
.cam__scanline { position: absolute; left: 6px; right: 6px; top: 60%; height: 2px; background: linear-gradient(90deg, transparent, #5b82ff, transparent); box-shadow: 0 0 12px #5b82ff; animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { 0%,100% { top: 22%; } 50% { top: 74%; } }
.cam__chip { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; background: rgba(31,157,107,0.18); border: 1px solid rgba(31,157,107,0.5); padding: 7px 13px; border-radius: 30px; backdrop-filter: blur(8px); white-space: nowrap; }
.cam__chip span { font-size: 12.5px; font-weight: 700; color: #bff0d6; }
.cam__instruction { position: absolute; left: 0; right: 0; bottom: 84px; text-align: center; }
.cam__instruction span { font-size: 14px; font-weight: 600; color: rgba(255,255,255,0.82); }
.cam__docs { position: absolute; left: 16px; right: 16px; bottom: 26px; display: flex; align-items: center; gap: 11px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.16); padding: 9px 12px; border-radius: 16px; backdrop-filter: blur(8px); cursor: pointer; }
.cam__docs-thumbs { display: flex; align-items: center; }
.cam__docs-thumbs div { width: 26px; height: 33px; border-radius: 4px; border: 1.5px solid #0c0e14; box-shadow: 0 2px 5px rgba(0,0,0,0.4); }
.cam__docs-title { font-size: 13.5px; font-weight: 700; color: #fff; }
.cam__docs-sub { font-size: 11.5px; color: rgba(255,255,255,0.68); }

/* invoice sheet placeholder lines */
.sheet-tag { font-size: 9px; font-weight: 700; color: var(--blue); letter-spacing: 1px; }
.sheet-name { font-size: 13px; font-weight: 800; color: var(--navy); margin-top: 3px; }
.sheet-line { height: 6px; border-radius: 3px; }
.sheet-total { border-top: 1.5px solid #edeef3; margin-top: 18px; padding-top: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.sheet-total span:first-child { font-size: 11px; font-weight: 700; color: var(--secondary); }
.sheet-total span:last-child { font-size: 17px; font-weight: 800; color: var(--navy); }

/* ---- Scan (dropzone) — desktop ---- */
.scan-dropzone { display: none; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.dropzone {
  background: #fff; border: 2px dashed #c3cdf6; border-radius: 20px;
  padding: 48px 28px; text-align: center; box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; align-items: center; cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.dropzone:hover { border-color: var(--blue); background: #fbfcff; }
.dropzone__icon { width: 64px; height: 64px; border-radius: 18px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.dropzone__title { font-size: 18px; font-weight: 800; color: var(--navy); }
.dropzone__sub { font-size: 13.5px; color: var(--muted); margin-top: 5px; }
.dropzone__chip { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; background: var(--green-soft); border-radius: 30px; padding: 8px 15px; }
.dropzone__chip span { font-size: 12.5px; font-weight: 700; color: var(--green-text); }
.dropzone-docs { display: flex; align-items: center; gap: 12px; margin-top: 14px; background: #fff; border: 1px solid var(--border-2); border-radius: 16px; padding: 13px 16px; cursor: pointer; box-shadow: var(--card-shadow); transition: background 120ms ease; }
.dropzone-docs:hover { background: #fbfcff; }
.dropzone-docs__thumbs { display: flex; align-items: center; }
.dropzone-docs__thumbs div { width: 26px; height: 33px; border-radius: 4px; border: 1px solid var(--border-1); background: #fff; box-shadow: 0 2px 5px rgba(21,33,63,0.08); }
.dropzone-docs__thumbs div:not(:first-child) { margin-left: -13px; }
.dropzone-docs__title { font-size: 14px; font-weight: 700; color: var(--navy); }
.dropzone-docs__sub { font-size: 12px; color: var(--muted); }

/* =======================================================================
   Nav — bottom bar (mobile default)
   ======================================================================= */
.nav-bottom {
  position: relative;
  display: flex; align-items: flex-start; justify-content: space-around;
  background: #fff; border-top: 1px solid #edeef3;
  padding: 9px 14px 12px;
  padding-bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
  box-shadow: 0 -1px 2px rgba(21,33,63,0.03), 0 -8px 24px rgba(21,33,63,0.04);
  flex: 0 0 auto;
}
.navitem { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 58px; min-height: 44px; justify-content: center; color: #9aa3b2; background: none; border: none; padding: 0; }
.navitem.is-active { color: var(--blue); }
.navitem span { font-size: 10.5px; font-weight: 600; letter-spacing: 0.1px; }
.navitem--scan { gap: 6px; }
.navitem--scan .fab {
  width: 48px; height: 48px; border-radius: 50%; margin-top: -10px;
  background: linear-gradient(160deg, #3a62ff 0%, #2545d8 100%);
  border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(47,85,243,0.32);
}
.navitem--scan span { font-weight: 700; margin-top: -1px; color: var(--blue); }

/* =======================================================================
   Nav — icon rail (tablet) + full sidebar (desktop / tablet expand overlay)
   ======================================================================= */
.nav-rail {
  width: 72px; flex: 0 0 auto;
  background: #fff; border-right: 1px solid #edeef3;
  padding: 18px 0; flex-direction: column; align-items: center; gap: 6px;
}
.rail__brand { width: 32px; height: 32px; border-radius: 8px; background: var(--navy); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.rail__mono { font-size: 12px; font-weight: 800; color: #fff; }
.rail__hamburger { width: 44px; height: 44px; border-radius: 11px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.rail__hamburger:hover { background: #f2f4fa; }
.rail__items { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rail__item { width: 44px; height: 44px; border-radius: 11px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.rail__item svg { stroke: currentColor; }
.rail__item:hover { background: #f2f4fa; }
.rail__item.is-active { background: var(--blue-soft); color: var(--blue); }

/* full sidebar (desktop) */
.nav-sidebar {
  width: 248px; flex: 0 0 auto;
  background: #fff; border-right: 1px solid #edeef3;
  padding: 22px 16px; flex-direction: column;
}
.side__brand { display: flex; align-items: center; gap: 9px; padding: 0 8px 22px; }
.side__tile { width: 30px; height: 30px; border-radius: 8px; background: var(--navy); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.side__mono { font-size: 12px; font-weight: 800; color: #fff; }
.side__name { font-size: 15px; font-weight: 800; color: var(--navy); letter-spacing: -0.2px; }
.side__items { display: flex; flex-direction: column; gap: 2px; }
.side__item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; border: none; background: transparent; color: var(--secondary); font-size: 14px; font-weight: 600; text-align: left; width: 100%; }
.side__item svg { stroke: currentColor; flex: 0 0 auto; }
.side__item span { flex: 0 0 auto; }
.side__item:hover { background: #f6f7fb; }
.side__item.is-active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.side__badge { margin-left: auto; font-size: 11px; font-weight: 700; color: #fff; background: var(--blue); padding: 1px 7px; border-radius: 20px; }
.side__spacer { flex: 1; }
.side__user { display: flex; align-items: center; gap: 10px; padding: 8px; }
.side__avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.side__uname { font-size: 13px; font-weight: 700; color: var(--navy); }
.side__ucompany { font-size: 11.5px; color: var(--muted); }

/* tablet expand overlay — temporary full sidebar */
.rail-overlay { position: absolute; inset: 0; z-index: 90; }
.rail-overlay::before { content: ''; position: absolute; inset: 0; background: rgba(21,33,63,0.42); animation: fade 160ms ease; }
.rail-overlay__panel {
  position: absolute; left: 0; top: 0; bottom: 0; width: 248px;
  background: #fff; border-right: 1px solid #edeef3;
  padding: 22px 16px; display: flex; flex-direction: column;
  box-shadow: 0 10px 40px rgba(21,33,63,0.28);
  animation: slide-in 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes slide-in { from { transform: translateX(-100%); } to { transform: translateX(0); } }
.rail-overlay__close { position: absolute; top: 16px; right: 14px; width: 34px; height: 34px; border-radius: 10px; border: none; background: #f2f4fa; display: flex; align-items: center; justify-content: center; }

/* =======================================================================
   Overlay ("Niet beschikbaar")
   ======================================================================= */
.overlay { position: absolute; inset: 0; z-index: 100; }
.overlay__scrim { position: absolute; inset: 0; background: rgba(21,33,63,0.5); animation: fade 160ms ease; }
.overlay__sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: #fff; border-radius: 26px 26px 0 0;
  padding: 14px 22px 34px;
  padding-bottom: max(34px, calc(env(safe-area-inset-bottom) + 20px));
  box-shadow: 0 -10px 40px rgba(21,33,63,0.28);
  text-align: center;
  animation: sheet-up 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.overlay__grab { width: 40px; height: 5px; border-radius: 20px; background: #e3e6ef; margin: 0 auto 20px; }
.overlay__icon { width: 60px; height: 60px; border-radius: 18px; background: var(--blue-soft); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.overlay__title { font-size: 19px; font-weight: 800; color: var(--navy); }
.overlay__body { font-size: 14px; line-height: 1.5; color: var(--secondary); margin: 8px auto 0; max-width: 300px; }
.overlay__cta { margin-top: 20px; width: 100%; max-width: 420px; background: var(--blue); color: #fff; border: none; font-size: 15px; font-weight: 700; padding: 13px; border-radius: 13px; box-shadow: 0 6px 16px rgba(47,85,243,0.28); }
.overlay__back { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; }

/* =======================================================================
   TABLET  (640 – 1024px)  — icon rail replaces bottom bar; content ~560–700
   ======================================================================= */
@media (min-width: 640px) {
  .app { flex-direction: row; }
  .nav-bottom { display: none; }
  .nav-rail { display: flex; }

  /* header sits inside the app, no notch: normal top padding */
  .hdr { padding-top: 22px; }
  .hdr--tight { padding-top: 18px; }
  .cam__top { padding-top: 22px; }

  /* the rail/sidebar already carries the firm brand — drop the duplicate
     brand chip from the Taken header at tablet/desktop widths */
  .brandslot { display: none; }

  /* content capped and centred */
  .content-max { max-width: 640px; margin: 0 auto; }
  .body-pad { padding: 12px 24px 24px; }
  .body-pad--tight { padding: 10px 24px 24px; }
  .member-scroll { padding: 12px 24px 24px; }

  /* overlays are scoped to the viewport (not the rail) */
  .overlay, .rail-overlay { }
  .overlay__sheet { border-radius: 26px; left: 50%; right: auto; bottom: 50%; transform: translate(-50%, 50%); width: min(440px, 90%); padding-bottom: 34px; animation: fade 200ms ease; }
  .overlay__sheet .overlay__grab { display: none; }
}

/* =======================================================================
   DESKTOP  (>= 1024px)  — full sidebar; content ~1200; 2-col where sensible;
   Cijfers shows both tables side by side and the toggle is gone.
   ======================================================================= */
@media (min-width: 1024px) {
  .nav-rail { display: none; }
  .nav-sidebar { display: flex; }

  .content-max { max-width: 1200px; margin: 0 auto; }
  .body-pad { padding: 20px 32px 32px; }
  .body-pad--tight { padding: 18px 32px 32px; }
  .member-scroll { padding: 20px 32px 32px; }
  .hdr { padding: 26px 32px 14px; }
  .hdr--tight { padding: 22px 32px 12px; }

  /* Cijfers: both tables side by side; toggle removed */
  .cijfers-toggle { display: none; }
  .cijfers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .cijfers-cell { display: block !important; } /* both visible regardless of cijfersView */

  /* Taken: three sections may sit multi-column */
  .taken-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; align-items: start; }
  .taken-sec .section-label:first-child { padding-top: 0; }

  /* Prognose: charts side by side */
  .prognose-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .prognose-charts .chart-card { margin-top: 0; }
  .kpi-row { margin-top: 13px; }

  /* Team: wider member rows read better on a roomy canvas */
  .member-scroll .content-max, .team-summary { }

  /* Scan: swap camera for the upload dropzone */
  .scan-camera { display: none; }
  .scan-dropzone { display: flex; }
  .app--scan .screen { background: var(--bg); } /* desktop scan is light, not the dark camera */

  /* overlay centred over the content area */
  .overlay__sheet { width: min(460px, 520px); }
}
