/* ============================================================
   Snipr v0.7.0 — Light theme + baseline-compare
   v0.25.7 — Dark mode via data-theme attribute + prefers-color-scheme
   v0.33.0 — Action tracker (live status rechtsonder)
   Palette: warm cream paper + sage accents + tomato CTA
   ============================================================ */

/* ============================================================
   Action tracker (Dave-eis: altijd zien wat er gebeurt)
   ============================================================ */
.snipr-action-stack {
  position: fixed;
  right: 12px;
  bottom: 76px;  /* boven bottom-nav */
  z-index: 9998;
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 24px);
}
.snipr-action-card {
  display: flex; align-items: center; gap: 10px;
  background: #1f2937; color: #f9fafb;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.25);
  min-width: 220px; max-width: 360px;
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, sans-serif;
  pointer-events: auto;
  animation: snipr-action-in 0.3s ease;
  transition: opacity .35s, transform .35s;
}
.snipr-action-card.dismissing { opacity: 0; transform: translateX(20px); }
.snipr-action-card.running { border-left: 4px solid #fbbf24; }
.snipr-action-card.ok      { border-left: 4px solid #22c55e; background: #166534; }
.snipr-action-card.fail    { border-left: 4px solid #ef4444; background: #7f1d1d; }
.snipr-action-spinner {
  font-size: 18px; line-height: 1; flex-shrink: 0;
}
.snipr-action-card.running .snipr-action-spinner {
  animation: snipr-spin 1.6s ease-in-out infinite;
}
.snipr-action-body { flex: 1; min-width: 0; }
.snipr-action-label { font-weight: 600; }
.snipr-action-detail { font-size: 11px; opacity: .85; margin-top: 2px; }
@keyframes snipr-action-in {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes snipr-spin {
  0%, 100% { transform: rotate(0); }
  50%      { transform: rotate(180deg); }
}

/* Feedback-button states */
.fb-btn.fb-sending { opacity: 0.7; cursor: wait; }
.fb-btn.fb-done {
  background: #22c55e !important; color: #fff !important;
  transform: scale(1.1);
  transition: transform .2s;
}
.fb-btn.fb-fail {
  background: #ef4444 !important; color: #fff !important;
  animation: snipr-shake 0.4s;
}
@keyframes snipr-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

:root {
  --bg: #f8f5f0;            /* warm cream paper */
  --bg-soft: #f1ece3;
  --panel: #ffffff;
  --panel-2: #fbf7f0;
  --panel-3: #efe9dd;
  --line: #e3dcce;
  --line-soft: #ece5d6;
  --text: #2a2826;
  --text-2: #4a4742;
  --muted: #8a857c;
  --accent: #e85d1f;        /* tomato — warm CTA */
  --accent-2: #f47c45;
  --accent-soft: #e85d1f15;
  --green: #5b8a4e;         /* sage */
  --green-soft: #5b8a4e20;
  --yellow: #c19524;
  --red: #c44a3a;
  --blue: #4a6fa5;
  --purple: #8d6cb8;
  --baseline: #6b5d4a;      /* warm brown voor gangbare prijs */
  --shadow-card: 0 1px 3px rgba(0,0,0,0.05);
}

/* v0.25.7 — Dark mode. Toggle via data-theme="dark" of system-preference. */
[data-theme="dark"] {
  --bg: #14110d;
  --bg-soft: #1c1814;
  --panel: #1f1b16;
  --panel-2: #25201a;
  --panel-3: #2e2820;
  --line: #3a3328;
  --line-soft: #2e2820;
  --text: #ede7d8;
  --text-2: #c9c2b1;
  --muted: #8b8475;
  --accent: #f47c45;        /* iets lichter tomato op donker */
  --accent-2: #ff9259;
  --accent-soft: #f47c4525;
  --green: #7da970;
  --green-soft: #7da97025;
  --yellow: #d9a83a;
  --red: #e26a55;
  --blue: #6a8dc1;
  --purple: #a888d0;
  --baseline: #b39870;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.4);
}
/* Volg systeem-instelling als user niets gekozen heeft */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14110d;
    --bg-soft: #1c1814;
    --panel: #1f1b16;
    --panel-2: #25201a;
    --panel-3: #2e2820;
    --line: #3a3328;
    --line-soft: #2e2820;
    --text: #ede7d8;
    --text-2: #c9c2b1;
    --muted: #8b8475;
    --accent: #f47c45;
    --accent-2: #ff9259;
    --accent-soft: #f47c4525;
    --green: #7da970;
    --green-soft: #7da97025;
    --yellow: #d9a83a;
    --red: #e26a55;
    --blue: #6a8dc1;
    --purple: #a888d0;
    --baseline: #b39870;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.4);
  }
}

:root {
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 7px;
  --pad: 14px;
  --touch: 44px;
  --shadow-1: 0 1px 2px rgba(60, 50, 30, 0.06);
  --shadow-2: 0 4px 16px rgba(60, 50, 30, 0.10);
  --shadow-3: 0 8px 28px rgba(60, 50, 30, 0.12);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  background:
    radial-gradient(ellipse at top, #fdfaf3 0%, var(--bg) 60%) fixed,
    var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, system-ui, "Segoe UI", Roboto, Inter, sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

button { cursor: pointer; font: inherit; font-weight: 500; }
h1, h2, h3, h4 { letter-spacing: -0.01em; color: var(--text); }

/* ========== HEADER ========== */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  padding-top: max(10px, env(safe-area-inset-top));
}
.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 18px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  min-width: var(--touch);
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.icon-btn:hover { background: var(--panel-3); }
.icon-btn:active { background: var(--panel-3); transform: scale(0.95); }
.icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.brand { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; }
.brand .logo { font-size: 22px; }
.brand .name {
  font-weight: 700; font-size: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.brand .sub { color: var(--muted); font-size: 12px; font-weight: 400; }
#refreshBtn {
  background: transparent; border: none; color: var(--text);
  font-size: 20px; padding: 8px 10px; border-radius: var(--radius-xs);
  min-width: var(--touch); min-height: var(--touch);
  display: inline-flex; align-items: center; justify-content: center;
}
#refreshBtn:active { background: var(--panel-3); }

/* ========== TABS ========== */
.tabs {
  display: flex; gap: 2px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 0 6px; overflow-x: auto;
  position: sticky; top: 56px; z-index: 9;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: transparent; border: none;
  color: var(--muted);
  padding: 14px 14px;
  border-bottom: 2px solid transparent;
  font-weight: 500; font-size: 14px;
  flex: 1 0 auto; min-width: 70px;
  min-height: var(--touch);
  transition: color .15s ease;
}
.tab.active {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* ========== VIEWS ========== */
main { padding: 14px; padding-bottom: 90px; max-width: 700px; margin: 0 auto; }
.view { display: none; }
.view.active { display: block; }

/* ========== BUTTONS ========== */
button.primary,
button.secondary,
button.danger {
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  min-height: var(--touch);
  font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
button.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff; border: none;
  box-shadow: 0 2px 8px rgba(232, 93, 31, 0.30);
}
button.primary:active { transform: scale(0.97); }
button.primary.big {
  width: 100%; padding: 14px;
  font-size: 16px;
  margin: 12px 0;
}
button.secondary {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
}
button.secondary:hover { background: var(--panel-2); }
button.secondary:active { background: var(--panel-3); transform: scale(0.97); }
button.danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}
button.danger:active { background: rgba(196, 74, 58, 0.10); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

/* ========== CHIPS ========== */
.filters {
  display: flex; flex-wrap: nowrap;
  gap: 6px; margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.filters::-webkit-scrollbar { display: none; }
.chip {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 36px;
}
.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

select.item-filter {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font: inherit;
  margin-bottom: 12px;
  min-height: var(--touch);
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a857c' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
  box-shadow: var(--shadow-1);
}
select.item-filter:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

/* ========== LISTS / CARDS ========== */
.list { display: flex; flex-direction: column; gap: 12px; }
.card, .item-card, .deal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow-1);
}
.card h3 { margin: 0 0 8px 0; font-size: 16px; }

.item-card .row, .deal-card .row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
}
.item-card h3, .deal-card h3 {
  margin: 0 0 4px;
  font-size: 16px; font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}
.item-card .meta, .deal-card .meta {
  color: var(--muted); font-size: 12px; margin-top: 8px;
  word-break: break-word;
}
.item-card .desc {
  color: var(--text-2); font-size: 14px;
  margin: 4px 0 0;
  line-height: 1.5;
}
.item-card .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.tag {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; color: var(--muted);
  font-weight: 500;
}
.tag.sniper { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.tag.private { background: #8d6cb820; color: var(--purple); border-color: var(--purple); }
.tag.ok { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.tag.warn { background: #c1952420; color: var(--yellow); border-color: var(--yellow); }
.tag.threshold {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff; border: none;
  font-weight: 600;
}

/* Action grid */
.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.action-grid button {
  font-size: 13px;
  padding: 10px 8px;
  min-height: var(--touch);
  width: 100%;
}
.action-grid button.full { grid-column: 1 / -1; }

@media (min-width: 520px) {
  .action-grid { grid-template-columns: repeat(4, 1fr); }
  .action-grid button.full { grid-column: auto; }
}

/* ========== CANDIDATE GRID (v0.7.0) ========== */
.candidate-list {
  display: flex; flex-direction: column;
  gap: 10px; margin-top: 10px;
}
.candidate-card {
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: start;
  transition: border-color .12s, box-shadow .12s;
}
.candidate-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-1);
  background: var(--accent-soft);
}
.candidate-check {
  width: 22px; height: 22px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}
.candidate-body { min-width: 0; }
.candidate-title {
  font-weight: 600; font-size: 14px;
  color: var(--text); line-height: 1.3;
  margin-bottom: 4px;
}
.candidate-meta {
  font-size: 12px; color: var(--muted);
  line-height: 1.5;
}
.candidate-meta .price {
  font-weight: 600; color: var(--text);
}
.candidate-meta .cert {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 600;
  font-size: 11px;
}
.candidate-meta .cert.low { background: #c1952420; color: var(--yellow); }
.candidate-reason {
  font-size: 12px; color: var(--text-2);
  margin-top: 4px; line-height: 1.4;
}

.compare-bar {
  position: sticky;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  gap: 8px; align-items: center;
  background: var(--panel);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-top: 10px;
  box-shadow: var(--shadow-2);
  z-index: 5;
}
.compare-bar .label { flex: 1; font-size: 13px; color: var(--text); }
.compare-bar .label strong { color: var(--accent); }

/* ========== DEAL CARD ========== */
.deal-card { position: relative; cursor: pointer; }
.deal-card:active { transform: scale(0.99); }
.deal-card.pushed { border-left: 3px solid var(--green); }
.deal-card.approved { border-left: 3px solid var(--blue); }
.deal-card.watchlist { border-left: 3px solid var(--yellow); }
.deal-card.rejected { opacity: 0.55; }

.deal-card.hot {
  border: 1px solid var(--accent);
  background: linear-gradient(135deg, rgba(232,93,31,.05) 0%, var(--panel) 70%);
  box-shadow: 0 4px 16px rgba(232,93,31,.15);
}
.deal-card.hot::before {
  content: "🔥 TOP";
  position: absolute;
  top: -10px; right: 12px;
  background: var(--accent); color: #fff;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.5px;
}
.deal-score {
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 13px;
  min-width: 44px;
  flex-shrink: 0;
}
.deal-score.low { background: var(--yellow); }
.deal-score.high { background: var(--green); }

.price-row { display: flex; align-items: baseline; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.price-final { font-weight: 700; font-size: 22px; letter-spacing: -0.02em; color: var(--text); }
.price-sticker { color: var(--muted); text-decoration: line-through; font-size: 14px; }
.price-discount {
  color: var(--green);
  background: var(--green-soft);
  padding: 2px 8px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}

/* v0.7.0 — Baseline-block: gangbare prijs vergelijking */
.baseline-block {
  margin: 10px 0 6px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  font-size: 13px;
}
.baseline-block .lbl { color: var(--muted); font-size: 12px; }
.baseline-block .val { color: var(--baseline); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.baseline-block .val.green { color: var(--green); }
.baseline-block .val.red { color: var(--red); }
.baseline-block .quality {
  grid-column: 1 / -1;
  font-size: 11px; color: var(--muted);
  font-style: italic;
}

/* v0.10.0 — Sniper-mode/Stealth opties met uitleg */
.opt-row {
  margin: 10px 0 14px;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.opt-row label {
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
}
.opt-row input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: var(--accent);
}
.opt-hint {
  margin-top: 6px; margin-left: 26px;
  font-size: 12px; color: var(--muted);
  line-height: 1.5;
}

/* v0.10.0 — Progress overlay tijdens AI-wait */
.ai-progress {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  padding: 20px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-top: 10px;
}
.ai-progress .spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
.ai-progress .label {
  font-size: 14px; font-weight: 500; color: var(--text);
}
.ai-progress .sub {
  font-size: 12px; color: var(--muted);
  text-align: center;
}

/* ========== v0.11.0 — Wens-card Apple-stijl ========== */
.wish-card { padding: 16px; border-radius: 18px; box-shadow: var(--shadow-1); }
.wish-card .desc {
  color: var(--muted); font-size: 13px; margin-top: 4px;
  line-height: 1.5;
}
.wish-status {
  display: flex; align-items: center; gap: 6px;
  background: var(--panel-2);
  border-radius: 999px; padding: 5px 12px;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.wish-status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
}
.wish-status .dot.ok { background: var(--green); }
.wish-status .dot.warn { background: var(--red); }
.wish-status .dot.pulse {
  background: var(--accent);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Top-N selector */
.topn-row {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 10px;
  flex-wrap: wrap;
}
.topn-label { font-size: 13px; color: var(--muted); }
.topn-pills { display: flex; gap: 4px; }
.topn-pill {
  background: var(--panel-2); border: 1px solid var(--line);
  color: var(--muted); border-radius: 999px;
  padding: 4px 12px; font-size: 13px; font-weight: 600;
  min-height: 32px; min-width: 36px;
}
.topn-pill.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.topn-cost { font-size: 11px; margin-left: auto; }

/* Top-N lijst (productlijst per wens) */
.topn-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.topn-item {
  display: grid; grid-template-columns: auto 1fr; gap: 10px;
  padding: 12px; background: var(--panel-2);
  border: 1px solid var(--line-soft); border-radius: 12px;
  align-items: start;
  transition: border-color .12s, background .12s;
}
.topn-item-nocheck { grid-template-columns: 1fr; }
.topn-item.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.topn-check {
  width: 20px; height: 20px; margin-top: 4px;
  accent-color: var(--accent); cursor: pointer;
}
.topn-body { min-width: 0; }
.topn-head {
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.topn-rank { color: var(--muted); font-weight: 700; }
.topn-title { font-size: 15px; flex: 1; min-width: 0; }
.topn-price {
  font-size: 17px; font-weight: 700;
  color: var(--accent); letter-spacing: -0.02em;
}
.topn-meta {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  font-size: 12px; color: var(--text-2); margin-top: 4px;
}
.topn-reason {
  font-size: 12px; color: var(--muted);
  margin-top: 6px; line-height: 1.5;
}
.topn-link {
  display: inline-block; margin-top: 8px;
  color: var(--accent); font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.topn-link:active { text-decoration: underline; }

.link-badge {
  display: inline-block;
  padding: 1px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 600;
}
/* v0.28.5 — Pluspunten/minpunten + key_specs per cand (Gemini-chat-niveau) */
.topn-prosfond {
  margin: 6px 0; padding: 8px 10px;
  background: rgba(0,0,0,0.02); border-radius: 6px;
  font-size: 12px; line-height: 1.45;
}
.topn-pros { color: var(--green); margin-bottom: 3px; }
.topn-cons { color: #c44a3a; }
.topn-pros strong, .topn-cons strong { font-weight: 800; margin-right: 4px; }
.topn-specs {
  display: flex; flex-wrap: wrap; gap: 4px 6px;
  margin: 6px 0;
}
.spec-chip {
  font-size: 11px; padding: 2px 7px; border-radius: 4px;
  background: var(--accent-soft, #f3f4f6); color: var(--text-muted, #4b5563);
  border: 1px solid var(--border, #e5e7eb);
}
.spec-k { font-weight: 600; color: var(--text, #1f2937); margin-right: 3px; text-transform: capitalize; }
[data-theme="dark"] .topn-prosfond { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .spec-chip { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); }

.link-badge.ok { background: var(--green-soft); color: var(--green); }
.link-badge.mid { background: #fbbf2420; color: var(--yellow); }
.link-badge.bad { background: #c44a3a18; color: var(--red); }
/* v0.28.1 — AI-suggesties modus (Dana's Optie A): geel badge + tooltip */
.link-badge.ai-sugg {
  background: #fbbf2433;
  color: #b45309;
  border: 1px solid #fbbf24;
  cursor: help;
}
.topn-item.topn-ai-sugg {
  border-left: 3px solid #fbbf24;
  background: linear-gradient(90deg, #fffbeb 0%, transparent 18%);
}
[data-theme="dark"] .topn-item.topn-ai-sugg {
  background: linear-gradient(90deg, #78350f33 0%, transparent 18%);
}
[data-theme="dark"] .link-badge.ai-sugg {
  background: #78350f55;
  color: #fbbf24;
  border-color: #b45309;
}

.advice-box {
  margin-top: 12px; padding: 12px 14px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 100%);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  font-size: 13px; line-height: 1.5; color: var(--text);
}

/* ========== v0.12.0 — Compact wens-list + uitvouwbare detail ========== */
.wish-card.collapsed .wish-body { display: none; }
.wish-card.collapsed { padding: 10px 14px; }
.wish-card .wish-summary {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0.03);
}
.wish-card .wish-summary:active { opacity: 0.7; }
.wish-card .wish-summary h3 { margin: 0; }
.wish-card .wish-chevron {
  font-size: 22px; color: var(--accent); font-weight: 700;
  transition: transform .15s;
  flex-shrink: 0; width: 18px; text-align: center;
}
.wish-card:not(.collapsed) .wish-chevron { transform: rotate(90deg); }
.wish-card:not(.collapsed) {
  border-left: 3px solid var(--accent);
}

/* v0.32.0 — Sluit alle knop bovenaan */
.collapse-all-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0 10px;
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
}

/* Comparison table */
.compare-block {
  margin-top: 16px;
  overflow-x: auto;
}
.compare-block h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--text);
}
.compare-block table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 500px;
}
.compare-block th, .compare-block td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.compare-block th {
  background: var(--panel-2);
  font-weight: 600;
  color: var(--text);
  position: sticky; left: 0; z-index: 1;
}
.compare-block tr:nth-child(odd) td { background: var(--panel-2); }

/* Full report markdown rendering */
.report-block {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px; line-height: 1.65;
  color: var(--text-2);
}
.report-block h1, .report-block h2, .report-block h3 {
  color: var(--text);
  margin: 12px 0 6px;
  font-size: 15px;
}
.report-block h1 { font-size: 17px; }
.report-block ul, .report-block ol { margin: 6px 0 6px 18px; padding: 0; }
.report-block li { margin: 3px 0; }
.report-block table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 12px; }
.report-block th, .report-block td { border: 1px solid var(--line); padding: 5px 7px; }
.report-block th { background: var(--panel-3); }
.report-block a { color: var(--accent); text-decoration: underline; }
.report-block code {
  background: var(--panel-3); padding: 1px 5px;
  border-radius: 4px; font-size: 12px;
}
.report-block strong { color: var(--text); }

/* ZGAN-badge */
.tag.zgan {
  background: #8d6cb820; color: var(--purple);
  border-color: var(--purple);
}

/* ========== FORMS ========== */
textarea, input[type=text], input[type=number], input[type=search] {
  width: 100%;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font: inherit;
  resize: vertical;
  min-height: var(--touch);
}
textarea { line-height: 1.5; }
textarea:focus, input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-color: var(--accent);
}
label { display: block; padding: 6px 0; }
.muted { color: var(--muted); font-size: 13px; }

/* v0.19.0 — Drempel-info-strook in wens-card */
.threshold-info {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}
.threshold-info.hit {
  background: var(--green-soft);
  border-left-color: var(--green);
  border-color: var(--green);
  color: var(--green);
}
.wish-status.hit {
  background: var(--green-soft);
  color: var(--green);
}
.topn-item.topn-hit {
  border-color: var(--green);
  background: linear-gradient(135deg, var(--green-soft) 0%, var(--panel-2) 100%);
  box-shadow: 0 0 0 1px var(--green);
}

.threshold-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px; align-items: center;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 8px;
}
.threshold-row input { min-height: 40px; padding: 8px 10px; background: #fff; }
.threshold-row .th-variant { grid-column: 1 / -1; }
.threshold-row .th-del {
  width: 40px; height: 40px;
  padding: 0;
  font-size: 18px; line-height: 1;
}
@media (min-width: 480px) {
  .threshold-row { grid-template-columns: 1.2fr 1fr 1fr auto; }
  .threshold-row .th-variant { grid-column: auto; }
}

/* ========== MODAL ========== */
.modal {
  position: fixed; inset: 0;
  background: rgba(42, 36, 30, 0.5);
  z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-content {
  background: var(--panel);
  width: 100%; max-width: 600px;
  max-height: 92dvh; overflow-y: auto;
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex; flex-direction: column;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  box-shadow: var(--shadow-3);
  animation: slideUp 0.22s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideUp { from { transform: translateY(20px); } to { transform: translateY(0); } }

/* v0.23.0 — Categorie-filter chips bovenaan (segmented control) */
.cat-bar {
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 6px 2px 10px;
  position: sticky;
  top: 56px;
  z-index: 8;
  background: var(--bg);
  margin-bottom: 4px;
}
.cat-bar::-webkit-scrollbar { display: none; }
.cat-chip {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 34px;
  cursor: pointer;
}
.cat-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* v0.22.0 — Provider-badge per kandidaat (welke AI vond het) */
.provider-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  font-size: 10px; font-weight: 700;
  color: #fff;
  background: var(--muted);
  margin-right: 2px;
  cursor: help;
}
.provider-badge.provider-gemini_pro { background: #4a6fa5; }
.provider-badge.provider-claude_code { background: var(--accent); }
.provider-badge.provider-deepseek { background: #5b8a4e; }
.provider-badge.provider-anthropic_api { background: #8d6cb8; }

@media (min-width: 600px) {
  .modal { align-items: center; }
  .modal-content { border-radius: var(--radius); max-height: 88dvh; }
}

.modal-header {
  position: sticky; top: 0; z-index: 2;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-header h2 {
  margin: 0; font-size: 17px; font-weight: 600;
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.modal-header .close {
  background: transparent; border: none;
  color: var(--text); font-size: 26px; line-height: 1;
  min-width: var(--touch); min-height: var(--touch);
  border-radius: var(--radius-xs);
}
.modal-header .close:active { background: var(--panel-2); }
.modal-body {
  padding: 16px 18px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.modal-body > *:first-child { margin-top: 0; }
.hidden { display: none !important; }

/* Compare-modal table-rendering */
.compare-result {
  font-size: 14px; line-height: 1.6;
}
.compare-result table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 13px;
}
.compare-result th, .compare-result td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}
.compare-result th {
  background: var(--panel-2);
  font-weight: 600;
  color: var(--text);
}
.compare-result td:first-child {
  font-weight: 600;
  background: var(--panel-2);
  color: var(--baseline);
}
.compare-result .summary,
.compare-result .recommendation {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  margin: 10px 0;
}
.compare-result .summary {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
}
.compare-result .recommendation {
  background: var(--green-soft);
  border-left: 3px solid var(--green);
}

/* ========== PULL-TO-REFRESH ========== */
.ptr {
  position: fixed; top: 0; left: 0; right: 0;
  height: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  background: var(--panel-3);
  color: var(--muted); font-size: 13px;
  transition: height 0.2s ease;
  z-index: 50;
}
.ptr.pulling { height: 60px; }
.ptr.ready { height: 60px; background: var(--accent-soft); color: var(--accent); }
.ptr.refreshing { height: 60px; }
.ptr-arrow { display: inline-block; transition: transform 0.2s; font-size: 18px; }
.ptr.ready .ptr-arrow { transform: rotate(180deg); }
.ptr.refreshing .ptr-arrow { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== UPDATE BANNER ========== */
.update-banner {
  position: sticky; top: 0; z-index: 49;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
  font-size: 14px; font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.update-banner .secondary {
  background: rgba(255,255,255,0.20);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 6px 12px;
  min-height: 36px;
}

/* ========== FOOTER ========== */
.app-footer {
  margin-top: 30px;
  padding: 16px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex; justify-content: center; align-items: center;
  gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.app-footer .version-tag {
  background: var(--panel-2);
  border: 1px solid var(--line);
  padding: 3px 9px;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
}
.app-footer .sync-status.online { color: var(--green); }
.app-footer .sync-status.offline { color: var(--red); }
.app-footer .sync-status.stale { color: var(--yellow); }
.app-footer a { color: var(--blue); text-decoration: none; }
.app-footer a:active { text-decoration: underline; }

#changelogBody {
  font-size: 13px;
  white-space: pre-wrap;
  font-family: ui-monospace, "SF Mono", monospace;
  line-height: 1.6;
}
#changelogBody h1, #changelogBody h2 {
  font-family: -apple-system, system-ui, sans-serif;
  margin: 14px 0 6px;
}
#changelogBody h2 { color: var(--accent); }
#changelogBody h3 { color: var(--muted); font-size: 13px; margin: 8px 0 4px; }

#intakeConstraints {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px; max-height: 240px; overflow-y: auto;
  font-size: 12px; color: var(--text-2);
  white-space: pre-wrap; word-break: break-word;
}

.intake-q {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px; margin-bottom: 10px;
}
.intake-q .q { font-weight: 600; margin-bottom: 8px; }

details > summary {
  cursor: pointer;
  padding: 10px 0;
  font-weight: 500;
  list-style: none;
  color: var(--text-2);
}
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: "▶";
  display: inline-block;
  margin-right: 8px;
  font-size: 10px;
  transition: transform .15s;
  color: var(--accent);
}
details[open] > summary::before { transform: rotate(90deg); }

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  border: 1px solid var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  z-index: 200; max-width: 90%;
  box-shadow: var(--shadow-2);
  font-size: 14px;
}

/* ========== STATUS ========== */
.health-line {
  display: flex; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--line-soft);
  gap: 12px;
}
.health-line:last-child { border-bottom: none; }
.health-line .v {
  font-family: ui-monospace, monospace;
  font-size: 13px; color: var(--muted);
  text-align: right;
  word-break: break-all;
}
.health-line.ok .v { color: var(--green); }
.health-line.warn .v { color: var(--yellow); }
.health-line.err .v { color: var(--red); }

.prov-step {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 8px; padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.prov-step:last-child { border-bottom: none; }
.prov-step .step { color: var(--accent); font-weight: 600; }
.prov-step .actor { color: var(--muted); word-break: break-word; }
.prov-step .cost { font-family: ui-monospace, monospace; color: var(--muted); }

/* ========== EMPTY ========== */
.empty {
  text-align: center; padding: 48px 20px;
  color: var(--muted);
}
.empty .icon { font-size: 52px; margin-bottom: 14px; opacity: 0.6; }
.empty .text { font-size: 14px; }

/* ============================================================
   v0.24.0 — Primary tabs (Wensen / Top deals)
   ============================================================ */
.primary-tabs {
  position: sticky;
  top: calc(56px + env(safe-area-inset-top, 0px));
  z-index: 9;
  display: flex;
  gap: 4px;
  padding: 8px 14px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  max-width: 700px;
  margin: 0 auto;
}
.ptab {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  min-height: 40px;
  transition: all .15s ease;
}
.ptab.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 2px 10px rgba(232, 93, 31, .25);
}
.ptab:active { transform: scale(.97); }

/* Status-kleur linkerrand op item-card */
.wish-card.status-hit { border-left: 4px solid var(--green); }
.wish-card.status-ok { border-left: 4px solid var(--blue); }
.wish-card.status-pending { border-left: 4px solid var(--accent); }
.wish-card.status-error { border-left: 4px solid var(--red); }
.wish-card.status-idle { border-left: 4px solid var(--line); }

/* Error-block met retry-uitleg */
.error-block {
  background: #fdf4f2;
  border: 1px solid #f5cdc4;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 10px 0;
}

/* topn price-block (totaalprijs prominent + breakdown muted) */
.topn-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  line-height: 1.15;
}
.topn-price-sub {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

/* ============================================================
   v0.24.0 — Top Deals tab
   ============================================================ */
.deals-header { padding: 0; }
.deals-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px 0;
}
.deals-filter-row .chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 4px 12px;
  font-size: 13px;
}
.deals-filter-row .chip.chip-hit {
  background: var(--green-soft);
  border-color: var(--green);
  color: var(--green);
}
.deals-filter-row .chip.chip-hit.active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}
.deals-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 6px 0 14px 0;
  padding: 8px 12px;
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft);
  font-size: 13px;
}
.deals-stat { color: var(--text-2); }
.deals-stat strong { font-size: 15px; color: var(--text); }
.deals-stat.hit strong { color: var(--green); }

.deal-card-flat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-1);
  transition: box-shadow .15s ease, transform .08s ease;
}
.deal-card-flat:hover { box-shadow: var(--shadow-2); }
.deal-card-flat.is-hit {
  background: linear-gradient(180deg, #f0f7ed 0%, var(--panel) 60%);
  border-color: var(--green);
  box-shadow: 0 4px 16px rgba(91, 138, 78, 0.15);
}
.deal-card-flat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.deal-wish-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-soft);
  text-transform: uppercase;
  letter-spacing: .02em;
}
.deal-price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.deal-title {
  margin: 4px 0 2px 0;
  font-size: 16px;
  letter-spacing: -0.005em;
}
.deal-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 6px 0;
}
.deal-reason {
  font-size: 12px;
  line-height: 1.4;
  margin: 6px 0 8px 0;
}

/* ============================================================
 * v0.25 — Per-candidate feedback (Netflix/TikTok-pattern)
 * ============================================================ */
.cand-feedback {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  justify-content: flex-end;
}
.fb-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  width: 36px;
  height: 36px;
  font-size: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  min-height: 36px;
  padding: 0;
}
.fb-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.04);
}
.fb-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.95);
}
.fb-btn:focus-visible {
  outline: 2px solid var(--accent, #ff6b35);
  outline-offset: 2px;
}
.fb-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}
.fb-like:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
}
.fb-dislike:hover:not(:disabled),
.fb-block:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}
.fb-refine:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
}

/* Like-pulse animatie */
@keyframes fb-like-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50%  { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.topn-item.fb-liked {
  animation: fb-like-pulse 1s ease-out;
}

/* Optimistic-remove animatie (dislike + excludes) */
@keyframes fb-collapse {
  0%   { opacity: 1; transform: translateX(0); max-height: 500px; margin-bottom: 12px; }
  60%  { opacity: 0; transform: translateX(-20px); max-height: 500px; }
  100% { opacity: 0; transform: translateX(-20px); max-height: 0; margin-bottom: 0; padding: 0; }
}
.topn-item.fb-removing {
  animation: fb-collapse 0.4s ease-in-out forwards;
  overflow: hidden;
  pointer-events: none;
}

/* Exclude-menu (pop-over) */
.exclude-menu {
  position: absolute;
  z-index: 9999;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  width: 260px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: menu-pop-in 0.18s ease-out;
}
@keyframes menu-pop-in {
  0%   { opacity: 0; transform: scale(0.96) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.exclude-menu button {
  background: transparent;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  color: var(--text, #2c1810);
  transition: background 0.12s ease;
}
.exclude-menu button:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.04);
}
.exclude-menu button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.exclude-menu button strong {
  font-weight: 600;
}
.exclude-menu button .muted {
  font-size: 11px;
  color: rgba(0, 0, 0, 0.5);
  font-weight: 400;
}
.exclude-menu button.cancel {
  margin-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 10px;
  color: rgba(0, 0, 0, 0.6);
  text-align: center;
  display: block;
}

/* ============================================================
 * v0.25 — Skeleton loaders (geen blanke flash bij refresh)
 * ============================================================ */
.skeleton {
  background: linear-gradient(90deg,
    rgba(0, 0, 0, 0.05) 25%,
    rgba(0, 0, 0, 0.09) 50%,
    rgba(0, 0, 0, 0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
  color: transparent;
  user-select: none;
}
@keyframes skeleton-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton-card {
  background: white;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.skeleton-card .skeleton-title {
  height: 18px;
  width: 60%;
  margin-bottom: 10px;
}
.skeleton-card .skeleton-line {
  height: 12px;
  width: 90%;
  margin-bottom: 6px;
}
.skeleton-card .skeleton-line.short {
  width: 40%;
}

/* ============================================================
 * v0.25 — Accessibility helpers
 * ============================================================ */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
 * v0.25 — Empty-states met CTA (geen lege schermen)
 * ============================================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: rgba(44, 24, 16, 0.6);
}
.empty-state .icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state .title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text, #2c1810);
}
.empty-state .sub {
  font-size: 13px;
  max-width: 280px;
  margin: 0 auto 16px auto;
  line-height: 1.5;
}
.empty-state .cta {
  display: inline-block;
  background: var(--accent, #ff6b35);
  color: white;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
}

/* ============================================================
 * v0.25.7 — Bottom-nav voor mobile (thumb-zone, Material/Apple-style)
 * Verborgen op desktop. ≤600px = mobile.
 * ============================================================ */
.bottom-nav {
  display: none;
}
@media (max-width: 600px) {
  .bottom-nav {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-top: 1px solid var(--line);
    padding: 4px 4px max(4px, env(safe-area-inset-bottom)) 4px;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  }
  .bottom-nav .bnav {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 11px;
    padding: 6px 4px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
    min-height: 52px;
  }
  .bottom-nav .bnav-icon {
    font-size: 22px;
    line-height: 1;
  }
  .bottom-nav .bnav-label {
    font-size: 10px;
    font-weight: 500;
  }
  .bottom-nav .bnav.active {
    color: var(--accent);
  }
  .bottom-nav .bnav.active .bnav-icon {
    transform: scale(1.08);
  }
  .bottom-nav .bnav:active {
    background: var(--panel-3);
  }
  /* Verberg desktop top-tabs op mobile */
  .primary-tabs {
    display: none;
  }
  /* Voeg ruimte onderaan om laatste content niet onder de bottom-nav te verstoppen */
  main, .app-footer {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
}
