/* ============================================================ */
/*  ADD-FLIGHT · DARK TACTICAL REDESIGN                          */
/*  Step 2 (add-flight) reskinned from the paper-telex look to   */
/*  the dark framed-card mockup. Keeps every JS class hook so     */
/*  warehouse / advanced-panel / squad-sync all keep working.    */
/*  MISSION REVIEW (step 3) block at the bottom is untouched.    */
/* ============================================================ */

/* Hide legacy hero + brief strip — the stage owns the heading */
.add-flight-view .af-hero,
.add-flight-view .af-brief-strip { display: none !important; }
.add-flight-view .af-body { padding-top: 0 !important; }

/* ---- scoped palette ---- */
.af-telex-stage {
    --af-bg:      #0a0e13;
    --af-bg2:     #0c0e14;
    --af-panel:   #11151c;
    --af-line:    #1b1e28;
    --af-line2:   #252a36;
    --af-txt:     #e0e8f0;
    --af-dim:     #7c8696;
    --af-dimmer:  #5a626f;
    --af-amber:   #ffaa00;
    --af-amber-d: #3a2e0a;
    --af-red:     #ff3344;
    --af-green:   #3ad37a;
    --af-blue:    #5b8fd6;
    --af-land:    #9bbf5a;
    --af-sea:     #3a9bd6;
}

/* ===== Stage ===== */
.af-telex-stage {
    font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace;
    color: var(--af-txt);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 22px 26px 34px;
    background:
        radial-gradient(ellipse at 50% 0, rgba(40,60,100,.22), transparent 60%),
        var(--af-bg2);
    border: 1px solid var(--af-line);
    border-radius: 10px;
    min-height: 600px;
    position: relative;
    margin: 16px 0 0;
}

/* ===== Head: action title + stepper ===== */
.af-tx-head { margin-bottom: 16px; }
.af-tx-title {
    font-family: 'Bahnschrift SemiCondensed', 'JetBrains Mono', sans-serif;
    font-weight: 600;
    font-size: 26px;
    letter-spacing: 0.04em;
    color: var(--af-txt);
    margin: 0 0 4px;
}
.af-tx-title-sub { color: var(--af-dim); font-size: 12px; margin-bottom: 16px; }

/* Step indicator */
.af-tx-stepper {
    display: flex;
    border: 1px solid var(--af-line);
    border-radius: 7px;
    overflow: hidden;
    background: var(--af-panel);
}
.af-tx-stp {
    flex: 1;
    display: flex; align-items: center; gap: 11px;
    padding: 12px 18px;
    position: relative;
    border-right: 1px solid var(--af-line);
}
.af-tx-stp:last-child { border-right: none; }
.af-tx-stp .dot {
    width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 700; font-size: 12px; flex: none;
}
.af-tx-stp.active .dot { background: var(--af-amber); color: #1a1300; }
.af-tx-stp.active { background: linear-gradient(180deg, rgba(255,170,0,.08), transparent); }
.af-tx-stp.done .dot { background: var(--af-green); color: #062a14; }
.af-tx-stp.todo .dot { background: var(--af-line2); color: var(--af-dim); }
.af-tx-stp .lbl b {
    display: block; font-size: 13px; letter-spacing: 0.04em;
    font-family: 'Bahnschrift SemiCondensed', sans-serif;
}
.af-tx-stp.active .lbl b { color: var(--af-amber); }
.af-tx-stp .lbl span { color: var(--af-dim); font-size: 10px; }
.af-tx-stp .chev { position: absolute; right: -1px; top: 50%; transform: translateY(-50%); color: var(--af-line2); font-size: 16px; }

/* Empty-state big CTA (shown when no flights exist yet) */
.af-tx-empty-cta {
    border: 1px dashed var(--af-line2);
    border-radius: 10px;
    background: radial-gradient(ellipse at 50% 20%, rgba(255,170,0,.06), transparent 60%), var(--af-bg2);
    padding: 30px 20px 34px;
    margin: 14px 0 4px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.af-tx-empty-cta .icon { font-size: 40px; color: var(--af-amber); opacity: .85; line-height: 1; }
.af-tx-empty-cta h3 { font-family: 'Bahnschrift SemiCondensed', sans-serif; font-size: 20px; color: var(--af-txt); margin: 0; }
.af-tx-empty-cta p { color: var(--af-dim); max-width: 440px; margin: 0; font-size: 12px; line-height: 1.5; }
.af-tx-empty-cta .cta-big {
    background: var(--af-amber); color: #1a1300; border: 0;
    font-family: inherit; font-weight: 700; font-size: 16px; letter-spacing: 0.05em;
    padding: 16px 36px; border-radius: 8px; cursor: pointer;
    box-shadow: 0 10px 30px rgba(255,170,0,.28);
    display: inline-flex; align-items: center; gap: 12px;
    transition: transform .12s, box-shadow .12s;
}
.af-tx-empty-cta .cta-big:hover { transform: translateY(-2px); box-shadow: 0 14px 38px rgba(255,170,0,.42); }
.af-tx-empty-cta .cta-big .plus { font-size: 21px; }

/* ===== Compact telex transmission strip (dampened cover) ===== */
.af-tx-cover {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
    background: linear-gradient(90deg, #13161e, #0d1016);
    border: 1px solid var(--af-line);
    border-left: 3px solid var(--af-amber);
    border-radius: 5px;
    padding: 9px 16px;
    margin: 0 0 16px;
    font-size: 11px;
    color: var(--af-dim);
    letter-spacing: 0.04em;
}
.af-tx-cover .tg { color: var(--af-amber); font-weight: 700; letter-spacing: 0.08em; }
.af-tx-cover b { color: var(--af-txt); font-weight: 700; }
.af-tx-cover .sep { color: var(--af-line2); }
.af-tx-cover .rec { color: var(--af-dimmer); letter-spacing: 0.06em; }

/* The big paper-cover internals are no longer emitted; hide any stragglers */
.af-tx-cover-hd, .af-tx-cover .af-tx-ascii, .af-tx-cover .af-tx-line { display: none; }

/* Tear divider removed in dark theme */
.af-tx-tear { display: none; }

/* ===== Two-column layout: land | sea ===== */
.af-tx-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}
.af-tx-col { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.af-tx-col-label {
    font-family: 'Bahnschrift SemiCondensed', sans-serif;
    font-size: 12px;
    letter-spacing: 0.3em;
    color: var(--af-dim);
    padding: 2px 2px 2px;
    display: flex; align-items: center; gap: 10px;
    text-transform: uppercase;
}
.af-tx-col-label span { color: var(--af-dimmer); letter-spacing: 0.14em; }
.af-tx-col-label::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .25; }
.af-tx-col-label.land   { color: var(--af-land); }
.af-tx-col-label.marine { color: var(--af-sea); }

/* ===== Platform sheet (framed card) ===== */
.af-tx-sheet {
    position: relative;
    background: var(--af-panel);
    border: 1px solid var(--af-line2);
    border-top: 2px solid var(--af-land);
    border-radius: 8px;
    box-shadow: 0 0 0 4px rgba(155,191,90,.07), 0 14px 34px -18px rgba(0,0,0,.8);
    padding: 0 0 14px;
}
.af-tx-sheet.marine {
    border-top-color: var(--af-sea);
    box-shadow: 0 0 0 4px rgba(58,155,214,.07), 0 14px 34px -18px rgba(0,0,0,.8);
}
/* eyebrow tab on the top frame edge */
.af-tx-sheet .plat-eyebrow {
    position: absolute; top: -9px; left: 16px;
    background: var(--af-bg);
    color: var(--af-land);
    font-size: 9px; font-weight: 700; letter-spacing: 0.14em;
    padding: 1px 9px;
    border: 1px solid var(--af-land);
    border-radius: 3px;
}
.af-tx-sheet.marine .plat-eyebrow { color: var(--af-sea); border-color: var(--af-sea); }
/* corner brackets */
.af-tx-sheet::before, .af-tx-sheet::after {
    content: ''; position: absolute; width: 14px; height: 14px;
    pointer-events: none; border-color: var(--af-land); border-style: solid; opacity: .7;
}
.af-tx-sheet::before { top: -2px; right: -1px; border-width: 2px 2px 0 0; border-top-right-radius: 8px; }
.af-tx-sheet::after  { bottom: -1px; left: -1px; border-width: 0 0 2px 2px; border-bottom-left-radius: 8px; }
.af-tx-sheet.marine::before, .af-tx-sheet.marine::after { border-color: var(--af-sea); }

/* ===== Platform header ===== */
.af-tx-plat-head {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px 18px 13px;
    background: linear-gradient(180deg, rgba(155,191,90,.1), rgba(155,191,90,.02) 60%, transparent);
    border-bottom: 1px solid var(--af-line);
    border-radius: 7px 7px 0 0;
}
.af-tx-sheet.marine .af-tx-plat-head {
    background: linear-gradient(180deg, rgba(58,155,214,.1), rgba(58,155,214,.02) 60%, transparent);
}
.af-tx-plat-head .tag {
    background: var(--af-land); color: #0f1403;
    font-weight: 700; font-size: 12px; letter-spacing: 0.1em;
    padding: 6px 12px; border-radius: 4px;
    margin-top: 3px; flex: none;
}
.af-tx-sheet.marine .af-tx-plat-head .tag { background: var(--af-sea); color: #03101f; }
.af-tx-plat-head .name {
    font-family: 'Bahnschrift SemiCondensed', sans-serif;
    font-size: 30px; font-weight: 700; letter-spacing: 0.03em;
    line-height: 1.05; color: #fff;
    text-shadow: 0 2px 12px rgba(155,191,90,.4);
}
.af-tx-sheet.marine .af-tx-plat-head .name { text-shadow: 0 2px 12px rgba(58,155,214,.45); }
.af-tx-plat-head .name small {
    display: block; color: var(--af-dim); font-size: 11px; font-weight: 400;
    letter-spacing: 0.05em; font-family: 'JetBrains Mono', monospace; margin-top: 4px;
}
.af-tx-plat-head .meta {
    margin-left: auto; text-align: right;
    font-size: 10px; letter-spacing: 0.12em; color: var(--af-dim);
    line-height: 1.5; margin-top: 4px;
}
.af-tx-plat-head .meta b { color: var(--af-green); font-weight: 600; }

/* ===== Sheet body ===== */
.af-tx-body { padding: 14px 18px 0; }

/* Task block */
.af-tx-task {
    margin: 0 0 14px;
}
.af-tx-task-head {
    font-family: 'Bahnschrift SemiCondensed', sans-serif;
    font-size: 13px; letter-spacing: 0.1em;
    color: var(--af-amber);
    display: flex; align-items: baseline; gap: 10px;
    padding: 5px 0 7px;
    border-bottom: 1px solid var(--af-line);
    margin-bottom: 10px;
}
.af-tx-task-head small {
    margin-left: auto; color: var(--af-dim); font-weight: 500;
    font-size: 10px; letter-spacing: 0.14em;
    font-family: 'JetBrains Mono', monospace;
}

/* Flight group */
.af-tx-flight {
    border: 1px solid var(--af-line2);
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}
.af-tx-flight:last-child { margin-bottom: 4px; }
.af-tx-flight-row {
    display: flex; align-items: center; gap: 14px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(91,143,214,.07), transparent);
    border-bottom: 1px solid var(--af-line);
}
.af-tx-sheet.marine .af-tx-flight-row { background: linear-gradient(90deg, rgba(58,155,214,.08), transparent); }
.af-tx-flight-row .cs {
    font-family: 'Bahnschrift SemiCondensed', sans-serif;
    font-weight: 700; color: var(--af-txt);
    font-size: 16px; letter-spacing: 0.04em; min-width: 96px;
}
.af-tx-flight-row .ac { color: var(--af-blue); font-size: 12px; flex: 1; }
.af-tx-flight-row .qty { color: var(--af-dim); font-size: 12px; font-weight: 600; }
.af-tx-flight-row .seed {
    background: var(--af-amber-d); color: var(--af-amber);
    font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
    padding: 2px 7px; border-radius: 3px;
}
.af-tx-flight-row .st {
    color: var(--af-dim); font-size: 11px;
    border: 1px solid var(--af-line2); padding: 2px 8px; border-radius: 3px;
    letter-spacing: 0.04em;
}
.af-tx-flight-row .edit-btn,
.af-tx-flight-row .del-btn {
    appearance: none; background: transparent;
    border: 1px solid var(--af-line2); color: var(--af-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px; letter-spacing: 0.14em; font-weight: 600;
    padding: 4px 8px; border-radius: 3px; cursor: pointer; line-height: 1.2;
}
.af-tx-flight-row .edit-btn:hover { border-color: var(--af-amber); color: var(--af-amber); }
.af-tx-flight-row .edit-btn.open { border-color: var(--af-amber); color: var(--af-amber); background: rgba(255,170,0,.1); }
.af-tx-flight-row .del-btn:hover  { border-color: var(--af-red); color: var(--af-red); }

/* Departure strip */
.af-tx-flight-dep {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 14px;
    font-size: 10px; letter-spacing: 0.12em; color: var(--af-dim);
    border-bottom: 1px solid var(--af-line);
    background: var(--af-bg2);
}
.af-tx-flight-dep::before { content: 'DEP'; color: var(--af-dimmer); font-weight: 700; letter-spacing: 0.2em; }
.af-tx-sheet.marine .af-tx-flight-dep::before { content: 'LCH'; color: var(--af-sea); }
.af-tx-flight-dep .b { font-weight: 700; color: var(--af-txt); letter-spacing: 0.06em; }
.af-tx-flight-dep .icao { color: var(--af-dim); }
.af-tx-flight-dep .rwy { margin-left: auto; color: var(--af-dimmer); }

/* ===== Pilot slots ===== */
.af-tx-slots { padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.af-tx-slots .slot-row { display: flex; align-items: center; gap: 12px; }
.af-tx-slots .slot-number {
    color: var(--af-dimmer); font-size: 11px; width: 38px; flex: none;
    letter-spacing: 0.04em;
}

/* booked slot */
.af-tx-slots .slot-booked {
    flex: 1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    border: 1px solid var(--af-green);
    background: rgba(58,211,122,.06);
    border-radius: 5px;
    padding: 8px 12px;
}
.af-tx-slots .slot-pilot-name {
    color: var(--af-green); font-weight: 700; letter-spacing: 0.03em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px;
}
.af-tx-slots .slot-loadout,
.af-tx-slots .slot-release {
    background: transparent; border: 1px solid var(--af-line2); color: var(--af-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px; letter-spacing: 0.06em; font-weight: 600;
    padding: 4px 10px; border-radius: 3px; cursor: pointer; white-space: nowrap; line-height: 1.2;
    appearance: none;
}
.af-tx-slots .slot-loadout { margin-left: auto; border-color: var(--af-blue); color: var(--af-blue); }
.af-tx-slots .slot-loadout:hover { background: rgba(91,143,214,.14); }
.af-tx-slots .slot-loadout.slot-loadout-set { background: rgba(91,143,214,.16); }
.af-tx-slots .slot-release:hover { border-color: var(--af-red); color: var(--af-red); }

/* loadout summary chips under a booked pilot */
.af-tx-slots .slot-loadout-summary {
    flex-basis: 100%;
    display: flex; flex-wrap: wrap; gap: 4px; align-items: center;
}
.af-tx-slots .slot-loadout-summary .loadout-tag {
    font-size: 9.5px; letter-spacing: 0.04em; padding: 2px 7px; font-weight: 600;
    border: 1px solid var(--af-line2); color: var(--af-dim);
    background: rgba(255,255,255,.03); border-radius: 3px; line-height: 1.2;
}
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="ag-guided"]   { color: #e0b441; border-color: rgba(201,160,49,.5); background: rgba(201,160,49,.1); }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="ag-unguided"] { color: #d6a83a; border-color: rgba(201,160,49,.4); background: rgba(201,160,49,.07); }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="rockets"]     { color: #d6a83a; border-color: rgba(201,160,49,.4); background: rgba(201,160,49,.07); }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="aa"]          { color: #7aa6e0; border-color: rgba(91,143,214,.5); background: rgba(91,143,214,.1); }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="pods"]        { color: #d67ac6; border-color: rgba(180,80,160,.5); background: rgba(180,80,160,.1); }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="fuel"]        { color: #5fc28f; border-color: rgba(60,160,110,.5); background: rgba(60,160,110,.1); }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="aa"]::before          { content: '▴ '; }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="ag-guided"]::before   { content: '▼ '; }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="ag-unguided"]::before { content: '✚ '; }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="rockets"]::before     { content: '✚ '; }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="pods"]::before        { content: '◈ '; }
.af-tx-slots .slot-loadout-summary .loadout-tag[data-weapon-cat="fuel"]::before        { content: '◈ '; }

/* open slot — the clear "take this seat" CTA (proposal 5) */
.af-tx-slots .slot-empty {
    flex: 1; cursor: pointer;
    border: 1px dashed var(--af-amber); color: var(--af-amber);
    background: rgba(255,170,0,.04); border-radius: 5px;
    padding: 9px 14px; font-weight: 600; letter-spacing: 0.04em;
    display: flex; align-items: center; gap: 8px;
    transition: background .12s;
}
.af-tx-slots .slot-empty:hover { background: rgba(255,170,0,.12); }
.af-tx-slots .slot-empty::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: var(--af-amber); box-shadow: 0 0 0 0 rgba(255,170,0,.6);
    animation: af-tx-pulse 1.8s infinite;
}
@keyframes af-tx-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255,170,0,.5); }
    70%  { box-shadow: 0 0 0 8px rgba(255,170,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(255,170,0,0); }
}

/* slot pilot-name input row */
.af-tx-slots .slot-input-row { flex: 1; display: flex; gap: 6px; align-items: center; }
.af-tx-slots .slot-input-row input {
    flex: 1; min-width: 120px;
    background: var(--af-bg2); border: 1px solid var(--af-blue); border-radius: 4px;
    color: var(--af-txt); padding: 8px 10px;
    font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: 0.03em;
}
.af-tx-slots .slot-input-row input:focus { outline: none; border-color: var(--af-amber); }
.af-tx-slots .slot-input-row button {
    appearance: none; background: var(--af-amber); color: #1a1300;
    border: 0; border-radius: 4px;
    font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
    padding: 8px 14px; cursor: pointer; white-space: nowrap;
}
.af-tx-slots .slot-input-row button.slot-cancel {
    background: transparent; border: 1px solid var(--af-line2); color: var(--af-dim);
    padding: 8px 12px;
}
.af-tx-slots .slot-input-row button.slot-cancel:hover { border-color: var(--af-red); color: var(--af-red); }

/* ===== Add-flight button (proposal 5: prominent, above warehouse) ===== */
.af-tx-add {
    width: calc(100% - 36px);
    margin: 6px 18px 0;
    background: linear-gradient(90deg, rgba(255,170,0,.1), rgba(255,170,0,.02));
    border: 1px solid var(--af-amber); color: var(--af-amber);
    font-family: 'JetBrains Mono', monospace; font-weight: 700;
    font-size: 12px; letter-spacing: 0.06em;
    padding: 13px; border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: background .12s;
}
.af-tx-add::before { content: '+'; font-size: 18px; line-height: 1; }
.af-tx-add:hover { background: rgba(255,170,0,.18); }
.af-tx-cursor {
    display: inline-block; width: 7px; height: 12px;
    background: currentColor; animation: af-tx-blink 1s steps(2) infinite; vertical-align: -1px;
}
@keyframes af-tx-blink { 50% { opacity: 0; } }

/* ===== Inline add-flight form ===== */
.af-tx-form {
    display: none; gap: 8px; flex-wrap: wrap; align-items: center;
    margin: 10px 18px 0;
    padding: 12px 14px;
    border: 1px solid var(--af-amber);
    background: rgba(255,170,0,.04);
    border-radius: 6px;
}
.af-tx-form.is-open { display: flex; }
.af-tx-form input,
.af-tx-form select {
    font-family: 'JetBrains Mono', monospace; font-size: 12px;
    padding: 8px 10px;
    background: var(--af-bg2); border: 1px solid var(--af-line2); border-radius: 4px;
    color: var(--af-txt); letter-spacing: 0.03em;
}
.af-tx-form input:focus, .af-tx-form select:focus { outline: none; border-color: var(--af-amber); }
.af-tx-form .cs-input { width: 130px; }
.af-tx-form .ac-select { flex: 1; min-width: 180px; }
.af-tx-form .size-row { display: flex; gap: 6px; }
.af-tx-form .size-row label {
    font-size: 11px; letter-spacing: 0.06em; font-weight: 700;
    padding: 7px 11px; border: 1px solid var(--af-line2); border-radius: 4px;
    cursor: pointer; color: var(--af-dim);
}
.af-tx-form .size-row input { display: none; }
.af-tx-form .size-row label:has(input:checked) { background: var(--af-amber); color: #1a1300; border-color: var(--af-amber); }
.af-tx-form .form-btns { display: flex; gap: 6px; margin-left: auto; }
.af-tx-form .create-btn,
.af-tx-form .cancel-btn {
    appearance: none; font-family: 'JetBrains Mono', monospace; font-weight: 700;
    font-size: 12px; letter-spacing: 0.06em; padding: 8px 16px; border-radius: 4px; cursor: pointer;
}
.af-tx-form .create-btn { background: var(--af-amber); color: #1a1300; border: 0; }
.af-tx-form .create-btn:hover { background: #ffbb33; }
.af-tx-form .cancel-btn { background: transparent; border: 1px solid var(--af-line2); color: var(--af-dim); }
.af-tx-form .cancel-btn:hover { border-color: var(--af-red); color: var(--af-red); }

/* ===== Per-platform warehouse (collapsible) ===== */
.af-tx-wh {
    display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; row-gap: 6px;
    margin: 14px 18px 4px;
    padding: 12px 14px 10px;
    border: 1px solid var(--af-line);
    background: var(--af-bg2);
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--af-dim);
}
.af-tx-wh-group { min-width: 0; }
.af-tx-wh-grouphead {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 6px 4px;
    border: none; border-bottom: 1px solid var(--af-line2);
    font-family: 'Bahnschrift SemiCondensed', sans-serif;
    font-size: 13px; letter-spacing: 0.08em; color: var(--af-txt);
    background: transparent; cursor: pointer; text-align: left;
    transition: background .12s;
}
.af-tx-wh-grouphead:hover { background: rgba(255,255,255,.03); }
.af-tx-wh-chev { display: inline-block; width: 10px; font-size: 10px; line-height: 1; color: var(--af-dim); flex-shrink: 0; }
.af-tx-wh-chev::before { content: '\25B8'; }
.af-tx-wh-group.is-open .af-tx-wh-chev::before { content: '\25BE'; }
.af-tx-wh-grouphead .af-tx-wh-icon { font-size: 12px; line-height: 1; }
.af-tx-wh-grouphead[data-cat="aa"]          { color: #7aa6e0; }
.af-tx-wh-grouphead[data-cat="ag-guided"],
.af-tx-wh-grouphead[data-cat="ag-unguided"],
.af-tx-wh-grouphead[data-cat="rockets"]     { color: #e0b441; }
.af-tx-wh-grouphead[data-cat="pods"],
.af-tx-wh-grouphead[data-cat="fuel"]        { color: #d67ac6; }
.af-tx-wh-grouphead .af-tx-wh-grplbl { flex: 1; }
.af-tx-wh-grouphead .af-tx-wh-grpcnt { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; color: var(--af-dim); }
.af-tx-wh-grouprows { display: none; padding: 4px 4px 2px; }
.af-tx-wh-group.is-open .af-tx-wh-grouprows { display: block; }
.af-tx-wh-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    padding: 3px 0; border-bottom: 1px dotted var(--af-line);
}
.af-tx-wh-row:last-of-type { border-bottom: none; }
.af-tx-wh-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--af-txt); }
.af-tx-wh-qty { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: 0.04em; min-width: 38px; text-align: right; }
.af-tx-wh-qty.inf { color: #d67ac6; font-weight: 400; }
.af-tx-wh-qty.ok  { color: var(--af-txt); }
.af-tx-wh-qty.low { color: var(--af-amber); }
.af-tx-wh-qty.out { color: var(--af-red); }
.af-tx-wh-empty {
    grid-column: 1 / -1; text-align: center; font-style: italic;
    padding: 12px 0; color: var(--af-dimmer); font-size: 10px; letter-spacing: 0.1em;
}

/* Empty-sheet placeholder */
.af-tx-sheet-empty {
    margin: 6px 18px;
    padding: 16px 14px; text-align: center;
    font-size: 11px; color: var(--af-dimmer); letter-spacing: 0.14em;
    border: 1px dashed var(--af-line2); border-radius: 6px; font-style: italic;
}

/* Hide the legacy right-side warehouse panel on add-flight view (step 2) */
body:has(#add-flight-view.visible) #warehouse-panel { display: none !important; }
body:has(#add-flight-view.visible).warehouse-open .af-body { padding-right: 0 !important; }

/* ===== Advanced flight panel (kept) ===== */
.af-tx-flight .flight-adv-panel {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    margin: 0; padding: 12px 14px;
    background: var(--af-bg2);
    border-bottom: 1px solid var(--af-line);
}
.af-tx-flight .flight-adv-field { display: flex; flex-direction: column; gap: 3px; }
.af-tx-flight .flight-adv-lbl { color: var(--af-dim); font-size: 9px; letter-spacing: 0.12em; }
.af-tx-flight .flight-adv-panel input,
.af-tx-flight .flight-adv-panel select {
    background: var(--af-panel); color: var(--af-txt);
    border: 1px solid var(--af-line2); border-radius: 4px;
    font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 6px 8px;
}
.af-tx-flight .flight-adv-panel input:focus,
.af-tx-flight .flight-adv-panel select:focus { outline: none; border-color: var(--af-amber); }
.af-tx-flight .flight-adv-reset {
    align-self: end; background: transparent;
    border: 1px solid var(--af-line2); color: var(--af-dim);
    font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600; letter-spacing: 0.08em;
    padding: 6px 10px; border-radius: 4px; cursor: pointer;
}
.af-tx-flight .flight-adv-reset:hover { border-color: var(--af-red); color: var(--af-red); }

/* ============================================================ */
/* Counter-zoom: lobby scales body by resolution.                */
/* ============================================================ */
@media (max-width: 1366px) { body.lobby-view .af-telex-stage { zoom: 1.05; } }
@media (max-width: 1024px) { body.lobby-view .af-telex-stage { zoom: 1.12; } }

/* ============================================================ */
/*  MISSION REVIEW (step 3) — telex-paper review  (UNCHANGED)    */
/* ============================================================ */
.mission-review {
    position: fixed;
    top: var(--lobby-chrome-top, 150px);
    left: 0; right: 0; bottom: 68px;
    z-index: 1050;
    background:
        radial-gradient(ellipse at 50% 0, rgba(40,60,100,.25), transparent 60%),
        #0c0e14;
    border: 1px solid #1b1e28;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.mission-review.visible { display: flex; }
.mission-review::before {
    content: '';
    position: absolute; left: 0; right: 0; top: 0;
    height: 36px;
    background: linear-gradient(180deg, #1a2030 0%, #0a0c12 55%, #0c0e14 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,.6);
    z-index: 1;
    pointer-events: none;
}
.mr-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 50px 30px 30px;
    display: flex; justify-content: center;
    position: relative; z-index: 2;
}
.mr-sheet {
    width: 100%;
    max-width: 1180px;
    background:
        radial-gradient(circle, #0c0e14 0, #0c0e14 2px, rgba(12,14,20,.55) 3px, rgba(12,14,20,.15) 4px, rgba(12,14,20,0) 5px) left 14px top 14px / 26px 22px repeat-y,
        radial-gradient(circle, #0c0e14 0, #0c0e14 2px, rgba(12,14,20,.55) 3px, rgba(12,14,20,.15) 4px, rgba(12,14,20,0) 5px) right 14px top 14px / 26px 22px repeat-y,
        repeating-linear-gradient(180deg, transparent 0 4px, rgba(20,25,35,.04) 4px 5px),
        linear-gradient(180deg, #d0d2d6 0%, #dcdde1 30%, #d0d2d6 60%, #c0c2c7 100%);
    color: #18191d;
    padding: 28px 50px 50px;
    box-shadow:
        inset 0 -40px 60px -30px rgba(30,45,70,.25),
        0 0 0 1px rgba(40,55,80,.3),
        0 40px 50px -20px rgba(0,0,0,.7);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    position: relative;
}
/* Masthead */
.mr-hd {
    text-align: center;
    border-bottom: 2px dashed #2a2a2a;
    padding-bottom: 14px;
    margin-bottom: 18px;
}
.mr-hd-bang {
    font-size: 11px;
    letter-spacing: 0.24em;
    color: #8a2318;
    font-weight: 700;
}
.mr-hd-bang .bang { font-size: 15px; margin: 0 6px; }
.mr-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 48px;
    letter-spacing: 0.14em;
    color: #8a2318;
    line-height: 1;
    margin: 8px 0 6px;
}
.mr-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: #4a5060;
}
.mr-sub .sep { color: #8a8a90; margin: 0 4px; }

/* Stats row */
.mr-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 18px;
    border: 1px dashed #2b3140;
    background: rgba(255,255,255,.12);
}
.mr-stat {
    padding: 14px 18px;
    text-align: center;
    border-right: 1px dashed rgba(43,49,64,.35);
    display: flex; flex-direction: column; gap: 4px;
}
.mr-stat:last-child { border-right: none; }
.mr-stat b {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 40px;
    letter-spacing: 0.04em;
    color: #1a2b55;
    line-height: 1;
}
.mr-stat span {
    font-size: 10px;
    letter-spacing: 0.26em;
    color: #4a5060;
    font-weight: 600;
}

/* Meta strip */
.mr-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 18px;
    border-top: 1px solid #2b3140;
    border-bottom: 1px solid #2b3140;
}
.mr-meta-cell {
    padding: 10px 14px;
    border-right: 1px dashed rgba(43,49,64,.3);
    display: flex; flex-direction: column; gap: 2px;
}
.mr-meta-cell:last-child { border-right: none; }
.mr-meta-cell .k {
    font-size: 9px;
    letter-spacing: 0.28em;
    color: #4a5060;
    font-weight: 600;
}
.mr-meta-cell .v {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 0.06em;
    color: #1a1a1c;
    line-height: 1.1;
}

/* Sections */
.mr-section {
    margin-top: 18px;
}
.mr-section-h {
    background: #c9a031;
    color: #14181f;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    letter-spacing: 0.18em;
    padding: 5px 12px 3px;
    border-bottom: 2px solid #14181f;
    display: flex; align-items: baseline; gap: 10px;
    line-height: 1;
    margin-bottom: 10px;
}
.mr-objective {
    font-size: 13px;
    line-height: 1.6;
    color: #1a1a1c;
    padding: 6px 4px;
}

/* Roster */
.mv-roster {
    display: flex; flex-direction: column;
    gap: 12px;
}
.mv-task-block {
    border: 1px dashed #2b3140;
    padding: 10px 12px;
    background: rgba(255,255,255,.12);
}
.mv-task-header {
    display: flex; align-items: baseline; gap: 10px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(43,49,64,.35);
}
.mv-task-chip {
    background: var(--task-color, #c9a031);
    color: #14181f;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 13px;
    letter-spacing: 0.18em;
    padding: 3px 8px 1px;
    line-height: 1;
}
.mv-task-desc {
    font-size: 10px;
    letter-spacing: 0.22em;
    color: #4a5060;
    font-weight: 600;
    flex: 1;
}
.mv-task-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.2em;
    color: #4a5060;
    font-weight: 600;
}
.mv-flight-row {
    display: grid;
    grid-template-columns: 130px 160px 60px 1fr;
    gap: 10px;
    align-items: baseline;
    padding: 5px 0;
    border-bottom: 1px dotted rgba(43,49,64,.2);
    font-size: 11px;
}
.mv-flight-row:last-child { border-bottom: none; }
.mv-flight-cs {
    font-family: 'Bebas Neue', sans-serif;
    color: #1a2b55;
    letter-spacing: 0.08em;
    font-size: 18px;
    line-height: 1;
}
.mv-flight-ac { color: #1a1a1c; }
.mv-flight-slots {
    font-family: 'JetBrains Mono', monospace;
    color: #1a1a1c;
    font-weight: 700;
}
.mv-flight-pilots {
    color: #4a5060;
    font-size: 11px;
}
.mv-flight-pilots .mv-open {
    color: #808490;
    font-style: italic;
}

.mr-empty {
    text-align: center;
    padding: 20px 14px;
    color: #5a5a62;
    font-style: italic;
    font-size: 12px;
    letter-spacing: 0.14em;
    border: 1px dashed rgba(43,49,64,.4);
}

/* Footer with CTA */
.mr-footer {
    flex-shrink: 0;
    padding: 14px 30px;
    background: linear-gradient(180deg, #12151d 0%, #0a0c12 100%);
    border-top: 1px solid #1f2430;
    display: flex; justify-content: space-between; align-items: center;
    gap: 20px;
    position: relative; z-index: 2;
}
.mr-footer-info { display: flex; flex-direction: column; gap: 3px; }
.mr-footer-lbl {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    letter-spacing: 0.26em;
    color: #c9a031;
}
.mr-footer-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    color: #6a6458;
}
.mr-cta {
    appearance: none;
    display: inline-flex; align-items: center; gap: 14px;
    padding: 12px 34px;
    background: #ff9500;
    border: 1px solid #ff9500;
    color: #14181f;
    font-family: var(--font-heading);
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s;
}
.mr-cta:hover { background: #e8940a; }
.mr-cta .play { color: #14181f; font-size: 14px; line-height: 1; }
