/* ====================================================================
   Savings — Design System
   Volledig thema via CSS-variabelen. Premium SaaS-uitstraling, responsive.
   ==================================================================== */

:root {
  /* Merk / accent — smaragdgroen (geld/sparen) */
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: #d1fae5;
  --primary-soft: #ecfdf5;

  /* Secundaire kleuren */
  --accent: #6366f1;
  --accent-light: #e0e7ff;

  /* Statuskleuren */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #0ea5e9;

  /* Neutrale tinten */
  --bg: #f1f5f9;
  --bg-alt: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #94a3b8;

  /* Vorm */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow: 0 4px 14px rgba(15,23,42,.07);
  --shadow-lg: 0 14px 40px rgba(15,23,42,.12);

  /* Lay-out */
  --sidebar-w: 264px;
  --header-h: 68px;
  --maxw: 1240px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

/* ---------- KNOPPEN ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(16,185,129,.28); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 8px 22px rgba(16,185,129,.38); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #4f46e5; }
.btn-ghost { background: transparent; color: var(--text-soft); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--text); border-color: var(--border-strong); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-light { background: var(--bg-alt); color: var(--text); border: 1px solid var(--border); }
.btn-light:hover { background: #eef2f7; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-lg { padding: 14px 24px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- ICONEN ---------- */
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 38px; height: 38px; }
.icon-sm { width: 16px; height: 16px; }

/* ---------- AVATAR ---------- */
.avatar {
  width: 44px; height: 44px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px; flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.avatar-lg { width: 92px; height: 92px; font-size: 34px; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }

/* ---------- FORMULIEREN ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13px; color: var(--text-soft); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, select.input:focus, textarea.input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(16,185,129,.14);
}
.input-icon { position: relative; }
.input-icon .input { padding-left: 42px; }
.input-icon .input-icon-svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-muted); pointer-events: none;
}
.input-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-error { border-color: var(--danger) !important; }

/* ---------- KAARTEN ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-hover { transition: box-shadow .2s ease, transform .2s ease; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.card-subtitle { font-size: 13px; color: var(--text-muted); }

/* ---------- LAYOUT: AUTH ---------- */
.auth-wrap {
  min-height: 100vh; display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.auth-hero {
  background: linear-gradient(150deg, #047857 0%, #10b981 45%, #34d399 100%);
  color: #fff; padding: 56px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-hero::after {
  content: ""; position: absolute; right: -120px; bottom: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.auth-hero::before {
  content: ""; position: absolute; right: 60px; top: -80px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,.07);
}
.auth-hero h1 { font-size: 38px; line-height: 1.15; font-weight: 800; position: relative; z-index: 1; }
.auth-hero p { font-size: 17px; opacity: .92; margin-top: 16px; max-width: 440px; position: relative; z-index: 1; }
.auth-hero-badges { display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.auth-hero-badge {
  background: rgba(255,255,255,.14); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: center; gap: 14px; max-width: 420px;
}
.auth-hero-badge svg { width: 24px; height: 24px; flex-shrink: 0; }
.auth-hero-badge b { display: block; }
.auth-hero-badge span { font-size: 13px; opacity: .85; }

.auth-panel {
  display: flex; align-items: center; justify-content: center; padding: 40px 28px;
  background: var(--surface);
}
.auth-card { width: 100%; max-width: 400px; }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.auth-logo .logo-mark {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(16,185,129,.35);
}
.auth-logo .logo-mark svg { width: 26px; height: 26px; }
.auth-logo b { font-size: 22px; font-weight: 800; }
.auth-logo small { display: block; font-size: 12px; color: var(--text-muted); font-weight: 500; }
.auth-card h2 { font-size: 26px; font-weight: 800; }
.auth-card .auth-sub { color: var(--text-soft); margin: 6px 0 26px; font-size: 14px; }

/* Alert / meldingen */
.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }

.auth-foot { text-align: center; margin-top: 22px; font-size: 14px; color: var(--text-soft); }
.auth-foot a { color: var(--primary); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

.demo-box {
  background: var(--bg-alt); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); padding: 14px; margin-top: 20px; font-size: 13px;
}
.demo-box b { display: block; margin-bottom: 6px; color: var(--text-soft); }
.demo-row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--text-soft); }
.demo-row code { background: var(--surface); padding: 1px 8px; border-radius: 5px; border: 1px solid var(--border); color: var(--primary-dark); font-size: 12px; }

/* ---------- APP LAY-OUT (sidebar + main) ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  transition: transform .26s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 20px 22px; height: var(--header-h); border-bottom: 1px solid var(--border); }
.sidebar-brand .logo-mark {
  width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(16,185,129,.3);
}
.sidebar-brand .logo-mark svg { width: 22px; height: 22px; }
.sidebar-brand b { font-size: 19px; font-weight: 800; }
.sidebar-brand small { display: block; font-size: 11px; color: var(--text-muted); font-weight: 500; }

.nav-section { padding: 16px 14px 6px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: 0 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--radius-sm);
  color: var(--text-soft); font-weight: 600; font-size: 14.5px;
  margin-bottom: 3px; transition: background .15s ease, color .15s ease;
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-item:hover { background: var(--bg-alt); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-dark); }
.nav-item.active svg { color: var(--primary); }
.nav-badge { margin-left: auto; background: var(--bg); color: var(--text-soft); font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: var(--radius-full); }
.nav-item.active .nav-badge { background: var(--primary); color: #fff; }

.sidebar-foot { margin-top: auto; padding: 14px; border-top: 1px solid var(--border); }
.user-mini { display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: var(--radius-sm); }
.user-mini .meta { overflow: hidden; }
.user-mini .meta b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini .meta span { font-size: 12px; color: var(--text-muted); }

/* Main */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--header-h); background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px; position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 20px; font-weight: 800; }
.topbar .crumb { font-size: 13px; color: var(--text-muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-soft); border: 1px solid transparent; transition: background .15s ease, border-color .15s ease;
  position: relative;
}
.icon-btn:hover { background: var(--bg-alt); border-color: var(--border); }
.icon-btn svg { width: 21px; height: 21px; }
.dot-badge { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.hamburger { display: none; }

.content { padding: 28px; max-width: var(--maxw); width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h2 { font-size: 24px; font-weight: 800; }
.page-head p { color: var(--text-soft); font-size: 14px; margin-top: 2px; }

/* ---------- STAT CARD GRID ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat-card { padding: 20px; position: relative; overflow: hidden; }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-card .stat-ico { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.stat-card .stat-ico svg { width: 23px; height: 23px; }
.ico-green { background: var(--primary-soft); color: var(--primary-dark); }
.ico-blue { background: #e0f2fe; color: #0369a1; }
.ico-purple { background: #ede9fe; color: #6d28d9; }
.ico-amber { background: #fef3c7; color: #b45309; }
.ico-red { background: #fee2e2; color: #b91c1c; }
.stat-card .stat-val { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.stat-trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; margin-top: 8px; }
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* ---------- GRID PATTERNS ---------- */
.grid-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.section-gap { margin-top: 28px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sec-head h3 { font-size: 17px; font-weight: 700; }
.sec-head a { font-size: 13px; color: var(--primary-dark); font-weight: 600; }
.sec-head a:hover { text-decoration: underline; }

/* ---------- DOELKAART (goal card) ---------- */
.goals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.goal-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.goal-head { display: flex; align-items: flex-start; gap: 12px; }
.goal-ico { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.goal-ico svg { width: 24px; height: 24px; }
.goal-title { font-weight: 700; font-size: 15.5px; }
.goal-cat { font-size: 12px; color: var(--text-muted); }
.goal-menu { margin-left: auto; }
.goal-amounts { display: flex; align-items: baseline; justify-content: space-between; }
.goal-current { font-size: 22px; font-weight: 800; }
.goal-target { font-size: 13px; color: var(--text-muted); }

/* Voortgangsbalk */
.progress { height: 10px; background: var(--bg); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--radius-full); transition: width .5s cubic-bezier(.4,0,.2,1); }
.progress-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-muted); }
.progress-meta b { color: var(--text); }
.goal-foot { display: flex; gap: 8px; }
.goal-foot .btn { flex: 1; }

/* Tag / chip */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-full); background: var(--bg-alt); color: var(--text-soft); border: 1px solid var(--border); }
.tag-green { background: var(--primary-soft); color: var(--primary-dark); border-color: #a7f3d0; }
.tag-amber { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.tag-red { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.tag-blue { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.tag-purple { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }

/* ---------- ACTIVITY / LIJSTEN ---------- */
.list-card { padding: 8px; }
.list-item { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: var(--radius-sm); }
.list-item:hover { background: var(--bg-alt); }
.list-ico { width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-ico svg { width: 20px; height: 20px; }
.list-body { flex: 1; min-width: 0; }
.list-body b { font-size: 14px; font-weight: 600; display: block; }
.list-body span { font-size: 12.5px; color: var(--text-muted); }
.list-meta { text-align: right; font-size: 12.5px; color: var(--text-muted); }
.list-meta b { font-size: 14px; font-weight: 700; }

/* Snelle acties */
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quick-action {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); transition: border-color .15s, box-shadow .15s, transform .12s;
}
.quick-action:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.quick-action .qa-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.quick-action .qa-ico svg { width: 20px; height: 20px; }
.quick-action b { font-size: 14px; display: block; }
.quick-action span { font-size: 12px; color: var(--text-muted); }

/* ---------- PROFIEL ---------- */
.profile-header { display: flex; align-items: center; gap: 22px; padding: 26px; margin-bottom: 22px; }
.profile-header .avatar { width: 84px; height: 84px; font-size: 32px; }
.profile-name { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.profile-meta { color: var(--text-soft); font-size: 14px; margin-top: 4px; display: flex; gap: 16px; flex-wrap: wrap; }
.profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-meta svg { width: 16px; height: 16px; color: var(--text-muted); }

.info-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 2px; border-bottom: 1px solid var(--border); }
.info-row:last-child { border-bottom: none; }
.info-row .info-label { display: flex; align-items: center; gap: 11px; color: var(--text-soft); font-size: 14px; }
.info-row .info-label svg { width: 18px; height: 18px; color: var(--text-muted); }
.info-row .info-value { font-weight: 600; }

/* ---------- TABEL ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
table.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--border); }
table.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover td { background: var(--bg-alt); }
.cell-user { display: flex; align-items: center; gap: 11px; }
.cell-user b { font-size: 14px; }
.cell-user span { font-size: 12.5px; color: var(--text-muted); }

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px; opacity: 0; transition: opacity .2s ease;
}
.modal-overlay.open { display: flex; opacity: 1; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  width: 100%; max-width: 460px; box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(.98); transition: transform .22s ease;
  max-height: 92vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 18px; font-weight: 700; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.modal-close { width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-muted); }
.modal-close:hover { background: var(--bg-alt); color: var(--text); }
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: var(--radius-full); cursor: pointer; border: 3px solid transparent; transition: transform .1s; }
.swatch:hover { transform: scale(1.12); }
.swatch.selected { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.icon-picker { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.icon-pick { aspect-ratio: 1; border-radius: 10px; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-soft); transition: all .12s; }
.icon-pick:hover { border-color: var(--primary); color: var(--primary); }
.icon-pick.selected { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-dark); }
.icon-pick svg { width: 22px; height: 22px; }

/* ---------- TOAST ---------- */
.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm); padding: 13px 16px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 11px; min-width: 260px; max-width: 360px;
  animation: toastIn .25s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
.toast svg { width: 20px; height: 20px; flex-shrink: 0; }
.toast.success svg { color: var(--success); }
.toast.error svg { color: var(--danger); }
.toast b { font-size: 14px; font-weight: 600; }
.toast span { font-size: 12.5px; color: var(--text-muted); }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Switch (toggle) */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: var(--border-strong); border-radius: var(--radius-full); transition: background .2s; cursor: pointer; }
.switch .slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: var(--shadow-sm); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* Setting row */
.set-row { display: flex; align-items: center; gap: 14px; padding: 16px 2px; border-bottom: 1px solid var(--border); }
.set-row:last-child { border-bottom: none; }
.set-row .set-info { flex: 1; }
.set-row .set-info b { font-size: 14.5px; font-weight: 600; display: block; }
.set-row .set-info span { font-size: 13px; color: var(--text-muted); }

/* Segmented tab */
.tabs { display: inline-flex; background: var(--bg); padding: 5px; border-radius: var(--radius-sm); gap: 3px; margin-bottom: 22px; flex-wrap: wrap; }
.tab { padding: 9px 18px; border-radius: 7px; font-size: 14px; font-weight: 600; color: var(--text-soft); transition: all .15s; }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab:hover:not(.active) { color: var(--text); }

/* Empty state */
.empty { text-align: center; padding: 44px 20px; color: var(--text-muted); }
.empty .empty-ico { width: 64px; height: 64px; border-radius: 16px; background: var(--bg); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.empty .empty-ico svg { width: 30px; height: 30px; color: var(--text-muted); }
.empty h4 { font-size: 16px; color: var(--text); margin-bottom: 4px; }
.empty p { font-size: 14px; max-width: 320px; margin: 0 auto 16px; }

/* 404 */
.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.nf-code { font-size: 96px; font-weight: 900; color: var(--primary); line-height: 1; }

/* Mobile overlay */
.scrim { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 55; display: none; }
.scrim.open { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  /* Sidebar wordt off-canvas */
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .hamburger { display: inline-flex; }
}

@media (max-width: 720px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
  .grid-3, .cols-2 { grid-template-columns: 1fr; }
  .content { padding: 18px; }
  .topbar { padding: 0 16px; }
  .topbar h1 { font-size: 17px; }
  .field-row { grid-template-columns: 1fr; }
  .goals-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-meta { justify-content: center; }
  .page-head { flex-direction: column; align-items: stretch; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
  .toast-stack { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; min-width: 0; }
  .icon-picker { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 420px) {
  .content { padding: 14px; }
  .stat-card .stat-val { font-size: 24px; }
}
