/* BespaarScanner — gedeelde stijlen */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
    --bg: #0f0f0f;
    --surface: #1a1a1a;
    --surface2: #242424;
    --border: #2e2e2e;
    --text: #f0f0f0;
    --muted: #d0d0d0;
    --accent: #c8f04a;
    --accent-dim: rgba(200, 240, 74, 0.12);
    --accent-donker: #a8d42a;
    --groen: #4ade80;
    --groen-dim: rgba(74, 222, 128, 0.12);
    --oranje: #fbbf24;
    --oranje-dim: rgba(251, 191, 36, 0.12);
    --rood: #f87171;
    --rood-dim: rgba(248, 113, 113, 0.12);
    --radius: 14px;
    --radius-sm: 8px;
    --schaduw: 0 4px 16px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

body {
    max-width: 420px;
    margin: 0 auto;
    padding-bottom: 80px;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ============================================================
   TYPOGRAFIE
   ============================================================ */

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

.mono { font-family: 'DM Mono', monospace; }
.prijs { font-family: 'DM Mono', monospace; font-weight: 500; }

a { color: var(--accent); text-decoration: none; }
a:active { opacity: 0.7; }

.muted { color: var(--muted); }
.klein { font-size: 13px; }

/* ============================================================
   HEADER
   ============================================================ */

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border);
}

.app-header .logo {
    font-weight: 600;
    font-size: 18px;
    color: var(--accent);
}

.app-header .tellers {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
}

.app-header .account-knop {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

/* ============================================================
   KNOPPEN
   ============================================================ */

.knop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    text-decoration: none;
}

.knop:active { transform: scale(0.98); }

.knop-primair {
    background: var(--accent);
    color: #0a0a0a;
}
.knop-primair:active { background: var(--accent-donker); }

.knop-secundair {
    background: var(--surface2);
    color: var(--accent);
    border: 1.5px solid var(--accent);
}
.knop-secundair:hover,
.knop-secundair:active {
    background: var(--accent-dim);
}

.knop-gevaar {
    background: var(--rood-dim);
    color: var(--rood);
    border: 1.5px solid var(--rood);
}

.knop-vol {
    width: 100%;
}

.knop-groot {
    min-height: 56px;
    font-size: 17px;
    font-weight: 600;
}

.knop-icoon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: var(--surface2);
    border: 1.5px solid var(--accent);
    color: var(--accent);
    min-height: auto;
    font-size: 16px;
}
.knop-icoon:hover,
.knop-icoon:active {
    background: var(--accent-dim);
}

.knop-tekst {
    background: transparent;
    color: var(--accent);
    border: none;
    padding: 8px 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    min-height: auto;
}
.knop-tekst:hover,
.knop-tekst:active {
    color: var(--accent-donker);
    text-decoration: underline;
}

/* ============================================================
   FORMULIEREN
   ============================================================ */

.veld {
    margin-bottom: 16px;
}

.veld label {
    display: block;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 6px;
}

input, select, textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

textarea { min-height: 80px; resize: vertical; }

input[type="range"] {
    min-height: auto;
    -webkit-appearance: none;
    appearance: none;
    background: var(--surface2);
    height: 6px;
    padding: 0;
    border: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

.slider-waarde {
    display: inline-block;
    font-family: 'DM Mono', monospace;
    color: var(--accent);
    font-weight: 500;
    margin-left: 8px;
}

/* ============================================================
   KAARTEN
   ============================================================ */

.kaart {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
}

.kaart-kop {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.kaart-actie {
    border: none;
    background: none;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
}

/* ============================================================
   BOTTOM NAVIGATIE
   ============================================================ */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 420px;
    margin: 0 auto;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 100;
}

.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px;
    color: #a0a0a0;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
}

.bottom-nav a.actief {
    color: var(--accent);
}

.bottom-nav .icoon {
    font-size: 22px;
    line-height: 1;
}

/* ============================================================
   LAADSTATEN
   ============================================================ */

.laden-overlay {
    position: fixed;
    inset: 0;
    max-width: 420px;
    margin: 0 auto;
    background: rgba(15, 15, 15, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 200;
    text-align: center;
    padding: 20px;
}

.laden-overlay.verborgen { display: none; }

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--surface2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: draai 1s linear infinite;
}

@keyframes draai {
    to { transform: rotate(360deg); }
}

.laden-tekst {
    color: var(--text);
    font-size: 16px;
    transition: opacity 0.3s;
}

/* Live prijsupdate balk */
.prijsupdate-balk {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.bron-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--muted);
}

.bron-status.klaar { color: var(--groen); }
.bron-status.bezig { color: var(--oranje); }
.bron-status.fout { color: var(--rood); }

/* ============================================================
   MELDINGEN / TOAST
   ============================================================ */

.toast {
    position: fixed;
    bottom: 90px;
    left: 20px;
    right: 20px;
    max-width: 380px;
    margin: 0 auto;
    padding: 14px 18px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--schaduw);
    z-index: 300;
    animation: toast-in 0.3s ease-out;
    font-size: 15px;
}

.toast.succes { border-color: var(--groen); }
.toast.fout { border-color: var(--rood); }

@keyframes toast-in {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: var(--surface2);
}

.badge-groen  { background: var(--groen-dim); color: var(--groen); }
.badge-oranje { background: var(--oranje-dim); color: var(--oranje); }
.badge-rood   { background: var(--rood-dim); color: var(--rood); }
.badge-accent { background: var(--accent-dim); color: var(--accent); }
.badge-goud   {
    background: linear-gradient(135deg, #c9a050 0%, #f4d17a 100%);
    color: #0a0a0a;
    font-weight: 600;
}

.pill {
    display: inline-block;
    padding: 6px 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    margin: 2px;
}

/* ============================================================
   HULPKLASSEN
   ============================================================ */

.verborgen { display: none !important; }

.rij {
    display: flex;
    gap: 12px;
    align-items: center;
}
.rij-tussen { justify-content: space-between; }
.rij-wrap { flex-wrap: wrap; }

.kolom { display: flex; flex-direction: column; gap: 12px; }

.midden { text-align: center; }
.vet { font-weight: 600; }

.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.inhoud {
    padding: 20px;
}

/* ============================================================
   SCANNER MODAL (ZXing)
   ============================================================ */

.scanner-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.95);
}

.scanner-overlay {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scanner-overlay video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.scanner-kader {
    position: relative;
    width: 80%;
    max-width: 300px;
    aspect-ratio: 4/3;
    border: 2px solid var(--accent);
    border-radius: var(--radius);
    z-index: 2;
}

.scanner-hoeken::before,
.scanner-hoeken::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid var(--accent);
}

.scanner-hoeken::before {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
}

.scanner-hoeken::after {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
}

.scanner-lijn {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--accent);
    animation: scan-lijn 2s ease-in-out infinite;
    box-shadow: 0 0 8px var(--accent);
}

@keyframes scan-lijn {
    0%, 100% { transform: translateY(-60px); }
    50% { transform: translateY(60px); }
}

.scanner-instructie {
    position: absolute;
    top: 20px;
    color: white;
    font-size: 16px;
    z-index: 3;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px 16px;
    border-radius: 999px;
}

.scanner-annuleer {
    position: absolute;
    bottom: 30px;
    padding: 14px 30px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    z-index: 3;
}

.scanner-fallback {
    position: absolute;
    bottom: 90px;
    left: 20px;
    right: 20px;
    background: var(--surface);
    padding: 16px;
    border-radius: var(--radius);
    z-index: 3;
}

.scanner-fallback label {
    display: block;
    color: var(--text);
    margin-bottom: 8px;
}

/* ============================================================
   MODAL (algemeen)
   ============================================================ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 400;
    animation: fade-in 0.2s;
}

.modal-inhoud {
    background: var(--surface);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 20px;
    animation: slide-up 0.3s;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-sluit {
    float: right;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface2);
    border: none;
    color: var(--text);
    font-size: 20px;
    cursor: pointer;
}

/* ============================================================
   LANDING PAGINA
   ============================================================ */

.landing {
    padding: 40px 24px;
    text-align: center;
}

.landing .hero {
    padding: 40px 0;
}

.landing .hero h1 {
    font-size: 32px;
    margin-bottom: 12px;
}

.landing .hero .tagline {
    color: var(--muted);
    font-size: 17px;
    margin-bottom: 32px;
}

.landing .features {
    display: grid;
    gap: 16px;
    margin: 32px 0;
    text-align: left;
}

.landing .feature {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border-radius: var(--radius);
}

.landing .feature .icoon {
    font-size: 28px;
    flex-shrink: 0;
}

/* ============================================================
   ONBOARDING
   ============================================================ */

.onboarding {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.onboarding .inhoud {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.onboarding .icoon {
    font-size: 80px;
    margin-bottom: 32px;
}

.onboarding h2 {
    margin-bottom: 16px;
}

.onboarding .bolletjes {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 24px 0;
}

.onboarding .bolletje {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--surface2);
}

.onboarding .bolletje.actief {
    background: var(--accent);
    width: 24px;
    border-radius: 4px;
}

/* ============================================================
   RESULTAATKAART (scan)
   ============================================================ */

.resultaat {
    animation: fade-in 0.3s;
}

.resultaat-kop {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.resultaat-kop .emoji {
    font-size: 48px;
    line-height: 1;
}

.resultaat-kop .info h3 {
    margin-bottom: 4px;
}

.zekerheid {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 999px;
    font-size: 12px;
    margin-top: 4px;
}

.marge-banner {
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-family: 'DM Mono', monospace;
}

.marge-banner.koop {
    background: var(--groen-dim);
    border: 1px solid var(--groen);
    color: var(--groen);
}
.marge-banner.wacht {
    background: var(--oranje-dim);
    border: 1px solid var(--oranje);
    color: var(--oranje);
}
.marge-banner.skip {
    background: var(--rood-dim);
    border: 1px solid var(--rood);
    color: var(--rood);
}

.marge-banner .groot {
    font-size: 22px;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.prijzen-lijst {
    margin-bottom: 16px;
}

.prijzen-lijst .regel {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.prijzen-lijst .regel:last-child { border-bottom: none; }

.prijzen-lijst .bron-label {
    color: var(--muted);
    font-size: 13px;
}

.prijzen-lijst .waarde {
    font-family: 'DM Mono', monospace;
    font-weight: 500;
}

.advies-banner {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-weight: 500;
}

.advies-banner.koop  { background: var(--groen-dim); color: var(--groen); border-left: 4px solid var(--groen); }
.advies-banner.wacht { background: var(--oranje-dim); color: var(--oranje); border-left: 4px solid var(--oranje); }
.advies-banner.skip  { background: var(--rood-dim); color: var(--rood); border-left: 4px solid var(--rood); }

.actieknoppen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.actieknoppen .knop-vol {
    grid-column: 1 / -1;
}

.seizoen-tip {
    padding: 14px;
    background: var(--accent-dim);
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.seizoen-tip .icoon {
    font-size: 22px;
}

/* ============================================================
   SCAN KNOPPEN (hoofdscherm)
   ============================================================ */

.scan-opties {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 20px;
}

.scan-knop {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    background: var(--surface);
    border: 1.5px solid var(--accent);
    border-radius: var(--radius);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 16px;
    width: 100%;
    transition: transform 0.1s;
}

.scan-knop:active { transform: scale(0.98); background: var(--surface2); }

.scan-knop.hoofd {
    background: var(--accent);
    color: #0a0a0a;
    border: none;
    padding: 28px 20px;
}

.scan-knop .icoon {
    font-size: 32px;
    line-height: 1;
}

.scan-knop .titel {
    font-weight: 500;
    margin-bottom: 2px;
}

.scan-knop .uitleg {
    font-size: 13px;
    opacity: 0.7;
}

/* ============================================================
   RECENTE SCANS
   ============================================================ */

.recente-scans {
    margin-top: 32px;
}

.recente-scan {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    align-items: center;
}

.recente-scan .emoji {
    font-size: 28px;
    width: 40px;
    text-align: center;
}

.recente-scan .info {
    flex: 1;
    min-width: 0;
}

.recente-scan .info .naam {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recente-scan .info .detail {
    font-size: 13px;
    color: var(--muted);
}

/* ============================================================
   AUTH (login / registratie)
   ============================================================ */

.auth {
    padding: 40px 24px;
}

.auth h2 { margin-bottom: 24px; text-align: center; }

.auth .tabs {
    display: flex;
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 24px;
}

.auth .tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
}

.auth .tab.actief {
    background: var(--accent);
    color: #0a0a0a;
}

/* ============================================================
   DESKTOP aanpassingen
   ============================================================ */

@media (min-width: 500px) {
    body {
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.4);
        min-height: calc(100vh - 40px);
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: var(--radius);
        overflow: hidden;
    }
}

/* ============================================================
   UITLEGPAGINA (hoe-werkt-het.html)
   ============================================================ */

.uitleg-blok {
    margin-bottom: 20px;
}
.uitleg-blok h2 {
    margin-bottom: 12px;
    color: var(--text);
}
.uitleg-blok p {
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.6;
}
.uitleg-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.uitleg-header h2 {
    margin-bottom: 0;
}
.uitleg-icoon {
    font-size: 28px;
    display: inline-block;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    flex-shrink: 0;
}
.uitleg-lijst {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}
.uitleg-lijst li {
    padding: 8px 0 8px 24px;
    position: relative;
    color: var(--text);
    line-height: 1.5;
}
.uitleg-lijst li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}
.stappen {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: var(--surface2);
    border-radius: var(--radius-sm);
}
.stap {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-size: 14px;
}
.stap-nr {
    background: var(--accent);
    color: var(--bg);
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 50%;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
}
.prijzen-tabel {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.prijs-rij {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    align-items: center;
    font-size: 14px;
}
.prijs-rij:last-child {
    border-bottom: none;
}
.prijs-rij.kop {
    background: var(--surface2);
    font-weight: 600;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}
.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.faq-item:last-child {
    border-bottom: none;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: #ffffff;
    font-size: 16px;
    padding: 4px 0;
    list-style: none;
    position: relative;
    padding-right: 24px;
}
.faq-item summary::-webkit-details-marker {
    display: none;
}
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 4px;
    color: var(--accent);
    font-size: 20px;
    font-weight: 300;
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    content: "−";
}
.faq-item p {
    margin-top: 8px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.7;
    font-weight: 400;
}

/* ============================================================
   MEER-SHEET (slide-up modal voor secundaire nav-functies)
   ============================================================ */
.meer-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.meer-sheet.verborgen {
    display: none;
}
.meer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    animation: fade-in 0.2s ease-out;
}
.meer-paneel {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: meer-slide-up 0.25s ease-out;
    max-height: 80vh;
    overflow-y: auto;
}
@keyframes meer-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.meer-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 16px;
}
.meer-titel {
    color: var(--text);
    font-size: 18px;
    margin-bottom: 16px;
}
.meer-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
}
.meer-item:hover, .meer-item:active {
    background: var(--surface2);
}
.meer-icoon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface2);
    border-radius: 10px;
    flex-shrink: 0;
}
.meer-naam {
    font-weight: 600;
    color: var(--text);
    font-size: 15px;
}
.meer-uitleg {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

/* ============================================================
   VERGELIJK-HUB TABS
   ============================================================ */
.vergelijk-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
}
.vergelijk-tabs::-webkit-scrollbar { display: none; }

.vtab {
    flex: 0 0 auto;
    padding: 10px 14px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    min-height: auto;
}
.vtab.actief {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.modus-blok {
    padding-top: 8px;
}

.aanbieders {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.aanbieder {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.aanbieder.goedkoopste {
    border-color: var(--groen);
    background: var(--groen-dim);
}
.aanbieder .prijs {
    font-size: 18px;
    color: var(--accent);
}

.kaart-listing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.kaart-listing .prijs {
    font-size: 18px;
    color: var(--accent);
    white-space: nowrap;
}

.lijst-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--surface2);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.veld-rij {
    display: flex;
    gap: 8px;
}
.veld-rij input {
    flex: 1;
}

.scheider {
    text-align: center;
    color: var(--muted);
    margin: 12px 0;
    font-size: 14px;
    position: relative;
}

/* ============================================================
   RECEPTEN
   ============================================================ */
.recepten-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}
.recept-kaart {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: transform 0.1s;
}
.recept-kaart:active { transform: scale(0.98); }
.recept-header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: linear-gradient(135deg, var(--surface2), var(--surface));
}
.recept-kaart.cat-pasta .recept-header   { background: linear-gradient(135deg, #c4521a40, #d4a84340); }
.recept-kaart.cat-soep .recept-header    { background: linear-gradient(135deg, #4ade8040, #16a34a40); }
.recept-kaart.cat-vlees .recept-header   { background: linear-gradient(135deg, #f8717140, #b9171740); }
.recept-kaart.cat-vis .recept-header     { background: linear-gradient(135deg, #60a5fa40, #2563eb40); }
.recept-kaart.cat-vega .recept-header    { background: linear-gradient(135deg, #4ade8040, #65a30d40); }
.recept-kaart.cat-salade .recept-header  { background: linear-gradient(135deg, #86efac40, #16a34a40); }
.recept-kaart.cat-snack .recept-header   { background: linear-gradient(135deg, #fbbf2440, #d9770640); }
.recept-kaart.cat-ontbijt .recept-header { background: linear-gradient(135deg, #fde04740, #ca8a0440); }
.recept-kaart.cat-dessert .recept-header { background: linear-gradient(135deg, #f472b640, #c026d340); }
.recept-body {
    padding: 10px 12px;
    flex: 1;
}
.recept-naam {
    font-weight: 600;
    margin: 4px 0;
    font-size: 14px;
    line-height: 1.3;
}

.recept-detail h1 {
    font-size: 24px;
    margin-bottom: 4px;
}
.ingredient-rij {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.ingredient-naam {
    color: var(--text);
}
.ingredient-hoeveelheid {
    color: var(--accent);
    font-weight: 500;
}
.stappen-lijst {
    padding-left: 24px;
}
.stap {
    margin-bottom: 14px;
    line-height: 1.6;
}
.voeding-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.voeding-grid > div {
    background: var(--surface2);
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
}

/* ============================================================
   GEZINSSAMENSTELLING (drawer)
   ============================================================ */
.eter-rij {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.teller {
    display: flex;
    align-items: center;
    gap: 12px;
}
.teller button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    background: var(--surface2);
    color: var(--accent);
    font-size: 18px;
    cursor: pointer;
    min-height: auto;
    padding: 0;
}
.teller button:active { background: var(--accent-dim); }
.teller .aantal {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    color: var(--text);
}
.totaal-balk {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
}
.totaal-balk strong {
    font-size: 22px;
    color: var(--accent);
}

.bottom-nav a.actief {
    color: var(--accent);
}


/* Alert-type keuze (radio-chips) */
.type-keuze {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 6px;
}
.type-optie {
    display: block;
    cursor: pointer;
}
.type-optie input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.type-optie span {
    display: block;
    padding: 12px;
    text-align: center;
    background: var(--kaart);
    border: 2px solid var(--lijn);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: all 0.15s;
}
.type-optie input[type="radio"]:checked + span {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

/* Koelkast → recepten match */
.tags-rij {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--accent-dim);
    color: var(--accent);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
}
.match-kaart {
    display: block;
    margin-bottom: 12px;
    text-decoration: none;
    color: inherit;
}
.match-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.match-score {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}
.match-score.hoog   { background: #2eb573; }
.match-score.middel { background: #f0a040; }
.match-score.laag   { background: #888; }

.spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto;
    border: 3px solid var(--lijn);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Spaardashboard */
.bespaar-kaart {
    background: linear-gradient(135deg, var(--accent-dim) 0%, var(--kaart) 100%);
    border-left: 4px solid var(--accent);
}
.bespaar-titel {
    margin-bottom: 4px;
}
.bespaar-totaal {
    font-size: 36px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
    margin: 8px 0 12px;
}
.bespaar-details {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.bespaar-chip {
    padding: 6px 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 999px;
    font-size: 12px;
}
.bespaar-rij {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--lijn);
}
.bespaar-rij:last-child { border-bottom: none; }

/* Recept-toevoegen formulier */
.ing-rij {
    display: grid;
    grid-template-columns: 1fr 80px 100px 36px;
    gap: 6px;
    margin-bottom: 8px;
    align-items: center;
}
.ing-rij input, .ing-rij select {
    font-size: 14px;
    padding: 8px;
}
.stap-rij {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: flex-start;
}
.stap-nr {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: var(--accent);
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    margin-top: 4px;
}
.stap-velden {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stap-velden input, .stap-velden textarea {
    font-size: 14px;
    padding: 8px;
}

/* Besparingsgrafiek */
.grafiek-rij {
    display: grid;
    grid-template-columns: 50px 1fr 70px;
    gap: 10px;
    align-items: center;
    margin: 6px 0;
    font-size: 12px;
}
.grafiek-label { color: var(--muted); }
.grafiek-balk-buiten {
    height: 14px;
    background: var(--lijn);
    border-radius: 7px;
    overflow: hidden;
}
.grafiek-balk {
    height: 100%;
    background: var(--accent);
    border-radius: 7px;
}
.grafiek-bedrag {
    text-align: right;
    font-weight: 600;
}
