:root {
    --theme-accent: #2f6bff;
    --theme-bg: #030711;
    --theme-surface: #0d1525;
    --theme-surface-raised: #151f33;
    --theme-text: #f7f9fd;
    --theme-muted: #aeb8ca;
    --theme-border: rgba(255, 255, 255, 0.13);
    color-scheme: dark;
}

:root[data-theme="light"] {
    --theme-bg: #f6f8fc;
    --theme-surface: #ffffff;
    --theme-surface-raised: #eef3fb;
    --theme-text: #111722;
    --theme-muted: #566176;
    --theme-border: #dbe3ee;
    color-scheme: light;
}

.theme-toggle {
    display: inline-flex;
    min-width: 2.75rem;
    min-height: 2.75rem;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border: 1px solid var(--theme-border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-surface) 86%, transparent);
    color: var(--theme-text);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.theme-toggle:hover { transform: translateY(-1px); border-color: var(--theme-accent); }
.theme-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--theme-accent) 45%, transparent); outline-offset: 3px; }
.theme-toggle .theme-icon-light { display: none; }
:root[data-theme="light"] .theme-toggle .theme-icon-light { display: inline-block; }
:root[data-theme="light"] .theme-toggle .theme-icon-dark { display: none; }

@media (prefers-reduced-motion: reduce) {
    .theme-toggle { transition: none; }
}

/* Gedeelde lichte modus voor beveiligde omgevingen die hun eigen donkere stylesheet hebben. */
:root[data-theme="light"] body:has(.portal-shell),
:root[data-theme="light"] body:has(.portal-login),
:root[data-theme="light"] body:has(.quote-shell),
:root[data-theme="light"] body.admin-login-body { background: #f6f8fc !important; color: #111722 !important; }
:root[data-theme="light"] .portal-panel,
:root[data-theme="light"] .portal-login > section,
:root[data-theme="light"] .quote-card,
:root[data-theme="light"] .decision-card,
:root[data-theme="light"] .decision-result,
:root[data-theme="light"] .login-card { background: #fff !important; border-color: #dbe3ee !important; color: #111722 !important; box-shadow: 0 24px 70px rgba(24,45,80,.12) !important; }
:root[data-theme="light"] .project-grid a,
:root[data-theme="light"] .portal-items article { background: #f4f7fc !important; border-color: #dbe3ee !important; color: #111722 !important; }
:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea { background: #fff !important; border-color: #cbd5e4 !important; color: #111722 !important; }
:root[data-theme="light"] .portal-header,
:root[data-theme="light"] .quote-header { border-color: #dbe3ee !important; }
.login-brand-row { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; }
.portal-theme-toggle { position:fixed; z-index:20; top:1rem; right:1rem; box-shadow:0 10px 30px rgba(0,0,0,.2); }
