/* Gooische Car Cleaning — app-stijl
   Kleuren en lettertype volgen de website: donkere kop (inkt-zwart met goud),
   daaronder licht crème met witte kaarten en goud, donkere balk onderaan (zoals de footer). */

@font-face { font-family: "PJS"; font-weight: 400; font-display: swap; src: url("../fonts/pjs-400-normal.woff2") format("woff2"); }
@font-face { font-family: "PJS"; font-weight: 600; font-display: swap; src: url("../fonts/pjs-600-normal.woff2") format("woff2"); }
@font-face { font-family: "PJS"; font-weight: 700; font-display: swap; src: url("../fonts/pjs-700-normal.woff2") format("woff2"); }
@font-face { font-family: "PJS"; font-weight: 800; font-display: swap; src: url("../fonts/pjs-800-normal.woff2") format("woff2"); }
@font-face { font-family: "PJS"; font-weight: 800; font-style: italic; font-display: swap; src: url("../fonts/pjs-800-italic.woff2") format("woff2"); }

:root {
  /* licht deel (zoals de secties van de website) */
  --bg: #faf8f4;          /* crème achtergrond */
  --surface: #ffffff;     /* kaarten */
  --surface-2: #f3f0ea;
  --line: #e8e3da;
  --text: #1c1d21;
  --muted: #6b6d75;
  --gold: #cf9f48;        /* goud van de website */
  --gold-hi: #e2bd6e;     /* lichte kant van gouden knoppen */
  --gold-2: #9a6d1d;      /* goud als tekst op licht */
  --gold-ink: #17130a;
  --gold-soft: rgba(207,159,72,.16);
  --green: #1f9d55;
  --green-soft: rgba(31,157,85,.12);
  --red: #d23f36;
  --red-soft: rgba(210,63,54,.1);
  --shadow: 0 1px 2px rgba(28,29,33,.04), 0 6px 18px -10px rgba(28,29,33,.12);
  /* donker deel (kop, uitgelichte kaart, onderbalk) */
  --ink: #0b0c0e;
  --ink-card: #1c1e22;
  --radius: 16px;
  --tap: 56px;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "PJS", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
/* Donkere vlakken: dezelfde variabelen, maar met de donkere kleuren van de website */
.topbar, .nav, .stat.hero, .auth, .viewer, .toast {
  --surface: var(--ink-card);
  --surface-2: #26282d;
  --line: rgba(255,255,255,.1);
  --text: #f6f4ef;
  --muted: #a4a6ad;
  --gold-2: #e2bd6e;
  --green: #4fbf7f;
  --red: #ff7a72;
  color-scheme: dark;
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
* { margin: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; background: var(--bg); }
body {
  font-family: var(--font); color: var(--text); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
  -webkit-user-select: none; user-select: none;
}
input, textarea, select { -webkit-user-select: text; user-select: text; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg.i { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Opbouw ---------- */
#app { min-height: 100%; }
.screen {
  padding: calc(var(--safe-t) + 8px) 16px calc(var(--nav-h) + var(--safe-b) + 28px);
  max-width: 640px; margin: 0 auto; animation: fade .18s ease-out;
}
.screen.no-nav { padding-bottom: calc(var(--safe-b) + 28px); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.topbar {
  display: flex; align-items: center; gap: 8px; min-height: 64px;
  margin: calc(-1 * (var(--safe-t) + 8px)) -16px 18px; padding: calc(var(--safe-t) + 8px) 16px 8px;
  background: radial-gradient(70% 160% at 100% 0%, rgba(207,159,72,.16), transparent 60%), var(--ink);
  border-bottom: 1px solid rgba(207,159,72,.25);
  box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax); /* tot de rand van het scherm */
}
.topbar h1 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .back { margin-left: -10px; }
.icon-btn {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  color: var(--text); flex-shrink: 0;
}
.icon-btn:active { background: var(--surface-2); }

.brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.brand-logo { width: 240px; max-width: 100%; height: auto; }
.brand-txt { line-height: 1.1; min-width: 0; }
.brand-txt b { display: block; font-weight: 800; font-style: italic; font-size: 1.05rem; letter-spacing: -.01em; }
.brand-txt span { font-size: .68rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

.eyebrow { font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: #b3832c; font-weight: 600; margin: 22px 4px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.eyebrow a, .eyebrow button { letter-spacing: normal; text-transform: none; font-size: .9rem; color: var(--gold-2); }

/* ---------- Onderste navigatie ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(11,12,14,.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(207,159,72,.25); display: flex;
}
.nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: .74rem; font-weight: 600;
}
.nav a svg.i { width: 25px; height: 25px; }
.nav a.on { color: var(--gold); }

/* ---------- Kaarten ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 12px; }
.stack > * + * { margin-top: 12px; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat small { color: var(--muted); font-size: .8rem; font-weight: 600; }
.stat b { display: block; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; white-space: nowrap; }
.stat.hero {
  grid-column: 1 / -1; padding: 20px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(207,159,72,.32), transparent 55%), var(--ink);
  border-color: rgba(207,159,72,.35); box-shadow: 0 18px 40px -22px rgba(11,12,14,.6);
}
.stat.hero b { font-size: 2.3rem; font-style: italic; }
.stat .neg { color: var(--red); }

.month-switch { display: flex; align-items: center; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 12px; }
.month-switch b { font-weight: 700; }

/* ---------- Knoppen ---------- */
.btn {
  min-height: var(--tap); border-radius: 14px; padding: 0 20px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 1.02rem; background: var(--surface-2); border: 1px solid var(--line);
  transition: transform .08s;
}
.btn:active { transform: scale(.98); }
.btn.gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); border: 0; box-shadow: 0 12px 30px -14px rgba(207,159,72,.8); }
.btn.danger { color: var(--red); background: var(--red-soft); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 44px; font-size: .92rem; padding: 0 14px; width: auto; border-radius: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick .btn { flex-direction: column; gap: 6px; min-height: 84px; padding: 10px 4px; font-size: .88rem; }
.quick .btn svg.i { width: 26px; height: 26px; }

.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 4px; }
.contact a, .contact span {
  min-height: 68px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: var(--gold-soft); color: var(--gold-2); font-weight: 700; font-size: .85rem;
}
.contact .wa { background: rgba(37,211,102,.12); color: #128c4a; }
.contact span { opacity: .35; }

.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 15;
  width: 62px; height: 62px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink);
  box-shadow: 0 14px 30px -10px rgba(207,159,72,.7);
}
.fab svg.i { width: 28px; height: 28px; stroke-width: 2.4; }

/* ---------- Lijsten ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; min-height: 68px; width: 100%; text-align: left; }
.row + .row { border-top: 1px solid var(--line); }
.row:active { background: var(--surface-2); }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .sub { color: var(--muted); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .amount { font-weight: 800; white-space: nowrap; text-align: right; }
.row .chev { color: var(--muted); width: 18px; height: 18px; }
.avatar {
  width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold-2); font-weight: 800;
}
.cat-ico { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold-2); flex-shrink: 0; }

.empty { text-align: center; color: var(--muted); padding: 36px 20px; }
.empty svg.i { width: 40px; height: 40px; margin: 0 auto 10px; color: var(--gold); opacity: .7; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.badge.paid { background: var(--green-soft); color: var(--green); }
.badge.open { background: var(--red-soft); color: var(--red); }

/* Nederlands kenteken */
.plate {
  display: inline-flex; align-items: stretch; border-radius: 5px; overflow: hidden; font-weight: 800;
  background: #f5c400; color: #111; font-size: .8rem; letter-spacing: .06em; line-height: 1; vertical-align: middle;
}
.plate::before { content: "NL"; background: #1b3f9e; color: #fff; font-size: .55rem; padding: 4px 3px 0; display: flex; align-items: flex-end; }
.plate span { padding: 4px 6px; }
.plate.lg { font-size: 1.1rem; }
.plate.lg span { padding: 7px 10px; }
.plate.lg::before { font-size: .7rem; padding: 6px 5px 4px; }

/* ---------- Zoeken & filters ---------- */
.search { position: relative; margin-bottom: 12px; }
.search svg.i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 48px !important; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; min-height: 42px; padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: .92rem;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.chip.on { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-2); }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }

/* ---------- Formulieren ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: .84rem; font-weight: 600; color: var(--muted); margin: 0 0 6px 4px; }
.input, .field input, .field textarea, .field select {
  width: 100%; min-height: var(--tap); border-radius: 14px; padding: 14px 16px; font-size: 1.05rem;
  background: var(--surface); border: 1px solid var(--line); outline: none; -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 96px; resize: vertical; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.field input[type=date] { display: block; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.euro { position: relative; }
.euro::before { content: "€"; position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.euro input { padding-left: 36px; }
.hint { color: var(--muted); font-size: .82rem; margin: -6px 4px 14px; }
.link-btn { color: var(--gold-2); font-weight: 600; font-size: .86rem; padding: 6px 4px; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--tap); padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 14px; font-weight: 600; }
.switch { position: relative; width: 56px; height: 34px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); transition: .2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + i { background: var(--green); border-color: var(--green); }
.switch input:checked + i::after { transform: translateX(22px); }

/* ---------- Foto's ---------- */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photos .ph { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph .pending { position: absolute; top: 6px; left: 6px; }
.add-photo {
  aspect-ratio: 1; border-radius: 12px; border: 1.5px dashed rgba(207,159,72,.5); color: var(--gold-2);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: .8rem; font-weight: 600; position: relative;
}
.add-photo input, label.btn input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
label.btn { position: relative; cursor: pointer; }
.thumbs { display: flex; gap: 6px; margin-top: 8px; }
.thumbs img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }

.receipt-preview { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; position: relative; }
.receipt-preview img { width: 100%; max-height: 300px; object-fit: contain; background: #000; }
.scanning { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(11,12,14,.7); color: #fff; font-weight: 700; }
.scan-line { position: absolute; left: 0; right: 0; height: 3px; background: var(--gold); box-shadow: 0 0 18px var(--gold); animation: scan 1.6s ease-in-out infinite; }
@keyframes scan { 0% { top: 5%; } 50% { top: 92%; } 100% { top: 5%; } }
.ocr-note { font-size: .82rem; color: var(--muted); margin: -4px 4px 14px; display: flex; gap: 6px; align-items: center; }
.ocr-note.ok { color: var(--green); }

/* ---------- Overlay: foto bekijken, sheets ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.7); display: flex; align-items: flex-end; animation: fadeIn .15s; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { width: 100%; max-width: 640px; margin: 0 auto; background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 16px calc(var(--safe-b) + 20px); border-top: 1px solid var(--line); animation: up .2s ease-out; max-height: 88vh; overflow-y: auto; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; }
.sheet h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 14px; }
.viewer { position: fixed; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; }
.viewer img { flex: 1; min-height: 0; object-fit: contain; width: 100%; }
.viewer .bar { display: flex; justify-content: space-between; padding: calc(var(--safe-t) + 8px) 12px 8px; }
.viewer .bar.bottom { padding: 12px 16px calc(var(--safe-b) + 16px); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 70;
  bottom: calc(var(--nav-h) + var(--safe-b) + 18px); background: var(--ink); color: #f6f4ef; font-weight: 700; border: 1px solid rgba(207,159,72,.35);
  padding: 12px 18px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.4); animation: up .2s; max-width: calc(100% - 32px); text-align: center;
}
.toast.err { background: var(--red); color: #fff; }

.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--gold-soft); border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 60px 0; }

/* ---------- Inloggen ---------- */
html:has(.auth), body:has(.auth) { background: var(--ink); }
.auth { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: calc(var(--safe-t) + 24px) 22px calc(var(--safe-b) + 24px); max-width: 440px; margin: 0 auto;
  background: radial-gradient(90% 50% at 80% 0%, rgba(207,159,72,.16), transparent 70%); }
.auth .logo { width: 100%; max-width: 340px; height: auto; margin-bottom: 30px; }
.auth h1 { font-size: 2rem; font-weight: 800; font-style: italic; letter-spacing: -.03em; line-height: 1.05; }
.auth h1 em { color: var(--gold); }
.auth p { color: var(--muted); margin: 10px 0 26px; }
.err-msg { color: var(--red); font-weight: 600; font-size: .9rem; margin: -4px 4px 12px; }

.info-line { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.info-line + .info-line { border-top: 1px solid var(--line); }
.info-line svg.i { color: var(--gold); margin-top: 1px; }
.info-line div { min-width: 0; overflow-wrap: anywhere; }
.info-line small { display: block; color: var(--muted); font-size: .78rem; font-weight: 600; }
.note-text { white-space: pre-wrap; }
.total-line { display: flex; justify-content: space-between; align-items: baseline; padding: 0 4px 12px; color: var(--muted); font-weight: 600; }
.total-line b { color: var(--text); font-size: 1.25rem; font-weight: 800; }

/* Pakketkeuze (Refresh / Signature / Anders) */
.pkgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pkg {
  text-align: left; padding: 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line);
  display: flex; flex-direction: column; gap: 2px; min-height: 104px;
}
.pkg b { font-size: 1.1rem; font-weight: 800; font-style: italic; }
.pkg small { color: var(--muted); font-size: .8rem; line-height: 1.25; flex: 1; }
.pkg em { font-style: normal; font-weight: 800; color: var(--gold-2); margin-top: 6px; }
.pkg:last-child { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: 10px; }
.pkg:last-child small { flex: 1; }
.pkg:last-child em { margin: 0; color: var(--muted); font-weight: 600; font-size: .85rem; }
.pkg.on { border-color: var(--gold); background: var(--gold-soft); box-shadow: 0 0 0 3px var(--gold-soft); }
.field input[type=radio] { -webkit-appearance: radio; appearance: auto; min-height: 0; width: 22px; height: 22px; padding: 0; flex-shrink: 0; border: 0; box-shadow: none; accent-color: var(--gold); }

/* Aanvragen via de website */
.req-banner {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--gold-ink); box-shadow: 0 12px 30px -14px rgba(207,159,72,.8);
}
.req-banner .main { flex: 1; min-width: 0; }
.req-banner b { display: block; font-weight: 800; }
.req-banner small { font-weight: 600; opacity: .75; }
.req-count { width: 40px; height: 40px; border-radius: 12px; background: var(--gold-ink); color: var(--gold-2); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; flex-shrink: 0; }
.cal-ico { width: 44px; height: 48px; border-radius: 12px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1.05; }
.cal-ico small { font-size: .66rem; color: var(--gold-2); text-transform: uppercase; font-weight: 700; }
.cal-ico b { font-size: 1.15rem; font-weight: 800; }
.req { padding: 16px; }
.req h3 { font-size: 1.15rem; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.req .meta { color: var(--muted); font-size: .84rem; margin: 2px 0 12px; }
.req dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 14px; font-size: .94rem; }
.req dt { color: var(--muted); }
.req dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.badge.new { background: var(--gold-soft); color: var(--gold-2); }

/* Periodekeuze overzicht */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; }
.seg button { min-height: 44px; border-radius: 10px; font-weight: 700; color: var(--muted); }
.seg button.on { background: var(--gold-soft); color: var(--gold-2); }
.period-row { align-items: flex-start; }
.pbar { display: grid; gap: 3px; margin-top: 8px; }
.pbar i { display: block; height: 5px; border-radius: 3px; background: var(--gold); min-width: 2px; }
.pbar i.u { background: #c9c3b6; }
.amount.neg { color: var(--red); }

/* PDF-bon */
.receipt-preview.pdf { min-height: 150px; display: grid; }
.pdf-card { display: grid; place-items: center; gap: 4px; padding: 28px 16px; text-align: center; color: var(--text); }
.pdf-card svg { width: 40px; height: 40px; color: var(--gold); }
.pdf-card small { color: var(--muted); }
.ocr-note a { color: var(--gold-2); text-decoration: underline; }
[data-ai-status] code { font-size: .78rem; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; word-break: break-all; }
.ocr-note { align-items: flex-start; }
.ocr-note > div { line-height: 1.45; }
.ocr-note svg { width: 16px; height: 16px; vertical-align: -3px; }
.ocr-note.warn { color: var(--gold-2); }
.ocr-note small { color: var(--muted); }
.ocr-note details { margin-top: 6px; color: var(--muted); }
.ocr-note summary { cursor: pointer; text-decoration: underline; }
.ocr-note pre { white-space: pre-wrap; font-size: .72rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px; max-height: 220px; overflow: auto; margin-top: 6px; }
.ai-steps { margin: 8px 0; padding-left: 18px; display: grid; gap: 6px; font-size: .9rem; }
.btn-row.tight { gap: 8px; }
.btn-row.tight > .btn { min-width: 0; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.hours-in { display: flex; align-items: center; gap: 10px; }
.hours-in input { flex: 1; }
.hours-in span { color: var(--muted); font-weight: 600; }

/* Statistieken */
.stat-sub { display: block; margin-top: 6px; font-size: .74rem; color: var(--muted); line-height: 1.3; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .75rem; color: var(--muted); margin: 8px 4px 16px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--gold); margin-right: 5px; vertical-align: -1px; }
.legend i.u { background: #c9c3b6; }
.period-row .sub { white-space: normal; overflow: visible; text-overflow: clip; }
.weekchart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 16px 12px 12px; margin-bottom: 16px; }
.wk { display: grid; justify-items: center; gap: 6px; }
.wk-n { font-size: .78rem; font-weight: 700; height: 1.2em; line-height: 1.2em; }
.wk-bar { height: 90px; width: 100%; max-width: 26px; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.wk-bar i { display: block; width: 100%; background: var(--gold); border-radius: 6px 6px 0 0; }
.wk-d { font-size: .74rem; color: var(--muted); text-transform: capitalize; }

/* Klantenlijst: letters */
.gold-txt { color: var(--gold-2); font-weight: 600; }
.letter { font-size: .8rem; font-weight: 800; color: var(--gold-2); margin: 16px 6px 6px; letter-spacing: .08em; }
.letter:first-of-type { margin-top: 4px; }
.az-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.az-jump button { min-width: 36px; height: 36px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: .85rem; color: var(--gold-2); }

/* Klant: kerncijfers */
.cust-stats .stat b { font-size: 1.1rem; white-space: normal; }

/* Klant: tijdlijn */
.timeline { position: relative; padding-left: 4px; }
.timeline::before { content: ""; position: absolute; left: 23px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-year { position: relative; margin: 6px 0 10px 48px; font-size: .78rem; font-weight: 800; letter-spacing: .1em; color: var(--muted); }
.tl-item { position: relative; display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.tl-dot { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); }
.tl-dot svg.i { width: 18px; height: 18px; }
.tl-dot.job { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-2); }
.tl-dot.planned { background: var(--ink); border-color: var(--ink); color: #e2bd6e; }
.tl-dot.event { color: var(--gold-2); }
.tl-body { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; box-shadow: var(--shadow); }
a.tl-item:active .tl-body { background: var(--surface-2); }
.tl-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tl-top small { color: var(--muted); font-size: .76rem; font-weight: 600; }
.tl-top b { font-weight: 800; }
.tl-title { font-weight: 700; margin-top: 2px; }
.tl-title .badge { margin-left: 4px; vertical-align: 1px; }
.tl-sub { color: var(--muted); font-size: .86rem; margin-top: 2px; overflow-wrap: anywhere; }
.tl-sub .note-text { color: var(--text); white-space: pre-line; }
.tl-del { position: absolute; right: -6px; top: -6px; width: 36px; height: 36px; color: var(--muted); }
.tl-del svg.i { width: 16px; height: 16px; }
.tl-item:has(.tl-del) .tl-body { padding-right: 30px; }
.btn-row.tight > .btn { font-size: .95rem; gap: 6px; }
.btn-row.tight > .btn svg.i { width: 19px; height: 19px; }
.tip { display: block; font-size: .74rem; font-weight: 600; color: var(--green); white-space: nowrap; }
.tl-top b .tip { display: inline; margin-left: 4px; }
