/* =============================================
   NETWORK LOADING & MODELING - STYLESHEET
   Matches ERT Digital Twin dark theme
   ============================================= */

/* Full-page loading spinner */
.page-loader {
    position: fixed;
    inset: 0;
    background: #242830;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.4s;
}
.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}
.page-loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-family: 'Big Shoulders Display', sans-serif;
}
.page-loader-icon {
    font-size: 36px;
    color: #35b1cd;
}
.page-loader-content span {
    font-size: 20px;
    color: #888;
    letter-spacing: 1px;
}
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #d4830a;
    color: #fff;
    text-align: center;
    padding: 4px 12px;
    font-size: 12px;
    font-family: 'Big Shoulders Display', sans-serif;
    letter-spacing: 1px;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.offline-banner.hidden {
    display: none;
}

/* ---- Layout ---- */
#loaderMain {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-image: url(../images/pattern.png), linear-gradient(360deg, var(--medium-dark-color), var(--gradient-dark));
    background-size: 100px;
}

#globeContainer {
    flex: 1;
    position: relative;
    min-height: 0;
    z-index: 1;
}

#cesiumContainer,
#moonContainer,
#marsContainer {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Slight filter on Cesium globe canvas */
#cesiumContainer canvas {
    filter: brightness(1.1) saturate(0.9);
}

/* Override Cesium widget styles to match theme */
.cesium-viewer-bottom {
    display: none !important;
}

.cesium-viewer-timelineContainer {
    background: var(--gradient-dark) !important;
    border-top: 1px solid rgba(255,255,255,0.1) !important;
    bottom: 4px !important;
}

.cesium-timeline-bar {
    background: rgba(28, 31, 35, 0.9) !important;
}

.cesium-timeline-trackContainer {
    border-top: 1px solid var(--medium-dark-color) !important;
    border-bottom: 1px solid var(--medium-dark-color) !important;
}

.cesium-viewer-animationContainer {
    background: transparent !important;
    bottom: 4px !important;
}

.cesium-animation-theme {
    background: var(--gradient-dark) !important;
    border: 1px solid var(--medium-dark-color) !important;
}

.cesium-infoBox-visible {
    /* Position in the left notification area, below the panel stack */
    right: auto !important;
    left: 10px !important;
    width: 320px !important;
    z-index: 51 !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}
.cesium-infoBox {
    background: rgba(10, 12, 16, 0.92) !important;
    backdrop-filter: blur(8px) !important;
    color: var(--text-color) !important;
    border: 1px solid rgba(47, 138, 158, 0.3) !important;
    border-radius: 4px !important;
    font-family: 'Overpass Mono', 'Consolas', monospace !important;
    font-size: 11px !important;
}
.cesium-infoBox-title {
    background: rgba(20, 24, 30, 0.85) !important;
    color: #35b1cd !important;
    font-family: 'Big Shoulders Display', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 11px !important;
    border-bottom: 1px solid rgba(47, 138, 158, 0.2) !important;
}
.cesium-infoBox-close {
    background: transparent !important;
    color: #35b1cd !important;
    border: none !important;
    font-size: 16px !important;
}
.cesium-infoBox-close:hover {
    color: #FF9800 !important;
}
.cesium-infoBox-camera {
    color: #35b1cd !important;
}
.cesium-infoBox iframe {
    background: rgba(10, 12, 16, 0.92) !important;
}

header.container-fluid {
    position: relative;
    z-index: 9999;
    height: 60px;
}
header.container-fluid > .row {
    flex-wrap: nowrap;
}

/* ---- Header Controls ---- */
.header-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 10px 0 0;
}

.header-left-controls,
.header-right-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.header-left-controls {
    flex-shrink: 1;
    min-width: 0;
}

.header-control-group {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-color);
    font-family: 'Big Shoulders', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
}

.header-select {
    background: rgba(255,255,255,0.1);
    color: var(--text-color);
    border: 1px solid var(--medium-dark-color);
    border-radius: 3px;
    padding: 4px 8px;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    cursor: pointer;
}

.header-select:focus {
    outline: none;
    border-color: var(--medium-light-color);
}

/* Multi-select checkbox dropdown */
.multiselect-wrapper {
    position: relative;
}
.multiselect-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    color: #ccc;
    padding: 4px 8px;
    cursor: pointer;
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 13px;
    white-space: nowrap;
}
.multiselect-btn label {
    color: #35b1cd;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin: 0;
}
.multiselect-btn:hover {
    background: rgba(255,255,255,0.12);
}
.multiselect-label {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.multiselect-arrow {
    font-size: 9px;
    opacity: 0.6;
}
.multiselect-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 2px;
    background: #1c1f23;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    min-width: 220px;
    max-height: 400px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 99999;
    display: flex;
    flex-direction: column;
}
.multiselect-panel.hidden {
    display: none;
}
.multiselect-controls {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.multiselect-list {
    overflow-y: auto;
    max-height: 350px;
    padding: 4px 0;
}
.multiselect-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 12px;
    color: #35b1cd;
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.multiselect-group-header:first-child {
    border-top: none;
}
.multiselect-group-header:hover {
    background: rgba(53,177,205,0.1);
}
.multiselect-group-header input[type="checkbox"] {
    accent-color: #35b1cd;
}
.multiselect-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 24px;
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
}
.multiselect-item:hover {
    background: rgba(53,177,205,0.1);
    color: #fff;
}
.multiselect-item input[type="checkbox"] {
    accent-color: #35b1cd;
}
.multiselect-all {
    padding-left: 10px;
    font-size: 12px;
    color: #999;
}

/* Dropdown option styling — prevent white-on-white text */
.header-select option,
.header-select optgroup,
.catalog-group-select option,
.catalog-group-select optgroup,
.weather-select option,
.weather-select optgroup,
select option,
select optgroup {
    background: #1c1f23;
    color: #e0e0e0;
}

.btn-run-analysis {
    background-color: rgba(76, 175, 80, 0.3) !important;
    font-size: 14px !important;
    padding: 6px 14px !important;
    gap: 6px;
}

.btn-run-analysis:hover {
    background-color: rgba(76, 175, 80, 0.5) !important;
}

.btn-guam-demo {
    background-color: rgba(244, 67, 54, 0.2) !important;
    font-size: 14px !important;
    padding: 6px 14px !important;
    gap: 6px;
}

.btn-guam-demo:hover {
    background-color: rgba(244, 67, 54, 0.4) !important;
}

/* ---- Demos Panel ---- */
.demos-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 0;
}

.btn-demo-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.25);
    border-radius: 6px;
    color: #ddd;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-demo-item:hover {
    background: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.5);
}

.btn-demo-item.guam-active {
    background: rgba(244, 67, 54, 0.4);
    border-color: rgba(244, 67, 54, 0.7);
    color: #fff;
}

.btn-back-to-twin {
    font-size: 13px !important;
    padding: 6px 12px !important;
    gap: 6px;
    opacity: 0.7;
    text-decoration: none !important;
}

.btn-back-to-twin:hover {
    opacity: 1;
}

/* Header menu dropdown */
.header-menu-wrapper {
    position: relative;
}
.btn-header-menu {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.15s;
}
.btn-header-menu:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.header-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    background: #1c1f23;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 99999;
    padding: 4px 0;
}
.header-menu-dropdown.hidden {
    display: none;
}
.header-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: #ccc;
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.1s;
}
.header-menu-item:hover {
    background: rgba(53,177,205,0.15);
    color: #fff;
}
.header-menu-item i {
    width: 18px;
    text-align: center;
    color: #35b1cd;
}
.header-menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 0;
}

/* Override main app logo — use img tag instead of background-image */
.header-right-controls .applicationLogo {
    position: static;
    z-index: auto;
    width: 120px;
    height: 40px;
    flex-shrink: 0;
    object-fit: contain;
    background-image: none;
}

/* ---- Right Panel ---- */
.right-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    height: 100%;
    background: rgba(28, 31, 35, 0.92);
    border-left: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    /* NOTE: no overflow:hidden here — it would clip the toggle tab at left:-30px */
}

.right-panel.collapsed {
    right: -340px;
}

.right-panel .panel-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}

.panel-toggle {
    position: absolute;
    cursor: pointer;
    z-index: 11;
    background: rgba(28, 31, 35, 0.9);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.panel-toggle:hover {
    color: var(--selected-text-color);
    background: var(--medium-dark-color);
}

.panel-toggle-right {
    left: -30px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 70px;
    border-radius: 4px 0 0 4px;
    border: 1px solid rgba(255,255,255,0.1);
    border-right: none;
    font-size: 14px;
}

.right-panel.collapsed .panel-toggle-right i {
    transform: rotate(180deg);
}

/* ---- Panel Sections ---- */
.panel-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.panel-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.05);
    font-family: 'Big Shoulders', sans-serif;
    font-size: 16px;
    text-transform: uppercase;
    color: var(--medium-light-color);
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.panel-section-header:hover {
    background: rgba(255,255,255,0.08);
}

.panel-section-header .collapse-chevron {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.5;
    transition: transform 0.25s ease;
}

.panel-section.collapsed .collapse-chevron {
    transform: rotate(-90deg);
}

.panel-section-body {
    transition: max-height 0.3s ease, opacity 0.2s ease;
    max-height: 2000px;
    opacity: 1;
    overflow: hidden;
}

.panel-section.collapsed .panel-section-body {
    max-height: 0;
    opacity: 0;
}

.panel-section-header .conflict-count {
    background: var(--color-red);
    color: white;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 12px;
    font-family: 'Overpass', sans-serif;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
}

.summary-value {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 28px;
    color: var(--selected-text-color);
    line-height: 1;
}

.summary-label {
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    color: var(--text-color);
    text-transform: uppercase;
    opacity: 0.7;
    margin-top: 4px;
}

/* SLA Overall */
.sla-overall {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.sla-overall-label {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-color);
    white-space: nowrap;
}

.sla-overall-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
}

.sla-overall-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--color-red), var(--color-yellow), #4CAF50);
    transition: width 0.5s ease;
    width: 0%;
}

.sla-overall-value {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 18px;
    color: var(--selected-text-color);
    min-width: 45px;
    text-align: right;
}

/* Conflict List */
.conflict-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
}

.conflict-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    color: var(--text-color);
    opacity: 0.5;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
}

.conflict-empty i {
    color: #4CAF50;
}

/* Conflict entries */
.conflict-entry {
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.conflict-unresolved {
    background: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #F44336;
}

.conflict-unresolved:hover {
    background: rgba(244, 67, 54, 0.2);
}

.conflict-resolved {
    background: rgba(76, 175, 80, 0.08);
    border-left: 3px solid #4CAF50;
}

.conflict-resolved:hover {
    background: rgba(76, 175, 80, 0.15);
}

.conflict-selected {
    outline: 1px solid var(--medium-light-color);
    background: rgba(53, 177, 205, 0.1) !important;
}

.conflict-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Big Shoulders', sans-serif;
    font-size: 14px;
    color: var(--selected-text-color);
}

.conflict-status-icon {
    font-size: 12px;
}

.conflict-resolved .conflict-status-icon {
    color: #4CAF50;
}

.conflict-unresolved .conflict-status-icon {
    color: #F44336;
}

.conflict-missions {
    font-weight: bold;
}

.conflict-antenna {
    font-size: 12px;
    opacity: 0.6;
    margin-left: auto;
}

.conflict-resolution {
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    color: #4CAF50;
    margin-top: 4px;
    padding-left: 18px;
}

.conflict-unresolved .conflict-resolution {
    color: #FF9800;
}

.conflict-time {
    font-family: 'Overpass', sans-serif;
    font-size: 10px;
    color: var(--text-color);
    opacity: 0.4;
    margin-top: 2px;
    padding-left: 18px;
}

/* What-If Panel */
.whatif-group {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.whatif-group:last-of-type {
    border-bottom: none;
}

.whatif-group h5 {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.6;
    margin: 0 0 8px 0;
}

/* Toggle Switch */
.whatif-toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    user-select: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin: 0;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 36px;
    height: 20px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
    display: block;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--text-color);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s, background 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(76, 175, 80, 0.4);
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(16px);
    background: #4CAF50;
}

.toggle-label {
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.toggle-marker {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.toggle-detail {
    font-size: 10px;
    opacity: 0.5;
}

.toggle-priority {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 11px;
    opacity: 0.5;
}

.whatif-toggle-item:has(input:not(:checked)) .toggle-label {
    opacity: 0.4;
    text-decoration: line-through;
}

.scenario-active {
    background-color: rgba(53, 177, 205, 0.3) !important;
    border: 1px solid var(--medium-light-color) !important;
}

.guam-active {
    background-color: rgba(244, 67, 54, 0.4) !important;
}

/* Priority Badge */
.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-family: 'Big Shoulders', sans-serif;
    font-size: 11px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.priority-1, .priority-2 { background: #F44336; }
.priority-3 { background: #FF9800; }
.priority-4 { background: #FFC107; color: #333; }
.priority-5 { background: #9C27B0; }
.priority-6 { background: #673AB7; }
.priority-7 { background: #3F51B5; }
.priority-8 { background: #2196F3; }
.priority-9 { background: #607D8B; }
.priority-10 { background: #9E9E9E; }

.btn-rerun {
    width: calc(100% - 24px);
    margin: 10px 12px;
    background-color: rgba(53, 177, 205, 0.3) !important;
    gap: 8px;
}

.btn-rerun:hover {
    background-color: rgba(53, 177, 205, 0.5) !important;
}

/* ---- Bottom Panel ---- */
.bottom-panel {
    position: relative;
    height: 250px;
    flex-shrink: 0;
    margin-right: 340px;
    background: rgba(28, 31, 35, 0.95);
    border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 10;
    display: flex;
    flex-direction: column;
    transition: height 0.3s ease, margin-right 0.3s ease;
}

/* When right panel is collapsed, bottom panel extends full width */
.right-panel.collapsed ~ .bottom-panel {
    margin-right: 0;
}

/* Collapsed = just the tab bar visible */
.bottom-panel.collapsed {
    height: 36px;
}

/* Expanded = fills nearly the entire screen below header */
.bottom-panel.expanded {
    height: calc(100vh - 120px);
}

/* Drag handle hidden — replaced by expand/collapse buttons in tab bar */
.bottom-panel-drag-handle {
    display: none;
}

/* Toggle button — inside tab bar, right side */
.panel-toggle-bottom {
    position: absolute;
    top: 6px;
    right: 10px;
    width: 28px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 21;
    cursor: pointer;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    background: rgba(255,255,255,0.05);
}

.panel-toggle-bottom:hover {
    color: var(--selected-text-color);
    background: rgba(255,255,255,0.12);
}

.bottom-panel.collapsed .panel-toggle-bottom i {
    transform: rotate(180deg);
}

/* Expand/contract button — next to the collapse toggle */
.panel-expand-btn {
    position: absolute;
    top: 6px;
    right: 46px;
    width: 28px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 21;
    cursor: pointer;
    font-size: 11px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 3px;
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
    transition: all 0.2s;
}

.panel-expand-btn:hover {
    color: var(--selected-text-color);
    background: rgba(255,255,255,0.12);
}

.bottom-panel.expanded .panel-expand-btn i {
    transform: rotate(180deg);
}

.bottom-panel.collapsed .panel-expand-btn {
    display: none;
}

.bottom-tabs {
    display: flex;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.bottom-tab {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: 'Big Shoulders', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bottom-tab:hover {
    opacity: 0.8;
    background: rgba(255,255,255,0.05);
}

.bottom-tab.active {
    opacity: 1;
    color: var(--medium-light-color);
    border-bottom: 2px solid var(--medium-light-color);
}

.bottom-tab-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.tab-pane {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    padding: 8px;
}

.tab-pane.active {
    display: block;
}

/* ---- Loading Matrix ---- */
.loading-matrix {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
}

.loading-matrix th,
.loading-matrix td {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    white-space: nowrap;
}

.loading-matrix thead th {
    background: rgba(255,255,255,0.06);
    color: var(--medium-light-color);
    font-family: 'Big Shoulders', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 2;
}

.matrix-mission-header {
    text-align: left !important;
    min-width: 180px;
}

.matrix-antenna-header {
    cursor: pointer;
    transition: background 0.2s;
}

.matrix-antenna-header:hover {
    background: rgba(53, 177, 205, 0.15) !important;
}

.antenna-name {
    display: block;
    font-size: 14px;
}

.antenna-detail {
    display: block;
    font-size: 10px;
    opacity: 0.5;
    font-family: 'Overpass', sans-serif;
    text-transform: none;
}

.matrix-row {
    transition: background 0.15s;
}

.matrix-row:hover {
    background: rgba(255,255,255,0.02);
}

.matrix-mission-cell {
    text-align: left !important;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 12px !important;
}

.mission-name {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 16px;
    text-transform: uppercase;
}

.mission-full-name {
    font-size: 11px;
    opacity: 0.5;
    display: none;
}

.matrix-cell {
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    vertical-align: middle;
}

.matrix-cell:hover {
    outline: 2px solid var(--medium-light-color);
    z-index: 1;
}

.cell-minutes {
    display: block;
    font-weight: 600;
    color: var(--selected-text-color);
    font-size: 14px;
}

.cell-passes {
    display: block;
    font-size: 10px;
    opacity: 0.5;
}

.cell-empty {
    opacity: 0.3;
    font-size: 18px;
}

.conflict-icon {
    color: #F44336;
    font-size: 11px;
    animation: pulse-red 1.5s infinite;
}

/* Heat map cell colors */
.heat-none { background: transparent; }
.heat-low { background: rgba(33, 150, 243, 0.15); }
.heat-med { background: rgba(76, 175, 80, 0.18); }
.heat-high { background: rgba(255, 152, 0, 0.22); }
.heat-over { background: rgba(244, 67, 54, 0.25); }

.matrix-conflict {
    border-left: 3px solid #F44336 !important;
}

.matrix-total-cell {
    font-weight: bold;
    color: var(--selected-text-color);
    background: rgba(255,255,255,0.04) !important;
}

.matrix-sla-header {
    min-width: 130px;
}

.matrix-sla-cell {
    min-width: 130px;
}

.sla-bar-container {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.sla-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.sla-met .sla-bar-fill { background: #4CAF50; }
.sla-partial .sla-bar-fill { background: #FF9800; }
.sla-unmet .sla-bar-fill { background: #F44336; }

.sla-value {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 16px;
}

.sla-met .sla-value { color: #4CAF50; }
.sla-partial .sla-value { color: #FF9800; }
.sla-unmet .sla-value { color: #F44336; }

/* SLA fill colors for overall bar */
.sla-fill-met { background: linear-gradient(90deg, #4CAF50, #66BB6A) !important; }
.sla-fill-partial { background: linear-gradient(90deg, #FF9800, #FFB74D) !important; }
.sla-fill-unmet { background: linear-gradient(90deg, #F44336, #EF5350) !important; }

/* Utilization footer row */
.matrix-util-row td {
    font-family: 'Big Shoulders', sans-serif;
    text-transform: uppercase;
    background: rgba(255,255,255,0.03) !important;
    border-top: 2px solid rgba(255,255,255,0.1) !important;
}

.matrix-util-label {
    text-align: left !important;
    font-size: 13px;
    color: var(--text-color);
    opacity: 0.7;
}

.matrix-util-cell {
    text-align: center;
}

.util-value {
    display: block;
    font-size: 18px;
}

.util-detail {
    display: block;
    font-size: 10px;
    opacity: 0.5;
    font-family: 'Overpass', sans-serif;
    text-transform: none;
}

.util-normal .util-value { color: #4CAF50; }
.util-high .util-value { color: #FF9800; }
.util-overloaded .util-value { color: #F44336; }

/* Matrix interaction states */
.matrix-selected {
    outline: 2px solid var(--medium-light-color) !important;
    background: rgba(53, 177, 205, 0.12) !important;
}

.matrix-row-selected {
    background: rgba(53, 177, 205, 0.06) !important;
}

.matrix-row-hover {
    background: rgba(53, 177, 205, 0.04) !important;
}

.matrix-col-hover {
    background: rgba(53, 177, 205, 0.06) !important;
}

/* ---- Priority Tiers Display ---- */
.priority-tiers-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.priority-tier-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.priority-tier-card:hover {
    background: rgba(255,255,255,0.05);
}

.priority-tier-card:last-child {
    border-bottom: none;
}

.tier-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Big Shoulders', sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.tier-info {
    flex: 1;
    min-width: 0;
}

.tier-name {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 15px;
    color: var(--selected-text-color);
    text-transform: uppercase;
}

.tier-desc {
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 4px;
}

.tier-rules {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 3px;
}

.tier-tag {
    font-family: 'Overpass', sans-serif;
    font-size: 10px;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tag-locked {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.tag-bump {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.tag-negotiate {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.tier-examples {
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.4;
    font-style: italic;
}

/* ---- Coverage Gaps Tab ---- */
.coverage-gaps-content {
    padding: 8px;
}

.gap-summary {
    margin-bottom: 16px;
}

.gap-summary h5 {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 16px;
    color: var(--medium-light-color);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.gap-summary p {
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    color: var(--text-color);
    opacity: 0.7;
    margin: 0;
}

.gap-stations {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.gap-station-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
    flex: 1;
    min-width: 200px;
}

.gap-station-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.gap-station-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gap-station-name {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 14px;
    color: var(--selected-text-color);
    text-transform: uppercase;
}

.gap-station-loc,
.gap-station-coverage {
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.6;
}

.gap-station-util {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 22px;
    color: var(--medium-light-color);
}

.gap-regions {
    margin-top: 12px;
}

.gap-regions h5 {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 16px;
    color: #F44336;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.gap-region-card {
    padding: 12px 14px;
    background: rgba(244, 67, 54, 0.08);
    border-left: 3px solid #F44336;
    border-radius: 0 4px 4px 0;
    margin-bottom: 8px;
}

.gap-region-name {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 15px;
    color: #F44336;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.gap-region-desc {
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.5;
    margin-bottom: 8px;
}

.btn-show-gap {
    font-size: 11px !important;
    padding: 4px 10px !important;
    gap: 4px;
}

.text-danger {
    color: #F44336 !important;
}

/* ---- Analysis Overlay ---- */
/* ---- Satellite Tracking Indicator ---- */
.tracking-indicator {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(100, 200, 255, 0.4);
    border-radius: 24px;
    color: #cde;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    backdrop-filter: blur(8px);
    pointer-events: auto;
    animation: tracking-fade-in 0.3s ease;
}

@keyframes tracking-fade-in {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.tracking-indicator .tracking-icon {
    color: #64c8ff;
    font-size: 14px;
    animation: tracking-pulse 2s ease-in-out infinite;
}

@keyframes tracking-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

.tracking-indicator strong {
    color: #fff;
}

.btn-stop-tracking {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: #aaa;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 10px;
    padding: 0;
    transition: all 0.2s ease;
}

.btn-stop-tracking:hover {
    background: rgba(255, 80, 80, 0.3);
    border-color: rgba(255, 80, 80, 0.6);
    color: #ff5555;
}

/* Highlight tracked mission row in matrix */
.matrix-row.matrix-row-tracked .matrix-mission-cell .mission-name {
    text-decoration: underline;
    text-decoration-color: #64c8ff;
    text-underline-offset: 3px;
}

.matrix-row.matrix-row-tracked .matrix-mission-cell::after {
    content: '\f05b'; /* fa-crosshairs */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #64c8ff;
    font-size: 10px;
    margin-left: 6px;
    opacity: 0.7;
}

.analysis-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.analysis-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--medium-light-color);
    font-family: 'Big Shoulders', sans-serif;
    font-size: 18px;
    text-transform: uppercase;
}

.analysis-spinner i {
    font-size: 36px;
}

/* ---- Guam Narrative ---- */
.guam-narrative {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 25;
    pointer-events: none;
}

.guam-narrative-content {
    width: 400px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    background: rgba(18, 20, 24, 0.88);
    border: 1px solid rgba(244, 67, 54, 0.4);
    border-radius: 8px;
    padding: 20px 22px;
    text-align: left;
    pointer-events: all;
    animation: fadeInUp 0.6s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.guam-narrative-icon {
    font-size: 28px;
    color: #F44336;
    margin-bottom: 8px;
    display: inline-block;
}

.guam-narrative-content h2 {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 22px;
    color: var(--selected-text-color);
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline;
    margin-left: 10px;
    vertical-align: middle;
}

.guam-narrative-content p {
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.55;
    margin-bottom: 14px;
}

.guam-blackout-counter {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 6px;
    margin-bottom: 14px;
}

.blackout-label {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 14px;
    color: #F44336;
    text-transform: uppercase;
}

.blackout-value {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 28px;
    color: #F44336;
    line-height: 1;
    margin-left: auto;
}

.guam-narrative-actions {
    display: flex;
    gap: 8px;
}

.btn-add-guam {
    background-color: rgba(76, 175, 80, 0.3) !important;
    gap: 6px;
}

.btn-add-guam:hover {
    background-color: rgba(76, 175, 80, 0.5) !important;
}

.btn-close-narrative {
    gap: 6px;
    opacity: 0.7;
}

.btn-close-narrative:hover {
    opacity: 1;
}

.blackout-restored {
    color: #4CAF50 !important;
    transition: color 0.5s ease;
}

.blackout-restored + .blackout-label,
.guam-blackout-counter:has(.blackout-restored) {
    background: rgba(76, 175, 80, 0.15) !important;
    border-color: rgba(76, 175, 80, 0.3) !important;
}

.pulse-animation {
    animation: pulse-glow 1.5s infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
    }
    50% {
        box-shadow: 0 0 15px 5px rgba(76, 175, 80, 0.3);
    }
}

.analysis-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: #F44336;
    font-family: 'Big Shoulders', sans-serif;
    font-size: 18px;
    text-transform: uppercase;
}

.analysis-error i {
    font-size: 36px;
}

/* ---- App Info Button ---- */
.btn-app-info {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 16px;
    cursor: pointer;
    opacity: 0.45;
    padding: 2px 6px;
    margin-left: 6px;
    vertical-align: middle;
    transition: opacity 0.2s, color 0.2s;
}

.btn-app-info:hover {
    opacity: 1;
    color: var(--medium-light-color);
}

/* ---- Info Modal ---- */
.info-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.65);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

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

.info-modal-content {
    width: 760px;
    max-width: 92vw;
    max-height: 85vh;
    background: rgba(24, 27, 31, 0.98);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.info-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    background: rgba(24, 27, 31, 0.98);
    z-index: 1;
}

.info-modal-header h2 {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 20px;
    color: var(--medium-light-color);
    text-transform: uppercase;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    padding: 4px 8px;
    transition: opacity 0.2s;
}

.info-modal-close:hover {
    opacity: 1;
}

.info-modal-body {
    padding: 8px 24px 24px;
}

.info-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.info-section h3 {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 17px;
    color: var(--selected-text-color);
    text-transform: uppercase;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-section h3 i {
    color: var(--medium-light-color);
    font-size: 15px;
    width: 20px;
    text-align: center;
}

.info-section p {
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.65;
    margin: 0 0 10px 0;
    opacity: 0.88;
}

.info-section p:last-child {
    margin-bottom: 0;
}

.info-section ul,
.info-section ol {
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.65;
    margin: 0 0 10px 0;
    padding-left: 22px;
    opacity: 0.88;
}

.info-section li {
    margin-bottom: 6px;
}

.info-section strong {
    color: var(--selected-text-color);
}

.info-section em {
    color: var(--medium-light-color);
    font-style: italic;
}

.info-section code {
    font-family: monospace;
    font-size: 12px;
    background: rgba(255,255,255,0.08);
    padding: 1px 5px;
    border-radius: 3px;
    color: var(--medium-light-color);
}

.info-section kbd {
    display: inline-block;
    min-width: 24px;
    text-align: center;
    font-family: monospace;
    font-size: 12px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 3px;
    padding: 2px 6px;
    color: var(--selected-text-color);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    margin: 10px 0;
}

.info-table th {
    background: rgba(255,255,255,0.06);
    color: var(--medium-light-color);
    font-family: 'Big Shoulders', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    padding: 8px 10px;
    text-align: left;
    border: 1px solid rgba(255,255,255,0.08);
}

.info-table td {
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.06);
    color: var(--text-color);
    opacity: 0.88;
}

.info-table-compact {
    width: auto;
}

.info-table-compact td:first-child {
    padding-right: 20px;
}

.tier-cell {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: white;
    text-align: center;
    width: 36px;
    border-radius: 3px;
}

.tier-1-2 { background: rgba(244, 67, 54, 0.5); }
.tier-3 { background: rgba(255, 152, 0, 0.5); }
.tier-4 { background: rgba(255, 193, 7, 0.4); }
.tier-5 { background: rgba(156, 39, 176, 0.4); }
.tier-6 { background: rgba(103, 58, 183, 0.4); }
.tier-7 { background: rgba(63, 81, 181, 0.4); }
.tier-8 { background: rgba(33, 150, 243, 0.4); }
.tier-9-10 { background: rgba(96, 125, 139, 0.4); }

.info-section-footer {
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
    padding: 14px 16px !important;
    margin-top: 10px;
}

.info-section-footer p {
    font-size: 12px;
    opacity: 0.6;
    margin-bottom: 4px;
}

.info-section-footer p:last-child {
    margin-bottom: 0;
}

.info-guam-icon {
    color: #F44336 !important;
}

/* ---- Utilities ---- */
.hidden {
    display: none !important;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandCoverage {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ---- Catalog Modal ---- */
.catalog-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.catalog-modal-content {
    width: 720px;
    max-width: 90vw;
    max-height: 80vh;
    background: rgba(28, 31, 35, 0.98);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.catalog-header h3 {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 18px;
    color: var(--medium-light-color);
    text-transform: uppercase;
    margin: 0;
}

.catalog-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
}

.catalog-close:hover {
    opacity: 1;
}

.catalog-controls {
    display: flex;
    gap: 8px;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    align-items: center;
}

.catalog-search {
    flex: 1;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    color: var(--text-color);
    padding: 6px 10px;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
}

.catalog-search:focus {
    outline: none;
    border-color: var(--medium-light-color);
}

.catalog-group-select {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    color: var(--text-color);
    padding: 6px 8px;
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    max-width: 200px;
}

.catalog-group-select:focus {
    outline: none;
    border-color: var(--medium-light-color);
}

.btn-catalog-action {
    font-size: 12px !important;
    padding: 5px 10px !important;
    white-space: nowrap;
}

.catalog-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
    padding: 6px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.catalog-selection-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-catalog-sm {
    font-size: 11px !important;
    padding: 3px 8px !important;
}

.btn-catalog-add {
    font-size: 11px !important;
    padding: 3px 10px !important;
    background-color: rgba(76, 175, 80, 0.3) !important;
}

.btn-catalog-add:hover {
    background-color: rgba(76, 175, 80, 0.5) !important;
}

.btn-catalog-danger {
    background-color: rgba(244, 67, 54, 0.2) !important;
}

.btn-catalog-danger:hover {
    background-color: rgba(244, 67, 54, 0.4) !important;
}

.catalog-active {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
}

.catalog-active-label {
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    color: var(--text-color);
    white-space: nowrap;
}

.btn-close-catalog {
    background: none !important;
    border: none !important;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    padding: 2px 6px !important;
}

.btn-close-catalog:hover {
    opacity: 1;
}

.catalog-list-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    min-height: 300px;
}

.catalog-list-inner {
    position: relative;
}

.catalog-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px;
    height: 40px;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.15s;
    position: absolute;
    left: 0;
    right: 0;
}

.catalog-row:hover {
    background: rgba(255,255,255,0.05);
}

.catalog-row-selected {
    background: rgba(53, 177, 205, 0.12) !important;
}

.catalog-row-active {
    background: rgba(76, 175, 80, 0.08);
    opacity: 0.6;
}

.catalog-row input[type="checkbox"] {
    margin: 0;
}

.catalog-row-check {
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    color: rgba(255,255,255,0.3);
    font-size: 14px;
    cursor: pointer;
}

.catalog-row-check.checked {
    color: var(--medium-light-color);
}

.catalog-row-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.catalog-row-norad {
    width: 65px;
    text-align: right;
    opacity: 0.4;
    font-size: 11px;
}

.catalog-row-orbit {
    width: 85px;
    font-size: 11px;
    opacity: 0.6;
    text-align: right;
}

.catalog-row-epoch {
    width: 40px;
    text-align: right;
    font-size: 11px;
    opacity: 0.35;
}

.catalog-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
}

.catalog-active-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
}

.catalog-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(53, 177, 205, 0.2);
    border-radius: 12px;
    font-size: 11px;
    color: var(--medium-light-color);
}

.catalog-active-tag .remove-tag {
    cursor: pointer;
    opacity: 0.6;
}

.catalog-active-tag .remove-tag:hover {
    opacity: 1;
}

/* ---- Weather Panel ---- */
.weather-controls {
    padding: 10px 12px;
}

.weather-control-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.weather-control-row label {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.7;
    min-width: 55px;
}

.weather-select {
    flex: 1;
    font-size: 12px !important;
    padding: 3px 6px !important;
}

.weather-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    outline: none;
}

.weather-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--medium-light-color);
    border-radius: 50%;
    cursor: pointer;
}

.weather-station-impact {
    margin-top: 6px;
}

.weather-station-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0;
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
}

.weather-station-name {
    min-width: 60px;
    color: var(--text-color);
}

.weather-station-cloud {
    min-width: 35px;
    text-align: right;
}

.weather-station-cond {
    flex: 1;
    text-align: right;
}

.weather-ok { color: #4CAF50; }
.weather-warning { color: #FF9800; }
.weather-severe { color: #F44336; }

.weather-live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    color: #4CAF50;
}

.weather-live-dot {
    font-size: 8px;
    animation: pulse-red 1.5s infinite;
    color: #4CAF50;
}

.weather-offline-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.5;
}

/* ---- Budget Projection Tab ---- */
.budget-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    flex-wrap: wrap;
}

.budget-control-group {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Big Shoulders', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-color);
}

.budget-results {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.budget-chart-area {
    flex: 1;
    min-width: 0;
}

.budget-chart-title {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    color: var(--medium-light-color);
    margin-bottom: 8px;
}

.budget-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 100px;
}

.budget-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.budget-bar-wrapper {
    height: 80px;
    width: 100%;
    display: flex;
    align-items: flex-end;
}

.budget-bar {
    width: 100%;
    min-height: 2px;
    border-radius: 2px 2px 0 0;
    transition: height 0.3s ease;
}

.budget-bar-label {
    font-family: 'Overpass', sans-serif;
    font-size: 9px;
    color: var(--text-color);
    opacity: 0.5;
    white-space: nowrap;
    margin-top: 2px;
}

.budget-bar-value {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 11px;
    color: var(--text-color);
}

.budget-saturation-warning {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    color: #F44336;
    margin-bottom: 8px;
}

.budget-recommendations {
    margin-top: 6px;
}

.budget-rec-title {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--medium-light-color);
    margin-bottom: 4px;
}

.budget-rec-item {
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
    padding: 3px 0;
}

.budget-heatmap-area {
    flex: 1;
    min-width: 0;
}

.budget-heatmap-title {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    color: var(--medium-light-color);
    margin-bottom: 8px;
}

.budget-heatmap {
    max-height: 160px;
    overflow: auto;
}

.budget-heatmap-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
}

.budget-heatmap-table th,
.budget-heatmap-table td {
    padding: 3px 6px;
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    white-space: nowrap;
}

.budget-heatmap-table th {
    background: rgba(255,255,255,0.06);
    color: var(--medium-light-color);
    font-size: 10px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.budget-heatmap-sticky {
    position: sticky;
    left: 0;
    background: rgba(28, 31, 35, 0.98);
    z-index: 2;
    text-align: left !important;
    font-weight: bold;
}

.budget-heatmap-cell {
    font-size: 10px;
    color: var(--text-color);
}

.budget-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-color);
    opacity: 0.4;
    font-family: 'Overpass', sans-serif;
}

/* ---- Export & Toolbar Buttons ---- */
.export-buttons {
    display: flex;
    gap: 4px;
}

.btn-export {
    font-size: 14px !important;
    padding: 6px 14px !important;
    opacity: 0.6;
}

.btn-export:hover {
    opacity: 1;
}

.btn-catalog {
    background-color: rgba(33, 150, 243, 0.2) !important;
    font-size: 14px !important;
    padding: 6px 14px !important;
    gap: 6px;
}

.btn-catalog:hover {
    background-color: rgba(33, 150, 243, 0.4) !important;
}

.btn-terrain {
    font-size: 14px !important;
    padding: 6px 14px !important;
    opacity: 0.5;
}

.btn-terrain:hover {
    opacity: 0.8;
}

.btn-terrain.terrain-active {
    opacity: 1;
    background-color: rgba(139, 195, 74, 0.3) !important;
}

/* ---- Admin & Toggles Header Buttons ---- */
.btn-toggles {
    font-size: 14px !important;
    padding: 6px 14px !important;
    opacity: 0.5;
}

.btn-toggles:hover {
    opacity: 1;
    background-color: rgba(255, 152, 0, 0.2) !important;
}

.btn-admin {
    font-size: 14px !important;
    padding: 6px 14px !important;
    opacity: 0.5;
    text-decoration: none !important;
}

.btn-admin:hover {
    opacity: 1;
    background-color: rgba(156, 39, 176, 0.2) !important;
}

/* ---- Feature Toggles Panel (Overlay) ---- */
.toggles-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.toggles-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(24, 27, 31, 0.98);
}

.toggles-panel-header h3 {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 18px;
    color: var(--medium-light-color);
    text-transform: uppercase;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggles-panel-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    padding: 4px 8px;
    transition: opacity 0.2s;
}

.toggles-panel-close:hover {
    opacity: 1;
}

.toggles-panel-content {
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    background: rgba(28, 31, 35, 0.98);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.toggles-panel-body {
    flex: 1;
    overflow-y: auto;
}

.toggles-category {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.toggles-category:last-child {
    border-bottom: none;
}

.toggles-category-header {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--medium-light-color);
    padding: 10px 20px 4px;
    opacity: 0.7;
    letter-spacing: 0.5px;
}

.toggles-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    transition: background 0.15s;
}

.toggles-item:hover {
    background: rgba(255,255,255,0.03);
}

.toggles-item-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.toggles-item-name {
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    color: var(--selected-text-color);
}

.toggles-item-desc {
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.5;
    margin-top: 1px;
}

.toggles-loading {
    padding: 20px;
    text-align: center;
    color: var(--text-color);
    opacity: 0.5;
    font-family: 'Overpass', sans-serif;
}

/* ---- Scenario Save Button ---- */
.btn-save-scenario {
    width: calc(100% - 24px);
    margin: 0 12px 10px;
    background-color: rgba(255, 152, 0, 0.2) !important;
    gap: 8px;
}

.btn-save-scenario:hover {
    background-color: rgba(255, 152, 0, 0.4) !important;
}

/* ---- Saved Scenarios List ---- */
.scenario-list {
    max-height: 180px;
    overflow-y: auto;
    padding: 4px;
}

.scenario-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    color: var(--text-color);
    opacity: 0.4;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
}

.scenario-item {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    margin-bottom: 4px;
    background: rgba(255,255,255,0.03);
    border-radius: 4px;
    border-left: 3px solid rgba(255,255,255,0.15);
    transition: background 0.15s;
}

.scenario-item:hover {
    background: rgba(255,255,255,0.06);
}

.scenario-item.scenario-active {
    border-left-color: var(--medium-light-color);
    background: rgba(53, 177, 205, 0.1);
}

.scenario-name {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 14px;
    color: var(--selected-text-color);
    text-transform: uppercase;
}

.scenario-detail {
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.6;
    margin: 2px 0 4px;
}

.scenario-actions {
    display: flex;
    gap: 4px;
}

.scenario-actions button {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    color: var(--text-color);
    font-size: 11px;
    cursor: pointer;
    padding: 3px 8px;
    transition: all 0.2s;
}

.scenario-actions button:hover {
    background: rgba(255,255,255,0.15);
    color: var(--selected-text-color);
}

.btn-scenario-delete:hover {
    background: rgba(244, 67, 54, 0.2) !important;
    color: #F44336 !important;
}

/* ---- Recommendations Panel ---- */
.recommendations-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 8px;
}

.recommendations-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    color: var(--text-color);
    opacity: 0.4;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
}

.recommendations-empty i {
    color: #4CAF50;
}

.recommendation-item {
    padding: 8px 10px;
    margin-bottom: 4px;
    background: rgba(255, 152, 0, 0.06);
    border-left: 3px solid #FF9800;
    border-radius: 0 4px 4px 0;
}

.rec-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Big Shoulders', sans-serif;
    font-size: 13px;
    color: var(--selected-text-color);
}

.rec-icon {
    color: #FF9800;
    font-size: 12px;
}

.rec-mission {
    text-transform: uppercase;
}

.rec-impact {
    margin-left: auto;
    color: #4CAF50;
    font-size: 14px;
}

.rec-detail {
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 3px;
    padding-left: 18px;
}

.rec-detail strong {
    color: var(--selected-text-color);
}

/* ---- Network Saturation Panel ---- */
.saturation-content {
    padding: 10px 12px;
}

.saturation-empty {
    color: var(--text-color);
    opacity: 0.4;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    padding: 8px;
}

.saturation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}

.saturation-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background: rgba(255,255,255,0.04);
    border-radius: 4px;
}

.saturation-value {
    font-family: 'Big Shoulders', sans-serif;
    font-size: 24px;
    color: var(--selected-text-color);
    line-height: 1;
}

.saturation-label {
    font-family: 'Overpass', sans-serif;
    font-size: 10px;
    color: var(--text-color);
    text-transform: uppercase;
    opacity: 0.6;
    margin-top: 4px;
}

.saturation-bottleneck {
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 6px;
}

.saturation-bottleneck strong {
    color: var(--selected-text-color);
}

.saturation-critical {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
    border-left: 3px solid #F44336;
}

.saturation-warning {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
    border-left: 3px solid #FF9800;
}

.saturation-ok {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    border-left: 3px solid #4CAF50;
}

.saturation-recommendation {
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    color: var(--text-color);
    opacity: 0.7;
    padding: 4px 0;
    font-style: italic;
}

/* ---- Responsive ---- */
@media (max-width: 1200px) {
    .right-panel {
        width: 280px;
    }
    .right-panel.collapsed {
        right: -280px;
    }
    .bottom-panel {
        margin-right: 280px;
    }
    .right-panel.collapsed ~ .bottom-panel {
        margin-right: 0;
    }
}

/* ============================== */
/* Unity 3D Twin — Left Drawer    */
/* ============================== */
.unity-model-popup {
    position: fixed;
    top: 60px;
    left: 0;
    bottom: 0;
    width: 46vw;
    max-width: 720px;
    min-width: 380px;
    background: rgba(14, 16, 20, 0.97);
    border-right: 1px solid rgba(0, 200, 255, 0.25);
    z-index: 200;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.6);
    transform: translateX(0);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.unity-model-popup.hidden {
    transform: translateX(-100%);
    pointer-events: none;
}
.unity-model-popup.expanded {
    width: 100vw;
    max-width: 100vw;
    z-index: 9999;
}
/* When expanded, stats panel sits beside canvas instead of below */
.unity-model-popup.expanded .unity-model-content {
    flex-direction: row;
}
.unity-model-popup.expanded .unity-stats-panel {
    border-top: none;
    border-left: 1px solid rgba(0, 200, 255, 0.15);
    width: 0;
    height: 100%;
    flex-shrink: 0;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease;
}
.unity-model-popup.expanded .unity-stats-panel.open {
    width: 320px;
    min-width: 320px;
    height: 100%;
    overflow: hidden;
    min-height: 0;
}
.unity-model-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0, 200, 255, 0.06);
    border-bottom: 1px solid rgba(0, 200, 255, 0.15);
    flex-shrink: 0;
}
.unity-model-title {
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    color: #00c8ff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.unity-model-controls {
    display: flex;
    gap: 6px;
}
.btn-unity-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s;
}
.btn-unity-control:hover {
    background: rgba(0, 200, 255, 0.2);
    color: #fff;
    border-color: rgba(0, 200, 255, 0.4);
}
.btn-unity-control.active {
    background: rgba(0, 200, 255, 0.25);
    color: #00c8ff;
    border-color: #00c8ff;
}
.unity-model-body {
    flex: 1;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}
.unity-model-body canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.unity-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 28, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #8899aa;
    font-family: 'Overpass', sans-serif;
    font-size: 14px;
}
.unity-loading-overlay.hidden {
    display: none;
}
.unity-bundle-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #35b1cd;
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 14px;
    z-index: 10;
    pointer-events: none;
}
.unity-bundle-loading i {
    font-size: 24px;
}
.unity-bundle-loading.hidden {
    display: none;
}
.unity-loading-icon {
    font-size: 32px;
    color: #00c8ff;
}
.unity-progress-track {
    width: 180px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}
.unity-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00c8ff, #00ffcc);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.unity-loading-pct {
    font-size: 12px;
    color: #00c8ff;
}

/* Floating 3D Model button (over globe) */
.btn-view-3d-floating {
    position: absolute;
    top: 2px;
    left: -3px;
    z-index: 150;
    padding: 8px 16px;
    background: rgba(20, 22, 28, 0.9);
    border: 1px solid #00c8ff;
    color: #00c8ff;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(0, 200, 255, 0.15);
    animation: pulse3d 2s infinite;
}
.btn-view-3d-floating:hover {
    background: #00c8ff;
    color: #111;
    box-shadow: 0 4px 24px rgba(0, 200, 255, 0.4);
}
.btn-view-3d-floating.hidden {
    display: none;
}
@keyframes pulse3d {
    0%, 100% { box-shadow: 0 4px 16px rgba(0, 200, 255, 0.15); }
    50% { box-shadow: 0 4px 24px rgba(0, 200, 255, 0.35); }
}

/* 3D Model button in Cesium InfoBox */
.btn-view-3d-model {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #00c8ff22, #00c8ff11);
    border: 1px solid #00c8ff;
    color: #00c8ff;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Overpass', sans-serif;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.15s;
}
.btn-view-3d-model:hover {
    background: #00c8ff;
    color: #111;
}

/* ============================== */
/* Unity Subsystem Stats Panel    */
/* ============================== */
.unity-model-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
/* Half-screen default: stats panel stacks below canvas, animates height */
.unity-stats-panel {
    width: 100%;
    height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(16, 18, 22, 0.98);
    border-top: 1px solid rgba(0, 200, 255, 0.15);
    flex-shrink: 0;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.25s ease;
}
.unity-stats-panel.open {
    height: 50%;
    opacity: 1;
    overflow: hidden;
    min-height: 0;
}

/* Stats header */
.unity-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(0, 200, 255, 0.05);
    border-bottom: 1px solid rgba(0, 200, 255, 0.1);
    flex-shrink: 0;
}
.unity-stats-title {
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #00c8ff;
    display: flex;
    align-items: center;
    gap: 6px;
}
.unity-stats-title i { font-size: 11px; opacity: 0.7; }
.unity-stats-status {
    font-size: 11px;
    font-family: 'Overpass', sans-serif;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.unity-stats-status.status-green { background: rgba(2,105,0,0.3); color: #4cff4a; border: 1px solid rgba(76,255,74,0.2); }
.unity-stats-status.status-yellow { background: rgba(179,142,29,0.3); color: #ffd84a; border: 1px solid rgba(255,216,74,0.2); }
.unity-stats-status.status-red { background: rgba(177,0,35,0.3); color: #ff6b6b; border: 1px solid rgba(255,107,107,0.2); }

/* Search */
.unity-stats-search {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.unity-stats-search i { color: #556; font-size: 11px; margin-right: 6px; }
.unity-stats-search input {
    background: transparent;
    border: none;
    outline: none;
    color: #ccc;
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    width: 100%;
}
.unity-stats-search input::placeholder { color: #445; }

/* Tree container */
.unity-stats-tree {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 0;
}
.unity-stats-tree::-webkit-scrollbar { width: 4px; }
.unity-stats-tree::-webkit-scrollbar-track { background: transparent; }
.unity-stats-tree::-webkit-scrollbar-thumb { background: rgba(0,200,255,0.2); border-radius: 2px; }

/* Subsystem node */
.ust-node { user-select: none; }
.ust-node-header {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
    transition: background 0.15s;
    gap: 6px;
    border-left: 2px solid transparent;
}
.ust-node-header:hover { background: rgba(0,200,255,0.06); }
.ust-node-header.selected {
    background: rgba(0,200,255,0.12);
    border-left-color: #00c8ff;
}

/* Indentation */
.ust-node[data-depth="0"] > .ust-node-header { padding-left: 10px; }
.ust-node[data-depth="1"] > .ust-node-header { padding-left: 24px; }
.ust-node[data-depth="2"] > .ust-node-header { padding-left: 38px; }
.ust-node[data-depth="3"] > .ust-node-header { padding-left: 52px; }
.ust-node[data-depth="1"] > .ust-data-items { margin-left: 24px; }
.ust-node[data-depth="2"] > .ust-data-items { margin-left: 38px; }
.ust-node[data-depth="3"] > .ust-data-items { margin-left: 52px; }

/* Chevron */
.ust-chevron {
    font-size: 9px;
    color: #667;
    transition: transform 0.2s;
    width: 12px;
    text-align: center;
    flex-shrink: 0;
}
.ust-node.expanded > .ust-node-header .ust-chevron { transform: rotate(90deg); }
.ust-chevron.leaf { visibility: hidden; }

/* Status dot */
.ust-status-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.ust-status-dot.green { background: #4cff4a; box-shadow: 0 0 4px rgba(76,255,74,0.4); }
.ust-status-dot.yellow { background: #ffd84a; box-shadow: 0 0 4px rgba(255,216,74,0.4); }
.ust-status-dot.red { background: #ff6b6b; box-shadow: 0 0 4px rgba(255,107,107,0.4); }

/* Node label */
.ust-label {
    font-family: 'Overpass', sans-serif;
    font-size: 12px;
    color: #ccd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.ust-node-header.selected .ust-label { color: #fff; }

/* Data count badge — colored by worst status, matches front-end slider badges */
.ust-data-count {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    flex-shrink: 0;
    min-width: 16px;
    text-align: center;
    line-height: 16px;
}
.ust-data-count.green { background: #026900; }
.ust-data-count.yellow { background: #b38e1d; }
.ust-data-count.red { background: #b10023; }

/* Children container */
.ust-children { display: none; }
.ust-node.expanded > .ust-children { display: block; }

/* Data items */
.ust-data-items {
    display: none;
    padding: 4px 10px 8px;
    border-left: 1px solid rgba(0,200,255,0.08);
}
.ust-node.expanded > .ust-data-items { display: block; }

.ust-data-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 8px;
    font-family: 'Overpass', sans-serif;
    font-size: 11px;
    border-radius: 3px;
    transition: background 0.1s;
}
.ust-data-row:hover { background: rgba(255,255,255,0.03); }
.ust-data-label {
    color: #889;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 8px;
}
.ust-data-value {
    color: #dde;
    font-weight: 600;
    white-space: nowrap;
    font-size: 11px;
}
.ust-data-value[data-status="green"] { color: #4cff4a; }
.ust-data-value[data-status="yellow"] { color: #ffd84a; }
.ust-data-value[data-status="red"] { color: #ff6b6b; }

/* History button */
.ust-history-btn {
    color: #556;
    font-size: 10px;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: 4px;
    transition: color 0.15s;
    flex-shrink: 0;
}
.ust-history-btn:hover { color: #00c8ff; }

/* Sparkline */
.ust-sparkline-row { display: none; padding: 4px 8px 6px; }
.ust-sparkline-row.visible { display: block; }
.ust-sparkline-canvas { width: 100%; height: 32px; display: block; }
.ust-sparkline-legend {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #556;
    font-family: 'Overpass', sans-serif;
    padding: 2px 0 0;
}

/* Description */
.ust-description {
    padding: 4px 8px;
    font-size: 10px;
    color: #667;
    font-family: 'Overpass', sans-serif;
    font-style: italic;
    line-height: 1.3;
}

/* Toggle button active state */
#unityStatsToggleBtn.active {
    background: rgba(0,200,255,0.25);
    color: #00c8ff;
    border-color: rgba(0,200,255,0.5);
}

/* =============================================
   GANTT CHART (Antenna Timeline)
   ============================================= */
.gantt-wrapper {
    width: 100%;
    font-size: 12px;
    color: #ccc;
}
.gantt-header {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    height: 24px;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(20,24,30,0.95);
    z-index: 2;
}
.gantt-header-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    text-align: center;
}
.gantt-label-col {
    width: 140px;
    min-width: 140px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}
.gantt-label-col:hover {
    background: rgba(255,255,255,0.05);
}
.gantt-timeline-col {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;
}
.gantt-util-col {
    width: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 4px;
}
.gantt-group {
    margin-bottom: 2px;
}
.gantt-group-header {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #35b1cd;
    background: rgba(47,138,158,0.1);
    border-bottom: 1px solid rgba(47,138,158,0.2);
}
.gantt-row {
    display: flex;
    height: 28px;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.gantt-row:hover {
    background: rgba(255,255,255,0.03);
}
.gantt-geo-row {
    background: rgba(100,100,100,0.08);
}
.gantt-geo-row:hover {
    background: rgba(100,100,100,0.12);
}
.gantt-antenna-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.gantt-antenna-name {
    font-weight: 500;
    color: #ddd;
    font-size: 11px;
}
.gantt-antenna-size {
    font-size: 10px;
    color: #777;
}
.gantt-geo-label {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #888;
    font-style: italic;
    letter-spacing: 0.5px;
    z-index: 1;
}
.gantt-geo-row .gantt-timeline-col {
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(100,100,100,0.12) 3px,
        rgba(100,100,100,0.12) 6px
    );
}
/* Timeline blocks */
.gantt-block {
    position: absolute;
    top: 3px;
    height: 22px;
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.85;
    transition: opacity 0.15s;
    z-index: 1;
}
.gantt-block:hover {
    opacity: 1;
    z-index: 3;
    box-shadow: 0 0 6px rgba(255,255,255,0.3);
}
/* Wide background blocks (GEO contacts) — hatched pattern, stay behind LEO blocks */
.gantt-block-bg {
    opacity: 0.15;
    z-index: 0;
}
.gantt-block-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.35) 3px,
        rgba(0,0,0,0.35) 6px
    );
    border-radius: inherit;
    pointer-events: none;
}
.gantt-block-bg:hover {
    opacity: 0.25;
    z-index: 0;
}
.gantt-block-label {
    padding: 0 4px;
    font-size: 9px;
    color: #fff;
    line-height: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
/* Time axis */
.gantt-time-axis {
    position: relative;
    width: 100%;
    height: 100%;
}
.gantt-tick {
    position: absolute;
    top: 0;
    height: 100%;
    border-left: 1px solid rgba(255,255,255,0.08);
}
.gantt-tick span {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 9px;
    color: #666;
    white-space: nowrap;
}
/* Utilization bars */
.gantt-util-bar {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    height: 10px;
    border-radius: 2px;
    max-width: calc(100% - 30px);
}
.gantt-util-low { background: #4CAF50; }
.gantt-util-med { background: #FF9800; }
.gantt-util-high { background: #F44336; }
.gantt-util-text {
    font-size: 10px;
    color: #aaa;
    position: relative;
    z-index: 1;
}
.gantt-util-geo {
    color: #555;
}

/* =============================================
   AOS/LOS LOG PANEL
   ============================================= */
.aoslos-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 50;
    font-family: 'Overpass Mono', 'Consolas', monospace;
    font-size: 11px;
    transition: height 0.25s ease;
    width: 420px;
    max-width: calc(100% - 20px);
}
.aoslos-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(20, 24, 30, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(47, 138, 158, 0.3);
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    color: #35b1cd;
    font-size: 11px;
    font-family: 'Big Shoulders Display', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}
.aoslos-toggle:hover {
    background: rgba(47, 138, 158, 0.2);
}
.aoslos-toggle i {
    font-size: 12px;
}
.aoslos-badge {
    background: rgba(47, 138, 158, 0.4);
    color: #7dd3e8;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-family: 'Overpass', sans-serif;
    margin-left: auto;
}
.aoslos-body {
    display: none;
    background: rgba(10, 12, 16, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(47, 138, 158, 0.2);
    border-top: none;
    border-radius: 0 0 4px 4px;
    padding: 6px 8px;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 138, 158, 0.3) transparent;
}
.aoslos-filter {
    display: none;
    padding: 4px 8px;
    background: rgba(10, 12, 16, 0.92);
    border: 1px solid rgba(47, 138, 158, 0.2);
    border-top: none;
    border-bottom: none;
}
.aoslos-expanded .aoslos-filter {
    display: flex;
    align-items: center;
    gap: 6px;
}
.aoslos-summary {
    font-size: 10px;
    color: #35b1cd;
    white-space: nowrap;
}
.aoslos-expanded .aoslos-body {
    display: block;
}
.aoslos-expanded .aoslos-toggle {
    border-bottom: none;
    border-radius: 4px 4px 0 0;
}
.aoslos-entry {
    padding: 2px 0;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.aoslos-entry:last-child {
    border-bottom: none;
}
.aoslos-time {
    color: #666;
}
.aoslos-aos .aoslos-type {
    color: #4CAF50;
    font-weight: 600;
}
.aoslos-los .aoslos-type {
    color: #FF9800;
    font-weight: 600;
}
.aoslos-mission {
    color: #ddd;
    font-weight: 500;
}
.aoslos-arrow {
    color: #555;
}
.aoslos-antenna {
    color: #aaa;
}
.aoslos-detail {
    color: #666;
    font-size: 10px;
}

/* ── DSN Now Panel ── */
.dsn-now-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 420px;
    z-index: 50;
    font-family: 'Overpass Mono', 'Consolas', monospace;
    font-size: 11px;
    max-width: calc(100% - 20px);
}
.dsn-now-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(20, 24, 30, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(47, 138, 158, 0.3);
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    color: #35b1cd;
    font-size: 11px;
    font-family: 'Big Shoulders Display', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}
.dsn-now-header:hover { background: rgba(47, 138, 158, 0.2); }
.dsn-now-dot {
    width: 8px; height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    margin-left: auto;
    animation: dsnPulse 2s infinite;
}
@keyframes dsnPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
.dsn-now-body {
    display: none;
    background: rgba(10, 12, 16, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(47, 138, 158, 0.2);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 138, 158, 0.3) transparent;
}
.dsn-now-expanded .dsn-now-body { display: block; }
.dsn-now-expanded .dsn-now-header { border-bottom: none; }
.dsn-station-group { padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.dsn-station-group:last-child { border-bottom: none; }
.dsn-station-name {
    padding: 2px 10px;
    color: #35b1cd;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Big Shoulders Display', sans-serif;
}
.dsn-dish-row {
    padding: 3px 10px;
    cursor: pointer;
    transition: background 0.15s;
}
.dsn-dish-row:hover { background: rgba(47, 138, 158, 0.08); }
.dsn-dish-summary {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dsn-dish-name {
    color: #ccc;
    font-weight: 600;
    min-width: 48px;
}
.dsn-target {
    font-size: 10px;
    margin-left: auto;
}
.dsn-dish-details {
    display: flex;
    gap: 8px;
    font-size: 10px;
    color: #888;
    padding-top: 2px;
}
.dsn-signal { font-size: 10px; }
.dsn-down { color: #4CAF50; }
.dsn-up { color: #FF9800; }
.dsn-range { color: #7dd3e8; }
.dsn-rtlt { color: #999; }
.dsn-band {
    font-size: 9px;
    padding: 0 4px;
    border-radius: 2px;
    font-weight: 700;
    line-height: 16px;
}
.band-s { background: rgba(76, 175, 80, 0.2); color: #4CAF50; }
.band-x { background: rgba(33, 150, 243, 0.2); color: #2196F3; }
.band-ka { background: rgba(156, 39, 176, 0.2); color: #CE93D8; }
.dsn-dish-extra {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 2px;
    font-size: 10px;
    color: #777;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 3px;
}
.dsn-dish-expanded .dsn-dish-extra { display: flex; }

/* ── Left Panel Stack ── */
#leftPanelStack {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 320px;
    max-height: calc(100% - 20px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 138, 158, 0.3) transparent;
}
#leftPanelStack > * {
    width: 100% !important;
}
#leftPanelStack .aoslos-panel,
#leftPanelStack .dsn-now-panel {
    position: static;
    top: auto;
    right: auto;
    left: auto;
}

/* ── Info Panels (Blog, Images, NASA TV) ── */
.info-panel {
    font-family: 'Overpass Mono', 'Consolas', monospace;
    font-size: 11px;
    width: 420px;
    max-width: calc(100vw - 40px);
}
.info-panel-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(20, 24, 30, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(47, 138, 158, 0.3);
    border-radius: 4px;
    cursor: pointer;
    color: #35b1cd;
    font-size: 11px;
    font-family: 'Big Shoulders Display', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
}
.info-panel-toggle:hover { background: rgba(47, 138, 158, 0.2); }
.info-panel-toggle i { font-size: 12px; }
.info-panel-body {
    display: none;
    background: rgba(10, 12, 16, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(47, 138, 158, 0.2);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(47, 138, 158, 0.3) transparent;
}
.info-panel-expanded .info-panel-body { display: block; }
.info-panel-expanded .info-panel-toggle {
    border-radius: 4px 4px 0 0;
    border-bottom: none;
}
.info-badge {
    background: rgba(255, 152, 0, 0.4);
    color: #FFB74D;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-family: 'Overpass', sans-serif;
    margin-left: auto;
}

/* Blog posts */
.blog-post {
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.blog-post:last-child { border-bottom: none; }
.blog-post.blog-new { border-left: 2px solid #FF9800; }
.blog-title {
    color: #7dd3e8;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    display: block;
    line-height: 1.3;
}
.blog-title:hover { color: #b5e8f7; text-decoration: underline; }
.blog-meta { color: #666; font-size: 9px; margin: 2px 0; }
.blog-excerpt { color: #999; font-size: 10px; line-height: 1.4; }

/* Image grid */
.image-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
}
.image-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 3px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.06);
    transition: border-color 0.15s;
}
.image-thumb:hover { border-color: rgba(47, 138, 158, 0.5); }
.image-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Image modal */
.image-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.image-modal-backdrop {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    cursor: pointer;
}
.image-modal-content {
    position: relative;
    max-width: 90vw; max-height: 90vh;
}
.image-modal-content img {
    max-width: 100%; max-height: 80vh;
    border-radius: 4px;
}
.image-modal-caption {
    color: #ccc; font-size: 12px;
    padding: 8px 0; text-align: center;
    max-width: 600px; margin: 0 auto;
}
.image-modal-close {
    position: absolute; top: -12px; right: -12px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(20,24,30,0.9);
    border: 1px solid rgba(47,138,158,0.4);
    color: #35b1cd;
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* NASA TV embed */
.nasatv-live-dot {
    width: 8px; height: 8px;
    background: #F44336;
    border-radius: 50%;
    margin-left: auto;
    animation: dsnPulse 2s infinite;
}
.nasatv-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
}
.nasatv-embed iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ── Space Weather Panel ── */
.sw-status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-left: auto;
    background: #4CAF50;
}
.sw-status-dot.sw-quiet { background: #4CAF50; }
.sw-status-dot.sw-active { background: #FF9800; animation: dsnPulse 2s infinite; }
.sw-status-dot.sw-storm { background: #F44336; animation: dsnPulse 1s infinite; }
.sw-grid { padding: 6px 10px; }
.sw-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    font-size: 11px;
}
.sw-label { color: #888; }
.sw-value { color: #ddd; font-weight: 500; }
.sw-quiet { color: #4CAF50; }
.sw-active { color: #FF9800; }
.sw-storm { color: #F44336; font-weight: 700; }
.sw-kp-val {
    display: inline-block;
    width: 20px; height: 20px;
    line-height: 20px;
    text-align: center;
    border-radius: 3px;
    font-weight: 700;
    font-size: 12px;
}
.sw-kp-val.sw-quiet { background: rgba(76, 175, 80, 0.2); color: #4CAF50; }
.sw-kp-val.sw-active { background: rgba(255, 152, 0, 0.2); color: #FF9800; }
.sw-kp-val.sw-storm { background: rgba(244, 67, 54, 0.2); color: #F44336; }
.sw-divider {
    border-top: 1px solid rgba(47, 138, 158, 0.15);
    margin: 4px 0;
}
.sw-timestamp {
    padding: 2px 10px 4px;
    font-size: 9px;
    color: #555;
    text-align: right;
}

/* ── Orion Telemetry (inside info-panel) ── */
.telem-met {
    color: #7dd3e8;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
    margin-left: auto;
}
.telem-body { padding: 6px 0; }
.telem-row {
    display: flex;
    padding: 0 12px;
}
.telem-row.telem-primary { margin-bottom: 2px; }
.telem-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 3px 0;
}
.telem-label {
    font-size: 8px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
    margin-bottom: 2px;
}
.telem-value {
    font-size: 13px;
    color: #ddd;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.telem-primary .telem-value {
    font-size: 14px;
    color: #fff;
}
.telem-sub {
    font-size: 9px;
    color: #555;
    line-height: 1;
}
.telem-phase {
    color: #35b1cd !important;
    font-family: 'Big Shoulders Display', sans-serif !important;
    font-size: 11px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Mission Phase Bar ── */
.mission-phase-bar {
    position: relative;
    height: 12px;
    background: rgba(10, 12, 16, 0.8);
    border-bottom: 1px solid rgba(47, 138, 158, 0.2);
}
.phase-segment {
    position: absolute;
    height: 100%;
    opacity: 0.4;
    transition: opacity 0.3s;
    cursor: pointer;
}
.phase-segment.phase-active {
    opacity: 1;
    box-shadow: 0 0 6px currentColor;
}
.phase-segment:hover { opacity: 0.8; }

/* ── Mission Phase Label ── */
.mission-phase-label {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: rgba(10, 12, 16, 0.9);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(47, 138, 158, 0.3);
    border-left: 3px solid #35b1cd;
    border-radius: 4px;
    padding: 6px 14px;
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 13px;
    color: #ddd;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    pointer-events: none;
}
.mission-phase-label i { font-size: 14px; color: #35b1cd; }
.phase-name { font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.phase-notes {
    font-family: 'Overpass', sans-serif;
    font-size: 10px;
    color: #888;
    max-width: 400px;
    white-space: normal;
    line-height: 1.3;
}

/* ── Planet Navigation ── */
.planet-nav {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    gap: 6px;
}
.planet-nav-btn {
    background: rgba(20, 24, 30, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(47, 138, 158, 0.4);
    border-radius: 4px;
    color: #35b1cd;
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s, border-color 0.15s;
}
.planet-nav-btn:hover {
    background: rgba(47, 138, 158, 0.25);
    border-color: rgba(47, 138, 158, 0.6);
}
.planet-nav-btn i { font-size: 14px; }
