/* SatView v3 — Dark Theme (SatDream Tech) */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs:   clamp(0.6875rem, 0.65rem + 0.2vw, 0.75rem);
  --text-sm:   clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-base: clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);
  --text-lg:   clamp(0.9375rem, 0.88rem + 0.3vw, 1.0625rem);
  --text-xl:   clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-2xl:  clamp(1.5rem, 1.2rem + 1vw, 2rem);

  /* 4px spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Dark Theme Palette */
  --color-bg:             #1A1F24;
  --color-surface:        #21272D;
  --color-surface-2:      #272D34;
  --color-surface-3:      #2E353C;
  --color-card:           #272D34;
  --color-border:         #333B43;
  --color-divider:        #2E353C;

  /* Text — high contrast on dark */
  --color-text:           #E8ECEF;
  --color-text-muted:     #8A949E;
  --color-text-faint:     #5E6972;
  --color-text-inverse:   #1A1F24;

  /* Accent — SatDream Teal */
  --color-accent:         #4FA8C9;
  --color-accent-hover:   #6BBAD5;
  --color-accent-active:  #3A8FAD;
  --color-accent-glow:    rgba(79, 168, 201, 0.12);
  --color-accent-light:   rgba(79, 168, 201, 0.16);

  /* Semantic */
  --color-success:        #34D399;
  --color-warning:        #FBBF24;
  --color-error:          #F87171;
  --color-info:           #60A5FA;

  /* Sensor Category Colors — brighter for dark bg */
  --color-optical:        #4FA8C9;
  --color-sar:            #34D399;
  --color-rf:             #F87171;
  --color-ir:             #FBBF24;
  --color-hyperspectral:  #A78BFA;
  --color-ais:            #60A5FA;
  --color-multispectral:  #10B981;

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

  /* Shadows — stronger for dark theme */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.35);

  /* Layout */
  --sidebar-width: 320px;
  --header-height: 48px;
  --drawer-collapsed: 40px;
  --drawer-expanded: 280px;
}

/* ===== LAYOUT ===== */
/* --sv-classif-h is set by js/classification-banner.js to the height of the
   fixed classification banner (0px when there is none). The banner sits at
   top:0, so without reserving the space it painted over the app header —
   shift the layout down and shorten it by exactly that amount instead. */
.app-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: var(--header-height) 1fr auto;
  margin-top: var(--sv-classif-h, 0px);
  height: calc(100dvh - var(--sv-classif-h, 0px));
  overflow: hidden;
}

.app-header {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: relative;
  z-index: 2000;
}

.app-header__left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* SatDream Tech logo (inline SVG) */
.app-header__brand-logo {
  display: flex;
  align-items: center;
  height: 26px;
  text-decoration: none;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.2s;
}
.app-header__brand-logo:hover {
  opacity: 0.8;
}
.app-header__brand-logo svg {
  height: 26px;
  width: auto;
  display: block;
  object-fit: contain;
}

.app-header__divider {
  width: 1px;
  height: 22px;
  background: var(--color-border);
  margin: 0 var(--space-1);
}

.app-header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--text-lg);
  letter-spacing: -0.02em;
}

.app-header__logo svg {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
}

/* Version number, small, next to the SatView logo — aligned to the baseline
   (bottom) of the "SatView" text, not the top. */
.app-header__version {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-faint, #6B7280);
  align-self: flex-end;
  margin-bottom: 3px;
}

/* Clock display in header */
.app-header__clock {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  background: var(--color-surface-2);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.app-header__clock-icon {
  width: 14px;
  height: 14px;
  color: var(--color-accent);
}

.app-header__date {
  color: var(--color-text);
  font-weight: 500;
}

.app-header__time {
  color: var(--color-accent);
  font-weight: 600;
}

.app-header__center {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.app-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ===== SIDEBAR with resizable handle ===== */
.sidebar-wrapper {
  grid-column: 1;
  grid-row: 2 / -1;
  position: relative;
  display: flex;
  min-width: 240px;
  max-width: 600px;
}

.app-sidebar {
  flex: 1;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

.sidebar-resize-handle {
  width: 5px;
  cursor: col-resize;
  background: transparent;
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  transition: background 150ms ease;
}

.sidebar-resize-handle:hover,
.sidebar-resize-handle.dragging {
  background: var(--color-accent);
}

.sidebar-resize-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 32px;
  border-radius: 2px;
  background: var(--color-text-faint);
  opacity: 0;
  transition: opacity 150ms ease;
}

.sidebar-resize-handle:hover::after,
.sidebar-resize-handle.dragging::after {
  opacity: 1;
  background: var(--color-accent);
}

.app-map {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  overflow: hidden;
}

/* ── Sidebar collapse / expand ────────────────────────────────────── */
.sidebar-collapse-btn {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 16px;
  height: 56px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: 6px 0 0 6px;
  color: var(--color-text-muted);
  cursor: pointer;
  z-index: 20;
}
.sidebar-collapse-btn:hover {
  color: var(--color-accent);
  background: var(--color-hover);
}

.sidebar-expand-btn {
  display: none;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 18px;
  height: 56px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: none;
  border-radius: 0 6px 6px 0;
  color: var(--color-text-muted);
  cursor: pointer;
  z-index: 1001;   /* above Leaflet panes/controls */
}
.sidebar-expand-btn:hover {
  color: var(--color-accent);
  background: var(--color-hover);
}

@media (min-width: 769px) {
  .app-layout.sidebar-collapsed .sidebar-wrapper { display: none; }
  .app-layout.sidebar-collapsed .sidebar-expand-btn { display: flex; }
}

@media (max-width: 768px) {
  .sidebar-collapse-btn,
  .sidebar-expand-btn { display: none !important; }
}

.app-drawer {
  grid-column: 2;
  grid-row: 3;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  overflow: hidden;
  transition: height 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

.app-drawer.collapsed {
  height: var(--drawer-collapsed);
}

.app-drawer.expanded {
  height: var(--drawer-expanded);
}

/* ===== TIME CONTROL BAR ===== */
.time-control-bar {
  position: absolute;
  /* Same bottom offset as the scale/coords row (.leaflet-bottom.leaflet-left
     margin-bottom: 5px) so both bars' bottom edges line up exactly. */
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(33, 39, 45, 0.94);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 8px 16px;
  box-shadow: var(--shadow-lg);
  min-width: 480px;
  max-width: 90%;
}

.time-control-bar__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.time-control-bar__inputs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.time-control-bar__input {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: 3px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  outline: none;
  width: auto;
  color-scheme: dark;
}

.time-control-bar__input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-glow);
}

.time-control-bar__slider {
  flex: 1;
  min-width: 120px;
  accent-color: var(--color-accent);
  cursor: pointer;
  height: 4px;
}

.time-control-bar__offset {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  font-weight: 600;
  min-width: 60px;
  text-align: center;
  white-space: nowrap;
}

.time-control-bar__reset {
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.time-control-bar__reset:hover {
  background: var(--color-accent);
  color: #fff;
}

/* ===== NEXT-PASS PANEL ===== */
.next-pass-panel {
  position: absolute;
  top: 60px;
  right: 10px;
  z-index: 1100;
  background: rgba(33, 39, 45, 0.97);
  backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  max-width: 420px;
  min-width: 320px;
  max-height: calc(100vh - 160px);
  overflow: hidden;
  display: none;
}

.next-pass-panel.visible {
  display: block;
}

.next-pass-panel__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.next-pass-panel__title svg {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

.next-pass-panel__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-faint);
  cursor: pointer;
}

.next-pass-panel__close:hover {
  background: var(--color-surface-3);
  color: var(--color-text);
}

.next-pass-panel__content {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.next-pass-panel__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 5px 0;
  border-bottom: 1px solid var(--color-divider);
}

.next-pass-panel__item:last-child {
  border-bottom: none;
}

.next-pass-panel__item-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.next-pass-panel__sat-name {
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.next-pass-panel__pass-num {
  font-size: 9px;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
}

.next-pass-panel__item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}

.next-pass-panel__date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-text-muted);
}

.next-pass-panel__time {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-weight: 600;
}

.next-pass-panel__hint {
  font-size: 10px;
  color: var(--color-text-faint);
  margin-top: var(--space-2);
  font-style: italic;
}

/* ===== HEADER BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
}

.btn--accent {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
}
.btn--accent:hover {
  background: rgba(79,168,201,0.12);
  color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  color: var(--color-text);
  border-color: var(--color-text-faint);
  background: var(--color-surface-2);
}

.btn--sm {
  padding: 3px 10px;
  font-size: var(--text-xs);
}

.btn--icon {
  padding: var(--space-1);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
}

.btn--icon:hover {
  color: var(--color-accent);
  background: var(--color-accent-glow);
}

/* ===== SIDEBAR ===== */
.sidebar-section {
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--color-border);
}

.sidebar-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  cursor: pointer;
  user-select: none;
}

.sidebar-section__title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.sidebar-section__toggle {
  width: 16px;
  height: 16px;
  color: var(--color-text-faint);
  transition: transform 200ms ease;
}

.sidebar-section__toggle.collapsed {
  transform: rotate(-90deg);
}

.sidebar-section__count {
  font-size: var(--text-xs);
  color: var(--color-accent);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Resolution Slider */
.resolution-slider {
  width: 100%;
  padding: var(--space-2) 0;
}

.resolution-slider__ticks {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-1);
  padding: 0 2px;
}

.resolution-slider__tick {
  font-size: 10px;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
}

.resolution-slider__tick.active {
  color: var(--color-accent);
}

.resolution-slider__value {
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
  font-family: var(--font-mono);
}

/* Sensor Chips */
.sensor-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
}

.sensor-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 8px;
  width: 100%;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--color-border);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  transition: all 180ms ease;
  box-sizing: border-box;
}

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

.sensor-chip.active {
  color: #fff;
  border-color: transparent;
}

.sensor-chip.active[data-type="optical"] { background: var(--color-optical); }
.sensor-chip.active[data-type="sar"] { background: var(--color-sar); }
.sensor-chip.active[data-type="rf"] { background: var(--color-rf); }
.sensor-chip.active[data-type="ir"] { background: var(--color-ir); }
.sensor-chip.active[data-type="hyperspectral"] { background: var(--color-hyperspectral); }
.sensor-chip.active[data-type="ais"] { background: var(--color-ais); }
.sensor-chip.active[data-type="multispectral"] { background: var(--color-multispectral); }

.sensor-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sensor-chip__dot[data-type="optical"] { background: var(--color-optical); }
.sensor-chip__dot[data-type="sar"] { background: var(--color-sar); }
.sensor-chip__dot[data-type="rf"] { background: var(--color-rf); }
.sensor-chip__dot[data-type="ir"] { background: var(--color-ir); }
.sensor-chip__dot[data-type="hyperspectral"] { background: var(--color-hyperspectral); }
.sensor-chip__dot[data-type="ais"] { background: var(--color-ais); }
.sensor-chip__dot[data-type="multispectral"] { background: var(--color-multispectral); }

.sensor-chip__count {
  font-family: var(--font-mono);
  font-size: 10px;
  opacity: 0.7;
}

/* Operator List */
.operator-list {
  list-style: none;
}

.operator-item {
  border-bottom: 1px solid var(--color-divider);
}

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

.operator-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  cursor: pointer;
  user-select: none;
  border-radius: var(--radius-md);
}

.operator-header:hover {
  background: var(--color-accent-glow);
  margin: 0 calc(-1 * var(--space-3));
  padding: var(--space-2) var(--space-3);
}

.operator-checkbox {
  width: 16px;
  height: 16px;
  appearance: none;
  border: 1.5px solid var(--color-text-faint);
  border-radius: 3px;
  background: var(--color-surface-2);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.operator-checkbox:checked {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.operator-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.operator-checkbox:indeterminate {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.operator-checkbox:indeterminate::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 5px;
  width: 8px;
  height: 2px;
  background: #fff;
}

.operator-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  flex: 1;
}

.operator-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-accent);
  font-weight: 600;
}

.operator-expand {
  width: 16px;
  height: 16px;
  color: var(--color-text-faint);
  transition: transform 200ms ease;
  flex-shrink: 0;
}

.operator-expand.open {
  transform: rotate(90deg);
}

/* Satellite sub-items */
.satellite-list {
  list-style: none;
  padding-left: var(--space-6);
  overflow: hidden;
  transition: max-height 300ms ease;
}

.satellite-list.hidden {
  max-height: 0;
}

.satellite-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 3px 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.satellite-item:hover {
  background: var(--color-accent-glow);
}

.satellite-item__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.satellite-item__name {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.satellite-item:hover .satellite-item__name {
  color: var(--color-accent);
}

.satellite-item__res {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--color-text-faint);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}
.satellite-item__res-sr {
  color: #4FA8C9;
  font-size: 9px;
  opacity: 0.85;
}

.satellite-item__checkbox {
  width: 14px;
  height: 14px;
  appearance: none;
  border: 1.5px solid var(--color-text-faint);
  border-radius: 3px;
  background: var(--color-surface-2);
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.satellite-item__checkbox:checked {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.satellite-item__checkbox:checked::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 5px;
  height: 8px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* No TLE data indicator */
.satellite-item.no-tle .satellite-item__dot {
  background: transparent !important;
  border: 1.5px dashed currentColor;
  opacity: 0.35;
}
.satellite-item.no-tle .satellite-item__name {
  opacity: 0.45;
}
.satellite-item__no-tle-icon {
  font-size: 10px;
  color: var(--color-text-faint);
  flex-shrink: 0;
  opacity: 0.55;
  cursor: help;
  line-height: 1;
}

/* Toast notification */
.sv-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--color-surface, #21272D);
  border: 1px solid var(--color-border, #2A3038);
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 11px;
  color: var(--color-text, #E8ECEF);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  max-width: 380px;
  text-align: center;
  white-space: nowrap;
}
.sv-toast.warn {
  border-color: var(--color-warning, #F59E0B);
  color: var(--color-warning, #F59E0B);
}
.sv-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== SELECTED SATELLITES BAR ===== */
.selected-bar {
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface-2);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  min-height: 40px;
}

.selected-bar__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

.selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  background: var(--color-accent-light);
  color: var(--color-accent);
  border: 1px solid rgba(79, 168, 201, 0.25);
  font-weight: 500;
}

.selected-pill__close {
  width: 12px;
  height: 12px;
  cursor: pointer;
  color: var(--color-text-faint);
}

.selected-pill__close:hover {
  color: var(--color-error);
}

.selected-pill--imminent {
  border-color: rgba(245,158,11,.4) !important;
}

.pill-pass-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #F59E0B;
  flex-shrink: 0;
}
.pill-pass-dot--hot {
  animation: pill-pass-pulse 1.4s ease-in-out infinite;
}
.pill-pass-dot--warm {
  opacity: .55;
}

@keyframes pill-pass-pulse {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: .25; transform: scale(.65); }
}

/* ===== MAP OVERRIDES ===== */
#map {
  width: 100%;
  height: 100%;
  background: #1A1F24;
}

/* Leaflet overrides for dark theme */
.leaflet-control-zoom a {
  background: var(--color-surface) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
}

.leaflet-control-zoom a:hover {
  background: var(--color-surface-2) !important;
}

/* ===== CONFLICT ENGINE ===== */
.sv-conflict-map { padding: 4px 0; }
.sv-conflict-map__header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sv-conflict-map__title { font-size: 13px; font-weight: 700; color: var(--color-text); }
.sv-conflict-map__badge { background: rgba(239,68,68,0.15); color: #EF4444; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }
.sv-conflict-map__ok { color: #10B981; font-size: 12px; }
.sv-conflict-item { background: var(--color-surface); border: 1px solid rgba(239,68,68,0.3); border-left: 3px solid #EF4444; border-radius: 6px; padding: 10px 12px; margin-bottom: 10px; }
.sv-conflict-item__title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sv-conflict-item__sat { font-weight: 700; font-size: 12px; color: var(--color-text); }
.sv-conflict-item__overlap { font-size: 11px; color: #EF4444; background: rgba(239,68,68,0.1); padding: 1px 6px; border-radius: 4px; }
/* Timeline bars */
.sv-conflict-timeline { margin-bottom: 8px; }
.sv-conflict-timeline__row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sv-conflict-timeline__label { font-size: 10px; color: var(--color-text-faint); min-width: 80px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.sv-conflict-timeline__track { flex: 1; height: 14px; background: var(--color-bg); border-radius: 3px; position: relative; }
.sv-conflict-timeline__bar { position: absolute; top: 2px; height: 10px; background: #4FA8C9; border-radius: 2px; opacity: 0.8; }
.sv-conflict-timeline__bar--2 { background: #A78BFA; }
.sv-conflict-timeline__overlap { position: absolute; top: 0; height: 14px; background: rgba(239,68,68,0.5); border-radius: 2px; }
/* Order rows */
.sv-conflict-order-row { display: flex; gap: 8px; font-size: 11px; color: var(--color-text-faint); margin-bottom: 3px; flex-wrap: wrap; }
.sv-conflict-order-row__id { color: var(--color-accent); font-weight: 600; }
.sv-conflict-order-row__name { flex: 1; }
.sv-conflict-order-row__window { font-family: monospace; font-size: 10px; }
/* Suggestions */
.sv-conflict-suggestions { margin-top: 8px; }
.sv-conflict-suggestions__title { font-size: 10px; color: var(--color-text-faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 5px; }
.sv-conflict-suggest-btn { background: var(--color-surface-2); border: 1px solid var(--color-border); color: var(--color-text); font-size: 11px; padding: 4px 10px; border-radius: 4px; cursor: pointer; margin-right: 5px; margin-bottom: 4px; transition: background 0.15s; }
.sv-conflict-suggest-btn:hover { background: var(--color-accent); color: #1A1F24; border-color: var(--color-accent); }
/* Conflict warning in overlay */
.sv-overlay-conflict-warn { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.4); border-radius: 6px; padding: 8px 12px; margin-bottom: 12px; font-size: 12px; color: #EF4444; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sv-overlay-conflict-warn__link { background: none; border: none; color: #4FA8C9; font-size: 11px; cursor: pointer; text-decoration: underline; padding: 0; margin-left: auto; }
/* Conflict badge on Kanban card */
.tasking-card__conflict-badge { background: #EF4444; color: #fff; font-size: 11px; border-radius: 4px; padding: 0 4px; line-height: 16px; margin-left: 2px; }
/* Full-width analytics card */
.tasking-analytics-card--full { grid-column: 1 / -1; }

/* ===== DELIVERY QUALITY ===== */
.sv-dq-section { border-top: 1px solid var(--color-border); padding-top: 10px; margin-top: 10px; }
.sv-dq-compare { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 10px; }
.sv-dq-compare th { color: var(--color-text-faint); font-weight: 600; text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--color-border); }
.sv-dq-compare td { padding: 4px 6px; color: var(--color-text); border-bottom: 1px solid rgba(255,255,255,0.04); }
.sv-dq-input { background: var(--color-bg); border: 1px solid var(--color-border); color: var(--color-text); border-radius: 3px; padding: 3px 6px; width: 70px; font-size: 11px; }
.sv-dq-stars { display: flex; align-items: center; gap: 3px; margin-bottom: 8px; }
.sv-dq-star { background: none; border: none; font-size: 20px; color: var(--color-border); cursor: pointer; padding: 0; line-height: 1; transition: color 0.1s; }
.sv-dq-star--on { color: #F59E0B; }
.sv-dq-star:hover { color: #F59E0B; }
.sv-dq-star-label { font-size: 11px; color: var(--color-text-faint); margin-left: 6px; }
.sv-dq-success { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 4px; }
.sv-dq-success label { color: var(--color-text-faint); }
.sv-dq-yn { background: var(--color-surface-2); border: 1px solid var(--color-border); color: var(--color-text); border-radius: 4px; padding: 3px 12px; cursor: pointer; font-size: 12px; }
.sv-dq-yn--yes { background: rgba(16,185,129,0.2); border-color: #10B981; color: #10B981; }
.sv-dq-yn--no  { background: rgba(239,68,68,0.2);  border-color: #EF4444; color: #EF4444; }
/* Quality table in analytics */
.sv-quality-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.sv-quality-table th { color: var(--color-text-faint); font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; padding: 4px 8px; border-bottom: 1px solid var(--color-border); text-align: left; }
.sv-quality-table td { padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--color-text); }

.leaflet-bar {
  border: 1px solid var(--color-border) !important;
  box-shadow: var(--shadow-md) !important;
}

/* Lat/lon readout sits beside the scale bar (same row, same box look).
   Edge spacing (5px) moves onto the row itself so both boxes can be
   margin-free — matching margins is what kept them out of vertical sync. */
.leaflet-bottom.leaflet-left {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0 0 5px 5px;
}

.leaflet-control-scale {
  margin: 0 !important;
}

.sv-coords-readout,
.leaflet-control-scale-line {
  display: flex;
  align-items: center;
  height: 20px;
  margin: 0 !important;
  background: rgba(26, 31, 36, 0.85) !important;
  border: 1px solid var(--color-border) !important;
  color: var(--color-text) !important;
  font-size: 11px !important;
  font-family: 'SF Mono', Consolas, monospace;
  padding: 0 6px !important;
  border-radius: 3px !important;
  line-height: normal !important;
  white-space: nowrap;
  box-sizing: border-box;
  text-shadow: none !important;
}

.sv-coords-readout {
  pointer-events: none;
}

.leaflet-control-attribution {
  background: rgba(26, 31, 36, 0.85) !important;
  color: var(--color-text-faint) !important;
  font-size: 10px !important;
}

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

/* Draw toolbar dark theme */
.leaflet-draw-toolbar a {
  background-color: var(--color-surface) !important;
  border-color: var(--color-border) !important;
}

.leaflet-draw-actions a {
  background: var(--color-surface-2) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
}

/* Push the draw toolbar below the layer switcher (Standard/Satellite/…) so its
   top button (the AOI toggle) isn't hidden behind it. */
.leaflet-top.leaflet-left .leaflet-draw { margin-top: 46px; }

/* Leaflet.draw's own default (.leaflet-draw-toolbar { margin-top: 12px },
   vendor/leaflet.draw.css) leaves a visible gap above every toolbar section
   in this stack — including the edit/export/delete section. Collapse it so
   the AOI-buttons bar, shape-draw icons, and edit/export/delete sit flush
   together as one block. */
.leaflet-top.leaflet-left .leaflet-draw-toolbar { margin-top: 0; }

/* ── Over-zoom image enhancement (unsharp mask) ──────────────────────────
   Filter defined in index.html (#svTileEnhance); js/app.js adds the
   .sv-tile-enhance class to the tile pane past the active layer's
   maxNativeZoom, i.e. once tiles are genuinely being upscaled.

   The filter targets the individual tile <img>s, NOT the pane itself:
   .leaflet-tile-pane is `position:absolute` with no width/height (its tiles
   are absolutely positioned too, so they don't size it), meaning its box is
   0x0 — filtering that element produced an empty filter region, so the
   effect did nothing AND clipped the pane's rendering (which showed up as a
   truncated map after "reset to global view"). The tiles themselves have
   real dimensions, so the filter region is well-defined on them.

   Scoped to the tile pane so AOI shapes, labels and markers stay untouched
   — sharpening crisp vector overlays would only add fringing. */
.leaflet-tile-pane.sv-tile-enhance img.leaflet-tile {
  filter: url(#svTileEnhance);
}

/* ── AOI visibility toggle (top of the draw control, above the polygon) ── */
.aoi-vis-bar { margin-bottom: 0; }

/* Our custom buttons live inside a .leaflet-draw-toolbar, which paints a sprite
   sheet as background-image — kill it so only the inline SVG shows. */
.aoi-vis-toggle,
.aoi-resetview-btn,
.aoi-backview-btn,
.aoi-orbits-toggle,
.aoi-sun-toggle,
.aoi-swath-toggle,
.aoi-enhance-toggle {
  background-image: none !important;
}

/* Same centring the other icon buttons get — without this the inline SVG
   sits at the link's text baseline instead of the middle of the button. */
.aoi-enhance-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--color-accent) !important;
}
.aoi-enhance-toggle.is-off {
  color: var(--color-text-faint) !important;
}

.aoi-vis-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--color-accent) !important;
}
.aoi-vis-toggle.is-off {
  color: var(--color-text-faint) !important;
  background-color: var(--color-surface-2) !important;
}

/* Reset-to-global-view button (top of the stack) */
.aoi-resetview-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted) !important;
}
.aoi-resetview-btn:hover { color: var(--color-accent) !important; }

/* Back to previous view — undoes the last reset-view press (one-shot) */
.aoi-backview-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted) !important;
}
.aoi-backview-btn:hover { color: var(--color-accent) !important; }
.aoi-backview-btn.is-disabled {
  color: var(--color-text-faint) !important;
  opacity: 0.4;
  cursor: default !important;
}

/* Show/hide satellite orbits (below the AOI toggle) */
.aoi-orbits-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted) !important;
}
.aoi-orbits-toggle:hover { color: var(--color-accent) !important; }
.aoi-orbits-toggle.is-active {
  color: var(--color-accent) !important;
}

/* Sun / Night terminator overlay toggle (between orbits and swath) */
.aoi-sun-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted) !important;
}
.aoi-sun-toggle:hover { color: var(--color-accent) !important; }
.aoi-sun-toggle.is-active {
  color: var(--color-accent) !important;
}

/* Swath corridors toggle — icon only (below orbits) */
.aoi-swath-toggle {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted) !important;
}
.aoi-swath-toggle:hover { color: var(--color-accent) !important; }
.aoi-swath-toggle.active {
  color: #fff !important;
  background-color: var(--color-accent) !important;
}

/* Export GeoJSON — inserted between Leaflet.draw's Edit and Delete icons */
.aoi-export-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted) !important;
  background-image: none !important;
}
.aoi-export-btn:hover { color: var(--color-accent) !important; }

/* When AOIs are hidden, collapse the draw + edit tool bars, keep the toggle */
.leaflet-draw.aoi-hidden .leaflet-draw-section { display: none; }

/* Sidebar Tools toggle — dim + strike-through the eye when AOIs are hidden */
#toggleAoiVisBtn.is-off { color: var(--color-text-faint); }
#toggleAoiVisBtn.is-off .aoi-vis-ico { opacity: 0.6; }

/* Satellite popup — dark */
.sat-popup {
  min-width: 220px;
}

.sat-popup .leaflet-popup-content-wrapper {
  background: var(--color-card) !important;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
}

.sat-popup .leaflet-popup-tip {
  background: var(--color-card) !important;
  border: 1px solid var(--color-border) !important;
}

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

.sat-card {
  padding: 0;
}

.sat-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: var(--space-2);
}

.sat-card__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.sat-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}

.sat-card__operator {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.sat-card__row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  font-size: var(--text-xs);
}

.sat-card__label {
  color: var(--color-text-faint);
}

.sat-card__value {
  color: var(--color-text);
  font-weight: 500;
  font-family: var(--font-mono);
}

.sat-card__actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-divider);
}

.sat-card__btn {
  flex: 1;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  background: transparent;
}

.sat-card__btn:hover {
  background: var(--color-accent-glow);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.sat-card__btn--active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ===== BOTTOM DRAWER ===== */
.drawer-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  user-select: none;
  height: var(--drawer-collapsed);
}

.drawer-handle:hover {
  background: var(--color-surface-2);
}

.drawer-handle__left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.drawer-handle__chevron {
  width: 16px;
  height: 16px;
  color: var(--color-text-faint);
  transition: transform 200ms ease;
}

.drawer-handle__chevron.open {
  transform: rotate(180deg);
}

.drawer-handle__stats {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.drawer-handle__stats strong {
  color: var(--color-accent);
  font-family: var(--font-mono);
}

.drawer-content {
  padding: 0 var(--space-4) var(--space-3);
  overflow-y: auto;
  max-height: calc(var(--drawer-expanded) - var(--drawer-collapsed));
  overscroll-behavior: contain;
}

/* Drawer Table */
.drawer-table {
  width: 100%;
  font-size: var(--text-xs);
}

.drawer-table thead th {
  text-align: left;
  padding: var(--space-1) var(--space-2);
  color: var(--color-text-faint);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-surface);
}

.drawer-table tbody td {
  padding: var(--space-1) var(--space-2);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-divider);
  font-variant-numeric: tabular-nums lining-nums;
}

.drawer-table tbody tr:hover td {
  background: var(--color-accent-glow);
  color: var(--color-text);
}

.orbit-toggle {
  width: 32px;
  height: 18px;
  border-radius: var(--radius-full);
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  cursor: pointer;
  position: relative;
  transition: all 200ms ease;
}

.orbit-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-text-faint);
  transition: all 200ms ease;
}

.orbit-toggle.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.orbit-toggle.active::after {
  left: 16px;
  background: #fff;
}

.orbit-toggle-all {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all 180ms ease;
  vertical-align: middle;
  line-height: 16px;
}
.orbit-toggle-all:hover {
  border-color: var(--color-accent);
  color: var(--color-text);
}
.orbit-toggle-all.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* ── Custom confirm modal ──────────────────────────────────────────── */
.sat-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
}
.sat-confirm {
  background: var(--color-surface, #1E2130);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg, 10px);
  padding: 24px 28px 20px;
  min-width: 280px;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.sat-confirm__msg {
  margin: 0 0 20px;
  color: var(--color-text, #E5E7EB);
  font-size: 14px;
  line-height: 1.5;
}
.sat-confirm__btns {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.sat-confirm__cancel,
.sat-confirm__ok {
  padding: 6px 16px;
  border-radius: var(--radius-full, 999px);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 13px;
  cursor: pointer;
  transition: all 150ms ease;
}
.sat-confirm__cancel {
  background: transparent;
  color: var(--color-text-muted, #6B7280);
}
.sat-confirm__cancel:hover {
  border-color: rgba(255,255,255,.35);
  color: var(--color-text, #E5E7EB);
}
.sat-confirm__ok {
  background: #EF4444;
  border-color: #EF4444;
  color: #fff;
}
.sat-confirm__ok:hover { background: #DC2626; border-color: #DC2626; }

/* Point AOI marker — ensure pointer events are active (Leaflet marker-pane is pointer-events:none) */
.custom-marker { pointer-events: auto !important; cursor: pointer !important; }

/* ── AOI map hover toolbar ─────────────────────────────────────────── */
.aoi-map-toolbar {
  position: fixed;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--color-surface, #1E2130);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-full, 999px);
  padding: 3px 5px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.aoi-map-toolbar--visible {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}
.aoi-map-tb__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--color-text-muted, #6B7280);
  border-radius: var(--radius-full, 999px);
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.aoi-map-tb__btn:hover { background: rgba(255,255,255,.1); color: var(--color-text, #E5E7EB); }
.aoi-map-tb__btn--danger:hover { background: rgba(239,68,68,.15); color: #EF4444; }

/* Status dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot--active { background: var(--color-success); }
.status-dot--inactive { background: var(--color-text-faint); }

/* Compatibility badge */
.compat-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 500;
}

.compat-badge--yes {
  background: rgba(52, 211, 153, 0.15);
  color: var(--color-success);
}

.compat-badge--no {
  background: rgba(94, 105, 114, 0.15);
  color: var(--color-text-faint);
}

/* ===== SIDEBAR ACTIONS ===== */
.sidebar-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.sidebar-actions .btn {
  flex: 1;
  justify-content: center;
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-2);
}

/* ===== SEARCH ===== */
.search-input {
  width: 100%;
  padding: var(--space-1) var(--space-3);
  padding-left: 32px;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--text-sm);
  outline: none;
}

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

.search-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-glow);
}

.search-wrapper {
  position: relative;
}

.search-wrapper svg {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-faint);
  pointer-events: none;
}

/* ===== ORBIT STYLES ON MAP ===== */
.satellite-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 8px rgba(79, 168, 201, 0.5);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(79, 168, 201, 0.3); }
  50% { box-shadow: 0 0 16px rgba(79, 168, 201, 0.7); }
}

/* ===== LOADING STATES ===== */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 31, 36, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

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

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

/* ===== FOOTER ===== */
.app-footer {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--color-text-faint);
  z-index: 50;
  display: flex;
  gap: var(--space-3);
  background: rgba(26, 31, 36, 0.85);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  pointer-events: all;
  border: 1px solid var(--color-border);
}

.app-footer__clock {
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-weight: 600;
}

.app-footer a {
  color: var(--color-text-faint);
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--color-accent);
}

/* ===== EMPTY STATES ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  text-align: center;
}

.empty-state__icon {
  width: 48px;
  height: 48px;
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
  opacity: 0.5;
}

.empty-state__text {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  max-width: 200px;
}

/* ===== LAYER SWITCHER ===== */
.layer-switcher {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.layer-switcher__btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  background: rgba(33, 39, 45, 0.92);
  backdrop-filter: blur(8px);
  cursor: pointer;
  border: none;
  border-right: 1px solid var(--color-border);
  white-space: nowrap;
  transition: all 150ms ease;
}

.layer-switcher__btn:last-child {
  border-right: none;
}

.layer-switcher__btn:hover {
  color: var(--color-text);
  background: rgba(46, 53, 60, 0.95);
}

.layer-switcher__btn.active {
  color: #fff;
  background: var(--color-accent);
}

.layer-switcher__btn svg {
  width: 14px;
  height: 14px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-height) 1fr;
  }

  .sidebar-wrapper {
    display: none;
    position: fixed;
    inset: var(--header-height) 0 0 0;
    z-index: 200;
    grid-column: 1;
    grid-row: 2;
  }

  .sidebar-wrapper.mobile-open {
    display: flex;
  }

  .app-map {
    grid-column: 1;
  }

  .app-drawer {
    grid-column: 1;
  }

  .time-control-bar {
    min-width: auto;
    width: calc(100% - 20px);
    flex-wrap: wrap;
  }

  .app-header__clock {
    display: none;
  }

  .sidebar-resize-handle {
    display: none;
  }

  .layer-switcher {
    top: auto;
    bottom: 100px;
    left: 10px;
  }
}

/* ===== TOOLTIP ===== */
.tooltip {
  position: absolute;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text);
  box-shadow: var(--shadow-md);
  pointer-events: none;
  z-index: 500;
  white-space: nowrap;
}

/* Select all / deselect all */
.select-all-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.select-all-row button {
  font-size: var(--text-xs);
  color: var(--color-accent);
  cursor: pointer;
  padding: 2px 4px;
  font-weight: 500;
}

.select-all-row button:hover {
  text-decoration: underline;
}

/* Mobile menu button hidden on desktop */
.mobile-menu-btn {
  display: none;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }
}

/* ====================================================
   MAP ICON BARS — shared square-icon look, used by the new top-right
   (SatTools / Analysis / Advanced) and bottom-right (Heatmap / Geometry)
   icon stacks, matching the top-left .aoi-vis-bar / Leaflet.draw style.
   ==================================================== */
.sv-icon-bar {
  position: absolute;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: var(--color-surface, #21272D);
  border: 1px solid var(--color-border, #2A3038);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
  overflow: visible;
}
.sv-icon-bar__item {
  position: relative;
}
.sv-icon-bar__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border, #2A3038);
  color: var(--color-text-muted, #9CA3AF);
  cursor: pointer;
  padding: 0;
}
.sv-icon-bar__item:last-child .sv-icon-bar__btn,
.sv-icon-bar__btn:last-child {
  border-bottom: none;
}
.sv-icon-bar__btn:hover {
  color: var(--color-text, #E8ECEF);
  background: var(--color-hover, #2A3038);
}
.sv-icon-bar__btn.active {
  color: #fff;
  background: var(--color-accent, #4FA8C9);
}

/* SatTools / Analysis / Advanced — bottom-right, above the Heatmap/Geometry
   bar as a separate block. Position (bottom) set at runtime by
   map-rotate.js so it stacks correctly regardless of icon count/size. */
.sv-tools-bar {
  right: 10px;
}

/* Flyout submenu — opens to the LEFT of the icon bar (bar sits at the
   right screen edge) at the same height as the bar's top. Reuses the
   .satview-tools-dropdown__item/__desc/__sep look for its rows. */
.sv-tools-menu {
  display: none;
  position: absolute;
  top: 0;
  right: calc(100% + 8px);
  min-width: 260px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(79, 168, 201, 0.3) transparent;
  background: var(--color-surface, #21272D);
  border: 1px solid var(--color-border, #2A3038);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  z-index: 20000;
}
.sv-tools-menu.open { display: block; }

/* Bottom-right: Heatmap / Geometry, sits directly above the Leaflet zoom
   control (native, bottomright). Vertical offset set at runtime by
   map-rotate.js so it always sits flush above the zoom control. */
.sv-bottomright-bar {
  right: 10px;
  /* bottom set at runtime by map-rotate.js, stacked above the zoom control */
}

@media (max-width: 768px) {
  .sv-tools-bar,
  .sv-bottomright-bar { display: none; }
}

/* ====================================================
   SatView v3 — New Styles
   ==================================================== */

/* ===== SIDEBAR TABS ===== */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  flex-shrink: 0;
}

.sidebar-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: all 150ms ease;
  white-space: nowrap;
  position: relative;
}

.sidebar-tab:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.sidebar-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.sidebar-tab svg {
  flex-shrink: 0;
}

.sidebar-tab__badge {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--color-accent-light);
  color: var(--color-accent);
  padding: 0 5px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

/* Sidebar tab content panels */
.sidebar-tab-content {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-tab-content.active {
  display: flex;
}

/* ===== UNIFIED SIDEBAR ACTION BARS ===== */
.sidebar-actions-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-surface-2);
}

.sidebar-actions-top__row {
  display: flex;
  gap: var(--space-2);
}

.sidebar-actions-top__create {
  flex: 1;
}

.sidebar-actions-top__secondary {
  display: flex;
  gap: var(--space-2);
}

.sidebar-actions-top__secondary .btn {
  flex: 1;
}

/* ── Tool grid (3-col icon+label) ── */
.sidebar-tools-section {
  padding: var(--space-2) var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
  flex-shrink: 0;
}

.sidebar-tools-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  opacity: .6;
}

.sidebar-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.sidebar-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 7px 4px 6px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
  min-width: 0;
  font-family: var(--font-sans);
}

.sidebar-tool-btn:hover {
  background: var(--color-accent-glow);
  border-color: rgba(79,168,201,.3);
  color: var(--color-accent);
}

.sidebar-tool-btn svg {
  flex-shrink: 0;
}

/* "Open Center" button — the prominent entry point to fullscreen centers */
.btn--center-open {
  flex: 1;
  background: linear-gradient(135deg, rgba(79,168,201,0.15) 0%, rgba(79,168,201,0.08) 100%);
  color: var(--color-accent);
  border: 1px solid rgba(79,168,201,0.4);
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 180ms ease;
  position: relative;
  overflow: hidden;
}

.btn--center-open::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 6px;
  height: 100%;
  background: var(--color-accent);
  opacity: 0.5;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: opacity 180ms ease;
}

.btn--center-open:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  box-shadow: 0 2px 12px rgba(79,168,201,0.35);
}

.btn--center-open:hover::before {
  opacity: 0;
}

.sidebar-actions-bottom {
  padding: var(--space-3);
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

/* ===== AOI TAB ===== */
.aoi-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-2);
}

/* ===== AOI LIST TOOLBAR (sort + view mode) ===== */
.aoi-list-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-2);
  margin-bottom: 4px;
}
.aoi-list-toolbar__sort {
  flex: 1;
  background: var(--color-surface-2, #21272D);
  color: var(--color-text, #E8ECEF);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 6px);
  padding: 4px 6px;
  font-size: 11px;
}
.aoi-list-toolbar__view {
  display: flex;
  gap: 2px;
  background: var(--color-surface-2, #21272D);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 6px);
  padding: 2px;
}
.aoi-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--color-text-faint);
  border-radius: 4px;
  cursor: pointer;
}
.aoi-view-btn:hover { color: var(--color-text); }
.aoi-view-btn--active {
  background: var(--color-accent);
  color: #fff;
}

/* ===== AOI SIMPLE ROW (compact view: name + priority only) ===== */
.aoi-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  margin-bottom: 2px;
  border-radius: var(--radius-md, 6px);
  cursor: pointer;
  transition: background 120ms ease;
}
.aoi-row:hover {
  background: var(--color-hover, rgba(255,255,255,0.06));
}
.aoi-row__type {
  color: var(--color-text-faint);
  flex-shrink: 0;
  display: flex;
}
.aoi-row__name {
  font-size: var(--text-sm);
  color: var(--color-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== AOI CARD ===== */
.aoi-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  margin-bottom: var(--space-2);
  cursor: pointer;
  transition: all 150ms ease;
}

.aoi-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent-glow);
}

.aoi-card__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 6px;
}

.aoi-card__type {
  color: var(--color-text-faint);
  flex-shrink: 0;
  display: flex;
}

.aoi-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.aoi-card__priority-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.aoi-card__location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--color-text-secondary);
  margin: 2px 0 4px 0;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aoi-card__location svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.aoi-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.aoi-card__actions {
  display: flex;
  gap: var(--space-1);
  border-top: 1px solid var(--color-divider);
  padding-top: 6px;
}

.aoi-card__action {
  width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-faint);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 150ms ease;
}

.aoi-card__action:hover {
  background: var(--color-accent-glow);
  color: var(--color-accent);
}

.aoi-card__action--danger:hover {
  background: rgba(248, 113, 113, 0.12);
  color: var(--color-error);
}

.aoi-card__action--analyze {
  margin-left: auto;
}

.aoi-card__action--analyze:hover {
  background: rgba(79, 168, 201, 0.12);
  color: #4FA8C9;
}

/* ===== RIGHT PANEL ===== */
.right-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 380px;
  height: 100%;
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

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

.right-panel__header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.right-panel__header-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.right-panel__name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
  outline: none;
  border-bottom: 1px solid transparent;
  padding: 2px 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.right-panel__name:focus {
  border-bottom-color: var(--color-accent);
}

.right-panel__close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-faint);
  cursor: pointer;
  border: none;
  background: transparent;
  flex-shrink: 0;
}

.right-panel__close:hover {
  background: var(--color-surface-3);
  color: var(--color-text);
}

/* Right Panel Tabs */
.right-panel__tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.right-panel__tab {
  flex: 1;
  padding: 8px 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
  color: var(--color-text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  transition: all 150ms ease;
}

.right-panel__tab:hover {
  color: var(--color-text);
}

.right-panel__tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.right-panel__content {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.right-panel__tab-content {
  display: none;
  padding: var(--space-3);
}

.right-panel__tab-content.active {
  display: block;
}

/* Right panel info styles */
.rp-info-grid {
  margin-bottom: var(--space-3);
}

.rp-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--color-divider);
}

.rp-info-label {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.rp-info-value {
  font-size: var(--text-xs);
  color: var(--color-text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.rp-form-group {
  margin-bottom: var(--space-3);
}

.rp-form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rp-form-select {
  width: 100%;
  padding: 5px 8px;
  font-size: var(--text-xs);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  outline: none;
  cursor: pointer;
  color-scheme: dark;
}

.rp-form-select:focus {
  border-color: var(--color-accent);
}

.rp-form-textarea {
  width: 100%;
  padding: 6px 8px;
  font-size: var(--text-xs);
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  outline: none;
  resize: vertical;
  min-height: 40px;
}

.rp-form-textarea:focus {
  border-color: var(--color-accent);
}

.rp-section-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  margin: var(--space-3) 0 var(--space-2);
}

.rp-sat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: var(--space-3);
}

.rp-sat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.rp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.rp-action--danger {
  color: var(--color-error) !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
}

.rp-action--danger:hover {
  background: rgba(248, 113, 113, 0.12) !important;
}

/* ── Weather widget ── */
.rp-weather-widget {
  margin-bottom: var(--space-3);
}
.rp-weather-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
  padding: 8px 0;
}
.rp-weather-error {
  font-size: 11px;
  color: var(--color-error);
  padding: 6px 0;
}
.rp-weather-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rp-weather-current {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rp-weather-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.rp-weather-gauge-label {
  font-size: 9px;
  color: var(--color-text-muted);
  text-align: center;
}
.rp-weather-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.rp-weather-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
}
.rp-weather-stat-val {
  color: var(--color-text);
  font-weight: 600;
  font-family: var(--font-mono);
}
.rp-weather-stat-lbl {
  color: var(--color-text-muted);
  font-size: 10px;
}
.rp-weather-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  font-style: italic;
  text-align: center;
  margin: -2px 0 2px;
}
.rp-weather-forecast-title {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.rp-weather-chart {
  overflow-x: auto;
  padding-bottom: 2px;
}
.rp-weather-refresh {
  font-size: 10px;
  color: var(--color-text-muted);
}

/* Spinner animation */
@keyframes rp-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.rp-spin {
  animation: rp-spin 1s linear infinite;
  transform-origin: center;
}

/* History tab */
.rp-history-list {
  padding-left: 0;
}

.rp-history-item {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-divider);
}

.rp-history-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  margin-top: 4px;
  flex-shrink: 0;
}

.rp-history-content {
  flex: 1;
  min-width: 0;
}

.rp-history-action {
  font-size: var(--text-xs);
  color: var(--color-text);
}

.rp-history-date {
  font-size: 10px;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.rp-history-empty {
  padding: var(--space-6) var(--space-3);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-faint);
}

.rp-loading {
  padding: var(--space-6) var(--space-3);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  animation: pulse-text 1.5s ease-in-out infinite;
}

@keyframes pulse-text {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ===== OPPORTUNITY CARDS ===== */
.opp-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.opp-sort {
  max-width: 130px;
}

.opp-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.opp-filter-label {
  font-size: 10px;
  color: var(--color-text-faint);
  white-space: nowrap;
}

.opp-cloud-slider {
  flex: 1;
  min-width: 60px;
  accent-color: var(--color-accent);
  cursor: pointer;
  height: 3px;
}

.opp-cloud-val {
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-weight: 600;
  min-width: 32px;
}

.opp-timeline {
  /* scrollable container */
}

.opp-day {
  margin-bottom: var(--space-3);
}

.opp-day__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  padding: 4px 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-2);
}

.opp-day__count {
  font-weight: 400;
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: 10px;
  margin-left: 6px;
}

.opportunity-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-2);
  transition: border-color 150ms ease;
}

.opportunity-card:hover {
  border-color: var(--color-text-faint);
}

.opportunity-card--clickable {
  cursor: pointer;
  position: relative;
}
.opportunity-card--clickable:hover {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 1px var(--color-accent-glow);
}
.opportunity-card--clickable::after {
  content: 'Click to create Task Order';
  position: absolute;
  bottom: -2px;
  right: 8px;
  font-size: 9px;
  color: var(--color-accent);
  opacity: 0;
  transition: opacity 150ms ease;
  pointer-events: none;
}
.opportunity-card--clickable:hover::after {
  opacity: 0.7;
}

.opportunity-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.opportunity-card__sat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
}

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

.opportunity-card__time {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--color-accent);
  font-weight: 600;
}

.opportunity-card__score-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: 6px;
}

.score-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.opportunity-card__score-bar {
  flex: 1;
  height: 4px;
  background: var(--color-surface-3);
  border-radius: 2px;
  overflow: hidden;
}

.opportunity-card__score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 300ms ease;
}

.opportunity-card__metrics {
  display: flex;
  gap: var(--space-3);
}

.opp-metric {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-family: var(--font-mono);
  color: var(--color-text-faint);
}

.opp-metric svg {
  color: var(--color-text-faint);
  flex-shrink: 0;
}

/* ===== AOI MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  /* Must stay above .admin-overlay (z-index 25000, css/auth.css) since most
     users of this class are sub-modals opened from inside the admin panel
     (Add Rule, Add Export Control Rule, Add User/Team, etc.). */
  z-index: 26000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.visible {
  display: flex;
}

.aoi-modal {
  width: 90vw;
  max-width: 1100px;
  height: 85vh;
  max-height: 800px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.aoi-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.aoi-modal__title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.aoi-modal__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-faint);
  cursor: pointer;
  border: none;
  background: transparent;
}

.aoi-modal__close:hover {
  background: var(--color-surface-3);
  color: var(--color-text);
}

.aoi-modal__body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.aoi-modal__map {
  flex: 6;
  position: relative;
  border-right: 1px solid var(--color-border);
}

.aoi-modal__map #modalMapContainer {
  width: 100%;
  height: 100%;
}

.aoi-modal__form {
  flex: 4;
  padding: var(--space-4);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Modal form controls */
.modal-form-group {
  margin-bottom: var(--space-3);
}

.modal-form-group label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-form-group input,
.modal-form-group select,
.modal-form-group textarea {
  width: 100%;
  padding: 6px 10px;
  font-size: var(--text-sm);
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  color: var(--color-text);
  outline: none;
  color-scheme: dark;
  box-sizing: border-box;
}

.modal-form-group input:focus,
.modal-form-group select:focus,
.modal-form-group textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-glow);
}

.modal-form-group input[readonly] {
  color: var(--color-text-muted);
  cursor: default;
}

.modal-form-group textarea {
  resize: vertical;
  min-height: 50px;
}

/* Coordinate input fields */
.modal-coord-fields {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px;
}
.modal-coord-fields > label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 8px;
  display: block;
}
.coord-input-row {
  display: flex;
  gap: 10px;
}
.coord-input-field {
  flex: 1;
}
.coord-input-field .coord-label {
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
  display: block;
}
.coord-input-field input {
  width: 100%;
  padding: 6px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
}
.coord-input-field input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-glow);
  outline: none;
}

.aoi-modal__buttons {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  flex-wrap: wrap;
}

/* ===== KPI BAR ===== */
.kpi-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.kpi-bar__item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.kpi-bar__item--wide {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.kpi-bar__value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-accent);
  font-family: var(--font-mono);
}

.kpi-bar__value--sm {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text);
}

.kpi-bar__label {
  font-size: 10px;
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.kpi-bar__sub {
  font-size: 10px;
  color: var(--color-success);
  font-family: var(--font-mono);
}

.kpi-bar__divider {
  width: 1px;
  height: 20px;
  background: var(--color-border);
}

.kpi-bar__dots {
  display: flex;
  gap: 2px;
  align-items: center;
}

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

/* ===== RESPONSIVE for v3 ===== */
@media (max-width: 768px) {
  .right-panel {
    width: 100%;
  }

  .aoi-modal {
    width: 98vw;
    height: 95vh;
    max-height: none;
  }

  .aoi-modal__body {
    flex-direction: column;
  }

  .aoi-modal__map {
    flex: 1;
    min-height: 250px;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
  }

  .aoi-modal__form {
    flex: 1;
    overflow-y: auto;
  }

  .kpi-bar {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .kpi-bar__item--wide {
    display: none;
  }

  .swath-toggle {
    top: auto;
    bottom: 160px;
    right: 10px;
  }
}

/* Data source badge */
.data-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.7;
}
.data-source-badge--api {
  background: rgba(79, 168, 201, 0.15);
  color: #4FA8C9;
  border: 1px solid rgba(79, 168, 201, 0.3);
}
.data-source-badge--static {
  background: rgba(255, 193, 7, 0.12);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.25);
}
.data-source-badge--warn {
  background: rgba(239, 100, 30, 0.12);
  color: #ef641e;
  border: 1px solid rgba(239, 100, 30, 0.35);
}

/* ===== GLOBAL LOADING OVERLAY ===== */
.satview-loader-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 22, 26, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.satview-loader-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.satview-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.satview-loader-logo {
  width: 96px;
  height: 96px;
  animation: satviewLoaderSpin 3s linear infinite;
}
@keyframes satviewLoaderSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.satview-loader-orbit1 {
  stroke-dasharray: 82;
  stroke-dashoffset: 20;
  animation: satviewOrbitDash 2s ease-in-out infinite alternate;
}
@keyframes satviewOrbitDash {
  0%   { stroke-dashoffset: 20; opacity: 0.6; }
  100% { stroke-dashoffset: 0;  opacity: 1; }
}
.satview-loader-sat {
  animation: satviewSatPulse 1.2s ease-in-out infinite;
}
@keyframes satviewSatPulse {
  0%, 100% { r: 2.5; opacity: 0.9; }
  50%      { r: 3.5; opacity: 1; }
}
.satview-loader-text {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 500;
  color: #4FA8C9;
  letter-spacing: 0.5px;
  animation: satviewLoaderBlink 1.4s ease-in-out infinite;
}
@keyframes satviewLoaderBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ===== OPPORTUNITIES AOI SELECTION MODAL ===== */
.opp-select-overlay {
  position: fixed;
  inset: 0;
  z-index: 90000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 22, 26, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.opp-select-overlay.visible {
  opacity: 1;
}
.opp-select-modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  width: 520px;
  max-width: 94vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.25s ease;
}
.opp-select-overlay.visible .opp-select-modal {
  transform: translateY(0) scale(1);
}
.opp-select-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--color-border);
}
.opp-select-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
}
.opp-select-title svg {
  color: var(--color-accent);
}
.opp-select-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.opp-select-close:hover {
  color: var(--color-text);
  background: var(--color-surface-hover);
}
.opp-select-info {
  padding: 12px 20px;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}
.opp-select-info strong {
  color: var(--color-accent);
}
.opp-select-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 8px;
}
.opp-select-count {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.opp-select-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 400px;
}
.opp-select-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.opp-select-item:hover {
  background: var(--color-surface-hover);
}
.opp-select-check {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  flex-shrink: 0;
  cursor: pointer;
}
.opp-select-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.opp-select-item-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opp-select-item-loc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.opp-select-item-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}
.opp-select-item-badge--critical {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.opp-select-item-badge--high {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}
.opp-select-item-badge--medium {
  background: rgba(79, 168, 201, 0.15);
  color: #4FA8C9;
}
.opp-select-item-badge--low {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}
.opp-select-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--color-border);
}
.opp-select-footer .btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== SNAPSHOT MODAL ===== */

.snapshot-modal {
  width: 580px;
  max-width: 95vw;
  max-height: 80vh;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.snapshot-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.snapshot-modal__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-primary);
  letter-spacing: 0.02em;
}

.snapshot-modal__body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.snapshot-info {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.snapshot-hint {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.snapshot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.snapshot-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--color-text-primary);
  text-align: left;
}

.snapshot-chip:hover {
  border-color: var(--color-accent);
  background: rgba(79, 168, 201, 0.08);
}

.snapshot-chip__name {
  font-size: 12px;
  font-weight: 600;
}

.snapshot-chip__meta {
  font-size: 10px;
  color: var(--color-text-muted);
}

.snapshot-save-form .modal-form-group {
  margin-bottom: 16px;
}

.snapshot-save-form .aoi-modal__buttons {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.input-error {
  border-color: #EF4444 !important;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Snapshot Load List */

.snapshot-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
}

.snapshot-empty p {
  margin: 8px 0 0;
  font-size: 13px;
}

.snapshot-list-header {
  display: grid;
  grid-template-columns: 1fr 60px 90px 140px 80px;
  gap: 8px;
  padding: 8px 12px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
}

.snapshot-list-row {
  display: grid;
  grid-template-columns: 1fr 60px 90px 140px 80px;
  gap: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--color-text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  align-items: center;
  transition: background 0.15s;
}

.snapshot-list-row:hover {
  background: rgba(79, 168, 201, 0.06);
}

.snapshot-list-name {
  font-weight: 600;
}

.snapshot-list-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

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

.btn--danger {
  color: #EF4444 !important;
}

.btn--danger:hover {
  background: rgba(239, 68, 68, 0.15) !important;
}

/* Toast notification */

.snapshot-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--color-surface);
  color: var(--color-text-primary);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 20000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.snapshot-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Real-Time Decision Score ===== */
.topt-smart-suggest {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 8px; margin-bottom: 12px; font-size: 12px;
  background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: #E8ECEF;
}
.topt-smart-suggest--high { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); }
.topt-smart-suggest--medium { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); }
.topt-smart-suggest svg { flex-shrink:0; color: #10B981; }
.topt-smart-suggest--high svg { color: #EF4444; }
.topt-smart-suggest--medium svg { color: #F59E0B; }
.topt-smart-suggest__btn {
  margin-left: auto; background: #4FA8C9; color: #fff; border: none;
  padding: 4px 10px; border-radius: 5px; font-size: 11px; cursor: pointer; white-space: nowrap;
}
.topt-smart-suggest__btn:hover { background: #6BBAD5; }

/* ===== Order Transparency Tracker ===== */
.sv-tracker {
  display: flex; flex-direction: column; gap: 0; position: relative;
  padding: 4px 0;
}
.sv-tracker__step {
  display: flex; align-items: flex-start; gap: 8px; position: relative; min-height: 38px;
}
.sv-tracker__node { flex-shrink:0; display:flex; flex-direction:column; align-items:center; padding-top: 3px; }
.sv-tracker__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(107,114,128,0.3); border: 2px solid #6B7280;
  transition: all 0.2s;
}
.sv-tracker__line {
  width: 2px; height: 28px; background: rgba(255,255,255,0.08);
  margin-left: 4px; flex-shrink: 0;
  position: absolute; left: 4px; top: 14px;
}
.sv-tracker__info { padding-bottom: 12px; }
.sv-tracker__label { font-size: 11px; color: #6B7280; font-weight: 500; }
.sv-tracker__time  { font-size: 10px; color: #4B5563; margin-top: 1px; }

.sv-tracker__step--done .sv-tracker__dot    { background: #10B981; border-color: #10B981; box-shadow: 0 0 6px rgba(16,185,129,0.4); }
.sv-tracker__step--done .sv-tracker__line   { background: #10B981; opacity: 0.5; }
.sv-tracker__step--done .sv-tracker__label  { color: #10B981; }
.sv-tracker__step--done .sv-tracker__time   { color: #6EE7B7; }
.sv-tracker__step--active .sv-tracker__dot  { background: #4FA8C9; border-color: #4FA8C9; box-shadow: 0 0 8px rgba(79,168,201,0.6); animation: sv-pulse 1.5s ease-in-out infinite; }
.sv-tracker__step--active .sv-tracker__label { color: #4FA8C9; font-weight: 600; }
.sv-tracker__step--active .sv-tracker__time  { color: #93C5FD; }
.sv-tracker__step--failed .sv-tracker__dot  { background: #EF4444; border-color: #EF4444; }
.sv-tracker__step--failed .sv-tracker__label { color: #EF4444; }

.sv-gantt { margin-top: 10px; background: rgba(255,255,255,0.03); border-radius: 8px; padding: 10px; }

@keyframes sv-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(79,168,201,0.4); }
  50% { box-shadow: 0 0 14px rgba(79,168,201,0.8); }
}

/* ===== Gantt Pass Timeline ===== */
.sv-gantt-zoom { display:flex; gap:4px; }
.sv-gantt-zoom-btn {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: #6B7280; padding: 4px 10px; border-radius: 5px; font-size: 11px; cursor: pointer;
}
.sv-gantt-zoom-btn:hover { background: rgba(255,255,255,0.1); color: #E8ECEF; }
.sv-gantt-zoom-btn--active { background: rgba(79,168,201,0.2); border-color: #4FA8C9; color: #4FA8C9; }

/* ===== Multi-Modal Fusion Order ===== */
.sv-fusion-template {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 12px 10px; cursor: pointer; text-align: center; transition: all 0.15s;
}
.sv-fusion-template:hover { background: rgba(79,168,201,0.1); border-color: rgba(79,168,201,0.3); }
.sv-fusion-template--active { background: rgba(79,168,201,0.15); border-color: #4FA8C9; }
.sv-fusion-template__icon { font-size: 20px; margin-bottom: 6px; }
.sv-fusion-template__name { font-size: 11px; color: #E8ECEF; font-weight: 600; margin-bottom: 4px; }
.sv-fusion-template__desc { font-size: 10px; color: #6B7280; line-height: 1.3; }

/* ===== Command Palette (Ctrl+K) ===== */
.cp-overlay {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.cp-overlay--visible { opacity: 1; pointer-events: all; }
.cp-modal {
  width: min(640px, 92vw);
  background: #1e252c;
  border: 1px solid rgba(79,168,201,0.3);
  border-radius: 12px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(79,168,201,0.1);
  overflow: hidden;
  transform: translateY(-8px); transition: transform 0.15s;
}
.cp-overlay--visible .cp-modal { transform: translateY(0); }
.cp-search-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.07);
}
.cp-search-icon { width: 18px; height: 18px; flex-shrink: 0; color: #6B7280; }
.cp-input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 15px; font-family: var(--font-body); color: #E8ECEF;
  caret-color: #4FA8C9;
}
.cp-input::placeholder { color: #4B5563; }
.cp-kbd {
  font-size: 10px; font-family: var(--font-mono); color: #4B5563;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px; padding: 2px 6px; flex-shrink: 0;
}
.cp-list {
  max-height: 400px; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 0;
}
.cp-group-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: #4B5563; padding: 8px 16px 4px; pointer-events: none;
}
.cp-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer; transition: background 0.1s;
}
.cp-item:hover, .cp-item--active { background: rgba(79,168,201,0.12); }
.cp-item__icon { font-size: 16px; flex-shrink: 0; width: 22px; text-align: center; }
.cp-item__text { flex: 1; min-width: 0; }
.cp-item__label { font-size: 13px; color: #E8ECEF; font-weight: 500; display: block; }
.cp-item__sub { font-size: 11px; color: #6B7280; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-item__group { font-size: 10px; color: #374151; margin-left: auto; flex-shrink: 0; }
.cp-item__quick-order {
  font-size: 10px; font-weight: 600; color: #4FA8C9;
  background: rgba(79,168,201,0.12); border: 1px solid rgba(79,168,201,0.3);
  border-radius: 4px; padding: 2px 7px; cursor: pointer; flex-shrink: 0;
  transition: background 0.1s;
}
.cp-item__quick-order:hover { background: rgba(79,168,201,0.25); }
.cp-empty { padding: 24px; text-align: center; color: #4B5563; font-size: 13px; }
.cp-footer {
  display: flex; gap: 16px; align-items: center;
  padding: 8px 16px; border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px; color: #4B5563;
}
.cp-footer kbd {
  font-family: var(--font-mono); font-size: 10px; color: #6B7280;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 3px; padding: 1px 5px; margin-right: 4px;
}

/* ===== AOI Right-Click Context Menu ===== */
.aoi-ctx-menu {
  position: fixed; z-index: 90000;
  min-width: 190px;
  background: #1e252c;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,0,0,0.3);
  padding: 4px 0;
  overflow: hidden;
  animation: ctxFadeIn 0.1s ease;
}
@keyframes ctxFadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.aoi-ctx-menu__header {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 13px 6px; font-size: 11px; font-weight: 600; color: #6B7280;
  border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.aoi-ctx-menu__item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 13px; background: none; border: none;
  font-size: 13px; color: #C9D1D9; cursor: pointer; text-align: left;
  transition: background 0.1s, color 0.1s;
}
.aoi-ctx-menu__item:hover { background: rgba(79,168,201,0.12); color: #E8ECEF; }
.aoi-ctx-menu__item--primary { color: #4FA8C9; font-weight: 600; }
.aoi-ctx-menu__item--primary:hover { background: rgba(79,168,201,0.2); }
.aoi-ctx-menu__item--danger:hover { background: rgba(239,68,68,0.12); color: #EF4444; }
.aoi-ctx-menu__sep { height: 1px; background: rgba(255,255,255,0.07); margin: 3px 0; }

/* ===== Sun / Solar Terminator Overlay ===== */
.sun-icon { pointer-events: none; }
.sun-icon__inner { filter: drop-shadow(0 0 6px rgba(255,215,0,0.7)); }
.sun-tooltip { background: rgba(30,37,44,0.95) !important; border: 1px solid rgba(255,200,0,0.3) !important; color: #FFD700 !important; font-size: 11px !important; }
.leaflet-tooltip.sun-tooltip::before { display: none; }

/* ===== Tasking Wizard — Cost Estimate ===== */
.tasking-cost-section { background: rgba(79,168,201,0.04); border-color: rgba(79,168,201,0.2) !important; }
.tasking-cost-grid { display: flex; flex-direction: column; gap: 0; margin-bottom: 12px; }
.tasking-cost-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 12px;
}
.tasking-cost-row:last-child { border-bottom: none; }
.tasking-cost-label { color: #6B7280; }
.tasking-cost-val { color: #C9D1D9; font-weight: 500; }
.tasking-cost-total {
  background: rgba(79,168,201,0.08); border: 1px solid rgba(79,168,201,0.2);
  border-radius: 8px; padding: 12px 14px; text-align: center;
}
.tasking-cost-total__label { font-size: 11px; color: #6B7280; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.tasking-cost-total__range { font-size: 20px; font-weight: 700; color: #4FA8C9; }
.tasking-cost-total__currency { font-size: 12px; color: #6B7280; margin-left: 6px; font-weight: 400; }
.tasking-cost-total__note { font-size: 10px; color: #4B5563; margin-top: 4px; font-style: italic; }
.tasking-cost-free {
  display: flex; align-items: center; gap: 12px;
  background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.25);
  border-radius: 8px; padding: 12px 14px;
}

/* ===== Weather-Aware Scheduling ===== */
.wz-weather-section {
  margin-top: 14px; padding: 12px 14px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
}
.wz-weather-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.wz-weather-title { font-size: 12px; font-weight: 700; color: #C9D1D9; }
.wz-weather-status { font-size: 10px; color: #6B7280; }
.wz-weather-chart { min-height: 70px; }
.wz-weather-bars { display: flex; align-items: flex-end; gap: 2px; height: 60px; }
.wz-weather-bar-col {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  flex: 1; cursor: default; padding-top: 2px;
}
.wz-weather-bar-col--out { opacity: 0.35; }
.wz-weather-bar-col--best { background: rgba(16,185,129,0.08); border-radius: 3px; }
.wz-weather-bar-pct { font-size: 8px; color: #4B5563; line-height: 1; }
.wz-weather-bar { width: 100%; min-height: 4px; border-radius: 2px 2px 0 0; transition: height 0.3s; }
.wz-weather-bar-day { font-size: 8px; color: #4B5563; white-space: nowrap; overflow: hidden; max-width: 22px; text-overflow: clip; }
.wz-weather-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 10px; color: #6B7280; margin-top: 6px; }
.wz-weather-best-badge {
  font-weight: 700; color: #10B981;
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25);
  border-radius: 4px; padding: 1px 6px;
}
.wz-weather-smart-btn {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 7px 12px; width: 100%;
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3);
  border-radius: 6px; color: #10B981; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background 0.15s;
}
.wz-weather-smart-btn:hover { background: rgba(16,185,129,0.2); }
.wz-weather-smart-btn:disabled { opacity: 0.6; cursor: default; }

/* ===== Time Series Viewer ===== */
.tsv-overlay {
  position: fixed; inset: 0; z-index: 60000;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 16px;
  opacity: 0; pointer-events: none; transition: opacity 0.18s;
}
.tsv-overlay--visible { opacity: 1; pointer-events: all; }
.tsv-panel {
  width: min(1100px, 96vw); max-height: calc(100vh - 48px);
  background: #1e252c; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px; display: flex; flex-direction: column;
  overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  transform: translateY(-10px); transition: transform 0.18s;
}
.tsv-overlay--visible .tsv-panel { transform: translateY(0); }
.tsv-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.tsv-header__left { display: flex; align-items: center; gap: 10px; }
.tsv-header__title { font-size: 14px; font-weight: 700; color: #E8ECEF; }
.tsv-header__sub { font-size: 12px; color: #6B7280; }
.tsv-header__actions { display: flex; align-items: center; gap: 8px; }
.tsv-btn { padding: 5px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.15); font-size: 12px; cursor: pointer; font-family: inherit; transition: all 0.12s; }
.tsv-btn--ghost { background: transparent; color: #9CA3AF; }
.tsv-btn--ghost:hover { background: rgba(255,255,255,0.07); color: #E8ECEF; }
.tsv-btn--close { background: transparent; border: none; color: #6B7280; font-size: 20px; padding: 0 4px; cursor: pointer; line-height: 1; }
.tsv-btn--close:hover { color: #E8ECEF; }
.tsv-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.tsv-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px; color: #6B7280; font-size: 13px; }
.tsv-spinner { width: 28px; height: 28px; border: 2.5px solid rgba(255,255,255,0.1); border-top-color: #4FA8C9; border-radius: 50%; animation: spin 0.8s linear infinite; }
.tsv-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 60px; color: #6B7280; font-size: 13px; text-align: center; }
.tsv-empty__sub { font-size: 11px; }
/* Selectors bar */
.tsv-selectors { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.07); flex-shrink: 0; }
.tsv-selector { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.tsv-selector__label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #6B7280; flex-shrink: 0; }
.tsv-selector__select { flex: 1; min-width: 0; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: 5px; color: #E8ECEF; font-size: 11px; padding: 4px 7px; font-family: inherit; cursor: pointer; }
.tsv-selector__meta { font-size: 10px; color: #6B7280; flex-shrink: 0; }
.tsv-selectors__mid { flex-shrink: 0; font-size: 11px; color: #4B5563; padding: 0 8px; text-align: center; }
/* Compare viewport */
.tsv-compare { flex: 1; display: flex; position: relative; overflow: hidden; min-height: 300px; }
.tsv-compare__left, .tsv-compare__right { height: 100%; overflow: hidden; position: relative; transition: width 0.05s; }
.tsv-compare__left { width: 50%; border-right: none; }
.tsv-compare__right { width: 50%; }
.tsv-compare__divider {
  position: absolute; top: 0; bottom: 0; width: 3px;
  background: rgba(255,255,255,0.9); z-index: 10; cursor: ew-resize;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4), 0 0 12px rgba(255,255,255,0.3);
}
.tsv-divider-handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  display: flex; gap: 2px; align-items: center;
  background: rgba(255,255,255,0.95); border-radius: 20px;
  padding: 6px 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  color: #1A1F24;
}
/* Image panels */
.tsv-img-panel { width: 100%; height: 100%; position: relative; background: #111518; }
.tsv-img-panel__img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.tsv-img-panel__demo {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 20px;
}
.tsv-img-panel__demo-text { font-size: 14px; font-weight: 600; color: #4B5563; text-align: center; line-height: 1.5; }
.tsv-img-panel__demo-text span { font-size: 11px; font-weight: 400; display: block; margin-top: 3px; }
.tsv-img-panel__badge {
  position: absolute; bottom: 8px; font-size: 10px; font-weight: 600;
  background: rgba(0,0,0,0.7); color: #E8ECEF; padding: 3px 8px;
  border-radius: 4px; pointer-events: none; white-space: nowrap; max-width: 80%;
  overflow: hidden; text-overflow: ellipsis;
}
.tsv-img-panel__badge--left { left: 8px; }
.tsv-img-panel__badge--right { right: 8px; }
.tsv-img-panel__cloud {
  position: absolute; top: 8px; right: 8px; font-size: 10px; font-weight: 600;
  background: rgba(0,0,0,0.6); color: #9CA3AF; padding: 2px 7px; border-radius: 4px;
}
/* Thumbnail strip */
.tsv-strip {
  display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain;
  padding: 8px 12px; border-top: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0; min-height: 70px;
}
.tsv-strip::-webkit-scrollbar { height: 4px; }
.tsv-strip::-webkit-scrollbar-track { background: transparent; }
.tsv-strip::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.tsv-thumb {
  flex-shrink: 0; width: 72px; border-radius: 5px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; position: relative; transition: border-color 0.15s;
  background: #111518;
}
.tsv-thumb:hover { border-color: rgba(79,168,201,0.5); }
.tsv-thumb--left { border-color: #4FA8C9 !important; }
.tsv-thumb--right { border-color: #F59E0B !important; }
.tsv-thumb img { width: 100%; height: 42px; object-fit: cover; display: block; }
.tsv-thumb__placeholder { height: 42px; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #4B5563; font-family: monospace; }
.tsv-thumb__meta { display: flex; justify-content: space-between; padding: 2px 4px; }
.tsv-thumb__date { font-size: 9px; color: #6B7280; }
.tsv-thumb__cloud { font-size: 9px; color: #4B5563; }
.tsv-thumb__badge {
  position: absolute; top: 2px; right: 2px; font-size: 9px; font-weight: 700;
  padding: 1px 4px; border-radius: 3px; line-height: 1;
}
.tsv-thumb--left .tsv-thumb__badge { background: #4FA8C9; color: #fff; }
.tsv-thumb--right .tsv-thumb__badge { background: #F59E0B; color: #fff; }

/* ===== Share Link Dialog ===== */
.share-dlg-overlay {
  position: fixed; inset: 0; z-index: 99000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.share-dlg-overlay.share-dlg--visible { opacity: 1; pointer-events: all; }
.share-dlg {
  width: min(480px, 94vw); background: #1e252c;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6); overflow: hidden;
  transform: scale(0.96); transition: transform 0.15s;
}
.share-dlg-overlay.share-dlg--visible .share-dlg { transform: scale(1); }
.share-dlg-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.share-dlg-title { font-size: 14px; font-weight: 700; color: #E8ECEF; }
.share-dlg-close { background: none; border: none; color: #6B7280; font-size: 20px; cursor: pointer; line-height: 1; padding: 0 4px; }
.share-dlg-close:hover { color: #E8ECEF; }
.share-dlg-body { padding: 18px 16px; }
.share-dlg-loading { display: flex; align-items: center; gap: 12px; padding: 24px; color: #6B7280; font-size: 13px; }
.share-dlg-spinner { width: 24px; height: 24px; border: 2.5px solid rgba(255,255,255,0.1); border-top-color: #4FA8C9; border-radius: 50%; animation: spin 0.8s linear infinite; }
.share-dlg-error { color: #EF4444; font-size: 13px; padding: 12px 0; }
.share-dlg-entity { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.share-dlg-entity__type { font-size: 10px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.08em; background: rgba(79,168,201,0.15); color: #4FA8C9; border: 1px solid rgba(79,168,201,0.3); border-radius: 4px; padding: 2px 7px; }
.share-dlg-entity__name { font-size: 13px; color: #C9D1D9; font-weight: 500; }
.share-dlg-url-row { display: flex; gap: 8px; margin-bottom: 10px; }
.share-dlg-url { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; color: #9CA3AF; font-size: 12px; font-family: monospace; padding: 8px 10px; outline: none; }
.share-dlg-copy-btn { flex-shrink: 0; background: rgba(79,168,201,0.15); border: 1px solid rgba(79,168,201,0.3); border-radius: 6px; color: #4FA8C9; font-size: 12px; font-weight: 600; padding: 0 16px; cursor: pointer; transition: background 0.12s; }
.share-dlg-copy-btn:hover { background: rgba(79,168,201,0.28); }
.share-dlg-meta { font-size: 11px; color: #4B5563; margin-bottom: 16px; }
.share-dlg-actions { display: flex; gap: 8px; justify-content: flex-end; }
.share-dlg-btn { padding: 7px 14px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; border: 1px solid rgba(255,255,255,0.12); transition: all 0.12s; }
.share-dlg-btn--ghost { background: transparent; color: #9CA3AF; }
.share-dlg-btn--ghost:hover { background: rgba(255,255,255,0.07); color: #E8ECEF; }
.share-dlg-btn--primary { background: #4FA8C9; border-color: #4FA8C9; color: #fff; }
.share-dlg-btn--primary:hover { background: #3d95b5; }
/* Share list */
.share-list { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.share-list-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 7px; }
.share-list-item--expired { opacity: 0.45; }
.share-list-item__left { flex: 1; min-width: 0; }
.share-list-item__type { font-size: 9px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.08em; color: #6B7280; margin-right: 6px; }
.share-list-item__title { font-size: 12px; color: #C9D1D9; font-weight: 500; }
.share-list-item__meta { display: block; font-size: 10px; color: #4B5563; margin-top: 2px; }
.share-list-item__actions { display: flex; gap: 6px; flex-shrink: 0; }
.share-list-btn { font-size: 11px; padding: 3px 9px; border-radius: 4px; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); color: #9CA3AF; cursor: pointer; transition: all 0.1s; }
.share-list-btn:hover { background: rgba(255,255,255,0.12); color: #E8ECEF; }
.share-list-btn--danger { color: #EF4444; border-color: rgba(239,68,68,0.3); }
.share-list-btn--danger:hover { background: rgba(239,68,68,0.1); }

/* File picker — hides the browser's locale-dependent native file input and
   shows an English button + chosen-filename label instead. */
.sv-file-picker { display: flex; align-items: center; gap: 8px; }
.sv-file-picker__btn {
  display: inline-block; padding: 6px 12px; font-size: 11px; font-weight: 600;
  color: #4FA8C9; background: rgba(79,168,201,0.1);
  border: 1px solid rgba(79,168,201,0.35); border-radius: 5px;
  cursor: pointer; white-space: nowrap; user-select: none;
}
.sv-file-picker__btn:hover { background: rgba(79,168,201,0.2); }
.sv-file-picker__name {
  font-size: 11px; color: #8A949E; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}

/* Curseur d'opacité de l'imagerie importée. Placé en bas à droite de la
   carte : le coin le moins encombré, et hors de portée des panneaux
   latéraux comme du tiroir inférieur. Masqué tant qu'aucune imagerie n'est
   affichée, pour ne pas ajouter un réglage sans objet. */
#svImageryOpacity {
  position: fixed;
  right: 16px;
  bottom: 96px;
  z-index: 1200;
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(16, 22, 28, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}
#svImageryOpacity label {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9CA3AF;
  white-space: nowrap;
}
#svImageryOpacity #svImageryOpacityVal {
  color: var(--color-accent, #4FA8C9);
  font-variant-numeric: tabular-nums;
}
#svImageryOpacity input[type="range"] {
  width: 160px;
  accent-color: var(--color-accent, #4FA8C9);
  cursor: pointer;
}
