/* ============================================================
   shared.css — Box 3 de Baas
   Gedeelde stijlen voor alle pagina's.
   Pagina-specifieke stijlen staan in de <style> van elke pagina.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  --bg:        #f4f6f9;
  --surface:   #ffffff;
  --surface2:  #e8f0fb;
  --border:    #d0d9e8;
  --border2:   #aab6cc;
  --accent:    #1565c0;
  --accent-lt: #e3f2fd;
  --accent2:   #AA8C55;
  --accent2-lt:#fff3e0;
  --warn:      #e65100;
  --warn-lt:   #fff3e0;
  --danger:    #dc2626;
  --danger-lt: #fef2f2;
  --text:      #1a1f2e;
  --text2:     #3d4a5c;
  --muted:     #7a8899;
  --radius:    8px;
  --shadow:    0 1px 3px rgba(0,0,0,.07), 0 4px 12px rgba(0,0,0,.04);
  --shadow-lg: 0 4px 16px rgba(0,0,0,.1);
  --font:      'DM Sans', sans-serif;
  --serif:     'DM Sans', sans-serif;
  --mono:      'DM Mono', monospace;
}

/* ── Base ──────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
}

/* ── Layout ────────────────────────────────────────────────── */
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }

/* ── Header ────────────────────────────────────────────────── */
header {
  background: #154273;
  border-bottom: none;
  position: sticky; top: 0; z-index: 100;
  padding: 12px 0;
}
header .inner { display: flex; align-items: center; gap: 16px; }
.brand { font-family: 'Roboto', sans-serif; font-size: 20px; font-weight: 700; line-height: 1; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand em { color: #87CEEB; font-style: normal; }
.brand .logo { width: 28px; height: 28px; object-fit: contain; display: block; flex-shrink: 0; margin-top: -1px; }

/* ── Hamburger ─────────────────────────────────────────────── */
.hamburger-btn {
  background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: 8px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  width: 38px; height: 38px;
  transition: all .15s;
}
.hamburger-btn:hover { background: rgba(255,255,255,0.12); }
.hamburger-btn span { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 0; align-self: center; }

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
  padding: 20px 20px 16px;
  background: #154273;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.sidebar-logo { font-family: 'Roboto', sans-serif; font-size: 20px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }
.sidebar-logo em { color: #87CEEB; font-style: normal; }
.sidebar-logo .logo { width: 24px; height: 24px; object-fit: contain; display: block; }

.sidebar-close {
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.6); font-size: 20px; padding: 4px;
  border-radius: 6px; transition: all .15s;
}
.sidebar-close:hover { background: rgba(255,255,255,.12); color: #fff; }

.sidebar-nav { padding: 12px 0; flex: 1; min-height: 0; overflow-y: auto; }

.sidebar-section {
  padding: 4px 16px 2px;
  font-size: 10px; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 1px; margin-top: 12px; display: block;
}

.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  font-size: 14px; font-weight: 500;
  color: var(--text2); text-decoration: none;
  cursor: pointer; transition: all .15s;
  border: none; background: none; width: 100%;
  text-align: left; position: relative;
  box-sizing: border-box;
}
.sidebar-item:hover { background: var(--surface2); color: var(--text); }
.sidebar-item.active { color: var(--accent); background: var(--accent-lt); font-weight: 600; }
.sidebar-item .si-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }
.sidebar-item .si-arrow { margin-left: auto; font-size: 11px; transition: transform .2s; }
.sidebar-item.expanded .si-arrow { transform: rotate(90deg); }

.sidebar-subitems {
  display: none;
  border-left: 2px solid var(--border2);
  margin-left: 20px;
}
.sidebar-subitems.open { display: block !important; }

.sidebar-subitem {
  display: block !important; width: 100%;
  padding: 7px 16px 7px 18px;
  font-size: 13px; color: var(--text2);
  text-decoration: none; transition: all .15s;
  box-sizing: border-box;
}
.sidebar-subitem:hover { color: var(--accent); background: var(--accent-lt); font-weight: 500; }
.sidebar-subitem::before { content: '· '; color: var(--muted); }
.sidebar-subitem.active { color: var(--accent); font-weight: 600; }
.sidebar-subitem.disabled { opacity: 0.4; pointer-events: none; cursor: default; }
.sidebar-subitem.disabled::after { content: ' (binnenkort)'; font-size: 10px; color: var(--muted); }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
  flex-shrink: 0;
}

/* ── Hero (premium pagina's) ───────────────────────────────── */
.hero { padding: 40px 0 32px; }
.hero h1 { font-family: var(--serif); font-size: clamp(24px,4vw,34px); font-weight: 600; margin-bottom: 8px; }
.hero p { color: var(--text2); margin-bottom: 0; }
.badge-premium,
.premium-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-lt); color: var(--accent);
  font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 20px;
  border: 1px solid #90caf9; margin-bottom: 16px;
}

/* ── Card ──────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  margin-bottom: 20px; box-shadow: var(--shadow);
}
.card-title {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); margin-bottom: 16px;
}

/* ── Knoppen ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 8px;
  border: none; cursor: pointer;
  font-family: var(--font); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all .15s; line-height: 1.4;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #0d47a1; }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border2); }
.btn-ghost:hover { background: var(--surface2); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid #fca5a5; }
.btn-danger:hover { background: var(--danger-lt); }
.btn-icon { padding: 6px 10px; }
.btn-sm   { padding: 4px 10px; font-size: 12px; }

/* ── Groei-tabel: edit-knop alleen zichtbaar bij hover ─────────── */
.groei-edit-btn { opacity: 0; transition: opacity .15s; vertical-align: middle; margin-left: 4px; }
.groei-rij:hover .groei-edit-btn { opacity: 1; }

/* ── Preset-knoppen (gedeeld: lopend-jaar, vermogensgroei) ──── */
.preset-rij { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.preset-btn { flex: 1; min-width: 90px; padding: 7px 10px; border: 1px solid var(--border2); border-radius: 7px; background: var(--surface); font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--text2); cursor: pointer; text-align: center; transition: all .15s; white-space: nowrap; }
.preset-btn:hover { border-color: var(--accent); color: var(--accent); }
.preset-btn.actief { border-color: var(--accent); background: var(--accent-lt); color: var(--accent); font-weight: 700; }

/* ── Slider-rijen (gedeeld: lopend-jaar, vermogensgroei) ────── */
.rvsa-invoer-rij { margin-bottom: 0; }
.rvsa-label { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); display: flex; justify-content: space-between; align-items: center; }
.rvsa-slider-rij { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.rvsa-slider-rij input[type=range] { width: 100%; accent-color: var(--accent); }
.rvsa-pct-input { width: 52px; text-align: center; font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--accent); border: 1px solid var(--border2); border-radius: 6px; padding: 4px 6px; background: var(--bg); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.tabel-acties { display: flex; gap: 6px; justify-content: flex-end; }

/* ── Tab-toggle (gedeeld: lopend-jaar, fictief-vs-werkelijk, nieuwe-wet-2028) */
.tab-toggle { display: inline-flex; border: 1px solid var(--border2); border-radius: 8px; overflow: hidden; }
.tab-btn { padding: 7px 16px; border: none; background: transparent; font-family: var(--font); font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text2); border-right: 1px solid var(--border2); transition: all .15s; }
.tab-btn:last-child { border-right: none; }
.tab-btn.actief { background: var(--accent); color: #fff; }
.tab-btn:not(.actief):hover { background: var(--surface2); }

/* ── Hint / toelichting tekst (gedeeld) ────────────────────────────────── */
.hint { font-size: 11px; color: var(--muted); margin-top: 6px; }

/* ── Tabel ─────────────────────────────────────────────────── */
.tabel-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
  padding: 8px 10px; border-bottom: 2px solid var(--border); white-space: nowrap;
}
td { padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); }
.bedrag { font-family: var(--mono); text-align: right; white-space: nowrap; }
.pct    { font-family: var(--mono); text-align: right; white-space: nowrap; color: var(--text2); }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 500; white-space: nowrap; }
.tag-land           { background: #e0f2fe; color: #0369a1; }
.tag-ongeclassificeerd { background: #fef3c7; color: #92400e; }
.dv-subdetail td    { background: var(--bg2, #f8f9fa); border-top: none !important; }

/* Lege staat */
.leeg { text-align: center; padding: 48px 24px; color: var(--muted); }
.leeg p { margin-bottom: 16px; font-size: 15px; }

/* ── View-switch ───────────────────────────────────────────── */
.view-header {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 16px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.view-header h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 0; flex: 1; }
.view-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 24px; padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── Invoervelden ──────────────────────────────────────────── */
.veld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.veld label { font-size: 12px; font-weight: 500; color: var(--text2); }
.veld small { font-size: 11px; color: var(--muted); }
.veld input, .veld select {
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 7px; padding: 8px 12px;
  font-family: var(--font); font-size: 14px; color: var(--text); outline: none;
}
.veld input:focus, .veld select:focus { border-color: var(--accent); }
.veld-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .veld-grid2 { grid-template-columns: 1fr; } }

/* Euro-invoerveld */
.euro-wrap { position: relative; }
.euro-sym {
  position: absolute; left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none;
}
.euro-wrap input { padding-left: 24px; }

/* ── Footer ────────────────────────────────────────────────── */
footer {
  margin: 48px 0 32px; padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--muted); text-align: center;
}
footer a { color: var(--accent2); text-decoration: none; }

/* ── Utilities ─────────────────────────────────────────────── */
.mt8  { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mt24 { margin-top: 24px; }
.mt32 { margin-top: 32px; }
.hidden { display: none !important; }
.muted  { color: var(--muted); }
.mono   { font-family: var(--mono); }
.small  { font-size: 12px; }
.bold   { font-weight: 600; }

/* ── Animatie ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
