/* 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;

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

    /* Text */
    --text-primary: #E8ECF4;
    --text-secondary: #8896AB;
    --text-disabled: #4A5568;

    /* 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;
}

/* === 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: none;
    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: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius);
    padding: var(--sp-lg) var(--sp-xl);
    margin-bottom: var(--sp-xl);
    font-size: 13px;
    color: var(--error);
}

/* === 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 rgba(239, 68, 68, 0.4);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.12);
    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;
}

.connection-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--error);
    transition: background 0.3s ease;
}

.connection-status.connected {
    background: var(--success);
}

/* === 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);
}

.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);
}

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

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

.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);
}

#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 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: 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-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: rgba(200, 168, 81, 0.15);
    color: var(--accent);
}
.incident-type-badge.type-research {
    background: rgba(99, 102, 241, 0.15);
    color: #818CF8;
}

/* Inline Reliability (im Header) */
.reliability-bar-inline {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
}
.reliability-label-sm {
    font-size: 11px;
    color: var(--text-disabled);
    cursor: help;
    white-space: nowrap;
}
.reliability-track-sm {
    width: 80px;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}
.reliability-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 32px;
}

/* === Analyse-Bereich: Lagebild + Faktencheck nebeneinander === */
.incident-analysis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-2xl);
    min-height: 0;
}

.incident-analysis-summary {
    overflow-y: auto;
    max-height: 50vh;
}

.incident-analysis-factcheck {
    overflow-y: auto;
    max-height: 50vh;
}

/* 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;
}

.reliability-track {
    flex: 1;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.reliability-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

.reliability-fill.low {
    background: var(--error);
}

.reliability-fill.medium {
    background: var(--warning);
}

.reliability-fill.high {
    background: var(--success);
}

.reliability-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 32px;
    text-align: right;
}

.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: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.factcheck-icon.unconfirmed {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.factcheck-icon.contradicted {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.factcheck-icon.developing {
    background: rgba(124, 141, 181, 0.15);
    color: var(--info);
}

.factcheck-icon.established {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.factcheck-icon.disputed {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.factcheck-icon.unverified {
    background: rgba(124, 141, 181, 0.15);
    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);
}

/* === Timeline (Horizontal) === */
.timeline {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 0;
    padding-bottom: var(--sp-md);
    scroll-behavior: smooth;
}

/* Scrollbar für horizontale Timeline */
.timeline::-webkit-scrollbar {
    height: 6px;
}
.timeline::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 3px;
}
.timeline::-webkit-scrollbar-thumb {
    background: var(--text-disabled);
    border-radius: 3px;
}
.timeline::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Datumsgruppe als vertikale Spalte */
.timeline-date-column {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
}

.timeline-date-column:last-child {
    border-right: none;
}

.timeline-date-header {
    padding: var(--sp-md) var(--sp-xl);
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--accent);
    text-align: center;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1;
}

.timeline-date-day {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    font-family: var(--font-title);
}

.timeline-date-month {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.timeline-date-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-width: 220px;
    max-width: 320px;
}

/* Einzelner Timeline-Eintrag */
.timeline-item {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
    padding: var(--sp-md) var(--sp-xl);
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border);
    cursor: default;
}

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

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

.timeline-item-header {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

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

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

.timeline-source a {
    color: var(--text-disabled);
}

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

.timeline-headline {
    font-size: 12px;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.timeline-content {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    min-width: 0;
}

.timeline-status {
    flex-shrink: 0;
}

/* Fallback: Ungroupierte Items (z.B. Sortierung nach Quelle) */
.timeline-flat {
    display: flex;
    flex-direction: row;
    gap: 0;
}

.timeline-flat .timeline-item {
    min-width: 200px;
    max-width: 280px;
    border-right: 1px solid var(--border);
    border-bottom: none;
}

.timeline-flat .timeline-item:last-child {
    border-right: none;
}

/* === 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: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-unverified {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-contradicted {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.badge-auto {
    background: rgba(200, 168, 81, 0.15);
    color: var(--accent);
}

.badge-research {
    background: rgba(99, 102, 241, 0.15);
    color: #818CF8;
}

/* === Status Indicator === */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-md);
    font-size: 12px;
    color: var(--text-secondary);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.idle {
    background: var(--text-disabled);
}

.status-dot.researching {
    background: var(--accent);
    animation: pulse 1s ease-in-out infinite;
}

.status-dot.analyzing {
    background: var(--warning);
    animation: pulse 1s ease-in-out infinite;
}

.status-dot.factchecking {
    background: var(--info);
    animation: pulse 1s ease-in-out infinite;
}

.status-dot.deep_researching {
    background: #818CF8;
    animation: pulse 1.5s ease-in-out infinite;
}

/* === Modal === */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 17, 33, 0.85);
    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: rgba(239, 68, 68, 0.12);
    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: 0 8px 24px rgba(0, 0, 0, 0.4);
    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-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);
}

.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: 0 0 8px rgba(200, 168, 81, 0.5);
    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 {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* === 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-md);
    padding-bottom: var(--sp-xs);
    border-bottom: 1px solid var(--border);
}

.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 === */
.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-tertiary, 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-Datumsgruppen sind jetzt als .timeline-date-column / .timeline-date-header definiert) */

/* === 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: none;
    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;
}

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

/* === Evidence Chips === */
.evidence-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
.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);
}

/* === Responsive === */
@media (max-width: 1100px) {
    .incident-analysis {
        grid-template-columns: 1fr;
    }
}

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