/* Loopling Screens — panel */
:root {
  --navy: #14213d;
  --navy-2: #1d2e54;
  --navy-3: #2a3d6b;
  --coral: #ff6b4a;
  --coral-ink: #c8401f;
  --cream: #f4efe6;
  --surface: #f3f5fa;
  --card: #ffffff;
  --ink: #131b2e;
  --muted: #5a6580;
  --line: #dde2ee;
  --ok: #17a06b;
  --warn: #d99200;
  --off: #a3abbd;
  --danger: #c93a3a;
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 18px;
  --shadow: 0 1px 2px rgba(20, 33, 61, 0.06), 0 6px 20px rgba(20, 33, 61, 0.06);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--surface); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--navy-3); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Estructura ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side { background: var(--navy); color: var(--cream); display: flex; flex-direction: column; padding: 22px 14px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 26px; font-weight: 800; font-size: 18px; letter-spacing: -0.01em; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: #aab6d3; letter-spacing: 0; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-s); color: #c9d2e8; text-decoration: none; font-weight: 600; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a[aria-current="page"] { background: var(--navy-2); color: #fff; box-shadow: inset 3px 0 0 var(--coral); }
.nav svg { width: 20px; height: 20px; flex: none; }
.side-foot { margin-top: auto; padding: 12px; font-size: 13px; color: #aab6d3; }
.side-foot button { background: none; border: 0; color: #fff; padding: 0; cursor: pointer; text-decoration: underline; }

.main { min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 32px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5; }
.org-switch { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.org-switch select { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 6px 10px; background: var(--card); font-weight: 600; }
.content { padding: 28px 32px 64px; max-width: 1280px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; line-height: 1.15; letter-spacing: -0.02em; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 60ch; }

/* ---------- Botones y campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card); padding: 9px 16px; border-radius: 999px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--navy-3); }
.btn.primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn.primary:hover { background: var(--coral-ink); border-color: var(--coral-ink); }
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.field .hint { color: var(--muted); font-size: 13px; }
.input, select.input { width: 100%; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; background: #fff; }
.input:focus { border-color: var(--navy-3); outline: none; box-shadow: 0 0 0 3px rgba(42, 61, 107, 0.15); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 160px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-s); cursor: pointer; }
.check:hover { background: var(--surface); }
.check input { width: 18px; height: 18px; accent-color: var(--coral); }
.error-msg { color: var(--danger); font-weight: 600; font-size: 14px; min-height: 1.4em; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: var(--navy); color: var(--cream); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-art h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.03em; margin: 0; max-width: 12ch; }
.auth-art p { color: #c9d2e8; max-width: 40ch; font-size: 17px; }
.auth-loops { position: absolute; right: -120px; bottom: -120px; width: 520px; opacity: 0.9; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--card); }
.auth-form form { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -0.02em; }
.auth-form .sub { color: var(--muted); margin: 0 0 24px; }

/* ---------- Pantallas (lo memorable: cada pantalla es un pequeño televisor) ---------- */
.screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.tv { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.tv-frame { position: relative; aspect-ratio: 16 / 9; background: #0e1526; border-radius: 10px; border: 7px solid #1b2440; box-shadow: 0 14px 24px -14px rgba(20, 33, 61, 0.55); overflow: hidden; display: grid; place-items: center; }
.tv-frame.portrait { aspect-ratio: 9 / 16; max-height: 260px; margin: 0 auto; }
.tv-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-frame .blank { color: #56617f; font-size: 13px; padding: 12px; text-align: center; }
.tv-stand { width: 34%; height: 8px; margin: 0 auto; background: #1b2440; border-radius: 0 0 6px 6px; }
.tv.online .tv-frame { border-color: #22314f; box-shadow: 0 0 0 1px rgba(23, 160, 107, 0.35), 0 16px 30px -12px rgba(23, 160, 107, 0.45); }
.tv-meta { margin-top: 12px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.tv-meta strong { font-size: 16px; }
.tv-meta span { color: var(--muted); font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--off); }
.status.on { color: var(--ok); }
.status.on::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(23, 160, 107, 0.18); }

/* ---------- Biblioteca ---------- */
.drop { border: 2px dashed var(--line); border-radius: var(--radius-l); padding: 28px; text-align: center; color: var(--muted); background: var(--card); margin-bottom: 22px; transition: border-color 0.15s, background 0.15s; }
.drop.over { border-color: var(--coral); background: #fff5f2; }
.drop strong { color: var(--ink); }
.uploads { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.upload { display: grid; grid-template-columns: 1fr 160px 60px; gap: 12px; align-items: center; background: var(--card); padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid var(--line); font-size: 14px; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--coral); width: 0; transition: width 0.2s; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.media { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.thumb { aspect-ratio: 16 / 10; background: #e7ebf4; display: grid; place-items: center; position: relative; color: var(--muted); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .kind { position: absolute; left: 8px; bottom: 8px; background: rgba(20, 33, 61, 0.82); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.thumb svg { width: 34px; height: 34px; }
.media-body { padding: 10px 12px; }
.media-body strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-body span { color: var(--muted); font-size: 12px; }
.media-actions { display: flex; gap: 4px; padding: 0 8px 8px; }

/* ---------- Playlists ---------- */
.list { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow strong { display: block; }
.list-item .grow span { color: var(--muted); font-size: 13px; }

.filmstrip { display: flex; gap: 3px; height: 64px; border-radius: var(--radius-s); overflow: hidden; background: var(--navy); padding: 6px; margin-bottom: 8px; }
.film { position: relative; min-width: 34px; border-radius: 4px; overflow: hidden; background: var(--navy-3); color: #fff; font-size: 11px; display: flex; align-items: flex-end; padding: 4px 6px; }
.film img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.film span { position: relative; background: rgba(20, 33, 61, 0.75); padding: 0 4px; border-radius: 3px; }
.film.video { background: #3b4f84; }
.film.web { background: #6a5aa8; }
.strip-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.items { display: flex; flex-direction: column; gap: 8px; }
.item { display: grid; grid-template-columns: 28px 64px 1fr 110px 120px auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 10px; }
.item .pos { color: var(--muted); font-weight: 700; text-align: center; }
.item .mini { width: 64px; height: 40px; border-radius: 4px; background: #e7ebf4; overflow: hidden; display: grid; place-items: center; color: var(--muted); }
.item .mini img { width: 100%; height: 100%; object-fit: cover; }
.item .name { min-width: 0; }
.item .name strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.item .name span { font-size: 12px; color: var(--muted); }
.item .input { padding: 6px 8px; }
.item .tools { display: flex; gap: 2px; }
.icon-btn { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.editor-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.editor-bar .input { max-width: 360px; font-size: 18px; font-weight: 700; }

/* ---------- Programación ---------- */
.sched { display: grid; gap: 14px; }
.sched-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.sched-card h3 { margin: 0 0 4px; font-size: 17px; }
.sched-card .when { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 13px; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.pill.live { background: #e3f6ee; color: var(--ok); }
.pill.draft { background: #eef0f5; color: var(--muted); }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.day { position: relative; }
.day input { position: absolute; opacity: 0; }
.day span { display: inline-grid; place-items: center; width: 42px; height: 36px; border: 1px solid var(--line); border-radius: var(--radius-s); font-weight: 700; cursor: pointer; }
.day input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.day input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }

/* ---------- Vacíos, modal, avisos ---------- */
.empty { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 48px 24px; text-align: center; }
.empty h2 { margin: 12px 0 6px; font-size: 20px; }
.empty p { color: var(--muted); margin: 0 auto 20px; max-width: 46ch; }
.empty svg { width: 120px; height: auto; }

.modal-back { position: fixed; inset: 0; background: rgba(13, 21, 40, 0.5); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal { background: var(--card); border-radius: var(--radius-l); width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 30px 60px rgba(13, 21, 40, 0.35); }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px 0; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 20px; flex-wrap: wrap; }
.code-input { font-size: 34px; letter-spacing: 0.3em; text-align: center; font-weight: 800; text-transform: uppercase; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: 14px; margin: 14px 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.pick-list { max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 4px; }
.copy-box { display: flex; gap: 8px; }
.copy-box .input { font-size: 13px; }

#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--radius-s); box-shadow: var(--shadow); font-weight: 600; max-width: 360px; }
.toast.err { background: var(--danger); }

.loading { color: var(--muted); padding: 40px 0; }
.muted { color: var(--muted); }

/* ---------- Móvil ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; flex-direction: row; padding: 6px; z-index: 20; }
  .brand, .side-foot { display: none; }
  .nav { flex-direction: row; justify-content: space-around; width: 100%; }
  .nav a { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; }
  .nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--coral); }
  .top { padding: 12px 16px; }
  .content { padding: 20px 16px 96px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 32px 24px; min-height: 200px; }
  .auth-loops { width: 300px; right: -90px; bottom: -110px; }
  .item { grid-template-columns: 24px 48px 1fr auto; }
  .item .mini { width: 48px; }
  .item .dur, .item .trans { grid-column: 3 / 5; }
  .upload { grid-template-columns: 1fr 80px; }
  .upload .pct { display: none; }
}

/* ---------- Ajustes tras revisión visual ---------- */
.brand svg { width: 46px; height: auto; flex: none; }
.auth-art > div:not(.auth-loops) { position: relative; z-index: 1; }
.auth-loops { opacity: 0.55; }
.auth-loops svg { width: 100%; height: auto; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.item { grid-template-columns: 28px 64px 1fr 130px 150px auto; }
.item .mini svg, .thumb svg { width: 26px; height: 26px; }
.screens { align-items: start; }
.drop { display: block; cursor: pointer; }
.media-actions { flex-wrap: wrap; }
.media-actions .btn { padding: 5px 8px; }
@media (max-width: 900px) {
  .org-switch label, [data-new-org] { display: none; }
  .org-switch select { max-width: 60vw; }
  .item { grid-template-columns: 24px 48px 1fr 1fr; grid-template-areas: "pos mini name name" "dur dur trans trans" "tools tools tools tools"; }
  .item .pos { grid-area: pos; }
  .item .mini { grid-area: mini; }
  .item .name { grid-area: name; }
  .item .dur { grid-area: dur; }
  .item .trans { grid-area: trans; }
  .item .tools { grid-area: tools; justify-content: flex-end; }
}

/* ---------- Inicio, reportes y alertas ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; min-width: 0; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 17px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; box-shadow: var(--shadow); border-top: 4px solid var(--line); }
.kpi.ok { border-top-color: var(--ok); }
.kpi.warn { border-top-color: var(--warn); }
.kpi.danger { border-top-color: var(--coral); }
.kpi-label { color: var(--muted); font-weight: 600; font-size: 13px; }
.kpi-value { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 16px; color: var(--muted); font-weight: 600; }
.kpi-sub { color: var(--muted); font-size: 13px; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.two-col .card { margin-bottom: 0; }

.chart { position: relative; }
.chart svg { width: 100%; height: 220px; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .y-lbl, .chart .x-lbl { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar-mark { fill: var(--navy-3); }
.chart .bar-mark.hl { fill: var(--coral); }
.chart .hit { fill: transparent; }
.chart .bar-g { cursor: default; outline: none; }
.chart .bar-g.on .hit, .chart .bar-g:focus-visible .hit { fill: rgba(20, 33, 61, 0.06); }
.chart-tip { position: absolute; transform: translate(-50%, -100%); background: var(--navy); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 8px; pointer-events: none; white-space: nowrap; box-shadow: var(--shadow); z-index: 2; }

.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank li { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr auto; gap: 12px; align-items: center; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rank-bar { display: block; height: 8px; background: var(--surface); border-radius: 999px; overflow: hidden; min-width: 60px; }
.rank-bar i { display: block; height: 100%; background: var(--navy-3); border-radius: 999px; }
.rank-val { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }

.attn { list-style: none; margin: 0; padding: 0; }
.attn-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.attn-item:last-child { border-bottom: 0; }
.attn-item .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.attn-item.seen { opacity: 0.7; }
.sev { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; margin-top: 2px; }
.sev.warn { background: var(--warn); }
.sev.danger { background: var(--danger); }
.sev.ok { background: var(--ok); }
.small { font-size: 12.5px; }
.ok-line { margin: 0; color: var(--ok); font-weight: 600; }
.ok-line::before { content: "✓ "; }
.notice { background: #fff6e0; border: 1px solid #f1d38a; border-radius: var(--radius-s); padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.steps { text-align: left; display: inline-block; margin: 6px 0 0; }
.steps li { margin: 6px 0; }

.filters .row { flex-wrap: wrap; }
.filters .field { min-width: 150px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-weight: 600; font-size: 13px; cursor: pointer; }
.chip-btn:hover { border-color: var(--navy-3); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tfoot td { font-weight: 700; border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .bar-cell { width: 30%; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 12px; }

.rules { display: grid; gap: 4px; margin-bottom: 14px; }
.rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rule-th { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.rule-th .input { width: 90px; }

@media (max-width: 720px) {
  .kpi-value { font-size: 24px; }
  .chart svg { height: 180px; }
  .rank li { grid-template-columns: minmax(0, 1fr) auto; }
  .rank-bar { display: none; }
}

/* ---------- Diseños (zonas) ---------- */
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.layout-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.layout-meta strong { display: block; }
.layout-meta span { color: var(--muted); font-size: 13px; }
.lt { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; }
.lt.portrait { aspect-ratio: 9 / 16; max-height: 220px; margin: 0 auto; }
.layout-card .lt.portrait { height: 180px; }
.lt-z { position: absolute; box-sizing: border-box; border: 2px solid #0b1224; background: color-mix(in srgb, var(--c) 78%, #0b1224); display: grid; place-items: center; text-align: center; padding: 2px; }
.lt-z span { color: #fff; font-size: 11px; font-weight: 700; line-height: 1.2; overflow: hidden; }
.lt-z small { display: block; font-weight: 500; opacity: 0.85; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.preset { border: 2px solid var(--line); border-radius: var(--radius-m); padding: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.preset input { position: absolute; opacity: 0; pointer-events: none; }
.preset.on { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.18); }
.preset:focus-within { outline: 3px solid var(--coral); outline-offset: 2px; }
.preset .lt.portrait { height: 120px; }

.le { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.le-stage-wrap { min-width: 0; }
.le-stage { position: relative; width: 100%; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 10px #0b1224, var(--shadow); margin: 10px 0 18px; touch-action: none; user-select: none; }
.le-stage.portrait { width: auto; height: min(72vh, 760px); margin-left: auto; margin-right: auto; }
.le-zone { position: absolute; box-sizing: border-box; border: 2px solid rgba(255, 255, 255, 0.85); background-color: color-mix(in srgb, var(--c) 70%, transparent); background-size: cover; background-position: center; cursor: move; outline: none; }
.le-zone.sel { border: 3px solid #fff; box-shadow: 0 0 0 3px var(--coral); }
.le-zone:focus-visible { box-shadow: 0 0 0 3px var(--coral), 0 0 0 6px #fff; }
.le-label { position: absolute; left: 6px; top: 6px; right: 6px; background: rgba(11, 18, 36, 0.78); color: #fff; padding: 4px 8px; border-radius: 6px; font-size: 12px; line-height: 1.3; pointer-events: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.le-label strong { display: block; font-size: 13px; }
.le-h { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid var(--coral); border-radius: 50%; }
.le-h::after { content: ""; position: absolute; inset: -10px; } /* área de toque más grande */
.le-h.nw { left: -9px; top: -9px; cursor: nwse-resize; }
.le-h.se { right: -9px; bottom: -9px; cursor: nwse-resize; }
.le-h.ne { right: -9px; top: -9px; cursor: nesw-resize; }
.le-h.sw { left: -9px; bottom: -9px; cursor: nesw-resize; }
.le-side { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 16px; box-shadow: var(--shadow); position: sticky; top: 90px; }
.le-side h3 { margin: 0 0 8px; font-size: 15px; }
.zone-list, .group-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 4px; }
.zone-pick { width: 100%; display: grid; grid-template-columns: 14px 1fr; column-gap: 10px; align-items: center; text-align: left; border: 1px solid transparent; background: none; padding: 7px 10px; border-radius: var(--radius-s); cursor: pointer; font-weight: 600; }
.zone-pick i { width: 14px; height: 14px; border-radius: 4px; grid-row: span 2; }
.zone-pick span { grid-column: 2; font-weight: 500; font-size: 12.5px; }
.group-list .zone-pick { grid-template-columns: 1fr; }
.group-list .zone-pick span { grid-column: 1; }
.zone-pick:hover { background: var(--surface); }
.zone-pick.on { background: var(--surface); border-color: var(--line); box-shadow: inset 3px 0 0 var(--coral); }
.zone-form { border-top: 1px solid var(--line); padding-top: 12px; }
.xywh { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.groups-ed { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.groups-ed .copy-box { margin-bottom: 10px; }

@media (max-width: 980px) {
  .le { grid-template-columns: 1fr; }
  .le-side { position: static; }
  .groups-ed { grid-template-columns: 1fr; }
}

/* ---------- Widgets ---------- */
.widget-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.wp { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--radius-m); padding: 14px; cursor: pointer; }
.wp:hover { border-color: var(--coral); box-shadow: var(--shadow); }
.wp svg { width: 30px; height: 30px; color: var(--coral); }
.wp span { color: var(--muted); font-size: 13px; }
.thumb.widget { background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; }
.thumb.widget svg { color: #fff; }
.wm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.wm-frame { aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #0b1224; box-shadow: 0 0 0 6px #0b1224; display: grid; place-items: center; }
.wm-frame iframe { width: 100%; height: 100%; border: 0; }
.wm-frame .muted { color: #aab6d3; padding: 16px; text-align: center; }
textarea.input { resize: vertical; min-height: 90px; font: inherit; }
.input.color { padding: 4px; height: 42px; cursor: pointer; }
@media (max-width: 860px) { .wm { grid-template-columns: 1fr; } }
.le-zone.w { background-color: color-mix(in srgb, var(--c) 30%, transparent); }
.le-wf { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; }
.le-zone .le-label { z-index: 1; }
.le-zone .le-h { z-index: 2; }
.quickpos { display: flex; flex-wrap: wrap; gap: 6px; }
.quickpos .chip-btn { font-size: 12px; padding: 4px 9px; }
.le-zone.w .le-label { opacity: 0; transition: opacity .15s; }
.le-zone.w:hover .le-label, .le-zone.w.sel .le-label, .le-zone.w:focus-visible .le-label { opacity: 1; }

/* ---------- Subidas y estado de contenido ---------- */
.up-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.up-box.ok { border-color: var(--ok); background: #effaf4; }
.up-box.warn { border-color: var(--warn); background: #fff8e6; }
.up-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.up-pct { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bar.big { height: 12px; margin-bottom: 10px; }
.up-list .upload { grid-template-columns: minmax(0, 1fr) 140px 90px; }
.upload.done .pct { color: var(--ok); font-weight: 700; }
.upload.err .pct, .upload .st { color: var(--danger); font-weight: 700; }
.upload.done .bar > i { background: var(--ok); }
.sync { margin-top: 6px; font-size: 12.5px; font-weight: 600; text-align: left; }
.sync.ok { color: var(--ok); }
.sync.dl { color: var(--navy-3); }
.sync .bar { height: 6px; margin: 4px 0 2px; }
.sync small { color: var(--muted); font-weight: 500; }
details.ov { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; }
details.ov summary { cursor: pointer; font-weight: 600; }
.ov-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 120px; gap: 8px; align-items: center; padding: 4px 0; }
@media (max-width: 640px) { .ov-row { grid-template-columns: 1fr 1fr; } .ov-row .check { grid-column: span 2; } }
/* Modal: encabezado y botones siempre visibles; solo el contenido se desplaza */
.modal { display: flex; flex-direction: column; overflow: hidden; }
.modal-body { overflow: auto; min-height: 0; }
.modal-foot { padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- Datos ---------- */
.ds-types { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ds-types .preset { font-weight: 500; }
.ds-types .preset strong { font-size: 14px; }
.ds-types .preset .muted { font-size: 12.5px; }
.steps-small { margin: 4px 0 12px; padding-left: 20px; font-size: 13.5px; color: var(--muted); }
.steps-small li { margin: 3px 0; }
.grid-ed { overflow: auto; max-height: 340px; border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 8px; }
.grid-ed table { border-collapse: collapse; min-width: 100%; }
.grid-ed th, .grid-ed td { padding: 4px; border-bottom: 1px solid var(--line); }
.grid-ed th { background: var(--surface); position: sticky; top: 0; }
.grid-ed th { white-space: nowrap; }
.grid-ed th .input { font-weight: 700; display: inline-block; width: calc(100% - 34px); min-width: 110px; }
.grid-ed td .input { min-width: 110px; padding: 6px 8px; }
.grid-ed .icon-btn { width: 28px; height: 28px; }
.table-wrap.prev { max-height: 260px; border: 1px solid var(--line); border-radius: var(--radius-s); }
textarea.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
[hidden] { display: none !important; }
.grid-ed th > * { vertical-align: middle; }
.grid-ed th { display: table-cell; }
.grid-ed th .input { width: calc(100% - 34px); }
.wm .check { flex-wrap: wrap; }

/* ---------- Seguridad ---------- */
.qr { display: flex; justify-content: center; margin: 6px 0 10px; }
.qr img { width: 210px; height: 210px; background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); }
.mfa-steps { padding-left: 20px; margin: 6px 0; font-size: 14.5px; }
.mfa-steps li { margin: 4px 0; }
details.manual { margin: 0 0 12px; font-size: 13.5px; }
details.manual code { display: block; margin-top: 6px; font-size: 15px; letter-spacing: .05em; background: var(--surface); padding: 8px 10px; border-radius: 6px; word-break: break-all; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.codes code { font-size: 16px; text-align: center; background: var(--surface); border: 1px dashed var(--line); padding: 8px; border-radius: 6px; letter-spacing: .06em; }
.ok-chip { background: #e6f6ee; color: #0f7a50; }
.warn-chip { background: #fff3d6; color: #8a5b00; }
.h3 { font-size: 15px; margin: 6px 0 6px; }
.table.act td { vertical-align: top; }
.nowrap { white-space: nowrap; }
.warn-row td { background: #fff6f3; }

/* Video walls */
.wall-size { display: flex; gap: 12px; }
.wall-size .field { flex: 1; }
.wall-grid { display: grid; gap: 8px; margin: 6px 0 10px; }
.wall-cell { border: 2px solid var(--line, #d9dde3); border-radius: 10px; background: #111827; padding: 10px; aspect-ratio: 16 / 9; display: flex; flex-direction: column; justify-content: space-between; }
.wall-cell > span { color: #9ca3af; font-weight: 700; }
.wall-cell select { font-size: 13px; padding: 6px 8px; }

/* Subsecciones (Pantallas | Versiones de la app) */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 20px; }
.subtabs a { padding: 10px 16px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.subtabs a.on { color: var(--ink); border-bottom-color: var(--coral); }
.subtabs a:hover { color: var(--ink); }

/* Versiones de la app */
.rel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rel-head h2 { margin: 0; font-size: 17px; }
.rel-up { display: flex; gap: 8px; align-items: center; flex: 1; justify-content: flex-end; min-width: 260px; }
.rel-up .input { max-width: 320px; }
.rel-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.rel-list li { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--line); }
.rel-info { flex: 1; min-width: 0; }
.rel-list li:first-child { border-top: 0; }
.rel-list .icon-btn { margin-left: auto; }
.rel-notes { color: var(--ink); font-size: 14px; margin-top: 2px; }
#rprog { margin-top: 12px; }
#rprog .bar { height: 8px; background: var(--surface); border-radius: 99px; overflow: hidden; }
#rprog .bar i { display: block; height: 100%; width: 0; background: var(--coral); transition: width 0.2s; }
#rprog small { color: var(--muted); }
.ver-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; }
.ver-bar select.input { width: auto; min-width: 200px; }
.ver-table td { vertical-align: middle; }
.ver-table .chip, .ver { white-space: nowrap; }
.ver-table .warn-text { display: block; margin-top: 2px; }
.ver-table tr.offline td { color: var(--muted); }
.ver { display: inline-block; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); }
.ver.ok { background: #e3f6ee; border-color: #bfe8d6; color: var(--ok); }
.ver.old { background: #fff4dc; border-color: #f3dca4; color: #8a5d00; }
.warn-text { color: #8a5d00; font-size: 13px; font-weight: 600; }
.upd { font-size: 13px; font-weight: 600; }
.upd.ok { color: var(--ok); }
.upd.wait { color: var(--navy-3); }
.upd.bad { color: var(--danger); }
.gh-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 14px; }

/* ==============================================================   ESTILO D — base clara y editorial, botones táctiles, detalles "vivos"
   (pantallas que laten, franja en vivo), modo oscuro opcional.
   ===================================================================== */
:root {
  --bg: #fbfaf7;
  --surface: #fbfaf7;
  --card: #ffffff;
  --ink: #14213d;
  --muted: #56607a;
  --line: #e4e0d7;
  --soft: #f2efe8;          /* fondos suaves (miniaturas, filas) */
  --field: #ffffff;
  --ok-bg: #e3f6ee; --ok-ink: #0e6b47;
  --warn-bg: #fff4dc; --warn-ink: #7a5300;
  --bad-bg: #ffe3db; --bad-ink: #9a2e15;
  --press: rgba(20, 33, 61, 0.9);   /* el "borde" que se hunde al presionar */
  --shadow: 0 1px 0 rgba(20, 33, 61, 0.04), 0 10px 26px -18px rgba(20, 33, 61, 0.35);
  --display: "Fraunces", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --spring: cubic-bezier(.3, 1.45, .5, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1224; --surface: #0b1224; --card: #111a33; --ink: #e7eaf3; --muted: #a9b3cc; --line: #25304f;
  --soft: #172243; --field: #0e1730;
  --ok-bg: #0f3a2b; --ok-ink: #6ee0b4; --warn-bg: #3a2c0b; --warn-ink: #f2c14e; --bad-bg: #44190f; --bad-ink: #ff9b85;
  --press: rgba(0, 0, 0, 0.6);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 14px 30px -18px rgba(0, 0, 0, 0.8);
  --navy-3: #8fa3d6; --ok: #4fd1a1; --danger: #ff8a7a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1224; --surface: #0b1224; --card: #111a33; --ink: #e7eaf3; --muted: #a9b3cc; --line: #25304f;
    --soft: #172243; --field: #0e1730;
    --ok-bg: #0f3a2b; --ok-ink: #6ee0b4; --warn-bg: #3a2c0b; --warn-ink: #f2c14e; --bad-bg: #44190f; --bad-ink: #ff9b85;
    --press: rgba(0, 0, 0, 0.6);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 14px 30px -18px rgba(0, 0, 0, 0.8);
    --navy-3: #8fa3d6; --ok: #4fd1a1; --danger: #ff8a7a;
    color-scheme: dark;
  }
}
body { background: var(--bg); color: var(--ink); transition: background .35s ease, color .35s ease; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--coral-ink); }

/* Tipografía: títulos con carácter, números técnicos */
.page-head h1, .auth-form h1, .auth-art h2, .modal-head h2, .empty h2, .card-head h2 { font-family: var(--display); font-weight: 500; letter-spacing: -0.02em; }
.page-head h1 { font-size: clamp(30px, 3.6vw, 42px); line-height: 1.04; }
.kpi-value { font-family: var(--display); font-weight: 500; font-size: 34px; }
.code-input, .ticker, kbd, .ver { font-family: var(--mono); }

/* Menú lateral claro, con píldoras */
.side { background: var(--bg); color: var(--ink); border-right: 1px solid var(--line); }
.brand { color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 21px; }
.brand small { color: var(--muted); font-family: var(--font); font-weight: 600; }
.brand svg circle:first-child { stroke: var(--ink); }
.nav a { color: var(--muted); border-radius: 999px; transition: background .2s ease, color .2s ease, transform .25s var(--spring); }
.nav a:hover { background: var(--soft); color: var(--ink); transform: translateX(3px); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.side-foot { color: var(--muted); }
.side-foot button { color: var(--ink); }
.top { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom-color: var(--line); }
.org-switch select, .input, select.input { background: var(--field); color: var(--ink); border-color: var(--line); }
.input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 22%, transparent); }

/* Barra de búsqueda (Ctrl K) y modo oscuro */
.search-btn { display: inline-flex; align-items: center; gap: 10px; min-width: 240px; min-height: 40px; padding: 8px 12px 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); cursor: pointer; font-size: 14px; }
.search-btn svg { width: 16px; height: 16px; }
kbd { margin-left: auto; font-size: 11px; border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--muted); }
.theme-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; }
.theme-btn svg { width: 18px; height: 18px; }

/* Franja en vivo */
.ticker-bar { background: #14213d; color: #c9d1e6; overflow: hidden; white-space: nowrap; font-size: 12px; padding: 7px 0; border-bottom: 1px solid #0b1224; }
.ticker { display: inline-flex; gap: 44px; padding-left: 24px; animation: tick var(--tick-s, 30s) linear infinite; }
.ticker-bar:hover .ticker { animation-play-state: paused; }
.ticker i { font-style: normal; }
.ticker .g { color: #4fd1a1; } .ticker .r { color: #ff8a6e; } .ticker .y { color: #f2c14e; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Botones táctiles: se levantan al pasar el mouse y se hunden al presionar */
.btn, .chip-btn, .search-btn, .theme-btn, .seg button { transition: transform .2s var(--spring), box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease; }
.btn { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn:hover, .chip-btn:hover, .search-btn:hover, .theme-btn:hover { transform: translateY(-2px); box-shadow: 0 3px 0 var(--press), 0 12px 22px -14px rgba(20, 33, 61, .55); border-color: var(--line); }
.btn:active, .chip-btn:active, .search-btn:active, .theme-btn:active { transform: translateY(2px) scale(.98); box-shadow: 0 0 0 var(--press); }
.btn.primary { background: var(--coral); border-color: var(--coral); color: #14213d; font-weight: 800; box-shadow: 0 2px 0 var(--press); }
.btn.primary:hover { background: #ff7c5e; border-color: #ff7c5e; color: #14213d; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { box-shadow: none; background: var(--soft); }
.btn[disabled], .btn[disabled]:hover { transform: none; box-shadow: none; }
.icon-btn { transition: background .2s ease, transform .2s var(--spring); }
.icon-btn:hover { background: var(--soft); transform: scale(1.08); }
.icon-btn:active { transform: scale(.94); }
.chip-btn { background: var(--card); color: var(--ink); }

/* Tarjetas que se levantan */
.card, .kpi, .media, .layout-card, .sched-card, .list, .empty, .upload, .item { background: var(--card); border-color: var(--line); }
.media, .layout-card, .sched-card, .kpi, .tv { transition: transform .35s var(--spring), box-shadow .35s ease; }
.media:hover, .layout-card:hover, .sched-card:hover, .kpi:hover { transform: translateY(-4px); box-shadow: 0 4px 0 var(--press), 0 24px 40px -26px rgba(20, 33, 61, .6); }
.tv:hover { transform: translateY(-5px); }
.tv:active, .media:active, .layout-card:active { transform: translateY(-1px) scale(.985); }
.tv .tv-frame img, .media .thumb img { transition: transform .6s var(--ease-out); }
.tv:hover .tv-frame img, .media:hover .thumb img { transform: scale(1.04); }
.kpi { border-top: 1px solid var(--line); }
.kpi.ok { box-shadow: inset 0 3px 0 var(--ok), var(--shadow); } .kpi.warn { box-shadow: inset 0 3px 0 var(--warn), var(--shadow); } .kpi.danger { box-shadow: inset 0 3px 0 var(--coral), var(--shadow); }
.list-item { border-color: var(--line); transition: background .2s ease; }
.list-item:hover { background: var(--soft); }
.table th, .table td { border-color: var(--line); }
.table tbody tr { transition: background .2s ease; }
.table tbody tr:hover { background: var(--soft); }

/* Pantallas en línea: el punto late */
.status.on::before { animation: live-ping 1.8s ease-out infinite; }
@keyframes live-ping { 0% { box-shadow: 0 0 0 0 rgba(23, 160, 107, .5); } 80%, 100% { box-shadow: 0 0 0 7px rgba(23, 160, 107, 0); } }

/* Entrada de cada sección: aparecen una tras otra con un pequeño rebote */
@keyframes pop-in { 0% { opacity: 0; transform: translateY(12px) scale(.96); } 65% { opacity: 1; transform: translateY(-2px) scale(1.01); } 100% { opacity: 1; transform: none; } }
.enter > *, .enter .screens > *, .enter .media-grid > *, .enter .layout-grid > *, .enter .kpis > *, .enter .sched > *, .enter .items > * { animation: pop-in .55s var(--spring) both; }
.enter > *:nth-child(2), .enter .screens > *:nth-child(2), .enter .media-grid > *:nth-child(2), .enter .layout-grid > *:nth-child(2), .enter .kpis > *:nth-child(2), .enter .sched > *:nth-child(2) { animation-delay: .05s; }
.enter > *:nth-child(3), .enter .screens > *:nth-child(3), .enter .media-grid > *:nth-child(3), .enter .layout-grid > *:nth-child(3), .enter .kpis > *:nth-child(3), .enter .sched > *:nth-child(3) { animation-delay: .1s; }
.enter > *:nth-child(4), .enter .screens > *:nth-child(4), .enter .media-grid > *:nth-child(4), .enter .layout-grid > *:nth-child(4), .enter .kpis > *:nth-child(4), .enter .sched > *:nth-child(4) { animation-delay: .15s; }
.enter > *:nth-child(5), .enter .screens > *:nth-child(5), .enter .media-grid > *:nth-child(5), .enter .layout-grid > *:nth-child(5), .enter .kpis > *:nth-child(5) { animation-delay: .2s; }
.enter > *:nth-child(6), .enter .screens > *:nth-child(6), .enter .media-grid > *:nth-child(6), .enter .layout-grid > *:nth-child(6) { animation-delay: .25s; }
.enter > *:nth-child(n+7), .enter .screens > *:nth-child(n+7), .enter .media-grid > *:nth-child(n+7), .enter .layout-grid > *:nth-child(n+7) { animation-delay: .3s; }

/* Ventanas: aparecen con rebote */
@keyframes dialog-in { 0% { opacity: 0; transform: translateY(18px) scale(.92); } 60% { opacity: 1; transform: translateY(-4px) scale(1.012); } 100% { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-back { background: rgba(11, 18, 36, .5); animation: fade-in .2s ease both; }
.modal { background: var(--bg); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 5px 0 var(--press), 0 40px 80px -30px rgba(11, 18, 36, .65); animation: dialog-in .45s var(--spring) both; }
@keyframes toast-in { 0% { opacity: 0; transform: translateY(16px) scale(.94); } 70% { opacity: 1; transform: translateY(-3px) scale(1.01); } 100% { transform: none; } }
.toast { animation: toast-in .45s var(--spring) both; border-radius: 14px; background: #14213d; box-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 18px 30px -16px rgba(0, 0, 0, .5); }

/* Superficies con color fijo → variables (modo oscuro) */
.thumb, .item .mini { background: var(--soft); }
.drop { background: var(--card); border-color: var(--line); }
.drop.over { background: var(--bad-bg); }
.pill.live, .ok-chip, .ver.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.pill.draft { background: var(--soft); color: var(--muted); }
.notice, .up-box.warn, .warn-chip, .ver.old { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.up-box.ok { background: var(--ok-bg); }
.warn-row td { background: var(--bad-bg); }
.warn-text { color: var(--warn-ink); }
.chip { background: var(--soft); border-color: var(--line); }
.check:hover { background: var(--soft); }
.subtabs a.on { color: var(--ink); }
.rank-bar { background: var(--soft); }
.chart .bar-mark { fill: var(--navy-3); }
.auth-form { background: var(--bg); }

/* Selector de vista (Tarjetas / Muro en vivo) */
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 2px; margin-bottom: 20px; }
.seg button { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 14px; border-radius: 999px; padding: 8px 16px; min-height: 38px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* Muro en vivo: todas las pantallas como cámaras */
.wall-live { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; background: #0b1224; padding: 6px; border-radius: 16px; }
.wall-live figure { position: relative; margin: 0; aspect-ratio: 16 / 9; background: #172243; border-radius: 8px; overflow: hidden; }
.wall-live img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wall-live figcaption { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11px; color: #fff; background: rgba(11, 18, 36, .66); padding: 3px 8px; border-radius: 6px; }
.wall-live .none { position: absolute; inset: 0; display: grid; place-items: center; color: #8e9ab8; font-size: 13px; }
.wall-live .live-dot { width: 7px; height: 7px; border-radius: 50%; background: #8e9ab8; }
.wall-live .live-dot.on { background: #4fd1a1; animation: live-ping 1.8s ease-out infinite; }
.wall-live .bar-refresh { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .15); }
.wall-live .bar-refresh i { display: block; height: 100%; background: #fff; transform-origin: left; animation: refill 30s linear infinite; }
@keyframes refill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Buscador rápido (Ctrl K) */
.palette-back { position: fixed; inset: 0; background: rgba(11, 18, 36, .45); z-index: 70; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade-in .15s ease both; }
.palette { width: min(620px, 100%); background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 5px 0 var(--press), 0 40px 80px -30px rgba(11, 18, 36, .7); overflow: hidden; animation: dialog-in .35s var(--spring) both; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 18px 20px; font-size: 18px; color: var(--ink); outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; cursor: pointer; }
.palette li[aria-selected="true"] { background: var(--soft); }
.palette li .k { margin-left: auto; font-size: 12px; color: var(--muted); }
.palette .none { padding: 18px; color: var(--muted); }

@media (max-width: 900px) {
  .side { background: var(--card); border-right: 0; border-top: 1px solid var(--line); }
  .nav a[aria-current="page"] { background: var(--ink); color: var(--bg); box-shadow: none; }
  .nav a:hover { transform: none; }
  .search-btn { min-width: 0; }
  .search-btn span, .search-btn kbd { display: none; }
  .top { flex-wrap: wrap; row-gap: 8px; }
  .top-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .search-btn { width: 40px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker { animation: none; }
}
.auth-art .brand, .auth-art .brand small { color: var(--cream); }
.auth-art .brand svg circle:first-child { stroke: #f4efe6; }
.auth-art .auth-loops svg circle { stroke: #1d2e54; }
/* Cuentas demo y clientes */
.demo-banner { background: var(--warn-bg); color: var(--warn-ink); padding: 8px clamp(16px, 3vw, 32px); font-size: 14px; border-bottom: 1px solid var(--line); }
.demo-banner a { color: inherit; font-weight: 700; }
.pill.demo { background: var(--warn-bg); color: var(--warn-ink); }
.count-dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--coral); color: #14213d; font-size: 12px; font-weight: 800; }
.modal .seg { margin-bottom: 16px; }
/* Vista previa antes de publicar */
.pv-wrap { display: flex; flex-direction: column; align-items: center; margin: 4px 0 14px; }
.pv-tv { width: 100%; background: #0b1224; border: 10px solid #1b2440; border-radius: 14px; box-shadow: 0 24px 40px -24px rgba(11, 18, 36, .7); overflow: hidden; }
.pv-tv.portrait { width: auto; height: min(62vh, 640px); }
.pv-tv.portrait .pv-stage { height: 100%; width: auto; }
.pv-stage { position: relative; width: 100%; overflow: hidden; }
.pv-stand { width: 26%; height: 10px; background: #1b2440; border-radius: 0 0 8px 8px; }
.pv-zone { position: absolute; overflow: hidden; }
.pv-layer { position: absolute; inset: 0; }
.pv-layer img, .pv-layer video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.pv-layer iframe { width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.pv-empty, .pv-ph { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; color: #c9d1e6; background: #111a33; font-size: 14px; padding: 12px; }
.pv-ph strong { font-family: var(--display); font-size: 22px; color: #fff; font-weight: 500; }
.pv-ph small { color: #8e9ab8; word-break: break-all; }
.pv-ph em { color: var(--coral); font-style: normal; font-weight: 700; font-size: 12px; margin-top: 6px; }
.pv-ctl { display: flex; align-items: center; gap: 10px; }
.pv-ctl .icon-btn { font-size: 24px; line-height: 1; }
.pv-info { flex: 1; min-width: 0; }
.pv-info strong { font-size: 15px; }
.pv-info .bar { margin-top: 6px; }
.pv-info .bar i { transition: none; }
/* Señal en vivo */
.live-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 6px; }
.live-kind { position: relative; display: flex; cursor: pointer; }
.live-kind input { position: absolute; opacity: 0; }
.live-kind span { flex: 1; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--card); transition: border-color .2s ease, box-shadow .2s ease, transform .2s var(--spring); }
.live-kind small { color: var(--muted); }
.live-kind:hover span { transform: translateY(-2px); }
.live-kind input:checked + span { border-color: var(--coral); box-shadow: 0 0 0 2px var(--coral) inset; }
.live-kind input:focus-visible + span { outline: 3px solid var(--coral); outline-offset: 2px; }
.thumb.live { background: #14213d; color: #ff8a6e; }
.thumb.live svg { width: 40px; height: 40px; }
.thumb.live .kind { background: var(--coral); color: #14213d; }

/* Enlace a la Academia en la barra lateral */
.side-academy { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; padding: 10px 12px; border-radius: var(--radius-s); color: var(--muted); text-decoration: none; font-weight: 600; border: 1px dashed rgba(255, 255, 255, .18); transition: background .2s ease, transform .25s var(--spring); }
.side-academy svg { width: 20px; height: 20px; flex: none; }
.side-academy:hover { background: var(--soft); color: var(--ink); transform: translateX(2px); }
.side-academy { border-color: var(--line); }
@media (max-width: 900px) { .side-academy { display: none; } }

/* ---------- Conexión y cámara en la ficha de una pantalla ---------- */
.diag { margin: 14px 0; padding: 12px 14px; border-radius: var(--radius-s); background: var(--soft, rgba(20, 33, 61, .04)); border: 1px solid var(--line); }
.diag h3 { margin: 0 0 6px; font-size: 15px; }
.diag ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.diag li.now { font-weight: 600; }
.diag-warn { margin: 0 0 8px; font-size: 14px; padding: 8px 10px; border-radius: 8px; background: #fff4dc; color: #6b4a00; }
:root[data-theme="dark"] .diag-warn { background: #3a2c0b; color: #f2c14e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .diag-warn { background: #3a2c0b; color: #f2c14e; } }
.diag.aud .check { padding-left: 0; font-weight: 600; }
.cam-ok { color: #0e6b47; font-weight: 600; }
.cam-bad { color: #b8361a; font-weight: 600; }

/* ---------- Audiencia ---------- */
.aud-empty h2 { margin-top: 0; }
.steps-list { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 6px; }
.aud-cams { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0 0 12px; font-size: 14px; }
.aud-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 16px; }
.aud-grid .card { margin: 0; }
.aud-grid + .card { margin-top: 16px; }
.zone-map { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; aspect-ratio: 16 / 9; padding: 8px; border-radius: 12px; background: #14213d; }
.zone-map div { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 6px; color: #fff; text-align: center;
  background: rgba(255, 107, 74, calc(.08 + var(--a) * .85)); transition: transform .25s var(--spring, ease); }
.zone-map div:hover { transform: scale(1.04); }
.zone-map b { font-size: clamp(16px, 2.2vw, 24px); line-height: 1; }
.zone-map span { font-size: 11px; opacity: .85; margin-top: 4px; }
.mood-bar { display: flex; height: 26px; border-radius: 999px; overflow: hidden; background: var(--line); }
.mood-bar i { display: block; height: 100%; }
.mood-bar .h, .mood-leg .h::before { background: #f2c14e; }
.mood-bar .n, .mood-leg .n::before { background: #7d8bb0; }
.mood-leg { display: flex; gap: 18px; margin-top: 10px; font-size: 14px; }
.mood-leg span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
=======
/* Ajuste de imágenes y videos en la vista previa (igual que en la pantalla) */
.pv-zone[data-fit="cover"] .pv-layer img, .pv-zone[data-fit="cover"] .pv-layer video { object-fit: cover; }
.pv-zone[data-fit="fill"] .pv-layer img, .pv-zone[data-fit="fill"] .pv-layer video { object-fit: fill; }
.sync.warn { color: #8a5a00; }
.sync.warn small, .sync small.warn-t { display: block; margin-top: 2px; }
.sync small.warn-t { color: #8a5a00; }
:root[data-theme="dark"] .sync.warn, :root[data-theme="dark"] .sync small.warn-t { color: #f2c14e; }
.dl-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.dl-list li { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); }

/* ---------- Ajustar imagen ---------- */
.fit-ed { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 820px) { .fit-ed { grid-template-columns: 1fr; } }
.fit-stage-wrap { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.fit-canvas { display: block; border-radius: 6px; background: #0b1224; box-shadow: 0 0 0 8px #0b1224; touch-action: none; outline: none; }
.fit-canvas:focus-visible { box-shadow: 0 0 0 8px #0b1224, 0 0 0 11px var(--coral); }
.fit-side .seg { margin-bottom: 0; display: flex; width: 100%; border-radius: 14px; }
.fit-side .seg button { flex: 1; border-radius: 10px; }
.fit-side .seg button { font-size: 13px; padding: 6px 12px; }
.fit-side input[type="range"] { width: 100%; accent-color: var(--coral); }
.warn-btn { background: #fff4dc; color: #7a5300; border: 1px solid #f2c14e; }
:root[data-theme="dark"] .warn-btn { background: #3a2c0b; color: #f2c14e; }

/* ==========================================================================
   Look & Feel «Sala de control» (oct 2026): tipografía de señalización (Big Shoulders + Barlow),
   paleta neutra, esquinas rectas y movimiento sobrio. Reemplaza el estilo anterior (crema + serif).
   ========================================================================== */
:root {
  --display: "Big Shoulders Display", "Barlow Condensed", "Arial Narrow", sans-serif;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --bg: #f4f4f2; --surface: #f4f4f2; --card: #ffffff; --ink: #111317; --muted: #555a62; --line: #e1e1dc;
  --soft: #ecece8; --field: #ffffff; --cream: #ffffff;
  --navy: #111317; --navy-2: #24272d; --navy-3: #3a3f47;
  --coral: #e8462a; --coral-ink: #b8321a;
  --press: rgba(17, 19, 23, 0.85);
  --shadow: 0 1px 0 rgba(17, 19, 23, 0.05);
  --spring: cubic-bezier(.2, .8, .2, 1);
  --radius-s: 6px; --radius-m: 8px; --radius-l: 10px;
}
:root[data-theme="dark"] {
  --bg: #0e0f11; --surface: #0e0f11; --card: #17191c; --ink: #ececea; --muted: #a3a6ad; --line: #2a2d33;
  --soft: #1e2125; --field: #121417; --navy: #ececea; --navy-2: #2a2d33; --navy-3: #c4c7cc;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f11; --surface: #0e0f11; --card: #17191c; --ink: #ececea; --muted: #a3a6ad; --line: #2a2d33;
    --soft: #1e2125; --field: #121417; --navy: #ececea; --navy-2: #2a2d33; --navy-3: #c4c7cc;
  }
}
body { font-family: var(--font); font-size: 15.5px; }
.page-head h1, .auth-form h1, .auth-art h2, .modal-head h2, .empty h2, .card-head h2 { font-family: var(--display); font-weight: 800; letter-spacing: 0.005em; line-height: 0.98; }
.page-head h1 { font-size: clamp(38px, 4.4vw, 56px); }
.card-head h2, .modal-head h2 { font-size: 26px; }
.kpi-value { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
.brand { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: 0.02em; text-transform: uppercase; }
.brand small { text-transform: none; letter-spacing: 0; }
.nav a, .search-btn, .theme-btn, .chip-btn, .seg, .seg button, .btn, .input, select.input { border-radius: var(--radius-s); }
.nav a:hover { transform: none; }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.btn:hover, .chip-btn:hover, .search-btn:hover, .theme-btn:hover { transform: none; box-shadow: none; border-color: var(--ink); }
.btn:active, .chip-btn:active, .search-btn:active, .theme-btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 700; box-shadow: none; }
.btn.primary:hover { background: var(--navy-2); border-color: var(--navy-2); color: var(--bg); }
:root[data-theme="dark"] .btn.primary:hover { background: #ffffff; color: #111317; }
.ticker-bar { background: #111317; border-bottom-color: #000; }
.auth-art { background: #111317; color: #ffffff; }
.auth-art h2 { font-size: clamp(44px, 5.4vw, 76px); max-width: 14ch; text-transform: uppercase; }
.auth-art p { color: #b9bcc2; }
.rot { display: inline-block; transition: opacity .38s ease, transform .38s ease; }
.rot-out { opacity: 0; transform: translateY(-10px); }
.rot-line { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--muted); margin: 6px 0 0; min-height: 1.3em; }
@media (prefers-reduced-motion: reduce) { .rot { transition: none; } }
.side-academy { color: var(--muted); border-color: var(--line); }
.side-academy:hover { background: var(--soft); color: var(--ink); transform: none; }
.auth-art h2 { min-height: 3.1em; }
/* Contenido según la audiencia */
.aud-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 2px 8px; border: 1px dashed var(--line); border-radius: var(--radius-s); background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; width: max-content; }
.aud-chip svg { width: 14px; height: 14px; }
.aud-chip.on { border-style: solid; border-color: var(--coral); color: var(--coral-ink); background: color-mix(in srgb, var(--coral) 8%, transparent); }
.item .name { display: flex; flex-direction: column; min-width: 0; }
.age-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.age-chip { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 6px 10px; }
.age-chip:has(input:checked) { border-color: var(--ink); background: var(--soft); }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.sex-bar { display: flex; height: 30px; border-radius: var(--radius-s); overflow: hidden; background: var(--line); }
.sex-bar i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 13px; font-weight: 700; color: #fff; min-width: 0; overflow: hidden; }
.sex-bar .f { background: #b8321a; } .sex-bar .m { background: #2a2d33; }

/* ---- Plan del cliente: interruptores por característica ---- */
.plan-box { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 14px 16px; margin: 4px 0 16px; }
.plan-box .card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.plan-presets { margin-bottom: 10px; flex-wrap: wrap; }
.feat-list { display: grid; gap: 2px; }
.feat { display: flex; align-items: center; gap: 12px; padding: 8px 2px; cursor: pointer; }
.feat + .feat { border-top: 1px solid var(--line); }
.feat small { display: block; color: var(--muted); font-size: 13px; }
.feat.off { opacity: .55; cursor: not-allowed; }
.switch { position: relative; flex: 0 0 auto; width: 40px; height: 22px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: inherit; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .15s ease; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s ease; }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---- Barra lateral: que siempre se pueda llegar a todas las secciones ---- */
@media (min-width: 901px) {
  .side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
  .side-foot { flex: none; }
}
/* Pantallas de laptop (poca altura): la barra más compacta para que quepa sin bajar */
@media (min-width: 901px) and (max-height: 860px) {
  .side { padding: 14px 12px; }
  .brand { padding-bottom: 14px; }
  .nav a, .side-academy { padding: 7px 12px; }
  .side-foot { padding: 8px 12px; }
}
@media (min-width: 901px) and (max-height: 700px) {
  .nav a, .side-academy { padding: 5px 12px; font-size: 14px; }
  .brand { padding-bottom: 8px; }
}
/* Móvil: la barra inferior se desliza de lado cuando hay muchas secciones */
@media (max-width: 900px) {
  .nav { justify-content: flex-start; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: 0 0 auto; min-width: 64px; }
}

/* ---- Biblioteca: seleccionar varias imágenes para ajustarlas de una vez ---- */
.media { position: relative; }
.media .pick { position: absolute; top: 8px; left: 8px; z-index: 2; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); cursor: pointer; }
.media .pick input { width: 18px; height: 18px; margin: 0; cursor: pointer; accent-color: var(--ink); }
.media.picked { outline: 3px solid var(--ink); outline-offset: -1px; }
.pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); }
.batch-prev { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.batch-prev canvas { border: 1px solid var(--line); border-radius: 6px; background: repeating-conic-gradient(var(--soft) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.fit-side.batch { display: grid; gap: 4px; }

/* ---- Biblioteca en el teléfono: lista compacta con el nombre completo ---- */
@media (max-width: 600px) {
  .media-grid { grid-template-columns: 1fr; gap: 10px; }
  .media { display: grid; grid-template-columns: 112px 1fr; grid-template-rows: auto 1fr; align-items: start; }
  .media .thumb { grid-row: 1 / span 2; aspect-ratio: 16 / 10; margin: 8px 0 8px 8px; border-radius: 8px; overflow: hidden; }
  .media .thumb .kind { font-size: 10px; left: 6px; bottom: 6px; padding: 1px 6px; }
  .media .thumb svg { width: 26px; height: 26px; }
  .media-body { padding: 10px 10px 4px; min-width: 0; }
  .media-body strong { white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
  .media-actions { padding: 0 6px 8px; gap: 2px 4px; flex-wrap: wrap; }
  .media-actions .btn { padding: 5px 7px; font-size: 13px; min-height: 32px; }
  .media .pick { top: 12px; left: 12px; width: 26px; height: 26px; }
  .pick-bar { padding: 10px; }
  .pick-bar > .muted { flex-basis: 100%; }
  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   Look & Feel «Centro de monitoreo · Medianoche» (oct 2026, diseño P1).
   Saira Semi Condensed + JetBrains Mono · azul medianoche con acento cian (noche)
   y gris azulado con azul petróleo (día) · el coral de Loopling solo en la marca.
   El acento nunca se parece a los colores de estado (verde, ámbar, rojo).
   ========================================================================== */
:root {
  --display: "Saira Semi Condensed", "Arial Narrow", sans-serif;
  --font: "Saira Semi Condensed", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --bg: #E9EDF3; --surface: #E9EDF3; --card: #FFFFFF; --head: #F4F6F9; --ink: #0F1A2A; --muted: #50607A; --line: #D3DAE4;
  --soft: #E3E8EF; --field: #FFFFFF; --cream: #FFFFFF;
  --navy: #0F1A2A; --navy-2: #1E2940; --navy-3: #3A4A66;
  --accent: #0B6E8A; --on-accent: #FFFFFF;
  --ok: #0E7A4F; --warn: #9A5D00; --danger: #BE2B2B; --off: #6A768A;
  --ok-bg: #DDF3E8; --ok-ink: #0B5E3C; --warn-bg: #FBEFD6; --warn-ink: #6E4300; --bad-bg: #FBE3E1; --bad-ink: #9B1F1F;
  --coral: #FF6B4A; --coral-ink: #C2401F;
  --press: rgba(15, 26, 42, 0.85);
  --shadow: none;
  --radius-s: 4px; --radius-m: 4px; --radius-l: 6px;
}
:root[data-theme="dark"] {
  --bg: #070B14; --surface: #070B14; --card: #0E1526; --head: #0C1220; --ink: #DCE3EE; --muted: #8996AC; --line: #1E2940;
  --soft: #1A2338; --field: #0C1220;
  --navy: #DCE3EE; --navy-2: #1E2940; --navy-3: #9FB0CC;
  --accent: #3EC6E0; --on-accent: #06121A;
  --ok: #4CD39B; --warn: #F2B33D; --danger: #F06A6A; --off: #6F7B90;
  --ok-bg: #0E2F25; --ok-ink: #6EE0B4; --warn-bg: #33270A; --warn-ink: #F2C14E; --bad-bg: #3A1414; --bad-ink: #FF9B8F;
  --coral-ink: #FF8A70;
  --press: rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070B14; --surface: #070B14; --card: #0E1526; --head: #0C1220; --ink: #DCE3EE; --muted: #8996AC; --line: #1E2940;
    --soft: #1A2338; --field: #0C1220;
    --navy: #DCE3EE; --navy-2: #1E2940; --navy-3: #9FB0CC;
    --accent: #3EC6E0; --on-accent: #06121A;
    --ok: #4CD39B; --warn: #F2B33D; --danger: #F06A6A; --off: #6F7B90;
    --ok-bg: #0E2F25; --ok-ink: #6EE0B4; --warn-bg: #33270A; --warn-ink: #F2C14E; --bad-bg: #3A1414; --bad-ink: #FF9B8F;
    --coral-ink: #FF8A70;
    --press: rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}
body { font-family: var(--font); font-size: 15.5px; letter-spacing: 0.005em; }
:focus-visible { outline-color: var(--accent); }
a:hover { color: var(--accent); }

/* Títulos: condensados, firmes, sin mayúsculas forzadas */
.page-head h1, .auth-form h1, .modal-head h2, .empty h2, .card-head h2 { font-family: var(--display); font-weight: 700; letter-spacing: 0.01em; line-height: 1.02; }
.page-head h1 { font-size: clamp(30px, 3.2vw, 40px); }
.card-head h2, .modal-head h2 { font-size: 22px; }
.auth-art h2 { font-family: var(--display); font-weight: 700; text-transform: none; letter-spacing: 0; }

/* Barra lateral y encabezado: paneles de consola */
.side { background: var(--head); border-right: 1px solid var(--line); }
.brand { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: 0.08em; }
.brand svg circle:first-of-type { stroke: var(--ink); }
.brand svg circle:last-of-type { stroke: var(--coral); }
.nav a { border-radius: var(--radius-s); color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--soft); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--soft); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.top { background: var(--head); backdrop-filter: none; border-bottom: 1px solid var(--line); padding-top: 12px; padding-bottom: 12px; }
.clock { font-family: var(--mono); font-weight: 500; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; display: inline-flex; align-items: baseline; gap: 6px; }
.clock small { font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; }
@media (max-width: 900px) { .clock { display: none; } }
.ticker-bar { background: var(--head); color: var(--muted); border-bottom: 1px solid var(--line); font-family: var(--mono); }

/* Botones: rectos, acento cian/petróleo en lo principal */
.btn, .chip-btn, .search-btn, .theme-btn, .seg, .seg button, .input, select.input { border-radius: var(--radius-s); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover, :root[data-theme="dark"] .btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); filter: brightness(1.08); }
.btn:hover, .chip-btn:hover, .search-btn:hover, .theme-btn:hover { border-color: var(--accent); }
.seg button[aria-pressed="true"] { background: var(--soft); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

/* Tarjetas y paneles: líneas finas, sin sombras */
.card, .kpi, .media, .list-item, .tv, .plan-box, .pick-bar { border-radius: var(--radius-l); box-shadow: none; }
.card-head { border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.kpi { border-top: 1px solid var(--line); gap: 4px; }
.kpi.ok .kpi-value { color: var(--ok); }
.kpi.warn .kpi-value { color: var(--warn); }
.kpi.danger .kpi-value { color: var(--danger); }
.kpi-label { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.kpi-value { font-family: var(--display); font-weight: 600; font-size: 34px; letter-spacing: 0; }

/* Estados: punto con halo, texto técnico */
.status { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: 0.02em; }
.status.on::before { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.pill { border-radius: 3px; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; }

/* Tablas con cabecera de consola */
.table th { font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.table td { font-variant-numeric: tabular-nums; }

/* Inicio de sesión: panel de marca en medianoche con el coral de Loopling */
.auth-art { background: #070B14; color: #DCE3EE; }
.auth-art p { color: #8996AC; }
/* El coral queda para la marca; en la interfaz, el acento del tema */
.check input, .media input[type="checkbox"] { accent-color: var(--accent); }
.drop.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.bar > i { background: var(--accent); }
.day input:focus-visible + span, .preset:focus-within { outline-color: var(--accent); }
.chart .bar-mark.hl { fill: var(--accent); }
.preset.on { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.le-zone.sel { box-shadow: 0 0 0 3px var(--accent); }
.le-zone:focus-visible { box-shadow: 0 0 0 3px var(--accent), 0 0 0 6px #fff; }
.le-h { border-color: var(--accent); }
.zone-pick.on { box-shadow: inset 3px 0 0 var(--accent); }
.wp:hover { border-color: var(--accent); }
.wp svg { color: var(--accent); }
.subtabs a.on { border-bottom-color: var(--accent); }
.aud-chip.on { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.kpi.danger { border-top-color: var(--danger); }

/* ---- Pantallas · Pauta en vivo ---- */
.pauta-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; background: var(--head, var(--card)); border-bottom: 1px solid var(--line); }
.pauta-bar .seg { margin: 0; }
.pauta-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
.pauta-range button { font-family: var(--mono); font-size: 12px; min-height: 32px; padding: 4px 12px; }
.pauta-scroll { overflow-x: auto; }
.pauta-scroll > div { min-width: 920px; }
.pauta-grid { display: grid; grid-template-columns: 210px 290px minmax(0, 1fr); }
.pauta-head { border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.pauta-head > span { padding: 9px 16px; }
.pauta-ticks { position: relative; height: 14px; margin: 0 12px; padding: 9px 0 !important; }
.pauta-ticks i { position: absolute; transform: translateX(-50%); font-style: normal; white-space: nowrap; }
.pauta-ticks i:first-child { transform: none; } .pauta-ticks i:last-child { transform: translateX(-100%); }
.pauta-row { border-bottom: 1px solid var(--line); min-height: 72px; cursor: pointer; }
.pauta-row:hover { background: var(--soft); }
.pauta-row:last-child { border-bottom: 0; }
.pauta-name { display: flex; gap: 10px; padding: 12px 16px; min-width: 0; }
.pauta-name > div { min-width: 0; display: flex; flex-direction: column; }
.pauta-name strong { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pauta-name span { font-size: 13px; color: var(--muted); }
.pdot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; background: var(--off); }
.pdot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.pdot.warn { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 25%, transparent); }
.pdot.bad { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 25%, transparent); }
.pauta-now { padding: 11px 12px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pauta-now strong { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbar { display: block; height: 3px; border-radius: 2px; background: var(--soft); overflow: hidden; }
.pbar i { display: block; height: 100%; background: var(--ok); transition: width 1s linear; }
.pbar i.warn { background: var(--warn); } .pbar i.bad { background: var(--danger); } .pbar i.idle { background: var(--off); }
.pauta-meta { font-family: var(--mono); font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pauta-aud { color: var(--accent); }
.pauta-line { position: relative; margin: 0 12px; background-image: linear-gradient(90deg, color-mix(in srgb, var(--line) 70%, transparent) 1px, transparent 1px); background-size: calc(100% / 6) 100%; }
.pblock { position: absolute; top: 50%; height: 26px; transform: translateY(-50%); box-sizing: border-box; border-radius: 3px; padding: 0 8px; display: flex; align-items: center; overflow: hidden; white-space: nowrap; font-size: 12px; font-weight: 500; color: var(--ink); background: color-mix(in srgb, var(--h, var(--accent)) 26%, var(--card)); border: 1px solid color-mix(in srgb, var(--h, var(--accent)) 70%, var(--card)); border-left-width: 3px; }
.pblock.off { background: repeating-linear-gradient(135deg, var(--soft) 0 6px, transparent 6px 12px); border-color: var(--line); color: var(--muted); }
.pblock.empty { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.pnow { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--danger); }
.pnow::before { content: ""; position: absolute; top: 0; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
@media (max-width: 600px) { .pauta-grid { grid-template-columns: 170px 230px minmax(420px, 1fr); } }
/* Leyenda de colores (semáforo) */
.pauta-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink); }
.pauta-legend li { display: inline-flex; align-items: center; gap: 8px; }
.pauta-legend .pdot { margin-top: 0; }
.lg-off { width: 22px; height: 12px; border-radius: 2px; border: 1px solid var(--line); background: repeating-linear-gradient(135deg, var(--soft) 0 4px, transparent 4px 8px); }
.lg-now { width: 2px; height: 16px; background: var(--danger); position: relative; margin: 0 4px; }
.lg-now::before { content: ""; position: absolute; top: -2px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.wall-legend { margin: -6px 0 14px; }
.pauta-legend-row { padding: 10px 16px; border-bottom: 1px solid var(--line); }

/* ==========================================================================
   Centro de monitoreo (P1): menú superior en computadoras; «Más» con las demás secciones.
   ========================================================================== */
.nav-more { position: relative; }
.nav-more > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-s); color: var(--muted); font-weight: 500; cursor: pointer; }
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary svg { width: 20px; height: 20px; flex: none; }
.nav-more > summary:hover, .nav-more[open] > summary { background: var(--soft); color: var(--ink); }
.nav-more > summary[aria-current="page"] { color: var(--ink); font-weight: 600; }
.more-menu { position: absolute; z-index: 30; min-width: 240px; padding: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .45); display: flex; flex-direction: column; gap: 2px; }
.more-menu a, .more-menu button { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; font-weight: 500; background: none; border: 0; text-align: left; cursor: pointer; font: inherit; }
.more-menu a:hover, .more-menu button:hover { background: var(--soft); }
.more-menu a[aria-current="page"] { background: var(--soft); box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
.more-menu svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.more-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }
.more-menu button { color: var(--muted); font-size: 14px; }

@media (min-width: 901px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; overflow: visible; flex-direction: row; align-items: stretch; gap: 8px; padding: 0 22px; background: var(--head); border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 14px 0 0; margin: 0; font-size: 19px; }
  .brand > div small { display: none; }
  .brand svg { width: 34px; }
  .nav { flex-direction: row; flex-wrap: nowrap; gap: 0; align-items: stretch; flex: 1; min-width: 0; }
  .nav > a, .nav-more > summary { padding: 0 13px; min-height: 56px; border-radius: 0; gap: 8px; font-size: 15.5px; white-space: nowrap; }
  .nav > a svg, .nav-more > summary svg { display: none; }
  .nav > a:hover, .nav-more > summary:hover, .nav-more[open] > summary { background: transparent; color: var(--ink); }
  .nav > a[aria-current="page"], .nav-more > summary[aria-current="page"] { background: transparent; color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
  .nav-more > summary::after { content: "▾"; font-size: 11px; margin-left: -2px; }
  .nav-more { display: flex; }
  .more-menu { top: 100%; left: 0; margin-top: 6px; }
  .more-menu svg { display: block; }
  .side-academy, .side-foot { display: none; }
  .top { position: static; padding: 10px 22px; }
  .content { padding-top: 22px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .nav > a, .nav-more > summary { padding: 0 9px; font-size: 14.5px; }
  .brand > div { display: none; }
}
@media (max-width: 900px) {
  .nav-more { flex: 0 0 auto; }
  .nav-more > summary { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 4px; min-width: 64px; }
  .more-menu { position: fixed; bottom: 76px; right: 8px; left: auto; }
}

/* ---- Consola de monitoreo (Pantallas · Pauta en vivo) ---- */
.console { display: flex; flex-direction: column; gap: 14px; }
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.kp { background: var(--card); padding: 14px 16px; display: flex; align-items: flex-end; gap: 10px; min-width: 0; }
.kp > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kp-l { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kp-v { font-family: var(--display); font-weight: 600; font-size: 32px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kp-s { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kp.ok .kp-v { color: var(--ok); } .kp.warn .kp-v { color: var(--warn); } .kp.bad .kp-v { color: var(--danger); } .kp.acc .kp-v { color: var(--accent); }
.spark { width: 84px; height: 30px; flex: none; }
.spark polyline { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; opacity: .8; }
.spark.acc polyline { stroke: var(--accent); opacity: 1; }
.console-body { display: grid; grid-template-columns: 230px minmax(0, 1fr) 270px; gap: 14px; align-items: start; }
.console-body > .card { margin: 0; min-width: 0; }
.c-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.c-head { margin: 0; padding: 10px 14px; background: var(--head, var(--card)); border-bottom: 1px solid var(--line); font-family: var(--mono) !important; font-weight: 500 !important; font-size: 11px !important; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.c-head b { font-weight: 500; } .c-head b.bad { color: var(--danger); } .c-head b.ok { color: var(--ok); }
.br { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.br:last-child { border-bottom: 0; }
.br-h { display: flex; justify-content: space-between; gap: 8px; }
.br-h strong { font-weight: 600; font-size: 15.5px; }
.br-c { font-family: var(--mono); font-size: 12px; } .br-c.on { color: var(--ok); } .br-c.warn { color: var(--warn); } .br-c.bad { color: var(--danger); } .br-c.idle { color: var(--muted); }
.br-cells { display: flex; gap: 3px; }
.br-cells i { flex: 1; height: 6px; border-radius: 1px; background: var(--off); }
.br-cells i.on { background: var(--ok); } .br-cells i.warn { background: var(--warn); } .br-cells i.bad { background: var(--danger); }
.br-n { font-size: 13px; color: var(--muted); }
.c-events ol { list-style: none; margin: 0; padding: 0; }
.c-events li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 1px 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.c-events li:last-child { border-bottom: 0; }
.ev-t { font-family: var(--mono); font-size: 12px; color: var(--muted); grid-row: span 2; padding-top: 2px; }
.c-events strong { font-weight: 600; font-size: 14px; } .c-events strong.bad { color: var(--danger); } .c-events strong.muted { color: var(--muted); }
.ev-x { font-size: 13px; color: var(--muted); }
.ev-empty { display: block !important; color: var(--muted); font-size: 13.5px; }
.pauta-now-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; padding-left: 10px; }
.pauta-now-wrap .pauta-now { flex: 1; padding-left: 0; }
.pthumb { flex: none; width: 56px; height: 32px; border-radius: 2px; background: color-mix(in srgb, var(--h, var(--accent)) 45%, var(--card)) center / cover no-repeat; outline: 1px solid var(--line); }
.pauta-grid { grid-template-columns: 200px 310px minmax(0, 1fr); }
@media (max-width: 1400px) { .console-body { grid-template-columns: minmax(0, 1fr) 260px; } .c-branches { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } .c-branches .c-head { grid-column: 1 / -1; } .c-branches > div { display: contents; } .br { border-right: 1px solid var(--line); } }
@media (max-width: 1100px) { .console-body { grid-template-columns: minmax(0, 1fr); } }
/* La consola usa todo el ancho de la pantalla; el resto de secciones sigue centrado y legible */
@media (min-width: 901px) { .content { max-width: 1760px; margin: 0 auto; padding-left: 28px; padding-right: 28px; } }
.top { max-width: none; }
@media (max-width: 900px) {
  .more-menu a, .more-menu button { flex-direction: row; justify-content: flex-start; font-size: 15px; padding: 10px 12px; min-width: 0; gap: 12px; }
  .more-menu { min-width: 230px; max-height: 70vh; overflow-y: auto; }
}
/* Licencia y bitácora de equipos */
code.lic { font-family: var(--mono); font-size: 13px; padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; background: var(--soft); }
.eq-log { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.eq-log h3 { margin: 0 0 8px; font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.eq-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.steps-sm { margin: 0 0 12px; padding-left: 20px; color: var(--muted); }
.offl { font-family: var(--mono); font-size: 11px !important; margin-top: 3px; letter-spacing: .01em; }
.offl.ok { color: var(--ok) !important; } .offl.warn { color: var(--warn) !important; }

/* ---- Tutorial guiado ---- */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour-spot { position: fixed; border-radius: 6px; box-shadow: 0 0 0 9999px rgba(4, 8, 16, 0.62); outline: 2px solid var(--accent); transition: all .3s var(--ease-out, ease); pointer-events: none; }
.tour-card { position: fixed; width: min(380px, calc(100vw - 28px)); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 16px 18px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .6); transition: left .3s ease, top .3s ease; }
.tour-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.tour-n { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tour-card h2 { margin: 2px 0 6px; font-family: var(--display); font-weight: 700; font-size: 22px; line-height: 1.1; }
.tour-card p { margin: 0 0 12px; color: var(--muted); line-height: 1.5; }
.tour-dots { display: flex; gap: 5px; margin-bottom: 12px; }
.tour-dots i { width: 14px; height: 3px; border-radius: 2px; background: var(--line); }
.tour-dots i.past { background: color-mix(in srgb, var(--accent) 45%, var(--line)); } .tour-dots i.on { background: var(--accent); width: 24px; }
.tour-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-actions > span { flex: 1; }
.tour-skip { background: none; border: 0; padding: 6px 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
.lang-select { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 4px 0 8px; border: 1px solid var(--line); border-radius: var(--radius-s); color: var(--muted); }
.lang-select svg { width: 14px; height: 14px; }
.lang-select select { border: 0; background: transparent; color: var(--ink); font: 600 13px var(--font); cursor: pointer; min-height: 30px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spark.ok polyline { stroke: var(--ok); opacity: 1; }

/* Idioma en las pantallas de acceso */
.auth-form { position: relative; }
.auth-lang { position: absolute; top: 16px; right: 16px; }
.lang-select select option { color: #111; }
@media (max-width: 900px) { .top-actions .lang-select { padding-left: 6px; } .top-actions .lang-select svg { display: none; } }

/* Versión liviana de los videos (TVs con poca memoria) */
.media-body .lite { display: block; margin-top: 4px; font-family: var(--mono, ui-monospace, monospace); font-size: 11px; letter-spacing: 0.02em; }
.media-body .lite.ok { color: var(--ok); }
.media-body .lite.wait { color: var(--warn); }
.media-body .lite.bad { color: var(--muted); }
