/* Habita Access · sistema visual
   Tinta verde-negra sobre papel frío, un solo verde de marca y tres colores de estado que nunca decoran.
   Archivo (condensada) para títulos y cifras; Inter Tight para texto. */
@font-face { font-family: Archivo; src: url(/fonts/archivo.woff2) format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'Inter Tight'; src: url(/fonts/inter-tight.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #F1F4F0; --surface: #FFFFFF; --sunken: #E8ECE7;
  --ink: #12211A; --ink-2: #4A5A51; --ink-3: #7B8880; --line: #D3DAD3; --line-2: #E4E9E3;
  --brand: #17603F; --brand-ink: #0E4029; --brand-wash: #E2F0E7;
  --ok: #1B8A50; --ok-wash: #DDF1E4; --warn: #A96A00; --warn-wash: #FBEFD0; --bad: #B4302A; --bad-wash: #F8E0DD;
  --r-s: 6px; --r-m: 10px; --r-l: 18px;
  --display: Archivo, 'Arial Narrow', sans-serif; --text: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 1px 0 rgba(18,33,26,.04), 0 12px 32px -18px rgba(18,33,26,.28);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--text); -webkit-font-smoothing: antialiased; min-height: 100dvh; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, .num { font-family: var(--display); font-stretch: 88%; letter-spacing: -.02em; line-height: 1.05; font-weight: 750; }
a { color: var(--brand); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--ink-2); } .small { font-size: 14px; } .tiny { font-size: 12.5px; }
.tnum { font-variant-numeric: tabular-nums; }

/* Aviso de demostración: siempre visible, también en las capturas */
.demo-flag { position: sticky; top: 0; z-index: 80; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; text-align: center; padding: 6px 12px; letter-spacing: .01em; }
.demo-flag b { color: #8FE0B2; font-weight: 700; }
body:has(.demo-flag) .adm-side { top: 31px; height: calc(100dvh - 31px); }
body:has(.demo-flag) .verdict { padding-top: 60px; }

/* Marca del proveedor: discreta, separada de la identidad del evento */
.brandmark { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-stretch: 88%; font-weight: 750; font-size: 17px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.brandmark i { width: 22px; height: 22px; border-radius: 6px; background: var(--brand); position: relative; flex: none; }
.brandmark i::after { content: ''; position: absolute; left: 6px; top: 5px; width: 6px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(40deg); }
.by { font-size: 12.5px; color: var(--ink-3); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); transition: background .12s, border-color .12s, transform .06s; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-ink); border-color: var(--brand-ink); }
.btn.danger { color: var(--bad); border-color: #E5B9B5; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--sunken); }
.btn.big { min-height: 54px; font-size: 17px; width: 100%; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: var(--r-s); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn:not(.primary).loading::after { border-color: var(--line); border-top-color: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Campos */
.field { display: grid; gap: 6px; }
.field > label, .field > .lbl { font-size: 14px; font-weight: 600; }
.field .opt { font-weight: 400; color: var(--ink-3); }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); font-size: 16px; }
textarea.input { min-height: 96px; resize: vertical; }
.input::placeholder { color: #9AA59E; }
.input:hover { border-color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-wash); }
.field.err .input { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-wash); }
.field .msg { font-size: 13.5px; color: var(--bad); font-weight: 500; min-height: 0; }
.field .hint { font-size: 13px; color: var(--ink-3); }
.seg { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--sunken); border-radius: var(--r-m); padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; min-height: 38px; padding: 0 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed=true] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(18,33,26,.14); }
.check { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--brand); }
.alert { border-radius: var(--r-m); padding: 12px 14px; font-size: 14.5px; font-weight: 500; }
.alert.bad { background: var(--bad-wash); color: #7E1F1A; } .alert.ok { background: var(--ok-wash); color: #0F5A32; } .alert.warn { background: var(--warn-wash); color: #6F4500; }

/* Estados */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { background: var(--ok-wash); color: #0F6A3A; } .chip.wait { background: var(--sunken); color: var(--ink-2); } .chip.bad { background: var(--bad-wash); color: #8E2620; } .chip.warn { background: var(--warn-wash); color: #7A4C00; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 500; font-size: 14.5px; z-index: 90; max-width: calc(100vw - 32px); box-shadow: var(--shadow); animation: rise .18s ease-out; }
.toast.bad { background: var(--bad); }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ───────── Portal de inscripción */
.portal { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.portal-top { display: flex; justify-content: flex-end; align-items: center; padding: 18px clamp(20px, 5vw, 56px); }
.portal-main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding: clamp(16px, 4vw, 56px) clamp(20px, 5vw, 56px) 56px; max-width: 1240px; width: 100%; margin: 0 auto; align-items: start; }
.event h1 { font-size: clamp(36px, 4.4vw, 62px); font-weight: 800; text-wrap: balance; }
.event .org { font-weight: 600; color: var(--brand); margin-bottom: 14px; }
.event .intro { margin-top: 20px; font-size: 18px; color: var(--ink-2); max-width: 46ch; }
.facts { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 520px; }
.facts li { display: grid; grid-template-columns: 92px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.facts span { color: var(--ink-3); font-size: 14px; padding-top: 2px; } .facts b { font-weight: 600; }
.steps { margin: 36px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; max-width: 520px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(s); font-family: var(--display); font-weight: 750; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 16px; }
.steps b { display: block; font-weight: 600; } .steps span { color: var(--ink-2); font-size: 15px; }
.formcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow); display: grid; gap: 18px; }
.formcard h2 { font-size: 28px; }
.formcard { scroll-margin-top: 52px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.portal-foot { padding: 20px clamp(20px, 5vw, 56px) 28px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--line); }
@media (max-width: 860px) {
  .portal-main { grid-template-columns: 1fr; gap: 28px; padding-top: 8px; }
  .event .intro { font-size: 16.5px; margin-top: 14px; } .facts { margin-top: 20px; } .steps { display: none; }
  .formcard { margin: 0 -6px; }
}
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }

/* ───────── Comprobante: una credencial, no una tarjeta genérica */
.pass-wrap { min-height: 100dvh; display: grid; place-items: start center; padding: clamp(16px, 4vw, 48px) 16px 48px; gap: 20px; }
.pass-head { width: min(420px, 100%); display: flex; justify-content: space-between; align-items: center; }
.pass { width: min(420px, 100%); background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); position: relative; overflow: hidden; }
.pass-band { background: var(--brand); color: #fff; padding: 22px 24px 20px; position: relative; }
.pass-band::before { content: ''; position: absolute; left: 50%; top: 10px; width: 54px; height: 7px; border-radius: 9px; background: rgba(255,255,255,.28); transform: translateX(-50%); } /* ranura de la cinta */
.pass-band .org { font-size: 13px; font-weight: 600; opacity: .85; margin-top: 10px; }
.pass-band h1 { font-size: 26px; margin-top: 4px; text-wrap: balance; }
.pass-band .when { margin-top: 10px; font-size: 14px; opacity: .92; }
.pass-body { padding: 22px 24px 8px; display: grid; gap: 4px; }
.pass-body .who { font-family: var(--display); font-stretch: 88%; font-weight: 800; font-size: 32px; line-height: 1.02; letter-spacing: -.02em; text-wrap: balance; }
.pass-meta { display: flex; gap: 18px; margin-top: 8px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.pass-meta b { color: var(--ink); font-weight: 600; }
.pass-cut { position: relative; height: 28px; margin-top: 12px; }
.pass-cut::before { content: ''; position: absolute; left: 22px; right: 22px; top: 50%; border-top: 2px dashed var(--line); }
.pass-cut::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 0 50%, var(--paper) 13px, transparent 14px), radial-gradient(circle at 100% 50%, var(--paper) 13px, transparent 14px); }
.pass-qr { padding: 6px 24px 24px; display: grid; justify-items: center; gap: 12px; }
.pass-qr img { width: min(264px, 72vw); height: auto; aspect-ratio: 1; image-rendering: pixelated; display: block; }
.pass-qr .state { display: flex; }
.pass-note { text-align: center; font-size: 14px; color: var(--ink-2); max-width: 30ch; }
.pass-actions { width: min(420px, 100%); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pass-actions .wide { grid-column: 1 / -1; }
.pass.used .pass-band { background: var(--ink); }
.pass.cancelled .pass-band { background: var(--bad); } .pass.cancelled .pass-qr img { opacity: .15; }
.welcome { width: min(420px, 100%); }
@media print { body { background: #fff; } .pass-actions, .demo-flag, .pass-head .by, .welcome { display: none !important; } .pass { box-shadow: none; } .pass-band, .chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* ───────── Ingreso de funcionarios */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(400px, 100%); display: grid; gap: 18px; }
.login-card h1 { font-size: 34px; }
.login-card form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 24px; display: grid; gap: 16px; box-shadow: var(--shadow); }

/* ───────── Acreditación (teléfono del operador) */
.op { min-height: 100dvh; display: grid; grid-template-rows: auto auto 1fr auto; max-width: 560px; margin: 0 auto; background: var(--paper); }
.op-top { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 16px 10px; }
.op-top .who { font-weight: 600; line-height: 1.2; } .op-top .who small { display: block; font-weight: 400; color: var(--ink-2); font-size: 13px; }
.net { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 10px; border-radius: 99px; background: var(--ok-wash); color: #0F6A3A; }
.net::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.net.off { background: var(--bad-wash); color: #8E2620; } .net.sync { background: var(--warn-wash); color: #7A4C00; }
.op-count { margin: 0 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); display: grid; gap: 8px; }
.op-count .row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.op-count .num { font-size: 26px; } .op-count .num small { font-family: var(--text); font-stretch: 100%; font-size: 14px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.rail { height: 8px; border-radius: 8px; background: var(--sunken); overflow: hidden; }
.rail > i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 8px; transition: width .5s ease; }
.op-view { padding: 14px 16px 16px; display: grid; align-content: start; gap: 14px; }
.cam { position: relative; background: #0B1410; border-radius: var(--r-l); overflow: hidden; aspect-ratio: 1; display: grid; place-items: center; color: #fff; }
.cam video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam .frame { position: absolute; inset: 14%; border-radius: 18px; box-shadow: 0 0 0 100vmax rgba(8,16,12,.42); border: 3px solid rgba(255,255,255,.9); pointer-events: none; }
.cam .idle { position: relative; z-index: 2; display: grid; gap: 14px; justify-items: center; text-align: center; padding: 24px; }
.cam .idle p { color: #C9D4CD; font-size: 15px; max-width: 30ch; }
.cam .camstate { position: absolute; left: 12px; bottom: 12px; z-index: 3; font-size: 13px; font-weight: 600; background: rgba(8,16,12,.7); padding: 5px 10px; border-radius: 99px; }
.cam .stop { position: absolute; right: 10px; top: 10px; z-index: 3; }
.op-tabs { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); gap: 4px; }
.op-tabs button { border: 0; background: transparent; min-height: 52px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; position: relative; }
.op-tabs button[aria-selected=true] { background: var(--brand-wash); color: var(--brand-ink); }
.op-tabs .badge { position: absolute; top: 5px; right: 14px; background: var(--warn); color: #fff; font-size: 11px; border-radius: 99px; padding: 1px 6px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; display: grid; gap: 14px; }
.panel h2 { font-size: 22px; }
.found { border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px; display: grid; gap: 6px; }
.found .name { font-family: var(--display); font-stretch: 88%; font-weight: 750; font-size: 24px; line-height: 1.05; }
.queue { background: var(--warn-wash); border-radius: var(--r-m); padding: 12px 14px; font-size: 14px; color: #6F4500; display: grid; gap: 6px; }
.queue ul { margin: 0; padding-left: 18px; }

/* Resultado a pantalla completa: el color es el mensaje */
.verdict { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: 1fr auto; color: #fff; padding: max(28px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom)); animation: flash .16s ease-out; }
.verdict.ok { background: #14713F; } .verdict.used { background: #B26F00; } .verdict.bad { background: #A82B25; } .verdict.net { background: #26332C; }
@keyframes flash { from { transform: scale(1.04); } }
.verdict .mid { display: grid; align-content: center; justify-items: center; text-align: center; gap: 14px; }
.verdict .icon { width: 112px; height: 112px; border-radius: 50%; border: 6px solid #fff; display: grid; place-items: center; }
.verdict .icon svg { width: 60px; height: 60px; stroke: #fff; stroke-width: 7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.verdict h2 { font-size: clamp(40px, 12vw, 64px); font-weight: 850; letter-spacing: -.02em; }
.verdict .name { font-family: var(--display); font-stretch: 88%; font-weight: 700; font-size: clamp(26px, 7.5vw, 38px); line-height: 1.08; text-wrap: balance; }
.verdict .meta { font-size: 17px; opacity: .95; max-width: 30ch; }
.verdict .meta b { font-weight: 700; }
.verdict .btn { background: #fff; color: var(--ink); border: 0; min-height: 58px; font-size: 18px; width: 100%; max-width: 480px; justify-self: center; }
.verdict .bar { height: 5px; border-radius: 5px; background: rgba(255,255,255,.3); overflow: hidden; width: 100%; max-width: 480px; justify-self: center; margin-bottom: 12px; }
.verdict .bar i { display: block; height: 100%; background: #fff; width: 100%; transform-origin: left; animation: drain 2.2s linear forwards; }
@keyframes drain { to { transform: scaleX(0); } }
.verdict .foot { display: grid; }

/* ───────── Panel administrativo */
.adm { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100dvh; }
.adm-side { background: var(--ink); color: #DCE5DF; padding: 22px 14px; display: grid; grid-template-rows: auto 1fr auto; gap: 26px; position: sticky; top: 0; height: 100dvh; }
.adm-side .brandmark { color: #fff; padding: 0 8px; }
.adm-nav { display: grid; gap: 2px; align-content: start; }
.adm-nav button { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 10px 12px; border-radius: 9px; font-weight: 550; font-size: 15px; cursor: pointer; color: #B9C6BE; }
.adm-nav button:hover { background: rgba(255,255,255,.07); color: #fff; }
.adm-nav button[aria-current=page] { background: #fff; color: var(--ink); }
.adm-nav button:focus-visible { outline: 3px solid #8FE0B2; }
.adm-nav .n { font-size: 12px; font-weight: 700; background: #E0A63A; color: #2B1B00; border-radius: 99px; padding: 1px 7px; }
.adm-me { font-size: 13.5px; padding: 0 8px; display: grid; gap: 8px; } .adm-me b { color: #fff; display: block; font-size: 14.5px; }
.adm-me .btn { background: transparent; color: #DCE5DF; border-color: rgba(255,255,255,.22); }
.adm-main { padding: 28px clamp(18px, 3vw, 40px) 56px; display: grid; gap: 22px; align-content: start; min-width: 0; }
.adm-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.adm-head h1 { font-size: 34px; } .adm-head p { color: var(--ink-2); margin-top: 4px; }
.adm-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px 22px; min-width: 0; }
.card h2 { font-size: 19px; margin-bottom: 14px; }

/* Resumen: la cifra principal es el avance, medido sobre una regla */
.gauge { background: var(--ink); color: #fff; border-radius: var(--r-l); padding: 26px 28px 24px; display: grid; gap: 18px; }
.gauge .top { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.gauge .num { font-size: clamp(56px, 8vw, 104px); font-weight: 850; line-height: .9; }
.gauge .num small { font-family: var(--text); font-stretch: 100%; letter-spacing: 0; font-size: 18px; font-weight: 500; color: #B9C6BE; margin-left: 10px; }
.gauge .pct { font-family: var(--display); font-stretch: 88%; font-size: 40px; font-weight: 750; color: #8FE0B2; }
.ruler { position: relative; height: 34px; border-radius: 6px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.28) 0 1px, transparent 1px 2.5%), rgba(255,255,255,.07); overflow: hidden; }
.ruler i { position: absolute; inset: 0 auto 0 0; width: 0; background: #2FB36E; transition: width .6s ease; background-image: repeating-linear-gradient(90deg, rgba(0,0,0,.2) 0 1px, transparent 1px 2.5%); background-size: 100vw 100%; }
.gauge .legend { display: flex; gap: 28px; flex-wrap: wrap; font-size: 14.5px; color: #B9C6BE; }
.gauge .legend b { color: #fff; font-family: var(--display); font-stretch: 88%; font-size: 22px; font-weight: 700; margin-right: 6px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.chart { width: 100%; height: 190px; display: block; }
.chart rect { fill: var(--brand); } .chart text { font: 11px var(--text); fill: var(--ink-3); } .chart line { stroke: var(--line-2); }
.bars { display: grid; gap: 10px; }
.bars .b { display: grid; grid-template-columns: 96px 1fr 48px; gap: 10px; align-items: center; font-size: 14.5px; }
.bars .b .t { height: 10px; border-radius: 6px; background: var(--sunken); overflow: hidden; } .bars .b .t i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 6px; }
.bars .b b { text-align: right; font-variant-numeric: tabular-nums; }
.feed { display: grid; }
.feed > div { display: grid; grid-template-columns: 62px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; align-items: baseline; }
.feed > div:last-child { border-bottom: 0; }
.feed time { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.empty { padding: 28px 12px; text-align: center; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* Asistentes */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar .search { flex: 1 1 280px; position: relative; }
.toolbar .search .input { padding-left: 42px; }
.toolbar .search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: var(--ink-3); fill: none; stroke-width: 2; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.t th { text-align: left; font-weight: 600; font-size: 13px; color: var(--ink-2); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFBFA; }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr { cursor: pointer; } table.t tbody tr:hover { background: #F6F9F6; }
table.t td .sub { display: block; font-size: 13px; color: var(--ink-3); }
table.t td.n { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.pager div { display: flex; gap: 8px; }

/* Ficha lateral y diálogos */
.scrim { position: fixed; inset: 0; background: rgba(18,33,26,.42); z-index: 70; display: grid; justify-items: end; animation: fade .15s; }
.scrim.center { place-items: center; padding: 16px; }
@keyframes fade { from { opacity: 0; } }
.drawer { width: min(480px, 100%); height: 100dvh; background: var(--surface); overflow-y: auto; padding: 24px; display: grid; gap: 18px; align-content: start; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: .6; } }
.modal { width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); border-radius: var(--r-l); padding: 24px; display: grid; gap: 16px; }
.drawer h2, .modal h2 { font-size: 26px; }
.drawer .x, .modal .x { justify-self: end; margin: -8px -8px -12px 0; }
.kv { display: grid; grid-template-columns: 124px 1fr; gap: 8px 14px; font-size: 15px; margin: 0; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }
.hist { display: grid; gap: 0; font-size: 14px; }
.hist div { padding: 8px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 112px 1fr; gap: 10px; }
.hist time { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.inc { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 14px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.inc:last-child { border-bottom: 0; } .inc .what { font-weight: 600; } .inc .meta { font-size: 13.5px; color: var(--ink-3); }
.fieldrow { display: grid; grid-template-columns: 1.3fr .8fr 1.4fr auto auto; gap: 8px; align-items: center; }
.menu { position: relative; } .menu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 6px; min-width: 250px; z-index: 20; display: grid; }
.menu-pop button, .menu-pop a { all: unset; box-sizing: border-box; padding: 10px 12px; border-radius: 7px; cursor: pointer; font-size: 14.5px; font-weight: 500; }
.menu-pop button:hover, .menu-pop a:hover { background: var(--sunken); }
.menu-pop small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12.5px; }

@media (max-width: 900px) {
  .adm { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .adm-side { position: sticky; top: 0; z-index: 30; height: auto; grid-template-rows: auto; grid-template-columns: 1fr; gap: 10px; padding: 10px 12px; }
  body:has(.demo-flag) .adm-side { height: auto; }
  .adm-side .brandmark { display: none; } .adm-me { display: none; }
  .adm-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .adm-nav button { padding: 8px 12px; gap: 8px; font-size: 14.5px; }
  .adm-main { padding: 18px 14px 48px; }
  .cols, .cols3 { grid-template-columns: 1fr; }
  .adm-head h1 { font-size: 28px; }
  .gauge { padding: 20px; } .gauge .pct { font-size: 30px; }
  table.t .hide-m { display: none; }
  .fieldrow { grid-template-columns: 1fr 1fr; }
  .adm-nav .mobile-out { display: flex; }
}
.adm-nav .mobile-out { display: none; }
#resBody { display: grid; gap: 22px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Validación sin conexión */
.verdict .offtag { font-size: 14px; font-weight: 600; background: rgba(0,0,0,.25); padding: 6px 12px; border-radius: 99px; }

/* ───────── Pasada de interfaz (17-11): credencial en vivo, historial del operador, íconos y detalles del panel */
.how { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 30px; align-items: center; margin-top: 28px; max-width: 560px; }
.how .steps { margin-top: 0; }
.minipass { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; transform: rotate(-2.2deg); transition: transform .25s ease; }
.minipass:hover { transform: rotate(0deg); }
.mp-band { background: var(--brand); color: #fff; padding: 16px 14px 12px; display: grid; gap: 2px; position: relative; }
.mp-band::before { content: ''; position: absolute; left: 50%; top: 6px; width: 34px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.3); transform: translateX(-50%); }
.mp-band span { font-size: 10px; opacity: .85; } .mp-band b { font-family: var(--display); font-stretch: 88%; font-size: 15px; line-height: 1.1; }
.mp-body { padding: 12px 14px 4px; display: grid; gap: 1px; }
.mp-lbl { font-size: 10.5px; color: var(--ink-3); } .mp-folio { font-size: 11px; color: var(--ink-2); margin-top: 3px; }
#mpName { font-family: var(--display); font-stretch: 88%; font-weight: 800; font-size: 19px; line-height: 1.08; overflow-wrap: anywhere; min-height: 41px; } #mpName.empty { color: #B4BEB7; }
.mp-cut { height: 14px; position: relative; } .mp-cut::before { content: ''; position: absolute; left: 12px; right: 12px; top: 50%; border-top: 1.5px dashed var(--line); }
.mp-cut::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 0 50%, var(--paper) 7px, transparent 8px), radial-gradient(circle at 100% 50%, var(--paper) 7px, transparent 8px); }
.mp-qr { padding: 6px 14px 14px; display: grid; justify-items: center; gap: 8px; } .mp-qr svg { width: 92px; height: 92px; fill: #C9D1CB; } .mp-qr span { font-size: 10.5px; color: var(--ink-3); text-align: center; }
.okmsg { font-size: 13.5px; font-weight: 600; color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }
.okmsg::before { content: ''; width: 7px; height: 12px; border: solid var(--ok); border-width: 0 2.4px 2.4px 0; transform: rotate(40deg) translateY(-2px); margin-left: 3px; }
.reassure { text-align: center; font-size: 13.5px; color: var(--ink-2); margin-top: -8px; }
.formcard { position: sticky; top: 24px; }
@media (max-width: 860px) { .how { display: none; } .formcard { position: static; } }
@media (max-width: 1100px) and (min-width: 861px) { .how { grid-template-columns: 1fr; } .minipass { display: none; } }

.cam { aspect-ratio: 4 / 4.4; }
.op-tabs button { display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 58px; font-size: 13px; }
.op-tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.recent { margin-top: 14px; display: grid; }
.recent h3 { font-size: 15px; margin-bottom: 4px; } .recent .hint { font-size: 14px; color: var(--ink-3); text-align: center; padding: 10px; }
.recent .r { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.recent .r:last-child { border-bottom: 0; }
.recent .r i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); } .recent .r.ok i { background: var(--ok); } .recent .r.used i { background: #C98300; } .recent .r.bad i { background: var(--bad); }
.recent .r b { display: block; font-weight: 600; font-size: 15px; line-height: 1.2; } .recent .r small { font-size: 12.5px; color: var(--ink-2); }
.recent .r time { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.adm-nav .l { display: inline-flex; align-items: center; gap: 11px; }
.adm-nav svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.gauge .eta { font-size: 15px; color: #DCE5DF; border-top: 1px solid rgba(255,255,255,.14); padding-top: 14px; margin-top: -2px; } .gauge .eta b { color: #8FE0B2; font-weight: 650; }
.pwho { display: inline-flex; align-items: center; gap: 10px; }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-wash); color: var(--brand-ink); display: inline-grid; place-items: center; font-style: normal; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; flex: none; text-transform: uppercase; }
table.t tbody tr:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.card h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
@media (max-width: 900px) { .adm-nav svg { display: none; } .av { display: none; } }

.op-count .row { flex-wrap: wrap; row-gap: 0; } .steps span { font-size: 14.5px; }
