/* Orbis Da'at (NR1) — Main Application Styles */
/* Mobile-first, dark theme */

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a1f35;
    --bg-input: #0d1117;
    --bg-hover: #1e2642;
    --text-primary: #e8eaf0;
    --text-secondary: #8b95a5;
    --text-muted: #5a6577;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --accent-alt: #06b6d4;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --border: #1e293b;
    --border-light: #2d3748;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    --nav-width: 280px;
    --topbar-height: 56px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); color: #fff; }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Forms ───────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%238b95a5' d='M6 8L1 3h10z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-inline { display: flex; gap: 8px; align-items: end; }
.inline-form { display: inline; }

/* ── Alerts ──────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 16px;
}
.alert-success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); color: #6ee7b7; }
.alert-error { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.2); color: #fca5a5; }
.alert-warning { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); color: #fcd34d; }
.alert-info { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.2); color: #93c5fd; }
.floating-alert { position: fixed; top: 16px; right: 16px; z-index: 10000; max-width: 400px; animation: slideIn 0.3s ease; }

/* ── Badges ──────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-error { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-default { background: rgba(139, 149, 165, 0.15); color: var(--text-secondary); }

/* Severity badges */
.severity-critical { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.severity-high { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.severity-medium { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.severity-low { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.severity-info { background: rgba(139, 149, 165, 0.15); color: var(--text-secondary); }

/* Category badges */
.cat-conflict { --cat-color: #ef4444; }
.cat-disaster { --cat-color: #f59e0b; }
.cat-health { --cat-color: #10b981; }
.cat-political { --cat-color: #8b5cf6; }
.cat-environmental { --cat-color: #06b6d4; }
.cat-economic { --cat-color: #f97316; }
[class*="cat-"] { background: rgba(var(--cat-color), 0.15); color: var(--cat-color); }

/* ── Cards ───────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 20px;
}
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 1rem; font-weight: 600; }
.card-link { font-size: 0.8rem; color: var(--accent); }
.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); }

/* ── Tables ──────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.data-table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }
.truncate-cell { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Pagination ──────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition);
}
.pagination a { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); }
.pagination a:hover { background: var(--bg-hover); color: var(--accent); }
.pagination .active { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

/* ── Hamburger Navigation (Public) ───────────────────── */
.hamburger-float {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 9000;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
.hamburger-float:hover { background: var(--bg-hover); border-color: var(--accent); }
.hamburger-float span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--nav-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    z-index: 9500;
    transform: translateX(-100%);
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.main-nav.open { transform: translateX(0); }

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}
.nav-brand { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.nav-brand .accent { color: var(--accent); }
.nav-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}
.nav-close:hover { color: var(--text-primary); }

.nav-links { flex: 1; padding: 12px 0; }
.nav-link {
    display: block;
    padding: 12px 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.nav-link.active { color: var(--accent); border-left: 3px solid var(--accent); padding-left: 21px; }
.nav-divider { height: 1px; background: var(--border); margin: 8px 20px; }

.nav-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9400;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}
.nav-overlay.open { opacity: 1; pointer-events: all; }

/* ── Login Page ──────────────────────────────────────── */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.login-header {
    padding: 32px 32px 24px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}
.login-header h1 { font-size: 1.5rem; font-weight: 700; }
.login-header .accent { color: var(--accent); }
.login-header p { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }
.login-form { padding: 32px; }
.login-footer {
    padding: 16px 32px;
    text-align: center;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

/* ── Event Cards ─────────────────────────────────────── */
.event-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition);
    cursor: pointer;
}
.event-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.event-card-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.event-card-title { font-size: 1rem; font-weight: 600; line-height: 1.4; flex: 1; }
.event-card-meta { display: flex; gap: 12px; font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; flex-wrap: wrap; }
.event-card-meta span { display: inline-flex; align-items: center; gap: 4px; }

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

/* ── Incident Panel (Slide-out) ──────────────────────── */
.incident-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    z-index: 9600;
    transform: translateX(100%);
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.incident-panel.open { transform: translateX(0); }
.incident-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.incident-panel-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}
.incident-panel-body { flex: 1; overflow-y: auto; padding: 20px; }
.incident-panel-body h2 { font-size: 1.15rem; margin-bottom: 12px; line-height: 1.4; }
.incident-meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}
.incident-meta-item { font-size: 0.85rem; }
.incident-meta-item .label { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.incident-meta-item .value { margin-top: 2px; }

/* ── Globe & Map Container ───────────────────────────── */
.globe-container, .map-container {
    position: fixed;
    inset: 0;
    z-index: 1;
}
.globe-container { background: #000; }
.map-container { background: var(--bg-primary); }

.view-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 8000;
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 4px;
    box-shadow: var(--shadow);
}
.view-toggle button {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
}
.view-toggle button.active { background: var(--accent); color: #fff; }

/* ── Recent Events Ticker ────────────────────────────── */
.events-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 7000;
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--border);
    padding: 12px 20px;
}
.ticker-scroll {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ticker-scroll::-webkit-scrollbar { display: none; }
.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.ticker-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ticker-item .time { color: var(--text-muted); font-size: 0.75rem; }

/* ── Search ──────────────────────────────────────────── */
.search-container { max-width: 800px; margin: 0 auto; padding: 40px 20px; }
.search-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}
.search-bar input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
}
.search-bar input:focus { border-color: var(--accent); }
.search-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.filter-chip {
    padding: 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}
.filter-chip:hover, .filter-chip.active { border-color: var(--accent); color: var(--accent); }

/* ── Footer ──────────────────────────────────────────── */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 24px 20px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text-secondary); }

/* ── Error Pages ─────────────────────────────────────── */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}
.error-code { font-size: 6rem; font-weight: 800; color: var(--accent); line-height: 1; }
.error-title { font-size: 1.5rem; margin: 8px 0 16px; }
.error-message { color: var(--text-secondary); margin-bottom: 24px; }

/* ── Body / Layout (sticky footer) ──────────────────── */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.main-content { flex: 1; }

/* ── Page Container (non-globe pages) ───────────────── */
.page-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 72px 20px 60px 76px; /* top clears nothing; left clears 44px hamburger + gap */
}
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.75rem; font-weight: 700; line-height: 1.2; }
.page-header p { color: var(--text-secondary); font-size: 0.9rem; margin-top: 6px; }

/* ── Filter Bar ──────────────────────────────────────── */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }

/* ── Events Grid ─────────────────────────────────────── */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.event-tile {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    color: var(--text-primary);
    text-decoration: none;
}
.event-tile:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: var(--text-primary);
}
.tile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 6px;
    gap: 8px;
}
.tile-category {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.event-tile h3 {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    padding: 0 16px;
    margin-bottom: 6px;
}
.tile-meta { font-size: 0.78rem; color: var(--text-muted); padding: 0 16px 10px; }
.tile-footer {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Severity Badge ──────────────────────────────────── */
.severity-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 10px;
    white-space: nowrap;
}

/* ── Search Page ─────────────────────────────────────── */
.search-form { margin-bottom: 28px; }
.search-input-group { display: flex; gap: 8px; margin-bottom: 12px; }
.search-input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--accent); }
.search-filters { border: none; padding: 0; }
.search-filters summary {
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    user-select: none;
    margin-bottom: 12px;
}
.filter-group { display: flex; gap: 16px; flex-wrap: wrap; padding: 12px 0; }
.filter-group label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.filter-group select {
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}
.results-count { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 16px; }
.empty-state { text-align: center; color: var(--text-muted); padding: 40px 0; font-size: 0.9rem; }
.search-results { display: flex; flex-direction: column; gap: 12px; }
.search-result {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    transition: all var(--transition);
    color: var(--text-primary);
}
.search-result:hover { border-color: var(--accent); color: var(--text-primary); }
.result-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.result-header h3 { font-size: 0.95rem; font-weight: 600; flex: 1; }
.search-result p { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.5; }
.result-meta { display: flex; gap: 12px; font-size: 0.75rem; color: var(--text-muted); flex-wrap: wrap; }

/* ── Static / CMS Page ───────────────────────────────── */
.static-content { max-width: 700px; }
.static-content h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: 24px; }
.static-content h2 { font-size: 1.15rem; font-weight: 600; margin: 24px 0 8px; }
.static-content p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 12px; line-height: 1.7; }
.static-content ul { color: var(--text-secondary); font-size: 0.9rem; padding-left: 20px; margin-bottom: 16px; }
.static-content li { margin-bottom: 8px; line-height: 1.6; }
.static-content strong { color: var(--text-primary); }

/* ── Home View / Event Sidebar ───────────────────────── */
.home-view { position: relative; }
.event-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: rgba(10, 14, 26, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-left: 1px solid var(--border);
    z-index: 6000;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}
.event-sidebar::-webkit-scrollbar { width: 4px; }
.event-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(10, 14, 26, 0.98);
    z-index: 1;
}
.sidebar-header h2 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
}
.event-count {
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}
.sidebar-section { padding: 8px 0; }
.sidebar-section h3 {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 4px 16px 8px;
}
.event-sidebar .event-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    background: transparent;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(30, 41, 59, 0.6);
    transition: background var(--transition);
    color: var(--text-primary);
    text-decoration: none;
}
.event-sidebar .event-card:hover { background: var(--bg-hover); transform: none; box-shadow: none; }
.event-sidebar .event-card.featured { border-left: 3px solid var(--accent); padding-left: 13px; }
.event-severity {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    background: var(--bg-hover);
    color: var(--text-muted);
}
.event-severity.severity-critical { background: rgba(239,68,68,0.2); color: #f87171; }
.event-severity.severity-high     { background: rgba(245,158,11,0.2); color: #fbbf24; }
.event-severity.severity-medium   { background: rgba(59,130,246,0.2); color: #60a5fa; }
.event-severity.severity-low      { background: rgba(16,185,129,0.2); color: #34d399; }
.event-card-body { flex: 1; min-width: 0; }
.event-card-body strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}
.event-card-body small {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.event-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; }
.sidebar-more {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 0.78rem;
    color: var(--accent);
    border-top: 1px solid var(--border);
}

/* ── Animations ──────────────────────────────────────── */
@keyframes slideIn {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.fade-in { animation: fadeIn 0.3s ease; }

/* ── Marker Pulse ────────────────────────────────────── */
.marker-pulse {
    animation: pulse 2s infinite;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .event-grid { grid-template-columns: 1fr; }
    .events-grid { grid-template-columns: 1fr; }
    .incident-panel { width: 100%; }
    .form-row { flex-direction: column; gap: 0; }
    .footer-inner { flex-direction: column; gap: 12px; text-align: center; }
    .view-toggle { bottom: 60px; }
    .data-table { font-size: 0.8rem; }
    .data-table th, .data-table td { padding: 8px; }
    .search-bar { flex-direction: column; }
    .search-input-group { flex-direction: column; }
    /* On mobile, hide the globe event sidebar (events accessible via /events) */
    .event-sidebar { display: none; }
    .page-container { padding: 72px 16px 40px 72px; }
}

@media (max-width: 480px) {
    :root { font-size: 14px; }
    .hamburger-float { top: 12px; left: 12px; width: 40px; height: 40px; }
    .events-ticker { padding: 8px 12px; }
    /* Tighter left padding to match smaller hamburger (40px + 12px offset + 12px gap) */
    .page-container { padding: 64px 16px 40px 68px; }
}
