/* ============================================================
   CENTRO DE COMANDO UAV · SMCJ — Rediseño SPA v2
   drone-command.css — módulos operacionales + animaciones
   ============================================================ */

:root {
    --uc-cyan: #22d3ee;
    --uc-blue: #3b82f6;
    --uc-green: #34d399;
    --uc-amber: #fbbf24;
    --uc-red: #f87171;
    --uc-violet: #a78bfa;
    --uc-panel: linear-gradient(145deg, rgba(15, 23, 32, .96), rgba(7, 12, 18, .98));
    --uc-line: rgba(148, 163, 184, .12);
    --uc-line-cyan: rgba(34, 211, 238, .22);
}

/* ---------- layout base (compatibilidad) ---------- */
.command-shell { display: grid; grid-template-columns: 1.45fr .55fr; gap: 16px; }

.command-map {
    min-height: 430px; border-radius: 18px; position: relative; overflow: hidden;
    background:
        radial-gradient(circle at 55% 45%, rgba(14, 165, 233, .12), transparent 28%),
        linear-gradient(rgba(34, 211, 238, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 211, 238, .035) 1px, transparent 1px), #081019;
    background-size: auto, 32px 32px, 32px 32px;
    border: 1px solid rgba(34, 211, 238, .16);
}

.command-map:before {
    content: "FLORENCIO VARELA · CUADRO OPERACIONAL";
    position: absolute; top: 16px; left: 18px; color: #67e8f9;
    font: 700 9px 'JetBrains Mono'; letter-spacing: .15em; z-index: 3;
}

.command-map:after {
    content: ""; position: absolute; left: 52%; top: 48%;
    width: 190px; height: 190px; border: 1px solid rgba(34, 211, 238, .16);
    border-radius: 50%; transform: translate(-50%, -50%);
    box-shadow: 0 0 0 50px rgba(34, 211, 238, .025), 0 0 0 100px rgba(34, 211, 238, .018);
}

/* radar animado en el cuadro operacional */
.uc-radar-sweep {
    position: absolute; left: 52%; top: 48%; width: 290px; height: 290px;
    margin: -145px 0 0 -145px; border-radius: 50%; pointer-events: none; z-index: 2;
    background: conic-gradient(from 0deg, rgba(34, 211, 238, .28), transparent 18%);
    animation: ucSweep 5.5s linear infinite;
    mask-image: radial-gradient(circle, black 0 60%, transparent 61%);
    -webkit-mask-image: radial-gradient(circle, black 0 60%, transparent 61%);
}

@keyframes ucSweep { to { transform: rotate(360deg); } }

.command-node {
    position: absolute; z-index: 2; width: 10px; height: 10px;
    border: 2px solid #061017; border-radius: 50%;
    background: #34d399; box-shadow: 0 0 16px #34d399;
}
.command-node.pending { background: #fbbf24; box-shadow: 0 0 16px #fbbf24; animation: ucBlink 1.6s ease-in-out infinite; }
.command-node.offline { background: #475569; box-shadow: none; }
.command-node .uc-node-tag {
    position: absolute; left: 14px; top: -4px; white-space: nowrap;
    font: 700 8px 'JetBrains Mono'; letter-spacing: .1em; color: #67e8f9;
    background: rgba(3, 10, 16, .82); border: 1px solid var(--uc-line-cyan);
    padding: 2px 6px; border-radius: 5px; opacity: 0; transform: translateX(-4px);
    transition: .2s;
}
.command-node:hover .uc-node-tag { opacity: 1; transform: translateX(0); }

@keyframes ucBlink { 50% { opacity: .35; } }

.command-side { display: flex; flex-direction: column; gap: 12px; }

.command-panel {
    background: var(--uc-panel); border: 1px solid var(--uc-line);
    border-radius: 16px; padding: 16px;
}

/* ---------- grilla de módulos ---------- */
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; perspective: 1200px; }

.module-card {
    min-height: 158px; padding: 15px; border-radius: 15px;
    background: var(--uc-panel); border: 1px solid var(--uc-line);
    display: flex; flex-direction: column; position: relative; overflow: hidden;
    cursor: pointer; transform-style: preserve-3d;
    transition: transform .28s cubic-bezier(.22, .9, .3, 1.4), border-color .28s, box-shadow .28s;
}
.module-card::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), var(--uc-spot, rgba(34, 211, 238, .10)), transparent 55%);
    transition: opacity .3s;
}
.module-card:hover { transform: translateY(-4px) rotateX(2.5deg); border-color: var(--uc-acc-border, var(--uc-line-cyan)); box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 26px rgba(34, 211, 238, .08); }
.module-card:hover::before { opacity: 1; }
.module-card:active { transform: translateY(-1px) scale(.98); }

.module-icon {
    width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(34, 211, 238, .08); color: #67e8f9;
    border: 1px solid rgba(34, 211, 238, .14);
    transition: transform .25s, box-shadow .25s;
}
.module-card:hover .module-icon { transform: scale(1.08) rotate(-4deg); box-shadow: 0 0 18px rgba(34, 211, 238, .22); }

.module-state {
    font: 700 8px 'JetBrains Mono'; letter-spacing: .08em; text-transform: uppercase;
    padding: 4px 7px; border-radius: 6px; height: max-content;
}
.module-state.ready { color: #6ee7b7; background: rgba(52, 211, 153, .08); }
.module-state.planned { color: #fcd34d; background: rgba(251, 191, 36, .08); }
.module-state.demo { color: #67e8f9; background: rgba(34, 211, 238, .09); }
.module-state.offline { color: #94a3b8; background: rgba(100, 116, 139, .1); }
.module-state.alert { color: #fca5a5; background: rgba(239, 68, 68, .1); }

/* ---------- eventos / feed ---------- */
.event-line {
    display: grid; grid-template-columns: 8px 1fr auto; gap: 10px; align-items: start;
    padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .045);
}
.event-line:last-child { border: 0; }
.event-line.uc-new { animation: ucFeedIn .4s ease both; }
.event-dot { width: 7px; height: 7px; border-radius: 50%; background: #22d3ee; margin-top: 4px; }
.event-dot.warn { background: var(--uc-amber); }
.event-dot.ok { background: var(--uc-green); }
.event-dot.crit { background: var(--uc-red); }

@keyframes ucFeedIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- tabs ---------- */
.command-tabs { display: flex; gap: 7px; flex-wrap: wrap; }
.command-tab {
    padding: 7px 11px; border-radius: 8px; border: 1px solid var(--uc-line);
    font-size: 10px; font-weight: 700; color: #64748b; background: rgba(255, 255, 255, .02);
    cursor: pointer; transition: transform .18s, color .18s, border-color .18s, background .18s;
}
.command-tab:hover { transform: translateY(-1px); color: #94a3b8; }
.command-tab:active { transform: scale(.95); }
.command-tab.active { color: #cffafe; border-color: rgba(34, 211, 238, .26); background: rgba(34, 211, 238, .08); }

/* ============================================================
   NUEVOS COMPONENTES uc-* (rediseño SPA)
   ============================================================ */

/* entrada animada de vistas — solo fade, sin desplazamiento
   (los translate/blur causaban tarjetas "encimadas" durante la transición) */
.uc-enter { animation: ucEnter .3s ease both; }
.uc-enter-d1 { animation-delay: .05s; }
.uc-enter-d2 { animation-delay: .1s; }
.uc-enter-d3 { animation-delay: .15s; }
.uc-enter-d4 { animation-delay: .2s; }

@keyframes ucEnter {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* reveal on scroll — solo opacidad, nunca mueve el layout */
.uc-reveal { opacity: 0; transition: opacity .45s ease; }
.uc-reveal.uc-visible { opacity: 1; }

/* microinteracción clickeable */
.uc-click { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; cursor: pointer; }
.uc-click:hover { transform: translateY(-2px); }
.uc-click:active { transform: translateY(0) scale(.96); }

/* ---------- KPI ---------- */
.uc-kpi {
    padding: 14px; border-radius: 13px; position: relative; overflow: hidden;
    background: rgba(255, 255, 255, .025); border: 1px solid var(--uc-line);
    border-left: 3px solid var(--kacc, rgba(34, 211, 238, .35));
    transition: border-color .25s, transform .25s;
}
.uc-kpi:hover { border-color: var(--uc-line-cyan); transform: translateY(-2px); }
.uc-kpi b { font: 700 24px 'Space Grotesk'; color: #f8fafc; display: block; line-height: 1.05; }
.uc-kpi .uc-kpi-delta { font: 700 9px 'JetBrains Mono'; margin-top: 4px; display: inline-flex; gap: 4px; align-items: center; }
.uc-kpi .uc-kpi-delta.up { color: var(--uc-green); }
.uc-kpi .uc-kpi-delta.down { color: var(--uc-red); }
.uc-kpi canvas { position: absolute; right: 0; bottom: 0; opacity: .5; pointer-events: none; width: 46%; max-width: 130px; height: 34px; }

/* ---------- gauge de batería / señal ---------- */
.uc-gauge { height: 6px; border-radius: 9px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.uc-gauge>span {
    display: block; height: 100%; border-radius: inherit; width: 0;
    background: linear-gradient(90deg, var(--uc-blue), var(--uc-cyan));
    transition: width 1s cubic-bezier(.2, .8, .3, 1);
    box-shadow: 0 0 10px rgba(34, 211, 238, .35);
}
.uc-gauge>span.warn { background: linear-gradient(90deg, #d97706, var(--uc-amber)); box-shadow: 0 0 10px rgba(251, 191, 36, .3); }
.uc-gauge>span.crit { background: linear-gradient(90deg, #b91c1c, var(--uc-red)); box-shadow: 0 0 10px rgba(239, 68, 68, .3); }
.uc-gauge>span.ok { background: linear-gradient(90deg, #059669, var(--uc-green)); box-shadow: 0 0 10px rgba(52, 211, 153, .3); }

/* ---------- tarjeta de aeronave ---------- */
.uc-aircraft {
    border-radius: 15px; padding: 15px; background: var(--uc-panel);
    border: 1px solid var(--uc-line); position: relative; overflow: hidden;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.uc-aircraft:hover { transform: translateY(-3px); border-color: var(--uc-line-cyan); box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.uc-aircraft .uc-aircraft-glow {
    position: absolute; right: -30px; top: -30px; width: 120px; height: 120px;
    border-radius: 50%; background: radial-gradient(circle, rgba(34, 211, 238, .12), transparent 65%);
    pointer-events: none;
}
.uc-aircraft-badge {
    font: 700 8px 'JetBrains Mono'; letter-spacing: .1em; padding: 3px 8px;
    border-radius: 6px; text-transform: uppercase;
}
.uc-aircraft-badge.fly { color: #6ee7b7; background: rgba(52, 211, 153, .1); animation: ucBlink 2s ease-in-out infinite; }
.uc-aircraft-badge.base { color: #94a3b8; background: rgba(148, 163, 184, .1); }
.uc-aircraft-badge.mant { color: #fcd34d; background: rgba(251, 191, 36, .1); }

/* ---------- muro de video ---------- */
.uc-videowall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.uc-feed {
    aspect-ratio: 16/9; border-radius: 13px; overflow: hidden; position: relative;
    background: linear-gradient(135deg, #0b1622, #050a10);
    border: 1px solid rgba(255, 255, 255, .06);
    transition: border-color .25s, transform .25s;
}
.uc-feed:hover { border-color: var(--uc-line-cyan); transform: scale(1.012); }
.uc-feed canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.uc-feed .uc-feed-hud {
    position: absolute; inset: 0; padding: 10px; display: flex; flex-direction: column;
    justify-content: space-between; pointer-events: none; z-index: 2;
    font: 700 8px 'JetBrains Mono'; letter-spacing: .1em; color: #7dd3fc;
}
.uc-feed .uc-feed-scan {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .16) 2px 4px);
}
.uc-rec-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--uc-red); display: inline-block; margin-right: 5px; animation: ucBlink 1.2s infinite; }

/* ---------- barras de corredor / clase ---------- */
.uc-bar-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 10px; padding: 5px 0; }
.uc-bar { height: 7px; border-radius: 9px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.uc-bar>span {
    display: block; height: 100%; border-radius: inherit; width: 0;
    background: linear-gradient(90deg, var(--uc-blue), var(--uc-cyan));
    transition: width .9s cubic-bezier(.2, .8, .3, 1);
}

/* ---------- comparador temporal ---------- */
.uc-compare { position: relative; border-radius: 14px; overflow: hidden; min-height: 300px; border: 1px solid var(--uc-line-cyan); background: #081019; }
.uc-compare .uc-compare-a, .uc-compare .uc-compare-b { position: absolute; inset: 0; }
.uc-compare .uc-compare-b { clip-path: inset(0 0 0 var(--cut, 50%)); background: #0a1420; }
.uc-compare .uc-compare-handle {
    position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 2px;
    background: var(--uc-cyan); box-shadow: 0 0 14px rgba(34, 211, 238, .7); z-index: 3; pointer-events: none;
}
.uc-compare .uc-compare-handle::after {
    content: "◂ ▸"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: #06121b; border: 1px solid var(--uc-line-cyan); color: #67e8f9;
    font-size: 9px; padding: 5px 7px; border-radius: 999px; white-space: nowrap;
}
.uc-compare-tag {
    position: absolute; top: 10px; font: 700 8px 'JetBrains Mono'; letter-spacing: .12em;
    background: rgba(3, 10, 16, .85); border: 1px solid var(--uc-line); color: #94a3b8;
    padding: 4px 8px; border-radius: 6px; z-index: 4; pointer-events: none;
}
.uc-compare input[type=range] {
    position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 5; margin: 0;
}

/* bloques simulados de suelo para el comparador */
.uc-lots { display: grid; grid-template-columns: repeat(8, 1fr); grid-auto-rows: 1fr; gap: 3px; position: absolute; inset: 14px; }
.uc-lots i { border-radius: 3px; background: rgba(148, 163, 184, .10); border: 1px solid rgba(148, 163, 184, .07); }
.uc-lots i.built { background: rgba(59, 130, 246, .22); border-color: rgba(59, 130, 246, .3); }
.uc-lots i.new { background: rgba(251, 191, 36, .3); border-color: rgba(251, 191, 36, .45); box-shadow: 0 0 12px rgba(251, 191, 36, .25); }

/* ---------- cola de revisión (detecciones) ---------- */
.uc-review-item {
    display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center;
    padding: 10px 12px; border-radius: 12px; margin-bottom: 8px;
    background: rgba(255, 255, 255, .025); border: 1px solid var(--uc-line);
    transition: transform .3s, opacity .3s, border-color .2s;
}
.uc-review-item:hover { border-color: var(--uc-line-cyan); }
.uc-review-item.uc-out-ok { transform: translateX(60px); opacity: 0; }
.uc-review-item.uc-out-no { transform: translateX(-60px); opacity: 0; }
.uc-review-thumb {
    width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center;
    font-size: 14px; border: 1px solid var(--uc-line);
}
.uc-mini-btn {
    width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
    border: 1px solid var(--uc-line); background: rgba(255, 255, 255, .03);
    color: #94a3b8; cursor: pointer; font-size: 11px;
    transition: transform .15s, background .15s, color .15s;
}
.uc-mini-btn:hover { transform: translateY(-1px); }
.uc-mini-btn:active { transform: scale(.9); }
.uc-mini-btn.ok:hover { background: rgba(52, 211, 153, .15); color: #6ee7b7; }
.uc-mini-btn.no:hover { background: rgba(239, 68, 68, .15); color: #fca5a5; }

/* ---------- donut gauge ---------- */
.uc-donut-wrap { position: relative; width: 128px; height: 128px; margin: 0 auto; }
.uc-donut-wrap .uc-donut-center {
    position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}

/* ---------- timeline vertical ---------- */
.uc-timeline { position: relative; padding-left: 18px; }
.uc-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(rgba(34, 211, 238, .4), transparent); }
.uc-timeline-item { position: relative; padding: 7px 0; }
.uc-timeline-item::before {
    content: ""; position: absolute; left: -17px; top: 12px; width: 9px; height: 9px;
    border-radius: 50%; background: #0a141d; border: 2px solid var(--uc-cyan);
}
.uc-timeline-item.done::before { background: var(--uc-green); border-color: var(--uc-green); }
.uc-timeline-item.warn::before { border-color: var(--uc-amber); }

/* ---------- ticker de auditoría ---------- */
.uc-ticker { overflow: hidden; border-radius: 10px; border: 1px solid var(--uc-line); background: rgba(0, 0, 0, .3); }
.uc-ticker-track { display: flex; gap: 34px; white-space: nowrap; padding: 8px 0; width: max-content; animation: ucTicker 26s linear infinite; font: 600 9px 'JetBrains Mono'; color: #64748b; }
.uc-ticker:hover .uc-ticker-track { animation-play-state: paused; }

@keyframes ucTicker { to { transform: translateX(-50%); } }

/* ---------- hero 3D del dashboard ---------- */
#hero-3d {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .9;
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .35) 38%, black 72%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .35) 38%, black 72%);
}
#hero-3d canvas { width: 100% !important; height: 100% !important; display: block; }

/* ---------- overlay Recorrido 3D ---------- */
.uc3d-overlay {
    position: fixed; inset: 0; z-index: 5200; background: #01060b;
    display: none; flex-direction: column;
}
.uc3d-overlay.active { display: flex; animation: ucEnter .3s ease both; }
.uc3d-top {
    height: 56px; display: flex; align-items: center; justify-content: space-between;
    padding: 0 18px; border-bottom: 1px solid var(--uc-line);
    background: rgba(3, 9, 15, .96); z-index: 7; flex-shrink: 0;
}
.uc3d-stage { flex: 1; position: relative; overflow: hidden; }
.uc3d-stage canvas { display: block; }
.uc3d-hud {
    position: absolute; left: 16px; bottom: 16px; z-index: 5; max-width: 330px;
    background: rgba(4, 12, 19, .9); backdrop-filter: blur(14px);
    border: 1px solid var(--uc-line-cyan); border-radius: 15px; padding: 14px;
    animation: ucEnter .4s .15s ease both;
}
.uc3d-controls {
    position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 5;
    display: flex; gap: 8px; padding: 8px; border-radius: 14px;
    background: rgba(4, 12, 19, .88); border: 1px solid var(--uc-line); backdrop-filter: blur(12px);
}
.uc3d-btn {
    width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    background: rgba(255, 255, 255, .04); border: 1px solid var(--uc-line);
    color: #94a3b8; cursor: pointer; font-size: 13px;
    transition: transform .16s, background .16s, color .16s, border-color .16s;
}
.uc3d-btn:hover { transform: translateY(-2px); color: #cffafe; border-color: var(--uc-line-cyan); background: rgba(34, 211, 238, .1); }
.uc3d-btn:active { transform: scale(.92); }
.uc3d-btn.primary { background: linear-gradient(135deg, #0891b2, #2563eb); color: white; border-color: transparent; }
.uc3d-loader {
    position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px;
    align-items: center; justify-content: center; z-index: 6; background: rgba(1, 6, 11, .92);
    transition: opacity .4s;
}
.uc3d-loader.hidden { opacity: 0; pointer-events: none; }
.uc3d-radar {
    width: 74px; height: 74px; border-radius: 50%; position: relative;
    border: 1px solid var(--uc-line-cyan);
    background: radial-gradient(circle, transparent 55%, rgba(34, 211, 238, .05) 56%);
}
.uc3d-radar::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(34, 211, 238, .5), transparent 25%);
    animation: ucSweep 1.6s linear infinite;
}

/* ---------- chips / misc ---------- */
.uc-chip-live {
    font: 700 8px 'JetBrains Mono'; letter-spacing: .12em; color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, .25); background: rgba(52, 211, 153, .07);
    padding: 4px 8px; border-radius: 6px;
}
.uc-chip-demo {
    font: 700 8px 'JetBrains Mono'; letter-spacing: .12em; color: #67e8f9;
    border: 1px solid var(--uc-line-cyan); background: rgba(34, 211, 238, .06);
    padding: 4px 8px; border-radius: 6px;
}

.uc-scroll { overflow-y: auto; scroll-behavior: smooth; }
.uc-scroll::-webkit-scrollbar { width: 4px; }
.uc-scroll::-webkit-scrollbar-thumb { background: rgba(34, 211, 238, .18); border-radius: 4px; }

/* ---------- contención anti-superposición ---------- */
/* Todo hijo de grilla puede encogerse: evita que tablas, canvas o textos
   largos empujen el layout fuera del viewport y se pisen los paneles. */
#view-command { max-width: 100%; overflow-x: clip; }
#view-command .grid>*, .command-shell>*, .spa-layout>*,
.kpi-grid>*, .module-grid>*, .uc-videowall>*, .uc-bar-row>* { min-width: 0; }
.spa-content { min-width: 0; max-width: 100%; overflow-x: clip; }

/* Plantillas de grilla a prueba de desborde: minmax(0,1fr) impide que
   cualquier celda crezca más allá de su columna y se pise con la vecina */
#view-command .spa-layout { grid-template-columns: 232px minmax(0, 1fr); }
#view-command .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
#view-command .uc-videowall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#view-command .grid.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
#view-command .spa-card>*, #view-command .uc-aircraft>* { max-width: 100%; }
#module-body>*+* { margin-top: 18px; }
#module-body canvas { max-width: 100%; }

/* Grillas propias (sin depender del JIT de Tailwind en HTML inyectado) */
.uc-cols-a { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); }
.uc-cols-b { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, .68fr); }
.uc-grid2 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 1024px) {
    #view-command .spa-layout { grid-template-columns: minmax(0, 1fr); }
    #view-command .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .uc-cols-a, .uc-cols-b, .uc-grid2 { grid-template-columns: minmax(0, 1fr); }
}
.spa-card, .command-panel, .uc-aircraft, .uc-kpi { overflow: hidden; }
.spa-table { width: 100%; }
.spa-table td, .spa-table th { word-break: break-word; }
#module-body { transition: opacity .16s ease; }

/* La marca de agua del hero nunca por encima del texto */
.spa-hero { isolation: isolate; }
.spa-hero>* { position: relative; z-index: 1; }
.spa-hero .municipal-watermark { z-index: 0 !important; }

/* Acento por módulo en el menú lateral */
.spa-sidebar .spa-menu { transition: color .18s, background .18s, transform .15s; }
.spa-sidebar .spa-menu:hover { color: #cbd5e1; transform: translateX(2px); }
.spa-sidebar .spa-menu.active {
    color: var(--uc-acc, #cffafe);
    background: rgba(255, 255, 255, .05);
    box-shadow: inset 2px 0 0 var(--uc-acc, #22d3ee);
}
.spa-sidebar .spa-menu.active i { color: var(--uc-acc, #22d3ee); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .module-grid { grid-template-columns: repeat(2, 1fr); }
    .command-shell { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .uc-videowall { grid-template-columns: 1fr; }
    .uc3d-hud { left: 10px; right: 10px; max-width: none; bottom: 76px; }
    #hero-3d { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .uc-enter, .uc-reveal, .uc-radar-sweep, .uc-ticker-track,
    .module-card, .uc-gauge>span, .uc-bar>span {
        animation: none !important; transition: none !important;
    }
    .uc-reveal { opacity: 1; transform: none; }
}
