/* ═══════════════════════════════════════════════════════════
   NavCheck - Aerospace Professional Design System
   ═══════════════════════════════════════════════════════════ */

:root {
    /* Palette — derived from logo blue tones */
    --navy-900: #0a1628;
    --navy-800: #0f2035;
    --navy-700: #152d48;
    --navy-600: #1a3a5c;
    --navy-500: #1e4d7b;
    --slate-900: #1e293b;
    --slate-800: #2d3a4f;
    --slate-700: #3d4f66;
    --slate-600: #526580;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    --sky-500: #0ea5e9;
    --sky-400: #38bdf8;
    --sky-300: #7dd3fc;
    --sky-200: #bae6fd;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    --red-500: #ef4444;
    --red-400: #f87171;
    --white: #ffffff;

    /* Semantic tokens */
    --bg-page: var(--slate-100);
    --bg-card: var(--white);
    --bg-card-hover: var(--slate-50);
    --border-card: var(--slate-200);
    --text-primary: var(--slate-900);
    --text-secondary: var(--slate-600);
    --text-muted: var(--slate-500);
    --accent: var(--sky-500);
    --accent-hover: var(--sky-400);

    /* Typography */
    --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.15);
}

/* ─── Base ─────────────────────────────────────────────── */

body {
    font-family: var(--font-ui);
    background-color: var(--bg-page);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--slate-200);
}

/* ─── Navbar ───────────────────────────────────────────── */

.navbar {
    /* Steel slate one stop lighter than navy-900/800/700 - logo darks
     * (plane silhouette, arrow, continent outlines) read cleanly against
     * this mid-slate range while keeping the bar professional dark. */
    background: linear-gradient(180deg, #526580 0%, #3d4f66 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset,
                0 2px 8px rgba(0, 0, 0, 0.2);
    padding: 0.4rem 1rem;
    border-bottom: 1px solid #64748b;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    padding: 0.25rem 0;
}

.brand-text {
    color: var(--white);
}

.brand-accent {
    color: var(--sky-400);
    font-weight: 300;
}

.brand-version {
    font-size: 0.55rem;
    color: rgba(255,255,255,0.4);
    margin-left: 6px;
    align-self: flex-end;
    margin-bottom: 2px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Online/offline indicators */
.online-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #16a34a;
    font-size: 0;
    transition: background 0.3s;
}
.online-status-dot:not(:empty) {
    width: auto;
    height: auto;
    border-radius: 0.25rem;
    padding: 1px 6px;
    font-size: 0.65rem;
    font-weight: 600;
    color: #fff;
}
.offline-queue-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 0.25rem;
    background: #f59e0b;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    animation: pulse-badge 2s ease-in-out infinite;
}
@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.navbar-brand img {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.2s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-icon {
    margin-right: 5px;
    opacity: 0.7;
    vertical-align: -2px;
}

.navbar .nav-link {
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: var(--radius-sm);
    margin: 0 1px;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.75);
    position: relative;
}

.navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.navbar .nav-link:hover .nav-icon {
    opacity: 1;
}

.navbar .nav-link.active {
    font-weight: 600;
    color: var(--white);
    background-color: rgba(14, 165, 233, 0.15);
}

.navbar .nav-link.active .nav-icon {
    opacity: 1;
    color: var(--sky-400);
}

.navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--sky-400);
    border-radius: 1px;
}

/* Navbar mission selector */
.navbar-mission-ctx {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mission-selector {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 0 4px 0 10px;
    transition: all 0.2s ease;
    position: relative;
}

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

.mission-selector:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--sky-400);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.mission-selector-icon {
    color: var(--sky-400);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.mission-selector-select {
    background: transparent;
    color: var(--white);
    border: none;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: var(--font-ui);
    padding: 0.375rem 0.5rem;
    min-width: 170px;
    max-width: 260px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 22px;
}

.mission-selector-select:focus {
    outline: none;
}

.mission-selector-select option {
    background-color: var(--navy-900);
    color: var(--white);
    font-size: 0.875rem;
}

.btn-new-mission {
    background: rgba(14, 165, 233, 0.2);
    color: var(--sky-300);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.375rem 0.875rem;
    transition: all 0.2s ease;
}

.btn-new-mission:hover {
    background: rgba(14, 165, 233, 0.3);
    color: var(--white);
    border-color: var(--sky-400);
    box-shadow: var(--shadow-glow);
}

.nav-logout-btn {
    color: rgba(255, 255, 255, 0.5) !important;
    padding: 0.375rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.nav-logout-btn:hover {
    color: var(--white) !important;
    background: rgba(255, 255, 255, 0.08);
}

/* ─── Cards ────────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--slate-50);
    border-bottom: 1px solid var(--border-card);
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
    padding: 0.75rem 1rem;
}

.card-header h5 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.card-body h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

/* ─── Dashboard Stat Cards ─────────────────────────────── */

.stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    transition: all 0.25s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--sky-500), var(--sky-400));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    font-family: var(--font-mono);
    letter-spacing: -0.03em;
    color: var(--navy-700);
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-card .stat-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--slate-100);
    color: var(--slate-500);
}

.stat-card .stat-unit {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-left: 0.2em;
    letter-spacing: 0;
}

.stat-card .stat-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Hero stat card (Next Mission) */
.stat-card--hero {
    background: linear-gradient(145deg, var(--navy-900), var(--navy-700));
    border-color: var(--navy-600);
    height: 100%;
    display: flex;
    align-items: center;
}

.stat-card--hero .stat-label {
    color: var(--sky-300);
}

.stat-card--hero .stat-value,
.stat-card--hero .stat-value--hero {
    color: var(--white);
    font-size: 2.75rem;
}

.stat-card--hero .stat-meta {
    color: var(--slate-400);
}

.stat-card--hero::before {
    background: linear-gradient(90deg, var(--sky-400), var(--amber-400));
    opacity: 1;
    height: 3px;
}

.stat-card--hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(10, 22, 40, 0.3);
}

.stat-icon--hero {
    background: rgba(14, 165, 233, 0.15) !important;
    color: var(--sky-400) !important;
}

/* ─── Dashboard mission progress cards ─────────────────── */

.dash-stop-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dash-stop-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 0.35rem 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid var(--slate-200, #e2e8f0);
    background: var(--slate-50, #f8fafc);
    min-width: 68px;
    transition: border-color 0.2s;
}

.dash-stop-card--done {
    border-color: #16a34a;
    background: #f0fdf4;
}

.dash-stop-card--rev {
    border-color: #d97706;
}

.dash-stop-ring {
    width: 48px;
    height: 48px;
}

.dash-stop-label {
    font-size: 0.75rem;
    line-height: 1;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 3px;
}

.dash-stop-ctl {
    font-size: 0.55rem;
    color: var(--slate-400, #94a3b8);
    font-weight: 600;
}

.dash-stop-rev {
    font-size: 0.55rem;
    color: #d97706;
    font-weight: 700;
    background: #fef3c7;
    padding: 0 3px;
    border-radius: 2px;
}

.dash-stop-icons {
    display: flex;
    gap: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
}

/* ─── Tables ───────────────────────────────────────────── */

.table {
    font-size: 0.875rem;
}

.table > :not(caption) > * > * {
    padding: 0.625rem 0.75rem;
}

.table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--slate-200);
    background: var(--slate-50);
}

.table-success {
    background-color: rgba(16, 185, 129, 0.08) !important;
}

/* ─── Details Table (Aerodromes) ───────────────────────── */

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

.details-table th,
.details-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--slate-200);
    vertical-align: middle;
}

.details-table th {
    width: 150px;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.details-table td .form-control,
.details-table td .form-select {
    max-width: 220px;
}

/* ─── Forms ────────────────────────────────────────────── */

.form-control,
.form-select {
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--sky-500);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.form-control-sm,
.form-select-sm {
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
}

.form-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label-sm {
    font-size: 0.75rem;
}

.form-check-input:checked {
    background-color: var(--sky-500);
    border-color: var(--sky-500);
}

/* ─── Buttons ──────────────────────────────────────────── */

.btn {
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sky-500), var(--navy-500));
    border-color: var(--sky-500);
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--sky-400), var(--navy-600));
    box-shadow: var(--shadow-sm);
}

.btn-outline-primary {
    color: var(--sky-500);
    border-color: var(--sky-500);
}

.btn-outline-primary:hover {
    background: var(--sky-500);
    border-color: var(--sky-500);
    box-shadow: var(--shadow-sm);
}

.btn-outline-danger {
    font-size: 0.9375rem;
}

.btn-sm {
    font-size: 0.9375rem;
    border-radius: var(--radius-sm);
}

/* ─── Badges ───────────────────────────────────────────── */

.badge {
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    border-radius: var(--radius-sm);
}

.badge + .badge {
    margin-left: 0.25rem;
}

.badge.bg-success {
    background: linear-gradient(135deg, var(--emerald-500), #059669) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--sky-500), var(--navy-500)) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, var(--red-500), #dc2626) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, var(--amber-500), #d97706) !important;
}

/* ─── Tabs — dossier folder style ───────────────────────
   Active tab rises forward like a paper file-folder tab pulled out of
   the stack: white, top-corners rounded, a sky signal stripe across
   the top edge that slides in on activation. Inactive tabs sit
   recessed behind, with a subtle inset shadow at the foot suggesting
   they're tucked under. One accent colour, one motion. */

.nav-tabs {
    border-bottom: 1px solid var(--slate-300);
    gap: 3px;
    padding-left: 4px;
    margin-bottom: 0;
    align-items: flex-end;
}

.nav-tabs .nav-item {
    margin-bottom: -1px; /* overlap the strip's bottom border */
}

.nav-tabs .nav-link {
    position: relative;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-feature-settings: 'tnum' 1, 'cv11' 1;
    padding: 0.55rem 1.2rem 0.5rem;
    border: 1px solid var(--slate-300);
    border-bottom-color: transparent;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, #eef1f4 0%, #dde2e7 100%);
    box-shadow:
        inset 0 -4px 6px -3px rgba(15, 23, 42, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        background 180ms ease,
        color 180ms ease;
    margin: 0;
    overflow: hidden;
}

.nav-tabs .nav-link:hover:not(.active) {
    color: var(--text-primary);
    background: linear-gradient(180deg, #f4f6f8 0%, #e3e7eb 100%);
    transform: translateY(-1px);
}

.nav-tabs .nav-link.active {
    color: var(--text-primary);
    font-weight: 600;
    background: #ffffff;
    border-color: var(--slate-300);
    border-bottom-color: #ffffff;
    box-shadow:
        0 -1px 2px rgba(15, 23, 42, 0.05),
        -1px 0 2px rgba(15, 23, 42, 0.04),
        1px 0 2px rgba(15, 23, 42, 0.04);
    transform: translateY(0);
    z-index: 2;
}

/* The signal stripe — slides in from left when a tab activates. */
.nav-tabs .nav-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--sky-500);
    transform-origin: left center;
    animation: tab-stripe-in 240ms ease-out both;
}

@keyframes tab-stripe-in {
    0%   { transform: scaleX(0); }
    100% { transform: scaleX(1); }
}

/* Inner badges (S/F/T markers) shouldn't inherit the tab's letter-spacing or uppercase. */
.nav-tabs .nav-link .badge {
    letter-spacing: 0;
    text-transform: none;
    margin-left: 0.4em;
}

@media (prefers-reduced-motion: reduce) {
    .nav-tabs .nav-link,
    .nav-tabs .nav-link.active::before {
        transition: none;
        animation: none;
    }
}

/* ─── Alerts ───────────────────────────────────────────── */

.alert {
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    border: none;
    box-shadow: var(--shadow-xs);
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    color: #92400e;
    border-left: 4px solid var(--amber-500);
}

.alert-info {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: #0c4a6e;
    border-left: 4px solid var(--sky-500);
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #991b1b;
    border-left: 4px solid var(--red-500);
}

#alert-banner .alert {
    margin-bottom: 0;
    border-radius: 0;
}

/* ─── Modals ───────────────────────────────────────────── */

.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
}

.modal-header {
    border-bottom: 1px solid var(--slate-200);
    padding: 1rem 1.25rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.0625rem;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    border-top: 1px solid var(--slate-200);
    padding: 0.75rem 1.25rem;
}

/* ─── Procedure Details ────────────────────────────────── */

.procedure-details {
    background-color: var(--slate-50);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
}

.procedure-details h5 {
    color: var(--sky-500);
    margin-bottom: 1rem;
}

.procedure-item {
    border-left: 3px solid var(--sky-500);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.procedure-item:last-child {
    margin-bottom: 0;
}

.procedure-url {
    word-break: break-all;
}

/* ─── Expand/collapse ──────────────────────────────────── */

.expand-button {
    cursor: pointer;
    color: var(--sky-500);
}

.expand-button:hover {
    color: var(--navy-600);
}

/* ─── Mission Stops ────────────────────────────────────── */

.stop-card {
    border-left: 3px solid var(--sky-500);
    margin-bottom: 0.75rem;
}

.stop-card.active {
    border-left-color: var(--emerald-500);
    background-color: rgba(16, 185, 129, 0.03);
}

/* ─── Contact Fields ───────────────────────────────────── */

.contact-group label {
    font-size: 0.9375rem;
    margin-bottom: 0.15rem;
}

.contact-group .form-control {
    font-size: 0.9375rem;
}

/* ─── Scrollable Containers ────────────────────────────── */

.scrollable-list {
    max-height: 70vh;
    overflow-y: auto;
}

/* ─── Section Headers ──────────────────────────────────── */

h5.mt-3,
h5.mt-4 {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--slate-200);
}

/* ─── Route Badges (Drag & Drop) ───────────────────────── */

.route-draggable {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.route-draggable:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-sm);
}

/* ─── List Groups ──────────────────────────────────────── */

.list-group-item {
    border-color: var(--slate-200);
    transition: background-color 0.15s ease;
}

.list-group-item-action:hover {
    background-color: var(--slate-50);
}

/* ─── UTC Offset Display ───────────────────────────────── */

.utc-offset-display {
    font-size: 0.875rem;
    padding: 0.375rem 0.625rem;
    background: var(--slate-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--sky-500);
}

/* ─── Spinner ──────────────────────────────────────────── */

.spinner-border {
    color: var(--sky-500);
}

/* ─── Execution Progress Dots ─────────────────────────── */

.exec-progress {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.exec-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.exec-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    padding: 0.25rem 0.125rem;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
}

.exec-dot:hover {
    background: var(--slate-100);
}

.exec-dot-pip {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--slate-300);
    background: var(--white);
    transition: all 0.2s ease;
}

.exec-dot--filled .exec-dot-pip {
    border-color: var(--emerald-500);
    background: var(--emerald-500);
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.3);
}

.exec-dot-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--slate-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.2s ease;
}

.exec-dot--filled .exec-dot-label {
    color: var(--emerald-500);
}

.exec-progress-count {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
    padding-left: 0.5rem;
    border-left: 1px solid var(--slate-200);
}

/* ─── Selection / Focus ────────────────────────────────── */

::selection {
    background: rgba(14, 165, 233, 0.2);
    color: var(--text-primary);
}

/* ─── Scrollbar Styling ────────────────────────────────── */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: var(--slate-100);
}

::-webkit-scrollbar-thumb {
    background: var(--slate-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-500);
}

/* ─── Monospace Data ───────────────────────────────────── */

.font-mono {
    font-family: var(--font-mono);
}

/* ─── Animations ───────────────────────────────────────── */

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

#app-content {
    animation: fadeIn 0.25s ease;
}

/* ─── Responsive ───────────────────────────────────────── */

@media (max-width: 992px) {
    .navbar-mission-ctx {
        margin-top: 0.5rem;
        width: 100%;
    }

    .mission-selector {
        flex: 1;
    }

    .mission-selector-select {
        max-width: none;
        flex: 1;
    }
}

/* ─── Login Page ──────────────────────────────────────── */

.login-scene {
    position: fixed;
    inset: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-900);
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.login-topo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.login-card {
    position: relative;
    z-index: 1;
    width: 380px;
    max-width: 90vw;
}

.login-card-inner {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem 2rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.login-logo {
    filter: drop-shadow(0 4px 12px rgba(14, 165, 233, 0.2));
}

.login-title {
    color: var(--white);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.125rem;
}

.login-subtitle {
    color: var(--slate-400);
    font-size: 0.8125rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-label {
    color: var(--slate-300) !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
}

.login-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--white) !important;
    font-size: 0.9375rem !important;
    padding: 0.6rem 0.75rem !important;
    transition: all 0.2s ease;
}

.login-input::placeholder {
    color: var(--slate-500);
}

.login-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--sky-500) !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
}

.login-btn {
    background: linear-gradient(135deg, var(--sky-500), var(--navy-500));
    color: var(--white);
    border: 1px solid rgba(14, 165, 233, 0.4);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    padding: 0.625rem 1rem;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--sky-400), var(--navy-600));
    color: var(--white);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.25);
    transform: translateY(-1px);
}

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

/* Override alert styling inside login */
.login-card-inner .alert {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--red-400);
    border-left: none;
}

/* ─── Mission Params Sidebar ──────────────────────────── */

.mp-sidebar {
    background: var(--slate-50);
    border-right: 1px solid var(--slate-200);
    padding: 0.75rem 0.875rem;
    font-size: 0.8125rem;
    border-radius: 0 0 0 var(--radius-md);
}

.mp-field {
    margin-bottom: 0.5rem;
}

.mp-field--row {
    display: grid;
    grid-template-columns: 82px 1fr;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.mp-field--row .mp-label {
    margin-bottom: 0;
    white-space: nowrap;
}

.mp-control {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 0;
}

.mp-control > .form-control,
.mp-control > .form-select,
.mp-control > .mp-value--static {
    flex: 1 1 0;
    min-width: 0;
}

.mp-value--static {
    background: transparent;
    border-color: transparent;
    padding-left: 0;
    font-weight: 600;
}

.mp-update-btn {
    flex: 0 0 auto;
    padding: 0.15rem 0.5rem;
    font-size: 0.7rem;
    width: 88px;
    white-space: nowrap;
}

.mp-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--slate-400);
    line-height: 1;
    margin-bottom: 0.125rem;
}

.mp-value {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.mp-metrics {
    margin-top: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem;
    border-top: 1px solid var(--slate-200);
    padding-top: 0.625rem;
}

.mp-metric {
    background: var(--bg-card);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    padding: 0.375rem 0.5rem;
    text-align: center;
}

.mp-metric-value {
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.mp-metric-unit {
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--slate-400);
}

.mp-metric--total {
    background: var(--navy-800);
    border-color: var(--navy-700);
}

.mp-metric--total .mp-metric-value {
    color: var(--white);
}

.mp-metric--total .mp-metric-unit {
    color: var(--sky-300);
}

/* ─── Mission Header Bar ─────────────────────────────── */

.mission-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
}
.mission-header-bar h3 {
    font-size: 1.125rem;
    font-weight: 700;
}
.mission-header-actions {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* ─── Mission Overview 3-Column Grid ────────────────── */

.mission-overview-grid {
    display: grid;
    grid-template-columns: 25% 25% 1fr;
    gap: 0.75rem;
    min-height: 0;
}
.mo-col { min-width: 0; }

.mo-params-body {
    padding: 0.625rem 0.75rem;
    font-size: 0.8125rem;
    display: flex;
    flex-direction: column;
    height: calc(100% - 33px); /* subtract header height */
}

.stop-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    min-height: 0;
}

@media (max-width: 1100px) {
    .mission-overview-grid {
        grid-template-columns: 1fr 1fr;
    }
    .mo-col--map {
        grid-column: 1 / -1;
    }
    .mo-col--map .pt-panel { min-height: 260px; }
    .stop-overview-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stop-overview-grid .mo-col--map {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .mission-overview-grid,
    .stop-overview-grid {
        grid-template-columns: 1fr;
    }
    .mo-col--map .pt-panel { min-height: 240px; }
    .mission-header-bar { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
}

/* ─── Sticky Route Tabs ──────────────────────────────── */

/* ─── Planning Tasks Panel ────────────────────────────── */

.pt-panel {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    overflow: hidden;
}

.pt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
}

.pt-header h6 {
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--slate-600);
    border: none;
    padding: 0;
    margin: 0;
}

.pt-counter {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
    background: var(--slate-500);
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    letter-spacing: 0.02em;
}
.pt-counter--done {
    background: var(--emerald-500);
}

.pt-tasks {
    display: flex;
    flex-direction: column;
}

.pt-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--slate-100);
    gap: 0.75rem;
    transition: background 0.15s ease;
}

.pt-task:last-child {
    border-bottom: none;
}

.pt-task:hover {
    background: var(--slate-50);
}

.pt-task--placeholder {
    opacity: 0.5;
}

.pt-task-left {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    flex: 1;
}

.pt-task-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.pt-check {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.pt-task-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pt-task-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.pt-task-name--muted {
    color: var(--slate-400);
}

.pt-task-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-status {
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    white-space: nowrap;
}

.pt-status--pending {
    color: var(--slate-500);
    background: var(--slate-100);
}

.pt-status--done {
    color: var(--emerald-500);
    background: rgba(16, 185, 129, 0.08);
}

.pt-status--na {
    color: var(--slate-400);
    background: var(--slate-100);
    font-style: italic;
}

.pt-action-btn {
    font-size: 0.8125rem !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 4px;
    white-space: nowrap;
    min-width: 5.5rem;
    text-align: center;
}

/* ─── Execution Page — Airborne-Optimised ─────────────── */

/* Larger touch targets for all execution checkboxes */
#execution-root .form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0;
    cursor: pointer;
}

#execution-root .form-check-label {
    font-size: 0.875rem;
    padding-left: 0.25rem;
    cursor: pointer;
    line-height: 1.5rem;
}

#execution-root .form-check-inline {
    padding: 0.25rem 0.5rem;
    margin-right: 0.25rem;
}

/* Larger form controls for in-flight use */
#execution-root .form-control-sm,
#execution-root .form-select-sm {
    font-size: 16px; /* prevents iOS zoom on focus */
    padding: 0.375rem 0.5rem;
    min-height: 2.25rem;
}

#execution-root .input-group-sm > .input-group-text {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
}

/* Larger buttons for turbulence */
#execution-root .btn-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    min-height: 2.25rem;
    min-width: 2.25rem;
}

/* Card section headers — collapsible */
#execution-root .card-header {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    padding: 0.625rem 1rem;
}

#execution-root .card-header h6 {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

/* Section collapse chevron */
.exec-section-chevron {
    display: inline-block;
    width: 1.25rem;
    font-size: 0.75rem;
    -webkit-transition: -webkit-transform 0.2s;
    transition: transform 0.2s;
    color: var(--slate-400);
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
}

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

/* Warning highlights — stronger for airborne visibility */
#execution-root .bg-warning.bg-opacity-10 {
    background-color: rgba(245, 158, 11, 0.18) !important;
}

#execution-root .border-warning {
    border-width: 2px !important;
    border-color: var(--amber-500) !important;
}

/* Wider spacing between interactive rows */
#execution-root .card-body .d-flex.align-items-center.mb-1 {
    margin-bottom: 0.5rem !important;
    padding: 0.25rem 0;
}

/* Section card body base font */
#execution-root .card-body {
    font-size: 0.9375rem;
}

/* Runway coord section — stacked layout */
.exec-rwy-block {
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--slate-50);
}

.exec-rwy-block:last-child {
    margin-bottom: 0;
}

.exec-rwy-block--warning {
    border-color: var(--amber-500);
    border-width: 2px;
    background: rgba(245, 158, 11, 0.08);
}

.exec-rwy-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.exec-rwy-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.exec-rwy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* VSS section — stacked for readability */
.exec-vss-dir {
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: var(--slate-50);
}

.exec-vss-dir:last-child {
    margin-bottom: 0;
}

.exec-vss-dir--warning {
    border-color: var(--amber-500);
    border-width: 2px;
    background: rgba(245, 158, 11, 0.08);
}

.exec-vss-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Inline check row: left group + right-justified group on same line */
.exec-inline-check-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
}
.exec-inline-check-row .form-check-inline {
    margin-right: 0;
}
.exec-inline-check-row .form-check-input {
    margin-left: 0;
}
.exec-inline-check-left {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    white-space: nowrap;
}
.exec-inline-check-left > strong,
.exec-inline-check-right > strong,
.exec-inline-check-right > span > strong {
    margin-right: 0.25rem;
}
.exec-inline-check-right {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
    white-space: nowrap;
}

/* Route sequence tab badges */
.route-tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
}
.route-tab-btn {
    display: block;
    width: 6.5rem;
    box-sizing: border-box;
    border: 1px solid var(--slate-300);
    border-radius: 0.375rem;
    padding: 0.35rem 0.25rem;
    text-align: center;
    background: #fff;
    color: inherit;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.4;
    white-space: nowrap;
}
.route-tab-btn:hover {
    background: #f1f5f9;
}
.route-tab-btn.active {
    border-color: var(--blue-600, #2563eb);
    background: #eff6ff;
}
.route-tab-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}
.route-tab-date {
    display: block;
    color: #6b7280;
    font-size: 0.75rem;
}
.route-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    font-size: 0.55rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    flex-shrink: 0;
}
.route-tab-badge--num {
    background: #d1d5db;
    color: #374151;
}
.route-tab-badge--start {
    background: #16a34a;
}
.route-tab-badge--finish {
    background: #dc2626;
}
.route-tab-badge--tech {
    background: #f59e0b;
}

/* Flyability — aligned checkbox grid */
.exec-fly-row {
    margin-bottom: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

.exec-fly-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    min-width: 0;
}

.exec-fly-checks {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 0.125rem 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.exec-fly-checks > div {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

/* Obstacle rows — structured layout */
.exec-obs-row {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.exec-obs-top {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.exec-obs-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Discrepancy rows — structured */
.exec-disc-row {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-bottom: 0.75rem;
}

.exec-disc-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* ── Execution Responsive — iPad Mini + Mobile ────────── */

@media (max-width: 900px) {
    /* Single-column layout for all section pairs */
    #execution-root .row > .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Tighter progress bar */
    .exec-progress {
        padding: 0.375rem 0.5rem;
    }

    .exec-dot-label {
        font-size: 0.55rem;
    }

    /* Runway coords: keep lat+lon on same line, NOT full-width single column */
    .exec-rwy-inputs {
        grid-template-columns: 1fr 1fr;
    }

    /* Stack flyability checkboxes vertically */
    #execution-root .card-body .d-flex.flex-wrap.gap-2.gap-md-3 {
        flex-direction: column;
        gap: 0.375rem !important;
    }
}

@media (max-width: 600px) {
    .exec-dot-pip {
        width: 12px;
        height: 12px;
    }

    .exec-dot-label {
        display: none;
    }

    #execution-root .card-header h6 {
        font-size: 0.875rem;
    }
}

/* ── Review Page ─────────────────────────────────────────── */

.review-map-container {
    border-radius: 8px;
    overflow: hidden;
}

.review-aircraft-dot {
    width: 16px;
    height: 16px;
    background: #0ff;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}

.review-timeline-bar {
    position: relative;
    height: 32px;
    background: #1a1d23;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    overflow: hidden;
}

.review-timeline-track {
    position: absolute;
    inset: 0;
}

.review-timeline-segments {
    position: absolute;
    inset: 0;
}

.review-timeline-segment {
    position: absolute;
    top: 2px;
    bottom: 2px;
    background: rgba(255, 102, 0, 0.4);
    border: 1px solid rgba(255, 102, 0, 0.7);
    border-radius: 3px;
    font-size: 0.65rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}

.review-timeline-segment:hover {
    background: rgba(255, 102, 0, 0.6);
}

.review-timeline-approaches {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.review-timeline-approach-marker {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 0, 0.5);
    font-size: 0.55rem;
    color: #ff0;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    padding-top: 2px;
    transform: translateX(-50%);
}

.review-timeline-head {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #0ff;
    border-radius: 2px;
    z-index: 10;
    transform: translateX(-50%);
    pointer-events: none;
    box-shadow: 0 0 6px rgba(0, 255, 255, 0.5);
}

/* On-map control panel */
.review-map-panel {
    background: rgba(20, 22, 28, 0.92);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    color: #ddd;
    font-size: 0.8rem;
    min-width: 180px;
    max-width: 260px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
}

.review-panel-header {
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.review-panel-header strong {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.review-panel-chevron {
    font-size: 0.6rem;
    transition: transform 0.2s;
}

.review-panel--collapsed .review-panel-body { display: none; }
.review-panel--collapsed .review-panel-chevron { transform: rotate(-90deg); }

.review-panel-body {
    padding: 6px 10px 8px;
}

.review-panel-section {
    margin-bottom: 6px;
}

.review-panel-section:last-child { margin-bottom: 0; }

.review-panel-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 3px;
}

.review-panel-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 1px 0;
}

.review-panel-toggle input[type="checkbox"] {
    accent-color: #0ff;
    margin: 0;
}

.review-panel-toggle span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.review-panel-video-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
}

.review-panel-rwy {
    font-weight: 600;
    font-size: 0.75rem;
    min-width: 50px;
}

.review-panel-import-btn {
    font-size: 0.7rem;
    padding: 1px 6px;
    border: 1px solid rgba(0, 191, 255, 0.4);
    border-radius: 4px;
    color: #0bf;
    cursor: pointer;
    white-space: nowrap;
}

.review-panel-import-btn:hover {
    background: rgba(0, 191, 255, 0.15);
}

.review-panel-vid-status {
    font-size: 0.7rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Execution page edit-lock UI ------------------------------------ */
.exec-lock-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    font-size: 0.9rem;
}
.exec-lock-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.85em;
    border: 2px solid;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.exec-lock-toggle--view {
    background: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
}
.exec-lock-toggle--edit {
    background: #198754;
    color: #fff;
    border-color: #146c43;
}
/* View mode: disable all writes within #execution-root, except inside the
 * lock bar itself (so the toggle stays clickable) and the VSS dialog overlay
 * (read-only display already; close + runway switch remain usable). */
#execution-root.exec-view-mode :is(input, button, select, textarea):not(.exec-lock-bar *):not([data-allow-view-mode]):not(#vssGuidanceOverlay *) {
    pointer-events: none;
    opacity: 0.55;
}
#execution-root.exec-view-mode .form-check-input:not(.exec-lock-bar *):not([data-allow-view-mode]):not(#vssGuidanceOverlay *) {
    pointer-events: none;
}

/* ── External (read-only by default) user mode ──────────────
 * Backend enforces visibility + write blocks per-mission. These CSS hooks
 * hide controls in the UI so external users aren't confused by buttons
 * that would 403. The `external-hide` class is shown only to non-external
 * users; `admin-only` is shown only when body.admin-mode is set. */
body.external-mode .external-hide:not([data-external-allow]) {
    display: none !important;
}
body.external-mode #external-banner {
    display: block;
    background: #fff3cd;
    color: #664d03;
    border-bottom: 1px solid #ffecb5;
    padding: 4px 12px;
    font-size: 0.85em;
    text-align: center;
}
body:not(.external-mode) #external-banner {
    display: none;
}
body:not(.admin-mode) .admin-only {
    display: none !important;
}
