/* ═══════════════════════════════════════════════════════════════
   Tactical Board v2 — Redesigned Operations Dashboard
   flyExclusive Intelligence Platform
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Design Tokens ── */
.bi-content {
    /* Backgrounds */
    --tb-bg: #080c14;
    --tb-surface: rgba(17, 24, 39, 0.85);
    --tb-surface-solid: #111827;
    --tb-surface-hover: #1a2233;
    --tb-elevated: #1e293b;

    /* Borders — 10% opacity minimum for LCD visibility */
    --tb-border: rgba(148, 163, 184, 0.10);
    --tb-border-hover: rgba(148, 163, 184, 0.18);

    /* Text hierarchy — all pass WCAG AA on #111827 */
    --tb-text: #f1f5f9;
    --tb-text-2: #cbd5e1;
    --tb-text-3: #94a3b8;        /* ~5.4:1 contrast on #111827 */
    --tb-text-4: #8b9bb5;        /* ~4.7:1 contrast — AA compliant */

    /* Status — green desaturated for dark mode luminance balance */
    --tb-green: #0d9668;
    --tb-green-bg: rgba(13, 150, 104, 0.08);
    --tb-green-glow: rgba(13, 150, 104, 0.2);
    --tb-red: #ef4444;
    --tb-red-bg: rgba(239, 68, 68, 0.08);
    --tb-amber: #f59e0b;
    --tb-amber-bg: rgba(245, 158, 11, 0.08);
    --tb-blue: #3b82f6;
    --tb-blue-bg: rgba(59, 130, 246, 0.08);
    --tb-purple: #8b5cf6;
    --tb-cyan: #06b6d4;
    --tb-muted: #6b7280;
    --tb-money: #34d399;          /* Distinct from status green */
    --tb-tail: #1a2744;           /* Tail number — dark navy on light tiles */

    /* Typography scale (minor third ~1.2x) */
    --tb-font-2xs: 0.5625rem;    /* 9px — smallest labels */
    --tb-font-xs: 0.625rem;      /* 10px — sub-labels, counts */
    --tb-font-sm: 0.6875rem;     /* 11px — table data, body */
    --tb-font-base: 0.8125rem;   /* 13px — fleet names, stats */
    --tb-font-lg: 1.1875rem;     /* 19px — panel hero values */
    --tb-font-xl: 1.5rem;        /* 24px — KPI values */
    --tb-font-2xl: 1.875rem;     /* 30px — primary KPI value */

    /* Spacing scale */
    --tb-sp-1: 4px;
    --tb-sp-2: 6px;
    --tb-sp-3: 8px;
    --tb-sp-4: 12px;
    --tb-sp-4a: 14px;
    --tb-sp-5: 16px;
    --tb-sp-6: 24px;

    /* Radius */
    --tb-r: 10px;
    --tb-r-sm: 6px;
    --tb-r-xs: 3px;

    /* Shadows */
    --tb-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --tb-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.3);

    /* Motion */
    --tb-transition: 180ms ease;
}

/* ── 2. Layout Overrides ── */
.bi-mode .bi-content {
    background: var(--tb-bg);
}

.bi-mode .bi-top-row {
    background: transparent;
    padding: var(--tb-sp-4a) var(--tb-sp-5) var(--tb-sp-3);
}

.bi-mode .bi-grid-section {
    padding: 0 var(--tb-sp-5);
    scrollbar-width: thin;
    scrollbar-color: var(--tb-elevated) transparent;
}

.bi-grid-section::-webkit-scrollbar {
    width: 5px;
}

.bi-grid-section::-webkit-scrollbar-track {
    background: transparent;
}

.bi-grid-section::-webkit-scrollbar-thumb {
    background: var(--tb-elevated);
    border-radius: 3px;
}

.bi-grid-section::-webkit-scrollbar-thumb:hover {
    background: var(--tb-text-4);
}

.bi-mode .bi-right-column {
    padding: var(--tb-sp-4a) var(--tb-sp-5) var(--tb-sp-4a) 0;
    gap: var(--tb-sp-3);
}

.bi-mode .bi-bottom-row {
    padding: 0 var(--tb-sp-5) var(--tb-sp-4a);
    gap: var(--tb-sp-3);
    min-height: 220px;
    max-height: 300px;
}

/* Give bottom row more space in the grid */
.bi-mode .bi-content {
    grid-template-rows: auto 1fr minmax(220px, 0.45fr);
}

.bi-mode .bi-panel {
    background: var(--tb-surface-solid);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r);
    padding: var(--tb-sp-4);
}

/* Panel urgency accents */
.bi-panel--urgent {
    border-left: 3px solid var(--tb-red) !important;
}

/* ── 3. KPI Section ── */
.tb-kpi-row {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: var(--tb-sp-4a);
    padding: 0;
}

.tb-kpi {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--tb-surface-solid);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r);
    padding: var(--tb-sp-4a) var(--tb-sp-5) var(--tb-sp-3);
    min-width: 120px;
    cursor: pointer;
    transition: border-color var(--tb-transition), box-shadow var(--tb-transition);
}

.tb-kpi--animated {
    animation: tb-fade-up 300ms ease-out both;
}

.tb-kpi--animated:nth-child(2) { animation-delay: 60ms; }
.tb-kpi--animated:nth-child(3) { animation-delay: 120ms; }

.tb-kpi:hover {
    border-color: var(--tb-border-hover);
}

.tb-kpi--primary {
    min-width: 150px;
}

.tb-kpi--primary.tb-kpi--good {
    border-color: rgba(13, 150, 104, 0.20);
    background: linear-gradient(135deg, var(--tb-surface-solid) 0%, var(--tb-green-bg) 100%);
}

.tb-kpi--primary.tb-kpi--good:hover {
    box-shadow: 0 0 24px var(--tb-green-glow);
}

.tb-kpi--primary.tb-kpi--warn {
    border-color: rgba(245, 158, 11, 0.20);
    background: linear-gradient(135deg, var(--tb-surface-solid) 0%, var(--tb-amber-bg) 100%);
}

.tb-kpi--primary.tb-kpi--crit {
    border-color: rgba(239, 68, 68, 0.20);
    background: linear-gradient(135deg, var(--tb-surface-solid) 0%, var(--tb-red-bg) 100%);
}

/* Clickable KPI filter indicator */
.tb-kpi--active {
    box-shadow: 0 0 0 2px var(--tb-blue);
}

/* SVG Ring */
.tb-kpi-ring {
    width: 96px;
    height: 96px;
}

.tb-kpi--primary .tb-kpi-ring {
    width: 112px;
    height: 112px;
}

.tb-ring-bg {
    fill: none;
    stroke: var(--tb-elevated);
    stroke-width: 5;
}

.tb-ring-fill {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 700ms cubic-bezier(0.4, 0, 0.2, 1), stroke 300ms ease;
}

.tb-ring-fill--animated {
    animation: tb-ring-in 900ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.tb-kpi--good .tb-ring-fill { stroke: var(--tb-green); }
.tb-kpi--warn .tb-ring-fill { stroke: var(--tb-amber); }
.tb-kpi--crit .tb-ring-fill { stroke: var(--tb-red); }

/* Center text overlay */
.tb-kpi-inner {
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 96px;
    pointer-events: none;
}

.tb-kpi--primary .tb-kpi-inner {
    height: 112px;
}

.tb-kpi-value {
    font-size: var(--tb-font-xl);
    font-weight: 700;
    color: var(--tb-text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tb-kpi--primary .tb-kpi-value {
    font-size: var(--tb-font-2xl);
}

.tb-kpi-count {
    font-size: var(--tb-font-xs);
    color: var(--tb-text-4);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.tb-kpi-label {
    font-size: var(--tb-font-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tb-text-3);
    margin-top: var(--tb-sp-3);
    text-align: center;
}

/* ── 4. MX Breakdown ── */
.tb-mx-breakdown {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--tb-sp-2);
    margin-left: var(--tb-sp-1);
    padding-left: var(--tb-sp-4a);
    border-left: 1px solid var(--tb-border);
}

.tb-mx-breakdown--animated {
    animation: tb-fade-up 300ms ease-out 180ms both;
}

.tb-mx-breakdown-label {
    font-size: var(--tb-font-2xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tb-text-4);
    font-weight: 600;
    margin-bottom: 2px;
}

.tb-mx-pills {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tb-mx-pill {
    display: flex;
    align-items: center;
    gap: var(--tb-sp-3);
    padding: 3px var(--tb-sp-3);
    border-radius: var(--tb-r-sm);
    font-size: var(--tb-font-sm);
    cursor: default;
    transition: background var(--tb-transition);
}

.tb-mx-pill:hover {
    background: var(--tb-surface-hover);
}

.tb-mx-pill--sch { color: var(--tb-blue); }
.tb-mx-pill--aog { color: var(--tb-red); }
.tb-mx-pill--sme {
    color: var(--tb-amber);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: rgba(245, 158, 11, 0.3);
    text-underline-offset: 2px;
}
.tb-mx-pill--pmx { color: #2dd4bf; }
.tb-mx-pill--other { color: var(--tb-muted); }

.tb-mx-pill-label {
    font-weight: 700;
    width: 34px;
    font-size: var(--tb-font-xs);
    letter-spacing: 0.03em;
}

.tb-mx-pill-count {
    font-weight: 700;
    min-width: 16px;
    text-align: right;
}

.tb-mx-pill-pct {
    color: var(--tb-text-4);
    font-size: var(--tb-font-2xs);
    font-variant-numeric: tabular-nums;
}

.tb-mx-separator {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
    margin: 4px 0;
}

.tb-mx-nonrev-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--tb-purple);
    font-size: var(--tb-font-xs);
    padding: 3px var(--tb-sp-3);
}

.tb-mx-nonrev-count .tb-mx-pill-count {
    color: var(--tb-purple);
    font-weight: 700;
}

.tb-nonrev-breakdown {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    color: var(--tb-purple);
    font-size: var(--tb-font-xs);
    padding: 3px var(--tb-sp-3);
}

.tb-nonrev-label {
    font-weight: 700;
    font-size: var(--tb-font-xs);
}

.tb-nonrev-details {
    display: flex;
    gap: 8px;
    font-size: var(--tb-font-2xs);
    opacity: 0.85;
}

.tb-nonrev-item {
    white-space: nowrap;
}

/* ── 4b. Fleet Dispatch Totals Panel ── */
.tb-fleet-dispatch {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--tb-sp-2);
    margin-left: var(--tb-sp-1);
    padding-left: var(--tb-sp-4a);
    border-left: 1px solid var(--tb-border);
}

.tb-fleet-dispatch-label {
    font-size: var(--tb-font-2xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tb-text-4);
    font-weight: 600;
    margin-bottom: 2px;
}

.tb-fleet-dispatch-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tb-fleet-dispatch-row {
    display: grid;
    grid-template-columns: 36px minmax(56px, auto) 44px;
    align-items: center;
    gap: var(--tb-sp-3);
    padding: 3px var(--tb-sp-3);
    border-radius: var(--tb-r-sm);
    font-size: var(--tb-font-sm);
    cursor: default;
}

.tb-fleet-dispatch-row--good { color: var(--tb-green); }
.tb-fleet-dispatch-row--warn { color: var(--tb-amber); }
.tb-fleet-dispatch-row--crit { color: var(--tb-red); }

.tb-fleet-dispatch-label-cell {
    font-weight: 700;
    font-size: var(--tb-font-xs);
    letter-spacing: 0.03em;
}

.tb-fleet-dispatch-count {
    font-weight: 700;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.tb-fleet-dispatch-pct {
    color: var(--tb-text-4);
    font-size: var(--tb-font-2xs);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* On viewports below ~1280px, drop the Fleet Dispatch panel to a
   second row rather than squeezing the donuts + MX Categories row. */
@media (max-width: 1280px) {
    .tb-fleet-dispatch {
        flex-basis: 100%;
        border-left: none;
        border-top: 1px solid var(--tb-border);
        padding-left: 0;
        padding-top: var(--tb-sp-2);
        margin-left: 0;
    }

    .tb-fleet-dispatch-list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--tb-sp-1) var(--tb-sp-3);
        justify-content: center;
    }

    .tb-fleet-dispatch-row {
        grid-template-columns: auto auto auto;
        padding: 1px var(--tb-sp-2);
    }
}

/* ── Filter Bar (Part 135 pills + Tail search) ── */
.tb-filter-bar {
    margin-bottom: var(--tb-sp-3);
}

.tb-filter-bar-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.7), rgba(20, 40, 70, 0.7));
    border-radius: var(--tb-r-md);
    border: 1px solid rgba(100, 160, 255, 0.25);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tb-filter-bar-icon {
    font-size: 10px;
    color: rgba(100, 180, 255, 0.6);
}

.tb-filter-bar-title {
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(100, 180, 255, 0.8);
    white-space: nowrap;
}

.tb-filter-bar-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.tb-filter-group-pills {
    display: flex;
    gap: 6px;
}

.tb-flight-pill {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: var(--tb-font-xs);
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.tb-flight-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.tb-flight-pill--active {
    border-color: rgba(100, 180, 255, 0.5);
    background: rgba(100, 180, 255, 0.15);
    box-shadow: 0 0 6px rgba(100, 180, 255, 0.15);
}

.tb-flight-pill--flights-0 { color: var(--tb-muted); }
.tb-flight-pill--flights-0.tb-flight-pill--active { color: #ccc; }
.tb-flight-pill--flights-1 { color: var(--tb-blue); }
.tb-flight-pill--flights-2plus { color: var(--tb-green); }

.tb-flight-pill-label {
    font-weight: 600;
    font-size: var(--tb-font-xs);
    letter-spacing: 0.02em;
}

.tb-flight-pill-count {
    font-weight: 700;
    min-width: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: var(--tb-font-xs);
}

.tb-filter-bar-inner .tb-tail-search {
    width: 130px;
    margin-left: 0;
}

/* ── 5. Status Bar Legend ── */
.tb-grid-legend {
    display: flex;
    align-items: center;
    gap: var(--tb-sp-4);
    padding: 0 0 var(--tb-sp-2);
    margin-bottom: var(--tb-sp-1);
    border-bottom: 1px solid var(--tb-border);
}

.tb-grid-legend-label {
    font-size: var(--tb-font-2xs);
    color: var(--tb-text-4);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.tb-grid-legend-item {
    display: flex;
    align-items: center;
    gap: var(--tb-sp-1);
    font-size: var(--tb-font-2xs);
    color: var(--tb-text-3);
}

.tb-grid-legend-swatch {
    width: 14px;
    height: 3px;
    background: var(--tb-text-3);
    border-radius: 1px;
}

.tb-grid-legend-badge {
    display: inline-block;
    background: rgba(139, 92, 246, 0.7);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 0 3px;
    border-radius: 2px;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

/* Tail search input */
.tb-tail-search {
    margin-left: auto;
    width: 110px;
    padding: 2px 6px;
    font-size: var(--tb-font-2xs);
    font-family: inherit;
    color: var(--tb-text);
    background: var(--tb-elevated);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-xs);
    outline: none;
    transition: border-color var(--tb-transition);
}

.tb-tail-search::placeholder {
    color: var(--tb-text-4);
}

.tb-tail-search:focus {
    border-color: var(--tb-blue);
}

/* Search match glow */
.tb-ac--search-match {
    border-color: var(--tb-cyan) !important;
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.35);
}

/* ── 6. Fleet Grid ── */
.tb-fleet-row {
    display: flex;
    align-items: stretch;
    gap: var(--tb-sp-3);
    padding: 3px 0;
}

.tb-fleet-card {
    flex-shrink: 0;
    width: 88px;
    background: var(--tb-surface-solid);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-sm);
    padding: var(--tb-sp-3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--tb-sp-1);
    transition: border-color var(--tb-transition);
}

.tb-fleet-card:hover {
    border-color: var(--tb-border-hover);
}

.tb-fleet-name {
    font-size: var(--tb-font-base);
    font-weight: 700;
    color: var(--tb-text);
    line-height: 1.1;
}

.tb-fleet-subtext {
    font-size: var(--tb-font-2xs);
    color: var(--tb-text-4);
    display: block;
    font-weight: 400;
}

.tb-fleet-bar {
    height: 3px;
    background: var(--tb-elevated);
    border-radius: 2px;
    overflow: hidden;
}

.tb-fleet-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tb-fleet-bar--good { background: var(--tb-green); }
.tb-fleet-bar--warn { background: var(--tb-amber); }
.tb-fleet-bar--crit { background: var(--tb-red); }

.tb-fleet-stats {
    display: flex;
    align-items: baseline;
    gap: var(--tb-sp-1);
}

.tb-fleet-stat {
    font-size: var(--tb-font-base);
    font-weight: 700;
    color: var(--tb-text-2);
    font-variant-numeric: tabular-nums;
}

.tb-fleet-stat-detail {
    font-size: var(--tb-font-2xs);
    color: var(--tb-text-4);
    font-variant-numeric: tabular-nums;
}

.tb-fleet-stats-secondary {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: var(--tb-font-2xs);
    color: var(--tb-text-4);
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

.tb-fleet-avail {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.tb-fleet-avail-label {
    font-weight: 700;
    width: 18px;
    color: var(--tb-text-4);
}

.tb-fleet-avail-pct {
    font-weight: 600;
    min-width: 28px;
    text-align: right;
}

.tb-fleet-avail-count {
    color: var(--tb-text-4);
    font-size: var(--tb-font-2xs);
}

.tb-fleet-avail--good .tb-fleet-avail-pct { color: var(--tb-green); }
.tb-fleet-avail--warn .tb-fleet-avail-pct { color: var(--tb-amber); }
.tb-fleet-avail--crit .tb-fleet-avail-pct { color: var(--tb-red); }

.tb-fleet-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tb-sp-1);
    align-content: flex-start;
    padding: 1px 0;
}

/* ── 7. Aircraft Tiles ── */
.tb-ac {
    position: relative;
    width: 70px;
    background: var(--tb-surface-solid);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-sm);
    padding: 5px 3px 0;
    cursor: pointer;
    transition: border-color var(--tb-transition), transform var(--tb-transition), box-shadow var(--tb-transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
}

/* Reset old bi-aircraft-cell styles */
.tb-ac.bi-aircraft-cell {
    width: 70px;
    min-width: unset;
    max-width: unset;
    margin: 0;
}

.tb-ac:hover {
    border-color: var(--tb-border-hover);
    transform: translateY(-1px);
    box-shadow: var(--tb-shadow);
}

.tb-ac:focus-visible {
    outline: 2px solid var(--tb-blue);
    outline-offset: 1px;
}

/* AOG emergency treatment */
.tb-ac--aog {
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.2);
}

.tb-ac--aog::after {
    content: 'AOG';
    position: absolute;
    top: -1px;
    right: -1px;
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    background: var(--tb-red);
    color: white;
    padding: 0 3px;
    border-radius: 0 5px 0 3px;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

/* SME badge — top-right, amber */
.tb-ac--sme {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.2);
}

.tb-ac--sme::after {
    content: 'SME';
    position: absolute;
    top: -1px;
    right: -1px;
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    background: var(--tb-amber);
    color: white;
    padding: 0 3px;
    border-radius: 0 5px 0 3px;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

/* SCH badge — top-right, blue */
.tb-ac--sch {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.2);
}

.tb-ac--sch::after {
    content: 'SCH';
    position: absolute;
    top: -1px;
    right: -1px;
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    background: var(--tb-blue);
    color: white;
    padding: 0 3px;
    border-radius: 0 5px 0 3px;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

/* PMX badge — top-right, teal */
.tb-ac--pmx {
    border-color: rgba(45, 212, 191, 0.4);
    box-shadow: 0 0 6px rgba(45, 212, 191, 0.2);
}

.tb-ac--pmx::after {
    content: 'PMX';
    position: absolute;
    top: -1px;
    right: -1px;
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    background: #2dd4bf;
    color: white;
    padding: 0 3px;
    border-radius: 0 5px 0 3px;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

/* Generic MX badge — top-right, muted */
.tb-ac--mx-other {
    border-color: rgba(107, 114, 128, 0.4);
    box-shadow: 0 0 6px rgba(107, 114, 128, 0.2);
}

.tb-ac--mx-other::after {
    content: 'MX';
    position: absolute;
    top: -1px;
    right: -1px;
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    background: var(--tb-muted);
    color: white;
    padding: 0 3px;
    border-radius: 0 5px 0 3px;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

/* Non-Revenue Available badge — overlays center of status bar (crew | N/R | MX) */
.tb-ac-nonrev-badge {
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(139, 92, 246, 0.7);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 0 3px;
    border-radius: 2px 2px 0 0;
    pointer-events: none;
    z-index: 2;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

/* Crew inbound badge — bottom-left */
.tb-ac-crew-inbound {
    position: absolute;
    bottom: 4px;
    left: 2px;
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    background: var(--tb-cyan);
    color: white;
    padding: 0 3px;
    border-radius: 3px;
    line-height: 1.4;
}

.tb-ac-crew-inbound.planned {
    opacity: 0.7;
    font-size: 8px;
    line-height: 1;
}

/* Days-until-MX countdown badge — bottom-right */
.tb-ac-mx-countdown {
    position: absolute;
    bottom: 4px;
    right: 2px;
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    background: var(--tb-amber);
    color: white;
    padding: 0 3px;
    border-radius: 3px;
    line-height: 1.4;
}

.tb-ac-mx-countdown.urgent {
    background: var(--tb-red);
}

/* MEL restriction badge — top-left, amber */
.tb-ac--mel::before {
    content: 'MEL';
    position: absolute;
    top: -1px;
    left: -1px;
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    background: var(--tb-amber);
    color: white;
    padding: 0 3px;
    border-radius: 5px 0 3px 0;
    letter-spacing: 0.04em;
    line-height: 1.5;
}

/* Part 135 flight count badge on aircraft tile — hidden by default */
.tb-ac-flight-count {
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    background: var(--tb-blue);
    color: white;
    padding: 0 3px;
    border-radius: 3px;
    line-height: 1.4;
    margin-left: 3px;
    display: none;
    vertical-align: middle;
}

.tb-ac-flight-count.busy {
    background: var(--tb-green);
}

/* Show flight badges only when a flight filter is active */
.tb-show-flight-counts .tb-ac-flight-count {
    display: inline-block;
}

/* KPI filter dimming — 0.35 keeps tiles perceptible; no pointer-events:none so keyboard still works */
.tb-ac--dimmed {
    opacity: 0.35;
}

.tb-ac-tail {
    font-size: var(--tb-font-sm);
    font-weight: 600;
    color: var(--tb-tail);
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.tb-ac-loc {
    font-size: var(--tb-font-2xs);
    color: var(--tb-text-3);
    margin: 2px 0 var(--tb-sp-1);
    line-height: 1;
}

.tb-ac-loc .en-route-arrow {
    color: var(--tb-amber);
    font-weight: 700;
}

.tb-ac-status-bar {
    display: flex;
    width: calc(100% + 6px);
    height: 3px;
    gap: 1px;
    margin: 0 -3px;
}

.tb-ac-bar-crew,
.tb-ac-bar-mx {
    flex: 1;
}

.tb-ac-bar-crew {
    border-radius: 0 0 0 5px;
}

.tb-ac-bar-mx {
    border-radius: 0 0 5px 0;
}

/* ── 8. Panel Headers ── */
.bi-mode .bi-panel h3 {
    font-size: var(--tb-font-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tb-text-3);
    margin: 0 0 var(--tb-sp-3);
    padding-bottom: var(--tb-sp-2);
    border-bottom: 1px solid var(--tb-border);
}

/* ── 9. Empty States ── */
.tb-empty-state {
    text-align: center;
    color: var(--tb-text-4);
    font-size: var(--tb-font-sm);
    padding: var(--tb-sp-5) var(--tb-sp-3);
    font-style: italic;
}

/* ── 10. Whitespace Panel ── */
.tb-ws-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--tb-sp-3);
    padding-bottom: var(--tb-sp-3);
    border-bottom: 1px solid var(--tb-border);
}

.tb-ws-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tb-ws-metric-value {
    font-size: var(--tb-font-lg);
    font-weight: 700;
    color: var(--tb-text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tb-ws-metric-value--revenue {
    color: var(--tb-money);
}

.tb-ws-metric-label {
    font-size: var(--tb-font-2xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tb-text-4);
    margin-top: 2px;
    font-weight: 600;
}

/* ── 11. ISO Panel (compact horizontal strip) ── */
.tb-iso-strip {
    display: flex;
    gap: var(--tb-sp-2);
}

.tb-iso-chip {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--tb-elevated);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-r-xs);
    padding: var(--tb-sp-1) var(--tb-sp-2);
    cursor: default;
    transition: border-color var(--tb-transition);
}

.tb-iso-chip:hover {
    border-color: var(--tb-border-hover);
}

.tb-iso-chip--total {
    background: linear-gradient(135deg, var(--tb-elevated) 0%, rgba(59, 130, 246, 0.06) 100%);
}

.tb-iso-chip-value {
    font-size: var(--tb-font-base);
    font-weight: 700;
    color: var(--tb-text);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.tb-iso-chip-label {
    font-size: var(--tb-font-2xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tb-text-4);
    margin-top: 1px;
    font-weight: 600;
}

/* ── 12. Tables (shared) ── */
.tb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--tb-font-sm);
}

.tb-table th {
    text-align: left;
    font-weight: 600;
    color: var(--tb-text-4);
    font-size: var(--tb-font-2xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: var(--tb-sp-1) var(--tb-sp-2);
    border-bottom: 1px solid var(--tb-border);
    white-space: nowrap;
}

.tb-table td {
    padding: 3px var(--tb-sp-2);
    color: var(--tb-text-2);
    border-bottom: 1px solid var(--tb-border);
}

.tb-table tbody tr {
    transition: background var(--tb-transition);
}

.tb-table tbody tr:hover {
    background: var(--tb-surface-hover);
}

/* Revenue uses distinct money color */
.tb-revenue {
    text-align: right;
    font-weight: 600;
    color: var(--tb-money) !important;
    font-variant-numeric: tabular-nums;
}

.tb-ws-fleet-header td {
    font-weight: 700;
    color: var(--tb-text-3) !important;
    font-size: var(--tb-font-2xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-top: var(--tb-sp-3) !important;
    border-bottom: none !important;
}

/* ── 13. Progress Bars (ERTS) ── */
.tb-progress-cell {
    display: flex;
    align-items: center;
    gap: var(--tb-sp-2);
}

.tb-progress {
    flex: 1;
    height: 4px;
    background: var(--tb-elevated);
    border-radius: 2px;
    overflow: hidden;
    min-width: 40px;
}

.tb-progress-fill {
    height: 100%;
    background: var(--tb-green);
    border-radius: 2px;
    transition: width 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tb-progress-text {
    font-size: var(--tb-font-2xs);
    color: var(--tb-text-3);
    min-width: 28px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ── 14. Fleet Badges (Crew Panel) ── */
.tb-fleet-badge {
    display: inline-block;
    padding: 1px 5px;
    border-radius: var(--tb-r-xs);
    font-size: var(--tb-font-2xs);
    font-weight: 700;
    background: var(--tb-elevated);
    color: var(--tb-text-3);
    letter-spacing: 0.03em;
    line-height: 1.4;
}

.tb-crew-table {
    width: 100%;
    border-collapse: collapse;
}

.tb-crew-table td {
    padding: 3px var(--tb-sp-1);
    font-size: var(--tb-font-sm);
    color: var(--tb-text-2);
    border-bottom: 1px solid var(--tb-border);
}

.tb-crew-table tr {
    transition: background var(--tb-transition);
}

.tb-crew-table tr:hover {
    background: var(--tb-surface-hover);
}

.tb-crew-name {
    font-weight: 500;
}

.tb-crew-position {
    color: var(--tb-text-4);
    font-size: var(--tb-font-2xs);
    font-weight: 600;
}

/* ── 15. Managed / International ── */
.tb-managed-container {
    display: flex;
    gap: var(--tb-sp-4a);
}

.tb-managed-section {
    flex: 1;
    min-width: 0;
}

.tb-managed-header {
    font-size: var(--tb-font-2xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tb-text-4);
    margin-bottom: var(--tb-sp-2);
}

.tb-managed-empty {
    color: var(--tb-text-4);
    font-size: var(--tb-font-xs);
    font-style: italic;
}

/* ── 16. Low Hour Colors ── */
.tb-hrs-critical {
    color: var(--tb-red) !important;
    font-weight: 700;
}

.tb-hrs-warning {
    color: var(--tb-amber) !important;
    font-weight: 600;
}

.tb-hrs-ok {
    color: var(--tb-text-2);
}

/* ── 17. Animations ── */
@keyframes tb-ring-in {
    from { stroke-dashoffset: 301.59; }
}

@keyframes tb-fade-up {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── 18. Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    .tb-kpi--animated,
    .tb-mx-breakdown--animated {
        animation: none !important;
    }

    .tb-ring-fill,
    .tb-ring-fill--animated {
        animation: none !important;
        transition: none !important;
    }

    .tb-ac {
        transition: none !important;
    }

    .tb-fleet-bar-fill,
    .tb-progress-fill {
        transition: none !important;
    }
}

/* ── 18b. Bottom Row Expand/Collapse ── */
.bi-mode .bi-bottom-row {
    position: relative;
    overflow: visible; /* allow toggle at top:-14px to show */
    transition: grid-template-rows 400ms cubic-bezier(0.4, 0, 0.2, 1);
    /* Use CSS grid on the row itself for smooth height animation */
    display: grid;
    grid-template-rows: 1fr;
}

.bi-bottom-toggle {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    width: 48px;
    height: 18px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    padding: 0;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15);
    transition: color var(--tb-transition), background var(--tb-transition),
                box-shadow var(--tb-transition);
}

.bi-bottom-toggle:hover {
    color: #f1f5f9;
    background: #334155;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.25);
}

.bi-bottom-toggle svg {
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.bi-bottom-row.collapsed .bi-bottom-toggle svg {
    transform: rotate(180deg);
}

.bi-bottom-content {
    display: flex;
    gap: inherit;
    width: 100%;
    min-width: 0;
    min-height: 0; /* required for grid-template-rows: 0fr animation */
    overflow: hidden;
    opacity: 1;
    transition: opacity 300ms ease;
}

.bi-bottom-content > .bi-panel {
    flex: 1;
    min-width: 0;
}

.bi-bottom-row.collapsed {
    grid-template-rows: 0fr;
    min-height: 14px !important;
    padding-top: 14px !important;
    padding-bottom: 0 !important;
    overflow: visible;
}

.bi-bottom-row.collapsed .bi-bottom-content {
    opacity: 0;
    min-height: 0;
}

/* ── 18c. Right Column Expand/Collapse ── */

/* Animate the grid itself via interpolate-size */
.bi-mode .bi-content {
    transition: grid-template-columns 400ms cubic-bezier(0.4, 0, 0.2, 1),
                grid-template-rows 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.bi-mode .bi-right-column {
    position: relative;
    overflow: visible; /* override base overflow:hidden so toggle tab is clickable */
}

.bi-right-column > .bi-panel {
    transition: opacity 300ms ease 50ms;
}

/* Toggle tab sits on the left edge of the right column */
.bi-right-column-toggle {
    position: absolute;
    top: 50%;
    left: -18px;
    transform: translateY(-50%);
    z-index: 20;
    width: 18px;
    height: 48px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-right: none;
    border-radius: 8px 0 0 8px;
    background: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    padding: 0;
    box-shadow: -2px 0 6px rgba(0, 0, 0, 0.15);
    transition: color var(--tb-transition), background var(--tb-transition),
                left 400ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow var(--tb-transition);
}

.bi-right-column-toggle:hover {
    color: #f1f5f9;
    background: #334155;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.25);
}

.bi-right-column-toggle svg {
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.bi-content.right-collapsed .bi-right-column-toggle svg {
    transform: rotate(180deg);
}

.bi-content.right-collapsed .bi-right-column {
    padding: 0 !important;
    border-left: none;
}

.bi-content.right-collapsed .bi-right-column > .bi-panel {
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: opacity 150ms ease;
}

.bi-content.right-collapsed .bi-right-column-toggle {
    left: -4px;
}

.bi-content.right-collapsed {
    grid-template-columns: 1fr 14px !important;
}

/* ── 18d. Grid adjustment when panels collapsed ── */
.bi-content.bottom-collapsed {
    grid-template-rows: auto 1fr 14px !important;
}

/* Reduced motion: disable collapse animations */
@media (prefers-reduced-motion: reduce) {
    .bi-bottom-content,
    .bi-bottom-toggle svg,
    .bi-mode .bi-bottom-row,
    .bi-right-column-toggle svg,
    .bi-right-column-toggle,
    .bi-mode .bi-content,
    .bi-right-column > .bi-panel {
        transition: none !important;
    }
}

/* ── 19. Fullscreen Adjustments ── */
.bi-fullscreen .tb-kpi-ring {
    width: 110px;
    height: 110px;
}

.bi-fullscreen .tb-kpi-inner {
    height: 110px;
}

.bi-fullscreen .tb-kpi--primary .tb-kpi-ring {
    width: 130px;
    height: 130px;
}

.bi-fullscreen .tb-kpi--primary .tb-kpi-inner {
    height: 130px;
}

.bi-fullscreen .tb-kpi-value {
    font-size: 1.7rem;
}

.bi-fullscreen .tb-kpi--primary .tb-kpi-value {
    font-size: 2.1rem;
}

.bi-fullscreen .tb-ac {
    width: 74px;
}

.bi-fullscreen .tb-ac.bi-aircraft-cell {
    width: 74px;
}

/* ── 20. Light Mode Overrides (class-based, not media query) ── */
.bi-content[data-theme="light"],
.bi-content.theme-light {
    --tb-bg: #f8fafc;
    --tb-surface: rgba(255, 255, 255, 0.9);
    --tb-surface-solid: #ffffff;
    --tb-surface-hover: #f1f5f9;
    --tb-elevated: #e2e8f0;
    --tb-border: rgba(15, 23, 42, 0.08);
    --tb-border-hover: rgba(15, 23, 42, 0.16);
    --tb-text: #0f172a;
    --tb-text-2: #334155;
    --tb-text-3: #475569;
    --tb-text-4: #64748b;
    --tb-green: #059669;
    --tb-red: #dc2626;
    --tb-amber: #d97706;
    --tb-blue: #2563eb;
    --tb-purple: #7c3aed;
    --tb-cyan: #0891b2;
    --tb-muted: #9ca3af;
    --tb-money: #059669;
    --tb-tail: #1a2744;
    --tb-green-bg: rgba(5, 150, 105, 0.06);
    --tb-green-glow: rgba(5, 150, 105, 0.15);
    --tb-red-bg: rgba(220, 38, 38, 0.06);
    --tb-amber-bg: rgba(217, 119, 6, 0.06);
    --tb-blue-bg: rgba(37, 99, 235, 0.06);
    --tb-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --tb-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Fallback: also support prefers-color-scheme for auto-detection */
@media (prefers-color-scheme: light) {
    .bi-content:not([data-theme]) {
        --tb-bg: #f8fafc;
        --tb-surface: rgba(255, 255, 255, 0.9);
        --tb-surface-solid: #ffffff;
        --tb-surface-hover: #f1f5f9;
        --tb-elevated: #e2e8f0;
        --tb-border: rgba(15, 23, 42, 0.08);
        --tb-border-hover: rgba(15, 23, 42, 0.16);
        --tb-text: #0f172a;
        --tb-text-2: #334155;
        --tb-text-3: #475569;
        --tb-text-4: #64748b;
        --tb-green: #059669;
        --tb-red: #dc2626;
        --tb-amber: #d97706;
        --tb-blue: #2563eb;
        --tb-purple: #7c3aed;
        --tb-cyan: #0891b2;
        --tb-muted: #9ca3af;
        --tb-money: #059669;
        --tb-tail: #1a2744;
        --tb-green-bg: rgba(5, 150, 105, 0.06);
        --tb-green-glow: rgba(5, 150, 105, 0.15);
        --tb-red-bg: rgba(220, 38, 38, 0.06);
        --tb-amber-bg: rgba(217, 119, 6, 0.06);
        --tb-blue-bg: rgba(37, 99, 235, 0.06);
        --tb-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        --tb-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.06);
    }
}

/* Light mode overrides for non-revenue separator */
.bi-content[data-theme="light"] .tb-mx-separator,
.bi-content.theme-light .tb-mx-separator {
    background: rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: light) {
    .bi-content:not([data-theme]) .tb-mx-separator {
        background: rgba(0, 0, 0, 0.15);
    }
}

/* ── 21. Mobile Responsive (Phone) ── */
@media (max-width: 768px) {
    /* Single-column layout: KPI on top, grid below, hide right + bottom */
    .bi-content {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto 1fr !important;
        grid-template-areas:
            "kpi"
            "grid" !important;
    }

    .bi-right-column,
    .bi-bottom-row,
    .bi-legend-anchor {
        display: none !important;
    }

    /* Top row: full width, no overflow */
    .bi-mode .bi-top-row {
        padding: var(--tb-sp-2) var(--tb-sp-3);
        overflow: visible;
    }

    /* KPI section must fill width */
    .bi-kpi-section {
        width: 100% !important;
        flex: 1 1 auto !important;
    }

    /* KPI row: 3 rings in a row, MX breakdown wraps below */
    .tb-kpi-row {
        flex-wrap: wrap;
        gap: var(--tb-sp-2);
        justify-content: center;
        width: 100%;
    }

    /* All KPI rings: compact for phone */
    .tb-kpi {
        min-width: 0;
        flex: 1 1 0;
        max-width: 110px;
        padding: var(--tb-sp-2) var(--tb-sp-1) var(--tb-sp-1);
    }

    .tb-kpi-ring {
        width: 64px;
        height: 64px;
    }

    .tb-kpi-inner {
        height: 64px;
        top: 8px;
    }

    .tb-kpi--primary {
        min-width: 0;
        max-width: 120px;
    }

    .tb-kpi--primary .tb-kpi-ring {
        width: 72px;
        height: 72px;
    }

    .tb-kpi--primary .tb-kpi-inner {
        height: 72px;
        top: 8px;
    }

    .tb-kpi-value {
        font-size: 1rem;
    }

    .tb-kpi--primary .tb-kpi-value {
        font-size: 1.15rem;
    }

    .tb-kpi-count {
        font-size: 0.5rem;
    }

    .tb-kpi-label {
        font-size: var(--tb-font-2xs);
        margin-top: var(--tb-sp-1);
    }

    /* MX breakdown: full-width row under KPI rings */
    .tb-mx-breakdown {
        flex-basis: 100%;
        border-left: none;
        border-top: 1px solid var(--tb-border);
        padding-left: 0;
        padding-top: var(--tb-sp-2);
        margin-left: 0;
    }

    .tb-mx-breakdown-label {
        text-align: center;
        margin-bottom: var(--tb-sp-1);
    }

    .tb-mx-pills {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--tb-sp-1) var(--tb-sp-3);
        justify-content: center;
    }

    .tb-mx-pill {
        padding: 1px var(--tb-sp-2);
    }

    .tb-nonrev-breakdown {
        width: 100%;
        align-items: center;
    }

    .tb-mx-separator {
        max-width: 200px;
        margin: 2px auto;
    }

    /* Grid section: full width, scroll */
    .bi-mode .bi-grid-section {
        padding: 0 var(--tb-sp-2);
    }

    /* Status bar legend: compact wrap */
    .tb-grid-legend {
        flex-wrap: wrap;
        gap: var(--tb-sp-1) var(--tb-sp-3);
        padding: var(--tb-sp-2) 0 var(--tb-sp-2);
    }

    .tb-grid-legend-item[style*="margin-left:auto"] {
        margin-left: 0 !important;
        width: 100%;
        text-align: right;
    }

    .tb-tail-search {
        margin-left: 0;
        width: 100%;
        margin-top: var(--tb-sp-1);
        padding: 4px 8px;
        font-size: var(--tb-font-xs);
    }

    /* Fleet rows: stack vertically */
    .tb-fleet-row {
        flex-direction: column;
        gap: var(--tb-sp-2);
        padding: var(--tb-sp-3) 0;
    }

    .tb-fleet-card {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: var(--tb-sp-3);
        padding: var(--tb-sp-2) var(--tb-sp-3);
    }

    .tb-fleet-name {
        min-width: 40px;
    }

    .tb-fleet-bar {
        flex: 1;
        min-width: 40px;
    }

    .tb-fleet-stats-secondary {
        flex-direction: row;
        gap: var(--tb-sp-3);
    }

    /* Aircraft tiles: fit ~5 per row on phone */
    .tb-ac,
    .tb-ac.bi-aircraft-cell {
        width: 62px;
    }

    .tb-fleet-tiles {
        gap: 3px;
    }

    /* Header: single line, compact */
    .bi-header {
        padding: 4px 8px;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .bi-logo img {
        height: 20px;
    }

    .bi-fullscreen-btn {
        display: none !important;
    }

    .bi-header-actions {
        margin-left: auto;
        gap: 4px;
        flex-shrink: 0;
        flex-direction: row-reverse;
    }

    .bi-timestamp {
        font-size: 9px;
        opacity: 0.7;
        white-space: nowrap;
    }

    .bi-title {
        font-size: 14px;
        flex: 0 1 auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* BI body: hide chat on mobile */
    .bi-body {
        grid-template-columns: 1fr !important;
    }

    .bi-chat-resize-handle,
    .bi-chat {
        display: none !important;
    }
}
