/* =============================================
   ContinuitySystems.ai — Global Design System
   Dark navy · Electric blue · WCAG 2.1 AA
   ============================================= */

:root {
  /* Background scale */
  --color-bg-base:    #060d1f;
  --color-bg-surface: #0d1b35;
  --color-bg-elevated:#112040;
  --color-bg-overlay: #1a2d52;

  /* Accent — electric blue */
  --color-accent-300: #7dd3fc;
  --color-accent-400: #38bdf8;
  --color-accent-500: #0ea5e9;
  --color-accent-600: #0284c7;
  --color-accent-700: #0369a1;

  /* Status */
  --color-safe:     #22c55e;
  --color-warning:  #f59e0b;
  --color-danger:   #ef4444;
  --color-missing:  #f97316;
  --color-info:     #3b82f6;
  --color-neutral:  #64748b;

  /* Text */
  --color-text-primary:   #f0f4ff;
  --color-text-secondary: #94a3b8;
  --color-text-muted:     #64748b;
  --color-text-inverse:   #060d1f;

  /* Border */
  --color-border:       rgba(148, 163, 184, 0.15);
  --color-border-focus: #0ea5e9;

  /* Shadows / Glows */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6);
  --glow-accent: 0 0 20px rgba(14,165,233,0.35);
  --glow-danger: 0 0 20px rgba(239,68,68,0.35);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Type scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Border radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow:   400ms ease;

  /* Sidebar */
  --sidebar-width: 240px;
  --topbar-height: 64px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ============ Typography ============ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

/* Suppress Blazor's programmatic focus ring on non-interactive elements */
h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus,
p:focus, div:focus, section:focus, main:focus { outline: none; }

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p { color: var(--color-text-secondary); }
a { color: var(--color-accent-400); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--color-accent-300); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--color-accent-500);
  color: white;
  border-color: var(--color-accent-500);
}
.btn-primary:hover { background: var(--color-accent-600); border-color: var(--color-accent-600); box-shadow: var(--glow-accent); }

.btn-secondary {
  background: transparent;
  color: var(--color-accent-400);
  border-color: var(--color-accent-500);
}
.btn-secondary:hover { background: rgba(14,165,233,0.1); }

.btn-danger {
  background: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}
.btn-danger:hover { background: #dc2626; box-shadow: var(--glow-danger); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}
.btn-ghost:hover { color: var(--color-text-primary); background: var(--color-bg-elevated); }

.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-xs); }
.btn-lg { padding: var(--space-4) var(--space-8); font-size: var(--text-lg); }

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

/* ============ Form Controls ============ */
.form-group { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-5); }
.form-label { font-size: var(--text-sm); font-weight: 500; color: var(--color-text-primary); }
.form-label .required { color: var(--color-danger); margin-left: 2px; }

.form-control {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-border-focus);
  box-shadow: 0 0 0 3px rgba(14,165,233,0.2);
}

.form-control::placeholder { color: var(--color-text-muted); }
.form-control.invalid { border-color: var(--color-danger); }
.form-control.invalid:focus { box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }

.form-error { font-size: var(--text-xs); color: var(--color-danger); }
.form-hint  { font-size: var(--text-xs); color: var(--color-text-muted); }

select.form-control option { background: var(--color-bg-elevated); }

/* ============ Cards ============ */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
}

.card-elevated {
  background: var(--color-bg-elevated);
  border-color: rgba(148,163,184,0.2);
  box-shadow: var(--shadow-lg);
}

.card-accent {
  border-color: var(--color-accent-500);
  box-shadow: var(--glow-accent);
}

/* ============ Status Badges ============ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-safe     { background: rgba(34,197,94,0.15);  color: var(--color-safe);    border: 1px solid rgba(34,197,94,0.3);  }
.badge-danger   { background: rgba(239,68,68,0.15);  color: var(--color-danger);  border: 1px solid rgba(239,68,68,0.3);  }
.badge-warning  { background: rgba(245,158,11,0.15); color: var(--color-warning); border: 1px solid rgba(245,158,11,0.3); }
.badge-info     { background: rgba(59,130,246,0.15); color: var(--color-info);    border: 1px solid rgba(59,130,246,0.3); }
.badge-neutral  { background: rgba(100,116,139,0.15);color: var(--color-neutral); border: 1px solid rgba(100,116,139,0.3);}
.badge-missing  { background: rgba(249,115,22,0.15); color: var(--color-missing); border: 1px solid rgba(249,115,22,0.3); }
.badge-accent   { background: rgba(14,165,233,0.15); color: var(--color-accent-400); border: 1px solid rgba(14,165,233,0.3); }

/* ============ Alerts ============ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: var(--text-sm);
}

.alert-danger  { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.3);  color: #fca5a5; }
.alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.3); color: #fcd34d; }
.alert-success { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.3);  color: #86efac; }
.alert-info    { background: rgba(59,130,246,0.1); border-color: rgba(59,130,246,0.3); color: #93c5fd; }

/* ============ Tables ============ */
.data-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.data-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.data-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--color-text-secondary);
  border-bottom: 1px solid var(--color-border);
}
.data-table tr:hover td { background: var(--color-bg-elevated); }
.data-table tr:last-child td { border-bottom: none; }

/* ============ Loading ============ */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ============ Stat Cards ============ */
.stat-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.stat-card .stat-label { font-size: var(--text-xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .stat-value { font-size: var(--text-3xl); font-weight: 800; color: var(--color-text-primary); line-height: 1; }
.stat-card .stat-sub   { font-size: var(--text-sm); color: var(--color-text-secondary); }

/* ============ Dashboard Shell ============ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--color-bg-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
}

.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  height: var(--topbar-height);
  background: var(--color-bg-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 var(--space-6);
  gap: var(--space-4);
  position: sticky;
  top: 0;
  z-index: 50;
}

.app-content {
  flex: 1;
  padding: var(--space-6);
  max-width: 1600px;
  width: 100%;
}

/* ============ Sidebar Nav ============ */
.sidebar-brand {
  padding: var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}

.sidebar-brand .logo-mark {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-accent-400);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sidebar-nav { padding: var(--space-4) 0; flex: 1; }
.sidebar-nav-section { margin-bottom: var(--space-6); }
.sidebar-nav-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: 0 var(--space-5) var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-left: 2px solid transparent;
  text-decoration: none;
}

.nav-item:hover { color: var(--color-text-primary); background: var(--color-bg-elevated); }
.nav-item.active { color: var(--color-accent-400); border-left-color: var(--color-accent-500); background: rgba(14,165,233,0.08); }
.nav-item .nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

/* ============ Public Site ============ */
.public-layout { min-height: 100vh; display: flex; flex-direction: column; }
.public-main { flex: 1; }

.site-header {
  background: rgba(6,13,31,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 200;
  height: 72px;
  display: flex;
  align-items: center;
}

.site-header .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-8);
  width: 100%;
}

.site-logo {
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--color-text-primary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
}

.site-logo .accent { color: var(--color-accent-400); }

.site-nav { display: flex; align-items: center; gap: var(--space-1); flex: 1; }
.site-nav a {
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.site-nav a:hover { color: var(--color-text-primary); background: var(--color-bg-elevated); }

.site-header-actions { display: flex; align-items: center; gap: var(--space-3); margin-left: auto; }

/* ============ Hero Section ============ */
.hero {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-24) 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(14,165,233,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(14,165,233,0.05) 0%, transparent 50%);
}

.hero .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(14,165,233,0.1);
  border: 1px solid rgba(14,165,233,0.2);
  color: var(--color-accent-400);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-6);
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--color-accent-400), var(--color-accent-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-8);
}

.hero-actions { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }

/* ============ Containers ============ */
.container    { max-width: 1280px; margin: 0 auto; padding: 0 var(--space-6); }
.container-sm { max-width: 640px;  margin: 0 auto; padding: 0 var(--space-6); }
.container-md { max-width: 768px;  margin: 0 auto; padding: 0 var(--space-6); }

/* ============ Auth Pages ============ */
.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-brand-panel {
  background: linear-gradient(135deg, var(--color-bg-surface) 0%, var(--color-bg-base) 100%);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  padding: var(--space-12);
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(14,165,233,0.06), transparent 60%);
  pointer-events: none;
}

.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-10);
  background: var(--color-bg-base);
}

.auth-form-card {
  width: 100%;
  max-width: 420px;
}

.auth-form-card h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.social-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  font-family: inherit;
}

.social-btn:hover { background: var(--color-bg-overlay); border-color: rgba(148,163,184,0.3); color: var(--color-text-primary); }

/* ============ Progress Bars ============ */
.progress-bar {
  height: 8px;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-accent-500);
  transition: width var(--transition-normal);
}

.progress-fill.safe    { background: var(--color-safe); }
.progress-fill.danger  { background: var(--color-danger); }
.progress-fill.warning { background: var(--color-warning); }

/* ============ Command Center Grid ============ */
.command-center-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  grid-template-rows: auto 1fr;
  gap: var(--space-4);
  height: calc(100vh - var(--topbar-height) - var(--space-12));
}

.kpi-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
}

/* ============ Utility ============ */
.text-accent  { color: var(--color-accent-400); }
.text-safe    { color: var(--color-safe); }
.text-danger  { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }
.text-muted   { color: var(--color-text-muted); }
.text-sm      { font-size: var(--text-sm); }
.text-xs      { font-size: var(--text-xs); }
.font-bold    { font-weight: 700; }
.font-semibold{ font-weight: 600; }

.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2        { gap: var(--space-2); }
.gap-4        { gap: var(--space-4); }
.gap-6        { gap: var(--space-6); }
.mt-4         { margin-top: var(--space-4); }
.mt-6         { margin-top: var(--space-6); }
.mb-4         { margin-bottom: var(--space-4); }
.mb-6         { margin-bottom: var(--space-6); }

.section      { padding: var(--space-20) 0; }
.section-sm   { padding: var(--space-12) 0; }

/* ============ Blazor Error ============ */
#blazor-error-ui {
  background: rgba(239,68,68,0.9);
  bottom: 0;
  box-shadow: 0 -1px 0 rgba(0,0,0,0.2);
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
  color: white;
  font-size: var(--text-sm);
}
#blazor-error-ui .reload { color: white; text-decoration: underline; margin-left: var(--space-3); }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .hero .container { grid-template-columns: 1fr; }
  .command-center-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .app-sidebar { transform: translateX(-240px); transition: transform var(--transition-normal); }
  .app-sidebar.open { transform: translateX(0); width: 240px; }
  .app-main { margin-left: 0; }
  .hero h1 { font-size: var(--text-3xl); }
}

/* ============ Reduced Motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

/* ============================================================
   EOC COMPONENT SYSTEM — Emergency Operations Center Design
   Glassmorphism · Neon Glows · Live Indicators · Dense Grids
   ============================================================ */

/* --------------------------------------------------------
   1. ANIMATION KEYFRAMES
   -------------------------------------------------------- */

/* Live status dot — green glow pulse */
@keyframes eoc-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); transform: scale(1); }
  50%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); transform: scale(1.1); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); transform: scale(1); }
}

/* Danger status dot — red glow pulse */
@keyframes eoc-pulse-red {
  0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); transform: scale(1); }
  50%  { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); transform: scale(1.1); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); transform: scale(1); }
}

/* Accent status dot — blue glow pulse */
@keyframes eoc-pulse-blue {
  0%   { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7); transform: scale(1); }
  50%  { box-shadow: 0 0 0 6px rgba(14, 165, 233, 0); transform: scale(1.1); }
  100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); transform: scale(1); }
}

/* Scanning line sweep effect for active panels */
@keyframes glow-sweep {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Panel entrance — slide up from below */
@keyframes slide-in-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* KPI card entrance — scale + fade in */
@keyframes kpi-count {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* Blinking cursor for AI typed output */
@keyframes typing-cursor {
  0%, 49%  { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* --------------------------------------------------------
   2. GLASSMORPHISM CARD CLASSES
   -------------------------------------------------------- */

/* Standard glass panel */
.glass-card {
  background: rgba(13, 27, 53, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Danger variant — red glow */
.glass-card-danger {
  background: rgba(13, 27, 53, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(239, 68, 68, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Safe variant — green glow */
.glass-card-safe {
  background: rgba(13, 27, 53, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(34, 197, 94, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* AI/Accent variant — strong blue glow */
.glass-card-accent {
  background: rgba(13, 27, 53, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 32px rgba(14, 165, 233, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* --------------------------------------------------------
   3. ENHANCED EOC CARD CLASSES
   -------------------------------------------------------- */

.eoc-card {
  background: rgba(13, 27, 53, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1.25rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.eoc-card:hover {
  border-color: rgba(14, 165, 233, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(14, 165, 233, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Card header: title on the left, badge/action on the right */
.eoc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

/* Uppercase micro-label for card sections */
.eoc-card-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

/* Large prominent data value */
.eoc-card-value {
  font-size: 1.875rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--color-text-primary);
}

/* --------------------------------------------------------
   4. KPI STRIP SYSTEM
   -------------------------------------------------------- */

/* Override the existing .kpi-strip with EOC-enhanced version */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
}

/* Single KPI metric card */
.kpi-card {
  background: rgba(13, 27, 53, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1.25rem 1.5rem;
  position: relative;
  overflow: hidden;
  animation: kpi-count 0.4s ease both;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

/* Subtle diagonal scan-line decoration */
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(14, 165, 233, 0.04) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: glow-sweep 6s linear infinite;
  pointer-events: none;
}

/* Metric label */
.kpi-card-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.375rem;
}

/* Large numeric value */
.kpi-card-value {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--color-text-primary);
}

/* Contextual sub-label beneath the value */
.kpi-card-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 0.375rem;
}

/* KPI state variants */
.kpi-card.kpi-danger {
  border-color: rgba(239, 68, 68, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 16px rgba(239, 68, 68, 0.2);
}
.kpi-card.kpi-danger .kpi-card-value { color: var(--color-danger); }

.kpi-card.kpi-safe {
  border-color: rgba(34, 197, 94, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 16px rgba(34, 197, 94, 0.15);
}
.kpi-card.kpi-safe .kpi-card-value { color: var(--color-safe); }

.kpi-card.kpi-warning {
  border-color: rgba(245, 158, 11, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 158, 11, 0.15);
}
.kpi-card.kpi-warning .kpi-card-value { color: var(--color-warning); }

.kpi-card.kpi-accent {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 16px rgba(14, 165, 233, 0.2);
}
.kpi-card.kpi-accent .kpi-card-value { color: var(--color-accent-400); }

/* --------------------------------------------------------
   5. LIVE INDICATORS
   -------------------------------------------------------- */

/* Core live dot — 8×8 green pulse */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-safe);
  flex-shrink: 0;
  animation: eoc-pulse 2s ease-in-out infinite;
}

.live-dot.danger {
  background-color: var(--color-danger);
  animation: eoc-pulse-red 2s ease-in-out infinite;
}

.live-dot.accent {
  background-color: var(--color-accent-500);
  animation: eoc-pulse-blue 2s ease-in-out infinite;
}

/* Row: dot + "LIVE" text */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent-400);
}

/* Pill badge: "● LIVE" */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.1875rem 0.625rem;
  border-radius: var(--radius-full);
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(14, 165, 233, 0.25);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent-400);
}

/* --------------------------------------------------------
   6. STATUS PILL SYSTEM
   -------------------------------------------------------- */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status-pill.critical {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.status-pill.active {
  background: rgba(14, 165, 233, 0.15);
  border-color: rgba(14, 165, 233, 0.4);
  color: var(--color-accent-300);
}

.status-pill.drill {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fcd34d;
}

.status-pill.safe {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.status-pill.closed {
  background: rgba(100, 116, 139, 0.15);
  border-color: rgba(100, 116, 139, 0.3);
  color: var(--color-neutral);
}

.status-pill.pending {
  background: rgba(71, 85, 105, 0.2);
  border-color: rgba(71, 85, 105, 0.4);
  color: #94a3b8;
}

/* --------------------------------------------------------
   7. EOC SHELL LAYOUT
   -------------------------------------------------------- */

/* Full-viewport grid shell — sidebar | main */
.eoc-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  height: 100vh;
  overflow: hidden;
}

/* Fixed-height dark glass sidebar */
.eoc-sidebar {
  height: 100%;
  background: rgba(6, 13, 31, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(14, 165, 233, 0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

/* Right-hand content column */
.eoc-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top navigation bar */
.eoc-topbar {
  height: var(--topbar-height);
  flex-shrink: 0;
  background: rgba(6, 13, 31, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(14, 165, 233, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
}

/* Scrollable page body */
.eoc-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

/* --------------------------------------------------------
   8. SIDEBAR STYLES
   -------------------------------------------------------- */

/* Brand row at the top of the sidebar */
.sidebar-brand {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid rgba(14, 165, 233, 0.1);
  flex-shrink: 0;
}

/* Logo text + icon row */
.sidebar-logo-mark {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-text-primary);
  text-decoration: none;
}

/* "ai" or accent word in the logo */
.sidebar-logo-accent {
  color: var(--color-accent-400);
}

/* Small operational status dot next to logo */
.sidebar-logo-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-safe);
  animation: eoc-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* Nav container — fills remaining sidebar height */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
}

/* Grouping wrapper for nav sections */
.sidebar-section {
  display: flex;
  flex-direction: column;
}

/* Section heading label */
.sidebar-section-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  padding: 1rem 1.25rem 0.375rem;
}

/* Individual nav link */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.sidebar-item:hover {
  color: var(--color-text-primary);
  border-left-color: rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.05);
}

.sidebar-item.active {
  color: var(--color-accent-400);
  border-left-color: var(--color-accent-500);
  background: rgba(14, 165, 233, 0.08);
}

/* Nav icon sizing */
.sidebar-icon {
  font-size: 1.125rem;
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

/* Sidebar footer area */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(14, 165, 233, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-shrink: 0;
}

/* "SYSTEM OPERATIONAL" health row */
.sidebar-status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-safe);
  padding: 0.5rem 0;
}

/* --------------------------------------------------------
   9. TOPBAR STYLES
   -------------------------------------------------------- */

/* Search input — pill shaped */
.topbar-search {
  background: rgba(13, 27, 53, 0.8);
  border: 1px solid rgba(14, 165, 233, 0.15);
  border-radius: var(--radius-full);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  padding: 0.375rem 1rem 0.375rem 2.5rem;
  width: 280px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.topbar-search:focus {
  outline: none;
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

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

/* Position wrapper for search icon overlay */
.topbar-search-wrap {
  position: relative;
  flex-shrink: 0;
}

/* Right-side action buttons cluster */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

/* Circular icon button */
.topbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(13, 27, 53, 0.8);
  border: 1px solid rgba(14, 165, 233, 0.15);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  text-decoration: none;
}

.topbar-icon-btn:hover {
  color: var(--color-text-primary);
  border-color: rgba(14, 165, 233, 0.4);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.2);
}

/* Red notification counter pill */
.topbar-alert-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--color-danger);
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-bg-base);
}

/* Live clock display */
.topbar-clock {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* System health dot row: DB / AI / SMS / Email */
.topbar-system-health {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

/* Individual health indicator */
.topbar-health-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.topbar-health-dot::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-safe);
}

.topbar-health-dot.health-blue::before  { background: var(--color-accent-500); }
.topbar-health-dot.health-amber::before { background: var(--color-warning); }
.topbar-health-dot.health-red::before   { background: var(--color-danger); }

/* User name + avatar row */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  cursor: pointer;
}

/* Avatar circle */
.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-accent-600);
  color: white;
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

/* --------------------------------------------------------
   10. DENSE DASHBOARD GRID
   -------------------------------------------------------- */

/* 12-column CSS grid for command center layout */
.eoc-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

/* Column span helpers — col-span-1 through col-span-12 */
.col-span-1  { grid-column: span 1; }
.col-span-2  { grid-column: span 2; }
.col-span-3  { grid-column: span 3; }
.col-span-4  { grid-column: span 4; }
.col-span-5  { grid-column: span 5; }
.col-span-6  { grid-column: span 6; }
.col-span-7  { grid-column: span 7; }
.col-span-8  { grid-column: span 8; }
.col-span-9  { grid-column: span 9; }
.col-span-10 { grid-column: span 10; }
.col-span-11 { grid-column: span 11; }
.col-span-12 { grid-column: span 12; }

/* Row span helpers */
.row-span-1 { grid-row: span 1; }
.row-span-2 { grid-row: span 2; }
.row-span-3 { grid-row: span 3; }

/* Glass panel — foundation for command center panels */
.eoc-panel {
  background: rgba(13, 27, 53, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slide-in-up 0.35s ease both;
}

/* Panel header row: title + live-indicator + action buttons */
.eoc-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(14, 165, 233, 0.08);
  flex-shrink: 0;
}

/* Uppercase section title in panel header */
.eoc-panel-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent-400);
}

/* --------------------------------------------------------
   11. ACCOUNTABILITY GRID
   -------------------------------------------------------- */

/* Auto-fill grid of personnel cards */
.accountability-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

/* Individual person status card */
.acct-person-card {
  background: rgba(13, 27, 53, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(14, 165, 233, 0.1);
  border-radius: var(--radius-md);
  padding: 0.875rem;
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  transition: border-color var(--transition-fast);
}

/* Status color — left border as quick visual indicator */
.acct-status-safe    { border-left: 3px solid var(--color-safe); }
.acct-status-injured { border-left: 3px solid var(--color-missing); }
.acct-status-missing {
  border-left: 3px solid var(--color-danger);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}
.acct-status-pending { border-left: 3px solid var(--color-warning); }

/* --------------------------------------------------------
   12. AI PANEL STYLES
   -------------------------------------------------------- */

/* AI situation report card — strong blue left border */
.ai-panel {
  background: rgba(13, 27, 53, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-left: 3px solid var(--color-accent-500);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 24px rgba(14, 165, 233, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: 1.25rem;
}

/* "AI SITUATION REPORT" header label */
.ai-panel-header {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent-400);
  margin-bottom: 0.75rem;
}

/* AI-generated prose output area */
.ai-output {
  white-space: pre-wrap;
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

/* Blinking cursor appended after AI output while typing */
.ai-typing-cursor::after {
  content: '|';
  color: var(--color-accent-400);
  animation: typing-cursor 1s step-end infinite;
  font-weight: 300;
  margin-left: 1px;
}

/* Apply the typing cursor when AI is generating */
.ai-generating {
  /* compose with .ai-typing-cursor class */
}
.ai-generating::after {
  content: '|';
  color: var(--color-accent-400);
  animation: typing-cursor 1s step-end infinite;
  font-weight: 300;
  margin-left: 1px;
}

/* --------------------------------------------------------
   13. ACCOUNTABILITY PROGRESS BARS
   -------------------------------------------------------- */

/* Track */
.acct-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-full);
  overflow: hidden;
}

/* Fill — width set inline via style="width:X%" */
.acct-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

.acct-bar-fill.safe   { background: linear-gradient(90deg, #16a34a, #22c55e); }
.acct-bar-fill.danger { background: linear-gradient(90deg, #dc2626, #ef4444); }

/* --------------------------------------------------------
   14. TIMELINE COMPONENT
   -------------------------------------------------------- */

/* Vertical timeline wrapper */
.eoc-timeline {
  position: relative;
  padding-left: 2rem;
}

/* Continuous vertical line */
.eoc-timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(14, 165, 233, 0.6) 0%,
    rgba(14, 165, 233, 0.1) 80%,
    transparent 100%
  );
}

/* Single timeline event */
.eoc-timeline-item {
  position: relative;
  padding-bottom: 1.5rem;
}

/* Dot on the vertical line */
.eoc-timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-bg-base);
  border: 2px solid var(--color-accent-500);
  position: absolute;
  left: -1.625rem;
  top: 0.25rem;
  flex-shrink: 0;
}

/* Timestamp label */
.eoc-timeline-time {
  font-family: 'Courier New', 'Consolas', monospace;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

/* Event content card */
.eoc-timeline-content {
  background: rgba(13, 27, 53, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(14, 165, 233, 0.1);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  font-size: 0.875rem;
}

/* --------------------------------------------------------
   15. INCIDENT SEVERITY INDICATORS
   -------------------------------------------------------- */

.severity-critical {
  color: var(--color-danger);
  text-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
  animation: eoc-pulse-red 2s ease-in-out infinite;
}

.severity-high    { color: var(--color-missing); }
.severity-medium  { color: var(--color-warning); }
.severity-low     { color: var(--color-accent-400); }

/* --------------------------------------------------------
   16. EMPTY STATE
   -------------------------------------------------------- */

.eoc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
}

.eoc-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.4;
}

.eoc-empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.eoc-empty-desc {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  max-width: 340px;
  line-height: 1.6;
}

/* --------------------------------------------------------
   17. EOC RESPONSIVE OVERRIDES
   -------------------------------------------------------- */

@media (max-width: 1024px) {
  /* Collapse sidebar — eoc-shell becomes single-column */
  .eoc-shell {
    grid-template-columns: 1fr;
  }
  .eoc-sidebar {
    display: none;
  }
  .eoc-sidebar.open {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--sidebar-width, 240px);
    z-index: 200;
  }
  /* KPI strip: 2-column at 1024 */
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Single column dashboard grid */
  .eoc-dashboard-grid {
    grid-template-columns: 1fr;
  }
  /* All col-span-* collapse to full width */
  [class^="col-span-"],
  [class*=" col-span-"] {
    grid-column: span 1;
  }
  /* 2-column KPI strip */
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Stack topbar search below on very small */
  .topbar-search {
    width: 160px;
  }
  /* Compact KPI value on small screens */
  .kpi-card-value { font-size: 1.5rem; }
}
