* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Landing background image is set in templates/index.html (Flask url_for → Background_v2.png). */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, rgba(10, 25, 41, 0.75) 0%, rgba(26, 47, 74, 0.7) 50%, rgba(44, 62, 80, 0.75) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #f5f7fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    padding-top: 67.5vh;
    text-align: center;
}

.auth-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.65rem;
    margin: 0 0 0.5rem;
    min-height: 2.25rem;
}

.auth-bar-guest,
.auth-bar-user {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.auth-bar-label {
    font-size: 0.88rem;
    color: rgba(245, 247, 250, 0.92);
    font-weight: 600;
}

.auth-bar-status {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.45);
}

.auth-bar-status.is-approved {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.45);
}

.auth-bar-status.is-rejected {
    background: rgba(248, 113, 113, 0.18);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.45);
}

.auth-bar-btn {
    min-width: auto !important;
    padding: 0.35rem 0.75rem !important;
    font-size: 0.82rem !important;
}

.auth-access-hint {
    margin: -2.5rem auto 1.5rem;
    max-width: 36rem;
    font-size: 0.9rem;
    color: rgba(252, 211, 77, 0.95);
}

.container .button-row .btn.is-auth-gated,
.container .button-row a.btn.is-auth-gated {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.25);
}

/* Controls the organisation's prerogatives do not grant: visible but inert.
   Pointer events stay enabled so the explanatory title tooltip still appears. */
.is-cap-gated,
.btn.is-cap-gated,
a.btn.is-cap-gated {
    opacity: 0.42;
    cursor: not-allowed;
    filter: grayscale(0.6);
}

.is-cap-gated:hover,
.btn.is-cap-gated:hover,
a.btn.is-cap-gated:hover {
    opacity: 0.42;
    transform: none;
    box-shadow: none;
}

.sadmin-hub-modal {
    width: min(98vw, 1600px) !important;
    max-width: 98vw !important;
    height: min(96vh, 1100px);
    max-height: 96vh;
    display: flex;
    flex-direction: column;
}

.sadmin-hub-modal .modal-body.sadmin-hub-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.sadmin-hub-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    min-height: 0;
    height: calc(96vh - 5.5rem);
}

.sadmin-hub-nav {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow-y: auto;
}

.sadmin-hub-nav-btn {
    text-align: left;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.35);
    background: rgba(15, 23, 42, 0.45);
    color: rgba(245, 247, 250, 0.9);
    cursor: pointer;
    font-weight: 600;
}

.sadmin-hub-nav-btn.is-active,
.sadmin-hub-nav-btn:hover {
    background: rgba(59, 130, 246, 0.28);
    border-color: rgba(147, 197, 253, 0.55);
}

.sadmin-hub-panels {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sadmin-hub-panel {
    display: none;
    text-align: left;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
    flex-direction: column;
}

.sadmin-hub-panel.is-active {
    display: flex;
}

.sadmin-hub-panel h3 {
    margin: 0;
}

.sadmin-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.65rem;
}

.sadmin-search {
    max-width: 280px;
    min-width: 180px;
}

.sadmin-hub-list {
    margin-top: 0.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.sadmin-hub-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(74, 144, 226, 0.28);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.35);
    cursor: pointer;
}

.sadmin-hub-row:hover {
    border-color: rgba(147, 197, 253, 0.55);
    background: rgba(30, 41, 59, 0.55);
}

.sadmin-hub-row.is-static {
    cursor: default;
}

.sadmin-user-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.85rem;
    font-size: 0.86rem;
    color: #e2e8f0;
    min-width: 0;
}

.sadmin-user-line strong {
    font-weight: 800;
}

.sadmin-user-line .muted {
    color: rgba(203, 213, 225, 0.78);
    font-size: 0.8rem;
}

.sadmin-role-tag {
    margin-left: 0.3rem;
    padding: 0.05rem 0.35rem;
    border-radius: 0.25rem;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.5);
    color: #7dd3fc;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.sadmin-hub-row-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1 1 auto;
}

.sadmin-hub-row-title {
    font-weight: 700;
    color: #e2e8f0;
}

.sadmin-hub-row-meta {
    font-size: 0.78rem;
    color: rgba(203, 213, 225, 0.8);
}

.sadmin-hub-row-actions {
    display: inline-flex;
    gap: 0.4rem;
    flex: 0 0 auto;
    flex-wrap: wrap;
}

.sadmin-hub-empty {
    color: rgba(203, 213, 225, 0.7);
    font-size: 0.88rem;
}

.sadmin-inline-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.sadmin-inline-fields .form-input {
    max-width: 200px;
}

.sadmin-org-airspaces {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: min(36vh, 320px);
    overflow-y: auto;
    margin: 0.5rem 0 1rem;
}

.sadmin-org-airspace {
    border: 1px solid rgba(74, 144, 226, 0.28);
    border-radius: 8px;
    padding: 0.55rem 0.7rem;
    background: rgba(15, 23, 42, 0.35);
}

.sadmin-org-airspace-ex {
    margin: 0.35rem 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sadmin-org-caps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.4rem 0.75rem;
    margin-bottom: 0.75rem;
}

.sadmin-org-cap {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.sadmin-org-cap-btn {
    justify-self: start;
    min-width: 11.5rem;
}

.sadmin-org-cap-btn.is-on {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.sadmin-mcp-log-row .sadmin-hub-row-meta {
    white-space: normal;
}

.sadmin-org-editor-modal {
    max-width: min(96vw, 980px);
}

@media (max-width: 720px) {
    .sadmin-hub-body {
        grid-template-columns: 1fr;
        height: auto;
        max-height: calc(96vh - 5rem);
        overflow: auto;
    }
    .sadmin-hub-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 300;
}

.button-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.25rem;
    margin: 4rem 0;
    flex-wrap: wrap;
}

/* Landing: equal height for side-by-side buttons (tallest sets row height) */
@media (min-width: 769px) {
    .container .button-row {
        align-items: stretch;
        flex-wrap: wrap;
    }
}

.button-row .btn-center {
    order: 1;
}

.button-row .btn-side {
    order: 2;
}

/* Landing page: wireframe metallic buttons with slow shine */
.container .button-row a.btn {
    text-decoration: none;
}

.container .button-row .btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #2a2d32 0%, #1c1e22 50%, #25282d 100%);
    border: 2px solid rgba(120, 125, 135, 0.6);
    border-radius: 6px;
    padding: 0.7rem 1rem;
    color: rgba(245, 247, 250, 0.95);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 0;
    width: 168px;
    max-width: 168px;
    min-height: 6.25rem;
    box-sizing: border-box;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 12px rgba(0, 0, 0, 0.4);
    flex: 0 0 168px;
}
.container .button-row .btn .btn-icon {
    font-size: 1.65rem;
}
.container .button-row .btn .btn-text {
    font-size: 0.88rem;
}
.container .button-row .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 60%,
        transparent 100%
    );
    animation: btn-shine 6s ease-in-out infinite;
}
@keyframes btn-shine {
    0% { left: -100%; }
    25% { left: 100%; }
    100% { left: 100%; }
}
.container .button-row .btn:hover {
    border-color: rgba(160, 165, 175, 0.8);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.35);
}
.container .button-row .btn .btn-icon,
.container .button-row .btn .btn-text,
.container .button-row .btn .btn-text-stack {
    position: relative;
    z-index: 1;
}

.container .button-row .btn .btn-text-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.container .button-row .btn .btn-text-line {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.15;
}

.container .button-row .btn .btn-text-line.btn-text-demo {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    opacity: 0.92;
}

footer .reg-mark {
    font-size: 0.65em;
    vertical-align: super;
    margin-left: 0.05em;
}

.btn {
    background: rgba(44, 62, 80, 0.8);
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    color: #f5f7fa;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-side {
    min-width: 200px;
    flex: 0 1 auto;
}

.btn-center {
    min-width: 220px;
    flex: 0 0 auto;
}

.btn-round {
    border-radius: 8px;
    min-width: 200px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn:active {
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 3rem;
    display: block;
}

.btn-text {
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-color: rgba(74, 144, 226, 0.5);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #357abd 0%, #2a5f94 100%);
    border-color: rgba(74, 144, 226, 0.8);
}

.btn-secondary {
    background: linear-gradient(135deg, #5ba3f5 0%, #4a90e2 100%);
    border-color: rgba(91, 163, 245, 0.5);
    color: #ffffff;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border-color: rgba(91, 163, 245, 0.8);
}

.btn-tertiary {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    border-color: rgba(0, 188, 212, 0.5);
    color: #ffffff;
}

.btn-tertiary:hover {
    background: linear-gradient(135deg, #0097a7 0%, #00838f 100%);
    border-color: rgba(0, 188, 212, 0.8);
}

.btn-success {
    background: linear-gradient(135deg, #ff8c42 0%, #ff6b1a 100%);
    border-color: rgba(255, 140, 66, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #ff6b1a 0%, #e55a0f 100%);
    border-color: rgba(255, 140, 66, 0.8);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border-color: rgba(231, 76, 60, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    border-color: rgba(231, 76, 60, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.btn-side {
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.9) 0%, rgba(53, 122, 189, 0.9) 100%);
    border-color: rgba(74, 144, 226, 0.5);
    color: #ffffff;
}

.btn-side:hover {
    background: linear-gradient(135deg, rgba(53, 122, 189, 1) 0%, rgba(42, 95, 148, 1) 100%);
    border-color: rgba(74, 144, 226, 0.8);
}

footer {
    margin-top: 3rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Stacked modal: Create Sub-Flow over Flow details */
#createSubFlowModal.create-sub-flow-modal {
    z-index: 1100;
}

#deleteSubFlowConfirmModal.delete-sub-flow-confirm-modal {
    z-index: 1150;
}

/* Edit Airspace: map right-click menu + click-to-place waypoint hint */
.sector-map-context-menu {
    position: fixed;
    z-index: 1400;
    min-width: 10rem;
    padding: 0.35rem 0;
    background: rgba(26, 47, 74, 0.98);
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.sector-map-context-menu-item {
    display: block;
    width: 100%;
    padding: 0.55rem 1rem;
    text-align: left;
    border: none;
    background: transparent;
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.95rem;
    cursor: pointer;
}

.sector-map-context-menu-item:hover {
    background: rgba(74, 144, 226, 0.25);
}

.sector-map-delete-route-disambig {
    position: fixed;
    z-index: 1410;
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 12rem;
    max-width: min(22rem, calc(100vw - 2rem));
    padding: 0.5rem;
    background: rgba(26, 47, 74, 0.98);
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.sector-map-delete-route-disambig-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    text-align: left;
    border: 1px solid rgba(74, 144, 226, 0.35);
    border-radius: 6px;
    background: rgba(10, 22, 40, 0.9);
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.95rem;
    cursor: pointer;
}

.sector-map-delete-route-disambig-item:hover {
    background: rgba(74, 144, 226, 0.35);
}

.sector-map-context-submenu-wrap {
    position: relative;
}

.sector-map-context-submenu-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    cursor: default;
    user-select: none;
    margin: 0;
}

.sector-map-context-submenu-parent:hover,
.sector-map-context-submenu-wrap:hover > .sector-map-context-submenu-parent {
    background: rgba(74, 144, 226, 0.25);
}

.sector-map-context-submenu-arrow {
    opacity: 0.75;
    font-size: 1.1rem;
    line-height: 1;
}

.sector-map-context-submenu {
    display: none;
    position: absolute;
    left: calc(100% - 6px);
    top: 0;
    min-width: 11rem;
    padding: 0.35rem 0;
    background: rgba(26, 47, 74, 0.98);
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    z-index: 1;
}

/* Direct child only so nested Airport Elements flyouts do not all open at once. */
.sector-map-context-submenu-wrap:hover > .sector-map-context-submenu {
    display: block;
}

.sector-map-context-submenu-flip .sector-map-context-submenu {
    left: auto;
    right: calc(100% - 6px);
}

.sector-map-context-submenu .sector-map-context-submenu-wrap > .sector-map-context-submenu-parent {
    width: 100%;
    box-sizing: border-box;
}

.sector-map-context-placeholder-item {
    opacity: 0.55;
    cursor: not-allowed;
}

.sector-map-bg-calib-panel {
    margin-top: 1rem;
}

.sector-map-bg-calib-hint {
    color: rgba(245, 247, 250, 0.92);
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.sector-map-bg-img-host {
    position: relative;
    width: 100%;
    min-height: 220px;
    max-height: min(52vh, 520px);
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border: 1px solid rgba(74, 144, 226, 0.35);
    overflow: hidden;
    margin-bottom: 1rem;
    touch-action: none;
}

.sector-map-bg-panzoom-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    will-change: transform;
    z-index: 0;
}

.sector-map-bg-calib-img {
    display: block;
    max-width: 100%;
    max-height: min(52vh, 520px);
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: crosshair;
    vertical-align: middle;
    pointer-events: auto;
    -webkit-user-select: none;
    user-select: none;
}

.sector-map-bg-calib-marker {
    position: absolute;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(230, 74, 25, 0.95);
    background: #ff8c42;
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    z-index: 3;
}

.sector-map-bg-calib-marker-dragging {
    cursor: grabbing;
}

.sector-map-bg-coord-block {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(26, 47, 74, 0.35);
    border: 1px solid rgba(74, 144, 226, 0.22);
}

.sector-map-bg-coord-block-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(245, 247, 250, 0.88);
    margin-bottom: 0.5rem;
}

.sector-map-bg-coord-row {
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 0.88fr) minmax(0, 1.1fr);
    gap: 0.65rem;
    align-items: end;
}

.sector-map-bg-coord-field-compact .form-input {
    max-width: 100%;
}

.sector-map-bg-coord-field-waypoint .form-input {
    max-width: 100%;
}

.sector-map-bg-wp-get-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0.45rem;
}

.sector-map-bg-wp-input {
    flex: 0 1 7.5rem;
    min-width: 4.5rem;
    max-width: 9rem;
}

.sector-map-bg-wp-get-btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.45rem 0.55rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

@media (max-width: 720px) {
    .sector-map-bg-coord-row {
        grid-template-columns: 1fr;
    }
}

.sector-map-bg-edit-pick-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: min(50vh, 360px);
    overflow-y: auto;
}

.sector-map-bg-edit-pick-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.35);
    background: rgba(26, 47, 74, 0.45);
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.sector-map-bg-edit-pick-item:hover {
    background: rgba(74, 144, 226, 0.22);
    border-color: rgba(74, 144, 226, 0.55);
}

#sectorMapBackgroundModal .sector-map-bg-modal-footer,
#sectorMapBackgroundPickEditModal .sector-map-bg-pick-edit-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

#sectorMapBackgroundModal .sector-map-bg-modal-footer .btn,
#sectorMapBackgroundPickEditModal .sector-map-bg-pick-edit-footer .btn,
#sectorMapBackgroundPickDeleteModal .sector-map-bg-pick-delete-footer .btn,
#sectorMapBackgroundConfirmDeleteOneModal .sector-map-bg-confirm-delete-footer .btn,
#sectorMapBackgroundConfirmDeleteAllModal .sector-map-bg-confirm-delete-all-footer .btn,
#sectorMapGroundLayerPickDeleteModal .sector-map-bg-pick-delete-footer .btn,
#sectorMapGroundLayerConfirmDeleteOneModal .sector-map-bg-confirm-delete-footer .btn,
#sectorMapGroundLayerConfirmDeleteAllModal .sector-map-bg-confirm-delete-all-footer .btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.2;
    min-height: 0;
    min-width: 120px;
}

#sectorMapBackgroundPickDeleteModal .sector-map-bg-pick-delete-footer,
#sectorMapBackgroundConfirmDeleteOneModal .sector-map-bg-confirm-delete-footer,
#sectorMapBackgroundConfirmDeleteAllModal .sector-map-bg-confirm-delete-all-footer,
#sectorMapGroundLayerPickDeleteModal .sector-map-bg-pick-delete-footer,
#sectorMapGroundLayerConfirmDeleteOneModal .sector-map-bg-confirm-delete-footer,
#sectorMapGroundLayerConfirmDeleteAllModal .sector-map-bg-confirm-delete-all-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

.sector-map-bg-confirm-delete-msg {
    margin: 0 0 0.25rem 0;
    color: rgba(245, 247, 250, 0.92);
    font-size: 1rem;
    line-height: 1.45;
}

.sector-map-context-submenu-item {
    white-space: nowrap;
}

.sector-map-placement-hint {
    position: fixed;
    z-index: 1399;
    pointer-events: none;
    padding: 0.35rem 0.6rem;
    max-width: min(90vw, 22rem);
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(74, 144, 226, 0.5);
    border-radius: 6px;
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.35;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* Overlays inside fullscreen sim (nested .modal siblings) must sit above radar/canvas */
#simulationModal > .modal.active {
    z-index: 1100;
}

/* Pop-ups over the sim: keep radar sharp; lighter dim than global .modal (0.7 → ~0.38) */
#simulationModal > .modal {
    background-color: rgba(0, 0, 0, 0.38);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#aiPpPttModal {
    z-index: 1300;
}

.modal.modal-discreet {
    background-color: transparent;
    backdrop-filter: none;
}

.modal.modal-discreet .modal-content {
    max-width: 340px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    border-color: rgba(74, 144, 226, 0.25);
}

.modal.modal-discreet .modal-header {
    padding: 0.9rem 1.1rem;
}

.modal.modal-discreet .modal-body {
    padding: 1rem 1.1rem;
}

.modal.modal-discreet .modal-header h2 {
    font-size: 1.05rem;
}

.simulation-debug-log-modal {
    /* Make the debug log window much wider for long lines */
    width: 95vw;
    max-width: 2700px !important;
}

.sim-debug-log-actions {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.sim-debug-log-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    line-height: 1.35;
    white-space: pre;
    resize: vertical;
}

.modal-content {
    background: linear-gradient(135deg, #1a2f4a 0%, #2c3e50 100%);
    margin: auto;
    padding: 0;
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 900px;
}

.playback-modal-content {
    width: min(96vw, 1200px);
    max-width: 1200px;
}

.playback-modal-body {
    min-height: 640px;
}

.playback-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 1rem;
    min-height: 600px;
}

.playback-recordings-panel,
.playback-viewer-panel {
    background: rgba(10, 18, 32, 0.45);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 12px;
    padding: 1rem;
}

.playback-panel-header,
.playback-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.playback-panel-header h3,
.playback-viewer-header h3 {
    margin: 0;
}

.playback-mini-btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
}

.playback-recordings-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: 540px;
    overflow-y: auto;
}

.playback-recording-item {
    border: 1px solid rgba(245, 247, 250, 0.12);
    border-radius: 10px;
    padding: 0.75rem;
    background: rgba(44, 62, 80, 0.45);
}

.playback-recording-title {
    font-weight: 700;
    color: #f5f7fa;
    margin-bottom: 0.25rem;
}

.playback-recording-meta {
    color: rgba(245, 247, 250, 0.65);
    font-size: 0.8rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.playback-recording-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.playback-recording-actions .btn {
    flex: 1;
    padding: 0.45rem 0.6rem;
    font-size: 0.85rem;
}

.playback-canvas-wrap {
    position: relative;
    width: 100%;
}

.playback-canvas {
    width: 100%;
    height: 520px;
    display: block;
    border-radius: 10px;
    border: 1px solid rgba(74, 144, 226, 0.25);
    background: #07111f;
}

.playback-controls {
    display: grid;
    grid-template-columns: auto auto auto auto 1fr auto;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.playback-controls .btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 30px;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    line-height: 1.1;
    gap: 0.25rem;
}

.playback-subtitles-overlay {
    position: absolute;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    pointer-events: none;
    z-index: 5;
    width: min(86%, 900px);
}

.playback-subtitle-item {
    max-width: 100%;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.playback-viewer-panel:fullscreen,
.playback-viewer-panel:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: #07111f;
}

.playback-viewer-panel:fullscreen .playback-canvas-wrap,
.playback-viewer-panel:-webkit-full-screen .playback-canvas-wrap {
    flex: 1 1 auto;
    min-height: 0;
}

.playback-viewer-panel:fullscreen .playback-canvas,
.playback-viewer-panel:-webkit-full-screen .playback-canvas {
    height: 100%;
    min-height: 0;
}

.playback-viewer-panel:fullscreen .playback-controls,
.playback-viewer-panel:-webkit-full-screen .playback-controls {
    flex: 0 0 auto;
}

.playback-scrub-bar {
    width: 100%;
}

.playback-time-label {
    min-width: 110px;
    text-align: right;
    color: rgba(245, 247, 250, 0.8);
    font-variant-numeric: tabular-nums;
}

/* Label editor: 5-column grid needs more width than default .modal-large (900px) */
#simulationLabelEditorModal .modal-content.sim-label-editor-modal {
    width: min(96vw, 1220px);
    max-width: min(96vw, 1220px);
}

.modal-small {
    max-width: 500px;
}

.modal-medium {
    max-width: 640px;
}

.run-type-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.run-type-option-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    text-align: left;
    width: 100%;
}

.run-type-join-list {
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
    background: rgba(26, 47, 74, 0.2);
}

.run-type-join-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.15);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.run-type-join-item:last-child {
    border-bottom: none;
}

.run-type-join-item:hover {
    background: rgba(74, 144, 226, 0.15);
}

.run-type-join-item.selected {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}

.start-session-lead {
    text-align: center;
    margin: 0 0 1.25rem 0;
}

.start-session-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.start-session-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    min-height: 11rem;
    padding: 1.5rem 1.25rem;
    background: rgba(44, 62, 80, 0.6);
    border: 2px solid rgba(74, 144, 226, 0.35);
    border-radius: 10px;
    color: #f5f7fa;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font: inherit;
}

.start-session-option-card:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.65);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
}

.start-session-option-card:focus {
    outline: none;
}

.start-session-option-card:focus-visible {
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.65);
}

.start-session-option-icon {
    font-size: 2rem;
    line-height: 1;
}

.start-session-option-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #f5f7fa;
}

.start-session-option-desc {
    font-size: 0.88rem;
    line-height: 1.35;
    color: rgba(245, 247, 250, 0.78);
    max-width: 16rem;
}

@media (max-width: 640px) {
    .start-session-options {
        grid-template-columns: 1fr;
    }
}

/* Join session: ATC sector + role picker */
.join-session-sector-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
    padding: 0.5rem;
    background: rgba(26, 47, 74, 0.2);
}

.join-session-sector-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
}

.join-session-sector-item:hover {
    background: rgba(74, 144, 226, 0.12);
}

.join-session-sector-item.selected {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.45);
}

.join-session-role-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.join-session-role-btn {
    min-width: 4.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(74, 144, 226, 0.45);
    background: rgba(44, 62, 80, 0.7);
    color: #f5f7fa;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.join-session-role-btn:hover:not(:disabled) {
    background: rgba(74, 144, 226, 0.35);
}

.join-session-role-btn.selected {
    background: rgba(34, 197, 94, 0.35);
    border-color: rgba(34, 197, 94, 0.7);
}

.join-session-role-btn.taken {
    background: #7f1d1d;
    border-color: #b91c1c;
    color: #fecaca;
    cursor: not-allowed;
    opacity: 0.95;
}

.join-session-role-btn:disabled {
    cursor: not-allowed;
}

.modal-fullscreen {
    max-width: 95vw;
    max-height: 95vh;
    width: 95vw;
    height: 95vh;
    display: flex;
    flex-direction: column;
}

/* When simulation is in fullscreen, only the main radar panel fills the screen; nested dialogs keep .modal-small / default sizing */
#simulationModal:fullscreen > .modal-content.modal-fullscreen,
#simulationModal:-webkit-full-screen > .modal-content.modal-fullscreen {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
    background: rgba(26, 47, 74, 0.5);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 600;
    color: #f5f7fa;
}

.edit-sector-header-leading {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
}

#editSectorModal .modal-header {
    gap: 1rem;
}

.sector-collab-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.45);
    color: #9be7b5;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}

.sector-collab-badge:hover {
    background: rgba(46, 204, 113, 0.25);
    border-color: rgba(46, 204, 113, 0.65);
}

.sector-collab-badge.hidden {
    display: none;
}

.sector-collab-chat-notify {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.15rem;
    color: #ffe082;
    font-size: 0.78rem;
    font-weight: 700;
}

.sector-collab-chat-notify.hidden {
    display: none;
}

.sector-collab-chat-notify-label {
    letter-spacing: 0.01em;
}

.sector-collab-chat-unread-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.28rem;
    border-radius: 999px;
    background: #e53935;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

#editSectorModal > .sector-collab-chat-panel {
    position: fixed;
    z-index: 10065;
    top: 7.5rem;
    left: 1.25rem;
    width: 20rem;
    max-height: min(70vh, 34rem);
    display: none;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    background: rgba(18, 22, 30, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    overflow: hidden;
}

#editSectorModal > .sector-collab-chat-panel.is-open {
    display: flex;
}

.sector-collab-chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.42rem 0.55rem 0.42rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(245, 247, 250, 0.95);
    background: rgba(46, 204, 113, 0.35);
    cursor: grab;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sector-collab-chat-panel-header:active {
    cursor: grabbing;
}

.sector-collab-chat-name-gate {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.7rem 0.7rem 0.8rem;
}

.sector-collab-chat-name-hint {
    margin: 0;
    color: rgba(245, 247, 250, 0.78);
    font-size: 0.74rem;
    line-height: 1.35;
    font-weight: 500;
}

.sector-collab-chat-name-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: rgba(245, 247, 250, 0.85);
    font-size: 0.72rem;
    font-weight: 600;
}

.sector-collab-chat-name-input,
.sector-collab-chat-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.28);
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.8rem;
    padding: 0.38rem 0.45rem;
}

.sector-collab-chat-name-continue {
    align-self: flex-end;
    font-size: 0.75rem !important;
    padding: 0.35rem 0.75rem !important;
    min-height: 0 !important;
}

.sector-collab-chat-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.sector-collab-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.55rem 0.6rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 12rem;
    max-height: min(42vh, 22rem);
    flex: 1;
}

.sector-collab-chat-empty {
    color: rgba(245, 247, 250, 0.45);
    font-size: 0.72rem;
    font-style: italic;
    padding: 0.35rem 0.1rem;
}

.sector-collab-chat-msg {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding: 0.3rem 0.4rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sector-collab-chat-msg.is-self {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.22);
}

.sector-collab-chat-msg-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.66rem;
    color: rgba(245, 247, 250, 0.55);
}

.sector-collab-chat-msg-name {
    font-weight: 700;
    color: rgba(155, 231, 181, 0.95);
}

.sector-collab-chat-msg-text {
    color: rgba(245, 247, 250, 0.92);
    font-size: 0.76rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

.sector-collab-chat-compose {
    display: flex;
    gap: 0.35rem;
    padding: 0.45rem 0.55rem 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sector-collab-chat-send {
    flex-shrink: 0;
    font-size: 0.72rem !important;
    padding: 0.35rem 0.65rem !important;
    min-height: 0 !important;
}

.sector-collab-badge-icon {
    color: #2ecc71;
    animation: sectorCollabPulse 2s ease-in-out infinite;
}

.sector-collab-autosave-hint {
    color: rgba(155, 231, 181, 0.85);
    font-weight: 500;
}

@keyframes sectorCollabPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.modal-footer {
    padding: 1.25rem 2rem;
    border-top: 2px solid rgba(74, 144, 226, 0.3);
    background: rgba(26, 47, 74, 0.35);
}

/* ATC Sectors modal: orange sector names, row Edit/Delete same height as Clear form, centered Close */
#atcSectorsModal .atc-sectors-existing-list .boundary-item {
    color: #f5f7fa;
}

#atcSectorsModal .atc-sectors-existing-list .boundary-points {
    color: #ff8c42;
    font-weight: 600;
}

#atcSectorsModal .atc-sectors-existing-list .boundary-actions .btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.2;
    min-height: 0;
    min-width: 5.5rem;
}

#atcSectorsModal .modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
}

#atcSectorsModal .modal-footer .btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.2;
    min-height: 0;
    min-width: 120px;
}

/* Airports modal: Add runway same height as top ADD; footer Close centered + compact */
#airportsModal .runways-header .btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.2;
    min-height: 0;
    min-width: 5.5rem;
}

#airportsModal .modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
}

#airportsModal .modal-footer .btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.2;
    min-height: 0;
    min-width: 120px;
}

/* Add Runway / Add Approach (incl. Edit Approach): footer buttons side-by-side, compact */
#addRunwayModal .modal-footer,
#addApproachModal .modal-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
}

#addRunwayModal .modal-footer .btn,
#addApproachModal .modal-footer .btn,
#addApproachModal #approachSequencePickFromScreenBtn.btn,
#addApproachModal #approachMissedSequencePickFromScreenBtn.btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.2;
    min-height: 0;
    min-width: 120px;
}

/* STCA Parameters modal: compact buttons (~1/3 default .btn height); Save + Close on one line */
#stcaParametersModal .stca-parameters-compact-btn.btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: calc(2.5rem / 3) calc(2rem / 3);
    font-size: 0.88rem;
    line-height: 1.2;
    min-height: 0;
}

#stcaParametersModal .modal-footer.stca-parameters-footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    padding: 1rem 1.25rem;
}

#stcaParametersModal .stca-parameters-footer .stca-parameters-compact-btn {
    min-width: 5.5rem;
}

/* Save all settings preset modal: same compact footer as STCA Parameters */
#saveSimSettingsPresetModal .save-sim-settings-preset-compact-btn.btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: calc(2.5rem / 3) calc(2rem / 3);
    font-size: 0.88rem;
    line-height: 1.2;
    min-height: 0;
}

#saveSimSettingsPresetModal .modal-footer.save-sim-settings-preset-footer {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: nowrap;
    padding: 1rem 1.25rem;
}

#saveSimSettingsPresetModal .save-sim-settings-preset-footer .save-sim-settings-preset-compact-btn {
    min-width: 5.5rem;
}

/* Edit Aircraft DB modal footer: compact, centered row */
#editAircraftDbModal .modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    flex-wrap: nowrap;
}

#editAircraftDbModal .modal-footer .btn {
    min-width: 0;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    line-height: 1.05;
}

@media (max-width: 520px) {
    #editAircraftDbModal .modal-footer {
        flex-wrap: wrap; /* fall back gracefully on very small screens */
    }
}

#editAirlinesDbModal .modal-footer,
#airlinesDbResetConfirmModal .modal-footer,
#airlinesDbResetCautionModal .modal-footer,
#airlinesDbUnsavedConfirmModal .modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    flex-wrap: nowrap;
}

.airlines-db-footer-btn,
.airlines-db-confirm-footer .btn {
    min-width: 0;
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
    line-height: 1.05;
}

@media (max-width: 520px) {
    #editAirlinesDbModal .modal-footer,
    #airlinesDbResetConfirmModal .modal-footer,
    #airlinesDbResetCautionModal .modal-footer,
    #airlinesDbUnsavedConfirmModal .modal-footer {
        flex-wrap: wrap;
    }
}

.airlines-db-search-wrap {
    margin-bottom: 0.75rem;
}

.airlines-db-search-field {
    position: relative;
}

.airlines-db-list-summary {
    margin: 0.5rem 0 0.65rem;
}

.airlines-db-table-wrap {
    max-height: min(52vh, 520px);
    overflow: auto;
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 6px;
    background: rgba(15, 28, 45, 0.55);
}

.airlines-db-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.airlines-db-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    padding: 0.55rem 0.85rem;
    background: rgba(26, 47, 74, 0.98);
    color: #c8d9ef;
    border-bottom: 1px solid rgba(74, 144, 226, 0.35);
    font-weight: 600;
}

.airlines-db-table tbody td {
    padding: 0.45rem 0.85rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.12);
    color: #f5f7fa;
    vertical-align: top;
}

.airlines-db-table tbody tr:hover {
    background: rgba(74, 144, 226, 0.12);
}

.airlines-db-table .airlines-db-code {
    width: 8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.04em;
    color: #9ec5ff;
}

.airlines-db-table .airlines-db-empty {
    text-align: center;
    color: #a8b8cc;
    font-style: italic;
}

.airlines-db-table tbody tr.airlines-db-row-modified {
    background: rgba(250, 204, 21, 0.18);
}

.airlines-db-table tbody tr.airlines-db-row-modified:hover {
    background: rgba(250, 204, 21, 0.26);
}

.airlines-db-table tbody tr.airlines-db-row-editing {
    background: rgba(74, 144, 226, 0.14);
}

.airlines-db-actions-col {
    width: 8.5rem;
    text-align: right;
}

.airlines-db-row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.airlines-db-table tbody tr:hover .airlines-db-row-actions,
.airlines-db-table tbody tr.airlines-db-row-editing .airlines-db-row-actions {
    opacity: 1;
    pointer-events: auto;
}

.airlines-db-mini-btn {
    padding: 0.28rem 0.55rem;
    font-size: 0.78rem;
    line-height: 1.1;
    min-width: 0;
}

.airlines-db-row-input {
    width: 100%;
    min-width: 0;
    padding: 0.35rem 0.5rem;
    font-size: 0.88rem;
}

/* Stop / Restart Simulation confirm modal footer: small side-by-side buttons */
#stopSimulationConfirmModal .modal-footer,
#restartSimulationConfirmModal .modal-footer,
#simulationConnectedUsersModal .modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    flex-wrap: nowrap;
}

#stopSimulationConfirmModal .modal-footer .btn,
#restartSimulationConfirmModal .modal-footer .btn,
#simulationConnectedUsersModal .modal-footer .btn {
    min-width: 120px;
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
    border-radius: 6px;
    line-height: 1.05;
}

/* Simulation Settings modal footer: small side-by-side buttons */
/* SIM Settings: sub-panel triggers — height ≈ 1/3 of default .btn (padding scaled; text stays readable) */
#simulationSettingsModal .sim-settings-subpanel-btn.btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    /* Default .btn uses 2.5rem vertical padding — use one-third per side */
    padding: calc(2.5rem / 3) calc(2rem / 3);
    font-size: 0.88rem;
    line-height: 1.2;
    min-height: 0;
}

#simulationSettingsModal .modal-footer.sim-settings-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 1rem 1.25rem;
}

#simulationSettingsModal .sim-settings-footer-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Sim Settings footer: distinct from default .btn (compact outline / pill style) */
#simulationSettingsModal .sim-settings-footer-btn {
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.2;
    padding: 0.45rem 1.1rem;
    min-width: 9.5rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.75);
    color: #e2e8f0;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#simulationSettingsModal .sim-settings-footer-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(186, 230, 253, 0.45);
    color: #f8fafc;
}

#simulationSettingsModal .sim-settings-footer-btn:active {
    transform: translateY(1px);
}

#simulationSettingsModal .sim-settings-footer-btn-save {
    border-color: rgba(34, 197, 94, 0.55);
    background: linear-gradient(180deg, rgba(22, 101, 52, 0.55) 0%, rgba(15, 23, 42, 0.85) 100%);
    color: #ecfdf5;
}

#simulationSettingsModal .sim-settings-footer-btn-save:hover {
    border-color: rgba(74, 222, 128, 0.75);
    background: linear-gradient(180deg, rgba(22, 101, 52, 0.72) 0%, rgba(15, 23, 42, 0.9) 100%);
}

#simulationSettingsModal .sim-settings-footer-btn-outline {
    border-color: rgba(96, 165, 250, 0.38);
    background: rgba(30, 58, 95, 0.45);
    color: #dbeafe;
}

#simulationSettingsModal .sim-settings-footer-btn-outline:hover {
    border-color: rgba(147, 197, 253, 0.55);
    background: rgba(30, 58, 95, 0.72);
}

#simulationSettingsModal .sim-settings-footer-btn:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.75);
    outline-offset: 2px;
}

/* Label editor (modal) */
#simulationLabelEditorModal .sim-label-cell-free-text {
    display: none !important;
}

.sim-label-setup-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 0.6rem;
}

.sim-label-setup-row.has-inline-save {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
}

.sim-label-setup-field {
    min-width: 0;
}

.sim-label-setup-actions-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.sim-label-setup-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sim-label-setup-save-wrap {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.sim-label-setup-save-spacer {
    visibility: hidden;
    margin-bottom: 0;
    line-height: 1.2;
    font-size: 0.875rem;
}

#simulationLabelEditorModal.admin-global-label-context .sim-label-editor-footer #saveLabelSetupBtn,
#simulationLabelEditorModal.admin-global-label-context .sim-label-editor-footer #deleteLabelSetupBtn {
    display: none;
}

#simulationLabelEditorModal.admin-global-label-context .sim-label-editor-footer {
    display: flex;
    justify-content: center;
}

#simulationLabelEditorModal.admin-global-label-context .admin-global-label-make-default-btn {
    display: inline-flex;
}

#simulationLabelEditorModal .admin-global-label-make-default-btn {
    display: none;
}

.admin-global-label-profile-row-select {
    display: grid;
    grid-template-columns: minmax(12rem, 1.1fr) minmax(0, 1.6fr) auto;
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.admin-global-label-profile-row-select:first-child {
    grid-template-columns: minmax(12rem, 1.1fr) minmax(0, 1.6fr);
}

.admin-global-label-profile-select {
    min-width: 0;
    width: 100%;
}

@media (max-width: 720px) {
    .admin-global-label-profile-row-select,
    .admin-global-label-profile-row-select:first-child {
        grid-template-columns: 1fr;
    }
}

#labelSetupSaveConfirmModal.active,
#labelSetupDeleteConfirmModal.active {
    z-index: 1230;
}

.label-setup-save-confirm-message {
    margin-bottom: 0;
}

.label-setup-save-confirm-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

#simulationLabelEditorModal .modal-footer.sim-label-editor-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
}

#simulationLabelEditorModal .sim-label-editor-footer .btn,
.sim-label-editor-action-btn {
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
    line-height: 1.05;
    min-width: 120px;
}

.sim-label-kind-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.15rem 0 0.7rem;
}

.sim-label-kind-tab {
    min-height: 32px;
}

.sim-label-kind-tab.is-active {
    background: rgba(34, 197, 94, 0.22) !important;
    border-color: rgba(34, 197, 94, 0.7) !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.14) inset;
}

.sim-label-grid-wrap {
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

#simulationLabelEditorModal .sim-label-grid-wrap {
    overflow-x: visible;
}

@media (max-width: 900px) {
    #simulationLabelEditorModal .sim-label-grid-wrap {
        overflow-x: auto;
    }
}

.sim-label-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
    min-width: 860px; /* ensure 5 columns are visible with scroll if needed */
}

.sim-label-cell {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

@media (max-width: 560px) {
    .sim-label-setup-row,
    .sim-label-setup-row.has-inline-save {
        grid-template-columns: 1fr;
    }
    .sim-label-grid {
        grid-template-columns: repeat(5, minmax(140px, 1fr));
        min-width: 760px;
    }
}

.modal-close {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 140, 66, 0.2);
    color: #ff8c42;
    transform: rotate(90deg);
}

.tower3d-editor-panel {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.65rem 0.75rem 0.5rem;
    margin: 0 0 0.85rem;
    background: rgba(15, 23, 42, 0.35);
}

/* Compact actions in 3D Tower building list. */
.tower3d-building-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex: 0 0 auto;
}

.tower3d-building-edit {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(30, 41, 59, 0.75);
    color: #e2e8f0;
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.2;
    cursor: pointer;
}

.tower3d-building-edit:hover {
    background: rgba(51, 65, 85, 0.95);
    border-color: rgba(148, 163, 184, 0.7);
}

.tower3d-ground-bg-row,
.sat-layer-priority-row {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    margin: 0.2rem 0;
}

.tower3d-ground-bg-label {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.tower3d-layer-move {
    appearance: none;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: rgba(30, 41, 59, 0.75);
    color: #e2e8f0;
    border-radius: 4px;
    padding: 0.12rem 0.4rem;
    font-size: 0.78rem;
    line-height: 1.2;
    cursor: pointer;
    min-width: 1.6rem;
}

.tower3d-layer-move:hover:not(:disabled) {
    background: rgba(51, 65, 85, 0.95);
    border-color: rgba(148, 163, 184, 0.7);
}

.tower3d-layer-move:disabled {
    opacity: 0.35;
    cursor: default;
}

.sat-layer-priority-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: min(50vh, 360px);
    overflow-y: auto;
}

.sat-layer-priority-row {
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.35);
    background: rgba(26, 47, 74, 0.45);
    margin: 0;
}

.sat-layer-priority-row .sat-layer-priority-name {
    flex: 1;
    min-width: 0;
}

.tower3d-building-delete {
    background: none;
    border: none;
    color: rgba(245, 247, 250, 0.85);
    font-size: 1.35rem;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
}

.tower3d-building-delete:hover {
    background: rgba(231, 76, 60, 0.25);
    color: #e74c3c;
}

.modal-body {
    padding: 2rem;
}

.settings-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
    justify-items: stretch;
}

.settings-col {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.settings-menu-wrap {
    position: relative;
    width: 100%;
}

.settings-main-btn,
.settings-secondary-btn {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1.1rem;
    font-size: 0.9rem;
}

.settings-submenu {
    position: absolute;
    top: calc(100% - 0.2rem);
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.55rem;
    background: rgba(18, 32, 52, 0.98);
    border: 1px solid rgba(74, 144, 226, 0.38);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.settings-menu-wrap::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 0.55rem;
}

.settings-menu-wrap:hover .settings-submenu,
.settings-menu-wrap:focus-within .settings-submenu {
    display: flex;
}

.settings-submenu-btn {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    text-align: left;
}

.settings-submenu-btn .btn-text {
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.settings-submenu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 1.5rem;
}

.settings-submenu-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.settings-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 0;
}

.settings-btn-icon svg {
    width: 2.75rem;
    height: 2.75rem;
}

.settings-buttons-grid .btn {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1.1rem;
    font-size: 0.9rem;
}

.settings-buttons-grid .settings-main-btn .btn-text,
.settings-buttons-grid .settings-secondary-btn .btn-text {
    font-size: 1.15rem;
}

@media (max-width: 640px) {
    .settings-buttons-grid {
        grid-template-columns: 1fr;
    }
}

.settings-export-import-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(74, 144, 226, 0.22);
}

.settings-export-import-row .settings-half-btn {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
}

.settings-admin-row {
    margin-top: 0.75rem;
}

.settings-admin-row .settings-admin-btn {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    font-size: 0.88rem;
}

.admin-modal-footer {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-modal-footer .btn {
    flex-direction: row;
    min-width: 110px;
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
}

.admin-error-text {
    color: #fca5a5;
    font-weight: 700;
    margin-top: 0.6rem;
}

.admin-message-text {
    font-weight: 700;
    margin-top: 0.6rem;
}

.admin-message-text.ok {
    color: #86efac;
}

.admin-message-text.error {
    color: #fca5a5;
}

.admin-ai-pilot-instructions-btn {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.9rem;
}

.admin-ai-support-list-title {
    margin: 1rem 0 0.5rem;
    font-size: 0.95rem;
}

.admin-ai-support-doc-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-height: 240px;
    overflow: auto;
}

.admin-ai-support-doc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.55rem;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 6px;
    font-size: 0.85rem;
}

.admin-ai-support-doc-row button {
    flex-shrink: 0;
}

.ai-support-hud {
    position: fixed;
    left: 50%;
    bottom: 2.4rem;
    transform: translateX(-50%);
    z-index: 12000;
    width: min(46rem, calc(100vw - 2.5rem));
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
}

.ai-support-recording {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.85rem;
    background: rgba(8, 12, 20, 0.82);
    border: 1px solid rgba(248, 113, 113, 0.55);
    border-radius: 999px;
    color: #fecaca;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.ai-support-rec-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 14px;
}

.ai-support-rec-bars i {
    display: block;
    width: 3px;
    height: 6px;
    background: #f87171;
    border-radius: 1px;
    animation: ai-support-eq 0.7s ease-in-out infinite;
}

.ai-support-rec-bars i:nth-child(2) { animation-delay: 0.1s; height: 10px; }
.ai-support-rec-bars i:nth-child(3) { animation-delay: 0.18s; height: 14px; }
.ai-support-rec-bars i:nth-child(4) { animation-delay: 0.28s; height: 8px; }

@keyframes ai-support-eq {
    0%, 100% { transform: scaleY(0.45); }
    50% { transform: scaleY(1); }
}

.ai-support-subtitle-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    padding: 0.4rem 0.55rem 0.4rem 0.4rem;
    background: rgba(8, 12, 20, 0.78);
    border-radius: 8px;
    pointer-events: none;
}

.ai-support-subtitle-text {
    color: #f8fafc;
    font-size: 1.05rem;
    line-height: 1.35;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

.ai-support-tts-btn {
    pointer-events: auto;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.12);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.ai-support-tts-btn:hover {
    background: rgba(248, 250, 252, 0.22);
}

.ai-support-tts-btn svg {
    width: 1.15rem;
    height: 1.15rem;
    display: block;
}

.ai-support-tts-btn.is-muted {
    color: #fca5a5;
}

.ai-support-subtitle-row[hidden],
.ai-support-subtitle[hidden],
.ai-support-recording[hidden],
.ai-support-hud[hidden],
.ai-support-tts-btn[hidden] {
    display: none !important;
}

.presentation-root {
    position: fixed;
    inset: 0;
    z-index: 25000;
    pointer-events: none;
}

.presentation-root[hidden] {
    display: none !important;
}

.presentation-card {
    pointer-events: auto;
    position: absolute;
    left: 50%;
    top: 12vh;
    transform: translateX(-50%);
    width: min(36rem, calc(100vw - 2rem));
    max-height: calc(100vh - 6.5rem);
    overflow: auto;
    padding: 1.35rem 1.5rem 1.15rem;
    background: rgba(8, 14, 26, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    text-align: left;
    min-height: 14rem;
}

.presentation-card[hidden] {
    display: none !important;
}

.presentation-card.is-loading .presentation-title,
.presentation-card.is-loading .presentation-body {
    visibility: hidden;
}

.presentation-subtitle {
    pointer-events: none;
    position: fixed;
    left: 50%;
    bottom: 5.4rem;
    transform: translateX(-50%);
    width: min(48rem, calc(100vw - 8.5rem));
    padding: 0.8rem 1.05rem;
    border-radius: 10px;
    background: rgba(8, 14, 26, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #f8fafc;
    font-size: 1.05rem;
    line-height: 1.45;
    text-align: center;
    z-index: 2;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.presentation-subtitle[hidden] {
    display: none !important;
}

.presentation-cursor {
    position: fixed;
    z-index: 5;
    width: 28px;
    height: 28px;
    margin-left: -3px;
    margin-top: -2px;
    pointer-events: none;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

.presentation-cursor[hidden] {
    display: none !important;
}

.presentation-cursor-ring {
    position: absolute;
    left: 2px;
    top: 1px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(250, 204, 21, 0.95);
    opacity: 0;
    transform: scale(0.4);
}

.presentation-cursor.is-clicking .presentation-cursor-ring {
    animation: presentation-cursor-click 0.4s ease-out;
}

@keyframes presentation-cursor-click {
    0% { opacity: 1; transform: scale(0.45); }
    100% { opacity: 0; transform: scale(2.4); }
}

.presentation-demo-target {
    outline: 3px solid #facc15 !important;
    outline-offset: 3px;
}

.presentation-loading {
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    top: 3.1rem;
    bottom: 3.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e2e8f0;
}

.presentation-loading[hidden] {
    display: none !important;
}

.presentation-kicker {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #93c5fd;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.presentation-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 0.65rem;
}

.presentation-body {
    font-size: 1.02rem;
    line-height: 1.5;
    color: rgba(226, 232, 240, 0.96);
    min-height: 4.5rem;
}

.presentation-topics {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.95rem;
}

.presentation-topics[hidden] {
    display: none !important;
}

.presentation-topic-btn {
    width: 100%;
    text-align: left;
    border-radius: 8px;
    border: 1px solid rgba(147, 197, 253, 0.45);
    background: rgba(37, 99, 235, 0.28);
    color: #f8fafc;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
}

.presentation-topic-btn:hover {
    background: rgba(37, 99, 235, 0.48);
}

.presentation-topic-btn.is-done {
    border-color: rgba(134, 239, 172, 0.7);
    background: rgba(22, 101, 52, 0.55);
    color: #dcfce7;
}

.presentation-topic-btn.is-done:hover {
    background: rgba(22, 101, 52, 0.75);
}

.presentation-card-footer {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.presentation-progress,
.presentation-status {
    font-size: 0.78rem;
    color: rgba(148, 163, 184, 0.95);
}

.presentation-continue-btn {
    margin-left: auto;
    min-width: auto !important;
    padding: 0.45rem 1.05rem !important;
    font-size: 0.9rem !important;
    flex-direction: row !important;
    gap: 0 !important;
}

.presentation-continue-btn[hidden] {
    display: none !important;
}

.presentation-corner-actions {
    position: fixed;
    right: 1.1rem;
    bottom: 1.1rem;
    z-index: 25001;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
    width: 11.2rem;
}

.presentation-auto-btn,
.presentation-stop-btn {
    pointer-events: auto;
    width: 100%;
    min-width: 0;
    max-width: none;
    padding: 0.55rem 0.7rem;
    border: 0;
    border-radius: 12px;
    color: #fff;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.presentation-auto-btn {
    background: rgba(51, 65, 85, 0.94);
}

.presentation-auto-btn:hover {
    background: #475569;
}

.presentation-auto-btn.is-on {
    background: rgba(22, 163, 74, 0.94);
}

.presentation-auto-btn.is-on:hover {
    background: #16a34a;
}

.presentation-stop-btn {
    background: rgba(185, 28, 28, 0.92);
}

.presentation-stop-btn:hover {
    background: #dc2626;
}

.presentation-stop-btn[hidden] {
    display: none !important;
}

.presentation-stop-confirm {
    pointer-events: auto;
    position: fixed;
    inset: 0;
    z-index: 25010;
    background: rgba(2, 6, 14, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.presentation-stop-confirm[hidden] {
    display: none !important;
}

.presentation-stop-confirm-card {
    width: min(26rem, 100%);
    background: rgba(12, 18, 32, 0.97);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 1.2rem 1.25rem 1.1rem;
}

.presentation-stop-confirm-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.45rem;
}

.presentation-stop-confirm-card p {
    font-size: 0.92rem;
    color: rgba(203, 213, 225, 0.95);
    line-height: 1.4;
}

.presentation-stop-confirm-actions {
    display: flex;
    gap: 0.55rem;
    justify-content: flex-end;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.presentation-stop-confirm-actions .btn {
    min-width: auto !important;
    padding: 0.45rem 0.85rem !important;
    font-size: 0.88rem !important;
    flex-direction: row !important;
    gap: 0 !important;
}

.admin-ai-pilot-instructions-textarea {
    min-height: 24rem;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.45;
}

/* Admin + simulation label editor stacking (label editor moved to top-level DOM) */
#adminSettingsModal.active {
    z-index: 1100;
}

#adminAiPilotInstructionsModal.active,
#adminAiSupportModal.active {
    z-index: 1150;
}

#simulationLabelEditorModal.active {
    z-index: 1200;
}

#adminSingleUserLabelConfigModal.active,
#adminHostedSessionsLabelConfigModal.active {
    z-index: 1220;
}

#simulationLabelAuthModal.active {
    z-index: 1250;
}

.admin-global-label-profiles {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(74, 144, 226, 0.25);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-global-label-profile-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

.admin-global-label-profile-label {
    color: rgba(245, 247, 250, 0.88);
    font-size: 0.92rem;
}

.admin-global-label-profile-name {
    color: rgba(245, 247, 250, 0.72);
    font-style: italic;
    font-size: 0.92rem;
}

.admin-global-label-profile-edit-btn {
    margin-left: auto;
}

.admin-global-label-compact-btn {
    min-width: 4.5rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
}

#adminSingleUserLabelConfigModal .admin-single-user-label-intro,
#adminHostedSessionsLabelConfigModal .admin-single-user-label-intro {
    margin-top: 0;
    margin-bottom: 1rem;
}

.admin-single-user-profile-setup-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 0.85rem;
}

.admin-single-user-profile-field {
    min-width: 0;
}

.admin-single-user-profile-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

#adminSingleUserLabelConfigModal .admin-single-user-label-footer,
#adminHostedSessionsLabelConfigModal .admin-single-user-label-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.admin-fst-label-config-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.admin-fst-label-config-header-row,
.admin-fst-label-config-row {
    display: grid;
    grid-template-columns: minmax(11rem, 1.25fr) minmax(9rem, 1fr) minmax(9rem, 1fr);
    gap: 0.75rem;
    align-items: center;
}

.admin-fst-label-config-header-row {
    margin-bottom: 0.15rem;
}

.admin-fst-label-config-col-header {
    color: rgba(245, 247, 250, 0.82);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
}

.admin-fst-label-config-header-spacer {
    visibility: hidden;
}

.admin-fst-label-config-label {
    color: rgba(245, 247, 250, 0.92);
    font-size: 0.92rem;
}

.admin-fst-label-config-select {
    width: 100%;
}

.admin-hosted-sessions-role-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.admin-hosted-sessions-role-btn {
    min-width: 3.5rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.72;
    border: 1px solid rgba(245, 247, 250, 0.22);
    background: rgba(44, 62, 80, 0.55);
    color: rgba(245, 247, 250, 0.88);
}

.admin-hosted-sessions-role-btn:hover {
    opacity: 0.92;
}

.admin-hosted-sessions-role-btn.active {
    opacity: 1;
    background: #4a90e2;
    border-color: #6ba8ea;
    color: #fff;
    box-shadow: 0 0 0 1px rgba(74, 144, 226, 0.35), 0 0 10px rgba(74, 144, 226, 0.35);
}

@media (max-width: 720px) {
    .admin-fst-label-config-header-row,
    .admin-fst-label-config-row {
        grid-template-columns: 1fr;
    }

    .admin-fst-label-config-header-row {
        display: none;
    }

    .admin-single-user-profile-setup-row {
        grid-template-columns: 1fr;
    }
}

.import-data-file-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.import-data-file-input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.import-data-file-label {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.import-data-empty-hint {
    margin-bottom: 0;
}

.import-data-options-panel {
    margin-top: 0.75rem;
}

.import-data-name-mode-fieldset {
    border: 1px solid rgba(74, 144, 226, 0.28);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    margin: 0 0 1rem 0;
}

.import-data-name-mode-fieldset legend {
    padding: 0 0.35rem;
}

.import-data-radio-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.35rem 0;
    cursor: pointer;
    color: rgba(245, 247, 250, 0.95);
}

.import-data-radio-label input {
    flex-shrink: 0;
}

.import-data-columns {
    margin-top: 0.25rem;
}

.import-data-scroll .import-data-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.import-data-row .import-data-row-main {
    flex: 1;
    min-width: 120px;
}

.import-data-name-field {
    flex: 1;
    min-width: 140px;
    max-width: 260px;
    margin: 0 !important;
    display: none;
}

#importDataModal.import-data-modal--custom-names .import-data-name-field {
    display: block;
}

.import-data-foot-hint {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* Export data modal */
.export-data-intro {
    margin-bottom: 1rem;
}

.export-data-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .export-data-columns {
        grid-template-columns: 1fr;
    }
}

.export-data-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.export-data-column-head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #f5f7fa;
}

.export-data-column-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.export-data-mini-btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
}

.export-data-scroll {
    max-height: min(360px, 45vh);
    overflow-y: auto;
    border: 1px solid rgba(74, 144, 226, 0.28);
    border-radius: 8px;
    padding: 0.35rem 0.5rem;
    background: rgba(12, 22, 38, 0.35);
}

.export-data-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    color: rgba(245, 247, 250, 0.95);
}

.export-data-row:hover {
    background: rgba(74, 144, 226, 0.12);
}

.export-data-row input[type='checkbox'] {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.export-data-row .export-data-row-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.export-data-row .export-data-row-title {
    font-weight: 500;
    word-break: break-word;
}

.export-data-row .export-data-row-sub {
    font-size: 0.82rem;
    opacity: 0.85;
}

.export-data-row .export-data-id {
    font-size: 0.72rem;
    opacity: 0.65;
    word-break: break-all;
    margin-top: 0.15rem;
}

.export-data-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* Edit Exercise */
.edit-exercise-topbar {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.55rem 1rem;
    padding: 0.5rem 1rem 0.55rem;
    background: rgba(26, 47, 74, 0.72);
    border-bottom: 2px solid rgba(74, 144, 226, 0.25);
}

.edit-exercise-topbar-selects {
    flex: 0 1 26rem;
    min-width: 0;
    max-width: 26rem;
}

.edit-exercise-topbar-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    flex: 1 1 auto;
    min-width: 0;
}

.edit-exercise-topbar-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
}

.edit-exercise-topbar-dropdown {
    position: relative;
    flex: 0 0 auto;
}

/* Invisible bridge so pointer can reach the menu without closing hover */
.edit-exercise-topbar-dropdown:hover::before,
.edit-exercise-topbar-dropdown:focus-within::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 1px);
    height: 0.65rem;
    z-index: 119;
}

.edit-exercise-topbar-dropdown-trigger {
    min-height: 1.7rem;
    min-width: 4.25rem;
    padding: 0.22rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.15;
    position: relative;
    z-index: 121;
}

/* Keep trigger seated while menu is open — avoids gap from translateY(-5px) lift */
.edit-exercise-topbar-dropdown:hover .edit-exercise-topbar-dropdown-trigger,
.edit-exercise-topbar-dropdown:focus-within .edit-exercise-topbar-dropdown-trigger {
    transform: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.edit-exercise-topbar-dropdown:hover .edit-exercise-topbar-dropdown-trigger:active,
.edit-exercise-topbar-dropdown:focus-within .edit-exercise-topbar-dropdown-trigger:active {
    transform: none;
}

.edit-exercise-topbar-action-btn {
    min-height: 1.7rem;
    min-width: 0;
    padding: 0.22rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    line-height: 1.15;
    white-space: nowrap;
}

.edit-exercise-topbar-action-btn .exercise-flights-count {
    display: inline;
    white-space: nowrap;
}

.edit-exercise-topbar-dropdown-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    position: absolute;
    top: calc(100% + 0.15rem);
    left: 0;
    min-width: 100%;
    width: max-content;
    padding: 0.45rem;
    background: rgba(26, 47, 74, 0.98);
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    z-index: 120;
}

.edit-exercise-topbar-dropdown-item.btn:hover {
    transform: none;
}

.edit-exercise-topbar-dropdown:hover .edit-exercise-topbar-dropdown-menu,
.edit-exercise-topbar-dropdown:focus-within .edit-exercise-topbar-dropdown-menu {
    display: flex;
}

.edit-exercise-topbar-dropdown:has(.edit-exercise-topbar-dropdown-trigger:disabled) .edit-exercise-topbar-dropdown-menu {
    display: none !important;
}

.edit-exercise-topbar-dropdown-item.btn {
    width: 100%;
    min-width: 10.5rem;
    justify-content: flex-start;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    min-height: 1.7rem;
    white-space: nowrap;
}

.exercise-flights-popup-modal-content {
    max-height: 85vh;
}

.exercise-flights-popup-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

.exercise-flights-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.exercise-flights-popup-container {
    max-height: 62vh;
    overflow: auto;
    padding-right: 0.25rem;
}

.edit-exercise-topbar .exercise-label {
    margin: 0 0 0.22rem 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(245, 247, 250, 0.82);
}

.edit-exercise-topbar .form-select {
    min-height: 1.85rem;
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
    font-size: 0.85rem;
}

.edit-exercise-container {
    display: flex;
    flex: 1;
    min-height: 0;
}

.exercise-sidebar {
    flex: 0 0 33.333333%;
    width: 33.333333%;
    max-width: 33.333333%;
    min-width: 0;
    background: rgba(26, 47, 74, 0.55);
    border-right: 2px solid rgba(74, 144, 226, 0.25);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: hidden;
}

.exercise-sidebar--traffic-hidden {
    display: none;
}

.exercise-sidebar-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    min-width: 0;
}

.exercise-sidebar-preview-sticky {
    flex: 0 0 auto;
    flex-shrink: 0;
    z-index: 2;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
}

.exercise-sidebar-preview-section {
    margin: 0;
}

.exercise-sidebar-preview-section .exercise-preview-time-block {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.exercise-sidebar-scroll-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.75rem;
}

.exercise-create-flows-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
}

.exercise-create-flows-title {
    margin: 0;
    font-size: 1.05rem;
    color: #f5f7fa;
    font-weight: 600;
}

.exercise-create-flows-close {
    position: static;
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.15rem 0.45rem;
}

.exercise-flows-subheader {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: #f5f7fa;
    font-weight: 600;
}

.exercise-flows-list-section {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.exercise-flows-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exercise-flow-list-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    background: rgba(44, 62, 80, 0.55);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
    color: #f5f7fa;
    font-size: 0.9rem;
}

.exercise-flow-list-item-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.exercise-flow-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.exercise-flow-list-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.add-flow-details-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.add-flow-reposition-wrap {
    margin-bottom: 0;
}

.flow-details-read-dl {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    font-size: 0.9rem;
}

.flow-details-read-dl dt {
    margin: 0;
    color: rgba(245, 247, 250, 0.65);
    font-weight: 600;
}

.flow-details-read-dl dd {
    margin: 0;
    color: #f5f7fa;
}

.flow-details-read-color-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flow-details-read-swatch {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    vertical-align: middle;
}

.delete-flow-confirm-message {
    margin: 0 0 1rem 0;
    color: #f5f7fa;
    font-size: 0.95rem;
}

.delete-flow-confirm-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.flow-details-subflow-toolbar {
    margin-bottom: 0.75rem;
}

.flow-details-subflows-heading {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #f5f7fa;
    font-weight: 600;
}

.flow-details-subflows-list {
    margin-bottom: 1.25rem;
    max-height: 12rem;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.flow-subflow-list-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    background: rgba(44, 62, 80, 0.45);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 6px;
    font-size: 0.88rem;
    color: #f5f7fa;
}

.flow-subflow-list-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}

.flow-subflow-list-item-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flow-subflow-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.flow-subflow-list-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.flow-details-read-dl--main {
    margin-top: 0.5rem;
}

.form-textarea {
    min-height: 3rem;
    resize: vertical;
    font-family: inherit;
}

#createSubFlowModal .form-input.form-input--invalid,
#createSubFlowModal .form-textarea.form-input--invalid {
    border-color: #c62828 !important;
    box-shadow: 0 0 0 2px rgba(198, 40, 40, 0.35);
}

.exercise-flow-color-dot {
    flex-shrink: 0;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.exercise-flow-list-name {
    min-width: 0;
}

.exercise-add-flow-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exercise-add-flow-btn {
    width: 100%;
    padding: 0.28rem 0.75rem;
    min-height: 0;
    line-height: 1.2;
    font-size: 0.85rem;
}

.exercise-add-flow-btn.add-flow-pick-active {
    background: #c62828;
    border-color: #b71c1c;
    color: #fff;
}

.exercise-add-flow-btn.add-flow-pick-active:hover {
    background: #b71c1c;
}

.exercise-add-flow-hint {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(245, 247, 250, 0.85);
}

.exercise-save-flows-btn {
    width: 100%;
}

.exercise-preview-time-block {
    width: 100%;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(74, 144, 226, 0.2);
}

.exercise-preview-time-label {
    display: block;
    margin: 0 0 0.4rem 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.88);
}

.exercise-preview-time-slider {
    display: block;
    width: 100%;
    height: 1.35rem;
    margin: 0;
    padding: 0;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.exercise-preview-time-slider:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.exercise-preview-time-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(44, 62, 80, 0.9);
    border: 1px solid rgba(74, 144, 226, 0.35);
}

.exercise-preview-time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    margin-top: -6px;
    border-radius: 50%;
    background: #4a90e2;
    border: 2px solid rgba(245, 247, 250, 0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.exercise-preview-time-slider:disabled::-webkit-slider-thumb {
    background: rgba(74, 144, 226, 0.45);
}

.exercise-preview-time-slider::-moz-range-track {
    height: 6px;
    border-radius: 3px;
    background: rgba(44, 62, 80, 0.9);
    border: 1px solid rgba(74, 144, 226, 0.35);
}

.exercise-preview-time-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #4a90e2;
    border: 2px solid rgba(245, 247, 250, 0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.exercise-preview-clock-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0.45rem;
    width: 100%;
}

.exercise-preview-time-clock {
    font-size: 0.95rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
    color: #f5f7fa;
}

.exercise-flights-list-textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.45;
    resize: vertical;
    min-height: 12rem;
}

.exercise-flights-list-text-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.form-input-color {
    height: 2.25rem;
    padding: 0.15rem 0.25rem;
    cursor: pointer;
}

.exercise-sidebar-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #f5f7fa;
    font-weight: 600;
}

.exercise-select-row {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: flex-start;
    min-width: 0;
}

.exercise-select-field {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.exercise-label {
    display: block;
    margin: 0.5rem 0 0.25rem 0;
    font-size: 0.85rem;
    color: rgba(245, 247, 250, 0.85);
}

.exercise-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.exercise-sidebar-actions .btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
}

.exercise-sidebar-actions-row {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: stretch;
    min-width: 0;
}

.exercise-sidebar-actions-row--compact .btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.5rem;
    padding: 0.25rem 0.4rem;
    font-size: 0.72rem;
    line-height: 1.2;
    box-sizing: border-box;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 0;
    text-align: center;
}

.exercise-sidebar-actions-grid {
    display: grid;
    grid-template-columns: 1fr minmax(6.25rem, 28%);
    grid-template-rows: auto auto;
    gap: 0.5rem;
    align-items: stretch;
}

.exercise-sidebar-actions-grid > .exercise-sidebar-actions-row:first-of-type {
    grid-column: 1;
    grid-row: 1;
}

.exercise-sidebar-actions-grid > .exercise-sidebar-actions-row:nth-of-type(2) {
    grid-column: 1;
    grid-row: 2;
}

.exercise-save-exercise-wrap {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: stretch;
    min-width: 0;
}

.exercise-save-exercise-wrap .exercise-save-exercise-btn {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
}

.exercise-sector-load-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

.exercise-sector-load-section--active {
    flex: 1 1 auto;
    min-height: 8rem;
}

.exercise-sector-load-btn,
.exercise-view-options-btn,
.exercise-ai-pilot-btn {
    width: 100%;
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
}

.edit-exercise-topbar .exercise-sector-load-btn,
.edit-exercise-topbar .exercise-view-options-btn,
.edit-exercise-topbar .exercise-ai-pilot-btn,
.edit-exercise-topbar .exercise-3d-view-btn,
.edit-exercise-topbar .exercise-ai-assistant-btn,
.edit-exercise-topbar .exercise-ai-companion-btn {
    width: auto;
    padding: 0.22rem 0.7rem;
    font-size: 0.78rem;
}

.exercise-sector-load-btn[aria-pressed="true"],
.exercise-view-options-btn[aria-pressed="true"],
.exercise-ai-pilot-btn[aria-pressed="true"],
.exercise-ai-companion-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    border-color: rgba(248, 113, 113, 0.85);
    color: #ffffff;
}

#editExerciseModal > .exercise-ai-companion-panel {
    position: fixed;
    z-index: 10070;
    top: 7.5rem;
    right: 1.25rem;
    width: 16.5rem;
    display: none;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    background: rgba(18, 22, 30, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    overflow: hidden;
}

#editExerciseModal > .exercise-ai-companion-panel.is-open {
    display: flex;
}

.exercise-ai-companion-panel-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.7rem 0.65rem 0.75rem;
}

.exercise-ai-companion-hold-btn {
    width: 100%;
    padding: 0.7rem 0.6rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    user-select: none;
    touch-action: none;
}

.exercise-ai-companion-hold-btn.is-recording {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    border-color: rgba(248, 113, 113, 0.9);
    color: #ffffff;
}

.exercise-ai-companion-status {
    min-height: 1.2em;
    font-size: 0.78rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

.exercise-ai-companion-report-btn {
    width: 100%;
    padding: 0.35rem 0.55rem;
    font-size: 0.8rem;
}

.exercise-ai-companion-report-btn[hidden] {
    display: none !important;
}

.exercise-ai-pilot-section {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}

.exercise-ai-pilot-section--active {
    flex: 0 0 auto;
    min-height: 0;
}

.exercise-ai-pilot-panel {
    flex: 0 0 auto;
    min-height: 0;
    max-height: min(72vh, 640px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem;
    background: rgba(15, 28, 45, 0.55);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
    color: #f5f7fa;
}

.exercise-ai-pilot-panel[hidden] {
    display: none !important;
}

.exercise-ai-pilot-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #f5f7fa;
}

.exercise-ai-pilot-hint {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.35;
}

.exercise-ai-pilot-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.95);
}

.exercise-ai-pilot-context {
    flex: 0 0 auto;
    min-height: 10rem;
    width: 100%;
    resize: vertical;
    font-size: 0.88rem;
    line-height: 1.4;
}

.exercise-ai-pilot-saved-hint {
    min-height: 1.1rem;
    margin: 0;
}

.exercise-ai-pilot-save-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.exercise-ai-pilot-save-btn {
    flex-shrink: 0;
    min-width: 8.25rem;
}

.exercise-scripts-section {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
    margin-top: 0.35rem;
}

.exercise-scripts-section[hidden] {
    display: none !important;
}

.exercise-scripts-panel {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.75rem;
    background: rgba(15, 28, 45, 0.55);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
    color: #f5f7fa;
    min-height: 8rem;
}

.exercise-scripts-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.exercise-scripts-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #f5f7fa;
    flex: 1 1 auto;
    min-width: 0;
}

.exercise-scripts-delete-all-btn {
    flex-shrink: 0;
}

.exercise-scripts-header-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.exercise-scripts-generate-init-calls-btn:disabled,
.exercise-scripts-delete-all-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.exercise-scripts-body {
    flex: 1 1 auto;
    min-height: 6rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.exercise-scripts-empty {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: rgba(245, 247, 250, 0.75);
}

.exercise-script-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.4rem 0.55rem;
    background: rgba(44, 62, 80, 0.45);
    border: 1px solid rgba(74, 144, 226, 0.2);
    border-radius: 6px;
    font-size: 0.88rem;
    line-height: 1.35;
    color: #f5f7fa;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.exercise-script-list-item:hover {
    border-color: rgba(74, 144, 226, 0.45);
    background: rgba(74, 144, 226, 0.1);
}

.exercise-script-list-item.selected {
    border-color: rgba(74, 144, 226, 0.55);
    background: rgba(74, 144, 226, 0.14);
}

.exercise-ai-pilot-script-lbl-tin-wrap {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(234, 179, 8, 0.45);
    background: rgba(234, 179, 8, 0.08);
}

.exercise-ai-pilot-script-lbl-tin-command {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.exercise-script-list-item-initial-call .exercise-script-list-label {
    color: #c2410c;
}

.exercise-script-list-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exercise-script-list-actions {
    display: none;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.2rem;
}

.exercise-script-list-item.selected .exercise-script-list-actions {
    display: flex;
}

.exercise-script-list-actions .btn {
    min-width: 0;
    min-height: 1.65rem;
    padding: 0.15rem 0.35rem;
    line-height: 1;
}

.exercise-script-list-actions .btn-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.exercise-init-calls-progress-text {
    margin: 0 0 0.75rem 0;
    color: #f5f7fa;
    font-size: 0.95rem;
}

.exercise-init-calls-progress-track {
    width: 100%;
    height: 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    margin-bottom: 0.65rem;
}

.exercise-init-calls-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 6px;
    background: #3b82f6;
    transition: width 0.15s ease-out;
}

.exercise-init-calls-progress-detail {
    margin: 0 0 1rem 0;
    min-height: 1.25em;
}

.exercise-scripts-delete-all-confirm-actions {
    justify-content: center;
    flex-wrap: wrap;
}

.exercise-ai-pilot-script-modal-body .form-group {
    margin-bottom: 0.85rem;
}

.exercise-ai-pilot-script-field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.95);
}

.exercise-ai-pilot-script-readonly {
    padding: 0.45rem 0.6rem;
    background: rgba(44, 62, 80, 0.55);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #f5f7fa;
    font-variant-numeric: tabular-nums;
}

.exercise-ai-pilot-script-textarea {
    width: 100%;
    min-height: 4.5rem;
    font-size: 0.88rem;
    line-height: 1.4;
}

.exercise-ai-pilot-script-checkbox {
    margin-top: 0.45rem;
    font-size: 0.88rem;
}

.exercise-ai-pilot-script-command-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.exercise-ai-pilot-script-command-header .exercise-ai-pilot-script-field-label {
    margin-bottom: 0;
    flex: 1 1 auto;
}

.exercise-ai-pilot-script-transform-btn {
    flex-shrink: 0;
}

.exercise-ai-pilot-script-transformed-wrap {
    margin-top: 0.15rem;
}

.exercise-ai-pilot-script-transformed-output {
    background: rgba(44, 62, 80, 0.45);
    color: #f5f7fa;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.85rem;
}

.exercise-ai-pilot-script-command-assessment {
    margin-top: 0.4rem;
    font-size: 0.82rem;
    line-height: 1.35;
    color: rgba(245, 247, 250, 0.85);
}

.exercise-ai-pilot-script-command-assessment.is-valid {
    color: #4ade80;
}

.exercise-ai-pilot-script-command-assessment.is-invalid {
    color: #f87171;
}

.exercise-ai-pilot-script-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.exercise-sector-load-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.exercise-sector-load-panel[hidden] {
    display: none !important;
}

.exercise-sector-load-chart-wrap {
    flex: 1 1 auto;
    min-height: 11rem;
    background: rgba(15, 28, 45, 0.65);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
    padding: 0.35rem;
    overflow: hidden;
}

.exercise-sector-load-canvas {
    display: block;
    width: 100%;
    height: 220px;
}

.exercise-sector-load-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    font-size: 0.72rem;
    color: rgba(245, 247, 250, 0.92);
    line-height: 1.25;
}

.exercise-sector-load-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    max-width: 100%;
}

.exercise-sector-load-legend-swatch {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.exercise-sector-load-legend-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exercise-view-options-section {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.exercise-view-options-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem;
    background: rgba(15, 28, 45, 0.55);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
    color: #f5f7fa;
}

.exercise-view-options-panel[hidden] {
    display: none !important;
}

.exercise-view-options-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #f5f7fa;
}

.exercise-view-option {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.exercise-view-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.exercise-view-option-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.92);
}

.exercise-view-option-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    min-width: 2rem;
    text-align: right;
}

.exercise-view-option-slider {
    width: 100%;
}

.exercise-view-option-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.92);
    cursor: pointer;
    user-select: none;
}

.exercise-view-option-checkbox input {
    width: 1rem;
    height: 1rem;
    accent-color: #4a90e2;
}

.exercise-view-options-layers-btn {
    align-self: stretch;
    margin-top: 0.15rem;
    font-size: 0.85rem !important;
    padding: 0.45rem 0.75rem !important;
    min-height: 0 !important;
}

.exercise-view-options-layers-btn.active {
    background: linear-gradient(135deg, #1565c0 0%, #1e88e5 100%);
    border-color: rgba(100, 181, 246, 0.85);
    color: #ffffff;
}

#editExerciseModal > .sector-map-layers-panel,
#editExerciseModal > .sector-map-layers-custom-editor {
    position: fixed;
    z-index: 10070;
}

#editExerciseModal > .sector-map-layers-panel {
    top: 7.5rem;
    right: 1.25rem;
    width: 17.5rem;
    max-height: min(70vh, 34rem);
    display: none;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    background: rgba(18, 22, 30, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    overflow: hidden;
}

#editExerciseModal > .sector-map-layers-panel.is-open {
    display: flex;
}

#editExerciseModal > .sector-map-layers-custom-editor {
    top: 8.5rem;
    right: 19.5rem;
    width: 19rem;
    max-height: min(74vh, 38rem);
    display: none;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    background: rgba(18, 22, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    overflow: hidden;
}

#editExerciseModal > .sector-map-layers-custom-editor.is-open {
    display: flex;
}

.exercise-flights-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.exercise-flights-section:not(.exercise-flights-section--collapsed) {
    flex: 1;
}

.exercise-flights-section--collapsed {
    flex: 0 0 auto;
}

.exercise-flights-section-header-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    margin: 0 0 0.5rem 0;
}

.exercise-flights-section--collapsed .exercise-flights-section-header-row {
    margin-bottom: 0;
}

.exercise-flights-section-toggle {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 0.3rem 0.35rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    color: #f5f7fa;
    font-weight: 600;
    text-align: left;
}

.exercise-flights-section-toggle:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
}

.exercise-flights-section-toggle:focus {
    outline: none;
}

.exercise-flights-section-toggle:focus-visible {
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.65);
}

.exercise-flights-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    min-width: 0;
}

.exercise-flights-header-actions .exercise-flights-header-btn.btn {
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    font-weight: 600;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-height: 0;
    box-shadow: none;
    transform: none;
    white-space: nowrap;
}

.exercise-flights-header-actions .exercise-flights-header-btn.btn:hover:not(:disabled) {
    transform: none;
}

.exercise-flights-header-actions .exercise-flights-header-btn.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.exercise-flights-section-chevron {
    display: inline-block;
    flex-shrink: 0;
    font-size: 0.6rem;
    line-height: 1;
    opacity: 0.9;
    transition: transform 0.15s ease;
}

.exercise-flights-section--collapsed .exercise-flights-section-chevron {
    transform: rotate(-90deg);
}

.exercise-flights-count {
    font-weight: 500;
    opacity: 0.88;
}

.exercise-flights-section-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.exercise-flights-section--collapsed .exercise-flights-section-body {
    display: none;
}

.exercise-flights-container {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 0.25rem;
}

.exercise-flight-item {
    background: rgba(44, 62, 80, 0.55);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 10px;
    padding: 0.75rem;
    cursor: pointer;
}

.exercise-flight-item:hover {
    border-color: rgba(74, 144, 226, 0.5);
    background: rgba(74, 144, 226, 0.12);
}

.exercise-flight-line {
    color: #f5f7fa;
    font-size: 0.9rem;
    line-height: 1.35;
    word-break: break-word;
}

.exercise-flight-actions {
    display: none;
    margin-top: 0.6rem;
    gap: 0.5rem;
}

.exercise-flight-item.selected .exercise-flight-actions {
    display: flex;
}

.exercise-flight-actions .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
}

.exercise-map {
    flex: 1 1 0;
    min-width: 0;
    background: #ffffff;
}

@media (max-width: 900px) {
    .edit-exercise-topbar-selects {
        flex-direction: column;
        align-items: stretch;
    }

    .edit-exercise-container {
        flex-direction: column;
    }
    .exercise-sidebar {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }
    .exercise-map {
        flex: 1 1 0;
        width: 100%;
        max-width: 100%;
        min-height: 0;
    }
}

.exercise-editor-canvas {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

.exercise-preview-recalc-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.28);
    pointer-events: auto;
    cursor: wait;
}

.exercise-preview-recalc-overlay[hidden] {
    display: none !important;
}

.exercise-preview-recalc-card {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1.15rem;
    border-radius: 10px;
    background: rgba(15, 28, 45, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #f8fafc;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.exercise-preview-recalc-spinner {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    border: 2.5px solid rgba(248, 250, 252, 0.25);
    border-top-color: #60a5fa;
    animation: exercise-preview-recalc-spin 0.75s linear infinite;
    flex: 0 0 auto;
}

.exercise-preview-recalc-text {
    white-space: nowrap;
}

@keyframes exercise-preview-recalc-spin {
    to { transform: rotate(360deg); }
}

.exercise-script-marker-tooltip {
    position: absolute;
    z-index: 12;
    max-width: min(280px, 90vw);
    padding: 0.45rem 0.6rem;
    background: rgba(15, 28, 45, 0.96);
    border: 1px solid rgba(74, 144, 226, 0.55);
    border-radius: 6px;
    color: #f5f7fa;
    font-size: 0.8rem;
    line-height: 1.35;
    pointer-events: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    white-space: pre-wrap;
    word-break: break-word;
}

.exercise-script-marker-tooltip[hidden] {
    display: none !important;
}

#exerciseEditorCanvasElement {
    width: 100%;
    height: 100%;
    display: block;
    cursor: default;
    user-select: none;
}

.add-flight-route-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.add-flight-route-label-row label {
    margin-bottom: 0;
}

.add-flight-pick-route-btn {
    padding: 0.35rem 0.65rem !important;
    font-size: 0.8rem !important;
    min-height: 0 !important;
    flex-shrink: 0;
}

.add-flight-route-pick-banner {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 12px;
    z-index: 12000;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: min(960px, calc(100vw - 24px));
    padding: 0.6rem 1rem;
    background: rgba(26, 47, 74, 0.95);
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.add-flight-route-pick-banner-text {
    font-size: 0.85rem;
    color: #f5f7fa;
    line-height: 1.35;
}

.add-flight-route-pick-context-menu {
    position: fixed;
    z-index: 12001;
    min-width: 180px;
    padding: 0.35rem;
    background: rgba(26, 47, 74, 0.98);
    border: 1px solid rgba(74, 144, 226, 0.5);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    flex-direction: column;
    gap: 0.25rem;
}

.add-flight-route-pick-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.65rem;
    font-size: 0.9rem;
    color: #f5f7fa;
    background: rgba(74, 144, 226, 0.15);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 6px;
    cursor: pointer;
}

.add-flight-route-pick-menu-item:hover {
    background: rgba(74, 144, 226, 0.35);
}

#exerciseEditorRouteDisambigPanel {
    z-index: 12002;
}

.hint-text {
    color: rgba(245, 247, 250, 0.7);
    font-size: 0.8rem;
    margin-top: 0.35rem;
    display: block;
}

.sim-presets-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    max-height: 280px;
    overflow-y: auto;
}

.sim-presets-list li {
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.35rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    cursor: pointer;
}

.sim-presets-list li:hover {
    background: rgba(255, 255, 255, 0.12);
}

.sim-presets-list li.sim-preset-row {
    cursor: default;
}

.sim-preset-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: default;
}

.sim-preset-row .sim-preset-name {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.sim-preset-delete-btn {
    flex-shrink: 0;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    min-height: 0 !important;
    border-radius: 6px;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}

.sim-preset-delete-btn.btn:hover {
    transform: none;
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

.form-row-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    align-items: end;
}

#addFlightModal .add-flight-compact-row label {
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

#addFlightModal .add-flight-compact-row .form-input {
    padding: 0.45rem 0.5rem;
    font-size: 0.88rem;
}

#addFlightModal .add-flight-compact-block .hint-text {
    margin-top: 0.35rem;
}

.exercise-autocomplete-group {
    position: relative;
}

/* Selection Step Styles */
.selection-step {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    color: #f5f7fa;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.btn-back {
    background: rgba(44, 62, 80, 0.8);
    border: 2px solid rgba(74, 144, 226, 0.4);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #f5f7fa;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background: rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.6);
    transform: translateX(-3px);
    color: #4a90e2;
}

.step-header .step-title {
    flex: 1;
    margin: 0;
    text-align: left;
}

/* Sector Selection Grid */
.sectors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.sector-card {
    background: rgba(44, 62, 80, 0.6);
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.sector-card:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
}

.sector-card.selected {
    border-color: #ff8c42;
    background: rgba(255, 140, 66, 0.15);
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
}

.sector-card-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f5f7fa;
    margin-bottom: 0.5rem;
}

.sector-card-description {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}

/* Exercises List Styles */
.exercises-list {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exercises-list::-webkit-scrollbar {
    width: 8px;
}

.exercises-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.exercises-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.exercises-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.exercise-card {
    background: rgba(44, 62, 80, 0.6);
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.exercise-card:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.6);
    transform: translateX(5px);
    box-shadow: 0 4px 16px rgba(74, 144, 226, 0.3);
}

.exercise-card.selected {
    border-color: #ff8c42;
    background: rgba(255, 140, 66, 0.15);
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
}

.exercise-card-action {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(74, 144, 226, 0.3);
    display: flex;
    justify-content: center;
    animation: slideDown 0.3s ease;
}

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

.btn-run-simulation {
    min-width: 200px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
}

.exercise-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.exercise-card-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #f5f7fa;
    flex: 1;
}

.exercise-card-date {
    font-size: 0.85rem;
    opacity: 0.7;
    white-space: nowrap;
    margin-left: 1rem;
}

.exercise-card-details {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(74, 144, 226, 0.2);
}

.exercise-detail-item {
    display: flex;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.exercise-detail-label {
    font-weight: 600;
    min-width: 120px;
    opacity: 0.9;
}

.exercise-detail-value {
    flex: 1;
    opacity: 0.8;
    line-height: 1.5;
}


.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    opacity: 0.7;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state-text {
    font-size: 1.2rem;
    line-height: 1.6;
}

.create-exercise-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.create-exercise-container .btn {
    min-width: 200px;
    padding: 1.5rem 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    color: #f5f7fa;
}

.form-group label.form-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-checkbox {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    accent-color: #4a90e2;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(26, 47, 74, 0.6);
    border: 2px solid rgba(74, 144, 226, 0.3);
    border-radius: 8px;
    color: #f5f7fa;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

/* Ensure dropdown option text is readable (native option list is typically white) */
select option,
select optgroup {
    color: #000000;
    background: #ffffff;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(245, 247, 250, 0.5);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(74, 144, 226, 0.15);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.aircraft-db-textarea {
    min-height: 320px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1.35;
    white-space: pre;
}

.aircraft-db-editor {
    margin-top: 1rem;
    padding: 0.9rem;
    border-radius: 10px;
    background: rgba(26, 47, 74, 0.35);
    border: 1px solid rgba(74, 144, 226, 0.25);
}

.aircraft-db-editor-header {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.aircraft-db-editor-select {
    min-width: 240px;
    flex: 1;
}

.aircraft-db-editor-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.aircraft-db-editor-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.aircraft-db-editor-actions .btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    line-height: 1.05;
}

.aircraft-db-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.aircraft-db-section-title {
    margin: 1rem 0 0.55rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(74, 144, 226, 0.22);
    color: rgba(245, 247, 250, 0.92);
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

#aircraftDbModelPreviewModal.aircraft-db-model-preview-modal {
    z-index: 1200;
}

.aircraft-db-model-preview-content {
    width: min(96vw, 980px);
    max-width: 980px;
}

.aircraft-db-model-preview-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.aircraft-db-model-preview-host {
    position: relative;
    width: 100%;
    height: min(62vh, 560px);
    min-height: 320px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(180deg, #7eb6d9 0%, #c5d8e6 55%, #9aa7b0 100%);
    border: 1px solid rgba(74, 144, 226, 0.28);
}

.aircraft-db-model-preview-host canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#tower3dBuildingSidesModal.tower3d-building-sides-modal {
    z-index: 1250;
}

.tower3d-building-sides-content {
    width: min(96vw, 920px);
    max-width: 920px;
}

.tower3d-building-sides-body {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.tower3d-building-sides-preview-wrap {
    position: relative;
}

.tower3d-building-sides-preview-host {
    width: 100%;
    height: min(38vh, 340px);
    min-height: 220px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(180deg, #9ec4d8 0%, #c5d3dc 100%);
    border: 1px solid rgba(74, 144, 226, 0.28);
}

.tower3d-building-sides-preview-host canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.tower3d-building-sides-preview-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    color: #1a2f4a;
    font-weight: 600;
    background: rgba(185, 200, 212, 0.72);
}

.tower3d-building-sides-preview-empty[hidden] {
    display: none;
}

.tower3d-building-sides-preview-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    color: #1a2f4a;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(185, 200, 212, 0.58);
    pointer-events: none;
}

.tower3d-building-sides-preview-loading[hidden] {
    display: none;
}

.tower3d-building-sides-status.is-error {
    color: #f5a5a5;
}

.tower3d-sides-section {
    padding-top: 0.65rem;
    border-top: 1px solid rgba(74, 144, 226, 0.22);
}

.tower3d-sides-section h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.tower3d-tex-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 0.45rem 0 0.3rem;
}

.tower3d-tex-label {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(245, 247, 250, 0.88);
}

.tower3d-tex-clear-btn {
    margin: 0;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
}

.tower3d-tex-scale-wrap {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0 0 0.45rem;
}

.tower3d-tex-scale-wrap[hidden] {
    display: none;
}

.tower3d-tex-scale-wrap label {
    flex: 0 0 auto;
    font-size: 0.78rem;
    color: rgba(245, 247, 250, 0.78);
}

.tower3d-tex-scale-wrap input[type="range"] {
    flex: 1 1 auto;
    min-width: 0;
}

.tower3d-tex-scale-val {
    flex: 0 0 3.2rem;
    text-align: right;
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
    color: rgba(245, 247, 250, 0.88);
}

.tower3d-tex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.45rem;
}

.tower3d-tex-swatch {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.3rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(10, 25, 41, 0.35);
    color: inherit;
    cursor: pointer;
}

.tower3d-tex-swatch img {
    width: 100%;
    height: 52px;
    object-fit: cover;
    border-radius: 5px;
}

.tower3d-tex-swatch span {
    font-size: 0.72rem;
    line-height: 1.15;
}

.tower3d-tex-swatch.is-selected {
    border-color: #7ec8ff;
    box-shadow: 0 0 0 1px #7ec8ff;
}

.tower3d-tex-swatch-sat {
    border-style: dashed;
}

.tower3d-tex-swatch-sat.is-selected {
    border-style: solid;
}

.tower3d-tex-grid-ai .tower3d-tex-swatch {
    position: relative;
}

.tower3d-tex-grid-ai .tower3d-tex-swatch > button[data-ai-action="side"] {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.tower3d-tex-swatch-actions {
    display: flex;
    gap: 0.25rem;
}

.tower3d-tex-swatch-actions button {
    flex: 1;
    padding: 0.15rem 0.2rem;
    font-size: 0.68rem;
    line-height: 1.2;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(10, 25, 41, 0.45);
    color: inherit;
    cursor: pointer;
}

.tower3d-tex-swatch-actions button:hover {
    border-color: #7ec8ff;
}

@media (max-width: 900px) {
    .aircraft-db-fields-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .aircraft-db-fields-grid {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.form-actions .btn {
    min-width: 120px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Delete Exercises Styles */
.delete-exercises-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.delete-exercises-list::-webkit-scrollbar {
    width: 8px;
}

.delete-exercises-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.delete-exercises-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.delete-exercise-item {
    background: rgba(44, 62, 80, 0.6);
    border: 2px solid rgba(231, 76, 60, 0.3);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.delete-exercise-item:hover {
    border-color: rgba(231, 76, 60, 0.6);
    background: rgba(231, 76, 60, 0.1);
}

.delete-exercise-info {
    flex: 1;
}

.delete-exercise-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f5f7fa;
    margin-bottom: 0.5rem;
}

.delete-exercise-details {
    font-size: 0.9rem;
    color: rgba(245, 247, 250, 0.7);
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.delete-exercise-sector {
    color: #4a90e2;
}

.delete-exercise-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: 2px solid rgba(231, 76, 60, 0.5);
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.delete-exercise-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    border-color: rgba(231, 76, 60, 0.8);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* Edit Airspace: airspace selector (⅓ width) + Save / Duplicate / Print / Convertor + map tools on one row */
.edit-sector-toolbar-leading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    flex: 1 1 100%;
    box-sizing: border-box;
}

.edit-sector-toolbar-leading .zoom-controls {
    margin-left: auto;
    flex: 0 0 auto;
}

.edit-sector-select-wrap {
    flex: 0 0 calc(100% / 3);
    width: calc(100% / 3);
    max-width: calc(100% / 3);
    min-width: 0;
    box-sizing: border-box;
}

.edit-sector-select-wrap .form-select {
    width: 100%;
    min-width: 0;
}

.edit-sector-leader-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 auto;
    min-width: 0;
}

.btn.edit-sector-btn-duplicate {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    border-color: rgba(13, 71, 161, 0.55);
    color: #ffffff;
}

.btn.edit-sector-btn-duplicate:hover {
    background: linear-gradient(135deg, #283593 0%, #1565c0 100%);
    border-color: rgba(21, 101, 192, 0.75);
    color: #ffffff;
}

.edit-sector-inport-file-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.edit-sector-inport-compact-btn.btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    line-height: 1.15;
    min-width: 0;
    min-height: 0;
    width: auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.edit-sector-inport-file-name {
    color: rgba(245, 247, 250, 0.88);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.edit-sector-inport-status {
    min-height: 1.2rem;
    margin-bottom: 0.75rem;
}

.edit-sector-inport-status.error {
    color: #ef4444;
}

.edit-sector-inport-status.ok {
    color: #22c55e;
}

.edit-sector-inport-column-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.75rem;
    max-height: 9rem;
    overflow: auto;
    margin: 0 0 0.75rem 0;
    padding: 0.65rem;
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
    background: rgba(15, 28, 45, 0.35);
}

.edit-sector-inport-column-option {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    max-width: 22rem;
    color: rgba(245, 247, 250, 0.92);
    font-size: 0.82rem;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
}

.edit-sector-inport-column-option input {
    flex-shrink: 0;
    accent-color: #4a90e2;
}

.edit-sector-inport-column-option span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-sector-inport-preview-wrap {
    max-width: 100%;
    max-height: 58vh;
    overflow-x: scroll;
    overflow-y: auto;
    scrollbar-gutter: stable both-edges;
    border: 1px solid rgba(74, 144, 226, 0.35);
    border-radius: 8px;
    background: rgba(15, 28, 45, 0.42);
}

.edit-sector-inport-preview-wrap::-webkit-scrollbar {
    height: 14px;
    width: 14px;
}

.edit-sector-inport-preview-wrap::-webkit-scrollbar-track {
    background: rgba(15, 28, 45, 0.95);
    border-radius: 999px;
}

.edit-sector-inport-preview-wrap::-webkit-scrollbar-thumb {
    background: rgba(74, 144, 226, 0.9);
    border: 3px solid rgba(15, 28, 45, 0.95);
    border-radius: 999px;
}

.edit-sector-inport-preview-wrap::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 1);
}

#editSectorInportModal .modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.edit-sector-inport-load-flow-select {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 8px;
    background: rgba(15, 28, 45, 0.82);
    color: #f5f7fa;
    font-size: 0.95rem;
}

.edit-sector-inport-load-flow-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.edit-sector-inport-preview-table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
    color: #f5f7fa;
    font-size: 0.85rem;
}

.edit-sector-inport-preview-table th,
.edit-sector-inport-preview-table td {
    border: 1px solid rgba(74, 144, 226, 0.25);
    padding: 0.45rem 0.65rem;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
    width: max-content;
    max-width: none;
}

.edit-sector-inport-preview-table th {
    background: rgba(74, 144, 226, 0.22);
    font-weight: 700;
}

.edit-sector-inport-format-builder {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.edit-sector-inport-builder-title,
.edit-sector-inport-output-title {
    color: #f5f7fa;
    font-size: 0.95rem;
    font-weight: 700;
}

.edit-sector-inport-field-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.55rem;
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
    background: rgba(15, 28, 45, 0.28);
}

.edit-sector-inport-field-btn {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(74, 144, 226, 0.55);
    background: rgba(74, 144, 226, 0.22);
    color: #f5f7fa;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.edit-sector-inport-field-btn:hover {
    background: rgba(74, 144, 226, 0.38);
    border-color: rgba(96, 165, 250, 0.9);
}

.edit-sector-inport-function-buttons {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.edit-sector-inport-function-btn {
    padding: 0.28rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.75);
    background: rgba(245, 158, 11, 0.2);
    color: #fef3c7;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.edit-sector-inport-function-btn:hover,
.edit-sector-inport-function-btn.active {
    background: rgba(245, 158, 11, 0.38);
    border-color: rgba(251, 191, 36, 1);
}

.edit-sector-inport-flow-btn {
    border-color: rgba(74, 144, 226, 0.7);
    background: rgba(74, 144, 226, 0.18);
    color: #dbeafe;
}

.edit-sector-inport-flow-btn:hover {
    background: rgba(74, 144, 226, 0.34);
    border-color: rgba(96, 165, 250, 0.95);
}

.edit-sector-inport-function-hint {
    color: rgba(245, 247, 250, 0.75);
    font-size: 0.78rem;
}

.edit-sector-inport-end-countif-btn {
    align-self: flex-start;
    padding: 0.28rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(34, 197, 94, 0.75);
    background: rgba(34, 197, 94, 0.2);
    color: #dcfce7;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.edit-sector-inport-end-countif-btn:hover {
    background: rgba(34, 197, 94, 0.36);
    border-color: rgba(74, 222, 128, 1);
}

.edit-sector-inport-format-strip {
    min-height: 2.75rem;
    max-height: 8rem;
    overflow: auto;
    padding: 0.55rem;
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.edit-sector-inport-format-strip:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.55);
}

.edit-sector-inport-token {
    display: inline-flex;
    align-items: center;
    max-width: 18rem;
    margin: 0 0.1rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(37, 99, 235, 0.45);
    color: #1e3a8a;
    font-size: 0.85rem;
    font-weight: 700;
    vertical-align: baseline;
    cursor: pointer;
    white-space: nowrap;
}

.edit-sector-inport-token:hover {
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.6);
    color: #991b1b;
}

.edit-sector-inport-round-token {
    background: rgba(16, 185, 129, 0.16);
    border-color: rgba(16, 185, 129, 0.55);
    color: #065f46;
}

.edit-sector-inport-countif-token {
    display: inline-block;
    min-width: 12rem;
    max-width: 100%;
    margin: 0 0.1rem;
    padding: 0.12rem 0.45rem;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.6);
    border: 1px solid rgba(245, 158, 11, 0.6);
    color: #92400e;
    font-size: 0.85rem;
    font-weight: 700;
    vertical-align: baseline;
    cursor: text;
    white-space: normal;
}

.edit-sector-inport-countif-token:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35);
}

.edit-sector-inport-countif-token:not(.has-args)::after {
    content: attr(data-placeholder);
    color: rgba(146, 64, 14, 0.55);
    font-weight: 600;
    pointer-events: none;
}

.edit-sector-inport-countif-token.invalid {
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.75);
    color: #991b1b;
}

.edit-sector-inport-countif-token.ended {
    border-style: solid;
    cursor: pointer;
    user-select: none;
}

.edit-sector-inport-countif-token.ended:hover {
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.6);
    color: #991b1b;
}

.edit-sector-inport-countif-prefix {
    margin-right: 0.25rem;
    user-select: none;
}

.edit-sector-inport-builder-hint {
    margin: 0;
}

.edit-sector-inport-output-preview {
    min-height: 4rem;
    max-height: 14rem;
    overflow: auto;
    margin: 0;
    padding: 0.65rem;
    border: 1px solid rgba(74, 144, 226, 0.35);
    border-radius: 8px;
    background: rgba(15, 28, 45, 0.72);
    color: #f5f7fa;
    font-size: 0.85rem;
    line-height: 1.45;
    white-space: pre;
}

/* Edit Airspace Styles */
.edit-sector-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.control-strip {
    background: rgba(26, 47, 74, 0.9);
    border-top: 2px solid rgba(74, 144, 226, 0.3);
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
    padding: 0.25rem 2rem;
    flex-shrink: 0;
}

.top-strip {
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
    flex-shrink: 0;
}

.bottom-strip {
    border-top: 2px solid rgba(74, 144, 226, 0.3);
    flex: 0 0 auto;
    overflow-y: auto;
    flex-shrink: 0;
    max-height: none;
}

.strip-content {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.bottom-strip .strip-content {
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
}

.strip-content .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 4px;
}

.strip-content .form-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 4px;
    height: auto;
}

/* Edit Airspace toolbar: Waypoints / Routes hover dropdowns */
.edit-sector-hover-split {
    position: relative;
    display: inline-flex;
    align-self: center;
    vertical-align: middle;
}

.edit-sector-hover-split .edit-sector-split-trigger {
    margin: 0;
    white-space: nowrap;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.edit-sector-split-caret {
    flex-shrink: 0;
    line-height: 1;
    font-size: 0.85em;
    opacity: 0.85;
}

.edit-sector-split-menu {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% - 2px);
    z-index: 200;
    padding-top: 4px;
    min-width: 100%;
}

.edit-sector-split-menu-inner {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.45rem;
    min-width: max(100%, 220px);
    background: rgba(18, 32, 52, 0.98);
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 6px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.edit-sector-hover-split:hover .edit-sector-split-menu,
.edit-sector-hover-split:focus-within .edit-sector-split-menu {
    display: block;
}

.edit-sector-split-menu-inner .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.sector-map-bg-opacity-control {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(26, 47, 74, 0.45);
    border: 1px solid rgba(74, 144, 226, 0.35);
}

.sector-map-bg-opacity-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 247, 250, 0.88);
    white-space: nowrap;
}

.sector-map-bg-opacity-slider {
    width: 100px;
    max-width: 22vw;
    accent-color: #4a90e2;
    cursor: pointer;
}

.sector-map-bg-opacity-value {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(245, 247, 250, 0.75);
    min-width: 2.5rem;
    text-align: right;
}

.strip-content h3 {
    font-size: 0.7rem;
    margin: 0.25rem 0;
    margin: 0;
    color: #4a90e2;
    min-width: 100px;
}

.zoom-controls {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.btn-zoom {
    background: rgba(44, 62, 80, 0.8);
    border: 2px solid rgba(74, 144, 226, 0.4);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: #f5f7fa;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-zoom:hover {
    background: rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.6);
    transform: scale(1.1);
}

.btn-zoom.sector-map-options-btn {
    min-width: 48px;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.btn-zoom.sector-map-render-view-btn {
    min-width: 92px;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.btn-zoom.sector-map-layers-btn {
    min-width: 64px;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.btn-zoom.sector-map-layers-btn.active {
    background: rgba(74, 144, 226, 0.35);
    border-color: rgba(74, 144, 226, 0.85);
    color: #ffffff;
}

.btn-zoom.sector-map-options-btn.active {
    background: rgba(74, 144, 226, 0.35);
    border-color: rgba(74, 144, 226, 0.85);
    color: #ffffff;
}

.btn-zoom.sector-map-render-view-btn.active {
    background: rgba(34, 197, 94, 0.35);
    border-color: rgba(34, 197, 94, 0.85);
    color: #ffffff;
}

#editSectorModal > .sector-map-layers-panel {
    position: fixed;
    z-index: 10060;
    top: 7.5rem;
    right: 1.25rem;
    width: 17.5rem;
    max-height: min(70vh, 34rem);
    display: none;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    background: rgba(18, 22, 30, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    overflow: hidden;
}

#editSectorModal > .sector-map-layers-panel.is-open {
    display: flex;
}

#simulationModal > .sector-map-layers-panel,
#simulationModal > .sector-map-layers-custom-editor {
    position: fixed;
    z-index: 1400;
}

#simulationModal > .sector-map-layers-panel {
    top: 4.5rem;
    right: 1.25rem;
    width: 17.5rem;
    max-height: min(70vh, 34rem);
    display: none;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    background: rgba(18, 22, 30, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    overflow: hidden;
}

#simulationModal > .sector-map-layers-panel.is-open {
    display: flex;
}

#simulationModal > .sector-map-layers-custom-editor {
    top: 5.5rem;
    right: 19.5rem;
    width: 19rem;
    max-height: min(74vh, 38rem);
    display: none;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    background: rgba(18, 22, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    overflow: hidden;
}

#simulationModal > .sector-map-layers-custom-editor.is-open {
    display: flex;
}

.sector-map-layers-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.42rem 0.55rem 0.42rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(245, 247, 250, 0.95);
    background: rgba(21, 101, 192, 0.55);
    cursor: grab;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sector-map-layers-panel-header:active {
    cursor: grabbing;
}

.sector-map-layers-panel-title {
    flex: 1;
    min-width: 0;
}

.sector-map-layers-close {
    flex-shrink: 0;
    width: 1.55rem;
    height: 1.55rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: rgba(245, 247, 250, 0.92);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.sector-map-layers-close:hover {
    background: rgba(255, 255, 255, 0.12);
}

.sector-map-layers-panel-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.4rem 0.45rem 0.55rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sector-map-layers-cat {
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.sector-map-layers-cat-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.4rem;
    min-height: 1.85rem;
}

.sector-map-layers-cat-toggle {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: rgba(245, 247, 250, 0.8);
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.sector-map-layers-cat-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sector-map-layers-cat-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 0;
    color: rgba(245, 247, 250, 0.92);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.sector-map-layers-cat-label input,
.sector-map-layers-item-label input {
    accent-color: #4a90e2;
    margin: 0;
    flex-shrink: 0;
}

.sector-map-layers-items {
    display: none;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0 0.35rem 0.4rem 1.7rem;
    max-height: 11rem;
    overflow-y: auto;
}

.sector-map-layers-cat.is-expanded > .sector-map-layers-items {
    display: flex;
}

.sector-map-layers-cat.is-layer-parent > .sector-map-layers-items.sector-map-layers-subcats {
    max-height: none;
    overflow: visible;
    gap: 0.28rem;
    padding-left: 1.15rem;
}

.sector-map-layers-cat.is-layer-parent .sector-map-layers-cat,
.sector-map-layers-custom-subcat.is-layer-parent .sector-map-layers-custom-subcat {
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.sector-map-layers-custom-subcat.is-layer-parent > .sector-map-layers-items.sector-map-layers-subcats {
    display: none;
    flex-direction: column;
    gap: 0.28rem;
    max-height: none;
    overflow: visible;
    padding-left: 1.15rem;
}

.sector-map-layers-custom-subcat.is-layer-parent.is-expanded > .sector-map-layers-items.sector-map-layers-subcats {
    display: flex;
}

.sector-map-layers-item-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(245, 247, 250, 0.82);
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    padding: 0.18rem 0.2rem;
    border-radius: 4px;
}

.sector-map-layers-item-label:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sector-map-layers-item-label span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sector-map-layers-empty {
    color: rgba(245, 247, 250, 0.45);
    font-size: 0.7rem;
    font-style: italic;
    padding: 0.15rem 0.2rem 0.25rem;
}

.sector-map-layers-panel-toolbar {
    flex-shrink: 0;
    padding: 0.4rem 0.45rem 0.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sector-map-layers-add-custom-btn {
    width: 100%;
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 6px;
    background: rgba(74, 144, 226, 0.18);
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.02em;
    padding: 0.38rem 0.5rem;
    cursor: pointer;
}

.sector-map-layers-add-custom-btn:hover {
    background: rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.7);
}

.sector-map-layers-section {
    margin-bottom: 0.55rem;
}

.sector-map-layers-section-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0 0.35rem;
    padding: 0.15rem 0.1rem;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
}

.sector-map-layers-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(148, 163, 184, 0.28);
}

.sector-map-layers-section.is-custom-section .sector-map-layers-section-title {
    color: rgba(125, 211, 252, 0.95);
}

.sector-map-layers-section.is-custom-section .sector-map-layers-section-title::after {
    background: rgba(56, 189, 248, 0.35);
}

.sector-map-layers-cat.is-custom {
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 6px;
    background: rgba(14, 165, 233, 0.08);
    margin-bottom: 0.3rem;
}

.sector-map-layers-cat.is-custom-all {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(14, 165, 233, 0.12);
}

.sector-map-layers-cat.is-custom-all > .sector-map-layers-cat-row .sector-map-layers-cat-label span {
    letter-spacing: 0.04em;
    font-weight: 800;
}

.sector-map-layers-cat.is-custom-all > .sector-map-layers-custom-subcats > .sector-map-layers-cat.is-custom {
    margin-bottom: 0.2rem;
}

.sector-map-layers-cat.is-custom-other {
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.4);
    background: rgba(100, 116, 139, 0.1);
}

.sector-map-layers-cat-row .sector-map-layers-custom-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    margin-left: auto;
    flex-shrink: 0;
}

.sector-map-layers-cat-row .sector-map-layers-custom-edit,
.sector-map-layers-cat-row .sector-map-layers-custom-add-sub,
.sector-map-layers-cat-row .sector-map-layers-custom-delete {
    flex-shrink: 0;
    width: 1.35rem;
    height: 1.35rem;
    border: none;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.sector-map-layers-cat-row .sector-map-layers-custom-edit {
    background: rgba(148, 163, 184, 0.22);
    color: rgba(241, 245, 249, 0.95);
    font-size: 0.72rem;
}

.sector-map-layers-cat-row .sector-map-layers-custom-edit:hover {
    background: rgba(148, 163, 184, 0.4);
}

.sector-map-layers-cat-row .sector-map-layers-custom-add-sub {
    background: #16a34a;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
}

.sector-map-layers-cat-row .sector-map-layers-custom-add-sub:hover {
    background: #15803d;
}

.sector-map-layers-cat-row .sector-map-layers-custom-delete {
    background: transparent;
    color: rgba(245, 247, 250, 0.55);
    font-size: 0.95rem;
    border-radius: 4px;
}

.sector-map-layers-cat-row .sector-map-layers-custom-delete:hover {
    background: rgba(198, 40, 40, 0.25);
    color: #ef9a9a;
}

.sector-map-layers-custom-subcats {
    display: none;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.15rem 0.25rem 0.35rem 0.55rem;
    margin-left: 0.35rem;
    border-left: 1px solid rgba(148, 163, 184, 0.25);
}

.sector-map-layers-cat.is-expanded > .sector-map-layers-custom-subcats {
    display: flex;
}

.sector-map-layers-custom-subcat {
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
}

.sector-map-layers-custom-subcat .sector-map-layers-items {
    display: none;
    padding-left: 1.35rem;
    max-height: 8rem;
}

.sector-map-layers-custom-subcat.is-expanded > .sector-map-layers-items {
    display: flex;
}

.sector-map-layers-route-wp-popup {
    position: fixed;
    z-index: 10080;
    display: none;
    flex-direction: row;
    gap: 0.3rem;
    padding: 0.28rem;
    border-radius: 6px;
    background: rgba(18, 22, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

.sector-map-layers-route-wp-popup.is-open {
    display: flex;
}

.sector-map-layers-route-wp-popup button {
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 4px;
    background: rgba(74, 144, 226, 0.22);
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.28rem 0.45rem;
    cursor: pointer;
    white-space: nowrap;
}

.sector-map-layers-route-wp-popup button:hover {
    background: rgba(74, 144, 226, 0.4);
    border-color: rgba(74, 144, 226, 0.75);
}

.sector-map-layers-route-wp-popup button[data-route-wp-choice="without"] {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.sector-map-layers-route-wp-popup button[data-route-wp-choice="without"]:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}

.sector-map-move-wp-confirm-popup {
    position: fixed;
    z-index: 10080;
    display: none;
    flex-direction: row;
    gap: 0.3rem;
    padding: 0.28rem;
    border-radius: 6px;
    background: rgba(18, 22, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

.sector-map-move-wp-confirm-popup.is-open {
    display: flex;
}

.sector-map-move-wp-confirm-popup button {
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 4px;
    background: rgba(74, 144, 226, 0.22);
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.28rem 0.45rem;
    cursor: pointer;
    white-space: nowrap;
}

.sector-map-move-wp-confirm-popup button:hover {
    background: rgba(74, 144, 226, 0.4);
    border-color: rgba(74, 144, 226, 0.75);
}

.sector-map-move-wp-confirm-popup button[data-move-wp-choice="rollback"] {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.sector-map-move-wp-confirm-popup button[data-move-wp-choice="rollback"]:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}

#editSectorModal > .sector-map-layers-custom-editor {
    position: fixed;
    z-index: 10070;
    top: 8.5rem;
    right: 19.5rem;
    width: 19rem;
    max-height: min(74vh, 38rem);
    display: none;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    background: rgba(18, 22, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    overflow: hidden;
}

#editSectorModal > .sector-map-layers-custom-editor.is-open {
    display: flex;
}

.sector-map-layers-custom-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.42rem 0.55rem 0.42rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(245, 247, 250, 0.95);
    background: rgba(21, 101, 192, 0.55);
    cursor: grab;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sector-map-layers-custom-editor-header:active {
    cursor: grabbing;
}

.sector-map-layers-custom-editor-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.55rem 0.55rem 0.35rem;
    overflow: hidden;
    min-height: 0;
    flex: 1;
}

.sector-map-layers-custom-name-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: rgba(245, 247, 250, 0.85);
    font-size: 0.72rem;
    font-weight: 600;
    flex-shrink: 0;
}

.sector-map-layers-custom-name-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.28);
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.8rem;
    padding: 0.35rem 0.45rem;
}

.sector-map-layers-custom-editor-lists {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    min-height: 0;
    flex: 1;
}

.sector-map-layers-custom-font {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.45rem 0.35rem 0.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.15rem;
}

.sector-map-layers-custom-font-enable {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(245, 247, 250, 0.9);
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.sector-map-layers-custom-font-enable input {
    accent-color: #4a90e2;
    margin: 0;
}

.sector-map-layers-custom-font-controls {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sector-map-layers-custom-font-controls[hidden],
.sector-map-layers-custom-font-field[hidden] {
    display: none !important;
}

.sector-map-layers-custom-font-field {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    color: rgba(245, 247, 250, 0.78);
    font-size: 0.68rem;
    font-weight: 600;
}

.sector-map-layers-custom-font-select {
    width: 100%;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.28);
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.76rem;
    padding: 0.3rem 0.4rem;
}

.sector-map-layers-custom-font-color-field {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.sector-map-layers-custom-font-color {
    width: 2.4rem;
    height: 1.55rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.sector-map-layers-custom-editor-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
    padding: 0.45rem 0.55rem 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sector-map-layers-custom-footer-btn {
    font-size: 0.75rem !important;
    padding: 0.35rem 0.7rem !important;
    min-height: 0 !important;
}

#sectorMapLayersCustomPickFromMapBtn {
    margin-right: auto;
}

.sector-map-layers-custom-pick-popup {
    position: fixed;
    z-index: 10080;
    display: none;
    flex-direction: row;
    gap: 0.3rem;
    padding: 0.28rem;
    border-radius: 6px;
    background: rgba(18, 22, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
}

.sector-map-layers-custom-pick-popup.is-open {
    display: flex;
}

.sector-map-layers-custom-pick-popup button {
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 4px;
    background: rgba(74, 144, 226, 0.22);
    color: rgba(245, 247, 250, 0.95);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.28rem 0.45rem;
    cursor: pointer;
    white-space: nowrap;
}

.sector-map-layers-custom-pick-popup button:hover {
    background: rgba(74, 144, 226, 0.4);
    border-color: rgba(74, 144, 226, 0.75);
}

.sector-map-layers-custom-pick-popup button[data-custom-pick-choice="exclude"] {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.sector-map-layers-custom-pick-popup button[data-custom-pick-choice="exclude"]:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.35);
}

#editSectorModal > .sector-map-options-panel {
    position: fixed;
    z-index: 10060;
    top: 7.5rem;
    right: 19.5rem;
    width: 17.5rem;
    max-height: min(70vh, 34rem);
    display: none;
    flex-direction: column;
    padding: 0;
    border-radius: 8px;
    background: rgba(18, 22, 30, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    overflow: hidden;
}

#editSectorModal > .sector-map-options-panel.is-open {
    display: flex;
}

.sector-map-options-panel-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.45rem 0.5rem 0.6rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sector-map-options-section {
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 0.45rem 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}

.sector-map-options-section-title {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
    margin-bottom: 0.05rem;
}

.sector-map-option-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(245, 247, 250, 0.92);
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.sector-map-option-check input {
    accent-color: #4a90e2;
    margin: 0;
}

.airspace-ai-assistant-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.1rem;
    padding: 0.35rem 0 0.15rem;
}

.airspace-ai-assistant-checks .sector-map-option-check {
    font-size: 0.9rem;
}

.airspace-ai-assistant-actions {
    margin-top: 0.5rem;
    gap: 0.75rem;
}

.airspace-ai-assistant-status {
    margin-top: 0.85rem;
    min-height: 1.2em;
    white-space: pre-wrap;
}

.airspace-ai-assistant-results {
    margin-top: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(44, 62, 80, 0.6);
    border-radius: 8px;
    max-height: 220px;
    overflow: auto;
    font-size: 0.85rem;
}

.exercise-ai-assistant-special-wrap {
    margin-top: 0.65rem;
}

.exercise-ai-assistant-special-wrap[hidden] {
    display: none !important;
}

.exercise-ai-assistant-include-confirm-summary {
    margin: 0;
    padding-left: 1.1rem;
    line-height: 1.45;
}

.exercise-ai-assistant-include-confirm-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
}

.exercise-ai-assistant-include-confirm-options {
    display: flex;
    flex-direction: row;
    gap: 0.45rem;
    width: 100%;
}

.exercise-ai-assistant-include-confirm-option-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.35rem 0.55rem;
    font-size: 0.78rem;
    line-height: 1.25;
    white-space: normal;
}

.exercise-ai-assistant-include-confirm-cancel-btn {
    align-self: center;
    padding: 0.3rem 1.1rem;
    font-size: 0.8rem;
}

.sector-map-option-slider {
    display: grid;
    gap: 0.18rem;
    padding-top: 0.1rem;
}

.sector-map-option-slider label {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: rgba(245, 247, 250, 0.82);
    font-size: 0.7rem;
    font-weight: 600;
}

.sector-map-option-slider input[type="range"] {
    width: 100%;
    accent-color: #4a90e2;
}

#visualizationCanvas {
    cursor: grab;
    user-select: none;
}

#visualizationCanvas:active {
    cursor: grabbing;
}

.visualization-canvas {
    height: 60vh;
    flex-shrink: 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    border: 1px solid #cccccc;
}

.sector-map-cursor-coords {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 25;
    pointer-events: none;
    transform: translate(14px, 14px);
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid rgba(17, 24, 39, 0.35);
    background: rgba(255, 255, 255, 0.9);
    color: #111827;
    font: 11px/1.25 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

/* Simulation Styles */
.simulation-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.simulation-control-strip {
    background: rgba(26, 47, 74, 0.9);
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
    padding: 0.45rem 1rem;
    flex-shrink: 0;
}

.simulation-strip-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    justify-content: space-between;
}

.simulation-strip-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    min-width: 0;
    flex: 0 1 auto;
}

.simulation-strip-content h2 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f5f7fa;
    line-height: 1.35;
    min-width: 0;
    flex-shrink: 0;
    max-width: min(42rem, 100%);
    word-break: break-word;
}

.simulation-clock {
    justify-self: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #f5f7fa;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.simulation-clock.sim-clock-flash-red {
    color: #ff3b30;
    border-color: rgba(255, 59, 48, 0.65);
    background: rgba(255, 59, 48, 0.10);
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.12);
}

.sim-host-atc-scope {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: rgba(245, 247, 250, 0.88);
    white-space: nowrap;
    max-width: 15rem;
}

.sim-host-atc-scope-select {
    max-width: 12rem;
    min-width: 0;
    font-size: 0.78rem;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    border: 1px solid rgba(74, 144, 226, 0.35);
    background: rgba(14, 24, 38, 0.95);
    color: #f5f7fa;
}

.sim-host-atc-scope-select:disabled {
    opacity: 0.92;
    cursor: not-allowed;
}

.sim-host-atc-scope-select.is-locked {
    border-color: rgba(74, 144, 226, 0.55);
}

.sim-atc-scope-combo {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 14rem;
}

.sim-atc-scope-combo-btn {
    max-width: 14rem;
    min-width: 0;
    font-size: 0.78rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    border: 1px solid rgba(74, 144, 226, 0.55);
    background: rgba(14, 24, 38, 0.95);
    color: #f5f7fa;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-atc-scope-combo-btn:hover {
    border-color: rgba(91, 163, 245, 0.85);
}

.sim-atc-scope-combo-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 80;
    min-width: 12rem;
    max-width: 18rem;
    max-height: 16rem;
    overflow: auto;
    padding: 4px 0;
    border-radius: 6px;
    border: 1px solid rgba(74, 144, 226, 0.5);
    background: rgba(11, 18, 32, 0.98);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.sim-atc-scope-combo-row {
    padding: 0;
}

.sim-atc-scope-combo-row.is-disabled {
    opacity: 0.4;
}

.sim-atc-scope-combo-row.is-primary .sim-atc-scope-combo-name {
    font-weight: 800;
    color: #86efac;
}

.sim-atc-scope-combo-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 0.78rem;
    color: #e2e8f0;
}

.sim-atc-scope-combo-row.is-disabled .sim-atc-scope-combo-label {
    cursor: default;
}

.sim-atc-scope-combo-label:hover {
    background: rgba(59, 130, 246, 0.15);
}

.sim-atc-scope-combo-check {
    flex: 0 0 auto;
    margin: 0;
}

.sim-atc-scope-combo-primary-mark {
    flex: 0 0 auto;
    width: 0.9rem;
    text-align: center;
    color: #86efac;
    font-size: 0.65rem;
}

.sim-atc-scope-combo-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.run-type-single-atc-sector-select {
    max-width: 100%;
}

.simulation-clock-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem 0.65rem;
    min-width: 0;
    flex: 0 1 auto;
}

.sim-fullscreen-btn {
    min-width: auto;
    height: 32px;
    padding: 0 0.55rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

.sim-tts-toggle {
    min-width: 4.5rem;
    height: 32px;
    padding: 0 0.5rem;
    border-radius: 6px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 800;
    line-height: 1;
}

.sim-tts-title {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    font-weight: 900;
}

.sim-tts-value {
    font-size: 0.85rem;
    font-weight: 900;
}

.sim-tts-toggle.sim-tts-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.sim-tts-toggle.sim-tts-on {
    background: rgba(34, 197, 94, 0.22) !important;
    border-color: rgba(34, 197, 94, 0.65) !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.16) inset;
}

.sim-tts-radio-fx-panel {
    margin-top: 0.65rem;
    padding: 0.7rem 0.75rem 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.45rem;
    background: rgba(15, 23, 42, 0.28);
}

.sim-tts-radio-fx-row {
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.55rem;
}

.sim-tts-radio-fx-level {
    min-width: 12rem;
    flex: 1 1 12rem;
}

.sim-tts-radio-fx-level em {
    font-style: normal;
    font-weight: 800;
}

.sim-settings-subpanel-btn.sim-tts-radio-fx-on {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(34, 197, 94, 0.65);
}

.sim-ai-pp-toggle {
    min-width: 5.5rem;
}

.simulation-speed-status {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: rgba(245, 247, 250, 0.85);
    white-space: nowrap;
    opacity: 0.95;
}

.simulation-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    justify-content: flex-end;
    align-content: center;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
}

.sim-controls-main {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.sim-playback-cluster {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.simulation-controls .btn {
    padding: 0 0.65rem;
    min-height: 32px;
    height: 32px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Top strip: glass buttons — transparent + white outline; hover = filled (previous solid style), no outline */
.simulation-control-strip .btn.btn-secondary {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.92) !important;
    box-shadow: none !important;
}

.simulation-control-strip .btn.btn-secondary:hover {
    background: linear-gradient(135deg, #5ba3f5 0%, #4a90e2 100%) !important;
    border: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    transform: none;
}

.simulation-control-strip .sim-tts-toggle.sim-tts-on {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.92) !important;
    box-shadow: none !important;
}

.simulation-control-strip .sim-tts-toggle.sim-tts-on:hover {
    background: rgba(34, 197, 94, 0.22) !important;
    border: none !important;
    border-color: rgba(34, 197, 94, 0.65) !important;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.16) inset !important;
}

.ai-pp-ptt-select-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.ai-pp-ptt-btn.btn {
    flex-direction: row;
    min-width: 0;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
}

.ai-pp-selected-key {
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(74, 144, 226, 0.35);
    border-radius: 8px;
    background: rgba(15, 28, 45, 0.58);
    color: #f5f7fa;
    font-weight: 700;
    text-align: center;
}

.ai-pp-ptt-hint {
    min-height: 1.2rem;
    margin-top: 0.6rem;
}

#aiPpPttModal .ai-pp-ptt-modal-footer {
    display: flex;
    justify-content: center;
    padding: 1rem 1.25rem 1.25rem;
}

#aiPpPttModal .ai-pp-ptt-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    width: 100%;
}

#aiPpPttModal .ai-pp-ptt-actions-row .ai-pp-ptt-btn.btn {
    flex: 1 1 0;
    min-width: 5.5rem;
    max-width: 8rem;
    justify-content: center;
}

.sim-ai-pp-vccs {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 7;
    min-width: 160px;
    max-width: 22rem;
    padding: 0.55rem;
    border: 1px solid rgba(147, 197, 253, 0.42);
    border-radius: 10px;
    background: rgba(8, 16, 28, 0.34);
    color: rgba(245, 247, 250, 0.94);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(4px);
    user-select: none;
}

.sim-ai-pp-vccs-title {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: 0;
}

.sim-ai-pp-vccs-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 0.4rem;
    min-height: 1.35rem;
}

.sim-ai-pp-vccs-details-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 1px solid rgba(245, 247, 250, 0.42);
    border-radius: 4px;
    background: transparent;
    color: rgba(245, 247, 250, 0.78);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.sim-ai-pp-vccs-details-toggle:hover {
    border-color: rgba(147, 197, 253, 0.75);
    color: rgba(245, 247, 250, 0.96);
    background: transparent;
}

.sim-ai-pp-vccs-details-toggle:focus {
    outline: none;
    border-color: rgba(147, 197, 253, 0.85);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.18);
}

.sim-ai-pp-vccs-details[hidden] {
    display: none !important;
}

.sim-ai-pp-vccs-details .sim-ai-pp-reply:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.sim-ai-pp-vccs-row {
    display: flex;
    gap: 0.45rem;
    justify-content: center;
}

.sim-ai-pp-vccs-box {
    min-width: 42px;
    padding: 0.25rem 0.35rem;
    border: 1px solid rgba(245, 247, 250, 0.38);
    border-radius: 6px;
    background: rgba(245, 247, 250, 0.06);
    color: rgba(245, 247, 250, 0.7);
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
}

.sim-ai-pp-vccs-box.active {
    background: rgba(34, 197, 94, 0.42);
    border-color: rgba(74, 222, 128, 0.95);
    color: #ffffff;
    box-shadow: 0 0 16px rgba(34, 197, 94, 0.35);
}

.sim-ai-pp-vccs-box.blocked {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(248, 113, 113, 0.92);
    color: #fecaca;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.38);
}

.sim-ai-pp-status {
    max-width: 15rem;
    margin-top: 0.4rem;
    color: rgba(245, 247, 250, 0.72);
    font-size: 0.68rem;
    line-height: 1.25;
    text-align: center;
}

.sim-ai-pp-reply {
    margin-top: 0.45rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(245, 247, 250, 0.12);
}

.sim-ai-pp-reply-label {
    color: rgba(147, 197, 253, 0.95);
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sim-ai-pp-reply-text {
    margin-top: 0.15rem;
    color: rgba(245, 247, 250, 0.88);
    font-size: 0.68rem;
    line-height: 1.25;
    white-space: pre-wrap;
    word-break: break-word;
    user-select: text;
    cursor: text;
}

.sim-ai-pp-raw-text {
    display: block;
    width: 100%;
    min-height: 3.5rem;
    max-height: 8rem;
    margin-top: 0.15rem;
    padding: 0.35rem 0.45rem;
    border: 1px solid rgba(147, 197, 253, 0.28);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.22);
    color: rgba(245, 247, 250, 0.92);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.62rem;
    line-height: 1.35;
    resize: vertical;
    user-select: text;
    cursor: text;
}

.sim-ai-pp-raw-text:focus {
    outline: none;
    border-color: rgba(147, 197, 253, 0.55);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.simulation-control-strip .simulation-controls .sim-tri-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    filter: none;
}

.simulation-control-strip .simulation-controls .sim-tri-btn:hover {
    background: linear-gradient(135deg, #5ba3f5 0%, #4a90e2 100%) !important;
    box-shadow: none !important;
    filter: none;
    border: none !important;
}

/* RR / FF: triangular buttons (left / right), text kept inside */
.simulation-controls .sim-tri-btn {
    width: 52px;
    min-width: 52px;
    height: 32px;
    padding: 0;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 0.03em;
    font-size: 0.68rem;
    line-height: 1;
    border: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.simulation-controls .sim-tri-btn.sim-tri-rr {
    -webkit-clip-path: polygon(0% 50%, 100% 0%, 100% 100%);
    clip-path: polygon(0% 50%, 100% 0%, 100% 100%);
    padding-left: 0.2rem;
}

.simulation-controls .sim-tri-btn.sim-tri-ff {
    -webkit-clip-path: polygon(100% 50%, 0% 0%, 0% 100%);
    clip-path: polygon(100% 50%, 0% 0%, 0% 100%);
    padding-right: 0.2rem;
}

.simulation-controls .sim-tri-btn:hover {
    filter: brightness(1.08);
}

.sim-spv-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0.15rem;
}

.sim-live-adsb-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0 0.15rem;
}

.sim-live-adsb-range {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sim-live-adsb-range input[type="number"] {
    width: 3.4rem;
    min-height: 32px;
    height: 32px;
    padding: 0 0.3rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    background: transparent;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    box-sizing: border-box;
}

.sim-live-adsb-range input[type="number"]:focus {
    outline: none;
    border-color: rgba(234, 179, 8, 0.9);
    box-shadow: 0 0 0 2px rgba(161, 98, 7, 0.28);
}

.sim-live-adsb-toggle.sim-live-adsb-on {
    background: rgba(161, 98, 7, 0.42) !important;
    border-color: rgba(234, 179, 8, 0.9) !important;
    box-shadow: 0 0 0 2px rgba(161, 98, 7, 0.22) inset;
    color: #fde68a !important;
}

.simulation-control-strip .btn.btn-secondary.sim-live-adsb-on,
.simulation-control-strip .btn.btn-secondary.sim-live-adsb-on:hover {
    background: rgba(161, 98, 7, 0.5) !important;
    border: 1px solid rgba(234, 179, 8, 0.95) !important;
    box-shadow: 0 0 0 2px rgba(161, 98, 7, 0.22) inset !important;
    color: #fde68a !important;
}

.sim-mode-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sim-mode-option {
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 10px;
    padding: 0.7rem 0.8rem;
    background: rgba(26, 47, 74, 0.25);
    cursor: pointer;
}

.sim-mode-option:hover {
    border-color: rgba(74, 144, 226, 0.55);
}

.sim-mode-option.active {
    border-color: rgba(34, 197, 94, 0.7);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15) inset;
}

.sim-mode-option-disabled {
    cursor: not-allowed;
    border-color: rgba(220, 38, 38, 0.45);
    background: rgba(80, 20, 20, 0.35);
    opacity: 0.92;
    pointer-events: none;
}

.sim-mode-option-disabled .sim-mode-option-title {
    color: rgba(248, 113, 113, 0.95);
}

.sim-mode-option-disabled .sim-mode-option-desc {
    color: rgba(248, 180, 180, 0.65);
}

.sim-mode-option-demo-tag {
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: rgba(252, 165, 165, 0.98);
    white-space: nowrap;
}

.sim-mode-option-title {
    font-weight: 900;
    color: rgba(245, 247, 250, 0.95);
    margin-bottom: 0.35rem;
}

.sim-mode-option-desc {
    font-size: 0.88rem;
    color: rgba(245, 247, 250, 0.78);
    line-height: 1.3;
}

.sim-alv-picker {
    position: absolute;
    z-index: 50;
    min-width: 78px;
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 10px;
    background: rgba(14, 24, 38, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    user-select: none;
}

#simulationAvlbFlPicker.sim-holding-avlb-fl-picker-top {
    position: fixed;
    z-index: 1350;
    pointer-events: auto;
}

#simulationAlvPicker.sim-holding-alv-picker-top {
    position: fixed;
    z-index: 1350;
    pointer-events: auto;
}

#simulationTaxiPicker {
    z-index: 80;
    min-width: 150px;
}

/* Floating Advanced Label (in-sim only; not a browser popup) */
.sim-advanced-label {
    position: fixed;
    z-index: 1200;
    min-width: 280px;
    max-width: min(96vw, 560px);
    border: 1px solid rgba(74, 144, 226, 0.55);
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
    user-select: none;
}

.sim-advanced-label-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(74, 144, 226, 0.35);
    background: transparent;
    cursor: grab;
    font-weight: 800;
    letter-spacing: 0.04em;
    font-size: 0.82rem;
    color: rgba(245, 247, 250, 0.95);
}

.sim-advanced-label-header:active {
    cursor: grabbing;
}

.sim-advanced-label-title {
    flex: 0 0 auto;
}

.sim-advanced-label-flight {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8rem;
    color: rgba(147, 197, 253, 0.95);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 12rem;
}

.sim-advanced-label-body {
    padding: 10px 10px 12px;
    background: transparent;
    min-height: 2.5rem;
    width: 100%;
    box-sizing: border-box;
}

.sim-advanced-label-columns {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.sim-advanced-label-left {
    flex: 0 1 auto;
    min-width: 0;
}

.sim-advanced-label-right {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(245, 247, 250, 0.88);
}

.sim-adv-grid {
    border-collapse: collapse;
    font-size: 0.72rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: rgba(245, 247, 250, 0.92);
}

.sim-adv-grid td {
    border: 1px solid rgba(74, 144, 226, 0.28);
    padding: 3px 5px;
    min-width: 2.6rem;
    max-width: 7rem;
    vertical-align: top;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.sim-adv-grid td.sim-adv-cell-empty {
    min-height: 1.1rem;
}

.sim-adv-route-block {
    margin-bottom: 10px;
    width: 100%;
}

.sim-adv-route-label {
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(147, 197, 253, 0.95);
    margin-bottom: 4px;
}

/* Full width of right column (same as OLDI grid); wrap between waypoints only — names stay intact */
.sim-adv-route-tokens {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0;
    row-gap: 4px;
    width: 100%;
    box-sizing: border-box;
}

.sim-adv-route-tokens .sim-adv-route-wp {
    white-space: nowrap;
    flex: 0 0 auto;
}

.sim-adv-route-tokens .sim-adv-route-sep {
    flex: 0 0 auto;
    white-space: pre;
    user-select: none;
}

.sim-adv-oldi-block {
    margin-bottom: 10px;
    width: 100%;
}

.sim-adv-oldi-title {
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(147, 197, 253, 0.95);
    margin-bottom: 4px;
}

.sim-adv-oldi-cols {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px 8px;
    text-align: center;
}

.sim-adv-oldi-cols .sim-adv-h {
    font-size: 0.65rem;
    color: rgba(245, 247, 250, 0.65);
    line-height: 1.2;
}

.sim-adv-oldi-cols .sim-adv-v {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.75rem;
    margin-top: 2px;
    min-height: 1.1em;
}

.sim-adv-sector-block {
    width: 100%;
}

.sim-adv-sector-block .sim-adv-sector-title {
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(147, 197, 253, 0.95);
    margin-bottom: 4px;
}

.sim-adv-sector-body {
    color: rgba(245, 247, 250, 0.72);
    font-size: 0.76rem;
}

.sim-advanced-label-placeholder {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(245, 247, 250, 0.65);
}

/* DL: aircraft in holding (auto popup for EXE/PLN, PP, host, solo) */
.sim-holding-list-panel {
    min-width: 420px;
    max-width: min(96vw, 620px);
}

.sim-coast-list-panel {
    min-width: 260px;
    max-width: min(96vw, 380px);
}

.sim-coast-list-show {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sim-coast-list-show input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    accent-color: #dc2626;
}

.sim-holding-list-header {
    cursor: grab;
}

.sim-holding-list-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
    flex: 0 0 auto;
}

.sim-holding-list-detached-host {
    pointer-events: none;
}

.sim-holding-list-detached-panel {
    pointer-events: auto;
}

/* EN-MGMT floating panel (entry management) */
.sim-en-mgmt-panel {
    width: max-content;
    min-width: 420px;
    max-width: min(96vw, 960px);
}

.sim-en-mgmt-panel .sim-en-mgmt-body {
    min-height: 88px;
    overflow-x: auto;
}

/* Detached per-route windows: header = route name, sized to fit the list (no scrolling). */
.sim-en-mgmt-detached-route-panel {
    width: max-content;
    min-width: 0;
    max-width: 96vw;
}

.sim-en-mgmt-detached-route-panel .sim-en-mgmt-body {
    min-height: 0;
    max-height: none;
    overflow: visible;
}

.sim-en-mgmt-categories {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sim-en-mgmt-category + .sim-en-mgmt-category {
    margin-top: 0.35rem;
}

.sim-en-mgmt-category-header {
    border-bottom: 1px solid rgba(74, 144, 226, 0.35);
    padding: 8px 10px 4px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(245, 247, 250, 0.95);
    text-align: left;
}

.sim-en-mgmt-category-content {
    min-height: 0.35rem;
}

.sim-en-mgmt-category-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.74rem;
}

.sim-en-mgmt-category-table th {
    padding: 0;
    text-align: center;
    vertical-align: middle;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(245, 247, 250, 0.75);
    border-bottom: 1px solid rgba(74, 144, 226, 0.2);
    white-space: nowrap;
}

.sim-en-mgmt-sortable-th {
    padding: 0;
    text-align: center;
    vertical-align: middle;
}

.sim-en-mgmt-sort-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 4px 10px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    letter-spacing: inherit;
    line-height: 1.35;
    text-align: center;
    cursor: pointer;
    gap: 0;
}

.sim-en-mgmt-sort-label {
    flex: 0 1 auto;
    text-align: center;
}

.sim-en-mgmt-sort-btn:hover {
    color: rgba(245, 247, 250, 0.95);
}

.sim-en-mgmt-sort-btn:focus-visible {
    outline: 2px solid rgba(74, 144, 226, 0.55);
    outline-offset: 1px;
}

.sim-en-mgmt-sort-indicator {
    flex: 0 0 auto;
    width: 0.65rem;
    margin-left: 0.38rem;
    font-size: 0.62rem;
    line-height: 1;
    text-align: center;
    color: rgba(125, 211, 252, 0.95);
    pointer-events: none;
}

.sim-en-mgmt-sortable-th:not(.is-sort-asc):not(.is-sort-desc) .sim-en-mgmt-sort-indicator {
    display: none;
}

.sim-en-mgmt-sortable-th.is-sort-asc .sim-en-mgmt-sort-label,
.sim-en-mgmt-sortable-th.is-sort-desc .sim-en-mgmt-sort-label {
    color: rgba(245, 247, 250, 0.96);
}

.sim-en-mgmt-category-table td {
    padding: 4px 10px;
    text-align: center;
    vertical-align: middle;
    line-height: 1.35;
    color: rgba(245, 247, 250, 0.92);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-en-mgmt-category-table td.sim-en-mgmt-category-rmk {
    white-space: normal;
    word-break: break-word;
    overflow: visible;
    text-overflow: clip;
}

.sim-en-mgmt-category-table td.sim-en-mgmt-category-avlb-lvls {
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    font-variant-numeric: tabular-nums;
}

.sim-en-mgmt-avlb-lvl-chip.sim-en-mgmt-avlb-lvl-blocked {
    color: #f87171;
    font-weight: 700;
}

.sim-en-mgmt-calc-th,
.sim-en-mgmt-category-table td.sim-en-mgmt-category-calc {
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.sim-en-mgmt-calc-btn {
    border: 1px solid rgba(14, 116, 144, 0.45);
    background: rgba(14, 116, 144, 0.14);
    color: rgba(245, 247, 250, 0.92);
    border-radius: 5px;
    padding: 0.18rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
}

.sim-en-mgmt-calc-btn:hover {
    background: rgba(14, 116, 144, 0.28);
}

.sim-en-mgmt-rule-debug-panel {
    width: max-content;
    min-width: 420px;
    max-width: min(96vw, 720px);
    max-height: min(88vh, 720px);
}

.sim-en-mgmt-rule-debug-panel .sim-en-mgmt-rule-debug-body {
    max-height: calc(min(88vh, 720px) - 44px);
    overflow: auto;
    padding: 8px 10px 12px;
}

.sim-en-mgmt-rule-debug-close-btn {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
}

.sim-en-mgmt-rule-debug-meta {
    font-size: 0.74rem;
    line-height: 1.45;
    color: rgba(245, 247, 250, 0.88);
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.25);
}

.sim-en-mgmt-rule-debug-note,
.sim-en-mgmt-rule-debug-empty {
    font-size: 0.74rem;
    color: rgba(245, 247, 250, 0.7);
    margin: 0.35rem 0;
}

.sim-en-mgmt-rule-debug-level {
    margin-top: 0.65rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(74, 144, 226, 0.18);
}

.sim-en-mgmt-rule-debug-level-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.25rem;
}

.sim-en-mgmt-rule-debug-level-title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: rgba(245, 247, 250, 0.95);
}

.sim-en-mgmt-rule-debug-level-outcome {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

.sim-en-mgmt-rule-debug-level-outcome.is-maintained {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
}

.sim-en-mgmt-rule-debug-level-outcome.is-blocked {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
}

.sim-en-mgmt-rule-debug-level-outcome.is-neutral {
    color: rgba(245, 247, 250, 0.65);
    background: rgba(148, 163, 184, 0.12);
}

.sim-en-mgmt-rule-debug-level-detail {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    color: rgba(245, 247, 250, 0.72);
}

.sim-en-mgmt-rule-debug-pair {
    margin: 0.45rem 0 0.55rem;
    padding: 0.4rem 0.45rem;
    border: 1px solid rgba(74, 144, 226, 0.16);
    border-radius: 6px;
    background: rgba(8, 18, 32, 0.35);
}

.sim-en-mgmt-rule-debug-pair-head {
    font-size: 0.72rem;
    margin-bottom: 0.35rem;
    color: rgba(245, 247, 250, 0.9);
}

.sim-en-mgmt-rule-debug-rule {
    margin-top: 0.35rem;
}

.sim-en-mgmt-rule-debug-rule-head {
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
}

.sim-en-mgmt-rule-debug-rule-text {
    margin: 0 0 0.25rem;
    padding: 0.35rem 0.45rem;
    font-size: 0.68rem;
    line-height: 1.35;
    white-space: pre-wrap;
    color: rgba(245, 247, 250, 0.82);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.sim-en-mgmt-rule-debug-trace {
    margin-top: 0.2rem;
}

.sim-en-mgmt-rule-debug-trace-step {
    font-size: 0.68rem;
    line-height: 1.35;
    padding: 0.12rem 0;
    color: rgba(245, 247, 250, 0.82);
}

.sim-en-mgmt-rule-debug-trace-step.is-pass {
    color: #86efac;
}

.sim-en-mgmt-rule-debug-trace-step.is-fail {
    color: #fca5a5;
}

.sim-en-mgmt-rule-debug-trace-detail {
    font-size: 0.66rem;
    color: rgba(245, 247, 250, 0.62);
    padding-left: 0.35rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.sim-en-mgmt-rule-debug-pair-head .is-pass,
.sim-en-mgmt-rule-debug-rule-head .is-pass {
    color: #86efac;
    font-weight: 700;
}

.sim-en-mgmt-rule-debug-pair-head .is-fail,
.sim-en-mgmt-rule-debug-rule-head .is-fail {
    color: #f87171;
    font-weight: 700;
}

.sim-en-mgmt-category-table td.sim-en-mgmt-category-mach {
    font-variant-numeric: tabular-nums;
}

.sim-en-mgmt-category-table tbody tr.sim-en-mgmt-row-selected td {
    background: rgba(74, 144, 226, 0.22);
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.42);
}

.sim-en-mgmt-category-table tbody tr.sim-en-mgmt-row-xfl-unavailable td {
    background: rgba(154, 52, 18, 0.52);
}

.sim-en-mgmt-category-table tbody tr.sim-en-mgmt-row-xfl-unavailable.sim-en-mgmt-row-selected td {
    background: rgba(154, 52, 18, 0.62);
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.42);
}

.sim-en-mgmt-category-table tbody tr.sim-en-mgmt-row-xfl-unavailable.sim-en-mgmt-row-xfl-hold-active td {
    box-shadow: inset 0 0 0 2px rgba(248, 113, 113, 0.9);
}

.sim-en-mgmt-category-xfl.sim-en-mgmt-xfl-unavailable {
    color: #ef4444;
    font-weight: 700;
    animation: sim-en-mgmt-xfl-unavailable-flash 0.85s ease-in-out infinite;
}

@keyframes sim-en-mgmt-xfl-unavailable-flash {
    0%, 100% {
        color: #ef4444;
        opacity: 1;
    }
    50% {
        color: #fecaca;
        opacity: 0.45;
    }
}

.sim-en-mgmt-category-empty {
    margin: 0;
    padding: 8px 10px;
    font-size: 0.82rem;
    line-height: 1.4;
    color: rgba(245, 247, 250, 0.65);
}

.sim-en-mgmt-panel.sim-en-mgmt-opaque {
    background: rgba(14, 24, 38, 0.95);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.sim-en-mgmt-panel.sim-en-mgmt-opaque .sim-advanced-label-header,
.sim-en-mgmt-panel.sim-en-mgmt-opaque .sim-holding-list-body {
    background: rgba(14, 24, 38, 0.95);
}

/* EN-MGMT Routes dialog: same style as Simulation Settings, 2× modal-small width (500px → 1000px).
   Nested in #simulationModal; must beat #simulationModal > .modal.active (1100) and EN-MGMT panel (1200). */
#simulationModal > #simulationEnMgmtRoutesModal.active {
    z-index: 1300;
}

#simulationModal > #simulationEnMgmtMergeRoutesModal.active {
    z-index: 1310;
}

#simulationModal > #simulationEnMgmtAddRouteModal.active {
    z-index: 1310;
}

#simulationModal > #simulationEnMgmtIdentifierModal.active {
    z-index: 1320;
}

#simulationModal > #simulationEnMgmtRulesModal.active {
    z-index: 1320;
}

#simulationModal > #simulationEnMgmtLevelsModal.active {
    z-index: 1330;
}

#simulationModal > #simulationEnMgmtSaveRoutesModal.active {
    z-index: 1340;
}

#simulationModal > #simulationEnMgmtSaveRoutesOverwriteModal.active {
    z-index: 1350;
}

#simulationModal > #simulationEnMgmtLoadRoutesModal.active {
    z-index: 1340;
}

#simulationModal > #simulationEnMgmtDeleteRoutesModal.active {
    z-index: 1310;
}

#simulationModal > #simulationEnMgmtDeleteRouteConfirmModal.active {
    z-index: 1360;
}

#simulationModal > #simulationEnMgmtLoadRoutesDeleteConfirmModal.active {
    z-index: 1370;
}

.sim-en-mgmt-levels-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sim-en-mgmt-levels-strip {
    width: 100%;
    box-sizing: border-box;
}

.sim-en-mgmt-identifier-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sim-en-mgmt-identifier-note {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(245, 247, 250, 0.82);
}

.sim-en-mgmt-identifier-rows {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.sim-en-mgmt-identifier-row {
    display: grid;
    grid-template-columns: auto 1fr 1fr auto;
    gap: 1rem;
    align-items: start;
}

.sim-en-mgmt-identifier-priority-cell {
    position: relative;
    align-self: center;
    flex: 0 0 auto;
}

.sim-en-mgmt-identifier-priority-btn {
    min-width: 2.85rem;
    height: 32px;
    padding: 0 0.45rem;
    border-radius: 6px;
    border: 1px solid rgba(74, 144, 226, 0.55);
    background: rgba(74, 144, 226, 0.2);
    color: rgba(245, 247, 250, 0.96);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.sim-en-mgmt-identifier-priority-btn:hover {
    background: rgba(74, 144, 226, 0.34);
    border-color: rgba(74, 144, 226, 0.85);
}

.sim-en-mgmt-identifier-priority-picker {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    z-index: 10;
    min-width: 4.5rem;
    padding: 0.25rem;
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 6px;
    background: rgba(12, 20, 36, 0.98);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.sim-en-mgmt-identifier-priority-option {
    padding: 0.3rem 0.5rem;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: rgba(245, 247, 250, 0.92);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}

.sim-en-mgmt-identifier-priority-option:hover {
    background: rgba(74, 144, 226, 0.28);
}

.sim-en-mgmt-identifier-priority-option.is-current {
    background: rgba(74, 144, 226, 0.22);
    color: rgba(245, 247, 250, 0.98);
}

.sim-en-mgmt-identifier-ident-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.sim-en-mgmt-identifier-row > .sim-en-mgmt-identifier-field:last-child {
    align-self: center;
}

.sim-en-mgmt-identifier-row-delete {
    align-self: center;
    flex: 0 0 auto;
    padding: 0 0.55rem;
    min-height: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(231, 76, 60, 0.5);
    background: rgba(231, 76, 60, 0.22);
    color: rgba(255, 220, 215, 0.96);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.sim-en-mgmt-identifier-row-delete:hover {
    background: rgba(231, 76, 60, 0.38);
    border-color: rgba(231, 76, 60, 0.85);
}

.sim-en-mgmt-identifier-row-delete[hidden] {
    display: none !important;
}

.sim-en-mgmt-rules-row-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-self: center;
}

.sim-en-mgmt-rules-row-duplicate {
    flex: 0 0 auto;
    padding: 0 0.55rem;
    min-height: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(20, 160, 160, 0.5);
    background: rgba(20, 160, 160, 0.2);
    color: rgba(220, 250, 250, 0.96);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sim-en-mgmt-rules-row-duplicate:hover {
    background: rgba(20, 160, 160, 0.36);
    border-color: rgba(20, 160, 160, 0.85);
}

.sim-en-mgmt-identifier-field {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.sim-en-mgmt-identifier-label {
    flex: 0 0 4.25rem;
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(245, 247, 250, 0.92);
    text-align: right;
    line-height: 1;
}

.sim-en-mgmt-identifier-strip {
    flex: 1 1 auto;
    min-width: 0;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0.45rem;
    border: 1px solid rgba(74, 144, 226, 0.45);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    font-size: 0.9rem;
    line-height: 32px;
    white-space: nowrap;
}

.sim-en-mgmt-identifier-strip:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.55);
}

.sim-en-mgmt-identifier-strip.sim-en-mgmt-identifier-strip-invalid {
    border-color: rgba(231, 76, 60, 0.75);
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.35);
}

.sim-en-mgmt-identifier-strip.sim-en-mgmt-identifier-strip-invalid:focus {
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.45);
}

.sim-en-mgmt-id-bubble {
    display: inline-flex;
    align-items: center;
    max-width: 12rem;
    margin: 0 0.1rem;
    padding: 0 0.45rem;
    height: 22px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(37, 99, 235, 0.45);
    color: #1e3a8a;
    font-size: 0.82rem;
    font-weight: 700;
    vertical-align: middle;
    cursor: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-en-mgmt-id-bubble:hover {
    background: rgba(37, 99, 235, 0.24);
    border-color: rgba(37, 99, 235, 0.65);
}

.sim-en-mgmt-id-bubble-editing {
    outline: 2px solid rgba(37, 99, 235, 0.55);
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    max-width: none;
}

.sim-en-mgmt-id-bubble-operator {
    background: rgba(14, 116, 144, 0.16);
    border-color: rgba(14, 116, 144, 0.45);
    color: #0e4f5f;
}

.sim-en-mgmt-id-bubble-list {
    max-width: none;
}

.sim-en-mgmt-id-bubble-list-prefix {
    user-select: none;
}

.sim-en-mgmt-id-bubble-list-body {
    display: inline;
    outline: none;
    min-width: 0.35rem;
}

.sim-en-mgmt-id-bubble-list-body.sim-en-mgmt-id-bubble-list-body-empty::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.78rem;
}

.sim-en-mgmt-identifier-op-toolbar {
    display: none;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-left: calc(4.25rem + 0.55rem);
}

.sim-en-mgmt-identifier-op-toolbar.is-active {
    display: flex;
}

.sim-en-mgmt-identifier-op-btn {
    padding: 0 0.55rem;
    min-height: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(74, 144, 226, 0.45);
    background: rgba(74, 144, 226, 0.16);
    color: rgba(245, 247, 250, 0.94);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    cursor: pointer;
    line-height: 1;
    white-space: nowrap;
}

.sim-en-mgmt-identifier-op-btn:hover {
    background: rgba(74, 144, 226, 0.32);
    border-color: rgba(74, 144, 226, 0.75);
}

.sim-en-mgmt-identifier-remarks-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 32px;
    min-height: 32px;
    padding-top: 0;
    padding-bottom: 0;
    line-height: 32px;
    box-sizing: border-box;
}

.sim-en-mgmt-identifier-add-wrap {
    display: flex;
    justify-content: center;
    margin-top: 0.15rem;
}

.sim-en-mgmt-identifier-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(74, 144, 226, 0.55);
    background: rgba(74, 144, 226, 0.22);
    color: rgba(245, 247, 250, 0.96);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

.sim-en-mgmt-identifier-add-btn:hover {
    background: rgba(74, 144, 226, 0.38);
    border-color: rgba(74, 144, 226, 0.85);
}

.sim-en-mgmt-rules-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sim-en-mgmt-rules-rows {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sim-en-mgmt-rules-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: start;
}

.sim-en-mgmt-rules-rule-stack {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
}

.sim-en-mgmt-rules-field {
    width: 100%;
}

.sim-en-mgmt-rules-strip {
    height: calc(1.35em * 5 + 0.7rem);
    min-height: calc(1.35em * 5 + 0.7rem);
    max-height: calc(1.35em * 20 + 0.7rem);
    line-height: 1.35;
    padding: 0.35rem 0.45rem;
    white-space: normal;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.sim-en-mgmt-rules-line-indent {
    display: inline;
    white-space: pre;
    user-select: none;
    pointer-events: none;
}

.sim-en-mgmt-rules-fn-toolbar {
    display: none;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-left: calc(4.25rem + 0.55rem);
}

.sim-en-mgmt-rules-fn-toolbar.is-active {
    display: flex;
}

.sim-en-mgmt-rules-fn-btn {
    border: 1px solid rgba(14, 116, 144, 0.45);
    background: rgba(14, 116, 144, 0.12);
    color: rgba(245, 247, 250, 0.92);
    border-radius: 6px;
    padding: 0.28rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    white-space: nowrap;
}

.sim-en-mgmt-rules-fn-btn:hover {
    background: rgba(14, 116, 144, 0.24);
    border-color: rgba(14, 116, 144, 0.65);
}

.sim-en-mgmt-rules-fn-btn[data-rule-function="|"] {
    min-width: 1.5rem;
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    font-size: 0.85rem;
}

.sim-en-mgmt-id-bubble-abs-delimiter {
    font-weight: 800;
    letter-spacing: 0;
}

.sim-en-mgmt-rules-fn-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.sim-en-mgmt-id-bubble-function {
    background: rgba(109, 40, 217, 0.14);
    border-color: rgba(109, 40, 217, 0.45);
    color: #4c1d95;
}

.sim-en-mgmt-id-bubble-aircraft-composite {
    max-width: none;
    gap: 0.15rem;
    padding: 0 0.4rem 0 0.45rem;
    white-space: nowrap;
    overflow: visible;
    cursor: default;
}

.sim-en-mgmt-id-bubble-aircraft-label {
    user-select: none;
}

.sim-en-mgmt-id-bubble-aircraft-body {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
}

.sim-en-mgmt-id-bubble-aircraft-paren {
    color: inherit;
    font-weight: 700;
    user-select: none;
}

.sim-en-mgmt-id-bubble-aircraft-nested {
    margin: 0;
    height: 18px;
    padding: 0 0.35rem;
    font-size: 0.74rem;
    cursor: default;
}

.modal-en-mgmt-routes {
    width: min(96vw, 1000px);
    max-width: min(96vw, 1000px);
}

.sim-en-mgmt-routes-body {
    min-height: 280px;
}

.sim-en-mgmt-routes-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.sim-en-mgmt-route-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(74, 144, 226, 0.28);
    border-radius: 6px;
    background: rgba(10, 18, 32, 0.35);
    overflow: hidden;
}

.sim-en-mgmt-route-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0.5rem;
}

.sim-en-mgmt-route-row-main {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex: 1 1 auto;
    min-width: 0;
}

.sim-en-mgmt-route-expand-btn {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(74, 144, 226, 0.55);
    background: rgba(74, 144, 226, 0.18);
    color: rgba(245, 247, 250, 0.96);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

.sim-en-mgmt-route-expand-btn:hover {
    background: rgba(74, 144, 226, 0.34);
    border-color: rgba(74, 144, 226, 0.85);
}

.sim-en-mgmt-route-details {
    border-top: 1px solid rgba(74, 144, 226, 0.22);
    padding: 0.55rem 0.65rem 0.65rem calc(0.65rem + 22px + 0.45rem);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sim-en-mgmt-route-details[hidden] {
    display: none !important;
}

.sim-en-mgmt-route-detail-section {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sim-en-mgmt-route-detail-header {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(245, 247, 250, 0.88);
}

.sim-en-mgmt-route-detail-content {
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(245, 247, 250, 0.82);
}

.sim-en-mgmt-route-empty {
    color: rgba(245, 247, 250, 0.55);
    font-style: italic;
}

.sim-en-mgmt-route-identifier-pair {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.25rem 0;
}

.sim-en-mgmt-route-identifier-pair + .sim-en-mgmt-route-identifier-pair {
    border-top: 1px solid rgba(74, 144, 226, 0.16);
    margin-top: 0.15rem;
    padding-top: 0.4rem;
}

.sim-en-mgmt-route-identifier-pair-line {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    min-width: 0;
}

.sim-en-mgmt-route-detail-sub-label {
    flex: 0 0 auto;
    font-weight: 700;
    color: rgba(245, 247, 250, 0.72);
}

.sim-en-mgmt-route-detail-sub-value {
    flex: 1 1 auto;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    word-break: break-word;
}

.sim-en-mgmt-route-detail-text {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.sim-en-mgmt-route-name {
    flex: 1 1 auto;
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.95);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sim-en-mgmt-route-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
}

.sim-en-mgmt-merge-routes-body {
    min-height: 0;
}

.sim-en-mgmt-merge-routes-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: min(60vh, 420px);
    overflow-y: auto;
}

.sim-en-mgmt-merge-routes-section-label {
    margin: 0.15rem 0 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(245, 247, 250, 0.58);
}

.sim-en-mgmt-merge-routes-section-label:not(:first-child) {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(74, 144, 226, 0.22);
}

.sim-en-mgmt-merge-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(74, 144, 226, 0.28);
    border-radius: 6px;
    background: rgba(10, 18, 32, 0.35);
}

.sim-en-mgmt-merge-group-members {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    flex: 1 1 auto;
    min-width: 0;
}

.sim-en-mgmt-merge-group-name {
    flex: 0 1 auto;
    max-width: 45%;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(245, 247, 250, 0.92);
    text-align: right;
    line-height: 1.35;
    word-break: break-word;
}

.sim-en-mgmt-merge-routes-pick-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sim-en-mgmt-merge-routes-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.92);
    user-select: none;
}

.sim-en-mgmt-merge-routes-item input {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}

.sim-en-mgmt-merge-routes-empty {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(245, 247, 250, 0.65);
}

.sim-en-mgmt-save-routes-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sim-en-mgmt-save-routes-section-label {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(245, 247, 250, 0.58);
}

.sim-en-mgmt-save-routes-file-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: min(40vh, 240px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sim-en-mgmt-save-routes-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.92);
    user-select: none;
}

.sim-en-mgmt-save-routes-file-item-name {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
    word-break: break-word;
    cursor: pointer;
}

.sim-en-mgmt-save-routes-file-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.sim-en-mgmt-save-routes-file-item.is-selected {
    background: rgba(74, 144, 226, 0.22);
    border-color: rgba(74, 144, 226, 0.55);
}

.sim-en-mgmt-save-routes-empty {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(245, 247, 250, 0.65);
}

.sim-en-mgmt-save-routes-name-group {
    margin-bottom: 0;
}

.sim-en-mgmt-delete-routes-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sim-en-mgmt-delete-routes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: min(50vh, 360px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sim-en-mgmt-delete-routes-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(74, 144, 226, 0.28);
    border-radius: 6px;
    background: rgba(10, 18, 32, 0.35);
}

.sim-en-mgmt-delete-routes-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.92);
    line-height: 1.35;
    word-break: break-word;
}

.sim-en-mgmt-delete-routes-empty {
    margin: 0;
    font-size: 0.82rem;
    color: rgba(245, 247, 250, 0.65);
}

#simulationEnMgmtIdentifierModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtRulesModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtLevelsModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtSaveRoutesModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtSaveRoutesOverwriteModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtLoadRoutesModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtLoadRoutesDeleteConfirmModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtDeleteRoutesModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtDeleteRouteConfirmModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtMergeRoutesModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtRoutesModal .sim-en-mgmt-routes-footer,
#simulationEnMgmtAddRouteModal .sim-en-mgmt-routes-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem 1.25rem;
    flex-wrap: nowrap;
}

.sim-en-mgmt-routes-action-btn.btn,
#simulationEnMgmtIdentifierModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtRulesModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtLevelsModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtSaveRoutesModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtSaveRoutesOverwriteModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtLoadRoutesModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtLoadRoutesDeleteConfirmModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtDeleteRoutesModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtDeleteRouteConfirmModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtMergeRoutesModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtRoutesModal .sim-en-mgmt-routes-footer .btn,
#simulationEnMgmtAddRouteModal .sim-en-mgmt-routes-footer .btn {
    padding: 0 0.65rem;
    min-height: 32px;
    height: 32px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.sim-en-mgmt-routes-btn {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 2px 10px;
    min-height: 0;
    line-height: 1.35;
    white-space: nowrap;
}

.sim-en-mgmt-sector-select {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 2px 24px 2px 8px;
    min-height: 0;
    line-height: 1.35;
    max-width: 9.5rem;
    border-radius: 4px;
    border: 1px solid rgba(245, 247, 250, 0.28);
    background: transparent;
    color: rgba(245, 247, 250, 0.92);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, rgba(245, 247, 250, 0.75) 50%), linear-gradient(135deg, rgba(245, 247, 250, 0.75) 50%, transparent 50%);
    background-position: calc(100% - 12px) calc(50% - 2px), calc(100% - 7px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.sim-en-mgmt-sector-select:focus {
    outline: 2px solid rgba(74, 144, 226, 0.55);
    outline-offset: 1px;
}

.sim-en-mgmt-sector-select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sim-en-mgmt-panel.sim-en-mgmt-opaque .sim-en-mgmt-sector-select {
    background-color: rgba(15, 23, 42, 0.35);
}

.sim-en-mgmt-ext-plus-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
}

.sim-en-mgmt-ext-plus-label {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(245, 247, 250, 0.88);
    white-space: nowrap;
}

.sim-en-mgmt-ext-plus-select {
    max-width: 5.5rem;
}

.sim-en-mgmt-category-table td.sim-en-mgmt-category-ext {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 3.25rem;
}

.sim-holding-list-avlb-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    cursor: pointer;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(245, 247, 250, 0.92);
    user-select: none;
}

.sim-holding-list-avlb-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.sim-holding-list-avlb-box {
    width: 14px;
    height: 14px;
    border: 1px solid rgba(147, 197, 253, 0.85);
    border-radius: 2px;
    background: transparent;
    flex: 0 0 auto;
    box-sizing: border-box;
}

.sim-holding-list-avlb-toggle input:checked + .sim-holding-list-avlb-box {
    background: rgba(34, 197, 94, 0.85);
    box-shadow: inset 0 0 0 1px rgba(14, 24, 38, 0.35);
}

.sim-holding-list-avlb-label {
    white-space: nowrap;
}

.sim-holding-list-table td.sim-holding-list-fl {
    text-align: center;
    font-weight: 900;
    white-space: nowrap;
    vertical-align: middle;
}

.sim-holding-list-avlb-stack-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 1.35rem;
    padding: 2px 0;
    line-height: 1.25;
}

td.sim-holding-list-cs .sim-holding-list-avlb-stack-item {
    justify-content: flex-start;
}

.sim-holding-list-avlb-stack-item + .sim-holding-list-avlb-stack-item {
    border-top: 1px solid rgba(74, 144, 226, 0.22);
}

.sim-holding-list-avlb-stack-item.sim-holding-list-row-warn {
    color: #ca8a04 !important;
    background: rgba(202, 138, 4, 0.14);
}

.sim-holding-list-avlb-stack-item.sim-holding-list-row-over {
    color: #f87171 !important;
    background: rgba(220, 38, 38, 0.14);
}

.sim-holding-list-row-avlb-free td {
    color: #22c55e !important;
    background: rgba(34, 197, 94, 0.08);
}

.sim-holding-list-row-avlb-occupied td {
    color: rgba(248, 113, 113, 0.95) !important;
    background: rgba(220, 38, 38, 0.1);
}

.sim-holding-list-row-avlb-conflict td,
.sim-holding-list-row-avlb-conflict .sim-holding-list-avlb-stack-item {
    color: rgba(245, 247, 250, 0.55) !important;
    background: rgba(220, 38, 38, 0.06) !important;
}

.sim-holding-list-row-avlb-conflict.sim-holding-list-row-avlb-conflict-flash-on td,
.sim-holding-list-row-avlb-conflict.sim-holding-list-row-avlb-conflict-flash-on .sim-holding-list-avlb-stack-item {
    color: #f87171 !important;
    background: rgba(220, 38, 38, 0.38) !important;
}

.sim-holding-list-body {
    padding: 8px 10px 10px;
    background: transparent;
    max-height: min(42vh, 340px);
    overflow-y: auto;
}

.sim-holding-list-table {
    width: 100%;
    border-collapse: collapse;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.72rem;
    color: rgba(245, 247, 250, 0.92);
}

.sim-holding-list-table th {
    padding: 2px 6px 4px;
    text-align: left;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(147, 197, 253, 0.95);
    border-bottom: 1px solid rgba(74, 144, 226, 0.35);
}

.sim-holding-list-table td {
    border: 1px solid rgba(74, 144, 226, 0.28);
    padding: 4px 6px;
    vertical-align: middle;
}

.sim-holding-list-table td.sim-holding-list-cs {
    font-weight: 800;
    white-space: nowrap;
}

.sim-holding-list-cs-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.sim-holding-list-xh-btn {
    flex: 0 0 auto;
    margin: 0;
    padding: 0 4px;
    min-width: 1.65rem;
    height: 1.25rem;
    border: 1px solid rgba(248, 113, 113, 0.65);
    border-radius: 4px;
    background: rgba(220, 38, 38, 0.12);
    color: #f87171;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1;
    cursor: pointer;
}

.sim-holding-list-xh-btn:hover {
    background: rgba(220, 38, 38, 0.28);
    border-color: rgba(248, 113, 113, 0.9);
}

.sim-holding-list-stack-cs {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.sim-holding-exit-confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: transparent;
    pointer-events: none;
    align-items: center;
    justify-content: center;
}

.sim-holding-exit-confirm-overlay.active {
    display: flex;
}

.sim-holding-exit-confirm-panel {
    pointer-events: auto;
    min-width: 260px;
    max-width: min(96vw, 360px);
}

.sim-holding-exit-confirm-header {
    cursor: default;
}

.sim-holding-exit-confirm-body {
    padding: 10px 12px 12px;
    background: transparent;
}

.sim-holding-exit-confirm-message {
    margin: 0 0 0.85rem;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    line-height: 1.35;
    color: rgba(245, 247, 250, 0.88);
}

.sim-holding-exit-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.sim-holding-exit-confirm-actions .btn {
    padding: 0.38rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.38;
    min-height: auto;
    border-radius: 6px;
}

.sim-holding-merge-panel {
    pointer-events: auto;
    min-width: 260px;
    max-width: min(96vw, 400px);
}

.sim-holding-merge-body {
    padding: 10px 12px 12px;
    background: transparent;
}

.sim-holding-merge-hint {
    margin: 0 0 0.65rem;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    line-height: 1.35;
    color: rgba(245, 247, 250, 0.72);
}

.sim-holding-merge-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: min(50vh, 280px);
    overflow-y: auto;
    margin-bottom: 0.85rem;
}

.sim-holding-merge-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.92);
    user-select: none;
}

.sim-holding-merge-item input {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
}

.sim-holding-merge-empty {
    margin: 0 0 0.85rem;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    color: rgba(245, 247, 250, 0.65);
}

.sim-holding-list-detached-panel .sim-advanced-label-title[data-holding-title] {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    line-height: 1.2;
}

.sim-holding-list-table th.sim-holding-list-col-num,
.sim-holding-list-table td.sim-holding-list-mc,
.sim-holding-list-table td.sim-holding-list-alv,
.sim-holding-list-table td.sim-holding-list-entry,
.sim-holding-list-table td.sim-holding-list-tih,
.sim-holding-list-table td.sim-holding-list-mtih {
    text-align: center;
    white-space: nowrap;
}

.sim-holding-list-subhead td {
    border: none;
    border-bottom: 1px solid rgba(74, 144, 226, 0.35);
    background: transparent;
    padding: 8px 10px 4px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgba(245, 247, 250, 0.95);
    text-align: left;
}

.sim-holding-list-row-warn td {
    color: #ca8a04 !important;
    background: rgba(202, 138, 4, 0.14);
}

.sim-holding-list-row-over td {
    color: #f87171 !important;
    background: rgba(220, 38, 38, 0.14);
}

.sim-holding-list-mtih-display {
    display: inline-block;
    min-width: 1.5rem;
    min-height: 1em;
    cursor: text;
}

.sim-holding-list-mtih-input {
    width: 3rem;
    margin: 0;
    padding: 0 2px;
    border: 1px solid rgba(147, 197, 253, 0.65);
    border-radius: 4px;
    background: rgba(14, 24, 38, 0.55);
    color: rgba(245, 247, 250, 0.95);
    font: inherit;
    font-weight: 800;
    text-align: center;
}

.sim-holding-list-alv-btn {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font: inherit;
    font-weight: 800;
    color: rgba(147, 197, 253, 0.98);
    cursor: pointer;
}

.sim-holding-list-alv-btn:hover {
    text-decoration: underline;
}

.sim-alv-picker-header {
    padding: 8px 8px;
    border-bottom: 1px solid rgba(74, 144, 226, 0.22);
    font-weight: 900;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    color: rgba(245, 247, 250, 0.92);
    text-align: center;
}

.sim-alv-picker-list {
    max-height: calc(7 * 26px);
    overflow-y: auto;
    padding: 6px 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 800;
}

.sim-alv-item {
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(245, 247, 250, 0.9);
    cursor: pointer;
}

.sim-alv-item:hover {
    background: rgba(74, 144, 226, 0.18);
}

.sim-alv-item.current {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.sim-dct-picker {
    min-width: 150px;
    max-width: 240px;
}

.sim-dct-picker .sim-alv-picker-list {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-weight: 800;
    max-height: calc(12 * 26px);
}

.sim-dct-picker .sim-alv-item {
    justify-content: flex-start;
    padding: 0 10px;
    white-space: nowrap;
}

.sim-dct-wp-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 26px;
    border-radius: 8px;
    color: rgba(245, 247, 250, 0.9);
    overflow: hidden;
}

.sim-dct-wp-row.current {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.sim-dct-wp-row:hover {
    background: rgba(74, 144, 226, 0.14);
}

.sim-hold-arm-spacer {
    width: 22px;
    flex: 0 0 22px;
}

.sim-hold-arm-btn {
    flex: 0 0 24px;
    width: 24px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 900;
    font-size: 0.78rem;
    color: rgba(245, 247, 250, 0.55);
    background: transparent;
    align-self: center;
}

.sim-hold-arm-btn:hover,
.sim-hold-arm-btn.sim-hold-arm-btn-active {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.15);
}

.sim-restr-arm-wrap {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
    margin-left: 4px;
}

.sim-restr-arm-btn {
    flex: 0 0 22px;
    width: 22px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 900;
    font-size: 0.78rem;
    color: rgba(245, 247, 250, 0.45);
    background: transparent;
    align-self: center;
}

.sim-restr-arm-btn:hover,
.sim-restr-arm-btn.sim-restr-arm-btn-active {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.15);
}

.sim-restr-arm-btn.sim-restr-arm-btn-partial,
.sim-restr-arm-btn.sim-restr-arm-btn-partial:hover {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.18);
}

.sim-dct-wp-name-btn {
    flex: 1 1 auto;
    margin: 0;
    padding: 0 6px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    text-align: left;
    cursor: pointer;
}

.sim-dct-wp-name-btn:hover {
    text-decoration: underline;
}

.sim-dct-app-block {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sim-dct-app-row.sim-alv-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: 26px;
    min-height: 26px;
    padding: 0 4px 0 10px;
    border-radius: 8px;
    color: rgba(245, 247, 250, 0.9);
    overflow: hidden;
}

.sim-dct-app-row.current {
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.sim-dct-app-row:hover {
    background: rgba(74, 144, 226, 0.18);
}

.sim-dct-app-name-btn {
    flex: 1 1 auto;
    margin: 0;
    padding: 0 6px 0 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: rgba(245, 247, 250, 0.95);
    font-family: inherit;
    font-weight: inherit;
    font-size: inherit;
    line-height: 26px;
    height: 26px;
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
}

.sim-dct-app-name-btn:hover {
    text-decoration: underline;
}

.sim-dct-app-expand-btn {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 0 2px 0 0;
    padding: 0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 900;
    font-size: 0.95rem;
    line-height: 22px;
    color: rgba(245, 247, 250, 0.85);
    background: rgba(74, 144, 226, 0.16);
    align-self: center;
}

.sim-dct-app-expand-btn:hover {
    color: rgba(245, 247, 250, 0.95);
    background: rgba(74, 144, 226, 0.22);
}

.sim-dct-app-waypoints {
    display: flex;
    flex-direction: column;
}

.sim-dct-picker .sim-alv-subitem {
    justify-content: flex-start;
    padding: 0 10px 0 22px;
    height: 22px;
    font-weight: 700;
    color: rgba(245, 247, 250, 0.78);
    cursor: pointer;
}

.sim-dct-picker .sim-alv-subitem:hover {
    background: rgba(74, 144, 226, 0.18);
}

.sim-flight-status-popup {
    min-width: 168px;
    max-width: min(96vw, 280px);
    /* font-size set in JS from simulation label size (simulationMap.labelSize) */
    font-size: 14px;
}

.sim-flight-status-popup .sim-alv-picker-header {
    font-size: 1em;
}

.sim-flight-status-popup .sim-alv-picker-list {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    max-height: none;
    font-size: 1em;
}

.sim-flight-status-popup .sim-alv-item {
    justify-content: flex-start;
    padding: 0 12px;
    white-space: nowrap;
    height: auto;
    min-height: calc(1.35 * 1em);
    font-size: 1em;
}

.sim-pp-transponder-popup {
    min-width: 200px;
    max-width: min(96vw, 320px);
}

.sim-pp-transponder-popup .sim-pp-xpdr-item {
    gap: 0.45em;
}

.sim-pp-transponder-popup .sim-pp-xpdr-tick {
    width: 0.85em;
    height: 0.85em;
    border: 1px solid rgba(147, 197, 253, 0.9);
    border-radius: 2px;
    flex: 0 0 auto;
    box-sizing: border-box;
    background: transparent;
}

.sim-pp-transponder-popup .sim-pp-xpdr-item.is-selected .sim-pp-xpdr-tick {
    background: rgba(34, 197, 94, 0.9);
    box-shadow: inset 0 0 0 1px rgba(14, 24, 38, 0.35);
}

.sim-pp-transponder-popup .sim-pp-xpdr-ident {
    font-weight: 800;
    letter-spacing: 0.04em;
}

.sim-coo-popup {
    min-width: 280px;
    max-width: min(96vw, 360px);
    font-size: 14px;
}

.sim-coo-popup .sim-coo-popup-title {
    text-align: left;
    padding: 8px 12px;
    font-size: 0.92em;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sim-coo-popup-body {
    padding: 8px 10px 10px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.sim-coo-popup-row {
    display: grid;
    grid-template-columns: 1.1fr 1fr 0.75fr;
    gap: 8px;
    align-items: center;
}

.sim-coo-popup-head {
    margin-bottom: 4px;
    font-weight: 800;
    font-size: 0.72em;
    letter-spacing: 0.08em;
    color: rgba(245, 247, 250, 0.62);
}

.sim-coo-popup-values {
    margin-bottom: 10px;
    font-weight: 800;
    font-size: 1em;
    color: rgba(245, 247, 250, 0.95);
}

.sim-coo-col-callsign,
.sim-coo-col-fix {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sim-coo-xfl-input {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 4px 6px;
    border: 1px solid rgba(147, 197, 253, 0.55);
    border-radius: 6px;
    background: rgba(14, 24, 38, 0.65);
    color: rgba(245, 247, 250, 0.98);
    font: inherit;
    font-weight: 800;
    text-align: center;
}

.sim-coo-xfl-input:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.95);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.sim-coo-popup-actions {
    display: flex;
    gap: 8px;
    justify-content: stretch;
}

.sim-text-input-popup {
    min-width: 220px;
    max-width: min(96vw, 320px);
    font-size: 14px;
}

.sim-text-input-popup-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.sim-text-input-popup-label {
    font-weight: 800;
    font-size: 0.72em;
    letter-spacing: 0.08em;
    color: rgba(245, 247, 250, 0.62);
    text-transform: uppercase;
}

.sim-text-input-popup-input {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid rgba(147, 197, 253, 0.55);
    border-radius: 6px;
    background: rgba(14, 24, 38, 0.65);
    color: rgba(245, 247, 250, 0.98);
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sim-text-input-popup-input:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.95);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

#simulationFreeTextPopup .sim-text-input-popup-input {
    text-transform: none;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.sim-coo-action-btn {
    flex: 1 1 0;
    margin: 0;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.35);
    background: rgba(30, 58, 95, 0.55);
    color: rgba(245, 247, 250, 0.95);
    font: inherit;
    font-weight: 800;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.sim-coo-action-btn:hover {
    background: rgba(74, 144, 226, 0.22);
}

.sim-coo-enter-btn {
    border-color: rgba(34, 197, 94, 0.45);
    background: rgba(22, 101, 52, 0.35);
}

.sim-coo-enter-btn:hover {
    background: rgba(34, 197, 94, 0.28);
}

.sim-coo-cancel-btn {
    border-color: rgba(148, 163, 184, 0.35);
}

.turn-radius-editor {
    margin: 0.85rem 0 0.9rem;
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.25);
    background: rgba(26, 47, 74, 0.18);
}

.turn-radius-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.turn-radius-editor-title {
    font-weight: 900;
    color: rgba(245, 247, 250, 0.92);
    letter-spacing: 0.02em;
}

.turn-radius-editor-actions {
    display: inline-flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.turn-radius-editor-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 0.7fr 0.8fr 0.8fr;
    gap: 0.6rem 0.75rem;
    align-items: center;
}

.turn-radius-row-label {
    font-weight: 800;
    color: rgba(245, 247, 250, 0.88);
    font-size: 0.92rem;
}

.turn-radius-col-header {
    font-weight: 900;
    color: rgba(245, 247, 250, 0.75);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
}

.turn-radius-row-input {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.turn-radius-row-input input[type="number"] {
    width: 100%;
    max-width: 110px;
}

.turn-radius-unit {
    font-weight: 800;
    color: rgba(245, 247, 250, 0.7);
    font-size: 0.85rem;
    white-space: nowrap;
}

.airports-add-form {
    padding: 0.75rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.25);
    background: rgba(26, 47, 74, 0.18);
    margin-bottom: 0.85rem;
}

.airports-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.airport-item {
    border: 1px solid rgba(74, 144, 226, 0.22);
    border-radius: 12px;
    background: rgba(14, 24, 38, 0.35);
    overflow: hidden;
}

.airport-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    cursor: pointer;
    user-select: none;
}

.airport-item-title {
    font-weight: 900;
    color: rgba(245, 247, 250, 0.92);
}

.airport-item-subtitle {
    font-weight: 800;
    color: rgba(245, 247, 250, 0.7);
    font-size: 0.9rem;
}

.airport-item-body {
    padding: 0.75rem 0.8rem 0.85rem;
    border-top: 1px solid rgba(74, 144, 226, 0.18);
    display: none;
}

.airport-item.expanded .airport-item-body {
    display: block;
}

.airport-fields-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1.6fr;
    gap: 0.65rem 0.85rem;
    align-items: end;
    margin-bottom: 0.75rem;
}

.runways-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 0.4rem 0 0.5rem;
}

.runways-title {
    font-weight: 900;
    color: rgba(245, 247, 250, 0.86);
}

.runway-item {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    padding: 0.6rem 0.7rem;
    margin-top: 0.5rem;
    background: rgba(0, 0, 0, 0.18);
}

.runway-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr 0.8fr 1.2fr;
    gap: 0.5rem 0.65rem;
    align-items: end;
}

.runway-ends-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 0.85rem;
}

.approaches-header {
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.approaches-title {
    font-weight: 800;
    color: rgba(245, 247, 250, 0.85);
    font-size: 0.9rem;
}

.approaches-list {
    margin-top: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.approach-item {
    border: 1px solid rgba(74, 144, 226, 0.18);
    border-radius: 10px;
    padding: 0.5rem 0.6rem;
    background: rgba(14, 24, 38, 0.22);
}

.approach-name-fields {
    align-items: end;
}

.approach-name-fields .form-group:first-child {
    min-width: 0;
}

#approachRunwayEndSelect {
    min-width: 0;
}

.approach-name {
    font-weight: 900;
    color: rgba(245, 247, 250, 0.9);
    margin-bottom: 0.2rem;
}

.approach-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.approach-meta {
    font-size: 0.78rem;
    color: rgba(245, 247, 250, 0.72);
    margin-top: -0.05rem;
}

.approach-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-wrap: nowrap;
}

/* Compact buttons for inline approach actions */
.approach-actions .btn,
.approaches-header .btn {
    min-width: 0;
    padding: 0.38rem 0.6rem;
    font-size: 0.82rem;
    border-radius: 6px;
    line-height: 1.05;
    flex-direction: row;
    gap: 0.35rem;
}

.approach-seq {
    color: rgba(245, 247, 250, 0.72);
    font-size: 0.85rem;
    line-height: 1.2;
    word-break: break-word;
}

.approach-seq--missed {
    margin-top: 0.15rem;
    color: rgba(245, 247, 250, 0.55);
    font-style: italic;
}

.sim-probing-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.sim-probing-colors {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.sim-probing-color {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: rgba(245, 247, 250, 0.85);
    white-space: nowrap;
}

.sim-probing-color input[type="color"] {
    width: 34px;
    height: 26px;
    padding: 0;
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
    background: transparent;
}

.sim-selected-aircraft-thickness input[type="range"] {
    min-width: 120px;
    max-width: 200px;
    vertical-align: middle;
}

/* Flight Status (FST) colors modal */
.sim-fst-colors-list {
    margin-top: 0.5rem;
}

.sim-fst-color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 0.55rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.15);
}

.sim-fst-color-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sim-fst-color-label {
    font-size: 0.9rem;
    color: rgba(245, 247, 250, 0.92);
    flex: 1 1 160px;
}

.sim-fst-color-pickers {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

#flightStatusColorsModal .modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
}

/* Sim Mask hub + layered editor overlay */
.sim-mask-hub-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.sim-mask-hub-actions .sim-settings-subpanel-btn {
    width: 100%;
}

.sim-mask-hub-status {
    margin-top: 0.85rem;
    min-height: 1.2em;
}

.sim-mask-overlay {
    position: absolute;
    inset: 0;
    z-index: 40;
    pointer-events: none;
}

.sim-mask-overlay.sim-mask-editing {
    pointer-events: auto;
    cursor: crosshair;
    background: rgba(8, 14, 24, 0.08);
}

.sim-mask-overlay.sim-mask-drawing .sim-mask-item {
    pointer-events: none;
}

.sim-mask-overlay.sim-mask-tool-select,
.sim-mask-overlay.sim-mask-tool-edit {
    cursor: default;
}

.sim-mask-draw-ghost {
    position: absolute;
    z-index: 41;
    box-sizing: border-box;
    border: 1px dashed #6eb6ff;
    background: rgba(110, 182, 255, 0.18);
    pointer-events: none;
}

.sim-mask-item {
    position: absolute;
    box-sizing: border-box;
    margin: 0;
    pointer-events: auto;
    user-select: none;
    overflow: hidden;
}

.sim-mask-item.sim-mask-selected {
    outline: 2px solid #6eb6ff;
    outline-offset: 1px;
}

.sim-mask-item-bg {
    border: 1px solid rgba(220, 230, 245, 0.25);
}

.sim-mask-editing .sim-mask-item-bg {
    pointer-events: auto;
    cursor: move;
}

.sim-mask-item-button,
.sim-mask-item-info,
.sim-mask-item-text {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.15rem 0.35rem;
    border: 1px solid rgba(220, 230, 245, 0.55);
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: hidden;
    box-sizing: border-box;
}

.sim-mask-item-button {
    cursor: pointer;
    text-transform: uppercase;
    border-style: solid;
}

.sim-mask-item-button.shape-oval,
.sim-mask-knob.shape-oval {
    border-radius: 50%;
}

.sim-mask-item-button.shape-rect,
.sim-mask-knob.shape-rect {
    border-radius: 3px;
}

.sim-mask-item-button.shape-triangle {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    overflow: visible;
    padding: 0;
}

.sim-mask-tri-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.sim-mask-btn-label {
    position: relative;
    z-index: 1;
    pointer-events: none;
    padding: 0.15rem 0.35rem;
}

.sim-mask-item-button.is-pressed {
    /* visual handled via JS state colors; keep for hooks */
}

.sim-mask-item-info {
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    opacity: 0.95;
}

.sim-mask-item-text {
    border-color: transparent;
    background: transparent;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
}

.sim-mask-item-slider {
    border: none;
    background: transparent;
    overflow: visible;
    pointer-events: auto;
}

.sim-mask-slider-track {
    position: absolute;
    background: rgba(40, 55, 75, 0.9);
    border: 1px solid rgba(220, 230, 245, 0.45);
    border-radius: 4px;
    pointer-events: auto;
}

.sim-mask-slider-track.ori-h {
    left: 0;
    right: 0;
    top: 50%;
    height: 28%;
    min-height: 6px;
    transform: translateY(-50%);
}

.sim-mask-slider-track.ori-v {
    top: 0;
    bottom: 0;
    left: 50%;
    width: 28%;
    min-width: 6px;
    transform: translateX(-50%);
}

.sim-mask-knob {
    position: absolute;
    box-sizing: border-box;
    background: rgba(90, 130, 180, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.65);
    cursor: grab;
    z-index: 2;
    pointer-events: auto;
    touch-action: none;
}

.sim-mask-knob:active {
    cursor: grabbing;
}

.sim-mask-resize-handle {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 10px;
    height: 10px;
    background: #6eb6ff;
    border: 1px solid #fff;
    border-radius: 2px;
    cursor: nwse-resize;
    z-index: 5;
    pointer-events: auto;
}

.sim-mask-prop-edit-graphic {
    width: 100%;
    margin-bottom: 0.35rem;
}

.sim-mask-editing .sim-mask-item {
    cursor: move;
}

.sim-mask-editor-bar {
    position: absolute;
    top: 0.55rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 46;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    max-width: calc(100% - 1.5rem);
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    background: rgba(16, 24, 36, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.sim-mask-editor-title {
    color: rgba(245, 247, 250, 0.92);
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.25rem;
    white-space: nowrap;
}

.sim-mask-tool-group {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

.sim-mask-editor-btn.btn {
    padding: 0.26rem 0.55rem;
    font-size: 0.74rem;
}

.sim-mask-editor-btn.sim-mask-tool-active {
    background: rgba(110, 182, 255, 0.28);
    border-color: rgba(110, 182, 255, 0.75);
    color: #fff;
}

.sim-mask-side-panel {
    position: absolute;
    top: 3.4rem;
    right: 0.55rem;
    z-index: 46;
    width: min(280px, calc(100% - 1.1rem));
    max-height: calc(100% - 4rem);
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0.65rem;
    border-radius: 6px;
    background: rgba(16, 24, 36, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

.sim-mask-side-heading {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgba(245, 247, 250, 0.92);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sim-mask-layers-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    max-height: 160px;
    overflow: auto;
    margin-bottom: 0.45rem;
}

.sim-mask-layer-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    color: rgba(245, 247, 250, 0.9);
    font-size: 0.74rem;
}

.sim-mask-layer-row:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sim-mask-layer-row.selected {
    background: rgba(110, 182, 255, 0.22);
    outline: 1px solid rgba(110, 182, 255, 0.55);
}

.sim-mask-layer-type {
    opacity: 0.65;
    font-size: 0.68rem;
    text-transform: uppercase;
    min-width: 3.2rem;
}

.sim-mask-layer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.sim-mask-props-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sim-mask-props-form .form-group {
    margin: 0;
}

.sim-mask-props-form .form-label {
    font-size: 0.72rem;
    margin-bottom: 0.15rem;
}

.sim-mask-props-form .form-input,
.sim-mask-props-form .form-select {
    font-size: 0.78rem;
    padding: 0.28rem 0.4rem;
    min-height: 0;
}

.sim-mask-props-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
}

.sim-mask-props-form .hint-text {
    margin: 0;
    font-size: 0.72rem;
}

#simMaskHubModal .modal-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

#flightStatusColorsModal .modal-footer .btn {
    min-width: 120px;
    padding: 0.55rem 0.95rem;
    font-size: 0.9rem;
    border-radius: 6px;
    line-height: 1.05;
}

.simulation-controls .sim-spv-step {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

.simulation-controls .sim-spv-toggle {
    min-width: 3.25rem;
    height: 32px;
    padding: 0 0.4rem;
    border-radius: 6px;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-weight: 800;
    line-height: 1;
}

.sim-spv-title {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
}

.sim-spv-value {
    font-size: 0.85rem;
}

.simulation-paused-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 800;
    color: rgba(0, 0, 0, 0.65);
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.45);
    pointer-events: none;
    user-select: none;
    z-index: 5;
}

/* Host connected users modal */
.sim-connected-users-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: min(60vh, 480px);
    overflow-y: auto;
    margin-top: 0.5rem;
}

.sim-connected-users-sector {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.65rem 0.75rem;
    background: rgba(0, 0, 0, 0.15);
}

.sim-connected-users-sector-name {
    margin: 0 0 0.45rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f5f7fa;
}

.sim-connected-users-row {
    font-size: 0.85rem;
    color: #e5e7eb;
    margin: 0.2rem 0;
    word-break: break-all;
}

.sim-connected-users-role {
    display: inline-block;
    min-width: 3.5rem;
    font-weight: 600;
    color: #93c5fd;
}

.sim-connected-users-empty {
    font-size: 0.85rem;
    color: #9ca3af;
    font-style: italic;
}

.sim-connected-users-multi {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fbbf24;
}

.sim-connected-users-status {
    margin: 0;
}

/* Simulation Colors Modal */
.sim-colors-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sim-colors-section h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #f5f7fa;
    font-weight: 600;
}

.sim-color-row {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 0.75rem;
    margin: 0.5rem 0;
}

.sim-color-row label {
    color: rgba(245, 247, 250, 0.9);
    font-size: 0.9rem;
}

.sim-color-row input[type="color"] {
    width: 48px;
    height: 32px;
    border: 1px solid rgba(74, 144, 226, 0.35);
    background: transparent;
    border-radius: 6px;
    padding: 0;
}

.sim-color-row input[type="range"] {
    width: 100%;
}

.sim-slider-value {
    color: rgba(245, 247, 250, 0.85);
    font-size: 0.85rem;
    min-width: 48px;
    text-align: right;
}

.sim-toggle-row {
    grid-template-columns: 120px auto;
}

.sim-route-select-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.sim-route-select-row > .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 6px;
    line-height: 1.1;
    min-width: 11.5rem;
    box-sizing: border-box;
}

.sim-route-selected {
    color: rgba(245, 247, 250, 0.8);
    font-size: 0.85rem;
    text-align: right;
    flex: 1;
}

.sim-runway-ext-cl-row {
    margin-top: 0.35rem;
}

.sim-runway-ext-cl-row > .btn {
    width: 100%;
    min-width: 0;
}

.sim-runway-ext-cl-hint {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.sim-runway-ext-cl-grid {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sim-runway-ext-cl-grid .form-group {
    margin-bottom: 0;
}

.sim-runway-ext-cl-grid .sim-color-row {
    margin: 0.25rem 0;
}

.sim-routes-panel {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(44, 62, 80, 0.55);
    border: 1px solid rgba(74, 144, 226, 0.25);
    border-radius: 8px;
}

.sim-routes-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: rgba(245, 247, 250, 0.9);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.sim-routes-panel-actions {
    display: flex;
    gap: 0.5rem;
}

.sim-routes-panel-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 6px;
    line-height: 1.1;
    min-width: 3.25rem;
    box-sizing: border-box;
}

.sim-routes-checkbox-list {
    max-height: 240px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-right: 0.25rem;
}

.sim-route-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(245, 247, 250, 0.9);
    font-size: 0.9rem;
    user-select: none;
}

.sim-route-checkbox input[type="checkbox"] {
    transform: translateY(1px);
}

.simulation-canvas {
    flex: 1;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    min-height: 0;
    border: 1px solid #cccccc;
}

#simulationCanvasElement {
    display: block;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    margin: 0 auto;
}

/* Native browser context menu must not appear over the live sim map. */
#simulationModal .simulation-canvas,
#simulationCanvasElement {
    -webkit-touch-callout: none;
}

.simulation-canvas {
    display: flex;
    align-items: center;
    justify-content: center;
}

#sectorCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.waypoints-list,
.navaids-list,
.routes-list,
.boundaries-list,
.areas-list,
.holdings-list {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
}

.waypoints-list h3,
.navaids-list h3,
.routes-list h3,
.boundaries-list h3,
.areas-list h3,
.holdings-list h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #f5f7fa;
    font-weight: 600;
}

#waypointsContainer,
#navaidsContainer,
#routesContainer,
#boundariesContainer,
#areasContainer,
#holdingsContainer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-height: 0;
}

.waypoint-search,
.route-search,
.boundary-search {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(26, 47, 74, 0.6);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 4px;
    color: #f5f7fa;
    font-size: 0.85rem;
}

.waypoint-search:focus,
.route-search:focus,
.boundary-search:focus {
    outline: none;
    border-color: #4a90e2;
    background: rgba(74, 144, 226, 0.15);
}

.waypoint-search::placeholder,
.route-search::placeholder,
.boundary-search::placeholder {
    color: rgba(245, 247, 250, 0.5);
}

.waypoint-input-group {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.waypoint-input-group .route-waypoint-main {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.route-waypoint-remove-btn {
    flex: 0 0 auto;
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.42rem;
    padding: 0;
    border: 1px solid rgba(231, 76, 60, 0.55);
    border-radius: 4px;
    background: rgba(231, 76, 60, 0.18);
    color: #ff8a80;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.route-waypoint-remove-btn:hover {
    background: rgba(231, 76, 60, 0.35);
    border-color: rgba(231, 76, 60, 0.85);
    color: #ffffff;
}

.route-waypoint-remove-btn[hidden] {
    display: none !important;
}

.waypoint-input-group.route-waypoint-group--sid-star {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.waypoint-input-group.route-waypoint-group--sid-star .route-waypoint-main {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

.route-sid-origin-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem 0.75rem;
    margin: 0 0 0.65rem 0;
    padding: 0.55rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.28);
    background: rgba(74, 144, 226, 0.08);
}

.route-sid-origin-fields[hidden] {
    display: none !important;
}

.route-sid-origin-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.9);
    min-width: 0;
}

.route-sid-origin-label .form-select {
    width: 100%;
    font-weight: 500;
}

.route-sid-origin-hint {
    grid-column: 1 / -1;
    margin: 0;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(245, 247, 250, 0.62);
    line-height: 1.35;
}

.route-waypoints-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.route-waypoints-toolbar .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.route-sid-star-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: rgba(245, 247, 250, 0.92);
    cursor: pointer;
    user-select: none;
}

.route-restriction-fields {
    display: none;
    flex: 0 0 auto;
    gap: 0.35rem;
    align-items: center;
}

.route-waypoint-group--sid-star .route-restriction-fields {
    display: flex;
}

.route-restriction-input {
    width: 3.6rem;
    min-width: 3.6rem;
    padding: 0.45rem 0.3rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.route-waypoint-input {
    width: 100%;
}

.route-waypoint-group--sid-star .route-waypoint-input {
    width: 100%;
}

.route-sid-star-tag {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
    color: #fde68a;
    background: rgba(180, 130, 20, 0.35);
    border: 1px solid rgba(253, 230, 138, 0.35);
}

.route-restrictions-summary {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    color: rgba(245, 247, 250, 0.65);
    font-variant-numeric: tabular-nums;
}

.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 47, 74, 0.95);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 2px;
}

.autocomplete-suggestion {
    padding: 0.5rem 1rem;
    cursor: pointer;
    color: #f5f7fa;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(74, 144, 226, 0.1);
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.selected {
    background: rgba(74, 144, 226, 0.3);
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.atc-sector-associate-airports-wrap {
    position: relative;
}

.atc-sector-associate-airports-wrap .autocomplete-suggestions {
    z-index: 1200;
}

.scroll-to-section {
    background: rgba(26, 47, 74, 0.9);
    border-top: 2px solid rgba(74, 144, 226, 0.3);
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
    padding: 1rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.scroll-to-section span {
    color: #4a90e2;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
}

.scroll-to-section:hover {
    background: rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.6);
}

.scroll-to-section:active {
    background: rgba(74, 144, 226, 0.3);
}

.waypoint-item,
.navaid-item,
.route-item,
.boundary-item {
    background: rgba(44, 62, 80, 0.6);
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.waypoint-actions,
.navaid-actions,
.route-actions,
.boundary-actions {
    display: flex;
    gap: 0.5rem;
}

.edit-waypoint-btn,
.edit-navaid-btn,
.edit-route-btn,
.edit-boundary-btn,
.edit-map-area-btn,
.edit-holding-btn {
    background: rgba(74, 144, 226, 0.3);
    border: 1px solid rgba(74, 144, 226, 0.5);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: #4a90e2;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-waypoint-btn:hover,
.edit-navaid-btn:hover,
.edit-route-btn:hover,
.edit-boundary-btn:hover,
.edit-map-area-btn:hover,
.edit-holding-btn:hover {
    background: rgba(74, 144, 226, 0.5);
    border-color: rgba(74, 144, 226, 0.8);
}

.waypoint-item {
    color: #f5f7fa;
}

.navaid-item {
    color: #fef3c7;
}

.route-item {
    color: #00bcd4;
}

.boundary-item {
    color: #0000ff;
}

.waypoint-info,
.navaid-info,
.route-info,
.boundary-info {
    flex: 1;
}

.waypoint-name,
.navaid-name,
.route-name {
    font-weight: 600;
    margin-right: 0.5rem;
}

.waypoint-coords {
    font-size: 0.8rem;
    opacity: 0.7;
}

.navaid-type,
.navaid-coords {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-left: 0.35rem;
}

.route-waypoints {
    font-size: 0.8rem;
    opacity: 0.8;
}

.delete-waypoint-btn,
.delete-navaid-btn,
.delete-route-btn,
.delete-boundary-btn {
    background: rgba(231, 76, 60, 0.3);
    border: 1px solid rgba(231, 76, 60, 0.5);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    color: #e74c3c;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-waypoint-btn:hover,
.delete-navaid-btn:hover,
.delete-route-btn:hover,
.delete-boundary-btn:hover {
    background: rgba(231, 76, 60, 0.5);
    border-color: rgba(231, 76, 60, 0.8);
}

.error-message {
    color: #ff8c42;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
}


/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .button-row {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }

    .container .button-row {
        align-items: center;
    }

    .btn-round {
        min-width: 180px;
        padding: 2rem 1.5rem;
        border-radius: 8px;
    }

    .btn-side {
        min-width: 180px;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

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

    .exercises-list {
        max-height: 400px;
    }

    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .step-header .step-title {
        text-align: left;
        width: 100%;
    }

    .exercise-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .exercise-card-date {
        margin-left: 0;
    }
}

/* --- Print Maps (Edit Airspace): near full-screen modal, options / preview each 50% width --- */
#printMapsModal .modal-content.print-maps-modal-content {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 16px);
    min-height: min(92vh, calc(100vh - 24px));
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#printMapsModal .modal-content.print-maps-modal-content .modal-header {
    flex-shrink: 0;
}

#printMapsModal .modal-content.print-maps-modal-content .print-maps-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 1.25rem 1.5rem;
}

.print-maps-modal-body {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1rem;
    min-height: 0;
    flex: 1 1 auto;
}

.print-maps-options-col {
    flex: 1 1 50%;
    min-width: 0;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.print-maps-preview-col {
    flex: 1 1 50%;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 0.5rem;
}

/* Allow fixed-position floating text panel to extend without clipping */
#printMapsModal.active {
    overflow: visible;
}

#printMapsModal > .print-maps-annot-floating-panel.print-maps-annot-floating-panel--shape,
#printMapsModal > .print-maps-annot-floating-panel.print-maps-annot-floating-panel--line,
#printMapsModal > .print-maps-annot-floating-panel.print-maps-annot-floating-panel--rect {
    width: 12rem;
}

#printMapsModal > .print-maps-annot-floating-panel .print-maps-annot-sample-select {
    font-family: ui-monospace, 'Cascadia Code', 'Courier New', monospace;
    font-size: 0.72rem;
    letter-spacing: 0;
}

.print-maps-annot-overlay-layer .print-maps-annot-line-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    box-sizing: border-box;
}

.print-maps-annot-overlay-layer .print-maps-annot-line-handle {
    position: absolute;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: 3px solid #1565c0;
    box-sizing: border-box;
    cursor: grab;
    pointer-events: auto;
    z-index: 5;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.print-maps-annot-overlay-layer .print-maps-annot-line-handle:active {
    cursor: grabbing;
}

.print-maps-annot-overlay-layer .print-maps-annot-rect-corner-nw,
.print-maps-annot-overlay-layer .print-maps-annot-rect-corner-ne,
.print-maps-annot-overlay-layer .print-maps-annot-rect-corner-se,
.print-maps-annot-overlay-layer .print-maps-annot-rect-corner-sw {
    cursor: nwse-resize;
}

.print-maps-annot-overlay-layer .print-maps-annot-rect-corner-ne,
.print-maps-annot-overlay-layer .print-maps-annot-rect-corner-sw {
    cursor: nesw-resize;
}

#printMapsModal > .print-maps-annot-floating-panel {
    position: fixed;
    z-index: 10050;
    width: 9.5rem;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: 8px;
    background: rgba(18, 22, 30, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    overflow: hidden;
}

.print-maps-annot-floating-panel-header {
    flex-shrink: 0;
    padding: 0.38rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: rgba(245, 247, 250, 0.95);
    background: rgba(21, 101, 192, 0.55);
    cursor: grab;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.print-maps-annot-floating-panel-header:active {
    cursor: grabbing;
}

.print-maps-annot-floating-panel-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.45rem;
}

.print-maps-annot-floating-panel-label {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(245, 247, 250, 0.82);
}

#printMapsModal > .print-maps-annot-floating-panel .print-maps-annot-overlay-select,
#printMapsModal > .print-maps-annot-floating-panel .print-maps-annot-overlay-num {
    min-width: 0;
    width: 100%;
}

.print-maps-annot-rotation-row .print-maps-annot-rotation-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
}

#printMapsModal > .print-maps-annot-floating-panel .print-maps-annot-rot-step-btn {
    flex: 0 0 auto;
    min-width: 1.75rem;
    padding: 0.25rem 0.35rem;
    font-weight: 700;
    line-height: 1;
}

#printMapsModal > .print-maps-annot-floating-panel .print-maps-annot-rotation-input {
    flex: 1 1 auto;
    min-width: 0;
}

#printMapsModal > .print-maps-annot-floating-panel .print-maps-annot-overlay-color {
    width: 100%;
    height: 2rem;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    box-sizing: border-box;
}

.print-maps-preview-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#printMapsPreviewCanvas {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

#printMapsPreviewCanvas.print-maps-preview-panning {
    cursor: grabbing;
}

.print-maps-section {
    margin-bottom: 1.25rem;
}

.print-maps-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #f5f7fa;
    margin: 0 0 0.65rem 0;
}

.print-maps-page-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.6rem;
    margin-bottom: 0.65rem;
}

.print-maps-page-lock-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.print-maps-lock-view-hint {
    display: block;
    font-size: 0.72rem;
    line-height: 1.35;
    margin: 0;
    max-width: 100%;
    color: rgba(245, 247, 250, 0.78);
}

.print-maps-orientation-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.15rem;
}

.print-maps-orientation-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: rgba(245, 247, 250, 0.92);
}

.print-maps-orientation-row .print-maps-orientation-select.form-select {
    min-width: 11rem;
    max-width: 100%;
}

.print-maps-columns-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.65rem;
}

.print-maps-columns-label {
    font-weight: 600;
    font-size: 0.8125rem;
    color: rgba(245, 247, 250, 0.92);
}

.print-maps-columns-row .print-maps-columns-select.form-select {
    min-width: 11rem;
    max-width: 100%;
}

.print-maps-columns-hint {
    margin: 0.35rem 0 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
    max-width: 100%;
}

#printMapsModal .print-maps-lock-view-btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    min-width: 0;
    width: auto;
}

.print-maps-preview-wrap canvas#printMapsPreviewCanvas.print-maps-preview-view-locked {
    cursor: default !important;
}

.print-maps-page-label {
    font-weight: 600;
    color: rgba(245, 247, 250, 0.9);
}

.print-maps-page-readout {
    font-variant-numeric: tabular-nums;
    color: #f5f7fa;
}

/* Print Maps — preview row uses compact buttons; export modal uses full-size actions */
/* Print Maps — export PDF modal */
#printMapsPdfExportModal.print-maps-pdf-export-modal .modal-footer.print-maps-pdf-export-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
    padding-top: 0.5rem;
}

#printMapsPdfExportModal.print-maps-pdf-export-modal .modal-footer.print-maps-pdf-export-footer .btn {
    padding: 0.5rem 1.35rem;
    font-size: 0.9375rem;
    font-weight: 600;
    min-width: 9.5rem;
}

#printMapsModal .print-maps-page-row .btn.print-maps-page-btn,
#printMapsModal .print-maps-page-row .btn.print-maps-export-btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    font-size: 0.8125rem;
    font-weight: 600;
    gap: 0.25rem;
    min-width: 0;
    width: auto;
    border-radius: 6px;
    border-width: 1px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

#printMapsModal .print-maps-page-row .btn.print-maps-page-btn:hover,
#printMapsModal .print-maps-page-row .btn.print-maps-export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.print-maps-page-btn[disabled],
.print-maps-page-btn.print-maps-btn-disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

#printMapsModal .btn.print-maps-select-area-btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    gap: 0.35rem;
    min-width: 0;
    width: auto;
    max-width: none;
    align-self: flex-start;
    border-radius: 6px;
    border-width: 1px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.35rem;
}

#printMapsModal .btn.print-maps-select-area-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.print-maps-area-summary {
    margin: 0 0 0.75rem 0 !important;
}

.print-maps-details {
    margin-top: 0.65rem;
    border: 1px solid rgba(74, 144, 226, 0.35);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    background: rgba(26, 47, 74, 0.35);
}

.print-maps-details-summary {
    cursor: pointer;
    font-weight: 600;
    color: #dce8f7;
    padding: 0.25rem 0;
    user-select: none;
}

.print-maps-exclusion-choice-modal {
    z-index: 1200;
}

.print-maps-close-confirm-modal {
    z-index: 1350;
}

.print-maps-move-reset-confirm-modal {
    z-index: 1350;
}

.print-maps-confirm-actions-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
    align-items: center;
}

#printMapsCloseConfirmModal.print-maps-close-confirm-modal .print-maps-confirm-actions-compact .btn.print-maps-confirm-yes-btn,
#printMapsCloseConfirmModal.print-maps-close-confirm-modal .print-maps-confirm-actions-compact .btn.print-maps-confirm-no-btn,
#printMapsMoveResetConfirmModal.print-maps-move-reset-confirm-modal .print-maps-confirm-actions-compact .btn.print-maps-confirm-yes-btn,
#printMapsMoveResetConfirmModal.print-maps-move-reset-confirm-modal .print-maps-confirm-actions-compact .btn.print-maps-confirm-no-btn {
    padding: 0.38rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.38;
    min-height: auto;
    border-radius: 6px;
    flex-direction: row;
}

.print-maps-exclusions-hint {
    margin-bottom: 0.5rem;
}

.print-maps-exclusions-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.print-maps-exclusions-activate-btn {
    margin-bottom: 0;
}

/* Compact activate / reset (global .btn is oversized in this modal) */
#printMapsModal .btn.print-maps-exclusions-activate-btn,
#printMapsModal .btn.print-maps-exclusions-show-btn,
#printMapsModal .btn.print-maps-move-activate-btn,
#printMapsModal .btn.print-maps-move-reset-btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    gap: 0.25rem;
    min-width: 0;
    width: auto;
    border-radius: 6px;
    border-width: 1px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

#printMapsModal .btn.print-maps-exclusions-activate-btn:hover,
#printMapsModal .btn.print-maps-exclusions-show-btn:hover,
#printMapsModal .btn.print-maps-move-activate-btn:hover,
#printMapsModal .btn.print-maps-move-reset-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.print-maps-exclusions-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 10rem;
    overflow-y: auto;
}

.print-maps-exclusion-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: rgba(245, 247, 250, 0.92);
}

.print-maps-exclusion-item-label {
    flex: 1;
    min-width: 0;
}

.print-maps-exclusion-remove-btn {
    flex-shrink: 0;
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
}

.print-maps-exclusion-choice-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.print-maps-wp-coords-format-actions .btn[disabled],
.print-maps-wp-coords-format-actions .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Print Maps — custom waypoint appendix format builder (stacked above coord-format modal) */
.print-maps-wp-custom-builder-modal {
    z-index: 1210;
}

.print-maps-wp-custom-submodal {
    z-index: 1240;
}

.print-maps-wp-custom-hint {
    margin-bottom: 0.75rem;
}

.print-maps-wp-custom-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

#printMapsModal .btn.print-maps-wp-custom-tok-btn {
    flex-direction: row;
    padding: 0.32rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    min-width: 0;
    width: auto;
}

.print-maps-wp-custom-seq-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
}

.print-maps-wp-custom-sequence {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.6rem;
    padding: 0.45rem;
    margin-bottom: 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(74, 144, 226, 0.35);
    background: rgba(26, 47, 74, 0.35);
}

.print-maps-wp-custom-seq-chip {
    flex-shrink: 0;
    padding: 0.28rem 0.5rem;
    font-size: 0.76rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(74, 144, 226, 0.55);
    background: rgba(44, 62, 80, 0.85);
    color: rgba(245, 247, 250, 0.95);
    cursor: pointer;
    max-width: 100%;
}

.print-maps-wp-custom-seq-chip:hover {
    border-color: rgba(74, 144, 226, 0.95);
    background: rgba(52, 73, 94, 0.95);
}

.print-maps-wp-custom-preview {
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(230, 237, 246, 0.95);
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    background: rgba(15, 27, 46, 0.65);
    border: 1px solid rgba(74, 144, 226, 0.22);
    word-break: break-word;
}

.print-maps-wp-custom-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.print-maps-wp-custom-chip-actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.print-maps-wp-custom-delete-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.75rem;
}

.print-maps-wp-custom-enter-text-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 1rem;
}

.print-maps-exclusions-empty {
    padding: 0.25rem 0;
}

.print-maps-moves-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    max-height: 10rem;
    overflow-y: auto;
}

.print-maps-move-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: rgba(245, 247, 250, 0.92);
}

.print-maps-move-item-label {
    flex: 1;
    min-width: 0;
}

.print-maps-move-item-actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

#printMapsModal .btn.print-maps-move-hide-line-btn,
#printMapsModal .btn.print-maps-move-remove-btn {
    padding: 0.22rem 0.48rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 6px;
}

.print-maps-moves-empty {
    padding: 0.25rem 0;
}

.print-maps-move-hint {
    margin-bottom: 0.5rem;
}

.print-maps-move-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.print-maps-move-activate-btn {
    margin-bottom: 0;
}

.print-maps-move-reset-btn {
    margin-bottom: 0;
}

#printMapsPreviewCanvas.print-maps-preview-move-mode:not(.print-maps-preview-move-dragging) {
    cursor: grab;
}

#printMapsPreviewCanvas.print-maps-preview-move-dragging {
    cursor: grabbing;
}

#printMapsPreviewCanvas.print-maps-preview-annot-mode:not(.print-maps-preview-annot-dragging) {
    cursor: crosshair;
}

#printMapsPreviewCanvas.print-maps-preview-annot-dragging {
    cursor: crosshair;
}

.print-maps-annot-hint {
    margin-bottom: 0.45rem;
}

.print-maps-annot-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

#printMapsModal .btn.print-maps-annot-tool-btn {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 0;
    width: auto;
    border-radius: 6px;
}

#printMapsModal .btn.print-maps-annot-tool-btn.print-maps-annot-tool-active {
    box-shadow: 0 0 0 2px rgba(100, 181, 246, 0.65);
}

.print-maps-annot-overlay-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
}

.print-maps-annot-overlay-select,
.print-maps-annot-overlay-num {
    padding: 0.28rem 0.38rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.98);
    color: #1a1d24;
    font-size: 0.78rem;
    min-width: 7rem;
}

.print-maps-annot-overlay-num {
    width: 4rem;
    min-width: 4rem;
}

#printMapsModal > .print-maps-annot-floating-panel .print-maps-annot-overlay-done-btn,
#printMapsModal > .print-maps-annot-floating-panel .print-maps-annot-overlay-cancel-btn {
    padding: 0.32rem 0.62rem;
    font-size: 0.74rem;
    font-weight: 600;
    border-radius: 6px;
    width: 100%;
    justify-content: center;
}

.print-maps-annot-overlay-kit {
    position: absolute;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    box-sizing: border-box;
}

.print-maps-annot-overlay-frame {
    position: relative;
    pointer-events: auto;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    border: 2px dashed #1565c0;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.print-maps-annot-overlay-move-grip {
    flex-shrink: 0;
    height: 22px;
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: rgba(21, 101, 192, 0.98);
    background: rgba(255, 255, 255, 0.88);
    cursor: move;
    user-select: none;
    border: 2px solid #1565c0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    box-sizing: border-box;
}

.print-maps-annot-overlay-kit .print-maps-annot-overlay-frame {
    border-radius: 0 0 6px 6px;
}

.print-maps-annot-overlay-textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    flex: 1 1 auto;
    min-height: 24px;
    resize: none;
    margin: 0;
    padding: 6px;
    border: none;
    outline: none;
    background: transparent;
    color: transparent;
    caret-color: #0d47a1;
    line-height: 1.25;
}

.print-maps-annot-overlay-textarea::placeholder {
    color: rgba(0, 0, 0, 0.25);
}

.print-maps-annot-overlay-shape-slot {
    flex: 1 1 auto;
    min-height: 24px;
    width: 100%;
    pointer-events: none;
}

.print-maps-annot-overlay-handles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.print-maps-annot-overlay-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    margin: -5px;
    background: #fff;
    border: 2px solid #1565c0;
    box-sizing: border-box;
    pointer-events: auto;
    border-radius: 2px;
    z-index: 3;
}

.print-maps-annot-overlay-handle-nw {
    top: 0;
    left: 0;
    cursor: nwse-resize;
}
.print-maps-annot-overlay-handle-n {
    top: 0;
    left: 50%;
    cursor: ns-resize;
}
.print-maps-annot-overlay-handle-ne {
    top: 0;
    right: 0;
    cursor: nesw-resize;
}
.print-maps-annot-overlay-handle-e {
    top: 50%;
    right: 0;
    cursor: ew-resize;
}
.print-maps-annot-overlay-handle-se {
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
}
.print-maps-annot-overlay-handle-s {
    bottom: 0;
    left: 50%;
    cursor: ns-resize;
}
.print-maps-annot-overlay-handle-sw {
    bottom: 0;
    left: 0;
    cursor: nesw-resize;
}
.print-maps-annot-overlay-handle-w {
    top: 50%;
    left: 0;
    cursor: ew-resize;
}

.print-maps-annot-overlay-handle-n,
.print-maps-annot-overlay-handle-s {
    transform: translateX(-50%);
}
.print-maps-annot-overlay-handle-e,
.print-maps-annot-overlay-handle-w {
    transform: translateY(-50%);
}

.print-maps-check-grid {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    max-height: 10rem;
    overflow-y: auto;
}

.print-maps-annot-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
    color: rgba(245, 247, 250, 0.92);
}

.print-maps-annot-item-label {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.print-maps-annot-item-actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

#printMapsModal .btn.print-maps-annot-edit-btn,
#printMapsModal .btn.print-maps-annot-remove-btn {
    padding: 0.22rem 0.48rem;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 6px;
}

.print-maps-annot-empty {
    padding: 0.25rem 0;
}

.print-maps-check-grid {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.5rem;
    padding-bottom: 0.35rem;
}

.print-maps-check {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    color: rgba(245, 247, 250, 0.92);
    font-size: 0.92rem;
    cursor: pointer;
}

.print-maps-check input {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.print-maps-sliders {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-top: 0.5rem;
    padding-bottom: 0.35rem;
}

.print-maps-slider-row {
    display: grid;
    grid-template-columns: 1fr minmax(120px, 38%) 2rem;
    align-items: center;
    gap: 0.5rem;
    color: rgba(245, 247, 250, 0.88);
    font-size: 0.88rem;
}

.print-maps-slider-val {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #b8d4f5;
}

.sector-map-print-area-overlay {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: none;
    pointer-events: none;
    cursor: crosshair;
    box-sizing: border-box;
}

.sector-map-print-area-overlay.sector-map-print-area-overlay-active {
    display: block;
    pointer-events: auto;
}

.sector-map-print-area-overlay .sector-map-print-area-rect {
    position: absolute;
    border: 2px dashed #1565c0;
    background: rgba(21, 101, 192, 0.12);
    box-sizing: border-box;
    pointer-events: none;
}

.sector-map-satbg-area-overlay {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: none;
    pointer-events: none;
    cursor: crosshair;
    box-sizing: border-box;
}

.sector-map-satbg-area-overlay.sector-map-satbg-area-overlay-active {
    display: block;
    pointer-events: auto;
}

.sector-map-satbg-area-overlay .sector-map-satbg-area-rect {
    position: absolute;
    border: 2px dashed #2e7d32;
    background: rgba(46, 125, 50, 0.14);
    box-sizing: border-box;
    pointer-events: none;
}

.sector-map-ground-layer-area-overlay {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: none;
    pointer-events: none;
    cursor: crosshair;
    box-sizing: border-box;
}

.sector-map-ground-layer-area-overlay.sector-map-ground-layer-area-overlay-active {
    display: block;
    pointer-events: auto;
}

.sector-map-ground-layer-area-overlay .sector-map-ground-layer-area-rect {
    position: absolute;
    border: 2px dashed #6d4c41;
    background: rgba(121, 85, 72, 0.18);
    box-sizing: border-box;
    pointer-events: none;
}

@media (max-width: 900px) {
    #printMapsModal .modal-content.print-maps-modal-content {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        min-height: unset;
        max-height: calc(100vh - 12px);
    }

    .print-maps-modal-body {
        flex-direction: column;
        min-height: 0;
    }

    .print-maps-preview-col {
        flex: 1 1 auto;
        max-height: 50vh;
        overflow: auto;
    }

    .print-maps-slider-row {
        grid-template-columns: 1fr;
    }

    .print-maps-slider-val {
        text-align: left;
    }
}

.sat-refine-preset-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-top: 0.35rem;
}

.sat-refine-preset-btn {
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    line-height: 1.35;
}

.audit-modal-content {
    width: min(96vw, 980px);
    max-width: 980px;
}

.audit-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin: 0.4rem 0 0.8rem;
}

.audit-log {
    max-height: min(62vh, 640px);
    overflow: auto;
    border: 1px solid rgba(74, 144, 226, 0.28);
    border-radius: 10px;
    background: rgba(8, 14, 26, 0.55);
}

.audit-row {
    display: grid;
    grid-template-columns: 9.5rem 1.6rem 6.2rem 1fr;
    gap: 0.45rem;
    align-items: start;
    padding: 0.45rem 0.7rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    font-size: 0.86rem;
}

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

.audit-time,
.audit-user {
    color: rgba(203, 213, 225, 0.86);
}

.audit-kind {
    font-weight: 700;
}

.audit-detail {
    color: rgba(226, 232, 240, 0.92);
    white-space: pre-wrap;
    word-break: break-word;
}

.audit-meta {
    color: rgba(148, 163, 184, 0.95);
    font-size: 0.78rem;
}

.audit-empty {
    padding: 1rem 0.8rem;
    color: rgba(203, 213, 225, 0.8);
}
