/* Panel interno de monitoreo: usa app.css del portal (mismo tema) y agrega solo lo propio. */
body.ops { padding-bottom: 40px; }
.ops .tabs a span { white-space: nowrap; }

/* Hero */
.hero__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip--ok { background: rgba(34,197,94,.16); color: var(--live); font-weight: 700; }
.chip--bad { background: rgba(239,107,94,.16); color: var(--bad); font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.stat { display: grid; gap: 1px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.stat small { font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.stat b { font: 700 1.6rem/1.15 var(--f-body); }
.stat span { font-size: .74rem; color: var(--sub); }
.stat--alert { background: linear-gradient(135deg, rgba(240,168,69,.18), var(--surface-2) 70%); }
.stat--alert b { color: var(--warn); }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 860px) { .ops .hero__in { display: block; } }
.ops-theme { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-3); }
.gate__card .ops-theme { position: absolute; top: 14px; right: 14px; }
.prefs [data-logout] { width: 34px; display: grid; place-items: center; font-size: 1.05rem; color: var(--sub); }

/* Formularios */
.field { display: grid; gap: 6px; text-align: left; width: 100%; }
.field span { font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.field input {
  width: 100%; min-height: 48px; padding: 0 14px; border: 0; border-radius: 14px; font: 400 16px var(--f-body); color: var(--ink);
  background: var(--surface-2); box-shadow: none; outline: none; transition: background .2s;
}
.field input:focus { background: var(--surface-3); }
.field input::placeholder { color: var(--mute); }
.field--center span { text-align: center; }
.gate .field { margin: 6px 0 14px; }
.ts { min-height: 66px; display: grid; place-items: center; margin-bottom: 4px; }
.card-form { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh); }
.card-form .btn { justify-self: start; }
@media (min-width: 640px) { .card-form { grid-template-columns: 1fr 1fr auto; align-items: end; } .card-form--opt { grid-template-columns: 1fr 1fr; } .field--wide { grid-column: 1 / -1; } }
.card-form--opt { margin-top: 12px; padding: 0; background: none; box-shadow: none; }

/* Opciones encontradas */
.opt { margin-top: 10px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh); }
.opt__route { font-size: 1rem; }
.opt__route b { font-family: var(--f-board); color: var(--gold-deep); margin-right: 6px; }
.opt__time { font-size: .84rem; color: var(--sub); margin-top: 2px; }

/* Detalle de vuelo */
.ops-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 10px; }
.ops-facts div { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.ops-facts dt { font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.ops-facts dd { margin: 0; font-weight: 700; color: var(--ink); }
.ops-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 4px; }
.ops-src { font-size: .72rem; color: var(--mute); margin-left: 4px; }
.chipbtn--bad { background: rgba(239,107,94,.16) !important; color: var(--bad) !important; }
.chipbtn--bad svg { color: var(--bad) !important; }
.chipbtn:disabled { opacity: .5; }
.tl-mini { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 1px; border-radius: 12px; overflow: hidden; }
.tl-mini li { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 8px 10px; background: var(--surface-2); font-size: .78rem; color: var(--sub); }
.tl-mini time { color: var(--ink); font-weight: 700; }
.checks .na { padding: 6px 2px; }

/* Alertas */
.fchips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fchip { padding: .45rem .95rem; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface); color: var(--sub); }
.fchip.is-on { background: var(--ink); color: var(--bg); }
.acard { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; margin-bottom: 8px; border-radius: 18px; background: var(--surface); }
.acard--alta { background: linear-gradient(100deg, rgba(239,107,94,.14), var(--surface) 60%); }
.acard--media { background: linear-gradient(100deg, rgba(240,168,69,.12), var(--surface) 60%); }
.acard .pill { flex: none; margin-top: 2px; }
.acard b { font-size: .92rem; }
.acard p { font-size: .9rem; color: var(--ink); margin: 2px 0 4px; }
.acard small { font-size: .74rem; color: var(--mute); }

/* Historial */
.runs { display: grid; gap: 6px; }
.run { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 10px 14px; border-radius: 14px; background: var(--surface); font-size: .82rem; color: var(--sub); }
.run time { font-weight: 700; color: var(--ink); min-width: 104px; }
.run b { color: var(--ink); }
.run__t { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.run__ms { margin-left: auto; color: var(--mute); }
.run--err { background: linear-gradient(100deg, rgba(239,107,94,.14), var(--surface) 60%); }
.run__e { flex-basis: 100%; color: var(--bad); font-size: .78rem; }

.empty-box { padding: 18px; border-radius: var(--r-lg); background: var(--surface); color: var(--sub); text-align: center; }
.empty-box a { color: var(--gold-deep); text-decoration: underline; }

/* Avisos flotantes */
.toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; font-size: .88rem; font-weight: 700; color: var(--ink);
  background: rgba(58, 61, 69, .8); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 14px 30px -12px rgba(0,0,0,.6); animation: fade .3s var(--ease); transition: opacity .4s;
}
.toast--ok { background: linear-gradient(100deg, rgba(34,197,94,.35), rgba(58,61,69,.85) 70%); }
.toast--bad { background: linear-gradient(100deg, rgba(239,107,94,.4), rgba(58,61,69,.85) 70%); }
[data-theme="light"] .toast--ok { background: linear-gradient(100deg, #dcfce7, #fff 70%); }
[data-theme="light"] .toast--bad { background: linear-gradient(100deg, #fdecea, #fff 70%); }
.toast.is-out { opacity: 0; }
[data-theme="light"] .toast { background: rgba(255,255,255,.9); }

/* Salir, siempre visible en la barra */
.top__out { display: flex; align-items: center; gap: .35rem; height: 40px; padding: 0 .8rem; margin-left: 2px; border-radius: 999px; flex: none;
  font-size: .78rem; font-weight: 700; color: var(--bad); background: rgba(239,107,94,.12); }
.top__out svg { font-size: 1.05rem; }
@media (max-width: 440px) { .top__out { width: 40px; padding: 0; justify-content: center; } .top__out span { display: none; } .ops .tabs a { padding: 0 .45rem; } }

/* Correo de alertas */
.mailbox { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.mailbox__ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--gold-deep); font-size: 1.1rem; flex: none; }
.mailbox__txt { display: grid; min-width: 0; flex: 1 1 200px; }
.mailbox__txt small { font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.mailbox__txt b { font-size: .95rem; overflow-wrap: anywhere; }
.mailbox__txt span { font-size: .76rem; color: var(--sub); }
.mailbox .btn { flex: none; }
@media (max-width: 440px) { .mailbox .btn { width: 100%; } }
.mailbox .btn--line { background: var(--surface-3); }
[data-theme="light"] .mailbox .btn--line { background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.1); }

/* ════════ Vuelos: tarjetas legibles (sin brillos) ════════ */
.fcards { display: grid; gap: 12px; }
@media (min-width: 980px) { .fcards { grid-template-columns: 1fr 1fr; align-items: start; } }
.fcard { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh); overflow: hidden; }
.fcard__main { display: grid; gap: 12px; width: 100%; padding: 16px 16px 10px; text-align: left; }
.fcard__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fcard__no { font: 700 1.25rem var(--f-body); letter-spacing: .02em; }
.fcard__al { font-size: .82rem; color: var(--sub); }
.spill { margin-left: auto; padding: .3rem .75rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.spill--ok { background: rgba(34,197,94,.14); color: #3fbf73; }
.spill--live { background: rgba(201,168,91,.18); color: var(--gold-deep); }
.spill--go { background: rgba(96,165,250,.15); color: #7bb3ea; }
.spill--warn { background: rgba(240,168,69,.16); color: #e3a250; }
.spill--bad { background: rgba(239,107,94,.16); color: #ee8478; }
.spill--done, .spill--muted { background: var(--surface-3); color: var(--sub); }
[data-theme="light"] .spill--ok { color: #15803d; } [data-theme="light"] .spill--go { color: #1d6fa5; }
[data-theme="light"] .spill--warn { color: #b45309; } [data-theme="light"] .spill--bad { color: #b42318; }
.fcard__route { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 1.1fr) minmax(0, 1fr); align-items: center; gap: 10px; }
.fcard__end { display: grid; gap: 1px; min-width: 0; }
.fcard__end--to { text-align: right; }
.fcard__end small { font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }
.fcard__end b { font: 700 1.5rem/1.15 var(--f-body); font-variant-numeric: tabular-nums; }
.fcard__end b s { font-size: .62em; font-weight: 400; color: var(--mute); margin-right: 2px; }
.fcard__end span { font-size: .82rem; color: var(--sub); line-height: 1.3; }
.fcard__end em { font-style: normal; font-weight: 700; color: var(--ink); font-size: .74rem; letter-spacing: .04em; }
.fcard__path { position: relative; height: 26px; }
.fcard__line { position: absolute; left: 0; right: 0; top: 50%; height: 2px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 11px); }
.fcard__line i { display: block; height: 100%; border-radius: 2px; background: var(--gold); }
.fcard__plane { position: absolute; top: 50%; transform: translate(-50%, -50%) rotate(90deg); font-size: 1.15rem; color: var(--gold-deep); }
.fcard__wx { display: flex; flex-wrap: wrap; gap: 6px; }
.wxc { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 12px; background: var(--surface-2); font-size: .78rem; color: var(--sub); }
.wxc svg { font-size: 1.1rem; }
.wxc b { color: var(--ink); font-size: .92rem; }
.wxc--na { color: var(--mute); }
.fcard__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip2 { padding: .3rem .65rem; border-radius: 10px; background: var(--surface-2); font-size: .76rem; color: var(--sub); }
.fchip2 b { color: var(--ink); }
.fcard__who { padding-top: 10px; border-top: 1px solid var(--line-2); }
.fcard__pax { display: flex; align-items: center; gap: .6rem; }
.fcard__pax > svg { font-size: 1.15rem; color: var(--gold-deep); flex: none; }
.fcard__pax span { display: grid; min-width: 0; }
.fcard__pax b { font-size: .9rem; font-weight: 700; overflow-wrap: anywhere; }
.fcard__pax small { font-size: .74rem; color: var(--mute); }
.fcard__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 16px 12px; font-size: .74rem; color: var(--sub); }
.fcard__meta > span { display: flex; align-items: center; gap: .45rem; }
.fcard__det { padding: 4px 16px 16px; }
.fcard .brow__more { background: var(--surface-2); color: var(--ink); }
.wx--sun, .wx--sun * { color: #e9b52f; fill: #e9b52f; }
.wx--moon { fill: #cfc7a6; } .wx--cloud { fill: #aab1ba; color: #aab1ba; }
[data-theme="light"] .wx--cloud { fill: #9aa1ab; color: #9aa1ab; }

/* ════════ Radar 3D ════════ */
.radar { margin-bottom: 16px; padding: 14px 14px 12px; border-radius: var(--r-lg); background: radial-gradient(120% 90% at 50% 0%, #2d3138, #22252a 70%); box-shadow: var(--sh); overflow: hidden; color: #eef0f2; }
[data-theme="light"] .radar { background: radial-gradient(120% 90% at 50% 0%, #ffffff, #eef1f4 70%); color: var(--ink); }
.radar__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.radar__head small { display: block; font-size: .6rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-deep); }
.radar__head b { font-size: 1.05rem; }
.radar__head > span { font-size: .76rem; opacity: .7; }
.radar__stage { perspective: 1100px; perspective-origin: 50% 20%; margin: 4px -8px 0; height: clamp(210px, 52vw, 380px); display: grid; place-items: center; overflow: hidden; }
.radar__tilt { width: 100%; max-width: 700px; transform: rotateX(40deg) rotateZ(-5deg); transform-style: preserve-3d; transform-origin: 50% 50%; }
.radar__svg { width: 100%; height: auto; display: block; overflow: visible; }
.rg { stroke: currentColor; stroke-opacity: .08; stroke-width: 1; }
.rt { fill: none; stroke: currentColor; stroke-opacity: .3; stroke-width: 3; stroke-dasharray: 10 10; }
.rf { fill: none; stroke-width: 5; stroke-linecap: round; stroke: var(--gold); }
.rf--bad { stroke: #ee8478; } .rf--warn { stroke: #e3a250; } .rf--done { stroke-opacity: .5; }
.ra__dot { fill: var(--gold); stroke: rgba(0,0,0,.25); stroke-width: 2; }
.ra__pulse { fill: var(--gold); opacity: .4; }
.ra__lb { fill: currentColor; font: 700 28px var(--f-body); text-anchor: middle; letter-spacing: .06em; }
.ra__city { fill: currentColor; fill-opacity: .65; font: 400 22px var(--f-body); text-anchor: middle; }
.rp__sh { fill: #000; opacity: .28; }
.rp__ic { fill: #f4f4f2; stroke: rgba(0,0,0,.35); stroke-width: .8; transform-box: fill-box; }
[data-theme="light"] .rp__ic { fill: #1d2025; stroke: none; }
.rp__halo { fill: var(--gold); opacity: 0; }
.rp--air .rp__ic { fill: var(--gold-deep); }
.rp--cancel .rp__ic { fill: #ee8478; }
.rp--done { opacity: .55; }
.rp__lb { fill: currentColor; font: 700 24px var(--f-body); text-anchor: middle; }
.radar__legend { position: relative; z-index: 2; display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; scrollbar-width: none; }
.radar__legend::-webkit-scrollbar { display: none; }
.rleg { flex: none; display: flex; align-items: center; gap: .45rem; padding: .4rem .75rem; border-radius: 12px; background: rgba(255,255,255,.07); color: inherit; font-size: .76rem; }
[data-theme="light"] .rleg { background: rgba(0,0,0,.05); }
.rleg span { opacity: .75; }
.rleg__dot { width: 8px; height: 8px; border-radius: 50%; background: #aab1ba; }
.rleg__dot--ok { background: #3fbf73; } .rleg__dot--go, .rleg__dot--live { background: var(--gold); }
.rleg__dot--warn { background: #e3a250; } .rleg__dot--bad { background: #ee8478; }
@media (prefers-reduced-motion: reduce) { .radar__tilt { transform: rotateX(45deg) rotateZ(-6deg); } }

/* ════════ Tablero de vuelos (filas legibles, sin brillos) ════════ */
.bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 12px; }
.sel { display: grid; gap: 5px; min-width: 0; flex: 1 1 160px; }
.sel > span { font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.sel select { appearance: none; -webkit-appearance: none; width: 100%; height: 44px; padding: 0 36px 0 14px; border: 0; border-radius: 14px; font: 600 15px var(--f-body); color: var(--ink);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23c9a85b' d='M7.4 8.6 12 13.2l4.6-4.6L18 10l-6 6-6-6z'/%3E%3C/svg%3E") no-repeat right 10px center / 20px; box-shadow: var(--sh); outline: none; }
.seg { display: flex; height: 44px; padding: 4px; border-radius: 14px; background: var(--surface); box-shadow: var(--sh); }
.seg button { flex: 1; padding: 0 14px; border-radius: 10px; font-size: .84rem; font-weight: 700; color: var(--sub); white-space: nowrap; }
.seg button.is-on { background: var(--gold); color: #1b1a17; }
.bar__done { height: 44px; flex: none; }
@media (max-width: 560px) { .sel { flex-basis: calc(50% - 5px); } .sel:nth-child(3) { flex-basis: 100%; } .bar__done { width: 100%; } }

.fboard { display: grid; gap: 6px; }
.fboard__head { display: none; }
.fboard__day { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 4px 4px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-deep); }
.fboard__day:first-of-type { padding-top: 2px; }
.fboard__day span { font-size: .66rem; color: var(--mute); letter-spacing: .12em; }
.brw { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; border-radius: 16px; background: var(--surface); box-shadow: var(--sh); }
.brw--old { opacity: .62; }
.brw::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--surface-3); }
.brw--ok::before { background: #3fbf73; } .brw--go::before, .brw--live::before { background: var(--gold); }
.brw--warn::before { background: #e3a250; } .brw--bad::before { background: #ee8478; }
.brw__main { display: grid; gap: 8px 12px; padding: 12px 6px 12px 16px; cursor: pointer; min-width: 0; outline: none;
  grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "t no st" "rt rt rt" "arr wx wx" "pax pax pax"; align-items: center; }
.brw__main:focus-visible { box-shadow: 0 0 0 2px var(--gold) inset; border-radius: 16px; }
.brw__t { grid-area: t; display: grid; line-height: 1.1; }
.brw__t b { font: 700 1.45rem/1.1 var(--f-body); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.brw__t b s { display: block; font-size: .58em; font-weight: 400; color: var(--mute); }
.brw__t b sup { font-size: .5em; color: var(--gold-deep); margin-left: 2px; }
.brw__t small { font-size: .72rem; color: var(--mute); }
.brw__t--arr { grid-area: arr; grid-template-columns: auto auto; align-items: baseline; justify-content: start; gap: 0 8px; }
.brw__t--arr b { font-size: 1.05rem; } .brw__t--arr b s { display: inline; margin-right: 4px; }
.brw__t--arr small:last-child { grid-column: 1 / -1; }
.brw__lbl { font-size: .58rem !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.brw__t--arr small:last-child { display: none; }
.brw__no { grid-area: no; display: grid; min-width: 0; }
.brw__no b { font-size: 1.02rem; letter-spacing: .02em; white-space: nowrap; }
.brw__no small { font-size: .74rem; color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brw__rt { grid-area: rt; display: grid; gap: 2px; min-width: 0; font-size: .86rem; color: var(--sub); }
.brw__rt span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brw__rt span:last-child { color: var(--ink); }
.brw__rt em { font-style: normal; font-weight: 700; color: var(--ink); margin-right: 5px; letter-spacing: .04em; }
.brw__rt i { display: none; }
.brw__rt span:last-child::before { content: '→'; color: var(--gold-deep); margin-right: 6px; }
.brw__st { grid-area: st; display: grid; justify-items: end; gap: 2px; }
.brw__st .spill { margin: 0; }
.brw__st small { font-size: .68rem; color: var(--mute); white-space: nowrap; }
.brw__wx { grid-area: wx; justify-self: end; }
.wxm { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border-radius: 10px; background: var(--surface-2); font-size: .74rem; color: var(--sub); white-space: nowrap; }
.wxm svg { font-size: 1.05rem; flex: none; } .wxm b { color: var(--ink); font-size: .88rem; }
.wxm--na { color: var(--mute); }
.brw__pax { grid-area: pax; display: flex; align-items: center; gap: .55rem; min-width: 0; padding-top: 8px; border-top: 1px solid var(--line-2); }
.brw__pax > svg { flex: none; color: var(--gold-deep); font-size: 1.05rem; }
.brw__pax span { display: grid; min-width: 0; }
.brw__pax b { font-size: .84rem; overflow-wrap: anywhere; }
.brw__pax small { font-size: .72rem; color: var(--mute); }
.brw__ref { align-self: start; width: 40px; height: 40px; margin: 10px 10px 0 0; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold-deep); font-size: 1.15rem; }
.brw__ref:hover { background: var(--surface-3); }
.brw__ref.is-busy svg { animation: spin 1s linear infinite; }
.chipbtn.is-busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brw__det { grid-column: 1 / -1; padding: 4px 16px 16px; }
.brw.is-open { box-shadow: var(--sh), 0 0 0 1px var(--line) inset; }
.det__meta { display: flex; align-items: center; gap: .45rem; margin: 0 0 10px; font-size: .78rem; color: var(--sub); }
.brw__det .fcard__wx, .brw__det .fcard__chips { margin-bottom: 10px; }

@media (min-width: 1000px) {
  .fboard { gap: 4px; }
  .fboard__head, .brw__main { grid-template-columns: 74px 128px minmax(220px, 1.7fr) 84px 150px 120px minmax(150px, 1fr); grid-template-areas: "t no rt arr st wx pax"; }
  .fboard__head { display: grid; gap: 12px; padding: 0 58px 2px 16px; font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
  .brw__main { padding: 10px 6px 10px 16px; }
  .brw__t b { font-size: 1.3rem; }
  .brw__t--arr { grid-template-columns: 1fr; } .brw__lbl { display: none; } .brw__t--arr b { font-size: 1.3rem; } .brw__t--arr b s { display: block; }
  .brw__t--arr small:last-child { display: block; }
  .brw__rt { gap: 0; font-size: .82rem; }
  .brw__st { justify-items: start; }
  .brw__wx { justify-self: start; }
  .brw__pax { padding-top: 0; border-top: 0; }
  .brw__pax b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .brw__ref { align-self: center; margin: 0 10px 0 0; }
}

/* ════════ Destinos ════════ */
.dsum { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dsum span { padding: .5rem .9rem; border-radius: 12px; background: var(--surface); font-size: .82rem; color: var(--sub); }
.dsum b { color: var(--ink); font-size: 1rem; margin-right: 2px; }
.dsum .tone-warn b { color: var(--warn); }
.dests { display: grid; gap: 14px; }
@media (min-width: 980px) { .dests { grid-template-columns: 1fr 1fr; align-items: start; } }
.dcard { padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh); display: grid; gap: 14px; }
.dcard__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.dcard__h small { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); }
.dcard__h h3 { margin: 2px 0; font-size: 1.5rem; }
.dcard__h > div > span { font-size: .8rem; color: var(--sub); }
.dwho { display: flex; align-items: center; gap: .6rem; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.dwho > svg { flex: none; color: var(--gold-deep); font-size: 1.1rem; }
.dwho span { display: grid; min-width: 0; } .dwho b { font-size: .86rem; } .dwho small { font-size: .74rem; color: var(--mute); }
.dsec h4 { margin: 0 0 8px; font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); }
.dsec h4 small { font-size: .9em; letter-spacing: .06em; text-transform: none; font-weight: 400; margin-left: 4px; }
.dwx { display: grid; gap: 10px; }
.dwx__now { display: flex; align-items: center; gap: .6rem; }
.dwx__now svg { font-size: 2.1rem; } .dwx__now b { font-size: 1.8rem; }
.dwx__now span { display: grid; font-size: .9rem; } .dwx__now small { font-size: .74rem; color: var(--mute); }
.dwx__days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.dday { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: var(--surface-2); font-size: .74rem; color: var(--sub); text-align: center; }
.dday small { font-size: .66rem; text-transform: capitalize; } .dday svg { font-size: 1.4rem; } .dday b { color: var(--ink); font-size: .92rem; }
.dday em { font-style: normal; font-size: .64rem; color: #5aa0d6; }
.dday.is-stay { background: var(--gold-soft); } .dday.is-stay small { color: var(--gold-deep); font-weight: 700; }
.dday.is-bad { background: rgba(240,168,69,.16); }
.dnote, .dsrc { margin: 6px 0 0; font-size: .7rem; color: var(--mute); }
.dsrc { margin: 0; }
.dok { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: .86rem; color: var(--sub); }
.dok svg { color: var(--live); font-size: 1.1rem; flex: none; }
.dw { display: flex; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px; background: var(--surface-2); }
.dw--yellow { background: rgba(233,181,47,.13); } .dw--orange { background: rgba(240,140,50,.16); } .dw--red { background: rgba(239,90,80,.18); }
.dw__dot { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: #e9b52f; }
.dw--orange .dw__dot { background: #f08c32; } .dw--red .dw__dot { background: #ef5a50; }
.dw div { display: grid; gap: 1px; min-width: 0; } .dw b { font-size: .88rem; } .dw span { font-size: .8rem; color: var(--sub); }
.dw small { font-size: .72rem; color: var(--mute); } .dw p { margin: 4px 0 0; font-size: .8rem; color: var(--sub); }
.dmore summary { cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--sub); padding: 6px 0; }
.dhol { display: flex; gap: 10px; padding: 8px 12px; margin-bottom: 4px; border-radius: 12px; background: var(--surface-2); font-size: .84rem; }
.dhol b { min-width: 64px; text-transform: capitalize; color: var(--gold-deep); } .dhol small { color: var(--mute); }
.dhol em { font-style: normal; font-size: .66rem; padding: 1px 6px; border-radius: 6px; background: var(--surface-3); color: var(--sub); margin-left: 4px; }
.dnews { display: grid; gap: 6px; }
.dn { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink); text-decoration: none; }
.dn:hover { background: var(--surface-3); }
.dn--alta { background: rgba(239,107,94,.12); } .dn--media { background: rgba(240,168,69,.11); }
.dn b { font-size: .86rem; font-weight: 600; line-height: 1.35; } .dn small { font-size: .72rem; color: var(--mute); }
.dn__tags { display: flex; flex-wrap: wrap; gap: 4px; }
.dtag { font-style: normal; font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: var(--surface-3); color: var(--sub); }
.dtag--huelga { background: rgba(239,107,94,.2); color: #ee8478; } .dtag--transporte { background: rgba(96,165,250,.18); color: #7bb3ea; }
.dtag--clima { background: rgba(233,181,47,.18); color: #d9a929; } .dtag--seguridad { background: rgba(239,107,94,.2); color: #ee8478; }
[data-theme="light"] .dtag--huelga, [data-theme="light"] .dtag--seguridad { color: #b42318; } [data-theme="light"] .dtag--transporte { color: #1d6fa5; } [data-theme="light"] .dtag--clima { color: #8a6500; }

/* Barra con 5 pestañas en móvil */
@media (max-width: 520px) { .ops .tabs a span { font-size: .62rem; } .ops .tabs a { padding: 0 .35rem; } }

/* ════════════════ v5 · Monitor de operaciones ════════════════ */
/* Fondo general un poco más gris claro (modo oscuro) */
:root:not([data-theme="light"]) { --bg: #33363c; --bg-2: #383b41; --surface: #3d4047; --surface-2: #464a52; --surface-3: #50545d; --line-2: rgba(255,255,255,.09); }
:root:not([data-theme="light"]) body.ops { background: radial-gradient(120% 60% at 50% 0%, #41444b 0%, var(--bg) 60%) fixed, var(--bg); }
:root:not([data-theme="light"]) .ops .hero__in { background: linear-gradient(180deg, #43464d, #3d4047); }
[data-theme="light"] body.ops { background: #e6e9ed; }

/* Sin anillos de color en cajas: pestaña activa con fondo + indicador */
.ops .tabs a.is-on { box-shadow: none !important; position: relative; }
.ops .tabs a.is-on::after { content: ''; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--gold); }
@media (max-width: 440px) { .ops .tabs a.is-on::after { bottom: 2px; } }

/* Indicador (punto) usado en todo el panel */
.ind { display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #8a8f97; vertical-align: middle; }
.ind--ok, .ind--live { background: #3fbf73; } .ind--go { background: var(--gold); } .ind--warn { background: #e3a250; }
.ind--bad { background: #ee8478; } .ind--done, .ind--muted { background: #8a8f97; }
.ind--pulse { box-shadow: 0 0 0 0 currentColor; animation: indp 2s infinite; }
.ind--bad.ind--pulse { color: rgba(238,132,120,.5); } .ind--warn.ind--pulse { color: rgba(227,162,80,.5); } .ind--ok.ind--pulse { color: rgba(63,191,115,.45); }
@keyframes indp { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Barra superior: configuración */
.top__set { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 999px; color: var(--sub); font-size: 1.15rem; background: rgba(255,255,255,.06); }
[data-theme="light"] .top__set { background: rgba(0,0,0,.05); }
.top__set:hover { color: var(--gold-deep); }

/* ── Dashboard gráfico: cambia de color según las alertas ── */
.ops .hero__in { transition: background .6s; }
.hero[data-alert="alta"] .hero__in { background: linear-gradient(160deg, rgba(238,132,120,.30), rgba(238,132,120,.06) 45%, var(--surface) 80%) !important; }
.hero[data-alert="media"] .hero__in { background: linear-gradient(160deg, rgba(227,162,80,.26), rgba(227,162,80,.05) 45%, var(--surface) 80%) !important; }
.hero[data-alert="ok"] .hero__in { background: linear-gradient(160deg, rgba(63,191,115,.14), var(--surface) 55%) !important; }
.dstate { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.06); }
[data-theme="light"] .dstate { background: rgba(255,255,255,.75); }
.dstate { flex-wrap: wrap; }
.dstate > div { display: grid; flex: 1 1 220px; min-width: 0; }
.dstate b { font-size: .98rem; } .dstate small { font-size: .74rem; color: var(--sub); }
.dstate .ind { width: 12px; height: 12px; }
.dstate__ack { flex: none; background: var(--surface-3); color: var(--ink); }
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.dcell { display: grid; align-content: start; gap: 6px; padding: 12px; border-radius: 16px; background: var(--surface-2); min-width: 0; }
.dcell h3 { margin: 0; font-size: .6rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.dcell h3 small { letter-spacing: .04em; text-transform: none; font-weight: 400; margin-left: 4px; }
.dcell--wide { grid-column: 1 / -1; }
@media (min-width: 860px) { .dash { grid-template-columns: 1fr 1fr 1.6fr 1.6fr; } .dcell--wide { grid-column: auto; } }
.donut { position: relative; width: 112px; height: 112px; margin: 2px auto; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dn-track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 12; }
[data-theme="light"] .dn-track { stroke: rgba(0,0,0,.07); }
.dn-seg { fill: none; stroke-width: 12; stroke-linecap: butt; }
.donut__c { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.donut__c b { font-size: 1.35rem; } .donut__c small { font-size: .62rem; color: var(--sub); }
.dcell__foot { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .72rem; color: var(--sub); justify-content: center; text-align: center; }
.dlegend { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: .72rem; color: var(--sub); }
.dlegend li { display: flex; align-items: center; gap: .4rem; }
.dlegend li i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.dlegend li b { margin-left: auto; color: var(--ink); }
.dlegend--row { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.bars { width: 100%; height: 112px; display: block; overflow: visible; }
.bar { transform-box: fill-box; transform-origin: 50% 100%; }
.bar0 { fill: rgba(255,255,255,.1); } [data-theme="light"] .bar0 { fill: rgba(0,0,0,.08); }
.barl { fill: var(--mute); font-size: 9px; font-family: var(--f-body); }
.ops .stats { margin-top: 8px; }

/* ── Tablero de aeropuerto ── */
.bd { border-radius: var(--r-lg); background: #22252a; color: #ecebe6; box-shadow: var(--sh); overflow: hidden; }
[data-theme="light"] .bd { background: #262a30; }
.bd__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: #1b1e22; }
.bd__title { display: flex; align-items: center; gap: .55rem; }
.bd__title svg { font-size: 1.3rem; color: #e2c36f; transform: rotate(45deg); }
.bd__title b { font: 700 1.15rem var(--f-board); letter-spacing: .12em; text-transform: uppercase; color: #f1dfa6; }
.bd__title small { font: 400 .72rem var(--f-board); letter-spacing: .12em; text-transform: uppercase; color: #9aa0a8; }
.bd__clock { font: 700 1rem var(--f-body); font-variant-numeric: tabular-nums; color: #e2c36f; white-space: nowrap; }
.bd__clock small { font-size: .62rem; color: #9aa0a8; margin-left: 4px; letter-spacing: .1em; }
.bd__head { display: none; }
.bd__day { padding: 10px 16px 6px; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #b9a46a; background: #1f2226; }
.bd__row { display: grid; grid-template-columns: minmax(0, 1fr); background: #262a2f; }
.bd__row:nth-of-type(even) { background: #2a2e34; }
.bd__row + .bd__row { box-shadow: 0 -1px 0 rgba(255,255,255,.05); }
.bd__row--old { opacity: .55; }
.bd__row.is-open { background: #2f343b; }
.bd__main { display: grid; gap: 6px 12px; padding: 12px 16px 6px; cursor: pointer; outline: none; min-width: 0;
  grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "time fl gate" "to to to" "st st wx" "pax pax pax"; align-items: center; }
.bd__main:focus-visible { background: rgba(226,195,111,.08); }
.bd__time { grid-area: time; display: grid; line-height: 1.05; }
.bd__time b { font: 700 1.6rem/1.05 var(--f-body); font-variant-numeric: tabular-nums; color: #f1dfa6; }
.bd__time s { font: 400 .8rem var(--f-body); color: #9aa0a8; }
.bd__time small { font-size: .68rem; color: #9aa0a8; margin-top: 2px; }
.bd__fl { grid-area: fl; display: grid; min-width: 0; }
.bd__fl b { font: 700 1.05rem var(--f-board); letter-spacing: .06em; white-space: nowrap; }
.bd__fl small { font-size: .72rem; color: #a9aeb5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd__to { grid-area: to; display: grid; min-width: 0; }
.bd__to b { font-size: 1.12rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.bd__to small { font-size: .76rem; color: #a9aeb5; } .bd__to sup { font-size: .7em; color: #e2c36f; }
.bd__st { grid-area: st; display: grid; min-width: 0; }
.bd__st b { display: flex; align-items: center; gap: .45rem; font-size: .84rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.bd__st small { font-size: .68rem; color: #9aa0a8; padding-left: calc(9px + .45rem); }
.bd__gate { grid-area: gate; display: grid; justify-items: center; line-height: 1.05; padding: 4px 10px; border-radius: 10px; background: rgba(255,255,255,.06); }
.bd__gate b { font: 700 1.15rem var(--f-board); color: #f1dfa6; } .bd__gate small { font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; color: #9aa0a8; }
.bd__wx { grid-area: wx; justify-self: end; }
.bd .wxm { background: rgba(255,255,255,.07); color: #c3c7cd; } .bd .wxm b { color: #fff; }
.bd__pax { grid-area: pax; display: grid; min-width: 0; padding-top: 4px; }
.bd__pax b { font-size: .82rem; font-weight: 600; } .bd__pax small { font-size: .7rem; color: #9aa0a8; }
.bd__acts { display: flex; justify-content: flex-end; gap: 6px; padding: 2px 12px 10px; }
.ibtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(255,255,255,.08); color: #e2c36f; font-size: 1.05rem; text-decoration: none; }
.ibtn:hover { background: rgba(255,255,255,.14); }
.ibtn--g svg path:nth-child(1) { fill: #4285f4; } .ibtn--g svg path:nth-child(2) { fill: #34a853; } .ibtn--g svg path:nth-child(3) { fill: #fbbc05; } .ibtn--g svg path:nth-child(4) { fill: #ea4335; }
.ibtn--bad { color: #ee8478; }
.ibtn.is-confirm, .chipbtn.is-confirm { background: rgba(238,132,120,.3) !important; color: #fff !important; }
.ibtn.is-busy svg { animation: spin 1s linear infinite; }
.bd__det { padding: 6px 16px 16px; color: var(--ink); }
.bd__det { --surface-2: #363b42; --surface-3: #41464e; --ink: #f6f6f5; --sub: #c3c7cd; --mute: #9aa0a8; }
@media (min-width: 1000px) {
  .bd__head, .bd__main { grid-template-columns: 80px 100px minmax(140px, 1.3fr) 140px 60px 76px minmax(130px, 1fr); grid-template-areas: "time fl to st gate wx pax"; }
  .bd .wxm > span { display: none; }
  .bd__head { display: grid; gap: 12px; padding: 8px 140px 8px 16px; background: #1f2226; font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8d939b; }
  .bd__row { grid-template-columns: minmax(0, 1fr) auto; }
  .bd__main { padding: 10px 6px 10px 16px; }
  .bd__acts { align-items: center; padding: 0 12px 0 0; }
  .bd__wx { justify-self: start; }
  .bd__pax { padding-top: 0; } .bd__pax b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .bd__det { grid-column: 1 / -1; }
}

/* ── Viajes ── */
.sel--grow { flex: 2 1 240px; }
.sinput, .fsel { width: 100%; height: 44px; padding: 0 14px; border: 0; border-radius: 14px; font: 500 15px var(--f-body); color: var(--ink); background: var(--surface); box-shadow: var(--sh); outline: none; }
.fsel { background: var(--surface-2); box-shadow: none; min-height: 48px; }
.bar__ai { flex: none; height: 44px; }
.intel-img { border-radius: 50%; flex: none; object-fit: cover; }
.btn .intel-img { margin-right: 2px; }
.trips { display: grid; gap: 10px; }
@media (min-width: 760px) { .trips { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1180px) { .trips { grid-template-columns: 1fr 1fr 1fr; } }
.tcard { display: grid; gap: 6px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh); text-align: left; color: var(--ink); }
.tcard:hover { background: var(--surface-2); }
.tcard__top { display: flex; justify-content: space-between; gap: 8px; font-size: .74rem; color: var(--sub); }
.tcard__st { display: flex; align-items: center; gap: .4rem; font-weight: 700; }
.tcard__client { font-size: 1.15rem; }
.tcard__title { font-size: .84rem; color: var(--sub); margin-top: -4px; }
.tcard__pax { display: flex; gap: .45rem; align-items: flex-start; font-size: .8rem; color: var(--sub); }
.tcard__pax svg { flex: none; color: var(--gold-deep); font-size: 1rem; }
.tcard__chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tchip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .55rem; border-radius: 8px; background: var(--surface-2); font-size: .72rem; color: var(--sub); }
.tchip svg { color: var(--gold-deep); font-size: .9rem; }
.tcard__next { display: grid; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: .78rem; }
.tcard__next small { font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; }
.back { display: inline-flex; align-items: center; gap: .35rem; margin-bottom: 10px; padding: .45rem .8rem .45rem .5rem; border-radius: 999px; background: var(--surface); color: var(--sub); font-size: .82rem; }
.back svg { transform: rotate(90deg); font-size: 1.1rem; }
.trip { display: grid; gap: 12px; }
.trip__h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; }
.trip__h h2 { margin: 2px 0; font-size: clamp(1.4rem, 6vw, 2rem); }
.trip__st { display: flex; align-items: center; gap: .45rem; margin: 0; font-size: .8rem; color: var(--sub); }
.trip__title { margin: 0; color: var(--sub); }
.trip__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.trip__facts { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.trip__facts > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface); }
.trip__facts small { font-size: .58rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.trip__facts b { font-size: .88rem; } .trip__facts a { color: var(--ink); }
.trip__notes { grid-column: 1 / -1; } .trip__notes p { margin: 0; font-size: .86rem; color: var(--sub); white-space: pre-line; }
.callbtn { display: inline-flex; align-items: center; gap: .4rem; justify-self: start; padding: .4rem .8rem; border-radius: 999px; background: var(--call, #22c55e); color: #fff !important; font-size: .78rem; font-weight: 700; text-decoration: none; }
.callbtn svg { font-size: 1rem; }
.trip__day { margin: 8px 0 0; font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.ttl { display: grid; gap: 8px; }
.tli { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: var(--sh); }
.tli__ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--gold-deep); font-size: 1.2rem; }
.tli__ico--hotel { color: #7bb3ea; } .tli__ico--transfer, .tli__ico--car, .tli__ico--bus { color: #6fd39b; } .tli__ico--insurance { color: #ee8478; } .tli__ico--ticket, .tli__ico--event { color: #d98b6a; }
.tli__body { display: grid; gap: 6px; min-width: 0; }
.tli__top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; }
.tli__top b { font-size: .95rem; }
.tli__st { display: inline-flex; align-items: center; gap: .4rem; font-size: .74rem; color: var(--sub); text-transform: capitalize; }
.tli__sub { margin: 0; font-size: .8rem; color: var(--sub); }
.tli__data { display: flex; flex-wrap: wrap; gap: 6px; }
.tli__data > span { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border-radius: 10px; background: var(--surface-2); font-size: .76rem; color: var(--sub); }
.tli__data b { color: var(--ink); }
.tli__det { flex-basis: 100%; white-space: pre-line; }
.tli__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.cpy { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--gold-deep); font-size: .85rem; }
.cpy:hover { background: var(--surface-3); }
.docs2 { display: grid; gap: 6px; }
.doc2 { display: flex; align-items: center; gap: .6rem; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); color: var(--ink); text-decoration: none; min-width: 0; flex: 1; }
.doc2 svg { flex: none; color: #ee8478; font-size: 1.15rem; }
.doc2 span { display: grid; min-width: 0; } .doc2 b { font-size: .82rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .doc2 small { font-size: .68rem; color: var(--mute); }
.docbox { display: grid; gap: 10px; padding: 14px; border-radius: 18px; background: var(--surface); }
.docbox__h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--sub); }
.docs2--all { grid-template-columns: 1fr; }
@media (min-width: 900px) { .docs2--all { grid-template-columns: 1fr 1fr; } }
.doc2w { display: flex; align-items: center; gap: 6px; min-width: 0; }
.doc2w__for { flex: none; max-width: 30%; font-size: .66rem; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docbox .ibtn, .tli .ibtn { background: var(--surface-2); color: var(--gold-deep); } .docbox .ibtn--bad { color: #ee8478; }
@media (max-width: 560px) { .doc2w__for { display: none; } }

/* ── Sistema ── */
.sys { width: min(100% - 2 * var(--gut), 980px); margin: 28px auto 0; }
@media (min-width: 1240px) { .ops .panel, .ops .sys, .ops .hero__in { width: min(100% - 2 * var(--gut), 1160px); max-width: none; } }
.sysgrid { display: grid; gap: 12px; }
@media (min-width: 980px) { .sysgrid { grid-template-columns: 1fr 1.3fr; } .syscard--wide { grid-column: 1 / -1; } }
.syscard { display: grid; align-content: start; gap: 10px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh); min-width: 0; }
.syscard h3 { margin: 0; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.syscard h3 small { text-transform: none; letter-spacing: .04em; font-weight: 400; }
.syscard__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.seg--sm { height: 34px; box-shadow: none; background: var(--surface-2); } .seg--sm button { font-size: .74rem; padding: 0 10px; }
.apiuse { display: grid; gap: 8px; }
.apiuse__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n v" "b b"; gap: 4px 10px; align-items: center; font-size: .8rem; }
.apiuse__n { grid-area: n; } .apiuse__bar { grid-area: b; } .apiuse__v { grid-area: v; text-align: right; }
.apiuse__n { display: flex; align-items: center; gap: .45rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apiuse__bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.apiuse__bar i { display: block; height: 100%; border-radius: 4px; min-width: 2px; }
.apiuse__v { font-size: .72rem; color: var(--sub); } .apiuse__v b { color: var(--ink); }

.fchips--sm { margin: 0; } .fchips--sm .fchip { padding: .3rem .7rem; font-size: .72rem; background: var(--surface-2); }
.fchips--sm .fchip.is-on { background: var(--ink); color: var(--bg); }
.logs { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 420px; overflow-y: auto; border-radius: 12px; }
.logs li { display: grid; grid-template-columns: 9px 92px 84px 1fr; gap: 8px; align-items: baseline; padding: 7px 10px; background: var(--surface-2); font-size: .74rem; color: var(--sub); }
.logs li .ind { align-self: center; }
.logs time { color: var(--ink); font-weight: 700; white-space: nowrap; }
.logs__src { font-size: .62rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logs__m { overflow-wrap: anywhere; color: var(--ink); }
@media (max-width: 560px) { .logs li { grid-template-columns: 9px 1fr; } .logs time, .logs__src { grid-column: 2; } .logs__m { grid-column: 2; } }
.apps { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.app { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .78rem; color: var(--sub); min-width: 0; }
.app b { color: var(--ink); font-size: .88rem; } .app small { color: var(--gold-deep); font-weight: 700; }
.app__links { overflow-wrap: anywhere; } .app__links a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--gold); }

/* ── Hoja de configuración ── */
body.has-sheet { overflow: hidden; }
.sheet { position: fixed; inset: 0; z-index: 120; display: grid; place-items: end center; }
@media (min-width: 720px) { .sheet { place-items: center; } }
.sheet__bg { position: absolute; inset: 0; background: rgba(10,11,13,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.sheet__card { position: relative; width: min(680px, 100%); max-height: 92dvh; overflow-y: auto; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--bg-2); box-shadow: 0 -20px 60px -20px rgba(0,0,0,.6); }
@media (min-width: 720px) { .sheet__card { border-radius: 26px; } }
.sheet__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sheet__h h2 { margin: 2px 0 6px; font-size: 1.5rem; }
.sheet__x { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 1.2rem; }
.setf { display: grid; gap: 12px; margin-top: 10px; }
.setf fieldset { border: 0; margin: 0; padding: 12px; border-radius: 18px; background: var(--surface); display: grid; gap: 4px; }
.setf legend { float: left; width: 100%; margin-bottom: 6px; font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.setf__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 4px; }
.setf__row + .setf__row { box-shadow: 0 -1px 0 var(--line-2); }
.setf__row > span:first-child { display: grid; font-size: .88rem; } .setf__row small { font-size: .72rem; color: var(--mute); }
.setf__in { display: flex; align-items: center; gap: 6px; flex: none; }
.setf__in input { width: 86px; height: 40px; padding: 0 10px; border: 0; border-radius: 10px; font: 700 16px var(--f-body); text-align: right; color: var(--ink); background: var(--surface-2); outline: none; }
.setf__in input.is-custom { background: rgba(227,162,80,.2); }
.setf__in em { width: 62px; font-style: normal; font-size: .7rem; color: var(--sub); }
.sw { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--surface-3); position: relative; cursor: pointer; transition: background .2s; }
.sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.sw:checked { background: #3fbf73; } .sw:checked::after { transform: translateX(18px); }
.setf__est { display: flex; gap: .6rem; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(63,191,115,.12); font-size: .84rem; color: var(--ink); }
.setf__est .ind { margin-top: 5px; }
.setf__acts { display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: -18px; padding: 10px 0 4px; background: var(--bg-2); }

/* ── Intelligence ── */
.intel-fab { position: fixed; z-index: 80; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: .55rem; padding: 6px 16px 6px 6px; border-radius: 999px;
  background: rgba(30,32,36,.88); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: #f1dfa6; font-weight: 700; font-size: .86rem; letter-spacing: .04em; box-shadow: 0 14px 34px -12px rgba(0,0,0,.7); }
[data-theme="light"] .intel-fab { background: rgba(255,255,255,.92); color: #6b5317; box-shadow: 0 12px 30px -12px rgba(16,24,40,.35); }
.intel-fab:hover { transform: translateY(-1px); }
@media (max-width: 480px) { .intel-fab span { display: none; } .intel-fab { padding: 6px; } }
.intel { position: fixed; z-index: 110; inset: 0; display: flex; flex-direction: column; background: var(--bg-2); }
@media (min-width: 760px) { .intel { inset: auto 18px 18px auto; width: 440px; height: min(720px, calc(100dvh - 100px)); border-radius: 24px; box-shadow: 0 30px 80px -24px rgba(0,0,0,.7); overflow: hidden; } }
.intel[hidden] { display: none; }
.intel__h { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 14px; background: var(--surface); }
.intel__h > div { display: grid; flex: 1; min-width: 0; } .intel__h b { font-size: 1rem; letter-spacing: .02em; } .intel__h small { font-size: .7rem; color: var(--sub); }
.intel__b { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 1.1rem; flex: none; }
.intel__ctx { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; background: var(--gold-soft); font-size: .78rem; }
.intel__ctx span { display: flex; align-items: center; gap: .4rem; } .intel__ctx svg { color: var(--gold-deep); }
.intel__ctx button { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--sub); }
.intel__msgs { flex: 1; overflow-y: auto; padding: 14px; display: grid; align-content: start; gap: 12px; }
.intel__hello { display: grid; justify-items: center; gap: 8px; padding: 18px 6px; text-align: center; }
.intel__hello b { font-size: 1.1rem; } .intel__hello p { margin: 0; font-size: .86rem; color: var(--sub); }
.intel__sugg { display: grid; gap: 6px; width: 100%; margin-top: 6px; }
.intel__sugg button { padding: 10px 12px; border-radius: 14px; background: var(--surface); color: var(--ink); font-size: .82rem; text-align: left; }
.intel__sugg button:hover { background: var(--surface-2); }
.cm { display: flex; gap: 8px; align-items: flex-end; }
.cm--me { justify-content: flex-end; }
.cm__b { max-width: 86%; padding: 10px 13px; border-radius: 18px; background: var(--surface); font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; }
.cm--me .cm__b { background: #4a4234; border-bottom-right-radius: 6px; } [data-theme="light"] .cm--me .cm__b { background: #f1e6c8; }
.cm--ai .cm__b { border-bottom-left-radius: 6px; }
.cm__b p { margin: 0 0 6px; } .cm__b p:last-child { margin-bottom: 0; } .cm__b ul, .cm__b ol { margin: 4px 0 8px; padding-left: 1.1rem; } .cm__b .md-h { font-weight: 700; }
.cm__b code { padding: 1px 5px; border-radius: 5px; background: var(--surface-3); font-size: .82em; }
.cm__b a { color: var(--gold-deep); }
.cm__file { display: inline-flex; align-items: center; gap: .35rem; margin: 4px 4px 0 0; padding: .25rem .55rem; border-radius: 8px; background: rgba(255,255,255,.08); font-size: .74rem; }
.cm__acts { list-style: none; margin: 8px 0 0 !important; padding: 8px 0 0 !important; display: grid; gap: 4px; box-shadow: 0 -1px 0 var(--line-2); }
.cm__acts li { display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--sub); }
.cm--wait .cm__b small { color: var(--mute); font-size: .72rem; }
.cm--wait .intel-img { animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.12); } }
.intel__list { display: grid; gap: 6px; } .intel__list > b { font-size: .8rem; color: var(--sub); }
.intel__list button { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface); color: var(--ink); font-size: .84rem; text-align: left; }
.intel__list button.is-on { background: var(--surface-2); } .intel__list small { color: var(--mute); flex: none; }
.intel__in { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); }
.intel__in.is-busy { opacity: .6; pointer-events: none; }
.intel__files { display: flex; flex-wrap: wrap; gap: 6px; }
.intel__files:not(:empty) { margin-bottom: 8px; }
.ifile { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .4rem .3rem .6rem; border-radius: 10px; background: var(--surface-2); font-size: .76rem; max-width: 100%; }
.ifile svg { color: #ee8478; flex: none; } .ifile span { display: grid; min-width: 0; } .ifile small { color: var(--mute); font-size: .66rem; }
.ifile button { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: var(--sub); }
.ifile--bad { background: rgba(238,132,120,.18); }
.intel__row { display: flex; align-items: flex-end; gap: 8px; }
.intel__clip { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--gold-deep); font-size: 1.2rem; cursor: pointer; flex: none; }
.intel__row textarea { flex: 1; min-height: 42px; max-height: 160px; padding: 10px 12px; border: 0; border-radius: 14px; resize: none; font: 400 16px/1.35 var(--f-body); color: var(--ink); background: var(--surface-2); outline: none; }
.intel__send { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--gold); color: #1b1a17; font-size: 1.1rem; flex: none; }
.intel__drop { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: rgba(20,21,24,.82); color: #f1dfa6; font-size: 1rem; z-index: 3; }
.intel__drop svg { font-size: 2rem; }
.intel { position: fixed; }
body.has-intel { overflow: hidden; }
@media (min-width: 760px) { body.has-intel { overflow: auto; } }

/* ── Cargando: barra superior, spinner y estados ── */
body.ops::before { content: ''; position: fixed; z-index: 200; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--gold), #f1dfa6, var(--gold), transparent); background-size: 50% 100%; background-repeat: no-repeat; opacity: 0; transition: opacity .2s; pointer-events: none; }
body.ops.is-loading::before { opacity: 1; animation: loadbar 1.1s linear infinite; }
@keyframes loadbar { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.spin { display: inline-block; flex: none; width: 1em; height: 1em; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; vertical-align: -2px; opacity: .85; }
.btn .spin, .chipbtn .spin { margin-right: .45rem; }
.loading { display: flex; align-items: center; justify-content: center; gap: .7rem; padding: 26px 16px; border-radius: var(--r-lg); background: var(--surface); color: var(--sub); font-size: .9rem; }
.loading .spin { width: 22px; height: 22px; border-width: 3px; color: var(--gold); }
.checks .loading, .dcard .loading { padding: 12px; background: none; }
/* Chat: anillo que gira alrededor del avatar, puntos y barra */
.cm__ring { position: relative; display: grid; place-items: center; width: 40px; height: 40px; flex: none; }
.cm__ring::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(201,168,91,.2); border-top-color: var(--gold); animation: spin .9s linear infinite; }
.cm--wait .cm__b p { display: flex; align-items: baseline; gap: 2px; font-weight: 600; }
.dots { display: inline-flex; gap: 3px; margin-left: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); animation: dot 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: .35; } 40% { transform: translateY(-4px); opacity: 1; } }
.ibar { display: block; height: 4px; margin: 8px 0 6px; border-radius: 2px; background: var(--surface-3); overflow: hidden; position: relative; min-width: 180px; }
.ibar i { position: absolute; top: 0; bottom: 0; width: 40%; border-radius: 2px; background: var(--gold); animation: ibar 1.4s ease-in-out infinite; }
@keyframes ibar { from { left: -40%; } to { left: 100%; } }
.intel.is-thinking .intel__h .intel-img { animation: breathe 1.6s ease-in-out infinite; }
.intel__in.is-busy .intel__send::after { content: ''; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #1b1a17; border-right-color: transparent; animation: spin .7s linear infinite; }
.intel__in.is-busy .intel__send svg { display: none; }

/* ── Dashboard interactivo ── */
[data-go] { cursor: pointer; transition: background .2s, transform .2s; }
.dcell[data-go]:hover, .stat[data-go]:hover { background: var(--surface-3); }
.dstate[data-go]:hover { background: rgba(255,255,255,.1); }
[data-theme="light"] .dstate[data-go]:hover { background: #fff; }
[data-go]:active { transform: scale(.985); }
[data-go]:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.dcell { position: relative; }
.dcell__go { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--surface-3); color: var(--sub); font-size: .95rem; }
.dcell__go svg { transform: rotate(-90deg); }
.dlegend button { display: flex; align-items: center; gap: .4rem; width: 100%; padding: 3px 6px; margin: 0 -6px; border-radius: 7px; color: inherit; font: inherit; text-align: left; }
.dlegend button:hover:not(:disabled) { background: var(--surface-3); color: var(--ink); }
.dlegend button:disabled { opacity: .55; cursor: default; }
.dlegend button i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.dlegend button b { margin-left: auto; color: var(--ink); }
.barhit { fill: transparent; cursor: pointer; }
.barhit:hover { fill: rgba(255,255,255,.07); }
[data-theme="light"] .barhit:hover { fill: rgba(0,0,0,.05); }
.bar__done .ind { margin-right: 2px; } .bar__done svg { font-size: .9rem; vertical-align: -2px; }
.fchip svg { font-size: .9rem; vertical-align: -2px; margin-left: 2px; }
/* Insignias sin borde: fondo suave + indicador */
.ops .pill { border: 0 !important; box-shadow: none !important; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--surface-3); color: var(--ink); }
.ops .pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #8a8f97; }
.ops .pill--bad { background: rgba(238,132,120,.16); } .ops .pill--bad::before { background: #ee8478; }
.ops .pill--warn { background: rgba(227,162,80,.16); } .ops .pill--warn::before { background: #e3a250; }
.ops .pill--go { background: rgba(123,179,234,.16); } .ops .pill--go::before { background: #7bb3ea; }
