/* SatDeck P0 — 离线模式 / 战脑推送 / 离线底图 HUD
   Gate: G-SAT-OFFLINE-MODE-01 · G-SAT-BRAIN-PUSH-01 · G-SAT-MAP-OFFLINE-01 */

.sat-mode-toggle {
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.sat-mode-toggle:hover {
  border-color: rgba(125, 216, 234, 0.7);
  background: rgba(32, 142, 168, 0.16);
}
.sat-mode-toggle.sat-mode-offline {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.1);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.15);
}

html.sat-offline .blink-dot {
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
}

.sat-action-btn {
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, rgba(32, 142, 168, 0.15), rgba(32, 142, 168, 0.05));
  border: 1px solid rgba(32, 142, 168, 0.5);
  color: #7dd8ea;
  padding: 6px 10px;
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: all 0.2s;
  width: 100%;
  text-align: center;
}
.sat-action-btn:hover {
  border-color: #208ea8;
  color: #fff;
  background: linear-gradient(135deg, rgba(32, 142, 168, 0.3), rgba(32, 142, 168, 0.1));
}
.sat-action-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.sat-action-btn--amber {
  border-color: rgba(245, 197, 24, 0.45);
  color: #f5c518;
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.14), rgba(245, 197, 24, 0.04));
}
.sat-action-btn--amber:hover {
  border-color: #f5c518;
  color: #fff8d6;
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.28), rgba(245, 197, 24, 0.08));
}

.sat-map-offline-banner {
  display: none;
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 800;
  padding: 4px 10px;
  font-family: Rajdhani, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #fbbf24;
  background: rgba(7, 13, 18, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.35);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
  pointer-events: none;
  max-width: 92%;
}
.sat-map-banner--ok {
  color: #7dd8ea;
  border-color: rgba(32, 142, 168, 0.45);
}
.sat-map-banner--warn {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.35);
}

#map {
  background: #070d12;
}

/* 战术暗化：卫星影像略压亮度，轨迹更清晰 */
html.sat-basemap-live .leaflet-tile-pane {
  filter: brightness(0.72) contrast(1.08) saturate(0.9);
}
html.sat-basemap-live .leaflet-overlay-pane,
html.sat-basemap-live .leaflet-marker-pane {
  filter: none;
}

/* ── G-SAT-HANDBOOK-01 席位手册 ── */
.sat-handbook-trigger {
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: #7dd8ea;
  background: rgba(32, 142, 168, 0.1);
  border: 1px solid rgba(32, 142, 168, 0.45);
  padding: 3px 12px;
  cursor: pointer;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
  transition: all 0.2s;
  text-transform: uppercase;
}
.sat-handbook-trigger:hover {
  color: #fff;
  border-color: #208ea8;
  background: rgba(32, 142, 168, 0.28);
  box-shadow: 0 0 12px rgba(32, 142, 168, 0.25);
}
.sat-handbook-trigger.sat-hb-pulse {
  animation: sat-hb-pulse 1.6s ease-in-out infinite;
}
@keyframes sat-hb-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(32, 142, 168, 0); }
  50% { box-shadow: 0 0 14px rgba(32, 142, 168, 0.55); }
}

.sat-map-legend-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 800;
  font-family: Rajdhani, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #7dd8ea;
  background: rgba(7, 13, 18, 0.78);
  border: 1px solid rgba(32, 142, 168, 0.4);
  padding: 3px 10px;
  cursor: pointer;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}
.sat-map-legend-chip:hover {
  color: #fff;
  border-color: #208ea8;
}

.sat-hb-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(32, 142, 168, 0.12), transparent 55%),
    rgba(3, 8, 12, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.sat-hb-overlay[hidden] {
  display: none !important;
}

.sat-hb-panel {
  width: min(720px, 96vw);
  max-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(165deg, rgba(14, 28, 36, 0.98), rgba(6, 12, 18, 0.98));
  border: 1px solid rgba(32, 142, 168, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 24px 64px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(125, 216, 234, 0.08);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  overflow: hidden;
}

.sat-hb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 10px;
  border-bottom: 1px solid rgba(32, 142, 168, 0.2);
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(32, 142, 168, 0.03) 2px,
    rgba(32, 142, 168, 0.03) 4px
  );
}
.sat-hb-kicker {
  font-family: Rajdhani, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: rgba(32, 142, 168, 0.7);
}
.sat-hb-title {
  margin: 4px 0 0;
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.12em;
  color: #e8f7fb;
}
.sat-hb-close {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(32, 142, 168, 0.35);
  background: rgba(0, 0, 0, 0.25);
  color: #7dd8ea;
  cursor: pointer;
  font-size: 0.9rem;
}
.sat-hb-close:hover {
  color: #fff;
  border-color: #208ea8;
}

.sat-hb-sat-glyph {
  display: inline-block;
  width: 18px;
  height: 12px;
  position: relative;
}
.sat-hb-sat-glyph::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #7dffb3;
  box-shadow: 0 0 6px #7dffb3;
}
.sat-hb-sat-glyph::after {
  content: '';
  position: absolute;
  left: 1px;
  top: 4px;
  width: 16px;
  height: 2px;
  background: linear-gradient(90deg, #7dffb3, transparent 30%, transparent 70%, #7dffb3);
}
.sat-hb-gloss-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.sat-hb-gloss {
  padding: 8px 10px;
  border-left: 2px solid rgba(125, 255, 179, 0.35);
  background: rgba(125, 255, 179, 0.04);
  transition: background 0.35s, border-color 0.35s;
}
.sat-hb-gloss.is-flash {
  border-left-color: #f5c518;
  background: rgba(245, 197, 24, 0.12);
}
.sat-hb-gloss-t {
  font-family: Orbitron, Rajdhani, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: #7dffb3;
  margin-bottom: 4px;
}
.sat-hb-gloss-b {
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(220, 235, 240, 0.88);
}
.sat-hb-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 16px 0;
}
.sat-hb-tab {
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  color: rgba(125, 216, 234, 0.55);
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  padding: 8px 14px 10px;
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px);
}
.sat-hb-tab:hover {
  color: #7dd8ea;
}
.sat-hb-tab.active {
  color: #fff;
  background: rgba(32, 142, 168, 0.16);
  border-color: rgba(32, 142, 168, 0.35);
}

.sat-hb-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 22px;
  min-height: 0;
}
.sat-hb-h3 {
  margin: 0 0 10px;
  font-family: Rajdhani, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: #7dd8ea;
}
.sat-hb-p {
  margin: 0 0 12px;
  font-family: Rajdhani, sans-serif;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(230, 240, 245, 0.88);
}
.sat-hb-p b,
.sat-hb-ul b {
  color: #fff;
  font-weight: 700;
}
.sat-hb-p code,
.sat-hb-ul code {
  font-size: 0.78rem;
  color: #f5c518;
  background: rgba(245, 197, 24, 0.08);
  padding: 1px 5px;
}
.sat-hb-muted {
  color: rgba(125, 216, 234, 0.55) !important;
  font-size: 0.8rem !important;
}

.sat-hb-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
@media (max-width: 640px) {
  .sat-hb-cards { grid-template-columns: 1fr; }
}
.sat-hb-card {
  border: 1px solid rgba(32, 142, 168, 0.3);
  background: rgba(32, 142, 168, 0.06);
  padding: 12px;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.sat-hb-card--amber {
  border-color: rgba(245, 197, 24, 0.35);
  background: rgba(245, 197, 24, 0.05);
}
.sat-hb-card-k {
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: #7dd8ea;
  margin-bottom: 8px;
}
.sat-hb-card--amber .sat-hb-card-k { color: #f5c518; }

.sat-hb-ul {
  margin: 0;
  padding-left: 1.1rem;
  font-family: Rajdhani, sans-serif;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(230, 240, 245, 0.85);
}
.sat-hb-ul--ops li { margin-bottom: 6px; }

.sat-hb-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.sat-hb-legend-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 10px;
  border: 1px solid rgba(32, 142, 168, 0.18);
  background: rgba(0, 0, 0, 0.22);
}
.sat-hb-swatch {
  width: 44px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sat-hb-legend-title {
  font-family: Rajdhani, sans-serif;
  font-weight: 700;
  font-size: 0.86rem;
  color: #e8f7fb;
  letter-spacing: 0.04em;
}
.sat-hb-legend-desc {
  font-family: Rajdhani, sans-serif;
  font-size: 0.78rem;
  color: rgba(125, 216, 234, 0.7);
  line-height: 1.4;
  margin-top: 2px;
}
.sat-hb-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px currentColor;
}
.sat-hb-dot--cyan {
  background: #22d3ee;
  color: #22d3ee;
  border: 2px solid #0ea5e9;
}
.sat-hb-dot--red {
  background: #f87171;
  color: #ef4444;
  border: 2px solid #ef4444;
}
.sat-hb-line {
  display: block;
  width: 36px;
  height: 0;
  border-top: 3px solid #9ca3af;
}
.sat-hb-line--gray { border-color: rgba(180, 200, 210, 0.85); }
.sat-hb-line--pass {
  border-color: #00ffff;
  border-top-style: solid;
  box-shadow: 0 0 6px rgba(0, 255, 255, 0.4);
}
.sat-hb-sun {
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #fff 30%, transparent 70%);
  box-shadow: 0 0 8px #fff;
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.sat-hb-cluster {
  width: 36px;
  height: 18px;
  background:
    linear-gradient(115deg, transparent 40%, rgba(0, 255, 255, 0.7) 41%, transparent 42%),
    linear-gradient(70deg, transparent 45%, rgba(0, 255, 255, 0.5) 46%, transparent 48%),
    linear-gradient(100deg, transparent 30%, rgba(125, 216, 234, 0.6) 32%, transparent 34%);
}
.sat-hb-foot {
  margin-top: 16px;
  font-family: Rajdhani, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: rgba(32, 142, 168, 0.45);
  text-transform: uppercase;
}

html.sat-hb-open {
  overflow: hidden;
}

/* ── G-SAT-LAYOUT-MAP-01 地图主视口 ── */
.sat-center-layout {
  min-height: 0;
}
.sat-center-top {
  position: relative;
  flex: 0 0 34%;
  min-height: 160px;
  max-height: 40%;
  border-bottom: 1px solid rgba(32, 142, 168, 0.2);
  transition: flex-basis 0.25s ease, max-height 0.25s ease, min-height 0.25s ease;
}
.sat-center-map {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.sat-center-map #map {
  flex: 1 1 auto;
  min-height: 0;
}
html.sat-top-collapsed .sat-center-top {
  flex-basis: 28px;
  min-height: 28px;
  max-height: 28px;
}
html.sat-top-collapsed .sat-top-pane {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}
.sat-top-collapse-btn {
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  z-index: 30;
  width: 42px;
  height: 18px;
  font-size: 0.65rem;
  line-height: 1;
  color: #7dd8ea;
  background: rgba(7, 13, 18, 0.92);
  border: 1px solid rgba(32, 142, 168, 0.45);
  border-bottom: none;
  cursor: pointer;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 100%, 0 100%);
}
.sat-top-collapse-btn:hover {
  color: #fff;
  background: rgba(32, 142, 168, 0.25);
}

.sat-map-toolbar {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 850;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  max-width: 70%;
  justify-content: flex-end;
}
.sat-map-legend-chip {
  position: static;
}
.sat-map-tool-btn {
  font-family: Rajdhani, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #7dd8ea;
  background: rgba(7, 13, 18, 0.78);
  border: 1px solid rgba(32, 142, 168, 0.4);
  padding: 3px 10px;
  cursor: pointer;
  clip-path: polygon(4px 0, 100% 0, 100% calc(100% - 4px), calc(100% - 4px) 100%, 0 100%, 0 4px);
}
.sat-map-tool-btn:hover,
.sat-map-tool-btn.active {
  color: #fff;
  border-color: #f5c518;
  background: rgba(245, 197, 24, 0.18);
}
.sat-map-tool-btn--warn:hover {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}
.sat-roi-status {
  font-family: Rajdhani, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: rgba(125, 216, 234, 0.75);
  background: rgba(7, 13, 18, 0.7);
  padding: 3px 8px;
  border: 1px solid rgba(32, 142, 168, 0.25);
}

.sat-enrich-status {
  font-family: Rajdhani, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(125, 216, 234, 0.85);
  padding: 4px 8px 8px;
  border-left: 2px solid rgba(125, 255, 179, 0.45);
  background: linear-gradient(90deg, rgba(125, 255, 179, 0.06), transparent 70%);
  margin-bottom: 2px;
}
.sat-enrich-sensors {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 4px 8px;
}
.sat-enrich-sensor {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: Rajdhani, sans-serif;
  font-size: 0.72rem;
  padding: 5px 8px;
  border: 1px solid rgba(125, 255, 179, 0.18);
  background: rgba(125, 255, 179, 0.05);
}
.sat-enrich-sensor .n { color: #e8f7fb; }
.sat-enrich-sensor .t { color: rgba(125, 216, 234, 0.65); }
.sat-enrich-row .nexus-data-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sat-enrich-q {
  font-family: Fira Code, monospace;
  font-size: 0.55rem;
  line-height: 1;
  width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(125, 255, 179, 0.45);
  background: rgba(125, 255, 179, 0.08);
  color: #7dffb3;
  cursor: pointer;
  flex-shrink: 0;
}
.sat-enrich-q:hover {
  background: rgba(125, 255, 179, 0.22);
  color: #fff;
}
#Info_Panel .sat-enrich-val {
  text-align: left;
  padding-left: 6px;
  padding-right: 4px;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.25;
  letter-spacing: 0.02em;
  font-weight: 600;
  max-width: 100%;
}
.sat-enrich-orbit {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.sat-orbit-badge {
  display: inline-block;
  font-family: Orbitron, Rajdhani, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #0b1a14;
  background: linear-gradient(90deg, #7dffb3, #7dd8ea);
  padding: 1px 8px;
  border: 1px solid rgba(125, 255, 179, 0.5);
}
.sat-orbit-detail {
  font-size: 0.68rem;
  color: rgba(125, 216, 234, 0.75);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.sat-roi-sat-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
  padding: 2px 2px 8px;
}
.sat-roi-sat-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  gap: 0 8px;
  text-align: left;
  font-family: Rajdhani, sans-serif;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(32, 142, 168, 0.25);
  color: #e8f7fb;
  padding: 5px 6px;
  cursor: pointer;
}
.sat-roi-sat-row:hover {
  border-color: #208ea8;
  background: rgba(32, 142, 168, 0.12);
}
.sat-roi-sat-row .norad {
  grid-row: 1 / span 2;
  align-self: center;
  color: #f5c518;
  font-weight: 700;
  font-size: 0.72rem;
}
.sat-roi-sat-row .name {
  font-size: 0.75rem;
  font-weight: 700;
}
.sat-roi-sat-row .meta {
  grid-column: 2;
  font-size: 0.65rem;
  color: rgba(125, 216, 234, 0.65);
}
.sat-roi-empty {
  font-family: Rajdhani, sans-serif;
  font-size: 0.68rem;
  color: rgba(32, 142, 168, 0.45);
  padding: 4px 6px;
}
