/* ============================================================
   United Airlines Flight Tracker - Styles
   A premium, dark-themed flight tracking interface
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    /* United Airlines Brand Colors */
    --ua-navy: #002244;
    --ua-navy-deep: #001529;
    --ua-navy-light: #003366;
    --ua-blue: #0066CC;
    --ua-blue-light: #0088FF;
    --ua-blue-glow: #0099FF;
    --ua-gold: #FFBF00;
    --ua-gold-dim: #CC9900;
    --ua-gold-glow: rgba(255, 191, 0, 0.3);

    /* Neutral Palette */
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;

    /* Semantic Colors */
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    /* Glass Morphism */
    --glass-bg: rgba(0, 18, 41, 0.75);
    --glass-bg-heavy: rgba(0, 18, 41, 0.88);
    --glass-bg-light: rgba(0, 34, 68, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.12);
    --glass-blur: 20px;
    --glass-blur-heavy: 30px;

    /* Layout */
    --header-height: 60px;
    --stats-height: 56px;
    --sidebar-width: 380px;
    --detail-width: 400px;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow-blue: 0 0 20px rgba(0, 102, 204, 0.3);
    --shadow-glow-gold: 0 0 20px rgba(255, 191, 0, 0.2);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-primary);
    background: var(--ua-navy-deep);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Custom Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* ---------- Three.js Globe Canvas (background) ---------- */
#threeGlobeCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* ---------- Cesium Container ---------- */
#cesiumContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: transparent;
}

/* Make entire Cesium widget chain transparent so Three.js globe shows through */
#cesiumContainer .cesium-viewer,
#cesiumContainer .cesium-viewer-cesiumWidgetContainer,
#cesiumContainer .cesium-widget,
#cesiumContainer .cesium-widget canvas {
    background: transparent !important;
}

/* Override Cesium's default widget styles */
.cesium-viewer {
    font-family: var(--font-primary) !important;
}

.cesium-viewer-bottom {
    display: none !important;
}

.cesium-widget-credits {
    display: none !important;
}

/* ---------- Loading Overlay ---------- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: radial-gradient(ellipse at center, var(--ua-navy) 0%, var(--ua-navy-deep) 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 800ms ease, visibility 800ms ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: 12px;
    color: var(--white);
    margin-bottom: 40px;
    text-shadow: 0 0 40px rgba(0, 102, 204, 0.5);
}

.loading-spinner {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
}

.spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
}

.spinner-ring:nth-child(1) {
    border-top-color: var(--ua-blue);
    animation: spinnerRotate 1.2s linear infinite;
}

.spinner-ring:nth-child(2) {
    border-right-color: var(--ua-gold);
    animation: spinnerRotate 1.6s linear infinite reverse;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-bottom-color: var(--ua-blue-light);
    animation: spinnerRotate 1s linear infinite;
}

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

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 13px;
    color: var(--gray-400);
    letter-spacing: 0.5px;
}

/* ---------- Header Bar ---------- */
.header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--white);
    border-radius: 1px;
    transition: var(--transition-base);
}

.sidebar-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.sidebar-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.brand-text h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.brand-accent {
    color: var(--ua-gold);
    font-weight: 600;
}

.brand-tagline {
    font-size: 11px;
    color: var(--gray-400);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
}

.header-center {
    display: flex;
    align-items: center;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.25);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--success);
}

.connection-status.disconnected {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: var(--danger);
}

.connection-status.degraded {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

.connection-status.degraded .status-dot {
    background: var(--warning);
    box-shadow: 0 0 8px var(--warning);
}

.connection-status.disconnected .status-dot {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.header-btn svg {
    width: 16px;
    height: 16px;
}

/* ---------- Plane Controls (bottom-right) ---------- */
.plane-controls {
    position: fixed;
    bottom: calc(var(--stats-height) + 12px);
    right: 16px;
    z-index: 310;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

/* Color mode picker */
.plane-color-picker {
    display: flex;
    gap: 2px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 3px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.plane-color-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gray-400);
    padding: 4px 8px;
    font-size: 10px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.15s ease;
}

.plane-color-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--gray-200);
}

.plane-color-btn.active {
    background: rgba(0, 102, 204, 0.2);
    border-color: var(--ua-blue);
    color: var(--ua-blue-light);
}

.color-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.color-swatch.altitude-swatch {
    background: linear-gradient(135deg,
        rgb(255, 50, 50),
        rgb(255, 200, 40),
        rgb(40, 210, 210),
        rgb(160, 60, 255)
    );
}

/* Icon style picker row */
.plane-style-picker {
    display: flex;
    gap: 2px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 3px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.plane-style-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gray-400);
    transition: all 0.15s ease;
    padding: 0;
}

.plane-style-btn svg {
    width: 18px;
    height: 18px;
}

.plane-style-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--gray-200);
}

.plane-style-btn.active {
    background: rgba(0, 102, 204, 0.2);
    border-color: var(--ua-blue);
    color: var(--ua-blue-light);
}

/* Size slider row */
.plane-size-control {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.plane-size-icon {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    flex-shrink: 0;
}

.plane-size-control input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 90px;
    height: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.plane-size-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--ua-blue);
    border-radius: 50%;
    border: 2px solid var(--white);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.plane-size-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.plane-size-control input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--ua-blue);
    border-radius: 50%;
    border: 2px solid var(--white);
    cursor: pointer;
}

.plane-size-label {
    font-size: 11px;
    color: var(--gray-300);
    min-width: 28px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---------- Floating Map Layers Control ---------- */
.map-layers-floating {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    right: 12px;
    z-index: 310;
}

.map-layers-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    color: var(--gray-300);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.map-layers-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.map-layers-btn svg {
    width: 18px;
    height: 18px;
}

/* ---------- Layers Panel ---------- */
.layers-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    max-height: calc(100vh - var(--header-height) - 100px);
    overflow-y: auto;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    padding: 10px;
    box-shadow: var(--shadow-lg);
    z-index: 320;
}

.layers-panel.visible {
    display: block !important;
    animation: panelDropIn 180ms ease forwards;
}

.layer-toggle-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-300);
    padding: 6px 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.layer-toggle-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.layer-toggle-row input {
    accent-color: var(--ua-blue-light);
}

.layers-panel-section-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
    padding: 2px 4px 4px;
    font-weight: 600;
}

.map-style-toggle {
    display: flex;
    gap: 4px;
    padding: 0 4px 6px;
    margin-bottom: 2px;
}

.map-style-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 11px;
    color: var(--gray-300);
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 150ms ease;
}

.map-style-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.map-style-option:has(input:checked) {
    background: rgba(0, 102, 204, 0.15);
    border-color: var(--ua-blue);
    color: var(--ua-blue-light);
}

.map-style-option input {
    display: none;
}

.layers-panel-section-divider {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--glass-border);
}

/* ---------- Camera Mode Button States ---------- */
#cameraModeBtn.mode-chase {
    background: rgba(255, 191, 0, 0.12);
    border-color: rgba(255, 191, 0, 0.3);
    color: var(--ua-gold);
}

#cameraModeBtn.mode-chase:hover {
    background: rgba(255, 191, 0, 0.2);
    border-color: rgba(255, 191, 0, 0.4);
}

#cameraModeBtn.mode-cockpit {
    background: rgba(0, 136, 255, 0.15);
    border-color: rgba(0, 136, 255, 0.3);
    color: var(--ua-blue-light);
}

#cameraModeBtn.mode-cockpit:hover {
    background: rgba(0, 136, 255, 0.25);
    border-color: rgba(0, 136, 255, 0.4);
}

/* ---------- Notification Bell ---------- */
.notification-bell-btn {
    position: relative;
    padding: 8px 12px;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--danger);
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    animation: badgePop 300ms var(--transition-spring);
}

@keyframes badgePop {
    0% { transform: scale(0); }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ---------- Notification Panel ---------- */
.notification-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 80px;
    width: 360px;
    max-height: 400px;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 300;
    overflow: hidden;
}

.notification-panel.visible {
    display: block !important;
    animation: panelDropIn 250ms ease forwards;
}

@keyframes panelDropIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.notification-panel-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.3px;
}

.notification-list {
    overflow-y: auto;
    max-height: 350px;
    padding: 8px;
}

.alert-rule-builder {
    padding: 8px;
    border-bottom: 1px solid var(--glass-border);
}

.alert-rule-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.alert-rule-select,
.alert-rule-input,
.alert-rule-add-btn {
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border-light);
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray-200);
    font-size: 11px;
    font-family: var(--font-primary);
}

.alert-rule-select,
.alert-rule-input {
    padding: 0 8px;
}

.alert-rule-select {
    min-width: 116px;
}

.alert-rule-input {
    flex: 1;
    min-width: 110px;
}

.alert-rule-add-btn {
    padding: 0 10px;
    font-weight: 700;
    cursor: pointer;
}

.alert-rule-add-btn:hover {
    background: rgba(0, 102, 204, 0.2);
    border-color: rgba(0, 136, 255, 0.3);
}

.alert-rule-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 88px;
    overflow-y: auto;
}

.alert-rule-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    font-size: 11px;
    color: var(--gray-300);
}

.alert-rule-remove {
    border: none;
    background: none;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.alert-rule-remove:hover {
    color: var(--danger);
}

.alert-rule-empty {
    font-size: 11px;
    color: var(--gray-600);
    padding: 4px 2px;
}

.notification-empty {
    text-align: center;
    padding: 32px 16px;
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

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

.notification-item-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 204, 0.15);
    border-radius: var(--radius-sm);
    color: var(--ua-blue-light);
}

.notification-item-icon svg {
    width: 16px;
    height: 16px;
}

.notification-item-icon.alert {
    background: rgba(255, 191, 0, 0.12);
    color: var(--ua-gold);
}

.notification-item-body {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item-detail {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 400;
    line-height: 1.4;
}

.notification-item-time {
    font-size: 10px;
    color: var(--gray-600);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.header-time {
    text-align: right;
    padding-left: 16px;
    border-left: 1px solid var(--glass-border);
    cursor: pointer;
    position: relative;
    user-select: none;
    border-radius: var(--radius-sm);
    padding: 4px 8px 4px 16px;
    transition: var(--transition-fast);
}

.header-time:hover {
    background: rgba(255, 255, 255, 0.06);
}

.time-label {
    font-size: 10px;
    color: var(--gray-500);
    letter-spacing: 1.5px;
    font-weight: 600;
}

.time-value {
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ua-blue-light);
}

.timezone-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    padding: 6px 0;
    box-shadow: var(--shadow-lg);
    z-index: 350;
}

.timezone-panel.visible {
    display: block !important;
    animation: panelDropIn 180ms ease forwards;
}

.tz-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 14px;
    font-size: 12px;
    color: var(--gray-300);
    cursor: pointer;
    transition: background 100ms ease;
}

.tz-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.tz-option.active {
    color: var(--ua-blue-light);
    background: rgba(0, 102, 204, 0.1);
}

.tz-name {
    flex: 1;
    min-width: 0;
}

.tz-preview {
    font-variant-numeric: tabular-nums;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    margin-left: 8px;
    white-space: nowrap;
}

.tz-option.active .tz-preview {
    color: var(--ua-blue);
}

.tz-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 4px 0;
}

.tz-section-label {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    padding: 4px 14px 2px;
    font-weight: 600;
}

/* ---------- Reconnect Banner ---------- */
.reconnect-banner {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    z-index: 150;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(245, 158, 11, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}

.reconnect-banner.visible {
    display: flex !important;
    animation: bannerSlideDown 400ms ease forwards;
}

.reconnect-banner.hidden {
    display: none !important;
}

@keyframes bannerSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.reconnect-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(245, 158, 11, 0.3);
    border-top-color: var(--warning);
    border-radius: 50%;
    animation: spinnerRotate 0.8s linear infinite;
}

.reconnect-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--warning);
    letter-spacing: 0.3px;
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: var(--stats-height);
    width: var(--sidebar-width);
    z-index: 90;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    transform: translateX(0);
    transition: transform var(--transition-slow);
    box-shadow: var(--shadow-xl);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Collapse button inside sidebar header */
.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition-fast);
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

/* Expand button visible when sidebar is collapsed */
.sidebar-expand-btn {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    left: 68px;
    z-index: 96;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--gray-300);
    cursor: pointer;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.sidebar-expand-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--glass-border);
}

.sidebar-header h2 {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.sidebar-header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- Sort Select Dropdown ---------- */
.sort-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 5px 28px 5px 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-sm);
    color: var(--gray-300);
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.sort-select:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.sort-select:focus {
    border-color: var(--ua-blue);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

.sort-select option {
    background: var(--ua-navy-deep);
    color: var(--white);
    font-family: var(--font-primary);
    padding: 4px 8px;
}

.flight-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    background: var(--ua-blue);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

.sidebar-search {
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--gray-500);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 36px 10px 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 13px;
    outline: none;
    transition: var(--transition-fast);
}

.search-input::placeholder {
    color: var(--gray-600);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ua-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition-fast);
}

.clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.clear-search-btn svg {
    width: 14px;
    height: 14px;
}

/* Sidebar Filters */
.sidebar-filters {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--glass-border);
    overflow-x: auto;
    flex-wrap: nowrap;
}

.filter-chip {
    flex-shrink: 0;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--gray-400);
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: uppercase;
}

.filter-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.filter-chip.active {
    background: var(--ua-blue);
    border-color: var(--ua-blue);
    color: var(--white);
}

.filter-divider {
    flex-shrink: 0;
    width: 1px;
    height: 20px;
    align-self: center;
    background: var(--glass-border-light);
    margin: 0 2px;
}

/* Flight List */
.flight-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* ---------- Sidebar Footer & Admin Panel ---------- */
.sidebar-footer {
    border-top: 1px solid var(--glass-border);
    padding: 8px 12px;
    flex-shrink: 0;
}

.admin-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--gray-400);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.admin-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border-color: var(--glass-border-light);
}

.admin-toggle-btn.active {
    background: rgba(0, 102, 204, 0.12);
    color: var(--ua-blue-light);
    border-color: rgba(0, 102, 204, 0.25);
}

.admin-toggle-btn svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.admin-toggle-btn.active svg {
    transform: rotate(90deg);
}

.admin-panel {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.admin-section {
    margin-bottom: 20px;
}

.admin-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray-500);
    padding: 0 4px 8px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 10px;
}

.admin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 8px;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.admin-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

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

.admin-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
}

.admin-item-desc {
    font-size: 11px;
    color: var(--gray-500);
}

.admin-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 102, 204, 0.12);
    border: 1px solid rgba(0, 102, 204, 0.25);
    border-radius: var(--radius-sm);
    color: var(--ua-blue-light);
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-action-btn:hover {
    background: rgba(0, 102, 204, 0.2);
    border-color: rgba(0, 102, 204, 0.4);
}

.admin-action-btn:active {
    transform: scale(0.96);
}

.admin-action-btn.refreshing svg {
    animation: fleetRefreshSpin 0.8s linear infinite;
}

.admin-action-btn.refreshing {
    pointer-events: none;
    opacity: 0.7;
}

.admin-action-btn.admin-action-danger {
    background: rgba(204, 51, 51, 0.1);
    border-color: rgba(204, 51, 51, 0.25);
    color: #f87171;
}

.admin-action-btn.admin-action-danger:hover {
    background: rgba(204, 51, 51, 0.2);
    border-color: rgba(204, 51, 51, 0.4);
}

.admin-about {
    padding: 4px 8px;
}

.admin-about-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.admin-about-row span:first-child {
    color: var(--gray-500);
}

.admin-about-row span:last-child {
    color: var(--gray-300);
    font-weight: 600;
}

/* Admin: Status Grid (2x2 service health dots) */
.admin-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 8px;
}

.admin-status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--gray-400);
}

.admin-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-600);
    flex-shrink: 0;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.admin-status-dot.ok {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.admin-status-dot.degraded {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.admin-status-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

/* Admin: Freshness Grid (2-col cache age) */
.admin-freshness-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 8px;
}

.admin-freshness-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 6px;
    font-size: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
}

.admin-freshness-item span:first-child {
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-freshness-age {
    color: var(--gray-300);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.admin-freshness-age.stale {
    color: #f59e0b;
}

.admin-freshness-age.expired {
    color: #ef4444;
}

/* Admin: Error Log */
.admin-error-log {
    max-height: 160px;
    overflow-y: auto;
    padding: 6px 8px;
    font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
    font-size: 10px;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    margin: 0 8px 4px;
}

.admin-error-log::-webkit-scrollbar {
    width: 4px;
}

.admin-error-log::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.admin-error-entry {
    display: flex;
    gap: 6px;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--gray-400);
}

.admin-error-ts {
    color: var(--gray-600);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.admin-error-msg {
    word-break: break-word;
}

/* Admin: Toggle Switch (iOS-style) */
.admin-toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.admin-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.admin-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-700);
    border-radius: 20px;
    transition: background var(--transition-fast);
}

.admin-toggle-slider::before {
    content: "";
    position: absolute;
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.admin-toggle-switch input:checked + .admin-toggle-slider {
    background: var(--ua-blue);
}

.admin-toggle-switch input:checked + .admin-toggle-slider::before {
    transform: translateX(16px);
}

.flight-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.flight-entry::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--ua-blue);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.flight-entry:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--glass-border-light);
}

.flight-entry:hover::before {
    opacity: 1;
}

.flight-entry.selected {
    background: rgba(0, 102, 204, 0.15);
    border-color: rgba(0, 102, 204, 0.3);
}

.flight-entry.selected::before {
    opacity: 1;
    background: var(--ua-gold);
}

.flight-entry-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 204, 0.15);
    border-radius: var(--radius-sm);
    color: var(--ua-blue-light);
}

.flight-entry-icon svg {
    width: 18px;
    height: 18px;
    transform: rotate(var(--heading, 0deg));
    transition: transform var(--transition-base);
}

.flight-entry-icon--img {
    width: 56px;
    height: 36px;
    background: transparent;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.flight-entry-icon--img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

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

.flight-entry-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.flight-entry-callsign {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.3px;
}

.flight-entry-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    background: rgba(255, 191, 0, 0.12);
    border: 1px solid rgba(255, 191, 0, 0.2);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    color: var(--ua-gold);
    letter-spacing: 0.5px;
}

.flight-entry-type-badge.widebody {
    background: rgba(0, 136, 255, 0.12);
    border-color: rgba(0, 136, 255, 0.25);
    color: var(--ua-blue-light);
}

.flight-entry-type-badge.regional {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--gray-400);
}

.flight-entry-route {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flight-entry-route .route-arrow {
    color: var(--ua-gold);
    margin: 0 4px;
}

.flight-entry-stats {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.flight-entry-stats span {
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Empty state */
.flight-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.flight-list-empty svg {
    width: 48px;
    height: 48px;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.flight-list-empty .empty-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-400);
    margin-bottom: 4px;
}

.flight-list-empty .empty-subtitle {
    font-size: 13px;
    color: var(--gray-600);
}

/* ---------- Flight Detail Panel ---------- */
.flight-detail {
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: var(--stats-height);
    width: var(--detail-width);
    z-index: 90;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border-left: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    padding: 24px 20px;
    transform: translateX(100%);
    transition: transform var(--transition-slow);
}

.flight-detail.open {
    transform: translateX(0);
}

.close-detail-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition-fast);
}

.close-detail-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.close-detail-btn svg {
    width: 16px;
    height: 16px;
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-flight-number {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.5px;
    color: var(--white);
}

.detail-aircraft-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(255, 191, 0, 0.12);
    border: 1px solid rgba(255, 191, 0, 0.25);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    color: var(--ua-gold);
    letter-spacing: 0.5px;
}

/* Aircraft image */
.detail-aircraft-image {
    text-align: center;
    margin-bottom: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--glass-border);
}

.detail-aircraft-image img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.detail-aircraft-model-name {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Route display */
.detail-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-bottom: 16px;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.route-endpoint {
    text-align: center;
    flex-shrink: 0;
}

.route-code {
    display: block;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--white);
}

.route-label {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
    font-weight: 500;
}

/* Full airport name below the IATA code */
.route-full-name {
    display: block;
    font-size: 10px;
    color: var(--gray-400);
    font-weight: 400;
    margin-top: 4px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.route-line {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 16px;
}

.route-line-track {
    width: 100%;
    height: 2px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1px;
    position: relative;
}

.route-line-track::before,
.route-line-track::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translateY(-50%);
}

.route-line-track::before {
    left: 0;
    background: var(--ua-blue-light);
}

.route-line-track::after {
    right: 0;
    background: var(--ua-blue-light);
}

.route-plane-icon {
    position: absolute;
    width: 20px;
    height: 20px;
    color: var(--ua-gold);
    filter: drop-shadow(0 0 4px rgba(255, 191, 0, 0.5));
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
    transition: left var(--transition-slow);
}

/* Progress bar */
.detail-progress {
    margin-bottom: 20px;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--ua-blue), var(--ua-gold));
    border-radius: 2px;
    transition: width var(--transition-slow);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 8px;
    height: 8px;
    background: var(--ua-gold);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--ua-gold);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
}

.progress-time-detail {
    font-size: 10px;
    color: var(--gray-400);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.2px;
}

.detail-history {
    margin-bottom: 16px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.detail-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.detail-history-title {
    font-size: 11px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--gray-400);
    font-weight: 700;
}

.detail-history-window {
    font-size: 11px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border-light);
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray-200);
    height: 28px;
    padding: 0 8px;
}

.detail-history-slider {
    width: 100%;
    accent-color: var(--ua-gold);
}

.detail-history-meta {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--gray-400);
}

.detail-history-play {
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-sm);
    height: 26px;
    min-width: 54px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--gray-200);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.detail-history-play:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Detail grid */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.detail-card {
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.detail-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--glass-border-light);
}

.detail-card-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.detail-card-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    margin-bottom: 2px;
}

.detail-card-unit {
    font-size: 10px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Detail extra info */
.detail-extra {
    border-top: 1px solid var(--glass-border);
    padding-top: 16px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.detail-row-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.detail-row-value {
    font-size: 13px;
    color: var(--white);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ---------- Detail Action Buttons ---------- */
.detail-actions {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

/* Follow button */
.follow-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: linear-gradient(135deg, var(--ua-blue), var(--ua-navy-light));
    border: 1px solid rgba(0, 102, 204, 0.3);
    border-radius: var(--radius-md);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.follow-btn:hover {
    background: linear-gradient(135deg, var(--ua-blue-light), var(--ua-blue));
    box-shadow: var(--shadow-glow-blue);
    transform: translateY(-1px);
}

.follow-btn:active {
    transform: translateY(0);
}

.follow-btn.active {
    background: linear-gradient(135deg, var(--ua-gold-dim), var(--ua-gold));
    color: var(--ua-navy-deep);
    border-color: rgba(255, 191, 0, 0.4);
    box-shadow: var(--shadow-glow-gold);
}

.follow-btn svg {
    width: 18px;
    height: 18px;
}

/* Watch Flight button */
.watch-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    color: var(--gray-300);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.watch-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
    transform: translateY(-1px);
}

.watch-btn:active {
    transform: translateY(0);
}

.watch-btn.active {
    background: rgba(255, 191, 0, 0.12);
    border-color: rgba(255, 191, 0, 0.3);
    color: var(--ua-gold);
    box-shadow: 0 0 12px rgba(255, 191, 0, 0.1);
}

.watch-btn svg {
    width: 16px;
    height: 16px;
}

/* ---------- Stats Dashboard Modal ---------- */
.stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.stats-modal.open {
    display: flex !important;
    animation: fadeIn var(--transition-base) ease forwards;
}

.stats-modal.hidden {
    display: none !important;
}

.stats-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 10, 25, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.stats-modal-content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(0, 102, 204, 0.1);
    overflow-y: auto;
    padding: 32px;
    animation: modalSlideUp 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(40px) scale(0.96);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.stats-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.stats-modal-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--white);
}

.stats-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition-fast);
}

.stats-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.stats-modal-close svg {
    width: 18px;
    height: 18px;
}

.stats-modal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stats-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition-fast);
}

.stats-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--glass-border-light);
}

.stats-card-chart {
    grid-column: span 1;
}

.stats-card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-300);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.stats-chart-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.stats-chart-wrapper canvas {
    max-width: 100%;
    height: auto;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}

.stats-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

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

.stats-list-item-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-300);
}

.stats-list-item-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    font-variant-numeric: tabular-nums;
}

.stats-range-display {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}

.stats-range-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.stats-range-fill {
    height: 100%;
    background: linear-gradient(to right, var(--ua-blue), var(--ua-gold));
    border-radius: 4px;
    transition: width var(--transition-slow);
}

.stats-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
}

.stats-range-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    font-variant-numeric: tabular-nums;
    text-align: center;
    margin-bottom: 4px;
}

.stats-range-label {
    font-size: 11px;
    color: var(--gray-500);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ---------- Stats Dynamic Content ---------- */
.stats-type-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    font-size: 13px;
    transition: background var(--transition-fast);
}

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

.stats-type-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.stats-type-code {
    font-weight: 700;
    color: var(--white);
    flex: 1;
}

.stats-type-count {
    font-weight: 600;
    color: var(--gray-300);
    font-variant-numeric: tabular-nums;
}

.stats-type-pct {
    font-weight: 500;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
    min-width: 45px;
    text-align: right;
}

.stats-route-section h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--ua-gold);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    margin-top: 12px;
}

.stats-route-section h4:first-child {
    margin-top: 0;
}

.stats-route-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}

.stats-route-code {
    font-weight: 700;
    font-size: 14px;
    color: var(--white);
}

.stats-route-count {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
}

.stats-status-item {
    margin-bottom: 12px;
}

.stats-status-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.stats-status-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-300);
    text-transform: capitalize;
}

.stats-status-count {
    font-size: 12px;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

.stats-status-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.stats-status-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--ua-blue), var(--ua-gold));
    border-radius: 3px;
    transition: width var(--transition-slow);
}

.stat-range-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

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

.stat-range-label {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-range-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    font-variant-numeric: tabular-nums;
}

/* ---------- Bottom Stats Bar ---------- */
.stats-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--stats-height);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 24px;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.3);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 24px;
}

.stat-divider {
    width: 1px;
    height: 28px;
    background: var(--glass-border);
}

.stat-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 102, 204, 0.15);
    border-radius: var(--radius-sm);
    color: var(--ua-blue-light);
}

.stat-icon svg {
    width: 16px;
    height: 16px;
}

.stat-icon.airborne {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.stat-icon.altitude {
    background: rgba(255, 191, 0, 0.12);
    color: var(--ua-gold);
}

.stat-icon.speed {
    background: rgba(139, 92, 246, 0.12);
    color: #A78BFA;
}

.stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--white);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    color: var(--gray-500);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ---------- Flight Tooltip ---------- */
.flight-tooltip {
    position: fixed;
    z-index: 200;
    padding: 10px 14px;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    transition: opacity var(--transition-fast);
    white-space: nowrap;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.tooltip-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.tooltip-callsign {
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
}

.tooltip-route {
    font-size: 12px;
    color: var(--ua-gold);
    font-weight: 600;
    margin-bottom: 4px;
}

.tooltip-details {
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.tooltip-sep {
    color: var(--gray-600);
}

.tooltip-progress {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 6px;
}

.tooltip-progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 3px;
}

.tooltip-progress-fill {
    height: 100%;
    background: linear-gradient(to right, var(--ua-blue), var(--ua-blue-light));
    border-radius: 2px;
    width: 0%;
}

.tooltip-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.5px;
}

/* ---------- Altitude Legend (inside .plane-controls) ---------- */
.altitude-legend {
    padding: 8px 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.altitude-legend.hidden {
    display: none;
}

.altitude-legend-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 1px;
    margin-bottom: 4px;
    text-align: center;
}

.altitude-legend-bar {
    height: 6px;
    border-radius: 3px;
    width: 200px;
    background: linear-gradient(to right,
        rgb(255, 50, 50) 0%,
        rgb(255, 120, 30) 11%,
        rgb(255, 200, 40) 22%,
        rgb(100, 220, 60) 33%,
        rgb(40, 210, 210) 50%,
        rgb(70, 100, 255) 67%,
        rgb(160, 60, 255) 84%,
        rgb(200, 50, 220) 100%
    );
}

.altitude-legend-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    font-weight: 600;
    color: var(--gray-500);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

/* ---------- Toast Notification Container ---------- */
.toast-container {
    position: fixed;
    bottom: calc(var(--stats-height) + 16px);
    right: 20px;
    z-index: 400;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
    pointer-events: none;
    max-width: 380px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toastSlideIn 350ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    border-left: 3px solid var(--info);
}

.toast.toast-alert {
    border-left-color: var(--ua-gold);
}

.toast.toast-success {
    border-left-color: var(--success);
}

.toast.toast-error {
    border-left-color: var(--danger);
}

.toast.toast-dismiss {
    animation: toastSlideOut 300ms ease forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--info);
    margin-top: 1px;
}

.toast-alert .toast-icon {
    color: var(--ua-gold);
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-icon svg {
    width: 100%;
    height: 100%;
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 400;
    line-height: 1.4;
}

.toast-close {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    transition: color var(--transition-fast);
    padding: 0;
}

.toast-close:hover {
    color: var(--gray-300);
}

.toast-close svg {
    width: 14px;
    height: 14px;
}

/* ---------- Fleet Details Modal ---------- */
.fleet-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.fleet-modal.open {
    display: flex !important;
    animation: fadeIn var(--transition-base) ease forwards;
}

.fleet-modal.hidden {
    display: none !important;
}

.fleet-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 10, 25, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.fleet-modal-content {
    position: relative;
    width: 94%;
    max-width: 1300px;
    max-height: 90vh;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(0, 102, 204, 0.1);
    overflow-y: auto;
    padding: 32px;
    animation: modalSlideUp 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.fleet-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.fleet-header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.fleet-modal-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--white);
}

.fleet-last-updated {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-500);
    white-space: nowrap;
}

.fleet-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Refresh Button */
.fleet-refresh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-sm);
    color: var(--gray-300);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.fleet-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.fleet-refresh-btn svg {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.fleet-refresh-btn.refreshing svg {
    animation: fleetRefreshSpin 0.8s linear infinite;
}

.fleet-refresh-btn.refreshing {
    pointer-events: none;
    opacity: 0.7;
}

@keyframes fleetRefreshSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Fleet Update Badge on header button */
.fleet-update-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 10px;
    height: 10px;
    background: var(--ua-gold);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(255, 191, 0, 0.5);
    animation: badgePop 300ms var(--transition-spring);
}

#fleetBtn {
    position: relative;
}

.fleet-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition-fast);
}

.fleet-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.fleet-modal-close svg {
    width: 18px;
    height: 18px;
}

/* Fleet Summary Bar */
.fleet-summary-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.fleet-summary-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition-fast);
}

.fleet-summary-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--glass-border-light);
}

.fleet-analytics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.fleet-analytics-card {
    padding: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.fleet-analytics-card h3 {
    font-size: 12px;
    color: var(--gray-300);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fleet-analytics-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 110px;
    overflow-y: auto;
}

.fleet-analytics-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-300);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
}

.fleet-analytics-empty {
    font-size: 11px;
    color: var(--gray-600);
}

.fleet-summary-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.fleet-summary-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* Fleet Controls (tabs + search) */
.fleet-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.fleet-tabs {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    overflow-x: auto;
}

.fleet-tab {
    flex-shrink: 0;
    padding: 7px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--gray-400);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.fleet-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.fleet-tab.active {
    background: var(--ua-blue);
    border-color: var(--ua-blue);
    color: var(--white);
}

.fleet-tab[data-fleet-filter="express"].active {
    background: linear-gradient(135deg, var(--ua-blue), rgba(255, 191, 0, 0.35));
    border-color: var(--ua-gold, #FFBF00);
}

.fleet-search {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
    align-items: center;
}

.fleet-search .search-icon {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: var(--gray-500);
    pointer-events: none;
}

.fleet-search-input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-md);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 13px;
    outline: none;
    transition: var(--transition-fast);
}

.fleet-search-input::placeholder {
    color: var(--gray-600);
}

.fleet-search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ua-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* Fleet Grid */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.fleet-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    font-size: 15px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Fleet Card Image */
.fleet-card-image {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fleet-card-image img {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
}

/* Fleet Card */
.fleet-card {
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fleet-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--glass-border-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.fleet-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.fleet-card-type {
    font-size: 16px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.2px;
}

.fleet-card-reg {
    font-size: 13px;
    font-weight: 700;
    color: var(--ua-gold);
    letter-spacing: 0.5px;
}

.fleet-card-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.fleet-card-status.status-active {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--success);
}

.fleet-card-status.status-stored {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--warning);
}

.fleet-card-status.status-parked {
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.25);
    color: #EAB308;
}

.fleet-card-status.status-other {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--gray-400);
}

.fleet-card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11px;
    color: var(--gray-400);
    font-weight: 500;
}

.fleet-card-info span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.fleet-card-livery {
    font-size: 12px;
    color: var(--gray-300);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Fleet Type Card (Type Overview) */
.fleet-type-card {
    padding: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
}

.fleet-type-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ua-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.fleet-type-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.3px;
}

.fleet-type-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.fleet-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.fleet-type-badge-total {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--gray-300);
}

.fleet-type-badge-active {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--success);
}

.fleet-type-badge-stored {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--warning);
}

.fleet-type-age {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
}

/* Fleet Back Button */
.fleet-back-btn {
    grid-column: 1 / -1;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    color: var(--ua-blue-light, var(--ua-blue));
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    text-align: left;
}

.fleet-back-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ua-blue);
}

/* Express Fleet Styles */
.fleet-type-card-express {
    border-left: 3px solid var(--ua-gold, #FFBF00);
}

.express-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, rgba(255, 191, 0, 0.15), rgba(255, 191, 0, 0.08));
    border: 1px solid rgba(255, 191, 0, 0.3);
    border-radius: var(--radius-full);
    color: var(--ua-gold, #FFBF00);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.express-badge-sm {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    background: rgba(255, 191, 0, 0.12);
    border: 1px solid rgba(255, 191, 0, 0.25);
    border-radius: var(--radius-full);
    color: var(--ua-gold, #FFBF00);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    margin-left: 6px;
    vertical-align: middle;
}

.express-fleet-header {
    grid-column: 1 / -1;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(0, 34, 68, 0.6), rgba(0, 34, 68, 0.3));
    border: 1px solid rgba(255, 191, 0, 0.2);
    border-radius: var(--radius-lg);
    margin-bottom: 4px;
}

.express-fleet-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.express-subtitle {
    font-size: 13px;
    color: var(--gray-400);
    font-weight: 400;
}

.fleet-type-operators {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: 500;
}

.express-type-summary {
    grid-column: 1 / -1;
    padding: 20px;
    background: linear-gradient(135deg, rgba(0, 34, 68, 0.5), rgba(0, 34, 68, 0.25));
    border: 1px solid rgba(255, 191, 0, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.express-type-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.express-type-header h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--white);
    margin: 0;
}

.express-type-note {
    font-size: 13px;
    color: var(--gray-400);
    font-style: italic;
}

.express-type-details {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.express-operator-card {
    border-left: 3px solid var(--ua-gold, #FFBF00);
}

/* Seat Badges */
.seat-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.seat-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.seat-badge-J {
    background: rgba(255, 191, 0, 0.12);
    border: 1px solid rgba(255, 191, 0, 0.25);
    color: var(--ua-gold);
}

.seat-badge-F {
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    color: var(--info);
}

.seat-badge-PP {
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.25);
    color: #14B8A6;
}

.seat-badge-EP {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--success);
}

.seat-badge-Y {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--gray-400);
}

/* Amenity Icons */
.amenity-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.amenity-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-400);
    transition: var(--transition-fast);
}

.amenity-icon.available {
    color: var(--ua-blue-light);
    border-color: rgba(0, 136, 255, 0.2);
    background: rgba(0, 136, 255, 0.08);
}

.amenity-icon svg {
    width: 12px;
    height: 12px;
}

/* ---------- Aircraft Marker Pulse ---------- */
@keyframes markerPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.8);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* ---------- Hub Detail Modal ---------- */
.hub-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.hub-modal.open {
    display: flex !important;
    animation: fadeIn var(--transition-base) ease forwards;
}

.hub-modal.hidden {
    display: none !important;
}

.hub-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 10, 25, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.hub-modal-content {
    position: relative;
    width: 92%;
    max-width: 1000px;
    max-height: 90vh;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(0, 102, 204, 0.1);
    overflow-y: auto;
    padding: 32px;
    animation: modalSlideUp 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.hub-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.hub-header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.hub-modal-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--white);
}

.hub-subtitle {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-400);
}

.hub-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition-fast);
}

.hub-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.hub-modal-close svg {
    width: 18px;
    height: 18px;
}

/* Hub Summary Bar */
.hub-summary-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.hub-summary-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    text-align: center;
    transition: var(--transition-fast);
}

.hub-summary-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--glass-border-light);
}

.hub-summary-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--white);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.hub-summary-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

.hub-summary-emoji {
    font-size: 26px;
    line-height: 1;
    margin-bottom: 6px;
    display: block;
}

/* Hub METAR Card */
.hub-metar-card {
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.hub-metar-card:empty {
    display: none;
}

.hub-metar-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-300);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hub-metar-raw {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: var(--ua-gold);
    background: rgba(0, 0, 0, 0.25);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    word-break: break-all;
    line-height: 1.5;
}

.hub-metar-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hub-metar-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-metar-field-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hub-metar-field-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    font-variant-numeric: tabular-nums;
}

/* Hub Flights Grid */
.hub-flights-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.hub-flights-col h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-200);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hub-col-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--ua-blue-light);
    background: rgba(0, 136, 255, 0.12);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.hub-flight-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hub-flight-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: 12px;
}

.hub-flight-row:hover {
    background: rgba(0, 102, 204, 0.15);
}

.hub-flight-number {
    font-weight: 700;
    color: var(--white);
    min-width: 60px;
}

.hub-flight-route {
    color: var(--gray-400);
    font-weight: 500;
    min-width: 40px;
}

.hub-flight-type {
    color: var(--ua-gold);
    font-weight: 600;
    min-width: 40px;
}

.hub-flight-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
    min-width: 65px;
}

.hub-time-actual {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-200);
}

.hub-time-sched {
    font-size: 10px;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: line-through;
}

.hub-flight-alt {
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
    margin-left: auto;
    min-width: 55px;
    text-align: right;
}

/* Status badges */
.hub-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: capitalize;
    white-space: nowrap;
}

.hub-status-badge.status-climbing {
    background: rgba(0, 136, 255, 0.12);
    color: var(--ua-blue-light);
}

.hub-status-badge.status-en-route {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.hub-status-badge.status-descending {
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning);
}

.hub-status-badge.status-on-ground {
    background: rgba(148, 163, 184, 0.12);
    color: var(--gray-400);
}

.hub-status-badge.status-taxiing {
    background: rgba(148, 163, 184, 0.12);
    color: var(--gray-400);
}

/* Hub Aircraft Breakdown */
.hub-aircraft-breakdown {
    padding: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.hub-aircraft-breakdown:empty {
    display: none;
}

.hub-aircraft-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-300);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.hub-aircraft-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.hub-aircraft-bar-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    min-width: 50px;
}

.hub-aircraft-bar-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400);
    min-width: 24px;
    text-align: right;
}

.hub-aircraft-bar-track {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    overflow: hidden;
}

.hub-aircraft-bar-fill {
    height: 100%;
    background: linear-gradient(to right, var(--ua-blue), var(--ua-gold));
    border-radius: 4px;
    transition: width var(--transition-slow);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    :root {
        --sidebar-width: 320px;
        --detail-width: 360px;
    }

    .stats-modal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fleet-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 900px) {
    :root {
        --sidebar-width: 300px;
        --detail-width: 100%;
    }

    .header-center {
        display: none;
    }

    .brand-tagline {
        display: none;
    }

    .stat-item {
        padding: 0 12px;
    }

    .stat-label {
        display: none;
    }

    .flight-detail {
        width: 100%;
        top: var(--header-height);
    }

    .stats-modal-content {
        width: 95%;
        padding: 20px;
    }

    .stats-modal-grid {
        grid-template-columns: 1fr;
    }

    .notification-panel {
        right: 16px;
        width: 320px;
    }

    .fleet-modal-content {
        width: 96%;
        padding: 20px;
    }

    .fleet-summary-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .fleet-analytics-grid {
        grid-template-columns: 1fr;
    }

    .fleet-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .fleet-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hub-modal-content {
        width: 96%;
        padding: 20px;
    }

    .hub-flights-grid {
        grid-template-columns: 1fr;
    }

    .hub-summary-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    :root {
        --sidebar-width: 100%;
        --header-height: 52px;
        --stats-height: 48px;
    }

    .header-right .header-btn span {
        display: none;
    }

    .header-time {
        display: none;
    }

    .brand-text h1 {
        font-size: 16px;
    }

    .sidebar {
        width: 100%;
    }

    .notification-panel {
        right: 8px;
        left: 8px;
        width: auto;
    }

    .map-layers-floating {
        right: 8px;
    }

    .plane-controls {
        right: 8px;
        bottom: calc(var(--stats-height) + 8px);
    }

    .layers-panel {
        right: 0;
        left: auto;
        width: 220px;
    }

    .toast-container {
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .stats-modal-content {
        width: 98%;
        padding: 16px;
        max-height: 90vh;
    }

    .fleet-modal-content {
        width: 98%;
        padding: 16px;
        max-height: 94vh;
    }

    .fleet-summary-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .fleet-summary-value {
        font-size: 22px;
    }

    .fleet-grid {
        grid-template-columns: 1fr;
    }

    .hub-modal-content {
        width: 98%;
        padding: 16px;
    }

    .hub-flights-grid {
        grid-template-columns: 1fr;
    }

    .hub-summary-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .fleet-tabs {
        overflow-x: auto;
        width: 100%;
    }
}

/* ---------- Utility Animations ---------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.animate-fade-in {
    animation: fadeIn var(--transition-base) ease forwards;
}

.animate-slide-right {
    animation: slideInRight var(--transition-base) ease forwards;
}

.animate-slide-up {
    animation: slideInUp var(--transition-base) ease forwards;
}

/* ============================================================
   IRROPS Monitor Modal
   ============================================================ */

.irrops-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.irrops-modal.open {
    display: flex !important;
    animation: fadeIn var(--transition-base) ease forwards;
}

.irrops-modal.hidden {
    display: none !important;
}

.irrops-modal-backdrop {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 10, 25, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.irrops-modal-content {
    position: relative;
    width: 94%;
    max-width: 1100px;
    max-height: 90vh;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(0, 102, 204, 0.1);
    overflow-y: auto;
    padding: 32px;
    animation: modalSlideUp 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.irrops-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.irrops-modal-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--white);
}

.irrops-modal-close {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition-fast);
}

.irrops-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.irrops-modal-close svg {
    width: 18px; height: 18px;
}

/* System OTP Banner */
.irrops-system-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.irrops-system-otp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.irrops-otp-value {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--success);
}

.irrops-otp-value.warn { color: var(--warning); }
.irrops-otp-value.critical { color: var(--danger); }

.irrops-otp-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
}

.irrops-system-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--gray-300);
}

.irrops-system-stats span {
    white-space: nowrap;
}

/* Hub health grid */
.irrops-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.irrops-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--gray-500);
}

.irrops-hub-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.irrops-hub-card.clickable {
    cursor: pointer;
}

.irrops-hub-card.clickable:hover {
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.irrops-hub-card.status-green { border-left: 3px solid var(--success); }
.irrops-hub-card.status-yellow { border-left: 3px solid var(--warning); }
.irrops-hub-card.status-red { border-left: 3px solid var(--danger); }

.irrops-hub-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.irrops-hub-code {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
}

.irrops-hub-name {
    font-size: 11px;
    color: var(--gray-400);
}

.irrops-hub-otp {
    font-size: 24px;
    font-weight: 800;
}

.irrops-hub-otp.green { color: var(--success); }
.irrops-hub-otp.yellow { color: var(--warning); }
.irrops-hub-otp.red { color: var(--danger); }

.irrops-hub-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

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

.irrops-hub-bar-fill.green { background: var(--success); }
.irrops-hub-bar-fill.yellow { background: var(--warning); }
.irrops-hub-bar-fill.red { background: var(--danger); }

.irrops-hub-stats {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--gray-400);
}

.irrops-hub-stats span {
    display: flex;
    gap: 4px;
}

/* Hub card header-left: icon + hub code */
.irrops-hub-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hub landmark icon wrapper */
.irrops-hub-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    transition: background var(--transition-fast);
}
.irrops-hub-card.clickable:hover .irrops-hub-icon-wrap {
    background: rgba(255, 255, 255, 0.12);
}
.irrops-hub-icon-wrap.green { color: var(--success); }
.irrops-hub-icon-wrap.yellow { color: var(--warning); }
.irrops-hub-icon-wrap.red { color: var(--danger); }

.irrops-hub-icon {
    width: 22px;
    height: 22px;
}

.irrops-timestamp {
    margin-top: 16px;
    text-align: center;
    font-size: 11px;
    color: var(--gray-500);
}

/* ============================================================
   Schedule Board Modal
   ============================================================ */

.schedule-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.schedule-modal.open {
    display: flex !important;
    animation: fadeIn var(--transition-base) ease forwards;
}

.schedule-modal.hidden {
    display: none !important;
}

.schedule-modal-backdrop {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 10, 25, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.schedule-modal-content {
    position: relative;
    width: 94%;
    max-width: 1100px;
    max-height: 90vh;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(0, 102, 204, 0.1);
    overflow-y: auto;
    padding: 32px;
    animation: modalSlideUp 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.schedule-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.schedule-modal-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--white);
}

.schedule-modal-close {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition-fast);
}

.schedule-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.schedule-modal-close svg {
    width: 18px; height: 18px;
}

/* Schedule controls */
.schedule-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.schedule-hub-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.schedule-hub-btn {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--gray-300);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.schedule-hub-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.schedule-hub-btn.active {
    background: var(--ua-blue);
    border-color: var(--ua-blue);
    color: var(--white);
}

.schedule-direction-toggle {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.schedule-dir-btn {
    padding: 6px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.schedule-dir-btn:hover {
    color: var(--gray-200);
}

.schedule-dir-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

/* Schedule table */
.schedule-table-wrapper {
    overflow-x: auto;
    max-height: 60vh;
    overflow-y: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.schedule-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.schedule-table th {
    padding: 10px 12px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-400);
    background: var(--glass-bg-heavy);
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.schedule-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--gray-200);
    white-space: nowrap;
}

.schedule-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.schedule-empty {
    text-align: center;
    padding: 40px !important;
    color: var(--gray-500) !important;
}

/* Status badges in schedule */
.schedule-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.schedule-status.on-time {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.schedule-status.delayed {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.schedule-status.cancelled {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.schedule-status.landed,
.schedule-status.departed {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* ============================================================
   Hub-to-Hub Flow Matrix (Stats Modal)
   ============================================================ */

.stats-hub-matrix-section {
    margin-top: 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.hub-matrix-grid {
    display: grid;
    gap: 2px;
    font-size: 10px;
}

.hub-matrix-header {
    font-weight: 700;
    color: var(--gray-300);
    text-align: center;
    padding: 4px;
    font-size: 10px;
}

.hub-matrix-row-label {
    font-weight: 700;
    color: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.hub-matrix-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 3px;
    color: var(--white);
    font-weight: 600;
    font-size: 10px;
    min-width: 32px;
    min-height: 28px;
    transition: transform 0.15s ease;
    cursor: default;
}

.hub-matrix-cell:hover {
    transform: scale(1.15);
    z-index: 1;
}

.hub-matrix-cell.empty {
    background: rgba(255, 255, 255, 0.02);
    color: var(--gray-600);
}

.hub-matrix-cell.diagonal {
    background: rgba(255, 255, 255, 0.03);
    color: var(--gray-600);
}

/* ============================================================
   Equipment Swap Badge (Sidebar)
   ============================================================ */

.swap-badge {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(232, 119, 34, 0.2);
    color: #E87722;
    border: 1px solid rgba(232, 119, 34, 0.3);
    border-radius: var(--radius-full);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
    vertical-align: middle;
}

/* ============================================================
   FAA Status Pills (Hub Modal)
   ============================================================ */

.faa-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 8px;
}

.faa-status-pill.green {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.faa-status-pill.yellow {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.faa-status-pill.red {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.faa-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.faa-status-dot.green { background: var(--success); }
.faa-status-dot.yellow { background: var(--warning); }
.faa-status-dot.red { background: var(--danger); }

.faa-delay-tooltip {
    font-size: 10px;
    color: var(--gray-400);
    margin-top: 2px;
}

/* ============================================================
   Responsive: IRROPS + Schedule
   ============================================================ */

@media (max-width: 768px) {
    .irrops-hub-grid {
        grid-template-columns: 1fr 1fr;
    }
    .irrops-system-banner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    .irrops-system-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    .schedule-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    .schedule-hub-selector {
        width: 100%;
    }
}

@media (max-width: 500px) {
    .irrops-hub-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Network Capacity Modal
   ============================================================ */

.capacity-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 500;
    align-items: center;
    justify-content: center;
}

.capacity-modal.open {
    display: flex !important;
    animation: fadeIn var(--transition-base) ease forwards;
}

.capacity-modal.hidden {
    display: none !important;
}

.capacity-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 10, 25, 0.6);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.capacity-modal-content {
    position: relative;
    width: 92%;
    max-width: 1100px;
    max-height: 85vh;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(var(--glass-blur-heavy));
    -webkit-backdrop-filter: blur(var(--glass-blur-heavy));
    border: 1px solid var(--glass-border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl), 0 0 80px rgba(0, 102, 204, 0.1);
    overflow-y: auto;
    padding: 32px;
    animation: modalSlideUp 400ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.capacity-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}

.capacity-modal-header h2 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--white);
}

.capacity-header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.capacity-hub-filter {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--gray-200);
    padding: 6px 12px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
}

.capacity-hub-filter:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border-light);
}

.capacity-hub-filter option {
    background: var(--ua-navy);
    color: var(--white);
}

.capacity-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--gray-400);
    cursor: pointer;
    transition: var(--transition-fast);
}

.capacity-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
}

.capacity-modal-close svg {
    width: 18px;
    height: 18px;
}

/* KPI Bar */
.capacity-kpi-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.capacity-kpi-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    text-align: center;
    transition: var(--transition-fast);
}

.capacity-kpi-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--glass-border-light);
}

.capacity-kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.capacity-kpi-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Chart Section */
.capacity-chart-section {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.capacity-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-300);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.capacity-data-range {
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 12px;
}

#capacityTrendChart {
    width: 100%;
    height: 220px;
    display: block;
}

/* Tables Grid */
.capacity-tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.capacity-table-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.capacity-route-table {
    max-height: 340px;
    overflow-y: auto;
}

.capacity-route-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
}

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

.capacity-route-rank {
    width: 24px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
}

.capacity-route-pair {
    flex: 1;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.3px;
}

.capacity-route-pax {
    font-size: 12px;
    color: var(--gray-300);
    margin-right: 12px;
}

.capacity-route-lf {
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    min-width: 48px;
    text-align: center;
}

.capacity-route-lf.high {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.capacity-route-lf.medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.capacity-route-lf.low {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* ============================================================
   Detail Panel: Route Capacity Section
   ============================================================ */

.detail-route-capacity {
    margin: 12px 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 14px;
}

.detail-route-capacity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.detail-route-capacity-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-route-capacity-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.detail-cap-stat {
    text-align: center;
}

.detail-cap-stat-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.2;
}

.detail-cap-stat-label {
    font-size: 9px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-cap-yoy {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-top: 2px;
}

.detail-cap-yoy.positive {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.detail-cap-yoy.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

#detailRouteCapacityChart {
    width: 100%;
    height: 100px;
    display: block;
    border-radius: var(--radius-sm);
}

/* ============================================================
   Responsive: Capacity Modal
   ============================================================ */

@media (max-width: 768px) {
    .capacity-kpi-bar {
        grid-template-columns: repeat(2, 1fr);
    }
    .capacity-tables-grid {
        grid-template-columns: 1fr;
    }
    .capacity-modal-content {
        width: 96%;
        padding: 20px;
    }
}

/* ============================================================
   Mobile Responsive Fixes
   ============================================================ */

/* Detail panel must slide over sidebar on small screens */
@media (max-width: 600px) {
    .flight-detail {
        z-index: 95;
    }

    .flight-detail.open {
        width: 100%;
    }

    /* Hide sidebar expand button on mobile — Layout C uses dock instead */
    body.layout-c .sidebar-expand-btn {
        display: none;
    }

    /* Notification panel: full width on small screens */
    .notification-panel {
        right: 0;
        left: 0;
        width: 100%;
        border-radius: 0;
    }
}

/* Plane controls: sit above Layout C dock bar */
@media (max-width: 768px) {
    body.layout-c .plane-controls {
        bottom: calc(var(--dock-height) + 12px);
    }

    /* Ensure flight detail doesn't exceed viewport */
    .flight-detail {
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
}
