/* ==========================================================================
   PREDICTIVE MARINE SENTINEL — MAIN DESIGN SYSTEM
   Vanilla CSS Styling | Deep Ocean / Glassmorphic Tech Aesthetic
   ========================================================================== */

:root {
  /* Color Palette - Modern Dark Marine Tech */
  --bg-dark: #070b13;
  --bg-deep: #0a101d;
  --panel-bg: rgba(15, 23, 42, 0.55);
  --panel-bg-solid: #0d1527;
  --panel-bg-nested: rgba(8, 14, 28, 0.65);
  --border-light: rgba(255, 255, 255, 0.06);
  --border-active: rgba(6, 182, 212, 0.3);
  
  /* Neon Accents & System States */
  --color-cyan: #06b6d4;
  --color-cyan-glow: rgba(6, 182, 212, 0.4);
  --color-blue: #3b82f6;
  --color-blue-glow: rgba(59, 130, 246, 0.4);
  --color-pink: #ec4899;
  --color-pink-glow: rgba(236, 72, 153, 0.4);
  --color-orange: #f97316;
  --color-orange-glow: rgba(249, 115, 22, 0.4);
  --color-green: #10b981;
  --color-green-glow: rgba(16, 185, 129, 0.4);
  --color-red: #ef4444;
  --color-red-glow: rgba(239, 68, 68, 0.4);
  --color-amber: #f59e0b;
  --color-amber-glow: rgba(245, 158, 11, 0.4);
  
  /* Text Colors */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --text-dark: #0f172a;

  /* Typography */
  --font-header: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Shadow variables */
  --glow-shadow-cyan: 0 0 15px rgba(6, 182, 212, 0.25);
  --glow-shadow-pink: 0 0 15px rgba(236, 72, 153, 0.25);
  --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* ==========================================================================
   1. GLOBAL RESET & BASE STYLES
   ========================================================================== */

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

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  position: relative;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-header);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Custom Webkit Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-cyan-glow);
}

/* Ambient glow nodes background */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(140px);
  z-index: 0;
  opacity: 0.12;
}
.glow-1 {
  background-color: var(--color-cyan);
  width: 450px;
  height: 450px;
  top: 10%;
  left: 5%;
}
.glow-2 {
  background-color: var(--color-pink);
  width: 500px;
  height: 500px;
  bottom: 10%;
  right: 10%;
}
.glow-3 {
  background-color: var(--color-blue);
  width: 350px;
  height: 350px;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Glassmorphism utility card */
.glass-card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  border: 1px solid var(--border-light);
  box-shadow: var(--card-shadow);
  border-radius: 12px;
  transition: border-color var(--transition-normal);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.glass-card-nested {
  background: var(--panel-bg-nested);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px;
}

/* ==========================================================================
   2. APP CONTAINER & HEADER
   ========================================================================== */

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 12px;
  position: relative;
  z-index: 1;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  margin-bottom: 12px;
  background: var(--panel-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  flex-shrink: 0;
}

/* Logo block */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  background: linear-gradient(135deg, var(--color-cyan) 0%, var(--color-blue) 100%);
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--glow-shadow-cyan);
}

.logo-icon i {
  width: 20px;
  height: 20px;
}

.logo-text h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--color-cyan);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

/* Header Stats Area */
.header-stats {
  display: flex;
  gap: 16px;
  align-items: center;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--panel-bg-nested);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  font-size: 12px;
  cursor: help;
  position: relative;
}

.stat-badge:hover {
  border-color: var(--border-active);
}

.stat-label {
  color: var(--text-secondary);
}

.stat-value {
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Color codes */
.text-cyan { color: var(--color-cyan) !important; }
.text-pink { color: var(--color-pink) !important; }
.text-blue { color: var(--color-blue) !important; }
.text-orange { color: var(--color-orange) !important; }
.text-green { color: var(--color-green) !important; }
.text-red { color: var(--color-red) !important; }
.text-amber { color: var(--color-amber) !important; }

/* Status Pulsing Dots */
.stat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

@keyframes pulse-anim {
  0% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 0 0 var(--pulse-color); }
  70% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 0 6px rgba(0, 0, 0, 0); }
  100% { transform: scale(0.95); opacity: 0.5; box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
}

.pulse-amber {
  background-color: var(--color-amber);
  animation: pulse-anim 2s infinite;
  --pulse-color: var(--color-amber-glow);
}
.pulse-blue {
  background-color: var(--color-blue);
  animation: pulse-anim 2.2s infinite;
  --pulse-color: var(--color-blue-glow);
}
.pulse-green {
  background-color: var(--color-green);
  animation: pulse-anim 1.8s infinite;
  --pulse-color: var(--color-green-glow);
}
.pulse-cyan {
  background-color: var(--color-cyan);
  animation: pulse-anim 2.5s infinite;
  --pulse-color: var(--color-cyan-glow);
}

/* Clock / Time Speed Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sim-clock-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: var(--font-mono);
  padding-right: 12px;
  border-right: 1px solid var(--border-light);
}

.clock-icon {
  display: none; /* hidden, labels are enough */
}

#sim-time {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.sim-date {
  font-size: 9px;
  color: var(--text-secondary);
  font-weight: 500;
}

.clock-speed-controls {
  display: flex;
  background: var(--panel-bg-nested);
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}

.btn-speed {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  transition: all var(--transition-fast);
}

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

.btn-speed.active {
  background: var(--color-cyan);
  color: var(--text-dark);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.4);
}

.btn-pause {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  margin-left: 2px;
}

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

.btn-pause.paused {
  background: var(--color-red);
  color: white;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.btn-pause i {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   3. APP LAYOUT GRID & PANELS
   ========================================================================== */

.app-layout {
  display: flex;
  position: relative;
  flex-grow: 1;
  height: calc(100vh - 84px); /* Screen minus header */
  overflow: hidden;
  width: 100%;
}

.sidebar {
  position: absolute;
  top: 72px;
  bottom: 12px;
  z-index: 1010;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px;
  background: var(--panel-bg-solid);
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  transition: transform var(--transition-normal);
}

.sidebar-left {
  left: 90px;
  width: 340px;
  transform: translateX(-450px); /* Collapsed by default */
  border-radius: 12px;
}

.sidebar-left.open {
  transform: translateX(0);
}

.sidebar-right {
  right: 12px;
  width: 370px;
  transform: translateX(400px); /* Collapsed by default */
  border-radius: 12px;
}

.sidebar-right.open {
  transform: translateX(0);
}

.sidebar-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  z-index: 100;
}

.sidebar-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-close-btn i {
  width: 16px;
  height: 16px;
}

.sidebar-tab-content {
  display: none;
  height: 100%;
}

.sidebar-tab-content.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding-right: 4px;
}

.center-viewports {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  position: relative;
}

/* Sections */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 16px;
}

.sidebar-section.border-top {
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.flex-col-grow {
  flex-grow: 1;
  overflow: hidden;
}

.flex-row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-section h2 {
  font-size: 14px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.sec-icon {
  width: 16px;
  height: 16px;
  color: var(--color-cyan);
}

.section-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
}

/* ==========================================================================
   4. LAYER CONTROLS (LEFT SIDEBAR)
   ========================================================================== */

.layer-control-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.layer-checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding: 10px 12px;
  background: var(--panel-bg-nested);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  transition: all var(--transition-fast);
}

.layer-checkbox-container:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

.layer-checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.layer-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 28px;
  font-weight: 500;
}

.layer-icon {
  width: 14px;
  height: 14px;
}

/* Custom checkbox indicator */
.checkmark {
  position: absolute;
  left: 12px;
  height: 16px;
  width: 16px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.layer-checkbox-container input:checked ~ .checkmark {
  background-color: var(--color-cyan);
  border-color: var(--color-cyan);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--text-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.layer-checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.layer-badge {
  margin-left: auto;
  font-size: 9px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  color: var(--text-secondary);
  font-weight: 600;
  font-family: var(--font-mono);
}

.badge-pink { color: var(--color-pink); background: rgba(236, 72, 153, 0.12); }
.badge-cyan { color: var(--color-cyan); background: rgba(6, 182, 212, 0.12); }
.badge-orange { color: var(--color-orange); background: rgba(249, 115, 22, 0.12); }
.badge-blue { color: var(--color-blue); background: rgba(59, 130, 246, 0.12); }

/* Sliders */
.parameter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.parameter-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
}

.param-val {
  font-family: var(--font-mono);
  color: var(--color-cyan);
  font-weight: 700;
}

.parameter-subdesc {
  font-size: 9px;
  color: var(--text-secondary);
}

/* Styled Slider Range input */
.custom-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
  transition: transform 0.1s ease;
}

.custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Engine status box nested */
.engine-status-box {
  margin-top: auto;
  padding: 10px;
}

.status-indicator {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.status-pulse-green {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 10px var(--color-green);
  margin-top: 4px;
  flex-shrink: 0;
}

.status-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.status-desc {
  display: block;
  font-size: 9px;
  color: var(--text-secondary);
}

/* ==========================================================================
   5. CENTRAL VIEWPORT AREA
   ========================================================================== */

.viewport-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 1005;
}

.view-selectors {
  display: flex;
  gap: 4px;
}

.btn-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

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

.btn-tab.active {
  background: rgba(6, 182, 212, 0.1);
  color: var(--color-cyan);
  border-color: rgba(6, 182, 212, 0.2);
}

.btn-tab i {
  width: 14px;
  height: 14px;
}

.map-controls {
  display: flex;
  gap: 6px;
}

.map-control-btn {
  background: var(--panel-bg-nested);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.map-control-btn:hover {
  color: var(--text-primary);
  border-color: var(--color-cyan);
}

.map-control-btn i {
  width: 16px;
  height: 16px;
}

/* Viewport Panels Container */
.viewport-panels-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  height: 100%;
}

.viewport-panel {
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.viewport-title {
  padding: 10px 14px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.15);
}

.title-main {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.title-main i {
  width: 14px;
  height: 14px;
}

.title-sub {
  font-size: 11px;
  color: var(--text-secondary);
  font-style: italic;
}

.canvas-wrapper {
  flex-grow: 1;
  position: relative;
  background: radial-gradient(circle at center, #0b1426 0%, #050912 100%);
  overflow: hidden;
}

.canvas-wrapper canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* Legend inside Map */
.map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 8px 12px !important;
  font-size: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  background: rgba(13, 21, 39, 0.85) !important;
}

.legend-title {
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 3px;
  margin-bottom: 2px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.legend-color {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}

.danger-zone-fill { background: rgba(239, 68, 68, 0.25); border: 1px solid var(--color-red); }
.ship-vector { background: var(--color-blue); }
.whale-pulse { background: var(--color-pink); border-radius: 50%; }
.hydrophone-range { background: transparent; border: 1px solid var(--color-cyan); border-radius: 50%; }
.krill-density { background: var(--color-orange); opacity: 0.6; }

/* Display Modes (Split vs Full Screen Canvas layout) */
.viewport-panels-container.split-layout .panel-2d {
  flex: 60%;
  min-height: 0;
}
.viewport-panels-container.split-layout .panel-3d {
  flex: 40%;
  min-height: 0;
}

.viewport-panels-container.only-2d .panel-3d {
  display: none !important;
}
.viewport-panels-container.only-2d .panel-2d {
  flex: 100%;
}

.viewport-panels-container.only-3d .panel-2d {
  display: none !important;
}
.viewport-panels-container.only-3d .panel-3d {
  flex: 100%;
}

/* ==========================================================================
   6. AUTOMATED ENFORCEMENT & COMPLIANCE (RIGHT SIDEBAR)
   ========================================================================== */

.vessel-compliance-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.vessel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--panel-bg-nested);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: 52px;
}

.vessel-row:hover {
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.02);
}

.vessel-row.selected {
  border-color: var(--color-cyan);
  background: rgba(6, 182, 212, 0.05);
}

.vessel-row.violating {
  border-left: 3px solid var(--color-red);
}

.vessel-row.compliant {
  border-left: 3px solid var(--color-green);
}

.vessel-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vessel-name-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vessel-name {
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.vessel-category {
  font-size: 9px;
  color: var(--text-secondary);
}

.vessel-speeds {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.speed-gauge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.speed-limit-indicator {
  font-size: 8px;
  color: var(--text-secondary);
}

.badge-status {
  font-size: 8px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

.badge-violating {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-red);
  border: 1px solid rgba(239, 68, 68, 0.25);
  animation: pulse-red-border 1.5s infinite;
}

.badge-compliant {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

@keyframes pulse-red-border {
  0% { border-color: rgba(239, 68, 68, 0.25); }
  50% { border-color: rgba(239, 68, 68, 0.85); box-shadow: 0 0 6px rgba(239, 68, 68, 0.2); }
  100% { border-color: rgba(239, 68, 68, 0.25); }
}

.loading-placeholder {
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
  padding: 12px;
  font-style: italic;
}

/* Urgency / Whale Telemetry Row */
.whale-urgency-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

.whale-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: var(--panel-bg-nested);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.whale-row:hover {
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.02);
}

.whale-row.selected {
  border-color: var(--color-pink);
  background: rgba(236, 72, 153, 0.05);
}

.whale-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.whale-identity {
  display: flex;
  align-items: center;
  gap: 6px;
}

.whale-name {
  font-weight: 700;
  font-size: 11px;
}

.whale-species {
  font-size: 9px;
  color: var(--text-secondary);
}

.urgency-badge {
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: 4px;
}

.urgency-low { background: rgba(16, 185, 129, 0.15); color: var(--color-green); }
.urgency-med { background: rgba(245, 158, 11, 0.15); color: var(--color-amber); }
.urgency-high { background: rgba(239, 68, 68, 0.15); color: var(--color-red); animation: text-glow-red 1s infinite alternate; }

@keyframes text-glow-red {
  0% { box-shadow: 0 0 2px rgba(239, 68, 68, 0.1); }
  100% { box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
}

.whale-telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 4px;
}

.tel-val {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==========================================================================
   7. AI-AGENT CHAT NEGO FEED (RIGHT SIDEBAR)
   ========================================================================== */

.feed-pulse {
  font-size: 8px;
  text-transform: uppercase;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.feed-pulse::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-cyan);
  display: inline-block;
  animation: pulse-anim 1.5s infinite;
  --pulse-color: var(--color-cyan-glow);
}

.agent-chat-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 2px;
  height: 200px; /* Constrain feed size */
}

.chat-bubble {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 8px 10px;
  border-radius: 8px;
  max-width: 90%;
  font-size: 11px;
  line-height: 1.35;
}

.chat-bubble.sentinel {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.15);
  align-self: flex-start;
}

.chat-bubble.vessel {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  align-self: flex-end;
}

.chat-bubble.system {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  align-self: center;
  max-width: 100%;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  text-align: center;
}

.chat-sender {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sentinel .chat-sender { color: var(--color-cyan); }
.vessel .chat-sender { color: var(--color-blue); }

.chat-time {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  align-self: flex-end;
  margin-top: 1px;
}

/* ==========================================================================
   8. CITATION MODAL STYLINGS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 8, 15, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-card {
  width: 90%;
  max-width: 650px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 30px;
  background: #0d1527 !important; /* solid/opaque dark bg */
  border: 2.5px solid rgba(239, 68, 68, 0.45);
  border-radius: 12px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-card {
  transform: scale(1);
}

/* Sidebar Tabs */
.section-header-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.btn-sec-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition-fast);
}

.btn-sec-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-sec-tab.active {
  color: var(--color-cyan);
  background: rgba(6, 182, 212, 0.08);
}

.badge-count {
  background: var(--color-red);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 10px;
  font-family: var(--font-mono);
  margin-left: 2px;
}

.hidden {
  display: none !important;
}

/* Citations Log List */
.citation-log-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}

.citation-log-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--panel-bg-nested);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  border-left: 3px solid var(--color-red);
  transition: all var(--transition-fast);
  min-height: 52px;
}

.citation-log-row:hover {
  border-color: var(--border-active);
  background: rgba(255, 255, 255, 0.02);
}

.citation-log-row.selected {
  border-color: var(--color-red);
  background: rgba(239, 68, 68, 0.05);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}

.citation-log-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.citation-log-id {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-secondary);
}

.citation-log-vessel {
  font-weight: 700;
  font-size: 11px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.citation-log-details {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.citation-log-fine {
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 800;
  color: var(--color-red);
}

.citation-log-speed {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  z-index: 1020;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.modal-close-btn i {
  width: 18px;
  height: 18px;
}

/* USCG Citation Styling details */
.citation-header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.uscg-crest {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid var(--color-red);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-red);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.uscg-crest i {
  width: 24px;
  height: 24px;
}

.citation-title h2 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.citation-title h3 {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}

.citation-legal {
  font-size: 8px;
  font-family: var(--font-mono);
  color: var(--color-amber);
  display: block;
  margin-top: 2px;
}

.citation-divider {
  border: none;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  margin: 16px 0;
}

.citation-status-badge {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.25) 0%, rgba(239, 68, 68, 0.05) 100%);
  border-left: 4px solid var(--color-red);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  font-family: var(--font-header);
}

.citation-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 11px;
}

.citation-table th {
  text-align: left;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  width: 20%;
}

.citation-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  width: 30%;
}

.monospace {
  font-family: var(--font-mono);
}

.vessel-highlight {
  font-weight: 800;
  color: var(--text-primary);
}

.font-bold {
  font-weight: 700;
}

/* Citation Chart Box */
.citation-chart-container {
  background: var(--panel-bg-nested);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.citation-chart-title {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.citation-chart-canvas-wrapper {
  height: 90px;
  position: relative;
}

.citation-alert-notice {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 8px;
  margin-bottom: 20px;
}

.citation-alert-notice i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.citation-alert-notice p {
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.citation-alert-notice strong {
  color: var(--text-primary);
}

/* Citation Billing Details */
.citation-billing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.billing-status {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-green);
  font-family: var(--font-header);
}

.billing-desc {
  font-size: 9px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.fine-label {
  display: block;
  font-size: 9px;
  color: var(--text-secondary);
  text-align: right;
}

.fine-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-red);
  font-family: var(--font-header);
  letter-spacing: -0.02em;
}

/* Modal Footer */
.citation-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

@media (min-width: 480px) {
  .citation-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.barcode-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.barcode {
  width: 160px;
  height: 32px;
  background: linear-gradient(90deg, 
    #fff 0%, #fff 2%, #000 2%, #000 4%, #fff 4%, #fff 5%, #000 5%, #000 8%, #fff 8%, #fff 10%,
    #000 10%, #000 11%, #fff 11%, #fff 14%, #000 14%, #000 18%, #fff 18%, #fff 20%, #000 20%,
    #000 21%, #fff 21%, #fff 25%, #000 25%, #000 26%, #fff 26%, #fff 29%, #000 29%, #000 32%,
    #fff 32%, #fff 35%, #000 35%, #000 39%, #fff 39%, #fff 42%, #000 42%, #000 45%, #fff 45%,
    #fff 46%, #000 46%, #000 49%, #fff 49%, #fff 52%, #000 52%, #000 55%, #fff 55%, #fff 58%,
    #000 58%, #000 62%, #fff 62%, #fff 65%, #000 65%, #000 68%, #fff 68%, #fff 70%, #000 70%,
    #000 71%, #fff 71%, #fff 74%, #000 74%, #000 78%, #fff 78%, #fff 80%, #000 80%, #000 82%,
    #fff 82%, #fff 85%, #000 85%, #000 88%, #fff 88%, #fff 90%, #000 90%, #000 92%, #fff 92%,
    #fff 95%, #000 95%, #000 98%, #fff 98%, #fff 100%
  );
  filter: invert(1); /* Invert barcode lines to be white on dark */
  opacity: 0.75;
}

.barcode-number {
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-muted);
  text-align: center;
}

.citation-actions {
  display: flex;
  gap: 10px;
  width: 100%;
}

.citation-actions button {
  flex: 1;
  justify-content: center;
}

@media (min-width: 480px) {
  .citation-actions {
    width: auto;
  }
  .citation-actions button {
    flex: none;
  }
}

/* Button Classes */
.btn-primary {
  background: var(--color-cyan);
  color: var(--text-dark);
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-header);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: #22d3ee;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.btn-primary i {
  width: 16px;
  height: 16px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-header);
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-report-sighting-header {
  background: linear-gradient(135deg, var(--color-pink) 0%, var(--color-red) 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-header);
  transition: all var(--transition-fast);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
}

.btn-report-sighting-header:hover {
  opacity: 0.95;
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.6);
  transform: translateY(-1px);
}

.btn-report-sighting-header i {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   9. TOOLTIP COMPONENT (Pure CSS)
   ========================================================================== */

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

.tooltip-right::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 105%;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 500;
  white-space: normal;
  width: 180px;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  transition: all var(--transition-fast);
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.4);
}

.layer-checkbox-container.tooltip-right::after {
  left: calc(100% + 8px);
}

.tooltip-right:hover::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

/* ==========================================================================
   10. PRINT MEDIA OVERRIDES (For citation printing)
   ========================================================================== */

@media print {
  body * {
    visibility: hidden;
  }
  .modal-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 1;
  }
  #citation-modal, #citation-modal * {
    visibility: visible;
  }
  .modal-card {
    border: none;
    box-shadow: none;
    background: white !important;
    color: black;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }
  .citation-table th {
    color: #444;
    border-bottom-color: #ccc;
  }
  .citation-table td {
    color: #000;
    border-bottom-color: #ccc;
  }
  .barcode {
    filter: none;
  }
  .modal-close-btn, .citation-actions {
    display: none !important;
  }
  .uscg-crest {
    border-color: black;
    color: black;
  }
}

/* ==========================================================================
   11. FLOATING TOOL DOCK & ALERT CARD & 3D MODAL
   ========================================================================== */

.floating-tool-dock {
  position: absolute;
  left: 20px;
  top: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(13, 21, 39, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--card-shadow);
}

.dock-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  width: 58px;
  height: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.dock-btn.active {
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-cyan);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: var(--glow-shadow-cyan);
}

.dock-btn i {
  width: 20px;
  height: 20px;
}

.dock-btn span {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-header);
}

.floating-alert-card {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  width: 280px;
  background: rgba(13, 21, 39, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(239, 68, 68, 0.3);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 12px;
  transition: all var(--transition-normal);
}

.alert-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.alert-card-header h4 {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-red);
  letter-spacing: 0.08em;
  margin: 0;
  font-family: var(--font-header);
}

.alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-red);
  box-shadow: 0 0 8px var(--color-red);
}

.alert-zone-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-family: var(--font-header);
}

.alert-speed-rec {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.alert-reason {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.3;
  margin: 0;
}

/* 3D Profile Modal Overlay */
.modal-3d-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 11, 19, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-3d-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-3d-card {
  width: 750px;
  height: 500px;
  display: flex;
  flex-direction: column;
  background: var(--panel-bg-solid);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform var(--transition-normal);
}

.modal-3d-overlay.open .modal-3d-card {
  transform: scale(1);
}

.modal-3d-close-btn:hover {
  color: var(--text-primary) !important;
  background: rgba(255, 255, 255, 0.05);
}

.view-label-indicator {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-cyan);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-header);
}

.view-label-indicator i {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   SOURCE CONNECTION MANAGER STYLING
   ========================================================================== */
.btn-test-connection {
  padding: 3px 8px;
  font-size: 9px;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.08);
  color: var(--color-cyan);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.btn-test-connection:hover:not(:disabled) {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.5);
}

.btn-test-connection:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.readiness-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.readiness-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.readiness-title {
  font-weight: 600;
  font-size: 11px;
  color: var(--text-primary);
}

.readiness-status {
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
}

.readiness-status.yes {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.readiness-status.no {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.readiness-status.optional {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.readiness-status.maybe {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.readiness-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--text-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 4px;
  margin-top: 2px;
}

.readiness-details span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.countdown-timer {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--color-cyan);
  background: rgba(6, 182, 212, 0.06);
  padding: 1px 4px;
  border-radius: 3px;
}

.troubleshooting-line {
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.troubleshooting-line.success {
  color: #10b981;
}

.troubleshooting-line.warn {
  color: #fbbf24;
}

.troubleshooting-line.danger {
  color: #f87171;
}

.troubleshooting-header {
  font-weight: 700;
  font-size: 10px;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.troubleshooting-bullet {
  padding-left: 10px;
  position: relative;
  margin-top: 3px;
}

.troubleshooting-bullet::before {
  content: "»";
  position: absolute;
  left: 0;
  color: var(--color-cyan);
}

/* Custom Leaflet Provenance Popup styling overrides */
.custom-provenance-popup .leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.96) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(8px) !important;
  padding: 0 !important;
}
.custom-provenance-popup .leaflet-popup-content {
  margin: 0 !important;
}
.custom-provenance-popup .leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.96) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

