/* ================================================================
   IranWitness — AI-Powered Iran Protest Intelligence Suite
   Design System & Global Stylesheet
   ================================================================ */

/* --- Custom Properties (Design Tokens — v2.1) --- */
:root {
  /* Backgrounds */
  --bg-primary: #0a0e27;
  --bg-base: #0a0e27;
  --bg-nav: #0a0e27;
  --bg-surface: #1e293b;
  --bg-elevated: #273548;
  --bg-overlay: #334155;

  /* Brand Accents */
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.2);
  --red-glow: rgba(220, 38, 38, 0.15);
  --gold: #f59e0b;
  --gold-dim: rgba(245, 158, 11, 0.2);
  --gold-glow: rgba(245, 158, 11, 0.12);
  --gold-dark: #b8760b;

  /* Status Colors */
  --status-killed: #dc2626;
  --status-detained: #f59e0b;
  --status-missing: #a855f7;
  --status-injured: #f97316;
  --status-safe: #22c55e;
  --status-unverified: #6b7280;
  --status-live: #dc2626;

  /* Map Layer Colors */
  --map-military: #dc2626;
  --map-protest: #f59e0b;
  --map-naval: #3b82f6;
  --map-air: #8b5cf6;
  --map-thermal: #f97316;
  --map-internet: #06b6d4;
  --map-safe: #22c55e;

  /* Text — improved contrast for readability on dark backgrounds */
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0a0e27;

  /* Borders */
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);
  --border-red: rgba(220, 38, 38, 0.4);

  /* Stat Value Colors */
  --stat-green: #22c55e;
  --stat-red: #dc2626;
  --stat-purple: #a855f7;
  --stat-orange: #f97316;
  --stat-blue: #3b82f6;

  /* Typography */
  --font-brand: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-headline: 'Source Serif Pro', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-data: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 48px;

  /* Layout */
  --nav-height: 56px;
  --refresh-height: 36px;
  --content-top: calc(var(--nav-height) + var(--refresh-height));
  --panel-width: 420px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

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

html, body {
  height: 100%;
  font-family: var(--font-ui);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: 0.2px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  padding-top: var(--content-top);
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

/* --- Selection --- */
::selection {
  background: var(--gold-dim);
  color: var(--text-primary);
}

/* ================================================================
   1. Navigation Bar
   ================================================================ */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.nav-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.logo-icon {
  font-size: 22px;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.3));
}

.logo-text {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.01em;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-in-out);
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-tab.active {
  color: var(--gold);
  background: var(--gold-glow);
  border-color: var(--gold-dim);
}

.tab-icon {
  font-size: 15px;
  line-height: 1;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-btn-share {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-btn-share:hover {
  color: var(--text-secondary);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

/* ================================================================
   2. Refresh Status Bar
   ================================================================ */
.refresh-bar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  height: var(--refresh-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 16px;
  z-index: 999;
  font-size: 12px;
}

.refresh-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.refresh-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--stat-green);
  animation: dotPulse 2s ease-in-out infinite;
}

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

.refresh-text {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.refresh-center {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.refresh-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-dim));
  border-radius: 2px;
  transition: width 0.4s var(--ease-out);
  animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

.refresh-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.refresh-timer {
  font-family: var(--font-data);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.refresh-btn {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.refresh-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* ================================================================
   3. Tab Content Sections
   ================================================================ */
.tab-content {
  display: none;
  padding: 20px 24px 40px;
  min-height: calc(100vh - var(--content-top));
  animation: tabFadeIn 0.25s var(--ease-out);
}

.tab-content.active {
  display: block;
}

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

/* ================================================================
   4. Stats Row
   ================================================================ */
.stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.stat-card {
  flex: 1;
  min-width: 140px;
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  transition: border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.stat-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-value {
  font-family: var(--font-data);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.stat-value.stat-green { color: var(--stat-green); }
.stat-value.stat-red { color: var(--stat-red); }
.stat-value.stat-purple { color: var(--stat-purple); }
.stat-value.stat-orange { color: var(--stat-orange); }
.stat-value.stat-blue { color: var(--stat-blue); }

.stat-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ================================================================
   5. Victims Toolbar
   ================================================================ */
.victims-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  min-width: 200px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.08);
}

.filter-select {
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 12px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B7280'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  transition: border-color 0.15s;
}

.filter-select:focus {
  border-color: var(--gold-dim);
}

.filter-select option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.filter-clear {
  padding: 6px 12px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-md);
  color: var(--stat-red);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-clear:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.4);
}

.filter-select.active-filter {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.export-btn {
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 0.04em;
}

.export-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.view-btn {
  padding: 7px 12px;
  background: transparent;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.view-btn:last-child {
  border-right: none;
}

.view-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.view-btn.active {
  background: var(--gold-glow);
  color: var(--gold);
}

/* ================================================================
   6. Data Table
   ================================================================ */
.victims-view {
  display: none;
}

.victims-view.active {
  display: block;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table th {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-strong);
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  user-select: none;
}

.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.12s;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.data-table tbody tr:active {
  background: rgba(255, 255, 255, 0.06);
}

/* Table Pagination */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 0 8px;
}

.table-pagination button,
.page-btn {
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-data);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.table-pagination button:hover,
.page-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

.table-pagination button.active,
.page-btn.active {
  background: var(--gold-glow);
  color: var(--gold);
  border-color: var(--gold-dim);
}

.table-pagination button:disabled,
.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 12px;
}

/* ================================================================
   7. Victims Grid (Card View)
   ================================================================ */
.victims-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.victim-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--status-killed);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.victim-card:hover {
  border-color: var(--border-strong);
  border-left-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ================================================================
   8. Victims Map View
   ================================================================ */
.victims-map {
  width: 100%;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

/* ================================================================
   9. OSINT Layout
   ================================================================ */
.osint-layout {
  display: flex;
  gap: 16px;
  height: calc(100vh - var(--content-top) - 160px);
  min-height: 400px;
}

.osint-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  overflow-y: auto;
}

.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.layer-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s;
  user-select: none;
}

.layer-toggle:hover {
  color: var(--text-primary);
}

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

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

.osint-map-container {
  flex: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-surface);
}

.osint-map {
  width: 100%;
  height: 100%;
}

/* ================================================================
   10. News Layout
   ================================================================ */
.news-layout {
  display: flex;
  gap: 16px;
}

.news-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  align-self: flex-start;
  position: sticky;
  top: calc(var(--content-top) + 20px);
}

.news-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s var(--ease-out), box-shadow 0.2s;
  position: relative;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--stat-blue);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  opacity: 0;
  transition: opacity 0.2s;
}

.news-card:hover {
  border-color: var(--border-strong);
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.news-card:hover::before {
  opacity: 1;
}

.news-card-source {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--stat-blue);
  margin-bottom: 6px;
}

.news-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  font-size: 11px;
  color: var(--text-muted);
}

.news-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* ================================================================
   11. Misinfo Detector
   ================================================================ */
.misinfo-header {
  margin-bottom: 20px;
}

.misinfo-input-area {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.misinfo-input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.misinfo-input::placeholder {
  color: var(--text-muted);
}

.misinfo-input:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px rgba(212, 168, 75, 0.08);
}

.misinfo-results,
.misinfo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.misinfo-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* ================================================================
   12. War Scenarios
   ================================================================ */
.scenario-header {
  margin-bottom: 20px;
}

.scenario-brief {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 12px;
}

.brief-loading {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}

.scenario-models {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}

.scenario-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 0.2s, transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.scenario-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* ================================================================
   13. Detail Panel (Slide-Out)
   ================================================================ */
.detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panel-width);
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-strong);
  z-index: 2000;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

.detail-panel.detail-panel-wide {
  width: 50vw;
  max-width: 50vw;
}

@media (max-width: 768px) {
  .detail-panel.detail-panel-wide {
    width: 100vw;
    max-width: 100vw;
  }
}

.detail-panel.open {
  transform: translateX(0);
}

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

.panel-title {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.panel-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.panel-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Panel slide-in animation */
@keyframes panelSlideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* ================================================================
   14. Status Badges
   ================================================================ */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: capitalize;
}

.badge-killed {
  background: rgba(220, 38, 38, 0.15);
  color: var(--status-killed);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.badge-detained {
  background: rgba(245, 158, 11, 0.15);
  color: var(--status-detained);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-missing {
  background: rgba(168, 85, 247, 0.15);
  color: var(--status-missing);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.badge-injured {
  background: rgba(249, 115, 22, 0.15);
  color: var(--status-injured);
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.badge-safe {
  background: rgba(34, 197, 94, 0.15);
  color: var(--status-safe);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge-verified {
  background: var(--gold-glow);
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}

/* Badge pulse animation */
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

.badge-killed.pulse {
  animation: badgePulse 2s ease-in-out infinite;
}

/* ================================================================
   15. Empty State
   ================================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  max-width: 380px;
  line-height: 1.7;
}

/* ================================================================
   16. Section Titles
   ================================================================ */
.section-title {
  font-family: var(--font-brand);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}

/* ================================================================
   17. Buttons
   ================================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--bg-base);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.15s var(--ease-out), box-shadow 0.15s;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 168, 75, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* ================================================================
   18. Toast Notifications
   ================================================================ */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  animation: toastIn 0.35s var(--ease-out);
  max-width: 380px;
}

.toast.toast-success {
  border-left: 3px solid var(--stat-green);
}

.toast.toast-error {
  border-left: 3px solid var(--stat-red);
}

.toast.toast-warning {
  border-left: 3px solid var(--status-detained);
}

.toast.toast-info {
  border-left: 3px solid var(--stat-blue);
}

.toast.toast-exit {
  animation: toastOut 0.25s var(--ease-in-out) forwards;
}

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

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

/* ================================================================
   19. Leaflet Map Overrides (Dark Theme)
   ================================================================ */
.leaflet-container {
  background: var(--bg-base) !important;
  font-family: var(--font-ui) !important;
}

.leaflet-control-zoom a {
  background: var(--bg-elevated) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-overlay) !important;
  color: var(--text-primary) !important;
}

.leaflet-popup-content-wrapper {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-popup-tip {
  background: var(--bg-elevated) !important;
}

.leaflet-control-attribution {
  background: rgba(7, 7, 16, 0.8) !important;
  color: var(--text-muted) !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a {
  color: var(--text-muted) !important;
}

/* ================================================================
   20. Utility Classes
   ================================================================ */
.font-brand { font-family: var(--font-brand); }
.font-data { font-family: var(--font-data); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ================================================================
   21. Responsive — Mobile (<768px)
   ================================================================ */
@media (max-width: 767px) {
  :root {
    --nav-height: 48px;
    --refresh-height: 32px;
  }

  /* Compact nav on mobile — hide logo text, just show icon */
  .logo-text {
    display: none;
  }

  .nav-bar {
    padding: 0 12px;
  }

  /* Data table: horizontal scroll on mobile, hide less-critical columns */
  .victims-view {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 600px;
  }

  .data-table th:nth-child(3),
  .data-table td:nth-child(3),
  .data-table th:nth-child(5),
  .data-table td:nth-child(5),
  .data-table th:nth-child(7),
  .data-table td:nth-child(7) {
    display: none;
  }

  /* Move tabs to bottom bar on mobile */
  .nav-tabs {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--bg-nav);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0;
    z-index: 1000;
    gap: 0;
  }

  .nav-tab {
    flex-direction: column;
    gap: 2px;
    padding: 6px 4px;
    border-radius: 0;
    border: none;
    font-size: 10px;
    flex: 1;
    justify-content: center;
  }

  .nav-tab.active {
    background: transparent;
    border: none;
  }

  /* Icons only on small screens */
  .tab-label {
    font-size: 9px;
    max-width: 56px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tab-icon {
    font-size: 18px;
  }

  body {
    padding-bottom: 60px;
  }

  .tab-content {
    padding: 14px 12px 70px;
  }

  /* Stats row: 2-column grid on mobile instead of horizontal scroll */
  .stats-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    overflow-x: visible;
  }

  .stat-card {
    min-width: unset;
    padding: 10px;
  }

  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 10px;
  }

  .victims-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar-left {
    flex-direction: column;
  }

  .search-input {
    min-width: unset;
    width: 100%;
  }

  .toolbar-right {
    justify-content: space-between;
  }

  /* Overwatch tab: reduce padding for more map space */
  #tab-osint.tab-content {
    padding: 8px 6px 66px;
  }

  /* News stacked */
  .news-layout {
    flex-direction: column;
  }

  .news-sidebar {
    width: 100%;
    position: static;
  }

  .news-card {
    padding: 12px;
  }

  .news-filters {
    gap: 6px;
    flex-wrap: wrap;
  }

  .news-filters .filter-select {
    font-size: 11px;
    padding: 8px;
    min-height: 36px;
    flex: 1;
    min-width: 90px;
  }

  .breaking-banner {
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Misinfo */
  .misinfo-input-area {
    flex-direction: column;
  }

  /* General mobile touch targets — all selects/buttons at least 36px tall */
  .filter-select {
    min-height: 36px;
    font-size: 12px;
  }

  /* Panel full-width on mobile */
  .detail-panel {
    width: 100vw;
    max-width: 100vw;
  }

  /* Scenario grid single column */
  .scenario-models {
    grid-template-columns: 1fr;
  }

  .risk-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .scenario-header {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .victims-grid {
    grid-template-columns: 1fr;
  }

  /* Toast adjustments */
  .toast-container {
    bottom: 68px;
    right: 12px;
    left: 12px;
  }

  .toast {
    max-width: 100%;
  }

  /* Show nav-right on mobile but compact — hide share, keep notify/settings/about */
  .nav-right {
    display: flex !important;
    gap: 4px;
  }

  .nav-btn-share {
    display: none;
  }

  .nav-btn-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
    padding: 4px;
  }

  .nav-btn-notify {
    padding: 4px 6px;
    font-size: 16px;
  }

  /* Notification dropdown: full-width on mobile */
  .notify-dropdown {
    right: 4px;
    left: 4px;
    width: auto;
  }

  /* Settings/About panels: full-width on mobile */
  .settings-content {
    padding: 20px 16px;
    width: 95vw;
    max-width: 95vw;
  }

  /* Share modal: responsive */
  #share-modal {
    width: 95% !important;
    padding: 20px !important;
  }

  /* Active tab indicator for mobile bottom bar */
  .nav-tab.active {
    color: var(--gold);
  }

  /* Pipeline drawer compact on mobile */
  .pipeline-drawer .pipeline-drawer-inner {
    padding: 12px;
  }

  .pipeline-stats-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .pipeline-stat {
    min-width: 60px;
    flex: 1;
  }

  .pipeline-steps {
    flex-wrap: wrap;
  }

  /* Refresh bar compact on mobile */
  .refresh-bar {
    padding: 4px 12px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .refresh-right {
    gap: 4px;
  }

  .refresh-btn {
    padding: 3px 8px;
    font-size: 10px;
  }

  /* Victim detail panel: key facts stacked on mobile */
  .detail-panel .panel-body div[style*="grid-template-columns: 1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }

  /* Eulogy modal: full width on mobile */
  .eulogy-modal {
    width: 95vw !important;
    max-width: 95vw !important;
    left: 2.5vw !important;
    right: 2.5vw !important;
  }

  /* Intro modal: ensure it fits mobile screens */
  .intro-modal-v2 {
    width: 96%;
    max-width: 96%;
  }

  .intro-hero {
    padding: 28px 20px 18px;
  }

  .intro-logo-large {
    font-size: 42px;
  }

  .intro-title-large {
    font-size: 24px;
  }

  .intro-body-v2 {
    padding: 16px 20px 20px;
  }

  .intro-icons-row {
    gap: 10px;
  }

  .intro-icon-item span:first-child {
    font-size: 20px;
  }

  /* Footer mobile */
  .site-footer {
    padding: 28px 16px 80px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-stats {
    flex-wrap: wrap;
    gap: 6px;
  }
}

/* Tablet tweaks */
@media (min-width: 768px) and (max-width: 1024px) {
  .osint-sidebar {
    width: 180px;
  }

  .news-sidebar {
    width: 200px;
  }

  .victims-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* ================================================================
   22. Footer
   ================================================================ */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 40px 24px 32px;
  margin-top: 20px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.footer-logo {
  font-size: 22px;
}

.footer-title {
  font-family: var(--font-brand);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}

.footer-tagline {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}

.footer-col-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-links a {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-hashtags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-hashtag {
  font-size: 11px;
  color: var(--stat-blue);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-weight: 500;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-stat-value {
  font-family: var(--font-data);
  font-weight: 700;
  color: var(--text-secondary);
}

.footer-divider {
  color: var(--border-strong);
}

.footer-legal {
  font-size: 11px;
  color: var(--text-muted);
}

/* ================================================================
   23. Share Social Buttons
   ================================================================ */
.share-social {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.share-btn {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.share-twitter {
  background: rgba(29, 155, 240, 0.1);
  color: #1d9bf0;
  border-color: rgba(29, 155, 240, 0.25);
}

.share-twitter:hover {
  background: rgba(29, 155, 240, 0.2);
}

.share-telegram {
  background: rgba(0, 136, 204, 0.1);
  color: #0088cc;
  border-color: rgba(0, 136, 204, 0.25);
}

.share-telegram:hover {
  background: rgba(0, 136, 204, 0.2);
}

.share-whatsapp {
  background: rgba(37, 211, 102, 0.1);
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.25);
}

.share-whatsapp:hover {
  background: rgba(37, 211, 102, 0.2);
}

/* ================================================================
   24. Skeleton Loading
   ================================================================ */
.skeleton-row td {
  padding: 14px !important;
}

.skeleton-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

/* Footer hashtag hover */
.footer-hashtag:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.35);
}

/* Risk/scenario card hover */
.risk-card:hover,
[id="risk-grid"] > div:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  transition: all 0.15s var(--ease-out);
}

/* ================================================================
   25. Data Table Interactivity
   ================================================================ */
.data-table tbody tr {
  cursor: pointer;
}

.data-table th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.data-table th[data-sort]:hover {
  color: var(--text-secondary);
}

.data-table th[data-sort]::after {
  content: ' \2195';
  font-size: 10px;
  opacity: 0.4;
}

/* ================================================================
   26. Print Styles
   ================================================================ */
@media print {
  *, *::before, *::after {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
    border-color: #ccc !important;
  }

  body {
    padding-top: 0;
    overflow: visible;
  }

  .nav-bar,
  .refresh-bar,
  .nav-tabs,
  .panel-overlay,
  .detail-panel,
  .toast-container,
  .refresh-btn,
  .export-btn,
  .view-toggle,
  .nav-right {
    display: none !important;
  }

  .site-footer {
    position: static !important;
    border-top: 1px solid #ccc !important;
    padding: 12px !important;
    font-size: 10px !important;
  }

  .tab-content {
    display: block !important;
    padding: 0;
    page-break-inside: avoid;
  }

  .tab-content:not(.active) {
    display: none !important;
  }

  .data-table {
    font-size: 10px;
  }

  .data-table th,
  .data-table td {
    padding: 4px 8px;
    border: 1px solid #ccc !important;
  }

  .stat-card {
    border: 1px solid #ccc !important;
    break-inside: avoid;
  }

  .badge {
    border: 1px solid #999 !important;
    padding: 2px 6px;
  }

  a {
    text-decoration: underline;
  }

  @page {
    margin: 1.5cm;
  }
}

/* ================================================================
   23. Prefers Reduced Motion
   ================================================================ */
@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;
  }

  .detail-panel {
    transition: none;
  }

  .refresh-dot {
    animation: none;
  }

  .refresh-progress {
    animation: none;
  }

  .toast {
    animation: none;
  }

  .badge-killed.pulse {
    animation: none;
  }
}

/* ================================================================
   27. Breaking News Banner
   ================================================================ */
.breaking-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  animation: breakingPulse 3s ease-in-out infinite;
}

@keyframes breakingPulse {
  0%, 100% { border-color: rgba(220, 38, 38, 0.25); }
  50% { border-color: rgba(220, 38, 38, 0.5); }
}

.breaking-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stat-red);
  animation: dotPulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

.breaking-label {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 700;
  color: var(--stat-red);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

.breaking-text {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ================================================================
   28. News Filters
   ================================================================ */
.news-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

/* ================================================================
   29. News Card Credibility Badge
   ================================================================ */
.news-credibility {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 12px;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
}

.news-credibility-high {
  background: rgba(34, 197, 94, 0.12);
  color: var(--stat-green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.news-credibility-medium {
  background: rgba(245, 158, 11, 0.12);
  color: var(--status-detained);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.news-credibility-low {
  background: rgba(107, 114, 128, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(107, 114, 128, 0.25);
}

/* Source type badges */
.news-srctype {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.news-srctype-primary {
  background: rgba(34, 197, 94, 0.1);
  color: var(--stat-green);
  border: 1px solid rgba(34, 197, 94, 0.2);
}
.news-srctype-secondary {
  background: rgba(59, 130, 246, 0.1);
  color: var(--stat-blue);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.news-srctype-social {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}
.news-srctype-state {
  background: rgba(220, 38, 38, 0.1);
  color: var(--stat-red);
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* Breaking news card highlight */
.news-card-breaking {
  border-color: rgba(220, 38, 38, 0.4);
}
.news-card-breaking::before {
  opacity: 1;
  background: var(--stat-red);
}
.news-breaking-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  color: var(--stat-red);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
  animation: breakingPulse 3s ease-in-out infinite;
}

.news-load-more {
  margin-top: 16px;
  text-align: center;
}

/* ================================================================
   30. Misinfo Evidence Chain
   ================================================================ */
.evidence-chain {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

.evidence-step {
  position: relative;
  padding: 8px 0 8px 16px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.evidence-step::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 12px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--gold);
}

.evidence-step a {
  color: var(--stat-blue);
  text-decoration: none;
  font-size: 11px;
}

.evidence-step a:hover {
  text-decoration: underline;
}

/* Verdict badges */
.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.verdict-verified {
  background: rgba(34, 197, 94, 0.12);
  color: var(--stat-green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.verdict-false {
  background: rgba(220, 38, 38, 0.12);
  color: var(--stat-red);
  border: 1px solid rgba(220, 38, 38, 0.3);
}

.verdict-misleading {
  background: rgba(245, 158, 11, 0.12);
  color: var(--status-detained);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.verdict-unverified {
  background: rgba(107, 114, 128, 0.12);
  color: var(--text-muted);
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* ================================================================
   31. Scenario PDF Buttons
   ================================================================ */
.scenario-header .btn-secondary:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

/* ================================================================
   24. Loading & Skeleton States
   ================================================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-surface) 25%,
    var(--bg-elevated) 50%,
    var(--bg-surface) 75%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ================================================================
   25. Intro Lightbox
   ================================================================ */
.intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5000;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.intro-overlay.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.intro-modal {
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-surface) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 40px 36px 32px;
  max-width: 540px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(245, 158, 11, 0.06);
  animation: slideUp 0.5s var(--ease-out);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.intro-header {
  text-align: center;
  margin-bottom: 20px;
}

.intro-logo {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.intro-title {
  font-family: var(--font-brand);
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(245, 158, 11, 0.15);
}

.intro-tagline {
  font-size: 14px;
  color: var(--gold);
  margin-top: 4px;
  font-weight: 500;
}

.intro-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
  text-align: center;
}

.intro-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.intro-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--bg-overlay);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: border-color 0.2s, background 0.2s;
}

.intro-feature:hover {
  border-color: var(--gold-dim);
  background: rgba(245, 158, 11, 0.04);
}

.intro-feature-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

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

.intro-feature span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.intro-enter {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
}

.intro-dismiss {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
}

/* ================================================================
   26. Eulogy Modal
   ================================================================ */
.eulogy-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3001;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 92%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}

.eulogy-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.eulogy-modal-header h3 {
  font-family: var(--font-brand);
  font-size: 18px;
  color: var(--text-primary);
}

.eulogy-modal-body {
  padding: 20px 24px 24px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

/* ================================================================
   27. Map Mode Buttons
   ================================================================ */
.map-mode-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.map-mode-btn {
  padding: 6px 12px;
  font-size: 11px;
  font-family: var(--font-ui);
  background: var(--bg-overlay);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.map-mode-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.map-mode-btn.active {
  background: var(--gold-dim);
  color: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.2);
}

/* ================================================================
   28. Data Table Readability
   ================================================================ */
.data-table td {
  font-size: 13px;
  padding: 12px 14px;
  line-height: 1.5;
  letter-spacing: 0.15px;
}

.data-table th {
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 10px 14px;
}

/* ================================================================
   29. Focus Visible (Accessibility)
   ================================================================ */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

/* ================================================================
   26. High Contrast Mode
   ================================================================ */
@media (forced-colors: active) {
  .badge {
    border: 2px solid currentColor;
  }

  .nav-tab.active {
    border: 2px solid Highlight;
  }

  .stat-card {
    border: 1px solid CanvasText;
  }
}

/* Scan panel removed in v4.2 — replaced by pipeline drawer (section 30) */

/* ================================================================
   30. Pipeline Drawer (Collapsible Top Panel)
   ================================================================ */
.pipeline-drawer {
  max-height: 0;
  overflow: hidden;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pipeline-drawer.open {
  max-height: 320px;
  border-bottom-color: var(--border-strong);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.pipeline-drawer-inner {
  padding: 14px 24px 16px;
}

.pipeline-stats-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.pipeline-stat {
  background: var(--bg-overlay);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  text-align: center;
  flex: 1;
}

.pipeline-stat-value {
  display: block;
  font-family: var(--font-data);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.pipeline-stat-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-top: 2px;
}

.pipeline-progress-track {
  height: 4px;
  background: var(--bg-overlay);
  border-radius: 2px;
  overflow: hidden;
  margin: 8px 0;
}

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

.pipeline-status {
  font-size: 11px;
  color: var(--gold);
  font-family: var(--font-data);
  margin-bottom: 8px;
}

.pipeline-steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pipeline-steps .pd-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  background: var(--bg-overlay);
  color: var(--text-muted);
}

.pipeline-steps .pd-step.running {
  background: var(--gold-dim);
  color: var(--gold);
}

.pipeline-steps .pd-step.done {
  background: rgba(34, 197, 94, 0.15);
  color: var(--stat-green);
}

.pipeline-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-data);
}

/* ================================================================
   31. Overwatch v2 — Location List + Map Overlay
   ================================================================ */
.osint-layout-v2 {
  display: flex;
  gap: 0;
  height: calc(100vh - var(--content-top) - 160px);
  min-height: 500px;
}

.osint-location-list {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.osint-location-list .sidebar-title {
  padding: 14px 14px 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.loc-search {
  margin: 8px 14px;
  padding: 6px 10px;
  background: var(--bg-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font-ui);
  outline: none;
}

.loc-search:focus {
  border-color: var(--gold-dim);
}

.loc-items {
  flex: 1;
  overflow-y: auto;
  padding: 0 6px 8px;
}

.loc-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  border-bottom: 1px solid var(--border);
}

.loc-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.loc-item.active {
  background: var(--gold-glow);
  border-color: var(--gold-dim);
  box-shadow: inset 3px 0 0 var(--gold);
}

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

.loc-item-info {
  flex: 1;
  min-width: 0;
}

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

.loc-item-meta {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-data);
}

.loc-item-sev {
  font-size: 9px;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.loc-item-sev.sev-critical { background: rgba(220, 38, 38, 0.2); color: #dc2626; }
.loc-item-sev.sev-high { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.loc-item-sev.sev-medium { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }
.loc-item-sev.sev-low { background: rgba(34, 197, 94, 0.2); color: #22c55e; }

.osint-map-wrapper {
  flex: 1;
  position: relative;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-left: none;
}

.map-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  background: rgba(10, 14, 39, 0.75);
  backdrop-filter: blur(12px);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.map-overlay-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-overlay-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.layer-chip:hover {
  background: rgba(255, 255, 255, 0.1);
}

.layer-chip input[type="checkbox"] {
  width: 0;
  height: 0;
  opacity: 0;
  position: absolute;
}

.layer-chip:has(input:checked) {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--gold-dim);
  color: var(--text-primary);
}

/* Fallback for browsers without :has() support */
.layer-chip.checked {
  background: rgba(245, 158, 11, 0.12);
  border-color: var(--gold-dim);
  color: var(--text-primary);
}

/* (keyframes fadeIn + slideUp defined in section 25 above — do not duplicate) */

/* ================================================================
   33. Redesigned Intro Lightbox v2 (no scroll, visual, disclaimer)
   ================================================================ */
.intro-modal-v2 {
  max-width: 520px;
  width: 92%;
  max-height: 95vh;
  overflow-y: auto;
  padding: 0;
  border-radius: 16px;
}

.intro-hero {
  position: relative;
  text-align: center;
  padding: 40px 32px 24px;
  background: linear-gradient(180deg, rgba(220, 38, 38, 0.15) 0%, transparent 100%);
  overflow: hidden;
}

.intro-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.08), transparent 70%);
}

.intro-logo-large {
  font-size: 56px;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 16px rgba(245, 158, 11, 0.3));
}

.intro-title-large {
  font-family: var(--font-brand);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}

.intro-tagline-large {
  font-family: var(--font-brand);
  font-size: 14px;
  color: var(--gold);
  margin: 6px 0 0;
  font-weight: 500;
}

.intro-body-v2 {
  padding: 20px 28px 24px;
}

.intro-summary {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 16px;
  text-align: center;
}

.intro-icons-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.intro-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.intro-icon-item span:first-child {
  font-size: 24px;
}

.intro-icon-item span:last-child {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.intro-disclaimer {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.intro-disclaimer-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.intro-disclaimer p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

.intro-confirm-row {
  margin-bottom: 14px;
}

.intro-confirm-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
}

.intro-confirm-label input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--gold);
}

.intro-enter-v2 {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.intro-enter-v2:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ================================================================
   34. Reports & Eulogies Panel (left slide-out, 50% width)
   ================================================================ */
.reports-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 50vw;
  max-width: 50vw;
  height: 100vh;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-strong);
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
}

.reports-panel.open {
  transform: translateX(0);
}

.reports-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.reports-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
}

.report-card:hover {
  border-color: var(--gold-dim);
  transform: translateX(3px);
}

.report-card-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 4px;
}

.report-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.report-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-data);
}

@media (max-width: 768px) {
  .reports-panel {
    width: 100vw;
    max-width: 100vw;
  }
}

/* ================================================================
   35. PDF Viewer Panel (left slide-out, 50% width)
   ================================================================ */
.pdf-viewer-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 50vw;
  max-width: 50vw;
  height: 100vh;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-strong);
  z-index: 2100;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

.pdf-viewer-panel.open {
  transform: translateX(0);
}

.pdf-viewer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  font-family: var(--font-brand);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .pdf-viewer-panel {
    width: 100vw;
    max-width: 100vw;
  }
}

/* ================================================================
   36. OSINT Detail Pane (right side within Overwatch layout)
   ================================================================ */
.osint-detail-pane {
  width: 0;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.35s var(--ease-out);
}

.osint-detail-pane.open {
  width: 340px;
}

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

.osint-detail-title {
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.osint-detail-close {
  font-size: 18px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.osint-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.osint-detail-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}

.osint-detail-field {
  margin-bottom: 14px;
}

.osint-detail-field-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.osint-detail-field-value {
  font-size: 13px;
  color: var(--text-primary);
}

/* ================================================================
   37. Eulogy Steps Progress
   ================================================================ */
.eulogy-steps {
  padding: 12px 20px 0;
}

.eulogy-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  color: var(--text-muted);
  transition: color 0.3s;
}

.eulogy-step.active {
  color: var(--gold);
}

.eulogy-step.done {
  color: var(--stat-green);
}

.eulogy-step-icon {
  font-family: var(--font-data);
  width: 16px;
  text-align: center;
}

/* ================================================================
   38. New Victim Badge (real-time discovery marker)
   ================================================================ */
.badge-new {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(34, 197, 94, 0.15);
  color: var(--stat-green);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  animation: newPulse 2s ease-in-out 3;
}

@keyframes newPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Victim detail mini-map */
.victim-detail-map {
  height: 180px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  border: 1px solid var(--border);
}

/* ================================================================
   39. News card link/reference improvements
   ================================================================ */
.news-card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.news-card-link {
  font-size: 11px;
  padding: 3px 8px;
  background: rgba(59, 130, 246, 0.08);
  color: var(--stat-blue);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s;
}

.news-card-link:hover {
  background: rgba(59, 130, 246, 0.16);
}

.news-hashtag-link {
  color: var(--stat-blue);
  text-decoration: none;
  font-weight: 500;
}

.news-hashtag-link:hover {
  text-decoration: underline;
}

/* ================================================================
   40. v4.2 Design Polish — Pixel QA Pass
   ================================================================ */

/* Intro enter button: block hover when disabled */
.intro-enter-v2:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Intro modal v2: safe scroll fallback for short viewports */
@media (max-height: 640px) {
  .intro-modal-v2 {
    max-height: 95vh;
    overflow-y: auto;
  }
}

/* Eulogy step active: subtle pulse for in-progress step */
.eulogy-step.active .eulogy-step-icon {
  animation: eulogyStepPulse 1.4s ease-in-out infinite;
}

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

/* OSINT detail pane close button: align with panel-close style */
.osint-detail-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.osint-detail-close:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-strong) !important;
}

/* Report card: gold left-border accent on hover (matches news/victim cards) */
.report-card {
  border-left: 3px solid transparent;
}

.report-card:hover {
  border-left-color: var(--gold);
}

/* PDF viewer panel: subtle gold top border when open */
.pdf-viewer-panel.open {
  border-top: 2px solid var(--gold-dim);
}

/* Reports panel: gold top accent when open */
.reports-panel.open {
  border-top: 2px solid var(--gold-dim);
}

/* Pipeline drawer expanding: smooth push content */
.pipeline-drawer {
  position: relative;
  z-index: 998;
}

/* Intro disclaimer box: subtle glow on hover for attention */
.intro-disclaimer:hover {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.09);
}

/* OSINT detail field value: mono for coordinates */
.osint-detail-field-value .font-data {
  font-size: 12px;
  letter-spacing: 0.02em;
}

/* Overwatch mobile responsiveness — OVERHAULED v4.9 (tab-based) */

/* Mobile tab switcher — hidden on desktop */
.osint-mobile-tabs {
  display: none;
}

@media (max-width: 767px) {
  /* === Mobile Tab Switcher === */
  .osint-mobile-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
  }

  .osint-mobile-tab {
    flex: 1;
    padding: 10px 0;
    min-height: 44px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-ui);
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-right: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .osint-mobile-tab:last-child {
    border-right: none;
  }

  .osint-mobile-tab.active {
    color: var(--gold);
    background: rgba(255, 215, 0, 0.08);
    box-shadow: inset 0 -2px 0 var(--gold);
  }

  /* === Stats row: hidden by default, shown when Stats tab active === */
  #tab-osint .stats-row {
    display: none !important;
  }

  #tab-osint.osint-view-stats .stats-row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    overflow-x: visible;
    flex-wrap: unset;
  }

  #tab-osint.osint-view-stats .stats-row .stat-card {
    min-width: unset;
    padding: 12px 10px;
  }

  #tab-osint.osint-view-stats .stats-row .stat-value {
    font-size: 22px;
  }

  #tab-osint.osint-view-stats .stats-row .stat-label {
    font-size: 10px;
  }

  /* === Layout: tab-driven show/hide === */
  .osint-layout-v2 {
    flex-direction: column;
    height: calc(100vh - var(--content-top) - 120px);
    min-height: 300px;
  }

  /* Hide both by default on mobile */
  .osint-location-list {
    display: none;
    width: 100%;
    max-height: none;
    height: 100%;
    flex: 1;
    border-radius: var(--radius-lg);
    border-top: none;
    overflow-y: auto;
  }

  .osint-map-wrapper {
    display: none;
    flex: 1;
    border-radius: var(--radius-lg);
    border-left: none;
    border-bottom: none;
    min-height: 0;
  }

  /* Show map when Map tab active (default) */
  #tab-osint.osint-view-map .osint-map-wrapper {
    display: block;
    min-height: calc(100vh - var(--content-top) - 180px);
  }

  #tab-osint.osint-view-map .osint-location-list {
    display: none;
  }

  /* Show list when List tab active */
  #tab-osint.osint-view-list .osint-location-list {
    display: flex;
    flex-direction: column;
  }

  #tab-osint.osint-view-list .osint-map-wrapper {
    display: none;
  }

  /* Hide layout when stats tab active */
  #tab-osint.osint-view-stats .osint-layout-v2 {
    display: none;
  }

  .osint-location-list .sidebar-title {
    padding: 10px 12px 0;
    font-size: 12px;
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 1;
  }

  .loc-search {
    margin: 6px 10px;
    padding: 10px 12px;
    font-size: 14px;
  }

  .loc-item {
    padding: 10px 10px;
    min-height: 44px;
  }

  .osint-detail-pane.open {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    border-left: none;
  }

  .osint-detail-pane.open .osint-detail-header {
    padding: 14px 16px;
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 1;
  }

  .osint-detail-close {
    font-size: 22px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Map controls: horizontal scroll */
  .map-overlay-top {
    flex-direction: row;
    gap: 6px;
    padding: 6px 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  .map-overlay-controls {
    flex-shrink: 0;
  }

  .map-mode-btns {
    gap: 2px;
  }

  .map-mode-btn {
    padding: 4px 8px;
    font-size: 10px;
    min-height: 30px;
  }

  .map-overlay-legend {
    flex-wrap: nowrap;
    gap: 3px;
    flex-shrink: 0;
  }

  .layer-chip {
    font-size: 9px;
    padding: 4px 6px;
    min-height: 28px;
    white-space: nowrap;
  }

  .layer-chip input[type="checkbox"] {
    width: 14px;
    height: 14px;
  }

  /* Overwatch sort/filter controls: larger touch targets */
  #tab-osint .filter-select {
    font-size: 13px !important;
    padding: 10px 8px !important;
    min-height: 44px;
  }

  /* Reports + PDF panels full-width */
  .reports-panel,
  .pdf-viewer-panel {
    width: 100vw;
    max-width: 100vw;
  }

  /* Stats row: smaller on mobile (for non-Overwatch tabs) */
  .stats-row .stat-card {
    padding: 10px 12px;
  }

  /* Pipeline drawer: collapsed by default, minimal on mobile */
  .pipeline-drawer.open {
    max-height: 200px;
  }

  .pipeline-drawer .pipeline-steps {
    display: none;
  }

  .pipeline-drawer .pipeline-meta {
    display: none;
  }

  .pipeline-stats-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .pipeline-stat {
    padding: 6px 10px !important;
  }

  .pipeline-stat-value {
    font-size: 14px !important;
  }

  .pipeline-stat-label {
    font-size: 8px !important;
  }

  /* Eulogy modal: full-width on mobile */
  .eulogy-modal {
    width: 95vw;
    max-width: 95vw;
    left: 2.5vw;
    right: 2.5vw;
  }

  /* Intro modal: constrain on mobile */
  .intro-modal-v2 {
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Victim detail mini-map: responsive height */
@media (max-width: 767px) {
  .victim-detail-map {
    height: 140px;
  }
}

/* ================================================================
   41. Reports & Eulogies Tab
   ================================================================ */
.reports-tab-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.reports-tab-layout {
  display: flex;
  gap: 0;
  min-height: 60vh;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.reports-tab-list {
  width: 380px;
  flex-shrink: 0;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--bg-surface);
}

.reports-tab-viewer {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  background: var(--bg-primary);
}

.reports-viewer-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}

.report-tab-card {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  border-left: 3px solid transparent;
}

.report-tab-card:hover {
  background: var(--bg-elevated);
  border-left-color: var(--gold);
}

.report-tab-card.active {
  background: var(--bg-elevated);
  border-left-color: var(--gold);
}

.report-tab-card-type {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 4px;
}

.report-tab-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.report-tab-card-meta {
  font-size: 11px;
  color: var(--text-muted);
}

@media (max-width: 767px) {
  .reports-tab-layout {
    flex-direction: column;
  }
  .reports-tab-list {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

/* ================================================================
   42. Task Tracker (fixed lower-right)
   ================================================================ */
.task-tracker {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  z-index: 2500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.task-tracker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.task-tracker-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.task-tracker-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
}

.task-tracker-body {
  max-height: 240px;
  overflow-y: auto;
  padding: 8px 0;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

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

.task-item-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.task-item-text {
  flex: 1;
  line-height: 1.4;
}

.task-item-status {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  flex-shrink: 0;
}

.task-item-status.active {
  background: rgba(59, 130, 246, 0.15);
  color: var(--stat-blue);
}

.task-item-status.done {
  background: rgba(34, 197, 94, 0.12);
  color: var(--stat-green);
}

@keyframes taskPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.task-item.active .task-item-icon {
  animation: taskPulse 1.5s ease-in-out infinite;
}

@media (max-width: 767px) {
  .task-tracker {
    bottom: 64px;
    right: 8px;
    left: 8px;
    width: auto;
  }
}

/* ================================================================
   43. Notification Bell & Dropdown
   ================================================================ */
.nav-btn-notify {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  padding: 6px 8px;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.nav-btn-notify:hover {
  color: var(--text-primary);
}

.notify-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-family: var(--font-data);
}

.notify-dropdown {
  position: fixed;
  top: var(--nav-height, 56px);
  right: 12px;
  width: 320px;
  max-height: 360px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  z-index: 3000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.notify-dropdown-header {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.notify-dropdown-body {
  max-height: 300px;
  overflow-y: auto;
}

.notify-item {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  align-items: flex-start;
}

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

.notify-item-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.notify-item-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notify-item-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ================================================================
   44. Enrichment Progress on Victim Profile
   ================================================================ */
.enrichment-progress {
  background: var(--bg-overlay);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 16px 0;
  border-left: 3px solid var(--stat-blue);
}

.enrichment-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-muted);
}

.enrichment-step.active {
  color: var(--stat-blue);
  font-weight: 500;
}

.enrichment-step.done {
  color: var(--stat-green);
}

.enrichment-step-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
}

.enrichment-step.active .enrichment-step-icon {
  animation: taskPulse 1.2s ease-in-out infinite;
}

/* ================================================================
   45. Footer About / Autonomous Agents CTA
   ================================================================ */
.footer-about {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-about-badge {
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-ninjatech-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
  padding: 10px 14px;
  background: rgba(255, 215, 0, 0.04);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.footer-ninjatech-link:hover {
  background: rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.3);
  transform: translateY(-1px);
}

.footer-ninjatech-brand {
  font-family: var(--font-brand);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.01em;
}

.footer-ninjatech-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.footer-waitlist-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 165, 0, 0.08));
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: var(--radius-sm);
  color: var(--gold);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.footer-waitlist-btn:hover {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.15));
  border-color: rgba(255, 215, 0, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
}

/* ================================================================
   Settings & About Panels
   ================================================================ */
.nav-btn-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-btn-icon:hover {
  color: var(--text-secondary);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.settings-panel {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.settings-content {
  position: relative;
  z-index: 1;
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 520px;
  width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
