/* ============================================================
   FirstOnScene — Dispatch Console Theme
   ============================================================ */

/* --- Custom Properties --- */
:root {
    --bg-base: #0f1117;
    --bg-surface: #1a1d27;
    --bg-elevated: #252830;
    --bg-hover: #2e313b;

    --text-primary: #e8e9ed;
    --text-secondary: #8b8d97;
    --text-muted: #5c5e66;

    --accent: #f59e0b;
    --accent-hover: #d97706;
    --accent-dim: rgba(245, 158, 11, 0.12);
    --accent-glow: rgba(245, 158, 11, 0.25);

    --fire: #ef4444;
    --fire-bg: rgba(239, 68, 68, 0.12);
    --fire-border: rgba(239, 68, 68, 0.3);
    --water: #3b82f6;
    --water-bg: rgba(59, 130, 246, 0.12);
    --water-border: rgba(59, 130, 246, 0.3);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.12);
    --danger: #ef4444;
    --warning: #f59e0b;

    --border: #2a2d37;
    --border-emphasis: #363942;

    --font-display: 'DM Serif Display', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    --font-body: 'DM Sans', -apple-system, sans-serif;

    --radius: 8px;
    --radius-lg: 12px;
    --radius-pill: 999px;

    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    --phone-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    --silence-stream: rgba(245, 158, 11, 0.35);
    --stripe-bg: rgba(26, 29, 39, 0.4);
}

/* --- Light Mode --- */
[data-theme="light"] {
    --bg-base: #f4f5f7;
    --bg-surface: #ffffff;
    --bg-elevated: #eef0f3;
    --bg-hover: #e4e6ea;

    --text-primary: #1a1d27;
    --text-secondary: #4a4f5e;
    --text-muted: #7c8091;

    --accent: #d97706;
    --accent-hover: #b45309;
    --accent-dim: rgba(217, 119, 6, 0.08);
    --accent-glow: rgba(217, 119, 6, 0.12);

    --fire: #dc2626;
    --fire-bg: rgba(220, 38, 38, 0.07);
    --fire-border: rgba(220, 38, 38, 0.2);
    --water: #2563eb;
    --water-bg: rgba(37, 99, 235, 0.07);
    --water-border: rgba(37, 99, 235, 0.2);
    --success: #16a34a;
    --success-bg: rgba(22, 163, 74, 0.07);
    --danger: #dc2626;
    --warning: #d97706;

    --border: #dfe1e6;
    --border-emphasis: #c7cad1;

    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --phone-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04) inset;
    --silence-stream: rgba(217, 119, 6, 0.4);
    --stripe-bg: rgba(0, 0, 0, 0.02);
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: var(--bg-base);
    font-family: var(--font-body);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-emphasis); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }


/* ============================================================
   Shared Navbar
   ============================================================ */

.app-navbar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.brand-mark {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.3px;
}

.brand-mark:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.15s ease;
}

.nav-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius);
    padding: 0.3rem 0.55rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-elevated);
}


/* ============================================================
   Hero Section (Landing Page)
   ============================================================ */

.hero-section {
    background: var(--bg-base);
    text-align: center;
    padding: 4.5rem 1rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 350px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.35;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--text-primary);
    max-width: 750px;
    margin: 0 auto 1rem;
    line-height: 1.15;
    position: relative;
}

.hero-subheadline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 550px;
    margin: 0 auto 2.75rem;
    line-height: 1.6;
}

.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    position: relative;
}

.stat-block {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: var(--border-emphasis);
}


/* ============================================================
   Main Content (Landing)
   ============================================================ */

.main-content {
    flex: 1;
    padding: 2.5rem 0;
    background: var(--bg-base);
}

.section-label {
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* ============================================================
   Landing Incident Cards
   ============================================================ */

.landing-incident-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    animation: slideUp 0.4s ease-out backwards;
}

.landing-incident-card:hover {
    border-color: var(--border-emphasis);
    box-shadow: var(--card-shadow);
}

.landing-incident-card:nth-child(1) { animation-delay: 0ms; }
.landing-incident-card:nth-child(2) { animation-delay: 60ms; }
.landing-incident-card:nth-child(3) { animation-delay: 120ms; }
.landing-incident-card:nth-child(4) { animation-delay: 180ms; }
.landing-incident-card:nth-child(5) { animation-delay: 240ms; }

.card-top-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-pill);
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
}

.category-badge.fire {
    background: var(--fire-bg);
    color: var(--fire);
    border: 1px solid var(--fire-border);
}

.category-badge.water {
    background: var(--water-bg);
    color: var(--water);
    border: 1px solid var(--water-border);
}

.category-badge.other {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.incident-time {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-family: var(--font-mono);
    margin-left: auto;
}

.incident-address {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.incident-summary {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.units-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.unit-tag {
    display: inline-block;
    background: transparent;
    color: var(--text-muted);
    padding: 0.12rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 500;
    font-family: var(--font-mono);
    border: 1px solid var(--border);
}


/* ============================================================
   Phone Mockup (Landing)
   ============================================================ */

.phone-wrapper {
    position: sticky;
    top: 5rem;
}

.phone-frame {
    width: 300px;
    min-height: 520px;
    border: 2px solid var(--border-emphasis);
    border-radius: 36px;
    background: var(--bg-surface);
    box-shadow: var(--phone-shadow);
    overflow: hidden;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.phone-status-bar {
    background: var(--bg-elevated);
    color: var(--text-muted);
    padding: 0.5rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    font-weight: 600;
}

.phone-icons {
    font-size: 0.6rem;
    letter-spacing: 1px;
}

.phone-header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 1rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--accent);
    font-family: var(--font-mono);
}

.phone-chat {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: var(--bg-base);
}

.sms-bubble {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 14px 14px 14px 4px;
    padding: 0.75rem 1rem;
    font-size: 0.83rem;
    color: var(--text-primary);
    line-height: 1.45;
    max-width: 95%;
    animation: bubbleIn 0.5s ease-out;
}

.sms-bubble .sms-category {
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--accent);
}

.sms-bubble .sms-address {
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.sms-bubble .sms-summary {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-secondary);
}

.sms-bubble .sms-units {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.sms-bubble .sms-footer {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.sms-timestamp {
    text-align: right;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 0.35rem;
    padding-right: 0.25rem;
}

.sms-placeholder {
    color: var(--text-muted) !important;
}


/* ============================================================
   Footer (Landing)
   ============================================================ */

.stats-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 1.5rem 1rem;
    margin-top: auto;
}

.stats-text {
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    transition: color 0.15s;
}

.footer-link:hover {
    color: var(--accent);
    text-decoration: none;
}

.footer-separator {
    color: var(--border-emphasis);
}


/* ============================================================
   Access Required Page
   ============================================================ */

.access-required-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: var(--bg-base);
}

.access-required-page h2 {
    font-family: var(--font-display);
    font-weight: 400;
    color: var(--text-primary);
}

.access-required-page p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
}


/* ============================================================
   Shared App Components (Dashboard + Incidents)
   ============================================================ */

.app-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.app-card-header {
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-weight: 600;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border);
}

.app-card-header h6 {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* ============================================================
   Dashboard — Transcript Feed
   ============================================================ */

.transcript-feed {
    height: 70vh;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.83rem;
    background: var(--bg-base);
    color: var(--text-primary);
    padding: 0.5rem;
}

.transcript-entry {
    padding: 4px 8px;
    border-bottom: 1px solid var(--border);
    animation: slideIn 0.3s ease-out;
}

.transcript-entry:hover {
    background: var(--bg-surface);
}

.transcript-time {
    color: var(--text-muted);
    margin-right: 8px;
    font-size: 0.78rem;
}

.transcript-stream {
    color: var(--accent);
    margin-right: 8px;
    font-weight: 700;
}

.transcript-silence {
    color: var(--text-muted);
    font-style: italic;
}

.transcript-silence .transcript-stream {
    color: var(--silence-stream);
}

.transcript-entry.in-analysis-window {
    border-left: 3px solid var(--accent);
    padding-left: 5px;
    background: var(--accent-dim);
}

.audio-db-label {
    color: var(--text-muted);
    font-size: 0.72rem;
    margin-left: 8px;
}


/* ============================================================
   Dashboard — Stream Bar (horizontal, full-width)
   ============================================================ */

.stream-bar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    position: sticky;
    top: 46px;
    z-index: 90;
}

.stream-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.stream-pill:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.stream-pill.selected {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.pill-count {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-base);
    padding: 0.1rem 0.4rem;
    border-radius: var(--radius-pill);
    line-height: 1;
}

.stream-pill.selected .pill-count {
    color: var(--accent);
    background: var(--accent-glow);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.active {
    background-color: var(--success);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.inactive {
    background-color: var(--danger);
}

.status-dot.paused {
    background-color: var(--warning);
}


/* ============================================================
   Dashboard — Compact Incident Cards (right panel)
   ============================================================ */

.incidents-scroll {
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.incident-card {
    border-left: 4px solid;
    margin-bottom: 8px;
    padding: 8px 10px;
    font-size: 0.83rem;
    border-radius: var(--radius);
    background: var(--bg-surface);
    color: var(--text-primary);
}

.incident-card.fire {
    border-color: var(--fire);
    background: linear-gradient(90deg, var(--fire-bg) 0%, var(--bg-surface) 50%);
}

.incident-card.water {
    border-color: var(--water);
    background: linear-gradient(90deg, var(--water-bg) 0%, var(--bg-surface) 50%);
}

.incident-card-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
}

.incident-card-header strong {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.02em;
}

.incident-card-time {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-family: var(--font-mono);
    margin-left: auto;
}

.incident-card-address {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.incident-card-summary {
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 0.3rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.incident-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


/* ============================================================
   Dashboard — Audio Replay
   ============================================================ */

.replay-wrap {
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    vertical-align: middle;
}

.replay-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 3px;
    padding: 0 4px;
    font-size: 0.7rem;
    line-height: 1.4;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.15s;
}

.replay-btn:hover {
    background: var(--bg-elevated);
    color: var(--accent);
    border-color: var(--accent);
}

.replay-btn.playing {
    color: var(--accent);
    border-color: var(--accent);
}

.replay-progress {
    display: inline-block;
    width: 40px;
    height: 4px;
    background: var(--bg-elevated);
    border-radius: 2px;
    margin-left: 4px;
    vertical-align: middle;
    overflow: hidden;
}

.replay-progress-bar {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.2s linear;
}

.load-older-btn {
    display: block;
    width: 100%;
    padding: 6px 0;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-align: center;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: all 0.15s;
}

.load-older-btn:hover {
    color: var(--accent);
    background: var(--bg-surface);
}


/* ============================================================
   Incidents Page — Card List
   ============================================================ */

.incidents-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
}

.incident-list-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.incident-list-card:hover {
    border-color: var(--border-emphasis);
    box-shadow: var(--card-shadow);
}

.incident-list-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.dup-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: var(--font-mono);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.incident-list-stream {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-family: var(--font-mono);
}

.incident-list-time {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-family: var(--font-mono);
    margin-left: auto;
}

.incident-list-address {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.incident-list-summary {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.incident-list-units {
    margin-bottom: 0.4rem;
}

.incident-list-units .units-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.units-expand-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0.2rem 0;
    transition: color 0.15s;
}

.units-expand-btn:hover {
    color: var(--accent);
}

.incident-list-status {
    margin-top: 0.3rem;
    display: flex;
    gap: 0.35rem;
}

.incident-dup-cards {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.incident-dup-card {
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.6rem 0.8rem;
    margin-top: 0.4rem;
    opacity: 0.75;
    font-size: 0.82rem;
}

.incident-dup-card:hover {
    opacity: 1;
}

.dup-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    cursor: pointer;
    padding: 0.3rem 0;
    transition: color 0.15s;
}

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


/* ============================================================
   Incidents Page — Pagination
   ============================================================ */

.pagination .page-item.active .page-link {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--bg-base);
}

.pagination .page-link {
    color: var(--text-secondary);
    background: var(--bg-surface);
    border-radius: var(--radius);
    margin: 0 2px;
    border: 1px solid var(--border);
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.pagination .page-link:hover {
    color: var(--accent);
    background: var(--accent-dim);
    border-color: var(--accent);
}


/* ============================================================
   Bootstrap Overrides for Dark Theme
   ============================================================ */

.text-muted {
    color: var(--text-muted) !important;
}

.small, small {
    color: var(--text-secondary);
}

.badge.bg-success {
    background-color: var(--success) !important;
    color: var(--bg-base) !important;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.badge.bg-danger {
    background-color: var(--danger) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.badge.bg-warning {
    background-color: var(--warning) !important;
    color: var(--bg-base) !important;
}

.badge.bg-info {
    background-color: var(--accent-dim) !important;
    color: var(--accent) !important;
    border: 1px solid var(--accent);
    font-family: var(--font-mono);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

.form-check-input {
    background-color: var(--bg-base);
    border-color: var(--border);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-label {
    color: var(--text-secondary) !important;
}


/* ============================================================
   Animations
   ============================================================ */

@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes incidentFlash {
    0% { border-color: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
    100% { border-color: var(--border); box-shadow: none; }
}


/* ============================================================
   Light Mode Overrides
   ============================================================ */

[data-theme="light"] .hero-section::before {
    opacity: 0.18;
}

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

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

[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-elevated);
}


/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 991px) {
    .phone-wrapper { position: static; }
    .phone-frame { margin: 0 auto; }
    .hero-headline { font-size: 1.75rem; }
    .hero-subheadline { font-size: 0.95rem; }
    .hero-stats { gap: 1.5rem; }
    .stat-value { font-size: 1.75rem; }
}
