:root {
  --bg: #f4f5fb; --surface: #ffffff; --surface2: #eef0f8; --text: #141a33; --muted: #5d6585; --line: #e1e4f0;
  --primary: #4338ca; --primary-ink: #ffffff; --primary-soft: #e8e7fb; --accent: #14b8a6;
  --ok: #16a34a; --ok-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7; --err: #dc2626; --err-soft: #fee2e2;
  --track: #e6e8f3; --shadow: 0 1px 2px rgba(20,26,51,.06), 0 8px 24px rgba(20,26,51,.06); --r: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0d1020; --surface: #161a30; --surface2: #1e2340; --text: #eceffd; --muted: #9aa3c7; --line: #2a3050;
    --primary: #7c78f5; --primary-soft: #26275a; --ok-soft: #12351f; --warn-soft: #3a2a0c; --err-soft: #3b1518; --track: #262c4a; --shadow: none; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
input[type=checkbox] { width: 18px; height: 18px; padding: 0; accent-color: var(--primary); }
.muted { color: var(--muted); } .tiny { font-size: 12.5px; } .center { text-align: center; }
.ico { flex: none; vertical-align: middle; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.pad { padding: 18px; }
.grow { flex: 1; }
[hidden] { display: none !important; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 12px; border: 1.5px solid transparent; font-weight: 600; cursor: pointer; background: var(--surface2); transition: transform .08s, filter .15s, background .15s; text-decoration: none; color: var(--text); }
.btn:active { transform: scale(.98); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: var(--primary-ink); } .btn.primary:hover { filter: brightness(1.08); }
.btn.success { background: var(--ok); color: #fff; }
.btn.soft { background: var(--primary-soft); color: var(--primary); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { background: var(--err); color: #fff; } .btn.danger-soft { background: var(--err-soft); color: var(--err); width: 100%; margin-top: 8px; }
.btn.wa { background: #25d366; color: #063b1c; }
.btn.lg { padding: 15px 20px; font-size: 17px; border-radius: 14px; } .btn.sm { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--surface2); } .icon-btn:disabled { opacity: .3; } .icon-btn.danger:hover { color: var(--err); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; } .btn-row.tight { gap: 2px; } .btn-row > * { flex: 1 1 auto; } .btn-row select { width: auto; }
.btn-col { display: flex; flex-direction: column; gap: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; } .field > span { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; width: auto; }
.pw { position: relative; } .pw input { padding-right: 48px; } .eye { position: absolute; right: 4px; top: 4px; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 14.5px; } .alert.err { background: var(--err-soft); color: var(--err); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 700; background: var(--surface2); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.err { background: var(--err-soft); color: var(--err); }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--r); }
.boot { height: 100vh; display: grid; place-items: center; } .spinner { width: 36px; height: 36px; border: 4px solid var(--track); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toasts / modal */
#toasts { position: fixed; z-index: 100; left: 0; right: 0; bottom: calc(86px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: #141a33; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 480px; font-size: 14.5px; animation: pop .25s; transition: opacity .3s; }
.toast.ok { background: #15803d; } .toast.err { background: #b91c1c; } .toast.warn { background: #b45309; } .toast.out { opacity: 0; }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } }
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(10,13,30,.55); display: grid; place-items: center; padding: 16px; animation: fade .15s; backdrop-filter: blur(3px); }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 20px; width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 14px 6px 20px; } .modal-body { padding: 8px 20px 16px; overflow: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 20px 18px; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(900px 500px at 10% -10%, #4f46e544, transparent), radial-gradient(700px 500px at 100% 110%, #14b8a644, transparent), var(--bg); }
.login-card { background: var(--surface); width: min(420px, 100%); padding: 30px 26px; border-radius: 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; }
.login-card h1 { font-size: 26px; }
.logo { width: 34px; height: 34px; border-radius: 11px; display: inline-grid; place-items: center; background: linear-gradient(135deg, #4338ca, #14b8a6); color: #fff; flex: none; }
.logo.big { width: 60px; height: 60px; border-radius: 18px; }

/* Shell */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); }
.content { flex: 1; padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); width: 100%; max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.is-admin .content { max-width: 1180px; }
.side { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: flex; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 24px rgba(20,26,51,.06); }
.side .brand, .side-foot, .nav-item.present { display: none; }
.side nav { display: flex; width: 100%; justify-content: space-around; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 10px; border-radius: 12px; flex: 1; }
.nav-item.on { color: var(--primary); background: var(--primary-soft); }
.chip { cursor: default; } .chip-in { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 700; }
.chip-in.ok { background: var(--ok-soft); color: var(--ok); } .chip-in.warn { background: var(--warn-soft); color: var(--warn); cursor: pointer; } .chip-in.off { background: var(--err-soft); color: var(--err); }
@media (min-width: 900px) {
  .shell { flex-direction: row; } .topbar { display: none; }
  .side { position: sticky; top: 0; height: 100vh; width: 248px; flex-direction: column; border: 0; border-right: 1px solid var(--line); padding: 20px 14px; box-shadow: none; gap: 20px; }
  .side .brand { display: flex; padding: 0 8px; } .side nav { flex-direction: column; justify-content: flex-start; gap: 4px; }
  .nav-item { flex-direction: row; gap: 12px; font-size: 15px; padding: 11px 14px; flex: none; }
  .nav-item.present { display: flex; background: linear-gradient(135deg, #4338ca, #0d9488); color: #fff; margin-top: 4px; }
  .side-foot { display: flex; flex-direction: column; gap: 12px; margin-top: auto; } .who { display: flex; flex-direction: column; } .who small { color: var(--muted); }
  .content { padding: 28px 32px 40px; } #toasts { bottom: 24px; }
}

/* Cards y páginas */
.card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); border: 1px solid var(--line); }
.page-title { font-size: 26px; } .page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.sec { font-size: 18px; margin-top: 10px; } .back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; margin-bottom: 6px; }
.grid.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.hero { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.hero h1 { font-size: 30px; } .eyebrow { text-transform: capitalize; font-size: 13.5px; color: var(--primary); font-weight: 700; }
.stats { display: flex; gap: 10px; } .stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 18px; text-align: center; min-width: 92px; }
.stat b { display: block; font-size: 24px; } .stat span { font-size: 12.5px; color: var(--muted); } .stat.warn b { color: var(--warn); }
.form-card { display: flex; gap: 14px; padding: 18px; align-items: center; color: var(--text); transition: transform .12s, box-shadow .12s; }
a.form-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(67,56,202,.15); } .form-card.off { opacity: .55; } .form-card.static > div:nth-child(2) { flex: 1; }
.fc-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary-soft), #14b8a622); color: var(--primary); flex: none; }
.form-card h3 { font-size: 18px; } .form-card .go { margin-left: auto; color: var(--muted); }
.row-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 16px; color: var(--text); } .list { display: flex; flex-direction: column; gap: 10px; }

/* Asistente */
.wizard { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column; max-width: 720px; margin: 0 auto; }
@media (min-width: 900px) { .wizard { position: static; min-height: calc(100vh - 56px); border-radius: 20px; } }
.wiz-head { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 10px 8px; }
.wiz-title { flex: 1; min-width: 0; display: flex; flex-direction: column; } .wiz-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .count { font-size: 12.5px; color: var(--muted); }
.geo { display: inline-flex; gap: 5px; align-items: center; border: 0; border-radius: 99px; padding: 6px 11px; font-size: 12px; font-weight: 700; cursor: pointer; }
.geo.ok { background: var(--ok-soft); color: var(--ok); } .geo.wait { background: var(--warn-soft); color: var(--warn); } .geo.bad { background: var(--err-soft); color: var(--err); }
.bar { height: 5px; background: var(--track); margin: 0 14px; border-radius: 9px; overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 9px; transition: width .35s ease; width: 0; }
.wiz-body { flex: 1; overflow: auto; padding: 22px 16px; display: flex; flex-direction: column; gap: 22px; }
.slide-in { animation: slidein .28s ease; } @keyframes slidein { from { opacity: 0; transform: translateX(18px); } }
.wiz-body h2 { font-size: 22px; } .q { display: flex; flex-direction: column; gap: 14px; } .q-head { display: flex; flex-direction: column; gap: 6px; }
.req { color: var(--err); } .opt-t, .q .opt-hint { color: var(--muted); } .q-head .opt { color: var(--muted); font-size: 13px; font-weight: 500; }
.opts { display: flex; flex-direction: column; gap: 10px; }
button.opt { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 16px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); cursor: pointer; font-size: 16.5px; font-weight: 500; transition: border-color .12s, background .12s, transform .08s; }
button.opt:active { transform: scale(.985); } button.opt.on { border-color: var(--primary); background: var(--primary-soft); font-weight: 650; }
.dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; } .opt.on .dot { border-color: var(--primary); } .opt.on .dot::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--primary); }
.box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); flex: none; display: grid; place-items: center; color: transparent; } .opt.on .box { background: var(--primary); border-color: var(--primary); color: #fff; }
.add-row { display: flex; gap: 8px; margin-top: 12px; } .add-row input { flex: 1; }
.wiz-foot { display: flex; gap: 10px; padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); } .wiz-foot .btn { flex: 1; } .wiz-foot .btn.ghost { flex: 0 0 auto; }
.shake { animation: shake .4s; } @keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--surface2); display: block; } .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .x { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; display: grid; place-items: center; cursor: pointer; }
.geo-card { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-top: 16px; } .geo-card > div { flex: 1; } .geo-card .ico:first-child { color: var(--primary); }
.review { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.rv { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; align-items: center; }
.rv small { grid-column: 1; color: var(--muted); } .rv b { grid-column: 1; } .rv .ico { grid-row: 1 / 3; grid-column: 2; color: var(--muted); } .rv b.none { color: var(--err); } .rv.static { cursor: default; }

/* Envío correcto */
.done { max-width: 520px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.report { background: #ffffff; color: #141a33; border-radius: 24px; padding: 26px 22px 18px; text-align: center; box-shadow: var(--shadow); border: 1px solid #e1e4f0; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.report h1 { font-size: 26px; color: #141a33; } .r-sub { color: #5d6585; font-size: 15px; }
.r-badge { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #fff; animation: badge .5s cubic-bezier(.2, 1.4, .4, 1); }
.r-badge.sent { background: #16a34a; box-shadow: 0 0 0 10px #dcfce7; } .r-badge.sending, .r-badge.queued { background: #d97706; box-shadow: 0 0 0 10px #fef3c7; } .r-badge.error { background: #dc2626; box-shadow: 0 0 0 10px #fee2e2; }
.r-badge.sending .ico { animation: spin 1s linear infinite; }
@keyframes badge { from { transform: scale(.3); opacity: 0; } }
.r-meta { width: 100%; text-align: left; background: #f4f5fb; border-radius: 14px; padding: 8px 14px; margin-top: 4px; } .r-row { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid #e1e4f0; font-size: 14px; } .r-row:last-child { border: 0; } .r-row span { color: #5d6585; } .r-row b { text-align: right; }
.r-ans { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 8px; } .r-a { display: flex; flex-direction: column; padding: 6px 0; border-bottom: 1px solid var(--line); } .r-a small { color: var(--muted); font-size: 12.5px; line-height: 1.3; }
.report .r-a { border-color: #eceffa; } .report .r-a small { color: #6b7391; } .r-foot { font-size: 12px; color: #8a91ad; margin-top: 4px; }
.done-actions { display: flex; flex-direction: column; gap: 10px; }

/* Panel admin */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; } .kpi b { display: block; font-size: 26px; line-height: 1; } .kpi span { color: var(--muted); font-size: 13px; }
.kpi-ico { width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.table-wrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; font-size: 14.5px; } th { text-align: left; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; } th, td { padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; } tr:last-child td { border: 0; } tr.off { opacity: .5; } td.actions { white-space: nowrap; } td.actions > * { margin-right: 6px; }
.results { display: grid; gap: 14px; } details.qres { border-top: 1px solid var(--line); padding: 10px 0; } details.qres summary { cursor: pointer; font-weight: 600; } details[open] > summary { margin-bottom: 12px; }
.bars { display: flex; flex-direction: column; gap: 12px; } .bar-row { display: grid; grid-template-columns: minmax(120px, 36%) 1fr 70px; align-items: center; gap: 12px; }
.bar-label { font-size: 14.5px; } .bar-track { height: 14px; background: var(--track); border-radius: 9px; overflow: hidden; } .bar-fill { height: 100%; width: var(--w); background: var(--c, var(--primary)); border-radius: 9px; transition: width .9s cubic-bezier(.2, .8, .2, 1); }
.bar-val { display: flex; gap: 6px; align-items: baseline; justify-content: flex-end; } .bar-val small { color: var(--muted); }
.qcard { padding: 14px; display: flex; flex-direction: column; gap: 10px; } .q-top { display: flex; gap: 8px; align-items: center; } .qn { width: 28px; height: 28px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.q-opts { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; } .q-opts select { width: auto; } .qlist { display: flex; flex-direction: column; gap: 12px; }
.opt-edit { display: flex; flex-direction: column; gap: 8px; padding-left: 8px; border-left: 3px solid var(--primary-soft); } .opt-line { display: flex; align-items: center; gap: 6px; color: var(--muted); } .opt-line input { padding: 9px 12px; }
.cond { display: flex; gap: 8px; flex-wrap: wrap; } .cond select { flex: 1; min-width: 180px; } .add-q { display: flex; gap: 8px; flex-wrap: wrap; position: sticky; bottom: 78px; background: color-mix(in srgb, var(--bg) 92%, transparent); padding: 10px 0; backdrop-filter: blur(8px); }
@media (min-width: 900px) { .add-q { bottom: 0; } }
.detail { display: flex; flex-direction: column; gap: 8px; }

/* ───────── Modo presentación ───────── */
.deck { position: fixed; inset: 0; z-index: 200; background: #070a18; color: #fff; overflow: hidden; --track: #232a4a; user-select: none; }
.stage-wrap { position: absolute; inset: 0; } .stage { position: absolute; left: 50%; top: 50%; width: 1280px; height: 720px; transform-origin: center; background: #0b1022; overflow: hidden; box-shadow: 0 0 80px rgba(67,56,202,.25); }
.slide { position: absolute; inset: 0; padding: 56px 72px; display: flex; flex-direction: column; gap: 22px; background: radial-gradient(900px 500px at 100% 0%, #4338ca33, transparent), radial-gradient(700px 400px at 0% 100%, #14b8a622, transparent), #0b1022; animation: sIn .55s ease both; }
@keyframes sIn { from { opacity: 0; transform: scale(.985) translateY(10px); } }
.slide .tag { font-size: 15px; letter-spacing: .16em; font-weight: 700; color: #7dd3c8; } .slide h2 { font-size: 46px; font-weight: 800; letter-spacing: -.02em; } .slide h2.qt { font-size: 34px; line-height: 1.2; max-width: 1080px; }
.sfoot { position: absolute; left: 72px; right: 72px; bottom: 26px; display: flex; justify-content: space-between; font-size: 14px; color: #6e789c; }
.slide.cover { justify-content: center; gap: 26px; } .slide.cover h1 { font-size: 78px; font-weight: 850; line-height: 1.03; letter-spacing: -.035em; } .slide.cover h1 em { font-style: normal; background: linear-gradient(90deg, #818cf8, #2dd4bf); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cover .lead { font-size: 24px; color: #aab3d6; } .cover .lead::first-letter { text-transform: uppercase; } .cover-glow { position: absolute; right: -160px; top: -160px; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, #6366f155, transparent 65%); animation: float 8s ease-in-out infinite alternate; }
@keyframes float { to { transform: translate(-40px, 50px) scale(1.1); } }
.big-kpis, .num-row { display: flex; gap: 22px; margin-top: 14px; } .bk { flex: 1; background: #ffffff0d; border: 1px solid #ffffff1a; border-radius: 22px; padding: 22px 26px; } .bk b { display: block; font-size: 64px; line-height: 1; font-weight: 850; letter-spacing: -.03em; } .bk span { color: #aab3d6; font-size: 17px; }
.slide.sl > .big { margin-top: 10px; }
.ov { display: flex; flex-direction: column; gap: 26px; margin-top: 18px; } .ov-row { display: flex; align-items: center; gap: 24px; background: #ffffff0a; border: 1px solid #ffffff14; border-radius: 22px; padding: 22px 28px; }
.ov-ico { width: 68px; height: 68px; border-radius: 20px; background: #ffffff12; display: grid; place-items: center; color: #a5b4fc; } .ov-main { flex: 1; display: flex; flex-direction: column; gap: 6px; } .ov-main b { font-size: 28px; } .ov-main small { color: #8d97bb; font-size: 15px; } .ov-n { font-size: 80px; font-weight: 850; letter-spacing: -.03em; min-width: 160px; text-align: right; }
.deck .bar-track.big { height: 16px; }
.split { display: flex; gap: 48px; align-items: center; flex: 1; } .split > :first-child { flex: 1; } .split.wide { align-items: flex-start; padding-top: 6px; }
.don { display: flex; align-items: center; gap: 36px; } .donut-n { fill: #fff; font-size: 54px; font-weight: 850; } .donut-l { fill: #8d97bb; font-size: 15px; } .donut-seg { transition: stroke-dasharray .9s ease; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 20px; } .legend li { display: flex; align-items: center; gap: 12px; } .legend i { width: 16px; height: 16px; border-radius: 5px; flex: none; } .legend b { margin-left: auto; padding-left: 18px; }
.insight { width: 330px; flex: none; background: linear-gradient(160deg, #4338ca55, #0d948833); border: 1px solid #ffffff22; border-radius: 26px; padding: 30px; display: flex; flex-direction: column; gap: 6px; } .insight b { font-size: 96px; line-height: 1; font-weight: 850; letter-spacing: -.04em; } .insight span { font-size: 24px; font-weight: 600; } .insight small { color: #aab3d6; font-size: 16px; margin-top: 6px; }
.deck .bars { gap: 16px; } .deck .bar-row { grid-template-columns: 330px 1fr 100px; } .deck .bar-label { font-size: 19px; line-height: 1.2; } .deck .bar-track { height: 22px; } .deck .bar-val { font-size: 22px; } .deck .bar-val small { color: #8d97bb; font-size: 16px; }
.deck .bar-fill { width: 0; } .slide.go .bar-fill, .slide.still .bar-fill { width: var(--w); } .deck .donut-seg { stroke-dasharray: 0 999; } .slide.go .donut-seg { stroke-dasharray: calc(var(--len) * 1px - 2px) 999; }
.num-row .bk { padding: 34px; } .num-row .bk b { font-size: 88px; }
.rt { width: 100%; font-size: 21px; margin-top: 8px; } .rt th { color: #8d97bb; font-size: 14px; } .rt td, .rt th { border-color: #ffffff18; padding: 14px 16px; } .empty-s { font-size: 26px; color: #8d97bb; margin: auto; }
.map-row { display: flex; gap: 34px; flex: 1; align-items: center; } .map-box { flex: 1; } .map-side { width: 280px; display: flex; flex-direction: column; gap: 16px; } .map-side .bk b { font-size: 54px; } .map-side .legend { font-size: 17px; gap: 10px; }
.scatter { width: 100%; height: auto; } .sc-bg { fill: #ffffff08; stroke: #ffffff18; } .sc-grid { stroke: #ffffff0d; } .sc-empty { fill: #8d97bb; font-size: 20px; } .sc-dot { fill: #818cf8; stroke: #0b1022; stroke-width: 2; } .sc-dot.k1 { fill: #2dd4bf; } .sc-dot.k2 { fill: #fbbf24; } .sc-dot.k3 { fill: #f472b6; } .sc-halo { fill: #818cf855; animation: halo 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.7); opacity: 0; } }
.legend i.k0 { background: #818cf8; } .legend i.k1 { background: #2dd4bf; } .legend i.k2 { background: #fbbf24; } .legend i.k3 { background: #f472b6; }
.ph-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; flex: 1; margin-bottom: 30px; } .ph-grid figure { margin: 0; position: relative; border-radius: 16px; overflow: hidden; background: #ffffff10; } .ph-grid img { width: 100%; height: 100%; object-fit: cover; display: block; } .ph-grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; font-size: 14px; background: linear-gradient(transparent, #000b); }
.cols { display: flex; gap: 14px; align-items: flex-end; height: 380px; margin-top: 10px; } .col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 8px; } .col b { font-size: 26px; } .col small { color: #8d97bb; font-size: 16px; }
.col-fill { width: 100%; border-radius: 12px 12px 4px 4px; background: linear-gradient(180deg, #818cf8, #4338ca); height: 0; transition: height 1s cubic-bezier(.2, .8, .2, 1); } .slide.go .col-fill, .slide.still .col-fill { height: calc(var(--h) * .78); }
.deck-bar { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #0b1022e6; border: 1px solid #ffffff22; border-radius: 18px; backdrop-filter: blur(14px); transition: opacity .3s, transform .3s; z-index: 5; max-width: calc(100vw - 20px); }
.deck.idle .deck-bar { opacity: 0; transform: translate(-50%, 20px); pointer-events: none; } .deck.idle { cursor: none; }
.deck-bar select { background: #ffffff14; border: 0; color: #fff; padding: 8px 10px; border-radius: 10px; width: auto; max-width: 180px; } .deck-bar select option { color: #000; }
.dbtn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: #ffffff14; color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; } .dbtn:hover { background: #ffffff2b; } .ds-count { font-variant-numeric: tabular-nums; min-width: 58px; text-align: center; font-size: 14px; color: #cbd2ee; } .sp { width: 6px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: #fca5a5; } .live i { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; animation: blink 1.4s infinite; } .live small { font-weight: 600; letter-spacing: 0; color: #9aa3c7; } .live.off i { background: #64748b; animation: none; } .live.flash { animation: flash .9s; }
@keyframes blink { 50% { opacity: .25; } } @keyframes flash { 30% { color: #fff; text-shadow: 0 0 12px #fff; } }
.deck-progress { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: #ffffff10; z-index: 5; } .deck-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6366f1, #2dd4bf); transition: width .4s; }
@media (max-width: 700px) { .deck-bar select, .live small { display: none; } .bar-row { grid-template-columns: 1fr 64px; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Interruptor, credenciales, impresión */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; } .switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .sw { width: 46px; height: 26px; border-radius: 99px; background: var(--track); position: relative; transition: background .2s; flex: none; } .switch .sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .sw { background: var(--ok); } .switch input:checked + .sw::after { transform: translateX(20px); } .switch input:focus-visible + .sw { box-shadow: 0 0 0 4px var(--primary-soft); } .switch small { font-size: 13px; min-width: 50px; }
.cred { margin: 0; padding: 14px; border-radius: 12px; background: var(--surface2); font: 600 16px ui-monospace, Menlo, monospace; user-select: all; white-space: pre-wrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .miss { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; } .miss .pill { margin-left: 8px; }
.kpi.warn .kpi-ico { background: var(--warn-soft); color: var(--warn); } td small { white-space: normal; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
@media print { body.printing #app, body.printing #toasts { display: none !important; } body.printing .overlay { position: static; background: none; backdrop-filter: none; padding: 0; display: block; } body.printing .modal { box-shadow: none; max-height: none; width: 100%; } body.printing .modal-head button, body.printing .modal-foot { display: none; } body { background: #fff; color: #000; } }
.scatter { max-height: 430px; }

.sched { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; padding: 3px 9px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); font-size: 12px; font-weight: 700; } .form-card.locked { opacity: .65; } .close-at { position: absolute; right: 16px; top: 10px; } .form-card { position: relative; }

/* Mapa real en la presentación */
.live-map { position: relative; height: 440px; border-radius: 16px; overflow: hidden; background: #0b1022; } .live-map .scatter { max-height: none; height: 100%; }
.leaflet-host { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; background: #0b1022; } .leaflet-host.ready { opacity: 1; } .leaflet-container { font-family: var(--font); background: #0b1022; }
.leaflet-container .leaflet-control-attribution { background: #0b1022cc; color: #8d97bb; font-size: 10px; } .leaflet-container .leaflet-control-attribution a { color: #a5b4fc; }
.leaflet-tile-pane .osm-dark { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.95) saturate(.55); }
.live-map:has(.ready) .scatter { display: none; }

.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 2px; } .pager .pg { font-variant-numeric: tabular-nums; padding: 0 8px; color: var(--muted); font-size: 14px; }
.search { max-width: 320px; }
