/* ============================================================
   FVEY SPACE DOMAIN AWARENESS — MILITARY COMMAND CENTRE
   Combined Space Operations Center (CSpOC) Display Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
    --bg: #000000;
    --bg-panel: rgba(2,4,8,0.92);
    --bg-panel-hover: rgba(8,12,20,0.95);
    --amber: #FFB000;
    --amber-dim: rgba(255,176,0,0.15);
    --amber-glow: rgba(255,176,0,0.08);
    --red: #FF2020;
    --red-dim: rgba(255,32,32,0.12);
    --green: #20FF60;
    --green-dim: rgba(32,255,96,0.12);
    --cyan: #00D4FF;
    --cyan-dim: rgba(0,212,255,0.10);
    --white: #FFFFFF;
    --text: rgba(200,210,220,0.85);
    --text-dim: rgba(200,210,220,0.40);
    --text-muted: rgba(200,210,220,0.22);
    --border: rgba(255,176,0,0.15);
    --border-bright: rgba(255,176,0,0.30);
    --prc: #FF2020;
    --cis: #FF8C00;
    --nkor: #C040FF;
    --iran: #FFD700;
    --fvey: #2080FF;
    --font: 'Share Tech Mono', 'Courier New', monospace;
    --banner-h: 22px;
    --tab-h: 34px;
    --status-h: 24px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ---- Scanline Overlay ---- */
#scanline-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 10000;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(255,176,0,0.008) 1px,
        rgba(255,176,0,0.008) 2px
    );
}

/* ---- CRT Glow on panels ---- */
.panel {
    box-shadow: inset 0 0 30px rgba(255,176,0,0.015), 0 0 1px rgba(255,176,0,0.1);
}

/* ---- Classification Banner ---- */
#class-banner {
    height: var(--banner-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 10px;
    letter-spacing: 6px;
    color: var(--amber);
    flex-shrink: 0;
    text-shadow: 0 0 8px rgba(255,176,0,0.3);
}

/* ---- Tab Bar ---- */
#tab-bar {
    height: var(--tab-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 0 8px;
    gap: 0;
}

.tab-group-left {
    display: flex;
    align-items: center;
    margin-right: 16px;
}

.sys-title {
    font-size: 11px;
    font-weight: normal;
    letter-spacing: 2px;
    color: var(--amber);
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(255,176,0,0.25);
}

.tab-group-center {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    justify-content: center;
}

.tab {
    padding: 0 14px;
    height: var(--tab-h);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--text-dim);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}

.tab:hover {
    color: var(--amber);
    background: rgba(255,176,0,0.03);
}

.tab.active {
    color: var(--amber);
    border-bottom-color: var(--amber);
    background: rgba(255,176,0,0.05);
    text-shadow: 0 0 8px rgba(255,176,0,0.3);
}

.tab-group-right {
    display: flex;
    align-items: center;
    margin-left: 16px;
}

.sys-indicator {
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot-live {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}

/* ---- Status Line ---- */
#status-line {
    height: var(--status-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    overflow-x: auto;
    gap: 0;
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 12px;
    border-right: 1px solid rgba(255,176,0,0.08);
    white-space: nowrap;
    height: 100%;
}

.status-cell:last-child { border-right: none; }

.sl-label {
    font-size: 8px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.sl-val {
    font-size: 10px;
    color: var(--cyan);
}

.sl-val.nominal { color: var(--green); }
.sl-val.threat-high { color: var(--cis); }
.sl-val.threat-critical { color: var(--red); }
.sl-val.threat-elevated { color: var(--amber); }

/* ---- Content Area ---- */
#content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg);
    min-height: 0;
}

/* CMD page fills viewport — no scroll */
#content:has(.cmd-page) {
    overflow: hidden;
}

#content::-webkit-scrollbar { width: 4px; }
#content::-webkit-scrollbar-track { background: transparent; }
#content::-webkit-scrollbar-thumb { background: rgba(255,176,0,0.15); }

/* ---- Init Screen ---- */
.init-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 16px;
}

.init-text {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--amber);
    animation: blink-text 1s step-end infinite;
}

@keyframes blink-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.init-bar {
    width: 200px;
    height: 2px;
    background: rgba(255,176,0,0.1);
}

.init-fill {
    width: 0;
    height: 100%;
    background: var(--amber);
    animation: init-load 1.5s ease-out forwards;
}

@keyframes init-load {
    to { width: 100%; }
}

/* ---- Panels ---- */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    overflow: hidden;
}

.panel:hover {
    border-color: var(--border-bright);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(255,176,0,0.03);
    border-bottom: 1px solid var(--border);
    min-height: 28px;
}

.panel-head h3 {
    font-size: 10px;
    font-weight: normal;
    letter-spacing: 1.5px;
    color: var(--amber);
    white-space: nowrap;
}

.panel-head .ph-meta {
    font-size: 9px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-body {
    padding: 8px;
    overflow-y: auto;
}

.panel-body::-webkit-scrollbar { width: 3px; }
.panel-body::-webkit-scrollbar-thumb { background: rgba(255,176,0,0.1); }

/* ---- Threat Status Bar (CMD page top) ---- */
.threat-bar {
    display: flex;
    gap: 1px;
    background: rgba(255,176,0,0.05);
    border: 1px solid var(--border);
    margin-bottom: 1px;
    flex-shrink: 0;
}

.tb-cell {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg);
}

.tb-icon {
    font-size: 14px;
    opacity: 0.5;
}

.tb-val {
    font-size: 18px;
    font-weight: normal;
    color: var(--white);
    line-height: 1;
}

.tb-lbl {
    font-size: 7px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-top: 1px;
}

.tb-cell.hostile { border-left: 2px solid var(--red); background: rgba(255,32,32,0.03); }
.tb-cell.hostile .tb-val { color: var(--red); text-shadow: 0 0 8px rgba(255,32,32,0.4); }
.tb-cell.hostile .tb-icon { color: var(--red); animation: pulse-threat 3s ease-in-out infinite; }

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

.tb-cell.warning { border-left: 2px solid var(--cis); }
.tb-cell.warning .tb-val { color: var(--cis); }
.tb-cell.warning .tb-icon { color: var(--cis); }

.tb-cell.alert { border-left: 2px solid var(--amber); }
.tb-cell.alert .tb-val { color: var(--amber); }
.tb-cell.alert .tb-icon { color: var(--amber); }

.tb-cell.info .tb-val { color: var(--cyan); }
.tb-cell.info .tb-icon { color: var(--cyan); }

/* ---- CMD Page ---- */
.cmd-page {
    height: calc(100vh - var(--banner-h) - var(--tab-h) - var(--status-h));
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr auto auto;
}

.cmd-layout {
    position: relative;
    overflow: hidden;
}

.cmd-map-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    border: 1px solid var(--border);
}

#sat-map {
    width: 100%;
    height: 100%;
}

#orbital-map, #gs-map {
    width: 100%;
    height: 450px;
}

/* Map Legend */
.map-legend {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 500;
    display: flex;
    gap: 10px;
    padding: 4px 8px;
    background: rgba(0,0,0,0.85);
    border: 1px solid var(--border);
    font-size: 9px;
}

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

.legend-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

/* Floating Panels (over map right side) */
.map-overlay-panels {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 500;
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: calc(100% - 8px);
    overflow-y: auto;
}

.map-overlay-panels::-webkit-scrollbar { width: 3px; }
.map-overlay-panels::-webkit-scrollbar-thumb { background: rgba(255,176,0,0.15); }

.overlay-panel {
    background: rgba(0,0,0,0.88);
    border: 1px solid var(--border);
    backdrop-filter: blur(4px);
}

.overlay-panel .op-head {
    padding: 4px 8px;
    border-bottom: 1px solid var(--border);
    font-size: 9px;
    letter-spacing: 1.5px;
    color: var(--amber);
    background: rgba(255,176,0,0.03);
}

.overlay-panel .op-body {
    padding: 6px 8px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 10px;
}

.overlay-panel .op-body::-webkit-scrollbar { width: 2px; }
.overlay-panel .op-body::-webkit-scrollbar-thumb { background: rgba(255,176,0,0.1); }

/* Force Disposition Row */
.fd-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,176,0,0.05);
}

.fd-row:last-child { border-bottom: none; }

.fd-nation {
    font-size: 10px;
    font-weight: normal;
    width: 50px;
}

.fd-bar-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.03);
    margin: 0 6px;
}

.fd-bar {
    height: 100%;
    opacity: 0.7;
}

.fd-count {
    font-size: 11px;
    color: var(--white);
    width: 35px;
    text-align: right;
}

.fd-cats {
    font-size: 8px;
    color: var(--text-muted);
    margin-left: 4px;
    white-space: nowrap;
}

/* ASAT Threat Item (compact) */
.asat-item {
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,32,32,0.06);
}

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

.asat-name {
    font-size: 10px;
    color: var(--white);
}

.asat-meta {
    font-size: 8px;
    color: var(--text-muted);
}

/* ---- Bottom Strips (CMD page) ---- */
.cmd-bottom-strip {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    margin-bottom: 1px;
    flex-shrink: 0;
    max-height: 150px;
}

.cmd-bottom-strip .panel-body {
    max-height: 110px !important;
    font-size: 10px;
}

/* ---- Environment Bar ---- */
.env-bar {
    display: flex;
    gap: 1px;
    border: 1px solid var(--border);
    background: rgba(255,176,0,0.03);
    flex-shrink: 0;
}

.env-cell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 3px 6px;
    background: var(--bg);
    font-size: 10px;
}

.env-lbl {
    font-size: 7px;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.env-val {
    color: var(--cyan);
}

/* ---- Data Tables ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.data-table th {
    text-align: left;
    padding: 4px 6px;
    font-size: 8px;
    font-weight: normal;
    letter-spacing: 1.5px;
    color: var(--amber);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 1;
}

.data-table td {
    padding: 3px 6px;
    font-size: 10px;
    border-bottom: 1px solid rgba(255,176,0,0.04);
    white-space: nowrap;
    color: var(--text);
}

.data-table tr:hover td { background: rgba(255,176,0,0.02); }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    font-family: var(--font);
    font-size: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 1px 5px;
}

.badge-critical { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,32,32,0.3); }
.badge-high { background: rgba(255,140,0,0.12); color: var(--cis); border: 1px solid rgba(255,140,0,0.3); }
.badge-medium { background: rgba(255,176,0,0.10); color: var(--amber); border: 1px solid rgba(255,176,0,0.25); }
.badge-low { background: var(--green-dim); color: var(--green); border: 1px solid rgba(32,255,96,0.25); }

.badge-prc { background: var(--red-dim); color: var(--prc); border: 1px solid rgba(255,32,32,0.25); }
.badge-cis { background: rgba(255,140,0,0.10); color: var(--cis); border: 1px solid rgba(255,140,0,0.25); }
.badge-nkor { background: rgba(192,64,255,0.10); color: var(--nkor); border: 1px solid rgba(192,64,255,0.25); }
.badge-iran { background: rgba(255,215,0,0.10); color: var(--iran); border: 1px solid rgba(255,215,0,0.25); }
.badge-fvey { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(0,212,255,0.25); }

/* ---- Country Tabs ---- */
.country-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    margin-bottom: 4px;
}

.country-tab {
    flex: 1;
    padding: 5px 10px;
    text-align: center;
    cursor: pointer;
    font-family: var(--font);
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--text-dim);
    background: var(--bg);
    border-right: 1px solid var(--border);
    transition: all 0.15s;
}

.country-tab:last-child { border-right: none; }
.country-tab:hover { color: var(--amber); background: rgba(255,176,0,0.03); }
.country-tab.active { color: var(--amber); background: rgba(255,176,0,0.06); border-bottom: 2px solid var(--amber); }

/* ---- Grids ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 2px; }

.mb-2 { margin-bottom: 2px; }
.mb-4 { margin-bottom: 4px; }

/* ---- Threat Cards ---- */
.threat-card {
    padding: 8px 10px;
    margin-bottom: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 2px solid var(--cis);
}

.threat-card.severity-critical { border-left-color: var(--red); }
.threat-card.severity-high { border-left-color: var(--cis); }
.threat-card.severity-medium { border-left-color: var(--amber); }
.threat-card.severity-low { border-left-color: var(--green); }

.tc-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.tc-title {
    font-size: 11px;
    color: var(--white);
}

.tc-body {
    font-size: 10px;
    color: var(--text);
    line-height: 1.5;
}

.tc-meta {
    font-size: 9px;
    color: var(--text-dim);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

.tc-source {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- ORBAT Bars ---- */
.orbat-row {
    display: grid;
    grid-template-columns: 110px 1fr 40px;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,176,0,0.04);
}

.orbat-cat {
    font-size: 9px;
    color: var(--text);
    letter-spacing: 0.5px;
}

.orbat-bar-wrap {
    height: 8px;
    background: rgba(255,255,255,0.03);
}

.orbat-bar {
    height: 100%;
    opacity: 0.7;
}

.orbat-count {
    font-size: 11px;
    text-align: right;
    color: var(--white);
}

/* ---- Intel Fields ---- */
.intel-field {
    margin-bottom: 8px;
    font-size: 10px;
    color: var(--text);
    line-height: 1.5;
}

.intel-label {
    display: block;
    font-size: 8px;
    letter-spacing: 1.5px;
    color: var(--amber);
    margin-bottom: 2px;
}

/* ---- Launch Line ---- */
.launch-line {
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,176,0,0.04);
}

.launch-line:last-child { border-bottom: none; }

.ll-name {
    font-size: 10px;
    color: var(--white);
}

.ll-detail {
    font-size: 9px;
    color: var(--text-dim);
}

.ll-countdown {
    font-size: 11px;
    color: var(--amber);
}

.ll-adv .ll-name { color: var(--red); }
.ll-adv .ll-countdown { color: var(--red); }
.ll-adv { border-left: 2px solid var(--red); padding-left: 6px; }

/* ---- Vulnerability Line ---- */
.vuln-line {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,176,0,0.04);
    font-size: 10px;
}

.vuln-line:last-child { border-bottom: none; }

/* ---- News Lines ---- */
.news-line {
    display: block;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,176,0,0.04);
    text-decoration: none;
    color: inherit;
}

.news-line:hover { opacity: 0.7; }
.news-line:last-child { border-bottom: none; }

.nl-title {
    font-size: 10px;
    color: var(--text);
    line-height: 1.3;
}

.nl-meta {
    font-size: 8px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ---- Map Container ---- */
.map-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: #000;
}


/* Leaflet overrides */
.leaflet-control-zoom a {
    background: #000 !important;
    color: var(--amber) !important;
    border-color: var(--border) !important;
    font-family: var(--font) !important;
    width: 26px !important;
    height: 26px !important;
    line-height: 26px !important;
    font-size: 14px !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(255,176,0,0.1) !important;
}

.leaflet-control-attribution { display: none !important; }

.leaflet-container {
    background: #000 !important;
}

/* Invert + darken OSM tiles to look like a military dark map */
.leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(0.6) contrast(1.2) saturate(0.3);
}

/* Sat popup override */
.sat-popup .leaflet-popup-content-wrapper {
    background: rgba(0,0,0,0.95) !important;
    border: 1px solid var(--border) !important;
    border-radius: 0 !important;
    box-shadow: 0 0 15px rgba(0,0,0,0.8) !important;
}

.sat-popup .leaflet-popup-tip {
    background: rgba(0,0,0,0.95) !important;
    border: 1px solid var(--border) !important;
}

.sat-popup .leaflet-popup-content { margin: 0 !important; }

/* ---- Ground Station Markers ---- */
.gs-marker-adversary {
    background: var(--red);
    border: 1px solid rgba(255,32,32,0.5);
    width: 8px;
    height: 8px;
}

.gs-marker-fvey {
    background: var(--fvey);
    border: 1px solid rgba(32,128,255,0.5);
    width: 6px;
    height: 6px;
}

/* ---- Loading ---- */
.loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 2px;
}

.loading::after {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    margin: 8px auto 0;
    border: 1px solid var(--border);
    border-top-color: var(--amber);
    animation: spin 0.8s linear infinite;
}

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

.empty-state {
    text-align: center;
    padding: 16px;
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 1px;
}

/* ---- Page Section Headers ---- */
.section-head {
    padding: 4px 8px;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--amber);
    border-bottom: 1px solid var(--border);
    background: rgba(255,176,0,0.02);
    margin-bottom: 2px;
}

/* ---- Scroll page wrapper ---- */
.page-wrap {
    padding: 2px;
}

/* ---- Force row (ADVERSARY page) ---- */
.force-row {
    display: grid;
    grid-template-columns: 70px 1fr 45px;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,176,0,0.04);
}

.force-nation {
    font-size: 10px;
}

.force-bar-wrap {
    height: 8px;
    background: rgba(255,255,255,0.03);
}

.force-bar {
    height: 100%;
    opacity: 0.7;
}

.force-total {
    font-size: 12px;
    text-align: right;
    color: var(--white);
}

/* ---- Kp Chart ---- */
.kp-chart-box { height: 60px; margin-top: 4px; }

/* ---- Scenario Phase List ---- */
.phase-list {
    margin: 4px 0 0 12px;
    font-size: 10px;
    color: var(--text);
}

.phase-list li {
    margin-bottom: 2px;
    list-style-type: decimal;
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .cmd-bottom-strip { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .map-overlay-panels { width: 220px; }
}

@media (max-width: 900px) {
    .tab { padding: 0 8px; font-size: 9px; letter-spacing: 1px; }
    .sys-title { display: none; }
    .sys-indicator { display: none; }
    .tab-group-center { justify-content: flex-start; }
}

/* ---- Horizontal Scroll Strip ---- */
.h-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 4px 0;
}

.h-scroll::-webkit-scrollbar { height: 3px; }
.h-scroll::-webkit-scrollbar-thumb { background: rgba(255,176,0,0.1); }

.h-scroll-item {
    flex-shrink: 0;
    padding: 4px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    font-size: 10px;
    min-width: 200px;
}

/* ---- Filter Tabs ---- */
.filter-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    margin-bottom: 4px;
}

.filter-tab {
    padding: 4px 12px;
    font-family: var(--font);
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--text-dim);
    cursor: pointer;
    background: var(--bg);
    border-right: 1px solid var(--border);
    transition: all 0.15s;
}

.filter-tab:last-child { border-right: none; }
.filter-tab:hover { color: var(--amber); }
.filter-tab.active { color: var(--amber); background: rgba(255,176,0,0.06); }

/* ---- Threat Overview Header ---- */
.threat-overview-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.toh-level {
    font-size: 12px;
    padding: 3px 12px;
    letter-spacing: 2px;
}

.toh-level.critical { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255,32,32,0.4); }
.toh-level.high { background: rgba(255,140,0,0.12); color: var(--cis); border: 1px solid rgba(255,140,0,0.4); }
.toh-level.elevated { background: rgba(255,176,0,0.12); color: var(--amber); border: 1px solid rgba(255,176,0,0.4); }

/* ================================================================
   ENHANCED DASHBOARD STYLES — Military OSINT v2
   ================================================================ */

/* ---- Pulsing Glow for Hostile ISR Markers ---- */
@keyframes pulse-isr {
    0%, 100% { box-shadow: 0 0 4px 1px rgba(255,32,32,0.4); }
    50% { box-shadow: 0 0 12px 4px rgba(255,32,32,0.8); }
}

@keyframes pulse-isr-ring {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(3); opacity: 0; }
}

.isr-pulse-marker {
    border-radius: 50%;
    animation: pulse-isr 2s ease-in-out infinite;
}

/* ---- Zebra Striping on Tables ---- */
.data-table tbody tr:nth-child(even) td {
    background: rgba(255,176,0,0.015);
}

.data-table tbody tr:nth-child(odd) td {
    background: transparent;
}

.data-table tbody tr:hover td {
    background: rgba(255,176,0,0.04) !important;
}

/* ---- Card Hover States ---- */
.threat-card {
    transition: all 0.15s ease;
    cursor: default;
}

.threat-card:hover {
    background: rgba(255,176,0,0.03);
    border-color: var(--border-bright);
    transform: translateX(2px);
}

.overlay-panel:hover {
    border-color: var(--border-bright);
}

/* ---- Launch Countdown Hero ---- */
.launch-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,32,32,0.04);
    border: 1px solid rgba(255,32,32,0.25);
    border-left: 3px solid var(--red);
    padding: 12px 20px;
    margin-bottom: 4px;
    gap: 20px;
}

.launch-hero-label {
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--red);
    opacity: 0.7;
}

.launch-hero-name {
    font-size: 12px;
    color: var(--white);
    letter-spacing: 1px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.launch-hero-countdown {
    font-size: 36px;
    color: var(--red);
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(255,32,32,0.5), 0 0 40px rgba(255,32,32,0.2);
    font-family: var(--font);
    animation: pulse-countdown 2s ease-in-out infinite;
}

@keyframes pulse-countdown {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.launch-hero-meta {
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 1px;
}

/* ---- Adversary Mini Map ---- */
.adv-mini-map {
    width: 100%;
    height: 280px;
    min-height: 280px;
    background: #000;
}

/* ---- Category Breakdown Bars ---- */
.cat-breakdown {
    display: grid;
    grid-template-columns: 110px 1fr 32px;
    align-items: center;
    gap: 4px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,176,0,0.04);
    font-size: 9px;
}

.cat-breakdown:last-child { border-bottom: none; }

.cat-breakdown .cat-label {
    color: var(--text);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cat-breakdown .cat-bar-wrap {
    height: 10px;
    background: rgba(255,255,255,0.02);
    position: relative;
}

.cat-breakdown .cat-bar {
    height: 100%;
    transition: width 0.3s ease;
    position: relative;
}

.cat-breakdown .cat-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.4);
}

.cat-breakdown .cat-count {
    font-size: 11px;
    text-align: right;
    color: var(--white);
}

/* ---- Resilience Score ---- */
.resilience-meter {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0;
}

.resilience-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,176,0,0.08);
    position: relative;
}

.resilience-bar-fill {
    height: 100%;
    transition: width 0.4s ease;
}

.resilience-score {
    font-size: 14px;
    font-family: var(--font);
    min-width: 32px;
    text-align: right;
}

.resilience-label {
    font-size: 8px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    min-width: 90px;
}

/* ---- Severity Indicator Dots ---- */
.severity-dots {
    display: flex;
    gap: 3px;
    align-items: center;
}

.severity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.severity-dot.filled-critical { background: var(--red); box-shadow: 0 0 6px rgba(255,32,32,0.5); }
.severity-dot.filled-high { background: var(--cis); box-shadow: 0 0 6px rgba(255,140,0,0.5); }
.severity-dot.filled-medium { background: var(--amber); }
.severity-dot.filled-low { background: var(--green); }
.severity-dot.empty { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }

/* ---- Collapsible Scenario Sections ---- */
.scenario-section {
    border: 1px solid var(--border);
    margin-bottom: 4px;
    background: var(--bg-panel);
    transition: all 0.15s;
}

.scenario-section:hover {
    border-color: var(--border-bright);
}

.scenario-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    user-select: none;
    background: rgba(255,176,0,0.02);
    border-bottom: 1px solid transparent;
    transition: all 0.15s;
}

.scenario-header:hover {
    background: rgba(255,176,0,0.04);
}

.scenario-header .chevron {
    font-size: 10px;
    color: var(--amber);
    transition: transform 0.2s;
    display: inline-block;
    width: 12px;
}

.scenario-section.open .scenario-header {
    border-bottom-color: var(--border);
}

.scenario-section.open .chevron {
    transform: rotate(90deg);
}

.scenario-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.scenario-section.open .scenario-body {
    max-height: 800px;
}

.scenario-body-inner {
    padding: 10px 12px;
}

/* ---- ASAT Two-Column Grid ---- */
.asat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

/* ---- ASAT Summary Chart ---- */
.asat-summary-bar {
    display: flex;
    height: 32px;
    border: 1px solid var(--border);
    margin-bottom: 4px;
    overflow: hidden;
}

.asat-summary-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    letter-spacing: 1px;
    color: var(--white);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.asat-summary-segment:hover {
    filter: brightness(1.3);
}

.asat-summary-segment .seg-label {
    font-size: 7px;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 4px;
}

/* ---- Ground Station Marker Styles ---- */
.gs-launch-marker {
    width: 14px;
    height: 14px;
    background: var(--red);
    border: 2px solid rgba(255,32,32,0.7);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    animation: pulse-isr 3s ease-in-out infinite;
}

.gs-ttc-marker {
    width: 10px;
    height: 10px;
    background: var(--cis);
    border: 1px solid rgba(255,140,0,0.6);
    border-radius: 2px;
}

.gs-radar-marker {
    width: 7px;
    height: 7px;
    background: var(--amber);
    border: 1px solid rgba(255,176,0,0.5);
    border-radius: 50%;
}

.gs-fvey-marker {
    width: 10px;
    height: 10px;
    background: var(--fvey);
    border: 1px solid rgba(32,128,255,0.6);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* ---- Strategy Page Gravitas ---- */
.strategy-banner {
    text-align: center;
    padding: 16px 20px;
    border: 1px solid var(--border);
    border-bottom: 2px solid var(--red);
    background: linear-gradient(180deg, rgba(255,32,32,0.04) 0%, transparent 100%);
    margin-bottom: 4px;
}

.strategy-title {
    font-size: 14px;
    letter-spacing: 4px;
    color: var(--amber);
    margin-bottom: 4px;
    text-shadow: 0 0 15px rgba(255,176,0,0.2);
}

.strategy-subtitle {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--text-dim);
}

.strategy-threat-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 10px 0;
}

.strategy-threat-level {
    font-size: 28px;
    letter-spacing: 6px;
    padding: 6px 24px;
    border: 2px solid;
    text-shadow: 0 0 20px currentColor;
    animation: pulse-threat-level 3s ease-in-out infinite;
}

@keyframes pulse-threat-level {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.strategy-threat-level.critical {
    color: var(--red);
    border-color: var(--red);
    background: rgba(255,32,32,0.06);
}

.strategy-threat-level.high {
    color: var(--cis);
    border-color: var(--cis);
    background: rgba(255,140,0,0.06);
}

.strategy-threat-level.elevated {
    color: var(--amber);
    border-color: var(--amber);
    background: rgba(255,176,0,0.06);
}

/* ---- Kp Chart in CMD env bar ---- */
.cmd-kp-chart-wrap {
    flex: 2;
    display: flex;
    align-items: center;
    padding: 2px 6px;
    background: var(--bg);
    min-width: 180px;
    height: 100%;
}

.cmd-kp-chart-wrap canvas {
    max-height: 50px;
    width: 100%;
}

/* ---- Intelligence Summary Box ---- */
.intel-summary {
    padding: 8px 10px;
    background: rgba(255,176,0,0.02);
    border: 1px solid var(--border);
    border-left: 2px solid var(--amber);
    margin-bottom: 4px;
    font-size: 10px;
    color: var(--text);
    line-height: 1.6;
}

.intel-summary strong {
    color: var(--amber);
    font-weight: normal;
    letter-spacing: 0.5px;
}

/* ---- Map stat overlay (top-left) ---- */
.map-stat-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.map-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    background: rgba(0,0,0,0.85);
    border: 1px solid var(--border);
    font-size: 9px;
}

.map-stat-val {
    font-size: 14px;
    color: var(--white);
}

.map-stat-lbl {
    font-size: 7px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

/* ---- Orbital Regime Distribution ---- */
.regime-strip {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.regime-card {
    flex: 1;
    padding: 8px 10px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    text-align: center;
}

.regime-card-val {
    font-size: 20px;
    color: var(--white);
}

.regime-card-label {
    font-size: 7px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Enhanced Responsive ---- */
@media (max-width: 1200px) {
    .asat-grid { grid-template-columns: 1fr; }
    .regime-strip { flex-wrap: wrap; }
    .launch-hero { flex-wrap: wrap; justify-content: center; }
    .launch-hero-countdown { font-size: 24px; }
}

@media (max-width: 900px) {
    .launch-hero-countdown { font-size: 18px; letter-spacing: 2px; }
    .strategy-threat-level { font-size: 18px; letter-spacing: 3px; }
}


/* ================================================================
   OVERMATCH, WARGAME, INCIDENTS — New Page Styles
   ================================================================ */

/* ---- Live Pulse Indicator ---- */
.live-pulse {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 8px;
    letter-spacing: 1.5px;
    color: var(--green);
}

.live-pulse::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px var(--green), 0 0 12px var(--green);
    animation: live-blink 1.5s ease-in-out infinite;
}

@keyframes live-blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--green), 0 0 12px var(--green); }
    50% { opacity: 0.3; box-shadow: 0 0 2px var(--green); }
}

.live-pulse.red { color: var(--red); }
.live-pulse.red::before { background: var(--red); box-shadow: 0 0 6px var(--red); }
.live-pulse.amber { color: var(--amber); }
.live-pulse.amber::before { background: var(--amber); box-shadow: 0 0 6px var(--amber); }

/* ---- Overmatch Score Bar (centered at 0, -100 to +100) ---- */
.overmatch-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.overmatch-bar-label {
    font-size: 9px;
    letter-spacing: 1px;
    color: var(--text);
    min-width: 56px;
    text-align: right;
}

.overmatch-bar-track {
    flex: 1;
    height: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,176,0,0.08);
    position: relative;
    overflow: hidden;
}

.overmatch-bar-track::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,176,0,0.25);
    z-index: 2;
}

.overmatch-bar-fill {
    position: absolute;
    top: 1px;
    bottom: 1px;
    transition: all 0.4s ease;
    z-index: 1;
}

.overmatch-bar-fill.positive {
    left: 50%;
}

.overmatch-bar-fill.negative {
    right: 50%;
}

.overmatch-bar-score {
    font-size: 12px;
    font-family: var(--font);
    min-width: 42px;
    text-align: right;
    font-weight: normal;
}

/* ---- Overmatch Zone Card ---- */
.overmatch-zone-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 0;
    transition: all 0.15s;
}

.overmatch-zone-card:hover {
    border-color: var(--border-bright);
}

.overmatch-zone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,176,0,0.02);
}

.overmatch-zone-name {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--amber);
}

.overmatch-zone-score {
    font-size: 20px;
    font-family: var(--font);
}

.overmatch-zone-body {
    padding: 8px 10px;
}

.overmatch-zone-verdict {
    font-size: 8px;
    letter-spacing: 1.5px;
    padding: 2px 6px;
    display: inline-block;
}

.overmatch-zone-verdict.fvey-adv {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(32,255,96,0.3);
}

.overmatch-zone-verdict.contested {
    background: var(--amber-dim);
    color: var(--amber);
    border: 1px solid rgba(255,176,0,0.3);
}

.overmatch-zone-verdict.adv-adv {
    background: var(--red-dim);
    color: var(--red);
    border: 1px solid rgba(255,32,32,0.3);
}

/* ---- Domain Score Mini Cards ---- */
.domain-scores-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
    margin-top: 6px;
}

.domain-score-card {
    text-align: center;
    padding: 4px 2px;
    background: rgba(255,255,255,0.01);
    border: 1px solid rgba(255,176,0,0.06);
}

.domain-score-label {
    font-size: 7px;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.domain-score-val {
    font-size: 14px;
    font-family: var(--font);
}

/* ---- Wargame Scenario Cards ---- */
.wargame-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.wargame-card:hover {
    border-color: var(--border-bright);
    background: var(--bg-panel-hover);
}

.wargame-card.active {
    border-color: var(--amber);
    border-left: 3px solid var(--amber);
}

.wargame-card-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}

.wargame-card-body {
    padding: 8px 10px;
    font-size: 10px;
    color: var(--text);
    line-height: 1.5;
}

.wargame-result-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-top: 2px solid var(--amber);
}

.wargame-result-head {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    background: rgba(255,176,0,0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wargame-result-body {
    padding: 10px 12px;
}

.wargame-stat-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,176,0,0.04);
    font-size: 10px;
}

.wargame-stat-row:last-child { border-bottom: none; }

.wargame-stat-label {
    font-size: 8px;
    letter-spacing: 1.5px;
    color: var(--amber);
}

.wargame-stat-val {
    color: var(--text);
    line-height: 1.5;
}

/* ---- Incident Timeline ---- */
.incident-timeline {
    position: relative;
    padding-left: 90px;
}

.incident-timeline::before {
    content: '';
    position: absolute;
    left: 76px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,176,0,0.15);
}

.incident-item {
    position: relative;
    margin-bottom: 4px;
    padding: 8px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.incident-item:hover {
    border-color: var(--border-bright);
    background: var(--bg-panel-hover);
}

.incident-date {
    position: absolute;
    left: -86px;
    top: 8px;
    width: 72px;
    text-align: right;
    font-size: 9px;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

.incident-dot {
    position: absolute;
    left: -16px;
    top: 12px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255,176,0,0.3);
}

.incident-dot.critical { background: var(--red); border-color: rgba(255,32,32,0.5); box-shadow: 0 0 6px rgba(255,32,32,0.4); }
.incident-dot.high { background: var(--cis); border-color: rgba(255,140,0,0.5); }
.incident-dot.medium { background: var(--amber); border-color: rgba(255,176,0,0.5); }
.incident-dot.low { background: var(--green); border-color: rgba(32,255,96,0.5); }

.incident-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.incident-title {
    font-size: 11px;
    color: var(--white);
    flex: 1;
}

.incident-body {
    font-size: 10px;
    color: var(--text);
    line-height: 1.5;
}

.incident-meta {
    font-size: 9px;
    color: var(--text-dim);
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ---- Incident Stats Summary ---- */
.incident-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2px;
    margin-bottom: 4px;
}

.incident-stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: center;
}

.incident-stat-val {
    font-size: 22px;
    color: var(--white);
}

.incident-stat-label {
    font-size: 7px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Proximity Alert Items ---- */
.prox-alert {
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,32,32,0.06);
    font-size: 9px;
}

.prox-alert:last-child { border-bottom: none; }

.prox-alert-dist {
    font-size: 12px;
    color: var(--red);
    font-family: var(--font);
}

/* ---- Wargame Phase Flow ---- */
.phase-flow {
    display: flex;
    gap: 2px;
    margin: 6px 0;
    overflow-x: auto;
}

.phase-flow::-webkit-scrollbar { height: 3px; }
.phase-flow::-webkit-scrollbar-thumb { background: rgba(255,176,0,0.1); }

.phase-step {
    flex: 1;
    min-width: 100px;
    padding: 6px 8px;
    background: rgba(255,176,0,0.02);
    border: 1px solid var(--border);
    font-size: 9px;
    color: var(--text);
    line-height: 1.4;
    position: relative;
}

.phase-step::after {
    content: '\25B6';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--amber);
    font-size: 8px;
    z-index: 1;
}

.phase-step:last-child::after { display: none; }

.phase-step-num {
    font-size: 7px;
    letter-spacing: 1.5px;
    color: var(--amber);
    margin-bottom: 2px;
}

/* ---- Overmatch Global Summary ---- */
.overmatch-global-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    margin-bottom: 4px;
}

.overmatch-global-score {
    font-size: 36px;
    font-family: var(--font);
    min-width: 80px;
    text-align: center;
}

.overmatch-global-detail {
    flex: 1;
}

.overmatch-global-label {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.overmatch-global-verdict {
    font-size: 12px;
    letter-spacing: 1px;
}

/* ---- Responsive additions ---- */
@media (max-width: 1200px) {
    .domain-scores-grid { grid-template-columns: repeat(3, 1fr); }
    .incident-timeline { padding-left: 70px; }
    .incident-timeline::before { left: 56px; }
    .incident-date { left: -66px; width: 52px; font-size: 8px; }
    .incident-dot { left: -16px; }
}

@media (max-width: 900px) {
    .domain-scores-grid { grid-template-columns: repeat(2, 1fr); }
    .phase-flow { flex-wrap: wrap; }
    .overmatch-global-score { font-size: 24px; }
}


/* ================================================================
   FINAL POLISH PASS — Military OSINT v3
   ================================================================ */

/* ---- Live Indicator (pulsing green dot + LIVE text) ---- */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 7px;
    letter-spacing: 1.5px;
    color: var(--green);
    text-transform: uppercase;
}

.live-indicator-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 4px var(--green), 0 0 8px var(--green);
    animation: live-indicator-pulse 1.5s ease-in-out infinite;
}

@keyframes live-indicator-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px var(--green), 0 0 8px var(--green); }
    50% { opacity: 0.2; box-shadow: 0 0 2px var(--green); }
}

/* ---- live-dot alias for live-indicator-dot ---- */
.live-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 4px var(--green), 0 0 8px var(--green);
    animation: live-indicator-pulse 1.5s ease-in-out infinite;
}

/* ---- Last-updated timestamp label ---- */
.last-updated-ts {
    font-size: 7px;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-left: 6px;
}

/* ---- Hotspot Bars (CMD page) ---- */
.hotspot-row {
    padding: 2px 0;
    border-bottom: 1px solid rgba(255,176,0,0.04);
}

.hotspot-row:last-child { border-bottom: none; }

.hotspot-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
}

.hotspot-bar-label {
    font-size: 9px;
    color: var(--text);
    min-width: 50px;
}

.hotspot-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,176,0,0.06);
    overflow: hidden;
}

.hotspot-bar-fill {
    height: 100%;
    transition: width 0.4s ease;
}

.hotspot-bar-val {
    font-size: 10px;
    color: var(--white);
    min-width: 24px;
    text-align: right;
}

/* ---- Proximity Flash Animation ---- */
.proximity-flash {
    animation: proximity-alert-flash 2s ease-in-out infinite;
}

@keyframes proximity-alert-flash {
    0%, 100% { border-color: var(--border); }
    25% { border-color: rgba(255,32,32,0.5); }
    50% { border-color: var(--border); }
    75% { border-color: rgba(255,32,32,0.3); }
}

.proximity-flash .op-head {
    animation: proximity-head-flash 2s ease-in-out infinite;
}

@keyframes proximity-head-flash {
    0%, 100% { background: rgba(255,176,0,0.03); }
    50% { background: rgba(255,32,32,0.06); }
}

/* ---- Key Threat Banner (Adversary page) ---- */
.key-threat-banner {
    padding: 8px 12px;
    background: rgba(255,32,32,0.04);
    border: 1px solid rgba(255,32,32,0.15);
    border-left: 3px solid var(--red);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.key-threat-banner .intel-label {
    font-size: 7px;
    letter-spacing: 2px;
    color: var(--amber);
    white-space: nowrap;
}

/* ---- Doctrine / Strategic Context styling ---- */
.doctrine-field {
    background: rgba(255,176,0,0.02);
    border: 1px solid rgba(255,176,0,0.06);
    border-left: 2px solid var(--amber);
    padding: 6px 8px;
    margin-bottom: 8px;
}

/* ---- Intelligence Gaps warning styling ---- */
.intel-gap-field {
    background: rgba(255,140,0,0.04);
    border: 1px solid rgba(255,140,0,0.12);
    border-left: 2px solid var(--cis);
    padding: 6px 8px;
    margin-bottom: 8px;
}

/* ---- ISR Table aggressive row coloring ---- */
.isr-table tbody tr td {
    background: rgba(255,32,32,0.03);
}

.isr-table tbody tr:hover td {
    background: rgba(255,32,32,0.08) !important;
}

.isr-table tbody tr:nth-child(even) td {
    background: rgba(255,32,32,0.05);
}

/* ---- Critical ASAT glow effect ---- */
.critical-glow {
    box-shadow: 0 0 8px rgba(255,32,32,0.15), inset 0 0 20px rgba(255,32,32,0.04);
    animation: critical-glow-pulse 3s ease-in-out infinite;
}

@keyframes critical-glow-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(255,32,32,0.15), inset 0 0 20px rgba(255,32,32,0.04); }
    50% { box-shadow: 0 0 16px rgba(255,32,32,0.25), inset 0 0 30px rgba(255,32,32,0.06); }
}

/* ---- Resilience Status Label ---- */
.resilience-status {
    font-size: 7px;
    letter-spacing: 1.5px;
    min-width: 55px;
    text-align: right;
}

/* ---- Recommendation Number Badge ---- */
.rec-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 16px;
    font-size: 9px;
    color: var(--text-dim);
    background: rgba(255,176,0,0.05);
    border: 1px solid rgba(255,176,0,0.1);
    font-family: var(--font);
}

/* ---- Ground Station Map Legend ---- */
.gs-legend {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 500;
    display: flex;
    gap: 12px;
    padding: 5px 10px;
    background: rgba(0,0,0,0.88);
    border: 1px solid var(--border);
    font-size: 8px;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.gs-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ---- Futures 2-column grid ---- */
.futures-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

@media (max-width: 1200px) {
    .futures-grid { grid-template-columns: 1fr; }
}

/* ---- Conference card next date ---- */
.conf-next-date {
    font-size: 10px;
    font-family: var(--font);
    letter-spacing: 0.5px;
    margin-left: auto;
    white-space: nowrap;
}

.conf-card {
    transition: all 0.15s;
}

.conf-card:hover {
    transform: translateX(2px);
}

/* ---- Architecture vulnerability highlight ---- */
.arch-vuln-highlight {
    background: rgba(255,32,32,0.04);
    border: 1px solid rgba(255,32,32,0.1);
    padding: 4px 6px;
    margin-top: 4px;
}

/* ---- Enhanced panel hover effects ---- */
.panel {
    transition: border-color 0.15s, box-shadow 0.15s;
}

.panel:hover {
    box-shadow: inset 0 0 30px rgba(255,176,0,0.02), 0 0 3px rgba(255,176,0,0.12);
}

/* ---- Enhanced filter tab hover ---- */
.filter-tab {
    transition: all 0.15s;
    position: relative;
}

.filter-tab:hover {
    background: rgba(255,176,0,0.04);
}

.filter-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--amber);
}

/* ---- Country tab enhanced ---- */
.country-tab {
    transition: all 0.15s;
    position: relative;
}

.country-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background: var(--amber);
    transition: all 0.2s;
}

.country-tab.active::after {
    left: 0;
    right: 0;
}

/* ---- Sharper military borders on key elements ---- */
.strategy-banner {
    position: relative;
}

.strategy-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--amber), transparent);
}

.threat-bar {
    border: 1px solid rgba(255,176,0,0.08);
}

/* ---- Table header sharpen ---- */
.data-table th {
    text-transform: uppercase;
    border-bottom: 2px solid var(--border);
}

/* ---- Overlay panel improvements ---- */
.overlay-panel {
    transition: all 0.15s;
}

.overlay-panel .op-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ---- Wargame card improvements ---- */
.wargame-card {
    transition: all 0.2s;
}

.wargame-card:hover {
    transform: translateX(2px);
}

.wargame-card.active {
    transform: translateX(0);
}

/* ---- Incident item hover ---- */
.incident-item {
    transition: all 0.15s;
}

.incident-item:hover {
    transform: translateX(3px);
}

/* ---- Scrollbar for main content ---- */
#content {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,176,0,0.15) transparent;
}

/* ---- Empty state improvements ---- */
.empty-state {
    animation: blink-text 2s step-end infinite;
}

/* ---- Badge hover ---- */
.badge {
    transition: all 0.15s;
}

/* ---- News line hover ---- */
.news-line {
    transition: all 0.15s;
}

.news-line:hover {
    opacity: 1;
    background: rgba(255,176,0,0.02);
    padding-left: 3px;
}

/* ---- Sharper launch hero ---- */
.launch-hero {
    position: relative;
    overflow: hidden;
}

.launch-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
}

.launch-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
}

/* ---- Responsive for new elements ---- */
@media (max-width: 1200px) {
    .gs-legend { flex-wrap: wrap; gap: 6px; }
}

@media (max-width: 900px) {
    .key-threat-banner { flex-wrap: wrap; }
    .conf-next-date { margin-left: 0; }
}


/* ================================================================
   ENVIRONMENT PAGE — Space Weather Dashboard
   ================================================================ */

/* ---- Status Strip (top bar on environment page) ---- */
.env-status-strip {
    display: flex;
    gap: 1px;
    background: rgba(255,176,0,0.05);
    border: 1px solid var(--border);
    margin-bottom: 4px;
    flex-shrink: 0;
}

.env-status-cell {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 6px;
    background: var(--bg);
    text-align: center;
}

.env-status-val {
    font-size: 16px;
    color: var(--white);
    line-height: 1.2;
}

.env-status-lbl {
    font-size: 7px;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ---- Solar Imagery Grid ---- */
.solar-img-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.solar-img-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.15s;
}

.solar-img-panel:hover {
    border-color: var(--border-bright);
}

.solar-img-label {
    padding: 4px 8px;
    font-size: 8px;
    letter-spacing: 1.5px;
    color: var(--amber);
    background: rgba(255,176,0,0.03);
    border-bottom: 1px solid var(--border);
}

.solar-img-panel img {
    width: 100%;
    height: auto;
    display: block;
    background: #111;
    min-height: 100px;
}

/* ---- Environment Section ---- */
.env-section {
    margin-bottom: 4px;
}

.env-section-head {
    padding: 4px 8px;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--amber);
    border-bottom: 1px solid var(--border);
    background: rgba(255,176,0,0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.env-section-body {
    padding: 6px 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-top: none;
}

/* ---- Aurora Images Side-by-Side ---- */
.aurora-img-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.aurora-img-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    overflow: hidden;
}

.aurora-img-panel img {
    width: 100%;
    height: auto;
    display: block;
    background: #111;
    min-height: 80px;
}

/* ---- Flare Prob Bars ---- */
.flare-prob-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255,176,0,0.04);
}

.flare-prob-row:last-child {
    border-bottom: none;
}

.flare-prob-label {
    font-size: 10px;
    color: var(--text);
    min-width: 80px;
    letter-spacing: 0.5px;
}

.flare-prob-track {
    flex: 1;
    height: 10px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,176,0,0.06);
    overflow: hidden;
}

.flare-prob-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.flare-prob-val {
    font-size: 11px;
    color: var(--white);
    min-width: 36px;
    text-align: right;
}

/* ---- Active Region Table ---- */
.env-region-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9px;
}

.env-region-table th {
    text-align: left;
    padding: 3px 5px;
    font-size: 7px;
    font-weight: normal;
    letter-spacing: 1.5px;
    color: var(--amber);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
}

.env-region-table td {
    padding: 3px 5px;
    font-size: 9px;
    border-bottom: 1px solid rgba(255,176,0,0.04);
    color: var(--text);
}

/* ---- Kp Forecast Bar Strip ---- */
.kp-forecast-strip {
    display: flex;
    gap: 1px;
    align-items: flex-end;
    height: 80px;
    padding-bottom: 2px;
}

.kp-forecast-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
}

.kp-forecast-bar-fill {
    width: 100%;
    min-width: 8px;
    transition: height 0.3s ease;
}

.kp-forecast-bar-label {
    font-size: 6px;
    color: var(--text-muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

/* ---- ENLIL Status Card ---- */
.enlil-status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
}

.enlil-status-val {
    font-size: 20px;
    font-family: var(--font);
    min-width: 50px;
    text-align: center;
}

.enlil-status-detail {
    flex: 1;
    font-size: 10px;
    color: var(--text);
    line-height: 1.5;
}

/* ---- Debris / New Objects Table ---- */
.debris-obj-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,176,0,0.04);
    font-size: 9px;
}

.debris-obj-row:last-child {
    border-bottom: none;
}

/* ---- Proton Alert Highlight ---- */
.proton-alert-active {
    background: rgba(255,32,32,0.06);
    border: 1px solid rgba(255,32,32,0.2);
    border-left: 3px solid var(--red);
    padding: 6px 10px;
    color: var(--red);
    font-size: 10px;
    letter-spacing: 0.5px;
    animation: pulse-threat 3s ease-in-out infinite;
}

/* ---- Environment Page Responsive ---- */
@media (max-width: 1200px) {
    .solar-img-grid { grid-template-columns: repeat(2, 1fr); }
    .env-status-strip { flex-wrap: wrap; }
    .aurora-img-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .solar-img-grid { grid-template-columns: 1fr; }
    .env-status-cell { padding: 5px 4px; }
    .env-status-val { font-size: 12px; }
}
