/* ============================================================
   SpaceTS - Application Stylesheet
   Design system: flat dark ops console.
   One accent color, semantic status colors, 4px spacing grid.
   ============================================================ */

:root {
  /* Surfaces */
  --bg-0: #0a0e17;            /* deep space black background */
  --bg-1: rgba(19, 25, 36, 0.85); /* distinct slate-blue panels with opacity */
  --bg-2: #1e293b;            /* raised inputs, cards        */
  --bg-3: #334155;            /* hover/active surfaces       */

  /* Strokes */
  --border: rgba(34, 47, 68, 0.6); /* crisp, semi-transparent borders */
  --border-strong: #475569;   /* highlighted borders         */

  /* Text */
  --text-1: #f8fafc;          /* bright white-grey text      */
  --text-2: #94a3b8;          /* secondary slate-grey text   */
  --text-3: #64748b;          /* muted text                  */
  --muted: #94a3b8;           /* legacy alias used by JS     */

  /* Accent + status */
  --accent: #38bdf8;          /* tactical light blue         */
  --accent-hover: #0ea5e9;
  --accent-tint: rgba(56, 189, 248, 0.1);
  --ok: #10b981;              /* green                       */
  --warn: #f59e0b;            /* amber                       */
  --danger: #ef4444;          /* red                         */
  --purple: #a855f7;

  /* Orbit classes (badges / legend - globe colors live in JS) */
  --leo: #10b981;
  --meo: #3b82f6;
  --geo: #a855f7;
  --heo: #f97316;

  /* Layout */
  --header-h: 56px;
  --dock-w: 68px;
  --sidebar-w: 368px; /* dock-w + secondary sidebar */
  --radius: 6px;              /* modern rounded corners     */
  --radius-lg: 10px;

  /* Type */
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-glow: 0 0 12px rgba(56, 189, 248, 0.2);

  /* Legacy aliases still referenced by JS-injected markup */
  --panel: #131924;
  --text: #f8fafc;
  --selected: #38bdf8;
  --accent2: #38bdf8;
  --border-hover: #475569;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-ui);
  background: var(--bg-0);
  color: var(--text-1);
  height: 100vh;
  overflow: hidden;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3e4a5f; }

/* -- Shared controls --------------------------------------- */

select,
input[type="text"],
input[type="number"] {
  width: 100%;
  height: 32px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-1);
  border-radius: var(--radius);
  padding: 0 10px;
  font-size: 12.5px;
  font-family: var(--font-ui);
  outline: none;
  transition: border-color 0.12s ease, background 0.12s ease;
}

select:hover,
input[type="text"]:hover,
input[type="number"]:hover { border-color: var(--border-strong); }

select:focus,
input[type="text"]:focus,
input[type="number"]:focus {
  border-color: var(--accent);
  background: var(--bg-1);
}

select { cursor: pointer; }

/* Custom cybernetic checkbox styling */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: rgba(10, 15, 26, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
input[type="checkbox"]:hover {
  border-color: var(--accent);
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.2);
}
input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}
input[type="checkbox"]:checked::after {
  content: "✓";
  color: #0c121e;
  font-size: 10px;
  font-weight: bold;
}
select option, select optgroup { background: var(--bg-1); color: var(--text-1); }

input::placeholder { color: var(--text-3); }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: var(--border-strong);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 12px; height: 12px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; }

/* Base button */
.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.ui-btn:hover { background: var(--bg-3); border-color: #3e4a5f; }

.ui-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0c10;
  font-weight: 600;
}
.ui-btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Section label used across sidebar / panels */
.ctrl-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 6px;
}

/* Small count badge (feeds) */
.count-badge {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-align: center;
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}
.count-badge.danger { color: var(--danger); border-color: rgba(248, 81, 73, 0.4); }
.count-badge.warn   { color: var(--warn);   border-color: rgba(210, 153, 34, 0.4); }

/* Empty-state note inside feeds and lists */
.empty-note {
  padding: 20px 12px;
  text-align: center;
  color: var(--text-2);
  font-size: 11.5px;
  line-height: 1.5;
}

/* -- Header ------------------------------------------------ */

#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10,14,23,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(34,47,68,0.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 14px;
  z-index: 1000;
  gap: 0;
}

#logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

#logo img {
  height: 30px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-role {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
}

.app-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: 0.2px;
}
.app-name span {
  color: var(--text-2);
  font-weight: 400;
  margin-left: 8px;
  font-size: 12px;
}

/* Header stats */
#stats-row {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
  margin: 0 8px;
}

.stat-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0 14px;
  border-left: 1px solid rgba(34,47,68,0.8);
  gap: 1px;
}
.stat-box:first-child { border-left: none; }

.stat-val {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.3;
  white-space: nowrap;
}

.stat-lbl {
  font-size: 9px;
  color: var(--text-2);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.3;
  opacity: 0.8;
}

#stat-region .stat-val { color: var(--warn); }

#utc-clock, #ist-clock {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-1);
  font-weight: 500;
}

/* Header actions */
#header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  max-width: 100%;
  overflow: visible;
}
#header-actions::-webkit-scrollbar {
  display: none;
}

.hdr-btn {
  height: 26px;
  padding: 0 11px;
  background: rgba(30,41,59,0.8);
  border: 1px solid rgba(71,85,105,0.6);
  color: var(--text-2);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.hdr-btn:hover {
  background: rgba(51,65,85,0.9);
  border-color: rgba(100,116,139,0.8);
  color: var(--text-1);
}

/* Object visibility toggles (header) */
#vis-controls-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 10px;
  margin-right: 2px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

#vis-controls-header .vis-toggle {
  width: auto;
  height: 26px;
  padding: 0 9px;
  font-size: 11.5px;
  gap: 5px;
}
#vis-controls-header .vis-toggle::after { display: none; }

.vis-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.vis-tog-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.3;
  transition: opacity 0.12s ease;
}

.vis-toggle.active {
  background: var(--bg-2);
  border-color: var(--border-strong);
  color: var(--text-1);
}
.vis-toggle.active .vis-tog-dot { opacity: 1; }

.vis-toggle:hover { border-color: var(--border-strong); color: var(--text-1); }

.vis-toggle:not(.active) { text-decoration: line-through; text-decoration-color: var(--text-3); }

/* -- Legend dropdown --------------------------------------- */

.legend-trigger { position: relative; display: flex; align-items: center; }

.legend-trigger-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-ui);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.legend-trigger-btn:hover { background: var(--bg-3); border-color: #3e4a5f; }

.legend-trigger-dots { display: flex; align-items: center; gap: 3px; }
.legend-trigger-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 232px;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  z-index: 2000;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  user-select: none;
}

.legend-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
}

.legend-trigger:hover .legend-dropdown,
.legend-dropdown:hover,
.legend-dropdown.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.legend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.legend-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--text-1);
}

.legend-status {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  font-size: 12px;
  color: var(--text-2);
}
.legend-item:hover { color: var(--text-1); }

.legend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.legend-dot.selected { outline: 2px solid rgba(210, 153, 34, 0.35); outline-offset: 1px; }

/* Shape variants — match the globe markers (diamond = debris, triangle = rocket body) */
.legend-dot.shape-diamond, .vis-tog-dot.shape-diamond {
  border-radius: 2px;
  transform: rotate(45deg) scale(0.9);
}
.legend-dot.shape-triangle, .vis-tog-dot.shape-triangle {
  border-radius: 0;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* -- Sidebar ----------------------------------------------- */

#sidebar {
  position: fixed;
  top: var(--header-h);
  left: var(--dock-w);
  bottom: 0;
  width: 300px;
  background: var(--bg-1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  z-index: 900;
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);
}

.sidebar-toggle-btn {
  position: absolute;
  top: 50%;
  right: -24px;
  transform: translateY(-50%);
  width: 24px;
  height: 64px;
  background: var(--bg-1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-2);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
}
.sidebar-toggle-btn:hover {
  color: var(--text-1);
  background: var(--bg-3);
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
}
.sidebar-toggle-btn svg {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar-controls {
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex: 1;
}

body.sidebar-collapsed #sidebar { transform: translateX(-300px); }
body.sidebar-collapsed #sidebar .sidebar-toggle-btn {
  border-left: 1px solid var(--border);
  border-radius: var(--radius);
}
body.sidebar-collapsed #sidebar .sidebar-toggle-btn svg { transform: rotate(180deg); }
body.sidebar-collapsed #cesiumContainer { left: var(--dock-w); }
body.sidebar-collapsed #info-panel { left: calc(var(--dock-w) + 36px); }
body.sidebar-collapsed #analytics-overlay { left: var(--dock-w); }
body.sidebar-collapsed #spacewx-overlay  { left: var(--dock-w); }
body.sidebar-collapsed #time-controller { left: 50%; }


/* Collapsible Sidebar Sections */
.sidebar-section {
  border-bottom: 1px solid var(--border);
  padding: 14px;
}
.sidebar-section:last-of-type {
  border-bottom: none;
}
.sidebar-section[open] {
  padding-bottom: 16px;
}
.section-header {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  list-style: none;
}
.section-header::-webkit-details-marker {
  display: none;
}
.section-header svg.chevron {
  transition: transform 0.2s ease;
  color: var(--text-2);
}
.sidebar-section[open] .section-header svg.chevron {
  transform: rotate(180deg);
}
.section-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.sort-row { display: flex; gap: 6px; }
.sort-row select { flex: 1; }

#btn-sort-dir {
  height: 30px;
  width: 34px;
  flex-shrink: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}
#btn-sort-dir:hover { border-color: var(--border-strong); color: var(--text-1); }

.filter-row { display: flex; gap: 6px; }
.filter-row select { flex: 1; }

/* Sidebar section toggles (tracking / cone viz) */
.toggle-btn {
  width: 100%;
  height: 30px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.toggle-btn:hover { background: var(--bg-3); }
.toggle-btn.on {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent);
}

/* Sidebar footer link */
.sidebar-link {
  display: block;
  padding: 9px 14px;
  color: var(--text-2);
  font-size: 11.5px;
  text-decoration: none;
  text-align: center;
  border-top: 1px solid var(--border);
  transition: color 0.12s ease, background 0.12s ease;
}
.sidebar-link:hover { color: var(--accent); background: var(--bg-2); }

/* -- Satellite list ---------------------------------------- */

#sat-list-header {
  padding: 8px 14px;
  font-size: 11.5px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#sat-list { width: 100%; }

.sat-item {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s ease;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sat-item:hover { background: var(--bg-2); }
.sat-item.selected {
  background: var(--accent-tint);
  box-shadow: inset 2px 0 0 var(--accent);
}

.sat-name {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sat-meta {
  font-size: 10.5px;
  color: var(--text-2);
  font-family: var(--font-mono);
  display: flex;
  gap: 8px;
  align-items: center;
}

#region-list { flex: 1; overflow-y: auto; }

.threat-prc  { box-shadow: inset 2px 0 0 var(--danger); background: rgba(248, 81, 73, 0.06); }
.threat-prc .sat-name { color: var(--danger); }
.threat-paki { box-shadow: inset 2px 0 0 var(--warn); background: rgba(210, 153, 34, 0.06); }
.threat-paki .sat-name { color: var(--warn); }

/* Orbit-class badges */
.badge {
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.4px;
}
.badge-LEO { background: rgba(52, 211, 153, 0.12); color: var(--leo); }
.badge-MEO { background: rgba(96, 165, 250, 0.12); color: var(--meo); }
.badge-GEO { background: rgba(192, 132, 252, 0.12); color: var(--geo); }
.badge-HEO { background: rgba(251, 146, 60, 0.12);  color: var(--heo); }

/* Illumination & Earth Shadow status badges */
.badge-illum {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
  font-family: var(--font-ui);
}
.badge-illum-umbra {
  background: rgba(96, 165, 250, 0.15);
  border: 1px solid rgba(96, 165, 250, 0.4);
  color: #93c5fd;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.15);
}
.badge-illum-penumbra {
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  color: #fde68a;
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.15);
}
.badge-illum-sunlight {
  background: rgba(253, 224, 71, 0.12);
  border: 1px solid rgba(253, 224, 71, 0.35);
  color: #fef08a;
}
#btn-filter-eclipsed.active {
  background: rgba(96, 165, 250, 0.3) !important;
  border-color: #60a5fa !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.35);
}

/* Country / threat tag on list rows */
.origin-tag {
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
}
.origin-tag.prc { background: rgba(248, 81, 73, 0.15); color: var(--danger); }
.origin-tag.pak { background: rgba(210, 153, 34, 0.15); color: var(--warn); }

/* -- Feed sections (threats / conjunctions) ---------------- */

.feed-section { border-top: 1px solid var(--border); }

.feed-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-2);
}

.feed-section-header .feed-opts {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-section-header label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.feed-list { max-height: 260px; overflow-y: auto; padding: 0 10px 10px; }

.feed-card {
  background: rgba(19, 25, 36, 0.45);
  border: 1px solid rgba(34, 47, 68, 0.6);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  font-size: 12px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.feed-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(30, 41, 59, 0.55);
  transform: translateY(-1px);
}
.feed-card.critical { 
  border-left: 3px solid var(--danger); 
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.04);
}
.feed-card.elevated { 
  border-left: 3px solid var(--warn); 
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.04);
}

.feed-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.feed-card-title {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.feed-card.critical .feed-card-title.tinted { color: var(--danger); }
.feed-card.elevated .feed-card-title.tinted { color: var(--warn); }

.feed-tags { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }

.feed-tag {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--border-strong);
}
.feed-tag.critical { color: var(--danger); border-color: rgba(248, 81, 73, 0.4); background: rgba(248, 81, 73, 0.08); }
.feed-tag.elevated { color: var(--warn); border-color: rgba(210, 153, 34, 0.4); background: rgba(210, 153, 34, 0.08); }
.feed-tag.source   { color: var(--meo); border-color: rgba(96, 165, 250, 0.35); background: rgba(96, 165, 250, 0.08); }

.feed-sub {
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-sub strong { color: var(--text-1); font-weight: 500; }

.feed-desc {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.45;
  margin-bottom: 8px;
}

.feed-basis {
  font-size: 10px;
  font-style: italic;
  color: var(--text-3, var(--text-2));
  opacity: 0.75;
  margin-bottom: 8px;
  cursor: help;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 8px;
}
.feed-grid.cols-2 { grid-template-columns: 1fr 1fr; }

.feed-grid .k {
  font-size: 9px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
}
.feed-grid .v {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-1);
  font-weight: 500;
}
.feed-grid .v.critical { color: var(--danger); }
.feed-grid .v.elevated { color: var(--warn); }

.feed-meta {
  font-size: 10px;
  color: var(--text-2);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.feed-actions { display: flex; gap: 6px; }

.feed-btn {
  flex: 1;
  height: 25px;
  background: rgba(56, 189, 248, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.feed-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

/* -- Ground station planner -------------------------------- */

#ground-station-planner {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  display: none;
}

.planner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.planner-tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--text-2);
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 3px;
}

.planner-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-2);
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.planner-row #lbl-active-station { color: var(--text-1); font-weight: 500; }

.planner-field { margin-bottom: 10px; }

.field-label {
  font-size: 10px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
}

.coord-row { display: flex; gap: 8px; margin-bottom: 10px; }
.coord-row > div { flex: 1; }

.slider-field { margin-bottom: 10px; }

.slider-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.slider-label .slider-val {
  color: var(--text-1);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}

/* -- Globe container --------------------------------------- */

#cesiumContainer {
  position: fixed;
  top: var(--header-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.cesium-widget-credits { display: none !important; }

/* -- Info panel -------------------------------------------- */

#info-panel {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: calc(var(--sidebar-w) + 36px);
  width: 420px;
  max-width: calc(100vw - var(--sidebar-w) - 48px);
  max-height: calc(100vh - var(--header-h) - 32px);
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  z-index: 1200;
  padding: 16px 16px 12px 16px;
  display: none;
  flex-direction: column;
  animation: panelIn 0.15s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

#info-panel.visible { display: flex; }

/* Custom scrollbar for info panel content */
#info-scroll-container {
  flex: 1;
  overflow-y: auto;
  margin-top: 4px;
  margin-bottom: 12px;
  padding-right: 4px;
}
#info-scroll-container::-webkit-scrollbar {
  width: 4px;
}
#info-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}
#info-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}
#info-scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Info Panel Tabbed Navigation */
.info-tabs {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 10px;
  margin-bottom: 10px;
  gap: 8px;
  padding-bottom: 0;
}

.info-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-2);
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-ui);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
}

.info-tab-btn:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.04);
}

.info-tab-btn.active {
  color: #00e5ff;
  border-bottom-color: #00e5ff;
  background: rgba(0, 229, 255, 0.06);
}

.info-tab-btn.danger.active {
  color: var(--danger);
  border-bottom-color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

.info-tab-btn.danger:hover {
  color: var(--danger);
}

.info-tab-content {
  display: none;
}

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

/* Help Icon / Tooltip */
.info-help-btn {
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color 0.12s ease, background 0.12s ease;
}

.info-help-btn:hover {
  color: var(--text-1);
  background: var(--bg-3);
}

#info-close {
  position: absolute;
  top: 10px; right: 10px;
  width: 22px; height: 22px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}
#info-close:hover { color: var(--text-1); background: var(--bg-2); }

#info-sat-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  color: var(--text-1);
  padding-right: 24px;
  line-height: 1.35;
}

#info-norad {
  font-size: 11px;
  color: var(--text-2);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.info-section { margin-bottom: 8px; margin-top: 10px; }

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }

.info-key { font-size: 11.5px; color: var(--text-2); }
.info-val {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-1);
  text-align: right;
}

/* Conjunction warning inside info panel */
#info-conjunction-section {
  margin-top: 12px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  display: none;
}

.info-warning-title {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--danger);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

#iv-conj-partner { color: var(--danger); cursor: pointer; }
#iv-conj-partner:hover { text-decoration: underline; }

#info-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.btn {
  flex: 1 1 auto;
  min-width: max-content;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--bg-2);
  color: var(--text-1);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
  font-family: var(--font-ui);
}

.btn.active, #btn-isolate.active {
  background: rgba(14, 165, 233, 0.25) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }

/* -- Loading overlay --------------------------------------- */

#loading {
  position: fixed;
  inset: 0;
  background: var(--bg-0);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
#loading.hidden { display: none; }

.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-sm {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

#loading-msg {
  font-size: 13px;
  color: var(--text-2);
  min-height: 20px;
  transition: opacity 0.2s ease;
}

/* Loading overlay inner layout */
.loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 280px;
}

.loading-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: 0.5px;
  margin-bottom: -4px;
}

/* Spinner + orbit ring wrapper */
.loading-globe {
  position: relative;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

/* Orbital ring orbiting around the spinner */
.loading-orbit {
  position: absolute;
  inset: -10px;
  border: 1.5px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1.6s linear infinite reverse;
  opacity: 0.5;
}

/* Progress bar track */
.loading-bar-wrap {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

/* Progress bar fill */
.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #38bdf8);
  border-radius: 2px;
  transition: width 0.4s ease;
  position: relative;
  overflow: hidden;
}
/* Shimmer on the bar */
.loading-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  animation: shimmer 1.2s ease infinite;
}
@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* Step counter */
.loading-step {
  font-size: 10.5px;
  color: var(--text-3, var(--text-2));
  letter-spacing: 0.4px;
  opacity: 0.7;
}


/* -- Toast ------------------------------------------------- */

#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-3);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 12.5px;
  z-index: 3000;
  display: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
#toast.visible { display: block; animation: fadeToast 0.2s ease; }
@keyframes fadeToast {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
}

/* -- Alert card + overlay (injected by ui.js) -------------- */

.alert-card {
  position: fixed;
  bottom: 20px;
  left: calc(var(--sidebar-w) + 16px);
  z-index: 9999;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  max-width: 300px;
  font-size: 12.5px;
  color: var(--text-1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: slideInLeft 0.25s ease;
  transition: opacity 0.4s ease;
}
.alert-card.critical { box-shadow: inset 3px 0 0 var(--danger), 0 8px 24px rgba(0, 0, 0, 0.5); }
.alert-card.elevated { box-shadow: inset 3px 0 0 var(--warn), 0 8px 24px rgba(0, 0, 0, 0.5); }

.alert-card .alert-kicker {
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.alert-card.critical .alert-kicker { color: var(--danger); }
.alert-card.elevated .alert-kicker { color: var(--warn); }

.alert-card .alert-title { font-weight: 600; margin-bottom: 2px; }
.alert-card .alert-line { color: var(--text-2); font-size: 11.5px; }
.alert-card .alert-foot { color: var(--text-2); font-size: 10.5px; margin-top: 6px; font-family: var(--font-mono); }

.alert-overlay {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100vw; height: 100vh;
  animation: alertFade 4s ease forwards;
}

.alert-overlay-box {
  background: var(--bg-1);
  border: 1px solid var(--danger);
  padding: 24px 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: alertPop 0.3s ease;
  text-align: center;
}
.alert-overlay-box.elevated { border-color: var(--warn); }

.alert-overlay-box .k {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.alert-overlay-box.elevated .k { color: var(--warn); }
.alert-overlay-box .t { color: var(--text-1); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.alert-overlay-box .s { color: var(--text-2); font-size: 12px; }

/* Keyframes kept for JS-injected animations */
@keyframes slideInLeft {
  from { transform: translateX(-24px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideInRight {
  from { transform: translateX(24px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes alertPop {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
@keyframes alertFade {
  0%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes alertPing {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* -- Time controller --------------------------------------- */

#time-controller {
  position: fixed;
  bottom: 16px;
  left: calc(var(--sidebar-w) + (100% - var(--sidebar-w)) / 2);
  transform: translateX(-50%);
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-divider { width: 1px; height: 18px; background: var(--border-strong); }

.time-btn {
  height: 26px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-2);
  border-radius: var(--radius);
  font-size: 11.5px;
  font-weight: 500;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.time-btn:hover { background: var(--bg-2); color: var(--text-1); }
.time-btn.active {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--accent);
}

.time-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(63, 185, 80, 0.12);
  color: var(--ok);
}
.time-badge.playback { background: rgba(210, 153, 34, 0.12); color: var(--warn); }

#sel-playback-speed {
  width: auto;
  height: 26px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 0 6px;
  border-radius: var(--radius);
  font-size: 11px;
  font-family: var(--font-mono);
  outline: none;
  cursor: pointer;
}

#time-slider { width: 140px; }

#playback-time-display {
  font-family: var(--font-mono);
  font-size: 10.5px;
  margin-left: 2px;
  border-left: 1px solid var(--border-strong);
  padding-left: 10px;
  white-space: nowrap;
  line-height: 1.5;
}
#playback-utc { color: var(--text-1); display: block; }
#playback-ist { color: var(--text-2); display: block; }

/* -- Analytics overlay ------------------------------------- */

#analytics-overlay {
  position: fixed;
  top: var(--header-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  background: var(--bg-0);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  overflow-y: auto;
}
#analytics-overlay.open { transform: translateY(0); }

.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.analytics-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.2px;
}

.analytics-subtitle {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 3px;
}

.analytics-close {
  height: 28px;
  padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--font-ui);
  transition: background 0.12s ease, border-color 0.12s ease;
}
.analytics-close:hover { background: var(--bg-3); border-color: #3e4a5f; }

/* Stat tiles */
.intelligence-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.intel-box {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.intel-lbl {
  font-size: 10px;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.intel-val {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.pulse-indicator {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pulse-indicator.status-nominal  { background: var(--ok); }
.pulse-indicator.status-elevated { background: var(--warn); animation: statusBlink 1.6s ease infinite; }
.pulse-indicator.status-critical { background: var(--danger); animation: statusBlink 0.9s ease infinite; }

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

/* Chart layout */
.analytics-layout-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.charts-column, .details-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.chart-container {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.chart-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 10px;
}

.chart-title .chart-hint {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-2);
}

.chart-canvas { flex: 1; width: 100%; min-height: 200px; }

.feed-container .feed-scroll { flex: 1; overflow-y: auto; padding: 8px 8px 8px; }

/* Conjunction feed filter/sort controls */
.feed-controls {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  align-items: center;
}
.feed-controls input[type="text"] {
  flex: 1;
  min-width: 0;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: 11px;
  padding: 5px 8px;
}
.feed-controls select {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: 11px;
  padding: 5px 6px;
}
.feed-filter-btn {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 11px;
  padding: 5px 9px;
  cursor: pointer;
}
.feed-filter-btn.active {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.5);
  color: #f87171;
}

.feed-card.clickable { cursor: pointer; }
.feed-card.clickable:hover { border-color: var(--border-strong); }

/* Chatbot suggestion chips */
.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0 6px;
}
.chat-suggestion-chip {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  color: #7dd3fc;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.3;
  padding: 5px 10px;
  text-align: left;
  transition: background 0.12s ease;
}
.chat-suggestion-chip:hover {
  background: rgba(56, 189, 248, 0.18);
}
/* Action chips (view event / locate object) — amber, distinct from questions */
.chat-action-chip {
  background: rgba(251, 191, 36, 0.08);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}
.chat-action-chip:hover {
  background: rgba(251, 191, 36, 0.18);
}

/* Conjunction scenario banner */
#conj-banner {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  left: calc(var(--sidebar-w) + (100% - var(--sidebar-w)) / 2);
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 12px;
  background: var(--bg-1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  z-index: 1100;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
  max-width: min(640px, 90vw);
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
#conj-banner.visible { display: flex; }
body.sidebar-collapsed #conj-banner { left: 50%; }

/* Shift conj-banner to the right of info-panel when info-panel is open to prevent overlap */
body:has(#info-panel.visible) #conj-banner {
  left: calc(var(--sidebar-w) + 36px + 420px + 16px);
  transform: none;
}
body.sidebar-collapsed:has(#info-panel.visible) #conj-banner {
  left: calc(var(--dock-w) + 36px + 420px + 16px);
  transform: none;
}

.conj-banner-icon { font-size: 18px; color: #f87171; flex-shrink: 0; }
.conj-banner-text { min-width: 0; }
.conj-banner-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.conj-banner-mode {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  flex-shrink: 0;
}
.conj-banner-mode.near {
  background: rgba(248, 113, 113, 0.18);
  color: #f87171;
}
.conj-banner-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conj-banner-sub {
  font-size: 10.5px;
  color: var(--text-2);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conj-banner-tca {
  text-align: right;
  border-left: 1px solid var(--border-strong);
  padding-left: 12px;
  flex-shrink: 0;
}
.conj-banner-count {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: #fbbf24;
}
.conj-banner-lbl { font-size: 9.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.4px; }
#conj-banner-jump {
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: var(--radius);
  color: #f87171;
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 600;
  padding: 6px 10px;
  flex-shrink: 0;
  white-space: nowrap;
}
#conj-banner-jump:hover { background: rgba(248, 113, 113, 0.25); }
#conj-banner-exit {
  background: none;
  border: none;
  color: var(--text-2);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 6px;
  flex-shrink: 0;
}
#conj-banner-exit:hover { color: var(--text-1); }

/* TCA tick marks on the playback timeline */
#time-slider-wrap { position: relative; display: inline-block; }
#tca-ticks {
  position: absolute;
  left: 6px; right: 6px;   /* roughly match the slider track inset */
  top: -4px;
  height: 4px;
  pointer-events: none;
}
.tca-tick {
  position: absolute;
  top: 0;
  width: 2px;
  height: 4px;
  background: #fbbf24;
  border-radius: 1px;
  pointer-events: auto;
}
.tca-tick.critical { background: #f87171; }

/* -- Token banner ------------------------------------------ */

#token-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: var(--sidebar-w);
  right: 0;
  z-index: 1500;
  background: var(--bg-1);
  border-top: 1px solid var(--border-strong);
  padding: 10px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-2);
}
#token-banner a { color: var(--accent); }
#token-banner code {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
}
#token-banner button {
  height: 26px;
  padding: 0 12px;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 11.5px;
  flex-shrink: 0;
}
#token-banner button:hover { background: var(--bg-3); }

/* -- Assistant (chat) -------------------------------------- */

#chat-fab {
  position: fixed;
  bottom: 20px;
  right: 80px;
  height: 40px;
  padding: 0 16px;
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  color: var(--text-1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  transition: background 0.12s ease, border-color 0.12s ease;
  z-index: 2000;
  user-select: none;
}
#chat-fab:hover { background: var(--bg-2); border-color: var(--accent); }

.chat-fab-pulse { display: none; }

.chat-fab-icon { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; }

.chat-fab-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1;
}

#chatbot-panel {
  position: fixed;
  bottom: 72px;
  right: 20px;
  width: 385px;
  height: 520px;
  background: rgba(10, 15, 28, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  z-index: 2000;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65), 0 0 24px rgba(56, 189, 248, 0.15);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

#chatbot-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  background: rgba(20, 30, 50, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.chat-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  background-color: var(--ok);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--ok);
  animation: chatPulse 2s infinite;
}

@keyframes chatPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.chat-header-actions { display: flex; align-items: center; gap: 4px; }

#chat-settings-toggle, #chat-close {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  transition: color 0.12s ease, background 0.12s ease;
}
#chat-settings-toggle:hover, #chat-close:hover { color: var(--text-1); background: var(--bg-2); }

/* Connection settings */
#chat-config-panel {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 11.5px;
  flex-direction: column;
  gap: 8px;
}

.cfg-field { display: flex; flex-direction: column; gap: 3px; }

.cfg-label {
  color: var(--text-2);
  font-weight: 500;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

#chat-config-panel input {
  height: 28px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-1);
  border-radius: var(--radius);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}
#chat-config-panel input:focus { border-color: var(--accent); outline: none; }

.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

#btn-save-chat-config {
  height: 28px;
  background: var(--accent);
  color: #0a0c10;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 11.5px;
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background 0.12s ease;
}
#btn-save-chat-config:hover { background: var(--accent-hover); }

#chat-messages {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 12.5px;
  line-height: 1.5;
  word-wrap: break-word;
}

.msg.system {
  background: rgba(30, 41, 59, 0.4);
  color: var(--text-2);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.msg.user {
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #080d16;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
}

.msg.assistant {
  background: rgba(30, 41, 59, 0.45);
  color: var(--text-1);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-bottom-left-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
}

/* Chat Markdown Formatting */
.msg ul {
  margin: 6px 0 6px 16px;
  padding-left: 0;
}
.msg li {
  margin-bottom: 4px;
}
.msg strong {
  color: var(--accent);
  font-weight: 600;
}
.inline-code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 4px;
  border-radius: 3px;
  color: #fb7185;
}
.code-block {
  margin: 8px 0;
  background: #090d16;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  overflow-x: auto;
}
.code-block code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #38bdf8;
  line-height: 1.4;
}
.citation-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 20px;
  margin: 2px 0;
  font-weight: 500;
  cursor: help;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.05);
}

#chat-input-area {
  padding: 12px 14px;
  border-top: 1px solid rgba(56, 189, 248, 0.18);
  background: rgba(8, 12, 22, 0.45);
  display: flex;
  gap: 8px;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

#chat-input {
  flex: 1;
  height: 36px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 18px;
  padding: 0 16px;
  color: var(--text-1);
  font-size: 12.5px;
  font-family: var(--font-ui);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.4);
  outline: none;
}

#chat-send {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #080d16;
  border: none;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.22);
  transition: all 0.2s ease;
}
#chat-send:hover {
  transform: scale(1.05);
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.4);
}
#chat-send svg { width: 14px; height: 14px; }

/* Animated Voice Equalizer Wave Indicator */
.voice-wave-anim {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 20px;
  padding: 0 6px;
}
.voice-wave-anim span {
  display: block;
  width: 3px;
  height: 100%;
  background: #38bdf8;
  border-radius: 2px;
  animation: voiceWavePulse 0.8s infinite ease-in-out alternate;
}
.voice-wave-anim span:nth-child(1) { animation-delay: 0.0s; }
.voice-wave-anim span:nth-child(2) { animation-delay: 0.2s; }
.voice-wave-anim span:nth-child(3) { animation-delay: 0.4s; }
.voice-wave-anim span:nth-child(4) { animation-delay: 0.6s; }

@keyframes voiceWavePulse {
  0% { height: 4px; background: #38bdf8; }
  100% { height: 18px; background: #ef4444; box-shadow: 0 0 8px #ef4444; }
}

#chat-mic-btn {

  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(30, 41, 59, 0.85);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  font-size: 14px;
}
#chat-mic-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  transform: scale(1.06);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
#chat-mic-btn.listening {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
  color: #ffffff !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.6) !important;
  animation: micPulse 1.2s infinite ease-in-out;
}

@keyframes micPulse {
  0% { transform: scale(1); box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
  50% { transform: scale(1.12); box-shadow: 0 0 20px rgba(239, 68, 68, 0.85); }
  100% { transform: scale(1); box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
}

/* OrbitGuard Sci-Fi Custom Result Action Cards */
.og-card-container {
  width: 100%;
  max-width: 100%;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  margin: 4px 0;
}

.og-card-inner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(11, 19, 36, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: ogCardSlideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.og-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  padding-bottom: 8px;
}

.og-card-title-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.og-badge-logo {
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.og-card-title {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.3px;
}

.og-status-pill {
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 3px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.og-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.og-card-text {
  font-size: 11.5px;
  line-height: 1.45;
  color: #cbd5e1;
  margin: 0;
}

.og-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 8px;
  border-radius: 8px;
}

.og-metric-pill {
  font-size: 10.5px;
  display: flex;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.5);
  padding: 4px 8px;
  border-radius: 4px;
}

.og-lbl {
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  font-weight: 600;
}

.og-val {
  color: #38bdf8;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}

.og-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}

.og-card-btn {
  height: 26px;
  padding: 0 10px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  border: none;
}

.og-card-btn.primary {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.og-card-btn.primary:hover {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.5);
  transform: translateY(-1px);
}

.og-card-btn.secondary {
  background: rgba(30, 41, 59, 0.8);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.og-card-btn.secondary:hover {
  background: rgba(51, 65, 85, 0.9);
  color: #f8fafc;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

/* -- Legacy classes kept for compatibility ----------------- */

.legend-toggle-divider {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-2);
  margin: 10px 0 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.legend-toggle-row { display: flex; gap: 5px; flex-wrap: wrap; }

.legend-vis-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  user-select: none;
  white-space: nowrap;
}
.legend-vis-toggle.active { background: var(--bg-2); border-color: var(--border-strong); color: var(--text-1); }

/* ── Space weather card (analytics) ──────────────────────────── */
.sw-scales { display: flex; align-items: center; gap: 6px; margin: 8px 0 2px; }
.sw-chip {
  padding: 2px 9px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: slashed-zero;
}
.sw-chip.off { background: var(--bg-3); color: var(--text-2); font-weight: 600; }
.sw-scales-max { margin-left: auto; font-size: 10px; color: var(--text-2); white-space: nowrap; }
.sw-kp { height: 108px; margin: 0; }
.sw-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; margin: 8px 0 6px;
}
.sw-stat {
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 6px 8px; min-width: 0;
}
.sw-stat .k {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-2); margin-bottom: 3px; white-space: nowrap;
}
.sw-stat .v {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  font-family: 'JetBrains Mono', monospace; white-space: nowrap;
}
.sw-stat .v .unit { font-size: 9px; color: var(--text-2); font-weight: 500; margin-left: 2px; }
.sw-stat .sub { font-size: 8.5px; color: var(--text-2); margin-top: 2px; line-height: 1.3; }
.sw-stat.warn { border-color: rgba(248, 113, 113, 0.45); }
.sw-stat.warn .v, .sw-stat.warn .sub { color: #f87171; }
.sw-alerts { margin-top: 2px; max-height: 62px; overflow-y: auto; border-top: 1px solid var(--border); }
.sw-alert-row {
  display: flex; gap: 8px; padding: 3px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  font-size: 10.5px; line-height: 1.35;
}
.sw-alert-row:last-child { border-bottom: none; }
.sw-alert-time {
  color: var(--text-2); font-family: 'JetBrains Mono', monospace;
  font-size: 9px; white-space: nowrap; padding-top: 1.5px;
}
.sw-alert-text { flex: 1; color: var(--text-1); }
.sw-empty { font-size: 10.5px; color: var(--text-2); padding: 4px 0; }

.sw-xray { height: 64px; margin: 0 0 4px; }
.hdr-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-tint); }



/* ── SSA Dock (Primary Sidebar) ────────────────────────────── */
#ssa-dock {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--dock-w);
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 12px;
  user-select: none;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.15);
}

.dock-item {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  background: transparent;
  border: none;
  outline: none !important; /* Eliminate native browser outline double border */
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-item:focus {
  outline: none !important;
}

.dock-item:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.05);
  transform: scale(1.05);
}

.dock-item.active {
  color: var(--accent);
  background: var(--accent-tint);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.35);
}

/* Glowing active tab indicator pill on the left edge */
.dock-item.active::before {
  content: '';
  position: absolute;
  left: -13px; /* Align to the left edge of the dock */
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px var(--accent), 0 0 4px var(--accent);
}

/* Logical group dividers inside the navigation dock */
.dock-divider {
  width: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

/* Tooltip styles */
.dock-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 56px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: var(--bg-1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-1);
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 11px;
  font-family: var(--font-ui);
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 10000;
}

.dock-item:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ── SSA Portal View (Separate page for upcoming modules) ───── */
#ssa-portal-view {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: var(--dock-w);
  right: 0;
  bottom: 0;
  background: #0b0f19;
  z-index: 850;
  flex-direction: column;
  padding: 32px 40px;
  overflow-y: auto;
  color: var(--text-1);
}

.portal-content {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.portal-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 20px;
}

.portal-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-bottom: 8px;
}

.portal-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.3px;
}

.portal-desc {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 6px;
  line-height: 1.5;
  max-width: 800px;
}

.portal-btn {
  background: var(--bg-2);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.portal-btn:hover {
  background: var(--bg-3);
  border-color: #3e4a5f;
}

.sw-chart-row { display: flex; gap: 10px; }
.sw-mini { flex: 1; min-width: 0; }
.sw-mini-title {
  font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-2); margin: 6px 0 0;
}
.sw-mini-chart { height: 52px; }

/* ── Space Weather Monitoring tab — styles below in premium redesign section */



/* ── SaaS-style navigation sidebar (dock v2): collapsed icon rail that
     expands on hover, overlaying content — no layout reflow ──────────── */
#ssa-dock {
  width: var(--dock-w);
  align-items: stretch;
  padding: 14px 12px;
  gap: 2px;
  overflow: hidden;
  transition: width 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
#ssa-dock:hover { width: 238px; box-shadow: 10px 0 40px rgba(0,0,0,0.45); background: rgba(10, 14, 23, 0.96); }

.dock-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 2px 14px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.dock-brand-mark {
  flex: 0 0 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #38bdf8 55%, #a855f7 130%);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.25);
}
.dock-brand-text {
  display: flex; flex-direction: column; line-height: 1.2;
  opacity: 0; transform: translateX(-6px); white-space: nowrap;
  transition: opacity 0.18s ease 0.05s, transform 0.18s ease 0.05s;
}
#ssa-dock:hover .dock-brand-text { opacity: 1; transform: translateX(0); }
.dock-brand-name { font-weight: 700; font-size: 14px; color: var(--text-1); letter-spacing: 0.01em; }
.dock-brand-sub { font-size: 9.5px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.12em; }

.dock-section-label {
  height: 22px; display: flex; align-items: center;
  padding: 0 8px; margin-top: 8px; white-space: nowrap;
}
.dock-section-label span {
  font-size: 9px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-3);
  opacity: 0; transition: opacity 0.18s ease 0.05s;
}
#ssa-dock:hover .dock-section-label span { opacity: 1; }
.dock-section-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border); margin-left: 8px;
  opacity: 1; transition: opacity 0.15s;
}
#ssa-dock:hover .dock-section-label::after { opacity: 0.5; }

#ssa-dock .dock-item {
  width: 100%; height: 36px;
  display: flex; align-items: center; justify-content: flex-start;
  gap: 11px; padding: 0 11px;
  border-radius: 8px;
  transform: none !important;   /* no scale-jump; SaaS navs don't bounce */
}
#ssa-dock .dock-item svg { flex: 0 0 18px; }
#ssa-dock .dock-item:hover { background: rgba(148, 163, 184, 0.08); }
#ssa-dock .dock-item.active {
  background: var(--accent-tint);
  color: var(--accent);
}
#ssa-dock .dock-item.active::before {
  content: ''; position: absolute; left: -12px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent);
  transform: none;
}
/* Old icon-rail tooltips are superseded by visible labels */
#ssa-dock .dock-item::after { display: none !important; }

.dock-label {
  font-size: 12px; font-weight: 500; color: inherit; white-space: nowrap;
  opacity: 0; transform: translateX(-6px);
  transition: opacity 0.18s ease 0.04s, transform 0.18s ease 0.04s;
}
#ssa-dock:hover .dock-label { opacity: 1; transform: translateX(0); }

.dock-badge {
  margin-left: auto; font-size: 8px; font-weight: 700; letter-spacing: 0.08em;
  padding: 2px 6px; border-radius: 99px; white-space: nowrap;
  opacity: 0; transition: opacity 0.18s ease 0.06s;
}
#ssa-dock:hover .dock-badge { opacity: 1; }
.dock-badge.live { background: rgba(52, 211, 153, 0.14); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.35); }
.dock-badge.soon { background: rgba(148, 163, 184, 0.10); color: var(--text-3); border: 1px solid var(--border); }

.dock-footer {
  margin-top: auto; display: flex; align-items: center; gap: 10px;
  padding: 12px 11px 2px; border-top: 1px solid var(--border);
  color: var(--text-2); font-size: 11px;
}
.dock-status-dot {
  flex: 0 0 8px; height: 8px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
}

/* ── Screening tab (asset-vs-catalog conjunction screening) ─────────── */

.screening-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.screening-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  flex: 1;
}

.screening-label select {
  background: rgba(30, 41, 59, 0.95);
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}
.screening-label select:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}

#screening-run-btn {
  white-space: nowrap;
  flex-shrink: 0;
  background: linear-gradient(135deg, #0284c7, #00e5ff);
  color: #030712;
  border: none;
  border-radius: 6px;
  padding: 7px 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#screening-run-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
  color: #000000;
}
#screening-run-btn:disabled {
  opacity: 0.55;
  cursor: wait;
  box-shadow: none;
}

#screening-status {
  font-size: 11.5px;
  margin-bottom: 10px;
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.4);
}
#screening-status.running {
  color: #00e5ff;
  font-weight: 600;
  border-left: 3px solid #00e5ff;
  background: rgba(0, 229, 255, 0.1);
  animation: screeningPulse 1.5s infinite alternate;
}
#screening-status.error {
  color: #f87171;
  border-left: 3px solid #f87171;
  background: rgba(248, 113, 113, 0.1);
}

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

.screening-empty {
  font-size: 12px;
  color: #94a3b8;
  padding: 24px 16px;
  text-align: center;
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  margin: 10px 0;
}

.screening-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  margin: 14px 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.screening-event {
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.85));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.screening-event:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.15);
  transform: translateY(-2px);
}
.screening-event.high-threat {
  border: 1px solid rgba(239, 68, 68, 0.6);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(15, 23, 42, 0.9));
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.25);
}

.screening-event-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 8px;
}

.screening-title-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.screening-event-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #f8fafc;
  text-shadow: 0 0 6px rgba(255, 255, 255, 0.2);
}

.screening-norad-id {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

.screening-badges-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.screening-tca-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.4);
  padding: 2px 8px;
  border-radius: 12px;
}

.screening-event-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.screening-metric-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
}
.screening-metric-box.critical-metric {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
}
.screening-metric-box.full-width {
  grid-column: span 2;
}

.tca-box-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.tca-box-col {
  display: flex;
  flex-direction: column;
}

.m-lbl {
  font-size: 9.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 2px;
}

.m-val {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
}
.m-val.highlight {
  color: #00e5ff;
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}
.m-val.bad-val { color: #f87171; }
.m-val.warn-val { color: #fbbf24; }
.m-val.ok-val { color: #34d399; }
.m-val.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  color: #e2e8f0;
}
.m-val.sub-text {
  font-size: 11px;
  color: #cbd5e1;
}

.screening-event-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.screening-tags-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.screening-badge {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 4px;
  padding: 3px 8px;
  border: 1px solid;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.screening-badge.ok      { color: #34d399; background: rgba(16, 185, 129, 0.15); border-color: rgba(52, 211, 153, 0.4); }
.screening-badge.warn    { color: #fbbf24; background: rgba(245, 158, 11, 0.15); border-color: rgba(251, 191, 36, 0.4); }
.screening-badge.bad     { color: #f87171; background: rgba(239, 68, 68, 0.15); border-color: rgba(248, 113, 113, 0.4); }
.screening-badge.unknown { color: #94a3b8; background: rgba(148, 163, 184, 0.15); border-color: rgba(148, 163, 184, 0.4); }
.screening-badge.docked  { color: #38bdf8; background: rgba(56, 189, 248, 0.15); border-color: rgba(56, 189, 248, 0.4); }
.screening-badge.oem     { color: #c084fc; background: rgba(168, 85, 247, 0.15); border-color: rgba(192, 132, 252, 0.4); }

.risk-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.screening-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.screening-locate {
  background: rgba(30, 41, 59, 0.8);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.screening-locate:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: #38bdf8;
}

.screening-view {
  background: linear-gradient(135deg, #0284c7, #00e5ff);
  color: #030712;
  border: none;
  border-radius: 5px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
  transition: all 0.2s;
}
.screening-view:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
  color: #000000;
}

#screening-footer {
  font-size: 10.5px;
  color: #94a3b8;
  margin-top: 12px;
  line-height: 1.6;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
  padding: 10px 12px;
}

/* ════════════════════════════════════════════════════════════
   Space Weather Dashboard — Premium Redesign
   ════════════════════════════════════════════════════════════ */

#spacewx-overlay {
  position: fixed;
  top: var(--header-h);
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  background: rgba(4,7,18,0.98);
  backdrop-filter: blur(12px);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0 0 32px;
}
#spacewx-overlay.open { transform: translateY(0); }
/* When swx is active: sidebar hidden — align overlay to dock edge */
body.swx-active #spacewx-overlay { left: var(--dock-w); }
/* Logo stays, but stats and action buttons are not relevant on the swx page */
body.swx-active #stats-row       { display: none; }
body.swx-active #header-actions  { display: none; }
/* sidebar-collapsed handled in global collapsed block (line ~554) */



/* Header */
.swx-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 28px 14px;
  border-bottom: 1px solid rgba(148,163,184,0.1);
  background: rgba(15,23,42,0.8);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
.swx-header-left { display: flex; align-items: center; gap: 14px; }
.swx-header-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  letter-spacing: 0.04em; flex-shrink: 0;
}
.swx-header-title { font-size: 17px; font-weight: 700; color: var(--text-1); letter-spacing: 0.02em; }
.swx-header-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.swx-header-right { display: flex; align-items: center; gap: 16px; }
.swx-header-scales { display: flex; gap: 8px; align-items: center; }

/* KPI ribbon */
.swx-kpi-ribbon {
  display: flex; gap: 12px; flex-wrap: wrap;
  padding: 14px 28px;
  background: rgba(15,23,42,0.5);
  border-bottom: 1px solid rgba(148,163,184,0.08);
}
.swx-kpi-ribbon .sw-stat {
  background: rgba(30,41,59,0.7);
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 10px;
  padding: 10px 16px;
  min-width: 110px;
  flex: 1;
}

/* Dashboard grid */
.swx-dashboard { padding: 20px 28px; display: flex; flex-direction: column; gap: 16px; }

.swx-row { display: grid; gap: 16px; }
.swx-row-2 { grid-template-columns: 1fr 1fr; }
.swx-row-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Cards */
.swx-card {
  background: rgba(15,23,42,0.75);
  border: 1px solid rgba(148,163,184,0.12);
  border-radius: 14px;
  padding: 16px;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.swx-card:hover { border-color: rgba(148,163,184,0.25); }
.swx-card-tall { /* extra height handled by chart */ }

.swx-card-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.swx-card-title {
  font-size: 12px; font-weight: 600;
  color: var(--text-1); letter-spacing: 0.03em;
  white-space: nowrap;
}
.swx-card-badge {
  font-size: 11px; font-weight: 700;
  background: rgba(148,163,184,0.1);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 6px;
  padding: 2px 8px;
  color: var(--text-2);
  white-space: nowrap;
}
.swx-card-badge.warn {
  background: rgba(248,113,113,0.15);
  border-color: rgba(248,113,113,0.4);
  color: #f87171;
}
.swx-card-badge.ok {
  background: rgba(52,211,153,0.12);
  border-color: rgba(52,211,153,0.3);
  color: #34d399;
}
.swx-card-hint {
  font-size: 10px; color: var(--text-3);
  margin-top: -4px;
}

/* Aurora views */
.swx-view {
  height: 200px; border-radius: 8px;
  overflow: hidden; background: #000;
  position: relative;
  flex-shrink: 0;
}
.swx-view-sm { height: 140px; }
.swx-view .cesium-viewer-bottom,
.swx-view .cesium-viewer-toolbar { display: none !important; }
.swx-caption {
  font-size: 9.5px; color: var(--text-3);
  display: flex; justify-content: space-between;
}

/* Alerts scroll */
.swx-alerts-scroll {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.swx-alert-row {
  display: flex; flex-direction: column; gap: 2px;
  background: rgba(30,41,59,0.6);
  border-left: 3px solid rgba(251,191,36,0.6);
  border-radius: 0 6px 6px 0;
  padding: 7px 10px;
}
.swx-alert-row.watch { border-left-color: rgba(96,165,250,0.6); }
.swx-alert-row.warning { border-left-color: rgba(248,113,113,0.7); }
.swx-alert-time { font-size: 9.5px; color: var(--text-3); font-family: 'JetBrains Mono', monospace; }
.swx-alert-text { font-size: 11px; color: var(--text-2); line-height: 1.4; }
.sw-empty { color: var(--text-3); font-size: 11px; padding: 12px 0; }

/* Summary grid */
.swx-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}
.swx-summary-grid .sw-stat {
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(148,163,184,0.1);
  border-radius: 8px;
  padding: 9px 12px;
}

/* chip colors for scales */
.sw-chip {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700;
  border-radius: 5px; padding: 2px 7px;
  background: rgba(248,113,113,0.2);
  border: 1px solid rgba(248,113,113,0.4);
  color: #fca5a5;
  margin: 1px;
}
.sw-chip.off {
  background: rgba(148,163,184,0.08);
  border-color: rgba(148,163,184,0.15);
  color: var(--text-3);
}

/* Preserve sw-stat style from analytics panel */
.sw-stat { cursor: default; }
.sw-stat .k { font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 2px; }
.sw-stat .v { font-size: 18px; font-weight: 700; color: var(--text-1); line-height: 1.1; }
.sw-stat .v .unit { font-size: 11px; color: var(--text-3); font-weight: 400; margin-left: 2px; }
.sw-stat .sub { font-size: 9.5px; color: var(--text-3); margin-top: 2px; }
.sw-stat.warn .v { color: #f87171; }

/* Responsive */
@media (max-width: 1100px) {
  .swx-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 750px) {
  .swx-row-2, .swx-row-3 { grid-template-columns: 1fr; }
  .swx-dashboard { padding: 14px; }
  .swx-header { padding: 14px; }
}

/* CDM Transformer Sequence Timeline Styles */
.transformer-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  padding-left: 2px;
  margin-top: 5px;
}
.transformer-step {
  display: flex;
  background: rgba(148, 163, 184, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.08);
  border-radius: 6px;
  padding: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  align-items: center;
  transition: border-color 0.2s, background-color 0.2s;
}
.transformer-step:hover {
  background: rgba(148, 163, 184, 0.06);
  border-color: rgba(148, 163, 184, 0.15);
}
.transformer-step.active-step {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.15);
}
.transformer-step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 10px;
  min-width: 45px;
}
.transformer-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-bottom: 4px;
}
.transformer-step-dot.ok {
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}
.transformer-step-dot.warn {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}
.transformer-step-dot.bad {
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
}
.transformer-step-time {
  font-size: 9px;
  color: var(--text-3);
  text-transform: uppercase;
}
.transformer-step-body {
  flex-grow: 1;
}
.transformer-step-details {
  display: flex;
  justify-content: space-between;
  color: var(--text-2);
  font-size: 10px;
}

/* View selector dropdown */
.view-trigger { position: relative; display: flex; align-items: center; }
.view-trigger-btn {
  height: 26px;
  padding: 0 11px;
  background: rgba(30,41,59,0.8);
  border: 1px solid rgba(71,85,105,0.6);
  color: var(--text-2);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.view-trigger-btn:hover {
  background: rgba(51,65,85,0.9);
  border-color: rgba(100,116,139,0.8);
  color: var(--text-1);
}
.view-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 5px;
  background: rgba(11,15,25,0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(62,74,95,0.8);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.6), 0 8px 10px -6px rgba(0,0,0,0.6);
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
  z-index: 10000;
}
.view-dropdown::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: transparent;
}
.view-trigger:hover .view-dropdown,
.view-dropdown.active {
  display: flex !important;
}
.view-item-btn {
  background: transparent;
  border: none;
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: 11px;
  padding: 6px 10px;
  text-align: left;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.view-item-btn:hover {
  background: rgba(168,85,247,0.15);
  color: #c084fc;
}
.view-item-btn.active {
  background: rgba(168,85,247,0.25);
  color: #c084fc;
  font-weight: 600;
}

/* Responsive adjustments for header layout on laptops/smaller screens */
@media (max-width: 1550px) {
  .stat-box {
    padding: 0 8px;
  }
  .stat-val {
    font-size: 12.5px;
  }
  .stat-lbl {
    font-size: 8.5px;
  }
  #header-actions {
    gap: 4px;
  }
  .hdr-btn, .view-trigger-btn, .legend-trigger-btn {
    padding: 0 8px;
    font-size: 11px;
  }
  #vis-controls-header .vis-toggle {
    padding: 0 7px;
    font-size: 11px;
  }
}

@media (max-width: 1380px) {
  #logo img {
    max-width: 110px;
    height: 26px;
  }
  #stat-ist {
    display: none !important;
  }
  #stat-utc .stat-lbl {
    display: none;
  }
  #stat-utc .stat-val::before {
    content: "UTC ";
    font-size: 9px;
    color: var(--text-2);
    font-weight: normal;
  }
  .stat-box {
    padding: 0 6px;
  }
  #vis-controls-header .vis-tog-text {
    display: none !important;
  }
  #vis-controls-header .vis-toggle {
    padding: 0 8px;
    height: 26px;
    justify-content: center;
  }
}

@media (max-width: 1180px) {
  #sw-header-chip {
    display: none !important;
  }
  #stat-region {
    display: none !important;
  }
  .stat-lbl {
    display: none;
  }
  .stat-box {
    border-left: none;
    padding: 0 4px;
  }
  .stat-val {
    font-size: 11.5px;
  }
}

@media (max-width: 960px) {
  #stats-row {
    display: none !important;
  }
  #header {
    padding: 0 8px;
  }
}

@media (max-width: 640px) {
  #vis-controls-header {
    padding-right: 4px;
    margin-right: 2px;
    gap: 3px;
  }
  .hdr-btn, .view-trigger-btn, .legend-trigger-btn {
    padding: 0 6px;
    font-size: 10.5px;
  }
}

/* ── HUD Ground Altitude Slider Overlay (Bottom-Left Corner) ────────────────── */
.hud-altitude-container {
  position: fixed;
  bottom: 24px;
  left: 355px;
  background: rgba(15, 7, 32, 0.90);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(192, 132, 252, 0.45);
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(192, 132, 252, 0.2);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  z-index: 9999;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  width: 240px;
}

body.sidebar-collapsed .hud-altitude-container {
  left: 55px;
}

.hud-altitude-container.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.hud-altitude-header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 11px;
  font-weight: 600;
  color: #c084fc;
  text-shadow: 0 0 6px rgba(192, 132, 252, 0.5);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hud-altitude-slider {
  width: 100%;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.15);
  height: 6px;
  border-radius: 3px;
  outline: none;
  margin-top: 4px;
}

.hud-altitude-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c084fc;
  box-shadow: 0 0 10px #c084fc;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.hud-altitude-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* -- Splash Screen Intro ------------------------------------ */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #05070f;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: opacity 1.6s cubic-bezier(0.77, 0, 0.175, 1), visibility 1.6s;
}

#splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-logo-container {
  position: relative;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.splash-ring-svg {
  width: 180px;
  height: 180px;
  position: absolute;
  animation: splashRotate 4.0s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.splash-ring {
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  animation: drawRing 3.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.splash-satellite {
  transform-origin: 50px 50px;
  animation: satOrbit 3.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.splash-logo-wrapper {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  transform: scale(0.85);
  filter: blur(8px);
  animation: logoReveal 4.2s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
  z-index: 10;
  padding: 10px 20px;
  border-radius: 8px;
}

.splash-logo-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.2), rgba(255, 255, 255, 0.65), rgba(56, 189, 248, 0.2), transparent);
  transform: skewX(-20deg);
  animation: flareSweep 2.8s cubic-bezier(0.4, 0, 0.2, 1) 2.2s forwards;
}

@keyframes flareSweep {
  0% { left: -150%; }
  100% { left: 150%; }
}

.splash-logo-img {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.5));
}

.splash-subtitle {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 10px;
  color: #38bdf8;
  letter-spacing: 4px;
  margin-top: 24px;
  opacity: 0;
  animation: subtitleReveal 2.0s ease-out 2.4s forwards;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

@keyframes splashRotate {
  0% { transform: rotate(-45deg) scale(0.8); }
  100% { transform: rotate(315deg) scale(1); }
}

@keyframes drawRing {
  0% { stroke-dashoffset: 283; }
  100% { stroke-dashoffset: 0; }
}

@keyframes satOrbit {
  0% { transform: rotate(0deg); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: rotate(360deg); }
}

@keyframes logoReveal {
  0% { opacity: 0; transform: scale(0.94); filter: blur(6px); letter-spacing: 2px; }
  100% { opacity: 1; transform: scale(1); filter: blur(0); letter-spacing: 12px; }
}

@keyframes subtitleReveal {
  0% { opacity: 0; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Twinkling Stars Particle Layer */
.splash-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.85);
  opacity: 0;
  animation: starTwinkle 3.5s infinite ease-in-out;
  pointer-events: none;
  z-index: 1;
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50% { opacity: 0.95; transform: scale(1.3); }
}

/* Space Nebula Glow */
.splash-nebula {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, rgba(168, 85, 247, 0.06) 45%, transparent 70%);
  filter: blur(45px);
  animation: nebulaPulse 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes nebulaPulse {
  0% { transform: scale(0.9) rotate(0deg); opacity: 0.7; }
  100% { transform: scale(1.15) rotate(45deg); opacity: 1; }
}

/* Premium Conjunction Telemetry Card */
.feed-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.feed-card-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.feed-obj-primary {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-card.critical .feed-obj-primary { color: var(--danger); }
.feed-card.elevated .feed-obj-primary { color: var(--warn); }

.feed-obj-vs {
  font-size: 8px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: 0.8px;
  margin: 2px 0;
  text-transform: uppercase;
}

.feed-obj-secondary {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Telemetry list rows instead of a block box grid */
.feed-telemetry-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
  border-top: 1px dashed rgba(56, 189, 248, 0.12);
  padding-top: 8px;
}

.feed-telemetry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.feed-telemetry-row .lbl {
  color: var(--text-3);
  font-weight: 500;
}

.feed-telemetry-row .val {
  color: var(--text-1);
  font-weight: 600;
}

.feed-telemetry-row .val.critical { color: var(--danger); text-shadow: 0 0 8px rgba(239, 68, 68, 0.2); }
.feed-telemetry-row .val.elevated { color: var(--warn); text-shadow: 0 0 8px rgba(245, 158, 11, 0.2); }

/* Sleek tactical actions row */
.feed-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.feed-action-btn {
  flex: 1;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 41, 59, 0.3);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 4px;
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.feed-action-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
  transform: translateY(-0.5px);
}

/* Minimalist Terminal Conjunction Readout Feed */
.feed-list, .feed-scroll {
  padding-left: 10px !important;
}

.feed-list::before, .feed-scroll::before {
  display: none !important;
}

.terminal-log-line {
  padding: 8px 10px;
  margin-bottom: 8px;
  background: rgba(8, 12, 21, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  font-family: var(--font-mono), monospace;
  font-size: 11.5px;
  line-height: 1.5;
  transition: all 0.15s ease;
}

.terminal-log-line:hover {
  background: rgba(14, 22, 38, 0.7);
  border-color: rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.08);
}

.log-row-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-time {
  color: var(--text-3);
  font-weight: 500;
}

.log-badge {
  font-weight: 700;
}

.log-badge.critical {
  color: var(--danger);
  text-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

.log-badge.elevated {
  color: var(--warn);
  text-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.log-objects {
  color: var(--text-1);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-row-secondary {
  color: var(--text-2);
  padding-left: 6px;
  margin-top: 2px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.log-row-secondary strong {
  color: var(--text-1);
}

.log-row-secondary strong.critical {
  color: var(--danger);
}

.log-row-secondary strong.elevated {
  color: var(--warn);
}

.log-actions {
  display: inline-flex;
  gap: 6px;
  margin-left: 10px;
}

.log-action-link {
  color: var(--text-3);
  cursor: pointer;
  font-weight: 700;
  transition: color 0.15s ease, text-shadow 0.15s ease;
}

.log-action-link:hover {
  color: var(--accent);
  text-shadow: 0 0 6px var(--accent);
}

/* ════════════════════════════════════════════════════════════
   ORBITGUARD AI VOICE COPILOT STYLES
   ════════════════════════════════════════════════════════════ */
.voice-btn {
  background: linear-gradient(135deg, #0284c7, #6366f1);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.voice-btn:hover {
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
  border-color: #38bdf8;
}

.voice-btn.listening {
  background: linear-gradient(135deg, #e11d48, #f43f5e);
  border-color: #fda4af;
  box-shadow: 0 0 16px rgba(225, 29, 72, 0.8);
  animation: voicePulse 1.4s ease infinite;
}

@keyframes voicePulse {
  0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(225, 29, 72, 0); }
  100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

.voice-pulse-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
}

.voice-btn.listening .voice-pulse-dot {
  background: #ffffff;
  animation: blink 0.8s ease infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Voice Copilot HUD Toast Banner */
.voice-hud-toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  min-width: 380px;
  max-width: 520px;
}

.hud-mic-wave {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
}

.hud-mic-wave span {
  width: 3px;
  height: 100%;
  background: #38bdf8;
  border-radius: 3px;
  animation: wave 1.2s ease-in-out infinite;
}

.hud-mic-wave span:nth-child(1) { animation-delay: 0.0s; height: 12px; }
.hud-mic-wave span:nth-child(2) { animation-delay: 0.2s; height: 22px; }
.hud-mic-wave span:nth-child(3) { animation-delay: 0.4s; height: 16px; }
.hud-mic-wave span:nth-child(4) { animation-delay: 0.6s; height: 24px; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1.0); }
}

.hud-content {
  display: flex;
  flex-direction: column;
}

.hud-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #38bdf8;
  margin-bottom: 2px;
}

.hud-speech-transcript {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  font-family: 'JetBrains Mono', monospace;
}

/* ════════════════════════════════════════════════════════════
   SATELLITE CATALOG & OBJECT METADATA EXPLORER PAGE
   ════════════════════════════════════════════════════════════ */
#catalog-explorer-overlay {
  position: fixed;
  top: 54px;
  left: 64px;
  right: 0;
  bottom: 0;
  z-index: 990;
  background: #080c14;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  gap: 12px;
  box-sizing: border-box;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cat-explorer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 10px 16px;
  border-radius: 10px;
  backdrop-filter: blur(12px);
}

.cat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-header-icon {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 6px 10px;
  border-radius: 6px;
}

.cat-header-title {
  font-size: 16px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cat-header-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
}

.cat-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cat-btn:hover {
  background: rgba(14, 165, 233, 0.3);
  border-color: #38bdf8;
  color: #ffffff;
}

.cat-btn.secondary {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

.cat-btn.secondary:hover {
  background: rgba(51, 65, 85, 0.8);
  border-color: #94a3b8;
}

/* KPI Ribbon */
.cat-kpi-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.cat-kpi-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
}

.cat-kpi-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #64748b;
  text-transform: uppercase;
}

.cat-kpi-value {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

.cat-kpi-value.active { color: #10b981; }
.cat-kpi-value.debris { color: #f59e0b; }

/* Controls Bar */
.cat-controls-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.18);
  padding: 12px 14px;
  border-radius: 10px;
}

.cat-search-row {
  width: 100%;
}

.cat-search-row input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #f8fafc;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  outline: none;
}

.cat-search-row input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.cat-filter-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.cat-select {
  width: 100%;
  box-sizing: border-box;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11.5px;
  outline: none;
  cursor: pointer;
}

.cat-select:focus {
  border-color: #38bdf8;
}

/* Data Grid Table */
.cat-table-wrapper {
  flex: 1;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.4);
}

.cat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.cat-table th {
  position: sticky;
  top: 0;
  background: #0f172a;
  color: #38bdf8;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  border-bottom: 2px solid rgba(56, 189, 248, 0.3);
  z-index: 2;
}

.cat-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.cat-table-row:hover {
  background: rgba(56, 189, 248, 0.08);
}

.norad-badge {
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
  cursor: pointer;
  text-decoration: underline;
}

.sat-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sat-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.sat-status-dot.active { background: #10b981; box-shadow: 0 0 6px #10b981; }
.sat-status-dot.decayed { background: #ef4444; }

.country-pill {
  font-size: 10px;
  font-weight: 700;
  background: rgba(51, 65, 85, 0.7);
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
}

.orbit-pill {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
}

.orbit-pill.leo { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.orbit-pill.meo { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.orbit-pill.geo { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.orbit-pill.heo { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.rcs-tag {
  font-size: 10px;
  font-weight: 700;
}
.rcs-tag.large { color: #f87171; }
.rcs-tag.medium { color: #fbbf24; }
.rcs-tag.small { color: #34d399; }

.cat-action-btns {
  display: flex;
  gap: 6px;
}

.cat-btn-sm {
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  cursor: pointer;
}

.cat-btn-sm:hover {
  background: rgba(14, 165, 233, 0.35);
  color: #ffffff;
}

.cat-btn-sm.secondary {
  background: rgba(51, 65, 85, 0.5);
  border-color: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

/* Footer & Pagination */
.cat-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.7);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 11.5px;
  color: #94a3b8;
}

.cat-pagination-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-footer-pagesize-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  margin-right: 6px;
}

.cat-page-btn {
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.cat-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Universal Modal Overlay System */
/* Globe-side exploration panels share the existing viewer and simulation. */
body.orbital-lab-open #sidebar { display: none !important; }

/* Prevent info-panel overlap when orbital lab is open */
body.orbital-lab-open #info-panel,
body.orbital-lab-open.sidebar-collapsed #info-panel {
  left: calc(76px + 350px + 16px) !important;
  max-width: calc(100vw - 442px - 24px);
  z-index: 1450 !important;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Coordinate HUD controls when orbital lab is active */
body.orbital-lab-open #time-controller {
  left: calc(426px + (100vw - 426px) / 2);
  transform: translateX(-50%);
}
body.orbital-lab-open:has(#info-panel.visible) #time-controller {
  left: calc(862px + (100vw - 862px) / 2);
  transform: translateX(-50%);
}

/* Suppress all hanging popups, banners, captions, and HUD widgets when orbital lab is active */
body.orbital-lab-open #conj-banner,
body.orbital-lab-open #shadow-hud,
body.orbital-lab-open #screening-panel,
body.orbital-lab-open .corner-hud-widget,
body.orbital-lab-open .ol-globe-caption,
body.orbital-lab-open #ol-globe-caption {
  display: none !important;
}

/* Offset globe caption when info-panel is active inside orbital lab */
body.orbital-lab-open:has(#info-panel.visible) .ol-globe-caption {
  left: calc(442px + 420px + 20px);
  bottom: 84px;
  max-width: calc(100vw - 882px - 24px);
}

@media (max-width: 1150px) {
  body.orbital-lab-open #info-panel,
  body.orbital-lab-open.sidebar-collapsed #info-panel {
    left: auto !important;
    right: 16px !important;
    width: min(400px, calc(100vw - 442px));
    max-width: calc(100vw - 442px);
  }
  body.orbital-lab-open:has(#info-panel.visible) .ol-globe-caption {
    left: 442px;
    bottom: 104px;
    max-width: calc(100vw - 442px - 416px);
  }
  body.orbital-lab-open:has(#info-panel.visible) #time-controller {
    left: calc(426px + (100vw - 426px - 400px) / 2);
    transform: translateX(-50%);
  }
}

@media (max-width: 800px) {
  body.orbital-lab-open #info-panel,
  body.orbital-lab-open.sidebar-collapsed #info-panel {
    left: 60px !important;
    right: 12px !important;
    width: auto !important;
    max-width: none !important;
    z-index: 1500 !important;
  }
}

.ol-panel { display: none; position: fixed; z-index: 1400; left: 76px; top: 76px; bottom: 76px; width: 440px; max-width: calc(100vw - 94px); color: var(--text-1, #e2e8f0); background: rgba(8, 16, 30, .95); border: 1px solid rgba(99, 151, 191, .28); border-radius: 16px; box-shadow: 0 20px 70px rgba(0,0,0,.5); backdrop-filter: blur(20px); overflow: hidden; }
.ol-panel.active { display: flex; flex-direction: column; animation: modalFadeIn .2s ease-out; }
.ol-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 14px; background: linear-gradient(115deg, rgba(56,189,248,.1), transparent 75%); }
.ol-header h2 { font-size: 19px; font-weight: 650; margin: 4px 0 0; letter-spacing: -.4px; }
.ol-eyebrow { color: #79a9c7; font-size: 9px; font-weight: 700; letter-spacing: 2px; }
.ol-header-actions { display: flex; align-items: center; gap: 8px; }
.ol-icon-btn { border: 1px solid transparent; background: rgba(255, 255, 255, 0.05); color: #9cb0c7; font-size: 22px; line-height: 1; cursor: pointer; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; transition: all 0.15s ease; }
.ol-icon-btn:hover { background: rgba(239, 68, 68, 0.2); color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); }
.ol-tabs { display: flex; gap: 5px; margin: 0 16px 12px; padding: 4px; background: #07101d; border: 1px solid #233246; border-radius: 10px; }
.ol-tabs button { flex: 1; border: 0; border-radius: 7px; padding: 9px 5px; cursor: pointer; color: #8da0b7; background: transparent; font: inherit; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.ol-tabs button.active { background: #142c3d; color: #91dcff; box-shadow: inset 0 0 0 1px #244e67; }
.ol-scroll { overflow: auto; padding: 0 20px 20px; scrollbar-width: thin; scrollbar-color: #324960 transparent; }
.ol-panel [hidden] { display: none !important; }
.ol-intro { font-size: 12px; color: #a1b2c8; line-height: 1.65; margin: 4px 0 16px; }
.ol-snapshot { display: flex; align-items: center; gap: 7px; padding: 9px 0; border-top: 1px solid #233046; border-bottom: 1px solid #233046; font-family: var(--font-mono, monospace); font-size: 9px; color: #94a8c0; }
.ol-snapshot .ol-link { margin-left: auto; }
.ol-pulse { width: 5px; height: 5px; border-radius: 50%; background: #38bdf8; box-shadow: 0 0 10px #38bdf8; flex-shrink: 0; }
.ol-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 18px 0; }
.ol-metrics strong { display: block; color: #d4f2ff; font-size: 23px; line-height: 1.2; font-weight: 500; font-family: var(--font-mono, monospace); }
.ol-metrics span { display: block; color: #7e97b3; font-size: 9px; margin-top: 5px; line-height: 1.5; }
.ol-section-heading { display: flex; justify-content: space-between; align-items: center; margin: 15px 0 9px; gap: 8px; }
.ol-section-heading h3 { font-size: 12px; font-weight: 600; margin: 0; }
.ol-section-heading span { color: #718aa7; font-size: 9px; }
.ol-panel svg { display: block; width: 100%; background: linear-gradient(180deg,#0b1627,#08111f); border: 1px solid #223149; border-radius: 9px; cursor: crosshair; }
.ol-axis { position: relative; height: 16px; margin: 4px 0 12px; color: #6f89a6; font: 8px var(--font-mono,monospace); }
.ol-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.ol-axis span:first-child { transform: none; }.ol-axis span:last-child { transform: translateX(-100%); }
.ol-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.ol-presets button { border: 1px solid #2a3c54; background: #0e1d30; color: #9eb4ce; border-radius: 20px; padding: 6px 9px; font-size: 9px; cursor: pointer; }
.ol-presets button:hover { border-color: #38bdf8; color: #bcEaff; }
.ol-panel input, .ol-panel select { box-sizing: border-box; background: #0c192b; color: #d8e8f7; border: 1px solid #2c4059; border-radius: 7px; font: 11px var(--font-mono,monospace); padding: 9px; max-width: 100%; }
.ol-panel input[type=range] { width: 100%; accent-color: #38bdf8; height: 18px; padding: 0; border: 0; margin: 8px 0 12px; cursor: pointer; }
.ol-panel input[type=checkbox] { accent-color: #38bdf8; margin: 0; padding: 0; }
.ol-range-label { font-size: 10px; color: #829ab5; }
.ol-field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ol-field-pair label { display: block; color: #829ab5; font-size: 10px; }
.ol-field-pair input { display: block; width: 100%; margin: 6px 0 3px; }
.ol-field-pair span { display: block; text-align: right; font-size: 9px; color: #647d9a; }
.ol-display-options { margin: 16px 0; padding: 10px 12px; border: 1px solid #263750; border-radius: 9px; }
.ol-display-options legend { font-size: 10px; color: #8aa4c1; padding: 0 5px; }
.ol-display-options label { display: flex; align-items: center; gap: 8px; margin: 7px 0; font-size: 11px; color: #b3c4d8; }
.ol-color-key { display: flex; gap: 10px; align-items: center; color: #829ab5; font-size: 9px; }
.ol-color-key i { flex: 1; height: 4px; border-radius: 4px; background: linear-gradient(90deg,#38bdf8,#2dd4bf,#fbbf24,#fb7185); }
.ol-status { font-size: 11px; color: #98b8d7; line-height: 1.65; overflow-wrap: anywhere; }
.ol-footnote { color: #7189a5; font-size: 10px; line-height: 1.7; margin: 12px 0 0; }
.ol-primary { background: linear-gradient(120deg,#16405b,#103249); border: 1px solid #286383; color: #b6e8ff; border-radius: 7px; padding: 9px 12px; cursor: pointer; font-size: 11px; }
.ol-primary:hover { border-color: #65cfff; }.ol-wide { width: 100%; margin-top: 14px; }
.ol-link { color: #69c7f3; background: transparent; border: 0; font-size: 10px; padding: 2px; cursor: pointer; }
.ol-target-form label { display: block; font-size: 10px; color: #90a8c2; margin-bottom: 7px; }
.ol-target-form>div { display: flex; gap: 8px; }.ol-target-form input { min-width: 0; flex: 1; }
.ol-history-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin: 14px 0; }
.ol-history-toolbar label { font-size: 10px; color: #809ab7; }.ol-history-toolbar select { display: block; margin-top: 6px; padding: 7px; }
.ol-target-card { padding: 14px; border: 1px solid #2b3b55; border-radius: 10px; background: linear-gradient(120deg,#111e34,#0b1527); }
.ol-target-card h3 { margin: 7px 0; font-size: 15px; overflow-wrap: anywhere; }.ol-target-card p { margin: 0; color: #889ebb; font-size: 10px; line-height: 1.5; }
.ol-timeline-ends { display: flex; justify-content: space-between; color: #6f8baa; font: 9px var(--font-mono,monospace); }
.ol-selected-update, .ol-history-reference { display: flex; flex-direction: column; gap: 5px; padding: 12px; border: 1px solid #34435a; border-radius: 9px; margin-top: 13px; font: 10px var(--font-mono,monospace); color: #a2b5cc; }
.ol-selected-update { background: rgba(251,191,36,.035); border-color: rgba(251,191,36,.22); }.ol-history-reference { background: rgba(56,189,248,.035); border-color: rgba(56,189,248,.2); }
.ol-selected-update strong, .ol-history-reference strong { font-size: 10px; font-weight: 500; }.ol-selected-update span:last-child { color: #7189a5; overflow-wrap: anywhere; }
.ol-amber { color: #fbbf24; }.ol-cyan { color: #38bdf8; }
.ol-history-metrics { gap: 6px; }.ol-history-metrics strong { font-size: 15px; }.ol-history-metrics span { font-size: 8px; }
.ol-scale-label { font-size: 10px; color: #829ab5; }.ol-scale-label select { display: block; width: 100%; margin-top: 7px; }
.ol-note { margin: 0 16px 12px; padding: 9px; color: #fbbf24; background: rgba(251,191,36,.07); border: 1px solid rgba(251,191,36,.2); border-radius: 7px; font-size: 10px; line-height: 1.5; }
.ol-globe-caption { position: fixed; z-index: 1200; left: 455px; bottom: 104px; display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 10px 16px; border-left: 3px solid #38bdf8; background: rgba(5, 12, 23, 0.88); border-radius: 0 10px 10px 0; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); backdrop-filter: blur(10px); pointer-events: auto !important; max-width: calc(100vw - 480px); transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), bottom 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.ol-globe-caption[hidden] { display: none !important; }
.ol-caption-text { display: flex; flex-direction: column; gap: 3px; }
.ol-caption-text strong { color: #bae7ff; font: 11px var(--font-mono,monospace); letter-spacing: 1px; }
.ol-caption-text span { font-size: 10px; color: #839db7; }
.ol-caption-close { pointer-events: auto; align-self: center; background: rgba(239, 68, 68, 0.18); border: 1px solid rgba(239, 68, 68, 0.45); color: #fca5a5; border-radius: 6px; padding: 5px 12px; font-size: 11px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; transition: all 0.15s ease; }
.ol-caption-close:hover { background: rgba(239, 68, 68, 0.4); border-color: #ef4444; color: #ffffff; transform: translateY(-1px); }
.ol-exit-btn { background: rgba(239, 68, 68, 0.14); border: 1px solid rgba(239, 68, 68, 0.38); color: #fca5a5; border-radius: 8px; padding: 10px 14px; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s ease; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; }
.ol-exit-btn:hover { background: rgba(239, 68, 68, 0.28); border-color: #ef4444; color: #ffffff; }

/* Deep Analytics inside Orbital Traffic */
.ol-analytics-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ol-ana-band-badge { background: rgba(56, 189, 248, 0.12); border: 1px solid rgba(56, 189, 248, 0.35); color: #38bdf8; border-radius: 20px; padding: 3px 9px; font: 10px var(--font-mono, monospace); font-weight: 600; }
.ol-ana-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; padding: 0 !important; }
.ol-metric-card { background: rgba(14, 26, 45, 0.85); border: 1px solid #1e334f; border-radius: 8px; padding: 10px 12px; }
.ol-metric-hdr { display: flex; justify-content: space-between; align-items: center; color: #7995b5; font-size: 10px; margin-bottom: 4px; }
.ol-metric-card strong { display: block; font-size: 18px; font-family: var(--font-mono, monospace); color: #e0f2fe; }
.ol-metric-sub { font-size: 9px; color: #647d9a; display: block; margin-top: 2px; }
.ol-mini-bar { height: 3px; background: #132238; border-radius: 2px; margin-top: 6px; overflow: hidden; }
.ol-mini-bar i { display: block; height: 100%; background: #38bdf8; border-radius: 2px; transition: width 0.3s ease; }
.ol-comp-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: #0c182b; border: 1px solid #1c324f; margin: 8px 0; }
.ol-comp-seg { height: 100%; transition: width 0.3s ease; }
.ol-comp-seg.pay { background: #38bdf8; }
.ol-comp-seg.deb { background: #fbbf24; }
.ol-comp-seg.rb  { background: #c084fc; }
.ol-comp-seg.unk { background: #64748b; }
.ol-comp-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 10px; color: #94a8c0; margin: 6px 0 12px; }
.ol-comp-item { display: flex; align-items: center; gap: 5px; }
.ol-comp-item strong { color: #e2e8f0; font-family: var(--font-mono, monospace); }
.ol-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.ol-dot.cyan { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }
.ol-dot.amber { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.ol-dot.violet { background: #c084fc; box-shadow: 0 0 6px #c084fc; }
.ol-dot.mint { background: #34d399; box-shadow: 0 0 6px #34d399; }
.ol-dot.gray { background: #64748b; }
.ol-dot.sun { background: #fde047; box-shadow: 0 0 6px rgba(253, 224, 71, 0.6); }
.ol-dot.pen { background: #fbbf24; box-shadow: 0 0 6px rgba(251, 191, 36, 0.6); }
.ol-dot.umb { background: #60a5fa; box-shadow: 0 0 6px rgba(96, 165, 250, 0.6); }

/* Solar Illumination (Umbra & Penumbra) */
.ol-illum-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}
.ol-illum-card {
  background: rgba(14, 26, 45, 0.85);
  border: 1px solid #1e334f;
  border-radius: 8px;
  padding: 8px 10px;
  box-sizing: border-box;
  overflow: hidden;
}
.ol-illum-card strong {
  display: block;
  font-size: 15px;
  font-family: var(--font-mono, monospace);
  color: #e0f2fe;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ol-illum-card .ol-metric-sub {
  font-size: 8.5px;
  color: #647d9a;
  display: block;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ol-illum-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #0c182b;
  border: 1px solid #1c324f;
  margin: 6px 0;
}
.ol-illum-seg {
  height: 100%;
  transition: width 0.3s ease;
}
.ol-illum-seg.sun { background: #fde047; }
.ol-illum-seg.pen { background: #fbbf24; }
.ol-illum-seg.umb { background: #60a5fa; }
.ol-illum-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  font-size: 9.5px;
  color: #94a8c0;
  margin: 4px 0 12px;
}
.ol-illum-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ol-illum-item strong {
  color: #e2e8f0;
  font-family: var(--font-mono, monospace);
}

.ol-badge-illum {
  display: inline-block;
  padding: 1px 4px;
  font-size: 8px;
  font-weight: 700;
  border-radius: 3px;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.ol-badge-illum.sun { background: rgba(253, 224, 71, 0.15); color: #fde047; border: 1px solid rgba(253, 224, 71, 0.3); }
.ol-badge-illum.pen { background: rgba(251, 191, 36, 0.15); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
.ol-badge-illum.umb { background: rgba(96, 165, 250, 0.15); color: #93c5fd; border: 1px solid rgba(96, 165, 250, 0.3); }

.ol-insights-box { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 14px; }
.ol-insight-card { padding: 10px 12px; background: rgba(14, 25, 43, 0.7); border: 1px solid #1e334f; border-radius: 8px; }
.ol-insight-lbl { font-size: 8px; font-weight: 700; letter-spacing: 1px; color: #7995b5; display: block; margin-bottom: 4px; font-family: var(--font-mono, monospace); }
.ol-insight-card p { margin: 0; font-size: 10.5px; line-height: 1.55; color: #cad8e8; }
.ol-inventory-tools { display: flex; gap: 6px; margin-bottom: 8px; }
.ol-inventory-tools input { flex: 1; min-width: 0; }
.ol-inventory-tools select { flex-shrink: 0; padding: 6px 4px; font-size: 9.5px; }
#ol-inv-illum { width: 84px; }
#ol-inv-sort { width: 92px; }
.ol-inv-table-wrap {
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid #1e334f;
  border-radius: 8px;
  background: #07101e;
  scrollbar-width: thin;
}
.ol-inv-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 10px;
  text-align: left;
}
.ol-inv-table th {
  position: sticky;
  top: 0;
  background: #0c1a2d;
  padding: 7px 4px;
  font-size: 8.5px;
  font-weight: 600;
  color: #829ab5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #1e334f;
  box-shadow: 0 1px 0 #1e334f;
  z-index: 10;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.ol-inv-table td {
  padding: 6px 4px;
  border-bottom: 1px solid rgba(30, 51, 79, 0.4);
  color: #cbd5e1;
  font-family: var(--font-mono, monospace);
  font-size: 9.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.ol-inv-table tr:hover { background: rgba(56, 189, 248, 0.08); }
.ol-inv-table .ol-col-obj, .ol-inv-table .ol-cell-obj { width: 28%; text-align: left; }
.ol-inv-table .ol-col-norad, .ol-inv-table .ol-cell-norad { width: 15%; text-align: left; }
.ol-inv-table .ol-col-cls, .ol-inv-table .ol-cell-cls { width: 11%; text-align: center; }
.ol-inv-table .ol-col-illum, .ol-inv-table .ol-cell-illum { width: 14%; text-align: center; }
.ol-inv-table .ol-col-alt, .ol-inv-table .ol-cell-alt { width: 12%; text-align: right; }
.ol-inv-table .ol-col-inc, .ol-inv-table .ol-cell-inc { width: 9%; text-align: right; }
.ol-inv-table .ol-col-act, .ol-inv-table .ol-cell-act { width: 11%; text-align: center; }
.ol-table-fly-btn {
  padding: 2px 4px;
  font-size: 8px;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.ol-table-fly-btn:hover { background: rgba(56, 189, 248, 0.35); color: #ffffff; }
.ol-inv-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 9px; color: #647d9a; }

.ol-panel button:focus-visible, .ol-panel input:focus-visible, .ol-panel select:focus-visible { outline: 2px solid #38bdf8; outline-offset: 3px; }
@media(max-width:900px) { .ol-panel { left: 58px; top: 68px; bottom: 80px; width: 310px; }.ol-globe-caption { left: 388px; bottom: 100px; max-width: calc(100vw - 405px); } }
@media(max-width:600px) { .ol-panel { left: 54px; top: 64px; bottom: 105px; width: 285px; }.ol-globe-caption { left: 60px; bottom: 58px; max-width: calc(100vw - 110px); padding: 6px 10px; }.ol-caption-text strong { font-size: 9px; }.ol-caption-text span { font-size: 8px; } }

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-overlay.active {
  display: flex !important;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay .modal-card {
  width: min(100%, 760px);
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-1, #0f172a);
  border: 1px solid var(--border, #334155);
  border-radius: 14px;
  box-shadow: 0 16px 48px #0008;
}
.modal-overlay .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border, #334155);
}
.modal-overlay .modal-header h3 { margin: 0; color: var(--text-1, #e2e8f0); font-size: 16px; }
.modal-overlay .modal-close { background: transparent; color: var(--text-2, #94a3b8); border: 0; cursor: pointer; font-size: 24px; }
.modal-overlay .modal-body { padding: 20px; color: var(--text-2, #94a3b8); line-height: 1.6; }
.modal-overlay input:not([type="checkbox"]), .modal-overlay select {
  background: var(--bg-2, #0b1220); color: var(--text-1, #e2e8f0);
  border: 1px solid var(--border, #334155); border-radius: 6px; padding: 7px;
  max-width: 100%;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1.0); }
}

/* Metadata Inspection Modal */
#cat-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.cat-modal-container {
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 14px;
  width: 720px;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.cat-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: rgba(30, 41, 59, 0.7);
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cat-modal-header h3 {
  margin: 0;
  font-size: 18px;
  color: #38bdf8;
  font-weight: 800;
}

.cat-modal-sub {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 4px;
}

.cat-modal-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.cat-modal-close-btn:hover { color: #f8fafc; }

.cat-modal-content {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cat-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.cat-modal-card {
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px;
}

.cat-modal-card h4 {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #38bdf8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cat-spec-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cat-spec-row span { color: #94a3b8; }
.cat-spec-row strong { color: #f8fafc; font-family: 'JetBrains Mono', monospace; }

.cat-modal-tle-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 12px;
}

.tle-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 8px;
}

.tle-code-block {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  background: #090d16;
  color: #34d399;
  padding: 10px;
  border-radius: 6px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.cat-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 6px;
}

.cat-btn.lg {
  padding: 10px 18px;
  font-size: 13px;
}

/* AI Telemetry & Risk Assessment Card */
.cat-modal-ai-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.ai-card-header {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #38bdf8;
  text-transform: uppercase;
}

.ai-analysis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.ai-stat-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.ai-stat-lbl {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.ai-stat-val {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 3px;
}

.ai-stat-val.success { color: #10b981; }
.ai-stat-val.warning { color: #f59e0b; }
.ai-stat-val.info { color: #38bdf8; }

.ai-analysis-summary {
  font-size: 11.5px;
  line-height: 1.45;
  color: #cbd5e1;
  margin: 0;
  padding: 8px 10px;
  background: rgba(30, 41, 59, 0.5);
  border-left: 3px solid #38bdf8;
  border-radius: 0 6px 6px 0;
}

/* ── Tools Hub Topbar Popover ────────────────────────────────────────── */
.tools-hub-trigger {
  position: relative;
  display: inline-block;
}

.th-trigger-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-weight: 600;
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.th-trigger-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.th-active-badge {
  background: #38bdf8;
  color: #0f172a;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.2;
}

.th-popover-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.15);
  z-index: 1000;
  padding: 14px;
  animation: thFadeIn 0.2s ease;
}

.th-popover-panel.active {
  display: block;
}

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

.th-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.th-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.th-sub {
  font-size: 10.5px;
  color: #64748b;
  margin-top: 2px;
}

.th-sec-group {
  margin-bottom: 12px;
}

.th-sec-label {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.th-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-align: left;
}

.th-row-item:hover {
  background: rgba(30, 41, 59, 0.85);
  border-color: rgba(56, 189, 248, 0.3);
}

.th-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.th-row-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-blue { background: rgba(56, 189, 248, 0.15); }
.icon-amber { background: rgba(251, 191, 36, 0.15); }
.icon-purple { background: rgba(168, 85, 247, 0.15); }

.th-row-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #f1f5f9;
}

.th-row-sub {
  font-size: 9.5px;
  color: #64748b;
  margin-top: 1px;
}

.th-toggle-switch {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(100, 116, 139, 0.2);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

.th-toggle-switch.active-shells {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.5);
}

.th-toggle-switch.active-shadow {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.5);
}

.th-toggle-switch.active-wx {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.5);
}

.th-presets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.th-preset-chip {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 10.5px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.th-preset-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #f8fafc;
}






:root { --layer-popup-border: rgba(148, 163, 184, 0.22); }
.corner-hud-widget {
  position: fixed; z-index: 1400; top: 100px; right: 24px;
  width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 140px);
  overflow: auto; background: rgba(10, 18, 33, 0.96);
  border: 1px solid var(--layer-popup-border); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); backdrop-filter: blur(20px);
  color: #e2e8f0; font-size: 13px;
}
.corner-hud-header { display: flex; align-items: center; justify-content: space-between; padding: 18px; border-bottom: 1px solid var(--layer-popup-border); }
.corner-hud-title { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.corner-hud-actions { display: flex; gap: 6px; }
.corner-hud-icon-btn { background: transparent; color: #94a3b8; border: 0; cursor: pointer; padding: 4px 8px; font-size: 18px; }
.layer-popup-tabs { display: flex; gap: 8px; padding: 14px 18px 0; }
.layer-popup-tabs button { flex: 1; background: #17243a; border: 1px solid var(--layer-popup-border); color: #cbd5e1; border-radius: 8px; padding: 8px; cursor: pointer; }
.layer-popup-tabs button:hover { border-color: #38bdf8; color: #fff; }
.corner-hud-body { padding: 18px; }
.corner-sec-label { color: #cbd5e1; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.layer-popup-note { color: #8292a8; font-size: 12px; line-height: 1.5; margin: 8px 0 20px; }
.corner-ctrl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; }
.corner-chk-lbl { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.corner-chk-lbl input { accent-color: #38bdf8; width: 15px; height: 15px; }
.corner-val-lbl { color: #94a3b8; font-size: 12px; font-variant-numeric: tabular-nums; }
.corner-slider { display: block; width: 100%; margin: 14px 0 20px; accent-color: #38bdf8; cursor: pointer; }
.corner-hud-widget.hidden, .corner-hud-body.hidden { display: none; }

/* Layer inspector */
.corner-hud-widget { width: min(374px, calc(100vw - 32px)); top: 80px; background: linear-gradient(145deg, rgba(20, 31, 48, .97), rgba(8, 15, 27, .97)); border-color: rgba(148, 163, 184, .18); scrollbar-width: thin; }
.corner-hud-header { padding: 18px 20px; }
.corner-hud-title { font-size: 14px; letter-spacing: -.02em; }
.corner-hud-title svg { width: 18px; height: 18px; }
.corner-hud-icon-btn { border-radius: 6px; }
.corner-hud-icon-btn:hover { background: rgba(148, 163, 184, .12); color: white; }
.layer-popup-tabs { padding: 4px; margin: 14px 20px; background: rgba(0, 0, 0, .22); border: 1px solid rgba(148, 163, 184, .10); border-radius: 10px; gap: 4px; }
.layer-popup-tabs button { background: transparent; border-color: transparent; font-size: 11px; font-weight: 600; }
.layer-popup-tabs button.selected { background: rgba(56, 189, 248, .12); color: #7dd3fc; border-color: rgba(56, 189, 248, .20); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.layer-preset-bar { display: flex; align-items: center; gap: 6px; padding: 0 20px 14px; border-bottom: 1px solid rgba(148, 163, 184, .10); }
.layer-preset-bar span { flex: 1; font-size: 11px; color: #94a3b8; }
.layer-preset-bar button, .layer-popup-footer button { background: rgba(148, 163, 184, .06); border: 1px solid rgba(148, 163, 184, .16); border-radius: 6px; color: #cbd5e1; font-size: 11px; padding: 6px 10px; cursor: pointer; }
.layer-preset-bar button:hover, .layer-popup-footer button:hover { color: #7dd3fc; border-color: #38bdf8; }
.corner-hud-body { padding: 18px 20px 6px; }
.layer-section-heading { display: flex; justify-content: space-between; color: #e2e8f0; font-size: 12px; font-weight: 600; }
.layer-section-heading span:last-child { color: #71849c; font-size: 10px; font-weight: 400; }
.layer-popup-note { margin: 6px 0 16px; font-size: 11px; }
.layer-card { padding: 14px; background: rgba(148, 163, 184, .035); border: 1px solid rgba(148, 163, 184, .12); border-radius: 10px; margin-bottom: 9px; }
.layer-card-heading { display: flex; align-items: center; gap: 10px; cursor: pointer; position: relative; }
.layer-swatch { flex-shrink: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--layer-color); box-shadow: 0 0 12px color-mix(in srgb, var(--layer-color) 35%, transparent); }
.layer-card-text { flex: 1; }
.layer-card-text strong { display: block; font-size: 12px; font-weight: 600; color: #e2e8f0; }
.layer-card-text small { display: block; color: #8292a8; font-size: 10px; margin-top: 4px; }
.layer-card-heading input { position: absolute; right: 0; width: 30px; height: 18px; opacity: 0; }
.layer-switch { width: 30px; height: 18px; border-radius: 12px; background: #253246; border: 1px solid #39485e; transition: background .15s; }
.layer-switch::after { content: ''; display: block; width: 12px; height: 12px; margin: 2px; border-radius: 50%; background: #94a3b8; transition: transform .15s; }
.layer-card-heading input:checked + .layer-switch { background: color-mix(in srgb, var(--layer-color) 22%, #152135); border-color: color-mix(in srgb, var(--layer-color) 55%, #152135); }
.layer-card-heading input:checked + .layer-switch::after { transform: translateX(12px); background: var(--layer-color); }
.layer-card-heading input:focus-visible + .layer-switch { outline: 2px solid #7dd3fc; outline-offset: 3px; }
.layer-opacity-label { display: flex; justify-content: space-between; margin-top: 16px; color: #8292a8; font-size: 10px; }
.layer-opacity-label span { color: var(--layer-color); font-variant-numeric: tabular-nums; }
.layer-card .corner-slider { accent-color: var(--layer-color); height: 4px; margin: 12px 0 3px; }
.layer-muted .layer-swatch, .layer-muted .layer-card-text, .layer-muted .layer-opacity-label { opacity: .45; }
.layer-muted .corner-slider { opacity: .30; cursor: default; }
.layer-extent-note { color: #71849c; font-size: 10px; line-height: 1.5; margin: 13px 0 8px; }
.layer-length-control { border-top: 1px solid rgba(148, 163, 184, .10); margin-top: 16px; }
.layer-length-control .corner-slider { height: 4px; margin: 12px 0; }
.layer-length-control .layer-opacity-label span { color: #cbd5e1; }
.shadow-cross-section { display: flex; align-items: center; gap: 12px; border: 1px solid rgba(148, 163, 184, .12); border-radius: 8px; padding: 10px; margin-top: 16px; }
.shadow-cross-section svg { width: 72px; height: 72px; flex-shrink: 0; }
.shadow-cross-section strong { display: block; font-size: 10px; color: #cbd5e1; margin-bottom: 8px; }
.shadow-cross-section span { display: flex; justify-content: space-between; gap: 8px; color: #8292a8; font-size: 9px; line-height: 1.8; }
.shadow-cross-section b { color: #cbd5e1; font-weight: 500; font-variant-numeric: tabular-nums; }
.shadow-surface-controls { display: flex; gap: 16px; padding-top: 14px; font-size: 11px; color: #94a3b8; }
.shadow-surface-controls label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.shadow-surface-controls input { accent-color: #38bdf8; }
.layer-group-controls { margin: 14px 20px 0; padding: 12px; border: 1px solid rgba(56, 189, 248, .18); border-radius: 10px; background: rgba(56, 189, 248, .035); }
.layer-group-controls label { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; font-size: 11px; color: #cbd5e1; }
.layer-group-controls .layer-group-all { padding-bottom: 12px; border-bottom: 1px solid rgba(148, 163, 184, .12); font-weight: 600; }
.layer-group-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 12px; }
.layer-group-controls input { position: absolute; right: 0; opacity: 0; width: 30px; height: 18px; }
.layer-group-controls input:checked + .layer-switch { background: rgba(56, 189, 248, .18); border-color: #38bdf8; }
.layer-group-controls input:checked + .layer-switch::after { transform: translateX(12px); background: #7dd3fc; }
.layer-group-controls input:indeterminate + .layer-switch::after { transform: translateX(6px); background: #7dd3fc; }
.layer-group-controls input:focus-visible + .layer-switch { outline: 2px solid #7dd3fc; outline-offset: 3px; }
.layer-popup-footer { display: flex; align-items: center; gap: 6px; padding: 14px 20px; border-top: 1px solid rgba(148, 163, 184, .10); }
.layer-popup-footer span { margin-left: auto; font-size: 10px; color: #62758e; }
@media (max-width: 600px) { .corner-hud-widget { top: 70px; right: 16px; max-height: calc(100dvh - 90px); } }

/* ── Global text-fit guard: labels in fixed-height controls never wrap or spill ── */
button { white-space: nowrap; }
.btn, .toggle-btn, .count-badge, .log-badge, .tag,
.ol-tabs button, .ol-presets button, .ol-table-fly-btn, .ol-exit-btn, .ol-primary,
.conj-banner-mode, #conj-banner-jump, .og-card-btn, .chat-action-chip {
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.toggle-btn { height: auto; min-height: 28px; }
#btn-cola-run, #btn-cola-animate, #btn-cola-reset { height: auto; min-height: 30px; min-width: 0; }
select, input[type="text"], input[type="search"], input[type="number"] {
  min-width: 0;
  max-width: 100%;
  text-overflow: ellipsis;
  box-sizing: border-box;
}
.ol-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.ol-presets button { flex: 1 1 auto; min-width: max-content; }
.ol-tabs { display: flex; }
.ol-tabs button { flex: 1 1 0; min-width: 0; }
.conj-banner-title, .conj-banner-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info-row { min-width: 0; }
.info-row > * { min-width: 0; overflow-wrap: anywhere; }

/* Settings pinned to the bottom of the sidebar dock */
#ssa-dock { display: flex; flex-direction: column; }
#ssa-dock .dock-settings { margin-top: auto; border-top: 1px solid rgba(148, 163, 184, 0.12); padding-top: 10px; }

/* ── Authentication & Access Control Subsystem ────────────────────────── */
.auth-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 6px;
  font-size: 12px;
  color: #e2e8f0;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.auth-header-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}
.auth-btn-icon {
  font-size: 13px;
  line-height: 1;
}
.auth-btn-label {
  font-weight: 500;
  letter-spacing: 0.02em;
}
.auth-btn-role-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.auth-btn-role-badge.role-guest {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}
.auth-btn-role-badge.role-viewer {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.auth-btn-role-badge.role-operator {
  background: rgba(96, 165, 250, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.45);
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.25);
}
.auth-btn-role-badge.role-admin {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.3);
}

/* Auth Modal Styles */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.auth-modal-card {
  width: 90%;
  max-width: 540px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.6);
}
.auth-modal-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #38bdf8;
  font-weight: 600;
  margin-bottom: 4px;
}
.auth-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #f8fafc;
}
.auth-modal-tabs {
  display: flex;
  gap: 2px;
  padding: 0 20px;
  background: rgba(15, 23, 42, 0.4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}
.auth-tab-btn {
  background: transparent;
  border: 0;
  padding: 11px 16px;
  font-size: 12px;
  font-weight: 500;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.auth-tab-btn:hover {
  color: #e2e8f0;
}
.auth-tab-btn.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  font-weight: 600;
}
.auth-modal-body {
  padding: 22px 24px;
  max-height: 75vh;
  overflow-y: auto;
}
.auth-status-bar {
  padding: 10px 18px;
  font-size: 12px;
  margin: 12px 24px 0;
  border-radius: 6px;
  font-weight: 500;
  display: none;
}
.auth-status-bar.status-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}
.auth-status-bar.status-success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-field-group label {
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.auth-input, .auth-select {
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 8px;
  font-size: 13px;
  color: #f8fafc;
  outline: none;
  transition: all 0.2s;
}
.auth-input:focus, .auth-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}
.auth-remember-row {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
}
.auth-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.auth-submit-btn {
  padding: 11px 18px;
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}
.auth-submit-btn:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.45);
  transform: translateY(-1px);
}
.auth-form-footer {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}
.auth-form-footer code {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 5px;
  border-radius: 4px;
}

/* Operator Profile Card */
.auth-profile-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.auth-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.auth-profile-name {
  margin: 0;
  font-size: 16px;
  color: #f8fafc;
}
.auth-profile-handle {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 3px;
}
.auth-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.auth-caps-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  padding: 12px 16px;
}
.auth-caps-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #38bdf8;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 8px;
}
.auth-caps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-caps-list li {
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
}
.auth-check {
  color: #34d399;
  font-weight: bold;
}
.auth-token-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  padding: 12px 16px;
}
.auth-field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 6px;
}
.auth-token-row {
  display: flex;
  gap: 8px;
}
.auth-input-readonly {
  flex: 1;
  padding: 7px 10px;
  background: rgba(3, 7, 18, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #e2e8f0;
}
.auth-copy-btn {
  padding: 6px 14px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 6px;
  color: #38bdf8;
  font-size: 11px;
  cursor: pointer;
  font-weight: 600;
}
.auth-copy-btn:hover {
  background: rgba(56, 189, 248, 0.25);
}
.auth-token-hint {
  display: block;
  font-size: 11px;
  color: #64748b;
  margin-top: 6px;
}
.auth-token-hint code {
  color: #38bdf8;
}
.auth-profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.auth-btn-logout {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
}
.auth-btn-logout:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #ffffff !important;
}

/* Audit Trail Table */
.auth-audit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.auth-audit-header h4 {
  margin: 0;
  font-size: 14px;
  color: #f8fafc;
}
.auth-audit-header p {
  margin: 3px 0 0;
  font-size: 11px;
  color: #94a3b8;
}
.auth-audit-scroll {
  max-height: 380px;
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
}
.auth-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.auth-audit-table th {
  position: sticky;
  top: 0;
  background: #0f172a;
  padding: 8px 10px;
  text-align: left;
  font-weight: 600;
  color: #94a3b8;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  font-family: 'JetBrains Mono', monospace;
}
.auth-audit-table td {
  padding: 7px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  color: #cbd5e1;
}
.auth-audit-table tr:hover td {
  background: rgba(56, 189, 248, 0.05);
}
.auth-audit-table .mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: #94a3b8;
}
.auth-action-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
}
.auth-status-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.auth-status-pill.status-success, .auth-status-pill.status-ok {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}
.auth-status-pill.status-denied, .auth-status-pill.status-error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}
.auth-empty-state, .auth-loading, .auth-error-state {
  padding: 30px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
.auth-error-state {
  color: #fca5a5;
}

/* ════════════════════════════════════════════════════════════
   Minimalist Space-Themed Login Gate
   ════════════════════════════════════════════════════════════ */
.login-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #010409;
  overflow: hidden;
  perspective: 1000px;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.7s ease;
}
.login-gate-overlay.unlocking {
  opacity: 0;
  pointer-events: none;
}

/* Cinematic Stock Space Video Background */
.login-video-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #010409;
  pointer-events: none;
}
.login-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  pointer-events: none;
  transform: translateZ(0);
  filter: brightness(0.85) contrast(1.08);
}
.login-video-overlay {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 50% 50%, rgba(3, 7, 18, 0.45) 0%, rgba(2, 6, 23, 0.78) 70%, rgba(1, 4, 14, 0.96) 100%),
    linear-gradient(to bottom, rgba(2, 6, 23, 0.6) 0%, transparent 25%, transparent 75%, rgba(1, 4, 14, 0.88) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Minimalist Aerospace Glassmorphism Card */
.login-gate-card {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  margin: 20px;
  padding: 38px 34px 30px;
  background: rgba(8, 14, 28, 0.8);
  backdrop-filter: blur(32px) saturate(190%);
  -webkit-backdrop-filter: blur(32px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 
    0 30px 80px -10px rgba(0, 0, 0, 0.9),
    0 0 50px rgba(14, 165, 233, 0.12),
    inset 0 1px 1px rgba(255, 255, 255, 0.18);
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1);
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  animation: cinematicCardEntry 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes cinematicCardEntry {
  0% {
    opacity: 0;
    transform: perspective(1000px) translateY(24px) scale(0.96);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: perspective(1000px) translateY(0) scale(1);
    filter: blur(0);
  }
}
.login-gate-overlay.unlocking .login-gate-card {
  transform: perspective(1000px) scale(1.26) translateZ(120px) !important;
  opacity: 0 !important;
  filter: blur(14px) !important;
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease, filter 0.6s ease !important;
}
.login-gate-overlay.unlocking .login-bg-video {
  transform: scale(1.16) translateZ(0) !important;
  filter: brightness(1.35) contrast(1.15) blur(6px) !important;
  opacity: 0 !important;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.75s ease, filter 0.75s ease !important;
}
.login-gate-warp-streak {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2.5px;
  background: linear-gradient(90deg, transparent 0%, rgba(56, 189, 248, 0.3) 20%, #ffffff 50%, rgba(56, 189, 248, 0.3) 80%, transparent 100%);
  box-shadow: 0 0 35px #38bdf8, 0 0 75px #0284c7;
  transform: scaleX(0);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}
.login-gate-overlay.unlocking .login-gate-warp-streak {
  transform: scaleX(1);
  opacity: 1;
}
.login-entry-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(56, 189, 248, 0.35) 0%, rgba(14, 165, 233, 0.12) 60%, transparent 85%);
  opacity: 0;
  pointer-events: none;
  z-index: 99;
}
.login-gate-overlay.unlocking .login-entry-flash {
  animation: entryFlashAnim 0.75s ease-out forwards;
}
@keyframes entryFlashAnim {
  0% { opacity: 0; transform: scale(0.95); }
  35% { opacity: 1; transform: scale(1.06); }
  100% { opacity: 0; transform: scale(1.22); }
}
.login-gate-card.hud-shake {
  animation: hudShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
  border-color: rgba(239, 68, 68, 0.75) !important;
  box-shadow: 0 0 40px rgba(239, 68, 68, 0.45) !important;
}
@keyframes hudShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
  40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* Minimal Brand Header & Larger Company Logo */
.login-gate-brand {
  text-align: center;
  margin-bottom: 20px;
}
.login-gate-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  padding: 4px;
}
.login-gate-logo-img {
  height: 64px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.5));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}
.login-gate-logo-wrap:hover .login-gate-logo-img {
  transform: scale(1.04);
  filter: drop-shadow(0 0 30px rgba(56, 189, 248, 0.75));
}
.login-gate-title {
  font-family: 'Orbitron', 'Rajdhani', -apple-system, sans-serif;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 7px;
  line-height: 1.15;
  margin: 0;
  background: linear-gradient(180deg, #ffffff 25%, #bae6fd 75%, #7dd3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 24px rgba(56, 189, 248, 0.5));
  text-align: center;
  text-transform: uppercase;
}
.login-gate-subtitle {
  font-family: 'Rajdhani', -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  margin-top: 6px;
  text-align: center;
}
.login-brand-divider {
  width: 50px;
  height: 2px;
  margin: 16px auto 18px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.8), transparent);
  border-radius: 2px;
}

/* Minimal Status Message Bar */
.gate-status-bar {
  margin-bottom: 18px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  letter-spacing: 0.6px;
  text-align: center;
  transition: all 0.25s ease;
}
.gate-status-bar.status-error {
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}
.gate-status-bar.status-success {
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.25);
}

/* Minimal Tabs */
.gate-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  margin-bottom: 20px;
}
.gate-tab-btn {
  flex: 1;
  padding: 9px 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: 'Rajdhani', -apple-system, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.gate-tab-btn:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.04);
}
.gate-tab-btn.active {
  background: rgba(14, 165, 233, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.22);
}

/* Minimal Form Fields */
.gate-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gate-field label {
  display: block;
  font-family: 'Rajdhani', -apple-system, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #cbd5e1;
  margin-bottom: 7px;
}
.gate-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.gate-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  pointer-events: none;
  color: #64748b;
  z-index: 2;
  transition: color 0.2s ease, transform 0.2s ease;
}
.gate-input-wrap:focus-within .gate-input-icon {
  color: #38bdf8;
  transform: translateY(-50%) scale(1.08);
}
.gate-input-wrap input.gate-input,
.gate-input-wrap input[type="text"],
.gate-input-wrap input[type="password"],
.gate-input-wrap select.gate-select,
.gate-input {
  width: 100% !important;
  height: 48px !important;
  padding: 0 46px 0 46px !important;
  background: rgba(15, 23, 42, 0.72) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px !important;
  color: #f8fafc !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 13.5px !important;
  letter-spacing: 0.4px !important;
  box-sizing: border-box !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.gate-input-wrap input::placeholder {
  color: #64748b !important;
  font-family: 'Rajdhani', sans-serif !important;
  font-size: 13px !important;
  letter-spacing: 0.8px !important;
}
.gate-input-wrap input:focus,
.gate-input-wrap select:focus {
  outline: none !important;
  border-color: #38bdf8 !important;
  background: rgba(15, 23, 42, 0.92) !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22), 0 0 24px rgba(56, 189, 248, 0.35) !important;
}
.gate-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.gate-label-row label {
  margin-bottom: 0 !important;
}
.gate-caps-indicator {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.gate-pwd-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
  padding: 0;
}
.gate-pwd-toggle:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.14);
}
.gate-pwd-toggle:focus {
  outline: none;
  color: #38bdf8;
}
.gate-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-family: 'Rajdhani', sans-serif;
  color: #94a3b8;
  margin-top: -2px;
}
.gate-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.gate-checkbox-label input[type="checkbox"] {
  accent-color: #0284c7;
  cursor: pointer;
  width: 14px;
  height: 14px;
}
.gate-select {
  appearance: none;
  cursor: pointer;
}

/* Minimal Submit Button */
.gate-submit-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  margin-top: 4px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 60%, #0284c7 100%);
  border: 1px solid rgba(56, 189, 248, 0.65);
  border-radius: 10px;
  color: #ffffff;
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 22px rgba(2, 132, 199, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.gate-submit-btn:hover {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  border-color: #7dd3fc;
  box-shadow: 0 6px 28px rgba(14, 165, 233, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(-1.5px);
}
.gate-submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 12px rgba(2, 132, 199, 0.4);
}
.gate-btn-icon {
  transition: transform 0.2s ease;
}
.gate-submit-btn:hover .gate-btn-icon {
  transform: translateX(4px);
}
.gate-footer-hint {
  text-align: center;
  font-family: 'JetBrains Mono', 'Rajdhani', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.6px;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.gate-footer-hint .hint-bullet {
  color: #38bdf8;
  font-size: 12px;
  opacity: 0.85;
}

/* ════════════════════════════════════════════════════════════
   Cinematic Main Software Entry Animation Sequence
   ════════════════════════════════════════════════════════════ */
body.c2-entering-main-software #header {
  animation: c2HeaderSlideDown 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes c2HeaderSlideDown {
  0% {
    transform: translateY(-100%);
    opacity: 0;
    filter: brightness(1.5);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
    filter: brightness(1);
  }
}

body.c2-entering-main-software #ssa-dock {
  animation: c2DockSlideIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}
@keyframes c2DockSlideIn {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

body.c2-entering-main-software #sidebar {
  animation: c2SidebarSlideIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
@keyframes c2SidebarSlideIn {
  0% {
    transform: translateX(-40px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

body.c2-entering-main-software #cesiumContainer {
  animation: c2GlobeAtmosphereAwaken 1.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes c2GlobeAtmosphereAwaken {
  0% {
    filter: brightness(0.65) saturate(75%);
  }
  100% {
    filter: brightness(1) saturate(100%);
  }
}

body.c2-entering-main-software .stat-box {
  animation: c2StatBoxPing 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
body.c2-entering-main-software .stat-box:nth-child(1) { animation-delay: 0.28s; }
body.c2-entering-main-software .stat-box:nth-child(2) { animation-delay: 0.36s; }
body.c2-entering-main-software .stat-box:nth-child(3) { animation-delay: 0.44s; }
body.c2-entering-main-software .stat-box:nth-child(4) { animation-delay: 0.52s; }
@keyframes c2StatBoxPing {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  60% {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
    border-color: rgba(56, 189, 248, 0.6);
  }
  100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: none;
  }
}

/* Tactical C2 Uplink Status Notification Banner */
.c2-uplink-banner {
  position: fixed;
  top: calc(var(--header-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-24px);
  z-index: 999999;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}
.c2-uplink-banner.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.c2-banner-inner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 22px;
  background: rgba(3, 7, 18, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 30px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 24px rgba(56, 189, 248, 0.25);
}
.c2-banner-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 12px #10b981;
  animation: c2PulseGreen 1.6s infinite ease-in-out;
}
@keyframes c2PulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
.c2-banner-tag {
  font-family: 'Orbitron', 'Rajdhani', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: #38bdf8;
  text-transform: uppercase;
}
.c2-banner-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
}
.c2-banner-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.8px;
  color: #cbd5e1;
  text-transform: uppercase;
}

/* ════════════════════════════════════════════════════════════
   Operator Account inside Settings
   ════════════════════════════════════════════════════════════ */
.settings-account-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px 0 18px;
}
.settings-account-empty {
  text-align: center;
  padding: 30px 15px;
  color: #94a3b8;
}
.settings-account-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
}
.settings-account-avatar {
  width: 52px;
  height: 52px;
  min-width: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  color: #38bdf8;
}
.settings-account-avatar svg {
  display: block;
  width: 26px;
  height: 26px;
}
.settings-account-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.settings-account-name {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.3;
}
.settings-account-details {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.settings-account-user {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: #94a3b8;
}
.settings-role-pill {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}
.settings-role-pill.role-admin {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.settings-role-pill.role-operator {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.settings-role-pill.role-viewer {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.settings-account-group h4 {
  margin: 0 0 8px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #94a3b8;
}
.settings-caps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px;
}
.settings-caps-list li {
  font-size: 12px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.4);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.08);
}
.settings-caps-check {
  color: #4ade80;
  font-weight: bold;
}
.settings-token-box {
  display: flex;
  gap: 8px;
}
.settings-token-input {
  flex: 1;
  height: 34px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 6px;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  padding: 0 10px;
}
.settings-audit-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.settings-audit-container {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  background: rgba(10, 15, 28, 0.5);
  padding: 10px;
}
.settings-button.danger {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #fca5a5 !important;
  transition: all 0.15s ease;
}
.settings-button.danger:hover {
  background: rgba(239, 68, 68, 0.28) !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

