/* La hoja base del Portal (portal.html), la primera después de tokens.css (el de OMS, que no se toca): la letra, los colores del Portal
   (abajo, con los nombres de tokens.css), las piezas (botón, campo, opción, etiqueta, tarjeta, renglón, tabla, ventana, teclado, kpi)
   y lo de cada página que aún vive aquí. portal-marco.css va después con el marco v3 (las dos barras y Reportes); cada pantalla tiene
   su hoja (portal-insumos.css, portal-menu.css…). Una sola letra: Urbanist (licencia libre OFL), en www/urbanist.woff2. */
@font-face { font-family: 'Urbanist'; src: url('urbanist.woff2') format('woff2'); font-weight: 400 800; font-display: swap; }
/* Colores del Portal (v3.1, Marquito, 16-nov; idea tomada del panel de Polo Tab, sin copiar su diseño). Las hojas leen los nombres de
   tokens.css (--bg, --panel, --text, --blue…), que aquí apuntan a los del Portal.
   Colores: solo azul, morado, verde y rojo (rojo de marca #EF4138), más grises; nada ámbar: lo que antes era ámbar («a medias») es
   morado. Mucho blanco, letra chica, claro y oscuro con las mismas variables (data-theme="claro" / "oscuro" fuerza uno). */

/* ── Claro (el de siempre del Portal) ── */
:root:not([data-theme="oscuro"]) {
  color-scheme: light;
  --pt-canvas: #FFFFFF;     /* fondo de la página */
  --pt-side: #F7F8FA;       /* las dos barras */
  --pt-raised: #FFFFFF;     /* tarjetas */
  --pt-hover: #EEF0F3;
  --pt-line: #E7E9ED;
  --pt-line-strong: #D5D9DF;
  --pt-ink: #16181D;
  --pt-ink-2: #5B616B;
  --pt-ink-3: #959BA5;
  --pt-skel: #EEF0F3;       /* renglones grises mientras carga */
  --pt-blue: #2563EB;
  --pt-purple: #7C3AED;
  --pt-green: #15803D;
  --pt-red: #EF4138;        /* rojo de marca: rayas, puntos, rellenos */
  --pt-red-ink: #C8312A;    /* rojo para letra sobre blanco (contraste) */
  --pt-yellow: #E0A100;     /* solo el semáforo de niveles: cerca del mínimo (Marquito, 17-nov) */
  --pt-logo: url('logo-word-dark.png');   /* logo alternativo, solo la palabra (Marquito, 17-nov): negro en claro */
  --pt-yellow-ink: #8A6200;
  --pt-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --pt-shadow-pop: 0 12px 32px rgba(16, 24, 40, .14);
  --pt-scrim: rgba(16, 24, 40, .28);
}
/* ── Oscuro ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="claro"]) {
    color-scheme: dark;
    --pt-canvas: #0E0F12; --pt-side: #141519; --pt-raised: #17181D; --pt-hover: #22242A; --pt-line: #26282E; --pt-line-strong: #34373E;
    --pt-ink: #F2F3F5; --pt-ink-2: #A4A9B2; --pt-ink-3: #6E737C; --pt-skel: #22242A;
    --pt-blue: #5B8CFF; --pt-purple: #A78BFA; --pt-green: #34C47A; --pt-red: #EF4138; --pt-red-ink: #FF7A70; --pt-yellow: #E0A100; --pt-yellow-ink: #F2C14E; --pt-logo: url('logo-word-light.png');
    --pt-shadow: 0 1px 2px rgba(0, 0, 0, .3); --pt-shadow-pop: 0 12px 32px rgba(0, 0, 0, .5); --pt-scrim: rgba(0, 0, 0, .55);
  }
}
:root[data-theme="oscuro"] {
  color-scheme: dark;
  --pt-canvas: #0E0F12; --pt-side: #141519; --pt-raised: #17181D; --pt-hover: #22242A; --pt-line: #26282E; --pt-line-strong: #34373E;
  --pt-ink: #F2F3F5; --pt-ink-2: #A4A9B2; --pt-ink-3: #6E737C; --pt-skel: #22242A;
  --pt-blue: #5B8CFF; --pt-purple: #A78BFA; --pt-green: #34C47A; --pt-red: #EF4138; --pt-red-ink: #FF7A70; --pt-yellow: #E0A100; --pt-yellow-ink: #F2C14E; --pt-logo: url('logo-word-light.png');
  --pt-shadow: 0 1px 2px rgba(0, 0, 0, .3); --pt-shadow-pop: 0 12px 32px rgba(0, 0, 0, .5); --pt-scrim: rgba(0, 0, 0, .55);
}

/* ── Los nombres de siempre (tokens.css) apuntan a los del Portal, en los dos temas ── */
html:root:not([data-pt-off]) { /* (0,2,1): le gana al claro/oscuro de tokens.css */
  --pt-font: Urbanist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bg: var(--pt-canvas); --panel: var(--pt-raised); --tile: var(--pt-hover); --well: var(--pt-side); --line: var(--pt-line);
  --text: var(--pt-ink); --muted: var(--pt-ink-2); --faint: var(--pt-ink-3); --soft: var(--pt-ink-2);
  --blue: var(--pt-blue); --green: var(--pt-green); --drink: var(--pt-purple); --busy: var(--pt-blue);
  --bad: var(--pt-red-ink); --bad-fill: var(--pt-red); --coral: var(--pt-red); --accent: var(--pt-red-ink); --accent-line: var(--pt-red); --kds-red: var(--pt-red);
  --bad-soft: color-mix(in srgb, var(--pt-red) 10%, transparent); --coral-soft: var(--bad-soft); --late-line: var(--pt-red);
  --ok-soft: color-mix(in srgb, var(--pt-green) 12%, transparent); --warn-soft: color-mix(in srgb, var(--pt-purple) 10%, transparent);
  --warn: var(--pt-purple); --warn-fill: var(--pt-purple); /* lo que espera: morado (sin ámbar, H19) */
  --yellow-soft: color-mix(in srgb, var(--pt-yellow) 16%, transparent);
  --ring: var(--pt-line-strong); --shadow: rgba(16, 24, 40, .1); --scrim: var(--pt-scrim);
  --mix: 10%;
  --font-body: var(--pt-font); --font-display: var(--pt-font); --v3-ui: var(--pt-font);
  --v3-font: 500 15.5px/1.35 var(--pt-font);
  /* Letra 20 % más grande que Polo (Marquito, 17-nov; prueba v3.2) */
  --fs-xs: 13px; --fs-sm: 14.5px; --fs-md: 15.5px; --fs-lg: 18px; --fs-xl: 21.5px; --fs-2xl: 26.5px; --fs-num: 29px;
  /* Esquinas: redondas pero discretas */
  --r: 8px; --rp: 12px; --r-sm: 8px; --r-md: 12px; --r-lg: 14px;
  /* Controles más bajos que en la tableta (en el Portal no se toca con el dedo) */
  --h-field: 36px; --btn-h: 36px; --btn-w: 200px; --h-icon: 32px; --h-icon-sm: 28px;
  /* Manual → Tutoriales (formato aprobado por Marquito, 19-nov): la tarjeta negra y el punto rojo transparente, iguales en los dos temas
     porque van encima de la captura */
  --pt-tt-card: #16181D; --pt-tt-card-ink: #FFFFFF; --pt-tt-card-soft: #C9CCD3; --pt-tt-card-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  --pt-tt-dot: rgba(239, 65, 56, .55); --pt-tt-ring: rgba(239, 65, 56, .35); --pt-tt-dot-edge: rgba(255, 255, 255, .8);
  --pt-rail: 60px; --pt-menu: 187.8px; /* la firma (146.8 px) con 20 px de cada lado, más la raya de 1 px (Marquito, 16-nov) */ --pt-top: 56px; --pt-sheet: 460px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font: 500 var(--fs-md)/1.3 var(--font-body); touch-action: manipulation; }
/* Text can be selected and copied (folios, UUID, amounts); what is tapped is not */
.btn, .icon-btn, .chip, .key, .tile, .mini, .kpi, summary { user-select: none; -webkit-user-select: none; }
#app { height: 100%; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; display: flex; }
h1, h2, h3, p { margin: 0; }
.num, .money { font-variant-numeric: tabular-nums; }
.money { font-weight: 500; }
.label { color: var(--muted); font: var(--fs-sm)/1.1 var(--font-display); }
.title { font: var(--fs-2xl)/1.1 var(--font-display); }
.note { color: var(--muted); font-weight: 400; }
.fine { color: var(--muted); font-size: var(--fs-sm); }
.empty { padding: var(--sp-5) var(--sp-1); color: var(--muted); font-weight: 400; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
/* Reclasificar gasto (Finanzas → Gastos): CATEGORÍA, MONTO, COMENTARIO and × per line */
.split__line { display: grid; grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1fr) 40px; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-2); }
.split__head { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: var(--sp-1); }
.split__left.is-bad { color: var(--bad); }
@media (max-width: 600px) { .split__line { grid-template-columns: minmax(0, 1fr) 120px 40px; } .split__line > .field:not(.field--select):not(.iqty) { grid-column: 1 / -1; } .split__head span:nth-child(3) { display: none; } }
@media (max-width: 600px) { .grid2--sm1 { grid-template-columns: minmax(0, 1fr); } }
.btns { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
/* ↑ ↓ ✕ de un renglón (Menú → Categorías): en una línea; armado el ✕, las flechas se van para que «Confirmar borrar» quepa */
.btns:has(> [data-move]) { flex-wrap: nowrap; }
.btns:has(> .btn--bad) > [data-move] { display: none; }
.split { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.token { display: block; padding: var(--sp-3); border-radius: var(--r-sm); background: var(--chip); font-size: var(--fs-md); word-break: break-all; user-select: all; }
.stack { display: flex; flex-direction: column; gap: var(--sp-3); }
.stack--tight { align-items: flex-start; gap: var(--sp-1); }
.contents { display: contents; }
/* A line of facts (Usuario, Fecha, Folio…) that wraps; --column one under the other */
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-4); font-weight: 400; }
.facts--column { flex-direction: column; align-items: flex-start; gap: var(--sp-1); }

/* A quantity that subtracts (a recipe line with −) */
.is-neg { color: var(--bad); }

/* ── Button (OMS's .button): var(--btn-h) high, the same for every button of the Portal; the width follows the text ── */
.btn { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: var(--sp-2); border: 0; background: var(--btn-bg); color: var(--text); text-decoration: none; white-space: nowrap; cursor: pointer; transition: scale .15s ease, box-shadow .15s ease; box-shadow: inset 0 0 0 1px var(--edge); height: var(--btn-h); padding: 0 14px; border-radius: var(--r-sm); font: 600 var(--fs-md)/1 var(--pt-font); letter-spacing: 0; text-transform: none; }
.btn:active { scale: .985; box-shadow: var(--btn-press); }
.btn--go { background: var(--go-bg); color: var(--on-fill); box-shadow: none; }
.btn--go:active { box-shadow: var(--go-press); }
/* Danger: dark red with white text (Borrar, Desactivar, Cancelar factura) */
.btn--bad { background: var(--danger-bg); color: var(--on-fill); }
.btn--block { width: 100%; }
/* Off, one look: disabled, or .is-off (not tappable) */
.btn:is(:disabled, .is-off) { opacity: .4; cursor: default; scale: 1; }
.btn.is-off { pointer-events: none; }

/* ── Icon button (OMS's .icon-btn): the gray round of 38 (×, ‹ ›, ↻, ⋮) ── */
.icon-btn { display: inline-grid; flex: none; place-items: center; width: var(--h-icon); height: var(--h-icon); padding: 0; border: 0; border-radius: 50%; background: var(--chip); box-shadow: inset 0 0 0 1px var(--edge); color: var(--text); font: 400 var(--fs-lg)/1 var(--font-body); cursor: pointer; }
.icon-btn:active { background: var(--well-2); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn svg { width: 20px; height: 20px; }
/* «Confirmar …» (armTwice) on an icon button (the ✕ of a dialog, the × of a row): while it is red it grows with its text, never cut */
button.icon-btn.btn--bad { width: auto; min-width: max-content; padding: 0 12px; border-radius: var(--r-sm); background: var(--danger-bg); box-shadow: none; color: var(--on-fill); font: 600 var(--fs-sm)/1 var(--pt-font); white-space: nowrap; }

/* ── Field (OMS's .field): the control alone, as high as the button; .form-row is its label and the field ── */
.form-row { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.form-row[hidden] { display: none; }
.field { width: 100%; height: var(--btn-h); padding: 0 var(--sp-3); border: 0; border-radius: var(--r-sm); background: var(--pt-raised); box-shadow: inset 0 0 0 1px var(--pt-line-strong); color: var(--text); font: 400 var(--fs-md) var(--font-body); }
.field::placeholder { color: var(--faint); }
.field:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-line); }
.field:disabled { opacity: .6; }
textarea.field { height: 84px; padding: var(--sp-3); line-height: 1.3; resize: none; }
.field--tall { height: 120px; }
.field--short { max-width: 140px; }

/* select: a field with ⌄ that opens a list of chips (ui.js selectButton) */
.field--select { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); text-align: left; cursor: pointer; }
.field--select > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field--select svg { color: var(--muted); }
.field__text.is-empty { color: var(--faint); }

/* ── Chip (OMS's .chip): an option that is tapped; the chosen one with --sel-bg and its line (one look for "elegido") ── */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip.is-on { background: var(--sel-bg); box-shadow: inset 0 0 0 2px var(--sel-line); font-weight: 600; }
.chip:disabled { opacity: .4; cursor: default; }
/* Admin always gives every discount: its chip stays on and bright though it cannot be tapped (Configuración → Descuentos) */
.chip.is-on:disabled { opacity: 1; }
/* A list to choose from (pick): two per row, long names wrap */
.chips--list, .chips--column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chips--column { grid-template-columns: minmax(0, 1fr); }
:is(.chips--list, .chips--column) > .chip { height: auto; min-height: var(--h-field); padding: var(--sp-2) var(--sp-3); line-height: 1.2; text-align: left; white-space: normal; }

/* ── A row of tags (pill, kit.js) that wraps ── */
.states { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); }
.states--center { justify-content: center; }

/* ── Card (OMS's .box): a section of a page; .sec--inner inside a dialog ── */
.sec { position: relative; display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; padding: var(--sp-4); border-radius: var(--r-md); background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); }
.sec--inner { padding: var(--sp-3); background: var(--well); }
.sec--wait { background: var(--warn-soft); }
.sec__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: var(--h-icon); }
.sec__head .btn { flex: 0 0 auto; }
/* A card that opens something (the amount of a code, the value of a pad) */
.tile { display: flex; flex-direction: column; justify-content: center; width: 100%; height: 64px; padding: var(--sp-2) var(--sp-3); border: 0; border-radius: var(--r-md); background: var(--well); box-shadow: inset 0 0 0 1px var(--edge); color: var(--text); font-family: var(--font-body); text-align: left; cursor: pointer; }
.tile b { font: var(--fs-num) var(--font-display); font-variant-numeric: tabular-nums; }
.tile.is-off { opacity: .4; pointer-events: none; }
/* A small card (a presentation, a supplier): tapped to edit it, no pencil */
.mini { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-3); border-radius: var(--r-md); background: var(--well); box-shadow: inset 0 0 0 1px var(--edge); cursor: pointer; }
.mini:active { background: var(--well-2); }
.mini b { font-weight: 500; }
.mini small { color: var(--muted); font-weight: 400; }
.cardlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-3); }

/* ── Row: 44 high (grows with two lines); the whole row is tapped to open it (.is-tap), no pencil ── */
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-3); align-items: center; min-height: var(--h-field); padding: var(--sp-1) 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row.is-tap { cursor: pointer; }
.row.is-tap:active { background: var(--well); }
.row__main { min-width: 0; }
.row__main b { display: block; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.row__main small { display: block; color: var(--muted); }

.row.is-sold .row__main b { color: var(--bad); }
/* Tables (inventario-util.js table()) */
.t { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; overflow-x: auto; } /* wider than its card: it scrolls sideways (QA 14-nov), never cut */
.t__row { display: grid; grid-template-columns: var(--cols); align-items: center; gap: 0; min-height: 28px; padding: 0; font-weight: 400; border-bottom: 1px solid var(--line); }
.t__row:last-child { border-bottom: 0; }
.t__row.is-tap { cursor: pointer; }
.t__row.is-tap:active { background: var(--well); }
.t__row--head { font: var(--fs-xs)/1 var(--font-display); cursor: default; min-height: 26px; background: var(--well); color: var(--muted); font-size: var(--fs-sm); }
.t__c { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.t__c.r { font-variant-numeric: tabular-nums; text-align: right; }
.t__two { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.t__two b { overflow: hidden; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.t__two small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.t__two small.t__wrap { white-space: normal; }
/* Two lines that wrap on the computer too (Historial: Avisos and Otros registros) */
.t__two--wrap b, .t__two--wrap small { overflow-wrap: anywhere; white-space: normal; }
.t__two small.t__wait { color: var(--warn); }
.t__row .neg { color: var(--bad); }
.t__row .pos { color: var(--ok); }

/* ── Dialog: the card in the middle (dialog--wide, 1100 wide); every other one is the side panel, dialog--panel in portal-marco.css.
   Title centered and × top right; the message line keeps its place so an error never moves the buttons ── */
#layer { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.scrim { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: var(--sp-4); background: var(--scrim); pointer-events: auto; }
.scrim--notice { z-index: 5; }
.dialog { display: flex; flex-direction: column; gap: var(--sp-3); width: var(--dlg-sm); max-width: 100%; max-height: 100%; padding: var(--sp-5); border-radius: var(--r-md); background: var(--pop); box-shadow: inset 0 0 0 1px var(--line), 0 10px 30px rgba(0, 0, 0, .22); }
.dialog--wide { width: var(--dlg-lg); }
.dialog__head { position: relative; display: grid; flex: 0 0 auto; place-items: center; min-height: var(--h-icon); padding: 0 calc(var(--h-icon) + var(--sp-2)); }
.dialog__head > .icon-btn { position: absolute; top: 0; right: 0; }
.dialog__text { color: var(--soft); font-size: var(--fs-md); text-align: center; white-space: pre-line; }
.dialog__body { display: flex; flex: 1 1 auto; flex-direction: column; gap: var(--sp-3); min-height: 0; overflow-y: auto; }
.dialog__msg { flex: 0 0 auto; min-height: 1.4em; color: var(--bad); font-weight: 500; text-align: center; }
.dialog__foot { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); }
.dialog__foot .btn { flex: 0 1 var(--btn-w); min-width: 0; }

.dialog__foot .btns .btn { flex: 0 0 auto; }
/* Notice: what went well closes alone or at a touch; an error waits for its OK */
.notice { align-items: center; gap: var(--sp-4); text-align: center; }
.notice p { font: 400 var(--fs-xl)/1.3 var(--font-body); white-space: pre-line; }
.notice .btn { width: var(--btn-w); }
.notice--big p { font: calc(2 * var(--fs-num)) var(--font-display); }
.notice__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; }
.notice__icon svg { width: 40px; height: 40px; }
.notice__icon--ok { background: var(--ok-soft); color: var(--ok); }
.notice__icon--bad { background: var(--bad-soft); color: var(--bad); }

/* ── Keypad (OMS's .pin__keys): 3 columns of bare keys 84 × 56, OK green in the corner; the value it writes above it ── */
.keypad { display: grid; grid-template-columns: repeat(3, 84px); justify-content: center; gap: var(--sp-2) var(--sp-3); }
.key { height: 56px; padding: 0; border: 0; border-radius: var(--r-md); background: none; color: var(--text); font: 400 24px/1 var(--font-body); font-variant-numeric: tabular-nums; cursor: pointer; }
.key:active { background: var(--chip); }
.key--ok { background: var(--key-ok-bg); box-shadow: var(--key-ok-shadow); color: var(--on-fill); font: 24px/1 var(--font-display); }
.pad__value { display: grid; place-items: center; height: 84px; border-radius: var(--r-md); background: var(--well); font: 44px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.pad__value--pin { letter-spacing: .2em; }
/* The PIN screen */
.pin { display: flex; flex-direction: column; align-items: center; gap: var(--sp-4); width: 288px; margin: auto; }
.pin__dots { display: flex; gap: 18px; height: 14px; }
.pin__dots i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--edge); }
.pin__dots i.is-on { background: var(--text); box-shadow: none; }
.pin__msg { min-height: 1.4em; color: var(--bad); font-weight: 500; text-align: center; }
.pin__msg.pin__msg--info { color: var(--pt-ink-2); }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* ── KPI: a big number with its label and a note, fixed height (one piece for every "número grande") ── */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); }

.kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.kpis--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: var(--sp-3) var(--sp-4); border: 0; border-radius: var(--r-md); background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); color: var(--text); font: inherit; text-align: left; height: auto; min-height: 104px; }
button.kpi { cursor: pointer; }
button.kpi:active { background: var(--well); }

.kpi--main { background: var(--coral-soft); }
.kpi__label { overflow: hidden; color: var(--muted); font: var(--fs-sm)/1.1 var(--font-display); text-overflow: ellipsis; }
.kpi__value { overflow: hidden; font: var(--fs-num)/1 var(--font-display); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.kpi__note { min-height: 1.2em; overflow: hidden; color: var(--muted); font-size: var(--fs-sm); font-weight: 400; text-overflow: ellipsis; }
/* the long names of Finance («Traspasado a Banamex», «Faltante / sobrante de corte») wrap instead of being cut, on any width (QA 14-nov) */
.kpi--tall { min-height: 128px; }
.kpi__label, .kpi__note { white-space: normal; }
.kpi--bad .kpi__value { color: var(--bad); }
.kpi--ok .kpi__value { color: var(--ok); }
.kpi--wait .kpi__value { color: var(--warn); }

@media (max-width: 1100px) {
  .kpis--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .scrim { padding: var(--sp-2); }
  .dialog, .dialog--wide { width: 100%; padding: var(--sp-4); }
  .kpis, .kpis--3, .kpis--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .t__row { grid-template-columns: var(--cols-sm); }
  .t__row > .t__c.hide-sm { display: none; } /* más específico que .t__row > .t__c { display: flex } */
  .t__two b { overflow-wrap: anywhere; white-space: normal; }
  .dialog__head:has(> .btn--bad) { place-items: center start; padding-left: 0; } /* «Salir sin guardar» armado no tapa el título */
}

/* ── The page where each module draws (portal.js) ── */
.portal__main { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.portal__page { display: flex; flex: 1; flex-direction: column; gap: var(--sp-3); min-height: 0; }
.portal__page--adm { overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ── Menú, Personal and Marketing (admin-*.js) ── */
.adm__body { display: flex; flex: 1; flex-direction: column; gap: var(--sp-3); min-height: 0; padding-bottom: var(--sp-2); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--sp-3); }
.timesel { display: grid; gap: var(--sp-2); }
.timesel--2 { grid-template-columns: 1fr 1fr; }
.week { display: flex; align-items: center; gap: var(--sp-2); }
.week b { flex: 1; font: var(--fs-xl) var(--font-display); text-align: center; }

.shift { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: var(--sp-3); align-items: center; min-height: var(--h-field); padding: var(--sp-1) 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.shift:last-of-type { border-bottom: 0; }

@media (max-width: 700px) {
  .shift { grid-template-columns: 1fr; gap: 2px; }
}

/* ── Inventory pages (js/inventario-*.js) ── */
.inv__body { display: flex; flex: 1; flex-direction: column; gap: var(--sp-3); min-height: 0; padding-bottom: var(--sp-2); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.inv__body > * { flex-shrink: 0; }   /* una tabla (.t, overflow hidden) no se encoge dentro del cuerpo: sin esto se cortaban los últimos renglones (Gastos, Saldos) */
.inv__sub { display: flex; flex: 0 0 auto; gap: var(--sp-2); }
.inv__sub .chip { flex: 1; }
.itools { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.itools > * { flex: 0 0 auto; }
.itools .isearch, .itools .ifolio { width: 260px; }
.itools .field--select, .itools .inv-date { width: 220px; }
/* Desde and Hasta redrawn in their own slot, laid out as children of the tools */
.irange { display: contents; }
.inotice { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: var(--h-field); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-weight: 500; }
.inotice .btn { flex: 0 0 auto; }
/* A tapped quantity or amount (qtyField, moneyField): a field with the number */
.iqty { font: 500 var(--fs-md) var(--font-body); font-variant-numeric: tabular-nums; text-align: left; cursor: pointer; }
.iqty.is-blank { color: var(--muted); }
/* A date: the field shows Hoy / 2-nov and the native picker sits on top, invisible */
.inv-date { position: relative; }
.inv-date input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.inv-date .field { pointer-events: none; }
.iline { display: grid; grid-template-columns: minmax(0, 1fr) 150px var(--h-icon); gap: var(--sp-2); align-items: center; min-height: var(--h-field); padding: var(--sp-1) 0; border-bottom: 1px solid var(--line); }

.iline__main { min-width: 0; }
.iline__main b { display: block; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.iline__main small { display: block; color: var(--muted); font-weight: 400; }
.iline--buy { grid-template-columns: minmax(0, 1fr) 110px 120px 90px var(--h-icon); }
.iline__sub { text-align: right; }
.itotal { display: flex; align-items: center; justify-content: space-between; height: 40px; font: var(--fs-2xl) var(--font-display); }
.dlist { display: flex; flex-direction: column; }
.hint { padding: var(--sp-3); border-radius: var(--r-md); background: var(--coral-soft); font-weight: 500; }

.person { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-3); border-radius: var(--r-md); background: var(--well); }
.person__line { display: flex; align-items: center; gap: var(--sp-2); }
.person__line > .iline__main { flex: 1; }
.person__line > .iqty { width: 150px; flex: none; }
.iphoto { display: block; max-width: 100%; max-height: 420px; border-radius: var(--r-md); }

/* Rentabilidad: the lines of a product, opened under its row */
.rdetail { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-2) var(--sp-4) var(--sp-3); }
.rdetail__line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px var(--sp-3); }
.rdetail__wide { grid-column: 1 / -1; }
.hide { display: none; }
@media (max-width: 760px) {
  .itools > *, .itools .isearch, .itools .ifolio, .itools .field--select { flex: 1 1 100%; width: 100%; }
  .itools .inv-date { flex: 1 1 calc(50% - var(--sp-1)); width: auto; }
  .iline { grid-template-columns: minmax(0, 1fr) 120px var(--h-icon); }
  .iline--buy { grid-template-columns: 1fr 1fr; padding: var(--sp-2) 0; }
  .iline--buy .iline__main { grid-column: 1 / -1; }
  .iline--buy .iline__sub { text-align: left; }
  .iline--buy .icon-btn { justify-self: end; }
  .person__line > .iqty { width: 110px; }
  .rdetail__line { grid-template-columns: minmax(0, 1fr); }
  .cardlist { grid-template-columns: 1fr; }
}
/* Carga masiva: a sheet-like table that scrolls sideways inside its card, never the page */
.bulk { max-width: 100%; overflow-x: auto; }

.bulk__t th { position: sticky; top: 0; color: var(--muted); font-size: var(--fs-sm); text-align: left; padding: 5px 8px; border: 1px solid var(--line); background: var(--well); font-weight: 500; }

.bulk__t tr.is-mod td { background: var(--warn-soft); }
.bulk__t tr.is-err td { background: var(--bad-soft); }
.bulk__in { width: 100%; min-width: 80px; height: 28px; padding: 0 var(--sp-2); border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--text); font: 400 var(--fs-md) var(--font-body); }
.bulk__in:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent-line); }
.bulk__in:disabled { opacity: .5; }
.bulk__err { display: block; margin-top: 2px; color: var(--bad); font-size: var(--fs-sm); }
.bulk__miss { display: flex; flex-wrap: wrap; gap: var(--sp-1); min-width: 150px; }

/* ── Resultados (and the pages that share its head: Gastos, Depósitos, Cajas) ── */
.res__head { justify-content: space-between; }
.res__periods { display: flex; gap: var(--sp-2); }
.res__states { display: inline-flex; flex-wrap: wrap; gap: var(--sp-1); }
.res__periods .chip { min-width: 96px; }

.res__title { min-width: 180px; font: var(--fs-xl) var(--font-display); text-align: center; }

.res__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: var(--sp-3); }
.res__range { display: flex; flex-direction: column; gap: var(--sp-2); }
.res__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.res__date { width: auto; min-width: 150px; }
.res__neg { color: var(--bad); }
.res__delta { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; }
.res__delta--up { color: var(--ok); }
.res__delta--down { color: var(--bad); }
.res__vs { margin-top: calc(-1 * var(--sp-1)); }

.res__blocks { display: flex; flex-direction: column; gap: var(--sp-3); }
.res__block { position: relative; border-radius: var(--r-md); box-shadow: inset 0 0 0 1px var(--edge); }
.res__block > summary { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 64px; padding: var(--sp-3) var(--sp-4); list-style: none; cursor: pointer; }
.res__block > summary::-webkit-details-marker { display: none; }
.res__block > summary::after { content: '▾'; position: absolute; right: 18px; color: var(--muted); }
.res__block[open] > summary::after { content: '▴'; }
.res__btitle { padding-right: 28px; font: var(--fs-xl) var(--font-display); }
.res__bbody { display: flex; flex-direction: column; gap: var(--sp-3); padding: 0 var(--sp-4) var(--sp-4); }
.res__missing { color: var(--warn); }
.res__bar { position: relative; display: block; height: 28px; overflow: hidden; border-radius: var(--r-sm); background: var(--well); }
.res__bar i { position: absolute; inset: 0 auto 0 0; background: var(--coral-soft); }
.res__bar b { position: relative; padding-left: var(--sp-2); line-height: 28px; }
.res__list { max-height: 60vh; overflow: auto; }
/* Cortes de caja: who, hours and every count read whole, never cut with … */
.res__cuts .t__two b, .res__cuts .t__two small { overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 760px) {
  .res__cols { grid-template-columns: minmax(0, 1fr); }
  .res__title { min-width: 0; }
  .res__date { flex: 1 1 140px; min-width: 0; }
  .res__periods { flex-wrap: wrap; width: 100%; }
  .res__periods .chip { flex: 1 1 72px; min-width: 0; }
}

/* ── Permisos: one row per permission, one box per role ── */
.ptable { display: grid; gap: 0; }
.ptable__row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(var(--roles), 104px); gap: var(--sp-2); align-items: center; min-height: var(--h-field); padding: var(--sp-1) 2px; border-bottom: 1px solid var(--line); }
.ptable__row:last-child { border-bottom: 0; }
.ptable__row--head { color: var(--muted); font: var(--fs-xs)/1.1 var(--font-display); }
.ptable__role, .ptable__cell { display: flex; justify-content: center; text-align: center; }
.ptable__name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ptable__name b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 500; }
.ptable__name small { color: var(--muted); font-weight: 400; }
.pchk { position: relative; width: var(--btn-h); height: var(--btn-h); border: 0; border-radius: var(--r-sm); background: none; box-shadow: inset 0 0 0 2px var(--edge); color: var(--on-fill); font: 800 var(--fs-xl)/1 var(--font-body); cursor: pointer; }
.pchk.is-on { background: var(--coral); box-shadow: none; }
.pchk:disabled { opacity: .55; cursor: default; }
.pchk.is-on:disabled { opacity: .7; }
.pchk.is-custom::after { content: ''; position: absolute; top: -5px; right: -5px; width: 12px; height: 12px; border: 2px solid var(--bg); border-radius: 50%; background: var(--warn-fill); }
.pchk.is-dirty { outline: 3px solid var(--warn-fill); outline-offset: 2px; }
.phist { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.phist:last-child { border-bottom: 0; }
.phist ul, .plist { margin: var(--sp-1) 0 0; padding-left: 20px; font-weight: 400; }
@media (max-width: 760px) {
  .ptable__row { grid-template-columns: minmax(0, 1fr) repeat(var(--roles), 52px); }
  .ptable__row--head { font-size: 10px; }
}
@media (max-width: 480px) {
  .ptable__row { grid-template-columns: repeat(var(--roles), minmax(0, 1fr)); row-gap: var(--sp-1); padding: var(--sp-2) 2px; }
  .ptable__name, .ptable__row--head > :first-child { grid-column: 1 / -1; }
}

/* ── Hoy: total del día = cobrado + abierto, big; a bar of both; the open cuentas below ── */
.hoy { display: flex; flex-direction: column; gap: var(--sp-3); }
.hoy__head { display: flex; align-items: center; gap: var(--sp-3); }
.hoy__head .note { flex: 1; }
.hoy__total { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md); background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); }
.hoy__total b { font: calc(2 * var(--fs-num))/1 var(--font-display); }
.hoy__total small, .hoy__card small { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.hoy__bar { display: flex; height: 14px; overflow: hidden; border-radius: var(--r-pill); background: var(--well); }
.hoy__bar-paid { background: var(--ok); }
.hoy__bar-open { background: var(--warn-fill); }
.hoy__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.hoy__card { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-3) var(--sp-4); border-left: 6px solid var(--ok); border-radius: var(--r-md); background: var(--panel); box-shadow: inset 0 0 0 1px var(--edge); }
.hoy__card--open { border-left-color: var(--warn-fill); }
.hoy__card b { font: 36px/1 var(--font-display); }
.hoy__ways { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3); margin-top: var(--sp-1); }
.hoy__list { display: flex; flex-direction: column; gap: 6px; }
.hoy__apart { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-2) var(--sp-3); border-radius: var(--r-md); background: var(--warn-soft); }
.hoy__apart small { color: var(--warn); font-size: var(--fs-sm); font-weight: 500; }
.hoy__apart small.is-bad { color: var(--bad); }
@media (max-width: 600px) {
  .hoy__cards { grid-template-columns: 1fr; }
  .hoy__total b { font-size: 44px; }
}

/* ── Cajas: one card per caja, newest first; four blocks that wrap, never cut. Conteos (portal/conteos.js) reuses the card ── */
.cajas { display: flex; flex-direction: column; gap: var(--sp-3); }

/* Usuarios: the PIN shows always (Marquito, 11-nov) */
.pin-shown { font: 400 var(--fs-md, 15px)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: .2em; }
.pin-shown--big { margin-bottom: var(--sp-2); font-size: 28px; }

/* Inventario → Diferencias (Marquito, 11-nov) */
.dif { font-variant-numeric: tabular-nums; }
.dif.neg { color: var(--bad); }
.dif.pos { color: var(--ok); }
/* Recetas: Solo costo, a chip of its own width (auditoría interna 11-nov, H5) */
.chips--cost .chip { flex: 0 0 auto; min-width: 160px; }

/* ── Google Sheets look (Marquito, 11-nov: "que se viera más parecido a Google Sheets… está muy pesado todo"): light type, no
   capitals, thin grid lines ── */
html, body { font-weight: 400; line-height: 1.35; }
b, strong { font-weight: 500; }
.label, .title, .btn, .kpi__label, .kpi__value, .t__row--head, .key--ok, .fine, .chip, .field, .icon-btn, .tile b, .notice p, .dialog__text { letter-spacing: 0; text-transform: none; font-family: var(--font-body); }
.label, .kpi__label { font-weight: 500; }
.title { font-weight: 500; }
.fine, .dialog__text, .notice p, .chip, .field, .row__main small, .t__two small { font-weight: 400; }
.chip { min-width: 0; border: 0; background: var(--chip); box-shadow: inset 0 0 0 1px var(--edge); color: var(--text); font: 400 var(--fs-md)/1 var(--font-body); white-space: nowrap; cursor: pointer; flex: 0 1 auto; height: 28px; padding: 0 12px; border-radius: var(--r-sm); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
/* Sí/No (y cualquier par de opciones) de un formulario: del alto de los campos */
.form-row .chips:has(> .chip:nth-child(2):last-child) > .chip { height: var(--h-field); }

/* Tables as a sheet: a grid of thin lines, a grey head, low rows */
.t__row > .t__c { padding: 4px 8px; border-right: 1px solid var(--line); align-self: stretch; display: flex; align-items: center; }
.t__row > .t__c.r { justify-content: flex-end; }
.t__row > .t__c:last-child { border-right: 0; }
/* Editable tables (Qué se cuenta, Carga masiva): cells, not boxes */
.bulk__t { width: 100%; min-width: 1500px; border-collapse: collapse; font: 400 var(--fs-md) var(--font-body); border: 1px solid var(--line); }

.bulk__t td { padding: 0; border: 1px solid var(--line); vertical-align: middle; }
.bulk__t td > b, .bulk__t td > small, .bulk__t td > .fine { display: block; padding: 0 8px; }
.bulk__t td > b { padding-top: 4px; font-weight: 400; }

.bulk__in[type=number] { text-align: right; }

.week b, .itotal, .res__title, .res__btitle, .ptable__row--head { letter-spacing: 0; text-transform: none; font-family: var(--font-body); font-weight: 500; }
.portal__sig { white-space: nowrap; padding: 14px 12px 0; color: var(--faint); font: 500 11px/1.2 var(--v3-ui); letter-spacing: .04em; }

@media (max-width: 760px) { .portal__sig { display: none; } }
.bulk__in.is-free { color: var(--warn); font-style: italic; }

/* Sección de una tabla (Marquito, 12-nov: todo por secciones) */
.t__row--group { display: block; min-height: 0; padding: 6px 8px; background: var(--well); color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
/* Quién entró: toca para Entrar sin PIN en este equipo (13-nov) */
.portal__who { display: flex; align-items: baseline; gap: var(--sp-1); min-width: 0; padding: 0; border: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.portal__who:disabled { cursor: default; }

.portal__who small { color: var(--muted); font: 500 12px/1.2 var(--v3-ui); white-space: nowrap; }

.portal__ini { display: none; }
@media (max-width: 760px) {
    .portal__who { display: flex; flex: 0 0 auto; align-items: center; }
  .portal__ini { display: inline-flex; align-items: center; justify-content: center; width: var(--btn-h); height: var(--btn-h); border-radius: 50%; background: var(--well); font-weight: 600; font-size: var(--fs-sm); }
  .portal__who:disabled .portal__ini { color: var(--muted); }
}

/* Publicar en caja (etapa 6, 13-nov): la versión que tiene la caja, chica y en gris arriba de lo compartido */
.publish-badge { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }
.publish-badge__line { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--muted); }
.kpi.is-tap { cursor: pointer; }
/* Nómina · Detenido (Finance, 13-nov): la persona a la que se asigna, con su botón en el mismo renglón */
.nom-det { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--sp-2); min-width: 0; }
.nom-det .field { flex: 1 1 0; width: auto; min-width: 80px; }

/* Finanzas → Resumen como la hoja (Finance, 14-nov; balance.js): semanas I–V, mes y % lado a lado. La tabla se recorre de lado dentro de
   su tarjeta, nunca la página, con la columna CONCEPTO fija. Estimado en gris; los negativos en rojo. */
.bal__scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.t.bal { --cols: minmax(240px, 2fr) repeat(var(--n), minmax(104px, 1fr)) minmax(116px, 1fr) 64px; --cols-sm: var(--cols); min-width: calc(240px + var(--n) * 112px + 196px); overflow: clip; }
.bal .t__row > .t__c { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bal .t__row > .t__c:first-child { position: sticky; left: 0; z-index: 1; background: var(--card); }
.bal .t__row--head { min-height: 40px; }
.bal .t__row--head > .t__c:first-child { background: var(--card); box-shadow: inset 0 0 0 999px var(--well); }
.bal__h { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.bal__h small { font: 400 var(--fs-xs) var(--font-body); letter-spacing: 0; text-transform: none; }
.bal .bal__total > .t__c { background: var(--card); box-shadow: inset 0 0 0 999px var(--well); font-weight: 500; }
.bal .bal__sub > .t__c:first-child { padding-left: 22px; }
.bal .bal__dev > .t__c:first-child { padding-left: 38px; } /* Devolución de proveedor dentro de su categoría (Finance, 1-dic) */
.bal .bal__alert > .t__c { color: var(--warn); }
.bal .bal__group { grid-template-columns: minmax(0, 1fr); min-height: 30px; }
.bal .bal__group > .t__c { position: sticky; left: 0; width: max-content; background: var(--card); color: var(--muted); font: 500 var(--fs-sm)/1.1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.bal .is-neg { color: var(--bad); }
.bal .is-est { color: var(--muted); }
@media (max-width: 760px) {
  .t.bal { --cols: minmax(150px, 46vw) repeat(var(--n), minmax(100px, 1fr)) minmax(110px, 1fr) 60px; min-width: calc(150px + var(--n) * 106px + 176px); }
  .bal .t__row > .t__c:first-child { white-space: normal; line-height: 1.2; }
}

/* Personal → Nómina pagada (Finance, 14-nov): the load dialog, one row per COLABORADOR with the sheet's columns; it scrolls sideways on a phone */
.npag { display: grid; gap: var(--sp-1); min-width: 760px; }
.npag__row { display: grid; grid-template-columns: minmax(150px, 1.6fr) 70px 80px repeat(4, minmax(90px, 1fr)); gap: var(--sp-2); align-items: center; }
.npag__head { color: var(--muted); font: var(--fs-xs)/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; }
.npag__row .field { min-width: 0; width: 100%; }
.npag-t { min-width: 760px; }
@media (max-width: 760px) { .npag-t { min-width: 0; } }

/* Insumos → Categorías (14-nov): one row per category, its number, name, insumos and ↑ ↓ */
.cat-order { display: flex; flex-direction: column; gap: var(--sp-1); }
.cat-order__row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto 40px 40px; gap: var(--sp-2); align-items: center; min-height: var(--h-field); padding: 0 var(--sp-2); border-bottom: 1px solid var(--line); }
.cat-order__n { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
/* Mientras algo se guarda (api.js pone <html data-saving>), los botones de guardar no responden: dos toques no guardan dos veces
   (auditoría 19-nov, F1) */
html[data-saving] .btn--go, html[data-saving] .btn--bad { pointer-events: none; opacity: .55; }
