/* ==========================================================================
   SATELLITE DATA VISUALIZATION PLATFORM — Design System
   Version: 2.0.0
   Premium dark-themed UI with glassmorphic panels, orbital animations,
   and enterprise-grade component library.
   ========================================================================== */

/* ── Google Fonts ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ==========================================================================
   0. DESIGN TOKENS (Custom Properties)
   ========================================================================== */
:root {
  /* ── Depth palette ─────────────────────────────────────────────────────── */
  --bg-deepest:       #06080f;
  --bg-deep:          #0a0e1a;
  --bg-surface:       #111827;
  --bg-card:          rgba(15, 23, 42, 0.80);
  --bg-card-hover:    rgba(15, 23, 42, 0.92);
  --bg-elevated:      rgba(30, 41, 59, 0.60);
  --bg-input:         rgba(15, 23, 42, 0.55);

  /* ── Accent colours ────────────────────────────────────────────────────── */
  --accent-primary:   #00d4ff;
  --accent-secondary: #7c3aed;
  --accent-tertiary:  #f59e0b;
  --clr-success:      #10b981;
  --clr-error:        #ef4444;
  --clr-warning:      #f59e0b;
  --clr-info:         #3b82f6;

  /* ── Glow variants ─────────────────────────────────────────────────────── */
  --glow-primary:     rgba(0, 212, 255, 0.35);
  --glow-secondary:   rgba(124, 58, 237, 0.30);
  --glow-tertiary:    rgba(245, 158, 11, 0.30);
  --glow-success:     rgba(16, 185, 129, 0.30);
  --glow-error:       rgba(239, 68, 68, 0.30);

  /* ── Text ──────────────────────────────────────────────────────────────── */
  --text-primary:     #e2e8f0;
  --text-secondary:   #94a3b8;
  --text-muted:       #64748b;
  --text-inverse:     #06080f;

  /* ── Borders ───────────────────────────────────────────────────────────── */
  --border-subtle:    rgba(148, 163, 184, 0.08);
  --border-default:   rgba(148, 163, 184, 0.12);
  --border-hover:     rgba(0, 212, 255, 0.25);
  --border-focus:     rgba(0, 212, 255, 0.50);

  /* ── Radii ─────────────────────────────────────────────────────────────── */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* ── Shadows ───────────────────────────────────────────────────────────── */
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:   0 4px 16px rgba(0,0,0,0.45);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.55);
  --shadow-xl:   0 16px 48px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 20px var(--glow-primary);

  /* ── Sizing ────────────────────────────────────────────────────────────── */
  --sidebar-collapsed: 70px;
  --sidebar-expanded:  240px;
  --header-height:     56px;
  --chat-width:        400px;

  /* ── Transitions ───────────────────────────────────────────────────────── */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --transition:   0.3s var(--ease-default);
  --transition-fast: 0.15s var(--ease-default);
  --transition-slow: 0.5s var(--ease-default);

  /* ── Z-index stack ─────────────────────────────────────────────────────── */
  --z-sidebar:  100;
  --z-header:   90;
  --z-chat:     200;
  --z-modal:    500;
  --z-toast:    600;
  --z-tooltip:  700;
}

/* ==========================================================================
   1. RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-deepest);
  color: var(--text-primary);
  line-height: 1.6;
  overflow: hidden;
  min-height: 100vh;
}

a { color: var(--accent-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: #33dfff; }

img, svg { display: block; max-width: 100%; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

::selection {
  background: rgba(0, 212, 255, 0.25);
  color: #fff;
}

/* ==========================================================================
   2. CUSTOM SCROLLBAR
   ========================================================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-full);
  transition: background var(--transition);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.35);
}
::-webkit-scrollbar-corner { background: transparent; }

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.18) transparent;
}

/* ==========================================================================
   3. SPLASH SCREEN
   ========================================================================== */
.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-deepest);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

.splash-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.splash-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.125rem;
  color: #fff;
  letter-spacing: -0.02em;
  animation: glowPulse 2.5s ease-in-out infinite;
}

.splash-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.04em;
}

.splash-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -0.01em;
}

.splash-loader {
  width: 200px;
  height: 3px;
  background: rgba(148, 163, 184, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.loader-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 4px;
  transition: width 0.4s ease;
}

.splash-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ==========================================================================
   4. LAYOUT -- App Container
   ========================================================================== */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-deepest);
}

/* ==========================================================================
   4. SIDEBAR NAVIGATION
   ========================================================================== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-collapsed);
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  z-index: var(--z-sidebar);
  transition: width var(--transition);
  overflow: hidden;
}

.sidebar:hover,
.sidebar.expanded {
  width: var(--sidebar-expanded);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  margin-bottom: 24px;
  min-height: 38px;
  width: 100%;
  overflow: hidden;
}

.sidebar-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
  letter-spacing: -0.02em;
}

.sidebar-brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}

.sidebar:hover .sidebar-brand,
.sidebar.expanded .sidebar-brand {
  opacity: 1;
  transform: translateX(0);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 0 10px;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  user-select: none;
}

.nav-item .nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.nav-item .nav-icon svg {
  width: 18px;
  height: 18px;
}

.nav-item .nav-label {
  font-size: 0.8125rem;
  font-weight: 500;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--transition), transform var(--transition);
}

.sidebar:hover .nav-item .nav-label,
.sidebar.expanded .nav-item .nav-label {
  opacity: 1;
  transform: translateX(0);
}

.nav-item:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.nav-item.active {
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.08);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  background: var(--accent-primary);
  box-shadow: 0 0 10px var(--glow-primary);
}

.nav-item.active .nav-icon {
  filter: drop-shadow(0 0 6px var(--glow-primary));
}

.sidebar-footer {
  padding: 12px 10px 0;
  width: 100%;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   5. HEADER BAR
   ========================================================================== */
.header-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(10, 14, 26, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-header);
}

.header-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-title .breadcrumb {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.8125rem;
}

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

/* ==========================================================================
   6. MAIN CONTENT AREA
   ========================================================================== */
.main-content {
  margin-left: var(--sidebar-collapsed);
  flex: 1;
  position: relative;
  height: 100vh;
  overflow: hidden;
  transition: margin-left var(--transition);
  background: var(--bg-deepest);
}

.content-area {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.view-panel {
  pointer-events: none;
  background: rgba(10, 14, 26, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), 0 0 20px rgba(0, 212, 255, 0.03);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s, visibility 0.4s;
  display: flex;
  flex-direction: column;
}

.view-panel.active {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

/* Embedded external apps (Agri Co-Pilot, Soil Health Card) — full-bleed iframe */
.view-panel.embed-view {
  padding: 0;
  overflow: hidden;
  background: rgba(10, 14, 26, 0.9);
}
.embed-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius-lg);
  background: #0a0e1a;
}

/* Left overlay panels (Missions, Stations, Sentinel-2) */
#view-missions, #view-stations, #view-sentinel2 {
  position: absolute;
  left: 16px;
  top: 92px;
  bottom: 24px;
  width: 440px;
  z-index: 20;
  transform: translateX(-110%);
  padding: 20px;
  overflow-y: auto;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s, visibility 0.4s, top 0.3s ease;
}

#view-missions.active, #view-stations.active, #view-sentinel2.active {
  transform: translateX(0);
}

/* Right overlay panels (Dashboard, Tracker, Downloads) */
#view-dashboard, #view-tracker, #view-downloads {
  position: absolute;
  right: 16px;
  top: 92px;
  bottom: 24px;
  width: 480px;
  z-index: 20;
  transform: translateX(110%);
  padding: 20px;
  overflow-y: auto;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s, visibility 0.4s, top 0.3s ease;
}

#view-dashboard.active, #view-tracker.active, #view-downloads.active {
  transform: translateX(0);
}

/* Dynamic positioning adjustment when filter bar is active */
.has-filter-bar #view-missions,
.has-filter-bar #view-stations,
.has-filter-bar #view-sentinel2,
.has-filter-bar #view-dashboard,
.has-filter-bar #view-tracker,
.has-filter-bar #view-downloads,
.has-filter-bar .chat-panel {
  top: 168px;
}

/* Bottom drawer panel (Data Table) */
#view-datatable {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 24px;
  height: 38vh;
  min-height: 280px;
  z-index: 25;
  transform: translateY(110%);
  padding: 16px 20px;
  overflow: hidden;
}

#view-datatable.active {
  transform: translateY(0);
}

/* Map overlay holds legend & controls (invisible overlay) */
#view-map {
  background: none;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: 0;
}
#view-map.active {
  transform: none;
}

/* ==========================================================================
   7. MAP VIEW
   ========================================================================== */
.map-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

#map {
  width: 100%;
  height: 100%;
  background: var(--bg-deepest);
}

.map-overlay-controls {
  position: absolute;
  left: 16px;
  bottom: 24px;
  z-index: 15;
  pointer-events: auto;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
}

.map-legend {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 15;
  pointer-events: auto;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  width: 200px;
}

/* Map overlay controls */
.map-overlay {
  position: absolute;
  z-index: 10;
  pointer-events: none;
}

.map-overlay > * {
  pointer-events: auto;
}

.map-overlay.top-left   { top: 16px; left: 16px; }
.map-overlay.top-right  { top: 16px; right: 16px; }
.map-overlay.bottom-left  { bottom: 16px; left: 16px; }
.map-overlay.bottom-right { bottom: 16px; right: 16px; }

.map-control-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-lg);
}

/* Station markers */
.station-marker {
  width: 14px;
  height: 14px;
  background: var(--accent-primary);
  border: 2px solid rgba(0, 212, 255, 0.5);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--glow-primary);
  position: relative;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.station-marker:hover {
  transform: scale(1.4);
}

.station-marker::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 212, 255, 0.25);
  animation: pulse 2s ease-out infinite;
}

/* Orbit visualisation overlay */
.orbit-viz {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.orbit-viz canvas {
  width: 100%;
  height: 100%;
}

.orbit-path {
  stroke: var(--accent-primary);
  stroke-width: 1.5;
  fill: none;
  opacity: 0.6;
  stroke-dasharray: 8 4;
  animation: orbitPath 30s linear infinite;
}

/* ==========================================================================
   8. DASHBOARD VIEW — Grid & Chart Cards
   ========================================================================== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  flex: 1;
}

.chart-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.chart-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(0, 212, 255, 0.08) 0%,
    transparent 50%,
    rgba(124, 58, 237, 0.06) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.chart-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

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

.chart-card.full-width {
  grid-column: 1 / -1;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.chart-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.chart-body {
  flex: 1;
  min-height: 200px;
  position: relative;
}

/* ==========================================================================
   9. STAT CARDS
   ========================================================================== */
.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  font-size: 1.125rem;
}

.stat-card .stat-icon.cyan    { background: rgba(0, 212, 255, 0.12); color: var(--accent-primary); }
.stat-card .stat-icon.purple  { background: rgba(124, 58, 237, 0.12); color: var(--accent-secondary); }
.stat-card .stat-icon.amber   { background: rgba(245, 158, 11, 0.12); color: var(--accent-tertiary); }
.stat-card .stat-icon.green   { background: rgba(16, 185, 129, 0.12); color: var(--clr-success); }

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

.stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-trend {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.stat-trend.up   { color: var(--clr-success); }
.stat-trend.down { color: var(--clr-error); }

/* ==========================================================================
   10. DATA TABLE
   ========================================================================== */
.data-table-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

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

.table-controls .search-input {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px 14px 8px 36px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  min-width: 220px;
  transition: all var(--transition);
}

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

.table-controls .search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.10);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

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

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition);
}

.data-table th:hover { color: var(--accent-primary); }

.data-table th.sorted { color: var(--accent-primary); }

.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.25);
}

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

.data-table tbody tr.selected {
  background: rgba(0, 212, 255, 0.08);
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.table-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.table-pagination button {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.table-pagination button:hover { background: var(--bg-elevated); color: var(--text-primary); }
.table-pagination button.active { background: rgba(0, 212, 255, 0.12); color: var(--accent-primary); }
.table-pagination button:disabled { opacity: 0.35; cursor: not-allowed; }

/* ==========================================================================
   11. DOWNLOADS SECTION
   ========================================================================== */
.download-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.download-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
}

.download-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.download-card .file-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: rgba(0, 212, 255, 0.08);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.download-card .file-name {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.download-card .file-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.download-progress {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.download-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease-default);
}

/* ==========================================================================
   12. MISSION LIBRARIES / FILE TREE
   ========================================================================== */
.mission-section {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.mission-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: all var(--transition);
}

.mission-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.mission-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.mission-card-header .mission-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
  flex-shrink: 0;
}

.file-tree {
  list-style: none;
  font-size: 0.8125rem;
}

.file-tree .file-tree {
  padding-left: 18px;
  border-left: 1px solid var(--border-subtle);
  margin-left: 8px;
}

.file-tree-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  user-select: none;
}

.file-tree-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.file-tree-item.active {
  background: rgba(0, 212, 255, 0.08);
  color: var(--accent-primary);
}

.file-tree-item .tree-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.file-tree-item.expanded .tree-icon {
  transform: rotate(90deg);
}

.file-tree-item .tree-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-tree-item .tree-size {
  font-size: 0.6875rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ==========================================================================
   13. AI CHAT PANEL
   ========================================================================== */
.chat-panel {
  position: absolute;
  right: 16px;
  top: 92px;
  bottom: 24px;
  width: 440px;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-chat);
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s, top 0.3s ease;
  opacity: 0;
}

.chat-panel.open {
  transform: translateX(0);
  opacity: 1;
}

/* Chat header — matches HTML class names */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.chat-agent-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-agent-status {
  font-size: 0.6875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

/* Chat welcome */
.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
  gap: 12px;
}

.chat-welcome-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(124, 58, 237, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.chat-welcome h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chat-welcome p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 320px;
}

/* Quick prompts */
.quick-prompts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-top: 12px;
}

.quick-prompt {
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.quick-prompt:hover {
  background: rgba(0, 212, 255, 0.06);
  border-color: rgba(0, 212, 255, 0.2);
  color: var(--text-primary);
}

/* Chat input wrapper */
.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.chat-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color 0.2s ease;
}

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

.chat-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.chat-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  border: none;
}

.chat-send:hover {
  transform: scale(1.05);
  box-shadow: 0 0 16px var(--glow-primary);
}

.chat-disclaimer {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* Chat thinking/reasoning */
.thinking-block {
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  font-style: italic;
}

.thinking-header {
  font-weight: 600;
  color: var(--accent-secondary);
  font-style: normal;
  margin-bottom: 6px;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.chat-panel-header h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-panel-header .ai-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clr-success);
  box-shadow: 0 0 8px var(--glow-success);
  animation: pulse 2s ease-in-out infinite;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble {
  max-width: 88%;
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  line-height: 1.65;
  word-break: break-word;
  animation: fadeIn 0.3s var(--ease-default);
}

.chat-bubble.ai {
  align-self: flex-start;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-bottom-left-radius: var(--radius-sm);
}

.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.18), rgba(124, 58, 237, 0.14));
  border: 1px solid rgba(0, 212, 255, 0.15);
  color: var(--text-primary);
  border-bottom-right-radius: var(--radius-sm);
}

.chat-bubble .bubble-time {
  display: block;
  font-size: 0.625rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.chat-typing {
  display: flex;
  gap: 4px;
  padding: 14px 16px;
  align-self: flex-start;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: float 1.4s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.chat-input-area textarea {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  resize: none;
  min-height: 40px;
  max-height: 120px;
  line-height: 1.5;
  transition: border-color var(--transition);
}

.chat-input-area textarea::placeholder { color: var(--text-muted); }

.chat-input-area textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.chat-input-area .send-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  box-shadow: 0 0 12px var(--glow-primary);
}

.chat-input-area .send-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 0 20px var(--glow-primary);
}

/* ==========================================================================
   14. MODAL
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 15, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl), 0 0 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.92) translateY(12px);
  transition: transform var(--transition);
  overflow: hidden;
}

.modal-overlay.visible .modal {
  transform: scale(1) translateY(0);
}

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

.modal-header h2 {
  font-size: 1.0625rem;
  font-weight: 600;
}

.modal-header .modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-header .modal-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* Settings modal inner components */
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.setting-group:last-child {
  margin-bottom: 0;
}

.setting-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.setting-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

.input-styled {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  transition: border-color 0.2s ease;
}

.input-styled:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
  outline: none;
}

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

.range-styled {
  width: 100%;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(148, 163, 184, 0.15);
  border-radius: 4px;
  outline: none;
}

.range-styled::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 8px var(--glow-primary);
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
}

/* Stat row layout */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

/* ==========================================================================
   15. TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 420px;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideInRight 0.4s var(--ease-default);
  transition: all var(--transition);
}

.toast.dismissing {
  animation: slideOutRight 0.3s var(--ease-default) forwards;
}

.toast .toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.toast.success { border-left: 3px solid var(--clr-success); }
.toast.success .toast-icon { color: var(--clr-success); }
.toast.error   { border-left: 3px solid var(--clr-error); }
.toast.error .toast-icon   { color: var(--clr-error); }
.toast.warning { border-left: 3px solid var(--clr-warning); }
.toast.warning .toast-icon { color: var(--clr-warning); }
.toast.info    { border-left: 3px solid var(--clr-info); }
.toast.info .toast-icon    { color: var(--clr-info); }

.toast-content {
  flex: 1;
}

.toast-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-message {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.toast-close {
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
  flex-shrink: 0;
}
.toast-close:hover { color: var(--text-primary); }

/* ==========================================================================
   16. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* Primary */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #0096b7);
  color: var(--text-inverse);
  box-shadow: 0 2px 12px var(--glow-primary);
}

.btn-primary:hover {
  box-shadow: 0 4px 22px var(--glow-primary);
  filter: brightness(1.1);
}

/* Secondary */
.btn-secondary {
  background: rgba(124, 58, 237, 0.12);
  color: var(--accent-secondary);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.btn-secondary:hover {
  background: rgba(124, 58, 237, 0.20);
  box-shadow: 0 0 16px var(--glow-secondary);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

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

/* Icon-only */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

/* Danger */
.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: var(--clr-error);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.22);
  box-shadow: 0 0 14px var(--glow-error);
}

/* Small */
.btn-sm {
  padding: 5px 12px;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   17. BADGES & CHIPS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge.cyan    { background: rgba(0, 212, 255, 0.12); color: var(--accent-primary); }
.badge.purple  { background: rgba(124, 58, 237, 0.12); color: var(--accent-secondary); }
.badge.amber   { background: rgba(245, 158, 11, 0.12); color: var(--accent-tertiary); }
.badge.green   { background: rgba(16, 185, 129, 0.12); color: var(--clr-success); }
.badge.red     { background: rgba(239, 68, 68, 0.12); color: var(--clr-error); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.chip.active {
  background: rgba(0, 212, 255, 0.10);
  border-color: rgba(0, 212, 255, 0.30);
  color: var(--accent-primary);
}

.chip .chip-remove {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.chip .chip-remove:hover { color: var(--clr-error); }

/* ==========================================================================
   18. FILTER BAR & CONTROLS
   ========================================================================== */
.filter-bar {
  position: absolute;
  top: 92px;
  left: 16px;
  right: 16px;
  z-index: var(--z-header);
  background: rgba(10, 14, 26, 0.65);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  flex-wrap: wrap;
  transition: transform 0.3s ease;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.select-styled {
  appearance: none;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 8px 32px 8px 12px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.select-styled:hover { border-color: var(--border-hover); }

.select-styled:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.10);
}

/* ==========================================================================
   19. TAB NAVIGATION
   ========================================================================== */
.dataset-selector {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-md);
  padding: 3px;
  border: 1px solid var(--border-subtle);
}

.dataset-tab {
  padding: 7px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
}

.dataset-tab:hover {
  color: var(--text-secondary);
}

.dataset-tab.active {
  background: var(--bg-elevated);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   20. API KEY INPUT
   ========================================================================== */
.api-key-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  transition: all var(--transition);
}

.api-key-input::placeholder { color: var(--text-muted); font-family: 'Inter', sans-serif; letter-spacing: 0; }

.api-key-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.10), 0 0 16px rgba(0, 212, 255, 0.06);
}

.api-key-wrapper {
  position: relative;
}

.api-key-wrapper .toggle-visibility {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.api-key-wrapper .toggle-visibility:hover { color: var(--text-primary); }

/* ==========================================================================
   21. LOADING SKELETONS
   ========================================================================== */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.4) 25%,
    rgba(51, 65, 85, 0.4) 50%,
    rgba(30, 41, 59, 0.4) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.4) 25%,
    rgba(51, 65, 85, 0.4) 50%,
    rgba(30, 41, 59, 0.4) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-text:last-child { width: 60%; }
.skeleton-text.short { width: 40%; }

.skeleton-chart {
  height: 200px;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.4) 25%,
    rgba(51, 65, 85, 0.4) 50%,
    rgba(30, 41, 59, 0.4) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(
    90deg,
    rgba(30, 41, 59, 0.4) 25%,
    rgba(51, 65, 85, 0.4) 50%,
    rgba(30, 41, 59, 0.4) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
}

/* ==========================================================================
   22. EMPTY STATE
   ========================================================================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  animation: fadeIn 0.5s var(--ease-default);
}

.empty-state .empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ==========================================================================
   23. TOOLTIP
   ========================================================================== */
.tooltip-custom {
  position: relative;
}

.tooltip-custom::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 0.6875rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: var(--z-tooltip);
  box-shadow: var(--shadow-md);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

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

/* ==========================================================================
   24. PROGRESS RING
   ========================================================================== */
.progress-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring .ring-bg {
  stroke: var(--bg-elevated);
  fill: none;
}

.progress-ring .ring-fill {
  fill: none;
  stroke: var(--accent-primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s var(--ease-default);
}

.progress-ring .ring-label {
  position: absolute;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   25. STATUS INDICATORS
   ========================================================================== */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.online {
  background: var(--clr-success);
  box-shadow: 0 0 8px var(--glow-success);
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.offline {
  background: var(--text-muted);
}

.status-dot.warning {
  background: var(--clr-warning);
  box-shadow: 0 0 8px var(--glow-tertiary);
  animation: pulse 2s ease-in-out infinite;
}

.status-dot.error {
  background: var(--clr-error);
  box-shadow: 0 0 8px var(--glow-error);
  animation: pulse 1.5s ease-in-out infinite;
}

/* ==========================================================================
   26. FORM ELEMENTS
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-input,
.form-textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  transition: all var(--transition);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); }

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.10);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.form-error-text {
  font-size: 0.6875rem;
  color: var(--clr-error);
}

.form-input.error { border-color: var(--clr-error); }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10); }

/* Checkbox / toggle */
.toggle-switch {
  width: 40px;
  height: 22px;
  background: rgba(100, 116, 139, 0.3);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--text-primary);
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform var(--transition);
}

.toggle-switch.active {
  background: var(--accent-primary);
}

.toggle-switch.active::after {
  transform: translateX(18px);
}

/* ==========================================================================
   27. DIVIDERS & UTILITY CLASSES
   ========================================================================== */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 16px 0;
  border: none;
}

.text-primary   { color: var(--text-primary)   !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted)     !important; }
.text-cyan      { color: var(--accent-primary) !important; }
.text-purple    { color: var(--accent-secondary) !important; }
.text-amber     { color: var(--accent-tertiary) !important; }
.text-success   { color: var(--clr-success)    !important; }
.text-error     { color: var(--clr-error)      !important; }

.flex      { display: flex; }
.flex-col  { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: 4px; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

.mt-auto { margin-top: auto; }
.ml-auto { margin-left: auto; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ==========================================================================
   28. KEYFRAME ANIMATIONS
   ========================================================================== */

/* ── pulse ───────────────────────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.55;
    transform: scale(1.05);
  }
}

/* ── slideInRight ────────────────────────────────────────────────────────── */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ── slideOutRight ───────────────────────────────────────────────────────── */
@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

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

/* ── fadeOut ──────────────────────────────────────────────────────────────── */
@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── shimmer (skeleton loading) ──────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── float (chat typing dots) ────────────────────────────────────────────── */
@keyframes float {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* ── glowPulse ───────────────────────────────────────────────────────────── */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 8px var(--glow-primary);
  }
  50% {
    box-shadow: 0 0 24px var(--glow-primary), 0 0 48px rgba(0, 212, 255, 0.10);
  }
}

/* ── orbitPath (dashed orbit lines) ──────────────────────────────────────── */
@keyframes orbitPath {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -200; }
}

/* ==========================================================================
   29. LEAFLET OVERRIDES  (keep map visually consistent)
   ========================================================================== */
.leaflet-container {
  background: var(--bg-deepest) !important;
  font-family: 'Inter', sans-serif !important;
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  font-size: 1rem !important;
  transition: background var(--transition-fast) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-elevated) !important;
}

.leaflet-popup-content-wrapper {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  border: 1px solid var(--border-default) !important;
}

.leaflet-popup-tip {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-default) !important;
  box-shadow: none !important;
}

.leaflet-popup-close-button {
  color: var(--text-muted) !important;
}

/* ==========================================================================
   30. RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* ── ≤ 1200px  (Tablet landscape / small desktop) ────────────────────────── */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .chat-panel {
    width: 340px;
  }

  .download-section {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .mission-section {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* ── ≤ 768px  (Tablet portrait) ──────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --sidebar-collapsed: 0px;
    --header-height: 50px;
  }

  .sidebar {
    width: 0;
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    width: var(--sidebar-expanded);
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  .main-content {
    margin-left: 0;
  }

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

  .view-panel {
    padding: 16px;
  }

  .chat-panel {
    width: 100%;
  }

  .toast-container {
    left: 16px;
    right: 16px;
  }

  .toast {
    min-width: 0;
    max-width: 100%;
  }

  .modal {
    width: 95%;
    max-height: 90vh;
    border-radius: var(--radius-lg);
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .header-title .breadcrumb { display: none; }
}

/* ── ≤ 480px  (Mobile) ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .stat-card { padding: 16px; }

  .stat-value { font-size: 1.375rem; }

  .chart-card { padding: 14px; }

  .chart-body { min-height: 160px; }

  .btn { padding: 8px 14px; font-size: 0.75rem; }

  .dataset-selector { overflow-x: auto; }

  .header-bar { padding: 0 14px; }

  .modal-body { padding: 16px; }

  .empty-state { padding: 40px 16px; }

  .table-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .table-controls .search-input { min-width: 0; width: 100%; }

  .data-table {
    font-size: 0.75rem;
  }

  .data-table th,
  .data-table td {
    padding: 8px 10px;
  }
}

/* ==========================================================================
   31. PRINT
   ========================================================================== */
@media print {
  .sidebar,
  .chat-panel,
  .toast-container,
  .modal-overlay { display: none !important; }

  .main-content { margin-left: 0 !important; }

  body {
    background: #fff;
    color: #000;
  }

  .chart-card,
  .stat-card,
  .data-table-container {
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: none;
    backdrop-filter: none;
  }
}

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

/* ==========================================================================
   33. HIGH-CONTRAST MODE
   ========================================================================== */
@media (prefers-contrast: high) {
  :root {
    --border-subtle:  rgba(148, 163, 184, 0.22);
    --border-default: rgba(148, 163, 184, 0.30);
  }

  .btn-primary { border: 1px solid var(--accent-primary); }
  .nav-item.active { border: 1px solid var(--accent-primary); }
}

/* ==========================================================================
   34. MAPBOX GL JS — Custom Popup & Controls
   ========================================================================== */
.mapboxgl-popup-content {
  background: rgba(10, 14, 26, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-lg) !important;
  padding: 0 !important;
  box-shadow: var(--shadow-xl) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  max-width: 360px !important;
}

.mapboxgl-popup-tip {
  border-top-color: rgba(10, 14, 26, 0.95) !important;
}

.mapboxgl-popup-close-button {
  color: var(--text-muted) !important;
  font-size: 18px !important;
  padding: 8px 12px !important;
  right: 2px !important;
  top: 2px !important;
  transition: color 0.2s ease;
}

.mapboxgl-popup-close-button:hover {
  color: var(--accent-primary) !important;
  background: transparent !important;
}

.popup-content {
  padding: 16px 18px;
}

.popup-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.popup-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 0.8125rem;
  gap: 12px;
}

.popup-row span:first-child {
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
}

.popup-row strong {
  color: var(--text-primary);
  font-weight: 600;
  text-align: right;
}

.popup-row code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent-primary);
  background: rgba(0, 212, 255, 0.08);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.mapboxgl-ctrl-group {
  background: rgba(10, 14, 26, 0.85) !important;
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
}

.mapboxgl-ctrl-group button {
  background: transparent !important;
  border-bottom-color: var(--border-subtle) !important;
}

.mapboxgl-ctrl-group button:hover {
  background: rgba(0, 212, 255, 0.08) !important;
}

.mapboxgl-ctrl-group button .mapboxgl-ctrl-icon {
  filter: invert(1) brightness(0.85);
}

.mapboxgl-ctrl-scale {
  background: rgba(10, 14, 26, 0.75) !important;
  border-color: var(--accent-primary) !important;
  color: var(--text-secondary) !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  font-size: 0.6875rem !important;
  padding: 2px 8px !important;
  border-radius: var(--radius-sm) !important;
}

/* Map Layer Toggles */
.map-overlay-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
}

.map-layer-toggle {
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}

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

.toggle-label input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 14px;
  height: 14px;
}

/* Map Legend */
.map-legend {
  position: absolute;
  bottom: 32px;
  left: 16px;
  z-index: 10;
  background: rgba(10, 14, 26, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  min-width: 180px;
}

.legend-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.legend-gradient {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right, #064e3b, #059669, #34d399, #fbbf24, #f97316, #ef4444);
  margin-bottom: 6px;
}

.legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ==========================================================================
   35. SENTINEL-2 VIEW
   ========================================================================== */
.s2-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.s2-stat-grid .stat-card {
  text-align: center;
  align-items: center;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.06), rgba(124, 58, 237, 0.04));
}

.sentinel2-hero {
  margin-bottom: 8px;
}

/* Band resolution color coding */
#s2-bands-body tr[data-res="10"] td:nth-child(5) {
  color: #10b981;
  font-weight: 700;
}

#s2-bands-body tr[data-res="20"] td:nth-child(5) {
  color: #f59e0b;
  font-weight: 700;
}

#s2-bands-body tr[data-res="60"] td:nth-child(5) {
  color: #ef4444;
  font-weight: 700;
}

/* Sentinel-2 product cards with level badges */
.s2-product-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
}

.s2-product-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.s2-level-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.s2-level-badge.l1b { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.s2-level-badge.l1c { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.s2-level-badge.l2a { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.s2-level-badge.l3 { background: rgba(0, 212, 255, 0.15); color: #67e8f9; }

/* Orbit info cards */
.orbit-info-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.orbit-info-card h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.orbit-info-card .info-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border-subtle);
}

.orbit-info-card .info-row:last-child {
  border-bottom: none;
}

.orbit-info-card .info-row .label {
  color: var(--text-muted);
}

.orbit-info-card .info-row .value {
  color: var(--text-primary);
  font-weight: 600;
}

/* Satellite card with status indicator */
.satellite-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
}

.satellite-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

.satellite-card .sat-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.satellite-card .sat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.satellite-card .sat-status.operational {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.satellite-card .sat-status.extended {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.satellite-card .sat-detail {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.8125rem;
}

.satellite-card .sat-detail .label { color: var(--text-muted); }
.satellite-card .sat-detail .value { color: var(--text-primary); font-weight: 500; }

/* ==========================================================================
   36. RESPONSIVE — Sentinel-2 Grid
   ========================================================================== */
@media (max-width: 768px) {
  .s2-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .s2-stat-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   37. ORBIT TRACKER VIEW
   ========================================================================== */
.tracker-section {
  padding-bottom: 40px;
}

.tracker-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  margin-bottom: 24px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.tracker-control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 150px;
}

.control-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.tracker-select {
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.tracker-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.10);
}

.tracker-select option,
.tracker-select optgroup {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.tracker-btn {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all var(--transition);
  white-space: nowrap;
  border: none;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
  min-height: 42px;
}

.tracker-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0, 212, 255, 0.35);
}

.tracker-btn:active {
  transform: translateY(0);
}

/* Tracker Info Grid */
.tracker-info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.tracker-info-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: all var(--transition);
}

.tracker-info-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tracker-info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.08);
  border-radius: var(--radius-md);
}

.tracker-info-content h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tracker-info-content p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Widget Wrapper */
.tracker-widget-wrapper {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#tracker-widget-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

#tracker-widget-container iframe,
#tracker-widget-container > div {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Placeholder */
.tracker-placeholder {
  text-align: center;
  max-width: 520px;
  padding: 40px 20px;
}

.tracker-placeholder-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.tracker-placeholder h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.tracker-placeholder p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.tracker-feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.tracker-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 8px 14px;
  background: rgba(0, 212, 255, 0.04);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.feature-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
}

/* Loading */
.tracker-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
}

.tracker-loading .loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-default);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.tracker-loading p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Error */
.tracker-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px;
  text-align: center;
}

.tracker-error h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--clr-error);
}

.tracker-error p {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Quick Track Grid */
.quick-track-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.quick-track-btn {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.quick-track-btn:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.15);
  background: rgba(0, 212, 255, 0.06);
}

.quick-track-btn:active {
  transform: translateY(-1px);
}

.qt-icon {
  font-size: 1.5rem;
}

.qt-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.qt-norad {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ERDAS Info Card */
.erdas-info-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 12px;
}

.erdas-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.erdas-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  letter-spacing: 0.04em;
}

.erdas-header h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.erdas-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.erdas-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.erdas-region-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  cursor: default;
}

.erdas-region-chip:hover {
  border-color: var(--border-hover);
  background: rgba(0, 212, 255, 0.04);
}

.erdas-region-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.erdas-region-meta {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Responsive tracker */
@media (max-width: 1024px) {
  .tracker-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tracker-controls {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .tracker-info-grid {
    grid-template-columns: 1fr;
  }
  .quick-track-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   FIN — End of Satellite Platform Design System
   ========================================================================== */


/* ============================================================
   Live Explorer (RurSat) — left overlay panel
   ============================================================ */
#view-explorer {
  position: absolute;
  left: 16px;
  top: 92px;
  bottom: 24px;
  width: 440px;
  z-index: 20;
  transform: translateX(-110%);
  padding: 20px;
  overflow-y: auto;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s, visibility 0.4s, top 0.3s ease;
}
#view-explorer.active { transform: translateX(0); }

.exp-title { font-size: 18px; font-weight: 700; margin: 0 0 14px; }
.exp-section { margin-bottom: 18px; }
.exp-section h4 {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-secondary, #94a3b8); margin: 0 0 8px;
}
.exp-hint { font-size: 12px; color: var(--text-secondary, #94a3b8); margin: 4px 0; }
.exp-row { display: flex; gap: 8px; }
.exp-row .exp-label { flex: 1; }
.exp-label { display: block; font-size: 12px; color: var(--text-secondary, #94a3b8); margin-bottom: 8px; }
.exp-input, #view-explorer select, #view-explorer input[type="date"] {
  display: block; width: 100%; margin-top: 4px; padding: 7px 9px;
  background: rgba(15, 23, 42, 0.7); color: #e2e8f0;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
  font-size: 12px; color-scheme: dark;
}
#view-explorer input[type="range"] { width: 100%; accent-color: #38bdf8; }
.exp-check { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 5px 0; }
.exp-check input { accent-color: #38bdf8; }
.exp-btn { font-size: 12px; padding: 7px 10px; flex: 1; }
.exp-search { width: 100%; margin-top: 8px; }
.exp-error {
  margin-top: 8px; padding: 8px; font-size: 12px; color: #fca5a5;
  border: 1px solid #ef4444; border-radius: 8px;
}
.exp-count { color: #38bdf8; font-size: 11px; }
.exp-day {
  font-size: 11px; color: var(--text-secondary, #94a3b8);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin: 8px 0 4px; padding-bottom: 3px;
}
.exp-card {
  display: flex; gap: 10px; padding: 8px; margin-bottom: 6px;
  background: rgba(15, 23, 42, 0.55); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; cursor: pointer;
}
.exp-card:hover { border-color: #fbbf24; }
.exp-card img { width: 60px; height: 60px; border-radius: 6px; object-fit: cover; background: #000; flex: none; }
.exp-card-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.exp-card-id {
  font-size: 10px; font-family: "JetBrains Mono", monospace;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.exp-card-row { font-size: 11px; }
.exp-card-row.dim { color: var(--text-secondary, #94a3b8); }
.exp-order { align-self: flex-start; flex: none; font-size: 10px; padding: 3px 8px; color: #38bdf8; border-color: #38bdf8; }
.exp-metrics-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-secondary, #94a3b8); margin: 10px 0 6px;
}
.exp-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px;
  background: #713f12; color: #fde68a;
}
.exp-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.exp-metrics > div {
  background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 8px;
}
.exp-metrics b { display: block; font-size: 15px; color: #38bdf8; }
.exp-metrics span { font-size: 10px; color: var(--text-secondary, #94a3b8); }
.exp-legend { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 6px; }
.exp-legend span { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: var(--text-secondary, #94a3b8); }
.exp-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.exp-order-row { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.exp-dl { font-size: 12px; color: #38bdf8; font-weight: 600; text-decoration: none; }
.exp-wait { font-size: 11px; color: #fbbf24; }
.exp-fail { font-size: 11px; color: #fca5a5; }

/* ============================================================
   Live Explorer — tabbed workflow + global geocoder
   ============================================================ */
.exp-geo-wrap{position:relative;margin-bottom:14px}
.exp-geo-ico{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--text-muted);pointer-events:none}
.exp-geo-input{width:100%;padding:10px 12px 10px 36px;font-size:13px;color:#e2e8f0;
  background:rgba(15,23,42,.75);border:1px solid rgba(255,255,255,.12);border-radius:10px}
.exp-geo-input:focus{outline:none;border-color:rgba(0,212,255,.5);box-shadow:0 0 0 3px rgba(0,212,255,.12)}
.exp-geo-hits{position:absolute;top:46px;left:0;right:0;z-index:40;display:none;
  background:rgba(12,18,30,.97);backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.1);border-radius:10px;overflow:hidden;box-shadow:0 12px 34px rgba(0,0,0,.6)}
.exp-geo-hit{padding:9px 12px;font-size:12.5px;color:#cbd5e1;cursor:pointer;border-bottom:1px solid rgba(255,255,255,.06)}
.exp-geo-hit:last-child{border-bottom:none}
.exp-geo-hit:hover{background:rgba(0,212,255,.10);color:#38bdf8}

.exp-tabs{display:flex;gap:4px;margin-bottom:16px;padding:4px;
  background:rgba(15,23,42,.6);border:1px solid rgba(255,255,255,.08);border-radius:12px}
.exp-tab{flex:1;padding:8px 6px;font-size:12.5px;font-weight:600;color:var(--text-secondary);
  background:transparent;border:none;border-radius:8px;cursor:pointer;
  transition:all .2s cubic-bezier(.4,0,.2,1);display:flex;align-items:center;justify-content:center;gap:6px}
.exp-tab:hover{color:#e2e8f0}
.exp-tab.active{background:linear-gradient(135deg,#0284c7,#00d4ff);color:#06080f;box-shadow:0 0 16px rgba(0,212,255,.3)}
.exp-tab-n{font-size:10px;min-width:16px;height:16px;padding:0 4px;border-radius:8px;
  background:rgba(255,255,255,.25);display:inline-flex;align-items:center;justify-content:center}
.exp-tab.active .exp-tab-n{background:rgba(6,8,15,.3)}

.exp-pane{display:none;animation:expfade .3s cubic-bezier(.16,1,.3,1)}
.exp-pane.active{display:block}
@keyframes expfade{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

.exp-section{margin-bottom:18px}
.exp-section h4{font-size:11px;text-transform:uppercase;letter-spacing:.8px;color:var(--text-secondary);margin:0 0 8px}
.exp-hint{font-size:12px;color:var(--text-secondary);margin:4px 0}
.exp-row{display:flex;gap:8px}
.exp-row .exp-label{flex:1}
.exp-label{display:block;font-size:12px;color:var(--text-secondary);margin-bottom:8px}
.exp-input,#view-explorer select,#view-explorer input[type="date"]{display:block;width:100%;margin-top:4px;
  padding:7px 9px;background:rgba(15,23,42,.55);color:#e2e8f0;border:1px solid rgba(255,255,255,.12);
  border-radius:8px;font-size:12px;color-scheme:dark}
#view-explorer input[type="range"]{width:100%;accent-color:#00d4ff}
.exp-check{display:flex;align-items:center;gap:8px;font-size:12px;margin:6px 0}
.exp-check input{accent-color:#00d4ff}
.exp-btn{font-size:12px;padding:8px 10px;flex:1}
.exp-btn.wide{width:100%;margin-bottom:8px}
.exp-search{width:100%;margin-top:8px}
.exp-error{margin-top:8px;padding:8px;font-size:12px;color:#fca5a5;border:1px solid #ef4444;border-radius:8px}
.exp-count{color:#00d4ff;font-size:11px;text-transform:none;letter-spacing:0}
.exp-day{font-size:11px;color:var(--text-secondary);border-bottom:1px solid rgba(255,255,255,.1);margin:8px 0 4px;padding-bottom:3px}
.exp-card{display:flex;gap:10px;padding:8px;margin-bottom:6px;background:rgba(15,23,42,.55);
  border:1px solid rgba(255,255,255,.08);border-radius:10px;cursor:pointer;transition:border-color .2s}
.exp-card:hover{border-color:#fbbf24}
.exp-card img{width:60px;height:60px;border-radius:6px;object-fit:cover;background:#000;flex:none}
.exp-card-meta{min-width:0;display:flex;flex-direction:column;gap:3px}
.exp-card-id{font-size:10px;font-family:'JetBrains Mono',monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.exp-card-row{font-size:11px}
.exp-card-row.dim{color:var(--text-secondary)}
.exp-order{align-self:flex-start;flex:none;font-size:10px;padding:3px 8px;color:#00d4ff;border-color:rgba(0,212,255,.4)}
.exp-metrics-head{display:flex;justify-content:space-between;align-items:center;font-size:11px;
  text-transform:uppercase;letter-spacing:.6px;color:var(--text-secondary);margin:12px 0 6px}
.exp-badge{font-size:10px;font-weight:700;padding:2px 8px;border-radius:10px;background:#713f12;color:#fde68a}
.exp-metrics{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.exp-metrics>div{background:rgba(15,23,42,.7);border:1px solid rgba(255,255,255,.08);border-radius:8px;padding:8px}
.exp-metrics b{display:block;font-size:15px;color:#00d4ff}
.exp-metrics span{font-size:10px;color:var(--text-secondary)}
.exp-legend{display:flex;flex-wrap:wrap;gap:5px 10px;margin-top:6px}
.exp-legend span{display:inline-flex;align-items:center;gap:4px;font-size:10px;color:var(--text-secondary)}
.exp-legend i{width:10px;height:10px;border-radius:2px;display:inline-block}
.exp-order-row{padding:6px 0;border-bottom:1px solid rgba(255,255,255,.08)}
.exp-dl{font-size:12px;color:#00d4ff;font-weight:600;text-decoration:none;margin-right:10px}
.exp-wait{font-size:11px;color:#fbbf24}
.exp-fail{font-size:11px;color:#fca5a5}

/* ============================================================
   Live Explorer v2 — simple mission-layer switcher
   ============================================================ */
#view-explorer{width:372px}
.lyr-head{margin-bottom:16px}
.lyr-title{font-size:19px;font-weight:800;letter-spacing:-.3px;margin:0}
.lyr-sub{font-size:12.5px;color:var(--text-secondary,#94a3b8);margin-top:3px}

.lyr-geo{position:relative;display:flex;align-items:center;gap:9px;margin-bottom:18px;
  padding:0 12px;background:rgba(15,23,42,.7);border:1px solid rgba(255,255,255,.12);border-radius:11px}
.lyr-geo svg{color:var(--text-muted,#64748b);flex:none}
.lyr-geo-in{flex:1;padding:11px 0;background:none;border:none;color:#e2e8f0;font-size:13px;outline:none}
.lyr-geo-hits{position:absolute;top:46px;left:0;right:0;z-index:40;display:none;
  background:rgba(12,18,30,.98);backdrop-filter:blur(14px);border:1px solid rgba(255,255,255,.1);
  border-radius:11px;overflow:hidden;box-shadow:0 14px 34px rgba(0,0,0,.6)}
.lyr-geo-hit{padding:10px 13px;font-size:12.5px;color:#cbd5e1;cursor:pointer;border-bottom:1px solid rgba(255,255,255,.06)}
.lyr-geo-hit:last-child{border-bottom:none}
.lyr-geo-hit:hover{background:rgba(0,212,255,.1);color:#38bdf8}

.lyr-block{margin-bottom:18px}
.lyr-h{display:block;font-size:10.5px;letter-spacing:1.4px;text-transform:uppercase;
  color:var(--text-muted,#64748b);font-weight:700;margin-bottom:9px}

.lyr-seg{display:flex;gap:4px;padding:4px;background:rgba(15,23,42,.6);
  border:1px solid rgba(255,255,255,.08);border-radius:11px}
.lyr-seg button{flex:1;padding:9px;font-size:13px;font-weight:600;color:var(--text-secondary,#94a3b8);
  background:none;border:none;border-radius:8px;cursor:pointer;transition:all .2s}
.lyr-seg button.active{background:linear-gradient(135deg,#0284c7,#00d4ff);color:#06080f}

.lyr-date{width:100%;padding:9px 11px;background:rgba(15,23,42,.55);color:#e2e8f0;
  border:1px solid rgba(255,255,255,.12);border-radius:9px;font-size:12.5px;color-scheme:dark}
.lyr-op{display:block;font-size:12px;color:var(--text-secondary,#94a3b8);margin-top:12px}
.lyr-op b{color:#00d4ff}
.lyr-op input{width:100%;margin-top:7px;accent-color:#00d4ff}

.lyr-row{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 12px;margin-bottom:6px;background:rgba(15,23,42,.5);
  border:1px solid rgba(255,255,255,.07);border-radius:10px;cursor:pointer;transition:border-color .2s,background .2s}
.lyr-row:hover{border-color:rgba(0,212,255,.35);background:rgba(15,23,42,.75)}
.lyr-name{font-size:13px;color:#e2e8f0}
.lyr-name[data-count]:not([data-count=""]):not([data-count="0"])::after{
  content:attr(data-count);margin-left:8px;font-size:10px;padding:1px 7px;border-radius:8px;
  background:rgba(239,68,68,.2);color:#fca5a5}
/* switch */
.lyr-sw{position:relative;flex:none;width:38px;height:21px}
.lyr-sw input{opacity:0;width:0;height:0;position:absolute}
.lyr-sw i{position:absolute;inset:0;background:rgba(148,163,184,.25);border-radius:999px;transition:.25s}
.lyr-sw i::before{content:"";position:absolute;left:2px;top:2px;width:17px;height:17px;border-radius:50%;
  background:#e2e8f0;transition:.25s}
.lyr-sw input:checked + i{background:linear-gradient(135deg,#0284c7,#00d4ff)}
.lyr-sw input:checked + i::before{transform:translateX(17px);background:#04121c}

.lyr-wb{display:flex;gap:6px;align-items:center}
.lyr-wb .lyr-date{flex:1}
.lyr-mini{flex:none;padding:8px 11px;background:rgba(15,23,42,.6);color:#e2e8f0;
  border:1px solid rgba(255,255,255,.12);border-radius:8px;cursor:pointer;font-size:12px}
.lyr-mini:hover{border-color:#00d4ff;color:#00d4ff}

.lyr-legend{margin-top:4px}
.lyr-leg-t{font-size:11px;color:var(--text-secondary,#94a3b8);margin:10px 0 6px}
.lyr-leg{display:flex;flex-wrap:wrap;gap:6px 11px}
.lyr-leg span{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;color:var(--text-secondary,#94a3b8)}
.lyr-leg i{width:11px;height:11px;border-radius:3px;display:inline-block}
