/**
 * Zentrales Corporate Identity & Design-System
 * Definiert alle Farbwelten, Typografie, Abstände und wiederverwendbare UI-Komponenten.
 * Gilt einheitlich für /room, /portal und /admin.
 */

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 9999px;
    --transition: all 0.15s ease-in-out;

    /* Theme: Classic Slate (Dark - Standard) */
    --bg-base: #0f172a;
    --bg-sidebar: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-raised: #24344d;
    --bg-surface-hover: #2d4160;
    --bg-hover: #2d4160;
    --border: #334155;
    --border-subtle: #1e293b;
    --border-strong: #475569;
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);

    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-subtle: rgba(37, 99, 235, 0.15);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --success-subtle: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-subtle: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-subtle: rgba(239, 68, 68, 0.15);
}

/* Theme 1: Classic Slate (Explizit) */
[data-theme="slate"] {
    --bg-base: #0f172a;
    --bg-sidebar: #0f172a;
    --bg-surface: #1e293b;
    --bg-surface-raised: #24344d;
    --bg-surface-hover: #2d4160;
    --bg-hover: #2d4160;
    --border: #334155;
    --border-subtle: #1e293b;
    --border-strong: #475569;
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}

/* Theme 2: Deep Navy (Mitternachtsblau / Enterprise) */
[data-theme="navy"] {
    --bg-base: #0a101d;
    --bg-sidebar: #0a101d;
    --bg-surface: #0f1b30;
    --bg-surface-raised: #182846;
    --bg-surface-hover: #223862;
    --bg-hover: #223862;
    --border: #1e3355;
    --border-subtle: #13223b;
    --border-strong: #2c4977;
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-subtle: rgba(59, 130, 246, 0.15);
    --text-primary: #f8fafc;
    --text-secondary: #93c5fd;
    --text-muted: #60a5fa;
}

/* Theme 3: Emerald Trust (Banken / Finanz-Grün) */
[data-theme="emerald"] {
    --bg-base: #06120d;
    --bg-sidebar: #06120d;
    --bg-surface: #0d2119;
    --bg-surface-raised: #143327;
    --bg-surface-hover: #1c4435;
    --bg-hover: #1c4435;
    --border: #1f4d3b;
    --border-subtle: #143327;
    --border-strong: #2c6a51;
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-subtle: rgba(16, 185, 129, 0.15);
    --text-primary: #f0fdf4;
    --text-secondary: #86efac;
    --text-muted: #4ade80;
}

/* Theme 4: High Contrast Charcoal (Monochrom / Kanzleien) */
[data-theme="charcoal"] {
    --bg-base: #18181b;
    --bg-sidebar: #18181b;
    --bg-surface: #27272a;
    --bg-surface-raised: #3f3f46;
    --bg-surface-hover: #52525b;
    --bg-hover: #52525b;
    --border: #3f3f46;
    --border-subtle: #27272a;
    --border-strong: #71717a;
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --accent: #71717a;
    --accent-hover: #a1a1aa;
    --accent-subtle: rgba(161, 161, 170, 0.15);
    --text-primary: #fafafa;
    --text-secondary: #d4d4d8;
    --text-muted: #a1a1aa;
}

/* Theme 5: Clean Light (Modern Weiß) */
[data-theme="light"] {
    --bg-base: #f8fafc;
    --bg-sidebar: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-raised: #f1f5f9;
    --bg-surface-hover: #e2e8f0;
    --bg-hover: #e2e8f0;
    --border: #cbd5e1;
    --border-subtle: #f1f5f9;
    --border-strong: #94a3b8;
    --card-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-subtle: rgba(37, 99, 235, 0.12);
}

/* Theme 6: Warm Sand (Elfenbein / Kanzlei Premium) */
[data-theme="warm"] {
    --bg-base: #fdfbf7;
    --bg-sidebar: #f7f3ec;
    --bg-surface: #ffffff;
    --bg-surface-raised: #f7f3ec;
    --bg-surface-hover: #eee7dc;
    --bg-hover: #eee7dc;
    --border: #e2d9cc;
    --border-subtle: #f4eee5;
    --border-strong: #bfae99;
    --card-shadow: 0 4px 16px rgba(44, 30, 15, 0.08);
    --text-primary: #1c1917;
    --text-secondary: #57534e;
    --text-muted: #78716c;
    --accent: #b45309;
    --accent-hover: #92400e;
    --accent-subtle: rgba(180, 83, 9, 0.12);
}

/* ─── ZENTRALE SICHERHEITS- & CI-BANNER ─── */
.sfr-security-banner {
    background: rgba(37, 99, 235, 0.10);
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 6px 20px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    z-index: 60;
    position: relative;
}

.sfr-security-banner.active {
    display: flex;
}

.sfr-security-banner svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* ─── ZENTRALES LOGO & MARKEN-ELEMENT ─── */
.sfr-brand-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    text-decoration: none;
    user-select: none;
}

.sfr-brand-logo-img {
    display: none;
    max-height: 32px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
}

.sfr-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: var(--transition);
}

.sfr-brand-title {
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.sfr-brand-badge {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 6px;
}

/* ─── ZENTRALER FOOTER (Impressum, Datenschutz, Zero Trust) ─── */
.sfr-footer-bar {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
    padding: 12px 28px;
    font-size: 0.76rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    z-index: 20;
    position: relative;
}

.sfr-footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sfr-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sfr-footer-links a:hover {
    color: var(--accent);
    text-decoration: underline;
}

.sfr-footer-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.sfr-footer-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
}
