/* ================================================================
   SatView — Tasking Optimizer Styles
   4-quadrant layout: params (top-left), map (top-right), results (bottom)
   Resizable splitters between sections
   ================================================================ */

/* ---- Floating, resizable window (same family as the other windows:
   draggable by .topt-header, position/size persisted, [— □ ×] chrome via
   tool-windows.js). Wide default: 4-quadrant params/map/results layout. */
.topt-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 12000;               /* floating-window family */
  width: min(1500px, 96vw);
  height: min(90vh, 940px);
  border: 1px solid #2D343C;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  resize: both;
  min-width: 700px;
  min-height: 440px;
  max-width: 96vw;
  max-height: 96vh;
  background: #1A1F24;
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  overflow: hidden;
  flex-direction: column;
}
.topt-overlay.visible {
  display: flex;
  opacity: 1;
}

/* Mobile keeps the previous fullscreen behavior. */
@media (max-width: 768px) {
  .topt-overlay,
  .topt-overlay.visible {
    inset: 0;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    max-width: none;
    max-height: none;
    transform: none;
    border-radius: 0;
    resize: none;
  }
}

/* ---- Header ---- */
.topt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
  padding: 0 16px;
  background: #21272D;
  border-bottom: 1px solid #2D343C;
  flex-shrink: 0;
  cursor: move;         /* drag handle (tool-windows.js) */
  user-select: none;
}
.topt-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topt-header__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #E8EAED;
}
.topt-header__title svg { color: #4FA8C9; }
.topt-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Body: CSS Grid 4-quadrant layout ---- */
.topt-body {
  flex: 1;
  display: grid;
  /* columns: params (left) | splitter | map (right) */
  grid-template-columns: var(--topt-left-w, 50%) 5px 1fr;
  /* rows: top half | splitter | bottom half (results) */
  grid-template-rows: var(--topt-top-h, 50%) 5px 1fr;
  overflow: hidden;
  min-height: 0;
}

/* ---- Top-left: Parameters/Sidebar ---- */
.topt-sidebar {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
  background: #21272D;
  border-right: 1px solid #2D343C;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  min-width: 0;
  min-height: 0;
}
.topt-sidebar::-webkit-scrollbar { width: 5px; }
.topt-sidebar::-webkit-scrollbar-track { background: transparent; }
.topt-sidebar::-webkit-scrollbar-thumb { background: #363E48; border-radius: 3px; }

/* ---- Top-right: Map ---- */
.topt-map {
  grid-column: 3 / 4;
  grid-row: 1 / 2;
  background: #1A1F24;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

/* ---- Horizontal splitter (between params and map) ---- */
.topt-splitter-h {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  background: #2D343C;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.topt-splitter-h:hover,
.topt-splitter-h.dragging {
  background: #4FA8C9;
}
.topt-splitter-h::after {
  content: '';
  width: 2px;
  height: 24px;
  background: #8A949E;
  border-radius: 1px;
}
.topt-splitter-h:hover::after,
.topt-splitter-h.dragging::after {
  background: #fff;
}

/* ---- Vertical splitter (between top and bottom) ---- */
.topt-splitter-v {
  grid-column: 1 / -1;
  grid-row: 2 / 3;
  background: #2D343C;
  cursor: row-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.topt-splitter-v:hover,
.topt-splitter-v.dragging {
  background: #4FA8C9;
}
.topt-splitter-v::after {
  content: '';
  width: 24px;
  height: 2px;
  background: #8A949E;
  border-radius: 1px;
}
.topt-splitter-v:hover::after,
.topt-splitter-v.dragging::after {
  background: #fff;
}

/* ---- Bottom: Results panel ---- */
.topt-results {
  grid-column: 1 / -1;
  grid-row: 3 / 4;
  overflow-y: auto;
  overflow-x: auto;
  background: #21272D;
  border-top: 2px solid #4FA8C9;
  min-height: 0;
  min-width: 0;
}
.topt-results::-webkit-scrollbar { width: 5px; }
.topt-results::-webkit-scrollbar-thumb { background: #363E48; border-radius: 3px; }

.topt-results__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #8A949E;
  font-size: 12px;
  text-align: center;
  padding: 20px;
}

/* ---- Sections ---- */
.topt-section {
  padding: 12px 14px;
  border-bottom: 1px solid #2D343C;
}
.topt-section__title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #8A949E;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.topt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(79,168,201,0.2);
  color: #4FA8C9;
  font-size: 10px;
  font-weight: 600;
}

/* ---- Mode toggle ---- */
.topt-mode-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.topt-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #E8EAED;
  cursor: pointer;
}
.topt-radio input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 2px solid #363E48;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.topt-radio input[type="radio"]:checked {
  border-color: #4FA8C9;
}
.topt-radio input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4FA8C9;
}
.topt-radio__mark { display: none; }

/* ---- Satellite filters ---- */
.topt-sat-filters {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.topt-select {
  flex: 1;
  background: #1A1F24;
  border: 1px solid #2D343C;
  border-radius: 4px;
  color: #E8EAED;
  font-size: 11px;
  padding: 4px 6px;
  outline: none;
  min-width: 0;
}
.topt-select:focus { border-color: #4FA8C9; }

/* ---- Satellite / AOI actions ---- */
.topt-sat-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.topt-link-btn {
  background: none;
  border: none;
  color: #8A949E;
  font-size: 10px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.topt-link-btn:hover { color: #E8EAED; }
.topt-link-btn--accent { color: #4FA8C9; }
.topt-link-btn--accent:hover { color: #6BBAD5; }

/* ---- Satellite list ---- */
.topt-sat-list, .topt-aoi-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #2D343C;
  border-radius: 4px;
  background: #1A1F24;
}
.topt-sat-list::-webkit-scrollbar, .topt-aoi-list::-webkit-scrollbar { width: 4px; }
.topt-sat-list::-webkit-scrollbar-thumb, .topt-aoi-list::-webkit-scrollbar-thumb { background: #363E48; border-radius: 2px; }

.topt-sat-group__header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #282F36;
  font-size: 11px;
  font-weight: 600;
  color: #E8EAED;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 1;
}
.topt-sat-group__count {
  margin-left: auto;
  font-size: 10px;
  color: #8A949E;
  font-weight: 400;
}

.topt-sat-item, .topt-aoi-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 20px;
  font-size: 11px;
  color: #C4C9D0;
  cursor: pointer;
  transition: background 0.15s;
}
.topt-sat-item:hover, .topt-aoi-item:hover {
  background: rgba(79,168,201,0.06);
}
.topt-cb {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid #363E48;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.topt-cb:checked {
  background: #4FA8C9;
  border-color: #4FA8C9;
}
.topt-cb:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 3px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.topt-sat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.topt-sat-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topt-sat-res {
  font-size: 10px;
  color: #8A949E;
  flex-shrink: 0;
}

.topt-aoi-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topt-aoi-name {
  font-size: 11px;
  color: #E8EAED;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topt-aoi-loc {
  font-size: 10px;
  color: #8A949E;
}

.topt-empty-list {
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: #8A949E;
}

/* ---- Sliders ---- */
.topt-param-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.topt-param-row > label {
  font-size: 11px;
  color: #C4C9D0;
  flex-shrink: 0;
  margin-right: 8px;
}
.topt-slider-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  max-width: 180px;
}
.topt-slider {
  flex: 1;
  -webkit-appearance: none;
  height: 4px;
  background: #2D343C;
  border-radius: 2px;
  outline: none;
}
.topt-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #4FA8C9;
  cursor: pointer;
  border: 2px solid #21272D;
}
.topt-slider-val {
  font-size: 11px;
  color: #4FA8C9;
  font-weight: 600;
  min-width: 28px;
  text-align: right;
}

/* ---- SAR params ---- */
.topt-sar-params {
  padding: 6px 0 0 0;
}
.topt-param-row-double {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.topt-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
}
.topt-field label {
  font-size: 10px;
  color: #8A949E;
  white-space: nowrap;
}
.topt-field input {
  width: 50px;
  background: #1A1F24;
  border: 1px solid #2D343C;
  border-radius: 3px;
  color: #E8EAED;
  font-size: 11px;
  padding: 3px 4px;
  text-align: center;
}

/* ---- Toggle switches ---- */
.topt-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #C4C9D0;
  cursor: pointer;
  padding: 3px 0;
}
.topt-toggle input { display: none; }
.topt-toggle__slider {
  width: 28px;
  height: 14px;
  background: #363E48;
  border-radius: 7px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.topt-toggle__slider::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8A949E;
  transition: transform 0.2s, background 0.2s;
}
.topt-toggle input:checked + .topt-toggle__slider {
  background: rgba(79,168,201,0.3);
}
.topt-toggle input:checked + .topt-toggle__slider::after {
  transform: translateX(14px);
  background: #4FA8C9;
}

/* ---- Warning ---- */
.topt-warning {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 10px;
  color: #F59E0B;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 6px;
  line-height: 1.4;
}
.topt-warning svg { flex-shrink: 0; margin-top: 1px; }

/* ---- Run button section ---- */
.topt-run-section {
  padding: 12px 14px;
  border-top: 1px solid #2D343C;
  position: sticky;
  bottom: 0;
  background: #21272D;
}

/* ---- Results summary KPIs ---- */
.topt-results__summary {
  display: flex;
  gap: 0;
  padding: 10px 16px;
  border-bottom: 1px solid #2D343C;
  background: #1A1F24;
  flex-wrap: wrap;
}
.topt-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  border-right: 1px solid #2D343C;
}
.topt-kpi:last-child { border-right: none; }
.topt-kpi__val {
  font-size: 18px;
  font-weight: 700;
  color: #4FA8C9;
  line-height: 1.2;
}
.topt-kpi__label {
  font-size: 9px;
  color: #8A949E;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Recommendations ---- */
.topt-results__recommend {
  padding: 10px 16px;
  border-bottom: 1px solid #2D343C;
  background: rgba(16,185,129,0.04);
}
.topt-results__recommend-title {
  font-size: 11px;
  font-weight: 600;
  color: #10B981;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.topt-rec-sat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 11px;
}
.topt-rec-name { color: #E8EAED; }
.topt-rec-meta { color: #8A949E; font-size: 10px; margin-left: auto; }

/* ---- Per-AOI result blocks ---- */
.topt-results__aoi-list {
  padding: 0;
}
.topt-aoi-result {
  border-bottom: 1px solid #2D343C;
}
.topt-aoi-result__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.topt-aoi-result__header:hover {
  background: rgba(79,168,201,0.06);
}
.topt-aoi-result__arrow {
  transition: transform 0.2s;
  color: #8A949E;
  flex-shrink: 0;
}
.topt-aoi-result__arrow.expanded {
  transform: rotate(90deg);
}
.topt-aoi-result__name {
  font-size: 12px;
  font-weight: 600;
  color: #E8EAED;
}
.topt-aoi-result__count {
  font-size: 10px;
  color: #4FA8C9;
  background: rgba(79,168,201,0.12);
  padding: 1px 6px;
  border-radius: 8px;
}
.topt-aoi-result__revisit {
  font-size: 10px;
  color: #8A949E;
  margin-left: auto;
}
.topt-aoi-result__best {
  font-size: 10px;
  color: #10B981;
  font-weight: 600;
}

.topt-aoi-result__body {
  padding: 0 16px 12px;
}

/* ---- Stats row ---- */
.topt-stats-row {
  display: flex;
  gap: 0;
  margin-bottom: 8px;
  border: 1px solid #2D343C;
  border-radius: 4px;
  background: #1A1F24;
}
.topt-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 8px;
  border-right: 1px solid #2D343C;
}
.topt-stat:last-child { border-right: none; }
.topt-stat__val { font-size: 13px; font-weight: 700; color: #E8EAED; }
.topt-stat__lbl { font-size: 9px; color: #8A949E; text-transform: uppercase; }

/* ---- SAR badge ---- */
.topt-sar-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #2ec4b6;
  background: rgba(46,196,182,0.1);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

/* ---- Pass table ---- */
.topt-pass-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.topt-pass-table thead th {
  text-align: left;
  padding: 5px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #8A949E;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border-bottom: 1px solid #2D343C;
  background: #1A1F24;
  position: sticky;
  top: 0;
  z-index: 1;
}
.topt-pass-table__sel { width: 24px; }
.topt-pass-table tbody tr {
  transition: background 0.15s;
  cursor: pointer;
}
.topt-pass-table tbody tr:hover {
  background: rgba(79,168,201,0.06);
}
.topt-pass-table tbody tr.selected {
  background: rgba(79,168,201,0.1);
}
.topt-pass-table td {
  padding: 4px 6px;
  color: #C4C9D0;
  border-bottom: 1px solid rgba(45,52,60,0.5);
  white-space: nowrap;
}

/* ---- Weather-failed dimmed rows ---- */
.topt-pass-table tbody tr.weather-failed {
  opacity: 0.45;
}
.topt-pass-table tbody tr.weather-failed:hover {
  opacity: 0.7;
}
.topt-weather-tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.4;
}
.topt-weather-tag--cloud {
  background: rgba(239,68,68,0.12);
  color: #EF4444;
}
.topt-weather-tag--sun {
  background: rgba(245,158,11,0.12);
  color: #F59E0B;
}
.topt-weather-tag--ok {
  background: rgba(16,185,129,0.12);
  color: #10B981;
}

/* ---- Score badges ---- */
.topt-score {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
}
.topt-score--high { background: rgba(16,185,129,0.15); color: #10B981; }
.topt-score--med  { background: rgba(245,158,11,0.15); color: #F59E0B; }
.topt-score--low  { background: rgba(239,68,68,0.15); color: #EF4444; }

/* ---- AOI Center: optimizer arrow button ---- */
.amc-opt-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(79,168,201,0.1);
  border: 1px solid rgba(79,168,201,0.2);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  color: #4FA8C9;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.amc-opt-arrow:hover {
  background: rgba(79,168,201,0.2);
}
.amc-opt-arrow svg { flex-shrink: 0; }

/* ---- AOI Center: optimizer detail popup ---- */
.amc-opt-detail {
  position: fixed;
  z-index: 12500;
  background: #21272D;
  border: 1px solid #2D343C;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  max-width: 600px;
  max-height: 400px;
  overflow-y: auto;
  padding: 12px 0;
}
.amc-opt-detail::-webkit-scrollbar { width: 4px; }
.amc-opt-detail::-webkit-scrollbar-thumb { background: #363E48; border-radius: 2px; }
.amc-opt-detail__close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #8A949E;
  cursor: pointer;
  padding: 4px;
}
.amc-opt-detail__close:hover { color: #E8EAED; }

/* ---- Optimizer button in AOI Center header ---- */
.amc-opt-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(79,168,201,0.15);
  border: 1px solid rgba(79,168,201,0.3);
  color: #4FA8C9;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.amc-opt-btn:hover {
  background: rgba(79,168,201,0.25);
  border-color: #4FA8C9;
}
.amc-opt-btn svg { flex-shrink: 0; }

/* ---- Prevent text selection during drag ---- */
.topt-dragging {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: col-resize !important;
}
.topt-dragging-v {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: row-resize !important;
}

/* ---- Band elements ---- */
.topt-results__bands {
  margin-top: 12px;
  padding: 10px;
  background: rgba(245,158,11,0.06);
  border: 1px solid rgba(245,158,11,0.18);
  border-radius: 6px;
}
.topt-results__bands-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #F59E0B;
  margin-bottom: 8px;
}
.topt-band-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
}
.topt-band-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-size: 11px;
}
.topt-band-item:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.1);
}
.topt-band-item.active {
  background: rgba(79,168,201,0.12);
  border-color: rgba(79,168,201,0.3);
}
.topt-band-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}
.topt-band-id {
  font-weight: 700;
  color: #E8EAED;
  min-width: 28px;
}
.topt-band-sat {
  color: #C0C6CD;
  flex-shrink: 0;
}
.topt-band-time {
  color: #8A949E;
  flex-shrink: 0;
}
.topt-band-aois {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-left: auto;
}
.topt-band-aoi-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(79,168,201,0.15);
  color: #4FA8C9;
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
}
.topt-band-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.topt-text-muted {
  color: #555;
}

/* ---- Band results: warning (uncovered AOIs) ---- */
.topt-results__warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(239,68,68,0.08);
  border-bottom: 1px solid rgba(239,68,68,0.15);
  font-size: 12px;
  color: #EF4444;
  line-height: 1.5;
}
.topt-results__warning svg { flex-shrink: 0; margin-top: 2px; }
.topt-results__warning strong { color: #F87171; }

/* ---- Band item selected state ---- */
.topt-band-item--selected {
  background: rgba(79,168,201,0.12) !important;
  border-color: rgba(79,168,201,0.3) !important;
}

/* ---- Band item extra (non-optimal candidates) ---- */
.topt-band-item--extra {
  opacity: 0.65;
}
.topt-band-item--extra:hover {
  opacity: 0.85;
}

/* ---- Extra candidates expandable section ---- */
.topt-extra-candidates {
  margin-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 6px;
}
.topt-extra-summary {
  font-size: 11px;
  color: #8A949E;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
}
.topt-extra-summary:hover {
  color: #C4C9D0;
}

/* ---- Extra band list ---- */
.topt-band-list--extra {
  margin-top: 6px;
}

/* ---- Band duration label ---- */
.topt-band-dur {
  font-size: 10px;
  color: #8A949E;
  font-weight: 600;
  flex-shrink: 0;
  padding: 1px 5px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
}

/* ---- Band checkbox ---- */
.topt-band-cb {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid #363E48;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}
.topt-band-cb:checked {
  background: #4FA8C9;
  border-color: #4FA8C9;
}
.topt-band-cb:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 3px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* ---- Uncovered AOI result ---- */
.topt-aoi-result--uncovered {
  border-left: 3px solid #EF4444;
}
.topt-aoi-result--uncovered .topt-aoi-result__header {
  background: rgba(239,68,68,0.04);
}

/* ---- Uncovered AOI tag ---- */
.topt-aoi-result__uncovered-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(239,68,68,0.15);
  color: #EF4444;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* ---- Pass checkbox (inside table) ---- */
.topt-pass-cb {
  appearance: none;
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border: 1.5px solid #363E48;
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.topt-pass-cb:checked {
  background: #4FA8C9;
  border-color: #4FA8C9;
}
.topt-pass-cb:checked::after {
  content: '';
  position: absolute;
  top: 1px;
  left: 3px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

/* ---- Suggested band item (warning style) ---- */
.topt-band-item--suggested {
  border-color: rgba(245,158,11,0.25) !important;
  background: rgba(245,158,11,0.06) !important;
}
.topt-band-item--suggested:hover {
  background: rgba(245,158,11,0.10) !important;
}
.topt-band-item--suggested.topt-band-item--selected {
  background: rgba(245,158,11,0.14) !important;
  border-color: rgba(245,158,11,0.35) !important;
}

/* ---- Suggested bands section ---- */
.topt-results__bands-suggested {
  margin-top: 10px;
  border-top: 1px dashed rgba(245,158,11,0.25);
  padding-top: 8px;
}
.topt-results__bands-title--suggested {
  color: #F59E0B !important;
}
.topt-results__bands-suggested-hint {
  font-size: 11px;
  color: #8A949E;
  padding: 2px 16px 8px 16px;
  line-height: 1.4;
  font-style: italic;
}

/* ---- Suggested AOI result ---- */
.topt-aoi-result--suggested {
  border-left: 3px solid #F59E0B;
}
.topt-aoi-result--suggested .topt-aoi-result__header {
  background: rgba(245,158,11,0.04);
}

/* ---- Suggested AOI tag ---- */
.topt-aoi-result__suggested-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: rgba(245,158,11,0.15);
  color: #F59E0B;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .topt-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 5px auto 5px 1fr;
  }
  .topt-sidebar {
    grid-column: 1;
    grid-row: 1;
    max-height: 300px;
  }
  .topt-splitter-h { display: none; }
  .topt-splitter-v {
    grid-column: 1;
    grid-row: 2;
  }
  .topt-map {
    grid-column: 1;
    grid-row: 3;
    min-height: 200px;
  }
  .topt-results {
    grid-column: 1;
    grid-row: 5;
  }
}

/* ---- Confirmation dialog ---- */
.topt-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.topt-confirm-overlay.visible { opacity: 1; }
.topt-confirm-dialog {
  background: #21272D;
  border: 1px solid #363E48;
  border-radius: 12px;
  padding: 32px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.topt-confirm__icon {
  margin-bottom: 12px;
}
.topt-confirm__title {
  font-size: 20px;
  font-weight: 700;
  color: #E8EAED;
  margin-bottom: 8px;
}
.topt-confirm__sub {
  font-size: 13px;
  color: #8A949E;
  margin-bottom: 16px;
  line-height: 1.5;
}
.topt-confirm__sub strong {
  color: #F59E0B;
}
.topt-confirm__list {
  text-align: left;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.15);
  border-radius: 6px;
}
.topt-confirm__order {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 12px;
  color: #C0C6CD;
}
.topt-confirm__more {
  padding: 4px 0;
  font-size: 11px;
  color: #8A949E;
  font-style: italic;
}
.topt-confirm__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
