/* ══════════════════════════════════════
   LearnCore - Design Foundation
   Gedeelde basis voor website, dashboard en app.
   ══════════════════════════════════════ */

:root {
    /* ── Kleuren ── */
    --lc-primary: #4361ee;
    --lc-primary-light: #eef0ff;
    --lc-primary-dark: #2d46c7;
    --lc-secondary: #7b2ff7;
    --lc-secondary-light: #f3edff;
    --lc-accent: #2ec4b6;
    --lc-accent-light: #e6fff9;

    --lc-success: #2ec4b6;
    --lc-success-bg: #e6fff9;
    --lc-success-text: #0a7a6e;
    --lc-warning: #ffa62b;
    --lc-warning-bg: #fff8e1;
    --lc-warning-text: #7b6800;
    --lc-error: #ef476f;
    --lc-error-bg: #fff0f3;
    --lc-error-text: #c0294a;
    --lc-info: #4361ee;
    --lc-info-bg: #eef0ff;
    --lc-info-text: #2d46c7;

    /* v5.99.22 - on-primary kleur (witte tekst op saturated achtergrond:
       primary, success, error, warning, gradients). Single source ipv
       41 hardcoded color:#fff/white in parent + child CSS. Dark-mode
       overschrijft niet (wit op saturated blijft contrast). */
    --lc-on-primary: #ffffff;

    /* ── Status semantic tokens (v5.88.0 F9) ──
       Domein-onafhankelijke status-aliassen. Gebruik deze voor algemene
       status-indicators (mastery, voortgang, scores) ipv direct success/warning/error
       tokens, zodat themes/dark-mode kleurinterpretatie kunnen aanpassen zonder
       semantiek te verliezen. */
    --lc-status-good: var(--lc-success-text);
    --lc-status-good-bg: var(--lc-success-bg);
    --lc-status-warn: var(--lc-warning-text);
    --lc-status-warn-bg: var(--lc-warning-bg);
    --lc-status-alert: var(--lc-error-text);
    --lc-status-alert-bg: var(--lc-error-bg);
    --lc-status-neutral: var(--lc-text-muted);
    --lc-status-neutral-bg: var(--lc-bg-soft);

    --lc-bg: #f8f9fc;
    --lc-bg-soft: #f0f1f7;
    --lc-surface: #ffffff;
    --lc-text: #1a1a2e;
    --lc-text-muted: #666677;
    --lc-text-soft: #5a5a6a;
    --lc-text-light: #999;
    --lc-border: #e8e8f0;
    --lc-border-light: #f0f0f4;
    --lc-border-strong: #c8c8d4;

    /* ── Typografie ── */
    --lc-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --lc-font-size-xs: 0.75rem;
    --lc-font-size-sm: 0.85rem;
    --lc-font-size-base: 1rem;
    --lc-font-size-md: 1.1rem;
    --lc-font-size-lg: 1.25rem;
    --lc-font-size-xl: 1.5rem;
    --lc-font-size-2xl: 2rem;
    --lc-font-size-3xl: 2.5rem;
    --lc-line-height: 1.6;

    /* ── Spacing ── */
    --lc-space-xs: 4px;
    --lc-space-sm: 8px;
    --lc-space-md: 16px;
    --lc-space-lg: 24px;
    --lc-space-xl: 40px;
    --lc-space-2xl: 64px;
    --lc-space-3xl: 96px;

    /* ── Layout ── */
    --lc-radius-sm: 6px;
    --lc-radius-md: 8px;
    --lc-radius-lg: 12px;
    --lc-radius-xl: 16px;
    --lc-radius-full: 9999px;

    --lc-shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --lc-shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --lc-shadow-lg: 0 8px 24px rgba(0,0,0,0.1);

    --lc-max-width: 1080px;
    --lc-max-width-narrow: 720px;
    --lc-max-width-wide: 1280px; /* v5.88.0 F7 - voor parent dashboard tablet/desktop */

    /* ── Header ── */
    --lc-header-height: 64px;
    --lc-header-height-mobile: 56px;

    /* ── Tap targets ── */
    --lc-tap-min: 44px;

    /* ── Cohort tokens (default = midden / groep 5-6)
       v5.99.12 (P1 stap B): single source consolidatie. Eerder verspreid over
       foundation.css + child-app.css met conflicterende --cohort-radius. ── */
    --cohort-tap-min: 44px;
    --cohort-font-base: 1rem;
    --cohort-font-md: 1.1rem;
    --cohort-font-lg: 1.25rem;
    --cohort-spacing: 16px;
    --cohort-radius: 12px;
    --cohort-font-scale: 1;
    --cohort-btn-pad-y: 12px;
    --cohort-line-height: 1.5;

    /* ── App-nav tokens (v5.99.15, Fase 1 nav harmonisatie) ──
       Gedeeld tussen kid (.edapp-bottom-nav) en parent (.ep-bottom-nav)
       zodat hoogte/spacing/safe-area gedrag identiek is. Active-state +
       icon-style verschil blijft per app behouden (kid emoji+scale, parent
       SVG+color). */
    --app-nav-padding-y: 6px;
    --app-nav-item-min-height: 56px;
    --app-nav-item-gap: 3px;
    --app-nav-safe-buffer: var(--lc-space-sm);
    --app-nav-z-index: 1000;
    --app-nav-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
    --app-nav-border-top-color: var(--lc-border-light);

    /* ── Breakpoints (referentie, v5.88.0 F9 - uniform) ──
       Custom props zijn niet bruikbaar in media queries; deze zijn alleen
       documentatie. Gebruik exact deze pixel-waardes in @media queries om
       consistent te blijven.

       mobile:        0    - 767px
       tablet:      768px  - 1023px
       desktop-sm: 1024px  - 1279px
       desktop:    1280px+
    */
    --lc-bp-mobile-max: 767px;
    --lc-bp-tablet-min: 768px;
    --lc-bp-tablet-max: 1023px;
    --lc-bp-desktop-sm-min: 1024px;
    --lc-bp-desktop-min: 1280px;
}

/* ══════════════════════════════════════
   DARK MODE
   ══════════════════════════════════════ */

[data-theme="dark"] {
    --lc-primary: #6b8aff;
    --lc-primary-light: #1e2444;
    --lc-primary-dark: #8da4ff;
    --lc-secondary: #a66dff;
    --lc-secondary-light: #2a1a40;
    --lc-accent: #3dd9cb;
    --lc-accent-light: #142e2b;

    --lc-success: #3dd9cb;
    --lc-success-bg: #142e2b;
    --lc-success-text: #6aeee3;
    --lc-warning: #ffb84d;
    --lc-warning-bg: #2e2410;
    --lc-warning-text: #ffd080;
    --lc-error: #ff6b8a;
    --lc-error-bg: #2e1019;
    --lc-error-text: #ff99b0;
    --lc-info: #6b8aff;
    --lc-info-bg: #1e2444;
    --lc-info-text: #8da4ff;

    --lc-bg: #0f1117;
    --lc-bg-soft: #1f2230;
    --lc-surface: #1a1c28;
    --lc-text: #e8e8f0;
    --lc-text-muted: #9999aa;
    --lc-text-soft: #b0b0c0;
    --lc-text-light: #777788;
    --lc-border: #2a2c3a;
    --lc-border-light: #222233;
    --lc-border-strong: #3a3d4a;

    --lc-shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --lc-shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --lc-shadow-lg: 0 8px 24px rgba(0,0,0,0.5);

    color-scheme: dark;
}

/* Auto dark mode via systeem voorkeur */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --lc-primary: #6b8aff;
        --lc-primary-light: #1e2444;
        --lc-primary-dark: #8da4ff;
        --lc-secondary: #a66dff;
        --lc-secondary-light: #2a1a40;
        --lc-accent: #3dd9cb;
        --lc-accent-light: #142e2b;

        --lc-success: #3dd9cb;
        --lc-success-bg: #142e2b;
        --lc-success-text: #6aeee3;
        --lc-warning: #ffb84d;
        --lc-warning-bg: #2e2410;
        --lc-warning-text: #ffd080;
        --lc-error: #ff6b8a;
        --lc-error-bg: #2e1019;
        --lc-error-text: #ff99b0;
        --lc-info: #6b8aff;
        --lc-info-bg: #1e2444;
        --lc-info-text: #8da4ff;

        --lc-bg: #0f1117;
        --lc-bg-soft: #1f2230;
        --lc-surface: #1a1c28;
        --lc-text: #e8e8f0;
        --lc-text-muted: #9999aa;
        --lc-text-soft: #b0b0c0;
        --lc-text-light: #777788;
        --lc-border: #2a2c3a;
        --lc-border-light: #222233;
        --lc-border-strong: #3a3d4a;

        --lc-shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
        --lc-shadow-md: 0 4px 12px rgba(0,0,0,0.4);
        --lc-shadow-lg: 0 8px 24px rgba(0,0,0,0.5);

        color-scheme: dark;
    }
}

/* ══════════════════════════════════════
   COHORT TOKENS - leeftijd-specifieke tuning
   Single source (v5.99.12 P1B; v5.99.13 P1C). Body class is enige bron:
   - PHP body_class filter voor kid (server-side)
   - JS applyCohortClass() voor parent-met-kind (kind switch)
   Selectors elders gebruiken body.edapp-cohort-X.
   ══════════════════════════════════════ */

body.edapp-cohort-jong {
    --cohort-tap-min: 52px;
    --cohort-font-base: 1.1rem;
    --cohort-font-md: 1.25rem;
    --cohort-font-lg: 1.5rem;
    --cohort-spacing: 20px;
    --cohort-radius: 14px;
    --cohort-font-scale: 1.05;
    --cohort-btn-pad-y: 14px;
    --cohort-line-height: 1.6;
}

body.edapp-cohort-midden {
    --cohort-tap-min: 44px;
    --cohort-font-base: 1rem;
    --cohort-font-md: 1.1rem;
    --cohort-font-lg: 1.25rem;
    --cohort-spacing: 16px;
    --cohort-radius: 12px;
    --cohort-font-scale: 1;
    --cohort-btn-pad-y: 12px;
    --cohort-line-height: 1.5;
}

body.edapp-cohort-oud {
    --cohort-tap-min: 40px;
    --cohort-font-base: 0.95rem;
    --cohort-font-md: 1.05rem;
    --cohort-font-lg: 1.2rem;
    --cohort-spacing: 14px;
    --cohort-radius: 8px;
    --cohort-font-scale: 0.97;
    --cohort-btn-pad-y: 11px;
    --cohort-line-height: 1.45;
}

/* ══════════════════════════════════════
   SEGMENTED CONTROL (v5.99.26) - pill-style toggle-group
   Gedeelde pattern voor settings/voorkeuren waar 2-4 mutually-exclusive
   opties gekozen worden (theme, taal, etc). Match Sprint 3 sub-tabset
   stijl: active = filled primary pill, inactive = ghost hover.
   ══════════════════════════════════════ */

.lc-segmented {
    display: inline-flex;
    gap: var(--lc-space-xs);
}
.lc-segmented-item {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: var(--lc-radius-full);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--lc-font-size-sm);
    color: var(--lc-text-muted);
    transition: background 0.15s, color 0.15s;
    min-height: 44px;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}
.lc-segmented-item:hover {
    color: var(--lc-text);
    background: var(--lc-bg-soft);
}
.lc-segmented-item.active {
    background: var(--lc-primary);
    color: var(--lc-on-primary);
    font-weight: 600;
}
.lc-segmented-item.active:hover {
    color: var(--lc-on-primary);
    background: var(--lc-primary);
}
@media (prefers-reduced-motion: reduce) {
    .lc-segmented-item { transition: none; }
}

/* ══════════════════════════════════════
   GLOBAL UI HELPERS (v5.99.21) - loader + empty state
   Verplaatst uit child-app.css zodat parent-app ze ook kan gebruiken.
   Single source. Geen visuele wijziging voor /app/ (kid).
   ══════════════════════════════════════ */

.edapp-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid var(--lc-border);
    border-top-color: var(--lc-primary);
    border-radius: 50%;
    animation: edapp-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: var(--lc-space-sm);
}
@keyframes edapp-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .edapp-spinner { animation-duration: 1.5s; }
}

.edapp-loading {
    text-align: center;
    padding: var(--lc-space-3xl) 0;
    color: var(--lc-text-light);
    font-size: var(--lc-font-size-md);
}

.edapp-empty-state {
    text-align: center;
    padding: var(--lc-space-2xl) 0;
}
.edapp-empty-state .edapp-empty-emoji {
    font-size: 3.5rem;
    margin-bottom: var(--lc-space-md);
    opacity: 0.5;
    line-height: 1;
}
.edapp-empty-state .edapp-empty-title {
    font-size: var(--lc-font-size-md);
    font-weight: 700;
    color: var(--lc-text);
    margin-bottom: var(--lc-space-xs);
}
.edapp-empty-state .edapp-empty-message {
    font-size: var(--lc-font-size-md);
    color: var(--lc-text-muted);
    line-height: 1.6;
}
.edapp-empty-state .edapp-empty-cta {
    margin-top: var(--lc-space-lg);
}

/* ══════════════════════════════════════
   SCROLLBAR - subtiel custom op desktop (v5.99.19 F2)
   Mobile: native momentum/auto-hide blijft (geen styling).
   Desktop product-pages: smal + grijs + transparent track om "web-gevoel"
   van de standaard 15px-scrollbar te reduceren tot app-achtige scrollbar.
   Marketing/admin pages: ongewijzigd.
   ══════════════════════════════════════ */

@media (min-width: 768px) {
    body.lp-product-page { scrollbar-width: thin; scrollbar-color: var(--lc-border) transparent; }
    body.lp-product-page ::-webkit-scrollbar { width: 8px; height: 8px; }
    body.lp-product-page ::-webkit-scrollbar-track { background: transparent; }
    body.lp-product-page ::-webkit-scrollbar-thumb { background: var(--lc-border); border-radius: var(--lc-radius-full); }
    body.lp-product-page ::-webkit-scrollbar-thumb:hover { background: var(--lc-text-muted); }
}

/* v6.0.1 - mobile (<768px): scrollbar volledig verbergen.
   Reden: native Android Chrome scrollbar (4-6px) loopt visueel achter
   fixed bottom-nav op viewport-edge. Scrollbar functionaliteit blijft
   100% intact (alleen visuele indicator weg). iOS Safari heeft sowieso
   nagenoeg geen visible scrollbar. Geen layout-impact, geen architectuur-shift.
   Scoped op .edapp-shell--app om marketing-pages ongemoeid te laten. */
@media (max-width: 767px) {
    body.lp-product-page.edapp-shell--app {
        scrollbar-width: none;          /* Firefox */
        -ms-overflow-style: none;       /* IE/Edge legacy */
    }
    body.lp-product-page.edapp-shell--app::-webkit-scrollbar {
        display: none;                  /* Chrome/Safari/WebKit */
    }
}

/* ══════════════════════════════════════
   ACCESSIBILITY - reduced motion
   Respect prefers-reduced-motion voor alle animaties.
   ══════════════════════════════════════ */

@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;
    }
}

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

/* ── Typografie ── */
.lc-heading-1 {
    font-family: var(--lc-font);
    font-size: var(--lc-font-size-3xl);
    font-weight: 800;
    line-height: 1.2;
    color: var(--lc-text);
    letter-spacing: -0.02em;
}

.lc-heading-2 {
    font-family: var(--lc-font);
    font-size: var(--lc-font-size-2xl);
    font-weight: 700;
    line-height: 1.25;
    color: var(--lc-text);
}

.lc-heading-3 {
    font-family: var(--lc-font);
    font-size: var(--lc-font-size-xl);
    font-weight: 700;
    line-height: 1.3;
    color: var(--lc-text);
}

.lc-body {
    font-family: var(--lc-font);
    font-size: var(--lc-font-size-base);
    line-height: var(--lc-line-height);
    color: var(--lc-text);
}

.lc-body-lg {
    font-size: var(--lc-font-size-md);
    color: var(--lc-text-muted);
    line-height: var(--lc-line-height);
}

.lc-caption {
    font-size: var(--lc-font-size-sm);
    color: var(--lc-text-light);
}

.lc-label {
    font-size: var(--lc-font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--lc-text-light);
}

/* ── Knoppen ── */
.lc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: var(--lc-radius-md);
    font-family: var(--lc-font);
    font-size: var(--lc-font-size-base);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.15s, opacity 0.15s;
    line-height: 1;
}
.lc-btn:active { transform: scale(0.98); }
.lc-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.lc-btn-primary {
    background: var(--lc-primary);
    color: var(--lc-on-primary);
}
.lc-btn-primary:hover { box-shadow: var(--lc-shadow-md); }

.lc-btn-secondary {
    background: var(--lc-primary-light);
    color: var(--lc-primary);
}
.lc-btn-secondary:hover { background: #e0e4ff; }

.lc-btn-accent {
    background: var(--lc-accent);
    color: var(--lc-on-primary);
}

.lc-btn-outline {
    background: transparent;
    color: var(--lc-primary);
    border: 2px solid var(--lc-border);
}
.lc-btn-outline:hover { border-color: var(--lc-primary); }

.lc-btn-lg {
    padding: 18px 36px;
    font-size: var(--lc-font-size-md);
    border-radius: var(--lc-radius-lg);
}

/* ── Card ── */
.lc-card {
    background: var(--lc-surface);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-xl);
    padding: var(--lc-space-lg);
    transition: box-shadow 0.2s, transform 0.15s;
}
.lc-card:hover {
    box-shadow: var(--lc-shadow-md);
}
.lc-card-clickable { cursor: pointer; }
.lc-card-clickable:hover { transform: translateY(-2px); }

/* ── Stat card ── */
.lc-stat-card {
    text-align: center;
    padding: var(--lc-space-lg);
    background: var(--lc-surface);
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-xl);
}
.lc-stat-value {
    font-size: var(--lc-font-size-2xl);
    font-weight: 800;
    color: var(--lc-primary);
}
.lc-stat-label {
    font-size: var(--lc-font-size-sm);
    color: var(--lc-text-muted);
    margin-top: var(--lc-space-xs);
}

/* ── Badge ── */
.lc-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--lc-radius-full);
    font-size: var(--lc-font-size-xs);
    font-weight: 600;
}
.lc-badge-primary { background: var(--lc-primary); color: var(--lc-on-primary); }
.lc-badge-success { background: var(--lc-success-bg); color: var(--lc-success-text); }
.lc-badge-warning { background: var(--lc-warning-bg); color: var(--lc-warning-text); }
.lc-badge-error { background: var(--lc-error-bg); color: var(--lc-error-text); }
.lc-badge-info { background: var(--lc-info-bg); color: var(--lc-info-text); }

/* ── Section ── */
.lc-section {
    padding: var(--lc-space-2xl) var(--lc-space-md);
}
.lc-section-alt {
    background: var(--lc-bg);
}

.lc-container {
    max-width: var(--lc-max-width);
    margin: 0 auto;
    padding: 0 var(--lc-space-md);
}

.lc-container-narrow {
    max-width: var(--lc-max-width-narrow);
    margin: 0 auto;
    padding: 0 var(--lc-space-md);
}

.lc-section-title {
    font-family: var(--lc-font);
    font-size: var(--lc-font-size-2xl);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--lc-space-md);
    color: var(--lc-text);
}

.lc-section-subtitle {
    text-align: center;
    font-size: var(--lc-font-size-md);
    color: var(--lc-text-muted);
    margin-bottom: var(--lc-space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Grid ── */
.lc-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--lc-space-lg);
}
.lc-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--lc-space-lg);
}
.lc-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--lc-space-lg);
}

/* Tablet: grids schalen naar 2 kolom */
@media (max-width: 1024px) {
    .lc-grid-3 { grid-template-columns: 1fr 1fr; }
    .lc-grid-4 { grid-template-columns: 1fr 1fr; }
}

/* Mobile: grids naar 1 kolom */
@media (max-width: 767px) {
    .lc-grid-2 { grid-template-columns: 1fr; }
    .lc-grid-3 { grid-template-columns: 1fr; }
    .lc-grid-4 { grid-template-columns: 1fr; }
    .lc-heading-1 { font-size: var(--lc-font-size-2xl); }
    .lc-heading-2 { font-size: var(--lc-font-size-xl); }
    .lc-section { padding: var(--lc-space-xl) var(--lc-space-md); }
}

/* ── Info block ── */
.lc-info-block {
    padding: var(--lc-space-lg);
    border-radius: var(--lc-radius-lg);
    border-left: 4px solid var(--lc-primary);
    background: var(--lc-primary-light);
}

/* ── Back link (gedeeld) ── */
.lp-back, .ep-back, .edapp-back, .ea-back {
    display: inline-block;
    color: var(--lc-primary);
    text-decoration: none;
    font-size: var(--lc-font-size-sm);
    font-weight: 500;
    cursor: pointer;
    padding: var(--lc-space-sm) var(--lc-space-md);
    border-radius: var(--lc-radius-md);
    transition: background 0.15s;
    margin-bottom: var(--lc-space-md);
}
.lp-back:hover, .ep-back:hover, .edapp-back:hover, .ea-back:hover {
    background: var(--lc-primary-light);
}

/* ── Divider ── */
.lc-divider {
    border: none;
    border-top: 1px solid var(--lc-border);
    margin: var(--lc-space-xl) 0;
}

/* ══════════════════════════════════════
   MODAL
   Herbruikbaar voor logout, bevestigingen.
   ══════════════════════════════════════ */

.lp-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--lc-space-md);
}

.lp-modal {
    background: var(--lc-surface);
    border-radius: var(--lc-radius-xl);
    padding: var(--lc-space-xl) var(--lc-space-lg);
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: var(--lc-shadow-lg);
}

.lp-modal-title {
    font-size: var(--lc-font-size-lg);
    font-weight: 700;
    color: var(--lc-text);
    margin-bottom: var(--lc-space-sm);
}

.lp-modal-text {
    font-size: var(--lc-font-size-sm);
    color: var(--lc-text-muted);
    margin-bottom: var(--lc-space-lg);
}

.lp-modal-actions {
    display: flex;
    gap: var(--lc-space-sm);
    justify-content: center;
}

.lp-modal-btn {
    padding: var(--lc-space-sm) var(--lc-space-lg);
    border-radius: var(--lc-radius-md);
    font-family: var(--lc-font);
    font-size: var(--lc-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    min-height: var(--lc-tap-min);
    display: inline-flex;
    align-items: center;
    transition: opacity 0.15s;
}

.lp-modal-btn-confirm { background: var(--lc-error); color: var(--lc-on-primary); }
.lp-modal-btn-confirm:hover { opacity: 0.9; }

.lp-modal-btn-cancel { background: var(--lc-bg); color: var(--lc-text); }
.lp-modal-btn-cancel:hover { background: var(--lc-border); }

/* v5.99.56 P11 - Bottom-sheet patroon op mobile (<=767px).
   Logout en toekomstige confirm-modals voelen iOS/Android native.
   Tablet+ blijft centered card. Pure CSS - bestaande modal-markup
   ongewijzigd. Body scroll-lock via .lp-modal-open class (JS-toggle). */
@media (max-width: 767px) {
    .lp-modal-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .lp-modal {
        max-width: 100%;
        width: 100%;
        border-radius: var(--lc-radius-xl) var(--lc-radius-xl) 0 0;
        padding-bottom: calc(var(--lc-space-xl) + env(safe-area-inset-bottom, 0px));
        animation: lp-modal-slide-up 250ms cubic-bezier(0.32, 0.72, 0, 1);
    }
    /* Grip-bar bovenin sheet (visuele cue dat het sheet is) */
    .lp-modal::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: var(--lc-border-strong);
        margin: 0 auto var(--lc-space-md);
    }
}
@keyframes lp-modal-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .lp-modal { animation: none; }
}
/* Body scroll-lock: voorkomt content-scroll achter sheet/modal */
body.lp-modal-open {
    overflow: hidden;
}

/* ══════════════════════════════════════
   INPUT STANDAARD
   Eén systeem voor alle formulieren.
   ══════════════════════════════════════ */

.lc-input {
    width: 100%;
    padding: var(--lc-space-sm) 14px;
    border: 1px solid var(--lc-border);
    border-radius: var(--lc-radius-md);
    font-family: var(--lc-font);
    font-size: var(--lc-font-size-base);
    color: var(--lc-text);
    transition: border-color 0.15s, box-shadow 0.15s;
    min-height: var(--lc-tap-min);
}
.lc-input:focus {
    outline: none;
    border-color: var(--lc-primary);
    box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
}

/* v5.99.53 - Focus-visible baseline voor interactieve elementen zonder
   eigen focus-rule. Gericht op buttons in product-UI (parent dashboard
   en kid app shell). Specifieke focus-rules elders blijven werken. */
.ep-rem-day:focus-visible,
.ep-preset-pill:focus-visible,
.ep-activity-toggle-btn:focus-visible,
.epi-tab:focus-visible,
.ep-bn-item:focus-visible {
    outline: 2px solid var(--lc-primary);
    outline-offset: 2px;
}

/* ══════════════════════════════════════
   PRODUCT HEADER (LearnProof)
   Eén header systeem voor website,
   app, dashboard en beheer.
   ══════════════════════════════════════ */

.lp-header {
    height: var(--lc-header-height);
    display: flex;
    align-items: center;
    background: var(--lc-surface);
    border-bottom: 1px solid var(--lc-border);
}

.lp-header-inner {
    width: 100%;
    max-width: var(--lc-max-width);
    margin: 0 auto;
    padding: 0 var(--lc-space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lp-logo {
    font-weight: 800;
    font-size: var(--lc-font-size-lg);
    color: var(--lc-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    line-height: 1;
}

.lp-header-nav {
    display: flex;
    align-items: center;
    gap: var(--lc-space-sm);
}

.lp-header-link {
    color: var(--lc-text-muted);
    text-decoration: none;
    font-size: var(--lc-font-size-sm);
    font-weight: 500;
    padding: var(--lc-space-sm) var(--lc-space-md);
    border-radius: var(--lc-radius-md);
    transition: background 0.15s, color 0.15s;
    min-height: var(--lc-tap-min);
    display: inline-flex;
    align-items: center;
}
.lp-header-link:hover {
    background: var(--lc-primary-light);
    color: var(--lc-primary);
}

.lp-header-btn {
    background: var(--lc-primary);
    color: var(--lc-on-primary) !important;
    padding: var(--lc-space-sm) var(--lc-space-md);
    border-radius: var(--lc-radius-md);
    font-weight: 600;
    min-height: var(--lc-tap-min);
    display: inline-flex;
    align-items: center;
}
.lp-header-btn:hover {
    background: var(--lc-primary-dark);
    box-shadow: var(--lc-shadow-sm);
}

.lp-header-name {
    font-weight: 600;
    font-size: var(--lc-font-size-sm);
    color: var(--lc-text);
    padding: var(--lc-space-sm);
    min-height: var(--lc-tap-min);
    display: inline-flex;
    align-items: center;
}
.lp-header-name-link {
    cursor: pointer;
    color: var(--lc-primary);
}

.lp-header-logout {
    color: var(--lc-text-light) !important;
    font-size: var(--lc-font-size-xs);
}
.lp-header-logout:hover {
    color: var(--lc-error-text) !important;
    background: var(--lc-error-bg);
}

/* Hamburger: verborgen op desktop */
.lp-header-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--lc-text);
    cursor: pointer;
    padding: var(--lc-space-xs);
    min-height: var(--lc-tap-min);
    min-width: var(--lc-tap-min);
    align-items: center;
    justify-content: center;
}

/* ── Header mobiel + tablet (< 1025px) - hamburger menu ──
   v5.99.8 - breakpoint van 767px -> 1024px zodat tablet hetzelfde
   hamburger-menu krijgt als mobile (iPad portrait + landscape). */
@media (max-width: 1024px) {
    .lp-header { height: var(--lc-header-height-mobile); }

    .lp-header-hamburger { display: flex; }

    .lp-header-nav {
        position: absolute;
        top: var(--lc-header-height-mobile);
        left: 0;
        right: 0;
        background: var(--lc-surface);
        border-bottom: 1px solid var(--lc-border);
        box-shadow: var(--lc-shadow-md);
        flex-direction: column;
        padding: 0 var(--lc-space-md);
        z-index: 100;
        display: flex;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
    }

    .lp-header-nav.lp-nav-open {
        max-height: 400px;
        opacity: 1;
        padding: var(--lc-space-sm) var(--lc-space-md) var(--lc-space-md);
    }

    .lp-header-link {
        font-size: var(--lc-font-size-sm);
        padding: var(--lc-space-md) var(--lc-space-lg);
        border-radius: 0;
        min-height: var(--lc-tap-min);
    }

    .lp-header-name {
        padding: var(--lc-space-md) var(--lc-space-lg);
        border-top: 1px solid var(--lc-border-light);
        font-size: var(--lc-font-size-sm);
    }
}

/* ── Header: position relative nodig voor dropdown ── */
.lp-header { position: relative; }

/* ══════════════════════════════════════════════════════
   APP-SHELL HEADER (v5.94.0)
   Shared compact mobile header voor /app/ EN /dashboard/.
   Mobile-only.
   v5.99.7 - .lp-header hide scoped op body.lp-product-page (alleen
   product-pages renderen ProductHeader::render() die .lp-header
   gebruikt). Marketing-pages hebben de class niet -> menu blijft.
   ══════════════════════════════════════════════════════ */

.edapp-app-shell-header { display: none; }

/* v5.99.39 (Optie B+) - parent /dashboard/ mobile+tablet (<=1024px):
   geen topbar (.edapp-app-shell-header + .lp-header weg). Bottom-nav
   is enige navigatie. Content-ruimte +56px. Scoped op body class
   .edapp-parent-dashboard zodat /app/ (kid + parent runtime) onaangetast.
   v5.99.40 - .edapp-multi-kid override: bij meer dan 1 kind komt topbar
   wel terug zodat user via dropdown kan wisselen. JS-toggled body class. */
@media (max-width: 1024px) {
    body.edapp-parent-dashboard .edapp-app-shell-header { display: none !important; }
    body.edapp-parent-dashboard .lp-header { display: none !important; }
    body.edapp-parent-dashboard.edapp-multi-kid .edapp-app-shell-header { display: flex !important; }
}

@media (max-width: 767px) {
    body.lp-product-page .lp-header { display: none !important; }

    .edapp-app-shell-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--lc-space-sm);
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        /* v5.99.41 - z-index verhoogd 50 -> 1100 (boven bottom-nav 1000)
           zodat dropdown-menu over alle content valt. isolation:isolate
           verwijderd want het creëerde eigen stacking-context waardoor
           menu visueel onder hogere content kwam. */
        z-index: 1100;
        padding: env(safe-area-inset-top, 0) var(--lc-space-md) 0;
        height: calc(56px + env(safe-area-inset-top, 0));
        background: var(--lc-surface, #fff);
        border-bottom: 1px solid var(--lc-border-light, #f0f0f4);
    }
    .edapp-app-shell-user {
        display: flex;
        align-items: center;
        gap: var(--lc-space-sm);
        padding: 4px 8px;
        border-radius: var(--lc-radius-full, 9999px);
        background: transparent;
        min-height: 44px;
        border: none;
        font-family: inherit;
        cursor: pointer;
        transition: background 0.15s;
        -webkit-tap-highlight-color: transparent;
    }
    .edapp-app-shell-user:hover,
    .edapp-app-shell-user:focus-visible {
        background: var(--lc-bg, #f5f5f9);
        outline: none;
    }
    /* v5.99.5 - kid heeft GEEN topbar; compenseer iOS notch via safe-area op #edapp-app */
    #edapp-app[data-role="child"] {
        padding-top: env(safe-area-inset-top, 0);
    }
    .edapp-app-shell-avatar {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--lc-primary-light, #eef0ff);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        font-size: 22px;
        line-height: 1;
        flex-shrink: 0;
    }
    .edapp-app-shell-avatar-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
    .edapp-app-shell-name {
        font-weight: 600;
        font-size: var(--lc-font-size-sm, 0.85rem);
        color: var(--lc-text, #1a1a2e);
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .edapp-app-shell-caret {
        font-size: var(--lc-font-size-xs);
        color: var(--lc-text-muted, #666);
        margin-left: -2px;
    }
    .edapp-app-shell-menu {
        position: absolute;
        top: calc(100% + 4px);
        left: var(--lc-space-md);
        min-width: 200px;
        background: var(--lc-surface, #fff);
        border: 1px solid var(--lc-border, #e8e8f0);
        border-radius: var(--lc-radius-lg, 12px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
        padding: 6px;
        display: flex;
        flex-direction: column;
        gap: 2px;
        z-index: 100;
    }
    .edapp-app-shell-menu[hidden] { display: none; }
    .edapp-app-menu-item {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        font-size: var(--lc-font-size-sm, 0.85rem);
        font-weight: 500;
        color: var(--lc-text, #1a1a2e);
        text-decoration: none;
        border-radius: var(--lc-radius-md, 8px);
        min-height: 44px;
        transition: background 0.15s;
    }
    .edapp-app-menu-item:hover,
    .edapp-app-menu-item:focus-visible {
        background: var(--lc-primary-light, #eef0ff);
        color: var(--lc-primary, #4361ee);
        outline: none;
    }
    .edapp-app-menu-item--logout {
        color: var(--lc-error-text, #c0294a);
        border-top: 1px solid var(--lc-border-light, #f0f0f4);
        margin-top: 4px;
        padding-top: 14px;
    }
    .edapp-app-menu-item--logout:hover {
        background: var(--lc-error-bg, #fff0f3);
        color: var(--lc-error-text, #c0294a);
    }
    /* v5.99.60 - button-reset zodat <button class="edapp-app-menu-item">
       er visueel identiek aan <a class="edapp-app-menu-item"> oogt.
       Logout is button geworden om iOS PWA anchor-quirk te vermijden. */
    button.edapp-app-menu-item {
        background: transparent;
        border: 0;
        font-family: inherit;
        text-align: left;
        cursor: pointer;
        width: 100%;
    }
}

/* ══════════════════════════════════════════════════════
   VIEW TRANSITIONS (v5.99.0 Stap 4)
   Crossfade tussen /app/ ↔ /dashboard/ in Chrome/Edge.
   Andere browsers: instant (huidige gedrag).
   ══════════════════════════════════════════════════════ */
@view-transition {
    navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 200ms;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}
