/* ===========================================================================
   EDS estación · hoja de estilos (mismo diseño que la central eds.alasapi.com)
   ---------------------------------------------------------------------------
   - Los tokens, el armazón (barra lateral azul noche + área clara), las
     tarjetas, las tablas, los botones, los campos y las insignias están
     portados de la hoja real de la central (docs/diseno-ui/central/
     central-index.css). Quien pase de una a otra ve el mismo producto.
   - Lo que cambia por ser ESTACIÓN, y por qué:
       · base de 16 px y controles de 44/48 px: se opera en tablet, de pie y
         con sol; la central se usa sentado en un PC.
       · grises un punto más oscuros (--muted, encabezados de tabla, borde de
         campo) para cumplir WCAG AA sobre el fondo claro.
       · en pantalla angosta la barra lateral baja y se vuelve barra inferior
         con blancos grandes, en vez del cajón lateral de la central.
       · componentes que la central no tiene: caras, display del surtidor,
         teclado del PIN, panel de autorización.
   - Sin fuentes, imágenes externas ni CDN: la estación puede estar sin
     internet. Fuente del sistema. El escudo se sirve desde /static/img.
   - Chrome/Edge/WebView 84 o más nuevo (flex gap). No usa :has, color-mix,
     container queries ni anidamiento. Sin estilos en línea: la CSP es
     style-src 'self'. Solo tema claro: al sol se lee mejor.
   =========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Neutros (paleta de la central) */
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #edf1f5;
  --line: #dfe6ef;
  --line-2: #c8d5e5;
  --line-field: #8494ab;    /* 3,1:1 sobre blanco (WCAG 1.4.11); la central usa #c8d5e5 */
  /* Borde de los controles que NO tienen relleno (botón blanco, tecla del PIN,
     ficha de usuario): ahí el borde es lo único que dibuja el control, así que
     necesita 3:1 (WCAG 1.4.11). El #c8d5e5 de la central da 1,4:1 y al sol el
     botón desaparece. Mismo tono, un punto más oscuro. */
  --line-ctl: #8494ab;      /* 3,09:1 sobre blanco */
  --line-ctl-bad: #c4817c;  /* 3,10:1 sobre blanco; el #ebcbc8 de la central da 1,6:1 */
  --ink: #132238;
  --ink-2: #35485e;
  --muted: #5d6c81;         /* el #68778c de la central, un punto más oscuro: 5,0:1 sobre --bg */
  --th-ink: #5f7186;        /* encabezado de tabla sobre --surface-2: 4,8:1 */
  --placeholder: #66758a;

  /* Azul principal */
  --brand-rgb: 18, 104, 232;
  --brand: #1268e8;
  --brand-dark: #0a4fb9;
  --brand-ink: #ffffff;
  --brand-text: #0a4fb9;
  --brand-soft: #eaf3ff;
  --brand-soft-2: #d7e7ff;
  --brand-line: rgba(18, 104, 232, .45);
  --brand-grad: linear-gradient(180deg, #1974ec, #1268e8);
  --focus-ring: 0 0 0 3px rgba(18, 104, 232, .28);

  /* Marca */
  --navy: #071d37;
  --navy-deep: #041426;
  --navy-2: #0f2e53;
  --navy-text: #c7d8eb;
  --gold: #c79528;
  --blue: #3578b9;

  /* Semánticos (tomados de la central; todos >= 4,9:1 sobre su fondo suave) */
  --ok: #087451;   --ok-bg: #e7f7ef;   --ok-line: #ccecdc;
  --warn: #8b640b; --warn-bg: #fff6dc; --warn-line: #f2dfac;
  --bad: #b23731;  --bad-bg: #fff0ef;  --bad-line: #f3d5d2;
  --info: #286684; --info-bg: #eaf3f8; --info-line: #d3e7f0;

  /* Estados de cara (Gilbarco). Banda de color + ícono + texto: nunca color solo. */
  --st-idle: #e4eaf1;  --st-idle-ink: #22324a; --st-idle-dot: #7a8aa0;
  /* Ámbar con tinta casi negra (6,1:1): el blanco sobre ámbar no pasa AA. */
  --st-call: #d98c05;  --st-call-ink: #2a1c00; --st-call-soft: #fff6dc; --st-call-text: #8b640b;
  --st-busy: #0e7c3a;  --st-busy-ink: #ffffff; --st-busy-soft: #e7f7ef; --st-busy-text: #087451;
  --st-done: #6b3fc0;  --st-done-ink: #ffffff; --st-done-soft: #f1ebfa; --st-done-text: #5f438b;
  --st-fail: #b23731;  --st-fail-ink: #ffffff; --st-fail-soft: #fff0ef; --st-fail-text: #9b2b26;

  /* Display del surtidor */
  --lcd-bg: #061425;
  --lcd-edge: #1c3354;
  --lcd-ink: #f3f7fb;
  --lcd-dim: #8ea6c2;

  /* Placa colombiana */
  --plate-bg: #ffd21f;
  --plate-ink: #111111;

  /* Tipografía */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Roboto Mono", "Liberation Mono", monospace;
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 21px;
  --fs-2xl: 28px;
  --fs-kpi: 30px;
  --fs-lcd: 38px;

  /* Espacio, radios, sombras (radios y sombras de la central) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --r-1: 6px; --r-2: 9px; --r-3: 13px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(7, 29, 55, .04), 0 2px 8px rgba(7, 29, 55, .04);
  --sh-2: 0 1px 2px rgba(7, 29, 55, .05), 0 6px 18px rgba(7, 29, 55, .06);
  --sh-3: 0 24px 64px rgba(5, 27, 52, .2);

  /* Medidas */
  --touch: 44px;
  --sidebar-w: 268px;
  --topbar-h: 64px;
  --page-max: 1600px;
}

/* Tablets y pantallas táctiles: texto un punto más grande y todo a 48 px */
@media (pointer: coarse) {
  :root { --fs-md: 17px; --fs-sm: 15px; --touch: 48px; }
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 320px; min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-md)/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { line-height: 1.2; color: var(--ink); }
h1 { font-size: var(--fs-2xl); font-weight: 720; letter-spacing: -.025em; margin: 0 0 var(--sp-4); color: #10243d; }
h2 { font-size: var(--fs-xl); font-weight: 700; margin: var(--sp-6) 0 var(--sp-3); color: #172b44; }
h3 { font-size: var(--fs-lg); font-weight: 700; margin: var(--sp-4) 0 var(--sp-2); }
p { margin: 0 0 var(--sp-3); }
ul { margin: 0 0 var(--sp-3); padding-left: 1.3em; }
li + li { margin-top: 6px; }
a { color: var(--brand-text); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-5) 0; }
pre { margin: 0; padding: var(--sp-3); white-space: pre-wrap; word-break: break-all; font-family: var(--mono); }
button, input, select, textarea { font: inherit; }

a:focus, button:focus, summary:focus, input:focus, select:focus, textarea:focus { outline: 3px solid var(--brand); outline-offset: 2px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible), summary:focus:not(:focus-visible) { outline: none; }

.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { display: block; color: var(--brand-text); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow.light { color: #75bdff; }

svg.i {
  width: 20px; height: 20px; flex: none; vertical-align: -4px;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
svg.i.lg { width: 24px; height: 24px; }
svg.i.xl { width: 32px; height: 32px; }
svg.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--st-idle-dot); flex: none; }
.dot.ok { background: var(--st-busy); }
.dot.warn { background: var(--st-call); }
.dot.bad { background: var(--st-fail); }

/* 3. Armazón: barra lateral azul noche + área clara con barra superior ------
   Es la misma estructura de la central: .shell -> .sidebar + el contenido. */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
body.plain .shell { grid-template-columns: minmax(0, 1fr); }
.canvas { display: flex; flex-direction: column; min-width: 0; }

.sidebar {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 30;
  display: flex; flex-direction: column;
  height: 100vh; padding: 22px 14px 14px; overflow: hidden;
  color: var(--navy-text); font-size: 15px;
  background:
    radial-gradient(circle at 12% 1%, rgba(18, 104, 232, .22), transparent 30%),
    linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.sidebar > * { flex: none; }
.mobile-nav-head, .mobile-nav-bar, .mobile-nav-backdrop { display: none; }
.sidebar .brand { display: flex; flex-direction: column; align-items: center; gap: 1px; margin: 0 0 14px; text-decoration: none; text-align: center; }
.sidebar .brand img { display: block; width: 132px; max-width: 100%; height: auto; object-fit: contain; }
.sidebar .brand-sub { width: 100%; margin: -2px 0 0; color: #9ab1ca; font-size: 12px; letter-spacing: .025em; }

.station-chip {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 10px 11px;
  color: inherit; background: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .095); border-radius: 11px; text-decoration: none;
  transition: background .16s ease, border-color .16s ease;
}
.station-chip:hover { background: rgba(18, 104, 232, .18); border-color: rgba(117, 189, 255, .28); }
.station-chip .status-dot { flex: 0 0 auto; width: 8px; height: 8px; background: #32d296; border-radius: 50%; box-shadow: 0 0 0 4px rgba(50, 210, 150, .12); }
.station-chip .status-dot.is-off { background: #f0a73c; box-shadow: 0 0 0 4px rgba(240, 167, 60, .14); }
.station-chip > div { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.station-chip strong { overflow: hidden; color: #f1f7f4; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.station-chip span:not(.status-dot) { margin-top: 2px; color: #8ea7c0; font-size: 12px; }
.station-chip > svg.i { width: 17px; height: 17px; color: #6f88a4; }

.nav-caption { display: block; margin: 12px 10px 6px; color: #718ba7; font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-caption:first-child { margin-top: 0; }
/* Solo la lista de secciones se desplaza: la marca queda arriba y la ficha del
   usuario abajo, aunque el administrador vea las doce secciones. */
.nav-groups { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow-y: auto; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 11px;
  color: var(--navy-text); border: 1px solid transparent; border-radius: 10px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: color .16s ease, background .16s ease;
}
.nav-link svg.i { flex: 0 0 auto; width: 19px; height: 19px; color: #829ab4; }
.nav-link .nav-text { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; }
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.nav-link.on { color: #fff; background: linear-gradient(90deg, rgba(18, 104, 232, .32), rgba(18, 104, 232, .14)); border-color: rgba(117, 189, 255, .18); }
.nav-link.on svg.i { color: #75bdff; }

.privacy-note {
  display: flex; align-items: flex-start; gap: 9px; margin: 14px 2px 10px; padding: 10px;
  color: #93abc4; background: rgba(255, 255, 255, .035); border-radius: 9px; font-size: 12px; line-height: 1.5;
}
/* Pantallas bajas (1280x800 o una tablet acostada): la barra lateral suelta lo
   prescindible y se aprieta, para que al administrador le quepan las doce secciones. */
@media (min-width: 1001px) and (max-height: 880px) { .privacy-note { display: none; } }
@media (min-width: 1001px) and (max-height: 860px) {
  .sidebar { padding-top: 16px; }
  .sidebar .brand img { width: 104px; }
  .sidebar .brand-sub { display: none; }
  .station-chip { margin-bottom: 12px; }
  .nav-caption { margin: 9px 10px 5px; }
  .nav-link { min-height: 38px; padding: 6px 11px; }
}
.privacy-note svg.i { flex: none; width: 17px; height: 17px; margin-top: 1px; color: #69afff; }

.user-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 6px;
  padding: 13px 4px 2px; border-top: 1px solid rgba(255, 255, 255, .09);
}
.user-card form.inline { display: flex; margin: 0; }
.user-copy { display: flex; flex-direction: column; min-width: 0; }
.user-copy strong { overflow: hidden; color: #f4f8f6; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-copy span { margin-top: 2px; color: #93abc4; font-size: 12px; }
.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  color: var(--muted); background: transparent; border: 0; border-radius: 8px; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { color: var(--brand-text); background: var(--brand-soft); }
.icon-btn svg.i { width: 18px; height: 18px; }
.sidebar-action { color: #93abc4; }
.sidebar-action:hover { color: #fff; background: rgba(255, 255, 255, .10); }

/* Barra superior del área clara: título de la pantalla y estado en vivo */
.topbar {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: var(--topbar-h); padding: 9px clamp(16px, 2.6vw, 40px);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-brand { display: none; place-items: center; flex: none; width: 46px; height: 40px; padding: 4px; background: var(--navy); border-radius: 10px; }
.topbar-brand img { display: block; width: 100%; height: auto; }
.topbar-brand.on-plain { display: grid; }
.topbar-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.topbar-title .topbar-station { color: var(--muted); font-size: var(--fs-xs); font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.topbar-title strong { overflow: hidden; color: var(--ink); font-size: var(--fs-md); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.topbar-context { display: none; }
.topbar-status { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.topbar-help {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none;
  min-height: 38px; padding: 0 12px; margin-left: 4px;
  color: var(--brand-text); background: var(--brand-soft); border: 1px solid var(--brand-line);
  border-radius: 10px; font-size: 12px; font-weight: 800; text-decoration: none;
  box-shadow: 0 2px 7px rgba(18, 104, 232, .08);
}
.topbar-help:hover { color: #fff; background: var(--brand); border-color: var(--brand); }
.topbar-help svg.i { width: 17px; height: 17px; }

.shift-pill, .sync {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink-2);
  font-size: var(--fs-sm); font-weight: 650; white-space: nowrap; text-decoration: none;
}
a.shift-pill:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.shift-pill.is-open { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.shift-pill.is-open .dot { background: #1aab77; }
.shift-pill.is-closing, .shift-pill.is-none { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.shift-pill.is-closing .dot, .shift-pill.is-none .dot { background: #daa527; }
.shift-who, .sync-label { font-weight: 550; }
.sync.is-online { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.sync.is-offline { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.sync svg.i { width: 17px; height: 17px; }
.clock {
  display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px;
  border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2);
  font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.clock .live-dot { margin: 0; }

.avatar {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand-text);
  border: 1px solid #c9def9; font-size: 13px; font-weight: 800; letter-spacing: .02em;
}
.sidebar .avatar { color: #d8efff; background: rgba(18, 104, 232, .24); border-color: rgba(117, 189, 255, .22); }

.count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 21px; height: 21px; padding: 0 7px; margin-left: 2px;
  border-radius: var(--r-pill); background: var(--st-fail); color: #ffffff;
  font-size: 12px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.count.soft { background: var(--st-call); color: var(--st-call-ink); }
.count.muted { background: var(--surface-3); color: var(--ink-2); }
.nav-link .count { margin-left: auto; }

main.content {
  width: 100%; max-width: var(--page-max); min-width: 0; margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 48px) 56px;
}
main.content > h1:first-child { margin-top: 0; }
main.content.narrow { max-width: 900px; }

/* 4. Encabezado de página, migas y títulos de sección ---------------------- */
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-3) var(--sp-5); margin-bottom: var(--sp-5); min-height: 50px;
}
.page-head > div:first-child { flex: 1 1 360px; min-width: 0; }
.page-head > div:first-child:not(.person) { display: flex; flex-direction: column; gap: 4px; }
.page-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0; }
.page-head h1 .chip { font-size: 13px; min-height: 28px; }
.page-head .tabs { margin: 0; }
.page-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; max-width: 86ch; margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; }
.page-sub strong { color: var(--ink-2); }
.page-intro { max-width: 78ch; margin: -8px 0 var(--sp-5); color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.page-actions .btn { margin: 0; }
a.crumb {
  display: inline-flex; align-items: center; gap: 4px; min-height: 34px; margin-bottom: var(--sp-1);
  color: var(--muted); font-weight: 650; font-size: var(--fs-sm); text-decoration: none;
}
a.crumb svg.i { width: 18px; height: 18px; }
a.crumb:hover { color: var(--brand-text); }
.section-title {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
  margin: var(--sp-6) 0 var(--sp-3); font-size: var(--fs-lg); color: #172b44;
}
.section-title .muted, .section-title .small { font-size: var(--fs-sm); font-weight: 500; }
.section-title > .muted:not(.count), .section-title > .small, .section-title > .tabs { margin-left: auto; }
div.section-title { align-items: center; }
.section-title > h2 { margin: 0; font-size: var(--fs-lg); }
.section-title .tabs { margin: 0; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #1aab77; box-shadow: 0 0 0 0 rgba(26, 171, 119, .5); animation: livepulse 2s infinite; flex: none; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(26, 171, 119, .45); } 70% { box-shadow: 0 0 0 7px rgba(26, 171, 119, 0); } 100% { box-shadow: 0 0 0 0 rgba(26, 171, 119, 0); } }

/* 5. Avisos: banner, flash, alarma en línea -------------------------------- */
.banner { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px var(--sp-5); font-weight: 650; font-size: var(--fs-sm); }
.banner.offline, .banner.warn { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-line); }
/* Acceso desde fuera de la estación (§8.6): se avisa siempre, para que nadie crea que está en la isla. */
.banner.remote { background: var(--info-bg); color: var(--info); border-bottom: 1px solid var(--info-line); }
.banner a { color: inherit; text-decoration: underline; }
.banner svg.i { flex: none; }
/* Falta la contraseña obligatoria: el candado de la barra lateral lo dice sin depender del color. */
.icon-btn.needs-attention { position: relative; }
.icon-btn.needs-attention::after {
  content: ""; position: absolute; top: 5px; right: 5px; width: 9px; height: 9px;
  background: var(--st-call); border: 1.5px solid var(--navy); border-radius: 50%;
}

.flash {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 var(--sp-4); padding: 11px 13px;
  border: 1px solid transparent; border-radius: var(--r-2); font-weight: 600; line-height: 1.45;
}
.flash svg.i { flex: none; margin-top: 1px; }
.flash.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.flash.error { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.flash.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.flash.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.flash a { color: inherit; }
/* Los avisos tras una acción (role="status", los pone base.html) llevan su ícono por CSS:
   el texto va solo dentro del div. El ícono cambia de forma con el tipo, no solo de color. */
.flash[role="status"]::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: 1px;
  background-repeat: no-repeat; background-position: center; background-size: 20px;
}
.flash.ok[role="status"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23087451' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12.5 2.8 2.8L16.5 9.5'/%3E%3C/svg%3E"); }
.flash.error[role="status"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b23731' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3h8l5 5v8l-5 5H8l-5-5V8z'/%3E%3Cpath d='M12 8v5M12 16.5v.3'/%3E%3C/svg%3E"); }
.flash.info[role="status"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23286684' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5.5M12 7.8v.2'/%3E%3C/svg%3E"); }
.flash.warn[role="status"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b640b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.2 2.4 18a2 2 0 0 0 1.7 3h15.8a2 2 0 0 0 1.7-3L13.7 4.2a2 2 0 0 0-3.4 0z'/%3E%3Cpath d='M12 9v4.5M12 17.2v.3'/%3E%3C/svg%3E"); }

.alarm {
  display: flex; align-items: flex-start; gap: 8px; margin-top: var(--sp-2); padding: 9px 12px;
  border-radius: var(--r-2); font-size: var(--fs-sm); font-weight: 650;
}
.alarm svg.i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
span.alarm { display: inline-flex; margin: 0; padding: 3px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.alarm.sev-critica { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); }
.alarm.sev-advertencia { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.alarm.sev-info { background: var(--info-bg); color: var(--info); border: 1px solid var(--info-line); }

/* 6. Insignias (chips), placa y modo --------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 25px; padding: 3px 9px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  background: var(--surface-3); color: var(--ink-2);
  font-size: 12.5px; font-weight: 750; line-height: 1.1; white-space: nowrap; vertical-align: middle; text-decoration: none;
}
.chip svg.i { width: 15px; height: 15px; vertical-align: -3px; }
.chip .dot { width: 7px; height: 7px; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.ok .dot { background: #1aab77; }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.warn .dot { background: #daa527; }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.bad .dot { background: var(--bad); }
.chip.info { background: var(--info-bg); color: var(--info); }
.chip.outline { background: transparent; border-color: var(--line-2); color: var(--muted); }
.chip.mode { min-height: 28px; padding: 4px 11px; background: #eef2f7; color: #37618d; border-color: #dbe4ee; }
.chip.mode.is-auto { background: var(--surface); color: var(--muted); border-color: var(--line-2); }
.chip.mode.is-off { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
a.chip:hover { text-decoration: underline; }

.plate {
  display: inline-block; padding: 1px 8px; border: 1.5px solid #1a1a1a; border-radius: var(--r-1);
  background: var(--plate-bg); color: var(--plate-ink);
  font-family: var(--mono); font-size: 1em; font-weight: 700; letter-spacing: .06em; line-height: 1.3;
  white-space: nowrap; vertical-align: 1px;
}
.rom { font-family: var(--mono); font-size: .92em; letter-spacing: .02em; word-break: break-all; color: #59697d; }

/* 7. Tarjetas y rejillas --------------------------------------------------- */
.card {
  margin: 0 0 var(--sp-4); padding: 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1);
}
.card > h2:first-child, .card > h3:first-child, .card > .card-head:first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2 { font-size: var(--fs-lg); margin: var(--sp-5) 0 var(--sp-3); }
.card.warn { background: #fffdf6; border-color: var(--warn-line); }
.card.bad { background: #fffbfa; border-color: var(--bad-line); }
.card.brandy { border-top: 3px solid var(--brand); padding-top: 16px; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-4); }
.card-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; }
.card-head .sub { margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.card-title { display: flex; align-items: center; gap: 12px; margin: 0 0 var(--sp-3); }
.card-title h2, .card-title h3, .card .card-title h2 { margin: 0; }
.card-head .card-title { margin: 0; }
.card-title strong { font-size: var(--fs-lg); }
.card-title .ico {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 11px; background: var(--brand-soft); color: var(--brand);
}
.card.warn .card-title .ico { background: #fff4d9; color: #9b7116; }
.card.bad .card-title .ico { background: var(--bad-bg); color: var(--bad); }
.hint, form.stack .hint { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--muted); line-height: 1.5; }

.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-bottom: var(--sp-4); }
.row > form { margin: 0; }
.row .btn { margin: 0; }
.row input[type=text], .row input[type=search], .row select { width: auto; flex: 1 1 240px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--sp-4); align-items: start; margin-bottom: var(--sp-4); }
.cols > * { min-width: 0; margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; margin-bottom: var(--sp-4); }
.split > * { min-width: 0; margin: 0; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } }

/* 8. Botones ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--touch); padding: 8px 16px;
  border: 1px solid var(--brand); border-radius: var(--r-2);
  background: var(--brand-grad); color: var(--brand-ink);
  box-shadow: 0 2px 4px rgba(10, 79, 185, .14);
  font: inherit; font-size: var(--fs-sm); font-weight: 700; line-height: 1.2;
  text-align: center; text-decoration: none; cursor: pointer; user-select: none; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn:active { box-shadow: inset 0 0 0 100px rgba(0, 0, 0, .12); }
.btn.secondary { background: var(--surface); color: #315d91; border-color: var(--line-ctl); box-shadow: none; }
.btn.secondary:hover { color: var(--brand-text); background: var(--brand-soft); border-color: #a8c9f5; }
.btn.secondary svg.i { color: var(--brand); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--brand-text); box-shadow: none; }
.btn.quiet:hover { background: var(--brand-soft); border-color: transparent; color: var(--brand-text); }
.btn.danger { background: var(--surface); color: var(--bad); border-color: var(--line-ctl-bad); box-shadow: none; }
.btn.danger:hover { background: var(--bad-bg); border-color: #a8544e; color: var(--bad); }
.btn.danger.secondary { background: var(--surface); color: var(--bad); border-color: var(--line-ctl-bad); }
/* «Cerrar turno» y demás acciones grandes de riesgo: a 54 px de alto el borde
   fino se pierde. Un filete abajo las dibuja como botón sin llegar al rojo lleno. */
.btn.big.danger { border-bottom-width: 3px; }
.btn.big { display: flex; width: 100%; min-height: 54px; margin-top: var(--sp-4); font-size: var(--fs-md); }
.btn.small { min-height: 36px; padding: 5px 11px; font-size: 13px; gap: 6px; }
.btn.small svg.i { width: 16px; height: 16px; }
.btn.ghost { background: var(--surface); color: #315d91; border-color: var(--line-ctl); box-shadow: none; }
.btn.ghost:hover { color: var(--brand-text); background: var(--brand-soft); border-color: #a8c9f5; }
.btn.block { width: 100%; }
.btn small { display: block; font-weight: 500; font-size: var(--fs-sm); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
form.inline { display: inline; margin: 0; }
.actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 5px; }

/* htmx: indicador y botón ocupado */
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
.btn.htmx-request, .htmx-request .btn[type=submit], .btn.is-loading { pointer-events: none; opacity: .85; }
.btn.htmx-request::after, .htmx-request .btn[type=submit]::after, .btn.is-loading::after {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 9. Formularios ------------------------------------------------------------ */
form.stack label { display: block; margin: var(--sp-4) 0 6px; font-size: var(--fs-sm); font-weight: 650; color: #53677e; }
form.stack > h3:first-child, form.stack > h2:first-child { margin-top: 0; }
form.stack .btn { margin-top: var(--sp-4); }
input[type=text], input[type=password], input[type=number], input[type=search], input[type=tel],
input[type=datetime-local], input[type=date], select, textarea {
  width: 100%; min-width: 0; min-height: var(--touch); padding: 9px 12px;
  border: 1px solid var(--line-field); border-radius: var(--r-2);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: var(--fs-md);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 90px; line-height: 1.45; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus, input.is-focus { outline: none; border-color: #3985ed; box-shadow: var(--focus-ring); }
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }
input:read-only { color: #66788e; background: #f3f6fa; }
input[aria-invalid=true], select[aria-invalid=true], .is-invalid { border-color: var(--bad); }
.field-error { display: flex; gap: 6px; margin: 6px 0 0; color: var(--bad); font-size: var(--fs-sm); font-weight: 700; }
.field-error svg.i { width: 18px; height: 18px; margin-top: 1px; }
select {
  -webkit-appearance: none; appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%235d6c81' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; background-size: 20px;
}
.check, form.stack label.check {
  display: flex; align-items: center; gap: 12px; min-height: var(--touch); margin: var(--sp-2) 0;
  font-size: var(--fs-md); font-weight: 600; color: var(--ink); cursor: pointer;
}
.check input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: var(--brand); }
.check input:disabled + * { opacity: .5; }
.field { margin-bottom: var(--sp-3); }
.radio-cards { display: grid; gap: var(--sp-2); }
.radio-cards label.check, form.stack .radio-cards label.check {
  margin: 0; padding: 10px 14px; border: 1px solid var(--line-field); border-radius: var(--r-2); background: var(--surface);
}
.radio-cards label.check:hover { border-color: var(--brand); background: var(--brand-soft); }
.radio-cards .cell-sub { display: block; color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.radio-cards:empty { display: none; }
.radio-cards label.opening-slot, form.stack .radio-cards label.opening-slot { align-items: flex-start; padding: 13px 14px; }
.opening-slot > input { margin-top: 3px; }
.opening-slot-body { display: flex; flex: 1; flex-direction: column; gap: 10px; min-width: 0; }
.opening-slot-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 12px; }
.opening-slot-head > strong { color: var(--ink); font-size: var(--fs-md); }
.opening-slot-head > span { color: var(--muted); font-size: var(--fs-xs); font-weight: 650; }
.opening-readings { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 7px; }
.opening-reading {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 4px 10px;
  min-width: 0; padding: 9px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px;
}
.opening-reading-face { display: flex; flex-direction: column; min-width: 0; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 750; }
.opening-reading-face small { overflow: hidden; color: var(--muted); font-size: 10.5px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.opening-reading > strong { color: var(--ink); font-size: var(--fs-md); font-variant-numeric: tabular-nums; white-space: nowrap; }
.opening-reading > strong small { color: var(--muted); font-size: 10px; font-weight: 650; }
.opening-reading-at {
  display: flex; grid-column: 1 / -1; align-items: center; gap: 5px;
  color: var(--muted); font-size: 10.5px; font-weight: 550;
}
.opening-reading-at svg.i { width: 13px; height: 13px; flex: none; }
.opening-reading-at.warn { color: var(--warn); }
.radio-cards label.opening-slot-blocked,
form.stack .radio-cards label.opening-slot-blocked {
  cursor: not-allowed; background: var(--warn-bg); border-color: var(--warn-line);
}
.radio-cards label.opening-slot-blocked:hover { background: var(--warn-bg); border-color: var(--warn-line); }
.opening-slot-blocked > input + .opening-slot-body { opacity: 1; }
.opening-slot-blocker {
  display: flex; align-items: center; gap: 6px; color: var(--warn); font-size: var(--fs-sm); font-weight: 750;
}
.opening-slot-blocker svg.i { width: 16px; height: 16px; flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 var(--sp-4); align-items: start; }
.form-grid > * { min-width: 0; }
.fieldset-label { display: block; margin: var(--sp-4) 0 6px; font-size: var(--fs-sm); font-weight: 650; color: #53677e; }

/* Selector segmentado (radios) y pestañas */
.seg, .tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px;
  background: var(--surface-3); border-radius: 11px;
}
.tabs { margin: 0 0 var(--sp-4); }
.seg-opt, form.stack label.seg-opt { position: relative; display: block; margin: 0; font-size: var(--fs-sm); }
.seg-opt input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
.seg-opt span, .tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 15px;
  border-radius: 8px; color: var(--ink-2); font-size: var(--fs-sm); font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.seg-opt span:hover, .tab:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.seg-opt input:checked + span, .tab.on {
  background: var(--surface); color: var(--brand-text); box-shadow: 0 1px 2px rgba(7, 29, 55, .1), 0 0 0 1px var(--line);
}
.seg-opt input:focus + span { outline: 3px solid var(--brand); outline-offset: 1px; }
.seg-opt input:disabled + span { opacity: .45; cursor: not-allowed; }
.tab .count { margin-left: 0; }
.seg.block { display: flex; }
.seg.block .seg-opt { flex: 1 1 0; }
.seg.block .seg-opt span { justify-content: center; width: 100%; }

/* Plegables (acciones poco frecuentes, ayuda) */
details.fold { border-top: 1px solid var(--line); }
details.fold > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  min-height: var(--touch); font-weight: 700; cursor: pointer; list-style: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 6px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
}
details.fold[open] > summary::after { transform: rotate(-135deg); }
details.fold > summary .summary-text { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
details.fold > .fold-body { padding-bottom: var(--sp-4); }
details.fold > .fold-body > form.stack > label:first-of-type { margin-top: var(--sp-2); }

/* 10. Tablas ---------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: var(--sp-4);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1);
}
table.list { width: 100%; border-collapse: separate; border-spacing: 0; }
table.list th {
  padding: 11px 13px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  color: var(--th-ink); font-size: var(--fs-xs); font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  text-align: left; white-space: nowrap;
}
table.list td { padding: 11px 13px; border-bottom: 1px solid #e6ebf1; color: var(--ink-2); font-size: var(--fs-sm); vertical-align: middle; }
table.list tbody tr { transition: background .12s ease; }
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover td { background: #f9fbfd; }
table.list th.num, table.list td.num { text-align: right; }
/* La columna de acciones se encoge a su contenido: SIN ancho declarado. Con
   «width: 1%» (o 1px) Chrome no le respeta el mínimo del botón y este se sale
   sobre la columna de al lado; sin ancho, el reparto automático le da su mínimo
   y el sobrante se va a las columnas de texto. */
table.list td.actions, table.list th:last-child:empty { text-align: right; white-space: nowrap; }
table.list td.actions .btn { margin: 0; }
table.list td.actions form { display: inline; margin: 0; }
table.list td.actions .cell-wrap { display: block; min-width: 160px; max-width: 300px; white-space: normal; text-align: left; }
/* Lecturas sin registrar: ocho columnas y encabezados largos. Los rótulos se parten
   en dos renglones y el ROM va entero, así la tabla no se sale de la tarjeta. */
table.list.unregistered th { white-space: normal; }
table.list.unregistered .rom { white-space: nowrap; word-break: normal; }
table.list td.actions .actions-row { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 5px; }
table.list td a { font-weight: 650; }
table.list tr.total td { background: var(--surface-2); border-top: 2px solid var(--ink-2); font-weight: 700; }
table.list tr.attention td { background: #fffdf3; }
table.list tr.attention td:first-child { box-shadow: inset 3px 0 0 #daa527; }
table.list tr.row-form td { background: var(--surface-2); }
table.list .cell-sub { display: block; margin-top: 2px; color: var(--muted); font-size: var(--fs-xs); font-weight: 400; }
table.list .strong { font-weight: 700; color: #203650; }
table.list td.empty-cell { padding: 0; }
table.list td.small { font-size: var(--fs-sm); }
table.list input { min-width: 110px; }
/* 168 px: «Según la placa» más la flecha. Con 150 el rótulo salía cortado. */
table.list select { min-width: 168px; }
.pos { color: var(--warn); font-weight: 700; }
.neg { color: var(--bad); font-weight: 700; }
.zero { color: var(--ok); font-weight: 700; }

table.kv { width: 100%; border-collapse: collapse; }
table.kv th {
  width: 40%; padding: 10px 12px 10px 0; text-align: left; vertical-align: top;
  color: var(--muted); font-size: var(--fs-sm); font-weight: 600;
}
table.kv td { padding: 10px 0; vertical-align: top; }
table.kv tr + tr th, table.kv tr + tr td { border-top: 1px solid var(--line); }
table.kv td.num { text-align: left; }
table.kv td.num strong { font-size: var(--fs-lg); }

/* Tabla que se apila en teléfono: necesita data-label en cada td */
@media (max-width: 600px) {
  table.list.stack-sm thead { display: none; }
  table.list.stack-sm, table.list.stack-sm tbody, table.list.stack-sm tr, table.list.stack-sm td { display: block; width: 100%; }
  table.list.stack-sm tr { position: relative; padding: 8px 0; border-bottom: 1px solid var(--line); }
  /* La etiqueta va a la izquierda en posición absoluta: así una celda con varios hijos
     (enlace + .cell-sub, varios chips) se apila a la derecha en vez de repartirse. */
  table.list.stack-sm td { position: relative; min-height: 34px; padding: 6px 14px 6px 40%; border: 0; text-align: right; white-space: normal; }
  table.list.stack-sm td::before {
    content: attr(data-label); position: absolute; top: 7px; left: 14px; max-width: 36%;
    color: var(--muted); font-size: var(--fs-sm); font-weight: 600; text-align: left;
  }
  table.list.stack-sm td.actions { width: 100%; padding-left: 14px; }
  table.list.stack-sm tr.attention { background: #fffdf3; box-shadow: inset 3px 0 0 #daa527; }
  table.list.stack-sm tr.attention td { background: transparent; box-shadow: none; }
  table.list.stack-sm td.hide-sm, .hide-sm { display: none; }
}

/* 11. Pantallas ------------------------------------------------------------ */

/* 11.1 Caras */
.island { margin-bottom: var(--sp-6); }
.island-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-3); }
.island h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 var(--sp-3); font-size: var(--fs-xl); }
.island-head h2 { margin: 0; }
.island h2 .sub { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.island-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.faces { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--sp-4); }

.face {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3);
  box-shadow: var(--sh-1); overflow: hidden;
}
.face-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: 52px; padding: 8px var(--sp-4);
  background: var(--st-idle); color: var(--st-idle-ink);
}
.face-no { font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
/* El estado se lee desde lejos: mayúsculas, con ícono, nunca solo color */
.state {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  font-size: var(--fs-sm); font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap;
}
.face-body { display: flex; flex-direction: column; gap: var(--sp-3); flex: 1; padding: var(--sp-4); }
.face.st-call { border-color: var(--st-call); }
.face.st-busy { border-color: var(--st-busy); }
.face.st-done { border-color: var(--st-done); }
.face.st-bad { border-color: var(--st-fail); }
.face.st-warn { border-color: var(--bad-line); }
.face.st-call .face-head { background: var(--st-call); color: var(--st-call-ink); }
.face.st-busy .face-head { background: var(--st-busy); color: var(--st-busy-ink); }
.face.st-done .face-head { background: var(--st-done); color: var(--st-done-ink); }
.face.st-bad .face-head { background: var(--st-fail); color: var(--st-fail-ink); }
.face.st-warn .face-head { background: var(--st-fail-soft); color: var(--st-fail-text); }
.face.st-call .state svg.i { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }

/* Display del surtidor: pesos, galones y precio, como en el Gilbarco */
.display {
  min-height: 132px; padding: 4px 14px;
  background: var(--lcd-bg); border: 1px solid var(--lcd-edge); border-radius: var(--r-2);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .35); color: var(--lcd-ink);
}
.display-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: 6px 0; }
.display-row + .display-row { border-top: 1px solid var(--lcd-edge); }
.display-label { color: var(--lcd-dim); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.display-value {
  color: var(--lcd-ink); font-size: var(--fs-lcd); font-weight: 700; line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; white-space: nowrap;
}
.display-row.sub { flex-wrap: wrap; padding: 5px 0 6px; }
.display-row.sub .display-value { margin-left: auto; font-size: var(--fs-md); font-weight: 600; color: var(--lcd-dim); letter-spacing: 0; }
.display.is-idle .display-value { color: #b7c7da; }
.display.is-off {
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px;
  background-color: var(--lcd-bg);
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .045) 0 10px, transparent 10px 20px);
  color: var(--lcd-dim); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: var(--fs-sm); text-align: center;
}
.display.is-off svg.i { width: 28px; height: 28px; color: #ff8a80; }
.display.is-blank { display: flex; align-items: center; justify-content: center; color: var(--lcd-dim); font-size: var(--fs-sm); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

.face-callout {
  display: flex; flex-direction: column; justify-content: center; gap: 6px; min-height: 132px;
  padding: var(--sp-4); border: 2px dashed var(--st-call); border-radius: var(--r-2);
  background: var(--st-call-soft); color: var(--ink);
}
.face-callout strong { display: flex; align-items: center; gap: 10px; font-size: var(--fs-lg); line-height: 1.25; color: var(--st-call-text); }
.face-callout strong svg.i { width: 26px; height: 26px; flex: none; }
.face-callout .reader { font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.face-callout .small { color: var(--ink-2); }
.face-callout .btn { align-self: flex-start; margin-top: 4px; }

.face-meta { display: grid; gap: 8px; margin: 0; font-size: var(--fs-sm); }
.face-meta > div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.face-meta dt { flex: none; width: 58px; color: var(--muted); font-weight: 650; }
.face-meta dd { margin: 0; min-width: 0; color: var(--ink-2); }
.face .alarm { margin-top: 0; }

/* Escritorio ancho: display a la izquierda y datos a la derecha, así las 4 caras caben en 1280 x 800 */
@media (min-width: 1200px) {
  .face-body {
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr;
    grid-auto-flow: row dense; column-gap: var(--sp-4); row-gap: var(--sp-3); align-items: start;
  }
  .face-body > .display, .face-body > .face-callout { grid-column: 1; grid-row: 1 / -1; }
  /* La alarma de la cara va a la derecha, sobre los datos: la tarjeta no crece y las 4 caras caben */
  .face-body > :not(.display):not(.face-callout) { grid-column: 2; }
  .face-body .display-row:not(.sub) { display: block; padding: 5px 0 2px; }
  .face-body .display-row:not(.sub) .display-label { display: block; }
  .face-body .display-row:not(.sub) .display-value { display: block; text-align: right; }
  .face-body .face-meta > div { flex-direction: column; gap: 0; }
  .face-body .face-meta dt { width: auto; font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; }
  .face-callout strong { font-size: var(--fs-md); }
  .island { margin-bottom: var(--sp-5); }
}
/* "En vivo · 14:32:18": va DENTRO del contenedor sondeado (si no, la hora no cambia nunca) */
.live-note { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

/* Datos congelados: el sondeo htmx falló o no respondió (static/ui.js pone .is-stale en el contenedor) */
.stale-note { display: none; }
.is-stale > .stale-note { display: flex; }
.is-stale > :not(.stale-note) { opacity: .5; filter: grayscale(.8); }

/* 11.2 Llaves y autorización */
.cols.wide { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
@media (max-width: 480px) { .cols.wide { grid-template-columns: 1fr; } }
.disp-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-4); }
.disp-head h2 { margin: 0; }
.disp-head .sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0 0; color: var(--muted); font-size: var(--fs-sm); }
.disp-mode { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.disp-mode .small { color: var(--muted); max-width: 260px; }
.mode-badge {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 13px;
  border: 1px solid #dbe4ee; border-radius: var(--r-pill);
  background: #eef2f7; color: #37618d; font-size: var(--fs-sm); font-weight: 750; white-space: nowrap;
}
.mode-badge svg.i { width: 18px; height: 18px; }
.mode-badge.is-auto { background: var(--surface); color: var(--muted); border-color: var(--line-2); }
.mode-badge.is-off { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.disp-status { display: grid; gap: var(--sp-3); }
.disp-modebar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.disp-status > .live-note { justify-content: flex-end; }
.disp-status .kv-list > div:first-child { border-top: 1px solid var(--line); }
.disp-status > .alarm { margin: 0; }

.grant { padding: var(--sp-4); border: 1px solid var(--warn-line); border-radius: var(--r-2); background: var(--warn-bg); }
.grant-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.grant-top .eyebrow { color: var(--warn); }
.grant-ttl { color: var(--warn); font-size: var(--fs-sm); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.grant-ttl strong { font-size: var(--fs-xl); }
.grant-main { margin: 2px 0 10px; font-size: var(--fs-lg); font-weight: 700; }
.grant .small { margin: 8px 0 0; color: var(--ink-2); }
.grant.is-none { background: var(--surface-2); border-style: dashed; border-color: var(--line-2); }
.grant.is-none .eyebrow { color: var(--muted); }
.grant.is-none .grant-main { color: var(--ink-2); font-size: var(--fs-md); font-weight: 600; margin-bottom: 0; }

progress.bar {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px;
  border: 0; border-radius: var(--r-pill); background: rgba(7, 29, 55, .10); color: var(--brand); overflow: hidden;
}
progress.bar::-webkit-progress-bar { background: rgba(7, 29, 55, .10); border-radius: var(--r-pill); }
progress.bar::-webkit-progress-value { background: var(--brand); border-radius: var(--r-pill); }
progress.bar::-moz-progress-bar { background: var(--brand); border-radius: var(--r-pill); }
progress.bar.warn::-webkit-progress-value { background: #daa527; }
progress.bar.warn::-moz-progress-bar { background: #daa527; }
progress.bar.ok::-webkit-progress-value { background: #1aab77; }
progress.bar.ok::-moz-progress-bar { background: #1aab77; }

.mini-faces { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--sp-2); }
.mini-face {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; row-gap: 0;
  min-height: 54px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2);
}
.mini-face .dot { width: 11px; height: 11px; }
.mini-face svg.i { width: 18px; height: 18px; }
.mini-no { font-weight: 800; white-space: nowrap; font-size: var(--fs-sm); }
.mini-state { grid-column: 2; font-size: var(--fs-sm); font-weight: 700; line-height: 1.25; }
.mini-since { grid-column: 2; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.mini-face.st-idle .dot { background: var(--st-idle-dot); }
.mini-face.st-idle .mini-state { color: var(--muted); }
.mini-face.st-busy .dot { background: var(--st-busy); }
.mini-face.st-busy .mini-state { color: var(--st-busy-text); }
.mini-face.st-done .dot { background: var(--st-done); }
.mini-face.st-done .mini-state { color: var(--st-done-text); }
.mini-face.st-call { background: var(--st-call-soft); border-color: var(--warn-line); }
.mini-face.st-call .dot { background: var(--st-call); }
.mini-face.st-call .mini-state { color: var(--st-call-text); }
.mini-face.st-bad, .mini-face.st-warn { background: var(--st-fail-soft); border-color: var(--bad-line); }
.mini-face.st-bad .dot, .mini-face.st-warn .dot { background: var(--st-fail); }
.mini-face.st-bad .mini-state, .mini-face.st-warn .mini-state { color: var(--st-fail-text); }

.kv-list { display: grid; gap: 0; margin: 0; }
.kv-list > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.kv-list dt { flex: none; width: 128px; color: var(--muted); font-size: var(--fs-sm); font-weight: 650; }
.kv-list dd { flex: 1 1 200px; margin: 0; min-width: 0; color: var(--ink-2); }
.disp-actions { margin-top: var(--sp-4); }
.disp-actions form.stack { margin: 0; }
.disp-actions > form.stack { padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.disp-actions > form.stack h3 { margin-top: 0; }
.disp-actions .note { display: flex; gap: 8px; margin: 0; padding: 12px 0; color: var(--muted); font-size: var(--fs-sm); border-top: 1px solid var(--line); }
.disp-actions .note svg.i { flex: none; margin-top: 1px; }

details.card.fold { padding: 0 18px; }
details.card.fold > summary { min-height: 54px; }
details.card.fold > .fold-body > :last-child { margin-bottom: 0; }

/* 11.3 Ventas: resumen y barra de filtros */
.sumbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-5);
  margin-bottom: var(--sp-4); padding: 13px 18px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1);
  font-variant-numeric: tabular-nums;
}
.sumbar > span { display: flex; align-items: baseline; gap: 6px; }
.sumbar b { color: #15283f; font-size: var(--fs-lg); font-weight: 720; letter-spacing: -.025em; }
.sumbar .spacer { flex: 1 1 auto; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.toolbar .tabs { margin: 0; }
.page-actions.tabs { gap: 4px; }

/* 11.4 Turno y cuadre */
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-bottom: var(--sp-5); }
@media (min-width: 1200px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpis { grid-template-columns: 1fr; } }
.kpis.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.kpi {
  display: flex; flex-direction: column; gap: 5px; min-width: 0; padding: 17px 19px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1);
}
a.kpi { color: inherit; text-decoration: none; transition: border-color .12s ease, box-shadow .12s ease; }
a.kpi:hover { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--sh-1); }
.kpi-label { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.kpi-value { color: #15283f; font-size: var(--fs-kpi); font-weight: 720; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-value.text { font-size: var(--fs-lg); letter-spacing: -.01em; white-space: normal; }
.kpi-value small { font-size: var(--fs-md); font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kpi-note { font-size: var(--fs-sm); color: var(--muted); }
.kpi.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.kpi.warn .kpi-value, .kpi.warn .kpi-label { color: var(--warn); }
.kpi.bad { background: var(--bad-bg); border-color: var(--bad-line); }
.kpi.bad .kpi-value, .kpi.bad .kpi-label { color: var(--bad); }
.kpi.ok .kpi-value { color: var(--ok); }
.kpi.hero { background: var(--navy); border-color: var(--navy); color: #ffffff; box-shadow: inset 0 3px 0 var(--gold), var(--sh-1); }
.kpi.hero .kpi-value { color: #ffffff; }
.kpi.hero .kpi-label, .kpi.hero .kpi-note, .kpi.hero .kpi-value small { color: var(--navy-text); }

.price-now { margin: 2px 0 var(--sp-3); color: #15283f; font-size: 42px; font-weight: 720; line-height: 1.1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.price-now small { margin-left: 4px; font-size: var(--fs-lg); font-weight: 600; color: var(--muted); letter-spacing: 0; }

.bars { display: grid; gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.bars li { margin: 0; }
.bars-top { display: flex; justify-content: space-between; gap: var(--sp-2); margin-bottom: 6px; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.calc { display: grid; margin: 0; }
.calc > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-3); padding: 9px 0; font-variant-numeric: tabular-nums; }
.calc > div + div { border-top: 1px solid var(--line); }
.calc dt { color: var(--ink-2); font-size: var(--fs-sm); }
.calc dd { margin: 0; font-weight: 650; white-space: nowrap; }
.calc .calc-note dt, .calc .calc-note dd { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.calc > .calc-total { border-top: 2px solid var(--ink) !important; padding-top: 12px; }
.calc > .calc-total dt { font-weight: 700; color: var(--ink); font-size: var(--fs-md); }
.calc > .calc-total dd { font-size: var(--fs-xl); font-weight: 750; letter-spacing: -.025em; }
.todo { margin: 0; padding: 0; list-style: none; }
.todo li { display: flex; align-items: flex-start; gap: 10px; margin: 0; padding: 8px 0; font-size: var(--fs-sm); }
.todo li + li { border-top: 1px solid var(--warn-line); }
.todo svg.i { color: #9b7116; margin-top: 1px; flex: none; }
.card.pending { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--sp-2) var(--sp-5); padding: var(--sp-3) 18px; }
.card.pending h2 { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: var(--fs-md); color: var(--warn); }
.card.pending .todo { flex: 1 1 420px; }
.shift-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-3) var(--sp-5); }
.shift-hero h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: var(--fs-xl); }
.shift-facts { display: flex; flex-wrap: wrap; gap: 9px 24px; margin: 11px 0 0; padding: 11px 13px; background: var(--surface-2); border-radius: var(--r-2); }
.shift-facts > div { display: flex; flex-direction: column; gap: 3px; }
.shift-facts dt { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.shift-facts dd { margin: 0; font-size: var(--fs-sm); font-weight: 650; }
@media (max-width: 700px) { .shift-hero { grid-template-columns: 1fr; } }

/* El resumen no es otra pantalla dentro de la pantalla: turno, responsable y
   hora caben en una franja. Las caras son la información principal. */
.shift-summary.card.brandy { padding: 11px 16px 10px; border-top-width: 2px; }
.shift-summary-name { color: var(--brand-text); }
.shift-summary .shift-hero h2 { font-size: 19px; }
.shift-summary .shift-facts {
  align-items: baseline; gap: 5px 20px; margin-top: 8px; padding: 7px 0 0;
  background: transparent; border-top: 1px solid var(--line); border-radius: 0;
}
.shift-summary .shift-facts > div { flex-direction: row; align-items: baseline; gap: 6px; }
.shift-summary .shift-facts dt { font-size: 10px; }
.shift-summary .shift-facts dd { font-size: 12px; }

@media (max-width: 700px) {
  .shift-page-head { min-height: 0; margin-bottom: 10px; }
  .shift-page-head h1 { font-size: 21px; }
  .shift-page-head .page-sub { display: none; }
  .shift-summary.card.brandy { margin-bottom: 5px; padding: 8px 11px 7px; }
  .shift-summary .shift-hero h2 { gap: 4px 7px; font-size: 16px; }
  .shift-summary .shift-hero h2 .chip { min-height: 22px; padding: 2px 8px; font-size: 11px; }
  .shift-summary .shift-facts { display: flex; gap: 4px 12px; margin-top: 4px; padding-top: 4px; }
  .shift-summary .shift-facts dt, .shift-summary .shift-fact-code, .shift-summary .shift-opened-by { display: none; }
  .shift-summary .shift-facts dd { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
}

/* 11.5 Alarmas */
.alarm-list {
  margin: 0 0 var(--sp-4); padding: 0; list-style: none; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1);
}
.alarm-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4);
  margin: 0; padding: 14px 18px;
}
.alarm-item + .alarm-item { border-top: 1px solid #e6ebf1; margin-top: 0; }
.alarm-sev { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; flex: none; }
.alarm-item.sev-critica .alarm-sev { background: var(--bad-bg); color: var(--bad); }
.alarm-item.sev-advertencia .alarm-sev { background: var(--warn-bg); color: #9b7116; }
.alarm-item.sev-info .alarm-sev { background: var(--info-bg); color: var(--info); }
.alarm-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.alarm-code { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.alarm-meta { margin-top: 3px; color: var(--muted); font-size: var(--fs-sm); }
.alarm-side { display: flex; align-items: center; gap: var(--sp-3); }
.alarm-side form { margin: 0; }
.alarm-item.is-acked { background: var(--surface-2); }
.alarm-item.is-acked .alarm-title { color: var(--muted); }

/* 11.6 Ingreso y configuración inicial -------------------------------------
   La autenticación no muestra personal ni puestos de trabajo: dos campos y una
   sola acción. El contexto operativo se resuelve después de verificar la cuenta. */
.login-page { display: grid; grid-template-columns: minmax(340px, .92fr) minmax(460px, 1.08fr); min-height: 100vh; background: #fff; }
.login-story {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 100vh; padding: clamp(28px, 4vw, 60px); overflow: hidden; color: #fff;
  background:
    radial-gradient(circle at 75% 20%, rgba(18, 104, 232, .34), transparent 34%),
    radial-gradient(circle at 12% 90%, rgba(199, 149, 40, .11), transparent 28%),
    linear-gradient(150deg, #0a315b 0%, #041426 72%);
}
.login-story::after {
  content: ''; position: absolute; right: -170px; bottom: -180px; width: 520px; height: 520px;
  border: 1px solid rgba(255, 255, 255, .055); border-radius: 50%;
  box-shadow: 0 0 0 75px rgba(255, 255, 255, .018), 0 0 0 150px rgba(255, 255, 255, .012);
}
.login-wordmark { position: relative; z-index: 1; display: flex; align-items: center; }
.login-wordmark img { display: block; width: 168px; height: auto; }
.story-copy { position: relative; z-index: 1; max-width: 560px; }
/* Mismo tamaño en pantalla que el titular de la central: allá la raíz es de
   14 px y usa clamp(2.5rem, 4.7vw, 4.5rem); aquí la raíz es de 16 px. */
.story-copy h1 { max-width: 540px; margin: 12px 0 16px; color: #fff; font-size: clamp(2.2rem, 4.7vw, 3.95rem); font-weight: 720; line-height: 1.04; letter-spacing: -.055em; }
.story-copy p { max-width: 480px; color: #b8cde3; font-size: var(--fs-md); line-height: 1.7; }
.private-label { position: relative; z-index: 1; display: flex; align-items: flex-start; gap: 9px; color: #9bb5cf; font-size: var(--fs-sm); line-height: 1.5; }
.private-label svg.i { color: #75bdff; flex: none; }

.login-panel { position: relative; display: grid; place-items: center; padding: 48px; background: linear-gradient(155deg, #fff 0%, #f2f6fb 100%); }
.login-card {
  display: flex; flex-direction: column; gap: var(--sp-4); width: 100%; max-width: 480px;
  padding: 42px; background: rgba(255, 255, 255, .96); border: 1px solid #dce5ef;
  border-radius: 24px; box-shadow: 0 24px 64px rgba(14, 35, 61, .11), 0 2px 6px rgba(14, 35, 61, .05);
}
.login-card.slim { max-width: 460px; }
.login-heading { display: flex; flex-direction: column; gap: 5px; margin-bottom: 2px; }
.login-heading h1 { margin: 7px 0 0; font-size: 2.15rem; letter-spacing: -.045em; }
.login-heading p { margin: 4px 0 0; color: var(--muted); line-height: 1.5; }
.login-heading-kicker { display: flex; align-items: center; gap: 10px; }
.login-lock {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  color: var(--brand); background: var(--brand-soft); border: 1px solid #d5e5fa; border-radius: 10px;
}
.login-lock svg.i { width: 18px; height: 18px; }
.login-mobile-hero { display: none; }
.login-mobile-brand { display: none; }
.login-help { margin: 0; color: var(--muted); font-size: var(--fs-sm); line-height: 1.5; text-align: center; }
.local-portal-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; align-self: center;
  min-height: 38px; padding: 5px 10px; color: var(--brand-text); border-radius: 8px;
  font-size: var(--fs-sm); font-weight: 700; text-decoration: none;
}
.local-portal-link:hover { background: var(--brand-soft); }
.local-portal-link svg.i:last-child { width: 15px; height: 15px; }

.credential-form { display: grid; gap: 18px; margin-top: 4px; }
.credential-field { display: grid; gap: 7px; }
.credential-field > label { color: #40566f; font-size: var(--fs-sm); font-weight: 700; }
.credential-control { position: relative; display: block; }
.credential-control > svg.i {
  position: absolute; top: 50%; left: 15px; z-index: 1; width: 20px; height: 20px;
  color: #6b7f95; transform: translateY(-50%); pointer-events: none;
}
.credential-control input[type=text], .credential-control input[type=password] {
  min-height: 54px; padding: 11px 14px 11px 46px; border-color: #bdcad9;
  border-radius: 12px; background: #fbfdff; font-size: 16px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.credential-control.has-action input { padding-right: 106px; }
.credential-control input:hover { border-color: #8ea8c5; }
.credential-control input:focus { border-color: #3d8cf0; background: #fff; box-shadow: 0 0 0 4px rgba(18, 104, 232, .11); }
.secret-toggle {
  position: absolute; top: 50%; right: 8px; display: inline-flex; align-items: center; gap: 5px;
  min-height: 38px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent;
  color: #315d91; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer;
  transform: translateY(-50%);
}
.secret-toggle:hover { background: var(--brand-soft); }
.secret-toggle:focus-visible { outline: 3px solid rgba(18, 104, 232, .22); }
.secret-toggle svg.i { width: 17px; height: 17px; }
.login-submit {
  position: relative; justify-content: space-between; margin-top: 4px; padding-right: 18px; padding-left: 20px;
  overflow: hidden; border-radius: 12px; box-shadow: 0 10px 22px rgba(10, 79, 185, .2);
}
.login-submit::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  background: rgba(255, 255, 255, .72);
}
.login-submit svg.i { width: 19px; height: 19px; }
.login-security {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin: -2px 0 0;
  color: #6d7f93; font-size: 12px; line-height: 1.4; text-align: center;
}
.login-security svg.i { width: 16px; height: 16px; flex: none; color: #2b7a66; }

.step { margin-bottom: var(--sp-4); }
.step:last-child { margin-bottom: 0; }
.step-label { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--sp-3); font-size: var(--fs-sm); font-weight: 750; color: #53677e; }
.step-no {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px;
  border-radius: 8px; background: var(--brand-soft); color: var(--brand-text);
  border: 1px solid #c9def9; font-size: 12px; font-weight: 800;
}
.user-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: var(--sp-2); }
.user-tile { position: relative; display: block; margin: 0; }
.user-tile input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
.user-tile .tile {
  position: relative; display: flex; align-items: center; gap: 11px; min-height: 58px; padding: 9px 36px 9px 11px;
  border: 1px solid var(--line-ctl); border-radius: 11px; background: var(--surface); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.user-tile .tile:hover { border-color: #a8c9f5; background: var(--brand-soft); }
.user-tile .avatar { background: var(--surface-3); color: var(--ink-2); border-color: var(--line-2); }
.user-tile input:checked + .tile { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.user-tile input:checked + .tile .avatar { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
/* Marca de elegido: no depende solo del color del borde */
.user-tile input:checked + .tile::after {
  content: ""; position: absolute; top: 50%; right: 17px; width: 7px; height: 14px; margin-top: -9px;
  border-right: 3px solid var(--brand-text); border-bottom: 3px solid var(--brand-text); transform: rotate(45deg);
}
.user-tile input:focus + .tile { outline: 3px solid var(--brand); outline-offset: 2px; }
.tile-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; font-weight: 700; font-size: var(--fs-sm); }
.tile-name small { color: var(--muted); font-weight: 500; font-size: var(--fs-xs); }
.pin-side { display: flex; flex-direction: column; }
input.pin-field {
  height: 58px; text-align: center; font-family: var(--mono); font-size: 28px; letter-spacing: .45em;
  background: var(--surface-2);
}
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-top: var(--sp-3); }
/* Teclas con borde inferior más grueso: se ven como teclas aun con reflejo de sol */
.key {
  display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 58px;
  border: 1px solid var(--line-ctl); border-bottom-width: 3px; border-radius: var(--r-2); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer;
}
.key:hover { background: var(--brand-soft); border-color: #a8c9f5; }
.key:active { background: var(--surface-3); border-bottom-width: 1px; }
.key.fn { background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-md); }
.key.go { background: var(--brand-grad); border-color: var(--brand); color: var(--brand-ink); font-size: var(--fs-md); box-shadow: 0 2px 4px rgba(10, 79, 185, .14); }
.key.go:hover { background: var(--brand-dark); border-color: var(--brand-dark); }

/* Ingreso desde fuera de la estación (§8.6): contraseña en vez de teclado del PIN. */
.remote-side { gap: var(--sp-2); }
.remote-side input[type=password] { margin-bottom: var(--sp-2); }
.remote-side .btn { margin-top: 0; }

/* Cambiar PIN: tarjeta angosta centrada. Formularios de una columna: ancho de lectura cómodo. */
.narrow-card { max-width: 560px; margin: 0 auto; }
.form-card { max-width: 760px; }

/* 11.7 Usuarios, personas, estado vacío, llaves ambiguas y maestros */
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person .avatar { width: 32px; height: 32px; border-radius: 9px; }
.person-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.person-name strong { color: #203650; white-space: nowrap; }
.person-name small { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }
.avatar.xl { width: 52px; height: 52px; border-radius: 15px; font-size: 19px; background: var(--navy); color: #ffffff; border-color: var(--navy); box-shadow: 0 8px 22px rgba(3, 20, 41, .18); }
.page-head .person { gap: var(--sp-4); }
.role { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 650; }
.role svg.i { width: 17px; height: 17px; color: var(--muted); }
.role.admin { color: #5f438b; }
.role.admin svg.i { color: #5f438b; }
.stack-chips { display: flex; flex-wrap: wrap; gap: 4px 6px; }

/* Estado vacío */
.empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 34px 18px; text-align: center; color: var(--muted); }
.empty svg.i { width: 36px; height: 36px; stroke-width: 1.5; color: var(--line-2); }
.empty strong { color: #52615b; font-size: var(--fs-md); }
.empty .btn { margin-top: var(--sp-3); }
.card > .empty { padding: 26px 18px; }
.empty.ok svg.i { color: #1aab77; }

/* Llaves ambiguas (islero) */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--sp-3); }
.choices form { margin: 0; }
.choices .btn { flex-direction: column; width: 100%; min-height: 80px; margin: 0; font-size: var(--fs-md); }
.choices span.btn { justify-content: center; }

/* Efectivo · Tarjeta · Vale: los tres botones de cada venta (TURNOS §4). Con guantes y al sol:
   cada botón es su propio formulario y el marcado queda en sólido, los otros en secundario. */
.pay-set { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pay-set form { display: flex; align-items: center; gap: 4px; margin: 0; }
.pay-set .btn { margin: 0; min-height: var(--touch); }
.pay-voucher { width: 8.5em; min-height: var(--touch); margin: 0; padding: 5px 9px; font-size: 13px; }
@media (max-width: 720px) { .pay-set, .pay-set form { width: 100%; } .pay-set .btn { flex: 1; } }

/* Búsqueda principal de maestros */
.master-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); }
.master-search .grow { flex: 1 1 320px; margin: 0; font-size: var(--fs-sm); font-weight: 650; color: #53677e; }
.master-search .btn { margin: 0; }
.master-search .grow > select { margin-top: 6px; }
.search-field { position: relative; display: block; margin-top: 6px; }
.search-field > svg.i { position: absolute; top: 50%; left: 12px; z-index: 1; width: 18px; height: 18px; color: var(--muted); transform: translateY(-50%); }
.search-field > input { padding-left: 40px; }

/* Alta de llave: espera del toque */
.touch-wait { display: flex; align-items: center; gap: var(--sp-4); }
.touch-wait .pulse-ring {
  display: grid; place-items: center; flex: none; width: 60px; height: 60px;
  border-radius: 50%; background: var(--st-call); color: var(--st-call-ink); animation: ring 1.8s ease-out infinite;
}
.touch-wait .pulse-ring svg.i { width: 28px; height: 28px; }
.touch-wait h2, .card .touch-wait h2 { margin: 0 0 4px; }
.touch-wait p { margin: 0; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(217, 140, 5, .5); } 80% { box-shadow: 0 0 0 16px rgba(217, 140, 5, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 140, 5, 0); } }

/* Páginas de error */
.error-card { max-width: 620px; margin: var(--sp-6) auto; text-align: center; }
.error-card .error-ico {
  display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto var(--sp-4);
  border-radius: 18px; background: var(--bad-bg); color: var(--bad);
}
.error-card .error-ico svg.i { width: 32px; height: 32px; }
.error-card h1 { margin-bottom: var(--sp-3); }
.error-card .flash { justify-content: center; text-align: left; }
.error-card .btn { margin-top: var(--sp-2); }

/* 12. Responsive ------------------------------------------------------------
   <= 1000 px (tablet): la barra lateral baja y se vuelve barra INFERIOR, con
   blancos grandes para el dedo. Es lo único que cambia frente a la central,
   que ahí abre un cajón lateral: el islero trabaja de pie y con una mano. */
/* Ingreso y configuración inicial: de mayor a menor, que la última gana.
   De 1366 px para abajo el panel del formulario se lleva más ancho: si no, las
   fichas de usuario caen a una sola columna y el ingreso obliga a desplazar. */
@media (max-width: 1366px) {
  .login-page { grid-template-columns: minmax(280px, .8fr) minmax(440px, 1.2fr); }
  .login-card { max-width: 480px; }
}
@media (max-width: 1199px) {
  .shift-who, .hide-md { display: none; }
}
@media (max-width: 1100px) {
  .login-page { grid-template-columns: minmax(260px, .76fr) minmax(420px, 1.24fr); }
}
@media (max-width: 1080px) {
  .login-card { max-width: 480px; }
}
@media (max-width: 1000px) {
  .shell { display: block; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .sidebar {
    position: fixed; inset: auto 12px calc(74px + env(safe-area-inset-bottom)) 12px; z-index: 61;
    flex-direction: column; gap: 0; width: auto; height: auto;
    max-height: calc(100vh - 92px - env(safe-area-inset-bottom));
    padding: 0 14px 14px; overflow: hidden; border: 1px solid rgba(117, 189, 255, .2);
    border-radius: 22px; box-shadow: 0 26px 70px rgba(0, 10, 24, .5);
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(calc(100% + 32px));
    transition: transform .22s ease, opacity .18s ease, visibility .22s;
  }
  body.mobile-nav-open { overflow: hidden; }
  body.mobile-nav-open .sidebar { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
  .sidebar .brand, .privacy-note { display: none; }
  .mobile-nav-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 67px; margin: 0 -14px 12px; padding: 11px 14px 10px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .035);
  }
  .mobile-nav-heading { display: flex; flex-direction: column; min-width: 0; }
  .mobile-nav-heading .eyebrow { color: #75bdff; font-size: 10px; }
  .mobile-nav-heading strong { overflow: hidden; color: #fff; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-nav-close {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: none;
    color: #b7cae0; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px; cursor: pointer;
  }
  .mobile-nav-close svg.i { width: 20px; height: 20px; }
  .station-chip { flex: none; margin: 0 0 10px; padding: 10px 12px; }
  .station-chip span:not(.status-dot), .station-chip > svg.i { display: initial; }
  .station-chip > div { display: flex; }
  .nav-groups { flex: 1 1 auto; flex-direction: column; gap: 0; min-height: 0; padding: 0 2px 8px; overflow-x: hidden; overflow-y: auto; }
  .nav-caption { display: block; margin: 13px 4px 6px; }
  .nav-caption:first-child { margin-top: 0; }
  .side-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .nav-link {
    min-width: 0; min-height: 50px; padding: 8px 10px; gap: 9px; font-size: 13px; text-align: left;
    background: rgba(255, 255, 255, .035); border-color: rgba(255, 255, 255, .055);
  }
  .nav-link .nav-text { flex: 1; justify-content: flex-start; gap: 5px; overflow: hidden; }
  .nav-link .count { margin-left: auto; }
  .user-card { flex: none; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 6px; margin: 0; padding: 12px 2px 0; border-top: 1px solid rgba(255, 255, 255, .1); border-left: 0; }
  .user-copy { display: flex; }
  .icon-btn { width: 44px; height: 44px; }
  .mobile-nav-backdrop {
    position: fixed; inset: 0; z-index: 60; width: 100%; height: 100%; padding: 0;
    background: rgba(2, 12, 25, .58); border: 0; opacity: 0; visibility: hidden;
    backdrop-filter: blur(3px); transition: opacity .18s ease, visibility .18s;
  }
  body.mobile-nav-open .mobile-nav-backdrop { opacity: 1; visibility: visible; }
  .mobile-nav-bar {
    position: fixed; right: 0; bottom: 0; left: 0; z-index: 70;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px;
    min-height: calc(68px + env(safe-area-inset-bottom)); padding: 6px 7px calc(6px + env(safe-area-inset-bottom));
    color: #a8bed4; background: rgba(4, 25, 48, .98); border-top: 1px solid rgba(117, 189, 255, .16);
    box-shadow: 0 -8px 28px rgba(2, 15, 30, .3);
  }
  .mobile-nav-bar.is-islero { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mobile-nav-item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-width: 0; min-height: 56px; padding: 4px 2px; color: inherit; background: transparent; border: 1px solid transparent;
    border-radius: 12px; font: inherit; font-size: 10.5px; font-weight: 700; text-decoration: none; cursor: pointer;
  }
  .mobile-nav-item svg.i { width: 20px; height: 20px; }
  .mobile-nav-item span { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-nav-item.on { color: #fff; background: rgba(18, 104, 232, .3); border-color: rgba(117, 189, 255, .2); }
  .mobile-nav-item.on svg.i { color: #75bdff; }
  body.mobile-nav-open .mobile-nav-more { color: #fff; background: rgba(18, 104, 232, .3); border-color: rgba(117, 189, 255, .2); }
  .mobile-nav-more.on::after {
    content: ''; position: absolute; top: 7px; right: calc(50% - 15px); width: 6px; height: 6px;
    background: #f0b52c; border: 2px solid var(--navy); border-radius: 50%;
  }
  .mobile-nav-count {
    position: absolute; top: 4px; left: calc(50% + 7px); display: grid; place-items: center;
    min-width: 17px; height: 17px; padding: 0 4px; color: #fff; background: #d33d32;
    border: 2px solid var(--navy); border-radius: 999px; font-size: 9px; line-height: 1;
  }
  .topbar-brand { display: grid; }
  main.content { padding: 22px 16px 32px; }
  /* Tablet: blancos de dedo aunque el equipo diga «pointer: fine» (un kiosco
     Windows con mouse conectado lo dice, y ahí se toca la pantalla igual). */
  .btn, .btn.small, .tab, .seg-opt span, a.crumb, .icon-btn { min-height: 48px; }
  .btn.small { padding: 5px 13px; }
  .btn.big { min-height: 60px; }
  .key { min-height: 64px; }
  .icon-btn { width: 48px; height: 48px; }
  input[type=text], input[type=password], input[type=number], input[type=search], input[type=tel],
  input[type=datetime-local], input[type=date], select { min-height: 48px; }
  .check, form.stack label.check { min-height: 48px; }
}
@media (max-width: 980px) {
  .login-page { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel {
    min-height: 100vh; padding: 30px 18px 44px;
    background:
      radial-gradient(circle at 50% -10%, rgba(38, 132, 255, .36), transparent 36%),
      linear-gradient(155deg, #0a315b 0%, #041426 74%);
  }
  .login-card, .login-card.slim { max-width: 460px; padding: 34px; }
  .login-auth-card {
    gap: var(--sp-4); padding-top: 0; overflow: hidden; border-color: rgba(190, 211, 234, .42);
    box-shadow: 0 28px 72px rgba(0, 9, 22, .38), 0 0 0 1px rgba(255, 255, 255, .04);
  }
  .login-mobile-hero {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 11px;
    margin: 0 -34px 12px; padding: 27px 24px 25px; overflow: hidden; color: #fff; text-align: center;
    background:
      linear-gradient(rgba(108, 178, 255, .06) 1px, transparent 1px),
      linear-gradient(90deg, rgba(108, 178, 255, .06) 1px, transparent 1px),
      radial-gradient(circle at 50% 0%, rgba(28, 125, 255, .42), transparent 52%),
      linear-gradient(145deg, #0b3766, #04182e 72%);
    background-size: 28px 28px, 28px 28px, auto, auto;
  }
  .login-mobile-hero::before,
  .login-mobile-hero::after {
    content: ''; position: absolute; border: 1px solid rgba(97, 171, 255, .18); border-radius: 50%; pointer-events: none;
  }
  .login-mobile-hero::before { top: -118px; width: 290px; height: 290px; box-shadow: 0 0 0 26px rgba(97, 171, 255, .025); }
  .login-mobile-hero::after { right: -54px; bottom: -84px; width: 170px; height: 170px; }
  .login-mobile-hero .login-mobile-brand {
    position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
    width: 144px; min-height: 94px; padding: 4px 10px;
  }
  .login-mobile-hero .login-mobile-brand::after {
    content: ''; position: absolute; right: 8px; bottom: 3px; left: 8px; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(117, 189, 255, .8), transparent);
  }
  .login-mobile-hero .login-mobile-brand img { position: relative; z-index: 1; display: block; width: 120px; height: auto; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .3)); }
  .login-card.slim > .login-mobile-brand {
    display: flex; align-items: center; justify-content: center; width: 116px; min-height: 78px;
    margin-bottom: 14px; padding: 8px; background: var(--navy); border-radius: 12px;
  }
  .login-card.slim > .login-mobile-brand img { display: block; width: 96px; height: auto; }
  .login-mobile-station { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; }
  .login-mobile-station > span { color: #75bdff; font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
  .login-mobile-station strong { max-width: 340px; color: #fff; font-size: 14px; font-weight: 750; letter-spacing: .035em; text-transform: uppercase; }
  .login-mobile-station small { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: #b8cde3; font-size: 11px; }
  .login-mobile-station small i {
    width: 7px; height: 7px; flex: none; border-radius: 50%; background: #35d2a2;
    box-shadow: 0 0 0 4px rgba(53, 210, 162, .12), 0 0 12px rgba(53, 210, 162, .72);
    animation: login-status-pulse 2.4s ease-in-out infinite;
  }
}
@media (max-width: 860px) {
  .topbar { flex-wrap: wrap; min-height: 0; padding: 8px 16px; }
  .topbar-status { width: 100%; overflow-x: auto; }
  table.list th, table.list td { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 700px) {
  :root { --fs-2xl: 24px; --fs-lcd: 34px; --fs-kpi: 26px; }
  body.app .topbar {
    align-items: stretch; flex-direction: column; flex-wrap: nowrap; gap: 0;
    min-height: 0; padding: 0; overflow: hidden;
    background:
      radial-gradient(circle at 88% -35%, rgba(31, 122, 235, .42) 0, transparent 48%),
      linear-gradient(135deg, #0b315e 0%, #071d37 58%, #06192e 100%);
    border-bottom: 0;
    box-shadow: 0 8px 24px rgba(4, 27, 52, .18);
  }
  body.app .topbar::before {
    position: absolute; inset: 0; z-index: 0; pointer-events: none; content: "";
    opacity: .14;
    background-image:
      linear-gradient(rgba(117, 189, 255, .22) 1px, transparent 1px),
      linear-gradient(90deg, rgba(117, 189, 255, .22) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: linear-gradient(90deg, #000, transparent 76%);
    mask-image: linear-gradient(90deg, #000, transparent 76%);
  }
  body.app .topbar-left {
    position: relative; z-index: 1; gap: 11px; min-height: 64px; padding: 8px 16px 7px;
  }
  body.app .topbar-brand {
    display: grid; width: 48px; height: 48px; padding: 0;
    background: transparent; border: 0; border-radius: 0;
  }
  body.app .topbar-brand img {
    width: 48px; max-height: 46px; object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25));
  }
  body.app .topbar-title { gap: 2px; line-height: 1.15; }
  body.app .topbar-title .topbar-station {
    overflow: hidden; color: #eef7ff; font-size: 11px; font-weight: 780;
    letter-spacing: .075em; text-overflow: ellipsis; white-space: nowrap;
  }
  body.app .topbar-page { display: none; }
  body.app .topbar-context {
    display: block; color: #75bdff; font-size: 10px; font-weight: 750;
    letter-spacing: .14em; text-transform: uppercase;
  }
  body.app .topbar-help {
    min-width: 44px; min-height: 44px; margin-left: auto; padding: 0 10px;
    color: #dff0ff; background: rgba(117, 189, 255, .12); border-color: rgba(166, 211, 255, .24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  }
  body.app .topbar-help:hover { color: #fff; background: rgba(18, 104, 232, .42); }
  body.app .topbar-status {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
    gap: 6px; width: 100%; padding: 7px 12px 10px; overflow: hidden;
    background: rgba(0, 9, 24, .2); border-top: 1px solid rgba(166, 211, 255, .13);
  }
  body.app .topbar-status .shift-pill,
  body.app .topbar-status .sync,
  body.app .topbar-status .clock {
    justify-content: center; min-width: 0; min-height: 31px; padding: 0 8px;
    border-color: rgba(210, 232, 255, .2); background: rgba(255, 255, 255, .09);
    color: #eef7ff; font-size: 10.5px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  body.app .topbar-status .shift-pill.is-none,
  body.app .topbar-status .shift-pill.is-closing { color: #ffe3a0; background: rgba(169, 111, 8, .22); }
  body.app .topbar-status .shift-pill.is-open,
  body.app .topbar-status .sync.is-online { color: #9df1d3; background: rgba(8, 125, 91, .22); }
  body.app .topbar-status .sync.is-offline { color: #ffd6ad; background: rgba(171, 74, 10, .24); }
  body.app .topbar-status .shift-pill,
  body.app .topbar-status .sync-label {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  body.app .topbar-status .shift-pill .dot,
  body.app .topbar-status .clock .live-dot { box-shadow: 0 0 0 3px rgba(53, 210, 162, .11); }
  body.app .topbar-status .sync svg.i { width: 15px; height: 15px; flex: none; }
  .faces { grid-template-columns: 1fr; }
  .alarm-item { grid-template-columns: auto minmax(0, 1fr); padding: 14px; }
  .alarm-side { grid-column: 2; }
  .kv-list dt { width: 100%; }
  .disp-mode { align-items: flex-start; text-align: left; }
  table.kv th { width: 45%; }
  .page-head { align-items: stretch; flex-direction: column; }
  /* En columna, el flex-basis de 360 px del bloque de título se volvía altura vacía. */
  .page-head > div:first-child { flex: 0 1 auto; }
}
@media (max-width: 520px) {
  .login-panel { place-items: start center; padding: 18px 14px 28px; }
  .login-card, .login-card.slim { padding: 26px 22px; border-radius: 20px; }
  .login-auth-card { padding-top: 0; }
  .login-heading h1 { font-size: 1.9rem; }
  .login-mobile-hero { margin-right: -22px; margin-left: -22px; padding-top: 23px; padding-bottom: 22px; }
  .login-mobile-hero .login-mobile-brand { min-height: 87px; }
  .login-mobile-hero .login-mobile-brand img { width: 112px; }
  .login-card.slim > .login-mobile-brand { margin-bottom: 6px; }
}
@keyframes login-status-pulse {
  0%, 100% { opacity: .72; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
@media (pointer: coarse) {
  .btn.small, .tab, .seg-opt span, .nav-link, a.crumb, .icon-btn { min-height: var(--touch); }
  .btn.small { padding: 5px 13px; }
  .icon-btn { width: var(--touch); }
  .key { min-height: 64px; }
  .btn.big { min-height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* 13. Impresión ------------------------------------------------------------- */
@media print {
  .sidebar, .topbar, .banner, form, .btn, .page-actions, .tabs, .pager { display: none !important; }
  body, .shell { display: block; background: #ffffff; }
  main.content { padding: 0; }
  .card, .table-wrap, .kpi { box-shadow: none; break-inside: avoid; }
  .kpi.hero { background: #ffffff; color: #000000; border-color: #000000; box-shadow: none; }
  .kpi.hero .kpi-label, .kpi.hero .kpi-note, .kpi.hero .kpi-value { color: #000000; }
}

/* 14. Oficina (§16): paginación y barras de filtros ------------------------- */
/* Lo único que las pantallas de maestros, turnos, cartera y reportes no
   encontraron ya hecho arriba. Todo lo demás (tarjetas, tablas, pestañas,
   campos, insignias, KPI) es el mismo de la central, sin tocar. */
.pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--sp-2) var(--sp-4); margin: 0 0 var(--sp-4);
}
.pager-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.pager-nav .btn { margin: 0; }
/* Barra de filtros: como .master-search, pero con varios campos angostos. */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); }
.filters > label {
  flex: 0 1 180px; margin: 0; font-size: var(--fs-sm); font-weight: 650; color: #53677e;
}
.filters > label.grow { flex: 1 1 300px; }
.filters > label > input, .filters > label > select, .filters > label > .search-field { margin-top: 6px; }
.filters .btn { margin: 0; }
.filters .spacer { flex: 1 1 auto; }

/* Con Turnos, Cartera y Reportes el administrador ve 15 renglones en la barra lateral, y en una
   pantalla de 900 px de alto (el portátil de la oficina) ya no caben sin desplazarla. Se adelanta a
   1000 px el MISMO apretado que la hoja ya hacía a 860/880 px; por encima de eso no cambia nada. */
@media (min-width: 1001px) and (max-height: 1000px) {
  .privacy-note { display: none; }
  .sidebar { padding-top: 16px; }
  .sidebar .brand img { width: 104px; }
  .sidebar .brand-sub { display: none; }
  .station-chip { margin-bottom: 12px; }
  .nav-caption { margin: 7px 10px 4px; }
  .side-nav { gap: 2px; }
  .nav-link { min-height: 36px; padding: 5px 11px; }
}
/* Y en 800/768 px de alto (el portátil de 1366x768 y la captura de escritorio) los 15 renglones del
   administrador siguen sin caber ni con lo de arriba: «Equipos» quedaba partido y «Usuarios» solo
   aparecía arrastrando una lista que no parece arrastrable. Se aprieta un punto más, y SOLO con ratón
   (``pointer: fine``): en una tablet acostada el renglón se queda en los 36 px de arriba, que ya es el
   mínimo cómodo para el dedo. */
@media (min-width: 1001px) and (max-height: 860px) and (pointer: fine) {
  .sidebar { padding-top: 12px; }
  .sidebar .brand img { width: 88px; }
  .sidebar .brand { margin-bottom: 10px; }
  .station-chip { margin-bottom: 8px; }
  .nav-caption { margin: 5px 10px 3px; }
  .nav-link { min-height: 32px; padding: 3px 11px; }
}

/* 15. Caras con aspecto de surtidor (§ docs/diseno-ui/surtidor) --------------
   Encargo de Harry: la pantalla Caras deja de ser tarjetas y se ve como el
   surtidor real (cuerpo azul, marco gris, placa con el número, LCD gris
   verdoso con tres renglones rotulados y dígitos de siete segmentos, manguera
   y pistola), con el display en verde mientras despacha.
   - Todo lo nuevo lleva prefijo .sur- (y .sl-/.sg dentro de los dibujos), así
     no choca con nada de arriba. Lo demás (chip, alarm, btn, face-meta, plate)
     se reutiliza tal cual.
   - El dibujo es SVG en línea: dos capas superpuestas sobre .sur-machine.
     · .sur-art  -> la máquina y el contenido del LCD. Se repinta en cada
       sondeo de htmx (cada 2 s), por eso NO lleva animación.
     · .sur-live -> aro, halo, manguera y pistola. Va con hx-preserve, htmx la
       conserva entre sondeos y la animación de "despachando" no se reinicia.
       Su marcado es idéntico en todos los estados: lo que cambia es esta hoja,
       que cuelga de la clase de estado de la tarjeta (.st-busy, .st-call...).
   - El color nunca va solo: el estado sale con ícono + texto en la columna de
     datos y escrito en la banda de la máquina.
   =========================================================================== */
.faces { grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 18px; }

/* Las alarmas no compiten con el estado de los surtidores. En Caras se resumen en
   una sola banda discreta; el detalle sigue a un toque y las críticas se abren solas. */
.ops-notices {
  margin: 0 0 var(--sp-3); overflow: hidden;
  background: rgba(255, 255, 255, .72); border: 1px solid var(--line); border-radius: 12px;
}
.ops-notices > summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: 46px; padding: 8px 12px; cursor: pointer; list-style: none; color: var(--ink-2);
}
.ops-notices > summary::-webkit-details-marker { display: none; }
.ops-notices > summary:hover { background: var(--surface-2); }
.ops-notices-lead { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ops-notices-lead > svg.i { width: 19px; height: 19px; flex: none; color: #b9830d; }
.ops-notices-lead > span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px; min-width: 0; }
.ops-notices-lead strong { color: var(--ink); font-size: var(--fs-sm); }
.ops-notices-lead small { color: var(--muted); font-size: var(--fs-xs); }
.ops-notices-action { display: inline-flex; align-items: center; gap: 5px; flex: none; color: var(--brand-text); font-size: var(--fs-xs); font-weight: 700; }
.ops-notices-action svg.i { width: 16px; height: 16px; transition: transform .16s ease; }
.ops-notices[open] .ops-notices-action svg.i { transform: rotate(180deg); }
.ops-notices.has-critical { border-color: var(--bad-line); }
.ops-notices.has-critical .ops-notices-lead > svg.i { color: var(--bad); }
.ops-notices-list { border-top: 1px solid var(--line); }
.ops-notice {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px;
  padding: 10px 12px; color: var(--ink-2); font-size: var(--fs-sm);
}
.ops-notice + .ops-notice { border-top: 1px solid #e8edf3; }
.ops-notice > svg.i { width: 18px; height: 18px; color: var(--muted); }
.ops-notice > span { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; min-width: 0; }
.ops-notice > span strong { color: var(--muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; }
.ops-notice > a { font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; text-decoration: none; }
.ops-notice.sev-critica > svg.i, .ops-notice.sev-critica > span strong { color: var(--bad); }
.ops-notice.sev-advertencia > svg.i, .ops-notice.sev-advertencia > span strong { color: var(--warn); }
.ops-notice.sev-info > svg.i, .ops-notice.sev-info > span strong { color: var(--info); }

.sur {
  /* Tonos del surtidor real. Se redefinen por estado más abajo. */
  --sur-steel: #ccd4dd; --sur-steel-hi: #e8edf2; --sur-steel-dark: #9aa6b4;
  --sur-blue: #16307e; --sur-blue-dark: #0c1a4d; --sur-blue-edge: #3355b8;
  --sur-lcd: #b3c3ac; --sur-lcd-frame: #67715f;
  --sur-seg: #22301c; --sur-seg-off: rgba(34, 48, 28, .13);
  --sur-lcd-ink: rgba(34, 48, 28, .88); /* rótulos del LCD; con .78 quedaban en 4,6:1, al filo de AA */
  --sur-ring: var(--line-2); --sur-ring-w: 2.5;
  --sur-banner: rgba(255, 255, 255, .13); --sur-banner-ink: #d9e5ff;
  --sur-state: var(--st-idle-ink);
  position: relative; display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: 18px; align-items: center; min-width: 0; overflow: hidden;
  padding: 14px 18px;
  background: linear-gradient(145deg, #ffffff 0%, #ffffff 64%, #f7f9fc 100%);
  border: 1px solid #d8e1eb; border-radius: 16px; box-shadow: var(--sh-2);
}
.sur::before { content: ""; position: absolute; top: 0; right: 0; left: 0; height: 4px; background: var(--sur-ring); }
/* Libre: el display se atenúa (la última venta queda visible, como en el surtidor) */
.sur.st-idle {
  --sur-state: #33455c; --sur-lcd: #aab9a4; --sur-seg: #333f2c; --sur-seg-off: rgba(51, 63, 44, .12);
  --sur-lcd-ink: rgba(34, 48, 28, .92); /* con .78 los rótulos quedaban en 4,4:1 (AA pide 4,5) */
}
.sur.st-call {
  --sur-ring: var(--st-call); --sur-ring-w: 4; --sur-state: var(--st-call-text);
  --sur-banner: #d98c05; --sur-banner-ink: #2a1c00;
  border-color: var(--st-call);
}
.sur.st-busy {
  /* Despachando: el LCD se enciende en verde. Se tiene que ver desde lejos. */
  --sur-lcd: #29dd80; --sur-lcd-frame: #0b5a33;
  --sur-seg: #042c17; --sur-seg-off: rgba(4, 44, 23, .16); --sur-lcd-ink: rgba(4, 44, 23, .8);
  --sur-ring: var(--st-busy); --sur-ring-w: 4.5; --sur-state: var(--st-busy-text);
  --sur-banner: #0e7c3a; --sur-banner-ink: #ffffff;
  border-color: var(--st-busy);
}
.sur.st-done {
  --sur-lcd: #dcecff; --sur-lcd-frame: #46557a;
  --sur-seg: #1b2742; --sur-seg-off: rgba(27, 39, 66, .14); --sur-lcd-ink: rgba(27, 39, 66, .75);
  --sur-ring: var(--st-done); --sur-ring-w: 4; --sur-state: var(--st-done-text);
  --sur-banner: #6b3fc0; --sur-banner-ink: #ffffff;
  border-color: var(--st-done);
}
/* Sin comunicación: pantalla rayada y apagada. Los demás estados raros (no autorizada,
   detenida, desconocido) mantienen el display legible, pero con el marco rojo. */
.sur.st-bad, .sur.st-warn {
  --sur-ring: var(--st-fail); --sur-ring-w: 4; --sur-state: var(--st-fail-text);
  --sur-banner: #b23731; --sur-banner-ink: #ffffff;
  border-color: var(--st-fail);
}
.sur.st-bad {
  --sur-lcd: #454b52; --sur-lcd-frame: #2b3037;
  --sur-seg: #6d747c; --sur-seg-off: rgba(255, 255, 255, .06);
  --sur-lcd-ink: rgba(255, 255, 255, .78); /* con .6 los rótulos quedaban en 4,5:1 justo */
}

/* 15.1 El dibujo ------------------------------------------------------------ */
.sur-machine { position: relative; width: 100%; max-width: 210px; margin: 0 auto; }
.sur-art, .sur-live-art { display: block; width: 100%; height: auto; overflow: visible; }
.sur-live { position: absolute; top: 0; right: 0; bottom: 0; left: 0; pointer-events: none; }
.sur-live-art { height: 100%; }

.sur-shadow { fill: rgba(7, 29, 55, .12); }
.sur-steel { fill: var(--sur-steel); }
.sur-steel-hi { fill: var(--sur-steel-hi); }
.sur-steel-dark { fill: var(--sur-steel-dark); }
.sur-cab { fill: var(--sur-blue); }
.sur-cab-dark { fill: var(--sur-blue-dark); }
.sur-cab-edge { fill: var(--sur-blue-edge); }
.sur-vent { stroke: rgba(255, 255, 255, .18); stroke-width: 2; fill: none; }
/* Cuna de la pistola: hueco claro, para que el pico oscuro se vea contra el azul */
.sur-boot { fill: rgba(255, 255, 255, .12); stroke: rgba(0, 0, 0, .35); stroke-width: 1.5; }
.sur-brand { font: 800 14px/1 var(--font); letter-spacing: 1.2px; fill: #23364f; }
.sur-door-tx { font: 700 12px/1 var(--font); letter-spacing: .6px; fill: rgba(255, 255, 255, .5); text-anchor: end; }
.sur-plate { fill: #ffffff; stroke: #9aa6b4; stroke-width: 1; }
.sur-plate-cap { font: 700 10px/1 var(--font); letter-spacing: 1px; fill: #5d6c81; }
.sur-plate-no { font: 800 30px/1 var(--font); fill: #111111; text-anchor: end; }

.sur-lcd-frame { fill: var(--sur-lcd-frame); }
.sur-lcd-screen { fill: var(--sur-lcd); }
.sur-lcd-line { stroke: rgba(0, 0, 0, .12); stroke-width: 1; fill: none; }
.sur-lcd-hatch { stroke: rgba(255, 255, 255, .12); stroke-width: 3; fill: none; display: none; }
.sur.st-bad .sur-lcd-hatch { display: block; }
/* Rótulos del display. El largo ("PRECIO POR GALÓN") va en cuerpo menor en vez de
   comprimido: comprimido se volvía una mancha. El pie no lleva opacidad encima de
   la tinta translúcida (bajaba el contraste por debajo de AA). */
.sur-lbl, .sur-lbl-sm { font: 700 8.5px/1 var(--font); letter-spacing: .2px; fill: var(--sur-lcd-ink); }
.sur-lbl-sm { font-size: 7.4px; letter-spacing: .1px; }
.sur-cap { font: 600 8.5px/1 var(--font); letter-spacing: .2px; fill: var(--sur-lcd-ink); }
.sur-banner { fill: var(--sur-banner); }
.sur-banner-tx { font: 800 13px/1 var(--font); letter-spacing: 1.3px; fill: var(--sur-banner-ink); text-anchor: middle; }
/* Siete segmentos: los apagados quedan a la vista, como en el LCD de verdad. */
.sur-art .sg { fill: var(--sur-seg-off); }
.sur-art .sg.on { fill: var(--sur-seg); }

/* 15.2 Capa viva: aro de estado, manguera, pistola y animación -------------- */
.sl-ring { fill: none; stroke: var(--sur-ring); stroke-width: var(--sur-ring-w); }
.sl-halo { fill: none; stroke: var(--st-busy); stroke-width: 9; opacity: 0; }
.sl-scan { fill: rgba(255, 255, 255, .85); opacity: 0; }
.sl-hose { fill: none; stroke: #16181c; stroke-width: 9; stroke-linecap: round; }
.sl-flow { fill: none; stroke: #4be79a; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 9 26; opacity: 0; }
.sl-nz-neck, .sl-nz-spout { fill: #23272e; }
.sl-nz-body { fill: #f2b719; stroke: #b5850a; stroke-width: 1.5; }
.sl-nz-trigger { fill: none; stroke: #2b3038; stroke-width: 4; stroke-linecap: round; }
.sl-nozzle { transform-origin: 97px 248px; transition: transform .35s ease-out; }
/* Pistola descolgada: esperando llave y despachando */
.sur.st-call .sl-nozzle, .sur.st-busy .sl-nozzle { transform: translate(-11px, 20px) rotate(-13deg); }
.sur.st-busy .sl-halo { opacity: 1; animation: sur-breathe 2.2s ease-in-out infinite; }
.sur.st-busy .sl-scan { opacity: 1; animation: sur-scan 1.9s ease-in-out infinite alternate; }
.sur.st-busy .sl-flow { opacity: 1; animation: sur-flow .9s linear infinite; }
.sur.st-busy .sl-nozzle { animation: sur-sway 2.6s ease-in-out infinite; }
/* La manguera NO se mueve: giraba sobre su boca mientras la pistola se mecía aparte, así
   que la punta se despegaba de la pistola; y repintar una curva de 9 px de grueso en cada
   cuadro es lo más caro del dibujo (la pantalla corre en un PC modesto y en tabletas).
   El movimiento de la manguera lo da el combustible que corre por dentro (.sl-flow). */
.sur.st-call .sl-ring { animation: sur-ring 1.6s ease-in-out infinite; }
@keyframes sur-breathe { 0%, 100% { opacity: .22; } 50% { opacity: .85; } }
@keyframes sur-scan { from { transform: translateX(0); } to { transform: translateX(124px); } }
@keyframes sur-flow { to { stroke-dashoffset: -35; } }
@keyframes sur-sway {
  0%, 100% { transform: translate(-11px, 20px) rotate(-13deg); }
  50% { transform: translate(-13px, 22px) rotate(-10deg); }
}
@keyframes sur-ring { 50% { stroke-opacity: .35; } }
/* Sin movimiento: el verde y el aro se quedan, pero quietos (§WCAG 2.3.3). El § 12 ya
   deja toda animación en .01 ms; aquí se apagan de frente las de esta pantalla para que
   no dependan de esa regla y no haya ni el parpadeo de la primera vuelta. */
@media (prefers-reduced-motion: reduce) {
  .sur .sl-halo, .sur .sl-ring, .sur .sl-nozzle, .sur .sur-state svg.i { animation: none; }
  .sur.st-busy .sl-halo { opacity: .6; }
  .sur .sl-scan, .sur .sl-flow { display: none; }
}

/* 15.3 Columna de datos ---------------------------------------------------- */
.sur-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 8px 0; }
.sur-state {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0;
  color: var(--sur-state); font-size: var(--fs-lg); font-weight: 800; line-height: 1.1;
}
.sur-state svg.i { flex: none; width: 26px; height: 26px; }
.sur-state-tx { text-transform: uppercase; letter-spacing: .04em; }
.sur-since { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0; text-transform: none; }
.sur.st-call .sur-state svg.i { animation: blink 1.6s ease-in-out infinite; }
.sur-note {
  display: flex; align-items: flex-start; gap: 8px; margin: 0;
  color: var(--ink-2); font-size: var(--fs-sm);
}
.sur-note svg.i { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--muted); }
.sur-note.ok { color: var(--ok); }
.sur-note.ok svg.i { color: var(--ok); }
.sur-note.bad { color: var(--bad); }
.sur-note.bad svg.i { color: var(--bad); }
.sur-info .face-meta {
  margin-top: auto; padding: 11px 12px; gap: 9px;
  background: rgba(244, 247, 251, .86); border: 1px solid var(--line); border-radius: 11px;
}
.sur-info .face-meta > div + div { padding-top: 8px; border-top: 1px solid #e2e8f0; }
.sur-info .face-callout { min-height: 0; }
.sur-info .alarm { margin: 0; }

.face-notices { overflow: hidden; border: 1px solid var(--info-line); border-radius: 10px; background: #f7fbfd; }
.face-notices > summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  min-height: 38px; padding: 7px 10px; color: var(--info); cursor: pointer; list-style: none;
  font-size: var(--fs-xs); font-weight: 750;
}
.face-notices > summary::-webkit-details-marker { display: none; }
.face-notices > summary svg.i { width: 16px; height: 16px; }
.face-notices > summary svg.i:last-child { transition: transform .16s ease; }
.face-notices[open] > summary svg.i:last-child { transform: rotate(180deg); }
.face-notices.has-critical { border-color: var(--bad-line); background: #fffafa; }
.face-notices.has-critical > summary { color: var(--bad); }
.face-notices-list { padding: 0 10px 9px; border-top: 1px solid var(--info-line); }
.face-notices-list p { display: flex; align-items: flex-start; gap: 7px; margin: 8px 0; color: var(--ink-2); font-size: var(--fs-xs); }
.face-notices-list p > svg.i { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--info); }
.face-notices-list p.sev-critica > svg.i { color: var(--bad); }
.face-notices-list p.sev-advertencia > svg.i { color: var(--warn); }
.face-notices-list > a { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: 700; text-decoration: none; }
.face-notices-list > a svg.i { width: 14px; height: 14px; }

/* 15.4 Tamaños: tablet 800x1280 y PC 1280x800 / 1440x900 -------------------- */
@media (min-width: 1500px) {
  .sur { grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); }
  .sur-machine { max-width: 220px; }
}
/* PC de 1280/1366: dos caras por fila, surtidor un poco menor para que quepan los datos.
   El estado baja un punto de cuerpo: a 1280 "ESPERANDO LLAVE" se partía en dos renglones
   y empujaba todo lo de abajo. */
@media (min-width: 861px) and (max-width: 1400px) {
  .sur { grid-template-columns: minmax(135px, 180px) minmax(0, 1fr); }
  .sur-machine { max-width: 180px; }
  .sur-state { font-size: var(--fs-md); }
  .sur-state svg.i { width: 21px; height: 21px; }
}
/* Tablet vertical: una cara por fila, y el surtidor más grande (se mira de pie) */
@media (max-width: 860px) {
  .faces { grid-template-columns: minmax(0, 1fr); }
  .sur { grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); }
  .sur-machine { max-width: 230px; }
}
@media (max-width: 520px) {
  .sur { grid-template-columns: minmax(0, 1fr); }
  .sur-machine { max-width: 190px; }
  .sur-info { padding-top: 0; }
  .ops-notice { grid-template-columns: auto minmax(0, 1fr); }
  .ops-notice > span { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ops-notice > a { grid-column: 2; }
  .ops-notices-lead small, .ops-notices-action { display: none; }
}
/* Tablet: blancos de 48 px sin mover el texto de sitio */
@media (pointer: coarse) {
  .sur-info .face-meta a, .sur-info .sur-note a {
    display: inline-block; padding: 12px 6px; margin: -12px -6px;
  }
  .sur-info a.chip { min-height: var(--touch); }
}

/* 16. Mi turno: tablero compacto de las caras -----------------------------
   Usa el mismo surtidor y las mismas animaciones del panel Caras, pero en
   formato 2 x 2. La cuadrícula nunca se convierte en una lista en teléfono:
   las cuatro caras deben poder compararse de una sola mirada. */
.shift-pump-board { margin: 18px 0 var(--sp-5); }
.shift-pump-board-head {
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  margin-bottom: 10px;
}
.shift-pump-board-head .eyebrow {
  display: block; margin-bottom: 2px; color: var(--brand-text);
  font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
}
.shift-pump-board-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.shift-live {
  display: inline-flex; align-items: center; gap: 7px; color: var(--muted);
  font-size: 11px; font-weight: 650; white-space: nowrap;
}
.shift-live .live-dot { width: 8px; height: 8px; }
.shift-pump-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px;
}
.shift-pump-card.sur {
  display: flex; flex-direction: column; gap: 6px; height: 232px; min-width: 0; padding: 8px;
  overflow: hidden; border-radius: 14px; box-shadow: var(--sh-1);
}
.shift-pump-card.sur::before { height: 3px; }
.shift-pump-top {
  display: grid; grid-template-columns: 49px minmax(0, 1fr); gap: 8px; align-items: center;
  min-width: 0; height: 56px;
}
.shift-pump-machine.sur-machine { width: 49px; max-width: 49px; }
.shift-lcd-label {
  fill: var(--sur-lcd-ink); font: 700 8px/1 var(--font); letter-spacing: .2px;
}
.shift-lcd-value {
  fill: var(--sur-seg); font: 700 18px/1 var(--mono); text-anchor: end;
  font-variant-numeric: tabular-nums;
}
.shift-lcd-value.small { font-size: 14px; }
.shift-pump-info {
  display: flex; flex-direction: column; align-self: stretch; justify-content: center; min-width: 0;
}
.shift-pump-name {
  display: flex; align-items: baseline; justify-content: space-between; gap: 5px; min-width: 0;
}
.shift-pump-name strong { color: var(--ink); font-size: 16px; line-height: 1.05; }
.shift-pump-name span {
  overflow: hidden; color: var(--muted); font-size: 10px; font-weight: 650;
  text-overflow: ellipsis; white-space: nowrap;
}
.shift-pump-state {
  display: flex; align-items: center; gap: 5px; min-width: 0; margin: 7px 0 0;
  color: var(--sur-state); font-size: 11px; font-weight: 850; letter-spacing: .02em;
  line-height: 1.1; text-transform: uppercase;
}
.shift-pump-state svg.i { width: 16px; height: 16px; flex: none; }
.shift-pump-state span { overflow-wrap: anywhere; }
.shift-pump-foot {
  overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 8px; font-weight: 650;
  line-height: 1.1; text-overflow: ellipsis; white-space: nowrap;
}

/* Tablero electrónico: las lecturas son hechos de totalizador. Si la última venta todavía no
   tiene RT posterior, se muestra como pendiente; jamás se fabrica el número sumando la venta. */
.shift-totalizer {
  position: relative; display: grid; grid-template-columns: 1fr; gap: 0; min-width: 0;
  padding: 6px 7px 5px; overflow: hidden;
  background:
    linear-gradient(rgba(78, 220, 158, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 220, 158, .025) 1px, transparent 1px),
    linear-gradient(145deg, #071b2b, #04121e);
  background-size: 11px 11px, 11px 11px, auto;
  border: 1px solid #173b4b; border-radius: 8px;
  box-shadow: inset 0 1px 8px rgba(0, 0, 0, .42);
  font-variant-numeric: tabular-nums;
}
.shift-totalizer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(180, 255, 226, .055) 49%, transparent 67%);
}
.shift-totalizer-head {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 5px; padding-bottom: 3px; border-bottom: 1px solid rgba(113, 235, 183, .15);
  color: #74a99a; font-size: 7px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
}
.shift-totalizer-head small {
  overflow: hidden; color: #679083; font-size: 7px; font-weight: 650; letter-spacing: 0;
  text-overflow: ellipsis; text-transform: none; white-space: nowrap;
}
.shift-totalizer-row, .shift-totalizer-delta {
  position: relative; z-index: 1; display: flex; align-items: baseline; justify-content: space-between;
  gap: 5px; min-width: 0; padding-top: 2px;
}
.shift-totalizer-row > span, .shift-totalizer-delta > span {
  color: #76a295; font-size: 7px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
}
.shift-totalizer-row > strong {
  overflow: hidden; color: #a8f3cb; font: 700 12px/1.15 var(--mono);
  letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 0 9px rgba(79, 230, 164, .25);
}
.shift-totalizer-delta {
  margin-top: 2px; padding-top: 3px; border-top: 1px solid rgba(113, 235, 183, .15);
}
.shift-totalizer-delta > strong { color: #64e6a7; font: 750 10px/1.1 var(--mono); white-space: nowrap; }
.shift-totalizer.is-pending { border-color: rgba(217, 140, 5, .55); }
.shift-totalizer.is-pending .shift-totalizer-head small,
.shift-totalizer.is-pending .shift-totalizer-row > strong { color: #efc56d; }
.shift-pump-card.st-busy .shift-totalizer {
  border-color: rgba(46, 220, 133, .78); box-shadow: inset 0 1px 8px rgba(0, 0, 0, .42), 0 0 12px rgba(46, 220, 133, .12);
}

.shift-face-accum {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-width: 0;
}
.shift-face-accum > div { display: flex; flex-direction: column; min-width: 0; }
.shift-face-accum span {
  overflow: hidden; color: var(--muted); font-size: 7px; font-weight: 750; letter-spacing: .04em;
  text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap;
}
.shift-face-accum strong {
  overflow: hidden; color: var(--ink); font-size: 12px; line-height: 1.15;
  letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.shift-face-accum > div:last-child { padding-left: 6px; border-left: 1px solid var(--line); }
.shift-pump-last {
  display: flex; align-items: baseline; gap: 5px; min-width: 0; padding-top: 4px;
  border-top: 1px solid var(--line); font-variant-numeric: tabular-nums;
}
.shift-pump-last strong { flex: none; color: var(--ink-2); font-size: 8px; }
.shift-pump-last span {
  overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap;
}
.shift-pump-last.live strong { color: var(--st-busy-text); }
.shift-pump-card.st-busy .shift-pump-state svg.i { animation: sur-breathe 1.5s ease-in-out infinite; }
.shift-pump-card.st-call .shift-pump-state svg.i { animation: blink 1.6s ease-in-out infinite; }

@media (min-width: 1100px) {
  .shift-pump-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .shift-pump-board { margin-top: 14px; }
  .shift-pump-board-head h2 { font-size: 18px; }
  .shift-live { font-size: 10px; }
  .shift-pump-grid { gap: 7px; }
  .shift-pump-card.sur {
    gap: 5px; height: 226px; padding: 7px; border-radius: 12px;
  }
  .shift-pump-top { grid-template-columns: 43px minmax(0, 1fr); gap: 6px; height: 51px; }
  .shift-pump-machine.sur-machine { width: 43px; max-width: 43px; }
  .shift-pump-name strong { font-size: 14px; }
  .shift-pump-name span { font-size: 9px; }
  .shift-pump-state { gap: 3px; margin-top: 5px; font-size: 10px; letter-spacing: .02em; }
  .shift-pump-state svg.i { width: 13px; height: 13px; }
  .shift-pump-foot { margin-top: 4px; font-size: 8px; }
  .shift-totalizer { padding-right: 6px; padding-left: 6px; }
  .shift-totalizer-row > strong { font-size: 11px; }
  .shift-face-accum strong { font-size: 11px; }
}

/* Vinculación de iButton durante el turno: lectura, placa y confirmación en un solo flujo. */
.operator-enrol-intro { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.operator-enrol-step { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 13px; font-weight: 650; }
.operator-enrol-step b { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; }
.operator-enrol-list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 10px; }
.operator-enrol-list-head .btn { min-height: 36px; }
.operator-enrol-card { max-width: 680px; margin-bottom: 12px; padding: 18px; }
.operator-enrol-key { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.operator-enrol-key strong { color: var(--ink); }
.operator-enrol-key .rom { margin-left: auto; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--muted); }
.operator-enrol-empty { display: grid; justify-items: center; gap: 8px; max-width: 680px; padding: 30px 20px; text-align: center; }
.operator-enrol-empty > svg { width: 30px; height: 30px; color: var(--brand); }
.operator-enrol-empty h2, .operator-enrol-empty p { margin: 0; }
.operator-enrol-empty p { max-width: 46ch; color: var(--muted); }
.operator-enrol-results { min-width: 0; margin: 12px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.operator-enrol-results legend { padding: 0 5px; color: var(--ink); font-size: 13px; font-weight: 750; }
.operator-enrol-results p { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.operator-enrol-vehicle, form.stack label.operator-enrol-vehicle { display: flex; align-items: flex-start; gap: 9px; margin: 7px 0 0; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); font-size: 13px; cursor: pointer; }
.operator-enrol-vehicle:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand); }
.operator-enrol-vehicle input { flex: none; margin: 2px 0 0; accent-color: var(--brand); }
.operator-enrol-vehicle strong { font-size: 16px; letter-spacing: .05em; }
.operator-enrol-vehicle b { color: var(--ink); }
.operator-enrol-vehicle svg { flex: none; width: 18px; height: 18px; }
.operator-enrol-vehicle span, .operator-enrol-vehicle small { display: block; }
.operator-enrol-vehicle small { margin-top: 3px; }
.operator-enrol-vehicle.warn { border-color: #efd6a0; background: #fff9ea; color: #745018; }
.operator-enrol-payment { display: flex; flex-wrap: wrap; gap: 8px; }
.operator-enrol-payment label { display: flex; align-items: center; gap: 7px; margin: 0; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
.operator-enrol-payment label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.operator-enrol-payment label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.operator-enrol-payment small { flex-basis: 100%; color: var(--muted); }
.operator-enrol-skip { margin-top: 10px; }
.operator-enrol-skip .btn { width: 100%; }
body.key-prompt-open { overflow: hidden; }
.operator-prompt-backdrop { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 14px; background: rgba(3, 17, 35, .76); backdrop-filter: blur(5px); }
.operator-prompt-panel { width: min(100%, 540px); max-height: calc(100dvh - 28px); overflow-y: auto; padding: 20px; border: 1px solid #bfd1eb; border-radius: 18px; background: #f8fbff; box-shadow: 0 24px 80px rgba(0, 12, 29, .38); }
.operator-prompt-head { margin-bottom: 16px; }
.operator-prompt-head strong { display: block; margin-top: 5px; color: #10233d; font-size: 25px; line-height: 1.1; }
.operator-prompt-meta { display: block; margin-top: 6px; color: #6c7c91; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.operator-prompt-head p { margin: 8px 0 0; color: #42546c; }
.operator-prompt-head b { color: #075aca; font-variant-numeric: tabular-nums; }
.operator-prompt-note { margin: 11px 0 0; color: #73500d; font-size: 13px; line-height: 1.4; }
.operator-prompt-expired { position: fixed; z-index: 1090; top: 12px; right: 12px; width: min(460px, calc(100vw - 24px)); padding: 13px 16px; border: 1px solid #e9ca82; border-radius: 12px; background: #fff8e6; color: #493714; box-shadow: 0 10px 35px rgba(0, 12, 29, .18); font-size: 14px; }
.operator-prompt-expired strong { display: block; }
@media (max-width: 600px) { .operator-enrol-key .rom { width: 100%; margin-left: 0; } .operator-enrol-list-head { align-items: flex-start; } }
@media (prefers-reduced-motion: reduce) {
  .shift-pump-card .shift-pump-state svg.i { animation: none; }
}

/* 17. Mi turno: cada cara ES el tablero del surtidor ----------------------
   No se mete un LCD pequeño dentro de una tarjeta blanca: la carcasa azul,
   el marco metálico y la pantalla ocupan toda la tarjeta. Los valores de
   venta en curso se refrescan cada 2 s y las lecturas de totalizador nunca se
   calculan en el navegador. */
.shift-overview {
  margin: 0 0 8px; overflow: hidden;
  background: #fff; border: 1px solid #d5dfeb; border-top: 3px solid var(--brand);
  border-radius: 13px; box-shadow: var(--sh-1); font-variant-numeric: tabular-nums;
}
.shift-overview-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-width: 0; padding: 8px 12px 6px; border-bottom: 1px solid var(--line);
}
.shift-overview-head > div { display: flex; align-items: baseline; gap: 9px; min-width: 0; }
.shift-overview-head strong { color: var(--ink); font-size: 14px; white-space: nowrap; }
.shift-overview-head span {
  overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap;
}
.shift-overview-head > small {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  color: #087849; font-size: 9px; font-weight: 800; white-space: nowrap;
}
.shift-overview-head > small i {
  width: 7px; height: 7px; background: #24b87e; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(36,184,126,.1);
}
.shift-overview-values { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.shift-overview-values > div { display: flex; flex-direction: column; min-width: 0; padding: 8px 12px 9px; }
.shift-overview-values > div + div { border-left: 1px solid var(--line); }
.shift-overview-values span {
  overflow: hidden; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em;
  text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap;
}
.shift-overview-values strong {
  overflow: hidden; color: #10233e; font-size: 22px; font-weight: 850; line-height: 1.08;
  letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap;
}
.shift-overview-values > div:nth-child(2) strong { color: var(--brand-text); }
.shift-overview-values > div:nth-child(3) strong { color: #087849; }
.shift-overview-values > div:nth-child(4) strong { color: #9b6400; }
.shift-overview-values small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.shift-overview + .shift-pump-board { margin-top: 10px; }
.shift-critical-alerts { display: grid; gap: 7px; margin: 12px 0; }
.shift-critical-alerts .alarm { margin: 0; }

.shift-pump-card.shift-console.sur {
  --console-shell: #0b2d62;
  --console-shell-deep: #061b3b;
  --console-steel: #dfe7ef;
  --console-steel-edge: #8293a7;
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 35px 118px 60px 15px;
  gap: 6px; height: 263px; min-width: 0; padding: 8px;
  overflow: hidden; color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(145deg, #123c7d 0%, var(--console-shell) 46%, var(--console-shell-deep) 100%);
  background-size: 22px 22px, 22px 22px, auto;
  border: 2px solid var(--console-steel-edge); border-radius: 14px;
  box-shadow: inset 0 0 0 2px rgba(225, 234, 244, .25), 0 5px 14px rgba(7, 27, 55, .16);
}
.shift-pump-card.shift-console.sur::before {
  z-index: 0; top: 0; bottom: auto; height: 4px;
  background: linear-gradient(90deg, #eef4f9, #8fa0b2 46%, #f4f8fb);
}
.shift-pump-card.shift-console.sur::after {
  content: ""; position: absolute; z-index: 0; inset: 4px;
  pointer-events: none; border: 1px solid rgba(255,255,255,.09); border-radius: 9px;
}
.shift-console-head, .shift-console-screen, .shift-console-identity, .shift-console-readings, .shift-console-foot {
  position: relative; z-index: 2; min-width: 0;
}
.shift-console-head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 3px 7px;
  color: #15243b; background: linear-gradient(180deg, #f2f6fa, var(--console-steel));
  border: 1px solid #8394a7; border-radius: 7px;
  box-shadow: inset 0 1px 0 #fff, 0 2px 3px rgba(0,0,0,.18);
}
.shift-console-face { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.shift-console-face > span {
  align-self: center; color: #3e526c; font-size: 6px; font-weight: 900;
  letter-spacing: .08em; text-transform: uppercase;
}
.shift-console-face > strong { color: #0b1c35; font-size: 15px; line-height: 1; white-space: nowrap; }
.shift-console-face > small { color: #54667d; font-size: 8px; font-weight: 750; white-space: nowrap; }
.shift-console-state {
  display: flex; align-items: center; justify-content: flex-end; gap: 3px; min-width: 0;
  color: #31455d; font-size: 8px; font-weight: 900; letter-spacing: .035em;
  line-height: 1; text-transform: uppercase; white-space: nowrap;
}
.shift-console-state svg.i { width: 12px; height: 12px; flex: none; }
.shift-console-state small { color: #64758b; font-size: 7px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.shift-console.st-busy .shift-console-state { color: #087849; }
.shift-console.st-call .shift-console-state { color: #9b6400; }
.shift-console.st-bad .shift-console-state,
.shift-console.st-warn .shift-console-state { color: #ad2d2a; }

.shift-console-screen {
  display: grid; grid-template-rows: 46px 55px; gap: 3px;
  height: 100%; box-sizing: border-box;
  padding: 7px 9px 6px; overflow: hidden;
  color: var(--sur-seg); background: var(--sur-lcd);
  border: 4px solid var(--sur-lcd-frame); border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), inset 0 2px 9px rgba(16,35,18,.2), 0 2px 0 rgba(255,255,255,.15);
  font-variant-numeric: tabular-nums;
}
.shift-console-screen::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(25,39,22,.025) 3px 4px),
    linear-gradient(112deg, rgba(255,255,255,.13), transparent 35%, transparent 67%, rgba(255,255,255,.08));
}
.shift-console-sale {
  position: relative; z-index: 1; display: grid; grid-template-columns: 1.16fr .84fr; gap: 9px;
  padding-bottom: 3px; border-bottom: 1px solid rgba(25,42,23,.2);
}
.shift-console-sale > div { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.shift-console-sale span, .shift-console-total > span, .shift-console-anchors span {
  color: var(--sur-lcd-ink); font-size: 8px; font-weight: 850; letter-spacing: .055em;
  line-height: 1.05; text-transform: uppercase;
}
.shift-console-sale strong {
  overflow: hidden; color: var(--sur-seg); font: 850 23px/1.02 var(--mono);
  letter-spacing: -.055em; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.16);
}
.shift-console-sale > div:nth-child(2) strong { font-size: 20px; }
.shift-console-sale strong.is-long { font-size: 18px; letter-spacing: -.06em; }
.shift-console-sale > small {
  position: absolute; right: 0; bottom: 0; color: var(--sur-lcd-ink);
  font-size: 6.5px; font-weight: 750; text-transform: uppercase;
}
.shift-console-sale > small b { font: 800 9px/1 var(--mono); }
.shift-seven-value {
  display: flex; align-items: center; gap: 2px; width: 100%; height: 25px; min-width: 0;
  color: var(--sur-seg); line-height: 1;
}
.shift-seven-value svg { display: block; width: 100%; height: 100%; min-width: 0; overflow: visible; }
.shift-seven-value.money > small {
  flex: none; color: var(--sur-seg); font: 900 11px/1 var(--mono); letter-spacing: 0;
}
.shift-console-screen .sg { fill: var(--sur-seg-off); }
.shift-console-screen .sg.on { fill: var(--sur-seg); }
.shift-console-breakdown {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 23px 29px; min-width: 0;
}
.shift-console-breakdown > div { min-width: 0; }
.shift-console-breakdown span {
  color: var(--sur-lcd-ink); font-size: 7px; font-weight: 900; letter-spacing: .05em;
  line-height: 1; text-transform: uppercase; white-space: nowrap;
}
.shift-console-face-total {
  grid-column: 1 / -1; display: grid; grid-template-columns: max-content minmax(0, 1fr);
  align-items: center; gap: 4px;
  padding-bottom: 3px; border-bottom: 1px solid rgba(25,42,23,.18);
}
.shift-console-face-total .shift-seven-value { width: 100%; height: 20px; min-width: 0; }
.shift-console-breakdown > div:not(.shift-console-face-total) {
  display: flex; flex-direction: column; justify-content: center; padding-top: 3px;
}
.shift-console-breakdown > div:last-of-type { padding-left: 7px; border-left: 1px solid rgba(25,42,23,.18); }
.shift-console-breakdown > div:not(.shift-console-face-total) .shift-seven-value { height: 18px; }
.shift-console-breakdown .shift-seven-value.money > small { font-size: 8px; }
.shift-console-total {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding-bottom: 3px; border-bottom: 1px solid rgba(25,42,23,.2);
}
.shift-console-total > strong {
  overflow: hidden; color: var(--sur-seg); font: 850 16px/1 var(--mono);
  letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap;
}
.shift-console-anchors {
  position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
}
.shift-console-anchors > div { display: flex; flex-direction: column; min-width: 0; }
.shift-console-anchors > div + div { padding-left: 7px; border-left: 1px solid rgba(25,42,23,.2); }
.shift-console-anchors strong {
  overflow: hidden; color: var(--sur-seg); font: 800 11px/1.1 var(--mono);
  letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap;
}
.shift-console-screen.is-pending .shift-console-anchors > div:last-child strong { opacity: .62; }
.shift-console-scan { display: none; }
.shift-console.st-busy .shift-console-scan {
  display: block; position: absolute; z-index: 3; top: 0; bottom: 0; width: 32px;
  pointer-events: none; background: linear-gradient(90deg, transparent, rgba(220,255,234,.18), transparent);
  animation: shift-console-scan 2.2s linear infinite;
}
@keyframes shift-console-scan { from { transform: translateX(-45px); } to { transform: translateX(245px); } }

.shift-console-identity {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: 26px 25px;
  gap: 2px 7px; min-width: 0; padding: 3px 6px;
  color: #e7f3ff; background: linear-gradient(100deg, rgba(12,39,76,.94), rgba(5,24,50,.94));
  border: 1px solid rgba(142,181,221,.32); border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
.shift-console-plate { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.shift-console-customer {
  grid-column: 1 / -1; grid-row: 2; display: flex; align-items: center; gap: 5px; min-width: 0;
  padding-top: 2px; border-top: 1px solid rgba(142,181,221,.2);
}
.shift-console-customer > span { flex: none; }
.shift-console-identity span {
  overflow: hidden; color: #9bb9da; font-size: 7px; font-weight: 850; letter-spacing: .055em;
  line-height: 1; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap;
}
.shift-console-plate strong {
  overflow: hidden; color: #fff; font: 900 16px/1.05 var(--mono);
  letter-spacing: .025em; text-overflow: ellipsis; white-space: nowrap;
}
.shift-console-customer strong {
  display: -webkit-box; overflow: hidden; color: #f0f6ff; font-size: 10.5px; line-height: 1.05;
  white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.shift-console-key {
  grid-column: 2; grid-row: 1; display: grid; grid-template-columns: 6px minmax(0, 1fr);
  grid-template-rows: 9px 12px; align-content: center; gap: 1px 4px; min-width: 0;
  padding-left: 7px; border-left: 1px solid rgba(142,181,221,.2);
}
.shift-console-key i {
  grid-row: 1 / -1; align-self: center; width: 6px; height: 6px; background: #42d596; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(66,213,150,.12);
}
.shift-console-key span, .shift-console-key strong { grid-column: 2; }
.shift-console-key strong {
  overflow: hidden; color: #8ff0c0; font: 800 8.5px/1 var(--mono);
  letter-spacing: .025em; text-overflow: ellipsis; white-space: nowrap;
}
.shift-console-identity.is-live { border-color: rgba(66,213,150,.58); }
.shift-console-identity.is-missing .shift-console-key i { background: #e3aa31; box-shadow: 0 0 0 2px rgba(227,170,49,.12); }
.shift-console-identity.is-missing .shift-console-key strong { color: #efc76e; }

.shift-console-readings {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden; color: #1b2742;
  background: linear-gradient(145deg, #f7fbff, #dcecff);
  border: 3px solid #46557a; border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), inset 0 2px 8px rgba(31,50,81,.13), 0 0 10px rgba(220,236,255,.3);
  font-variant-numeric: tabular-nums;
}
.shift-console-readings::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(27,39,66,.028) 3px 4px);
}
.shift-console-readings > div {
  position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center;
  min-width: 0; padding: 4px 3px;
}
.shift-console-readings > div + div { border-left: 1px solid rgba(41,58,88,.18); }
.shift-console-readings span {
  overflow: hidden; color: rgba(27,39,66,.72); font-size: 6px; font-weight: 900; letter-spacing: .07em;
  text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap;
}
.shift-console-readings strong {
  overflow: hidden; color: #17243e; font: 850 11px/1.2 var(--mono);
  letter-spacing: -.06em; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 0 #fff, 0 0 6px rgba(63,105,160,.14);
}
.shift-console-readings > div:last-of-type strong { color: #0c5d9f; font-size: 13px; }
.shift-console-readings strong small { color: rgba(27,39,66,.62); font: 800 6px/1 var(--font); letter-spacing: 0; }
.shift-console-readings > i {
  position: absolute; z-index: 2; top: 0; bottom: 0; width: 26px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent);
  animation: shift-reading-glow 2s ease-out infinite;
}
.shift-console-readings.is-pending strong { opacity: .45; }
@keyframes shift-reading-glow {
  from { transform: translateX(-35px); opacity: 0; }
  20% { opacity: 1; }
  75%, to { transform: translateX(245px); opacity: 0; }
}
.shift-console-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 0;
  padding: 0 5px; color: #91adcb; font-size: 7px; line-height: 1; white-space: nowrap;
}
.shift-console-foot > span { overflow: hidden; text-overflow: ellipsis; }
.shift-console-foot > strong { overflow: hidden; color: #dcecff; font-size: 7px; text-overflow: ellipsis; }
.shift-console.st-busy .shift-console-foot > strong { color: #5cf1aa; }

/* Manguera y pistola sobre el borde del tablero. El caudal corre solamente
   mientras la cara está despachando; hx-preserve evita reiniciar la animación. */
.shift-console-anim {
  position: absolute; z-index: 4; top: 54px; right: -3px; width: 29px; height: 150px;
  pointer-events: none; opacity: .9;
}
.shift-console-anim svg { display: block; width: 100%; height: 100%; overflow: visible; }
.sca-hose, .sca-flow { fill: none; stroke-linecap: round; }
.sca-hose { stroke: #10151b; stroke-width: 7; }
.sca-flow { stroke: #4ced9b; stroke-width: 2.5; stroke-dasharray: 7 18; opacity: 0; }
.sca-spout { fill: none; stroke: #1b2028; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.sca-body { fill: #f5b91c; stroke: #9b6d00; stroke-width: 1.5; }
.sca-trigger { fill: none; stroke: #222934; stroke-width: 3; stroke-linecap: round; }
.sca-grip { fill: #252b34; }
.sca-nozzle { transform-origin: 25px 96px; }
.shift-console.st-call .sca-nozzle,
.shift-console.st-busy .sca-nozzle { transform: translate(-2px, 4px) rotate(-5deg); }
.shift-console.st-busy .sca-flow { opacity: 1; animation: sur-flow .8s linear infinite; }
.shift-console.st-busy .sca-nozzle { animation: shift-nozzle 2.5s ease-in-out infinite; }
.shift-console.st-busy {
  border-color: #39ce83;
  box-shadow: inset 0 0 0 2px rgba(98,241,173,.23), 0 0 14px rgba(42,211,129,.18);
}
.shift-console.st-call { border-color: #d39b29; }
.shift-console.st-bad, .shift-console.st-warn { border-color: #c85450; }
@keyframes shift-nozzle {
  0%, 100% { transform: translate(-2px, 4px) rotate(-5deg); }
  50% { transform: translate(-3px, 6px) rotate(-1deg); }
}

@media (max-width: 420px) {
  .shift-pump-card.shift-console.sur {
    grid-template-rows: 34px 118px 58px 14px; gap: 5px; height: 254px; padding: 7px;
  }
  .shift-console-head { padding-right: 5px; padding-left: 5px; }
  .shift-console-face { gap: 3px; }
  .shift-console-face > span { display: none; }
  .shift-console-face > strong { font-size: 14px; }
  .shift-console-state small { display: none; }
  .shift-console-sale strong { font-size: 21px; }
  .shift-console-sale > div:nth-child(2) strong { font-size: 19px; }
  .shift-console-sale strong.is-long { font-size: 17px; }
  .shift-console-readings > div { padding-right: 2px; padding-left: 2px; }
  .shift-console-readings strong { font-size: 9.5px; }
  .shift-console-readings > div:last-of-type strong { font-size: 11px; }
  .shift-console-anim { top: 51px; width: 25px; }
}
@media (max-width: 700px) {
  .shift-overview { margin-bottom: 5px; border-radius: 11px; }
  .shift-overview-head { padding: 6px 9px 5px; }
  .shift-overview-head > div { display: grid; gap: 1px; }
  .shift-overview-head strong { font-size: 13px; }
  .shift-overview-head span { font-size: 8px; }
  .shift-overview-head > small { font-size: 8px; }
  .shift-overview-values > div { padding: 6px 8px 7px; }
  .shift-overview-values strong { font-size: 15px; }
  .shift-overview-values > div:nth-child(2) strong { font-size: 14px; }
  .shift-overview-values span, .shift-overview-values small { font-size: 7px; }
  .shift-overview + .shift-pump-board { margin-top: 6px; }
  .shift-pump-board { margin-top: 6px; }
  .shift-pump-board-head { align-items: center; margin-bottom: 7px; }
  .shift-pump-board-head .eyebrow { display: none; }
  .shift-pump-board-head h2 { font-size: 17px; }
  .shift-pump-card.shift-console.sur {
    grid-template-rows: 34px 118px 58px 14px; gap: 5px; height: 254px; padding: 7px;
  }
  .shift-console-face > span { display: none; }
  .shift-console-face > strong { font-size: 14px; }
  .shift-console-face > small { font-size: 7px; }
  .shift-console-state { font-size: 7px; }
  .shift-console-identity { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: 25px 24px; }
  .shift-console-identity span { font-size: 6.5px; }
  .shift-console-plate strong { font-size: 15px; }
  .shift-console-customer strong { font-size: 10px; }
  .shift-console-key strong { font-size: 8px; }
  .shift-console-sale strong { font-size: 21px; }
  .shift-console-sale > div:nth-child(2) strong { font-size: 19px; }
  .shift-console-sale strong.is-long { font-size: 17px; }
  .shift-console-readings span { font-size: 5.5px; }
  .shift-console-readings strong { font-size: 9.5px; }
  .shift-console-readings > div:last-of-type strong { font-size: 11px; }
  .shift-console-anim { top: 148px; right: -12px; width: 24px; opacity: .78; }
}
@media (prefers-reduced-motion: reduce) {
  .shift-console .shift-console-scan, .shift-console .sca-flow, .shift-console .sca-nozzle,
  .shift-console-readings > i { animation: none; }
}

/* Las lecturas del turno viven fuera de las caras: asÃ­ los importes conservan
   su espacio y cada totalizador puede leerse con un cuerpo realmente grande. */
.shift-meter-board { margin: 12px 0 14px; }
.shift-meter-board-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px;
}
.shift-meter-board-head > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.shift-meter-board-icon {
  display: grid; place-items: center; width: 31px; height: 31px; flex: none;
  color: #fff; background: linear-gradient(145deg, #0d55a8, #082d5d);
  border: 1px solid #3476bd; border-radius: 8px; box-shadow: 0 3px 7px rgba(7,46,93,.14);
}
.shift-meter-board-icon svg.i { width: 17px; height: 17px; }
.shift-meter-board-head > div > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.shift-meter-board-head > div small {
  color: var(--brand-text); font-size: 7px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase;
}
.shift-meter-board-head strong { color: var(--ink); font-size: 16px; line-height: 1.1; }
.shift-meter-board-head > small {
  display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; white-space: nowrap;
}
.shift-meter-board-head > small i {
  width: 6px; height: 6px; background: #24b87e; border-radius: 50%; box-shadow: 0 0 0 3px rgba(36,184,126,.1);
}
.shift-meter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.shift-meter-card {
  min-width: 0; padding: 6px; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(145deg, #123c7a, #082957 52%, #061b3b);
  background-size: 18px 18px, 18px 18px, auto;
  border: 2px solid #8293a7; border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(229,238,247,.17), 0 4px 10px rgba(7,27,55,.13);
}
.shift-meter-card > header {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 5px;
  min-width: 0; height: 29px; margin-bottom: 5px; padding: 2px 5px;
  color: #15243b; background: linear-gradient(180deg, #f4f7fa, #dfe7ef);
  border: 1px solid #8a9bae; border-radius: 6px; box-shadow: inset 0 1px 0 #fff;
}
.shift-meter-pump {
  display: grid; place-items: center; width: 24px; height: 24px;
  color: #174b84; background: #edf4fb; border: 1px solid #bdcddd; border-radius: 6px;
}
.shift-meter-pump svg.i { width: 14px; height: 14px; }
.shift-meter-card > header > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.shift-meter-card > header strong { color: #10233e; font-size: 11px; line-height: 1.05; }
.shift-meter-card > header span small {
  overflow: hidden; color: #5d7087; font: 700 6px/1 var(--mono); text-overflow: ellipsis; white-space: nowrap;
}
.shift-meter-card > header > small { color: #315d91; font-size: 7px; font-weight: 800; white-space: nowrap; }
.shift-meter-display {
  position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 38px 39px; overflow: hidden;
  background: linear-gradient(145deg, #fbfdff, #dcecff);
  border: 3px solid #46557a; border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.95), inset 0 2px 9px rgba(31,50,81,.13), 0 0 10px rgba(220,236,255,.3);
  font-variant-numeric: tabular-nums;
}
.shift-meter-display::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(27,39,66,.026) 3px 4px);
}
.shift-meter-display > div {
  position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center;
  min-width: 0; padding: 3px 7px;
}
.shift-meter-display > div:nth-child(2) { border-left: 1px solid rgba(41,58,88,.17); }
.shift-meter-display span {
  color: rgba(27,39,66,.7); font-size: 6px; font-weight: 900; letter-spacing: .075em; text-transform: uppercase;
}
.shift-meter-display strong {
  overflow: hidden; color: #17243e; font: 850 14px/1.1 var(--mono);
  letter-spacing: -.055em; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 0 #fff, 0 0 7px rgba(63,105,160,.14);
}
.shift-meter-seven {
  display: block; width: 100%; min-width: 0; height: 23px;
  line-height: 1; text-shadow: none;
}
.shift-meter-seven svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.shift-meter-display .sg { fill: rgba(27,39,66,.115); }
.shift-meter-display .sg.on {
  fill: #17243e;
  filter: drop-shadow(0 0 1.5px rgba(34,72,121,.22));
}
.shift-meter-sold {
  grid-column: 1 / -1; display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 8px; padding: 4px 8px !important;
  border-top: 1px solid rgba(41,58,88,.17);
}
.shift-meter-sold strong { color: #075e9f; font-size: 21px; text-align: right; }
.shift-meter-sold .shift-meter-seven { height: 28px; }
.shift-meter-sold .shift-meter-seven .sg.on { fill: #075e9f; }
.shift-meter-sold small { color: rgba(27,39,66,.66); font-size: 6px; font-weight: 850; text-transform: uppercase; }
.shift-meter-display > i {
  position: absolute; z-index: 2; top: 0; bottom: 0; width: 30px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.84), transparent);
  animation: shift-meter-glow 2.8s ease-out infinite;
}
.shift-meter-card.is-pending .shift-meter-display strong { opacity: .45; }
@keyframes shift-meter-glow {
  from { transform: translateX(-40px); opacity: 0; }
  18% { opacity: 1; }
  72%, to { transform: translateX(250px); opacity: 0; }
}
@media (min-width: 1100px) {
  .shift-meter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .shift-meter-board-head > small { display: none; }
  .shift-meter-grid { gap: 6px; }
  .shift-meter-card { padding: 5px; }
  .shift-meter-card > header { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px; height: 27px; padding: 1px 3px; }
  .shift-meter-pump { width: 22px; height: 22px; }
  .shift-meter-display { grid-template-rows: 37px 38px; }
  .shift-meter-display > div { padding-right: 5px; padding-left: 5px; }
  .shift-meter-sold { gap: 5px; padding-right: 6px !important; padding-left: 6px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .shift-meter-display > i { display: none; animation: none; }
}

/* 18. Acciones y lecturas del turno ---------------------------------------
   Las acciones forman un solo tablero de mando; las lecturas conservan el
   lenguaje visual de los displays físicos y caben 2 x 2 en el teléfono. */
.shift-action-dock {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px;
  margin: 12px 0 18px; padding: 6px;
  background: linear-gradient(145deg, #e7eef7, #f4f7fb);
  border: 1px solid #d2deeb; border-radius: 14px; box-shadow: inset 0 1px 0 #fff, var(--sh-1);
}
.shift-action-form { display: flex; min-width: 0; margin: 0; }
.shift-action {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 15px; align-items: center; gap: 9px;
  width: 100%; min-width: 0; min-height: 62px; margin: 0; padding: 8px 9px;
  color: #183555; background: #fff; border: 1px solid #c7d6e6; border-radius: 10px;
  box-shadow: 0 2px 5px rgba(9, 43, 81, .07);
  font: inherit; text-align: left; text-decoration: none; cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.shift-action:hover {
  color: #0b58bd; border-color: #79abe8; box-shadow: 0 4px 10px rgba(9, 67, 137, .12);
  transform: translateY(-1px);
}
.shift-action:active { transform: translateY(0); }
.shift-action-icon {
  display: grid; place-items: center; width: 38px; height: 38px;
  color: #0867df; background: #eaf3ff; border: 1px solid #cfe3ff; border-radius: 10px;
}
.shift-action-icon svg.i { width: 20px; height: 20px; }
.shift-action-copy { display: flex; flex-direction: column; min-width: 0; }
.shift-action-copy strong {
  overflow: hidden; color: #183555; font-size: 13px; line-height: 1.15;
  text-overflow: ellipsis; white-space: nowrap;
}
.shift-action-copy small {
  overflow: hidden; margin-top: 3px; color: #65778c; font-size: 9px; font-weight: 650;
  line-height: 1.15; text-overflow: ellipsis; white-space: nowrap;
}
.shift-action-arrow { width: 15px; height: 15px; color: #7890ab; }
.shift-action.is-danger { color: #a22e2b; border-color: #e1bbb8; }
.shift-action.is-danger .shift-action-icon { color: #bd3430; background: #fff0ef; border-color: #f0cfcc; }
.shift-action.is-danger .shift-action-copy strong { color: #a22e2b; }
.shift-action.is-danger:hover { color: #a22e2b; background: #fffafa; border-color: #cf6b65; }
.shift-action.is-disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.shift-action.is-disabled:hover { color: #183555; border-color: #c7d6e6; box-shadow: none; transform: none; }

.reading-section-head {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  margin: 0 0 9px;
}
.reading-section-icon {
  display: grid; place-items: center; width: 38px; height: 38px;
  color: #fff; background: linear-gradient(145deg, #0c4f9d, #082c5b);
  border: 1px solid #2e6eb3; border-radius: 10px; box-shadow: 0 3px 8px rgba(7, 46, 93, .16);
}
.reading-section-icon svg.i { width: 20px; height: 20px; }
.reading-section-head > div { display: flex; flex-direction: column; min-width: 0; }
.reading-section-head > div > span {
  color: var(--brand-text); font-size: 8px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase;
}
.reading-section-head h2 { margin: 0; color: var(--ink); font-size: 18px; line-height: 1.15; }
.reading-section-head > small { color: var(--muted); font-size: 10px; white-space: nowrap; }

.reading-console-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px;
}
.reading-console {
  position: relative; isolation: isolate; min-width: 0; padding: 7px;
  overflow: hidden; color: #eaf3ff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.028) 1px, transparent 1px),
    linear-gradient(145deg, #123c7a, #082957 52%, #061b3b);
  background-size: 18px 18px, 18px 18px, auto;
  border: 2px solid #8293a7; border-radius: 12px;
  box-shadow: inset 0 0 0 2px rgba(229,238,247,.16), 0 4px 10px rgba(7,27,55,.14);
}
.reading-console::before {
  content: ""; position: absolute; z-index: 0; top: 0; right: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, #eff5fa, #879aaf 45%, #f5f8fb);
}
.reading-console > header, .reading-console-lcd, .reading-console > footer, .reading-console-note {
  position: relative; z-index: 1;
}
.reading-console > header {
  display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 6px;
  min-width: 0; height: 31px; padding: 2px 4px;
}
.reading-console-pump {
  display: grid; place-items: center; width: 25px; height: 25px;
  color: #183b67; background: linear-gradient(#f5f8fb, #dce5ee);
  border: 1px solid #9cabbc; border-radius: 7px;
}
.reading-console-pump svg.i { width: 15px; height: 15px; }
.reading-console-face { display: flex; flex-direction: column; min-width: 0; }
.reading-console-face strong { color: #fff; font-size: 12px; line-height: 1.05; }
.reading-console-face small {
  overflow: hidden; color: #93afd0; font: 650 6.5px/1.1 var(--mono);
  text-overflow: ellipsis; white-space: nowrap;
}
.reading-console-status {
  display: inline-flex; align-items: center; gap: 3px; padding: 3px 5px;
  color: #8ff0c0; background: rgba(20,109,74,.26); border: 1px solid rgba(87,224,159,.25);
  border-radius: 999px; font-size: 7px; font-weight: 850; white-space: nowrap;
}
.reading-console-status svg.i { width: 10px; height: 10px; }
.reading-console-status.info { color: #9bc8ff; background: rgba(23,86,156,.28); border-color: rgba(115,175,240,.3); }
.reading-console-status.warn { color: #f2cf79; background: rgba(142,91,9,.28); border-color: rgba(229,178,67,.3); }
.reading-console-status.bad { color: #ffaaa5; background: rgba(146,40,35,.3); border-color: rgba(237,111,103,.3); }

.reading-console-lcd {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end;
  min-width: 0; height: 66px; margin: 3px 0 5px; padding: 8px 9px 7px; overflow: hidden;
  color: var(--sur-seg); background: var(--sur-lcd);
  border: 4px solid var(--sur-lcd-frame); border-radius: 7px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2), inset 0 2px 8px rgba(16,35,18,.2);
  font-variant-numeric: tabular-nums;
}
.reading-console-lcd::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(25,39,22,.025) 3px 4px);
}
.reading-console-lcd > span {
  position: relative; z-index: 1; grid-column: 1 / -1; align-self: start;
  color: var(--sur-lcd-ink); font-size: 6px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase;
}
.reading-console-lcd > strong {
  position: relative; z-index: 1; overflow: hidden; align-self: end;
  color: var(--sur-seg); font: 850 18px/1 var(--mono); letter-spacing: -.055em;
  text-align: right; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.17), 0 0 8px rgba(35,70,30,.12);
}
.reading-console-lcd > small {
  position: relative; z-index: 1; margin: 0 0 1px 5px;
  color: var(--sur-lcd-ink); font-size: 6px; font-weight: 850;
}
.reading-console-lcd > i {
  position: absolute; z-index: 2; top: 0; bottom: 0; width: 30px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(245,255,238,.16), transparent);
  animation: reading-scan 3.2s ease-in-out infinite;
}
@keyframes reading-scan {
  0%, 18% { transform: translateX(-45px); opacity: 0; }
  28% { opacity: 1; }
  68%, 100% { transform: translateX(260px); opacity: 0; }
}
.reading-console.is-pending .reading-console-lcd,
.reading-console.is-no_reading .reading-console-lcd { border-color: #9b7223; }
.reading-console.is-pending .reading-console-lcd > strong,
.reading-console.is-no_reading .reading-console-lcd > strong { opacity: .55; }
.reading-console > footer {
  display: flex; align-items: center; justify-content: space-between; gap: 5px;
  min-width: 0; padding: 0 4px; color: #98b2d1; font-size: 7px;
}
.reading-console > footer > span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.reading-console > footer svg.i { width: 10px; height: 10px; }
.reading-console > footer > small {
  overflow: hidden; color: #c8daec; font-size: 7px; text-overflow: ellipsis; white-space: nowrap;
}
.reading-console-note {
  overflow: hidden; margin: 5px 3px 0; padding-top: 4px; border-top: 1px solid rgba(139,180,221,.2);
  color: #f1cd79; font-size: 7px; text-overflow: ellipsis; white-space: nowrap;
}
.reading-console-empty {
  grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 88px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line-2); border-radius: 12px;
}
.reading-console-empty svg.i { width: 18px; height: 18px; }
.reading-override {
  margin: 0 0 12px; padding: 14px; background: #fffdf7; border: 1px solid var(--warn-line);
  border-radius: 12px; box-shadow: var(--sh-1);
}
.reading-override-head { display: flex; align-items: center; gap: 9px; }
.reading-override-head > svg.i { width: 20px; height: 20px; color: var(--warn); }
.reading-override-head > span { display: flex; flex-direction: column; }
.reading-override-head strong { color: var(--ink); font-size: 13px; }
.reading-override-head small { color: var(--muted); font-size: 9px; }

.shift-opening-receipt {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px;
  margin: 0 0 var(--sp-4); padding: 10px 12px;
  background: #fff; border: 1px solid #d5dfeb; border-radius: 12px; box-shadow: var(--sh-1);
}
.shift-opening-receipt-icon {
  display: grid; place-items: center; width: 38px; height: 38px;
  color: #0867df; background: #eaf3ff; border: 1px solid #cfe3ff; border-radius: 10px;
}
.shift-opening-receipt-icon svg.i { width: 20px; height: 20px; }
.shift-opening-receipt > div { min-width: 0; }
.shift-opening-receipt h2 { margin: 0; color: var(--ink); font-size: 14px; line-height: 1.15; }
.shift-opening-receipt p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.3; }
.shift-opening-receipt form { margin: 0; }
.shift-opening-receipt .btn { min-height: 38px; margin: 0; padding: 6px 11px; font-size: 11px; }

@media (max-width: 900px) {
  .reading-console-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .shift-action-dock { gap: 5px; margin-top: 9px; padding: 5px; border-radius: 12px; }
  .shift-action {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    min-height: 76px; padding: 7px 4px; text-align: center;
  }
  .shift-action-icon { width: 29px; height: 29px; border-radius: 8px; }
  .shift-action-icon svg.i { width: 16px; height: 16px; }
  .shift-action-copy { align-items: center; width: 100%; }
  .shift-action-copy strong { max-width: 100%; font-size: 10px; }
  .shift-action-copy small { max-width: 100%; margin-top: 2px; font-size: 7px; }
  .shift-action-arrow { display: none; }
  .reading-section-head { grid-template-columns: 34px minmax(0, 1fr); gap: 8px; margin-bottom: 7px; }
  .reading-section-icon { width: 34px; height: 34px; border-radius: 9px; }
  .reading-section-icon svg.i { width: 18px; height: 18px; }
  .reading-section-head h2 { font-size: 16px; }
  .reading-section-head > small { display: none; }
  .reading-console-grid { gap: 7px; margin-bottom: 13px; }
  .reading-console { padding: 5px; border-radius: 10px; }
  .reading-console > header { grid-template-columns: 22px minmax(0, 1fr) auto; gap: 4px; height: 27px; padding: 1px 2px; }
  .reading-console-pump { width: 22px; height: 22px; border-radius: 6px; }
  .reading-console-pump svg.i { width: 13px; height: 13px; }
  .reading-console-face strong { font-size: 10px; }
  .reading-console-face small { font-size: 5.5px; }
  .reading-console-status { padding: 2px 4px; font-size: 6px; }
  .reading-console-status svg.i { width: 8px; height: 8px; }
  .reading-console-lcd { height: 60px; margin: 2px 0 4px; padding: 7px 6px 6px; border-width: 3px; }
  .reading-console-lcd > strong { font-size: 15px; }
  .reading-console-lcd > small { font-size: 5px; }
  .reading-console > footer { padding: 0 2px; font-size: 6px; }
  .reading-console > footer > small { font-size: 6px; }
  .shift-opening-receipt { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; padding: 9px; }
  .shift-opening-receipt-icon { width: 34px; height: 34px; border-radius: 9px; }
  .shift-opening-receipt-icon svg.i { width: 18px; height: 18px; }
  .shift-opening-receipt h2 { font-size: 12px; }
  .shift-opening-receipt p { display: none; }
  .shift-opening-receipt .btn { min-height: 34px; padding: 5px 8px; font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .reading-console-lcd > i { animation: none; display: none; }
  .shift-action { transition: none; }
}

/* 19. Ventas del turno ------------------------------------------------------
   Un libro de transacciones compacto reemplaza la tabla apilada. En teléfono
   se ven dos ventas por fila, con importe, galones, pago, placa, cliente e
   iButton a la vista; la única corrección del islero es crédito -> efectivo. */
.sales-ledger {
  margin: 0 0 10px; overflow: hidden;
  background: #fff; border: 1px solid #cad8e7; border-top: 3px solid #1476ef;
  border-radius: 14px; box-shadow: 0 5px 16px rgba(15, 42, 74, .09);
}
.sales-ledger-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 64px; padding: 10px 14px; border-bottom: 1px solid #dbe4ee;
  background: linear-gradient(135deg, #fff 0%, #f5f9fe 100%);
}
.sales-ledger-head > div { min-width: 0; }
.sales-kicker {
  display: flex; align-items: center; gap: 5px; color: #075ec9;
  font-size: 8px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase;
}
.sales-kicker svg.i { width: 12px; height: 12px; }
.sales-ledger-head h1 { margin: 2px 0 1px; color: #10233e; font-size: 21px; line-height: 1.05; }
.sales-ledger-head p {
  overflow: hidden; margin: 0; color: #607188; font-size: 9px; font-weight: 620;
  text-overflow: ellipsis; white-space: nowrap;
}
.sales-shift-state {
  display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 5px 9px;
  color: #087451; background: #e9f8f2; border-radius: 999px;
  font-size: 9px; font-weight: 850; white-space: nowrap;
}
.sales-shift-state i { width: 7px; height: 7px; background: #1aab77; border-radius: 50%; }
.sales-shift-state:not(.is-open) { color: #6b7788; background: #eef2f6; }
.sales-shift-state:not(.is-open) i { background: #8090a2; }
.sales-ledger-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sales-ledger-totals > div {
  display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 61px;
  padding: 7px 11px; border-left: 1px solid #dbe4ee;
}
.sales-ledger-totals > div:first-child { border-left: 0; }
.sales-ledger-totals span {
  color: #5e7087; font-size: 7px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase;
}
.sales-ledger-totals strong {
  overflow: hidden; margin: 2px 0; color: #10233e; font-size: clamp(13px, 1.7vw, 20px);
  font-variant-numeric: tabular-nums; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap;
}
.sales-ledger-totals small { color: #718196; font-size: 7px; white-space: nowrap; }
.sales-ledger-totals .is-cash strong { color: #087451; }
.sales-ledger-totals .is-credit strong { color: #9b6800; }

.sales-controls {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 7px;
  margin: 0 0 8px;
}
.sales-filterbar {
  display: flex; gap: 5px; margin: 0; padding: 4px; overflow-x: auto;
  background: #e8eef5; border: 1px solid #d5e0eb; border-radius: 11px; scrollbar-width: none;
}
.sales-filterbar::-webkit-scrollbar { display: none; }
.sales-filterbar a {
  display: flex; align-items: center; justify-content: center; gap: 5px; flex: 1 0 auto;
  min-height: 34px; padding: 5px 11px; color: #4d627c; border: 1px solid transparent;
  border-radius: 8px; font-size: 10px; font-weight: 800; text-decoration: none; white-space: nowrap;
}
.sales-filterbar a span {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px;
  background: rgba(78, 99, 124, .1); border-radius: 999px; font-size: 8px;
}
.sales-filterbar a.on { color: #075ec9; background: #fff; border-color: #c8d7e6; box-shadow: 0 1px 3px rgba(12, 38, 69, .08); }
.sales-filterbar a.is-alert { color: #8b640b; }
.sales-view-switch {
  display: grid; grid-template-columns: repeat(2, auto); gap: 3px; padding: 4px;
  background: #0b2948; border: 1px solid #183d63; border-radius: 11px;
}
.sales-view-switch a {
  display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 68px; min-height: 34px;
  padding: 5px 9px; color: #a9bfd5; border: 1px solid transparent; border-radius: 8px;
  font-size: 9px; font-weight: 800; text-decoration: none;
}
.sales-view-switch a svg.i { width: 14px; height: 14px; }
.sales-view-switch a.on { color: #fff; background: #135497; border-color: #2772bc; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.sales-rule {
  display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0 0 10px; padding: 7px 10px;
  color: #315d91; background: #edf6fd; border: 1px solid #cde2f2; border-radius: 10px;
  font-size: 9px; line-height: 1.35;
}
.sales-rule svg.i { width: 17px; height: 17px; flex: none; color: #087c68; }
.sales-rule.is-readonly { color: #68788c; background: #f4f6f8; border-color: #dce3ea; }

.sales-list {
  display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px;
}
.sale-list-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; overflow: hidden;
  background: #fff; border: 1px solid #ccd9e6; border-left: 4px solid #1e9c71;
  border-radius: 10px; box-shadow: 0 2px 7px rgba(15, 42, 74, .065);
}
.sale-list-row.is-credit { border-left-color: #d99b17; }
.sale-list-row.is-review { border-left-color: #ca564f; }
.sale-list-row.needs-attention { background: #fffdfa; }
.sale-list-body {
  display: grid; grid-template-columns: 72px minmax(110px, .8fr) 92px minmax(180px, 1fr);
  align-items: center; min-width: 0; min-height: 61px; padding: 7px 10px; color: inherit; text-decoration: none;
}
.sale-list-body > span { min-width: 0; }
.sale-list-ref, .sale-list-value { display: flex; flex-direction: column; gap: 2px; }
.sale-list-ref strong { color: #10233e; font-size: 12px; }
.sale-list-ref small, .sale-list-value small { color: #6a7c91; font-size: 8px; font-weight: 650; white-space: nowrap; }
.sale-list-value strong {
  overflow: hidden; color: #10233e; font-size: 15px; font-variant-numeric: tabular-nums;
  letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap;
}
.sale-list-payment {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; justify-self: start;
  min-height: 25px; padding: 3px 7px; border-radius: 999px; font-size: 8px; font-weight: 850;
  letter-spacing: .035em; text-transform: uppercase; white-space: nowrap;
}
.sale-list-payment svg.i { width: 12px; height: 12px; }
.sale-list-payment.is-cash { color: #087451; background: #e9f8f2; }
.sale-list-payment.is-credit { color: #8b640b; background: #fff4d7; }
.sale-list-payment.is-review { color: #a33e38; background: #ffefed; }
.sale-list-identity {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 8px;
  min-width: 0; padding-left: 11px; border-left: 1px solid #e0e7ef;
}
.sale-list-identity > span { display: flex; align-items: center; gap: 7px; min-width: 0; }
.sale-list-identity .plate { flex: none; padding: 1px 5px; font-size: 8px; }
.sale-list-identity b:not(.plate) { flex: none; color: #52667d; font-size: 8px; text-transform: uppercase; }
.sale-list-identity strong { overflow: hidden; color: #2a405a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sale-list-identity small {
  display: inline-flex; align-items: center; gap: 3px; color: #60758b; font: 650 7px/1.1 var(--mono); white-space: nowrap;
}
.sale-list-identity small svg.i { width: 10px; height: 10px; color: #27856b; }
.sale-list-identity em {
  grid-column: 1 / -1; color: #96670a; font-size: 7px; font-style: normal; font-weight: 800;
}
.sale-list-sync { color: #a33e38; font-size: 7px; font-weight: 850; }
.sale-list-action { display: flex; align-items: stretch; margin: 0; padding: 5px; border-left: 1px solid #dfe7ef; }
.sale-list-action button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 112px; min-height: 42px;
  padding: 5px 9px; color: #fff; background: #1476ef; border: 1px solid #0965d4; border-radius: 8px;
  font: inherit; font-size: 8px; font-weight: 850; white-space: nowrap; cursor: pointer;
}
.sale-list-action button svg.i { width: 14px; height: 14px; }
.sale-list-open {
  display: grid; place-items: center; align-self: stretch; width: 34px; color: #7890aa;
  border-left: 1px solid #e0e7ef; text-decoration: none;
}
.sale-list-open svg.i { width: 15px; height: 15px; }

.sales-feed {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px;
  margin-bottom: 14px;
}
.sale-feed-card {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: #fff; border: 1px solid #cbd8e6; border-top: 3px solid #1e9c71;
  border-radius: 12px; box-shadow: 0 4px 12px rgba(15, 42, 74, .08);
}
.sale-feed-card.is-credit { border-top-color: #d99b17; }
.sale-feed-card.is-review { border-top-color: #ca564f; }
.sale-feed-card.needs-attention { box-shadow: 0 0 0 1px rgba(217,155,23,.2), 0 4px 12px rgba(15,42,74,.08); }
.sale-feed-card > header {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px;
  min-height: 32px; padding: 4px 8px; background: linear-gradient(180deg, #f7fafd, #edf3f8);
  border-bottom: 1px solid #d9e3ed;
}
.sale-feed-card > header a { display: flex; align-items: center; gap: 5px; min-width: 0; color: #10233e; text-decoration: none; }
.sale-feed-card > header a svg.i { width: 14px; height: 14px; color: #1476ef; }
.sale-feed-card > header a strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sale-feed-card > header > span {
  padding: 3px 5px; color: #3d5d7d; background: #fff; border: 1px solid #cad8e7;
  border-radius: 5px; font-size: 7px; font-weight: 850; text-transform: uppercase;
}
.sale-feed-card > header time { color: #61758d; font-size: 8px; font-weight: 750; font-variant-numeric: tabular-nums; }
.sale-feed-value {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); min-height: 49px;
  background: #fbfcfe; border-bottom: 1px solid #e0e7ef;
}
.sale-feed-value > span { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 6px 8px; }
.sale-feed-value > span + span { border-left: 1px solid #e0e7ef; }
.sale-feed-value small { color: #66788e; font-size: 6px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.sale-feed-value strong {
  overflow: hidden; color: #10233e; font-size: 17px; line-height: 1.15;
  font-variant-numeric: tabular-nums; letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap;
}
.sale-feed-value > span:last-child strong { color: #2b4e73; font-size: 13px; }
.sale-feed-payment {
  display: flex; align-items: center; gap: 5px; min-height: 29px; padding: 4px 8px;
  color: #087451; background: #edfaf5; border-bottom: 1px solid #dce8e4; font-size: 9px;
}
.is-credit .sale-feed-payment { color: #8b640b; background: #fff8e7; border-bottom-color: #eee2bf; }
.is-review .sale-feed-payment { color: #a33e38; background: #fff1ef; border-bottom-color: #eed4d1; }
.sale-feed-payment svg.i { width: 13px; height: 13px; flex: none; }
.sale-feed-payment strong { font-size: 9px; text-transform: uppercase; letter-spacing: .045em; }
.sale-feed-rejected { margin-left: auto; color: #a33e38; font-size: 7px; font-weight: 850; }
.sale-feed-identity { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; padding: 7px 8px; }
.sale-feed-identity > div { display: flex; align-items: center; justify-content: space-between; gap: 5px; min-width: 0; }
.sale-feed-identity .plate { padding: 1px 5px; font-size: 9px; }
.sale-feed-no-plate { color: #40546c; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.sale-feed-key { display: inline-flex; align-items: center; gap: 3px; min-width: 0; color: #60758b; font: 650 7px/1.1 var(--mono); white-space: nowrap; }
.sale-feed-key svg.i { width: 10px; height: 10px; color: #27856b; }
.sale-feed-identity > strong {
  display: -webkit-box; overflow: hidden; min-height: 22px; color: #263d58; font-size: 9px; line-height: 1.2;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.sale-feed-flags { min-height: 0; font-size: 7px; }
.sale-feed-flags:empty { display: none; }
.sale-feed-flags .chip { min-height: 18px; padding: 2px 5px; font-size: 7px; }
.sale-feed-card > footer {
  display: flex; align-items: center; justify-content: space-between; gap: 5px; min-height: 38px;
  padding: 4px 6px; background: #f7f9fc; border-top: 1px solid #dde6ef;
}
.sale-feed-card > footer form { margin: 0; }
.sale-feed-detail, .sale-feed-card > footer button {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 30px;
  margin: 0; padding: 4px 7px; border-radius: 7px; font: inherit; font-size: 8px; font-weight: 800;
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.sale-feed-detail { color: #315d91; background: transparent; border: 1px solid transparent; }
.sale-feed-card > footer button { color: #fff; background: #1476ef; border: 1px solid #0965d4; box-shadow: 0 1px 3px rgba(10,79,185,.18); }
.sale-feed-detail svg.i, .sale-feed-card > footer button svg.i { width: 13px; height: 13px; }
.sales-feed-empty {
  display: flex; grid-column: 1 / -1; flex-direction: column; align-items: center; gap: 5px;
  padding: 30px 16px; color: #718196; background: #fff; border: 1px dashed #cbd8e6; border-radius: 12px;
}
.sales-feed-empty svg.i { width: 28px; height: 28px; color: #a6b6c8; }
.sales-feed-empty strong { color: #344b66; }
.sales-history-link {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin: 4px 0 18px; padding: 9px 11px;
  color: #607188; background: #edf2f7; border-radius: 9px; font-size: 9px;
}
.sales-history-link > span { display: flex; align-items: center; gap: 5px; font-weight: 800; }
.sales-history-link svg.i { width: 13px; height: 13px; }
.sales-history-link a { color: #075ec9; font-weight: 750; }

@media (max-width: 700px) {
  .sales-controls { gap: 5px; }
  .sales-view-switch a { min-width: 51px; padding: 4px 6px; font-size: 7px; }
  .sale-list-body {
    grid-template-columns: 55px minmax(0, 1fr) auto; grid-template-rows: auto auto;
    gap: 4px 7px; min-height: 70px; padding: 6px 7px;
  }
  .sale-list-ref { grid-column: 1; grid-row: 1; }
  .sale-list-value { grid-column: 2; grid-row: 1; }
  .sale-list-payment { grid-column: 3; grid-row: 1; }
  .sale-list-identity {
    grid-column: 1 / -1; grid-row: 2; grid-template-columns: minmax(0, 1fr) auto;
    padding: 4px 0 0; border-top: 1px solid #e5ebf1; border-left: 0;
  }
  .sale-list-action { padding: 4px; }
  .sale-list-action button { flex-direction: column; gap: 2px; min-width: 76px; min-height: 62px; padding: 4px 5px; white-space: normal; }
  .sale-list-action button span { max-width: 66px; line-height: 1.05; }
  .sales-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sales-ledger-head { min-height: 59px; padding: 8px 10px; }
  .sales-ledger-head h1 { font-size: 19px; }
  .sales-ledger-head p { max-width: 250px; font-size: 8px; }
  .sales-shift-state { padding: 4px 7px; font-size: 8px; }
  .sales-ledger-totals > div { min-height: 55px; padding: 6px 7px; }
  .sales-ledger-totals strong { font-size: 13px; }
  .sales-ledger-totals small { font-size: 6px; }
}
@media (max-width: 370px) {
  .sales-controls { grid-template-columns: minmax(0, 1fr) auto; }
  .sale-list-action button { min-width: 42px; }
  .sale-list-action button span { display: none; }
  .sale-list-identity small { display: none; }
  .sales-feed { grid-template-columns: 1fr; }
  .sales-shift-state { display: none; }
  .sales-ledger-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-ledger-totals > div:nth-child(3) { border-left: 0; border-top: 1px solid #dbe4ee; }
  .sales-ledger-totals > div:nth-child(4) { border-top: 1px solid #dbe4ee; }
}

/* 20. Detalle de venta ------------------------------------------------------
   El comprobante separa el resultado económico, la identidad y la trazabilidad.
   Así deja de parecer un formulario administrativo y la corrección operativa
   queda visible sin alterar las reglas de pago. */
.sale-detail-hero {
  --sale-accent: #26c58b;
  position: relative; isolation: isolate; margin: 0 0 10px; overflow: hidden; color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(135deg, #103e78 0%, #082b56 52%, #061c3a 100%);
  background-size: 26px 26px, 26px 26px, auto;
  border: 1px solid #1e568e; border-top: 4px solid var(--sale-accent); border-radius: 15px;
  box-shadow: 0 8px 24px rgba(7,29,57,.16);
}
.sale-detail-hero.is-credit { --sale-accent: #f2b72a; }
.sale-detail-hero.is-review { --sale-accent: #df675f; }
.sale-detail-hero::after {
  content: ""; position: absolute; z-index: -1; top: -105px; right: -70px; width: 260px; height: 260px;
  border: 1px solid rgba(112,182,245,.16); border-radius: 50%; box-shadow: 0 0 0 38px rgba(80,154,224,.045);
}
.sale-detail-hero-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 62px; padding: 10px 14px; border-bottom: 1px solid rgba(181,214,244,.18);
}
.sale-detail-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sale-detail-heading-icon, .sale-detail-action-icon, .sale-detail-panel-icon {
  display: grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(145deg, #1779e8, #084a9b); border: 1px solid rgba(116,185,250,.56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 8px rgba(5,35,70,.16);
}
.sale-detail-heading-icon { width: 38px; height: 38px; border-radius: 10px; }
.sale-detail-heading-icon svg.i { width: 20px; height: 20px; }
.sale-detail-heading > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.sale-detail-heading small, .sale-detail-panel-head small, .sale-detail-history > header small {
  color: #8bc6ff; font-size: 7px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase;
}
.sale-detail-heading h1 { margin: 2px 0 0; color: #fff; font-size: 20px; line-height: 1.05; }
.sale-detail-payment {
  display: inline-flex; align-items: center; gap: 5px; flex: none; min-height: 28px; padding: 4px 9px;
  color: #9ff2d2; background: rgba(22,160,112,.18); border: 1px solid rgba(75,220,169,.36);
  border-radius: 999px; font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase;
}
.sale-detail-payment.is-credit { color: #ffe3a0; background: rgba(205,143,0,.2); border-color: rgba(242,183,42,.42); }
.sale-detail-payment.is-review { color: #ffc0ba; background: rgba(194,66,57,.2); border-color: rgba(235,105,96,.42); }
.sale-detail-payment svg.i { width: 13px; height: 13px; }
.sale-detail-totals { display: grid; grid-template-columns: 1.35fr .82fr .9fr; }
.sale-detail-totals > div {
  display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 83px;
  padding: 11px 14px; border-left: 1px solid rgba(181,214,244,.18);
}
.sale-detail-totals > div:first-child { border-left: 0; }
.sale-detail-totals span { color: #9db8d5; font-size: 8px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.sale-detail-totals strong {
  overflow: hidden; margin: 3px 0 1px; color: #f5f9ff; font-size: clamp(19px, 2.1vw, 28px);
  line-height: 1.05; letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sale-detail-total-main strong { color: #fff; font-size: clamp(25px, 3vw, 36px); }
.sale-detail-totals small { color: #88a5c4; font-size: 8px; }
.sale-detail-operation {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  color: #fff; background: rgba(2,17,36,.42); border-top: 1px solid rgba(181,214,244,.18);
}
.sale-detail-operation > div {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 8px;
  min-width: 0; min-height: 60px; padding: 8px 12px;
}
.sale-detail-operation > div + div { border-left: 1px solid rgba(181,214,244,.16); }
.sale-detail-operation-icon {
  display: grid; place-items: center; width: 30px; height: 30px; color: #86c9ff;
  background: rgba(64,145,220,.14); border: 1px solid rgba(101,177,239,.28); border-radius: 8px;
}
.sale-detail-operation-icon svg.i { width: 16px; height: 16px; }
.sale-detail-operation > div > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.sale-detail-operation small {
  color: #8eabc8; font-size: 8px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase;
}
.sale-detail-operation strong {
  overflow: hidden; margin-top: 2px; color: #fff; font-size: 12px; line-height: 1.15;
  text-overflow: ellipsis; white-space: nowrap;
}
.sale-detail-operation em { margin-top: 2px; color: #9db8d3; font-size: 8px; font-style: normal; }

.sale-detail-alert {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  min-height: 42px; margin: 0 0 9px; padding: 7px 10px; color: #865c08; background: #fff7df;
  border: 1px solid #efd18a; border-radius: 10px; font-size: 9px; line-height: 1.35;
}
.sale-detail-alert > svg.i { width: 17px; height: 17px; }
.sale-detail-alert span strong { display: block; color: #644503; }
.sale-detail-alert a { display: inline-flex; align-items: center; gap: 3px; color: #075ec9; font-weight: 850; text-decoration: none; white-space: nowrap; }
.sale-detail-alert a svg.i { width: 12px; height: 12px; }

.sale-detail-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 8px; margin: 0 0 10px; }
.sale-detail-payment-action, .sale-detail-print-action {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px;
  min-width: 0; min-height: 66px; margin: 0; padding: 8px 9px; overflow: hidden;
  background: #fff; border: 1px solid #cbd9e7; border-left: 4px solid #1476ef; border-radius: 11px;
  box-shadow: 0 3px 10px rgba(15,42,74,.075);
}
.sale-detail-payment-action { border-left-color: #d99b17; }
.sale-detail-action-icon { width: 34px; height: 34px; border-radius: 9px; }
.sale-detail-payment-action .sale-detail-action-icon { color: #8b640b; background: #fff4d7; border-color: #efd38d; box-shadow: none; }
.sale-detail-action-icon svg.i { width: 17px; height: 17px; }
.sale-detail-payment-action > div, .sale-detail-print-action > span:nth-child(3) { display: flex; flex-direction: column; min-width: 0; }
.sale-detail-payment-action small, .sale-detail-print-action small {
  color: #687b91; font-size: 7px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase;
}
.sale-detail-payment-action strong, .sale-detail-print-action strong { color: #172b46; font-size: 12px; }
.sale-detail-payment-action p {
  overflow: hidden; margin: 2px 0 0; color: #607188; font-size: 8px; line-height: 1.25;
  text-overflow: ellipsis; white-space: nowrap;
}
.sale-detail-payment-action form { margin: 0; }
.sale-detail-payment-action button, .sale-detail-print-action button {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; padding: 6px 10px;
  color: #fff; background: linear-gradient(180deg, #1f82f6, #0967d8); border: 1px solid #075fc8;
  border-radius: 8px; box-shadow: 0 2px 5px rgba(10,91,190,.19); font: inherit; font-size: 9px; font-weight: 850;
  white-space: nowrap; cursor: pointer;
}
.sale-detail-payment-action button svg.i, .sale-detail-print-action button svg.i { width: 14px; height: 14px; }
.sale-detail-print-action > span:nth-child(3) { display: flex; flex-direction: column; }

.sale-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: stretch; }
.sale-detail-panel, .sale-detail-history {
  min-width: 0; overflow: hidden; background: #fff; border: 1px solid #cedae7; border-radius: 12px;
  box-shadow: 0 3px 11px rgba(15,42,74,.07);
}
.sale-detail-panel-head, .sale-detail-history > header {
  display: grid; grid-template-columns: 31px minmax(0, 1fr) auto; align-items: center; gap: 8px;
  min-height: 50px; padding: 7px 10px; background: linear-gradient(180deg, #fbfdff, #f3f7fb);
  border-bottom: 1px solid #dce5ee;
}
.sale-detail-panel-icon { width: 29px; height: 29px; border-radius: 8px; }
.sale-detail-panel-icon svg.i { width: 15px; height: 15px; }
.sale-detail-panel-head > span:nth-child(2), .sale-detail-history > header > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.sale-detail-panel-head small, .sale-detail-history > header small { color: #075ec9; }
.sale-detail-panel-head h2, .sale-detail-history > header h2 { margin: 1px 0 0; color: #172b46; font-size: 13px; line-height: 1.05; }
.sale-detail-panel-head > em {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 999px;
  font-size: 8px; font-style: normal; font-weight: 850; white-space: nowrap;
}
.sale-detail-panel-head > em svg.i { width: 11px; height: 11px; }
.sale-detail-panel-head > em.is-ok { color: #087451; background: #e7f8f1; }
.sale-detail-panel-head > em.is-warn { color: #946308; background: #fff3d3; }

.sale-detail-identity-main { display: grid; grid-template-columns: 112px minmax(0, 1fr); min-width: 0; padding: 10px; }
.sale-detail-identity-main > div { min-width: 0; }
.sale-detail-identity-main span, .sale-detail-mini-data dt, .sale-detail-data dt {
  color: #66798f; font-size: 7px; font-weight: 850; letter-spacing: .075em; text-transform: uppercase;
}
.sale-detail-vehicle, .sale-detail-customer { display: flex; flex-direction: column; justify-content: center; min-height: 49px; }
.sale-detail-vehicle { padding-right: 10px; border-right: 1px solid #dfe7ef; }
.sale-detail-customer { padding-left: 11px; }
.sale-detail-vehicle strong.plate { align-self: flex-start; margin-top: 4px; padding: 2px 8px; font-size: 15px; letter-spacing: .07em; }
.sale-detail-vehicle strong.is-empty { margin-top: 4px; color: #607188; font-size: 12px; text-transform: uppercase; }
.sale-detail-customer strong { overflow: hidden; margin-top: 3px; color: #172b46; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.sale-detail-key {
  grid-column: 1 / -1; display: grid; grid-template-columns: 82px minmax(0, .55fr) minmax(0, 1fr);
  align-items: center; gap: 7px; min-height: 38px; margin-top: 8px; padding: 6px 8px;
  color: #34516f; background: #edf5fc; border: 1px solid #d5e5f3; border-radius: 8px;
}
.sale-detail-key > span { display: flex; align-items: center; gap: 4px; color: #315d91; }
.sale-detail-key > span svg.i { width: 12px; height: 12px; }
.sale-detail-key strong { overflow: hidden; color: #27435f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sale-detail-key code { overflow-wrap: anywhere; color: #355873; font: 700 8px/1.25 var(--mono); }
.sale-detail-mini-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-top: 1px solid #e0e7ef; }
.sale-detail-mini-data > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 7px 10px; }
.sale-detail-mini-data > div + div { border-left: 1px solid #e0e7ef; }
.sale-detail-mini-data dd { overflow: hidden; margin: 0; color: #263d58; font-size: 9px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }

.sale-detail-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 4px 10px 7px; }
.sale-detail-data > div {
  display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 46px;
  padding: 6px 7px; border-bottom: 1px solid #e2e8ef;
}
.sale-detail-data > div:nth-child(odd) { padding-left: 0; border-right: 1px solid #e2e8ef; }
.sale-detail-data > div:nth-child(even) { padding-right: 0; padding-left: 10px; }
.sale-detail-data > div:nth-last-child(-n + 2) { border-bottom: 0; }
.sale-detail-data dd { overflow-wrap: anywhere; margin: 3px 0 0; color: #263d58; font-size: 9px; font-weight: 720; }
.sale-detail-data code { font: 700 8px/1.2 var(--mono); }
.sale-detail-sync { display: inline-flex; align-items: center; gap: 4px; color: #4b6884; }
.sale-detail-sync.is-bad { color: #a33e38; }
.sale-detail-sync svg.i { width: 12px; height: 12px; }

.sale-detail-edit { margin-top: 10px; }
.sale-detail-edit > p { margin: 10px 12px 0; color: #607188; font-size: 9px; }
.sale-detail-edit > form { padding: 2px 12px 12px; }

.sale-detail-history { margin: 10px 0 18px; }
.sale-detail-history > header > em {
  padding: 4px 7px; color: #5f7288; background: #e9eff5; border-radius: 999px;
  font-size: 8px; font-style: normal; font-weight: 800;
}
.sale-detail-history ol { margin: 0; padding: 5px 10px; list-style: none; }
.sale-detail-history li {
  position: relative; display: grid; grid-template-columns: 12px minmax(130px, .75fr) minmax(0, 1fr) auto;
  align-items: center; gap: 8px; min-height: 47px; padding: 6px 2px; border-bottom: 1px solid #e2e8ef;
}
.sale-detail-history li:last-child { border-bottom: 0; }
.sale-detail-history li > i { width: 8px; height: 8px; background: #1476ef; border: 2px solid #dcecff; border-radius: 50%; box-shadow: 0 0 0 2px #1476ef; }
.sale-detail-history li > div { display: flex; flex-direction: column; min-width: 0; }
.sale-detail-history li > div strong { color: #203752; font-size: 10px; }
.sale-detail-history li > div span { color: #708197; font-size: 8px; }
.sale-detail-history li > p { margin: 0; color: #52677e; font-size: 9px; }
.sale-detail-history li > p small { display: block; }
.sale-detail-history li > em { color: #657990; font-size: 8px; font-style: normal; font-weight: 800; }
.sale-detail-history-empty { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 62px; color: #27856b; }
.sale-detail-history-empty > svg.i { width: 20px; height: 20px; }
.sale-detail-history-empty > span { display: flex; flex-direction: column; }
.sale-detail-history-empty strong { color: #36506a; font-size: 10px; }
.sale-detail-history-empty small { color: #718196; font-size: 8px; }

@media (max-width: 700px) {
  .sale-detail-hero { border-radius: 12px; }
  .sale-detail-hero-head { min-height: 54px; padding: 8px 10px; }
  .sale-detail-heading { gap: 7px; }
  .sale-detail-heading-icon { width: 33px; height: 33px; border-radius: 8px; }
  .sale-detail-heading-icon svg.i { width: 17px; height: 17px; }
  .sale-detail-heading h1 { font-size: 17px; }
  .sale-detail-payment { min-height: 25px; padding: 3px 7px; font-size: 8px; }
  .sale-detail-totals > div { min-height: 68px; padding: 8px 9px; }
  .sale-detail-totals strong { font-size: 16px; }
  .sale-detail-total-main strong { font-size: 23px; }
  .sale-detail-totals span, .sale-detail-totals small { font-size: 7px; }
  .sale-detail-operation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sale-detail-operation > div { grid-template-columns: 31px minmax(0, 1fr); gap: 7px; min-height: 60px; padding: 8px 10px; }
  .sale-detail-operation > div:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid rgba(181,214,244,.16); border-left: 0; }
  .sale-detail-operation-icon { width: 30px; height: 30px; }
  .sale-detail-operation-icon svg.i { width: 16px; height: 16px; }
  .sale-detail-operation small { font-size: 8px; }
  .sale-detail-operation strong { font-size: 12px; }
  .sale-detail-operation em { font-size: 8px; }
  .sale-detail-actions, .sale-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .sale-detail-payment-action, .sale-detail-print-action { min-height: 60px; }
  .sale-detail-payment-action p { font-size: 7.5px; }
  .sale-detail-panel-head, .sale-detail-history > header { min-height: 46px; padding: 6px 9px; }
  .sale-detail-identity-main { padding: 8px 9px; }
  .sale-detail-history li { grid-template-columns: 12px minmax(100px, .7fr) minmax(0, 1fr) auto; }
}

@media (max-width: 420px) {
  .sale-detail-payment-action, .sale-detail-print-action { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 7px; padding: 7px; }
  .sale-detail-action-icon { width: 31px; height: 31px; }
  .sale-detail-payment-action p { display: none; }
  .sale-detail-payment-action button, .sale-detail-print-action button { min-height: 36px; padding: 5px 8px; font-size: 8px; }
  .sale-detail-identity-main { grid-template-columns: 94px minmax(0, 1fr); }
  .sale-detail-customer strong { font-size: 11px; }
  .sale-detail-key { grid-template-columns: 66px minmax(0, 1fr); gap: 4px; }
  .sale-detail-key code { grid-column: 1 / -1; }
  .sale-detail-history li { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .sale-detail-history li > p { grid-column: 2 / -1; }
}

/* 21. Liquidación en vivo del islero -------------------------------------- */
.live-settlement-page-head { margin: 0 0 12px; }
.live-settlement-page-head .eyebrow { color: #075ec9; font-size: 8px; letter-spacing: .13em; }
.live-settlement-page-head h1 { margin: 3px 0 2px; font-size: 25px; }
.live-settlement-page-head p { margin: 0; color: var(--muted); font-size: 12px; }
.live-settlement-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 280px; padding: 30px; color: #708299; text-align: center;
  background: #fff; border: 1px solid #cfdae6; border-radius: 14px; box-shadow: var(--sh-1);
}
.live-settlement-empty > svg.i { width: 34px; height: 34px; color: #9ab0c7; }
.live-settlement-empty strong { color: #2b435f; font-size: 16px; }
.live-settlement-empty span { font-size: 11px; }

.live-settlement-hero {
  margin: 0 0 9px; overflow: hidden; color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(135deg, #11447f, #082c59 55%, #061d3d);
  background-size: 25px 25px, 25px 25px, auto;
  border: 1px solid #245f99; border-top: 4px solid #2bc58d; border-radius: 14px;
  box-shadow: 0 7px 20px rgba(7,29,58,.15);
}
.live-settlement-hero > header {
  display: grid; grid-template-columns: 39px minmax(0, 1fr) auto; align-items: center; gap: 10px;
  min-height: 61px; padding: 9px 13px; border-bottom: 1px solid rgba(171,209,244,.18);
}
.live-settlement-hero-icon, .live-settlement-print-icon {
  display: grid; place-items: center; width: 37px; height: 37px; color: #fff;
  background: linear-gradient(145deg, #1981ee, #07509f); border: 1px solid rgba(116,185,250,.48);
  border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 8px rgba(4,28,56,.18);
}
.live-settlement-hero-icon svg.i, .live-settlement-print-icon svg.i { width: 19px; height: 19px; }
.live-settlement-hero-title { display: flex; flex-direction: column; min-width: 0; }
.live-settlement-hero-title small { color: #75bdff; font-size: 7px; font-weight: 900; letter-spacing: .14em; }
.live-settlement-hero-title h1 { margin: 1px 0; color: #fff; font-size: 18px; line-height: 1.05; }
.live-settlement-hero-title em { color: #adc5dd; font-size: 8px; font-style: normal; }
.live-settlement-state {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; color: #9ef0d1;
  background: rgba(31,166,119,.16); border: 1px solid rgba(64,213,160,.28); border-radius: 999px;
  font-size: 8px; font-weight: 850; white-space: nowrap;
}
.live-settlement-state i { width: 7px; height: 7px; background: #2ac58d; border-radius: 50%; box-shadow: 0 0 0 3px rgba(42,197,141,.1); }
.live-settlement-hero-total { display: grid; grid-template-columns: 1.25fr .75fr; }
.live-settlement-hero-total > span { display: flex; flex-direction: column; min-width: 0; padding: 10px 14px; }
.live-settlement-hero-total > span + span { border-left: 1px solid rgba(171,209,244,.18); }
.live-settlement-hero-total small { color: #9bb7d2; font-size: 8px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.live-settlement-hero-total strong {
  overflow: hidden; margin: 2px 0; color: #fff; font-size: clamp(22px, 3vw, 32px); line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap;
}
.live-settlement-hero-total strong b { color: #a8c0d8; font-size: 10px; letter-spacing: 0; }
.live-settlement-hero-total em { color: #91aeca; font-size: 8px; font-style: normal; }
.live-settlement-hero > footer {
  display: flex; align-items: center; gap: 6px; padding: 6px 14px; color: #9fb9d4;
  background: rgba(2,17,36,.32); border-top: 1px solid rgba(171,209,244,.14); font-size: 8px;
}

.live-settlement-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-bottom: 12px; }
.live-settlement-kpis article {
  display: grid; grid-template-columns: 31px minmax(0, 1fr); align-items: center; gap: 7px; min-width: 0;
  min-height: 67px; padding: 8px; background: #fff; border: 1px solid #cfdae6; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15,42,74,.065);
}
.live-settlement-kpi-icon {
  display: grid; place-items: center; width: 30px; height: 30px; color: #1766b8;
  background: #eaf4ff; border-radius: 8px;
}
.live-settlement-kpi-icon svg.i { width: 15px; height: 15px; }
.live-settlement-kpis article.is-cash .live-settlement-kpi-icon { color: #087451; background: #e8f8f1; }
.live-settlement-kpis article.is-credit .live-settlement-kpi-icon { color: #926309; background: #fff4d8; }
.live-settlement-kpis article > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.live-settlement-kpis small { color: #65788e; font-size: 7px; font-weight: 850; letter-spacing: .065em; text-transform: uppercase; }
.live-settlement-kpis strong {
  overflow: hidden; margin: 2px 0; color: #142943; font-size: 16px; line-height: 1.05;
  font-variant-numeric: tabular-nums; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap;
}
.live-settlement-kpis article.is-cash strong { color: #087451; }
.live-settlement-kpis article.is-credit strong { color: #946308; }
.live-settlement-kpis em { overflow: hidden; color: #75869a; font-size: 7px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.live-settlement-section-head { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 0 2px 7px; }
.live-settlement-section-head > span { display: flex; flex-direction: column; }
.live-settlement-section-head small { color: #075ec9; font-size: 7px; font-weight: 900; letter-spacing: .12em; }
.live-settlement-section-head h2 { margin: 1px 0 0; color: #142943; font-size: 17px; }
.live-settlement-section-head > em { color: #65788e; font-size: 8px; font-style: normal; }
.live-settlement-meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.live-settlement-meter {
  min-width: 0; padding: 6px; overflow: hidden; color: #fff;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(145deg, #123f7e, #082b59 55%, #061c3a);
  background-size: 20px 20px, 20px 20px, auto;
  border: 2px solid #8295a9; border-radius: 11px; box-shadow: inset 0 0 0 1px rgba(230,239,247,.15), 0 4px 11px rgba(7,27,55,.12);
}
.live-settlement-meter > header {
  display: flex; align-items: center; justify-content: space-between; gap: 7px; min-height: 31px;
  padding: 3px 6px; color: #17304e; background: linear-gradient(180deg, #f5f8fb, #dfe7ef);
  border: 1px solid #8295a9; border-radius: 6px; box-shadow: inset 0 1px 0 #fff;
}
.live-settlement-meter-face { display: flex; align-items: center; gap: 5px; min-width: 0; }
.live-settlement-meter-face > svg.i { width: 15px; height: 15px; color: #1766b8; }
.live-settlement-meter-face > span { display: flex; flex-direction: column; min-width: 0; }
.live-settlement-meter-face strong { font-size: 10px; line-height: 1; }
.live-settlement-meter-face small { color: #5c6f84; font-size: 6px; }
.live-settlement-meter > header > em { display: flex; align-items: center; gap: 4px; color: #087451; font-size: 7px; font-style: normal; font-weight: 850; }
.live-settlement-meter > header > em i { width: 6px; height: 6px; background: #22b67d; border-radius: 50%; }
.live-settlement-meter-display {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 5px; overflow: hidden;
  color: #172817; background: linear-gradient(145deg, #c7d3bd, #aebb9f); border: 3px solid #596953;
  border-radius: 7px; box-shadow: inset 0 2px 7px rgba(22,42,20,.2);
}
.live-settlement-meter-display > span { display: flex; flex-direction: column; min-width: 0; min-height: 47px; padding: 6px 7px; }
.live-settlement-meter-display > span:nth-child(2) { border-left: 1px solid rgba(25,42,23,.22); }
.live-settlement-meter-display > span.is-sold { grid-column: 1 / -1; min-height: 48px; border-top: 1px solid rgba(25,42,23,.22); }
.live-settlement-meter-display small { color: #263b25; font-size: 7px; font-weight: 900; letter-spacing: .055em; text-transform: uppercase; }
.live-settlement-meter-display strong {
  overflow: hidden; margin-top: auto; color: #172817; font: 850 15px/1 var(--mono);
  letter-spacing: -.045em; text-align: right; text-overflow: ellipsis; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255,255,255,.24);
}
.live-settlement-sold-values { display: flex; align-items: end; justify-content: space-between; gap: 6px; margin-top: auto; min-width: 0; }
.live-settlement-meter-display .live-settlement-sold-values > strong { min-width: 0; margin-top: 0; font-size: 18px; }
.live-settlement-meter-display .live-settlement-sold-values > strong.is-money { color: #102b16; font-size: 16px; }
.live-settlement-meter-display strong b { font: 850 7px/1 var(--font); letter-spacing: 0; }
.live-settlement-meter > footer { display: flex; justify-content: space-between; gap: 6px; padding: 5px 4px 0; color: #a9c0d8; font-size: 7px; }

.live-settlement-notice {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  margin: 0 0 9px; padding: 8px 10px; color: #825b09; background: #fff6dc; border: 1px solid #efd18b;
  border-radius: 9px; font-size: 8px;
}
.live-settlement-notice > svg.i { width: 16px; height: 16px; }
.live-settlement-notice span { display: flex; flex-direction: column; }
.live-settlement-notice a { color: #075ec9; font-weight: 850; text-decoration: none; }
.live-settlement-actions {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px;
  margin: 0 0 18px; padding: 9px; background: #fff; border: 1px solid #cbd8e6; border-left: 4px solid #1476ef;
  border-radius: 11px; box-shadow: 0 3px 10px rgba(15,42,74,.075);
}
.live-settlement-actions > div { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; }
.live-settlement-actions > div > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.live-settlement-actions small { color: #075ec9; font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.live-settlement-actions strong { color: #172b46; font-size: 12px; }
.live-settlement-actions em { color: #65788e; font-size: 8px; font-style: normal; }
.live-settlement-actions form { margin: 0; }
.live-settlement-actions button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 7px 12px;
  color: #fff; background: linear-gradient(180deg, #1f82f6, #0967d8); border: 1px solid #075fc8;
  border-radius: 8px; box-shadow: 0 2px 5px rgba(10,91,190,.19); font: inherit; font-size: 9px; font-weight: 850; cursor: pointer;
}
.live-settlement-actions button svg.i { width: 15px; height: 15px; }
.live-settlement-actions > a.live-settlement-close {
  grid-column: 1 / -1; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center; gap: 10px; min-height: 58px; padding: 8px 12px;
  color: #fff; background: linear-gradient(180deg, #c53b34, #a42520); border: 1px solid #8f1f1b;
  border-radius: 9px; box-shadow: 0 3px 9px rgba(143,31,27,.22), inset 0 1px 0 rgba(255,255,255,.17);
  text-decoration: none;
}
.live-settlement-actions > a.live-settlement-close:hover { background: linear-gradient(180deg, #d0443d, #ad2822); }
.live-settlement-close-icon {
  display: grid; place-items: center; width: 36px; height: 36px;
  background: rgba(91,9,7,.22); border: 1px solid rgba(255,255,255,.2); border-radius: 8px;
}
.live-settlement-close-icon svg.i { width: 18px; height: 18px; }
.live-settlement-close-copy { display: flex; flex-direction: column; min-width: 0; }
.live-settlement-close-copy small { color: #ffd6d3; font-size: 7px; font-weight: 900; letter-spacing: .11em; }
.live-settlement-close-copy strong { color: #fff; font-size: 13px; line-height: 1.15; }
.live-settlement-close-copy em { color: #ffe8e6; font-size: 8px; font-style: normal; }
.live-settlement-actions > a.live-settlement-close > svg.i { width: 18px; height: 18px; }

@media (min-width: 1100px) {
  .live-settlement-meters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .live-settlement-hero > header { min-height: 56px; padding: 8px 10px; }
  .live-settlement-hero-total > span { padding: 9px 10px; }
  .live-settlement-hero-total strong { font-size: 21px; }
  .live-settlement-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .live-settlement-kpis article { min-height: 64px; padding: 7px; }
  .live-settlement-kpis strong { font-size: 15px; }
  .live-settlement-meter-display > span { padding-right: 5px; padding-left: 5px; }
  .live-settlement-meter-display strong { font-size: 13px; }
  .live-settlement-meter-display .live-settlement-sold-values > strong { font-size: 16px; }
  .live-settlement-meter-display .live-settlement-sold-values > strong.is-money { font-size: 14px; }
  .live-settlement-actions { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 420px) {
  .live-settlement-hero-icon { width: 33px; height: 33px; }
  .live-settlement-hero > header { grid-template-columns: 34px minmax(0, 1fr); gap: 7px; }
  .live-settlement-state { grid-column: 1 / -1; justify-self: stretch; justify-content: center; min-height: 25px; }
  .live-settlement-hero-total strong { font-size: 18px; }
  .live-settlement-meters { gap: 6px; }
  .live-settlement-meter { padding: 5px; }
  .live-settlement-meter-display { grid-template-columns: minmax(0, 1fr); }
  .live-settlement-meter-display > span { min-height: 41px; }
  .live-settlement-meter-display > span:nth-child(2) { border-top: 1px solid rgba(25,42,23,.22); border-left: 0; }
  .live-settlement-meter-display > span.is-sold { grid-column: auto; }
  .live-settlement-sold-values { flex-direction: column; align-items: stretch; gap: 3px; }
  .live-settlement-meter-display .live-settlement-sold-values > strong { text-align: right; }
  .live-settlement-actions { grid-template-columns: minmax(0, 1fr); }
  .live-settlement-actions form, .live-settlement-actions button { width: 100%; }
}

/* 20. Centro de ayuda técnica ------------------------------------------------
   Manual interno, solo administrador. La página es usable sin internet y no
   incorpora controles que cambien el estado de los equipos. */
.help-page { max-width: 1500px; }
.help-hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: clamp(24px, 4vw, 64px); align-items: center; margin-bottom: var(--sp-5); padding: clamp(24px, 4vw, 48px);
  overflow: hidden; color: #d9eaff; border: 1px solid rgba(117,189,255,.22); border-radius: 20px;
  background:
    radial-gradient(circle at 92% 8%, rgba(53,120,185,.44), transparent 31%),
    radial-gradient(circle at 5% 100%, rgba(18,104,232,.27), transparent 38%),
    linear-gradient(135deg, #061b34, #0b315c);
  box-shadow: 0 16px 42px rgba(7,29,55,.14);
}
.help-hero::after {
  content: ""; position: absolute; top: -170px; right: -80px; width: 430px; height: 430px;
  border: 1px solid rgba(117,189,255,.13); border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 70px rgba(117,189,255,.035), 0 0 0 140px rgba(117,189,255,.025);
}
.help-hero-copy, .help-search-box { position: relative; z-index: 1; min-width: 0; }
.help-hero h1 { margin: 5px 0 8px; color: #fff; font-size: clamp(30px, 4vw, 45px); letter-spacing: -.04em; }
.help-hero-copy > p { max-width: 65ch; margin-bottom: 18px; color: #b9cee4; font-size: 16px; }
.help-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: #b9cee4; font-size: 12px; font-weight: 700; }
.help-meta span { display: inline-flex; align-items: center; gap: 6px; }
.help-meta svg.i { width: 16px; height: 16px; color: #75bdff; }
.help-search-box { padding: 20px; color: var(--ink); background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.7); border-radius: 15px; box-shadow: 0 14px 32px rgba(2,15,30,.2); }
.help-search-box > label { display: block; margin-bottom: 9px; color: #233b57; font-size: 14px; font-weight: 800; }
.help-search-control { position: relative; display: flex; align-items: center; }
.help-search-control > svg.i { position: absolute; left: 14px; z-index: 1; color: #567089; }
.help-search-control input { width: 100%; min-height: 52px; padding: 10px 48px 10px 45px; border: 1px solid var(--line-field); border-radius: 11px; background: #fff; }
.help-search-control button { position: absolute; right: 5px; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; color: var(--muted); background: transparent; border: 0; border-radius: 9px; cursor: pointer; }
.help-search-control button:hover { color: var(--ink); background: var(--surface-3); }
.help-search-control button svg.i { width: 18px; height: 18px; }
.help-search-status { min-height: 18px; margin: 8px 2px 0; color: var(--muted); font-size: 12px; }

.help-section-heading { align-items: end; }
.help-section-heading > div { display: flex; flex-direction: column; gap: 3px; }
.help-section-heading h2 { margin: 0; font-size: 23px; }
.help-issues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.help-issue {
  display: grid; grid-template-columns: 44px minmax(0,1fr) 18px; gap: 12px; align-items: center;
  min-height: 82px; padding: 13px 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-3); box-shadow: var(--sh-1); text-decoration: none; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.help-issue:hover { transform: translateY(-2px); border-color: var(--brand-line); box-shadow: var(--sh-2); }
.help-issue > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.help-issue strong { color: #18314d; font-size: 15px; }
.help-issue small { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.help-issue > svg.i { width: 17px; color: #6c8198; }
.help-issue-icon { display: grid; place-items: center; width: 44px; height: 44px; color: var(--brand); background: var(--brand-soft); border-radius: 12px; }
.help-issue-icon.warn { color: var(--warn); background: var(--warn-bg); }
.help-issue-icon.bad { color: var(--bad); background: var(--bad-bg); }
.help-issue-icon.ok { color: var(--ok); background: var(--ok-bg); }

.help-live-links {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin: 20px 0; padding: 14px 16px; color: #d8e8f8; background: linear-gradient(120deg, #0b2748, #0e3a67);
  border: 1px solid #214b72; border-radius: var(--r-3); box-shadow: var(--sh-1);
}
.help-live-copy { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.help-live-copy > div { display: flex; flex-direction: column; }
.help-live-copy strong { color: #fff; }
.help-live-copy small { color: #a9bfd5; font-size: 12px; }
.help-live-icon { display: grid; place-items: center; width: 40px; height: 40px; color: #75bdff; background: rgba(117,189,255,.11); border-radius: 11px; }
.help-live-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.help-live-actions .btn { color: #e6f2ff; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.24); }
.help-live-actions .btn:hover { background: rgba(255,255,255,.14); }

.help-risk { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px; margin: 0 0 var(--sp-5); padding: 15px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-3); }
.help-risk h2 { margin: 2px 0 0; font-size: 17px; }
.help-risk-items { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.help-risk-item { display: flex; align-items: center; gap: 8px; }
.help-risk-item > b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; }
.help-risk-item > span { display: flex; flex-direction: column; }
.help-risk-item strong { font-size: 12px; }
.help-risk-item small { color: var(--muted); font-size: 10px; }
.help-risk-item svg.i { width: 17px; height: 17px; }
.help-risk-item.safe > b { color: var(--ok); background: var(--ok-bg); }
.help-risk-item.state > b { color: var(--warn); background: var(--warn-bg); }
.help-risk-item.danger > b { color: var(--bad); background: var(--bad-bg); }

.help-layout { display: grid; grid-template-columns: 244px minmax(0,1fr); gap: 22px; align-items: start; }
.help-toc { position: sticky; top: calc(var(--topbar-h) + 18px); padding: 17px; }
.help-toc > strong { display: block; margin: 3px 0 12px; color: #18314d; font-size: 19px; }
.help-toc nav { display: flex; flex-direction: column; gap: 2px; }
.help-toc nav a { display: block; padding: 7px 9px; color: var(--ink-2); border-left: 2px solid transparent; font-size: 12px; font-weight: 650; line-height: 1.3; text-decoration: none; }
.help-toc nav a:hover { color: var(--brand-text); background: var(--brand-soft); border-left-color: var(--brand); }
.help-toc > p { margin: 13px 2px 0; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10px; line-height: 1.45; }
.help-manual { min-width: 0; }
.help-group[hidden], [data-help-entry][hidden] { display: none !important; }

.help-chapter { margin: 0 0 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1); scroll-margin-top: calc(var(--topbar-h) + 16px); }
.help-chapter > summary { display: grid; grid-template-columns: 44px minmax(0,1fr) 22px; gap: 13px; align-items: center; min-height: 76px; padding: 13px 17px; cursor: pointer; list-style: none; }
.help-chapter > summary::-webkit-details-marker { display: none; }
.help-chapter > summary:hover { background: var(--surface-2); }
.help-chapter > summary > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.help-chapter > summary strong { color: #18314d; font-size: 17px; }
.help-chapter > summary small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.help-chapter > summary > svg.i { color: #698097; transition: transform .18s ease; }
.help-chapter[open] > summary { background: linear-gradient(90deg, var(--brand-soft), #fff 75%); border-bottom: 1px solid var(--line); }
.help-chapter[open] > summary > svg.i { transform: rotate(180deg); }
.help-chapter-no { display: grid; place-items: center; width: 42px; height: 42px; color: #1268e8; background: #eaf3ff; border: 1px solid #cfe2fb; border-radius: 12px; font-family: var(--mono); font-size: 13px; font-weight: 800; }
.help-chapter-body { padding: 20px; }
.help-chapter-body > h3:first-child { margin-top: 0; }
.help-chapter-body h3 { margin-top: 22px; font-size: 16px; }
.help-chapter-body p, .help-chapter-body li { color: #35485e; }
.help-chapter-body code, .help-chapter-body .help-path span { font-family: var(--mono); }

.help-callout { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px; color: var(--info); background: var(--info-bg); border: 1px solid var(--info-line); border-radius: 10px; }
.help-callout svg.i { flex: none; width: 19px; height: 19px; margin-top: 1px; }
.help-callout p { margin: 0; color: inherit; font-size: 13px; }
.help-callout.warning { color: var(--warn); background: var(--warn-bg); border-color: var(--warn-line); }
.help-callout.danger { color: var(--bad); background: var(--bad-bg); border-color: var(--bad-line); }
.help-specs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; margin-bottom: 16px; }
.help-specs span { display: flex; flex-direction: column; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; }
.help-specs b { color: #153654; font-size: 18px; }
.help-specs small { color: var(--muted); font-size: 10px; }
.help-map-table td:first-child { display: flex; flex-direction: column; }
.help-map-table td:first-child small { color: var(--muted); font-family: var(--mono); font-size: 10px; }
.help-key-grid, .help-option-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.help-key-grid span, .help-option-grid span { display: flex; flex-direction: column; min-height: 65px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; }
.help-key-grid b, .help-option-grid b { color: #244763; font-family: var(--mono); }
.help-key-grid small, .help-option-grid small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.help-key-grid svg.i { color: var(--brand); }

.help-procedure { margin: 15px 0; padding: 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; scroll-margin-top: calc(var(--topbar-h) + 18px); }
.help-procedure:first-child { margin-top: 0; }
.help-procedure.featured { background: #fbfdff; border-color: #bcd7fb; box-shadow: inset 3px 0 0 var(--brand); }
.help-procedure-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.help-procedure-head h3 { margin: 0; color: #17344f; font-size: 17px; }
.help-level { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 3px 8px; border-radius: var(--r-pill); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.help-level svg.i { width: 13px; height: 13px; }
.help-level.safe { color: var(--ok); background: var(--ok-bg); }
.help-level.state { color: var(--warn); background: var(--warn-bg); }
.help-path { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 13px; }
.help-path span { padding: 5px 8px; color: #17446d; background: #eaf3ff; border: 1px solid #cfe2fb; border-radius: 7px; font-size: 11px; font-weight: 800; }
.help-path svg.i { width: 13px; height: 13px; color: #8193a6; }
.help-steps { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: help-step; }
.help-steps li { position: relative; display: flex; flex-direction: column; min-height: 43px; padding: 6px 8px 8px 40px; counter-increment: help-step; }
.help-steps li::before { content: counter(help-step); position: absolute; top: 5px; left: 0; display: grid; place-items: center; width: 27px; height: 27px; color: #fff; background: #1268e8; border-radius: 8px; font-family: var(--mono); font-size: 11px; font-weight: 800; }
.help-steps li + li { border-top: 1px solid var(--line); }
.help-steps b { color: #283f58; font-size: 13px; }
.help-steps span { color: var(--muted); font-size: 12px; }
.help-two-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.help-subcard { padding: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.help-subcard h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; }
.help-subcard h3 svg.i { color: var(--brand); }
.help-danger-list li::marker { color: var(--bad); }
.help-layers { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.help-layers li { display: flex; flex-direction: column; min-height: 90px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.help-layers b { color: #17466e; font-size: 12px; }
.help-layers span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.help-error-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.help-error-grid > div { padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; }
.help-error-grid p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.help-page-index { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 14px; border-top: 1px solid var(--line); }
.help-page-index span { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 9px; padding: 8px 3px; border-bottom: 1px solid var(--line); }
.help-page-index b { color: #17466e; font-family: var(--mono); font-size: 11px; }
.help-page-index small { color: var(--muted); font-size: 11px; }

.help-empty { margin: 28px auto; max-width: 620px; padding: 35px; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-3); }
.help-empty > svg.i { width: 38px; height: 38px; color: #7e92a8; }
.help-empty h2 { margin: 12px 0 7px; }
.help-empty p { color: var(--muted); }
.help-source { display: flex; align-items: flex-start; gap: 11px; margin-top: 20px; padding: 14px 16px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.help-source > span { display: grid; place-items: center; flex: none; width: 31px; height: 31px; color: var(--info); background: var(--info-bg); border-radius: 8px; }
.help-source svg.i { width: 17px; height: 17px; }
.help-source p { margin: 0; font-size: 11px; }

@media (max-width: 1100px) {
  .help-hero { grid-template-columns: 1fr; }
  .help-issues { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; }
  .help-toc nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .help-hero { margin: -6px -4px 18px; padding: 23px 17px; border-radius: 15px; }
  .help-hero::after { display: none; }
  .help-search-box { padding: 14px; }
  .help-issues { grid-template-columns: 1fr; }
  .help-issue { min-height: 72px; }
  .help-live-links { align-items: stretch; }
  .help-live-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .help-live-actions .btn { width: 100%; }
  .help-risk, .help-risk-items { align-items: stretch; flex-direction: column; }
  .help-toc nav { grid-template-columns: 1fr; }
  .help-chapter > summary { grid-template-columns: 38px minmax(0,1fr) 18px; gap: 9px; min-height: 68px; padding: 11px 12px; }
  .help-chapter-no { width: 36px; height: 36px; }
  .help-chapter > summary strong { font-size: 15px; }
  .help-chapter > summary small { font-size: 10px; }
  .help-chapter-body { padding: 14px; }
  .help-specs, .help-key-grid, .help-option-grid, .help-two-columns, .help-layers, .help-error-grid, .help-page-index { grid-template-columns: 1fr; }
  .help-specs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .help-layers li { min-height: 70px; }
}
@media print {
  .help-hero, .help-live-links, .help-risk, .help-toc, .help-empty { display: none !important; }
  .help-layout { display: block; }
  .help-chapter { break-inside: auto; }
  .help-chapter > summary { border-bottom: 1px solid #ccc; }
  .help-chapter-body { display: block !important; }
}

/* 21. Manual contextual de cada vista --------------------------------------
   Disponible para todos los roles; el contenido se filtra por permisos. */
.view-manual-page { max-width: 1380px; }
.view-manual-hero {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center;
  gap: 18px; margin-bottom: 20px; padding: 22px 24px; color: #dcecff;
  background:
    radial-gradient(circle at 92% 12%, rgba(39, 123, 207, .38), transparent 33%),
    linear-gradient(135deg, #071d37, #0b3765);
  border: 1px solid #1c4c78; border-radius: 17px; box-shadow: 0 12px 32px rgba(7, 29, 55, .14);
}
.view-manual-hero-icon {
  display: grid; place-items: center; width: 64px; height: 64px; color: #dff0ff;
  background: rgba(117, 189, 255, .14); border: 1px solid rgba(166, 211, 255, .22); border-radius: 16px;
}
.view-manual-hero-icon svg.i { width: 31px; height: 31px; }
.view-manual-hero-copy { min-width: 0; }
.view-manual-hero h1 { margin: 3px 0 5px; color: #fff; font-size: clamp(25px, 3vw, 35px); letter-spacing: -.035em; }
.view-manual-hero-copy > p { max-width: 78ch; margin: 0; color: #b9cee4; font-size: 14px; line-height: 1.5; }
.view-manual-audience { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; color: #93c9ff; font-size: 11px; font-weight: 750; }
.view-manual-audience svg.i { width: 15px; height: 15px; }
.view-manual-hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 7px; min-width: 170px; }
.view-manual-hero-actions .btn { justify-content: center; color: #eef7ff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.24); }
.view-manual-hero-actions .btn:hover { background: rgba(255,255,255,.16); }
.view-manual-hero-actions .view-manual-back { color: #082448; background: #fff; border-color: #fff; }
.view-manual-hero-actions .view-manual-back:hover { color: #fff; background: var(--brand); border-color: var(--brand); }

.view-manual-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.view-manual-index { position: sticky; top: calc(var(--topbar-h) + 16px); padding: 17px; }
.view-manual-index > strong { display: block; margin: 4px 0 12px; color: #17344f; font-size: 17px; }
.view-manual-index nav { display: flex; flex-direction: column; gap: 2px; }
.view-manual-index nav a { padding: 7px 8px; color: var(--ink-2); border-left: 2px solid transparent; font-size: 11.5px; font-weight: 680; line-height: 1.3; text-decoration: none; }
.view-manual-index nav a:hover { color: var(--brand-text); background: var(--brand-soft); border-left-color: var(--brand); }
.view-manual-index > p { margin: 13px 0 0; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 10.5px; line-height: 1.45; }
.view-manual-content { min-width: 0; }
.view-manual-section {
  margin-bottom: 13px; padding: 20px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--sh-1); scroll-margin-top: calc(var(--topbar-h) + 14px);
}
.view-manual-section > header { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: center; margin-bottom: 15px; }
.view-manual-section > header h2 { margin: 2px 0 0; color: #17344f; font-size: 20px; }
.view-manual-number {
  display: grid; place-items: center; width: 44px; height: 44px; color: #1268e8; background: #eaf3ff;
  border: 1px solid #cfe2fb; border-radius: 12px; font-family: var(--mono); font-size: 12px; font-weight: 850;
}
.view-manual-screen-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.view-manual-screen-grid article { display: grid; grid-template-columns: 29px minmax(0,1fr); gap: 9px; min-height: 100px; padding: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.view-manual-screen-grid article > span { display: grid; place-items: center; width: 27px; height: 27px; color: #fff; background: #315f8d; border-radius: 8px; font-family: var(--mono); font-size: 11px; font-weight: 800; }
.view-manual-screen-grid h3 { margin: 2px 0 4px; color: #25415d; font-size: 14px; }
.view-manual-screen-grid p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.45; }

.view-manual-checklist { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.view-manual-checklist li { display: flex; align-items: flex-start; gap: 9px; min-height: 48px; padding: 10px 12px; color: #344a60; background: #f7fafc; border: 1px solid var(--line); border-radius: 9px; font-size: 12.5px; line-height: 1.4; }
.view-manual-checklist svg.i { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ok); }
.view-manual-checklist.is-final li { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); font-weight: 680; }
.view-manual-intro { margin: -3px 0 14px 56px; color: var(--muted); font-size: 13px; }
.view-manual-steps { margin: 0; padding: 0; list-style: none; }
.view-manual-steps li { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 11px; align-items: start; padding: 10px 5px; }
.view-manual-steps li + li { border-top: 1px solid var(--line); }
.view-manual-step-no { display: grid; place-items: center; width: 32px; height: 32px; color: #fff; background: linear-gradient(180deg, #1974ec, #0d5fcf); border-radius: 9px; font-family: var(--mono); font-size: 12px; font-weight: 850; box-shadow: 0 3px 8px rgba(18,104,232,.17); }
.view-manual-steps h3 { margin: 1px 0 3px; color: #273f58; font-size: 14px; }
.view-manual-steps p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.48; }
.view-manual-result { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0 48px; padding: 11px 13px; color: var(--ok); background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: 9px; }
.view-manual-result svg.i { flex: none; width: 19px; height: 19px; margin-top: 1px; }
.view-manual-result p { display: flex; flex-direction: column; margin: 0; font-size: 12px; }
.view-manual-result span { margin-top: 2px; color: #2d654f; }

.view-manual-rules { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.view-manual-rules article { display: flex; align-items: flex-start; gap: 9px; min-height: 54px; padding: 11px 12px; color: #6f5008; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 9px; }
.view-manual-rules svg.i { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.view-manual-rules p { margin: 0; color: inherit; font-size: 12px; line-height: 1.42; }
.view-manual-related { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.view-manual-related > strong { color: #2d435a; font-size: 12px; }
.view-manual-related > div { display: flex; flex-wrap: wrap; gap: 6px; }
.view-manual-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0 24px; }
.view-manual-bottom > span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.view-manual-bottom > span svg.i { width: 16px; height: 16px; }

.login-view-help {
  position: absolute; top: 16px; right: 18px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 11px; color: var(--brand-text); background: #eef6ff; border: 1px solid #c9def9;
  border-radius: 10px; font-size: 12px; font-weight: 800; text-decoration: none;
}
.login-view-help:hover { color: #fff; background: var(--brand); border-color: var(--brand); }
.login-view-help svg.i { width: 17px; height: 17px; }

@media (max-width: 1100px) {
  .view-manual-layout { grid-template-columns: 1fr; }
  .view-manual-index { position: static; }
  .view-manual-index nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .topbar-help span { display: none; }
  .topbar-help { width: 42px; padding: 0; }
  .view-manual-hero { grid-template-columns: 48px minmax(0,1fr); gap: 11px; padding: 17px; }
  .view-manual-hero-icon { width: 48px; height: 48px; border-radius: 12px; }
  .view-manual-hero-icon svg.i { width: 24px; height: 24px; }
  .view-manual-hero-actions { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); min-width: 0; }
  .view-manual-screen-grid, .view-manual-checklist, .view-manual-rules { grid-template-columns: 1fr; }
  .view-manual-section { padding: 15px; }
  .view-manual-intro { margin-left: 0; }
  .view-manual-result { margin-left: 0; }
}
@media (max-width: 480px) {
  .view-manual-index nav { grid-template-columns: 1fr; }
  .view-manual-hero-actions { grid-template-columns: 1fr; }
  .view-manual-section > header { grid-template-columns: 38px minmax(0,1fr); gap: 9px; }
  .view-manual-number { width: 38px; height: 38px; }
  .view-manual-section > header h2 { font-size: 17px; }
}
@media print {
  .view-manual-hero-actions, .view-manual-index, .view-manual-bottom, .topbar-help { display: none !important; }
  .view-manual-layout { display: block; }
  .view-manual-hero { color: #000; background: #fff; border-color: #bbb; box-shadow: none; }
  .view-manual-hero h1, .view-manual-hero-copy > p, .view-manual-audience { color: #000; }
  .view-manual-section { break-inside: avoid; box-shadow: none; }
}

/* Panel administrativo. Componentes de la estación, con ilustración del surtidor. */
.overview-page { max-width: 1600px; width: 100%; margin-inline: auto; }
.ov-page-heading, .ov-page-actions, .ov-date-toolbar, .ov-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ov-page-heading { margin-bottom: 20px; }
.ov-page-heading .eyebrow { font-size: 10px; letter-spacing: .12em; }
.ov-page-heading h1 { margin: 6px 0 0; font-size: clamp(25px, 2.5vw, 34px); letter-spacing: -.04em; }
.ov-page-actions { justify-content: end; gap: 8px; }
.ov-page-actions .btn { min-height: 40px; font-size: 12px; }
.ov-date-toolbar { margin: 0 0 14px; font-size: 12px; }
.ov-date-toolbar > div { display: flex; align-items: center; gap: 12px; }
.ov-scope-label { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.ov-scope-label::before { content: ''; width: 7px; height: 7px; background: var(--brand); border-radius: 50%; }
.ov-day-form { display: flex; align-items: center; gap: 8px; }
.ov-day-form label { color: var(--muted); font-size: 12px; }
.ov-day-form input { width: 152px; min-height: 36px; padding: 6px 10px; border-color: #d3deeb; font-size: 12px; border-radius: 8px; background: #fff; }
.ov-day-form .icon-btn { width: 34px; height: 34px; color: var(--brand-text); border: 1px solid #d3deeb; background: #fff; border-radius: 8px; }
.ov-summary { display: grid; grid-template-columns: 1fr auto; position: relative; overflow: hidden; border-radius: 18px; color: #fff; background: linear-gradient(115deg, #091e3c 0%, #143a72 74%, #18539c 100%); box-shadow: 0 8px 20px #0b2c5512; }
.ov-summary-main { padding: 26px 30px 22px; position: relative; z-index: 1; }
.ov-hero-label { display: flex; align-items: center; gap: 14px; color: #b7d0f1; font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.ov-hero-label > span { padding: 4px 8px; border-radius: 5px; background: #ffffff12; color: #d6e6ff; letter-spacing: .025em; font-size: 10px; }
.ov-summary-main > strong { display: block; margin-top: 10px; font-size: clamp(35px, 3.5vw, 48px); line-height: 1.15; font-weight: 750; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.ov-summary-meta { display: flex; align-items: center; gap: 22px; margin-top: 12px; color: #d0e0f5; font-size: 12px; }
.ov-summary-meta > span { display: inline-flex; align-items: center; gap: 7px; }
.ov-summary-meta svg.i { width: 15px; height: 15px; color: #84b9ff; }
.ov-summary-right { align-self: stretch; display: flex; flex-direction: column; align-items: end; justify-content: space-between; padding: 24px 30px 22px; min-width: 240px; position: relative; }
.ov-summary-right::before { content: ''; position: absolute; width: 250px; height: 250px; border: 1px solid #ffffff0e; border-radius: 50%; right: -50px; top: -40px; pointer-events: none; }
.ov-hero-update { display: flex; align-items: center; gap: 6px; color: #c5dcfc; font-size: 11px; }
.ov-hero-update svg.i { width: 13px; height: 13px; }
.ov-identity { display: grid; grid-template-columns: 1fr auto; gap: 3px 18px; align-items: center; min-width: 220px; padding-top: 17px; }
.ov-identity > span { display: flex; align-items: center; gap: 7px; color: #dbe9fb; font-size: 12px; }
.ov-identity svg.i { width: 16px; height: 16px; color: #89baff; }
.ov-identity > strong { grid-column: 2; grid-row: 1 / 3; font-size: 32px; color: #fff; font-weight: 650; }
.ov-identity > small { color: #a6c5ed; font-size: 11px; padding-left: 23px; }
.ov-payments { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid #ffffff14; padding: 15px 30px; background: #00000012; }
.ov-payments > div { display: flex; align-items: center; gap: 15px; padding: 0 22px; border-left: 1px solid #ffffff1a; }
.ov-payments > div:first-child { padding-left: 0; border-left: 0; }
.ov-payments dt { display: flex; align-items: center; gap: 7px; color: #adcaec; font-size: 11px; }
.ov-payments dt svg.i { width: 14px; height: 14px; }
.ov-payments dd { color: #f4f8ff; font-size: 14px; font-weight: 700; margin: 0 0 0 auto; font-variant-numeric: tabular-nums; }
.ov-section-heading { margin: 22px 0 12px; }
.ov-section-heading h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.025em; }
.ov-section-heading > div > span, .ov-section-caption { color: var(--muted); font-size: 11px; }
.ov-section-caption { white-space: nowrap; }
.ov-dispenser-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ov-dispenser-card { overflow: hidden; background: #fff; border: 1px solid #d9e3f0; border-radius: 16px; box-shadow: 0 4px 12px #0b284b06; }
.ov-dispenser-card > header { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; gap: 10px; border-bottom: 1px solid #ecf0f6; }
.ov-dispenser-label { display: flex; align-items: center; gap: 9px; }
.ov-dispenser-label > span { display: grid; place-items: center; width: 30px; height: 30px; background: #edf4ff; border: 1px solid #dbe9ff; color: var(--brand-text); font-size: 12px; font-weight: 800; border-radius: 9px; }
.ov-dispenser-label > strong { font-size: 16px; }
.ov-dispenser-card header .chip { font-size: 10px; min-height: 25px; gap: 5px; }
.ov-dispenser-card header .dot { width: 6px; height: 6px; background: currentColor; }
.ov-dispenser-body { display: grid; grid-template-columns: 154px minmax(0, 1fr); align-items: center; gap: 14px; padding: 18px 22px 14px; }
.ov-pump-figure { position: relative; display: grid; place-items: center; min-height: 180px; border-radius: 14px; background: radial-gradient(ellipse at center, #eaf1fe 0%, #f7faff 55%, #fff 73%); }
.ov-pump-art { display: block; width: 154px; height: auto; overflow: visible; }
.ov-art-brand { font: 800 13px var(--font); letter-spacing: 1px; fill: #253a59; }
.ov-art-number { font: 800 23px var(--font); fill: #173564; text-anchor: middle; }
.ov-art-label { font: 750 9px var(--font); letter-spacing: .8px; fill: #3d4f34; }
.ov-art-caption { font: 700 9px var(--font); letter-spacing: 1.1px; fill: #e7efff; text-anchor: middle; }
.ov-art-footer { font: 700 12px var(--font); fill: #93b2eb; text-anchor: end; letter-spacing: 1px; }
.ov-segment { fill: #aebba1; }
.ov-segment.on { fill: #344a31; }
.ov-person { display: flex; align-items: center; gap: 9px; }
.ov-person .avatar { flex: none; width: 31px; height: 31px; border-radius: 9px; background: #eaf2ff; border: 1px solid #d7e6ff; color: var(--brand-text); font-size: 11px; }
.ov-mini-label { display: block; font-size: 9px; font-weight: 750; letter-spacing: .09em; color: #6f8099; }
.ov-person h3 { margin: 3px 0 0; font-size: 14px; line-height: 1.4; color: #19314d; overflow-wrap: anywhere; }
.ov-shift-time { display: flex; align-items: center; gap: 5px; color: #71819a; font-size: 11px; margin: 9px 0 19px; }
.ov-shift-time svg.i { width: 12px; height: 12px; }
.ov-total-label { margin-bottom: 5px; }
.ov-dispenser-total { display: block; font-size: clamp(26px, 2.3vw, 35px); line-height: 1.15; color: #122b4c; font-weight: 750; letter-spacing: -.045em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ov-shift-numbers { display: flex; align-items: center; gap: 15px; margin-top: 8px; font-size: 11px; color: #78879c; }
.ov-shift-numbers strong { color: #405674; font-weight: 700; }
.ov-hose-list { border-top: 1px solid #ecf0f6; margin: 0 20px; }
.ov-hose-caption { display: flex; justify-content: space-between; padding: 11px 0 3px; font-size: 8px; font-weight: 750; letter-spacing: .075em; color: #7a8ba4; }
.ov-hose-row { display: flex; align-items: center; gap: 9px; padding: 10px 0; }
.ov-hose-row + .ov-hose-row { border-top: 1px solid #f0f3f8; }
.ov-hose-number { display: flex; align-items: center; gap: 4px; padding: 6px; color: #a77b10; background: #fff8e8; border-radius: 7px; font-size: 10px; font-weight: 750; }
.ov-hose-number svg.i { width: 13px; height: 13px; }
.ov-hose-info { min-width: 0; }
.ov-hose-info > strong { display: block; font-size: 12px; color: #304866; font-weight: 650; }
.ov-hose-info > small { display: block; color: #7a899e; font-size: 10px; margin-top: 2px; }
.ov-hose-amount { margin-left: auto; color: #1e3b62; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ov-dispenser-card > footer { display: flex; align-items: center; justify-content: space-between; padding: 11px 20px; background: #f8faff; border-top: 1px solid #eaf0f8; font-size: 10px; }
.ov-dispenser-card > footer > span { color: #8190a4; }
.ov-dispenser-card > footer > a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-weight: 700; }
.ov-dispenser-card > footer svg.i { width: 13px; height: 13px; }
.ov-review-note { display: flex; align-items: center; gap: 8px; margin-top: 13px; padding: 11px 14px; border: 1px solid #f0e2c1; border-radius: 9px; color: #8b681f; background: #fffcf4; }
.ov-review-note > svg.i { flex: none; width: 15px; height: 15px; }
.ov-review-note > strong { font-size: 11px; font-weight: 650; white-space: nowrap; }
.ov-review-note > span { margin-left: auto; color: #9b8860; font-size: 10px; }
.ov-view-all { display: flex; align-items: center; gap: 4px; color: var(--brand-text); text-decoration: none; font-size: 11px; font-weight: 700; }
.ov-view-all svg.i { width: 14px; height: 14px; }
.overview-table-wrap { overflow-x: auto; background: #fff; border: 1px solid #dce5f0; border-radius: 13px; }
.overview-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.overview-table thead { background: #f7f9fd; }
.overview-table th { padding: 12px 16px; color: #718198; text-align: left; white-space: nowrap; font-size: 10px; font-weight: 700; }
.overview-table td { padding: 12px 16px; border-top: 1px solid #f0f3f8; vertical-align: middle; }
.overview-table td small { display: block; margin-top: 3px; color: #8b97a9; font-size: 10px; }
.overview-table .num { text-align: right; }
.overview-table .num > strong { color: #1b3b66; }
.overview-table tbody tr:hover { background: #fafcff; }
.overview-plate { font-size: 12px; letter-spacing: .03em; }
.overview-unidentified { color: #7d8a9c; font-size: 10px; }
.overview-empty { padding: 30px !important; text-align: center; color: var(--muted); }
.overview-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; font-size: 11px; }
.overview-pagination > div { display: flex; gap: 8px; }
.overview-note { color: var(--muted); font-size: 11px; margin-top: 14px; }
.overview-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding: 18px; background: #fff; border: 1px solid #dce5f0; border-radius: 13px; margin: 0 0 18px; }
.overview-filters label { display: grid; gap: 6px; flex: 1 1 160px; font-size: 12px; font-weight: 650; }
.overview-filters input, .overview-filters select { width: 100%; min-width: 0; }
.ov-search-filters .ov-search-field { flex: 3 1 340px; }
.ov-search-help { flex: 1 0 100%; margin: 0; color: #61718a; font-size: 12px; }
.ov-sale-internal { display: block; margin-top: 5px; color: #263e5b; font-size: 13px; font-weight: 650; }
@media (min-width: 1001px) and (max-width: 1250px) { .ov-dispenser-body { grid-template-columns: 105px minmax(0, 1fr); gap: 10px; padding-inline: 14px; } .ov-pump-art { width: 105px; } .ov-person .avatar { display: none; } .ov-dispenser-total { font-size: 27px; } }
@media (max-width: 760px) { .ov-dispenser-grid { grid-template-columns: 1fr; } .ov-summary-main { padding: 22px; } .ov-summary-right { padding: 22px; min-width: 200px; } .ov-summary-main > strong { font-size: 34px; } .ov-payments { padding: 14px 22px; } .ov-payments > div { padding-inline: 12px; flex-direction: column; align-items: start; gap: 5px; } .ov-payments dd { margin: 0; } .ov-page-heading { align-items: start; } .ov-page-actions .btn { min-width: 36px; padding: 8px; font-size: 10px; } .ov-review-note { flex-wrap: wrap; } .ov-review-note > span { width: 100%; margin-left: 23px; } }
@media (max-width: 540px) { .ov-page-heading { flex-wrap: wrap; gap: 12px; } .ov-page-actions { width: 100%; justify-content: start; } .ov-date-toolbar { align-items: start; gap: 10px; flex-wrap: wrap; } .ov-date-toolbar > div { gap: 8px; } .ov-day-form { width: 100%; } .ov-day-form input { flex: 1; } .ov-summary { grid-template-columns: 1fr; } .ov-summary-main { padding: 22px 20px 15px; } .ov-summary-right { padding: 0 20px 16px; align-items: start; gap: 13px; } .ov-identity { display: none; } .ov-hero-update { font-size: 10px; } .ov-payments { padding: 13px 20px; } .ov-payments dd { font-size: 12px; } .ov-dispenser-body { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding-inline: 14px; } .ov-pump-art { width: 110px; } .ov-dispenser-total { font-size: 29px; } .ov-shift-numbers { flex-wrap: wrap; gap: 5px 12px; } .ov-section-heading { align-items: start; } .ov-section-heading h2 { font-size: 17px; } .ov-section-heading > div > span { font-size: 10px; } .ov-view-all { font-size: 10px; white-space: nowrap; } .overview-pagination { flex-wrap: wrap; } }
.ov-movement-summary { display: flex; align-items: center; gap: 26px; padding: 18px 22px; background: #fff; border: 1px solid #dce5f0; border-radius: 13px; }
.ov-movement-summary > div > span { display: block; color: #718198; font-size: 11px; }
.ov-movement-summary > div > strong { display: block; margin-top: 4px; font-size: 28px; color: #153d73; letter-spacing: -.035em; }
.ov-movement-summary > p { margin: 0; color: #526782; font-size: 12px; line-height: 1.8; }
.ov-movement-summary small { color: #8695a8; font-size: 11px; }

/* El administrador usa el mismo tablero de cara que Mi turno. */
.ov-face-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.ov-face-group { min-width: 0; }
.ov-face-group-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 15px; margin-bottom: 10px; background: #fff; border: 1px solid #d9e3f0; border-radius: 12px; }
.ov-face-group-head > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ov-face-group-head > div:last-child { text-align: right; flex: none; }
.ov-face-group-head strong { color: #193b66; font-size: 15px; }
.ov-face-group-head span { color: #718198; font-size: 10px; }
.ov-face-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.ov-face-grid .shift-console-face > span { display: none; }
.ov-face-grid .shift-console-face > strong { font-size: 14px; }
.ov-face-grid .shift-console-face > small { font-size: 7px; }
.ov-face-grid .shift-console-state { font-size: 7px; }
.ov-face-grid .shift-console-foot { font-size: 6px; }
.ov-face-grid .shift-console-anim { display: none; }
.ov-face-group-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 4px 0; color: #718198; font-size: 10px; }
.ov-face-group-footer a { display: flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }
.ov-face-group-footer svg.i { width: 13px; height: 13px; }
@media (max-width: 1200px) and (min-width: 1001px) { .ov-face-groups { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .ov-face-groups { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .ov-face-grid { grid-template-columns: 1fr; } .ov-face-group-head { align-items: start; } .ov-face-group-head span { font-size: 9px; } }

/* Administración: resumen, historial y ficha de venta comparten la misma jerarquía. */
.ov-dashboard, .ov-sale-page { --ov-ink: #142f50; --ov-muted: #708199; --ov-line: #e1e8f1; --ov-blue: #1858a5; }
.ov-kpis { display: grid; grid-template-columns: 1.65fr 1fr 1fr; gap: 16px; margin-bottom: 26px; }
.ov-kpi-primary, .ov-kpi { min-width: 0; border-radius: 15px; border: 1px solid var(--ov-line); }
.ov-kpi-primary { padding: 23px 25px 20px; color: #fff; background: linear-gradient(115deg,#102d51,#17477b); border-color: #173f6e; box-shadow: 0 6px 15px #1237610c; }
.ov-kpi-label { display: block; color: var(--ov-muted); font-size: 12px; font-weight: 600; }
.ov-kpi-primary > .ov-kpi-label { color: #d0def0; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ov-kpi-primary .ov-kpi-label small { color: #b3cce6; font-size: 11px; font-weight: 500; }
.ov-kpi-primary > strong { display: block; font-size: clamp(28px,3vw,40px); line-height: 1.25; letter-spacing: -.045em; font-weight: 750; margin-top: 10px; font-variant-numeric: tabular-nums; }
.ov-kpi-payments { display: flex; gap: 22px; border-top: 1px solid #ffffff1c; padding-top: 14px; margin-top: 16px; }
.ov-kpi-payments > span { color: #b8cde5; font-size: 11px; }
.ov-kpi-payments b { display: block; color: #fff; font-size: 12px; margin-top: 4px; font-weight: 600; }
.ov-kpi { position: relative; background: #fff; padding: 26px 22px 20px; display: flex; flex-direction: column; justify-content: center; }
.ov-kpi-icon { position: absolute; top: 20px; right: 18px; display: grid; place-items: center; width: 30px; height: 30px; background: #f1f6fc; color: #5d82af; border-radius: 9px; }
.ov-kpi-icon svg.i { width: 17px; height: 17px; }
.ov-kpi > .ov-kpi-label { margin-top: 20px; }
.ov-kpi > strong { font-size: clamp(24px,2.3vw,32px); color: var(--ov-ink); letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin: 9px 0; line-height: 1.3; }
.ov-kpi > strong small { font-size: 14px; font-weight: 500; color: var(--ov-muted); margin-left: 6px; letter-spacing: 0; }
.ov-kpi-foot { font-size: 12px; color: var(--ov-muted); }
.ov-section-heading { margin-top: 26px; margin-bottom: 15px; }
.ov-section-heading h2 { font-size: 20px; color: var(--ov-ink); }
.ov-section-heading > div > span, .ov-section-caption { font-size: 12px; }
.ov-section-caption { display: inline-flex; align-items: center; gap: 6px; }
.ov-section-caption svg.i { width: 13px; height: 13px; }
.ov-face-group-head { padding: 15px; gap: 10px; min-height: 76px; box-shadow: 0 2px 5px #15345103; }
.ov-face-group-head > div:nth-child(2) { flex: 1; }
.ov-face-group-head .ov-attendant-name { font-size: 12px; line-height: 1.4; color: #263e5b; }
.ov-face-group-head > div:last-child > strong { font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.ov-face-group-head span { font-size: 11px; }
.ov-attendant-avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: none; border-radius: 10px; border: 1px solid #e2ebf6; background: #eff5fc; color: #4d76aa; }
.ov-attendant-avatar svg.i { width: 18px; height: 18px; }
.ov-face-group-footer { font-size: 12px; padding-block: 12px 0; }
.ov-ledger { background: #fff; border: 1px solid var(--ov-line); border-radius: 15px; overflow: hidden; box-shadow: 0 3px 9px #142f5003; }
.ov-sales-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ov-sales-table thead { background: #f8fafc; }
.ov-sales-table th { padding: 15px 18px; text-align: left; color: #61718a; font-size: 12px; font-weight: 650; border-bottom: 1px solid var(--ov-line); }
.ov-sales-table th.num { text-align: right; }
.ov-sales-table td { padding: 17px 18px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.ov-sales-table tr:last-child td { border-bottom: 0; }
.ov-sales-table tbody tr { transition: background .15s; }
.ov-sales-table tbody tr:hover, .ov-sales-table tbody tr:focus-within { background: #f7faff; }
.ov-sales-table td small { display: block; font-size: 12px; color: var(--ov-muted); line-height: 1.5; margin-top: 5px; }
.ov-sale-ref a { display: flex; align-items: center; gap: 12px; color: var(--ov-ink); text-decoration: none; white-space: nowrap; }
.ov-sale-ref a:hover strong { color: var(--ov-blue); text-decoration: underline; text-underline-offset: 3px; }
.ov-sale-ref strong { font-size: 14px; font-weight: 700; }
.ov-sale-ref small { font-size: 12px !important; }
.ov-sale-ref small > span { color: #8a96a6; }
.ov-receipt-icon { display: grid; place-items: center; width: 38px; height: 42px; flex: none; border-radius: 9px; background: #f0f5fc; border: 1px solid #e5edf8; color: #4c78af; }
.ov-receipt-icon svg.i { width: 19px; height: 19px; }
.ov-sale-operator > div { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ov-face-tag { display: inline-flex; padding: 3px 7px; background: #ecf2fa; color: #315b89; border-radius: 5px; font-size: 11px; font-weight: 700; }
.ov-pump-caption { color: #5f7188; font-size: 11px; }
.ov-sale-operator > small { font-size: 12px !important; color: #5d718b !important; max-width: 180px; }
.ov-license { display: inline-block; font: 750 13px var(--font); letter-spacing: .07em; color: #263952; border: 1px solid #dfd7b5; background: #fffbed; padding: 4px 8px; border-radius: 5px; }
.ov-no-vehicle { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #536780; white-space: nowrap; }
.ov-no-vehicle svg.i { width: 13px; height: 13px; color: #93a2b5; }
.ov-pay-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 6px; color: #52667e; background: #f1f4f8; font-size: 11px; line-height: 1.3; font-weight: 600; white-space: nowrap; }
.ov-pay-chip svg.i { width: 13px; height: 13px; }
.ov-pay-chip.is-credito { color: #7055a3; background: #f1edfa; }
.ov-pay-chip.is-tarjeta { color: #33669c; background: #eaf3ff; }
.ov-sale-value { text-align: right; white-space: nowrap; }
.ov-sale-value > strong { color: #16395e; font-size: 18px; font-weight: 750; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.ov-sale-value > small { color: #5c718c !important; font-variant-numeric: tabular-nums; }
.ov-unit-price { color: #6f8096; font-size: 11px; }
.ov-sale-open { width: 48px; padding-left: 0 !important; }
.ov-sale-open a { display: grid; place-items: center; border: 1px solid #dce6f3; width: 30px; height: 30px; border-radius: 8px; color: #416b9e; background: #fff; }
.ov-sale-open a:hover { background: #eaf2ff; border-color: #b4ccec; }
.ov-sale-open svg.i { width: 15px; height: 15px; }
.ov-ledger-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--ov-line); background: #fcfdff; color: #8190a4; font-size: 11px; }
.ov-ledger-footer a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-weight: 650; color: #32649e; }
.ov-ledger-footer svg.i { width: 13px; height: 13px; }
.ov-sales-table a:focus-visible, .ov-record-navigation a:focus-visible { outline: 3px solid #7cb1f3; outline-offset: 4px; border-radius: 5px; }
@media (max-width: 1250px) { .ov-sales-table td, .ov-sales-table th { padding-inline: 12px; } .ov-unit-price { display: none; } .ov-receipt-icon { display: none; } .ov-kpi-payments { gap: 14px; } .ov-attendant-avatar { display: none; } }
@media (max-width: 1000px) { .ov-kpis { gap: 12px; } }
@media (max-width: 800px) {
  .ov-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ov-kpi-primary { grid-column: 1 / -1; }
  .ov-kpi { padding: 20px; }
  .ov-kpi > .ov-kpi-label { margin-top: 12px; }
  .ov-kpi > strong { font-size: 27px; }
  .ov-kpi-icon { top: 12px; right: 12px; width: 25px; height: 25px; }
  .ov-sales-table, .ov-sales-table tbody { display: block; }
  .ov-sales-table thead { display: none; }
  .ov-sales-table tr { display: grid; grid-template-columns: minmax(0,1fr) auto 28px; padding: 17px; gap: 12px 10px; border-bottom: 1px solid #e9eef5; align-items: center; }
  .ov-sales-table td { padding: 0 !important; border: 0; min-width: 0; }
  .ov-sales-table td.ov-sale-ref { grid-column: 1; grid-row: 1; }
  .ov-sale-ref strong { font-size: 15px; }
  .ov-sales-table td.ov-sale-value { grid-column: 2; grid-row: 1; }
  .ov-sales-table td.ov-sale-open { grid-column: 3; grid-row: 1; width: auto; }
  .ov-sale-value > strong { font-size: 17px; }
  .ov-sales-table td.ov-sale-operator { grid-column: 1 / 3; grid-row: 2; padding-top: 10px !important; border-top: 1px dashed #edf1f6; }
  .ov-sale-operator > small { max-width: none; }
  .ov-sales-table td.ov-sale-payment { grid-column: 2 / 4; grid-row: 3; justify-self: end; }
  .ov-sales-table td.ov-sale-vehicle { grid-column: 1; grid-row: 3; }
  .ov-ledger-footer { flex-wrap: wrap; font-size: 10px; }
  .ov-no-vehicle { font-size: 11px; }
  .ov-sales-table td[colspan] { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
  .ov-kpi-primary { padding: 20px; }
  .ov-kpi-primary > strong { font-size: 36px; }
  .ov-kpi > .ov-kpi-label { font-size: 11px; }
  .ov-kpi { padding: 19px 14px; }
  .ov-kpi-foot { font-size: 10px; }
  .ov-section-heading { gap: 10px; }
  .ov-section-heading h2 { font-size: 18px; }
  .ov-section-heading > div > span { font-size: 11px; }
  .ov-section-caption { font-size: 10px; }
  .ov-face-group-head .ov-attendant-name { font-size: 11px; }
  .ov-face-group-head > div:last-child > strong { font-size: 16px; }
  .ov-face-group-footer { font-size: 11px; }

}
@media (prefers-reduced-motion: reduce) { .ov-sales-table tbody tr { transition: none; } }
.ov-sale-open { width: 94px; }
.ov-sale-open a { display: flex; align-items: center; gap: 4px; width: fit-content; padding: 0 8px; text-decoration: none; font-size: 11px; font-weight: 600; }
@media (max-width: 800px) { .ov-sale-open a > span { display: none; } .ov-sale-open a { width: 30px; padding: 0; justify-content: center; } }


/* Comprobante administrativo: una hoja, con lectura de tiquete y datos reales. */
.ticket-page { max-width: 760px; }
.ticket-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 22px; font-size: 13px; }
.ticket-toolbar a { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; color: #50647c; padding: 7px 0; }
.ticket-toolbar > span { display: flex; align-items: center; gap: 20px; }
.ticket-toolbar svg.i { width: 15px; height: 15px; }
.ticket-toolbar a:hover { color: #0a4fb9; }
.ticket-toolbar a:focus-visible, .ticket-trace summary:focus-visible { outline: 3px solid #7cb1f3; outline-offset: 4px; border-radius: 3px; }
.dispatch-ticket { width: 100%; max-width: 650px; margin: 0 auto; padding: 32px 38px 20px; color: #252d37; background: #fff; border: 1px solid #dfe3e8; border-top: 3px solid #25394e; border-radius: 2px; box-shadow: 0 4px 16px #182f4908; font: 14px/1.6 var(--mono); }
.ticket-brand { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ticket-brand img { width: 68px; height: 47px; object-fit: contain; filter: brightness(0); opacity: .85; margin-bottom: 11px; }
.ticket-brand > strong { font: 750 19px/1.3 var(--font); letter-spacing: .12em; color: #202a35; }
.ticket-brand > span { font-size: 12px; margin-top: 5px; color: #68727f; }
.ticket-brand > p { margin: 18px 0 0; color: #3a4552; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; }
.ticket-reference { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 0 15px; margin-top: 5px; border-bottom: 1px dashed #cbd1d9; }
.ticket-reference h1 { margin: 0; font: 700 17px/1.5 var(--mono); letter-spacing: -.035em; color: #242e3b; }
.ticket-status { display: inline-flex; align-items: center; gap: 4px; color: #4b6a5c; font: 500 11px/1.5 var(--font); white-space: nowrap; }
.ticket-status svg.i { width: 13px; height: 13px; }
.ticket-status.is-review { color: #946723; }
.ticket-fields { margin: 0; display: grid; gap: 9px; }
.ticket-fields > div { display: grid; grid-template-columns: 132px minmax(0,1fr); gap: 16px; align-items: baseline; }
.ticket-fields dt { font-weight: 400; color: #737c87; font-size: 12px; }
.ticket-fields dd { margin: 0; text-align: right; color: #2b3542; overflow-wrap: anywhere; font-size: 13px; }
.ticket-fields dd small { display: block; color: #76808c; font-size: 11px; margin-top: 3px; }
.ticket-operation { padding: 19px 0 21px; }
.ticket-operation > div:nth-child(3) dd { font-weight: 600; }
.ticket-product { border-block: 1px dashed #cbd1d9; padding: 15px 0; }
.ticket-product table { border-collapse: collapse; width: 100%; font-size: 13px; }
.ticket-product th { padding: 0 0 10px 12px; text-align: right; color: #737c87; font-size: 11px; font-weight: 400; white-space: nowrap; }
.ticket-product td { padding: 2px 0 0 12px; text-align: right; font-weight: 500; white-space: nowrap; }
.ticket-product th:first-child, .ticket-product td:first-child { padding-left: 0; text-align: left; }
.ticket-total { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 0 15px; }
.ticket-total > span { font: 650 13px/1.6 var(--font); color: #3b4755; }
.ticket-total small { display: block; color: #8a929c; font-size: 10px; font-weight: 400; margin-top: 3px; }
.ticket-total > strong { font-size: clamp(25px,3vw,32px); font-weight: 700; line-height: 1.25; letter-spacing: -.045em; white-space: nowrap; color: #202a35; }
.ticket-payment { padding-bottom: 21px; }
.ticket-payment dd { font-weight: 700; }
.ticket-customer { border-top: 1px dashed #cbd1d9; padding: 19px 0 21px; }
.ticket-customer h2 { margin: 0 0 14px; font: 600 11px/1.5 var(--mono); letter-spacing: .08em; color: #687381; text-transform: uppercase; }
.ticket-note { margin: 13px 0 0; color: #8a929d; font-size: 11px; text-align: right; }
.ticket-footer { border-top: 1px dashed #cbd1d9; padding: 16px 0; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: #737f8e; }
.ticket-footer > span:first-child { font-weight: 600; color: #455363; }
.ticket-trace { border-top: 1px solid #eef0f3; padding-top: 13px; }
.ticket-trace summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; list-style: none; color: #818b97; font: 400 11px/1.5 var(--font); cursor: pointer; }
.ticket-trace summary::-webkit-details-marker { display: none; }
.ticket-trace summary svg.i { width: 13px; height: 13px; }
.ticket-trace[open] summary svg.i { transform: rotate(180deg); }
.ticket-trace .ticket-fields { padding-top: 20px; }
.ticket-trace .ticket-fields dt, .ticket-trace .ticket-fields dd { font-size: 11px; }
.ticket-trace .ticket-uuid { grid-template-columns: 1fr; gap: 3px; }
.ticket-trace .ticket-uuid dd { text-align: left; color: #667180; }
@media (max-width: 760px) {
  .ticket-page { padding-inline: 18px; }
  .ticket-toolbar { margin-bottom: 16px; }
  .dispatch-ticket { padding: 25px 26px 18px; }
  .ticket-fields > div { grid-template-columns: 112px minmax(0,1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .ticket-page { padding-inline: 10px; }
  .ticket-toolbar { font-size: 11px; gap: 9px; }
  .ticket-toolbar > span { gap: 10px; }
  .dispatch-ticket { padding: 24px 17px 16px; }
  .ticket-reference { gap: 8px; }
  .ticket-reference h1 { font-size: 15px; }
  .ticket-status { font-size: 10px; }
  .ticket-fields > div { grid-template-columns: 95px minmax(0,1fr); gap: 8px; }
  .ticket-fields dt { font-size: 11px; }
  .ticket-fields dd { font-size: 12px; }
  .ticket-product table { font-size: 11px; }
  .ticket-product th { font-size: 9px; padding-left: 7px; }
  .ticket-product td { padding-left: 7px; }
  .ticket-total { gap: 10px; }
  .ticket-total > strong { font-size: 27px; }
  .ticket-total > span { font-size: 12px; }
  .ticket-footer { font-size: 10px; }
}
@media print {
  body.ticket-document .sidebar, body.ticket-document .topbar, body.ticket-document .banner.remote, body.ticket-document .mobile-nav-bar, body.ticket-document .mobile-nav-backdrop, .ticket-toolbar { display: none !important; }
  body.ticket-document, body.ticket-document .shell, body.ticket-document .canvas { display: block; background: #fff; margin: 0; padding: 0; }
  .ticket-page { max-width: 100%; margin: 0; padding: 0; }
  .dispatch-ticket { width: 80mm; max-width: 100%; margin: 0 auto; padding: 4mm; border: 0; box-shadow: none; font-size: 10px; }
  .ticket-brand img { width: 13mm; height: auto; }
  .ticket-brand > strong { font-size: 15px; }
  .ticket-reference h1 { font-size: 12px; }
  .ticket-fields > div { grid-template-columns: 24mm minmax(0,1fr); gap: 2mm; }
  .ticket-fields dt, .ticket-fields dd { font-size: 9px; }
  .ticket-product table { font-size: 9px; }
  .ticket-product th { font-size: 8px; }
  .ticket-total > strong { font-size: 21px; }
  .ticket-footer { font-size: 8px; }
  .ticket-trace { display: none; }
}

/* Liquidaciones: acumulados abiertos y comprobantes de cierre separados. */
.settlements-page { max-width: 1380px; }
.ls-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
.ls-heading .eyebrow { font-size: 10px; letter-spacing: .1em; }
.ls-heading h1 { font-size: 30px; letter-spacing: -.035em; margin: 6px 0 8px; }
.ls-heading p { font-size: 13px; color: #6c7e95; margin: 0; }
.ls-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 0 15px; }
.ls-section-head h2 { font-size: 18px; letter-spacing: -.02em; margin: 0; color: #233d5b; }
.ls-section-head > span { font-size: 12px; color: #7a8ba1; }
.ls-current-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.ls-shift { overflow: hidden; background: #fff; border: 1px solid #dce5ef; border-radius: 13px; box-shadow: 0 2px 7px #163a5c04; min-width: 0; }
.ls-shift > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; background: #f8fafd; border-bottom: 1px solid #e6edf5; }
.ls-shift > header > span:first-child { color: #325477; font-size: 14px; font-weight: 700; }
.ls-state { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: #78869a; }
.ls-state svg.i { width: 13px; height: 13px; }
.ls-state.is-open { color: #23755f; }
.ls-state.is-pending { color: #966a26; }
.ls-attendant { display: flex; align-items: center; gap: 12px; margin: 21px 22px 0; }
.ls-avatar { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; color: #456d9c; background: #edf3fb; border: 1px solid #e0e9f6; font-size: 13px; font-weight: 700; }
.ls-attendant > div { min-width: 0; }
.ls-attendant strong { display: block; color: #28435f; font-size: 14px; line-height: 1.5; }
.ls-attendant > div > span { display: block; margin-top: 3px; color: #8391a3; font-size: 11px; }
.ls-shift-total { padding: 22px 22px 19px; }
.ls-shift-total > span { display: block; color: #8290a3; font-size: 12px; }
.ls-shift-total > strong { display: block; margin: 5px 0 7px; color: #173c64; font-size: 32px; letter-spacing: -.045em; line-height: 1.3; font-variant-numeric: tabular-nums; }
.ls-shift-total > small { color: #7d8da3; font-size: 12px; }
.ls-payments { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0 22px; padding: 16px 0; border-block: 1px solid #e9eef5; gap: 16px; }
.ls-payments dt { font-size: 10px; color: #8493a6; margin-bottom: 6px; }
.ls-payments dd { margin: 0; font-size: 14px; color: #425e7e; font-weight: 650; font-variant-numeric: tabular-nums; }
.ls-face-rows { padding: 3px 22px; }
.ls-face-rows > div { display: flex; align-items: center; gap: 11px; padding: 13px 0; }
.ls-face-rows > div + div { border-top: 1px solid #eef2f7; }
.ls-face-no { display: grid; place-items: center; flex: none; width: 28px; height: 30px; background: #f1f5fa; color: #52759f; border-radius: 6px; font-size: 12px; font-weight: 700; }
.ls-face-rows > div > span:nth-child(2) { min-width: 0; }
.ls-face-rows strong { font-size: 12px; color: #4f6683; font-weight: 600; }
.ls-face-rows small { display: block; font-size: 10px; color: #8b99ac; margin-top: 4px; }
.ls-face-rows > div > strong { margin-left: auto; font-size: 15px; color: #2d4e72; white-space: nowrap; }
.ls-shift > footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #f9fbfd; padding: 13px 20px; border-top: 1px solid #e8eef6; }
.ls-shift > footer > span { font-size: 10px; color: #8393a8; }
.ls-shift > footer a { display: inline-flex; align-items: center; gap: 4px; color: #496f9e; font-size: 11px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.ls-shift > footer svg.i { width: 13px; height: 13px; }
.ls-context { display: flex; align-items: start; gap: 7px; color: #8090a5; font-size: 11px; line-height: 1.7; margin: 15px 0 0; }
.ls-context svg.i { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.ls-empty { display: flex; align-items: center; gap: 18px; padding: 27px; border: 1px dashed #cdd9e8; border-radius: 12px; background: #fafcff; }
.ls-empty > svg.i { width: 31px; height: 31px; flex: none; color: #9aafc7; }
.ls-empty strong { color: #4b6482; font-size: 14px; font-weight: 650; }
.ls-empty p { margin: 6px 0 0; max-width: 700px; font-size: 12px; line-height: 1.7; color: #8998aa; }
.ls-receipt { background: #fff; border: 1px solid #dce5f0; border-radius: 12px; margin-bottom: 13px; overflow: hidden; }
.ls-receipt > summary { display: flex; align-items: center; gap: 13px; padding: 18px 21px; cursor: pointer; list-style: none; }
.ls-receipt > summary::-webkit-details-marker { display: none; }
.ls-receipt-symbol { display: grid; place-items: center; width: 36px; height: 40px; background: #f0f5fc; color: #6488b1; border-radius: 8px; flex: none; }
.ls-receipt-symbol svg.i { width: 20px; height: 20px; }
.ls-receipt-who { min-width: 0; }
.ls-receipt-who strong { display: block; color: #355372; font-size: 14px; }
.ls-receipt-who small { display: block; margin-top: 5px; font-size: 11px; color: #8c9aab; }
.ls-receipt-money { margin-left: auto; text-align: right; flex: none; }
.ls-receipt-money small { display: block; color: #90a0b2; font-size: 10px; margin-bottom: 4px; }
.ls-receipt-money strong { color: #34587b; font-size: 17px; letter-spacing: -.02em; }
.ls-receipt > summary > svg.i { width: 15px; height: 15px; flex: none; color: #7a92ad; margin-left: 10px; }
.ls-receipt[open] > summary > svg.i { transform: rotate(180deg); }
.ls-receipt[open] > summary { border-bottom: 1px solid #e8eef5; background: #fbfcfe; }
.ls-receipt-body { padding: 20px; }
.ls-receipt-notices { display: grid; gap: 6px; margin-bottom: 17px; padding: 12px; background: #fff9ec; color: #92703a; font-size: 12px; border-radius: 8px; }
.ls-breakdown { overflow: auto; border: 1px solid #e3eaf3; border-radius: 8px; }
.ls-breakdown table { border-collapse: collapse; width: 100%; font-size: 12px; }
.ls-breakdown th { text-align: right; color: #788aa1; font-size: 10px; font-weight: 600; background: #f8fafd; padding: 11px; white-space: nowrap; }
.ls-breakdown td { text-align: right; color: #435d7a; padding: 12px 11px; border-top: 1px solid #e8eef6; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ls-breakdown th:first-child, .ls-breakdown td:first-child { text-align: left; }
.ls-breakdown td strong { font-size: 11px; font-weight: 600; }
.ls-breakdown td small { display: block; margin-top: 4px; color: #8a9bb0; font-size: 10px; }
.ls-rounding { color: #8a9bb0; font-size: 11px; }
.ls-close-totals { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; margin: 20px 0 0; }
.ls-close-totals dt { color: #8293a8; font-size: 11px; margin-bottom: 6px; }
.ls-close-totals dd { margin: 0; color: #3d5e80; font-weight: 650; font-size: 17px; letter-spacing: -.02em; }
.ls-close-totals .has-difference dd { color: #a65c45; }
.ls-close-totals .is-balanced dd { color: #417562; }
.ls-group-status { display: flex; align-items: center; gap: 12px; padding: 17px 20px; background: #f0f7f4; border: 1px solid #dcebe4; color: #507966; border-radius: 11px; }
.ls-group-status.is-pending { background: #fff9ef; border-color: #efe3cd; color: #92733c; }
.ls-group-status > svg.i { width: 21px; height: 21px; flex: none; }
.ls-group-status strong { display: block; font-size: 14px; margin-bottom: 5px; }
.ls-group-status span { display: block; font-size: 12px; line-height: 1.6; }
.ls-consolidated { margin-top: 22px; background: #fff; border: 1px solid #dce5f0; padding: 22px; border-radius: 12px; }
.ls-consolidated > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ls-consolidated h2 { font-size: 20px; margin: 4px 0 0; }
.ls-consolidated > p { color: #8d9caf; margin: 18px 0 0; font-size: 11px; }
.ls-groups > a { display: flex; align-items: center; gap: 10px; padding: 17px 20px; background: #fff; border: 1px solid #dce5ef; border-radius: 10px; margin-bottom: 10px; text-decoration: none; }
.ls-groups > a > svg.i { width: 18px; height: 18px; color: #7291b4; }
.ls-groups > a > strong { font-size: 14px; color: #41668d; }
.ls-groups > a > span { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 11px; color: #8b9eb6; }
.ls-groups > a > span svg.i { width: 13px; height: 13px; }
.ls-group-builder > p { color: #8696aa; font-size: 12px; }
.ls-group-builder > form { background: #fff; border: 1px solid #dce5ef; border-radius: 12px; padding: 22px; margin-top: 15px; }
.ls-group-builder h3 { font-size: 15px; margin: 0 0 19px; color: #3b6087; }
.ls-group-name { display: grid; gap: 7px; max-width: 500px; font-size: 12px; color: #6d819a; }
.ls-group-name input { width: 100%; }
.ls-group-builder fieldset { border: 0; margin: 22px 0; padding: 0; }
.ls-group-builder legend { color: #7d91aa; font-size: 12px; margin-bottom: 10px; }
.ls-choice { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 0; }
.ls-choice input { width: 18px; height: 18px; flex: none; }
.ls-choice strong { color: #4d6d91; font-size: 13px; font-weight: 600; }
.ls-choice small { display: block; margin-top: 4px; color: #8b9fb7; font-size: 11px; }
.ls-receipt summary:focus-visible { outline: 3px solid #8bb5e9; outline-offset: -3px; }
@media (max-width: 900px) { .ls-current-grid { grid-template-columns: 1fr; } .ls-close-totals { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) {
  .ls-heading { flex-wrap: wrap; gap: 15px; margin-bottom: 20px; }
  .ls-heading h1 { font-size: 27px; }
  .ls-section-head > span { font-size: 10px; }
  .ls-attendant { margin-inline: 18px; }
  .ls-attendant strong { font-size: 13px; }
  .ls-shift-total { padding-inline: 18px; }
  .ls-payments { margin-inline: 18px; gap: 12px; }
  .ls-payments dd { font-size: 13px; }
  .ls-face-rows { padding-inline: 18px; }
  .ls-shift > footer { flex-wrap: wrap; }
  .ls-empty { padding: 20px; align-items: start; gap: 12px; }
  .ls-empty > svg.i { width: 24px; height: 24px; }
  .ls-receipt > summary { padding: 16px; gap: 10px; flex-wrap: wrap; }
  .ls-receipt-who { flex: 1; }
  .ls-receipt-who strong { font-size: 12px; }
  .ls-receipt-money { width: 100%; display: flex; align-items: center; justify-content: space-between; order: 2; border-top: 1px solid #edf2f8; padding-top: 12px; }
  .ls-receipt-money strong { font-size: 16px; }
  .ls-receipt-body { padding: 15px; }
  .ls-close-totals dd { font-size: 16px; }
  .ls-consolidated > header { flex-wrap: wrap; }
}
/* Confirmación del despacho antes de entregar sus dos ejemplares. */
.checkout-panel{width:min(700px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow-y:auto}
.checkout-sale-totals{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-top:14px}
.checkout-sale-totals b{font-size:30px;letter-spacing:-1px;color:#102c49}
.checkout-sale-totals span{color:#65778e;font-size:14px}
.checkout-form{padding:20px 24px;gap:16px}
.checkout-form label:not(.check){display:grid;gap:7px;font-weight:600;color:#344c65}
.checkout-vehicle-data{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0 0 16px;padding:18px;background:#f2f6fb;border:1px solid #dce6f1;border-radius:12px}
.checkout-vehicle-data dt{font-size:12px;color:#6c7d90;margin-bottom:5px}
.checkout-vehicle-data dd{margin:0;font-size:19px;font-weight:750;color:#15324f}
.checkout-owner{grid-column:1/-1}.checkout-owner dd{font-size:16px}
.checkout-payment{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 0;border:0;padding:0}
.checkout-payment legend{font-weight:750;margin-bottom:10px;color:#173550}
.checkout-payment label{display:flex!important;align-items:center;gap:10px;padding:13px 17px;border:1px solid #c8d8e8;border-radius:10px;flex:1;cursor:pointer;background:white}
.checkout-payment label:has(input:checked){border-color:#1570ef;background:#edf5ff;color:#1456a4;box-shadow:0 0 0 1px #1570ef}
.checkout-payment label.checkout-disabled{opacity:.5;cursor:default}
.checkout-payment input{width:auto;accent-color:#1570ef}.checkout-payment small{width:100%;font-size:12px;color:#6c7d90}
.checkout-change-vehicle{border:1px solid #dce6f1;border-radius:10px;padding:12px 14px}
.checkout-change-vehicle summary{color:#185a9d;font-weight:650;cursor:pointer;display:flex;align-items:center;gap:8px}
.checkout-change-vehicle[open] summary{margin-bottom:14px}.checkout-change-vehicle .btn{margin-top:12px}
.checkout-vehicle-results{display:grid;gap:7px;margin-top:10px}.checkout-vehicle-option{display:grid;gap:5px;background:#f7faff;border:1px solid #dce6f1;border-radius:8px;padding:12px;text-align:left;cursor:pointer;color:#15324f}
.checkout-vehicle-option strong span{font-weight:500;color:#65778e;margin-left:12px}.checkout-vehicle-option small{color:#65778e}.checkout-vehicle-option em{font-size:12px;font-style:normal;color:#16765a}
.checkout-page-card{max-width:800px;margin:auto;padding:0;overflow:hidden}.checkout-sale-heading{display:grid;gap:7px;background:#0c2b4e;color:#fff;padding:24px}.checkout-sale-heading strong{font-size:36px;letter-spacing:-1px}.checkout-sale-heading small{color:#bacfe5}
.checkout-pending-row{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:14px 0;text-decoration:none}.checkout-pending-row span{font-weight:650}.checkout-pending-row small{display:block;color:#6c7d90;margin-top:6px}.checkout-pending-row>b{color:#155fad;font-size:14px}
.checkout-no-vehicle{padding:16px;border:1px solid #e4c685;background:#fff9ea;border-radius:10px;color:#805f1f}
@media(max-width:600px){.checkout-form{padding:16px}.checkout-sale-totals{align-items:start;flex-direction:column;gap:4px}.checkout-pending-row{flex-wrap:wrap}.checkout-payment label{padding:12px;min-width:120px}}

/* Alta mínima en la misma búsqueda, antes de asociar el chip o guardar el tiquete. */
.minimal-vehicle-create { margin-top: 12px; padding: 14px; border: 1px solid #c4d6ed; border-radius: 12px; background: #eef5ff; }
.minimal-vehicle-create summary { cursor: pointer; color: #075aca; font-weight: 750; padding: 8px 0; }
.minimal-vehicle-create label { display: block; margin: 10px 0; }
.minimal-vehicle-create input:not([type="hidden"]) { width: 100%; }
.minimal-vehicle-error { color: #a12e27; padding: 8px 0; font-weight: 650; }
.checkout-provisional { padding: 10px 12px; border: 1px solid #e8cd8d; border-radius: 9px; background: #fff7e4; color: #765009; }

/* La misma identidad compacta en las caras del islero y del administrador. */
.shift-console-customer { display: grid; grid-template-columns: minmax(60px, .7fr) minmax(0, 1.3fr); align-items: center; gap: 8px; }
.shift-console-internal, .shift-console-company { display: flex; align-items: center; gap: 5px; min-width: 0; }
.shift-console-customer .shift-console-internal strong { display: block; font: 850 14px/1.1 var(--mono); white-space: nowrap; text-overflow: ellipsis; }
.shift-console-company strong { display: flex; align-items: center; gap: 5px; min-width: 0; }
.shift-console-company strong b { flex: none; font-size: 13px; color: #fff; }
.shift-console-company strong small { overflow: hidden; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; color: #a9c3df; }
.shift-console-company > span { display: none; }

/* Ventas: lectura a distancia en el POS y remisión visible en cada despacho. */
.shift-sales-shortcut { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.shift-sales-shortcut .btn { min-height: 52px; padding: 12px 22px; font-size: 19px; }
.sales-ledger-head h1 { font-size: 28px; }
.sales-ledger-head p, .sales-shift-state { font-size: 16px; }
.sales-ledger-totals > div { padding: 15px 18px; min-height: 100px; }
.sales-ledger-totals strong { font-size: 28px; }
.sales-ledger-totals small, .sales-ledger-totals > div > span { font-size: 14px; }
.sales-controls, .sales-filterbar { flex-wrap: wrap; gap: 10px; }
.sales-filterbar a, .sales-view-switch a { min-height: 44px; font-size: 16px; padding: 10px 13px; }
.sales-rule { font-size: 15px; padding: 12px; }
.sales-list { gap: 14px; }
.sale-list-body { grid-template-columns: 100px 170px 115px minmax(210px,1fr); gap: 12px; min-height: 120px; padding: 16px; }
.sale-list-ref strong { font-size: 19px; }
.sale-list-ref small, .sale-list-value small { color: #425b76; font-size: 15px; }
.sale-list-value strong { color: #0b2440; font-size: 27px; overflow: visible; letter-spacing: -.02em; }
.sale-list-payment { font-size: 15px; min-height: 36px; padding: 8px 10px; }
.sale-list-identity { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-left: 14px; }
.sale-list-identity > span { flex-wrap: wrap; gap: 7px 12px; }
.sale-list-identity .plate, .sale-feed-identity .plate { font-size: 23px; padding: 5px 9px; }
.sale-list-identity b.sale-internal, .sale-feed-identity b.sale-internal { color: #123c66; font-size: 19px; text-transform: none; }
.sale-list-identity strong { flex-basis: 100%; font-size: 18px; color: #132f4c; white-space: normal; overflow: visible; line-height: 1.35; }
.sale-list-identity small { font-size: 13px; }
.sale-list-body > small { grid-column: 1 / -1; margin-top: 4px; }
.sale-list-body > small .chip, .sale-feed-payment .chip { min-height: 32px; font-size: 15px; white-space: normal; line-height: 1.35; }
.sale-list-action button, .sale-list-open { font-size: 16px; min-height: 48px; }
.sales-feed { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.sale-feed-card > header { padding: 13px 16px; }
.sale-feed-card > header a strong { font-size: 19px; }
.sale-feed-card > header > span, .sale-feed-card > header time { font-size: 15px; }
.sale-feed-value > span { padding: 16px; }
.sale-feed-value small { font-size: 14px; }
.sale-feed-value strong { font-size: 32px; }
.sale-feed-value > span:last-child strong { font-size: 25px; }
.sale-feed-payment { flex-wrap: wrap; padding: 12px 16px; gap: 10px; }
.sale-feed-payment strong { font-size: 17px; }
.sale-feed-identity { padding: 16px; gap: 12px; }
.sale-feed-identity > div { flex-wrap: wrap; justify-content: flex-start; gap: 10px; }
.sale-feed-identity > strong { color: #132f4c; font-size: 19px; line-height: 1.4; white-space: normal; overflow: visible; }
.sale-feed-key { font-size: 13px; }
.sale-feed-detail, .sale-feed-card > footer button { min-height: 48px; font-size: 16px; }
@media (max-width: 1100px) {
  .sale-list-body { grid-template-columns: 100px 170px minmax(100px,1fr); }
  .sale-list-identity { grid-column: 1 / -1; grid-row: auto; border-left: 0; padding-left: 0; }
  .sale-list-identity small { display: inline-flex; }
}
@media (max-width: 700px) {
  .sales-feed { grid-template-columns: 1fr; }
  .sale-list-body { grid-template-columns: minmax(80px,1fr) minmax(140px,1.4fr); padding: 13px; }
  .sale-list-payment { grid-column: 1 / -1; }
  .sale-list-identity { grid-column: 1 / -1; }
  .sale-list-value strong { font-size: 25px; }
}

/* Terminal de 10 pulgadas: identificación primero, cobro debajo y acciones visibles. */
.operator-identity-fields,.checkout-identity-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.operator-prompt-panel .operator-identity-fields label,.checkout-identity-fields label { margin:0; min-width:0; }
.operator-vehicle-lookup:empty { display:none; }
.operator-vehicle-lookup { max-height:190px; overflow-y:auto; }
.checkout-owner-line { display:grid; gap:3px; margin-top:10px; padding:9px 12px; border-radius:9px; background:#edf3fa; }
.checkout-owner-line span { font-size:12px; color:#52677f; }
.checkout-owner-line strong { color:#15324f; font-size:16px; line-height:1.25; overflow-wrap:anywhere; }
.operator-prompt-panel { width:min(760px,100%); padding:16px; }
.operator-prompt-head { margin-bottom:10px; }
.operator-prompt-head strong { font-size:23px; }
.operator-prompt-head p { margin-top:6px; font-size:14px; }
.operator-prompt-panel form.stack { gap:10px; }
.operator-prompt-panel input[type=text],.operator-prompt-panel input[type=search] { min-height:46px; padding:9px 12px; font-size:18px; }
.operator-prompt-panel .btn.big { min-height:48px; padding:10px 14px; font-size:17px; }
.operator-prompt-panel .operator-enrol-payment { margin-top:0; }
.operator-prompt-panel .operator-enrol-results { margin-top:0; }
.operator-prompt-panel .operator-enrol-vehicle { padding:8px 10px; margin-top:5px; }
.operator-key-detail { margin-top:7px; color:var(--muted); font-size:12px; }
.checkout-panel { width:min(760px,calc(100vw - 24px)); }
.checkout-panel .checkout-form { padding:0; gap:10px; }
.checkout-panel .checkout-sale-totals { margin-top:8px; }
.checkout-panel .checkout-sale-totals b { font-size:29px; }
.checkout-panel .checkout-payment { margin-top:10px; gap:10px; }
.checkout-panel .checkout-payment legend { margin-bottom:6px; }
.checkout-panel .checkout-payment label { min-height:46px; padding:9px 14px; }
.checkout-panel .checkout-change-vehicle { padding:9px 12px; }
.checkout-panel .checkout-change-vehicle[open] summary { margin-bottom:8px; }
.checkout-panel .checkout-no-vehicle { margin:0; padding:9px 12px; font-size:14px; }
.checkout-panel .checkout-provisional { padding:7px 10px; margin:8px 0 0; font-size:13px; }
.checkout-vehicle-results { max-height:145px; overflow-y:auto; }
.checkout-vehicle-option { padding:8px 10px; }
.minimal-vehicle-create[open] { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; }
.minimal-vehicle-create summary,.minimal-vehicle-create p,.minimal-vehicle-create button,.minimal-vehicle-create div { grid-column:1/-1; }
@media(max-width:480px) { .operator-identity-fields,.checkout-identity-fields { grid-template-columns:1fr; gap:8px; } }
.operator-prompt-panel form.stack { display:grid; gap:10px; }
.operator-prompt-panel form.stack label { margin:0; }
.operator-prompt-panel form.stack .btn { margin-top:0; }
.checkout-panel .checkout-owner-line { margin-top:8px; padding:7px 10px; }
.checkout-panel .checkout-sale-totals { margin-top:6px; }
.operator-enrol-actions { display:grid; grid-template-columns:1fr auto; gap:10px; }
.operator-prompt-panel .operator-enrol-results > p { display:none; }
.operator-prompt-panel .operator-enrol-results legend { font-size:13px; }
.operator-prompt-panel .operator-enrol-vehicle span { display:grid; grid-template-columns:auto 1fr; column-gap:12px; }
.operator-prompt-panel .operator-enrol-vehicle span small:last-child { grid-column:1/-1; }
.operator-prompt-panel .operator-enrol-vehicle small { font-size:13px; }
.operator-prompt-panel .operator-enrol-form:has(input[name=vehiculo]:checked) .operator-enrol-payment small { display:none; }
.operator-prompt-panel .operator-enrol-payment label { min-height:46px; }
@media(max-height:620px) {
  .operator-prompt-panel { padding:12px; }
  .operator-prompt-panel form.stack { gap:8px; }
  .operator-prompt-head p { display:none; }
}

/* Liquidación del islero: cifras y entrega antes de lecturas e historial. */
main.content.liquidation-content { max-width: 1440px; padding: 16px 20px 28px; }
.liq-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 14px; }
.liq-heading h1 { margin:0 0 3px; font-size:26px; line-height:1.15; letter-spacing:-.035em; }
.liq-heading p { margin:0; color:var(--muted); font-size:12px; line-height:1.3; }
.liq-eyebrow { display:block; line-height:1.3; color:var(--brand-text); font-size:10px; letter-spacing:.1em; font-weight:800; }
.liquidation-content .btn { min-height:46px; padding:9px 16px; font-size:14px; white-space:normal; line-height:1.25; }
.liq-heading > .btn { flex:none; }
.liq-totals { display:grid; grid-template-columns:1.18fr 1fr 1fr 1.12fr; gap:10px; }
.liq-totals article { display:flex; flex-direction:column; justify-content:center; min-width:0; gap:5px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.liq-totals article > span { color:var(--ink-2); font-size:13px; font-weight:650; }
.liq-totals article > strong { font-size:clamp(21px,2.65vw,30px); line-height:1.15; letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
.liq-totals article > small { color:var(--muted); font-size:12px; line-height:1.3; }
.liq-totals .liq-total-main { background:#0b294a; border-color:#0b294a; color:#fff; }
.liq-totals .liq-total-main > span, .liq-totals .liq-total-main > small { color:#bdd2e8; }
.liq-totals .liq-total-cash { background:#edf7f3; border-color:#bfddd0; }
.liq-totals .liq-total-cash > strong { color:#12634c; }
.liq-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; margin-top:12px; }
.liq-actions form { margin:0; }
.liq-live-note { display:flex; align-items:center; gap:7px; margin-right:auto; color:var(--muted); font-size:12px; }
.liq-caption { margin:8px 0 12px; font-size:12px; line-height:1.45; color:var(--muted); }
.liq-faces { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:12px 0; }
.liq-faces article { display:flex; align-items:center; gap:10px; min-width:0; padding:10px 14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.liq-face-number { display:grid; place-items:center; flex:none; width:36px; height:42px; color:#144a7a; background:#eaf2fb; border-radius:8px; font-size:23px; font-weight:800; }
.liq-faces article > div { display:flex; flex-direction:column; gap:4px; min-width:0; }
.liq-faces strong { font-size:15px; font-variant-numeric:tabular-nums; }
.liq-faces small { font-size:12px; color:var(--muted); line-height:1.3; }
.liq-face-value { margin-left:auto; text-align:right; }
.liq-notice { display:flex; align-items:center; gap:8px; margin:10px 0; padding:10px 12px; background:var(--warn-bg); border:1px solid var(--warn-line); border-radius:9px; color:var(--warn); font-size:13px; line-height:1.4; }
.liq-notice svg { flex:none; }
.liq-notice a { margin-left:auto; flex:none; font-weight:700; }
.liq-ready { color:var(--ok); background:var(--ok-bg); border-color:var(--ok-line); }
.liq-details { margin:10px 0; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.liq-details > summary { display:flex; align-items:center; gap:10px; min-height:48px; padding:10px 14px; color:var(--ink-2); font-size:14px; font-weight:700; cursor:pointer; list-style:none; }
.liq-details > summary::-webkit-details-marker { display:none; }
.liq-details > summary > small { margin-left:auto; font-weight:500; color:var(--muted); font-size:12px; }
.liq-details > summary > svg:last-child { margin-left:auto; flex:none; transition:transform .15s; }
.liq-details[open] > summary > svg:last-child { transform:rotate(180deg); }
.liq-details > summary:focus-visible { outline:3px solid var(--brand); outline-offset:2px; border-radius:8px; }
.liq-details-body { padding:0 14px 12px; border-top:1px solid var(--line); }
.liq-details-body > .table-wrap { margin:10px 0; }
.liq-details-body .list { font-size:13px; }
.liq-details-body .list th, .liq-details-body .list td { padding:10px; }
.liq-details-body .list th { font-size:12px; }
.liq-details-body .bars { margin:12px 0; }
.liq-calculation { margin:10px 0; }
.liq-calculation > div { display:flex; align-items:baseline; justify-content:space-between; gap:16px; padding:7px 0; font-size:14px; }
.liq-calculation dt { color:var(--ink-2); }
.liq-calculation dd { margin:0; font-weight:700; font-variant-numeric:tabular-nums; }
.liq-calculation .liq-calculation-total { border-top:1px solid var(--line); font-weight:800; }
.liq-review { border-color:var(--warn-line); }
.liq-review > summary { background:var(--warn-bg); color:var(--warn); border-radius:10px; }
.liq-close-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr); align-items:start; gap:14px; }
.liq-totals-close { grid-template-columns:repeat(3,minmax(0,1fr)); }
.liq-totals-close article { padding:10px; }
.liq-totals-close article > strong { font-size:22px; }
.liq-totals-close .liq-total-cash { grid-column:auto; }

.liq-faces-close { grid-template-columns:1fr; gap:6px; margin:8px 0; }
.liq-faces-close article { padding:8px 12px; }
.liq-faces-close .liq-face-number { height:34px; width:32px; font-size:20px; }
.liq-cash-entry { border:1px solid var(--line); border-radius:12px; background:var(--surface); padding:12px; }
.liq-cash-entry h2 { margin:0 0 10px; font-size:18px; }
.liq-cash-entry p { font-size:13px; }
.liq-cash-entry label { display:block; font-size:14px; font-weight:700; margin:0 0 7px; }
.liq-cash-entry input { width:100%; min-height:48px; font-size:18px; }
.liq-cash-entry form > .btn { width:100%; }
.liq-cash-difference { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 0; font-size:13px; }
.liq-cash-difference output { font-size:18px; font-weight:800; font-variant-numeric:tabular-nums; }
.liq-extra { margin:0 0 12px; background:var(--surface-2); }
.liq-extra > summary { min-height:44px; font-size:13px; }
.liq-extra-fields { padding:0 12px 12px; }
.liq-extra-fields input { margin-bottom:10px; font-size:15px; }
.liq-cash-entry .liq-caption { margin-bottom:0; font-size:12px; }
#liquidacion-viva > .stale-note { display:none; }
#liquidacion-viva.is-stale > .stale-note { display:block; }
@media (max-width:1000px) and (min-width:641px) {
  main.content.liquidation-content { padding:12px 14px 24px; }
  .liq-heading { margin-bottom:10px; }
  .liq-heading h1 { font-size:23px; }
  .liq-totals article { padding:11px 12px; }
  .liq-totals article > strong { font-size:25px; }
  .liq-totals-close article > strong { font-size:22px; }
}
@media (max-width:640px) {
  .liq-heading { align-items:flex-start; }
  .liq-heading h1 { font-size:23px; }
  .liq-heading p { font-size:12px; }
  .liq-heading > .btn { padding:9px; font-size:12px; }
  .liq-totals { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .liq-faces { grid-template-columns:1fr; }
  .liq-actions { flex-wrap:wrap; }
  .liq-live-note { flex-basis:100%; }
  .liq-actions form, .liq-actions > a { flex:1; }
  .liq-actions form .btn { width:100%; }
  .liq-close-layout { grid-template-columns:1fr; }
  .liq-totals-close .liq-total-cash { grid-column:1/-1; }
  .liq-details > summary > small { display:none; }
  .liq-details > summary { font-size:13px; }
}

.liq-start-close { padding:16px; margin-top:12px; }
.liq-start-close p { margin:10px 0; font-size:14px; }
.liq-start-close .card-title { margin-bottom:8px; }
.liq-start-close .card-title h2 { font-size:18px; }
.liq-start-close form.stack { gap:10px; }
.liq-start-close form.stack { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.liq-start-close form.stack .check { margin:0; font-size:14px; }
.liq-start-close form.stack .btn { margin:0; flex:none; }
@media (max-width:640px) { .liq-start-close form.stack { flex-direction:column; align-items:stretch; } }

/* Interno completo y hora de última venta legibles en cada cara. */
.shift-pump-card.shift-console.sur {
  height: auto;
  grid-template-rows: 35px 118px minmax(66px, auto) minmax(38px, auto);
}
.shift-console-identity { grid-template-rows: 26px auto; }
.shift-console-customer { grid-template-columns: minmax(0, 1fr); gap: 5px; }
.shift-console-customer .shift-console-internal {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px;
}
.shift-console-customer .shift-console-internal span {
  font-size: 9px; overflow: visible; white-space: normal; text-overflow: clip;
}
.shift-console-customer .shift-console-internal strong {
  font-size: 18px; line-height: 1.2; min-width: 0; max-width: none;
  white-space: normal; overflow: visible; overflow-wrap: anywhere; text-overflow: clip;
}
.shift-console-foot, .ov-face-grid .shift-console-foot {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; white-space: normal;
  padding: 2px 5px 4px; line-height: 1.3;
}
.shift-console-foot > span { order: 2; font-size: 9px; }
.shift-console-foot > .shift-console-last-sale {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  flex-wrap: wrap; overflow: visible; text-overflow: clip; white-space: normal;
}
.shift-console-last-sale .shift-console-last-ref { font-size: 11px; }
.shift-console-last-sale .shift-console-last-label {
  display: flex; align-items: baseline; gap: 5px; font-size: 9px; color: #aac8e8;
}
.shift-console-last-sale .shift-console-last-time {
  font: 800 16px/1.2 var(--mono); font-variant-numeric: tabular-nums; color: #fff;
}

/* Operator sales: receipt actions stay beside the sale and notices remain compact. */
.operator-sales-ledger .sale-list-body { grid-template-columns: minmax(100px,.75fr) minmax(130px,1fr) auto minmax(180px,1.4fr); gap:12px; padding:16px; }
.operator-sales-ledger .sale-list-identity { grid-template-columns:minmax(0,1fr); }
.operator-sales-ledger .sale-list-identity > span { flex-wrap:wrap; }
.operator-sales-ledger .sale-list-identity strong { white-space:normal; overflow:visible; width:100%; }
.operator-sales-ledger .sale-list-body > small { grid-column:1/-1; }
.operator-sales-ledger .sale-row-actions { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:10px; padding:12px; border-left:1px solid #e0e7ef; min-width:150px; }
.operator-sales-ledger .sale-row-actions form { margin:0; }
.operator-sales-ledger .sale-row-actions .btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:48px; font-size:16px; padding:10px 14px; white-space:normal; }
.operator-sales-ledger .sale-action-detail { display:inline-flex; align-items:center; gap:6px; font-size:14px; color:#315e8d; text-decoration:none; min-height:36px; }
.operator-sales-ledger .sale-action-detail svg { width:16px; height:16px; }
.operator-sales-ledger .sale-feed-card > footer.sale-row-actions { flex-direction:row; justify-content:space-between; border-left:0; margin-top:auto; }
.operator-sales-page .sales-printer-notice .banner { margin:0 0 12px; padding:8px 12px; font-size:14px; border:1px solid #e3d8b8; background:#fffbef; border-radius:8px; }
.operator-sales-page .flash.ok { padding:10px 14px; margin-bottom:12px; }
@media(max-width:1100px) {
 .operator-sales-ledger .sale-list-body { grid-template-columns:minmax(100px,1fr) minmax(130px,1fr); }
 .operator-sales-ledger .sale-list-identity { grid-column:1/-1; border-left:0; padding-left:0; }
 .operator-sales-ledger .sale-list-payment { grid-column:1/-1; }
}
@media(max-width:600px) {
 .operator-sales-ledger .sale-list-row { grid-template-columns:minmax(0,1fr); }
 .operator-sales-ledger .sale-row-actions { border-left:0; border-top:1px solid #e0e7ef; flex-direction:row; justify-content:space-between; padding:10px 14px; }
 .operator-sales-ledger .sale-list-body { gap:10px; padding:14px; }
 .operator-sales-ledger .sale-list-ref small { white-space:normal; }
}

.operator-sales-ledger .sale-secondary-actions { font-size:13px; color:#526b86; }
.operator-sales-ledger .sale-secondary-actions summary { cursor:pointer; padding:5px; }
.operator-sales-ledger .sale-secondary-actions form { margin-top:8px; }
.operator-sales-ledger .sale-secondary-actions .btn { font-size:14px; }

.operator-sales-ledger .sale-list-identity > em { font-size:13px; color:#946400; }
.operator-sales-ledger .sale-feed-flags:not(:has(*)) { display:none; }
.operator-sales-ledger .sale-list-body > small:has(.chip) { margin:0; }
@media(min-width:901px) and (max-width:1200px) {
 .operator-sales-page .topbar { flex-wrap:wrap; justify-content:flex-start; }
 .operator-sales-page .topbar-status { flex-wrap:wrap; max-width:100%; }
}
@media(max-width:600px) {
 .operator-sales-ledger .sales-ledger-head { flex-wrap:wrap; padding:12px; }
 .operator-sales-ledger .sales-ledger-head > div { width:100%; }
 .operator-sales-ledger .sales-ledger-head p { max-width:none; font-size:14px; white-space:normal; }
 .operator-sales-ledger .sales-shift-state { font-size:13px; }
 .operator-sales-ledger .sales-ledger-totals { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .operator-sales-ledger .sales-ledger-totals > div { padding:12px; min-height:85px; }
 .operator-sales-ledger .sales-ledger-totals > div:nth-child(3) { border-left:0; border-top:1px solid #dbe4ee; }
 .operator-sales-ledger .sales-ledger-totals > div:nth-child(4) { border-top:1px solid #dbe4ee; }
 .operator-sales-ledger .sales-ledger-totals strong { font-size:22px; letter-spacing:-.035em; }
 .operator-sales-ledger .sales-ledger-totals > div > span,.operator-sales-ledger .sales-ledger-totals small { font-size:12px; }
 .operator-sales-ledger .sales-controls { grid-template-columns:1fr; }
 .operator-sales-ledger .sales-filterbar { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px; }
 .operator-sales-ledger .sales-filterbar a { font-size:14px; padding:8px; }
 .operator-sales-ledger .sales-view-switch { justify-self:end; }
 .operator-sales-ledger .sales-view-switch a { font-size:14px; padding:8px 12px; }
 .operator-sales-ledger .sale-row-actions { flex-wrap:wrap; }
 .operator-sales-ledger .sale-secondary-actions { flex-basis:100%; border-top:1px solid #e0e7ef; padding-top:4px; }
}
