/* =========================================================
   De Soos-Beurs — stijl
   Kleuren komen uit het thema (Beheer → Uiterlijk) en worden
   door app.js in deze variabelen gezet.
   ========================================================= */
:root {
  --forest: #16382a;
  --forest-2: #1e4636;
  --forest-3: #275542;
  --gold: #C9A84C;
  --gold-bright: #e6c877;
  --cream: #F5F0E8;
  --wine: #8a3636;
  --wine-bright: #c97a7a;

  --bg: var(--forest);
  --surface: color-mix(in srgb, var(--forest) 88%, var(--cream) 12%);
  --surface-2: color-mix(in srgb, var(--forest) 80%, var(--cream) 20%);
  --line: color-mix(in srgb, var(--cream) 14%, transparent);
  --line-strong: color-mix(in srgb, var(--cream) 26%, transparent);
  --text: var(--cream);
  --muted: color-mix(in srgb, var(--cream) 62%, transparent);
  --faint: color-mix(in srgb, var(--cream) 42%, transparent);
  --accent: var(--gold);
  --accent-2: var(--gold-bright);
  --up: #f08a7e;            /* duurder */
  --up-bg: color-mix(in srgb, #f08a7e 16%, transparent);
  --down: #7fdca4;          /* goedkoper = kans */
  --down-bg: color-mix(in srgb, #7fdca4 16%, transparent);

  --font-serif: 'Fraunces', serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --radius: 10px;
  --radius-sm: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow-x: hidden;
}
.serif { font-family: var(--font-serif); }
.num { font-variant-numeric: tabular-nums; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

input, select {
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: color-mix(in srgb, var(--bg) 70%, black 30%);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  width: 100%;
  min-width: 0;
}
input:focus, select:focus { border-color: var(--accent); outline: none; }
input[type="color"] { padding: 3px; width: 44px; height: 36px; flex: none; }
input[type="range"] { padding: 0; border: 0; background: none; accent-color: var(--accent); }
select option { background: var(--forest); }

/* ---------- Topnavigatie ---------- */
.topnav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 10px clamp(12px, 3vw, 28px);
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background: color-mix(in srgb, var(--bg) 85%, black 15%);
  border-bottom: 1px solid var(--line);
}
.topnav .brand { font-family: var(--font-serif); font-style: italic; font-weight: 700; color: var(--accent-2); font-size: 17px; white-space: nowrap; }
.topnav .tabs { display: flex; gap: 4px; margin-left: auto; background: color-mix(in srgb, var(--cream) 6%, transparent); padding: 3px; border-radius: 999px; }
.tab-btn { padding: 7px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { background: var(--accent); color: var(--bg); font-weight: 600; }
body.tv .topnav { display: none; }
@media (max-width: 520px) {
  .topnav .brand { display: none; }
  .topnav .tabs { margin: 0 auto; }
  .tab-btn { padding: 7px 12px; }
}

.loading, .error { min-height: 60vh; display: flex; align-items: center; justify-content: center; color: var(--muted); padding: 40px; text-align: center; }

.watermark { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; pointer-events: none; z-index: 0; }
.watermark img { max-width: 55%; max-height: 55%; object-fit: contain; }
.page { position: relative; z-index: 1; }

/* =========================================================
   Bordscherm
   ========================================================= */
.board { min-height: 0; overflow: hidden; display: flex; flex-direction: column; padding: clamp(16px, 2.6vw, 44px) clamp(16px, 3.4vw, 64px); gap: clamp(12px, 1.6vw, 24px); }

.board-head { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.board-head .logo { max-height: clamp(44px, 6vw, 88px); max-width: 22vw; object-fit: contain; }
.board-head .titles { flex: 1; min-width: 0; }
.board-head h1 { margin: 0; font-family: var(--font-serif); font-style: italic; font-weight: 900; color: var(--accent-2); font-size: clamp(30px, 4.4vw, 72px); line-height: 1; }
.board-head .sub { color: var(--muted); font-size: clamp(13px, 1.3vw, 20px); margin-top: 6px; }

.round-box { flex: none; text-align: right; min-width: clamp(170px, 18vw, 300px); }
.round-box .clock { color: var(--muted); font-size: clamp(13px, 1.2vw, 18px); font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--down); animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.round-box .label { font-size: clamp(11px, 1vw, 15px); color: var(--muted); margin-top: 8px; text-transform: uppercase; letter-spacing: .08em; }
.round-box .count { font-family: var(--font-serif); font-weight: 600; font-size: clamp(26px, 3vw, 50px); line-height: 1.05; font-variant-numeric: tabular-nums; color: var(--text); }
.progress { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--cream) 12%, transparent); overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width 1s linear; }
.round-box.crash .count, .round-box.crash .label { color: var(--up); }
.round-box.crash .progress > i { background: var(--up); }

.ticker { overflow: hidden; border-block: 1px solid var(--line); padding: 10px 0; mask-image: linear-gradient(90deg, transparent, black 4%, black 96%, transparent); }
.ticker-track { display: inline-flex; white-space: nowrap; animation: ticker 32s linear infinite; }
.ticker-item { padding: 0 28px; font-size: clamp(14px, 1.4vw, 22px); color: var(--muted); font-variant-numeric: tabular-nums; }
.ticker-item b { color: var(--text); font-weight: 600; margin-left: 6px; }
.ticker-item .up { color: var(--up); } .ticker-item .down { color: var(--down); }
@keyframes ticker { to { transform: translateX(-50%); } }

.board-table { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.board-cols { display: grid; gap: 0 clamp(20px, 3vw, 56px); grid-template-columns: 1fr; }
.col-head, .brow { display: grid; grid-template-columns: minmax(0, 1fr) auto clamp(120px, 14vw, 240px); align-items: center; gap: clamp(10px, 1.6vw, 28px); }
.col-head { padding: 0 clamp(12px, 1.4vw, 24px) 8px; font-size: clamp(11px, 1vw, 15px); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.col-head span:last-child { text-align: right; }
.brow-list { display: flex; flex-direction: column; gap: clamp(6px, .7vw, 12px); }
.brow {
  position: relative;
  padding: clamp(10px, 1.2vw, 22px) clamp(12px, 1.4vw, 24px);
  background: var(--surface);
  border-radius: var(--radius);
  border-left: 5px solid transparent;
  transition: transform .6s cubic-bezier(.2,.7,.3,1), background .4s;
}
.brow.down { border-left-color: var(--down); }
.brow.up { border-left-color: var(--up); }
.brow .name { font-size: clamp(20px, 2.4vw, 42px); font-weight: 600; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .ver { font-size: clamp(12px, 1.1vw, 18px); color: var(--accent); margin-top: 2px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: clamp(13px, 1.2vw, 20px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge.up { background: var(--up-bg); color: var(--up); }
.badge.down { background: var(--down-bg); color: var(--down); }
.badge.flat { color: var(--faint); }
.brow .price { text-align: right; font-family: var(--font-serif); font-weight: 600; font-size: clamp(30px, 4vw, 70px); line-height: 1; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.brow.flash .price { animation: flash 1.2s ease-out; }
@keyframes flash { 0% { color: var(--text); text-shadow: 0 0 24px var(--accent-2); } 100% { text-shadow: none; } }
.board-foot { display: flex; justify-content: center; gap: 24px; color: var(--faint); font-size: clamp(12px, 1vw, 16px); }
.board-foot .k { display: inline-flex; align-items: center; gap: 8px; }
.board-foot .sw { width: 12px; height: 12px; border-radius: 3px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; font-size: 17px; }

.crash-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, var(--wine) 0%, var(--bg) 75%); opacity: 0; pointer-events: none; transition: opacity .3s; }
.crash-overlay.show { opacity: 1; }
.crash-overlay .txt { font-family: var(--font-serif); font-weight: 900; font-style: italic; font-size: clamp(56px, 13vw, 200px); color: var(--accent-2); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* =========================================================
   Bar-invoer
   ========================================================= */
.bar { max-width: 1100px; margin: 0 auto; padding: 16px clamp(12px, 3vw, 28px) 120px; }
.bar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg button { padding: 9px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--muted); }
.seg button.active { background: var(--accent); color: var(--bg); }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.pill b { color: var(--text); }
.pill.crash { background: var(--up-bg); color: var(--up); }
.pill.crash b { color: var(--up); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.card {
  position: relative; text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  min-height: 132px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .08s, background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.card:hover { border-color: var(--line-strong); }
.card:active { transform: scale(.97); }
.card.hit { background: color-mix(in srgb, var(--accent) 28%, var(--surface)); border-color: var(--accent); }
.card .cname { font-weight: 600; font-size: 17px; line-height: 1.25; }
.card .cver { font-size: 12px; color: var(--accent); margin-top: 2px; }
.card .cbottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.card .cprice { font-family: var(--font-serif); font-weight: 600; font-size: 30px; line-height: 1; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.card .badge { font-size: 12px; padding: 3px 8px; }
.card .qty-hint { position: absolute; top: 10px; right: 12px; font-size: 12px; font-weight: 600; color: var(--faint); }

.bar-foot { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.bar-foot b { color: var(--text); }

.snackbar {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 140%);
  width: min(560px, calc(100% - 24px)); z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 18px;
  background: color-mix(in srgb, var(--bg) 55%, var(--cream) 12%); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .25s cubic-bezier(.2,.8,.3,1);
}
.snackbar.show { transform: translate(-50%, 0); }
.snackbar .msg { flex: 1; min-width: 0; font-size: 15px; }
.snackbar .msg small { display: block; color: var(--muted); font-size: 12px; }

/* =========================================================
   Knoppen
   ========================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.btn:hover { background: color-mix(in srgb, var(--cream) 6%, transparent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 600; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { border-color: color-mix(in srgb, var(--up) 50%, transparent); color: var(--up); }
.btn.danger.confirming, .btn.danger:hover { background: var(--wine); border-color: var(--wine); color: var(--cream); }
.btn.ghost { border-color: transparent; color: var(--muted); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn.lg { padding: 13px 20px; font-size: 15px; }

/* =========================================================
   Beheer
   ========================================================= */
.admin { max-width: 1040px; margin: 0 auto; padding: 18px clamp(12px, 3vw, 28px) 80px; }
.subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: none; }
.subtabs button { padding: 10px 16px; font-size: 15px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtabs button:hover { color: var(--text); }
.subtabs button.active { color: var(--accent-2); border-bottom-color: var(--accent); font-weight: 600; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(14px, 2vw, 22px); margin-bottom: 16px; }
.panel h2 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.panel .hint { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.panel h3 { margin: 18px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 600; }

/* Drankentabel */
.dtable { display: flex; flex-direction: column; gap: 8px; }
.dhead, .drow { display: grid; grid-template-columns: minmax(140px, 2fr) minmax(110px, 1.4fr) 92px 92px 92px 90px 40px; gap: 8px; align-items: center; }
.dhead { font-size: 12px; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; padding: 0 2px; }
.drow { padding: 8px; background: color-mix(in srgb, var(--bg) 55%, transparent); border-radius: var(--radius-sm); }
.drow input { padding: 8px 9px; font-size: 14px; }
.drow .now { font-family: var(--font-serif); font-weight: 600; color: var(--accent-2); text-align: right; font-size: 17px; font-variant-numeric: tabular-nums; }
.drow .del { width: 36px; height: 36px; border-radius: var(--radius-sm); color: var(--faint); font-size: 18px; display: grid; place-items: center; }
.drow .del:hover { color: var(--up); background: var(--up-bg); }
.drow .del.confirming { color: var(--cream); background: var(--wine); font-size: 12px; font-weight: 600; width: auto; padding: 0 8px; }
.drow.add { background: transparent; border: 1px dashed var(--line-strong); }
.drow .lbl { display: none; }
@media (max-width: 760px) {
  .dhead { display: none; }
  .drow { grid-template-columns: 1fr 1fr 1fr; padding: 12px; }
  .drow > .f-name { grid-column: 1 / -1; }
  .drow > .f-ver { grid-column: 1 / -1; }
  .drow .lbl { display: block; font-size: 11px; color: var(--faint); margin-bottom: 3px; }
  .drow > .f-now { grid-column: 1 / 3; text-align: left; }
  .drow .now { text-align: left; }
  .drow > .f-add { grid-column: 1 / -1 !important; }
}

/* Formulieren */
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field > .flabel { font-size: 13px; font-weight: 600; color: var(--text); }
.field .help { font-size: 12px; color: var(--muted); line-height: 1.4; }
.suffix { display: flex; align-items: center; background: color-mix(in srgb, var(--bg) 70%, black 30%); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.suffix:focus-within { border-color: var(--accent); }
.suffix input { border: 0; background: transparent; }
.suffix span { padding: 0 11px 0 0; color: var(--faint); font-size: 13px; white-space: nowrap; }
details.adv { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
details.adv summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 500; }
details.adv[open] summary { margin-bottom: 14px; }
.preview { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--muted); font-size: 13px; }
.preview b { color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* Avond */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: color-mix(in srgb, var(--bg) 55%, transparent); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat .k { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.stat .v { font-family: var(--font-serif); font-size: 30px; font-weight: 600; color: var(--accent-2); font-variant-numeric: tabular-nums; line-height: 1.2; }
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--line); }
table.list th { font-size: 12px; font-weight: 500; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; }
table.list .r { text-align: right; font-variant-numeric: tabular-nums; }
table.list .bar-cell { width: 34%; }
.minibar { height: 8px; border-radius: 999px; background: var(--accent); min-width: 2px; }

/* Uiterlijk */
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.color-field { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--bg) 55%, transparent); }
.color-field span { font-size: 14px; }
.logo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.logo-slot { padding: 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--bg) 55%, transparent); display: flex; flex-direction: column; gap: 10px; }
.logo-slot .thumb { height: 80px; border-radius: var(--radius-sm); border: 1px dashed var(--line-strong); display: grid; place-items: center; color: var(--faint); font-size: 13px; overflow: hidden; }
.logo-slot .thumb img { max-height: 70px; max-width: 90%; object-fit: contain; }
.logo-slot .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.range-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.range-row input { flex: 1; }

/* Meldingen */
.conn { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); background: var(--wine); color: var(--cream); padding: 8px 16px; border-radius: 999px; font-size: 13px; z-index: 60; display: none; }
.conn.show { display: block; }
.toast { position: fixed; top: 70px; right: 16px; max-width: min(380px, calc(100% - 32px)); background: color-mix(in srgb, var(--bg) 55%, var(--cream) 12%); border: 1px solid var(--line-strong); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 14px; z-index: 70; opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.toast.show { opacity: 1; transform: none; }
.toast.err { border-color: var(--up); color: var(--up); }

/* Simulatie */
.pop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 20px; }
.pop { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; padding: 4px 0; }
.pop .pname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: color-mix(in srgb, var(--bg) 70%, black 30%); }
.stepper button { width: 36px; height: 36px; font-size: 18px; font-weight: 600; color: var(--accent-2); display: grid; place-items: center; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.stepper button:hover { background: color-mix(in srgb, var(--cream) 8%, transparent); }
.stepper button:active { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.stepper input { width: 44px; height: 36px; border: 0; border-inline: 1px solid var(--line); border-radius: 0; text-align: center; padding: 0; background: transparent; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sw { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; }
.chip.off { opacity: .4; }
.chip.off .sw { background: transparent !important; outline: 1px solid var(--muted); }
.chart-wrap { position: relative; width: 100%; }
.chart-wrap svg { display: block; width: 100%; height: auto; }
.chart-wrap .ax { fill: var(--faint); font-size: 11px; font-variant-numeric: tabular-nums; font-family: var(--font-body); }
.chart-wrap .dl { fill: var(--muted); font-size: 12px; font-family: var(--font-body); }
.chart-wrap .dl-v { fill: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-tip { position: absolute; display: none; pointer-events: none; z-index: 5; min-width: 190px; padding: 10px 12px; border-radius: 8px; background: #0b1611; border: 1px solid var(--line-strong); box-shadow: 0 8px 24px rgba(0,0,0,.4); font-size: 13px; }
.chart-tip .tt-h { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.chart-tip .tt-r { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.chart-tip .tt-n { flex: 1; }
.chart-tip .tt-v { font-variant-numeric: tabular-nums; font-weight: 600; }
.txt-up { color: var(--up); } .txt-down { color: var(--down); }

/* Accounts */
body.guest .topnav { display: none; }
.login-link { position: fixed; right: 14px; bottom: 12px; z-index: 20; font-size: 12px; color: var(--faint); text-decoration: none; padding: 6px 10px; border-radius: 999px; opacity: .35; transition: opacity .2s, background .2s; }
.login-link:hover, .login-link:focus-visible { opacity: 1; background: var(--surface); color: var(--text); }
.user-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 13px; color: var(--muted); border: 1px solid var(--line); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-btn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--down); flex: none; }
.user-btn:hover, .user-btn.active { color: var(--text); border-color: var(--line-strong); }
@media (max-width: 520px) { .user-btn { max-width: 90px; padding: 7px 9px; } .topnav { gap: 8px; } }
.auth-wrap { min-height: calc(100vh - 20px); display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; margin: 0; }
.auth-card h2 { margin: 0; }
.auth-card .hint { margin: 0 0 4px; }
.auth-title { margin: 0 0 4px; font-family: var(--font-serif); font-style: italic; font-weight: 900; color: var(--accent-2); font-size: 30px; }

/* Bar: totaal per aantal + prijstabel */
.seg button { min-width: 44px; padding: 9px 14px; }
@media (max-width: 420px) { .seg button { min-width: 0; padding: 8px 11px; } }
.card .ctotal { font-size: 15px; font-weight: 600; color: var(--text); background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 6px; padding: 4px 8px; align-self: flex-start; font-variant-numeric: tabular-nums; }
.card .ctotal .ctq { color: var(--accent-2); margin-right: 2px; }
.card .cprice small { font-family: var(--font-body); font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.ptable-wrap { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.ptable-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ptable-head h2 { margin: 0; font-size: 16px; }
.ptable { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px; }
.ptable th, .ptable td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.ptable th { font-size: 12px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.ptable .r { text-align: right; font-variant-numeric: tabular-nums; }
.ptable td:first-child { font-weight: 600; }
.ptable tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--bg) 35%, transparent); }
.ptable .sel { background: color-mix(in srgb, var(--accent) 20%, transparent) !important; color: var(--accent-2); font-weight: 700; }
.ptable th.sel { color: var(--accent-2); }
@media (max-width: 520px) {
  .ptable-wrap { padding: 12px 10px; }
  .ptable { min-width: 0; font-size: 12.5px; }
  .ptable th, .ptable td { padding: 7px 3px; }
  .ptable th { font-size: 10.5px; letter-spacing: 0; }
  .ptable td:first-child { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 520px) { .ptable .eur { display: none; } .ptable-head .hint::after { content: " (in €)"; } }

/* Bord: rijhoogte en lettergrootte volgen --rowh (door app.js berekend zodat alles past) */
.board-cols { --rowh: 96px; }
.board-cols .col-head { height: var(--headh, 28px); padding-bottom: 4px; align-items: end; box-sizing: border-box; }
.brow-list { gap: var(--gap, 10px); margin-top: 0; }
.brow { height: var(--rowh); padding-block: 0; min-width: 0; }
.brow .name { font-size: min(calc(var(--rowh) * .36), 42px); line-height: 1.1; }
.brow .ver { font-size: min(calc(var(--rowh) * .16), 18px); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .price { font-size: min(calc(var(--rowh) * .56), 70px); }
.brow .badge { font-size: max(11px, min(calc(var(--rowh) * .18), 20px)); padding: .2em .7em; }
.board-cols.multi .col-head, .board-cols.multi .brow { grid-template-columns: minmax(0, 1fr) auto auto; gap: clamp(8px, 1vw, 20px); }
.board-cols.multi .col-head span:nth-child(2) { font-size: 0; }
.board-cols.multi .col-head span:nth-child(2)::after { content: "±"; font-size: clamp(11px, 1vw, 15px); }
.board-cols > div { min-width: 0; }
