/* AegisSight Design System - OSINT Lagemonitor (Dark Theme: Navy/Gold) */

/* === CSS Variables === */
:root {
    /* Backgrounds */
    --bg-primary: #0B1121;
    --bg-secondary: #1A2440;
    --bg-card: #151D2E;
    --bg-sidebar: #0A1832;
    --bg-topbar: #151D2E;
    --bg-hover: #1A2440;
    --bg-elevated: #1E2D45;

    /* Accent (Gold) */
    --accent: #C8A851;
    --accent-hover: #B5923E;
    --accent-pressed: #A07E2B;

    /* Text */
    --text-primary: #E8ECF4;
    --text-secondary: #8896AB;
    --text-disabled: #95A3B8;
    --text-tertiary: #95A3B8;

    /* Inputs / Borders */
    --input-bg: #1A2440;
    --input-border: #1E2D45;
    --border: #1E2D45;

    /* Status */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #7C8DB5;

    /* Sidebar */
    --sidebar-text: #E8ECF4;
    --sidebar-text-sec: #8896AB;
    --sidebar-active: #C8A851;
    --sidebar-hover-bg: #1A2440;

    /* Typography */
    --font-title: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-mono: 'SF Mono', Consolas, Menlo, monospace;

    /* Spacing (8pt scale) */
    --sp-xxs: 2px;
    --sp-xs: 4px;
    --sp-sm: 6px;
    --sp-md: 8px;
    --sp-lg: 12px;
    --sp-xl: 16px;
    --sp-2xl: 20px;
    --sp-3xl: 24px;
    --sp-4xl: 32px;
    --sp-5xl: 48px;

    /* Radii */
    --radius: 4px;
    --radius-lg: 8px;

    /* Tints (halbtransparente Hintergründe) */
    --tint-accent: rgba(200, 168, 81, 0.15);
    --tint-accent-subtle: rgba(200, 168, 81, 0.08);
    --tint-accent-faint: rgba(200, 168, 81, 0.04);
    --tint-accent-strong: rgba(200, 168, 81, 0.18);
    --tint-error: rgba(239, 68, 68, 0.12);
    --tint-error-strong: rgba(239, 68, 68, 0.3);
    --tint-error-border: rgba(239, 68, 68, 0.4);
    --tint-success: rgba(16, 185, 129, 0.15);
    --tint-warning: rgba(245, 158, 11, 0.15);
    --tint-info: rgba(124, 141, 181, 0.15);
    --tint-indigo: rgba(99, 102, 241, 0.15);
    --tint-hover: rgba(26, 36, 64, 0.5);
    --tint-hover-subtle: rgba(255, 255, 255, 0.03);

    /* Shadows */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);

    /* Glows */
    --glow-accent: 0 0 8px rgba(200, 168, 81, 0.4);
    --glow-accent-strong: 0 0 16px rgba(200, 168, 81, 0.6);

    /* Overlay */
    --backdrop: rgba(11, 17, 33, 0.85);

    /* Category Badge Colors */
    --cat-nachrichtenagentur: #F87171;
    --cat-oeffentlich-rechtlich: #60A5FA;
    --cat-qualitaetszeitung: #C084FC;
    --cat-behoerde: #FBBF24;
    --cat-fachmedien: #2DD4BF;
    --cat-think-tank: #818CF8;
    --cat-international: #34D399;
    --cat-regional: #FB923C;

    /* Category Badge Backgrounds */
    --cat-nachrichtenagentur-bg: rgba(239, 68, 68, 0.12);
    --cat-oeffentlich-rechtlich-bg: rgba(59, 130, 246, 0.12);
    --cat-qualitaetszeitung-bg: rgba(168, 85, 247, 0.12);
    --cat-behoerde-bg: rgba(245, 158, 11, 0.12);
    --cat-fachmedien-bg: rgba(20, 184, 166, 0.12);
    --cat-think-tank-bg: rgba(99, 102, 241, 0.12);
    --cat-international-bg: rgba(16, 185, 129, 0.12);
    --cat-regional-bg: rgba(251, 146, 60, 0.12);
    --cat-sonstige-bg: rgba(124, 141, 181, 0.12);
}

/* === Light Theme === */
[data-theme="light"] {
    --bg-primary: #F4F5F7;
    --bg-secondary: #E8EBF0;
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-topbar: #FFFFFF;
    --bg-hover: #E8EBF0;
    --bg-elevated: #F0F1F3;

    --accent: #96791A;
    --accent-hover: #7D6516;
    --accent-pressed: #645112;

    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-disabled: #A0AEC0;
    --text-tertiary: #A0AEC0;

    --input-bg: #FFFFFF;
    --input-border: #CBD5E0;
    --border: #E2E8F0;

    --success: #059669;
    --warning: #D97706;
    --error: #DC2626;
    --info: #4A5568;

    --sidebar-text: #1A202C;
    --sidebar-text-sec: #4A5568;
    --sidebar-active: #96791A;
    --sidebar-hover-bg: #F0EDE6;

    --tint-accent: rgba(150, 121, 26, 0.10);
    --tint-accent-subtle: rgba(150, 121, 26, 0.05);
    --tint-accent-faint: rgba(150, 121, 26, 0.03);
    --tint-accent-strong: rgba(150, 121, 26, 0.14);
    --tint-error: rgba(220, 38, 38, 0.08);
    --tint-error-strong: rgba(220, 38, 38, 0.2);
    --tint-error-border: rgba(220, 38, 38, 0.3);
    --tint-success: rgba(5, 150, 105, 0.10);
    --tint-warning: rgba(217, 119, 6, 0.10);
    --tint-info: rgba(74, 85, 104, 0.10);
    --tint-indigo: rgba(99, 102, 241, 0.10);
    --tint-hover: rgba(0, 0, 0, 0.04);
    --tint-hover-subtle: rgba(0, 0, 0, 0.02);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);

    --glow-accent: 0 0 6px rgba(150, 121, 26, 0.2);
    --glow-accent-strong: 0 0 12px rgba(150, 121, 26, 0.3);

    --backdrop: rgba(0, 0, 0, 0.4);

    --cat-nachrichtenagentur: #DC2626;
    --cat-oeffentlich-rechtlich: #2563EB;
    --cat-qualitaetszeitung: #7C3AED;
    --cat-behoerde: #D97706;
    --cat-fachmedien: #0D9488;
    --cat-think-tank: #4F46E5;
    --cat-international: #059669;
    --cat-regional: #EA580C;

    --cat-nachrichtenagentur-bg: rgba(220, 38, 38, 0.08);
    --cat-oeffentlich-rechtlich-bg: rgba(37, 99, 235, 0.08);
    --cat-qualitaetszeitung-bg: rgba(124, 58, 237, 0.08);
    --cat-behoerde-bg: rgba(217, 119, 6, 0.08);
    --cat-fachmedien-bg: rgba(13, 148, 136, 0.08);
    --cat-think-tank-bg: rgba(79, 70, 229, 0.08);
    --cat-international-bg: rgba(5, 150, 105, 0.08);
    --cat-regional-bg: rgba(234, 88, 12, 0.08);
    --cat-sonstige-bg: rgba(74, 85, 104, 0.08);
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* === Base === */
html, body {
    height: 100%;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--text-disabled);
    border-radius: var(--radius);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* === Login Page === */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--sp-3xl);
    background: var(--bg-primary);
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5xl) var(--sp-4xl);
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: var(--sp-4xl);
}

.login-logo h1 {
    font-family: var(--font-title);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.login-logo h1 span {
    color: var(--accent);
}

.login-logo .subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: var(--sp-xs);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.form-group {
    margin-bottom: var(--sp-xl);
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--sp-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    padding: var(--sp-lg) var(--sp-xl);
    font-size: 14px;
    color: var(--text-primary);
    font-family: var(--font-body);
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-disabled);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238896AB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

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

.login-error {
    display: none;
    background: var(--tint-error);
    border: 1px solid var(--tint-error-strong);
    border-radius: var(--radius);
    padding: var(--sp-lg) var(--sp-xl);
    margin-bottom: var(--sp-xl);
    font-size: 13px;
    color: var(--error);
}

.login-success {
    display: none;
    background: var(--tint-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius);
    padding: var(--sp-lg) var(--sp-xl);
    margin-bottom: var(--sp-xl);
    font-size: 13px;
    color: var(--success);
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-md);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    min-height: 40px;
    padding: 0 var(--sp-xl);
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent);
    color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-primary:active:not(:disabled) {
    background: var(--accent-pressed);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--bg-secondary);
    border-color: var(--accent);
}

.btn-danger {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--tint-error-border);
}

.btn-danger:hover:not(:disabled) {
    background: var(--tint-error);
    border-color: var(--error);
}

.btn-small {
    min-height: 32px;
    padding: 0 var(--sp-lg);
    font-size: 12px;
}

.btn-full {
    width: 100%;
}

/* === Dashboard Layout === */
.dashboard {
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: 56px 1fr;
    height: 100vh;
    overflow: hidden;
}

/* === Header/Topbar === */
.header {
    grid-column: 1 / -1;
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-3xl);
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--sp-xl);
}

.header-logo {
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-logo span {
    color: var(--accent);
}

.header-right {
    display: flex;
    align-items: center;
    gap: var(--sp-xl);
}

.header-user {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
/* --- User Dropdown in Header --- */
.header-user-info {
    position: relative;
}

.header-user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 4px 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.header-user-btn:hover,
.header-user-btn[aria-expanded="true"] {
    border-color: var(--border);
    background: var(--bg-secondary);
}

.header-user-chevron {
    font-size: 10px;
    color: var(--text-tertiary);
    transition: transform 0.15s;
}

.header-user-btn[aria-expanded="true"] .header-user-chevron {
    transform: rotate(180deg);
}

.header-user-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    z-index: 1000;
}

.header-user-dropdown.open {
    display: block;
}

.header-dropdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.header-dropdown-row + .header-dropdown-row {
    border-top: 1px solid var(--border);
}

.header-dropdown-label {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.header-dropdown-value {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

.header-license-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.6;
    white-space: nowrap;
}

.header-license-badge.license-trial {
    background: var(--warning-bg, #fef3c7);
    color: var(--warning-text, #92400e);
    border: 1px solid var(--warning-border, #fcd34d);
}

.header-license-badge.license-annual {
    background: var(--success-bg, #d1fae5);
    color: var(--success-text, #065f46);
    border: 1px solid var(--success-border, #6ee7b7);
}

.header-license-badge.license-permanent {
    background: var(--info-bg, #dbeafe);
    color: var(--info-text, #1e40af);
    border: 1px solid var(--info-border, #93c5fd);
}

.header-license-badge.license-expired {
    background: var(--danger-bg, #fee2e2);
    color: var(--danger-text, #991b1b);
    border: 1px solid var(--danger-border, #fca5a5);
}

.header-license-badge.license-unknown {
    background: var(--bg-tertiary, #f3f4f6);
    color: var(--text-tertiary, #6b7280);
    border: 1px solid var(--border-color, #d1d5db);
}

.header-license-warning {
    display: none;
    font-size: 11px;
    color: var(--danger-text, #991b1b);
    background: var(--danger-bg, #fee2e2);
    border: 1px solid var(--danger-border, #fca5a5);
    border-radius: var(--radius);
    padding: 3px 10px;
    white-space: nowrap;
}

.header-license-warning.visible {
    display: inline-block;
}


/* === Sidebar === */
.sidebar {
    background: var(--bg-sidebar);
    padding: var(--sp-xl);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    border-right: 1px solid var(--border);
    scrollbar-width: thin;
    scrollbar-color: var(--text-disabled) transparent;
}

.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--text-disabled); border-radius: 3px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* Sidebar Filter Tabs */
.sidebar-filter {
    display: flex;
    gap: var(--sp-xs);
    padding: 0 var(--sp-xs);
    margin-bottom: var(--sp-lg);
}

.sidebar-filter-btn {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    padding: var(--sp-sm) 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-filter-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--text-primary);
}

.sidebar-filter-btn.active {
    background: var(--tint-accent);
    border-color: var(--accent);
    color: var(--accent);
}

.sidebar-section {
    margin-bottom: var(--sp-xl);
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--sidebar-text-sec);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--sp-md);
    padding: 0 var(--sp-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    user-select: none;
}

.sidebar-section-title:hover {
    color: var(--sidebar-text);
}

.sidebar-chevron {
    display: inline-block;
    font-size: 14px;
    transition: transform 0.2s ease;
    transform: rotate(-90deg);
}

.sidebar-chevron.open {
    transform: rotate(0deg);
}


/* Trennlinie zwischen Sidebar-Sektionen */
.sidebar-section + .sidebar-section {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 4px;
}
.sidebar-section-count {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-disabled);
    font-weight: 400;
}

.incident-item {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    padding: var(--sp-lg);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s ease;
    position: relative;
}

.incident-item:hover {
    background: var(--sidebar-hover-bg);
}

.incident-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.incident-item.active {
    background: var(--bg-secondary);
}

.incident-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--sidebar-active);
    border-radius: 0 2px 2px 0;
}

.incident-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.incident-dot.active {
    background: var(--success);
}

.incident-dot.archived {
    background: var(--text-disabled);
}

.incident-dot.has-notification {
    background: var(--warning);
    animation: pulse 2s ease-in-out infinite;
}

.incident-dot.refreshing {
    background: var(--accent);
    animation: dotPulse 1.5s ease-in-out infinite;
    box-shadow: var(--glow-accent-strong);
}

.incident-dot.refresh-error {
    background: var(--error);
    animation: dotFlash 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 1;
        box-shadow: var(--glow-accent);
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        box-shadow: var(--glow-accent-strong);
        transform: scale(1.4);
    }
}

@keyframes dotFlash {
    0% { opacity: 1; transform: scale(1.6); }
    100% { opacity: 1; transform: scale(1); }
}

.incident-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.incident-meta {
    font-size: 11px;
    color: var(--sidebar-text-sec);
}

.sidebar-stats {
    margin-top: auto;
    padding: var(--sp-xl) var(--sp-lg);
    border-top: 1px solid var(--border);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: var(--sp-xs);
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* === Main Content === */
.main-content {
    overflow-y: auto;
    padding: var(--sp-3xl);
    display: flex;
    flex-direction: column;
    gap: var(--sp-2xl);
    background: var(--bg-primary);
    scrollbar-width: thin;
    scrollbar-color: var(--text-disabled) transparent;
}

.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { background: var(--text-disabled); border-radius: 3px; }
.main-content::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

#incident-view {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2xl);
}

/* === Cards === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-3xl);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-xl);
}

.card-title {
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* === Incident Header Strip === */
.incident-header-strip {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--sp-xl) var(--sp-3xl);
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    flex-shrink: 0;
}

/* Zeile 0: Typ-Badge + Auto-Refresh-Indicator */
.incident-header-row0 {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}

.auto-refresh-indicator {
    font-size: 11px;
    color: var(--accent);
    font-weight: 500;
}

/* Zeile 1: Badge + Titel + Buttons */
.incident-header-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-xl);
}

.incident-header-left {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    min-width: 0;
    flex: 1;
}

.incident-header-title {
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0;
}

.incident-header-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    flex-shrink: 0;
}

/* Zeile 2: Creator + Beschreibung + Reliability + Meta */
.incident-header-row2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-xl);
    padding-top: var(--sp-md);
    border-top: 1px solid var(--border);
}

.incident-header-row2-left {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    flex: 1;
    min-width: 0;
}

.incident-creator-badge {
    font-size: 11px;
    color: var(--text-disabled);
    white-space: nowrap;
    flex-shrink: 0;
}

.incident-creator-badge strong {
    color: var(--accent);
    font-weight: 600;
}

.incident-header-row2-right {
    display: flex;
    align-items: center;
    gap: var(--sp-xl);
    flex-shrink: 0;
}

.header-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    flex-shrink: 0;
}

/* Typ-Badge */
.incident-type-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--sp-xxs) var(--sp-md);
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.incident-type-badge.type-adhoc {
    background: var(--tint-accent);
    color: var(--accent);
}
.incident-type-badge.type-research {
    background: var(--tint-indigo);
    color: var(--cat-think-tank);
}

/* === Analyse-Bereich: Cards in gridstack === */
.incident-analysis-summary {
    display: flex;
    flex-direction: column;
}

.incident-analysis-summary > .card-header {
    flex-shrink: 0;
}

.incident-analysis-summary > #summary-content {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    background: var(--bg-primary);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: var(--sp-lg);
}

.incident-analysis-factcheck {
    display: flex;
    flex-direction: column;
}

.incident-analysis-factcheck > .card-header {
    flex-shrink: 0;
}

.incident-analysis-factcheck > .factcheck-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* Timeline-Card volle Breite */
.timeline-card {
    flex-shrink: 0;
}

.incident-description-text {
    font-size: 12px;
    color: var(--text-disabled);
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.summary-meta {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    font-size: 11px;
    color: var(--text-disabled);
    white-space: nowrap;
}

/* === Faktencheck Card === */
.factcheck-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
}

.factcheck-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-lg);
    padding: var(--sp-lg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-primary);
}

.factcheck-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    margin-top: 1px;
}

.factcheck-icon.confirmed {
    background: var(--tint-success);
    color: var(--success);
}

.factcheck-icon.unconfirmed {
    background: var(--tint-warning);
    color: var(--warning);
}

.factcheck-icon.contradicted {
    background: var(--tint-error);
    color: var(--error);
}

.factcheck-icon.developing {
    background: var(--tint-info);
    color: var(--info);
}

.factcheck-icon.established {
    background: var(--tint-success);
    color: var(--success);
}

.factcheck-icon.disputed {
    background: var(--tint-warning);
    color: var(--warning);
}

.factcheck-icon.unverified {
    background: var(--tint-info);
    color: var(--info);
}

.factcheck-claim {
    font-size: 13px;
    color: var(--text-primary);
    flex: 1;
}

.factcheck-sources {
    font-size: 11px;
    color: var(--text-disabled);
    margin-top: var(--sp-xxs);
}

/* === Faktencheck Filter-Dropdown === */
.fc-filter-bar {
    position: relative;
    margin-left: auto;
}

.fc-dropdown-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3px 10px;
    font-size: 11px;
    font-family: var(--font-body);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.fc-dropdown-toggle:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.fc-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 0;
    min-width: 180px;
    box-shadow: var(--shadow-sm);
    z-index: 20;
}

.fc-dropdown-menu.open {
    display: block;
}

.fc-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-sm) var(--sp-lg);
    cursor: pointer;
    font-size: 12px;
    color: var(--text-primary);
    transition: background 0.1s;
}

.fc-dropdown-item:hover {
    background: var(--bg-hover);
}

.fc-dropdown-item input[type="checkbox"] {
    accent-color: var(--accent);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.fc-dropdown-item .factcheck-icon {
    width: 20px;
    height: 20px;
    font-size: 10px;
}

.fc-dropdown-label {
    flex: 1;
}

.fc-dropdown-count {
    font-size: 11px;
    color: var(--text-disabled);
    font-weight: 600;
}

/* === Evidence Block (Faktencheck) === */
.evidence-block {
    margin-top: var(--sp-sm);
}

.evidence-text {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: block;
    margin-bottom: var(--sp-xs);
}

.evidence-empty {
    font-size: 11px;
    color: var(--text-disabled);
}

.evidence-chips {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-xs);
}

.evidence-chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evidence-chip:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

/* === Visueller Zeitstrahl (.vt-*) === */
.vt-timeline {
    position: relative;
    padding-left: 48px;
    overflow-y: auto;
    max-height: 400px;
    scroll-behavior: smooth;
}

/* Vertikale Achse */
.vt-timeline::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

/* Scrollbar */
.vt-timeline::-webkit-scrollbar { width: 6px; }
.vt-timeline::-webkit-scrollbar-track { background: var(--bg-primary); border-radius: 3px; }
.vt-timeline::-webkit-scrollbar-thumb { background: var(--text-disabled); border-radius: 3px; }
.vt-timeline::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* Zeitgruppe */
.vt-time-group {
    position: relative;
}

/* Zeitgruppen-Label (Raute auf der Achse) */
.vt-time-label {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: var(--sp-md) 0;
    margin-left: -48px;
    padding-left: 48px;
    background: var(--bg-card);
}

.vt-time-label::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    width: 10px;
    height: 10px;
    background: var(--accent);
    transform: translateY(-50%) rotate(45deg);
    z-index: 3;
}

.vt-time-label-text {
    font-size: 11px;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Basis-Eintrag (Artikel) */
.vt-entry {
    position: relative;
    padding: var(--sp-md) 0;
    padding-right: var(--sp-xl);
    transition: background 0.15s ease;
    cursor: default;
}

/* Achsen-Punkt (Artikel = kleiner grauer Kreis) */
.vt-entry::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 14px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-disabled);
    border: 2px solid var(--bg-card);
    z-index: 1;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.vt-entry:hover {
    background: var(--tint-hover);
}

/* Expandierbarer Eintrag */
.vt-entry.expandable {
    cursor: pointer;
}

/* Aufklapp-Dreieck */
.vt-entry.expandable::after {
    content: '\25B8';
    position: absolute;
    right: 12px;
    top: 14px;
    font-size: 10px;
    color: var(--text-disabled);
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Expanded: Punkt Gold, Dreieck rotiert */
.vt-entry.expanded::before {
    background: var(--accent);
    box-shadow: var(--glow-accent);
}

.vt-entry.expanded::after {
    transform: rotate(90deg);
    color: var(--accent);
}

/* Lagebericht-Eintrag (großer goldener Punkt + Glow) */
.vt-entry.vt-snapshot::before {
    width: 14px;
    height: 14px;
    left: -32px;
    top: 12px;
    background: var(--accent);
    border: 2px solid var(--bg-card);
    box-shadow: var(--glow-accent);
}

.vt-entry.vt-snapshot {
    background: var(--tint-accent-faint);
    border-radius: var(--radius);
    margin: var(--sp-xs) 0;
}

.vt-entry.vt-snapshot:hover {
    background: var(--tint-accent-subtle);
}

/* Artikel-Header (Zeit + Quelle + Lang-Badge) */
.vt-article-header {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}

.vt-article-time {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
}

.vt-article-source {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-disabled);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vt-article-source a {
    color: var(--text-disabled);
    text-decoration: none;
}

.vt-article-source a:hover {
    color: var(--accent);
}

/* Headline */
.vt-article-headline {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    margin-top: var(--sp-xxs);
}

/* Aufklapp-Bereich */
.vt-article-detail {
    display: none;
    padding-top: var(--sp-md);
    border-top: 1px solid var(--border);
    margin-top: var(--sp-sm);
}

.vt-entry.expanded .vt-article-detail {
    display: block;
}

.vt-article-detail-content {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-height: 150px;
    overflow-y: auto;
}

.vt-article-detail-link {
    display: inline-block;
    margin-top: var(--sp-sm);
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.vt-article-detail-link:hover {
    color: var(--accent-hover);
}

/* Snapshot-Header (Badge + Zeit + Stats) */
.vt-snapshot-header {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    flex-wrap: wrap;
}

.vt-snapshot-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--tint-accent-strong);
    color: var(--accent);
}

.vt-snapshot-time {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--accent);
    font-weight: 600;
}

.vt-snapshot-stats {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Snapshot-Vorschau (2 Zeilen, collapsed) */
.vt-snapshot-preview {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: var(--sp-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Snapshot-Detail (expanded → volle Zusammenfassung) */
.vt-snapshot-detail {
    display: none;
    margin-top: var(--sp-md);
    padding-top: var(--sp-md);
    border-top: 1px solid var(--border);
}

.vt-entry.vt-snapshot.expanded .vt-snapshot-preview {
    display: none;
}

.vt-entry.vt-snapshot.expanded .vt-snapshot-detail {
    display: block;
}

/* Cluster-Badge */
.vt-cluster-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    background: var(--tint-accent-strong);
    color: var(--accent);
    margin-left: var(--sp-sm);
}

/* Modal-Version */
.modal-content-viewer .vt-timeline {
    max-height: none;
    padding-left: 52px;
}

.modal-content-viewer .vt-timeline::before {
    left: 27px;
}

/* === Sprach-Badge === */
.lang-badge {
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: var(--tint-indigo);
    color: var(--cat-think-tank);
    flex-shrink: 0;
}

/* === Quellenübersicht === */
.source-overview-card {
    flex-shrink: 0;
}

.source-overview-card .card-header {
    margin-bottom: var(--sp-lg);
}

.source-overview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-lg);
    flex-wrap: wrap;
    gap: var(--sp-md);
}

.source-overview-stat {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.source-lang-chips {
    display: flex;
    gap: var(--sp-sm);
}

.source-lang-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
}

.source-lang-chip strong {
    color: var(--text-primary);
}

.source-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--sp-sm);
}

.source-overview-item {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-lg);
    border-radius: var(--radius);
    background: var(--bg-primary);
    border: 1px solid var(--border);
}

.source-overview-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-overview-lang {
    font-size: 10px;
    color: var(--text-disabled);
    flex-shrink: 0;
}

.source-overview-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    background: var(--tint-accent);
    padding: 1px 6px;
    border-radius: var(--radius);
    flex-shrink: 0;
}

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--sp-xxs) var(--sp-md);
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-verified {
    background: var(--tint-success);
    color: var(--success);
}

.badge-unverified {
    background: var(--tint-warning);
    color: var(--warning);
}

.badge-contradicted {
    background: var(--tint-error);
    color: var(--error);
}

.badge-auto {
    background: var(--tint-accent);
    color: var(--accent);
}

.badge-research {
    background: var(--tint-indigo);
    color: var(--cat-think-tank);
}

.badge-private {
    background: var(--tint-error);
    color: var(--cat-nachrichtenagentur);
}

/* === Modal === */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--backdrop);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-xl) var(--sp-3xl);
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: var(--sp-xs) var(--sp-md);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    line-height: 1;
}

.modal-close:hover {
    background: var(--tint-error);
    color: var(--error);
}

.modal-body {
    padding: var(--sp-3xl);
    display: flex;
    flex-direction: column;
    gap: var(--sp-xl);
}

.modal-footer {
    padding: var(--sp-xl) var(--sp-3xl);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-lg);
}

/* === Conditional Field === */
.conditional-field {
    display: none;
}

.conditional-field.visible {
    display: block;
}

/* === Toast Notifications === */
.toast-container {
    position: fixed;
    top: 72px;
    right: var(--sp-3xl);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--sp-lg) var(--sp-xl);
    box-shadow: var(--shadow-md);
    pointer-events: auto;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    max-width: 380px;
    border-left: 3px solid var(--accent);
}

.toast.toast-warning {
    border-left-color: var(--warning);
}

.toast.toast-error {
    border-left-color: var(--error);
}

.toast.toast-success {
    border-left-color: var(--success);
}

.toast.toast-info {
    border-left-color: var(--info);
}

.toast-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* === Empty State === */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--sp-5xl) var(--sp-4xl);
    text-align: center;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: var(--sp-xl);
    opacity: 0.2;
    color: var(--text-secondary);
}

.empty-state-title {
    font-family: var(--font-title);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--sp-md);
}

.empty-state-text {
    font-size: 13px;
    color: var(--text-disabled);
    max-width: 320px;
}

/* === Loading Spinner === */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

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

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-lg);
    padding: var(--sp-3xl);
    color: var(--text-secondary);
    font-size: 13px;
}

/* === Fortschrittsanzeige === */
.progress-bar {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--sp-xl);
    margin-bottom: var(--sp-xl);
    position: relative;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--sp-lg);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    font-size: 12px;
    color: var(--text-disabled);
    transition: color 0.3s ease;
}

.progress-step.active {
    color: var(--accent);
    font-weight: 600;
}

.progress-step.done {
    color: var(--success);
}

.progress-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-disabled);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.progress-step.active .progress-step-dot {
    background: var(--accent);
    box-shadow: var(--glow-accent);
    animation: pulse 1.5s ease-in-out infinite;
}

.progress-step.done .progress-step-dot {
    background: var(--success);
}

.progress-track {
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: var(--sp-md);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: 2px;
    transition: width 0.5s ease-out;
    width: 0%;
}

.progress-label-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--sp-md);
    position: relative;
}

.progress-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-timer {
    font-family: var(--font-mono, 'Courier New', monospace);
    color: var(--text-disabled);
    font-size: 12px;
}

.progress-cancel-btn {
    position: absolute;
    right: var(--sp-xl);
    bottom: var(--sp-lg);
    background: none;
    border: none;
    color: var(--text-disabled);
    font-size: 11px;
    cursor: pointer;
    text-decoration: underline;
    padding: 2px 4px;
    transition: color 0.2s ease;
}

.progress-cancel-btn:hover {
    color: var(--error);
}

.progress-bar--complete .progress-cancel-btn,
.progress-bar--error .progress-cancel-btn {
    display: none;
}

.progress-bar--complete .progress-fill {
    background: linear-gradient(90deg, var(--success), #34D399);
    width: 100% !important;
}

.progress-bar--complete .progress-label {
    color: var(--success);
    font-weight: 600;
}

.progress-bar--error .progress-fill {
    background: linear-gradient(90deg, var(--error), #F87171);
}

.progress-bar--error .progress-label {
    color: var(--error);
}

/* === Briefing === */
.briefing-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.briefing-content strong {
    color: var(--text-primary);
}

.briefing-heading {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--sp-xl);
    margin-bottom: var(--sp-xs);
    padding-bottom: 0;
    border-bottom: none;
}

.briefing-content .briefing-heading:first-child {
    margin-top: 0;
}

/* === Form Hint === */
.form-hint {
    font-size: 11px;
    color: var(--text-disabled);
    margin-top: var(--sp-xs);
}

/* === Inline-Zitate === */
.citation {
    color: var(--accent);
    text-decoration: none;
    font-size: 11px;
    vertical-align: super;
    font-weight: 600;
}
.citation:hover {
    text-decoration: underline;
}

/* === Quellenverzeichnis (im Lagebild) === */
.source-list {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.source-list-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-disabled);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.source-list-item {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 2px 0;
}
.source-list-item a {
    color: var(--text-primary);
}
.source-list-item a:hover {
    color: var(--accent);
}
.source-nr {
    color: var(--accent);
    font-weight: 600;
    margin-right: 4px;
}

/* === Timeline Filter === */
.timeline-filter-input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    width: 140px;
}
.timeline-filter-input:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-color: var(--accent);
}
.timeline-filter-input::placeholder {
    color: var(--text-disabled);
}
.timeline-filter-select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: var(--radius);
    padding: 4px 8px;
    font-size: 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    cursor: pointer;
    appearance: none;
    padding-right: 20px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238896AB' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 12px;
}

/* === Horizontale Timeline (ht-*) === */

/* Controls-Leiste */
.ht-controls {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    flex-wrap: wrap;
}

/* Filter-/Range-Gruppen (Pill-Toggle) */
.ht-filter-group,
.ht-range-group {
    display: flex;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.ht-filter-btn,
.ht-range-btn,
.ht-modal-filter-btn {
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-body);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.ht-filter-btn:hover,
.ht-range-btn:hover,
.ht-modal-filter-btn:hover {
    color: var(--text-primary);
    background: var(--tint-accent-subtle);
}

.ht-filter-btn.active,
.ht-range-btn.active,
.ht-modal-filter-btn.active {
    background: var(--tint-accent-strong);
    color: var(--accent);
}

/* Zähler + integrierte Legende */
.ht-count {
    font-size: 12px;
    color: var(--text-disabled);
    white-space: nowrap;
}

.ht-legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-disabled);
    vertical-align: middle;
    margin-right: 2px;
}

.ht-legend-dot.ht-legend-gold {
    background: var(--accent);
}

/* Timeline-Container */
.ht-timeline-container {
    padding: 12px 20px 8px;
}

/* Achsen-Container */
.ht-axis {
    position: relative;
    height: 110px;
}

/* Stündliches Layout: höher wegen Datums-Markern oben */
.ht-axis--hourly {
    height: 130px;
}

/* Punkte-Bereich (über der Linie) */
.ht-points {
    position: absolute;
    left: 4%;
    right: 4%;
    top: 0;
    height: 56px;
}

.ht-axis--hourly .ht-points {
    top: 20px;
}

/* Achsenlinie */
.ht-axis-line {
    position: absolute;
    left: 2%;
    right: 2%;
    top: 60px;
    height: 2px;
    background: var(--border);
}

.ht-axis--hourly .ht-axis-line {
    top: 80px;
}

/* Datums-Marker (vertikale Linie + Datum oben, nur bei Stunden-Granularität) */
.ht-day-markers {
    position: absolute;
    left: 4%;
    right: 4%;
    top: 0;
    bottom: 0;
    pointer-events: none;
}

.ht-day-marker {
    position: absolute;
    top: 0;
}

.ht-day-marker-label {
    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-50%);
    font-size: 10px;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
}

.ht-day-marker-line {
    position: absolute;
    top: 14px;
    height: 66px;
    width: 1px;
    left: 0;
    background: var(--accent);
    opacity: 0.2;
}

/* Punkt (Basis) */
.ht-point {
    position: absolute;
    bottom: 0;
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--text-disabled);
    border: 2px solid var(--bg-card);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.ht-point:hover {
    box-shadow: var(--glow-accent);
    z-index: 4;
}

.ht-point.active {
    box-shadow: var(--glow-accent-strong);
    z-index: 4;
}

/* Dimmen: nicht-aktive Punkte verblassen wenn ein Punkt aktiv ist */
.ht-points:has(.ht-point.active) .ht-point:not(.active) {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

/* Pfeil über dem aktiven Punkt */
.ht-point.active::after {
    content: '▼';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--accent);
    pointer-events: none;
    line-height: 1;
}

/* Snapshot-Punkt (Raute) */
.ht-point.ht-snapshot-point {
    border-radius: 2px;
    transform: translateX(-50%) rotate(45deg);
    background: var(--accent);
    box-shadow: var(--glow-accent);
}

.ht-point.ht-snapshot-point .ht-tooltip,
.ht-point.ht-snapshot-point .ht-point-count {
    transform: rotate(-45deg);
}

.ht-point.ht-snapshot-point .ht-tooltip {
    transform: rotate(-45deg) translateX(-50%);
    transform-origin: bottom left;
}

/* Gemischter Punkt (Gold-Kreis) */
.ht-point.ht-mixed-point {
    background: var(--accent);
    border: 2px solid var(--bg-card);
}

/* Tooltip (über dem Punkt) */
.ht-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: var(--radius);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    border: 1px solid var(--border);
    z-index: 10;
}

.ht-point:hover .ht-tooltip {
    opacity: 1;
    visibility: visible;
}

/* Zahl unter dem Punkt */
.ht-point-count {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-disabled);
    white-space: nowrap;
    pointer-events: none;
}

.ht-point.active .ht-point-count,
.ht-point:hover .ht-point-count {
    color: var(--accent);
}

/* Achsen-Labels (unter der Linie) */
.ht-axis-labels {
    position: absolute;
    left: 4%;
    right: 4%;
    top: 72px;
    height: 20px;
}

.ht-axis--hourly .ht-axis-labels {
    top: 90px;
}

.ht-axis-label {
    position: absolute;
    transform: translateX(-50%);
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* Leerer Zustand */
.ht-empty {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* Detail-Panel */
.ht-detail-panel {
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    animation: ht-slide-down 0.2s ease;
}

@keyframes ht-slide-down {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.ht-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.ht-detail-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    font-family: var(--font-mono);
}

.ht-detail-close {
    background: none;
    border: none;
    color: var(--text-disabled);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.ht-detail-close:hover {
    color: var(--text-primary);
}

.ht-detail-content {
    max-height: 350px;
    overflow-y: auto;
    padding: 4px 12px;
}

.ht-detail-content::-webkit-scrollbar { width: 6px; }
.ht-detail-content::-webkit-scrollbar-track { background: var(--bg-primary); border-radius: 3px; }
.ht-detail-content::-webkit-scrollbar-thumb { background: var(--text-disabled); border-radius: 3px; }
.ht-detail-content::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* === Briefing Listen === */
.briefing-content ul {
    margin: 8px 0;
    padding-left: 20px;
}
.briefing-content li {
    margin: 4px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* === Responsive === */

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .incident-header-row1 {
        flex-direction: column;
        align-items: flex-start;
    }

    .incident-header-row2 {
        flex-direction: column;
        align-items: flex-start;
    }

    .incident-header-row2-right {
        flex-wrap: wrap;
    }

    .incident-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .source-overview-grid {
        grid-template-columns: 1fr;
    }
}

/* === Toggle Switch === */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.toggle-label,
.form-group .toggle-label {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-lg);
    cursor: pointer;
    user-select: none;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 0;
}

.toggle-label input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.toggle-switch {
    position: relative;
    width: 36px;
    min-width: 36px;
    height: 20px;
    background: var(--input-border);
    border-radius: 10px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.toggle-label input:focus-visible + .toggle-switch {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.toggle-label input:checked + .toggle-switch {
    background: var(--accent);
}

.toggle-label input:checked + .toggle-switch::after {
    transform: translateX(16px);
    background: var(--bg-primary);
}

.toggle-text {
    font-size: 13px;
    color: var(--text-primary);
}

/* International-Badge im Header */
.intl-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 500;
}

.intl-badge.intl-yes {
    background: var(--tint-success);
    color: var(--success);
}

.intl-badge.intl-no {
    background: var(--tint-accent);
    color: var(--accent);
}

/* === Notification Center === */
.notification-center {
    position: relative;
}

.notification-bell {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--sp-sm) var(--sp-md);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
    position: relative;
}

.notification-bell:hover {
    color: var(--accent);
    background: var(--bg-hover);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: var(--error);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--font-body);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.notification-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-lg) var(--sp-xl);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.notification-panel-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-mark-read {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    padding: var(--sp-xxs) var(--sp-sm);
    border-radius: var(--radius);
    transition: background 0.2s ease;
}

.notification-mark-read:hover {
    background: var(--tint-accent);
}

.notification-panel-list {
    overflow-y: auto;
    flex: 1;
    max-height: 420px;
}

.notification-empty {
    padding: var(--sp-3xl);
    text-align: center;
    font-size: 12px;
    color: var(--text-disabled);
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-lg);
    padding: var(--sp-lg) var(--sp-xl);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s ease;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--bg-hover);
}

.notification-item.unread {
    border-left: 3px solid var(--accent);
    padding-left: calc(var(--sp-xl) - 3px);
}

.notification-item-icon {
    width: 24px;
    height: 24px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}

.notification-item-icon.success {
    background: var(--tint-success);
    color: var(--success);
}

.notification-item-icon.warning {
    background: var(--tint-warning);
    color: var(--warning);
}

.notification-item-icon.error {
    background: var(--tint-error);
    color: var(--error);
}

.notification-item-icon.info {
    background: var(--tint-info);
    color: var(--info);
}

.notification-item-body {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item-text {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 1px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-time {
    font-size: 10px;
    font-family: var(--font-mono);
    color: var(--text-disabled);
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Notification Center Responsive */
@media (max-width: 768px) {
    .notification-panel {
        width: calc(100vw - 32px);
        right: -8px;
    }
}

/* === Quellenverwaltung === */

/* Wide Modal */
.modal-wide {
    max-width: 800px;
}

/* Content-Viewer Modal */
.modal-content-viewer {
    max-width: 900px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content-viewer .modal-header {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
}

.modal-header-extra {
    margin-left: auto;
    margin-right: 8px;
}

.modal-content-viewer .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-2xl) var(--sp-3xl);
    background: var(--bg-primary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Klickbare Sektionstitel */
.card-title.clickable {
    cursor: pointer;
    transition: color 0.2s ease;
}

.card-title.clickable:hover {
    color: var(--accent);
}

/* Detaillierte Quellenübersicht im Modal */
.source-detail-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 6px;
    overflow: hidden;
}

.source-detail-header {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: 10px 14px;
    cursor: pointer;
    background: var(--bg-secondary);
    transition: background 0.15s ease;
}

.source-detail-header:hover {
    background: var(--bg-hover);
}

.source-detail-toggle {
    color: var(--text-disabled);
    font-size: 12px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.source-detail-group.open .source-detail-toggle {
    transform: rotate(90deg);
}

.source-detail-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}

.source-detail-articles {
    display: none;
    border-top: 1px solid var(--border);
}

.source-detail-group.open .source-detail-articles {
    display: block;
}

.source-detail-article {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    padding: 8px 14px 8px 36px;
    font-size: 12px;
    border-bottom: 1px solid var(--border);
}

.source-detail-article:last-child {
    border-bottom: none;
}

.source-detail-time {
    color: var(--text-disabled);
    flex-shrink: 0;
    min-width: 90px;
    font-family: var(--font-mono);
    font-size: 11px;
}

.source-detail-headline {
    flex: 1;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.source-detail-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.source-detail-link:hover {
    opacity: 1;
}

/* Sidebar Sources Link */
.sidebar-sources-link {
    padding: var(--sp-lg) var(--sp-xl);
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.sidebar-sources-link .btn {
    margin-bottom: var(--sp-md);
}

.sidebar-feedback-btn {
    margin-top: var(--sp-md);
    opacity: 0.7;
    font-size: 12px;
}

.sidebar-feedback-btn:hover {
    opacity: 1;
}

.sidebar-stats-mini {
    font-size: 11px;
    color: var(--text-disabled);
    text-align: center;
}

/* Stats-Leiste */
.sources-stats-bar {
    display: flex;
    align-items: center;
    gap: var(--sp-xl);
    padding: var(--sp-lg);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--sp-lg);
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.sources-stats-bar .sources-stat-item {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
}

.sources-stats-bar .sources-stat-value {
    font-weight: 700;
    color: var(--text-primary);
}

.sources-search-input {
    width: 160px;
}

/* Toolbar */
.sources-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-lg);
    margin-bottom: var(--sp-lg);
}

.sources-filters {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    flex-wrap: wrap;
}

/* Sources-Modal Body */
.sources-modal-body {
    padding: var(--sp-xl) var(--sp-3xl);
}

/* Inline-Formular Zeile */
.sources-form-row {
    display: flex;
    gap: var(--sp-md);
    align-items: flex-end;
}

.sources-form-row .form-group {
    margin: 0;
}

.sources-form-row .form-group.flex-1 {
    flex: 1;
}

.sources-form-row .btn {
    height: 36px;
    white-space: nowrap;
}

/* Discovery-Ergebnis */
.sources-discovery-result {
    margin-top: var(--sp-lg);
}

.sources-discovery-actions {
    display: flex;
    gap: var(--sp-md);
    margin-top: var(--sp-lg);
}

/* Toolbar Button-Gruppe */
.sources-toolbar-actions {
    display: flex;
    gap: var(--sp-md);
}

/* Readonly-Input */
.input-readonly {
    background: var(--bg-elevated);
    color: var(--text-secondary);
}

.source-notes-input {
    width: 200px;
}

/* Inline-Formular */
.sources-add-form {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--sp-xl);
    margin-bottom: var(--sp-lg);
}

.sources-add-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--sp-lg);
}

.sources-add-form-grid .form-group {
    margin: 0;
}

.sources-add-form label:not(.toggle-label) {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--sp-xs);
    display: block;
}

.sources-add-form input,
.sources-add-form select {
    width: 100%;
}

/* Quellen-Liste */
.sources-list {
    max-height: 50vh;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.sources-list::-webkit-scrollbar {
    width: 6px;
}
.sources-list::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
.sources-list::-webkit-scrollbar-thumb {
    background: var(--text-disabled);
    border-radius: 3px;
}

/* Source Row */
.source-row {
    display: grid;
    grid-template-columns: 1fr 120px 90px 60px 40px 32px;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-xl);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s ease;
    font-size: 13px;
}

.source-row:last-child {
    border-bottom: none;
}

.source-row:hover {
    background: var(--bg-hover);
}

.source-row-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.source-row-name-text {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-row-domain {
    font-size: 11px;
    color: var(--text-disabled);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-row-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
}

/* Kategorie-Badges */
.source-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.source-category-badge.cat-nachrichtenagentur {
    background: var(--cat-nachrichtenagentur-bg);
    color: var(--cat-nachrichtenagentur);
}

.source-category-badge.cat-oeffentlich-rechtlich {
    background: var(--cat-oeffentlich-rechtlich-bg);
    color: var(--cat-oeffentlich-rechtlich);
}

.source-category-badge.cat-qualitaetszeitung {
    background: var(--cat-qualitaetszeitung-bg);
    color: var(--cat-qualitaetszeitung);
}

.source-category-badge.cat-behoerde {
    background: var(--cat-behoerde-bg);
    color: var(--cat-behoerde);
}

.source-category-badge.cat-fachmedien {
    background: var(--cat-fachmedien-bg);
    color: var(--cat-fachmedien);
}

.source-category-badge.cat-think-tank {
    background: var(--cat-think-tank-bg);
    color: var(--cat-think-tank);
}

.source-category-badge.cat-international {
    background: var(--cat-international-bg);
    color: var(--cat-international);
}

.source-category-badge.cat-regional {
    background: var(--cat-regional-bg);
    color: var(--cat-regional);
}

.source-category-badge.cat-sonstige {
    background: var(--cat-sonstige-bg);
    color: var(--info);
}

/* Typ-Badges */
.source-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.source-type-badge.type-rss_feed {
    background: var(--tint-success);
    color: var(--success);
}

.source-type-badge.type-web_source {
    background: var(--cat-oeffentlich-rechtlich-bg);
    color: var(--cat-oeffentlich-rechtlich);
}

.source-type-badge.type-excluded {
    background: var(--tint-error);
    color: var(--error);
}

/* Active Toggle */
.source-toggle {
    position: relative;
    width: 28px;
    height: 16px;
    background: var(--input-border);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    padding: 0;
    flex-shrink: 0;
}

.source-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}

.source-toggle.active {
    background: var(--accent);
}

.source-toggle.active::after {
    transform: translateX(12px);
    background: var(--bg-primary);
}

/* Delete Button */
.source-edit-btn {
    background: none;
    border: none;
    color: var(--text-disabled);
    cursor: pointer;
    font-size: 13px;
    padding: 2px 6px;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}

.source-edit-btn:hover {
    color: var(--accent);
    background: var(--tint-accent);
}

.source-delete-btn {
    background: none;
    border: none;
    color: var(--text-disabled);
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: var(--radius);
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}

.source-delete-btn:hover {
    color: var(--error);
    background: var(--tint-error);
}

/* Domain-Gruppen */
.source-group {
    border-bottom: 1px solid var(--border);
}

.source-group:last-child {
    border-bottom: none;
}

.source-group-header {
    display: grid;
    grid-template-columns: 20px 1fr auto auto auto;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-xl);
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 13px;
}

.source-group-header:hover {
    background: var(--bg-hover);
}

.source-group-header.expanded .source-group-toggle {
    transform: rotate(90deg);
}

.source-group-toggle {
    font-size: 10px;
    color: var(--text-disabled);
    transition: transform 0.2s ease;
    display: inline-block;
    width: 20px;
    text-align: center;
    user-select: none;
}

.source-group-toggle-placeholder {
    width: 20px;
    display: inline-block;
}

.source-group-info {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    min-width: 0;
}

.source-group-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-group-notes {
    font-size: 12px;
    color: var(--text-disabled);
    font-weight: 400;
}

.source-feed-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 8px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    background: var(--bg-primary);
    color: var(--text-secondary);
    white-space: nowrap;
}

.source-group-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
}

/* Grundquelle-Badge */
.source-global-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--bg-tertiary, #2a2a2a);
    color: var(--text-secondary, #888);
    white-space: nowrap;
}

/* Ausgeschlossene Domain */
.source-group-header.excluded {
    grid-template-columns: 1fr auto auto;
    border-left: 3px solid var(--error);
    opacity: 0.65;
    cursor: default;
}

.source-group-header.excluded:hover {
    opacity: 0.8;
}

.source-group-header.excluded .source-group-name {
    color: var(--text-secondary);
}

.source-excluded-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 600;
    background: var(--tint-error);
    color: var(--error);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Feed-Zeilen (aufklappbar) */
.source-group-feeds {
    display: none;
    padding-left: 36px;
    padding-bottom: var(--sp-sm);
}

.source-group-feeds.expanded {
    display: block;
}

.source-feed-row {
    display: grid;
    grid-template-columns: 22px 1fr auto auto auto;
    align-items: center;
    gap: var(--sp-md);
    padding: 3px var(--sp-xl) 3px 0;
    font-size: 12px;
    color: var(--text-secondary);
    transition: background 0.15s ease;
}

.source-feed-row:hover {
    background: var(--bg-hover);
    border-radius: var(--radius);
}

.source-feed-connector {
    font-family: var(--font-mono);
    color: var(--text-disabled);
    font-size: 12px;
    white-space: pre;
    user-select: none;
}

.source-feed-name {
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.source-feed-url {
    font-size: 11px;
    color: var(--text-disabled);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

/* Block-Button */

/* Responsive */
@media (max-width: 768px) {
    .modal-wide {
        max-width: 95vw;
    }

    .modal-content-viewer {
        max-width: 95vw;
        height: 90vh;
    }

    .source-group-header {
        grid-template-columns: 20px 1fr auto auto;
    }

    .source-feed-row {
        grid-template-columns: 22px 1fr auto auto;
    }

    .source-feed-url {
        display: none;
    }

    .sources-add-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* === Lagebild Zeitstempel === */
.lagebild-timestamp {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-primary);
    margin-left: auto;
}

/* === Quellenübersicht Toggle === */
.source-overview-header-toggle {
    cursor: pointer;
    user-select: none;
}

.source-overview-header-toggle:hover {
    background: var(--tint-hover-subtle);
}

.source-overview-toggle-icon {
    font-size: 11px;
    color: var(--text-disabled);
    transition: transform 0.2s ease;
    margin-left: auto;
}

.source-overview-card .card-header.source-overview-header-toggle {
    margin-bottom: 0;
}

.source-overview-card #source-overview-content:not([style*="none"]) {
    margin-top: var(--sp-lg);
}

/* === Quellenübersicht Detailansicht-Button === */
.btn.btn-secondary.source-detail-btn {
    font-size: 11px;
    padding: 3px 10px;
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.source-detail-btn:hover {
    opacity: 1;
}

/* === Quellenübersicht Chevron === */
.source-overview-chevron {
    font-size: 32px;
    color: var(--accent);
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-block;
    flex-shrink: 0;
}

.source-overview-chevron.open {
    transform: rotate(90deg);
}

.source-overview-header-toggle:hover .source-overview-chevron {
    color: var(--accent);
}

/* === Theme Toggle Button === */
.theme-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}
.theme-switch-icon {
    font-size: 14px;
    line-height: 1;
    opacity: 0.4;
    transition: opacity 0.3s;
}
.theme-switch.dark .theme-switch-moon,
.theme-switch.light .theme-switch-sun {
    opacity: 1;
}
.theme-switch-track {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: var(--bg-tertiary, #1A2440);
    border: 1px solid var(--border, #1E2D45);
    transition: background 0.3s, border-color 0.3s;
    flex-shrink: 0;
}
.theme-switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent, #C8A851);
    box-shadow: 0 0 8px rgba(200, 168, 81, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}
/* Dark mode: knob right */
.theme-switch.dark .theme-switch-knob {
    transform: translateX(18px);
}
/* Light mode: knob left */
.theme-switch.light .theme-switch-knob {
    transform: translateX(0);
}
.theme-switch:hover .theme-switch-track {
    border-color: var(--accent, #C8A851);
}
.theme-switch:hover .theme-switch-knob {
    box-shadow: 0 0 12px rgba(200, 168, 81, 0.5);
}

/* === Light Theme Sonderregeln === */
[data-theme="light"] .sidebar {
    border-right: 1px solid var(--border);
    box-shadow: 1px 0 4px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .card {
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .header {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: #F0F1F3;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: #C4C9D4;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #A0A8B8;
}

[data-theme="light"] .login-container {
    background: linear-gradient(135deg, #F4F5F7 0%, #E8EBF0 50%, #F0EDE6 100%);
}

[data-theme="light"] .modal {
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .notification-panel {
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .toast {
    box-shadow: var(--shadow-md);
}

[data-theme="light"] .ht-detail-panel {
    box-shadow: var(--shadow-sm);
}

/* === gridstack Dashboard-Layout === */
.grid-stack {
    min-height: 200px;
}

.grid-stack > .grid-stack-item > .grid-stack-item-content {
    overflow: hidden;
}

.grid-stack-item-content > .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.grid-stack-item-content .incident-analysis-summary > #summary-content,
.grid-stack-item-content .incident-analysis-factcheck > .factcheck-list,
.grid-stack-item-content #timeline {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--text-disabled) transparent;
}

.grid-stack-item-content .incident-analysis-summary > #summary-content::-webkit-scrollbar,
.grid-stack-item-content .incident-analysis-factcheck > .factcheck-list::-webkit-scrollbar,
.grid-stack-item-content #timeline::-webkit-scrollbar { width: 6px; }

.grid-stack-item-content .incident-analysis-summary > #summary-content::-webkit-scrollbar-track,
.grid-stack-item-content .incident-analysis-factcheck > .factcheck-list::-webkit-scrollbar-track,
.grid-stack-item-content #timeline::-webkit-scrollbar-track { background: transparent; border-radius: 3px; }

.grid-stack-item-content .incident-analysis-summary > #summary-content::-webkit-scrollbar-thumb,
.grid-stack-item-content .incident-analysis-factcheck > .factcheck-list::-webkit-scrollbar-thumb,
.grid-stack-item-content #timeline::-webkit-scrollbar-thumb { background: var(--text-disabled); border-radius: 3px; }

.grid-stack-item-content .incident-analysis-summary > #summary-content::-webkit-scrollbar-thumb:hover,
.grid-stack-item-content .incident-analysis-factcheck > .factcheck-list::-webkit-scrollbar-thumb:hover,
.grid-stack-item-content #timeline::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* Quellenübersicht: Kachel wächst beim Aufklappen via resizeTileToContent */
.grid-stack-item-content #source-overview-content {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--text-disabled) transparent;
}

.grid-stack-item-content #source-overview-content::-webkit-scrollbar { width: 6px; }
.grid-stack-item-content #source-overview-content::-webkit-scrollbar-track { background: transparent; border-radius: 3px; }
.grid-stack-item-content #source-overview-content::-webkit-scrollbar-thumb { background: var(--text-disabled); border-radius: 3px; }
.grid-stack-item-content #source-overview-content::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

.grid-stack-item-content .incident-analysis-summary,
.grid-stack-item-content .incident-analysis-factcheck {
    max-height: none;
    overflow: hidden;
}

.grid-stack .card-header {
    cursor: grab;
}

.grid-stack .card-header:active {
    cursor: grabbing;
}

.grid-stack-item > .ui-resizable-se {
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.2s;
}

.grid-stack-item:hover > .ui-resizable-se {
    opacity: 0.5;
}

/* Layout-Toolbar */
.layout-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-md) 0;
}

.layout-toggles {
    display: flex;
    gap: var(--sp-sm);
}

.layout-toggle-btn {
    padding: var(--sp-xs) var(--sp-lg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-disabled);
    font-size: 12px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: line-through;
}

.layout-toggle-btn.active {
    background: var(--tint-accent);
    color: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
}

.layout-toggle-btn:hover {
    border-color: var(--accent);
}

/* Temporäre Messklasse: hebt alle Höhenbeschränkungen auf */
.grid-stack-item.gs-measuring {
    height: auto !important;
}

.gs-measuring > .grid-stack-item-content {
    height: auto !important;
    position: relative !important;
}

.gs-measuring .grid-stack-item-content > .card {
    height: auto !important;
}

/* === Barrierefreiheit (A11y) === */

/* Screen-Reader-only: visuell versteckt, für Screenreader sichtbar */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip-Link: bei Tab-Focus sichtbar */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 10000;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

/* === Default Focus-Visible fuer alle interaktiven Elemente (WCAG 2.4.7) === */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible, [role="button"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Form-Fehler (Accessibility) */
.form-error {
    font-size: 12px;
    color: var(--error);
    margin-top: var(--sp-xs);
}

/* prefers-reduced-motion: alle Animationen deaktivieren */
@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;
    }
}

/* === Barrierefreiheits-Panel === */
.a11y-center { position: relative; }

.a11y-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--sp-sm) var(--sp-md);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background 0.2s ease;
    width: 36px;
    height: 36px;
}
.a11y-btn:hover { color: var(--accent); background: var(--bg-hover); }

.a11y-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 200;
    padding: var(--sp-xl);
}

.a11y-panel-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--sp-lg);
}

.a11y-option {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-sm) 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-primary);
    user-select: none;
}
.a11y-option input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.a11y-option .toggle-switch {
    flex-shrink: 0;
}
.a11y-option input:focus-visible + .toggle-switch {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.a11y-option input:checked + .toggle-switch {
    background: var(--accent);
}
.a11y-option input:checked + .toggle-switch::after {
    transform: translateX(16px);
    background: var(--bg-primary);
}

/* === A11y: Hoher Kontrast (Dark Theme) === */
/* === Refresh History Popover === */
.meta-updated-link {
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dashed;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}
.meta-updated-link:hover,
.meta-updated-link:focus {
    color: var(--accent);
}
.incident-header-row2-right {
    position: relative;
}
.refresh-history-popover {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--sp-md);
    width: 380px;
    max-height: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 30;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.refresh-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-lg) var(--sp-xl);
    border-bottom: 1px solid var(--border);
}
.refresh-history-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}
.refresh-history-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    padding: 0 var(--sp-xs);
    line-height: 1;
}
.refresh-history-close:hover {
    color: var(--text-primary);
}
.refresh-history-list {
    overflow-y: auto;
    max-height: 360px;
    scrollbar-width: thin;
    scrollbar-color: var(--text-disabled) transparent;
}
.refresh-history-list::-webkit-scrollbar { width: 5px; }
.refresh-history-list::-webkit-scrollbar-track { background: transparent; }
.refresh-history-list::-webkit-scrollbar-thumb { background: var(--text-disabled); border-radius: 3px; }
.refresh-history-entry {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-xl);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}
.refresh-history-entry:last-child {
    border-bottom: none;
}
.rh-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.rh-status-dot.completed { background: var(--success); }
.rh-status-dot.error { background: var(--error); }
.rh-status-dot.running {
    background: var(--warning);
    animation: rh-pulse 1.5s ease-in-out infinite;
}
@keyframes rh-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.rh-info {
    flex: 1;
    min-width: 0;
}
.rh-info-time {
    color: var(--text-primary);
    font-weight: 500;
}
.rh-info-detail {
    color: var(--text-secondary);
    font-size: 11px;
    margin-top: 1px;
}
.rh-info-error {
    color: var(--error);
    font-size: 11px;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rh-trigger-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: var(--radius);
    flex-shrink: 0;
}
.rh-trigger-badge.auto {
    background: var(--tint-success);
    color: var(--success);
}
.rh-trigger-badge.manual {
    background: var(--tint-accent);
    color: var(--accent);
}

/* === Interval Input Group === */
.interval-input-group {
    display: flex;
    gap: var(--sp-md);
}
.interval-input-group input[type="number"] {
    width: 80px;
    flex-shrink: 0;
}
.interval-input-group select {
    flex: 1;
    min-width: 0;
}

[data-a11y-contrast="true"] {
    --text-disabled: #B0BDD0;
    --border: #3A4A66;
    --input-border: #3A4A66;
}
[data-a11y-contrast="true"] .btn-primary {
    color: #1A1A1A;
}

/* === A11y: Hoher Kontrast (Light Theme) === */
[data-a11y-contrast="true"][data-theme="light"] {
    --accent: #6B5714;
    --accent-hover: #5A4A11;
    --text-disabled: #718096;
    --border: #94A3B8;
    --input-border: #94A3B8;
}

/* === A11y: Verstaerkte Focus-Anzeige === */
[data-a11y-focus="true"] a:focus-visible,
[data-a11y-focus="true"] button:focus-visible,
[data-a11y-focus="true"] input:focus-visible,
[data-a11y-focus="true"] select:focus-visible,
[data-a11y-focus="true"] textarea:focus-visible,
[data-a11y-focus="true"] [tabindex]:focus-visible,
[data-a11y-focus="true"] [role="button"]:focus-visible {
    outline: 3px solid var(--accent) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(200, 168, 81, 0.3) !important;
}

/* === A11y: Größere Schrift === */
/* === A11y: Groessere Schrift (zoom skaliert auch px-basierte font-sizes) === */
[data-a11y-fontsize="true"] body {
    zoom: 1.15;
}

/* === A11y: Animationen aus === */
[data-a11y-motion="true"] *,
[data-a11y-motion="true"] *::before,
[data-a11y-motion="true"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

/* === Export Dropdown === */
.export-dropdown {
    position: relative;
    display: inline-block;
}
.export-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--sp-xs);
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 50;
    padding: var(--sp-xs) 0;
}
.export-dropdown-menu.show {
    display: block;
}
.export-dropdown-item {
    display: block;
    width: 100%;
    padding: var(--sp-md) var(--sp-xl);
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease;
}
.export-dropdown-item:hover {
    background: var(--tint-accent);
    color: var(--accent);
}
.export-dropdown-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--sp-xs) 0;
}

/* === Print Styles === */
@media print {
    .sidebar,
    .header,
    .incident-header-actions,
    .layout-toolbar,
    .skip-link,
    .a11y-center,
    .notification-center,
    .refresh-history-popover,
    .export-dropdown {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .dashboard {
        display: block !important;
    }
    .grid-stack {
        display: block !important;
        height: auto !important;
    }
    .grid-stack-item {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        margin-bottom: 1rem;
    }
    .grid-stack-item-content {
        position: static !important;
        overflow: visible !important;
    }
    .card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
        background: white !important;
        color: black !important;
    }
    .card-header {
        background: #f5f5f5 !important;
        color: black !important;
    }
    body {
        background: white !important;
        color: black !important;
    }
}

/* === Karten-Kachel (Leaflet) === */
.map-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.map-card .card-header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.map-stats {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-body);
}
.map-container {
    flex: 1 1 0;
    position: relative;
    z-index: 1;
}
/* Leaflet braucht eine absolute Hoehe - wir setzen sie per JS,
   aber als Fallback nutzen wir eine CSS-Regel */
.map-container .leaflet-container {
    width: 100% !important;
    height: 100% !important;
}
.map-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-tertiary);
    font-size: 13px;
    font-family: var(--font-body);
}
/* gridstack-item-content muss Hoehe durchreichen */
[gs-id="karte"] > .grid-stack-item-content {
    display: flex;
    flex-direction: column;
}

/* Leaflet-Popup-Overrides */
.map-popup-container .leaflet-popup-content-wrapper {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.map-popup-container .leaflet-popup-tip {
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.map-popup-container .leaflet-popup-content {
    margin: 10px 12px;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.5;
}
.map-popup-container .leaflet-popup-close-button {
    color: var(--text-secondary);
}
.map-popup-container .leaflet-popup-close-button:hover {
    color: var(--text-primary);
}
.map-popup-title {
    font-weight: 600;
    font-family: var(--font-title);
    font-size: 14px;
    margin-bottom: 2px;
}
.map-popup-cc {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 400;
    text-transform: uppercase;
}
.map-popup-count {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.map-popup-articles {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.map-popup-article {
    display: block;
    font-size: 12px;
    color: var(--text-primary);
    text-decoration: none;
    padding: 3px 0;
    border-top: 1px solid var(--border);
    line-height: 1.4;
}
a.map-popup-article:hover {
    color: var(--accent);
}
.map-popup-source {
    color: var(--text-secondary);
    font-size: 11px;
}
.map-popup-more {
    font-size: 11px;
    color: var(--text-secondary);
    font-style: italic;
    padding-top: 4px;
    border-top: 1px solid var(--border);
}

/* MarkerCluster in Gold-Akzent */
.map-cluster {
    background: rgba(200, 168, 81, 0.25);
    border-radius: 50%;
}
.map-cluster div {
    width: 30px;
    height: 30px;
    margin: 5px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.map-cluster span {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: #0B1121;
}
.map-cluster-medium div {
    width: 36px;
    height: 36px;
    margin: 2px;
}
.map-cluster-medium span {
    font-size: 13px;
}
.map-cluster-large div {
    width: 44px;
    height: 44px;
    margin: -2px;
}
.map-cluster-large span {
    font-size: 14px;
}

/* Leaflet Controls: Dark-Theme */
.leaflet-control-zoom a {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover {
    background-color: var(--bg-hover) !important;
}
.leaflet-control-attribution {
    background: rgba(11, 17, 33, 0.7) !important;
    color: var(--text-secondary) !important;
    font-size: 10px !important;
}
.leaflet-control-attribution a {
    color: var(--text-secondary) !important;
}

/* Light-Theme Karten-Overrides */
[data-theme="light"] .leaflet-control-zoom a {
    background-color: #fff !important;
    color: #333 !important;
    border-color: #ccc !important;
}
[data-theme="light"] .leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #666 !important;
}
[data-theme="light"] .map-cluster span {
    color: #fff;
}

/* Karten-Legende */
.map-legend-ctrl {
    background: var(--bg-card);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 12px;
    font-family: var(--font-body);
    color: var(--text-primary);
    border: 1px solid var(--border);
    line-height: 1.6;
}
.map-legend-ctrl strong {
    font-family: var(--font-title);
    font-size: 13px;
}
[data-theme="light"] .map-legend-ctrl {
    background: #fff;
    border-color: #ddd;
    color: #333;
}

/* SVG-Marker: kein Default-divIcon-Styling */
.map-marker-svg {
    background: none !important;
    border: none !important;
}
.map-marker-svg svg {
    filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.35));
}

/* Map Expand Button */
.map-expand-btn {
    margin-left: auto;
    width: 32px;
    min-height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.map-expand-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* Map Fullscreen Overlay */
.map-fullscreen-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    flex-direction: column;
}
.map-fullscreen-overlay.active {
    display: flex;
}
.map-fullscreen-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.map-fullscreen-title {
    font-family: var(--font-title);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.map-fullscreen-stats {
    flex: 1;
}
.map-fullscreen-container {
    flex: 1;
    position: relative;
}
.map-fullscreen-container .leaflet-container {
    width: 100% !important;
    height: 100% !important;
}

