/* ===== FSX Glass Cockpit UI ===== */
:root {
    --bg: #0f1115;
    --bg-deep: #0b0c0f;
    --panel: #16181d;
    --panel-2: #13151a;
    --border: #2a2d37;
    --border-amber: rgba(255, 153, 0, 0.3);
    --border-amber-hot: rgba(255, 153, 0, 0.75);
    --amber: #ff9900;
    --amber-hot: #ffb84d;
    --amber-glow: rgba(255, 153, 0, 0.35);
    --radio: #ff9900; /* unificado con ámbar (antes verde) */
    --cyan: #5ec8ff;
    --ink: #e8ecf2;
    --muted: #9aa3b2;
    --key-bg: #23252b;
    --key-bg-mod: #2c2f38;
    --font: "Segoe UI", Arial, Helvetica, sans-serif;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --radius: 12px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

html { font-size: 18px; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: linear-gradient(160deg, #16181d 0%, #0f1115 45%, #050608 100%);
    overflow: hidden;
    overflow-x: hidden;
    padding: 0;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 100;
    padding: 0.7rem 1rem;
    background: var(--amber);
    color: #111;
    font-weight: 800;
    text-decoration: none;
    border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* Paneles glass (sustituye chapa metálica) */
.metal {
    position: relative;
    background: linear-gradient(145deg, #16181d, #0b0c0f);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Tornillos ocultos — HTML intacto */
.screw {
    display: none !important;
}

.app {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) minmax(280px, 340px);
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
    padding: 0.75rem;
    min-height: 0;
}

/* Menú lateral */
.side-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    padding: 1rem 0.45rem;
    background: linear-gradient(180deg, #16181d, #0f1115);
    border: 1px solid var(--border);
    border-right: 1px solid rgba(255, 153, 0, 0.25);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-height: 0;
    height: 100%;
    max-height: 100%;
    /* Eliminar scroll del marco izquierdo de opciones */
    overflow: hidden !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
.side-nav::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}
.nav-btn {
    width: 56px;
    min-height: 56px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    background: #1a1c22;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #c5ccd8;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.nav-btn:hover {
    color: #fff;
    border-color: var(--border-amber-hot);
    background: #22252d;
    box-shadow: 0 0 16px var(--amber-glow);
}
.nav-ico { font-size: 1.35rem; line-height: 1; }
.nav-txt { font-size: 0.55rem; font-weight: 800; letter-spacing: 0.04em; color: inherit; }

.main {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.main-top {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.app-header,
.top-navbar,
.app-header-dashboard {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 12px 20px;
    background-color: #0b0d13;
    border-bottom: 1px solid rgba(255, 153, 0, 0.2);
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
    border-radius: var(--radius);
}

.header-left-col {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.header-right-col {
    flex: 1 1 320px;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.header-right-col > .header-search-container,
.header-right-col > .vhf-radio-panel {
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    box-sizing: border-box;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    color: #ff9900;
    white-space: nowrap;
    flex: 0 0 auto;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    height: auto;
    max-width: none;
}

.app-logo img,
.app-logo svg {
    height: 115px !important;
    width: auto !important;
    max-width: none;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    object-fit: contain;
    mix-blend-mode: screen;
}

.app-logo .hero-logo {
    display: block;
    width: auto;
    max-width: none;
    height: 115px;
    margin: 0;
    padding: 0;
    line-height: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.app-logo .hero-logo svg {
    display: block;
    width: auto;
    height: 115px !important;
    max-width: none;
    max-height: 115px !important;
    object-fit: contain;
    aspect-ratio: 600 / 160;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    mix-blend-mode: screen;
}

.app-logo svg > rect:first-of-type {
    fill: none !important;
    stroke: none !important;
}

.header-search-container,
#comando-buscador-container.header-search-container,
.app-header .search-shell {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.header-search-container input,
#comando-buscador-input,
.app-header .search-input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid rgba(255, 153, 0, 0.6) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 8px 4px !important;
    color: #fff !important;
    font-size: 1.1em;
}

.app-header .search-input:focus {
    outline: none;
    border-bottom-color: #ff9900 !important;
    box-shadow: none !important;
}

.app-header .atc-radio-panel,
.header-right-col .vhf-radio-panel {
    margin-top: 0;
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    justify-content: space-between;
}

.header-right-col .vhf-radio-panel select {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

.hero {
    text-align: center;
    padding: 0.15rem 0 0.25rem;
}
.hero-logo {
    display: block;
    width: 100%;
    max-width: min(640px, 96%);
    height: auto;
    margin: 0 auto;
    line-height: 0;
}
.hero-logo svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 150px;
    aspect-ratio: 600 / 160;
}
@media (max-width: 720px) {
    .hero-logo { max-width: 100%; }
    .hero-logo svg { max-height: 110px; }
    .app-logo .hero-logo { height: 90px; max-width: none; }
    .app-logo .hero-logo svg { height: 90px !important; max-height: 90px !important; }
    .app-header .atc-radio-panel { margin-left: 0; }
}
.hero-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.hero-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.6vw, 1.95rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: #fff;
}
.plane-ico { color: var(--amber); font-size: 1.35rem; }
.plane-flip { transform: scaleX(-1); }
.hero-line {
    height: 1px;
    margin: 0.35rem auto;
    width: min(520px, 90%);
    background: linear-gradient(90deg, transparent, rgba(255, 153, 0, 0.45), transparent);
}

/* Radio VHF multiestación (LiveATC) — módulo aviónica */
.atc-radio-panel,
.vhf-radio-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0e1118;
    border: 1px solid rgba(255, 153, 0, 0.3);
    border-radius: 6px;
    padding: 6px 12px;
    box-sizing: border-box;
    flex-wrap: nowrap;
    margin-top: 0;
    flex-shrink: 0;
}

.vhf-power-btn,
.btn-atc {
    appearance: none;
    margin: 0;
    background: #1a150c;
    color: #ff4444;
    border: 1px solid #ff4444;
    border-radius: 4px;
    padding: 5px 0;
    width: 108px;
    min-width: 108px;
    max-width: 108px;
    height: 32px;
    text-align: center;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.85em;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-sizing: border-box;
    flex: 0 0 108px;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.2s ease, color 0.2s ease;
    box-shadow: none;
}

.vhf-power-btn:hover,
.btn-atc:hover {
    color: #ff8888;
    border-color: #ff4444;
}

.vhf-power-btn.active,
.vhf-power-btn.radio-on,
.btn-atc.radio-on {
    background: rgba(255, 153, 0, 0.15);
    color: #00ff00;
    border-color: #00ff00;
    box-shadow: 0 0 6px rgba(0, 255, 0, 0.3);
}

.vhf-label {
    font-family: monospace;
    font-size: 0.85em;
    color: #ff9900;
    font-weight: bold;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.vhf-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4444;
    box-shadow: 0 0 6px rgba(255, 68, 68, 0.7);
    flex: 0 0 auto;
}

.vhf-radio-panel:has(.radio-on) .vhf-led {
    background: #00ff00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.85);
}

.vhf-radio-panel select,
.atc-radio-panel select {
    appearance: none;
    margin: 0;
    max-width: min(100%, 280px);
    flex: 0 0 auto;
    background: #151922 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ff9900' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 0.65rem center;
    color: #ffffff;
    border: 1px solid rgba(255, 153, 0, 0.4);
    border-radius: 4px;
    padding: 5px 28px 5px 10px;
    font-size: 0.9em;
    outline: none;
    cursor: pointer;
    box-shadow: none;
    box-sizing: border-box;
}

.vhf-radio-panel select:hover,
.atc-radio-panel select:hover {
    border-color: #ff9900;
}

.vhf-radio-panel select:focus,
.glass-select:focus {
    outline: none;
    border-color: #ff9900;
    box-shadow: 0 0 8px rgba(255, 153, 0, 0.25);
}

.vhf-radio-panel select option,
.glass-select option {
    background: #151922;
    color: #ffffff;
}

#atc-audio {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Buscador */
.search-shell,
#comando-buscador-container {
    padding: 5px 10px;
    font-size: 0.9em;
}
.search-field { position: relative; }
.search-input {
    width: 100%;
    padding: 0.55rem 2.4rem 0.55rem 0.85rem;
    font: inherit;
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    font-weight: 600;
    color: var(--ink);
    background: var(--panel-2);
    border: 1px solid var(--border-amber);
    border-radius: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-input::placeholder { color: var(--muted); font-weight: 500; }
.search-input:focus {
    outline: none;
    border-color: var(--border-amber-hot);
    box-shadow: 0 0 0 1px rgba(255, 153, 0, 0.35), 0 0 20px var(--amber-glow);
}
.search-ico {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0.7;
    pointer-events: none;
}
.results-count {
    margin: 2px 0 0;
    min-height: 1.15em;
    color: rgba(255, 153, 0, 0.85);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
}

.results-zone {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0.15rem;
    scrollbar-gutter: stable;
}
.results-zone::-webkit-scrollbar { width: 8px; }
.results-zone::-webkit-scrollbar-thumb {
    background: #3a3f4a;
    border-radius: 8px;
}
.results-zone::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }

.estado {
    padding: 1rem 1.15rem;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 1.05rem;
}
.estado.error { border-color: rgba(255, 107, 107, 0.5); color: #ffd0d0; }

.cards {
    display: grid;
    gap: 0.45rem;
    padding-bottom: 0.25rem;
}

.card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 0.65rem;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: linear-gradient(145deg, #1a1c22, #12141a);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.card:hover {
    border-color: var(--border-amber);
    box-shadow: 0 0 18px var(--amber-glow);
}

.card-eyebrow {
    margin: 0 0 0.15rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}
.card-title {
    margin: 0 0 0.2rem;
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    font-weight: 900;
    line-height: 1.15;
    color: var(--amber);
    text-transform: uppercase;
}
.card-desc {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.35;
    color: #d5dae3;
}

.key-stack {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: center;
    min-width: 3.6rem;
}
.keycap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    min-height: 2.55rem;
    padding: 0.18rem;
    font-weight: 900;
    color: #e2e8f0;
    text-align: center;
    background: var(--key-bg);
    border: 1px solid #3a3f4a;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.keycap__small {
    font-size: 0.42rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.75;
    line-height: 1;
}
.keycap__big {
    font-size: 1.05rem;
    line-height: 1;
    margin-top: 0.05rem;
}
.keycap.is-primary {
    background: linear-gradient(180deg, #3a3220, #2a2418);
    border-color: rgba(255, 153, 0, 0.55);
    color: var(--amber-hot);
    box-shadow: 0 0 10px var(--amber-glow), 0 4px 6px rgba(0, 0, 0, 0.35);
}

/* Teclado virtual — dark aeronautical */
.keyboard-shell {
    flex: 0 0 auto;
    position: relative;
    padding: 0.55rem 0.6rem 0.7rem;
    z-index: 5;
    background: linear-gradient(145deg, #16181d, #0b0c0f);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.kb-heading {
    margin: 0 0 0.4rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.keyboard {
    overflow-x: auto;
    padding-bottom: 0.15rem;
}

.keyboard-wrap.kb-realistic {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: center;
    gap: 0.55rem;
    min-width: max-content;
    margin: 0 auto;
}

.kb-main {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.kb-row {
    display: flex;
    align-items: stretch;
    gap: 0.18rem;
}

.kb-spacer { flex: 0 0 auto; }
.kb-spacer-sm { width: 0.7rem; }

.kb-key {
    box-sizing: border-box;
    flex: 0 0 auto;
    width: 2.05rem;
    height: 2.05rem;
    margin: 0;
    padding: 0 0.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 800 0.68rem/1.05 var(--font);
    color: #e2e8f0;
    text-align: center;
    background: var(--key-bg);
    border: 1px solid #333842;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    user-select: none;
    cursor: default;
    transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.kb-key:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35), 0 1px 0 #111;
}

.kb-fn {
    width: 2rem;
    height: 1.55rem;
    font-size: 0.58rem;
    background: var(--key-bg-mod);
    color: #c5ccd8;
}

.kb-w-backspace,
.kb-w-tab,
.kb-w-enter,
.kb-w-caps,
.kb-w-shift,
.kb-w-mod {
    background: var(--key-bg-mod);
    color: #f0f2f5;
}

.kb-w-backspace { width: 4.4rem; font-size: 0.62rem; }
.kb-w-tab { width: 3.15rem; font-size: 0.62rem; }
.kb-w-enter { width: 3.4rem; font-size: 0.62rem; }
.kb-w-caps { width: 3.7rem; font-size: 0.58rem; }
.kb-w-shift { width: 3.35rem; font-size: 0.62rem; }
.kb-w-mod { width: 2.55rem; font-size: 0.58rem; }
.kb-w-space {
    flex: 1 1 auto;
    width: auto;
    min-width: 14rem;
    font-size: 0.7rem;
    background: var(--key-bg-mod);
}

.kb-nav {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.55rem;
    padding-bottom: 0.02rem;
}

.kb-nav-cluster {
    display: grid;
    grid-template-columns: repeat(3, 2.05rem);
    grid-template-rows: repeat(2, 2.05rem);
    gap: 0.18rem;
}

.kb-arrows {
    display: grid;
    grid-template-columns: repeat(3, 2.05rem);
    grid-template-rows: repeat(2, 2.05rem);
    gap: 0.18rem;
}

.kb-arrow-spacer { visibility: hidden; }
.kb-nav-key { width: 2.05rem; font-size: 0.55rem; background: var(--key-bg-mod); }

.kb-numpad {
    display: grid;
    grid-template-columns: repeat(4, 2.15rem);
    grid-template-rows: repeat(5, 2.05rem);
    gap: 0.18rem;
    align-content: end;
}

.kb-numpad .kb-key {
    width: 100%;
    height: 100%;
    font-size: 0.78rem;
}

.kb-np-tall {
    grid-row: span 2;
    height: 100%;
    background: var(--key-bg-mod);
}

.kb-np-wide {
    grid-column: span 2;
    width: 100%;
}

.kb-key.is-lit {
    color: #111;
    background: linear-gradient(180deg, #ffd27a, var(--amber) 55%, #e07f00);
    border-color: #ffb84d;
    box-shadow:
        0 0 12px var(--amber-glow),
        0 0 22px rgba(255, 153, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transform: translateY(-1px);
}

/* Copiloto */
.copilot {
    display: flex;
    flex-direction: column;
    padding: 0.85rem 0.75rem 0.9rem;
    min-height: 0;
    height: 100%;
    background: linear-gradient(145deg, #16181d, #0b0c0f);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.copilot-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.5rem;
    background: var(--panel-2);
    border: 1px solid var(--border-amber);
    border-radius: 10px;
    flex: 0 0 auto;
}
.copilot-head-main {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    flex: 1 1 auto;
}
.avatar-comandante {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
    border: 2px solid #ff9900;
    flex-shrink: 0;
}
.copilot-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #ff9900;
    text-shadow: none;
    line-height: 1.2;
}
.led {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2a2d37;
    border: 1px solid #111;
}
.led.on {
    background: var(--amber);
    box-shadow: 0 0 10px var(--amber-glow);
}

.chat-log {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0.7rem;
    margin-bottom: 0.55rem;
    background: #13151a;
    border: 1px solid rgba(255, 153, 0, 0.3);
    border-radius: 10px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92rem;
}
.chat-bubble { margin: 0 0 0.8rem; white-space: pre-wrap; word-break: break-word; }
.chat-bubble.user { color: #fff; }
.chat-bubble.bot { color: #f0f2f5; }
.chat-bubble .who {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    opacity: 0.9;
    color: var(--amber);
}

.chat-form {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.chat-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.chat-input-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.chat-input {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    resize: vertical;
    min-height: 6.5rem;
    height: 6.5rem;
    max-height: 12rem;
    margin: 0;
    padding: 0.75rem 0.85rem;
    font: inherit;
    font-size: 1.15rem;
    line-height: 1.45;
    color: var(--ink);
    background: #13151a;
    border: 1px solid rgba(255, 153, 0, 0.3);
    border-radius: 10px;
    box-sizing: border-box;
    position: static;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chat-input:focus {
    outline: none;
    border-color: rgba(255, 153, 0, 0.75);
    box-shadow: 0 0 0 1px rgba(255, 153, 0, 0.35), 0 0 18px var(--amber-glow);
}
.chat-actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: stretch;
    width: 100%;
    justify-content: center;
}

/* MIC — píldora moderna */
.chat-mic {
    flex: 0 1 auto;
    align-self: center;
    box-sizing: border-box;
    min-height: 2.75rem;
    min-width: 7.5rem;
    padding: 0.55rem 1.4rem;
    font: inherit;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #f5f7fa;
    border-radius: 50px;
    cursor: pointer;
    position: static;
    background: #1a1c22;
    border: 1px solid rgba(255, 153, 0, 0.45);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.chat-mic:hover {
    border-color: var(--amber);
    box-shadow: 0 0 18px var(--amber-glow);
    color: #fff;
    background: #22252d;
}
.chat-mic.is-listening {
    color: #fff;
    background: #2a1515;
    border-color: rgba(220, 60, 60, 0.85);
    box-shadow: 0 0 0 1px rgba(220, 60, 60, 0.4), 0 0 18px rgba(220, 60, 60, 0.35);
    animation: mic-pulse 0.85s ease-in-out infinite;
    transform: none;
}
@keyframes mic-pulse {
    0%, 100% {
        filter: brightness(1);
        box-shadow: 0 0 0 1px rgba(220, 60, 60, 0.35), 0 0 12px rgba(220, 60, 60, 0.25);
    }
    50% {
        filter: brightness(1.2);
        box-shadow: 0 0 0 2px rgba(220, 60, 60, 0.55), 0 0 22px rgba(220, 60, 60, 0.45);
    }
}
.chat-mic:disabled { opacity: 0.6; cursor: wait; }

.chat-voice-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.45rem;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}
.chat-voice-toggle input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--amber);
    margin: 0;
}
.chat-status {
    min-height: 1.1em;
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}
.knobs {
    display: flex;
    justify-content: center;
    gap: 1.1rem;
    margin-top: 0.5rem;
    flex: 0 0 auto;
}
.knob {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #3a3f4a, #1a1c22 70%);
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* ===== EFB — Electronic Flight Bag (modal cartas) ===== */
.hidden {
    display: none !important;
}
.glass-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-sizing: border-box;
}
.glass-modal-content {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 92vh;
    margin: 5% auto;
    background: #13151a;
    border: 1px solid #ff9900;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 153, 0, 0.15);
    overflow: hidden;
    overflow-y: auto;
}
.efb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 153, 0, 0.35);
    flex: 0 0 auto;
}
.efb-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #ff9900;
    font-family: "Courier New", Courier, monospace;
}
#btn-close-efb,
#btn-close-fpl,
#btn-close-tcas,
#btn-close-nav {
    appearance: none;
    margin: 0;
    width: auto;
    max-width: none;
    padding: 0.35rem 0.65rem;
    font-size: 1rem;
    line-height: 1;
    color: #e8ecf2;
    background: #1a1c22;
    border: 1px solid #2a2d37;
    border-radius: 8px;
    cursor: pointer;
}
#btn-close-efb:hover,
#btn-close-fpl:hover,
#btn-close-tcas:hover,
#btn-close-nav:hover {
    border-color: #ff9900;
    color: #ff9900;
}
.efb-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    padding: 0.75rem 1rem;
    flex: 0 0 auto;
    border-bottom: 1px solid #333;
}
#icao-input {
    flex: 1 1 12rem;
    min-width: 10rem;
    padding: 0.55rem 0.75rem;
    font: 700 0.95rem/1.2 "Courier New", Courier, monospace;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e8ecf2;
    background: #0f1115;
    border: 1px solid rgba(255, 153, 0, 0.35);
    border-radius: 8px;
}
#icao-input:focus {
    outline: none;
    border-color: #ff9900;
    box-shadow: 0 0 12px rgba(255, 153, 0, 0.25);
}
#btn-search-chart {
    appearance: none;
    padding: 0.55rem 1rem;
    font: 800 0.8rem/1.2 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.06em;
    color: #111;
    background: #ff9900;
    border: 1px solid #cc7700;
    border-radius: 8px;
    cursor: pointer;
}
#btn-search-chart:hover {
    background: #ffb84d;
}
#btn-open-skyvector {
    appearance: none;
    padding: 0.55rem 1rem;
    font: 800 0.8rem/1.2 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.06em;
    color: #ff9900;
    background: #0f1115;
    border: 1px solid rgba(255, 153, 0, 0.55);
    border-radius: 8px;
    cursor: pointer;
}
#btn-open-skyvector:hover {
    background: #1a1610;
    box-shadow: 0 0 12px rgba(255, 153, 0, 0.25);
}
.efb-viewer {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #333;
}
.fms-screen {
    margin: 0;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 16px;
    color: #e2e8f0;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
    white-space: normal;
}

@media (max-width: 720px) {
    .glass-modal-content {
        width: 96%;
        height: 90vh;
    }
}

@media (max-width: 1100px) {
    body { overflow: auto; }
    .app {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        grid-template-columns: 64px 1fr;
    }
    .main {
        height: auto;
        min-height: 70vh;
    }
    .results-zone {
        max-height: 42vh;
    }
    .copilot {
        grid-column: 1 / -1;
        height: auto;
        max-height: none;
    }
    .chat-log {
        min-height: 180px;
        max-height: 28vh;
    }
}

@media (max-width: 720px) {
    .app { grid-template-columns: 1fr; }
    .side-nav {
        flex-direction: row;
        justify-content: center;
        border-right: 1px solid var(--border);
        border-bottom: 1px solid rgba(255, 153, 0, 0.25);
        border-radius: var(--radius);
        overflow: hidden !important;
        overflow-x: hidden !important;
        overflow-y: hidden !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }
    .card {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
    .kb-w-space { min-width: 8rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ===== Interfaz 100% responsiva ===== */
img, svg, video, canvas {
    max-width: 100%;
}

.glass-modal-content input,
.glass-modal-content textarea {
    width: 100%;
    max-width: 100%;
}

#tcas-canvas {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 1 / 1;
}

@media (max-width: 600px) {
    .glass-modal-content {
        width: 96%;
        margin: 2% auto;
        padding: 10px;
        height: auto;
        max-height: 96vh;
    }
    .efb-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .efb-controls input,
    .efb-controls button {
        width: 100%;
        max-width: 100%;
    }
    #fpl-modal button#btn-save-fpl,
    #fpl-modal button#btn-export-fsx {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 8px;
    }
}

/* ===== Animación de bienvenida (splash radar HUD) ===== */
#flight-intro-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #07090e;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    font-family: monospace;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#flight-intro-splash.fade-out {
    opacity: 0;
    visibility: hidden;
}

.radar-container {
    position: relative;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 2px solid rgba(255, 153, 0, 0.3);
    background: radial-gradient(circle, rgba(255, 153, 0, 0.05) 0%, rgba(11, 13, 19, 0.8) 70%);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 35px;
    box-shadow: 0 0 35px rgba(255, 153, 0, 0.15) inset;
    overflow: hidden;
}

.radar-circle {
    position: absolute;
    width: 70%;
    height: 70%;
    border-radius: 50%;
    border: 1px dashed rgba(255, 153, 0, 0.25);
}

.radar-sweep {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 50%;
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.4) 0%, transparent 70%);
    transform-origin: bottom left;
    animation: radarSpin 2s linear infinite;
}

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

.radar-center-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff9900;
    border-radius: 50%;
    box-shadow: 0 0 12px #ff9900;
}

.radar-plane {
    position: absolute;
    font-size: 3.5rem;
    color: #ff9900;
    animation: planePulse 1.5s ease-in-out infinite alternate;
    text-shadow: 0 0 15px rgba(255, 153, 0, 0.8);
}

@keyframes planePulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    100% { transform: scale(1.1); opacity: 1; }
}

.splash-hud-text {
    text-align: center;
    color: #ff9900;
}

.hud-boot-label {
    font-size: 0.95rem;
    letter-spacing: 4px;
    color: rgba(255, 153, 0, 0.6);
    display: block;
    margin-bottom: 10px;
}

.splash-hud-text h2 {
    font-size: 2rem;
    letter-spacing: 3px;
    margin: 0 0 20px 0;
    color: #fff;
    text-shadow: 0 0 12px rgba(255, 153, 0, 0.4);
}

.hud-loading-bar {
    width: 380px;
    height: 6px;
    background: rgba(255, 153, 0, 0.15);
    border-radius: 3px;
    margin: 0 auto;
    overflow: hidden;
}

.hud-loading-progress {
    width: 0%;
    height: 100%;
    background: #ff9900;
    box-shadow: 0 0 10px #ff9900;
    animation: loadProgress 2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes loadProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}
