:root {
    --bg-main: #020617;
    --bg-surface: #0f172a;
    --bg-surface-elevated: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --brand-primary: #38bdf8;
    --brand-primary-hover: #0ea5e9;
    --brand-accent: #6366f1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border-color: #1e293b;
    --border-subtle: #334155;
    --shadow-card: 0 4px 20px -2px rgba(2, 6, 23, 0.5);
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

html.light {
    --bg-main: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --text-muted: #475569;
    --brand-primary: #0284c7;
    --brand-primary-hover: #0369a1;
    --brand-accent: #4338ca;
    --success: #047857;
    --warning: #b45309;
    --danger: #be123c;
    --border-color: #cbd5e1;
    --border-subtle: #94a3b8;
    --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08), 0 6px 16px -4px rgba(15, 23, 42, 0.08);
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

html.nd-a11y-large {
    font-size: 17.5px;
}

html.scroll-smooth {
    scroll-behavior: smooth;
}

.hidden {
    display: none !important;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-main) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Barrierearme Mindestschriftgrößen gegen Mikro-Texte */
.text-\[8px\], .text-\[9px\], .text-\[10px\] {
    font-size: 0.75rem !important;
    line-height: 1.15rem !important;
}
.text-\[11px\] {
    font-size: 0.8125rem !important;
    line-height: 1.25rem !important;
}

/* Daymode / Light-Mode Harmonisierung für bestehende Utility-Klassen */
html.light body.bg-slate-950,
html.light .bg-slate-950 {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}
html.light body {
    background-color: #f1f5f9 !important;
}
html.light .bg-slate-900,
html.light .bg-slate-900\/90,
html.light .bg-slate-900\/80,
html.light .bg-slate-900\/60,
html.light .bg-slate-950\/95,
html.light .bg-slate-950\/90,
html.light .bg-slate-950\/85,
html.light .bg-slate-950\/80,
html.light .bg-slate-950\/70,
html.light .bg-slate-950\/60,
html.light .bg-slate-950\/50,
html.light .bg-slate-950\/40 {
    background-color: #ffffff !important;
    color: #0f172a !important;
    box-shadow: var(--shadow-card);
}
html.light .bg-slate-900 .bg-slate-950,
html.light .bg-slate-900 .bg-slate-900,
html.light section.bg-slate-900 .bg-slate-950 {
    background-color: #f8fafc !important;
    box-shadow: none;
}
html.light .bg-slate-800,
html.light .bg-slate-800\/40,
html.light .hover\:bg-slate-800\/40:hover,
html.light .hover\:bg-slate-800\/30:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}
html.light .text-white,
html.light .text-slate-100,
html.light .text-slate-200 {
    color: #0f172a !important;
}
html.light .text-slate-300,
html.light .text-slate-400 {
    color: #334155 !important;
}
html.light .text-slate-500,
html.light .text-slate-600 {
    color: #64748b !important;
}
html.light .border-slate-900,
html.light .border-slate-800,
html.light .border-slate-800\/80,
html.light .border-slate-800\/60,
html.light .border-slate-700 {
    border-color: #cbd5e1 !important;
}
html.light .divide-slate-800 > :not([hidden]) ~ :not([hidden]),
html.light .divide-slate-800\/80 > :not([hidden]) ~ :not([hidden]) {
    border-color: #cbd5e1 !important;
}
html.light .text-sky-400,
html.light .text-sky-300 {
    color: #0369a1 !important;
}
html.light .text-emerald-400,
html.light .text-emerald-300,
html.light .text-emerald-200 {
    color: #065f46 !important;
}
html.light .text-amber-400,
html.light .text-amber-300,
html.light .text-amber-200 {
    color: #92400e !important;
}
html.light .text-rose-400,
html.light .text-rose-300,
html.light .text-rose-200 {
    color: #9f1239 !important;
}
html.light .text-indigo-400,
html.light .text-indigo-300 {
    color: #3730a3 !important;
}
html.light .bg-sky-950,
html.light .bg-sky-950\/40,
html.light .bg-sky-950\/60,
html.light .bg-sky-950\/70,
html.light .bg-sky-950\/90 {
    background-color: #e0f2fe !important;
    border-color: #7dd3fc !important;
    color: #0369a1 !important;
}
html.light .bg-emerald-950,
html.light .bg-emerald-950\/35,
html.light .bg-emerald-950\/40,
html.light .bg-emerald-950\/50,
html.light .bg-emerald-950\/60,
html.light .bg-emerald-950\/70,
html.light .bg-emerald-950\/80 {
    background-color: #d1fae5 !important;
    border-color: #6ee7b7 !important;
    color: #064e3b !important;
}
html.light .bg-amber-950,
html.light .bg-amber-950\/35,
html.light .bg-amber-950\/40,
html.light .bg-amber-950\/60,
html.light .bg-amber-950\/70,
html.light .bg-amber-950\/90 {
    background-color: #fef3c7 !important;
    border-color: #fcd34d !important;
    color: #78350f !important;
}
html.light .bg-rose-950,
html.light .bg-rose-950\/35,
html.light .bg-rose-950\/50,
html.light .bg-rose-950\/60,
html.light .bg-rose-950\/70,
html.light .bg-rose-950\/80 {
    background-color: #ffe4e6 !important;
    border-color: #fda4af !important;
    color: #881337 !important;
}
html.light .bg-indigo-950,
html.light .bg-indigo-950\/35,
html.light .bg-indigo-950\/40,
html.light .bg-indigo-950\/60,
html.light .bg-indigo-950\/90 {
    background-color: #e0e7ff !important;
    border-color: #a5b4fc !important;
    color: #312e81 !important;
}
html.light thead.bg-slate-950,
html.light thead.bg-slate-900,
html.light .admin-data-table th {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border-bottom: 2px solid #cbd5e1 !important;
}