/* tablero.css — Tablero MC. Identidad CMD (carbón + oro, Space Grotesk + Inter); tema claro opcional.
   Base del Maletín CMD. Reglas de Matt: tarjetas del mismo alto, filtros en píldoras a la vista que no se mueven al
   elegir, nada de desplegables, tablas que pasan a renglones en el teléfono. */

@font-face { font-family: 'Space Grotesk'; src: url('../fonts/SpaceGrotesk-var.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-var.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

/* ═══════════════ BASE MÓVIL MC (skill mc-pwa-builder · 27-oct-2026) ═══════════════ */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --alto-pantalla: 100vh;
  --alto-portada: 100vh;
  --seguro-arriba: env(safe-area-inset-top, 0px);
  --seguro-abajo: env(safe-area-inset-bottom, 0px);
}
@supports (height: 100dvh) { :root { --alto-pantalla: 100dvh; --alto-portada: 100svh; } }
html { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
@media (pointer: coarse) { input, select, textarea { font-size: max(16px, 1em); } }
a, button, [role="button"], label, summary { touch-action: manipulation; }
button, [role="button"], summary { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
:where(button, [role="button"]) { transition: transform 120ms var(--ease-out); }
:where(button:not(:disabled), [role="button"]:not([aria-disabled="true"])):active { transform: scale(.97); }
.hoja-body, dialog { overscroll-behavior: contain; }

/* ═══════════════ TOKENS (oscuro = CMD) ═══════════════ */
:root {
  color-scheme: dark;
  --bg: #0c0c0e; --panel: #151518; --panel-2: #1c1c21; --panel-3: #24242b; --linea: #2a2a31; --linea-2: #383842;
  --tx: #edecf0; --tx-2: #a9a9b3; --tx-3: #8a8a95; --plata: #c7ccd5;
  --oro: #caa24f; --oro-claro: #e6c882; --oro-tx: #e6c882; --oro-prof: #8f7232; --sobre-oro: #15130c;
  --oro-grad: linear-gradient(145deg, #e6c882, #caa24f 60%, #8f7232);
  --oro-suave: rgba(202, 162, 79, .12); --oro-linea: rgba(202, 162, 79, .38);
  --ok: #56c28c; --ok-suave: rgba(86, 194, 140, .13); --ambar: #dca94f; --ambar-suave: rgba(220, 169, 79, .12);
  --rojo: #e57d7d; --rojo-suave: rgba(229, 125, 125, .12); --azul: #82aef0; --violeta: #b99af0; --st-cerrado: #8f8686;
  --barra-bg: rgba(12, 12, 14, .86); --nav-bg: rgba(16, 16, 19, .92); --lado-bg: #0f0f12; --th-bg: #131316;
  --sombra: 0 1px 0 rgba(255,255,255,.03) inset, 0 10px 30px -12px rgba(0,0,0,.6);
  --toast-bg: #f3efe4; --toast-tx: #15130c; --fondo-hoja: rgba(4, 4, 6, .62);
  --f-tit: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --f-tx: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 16px; --r-2: 12px; --r-3: 10px;
  --barra: 56px; --nav: 64px; --app-max: 640px;
}
:root[data-tema="claro"] {
  color-scheme: light;
  --bg: #f3f1ec; --panel: #ffffff; --panel-2: #f7f5f0; --panel-3: #ebe8e0; --linea: #e3dfd5; --linea-2: #d2cdc0;
  --tx: #17161a; --tx-2: #55535c; --tx-3: #75727c; --plata: #55535c;
  --oro: #b58a35; --oro-claro: #c79b45; --oro-tx: #86621d; --oro-prof: #8f7232; --sobre-oro: #17130a;
  --oro-suave: rgba(181, 138, 53, .12); --oro-linea: rgba(181, 138, 53, .45);
  --ok: #1f8a57; --ok-suave: rgba(31, 138, 87, .1); --ambar: #a86d0a; --ambar-suave: rgba(168, 109, 10, .1);
  --rojo: #c2413d; --rojo-suave: rgba(194, 65, 61, .09); --azul: #2f63c2; --violeta: #7246c2; --st-cerrado: #8a7f7f;
  --barra-bg: rgba(243, 241, 236, .88); --nav-bg: rgba(255, 255, 255, .94); --lado-bg: #ebe8e0; --th-bg: #f7f5f0;
  --sombra: 0 1px 2px rgba(20, 18, 10, .06), 0 8px 24px -14px rgba(20, 18, 10, .25);
  --toast-bg: #17161a; --toast-tx: #f3efe4; --fondo-hoja: rgba(20, 18, 12, .35);
}
@media (prefers-color-scheme: light) {
  :root[data-tema="auto"] {
    color-scheme: light;
    --bg: #f3f1ec; --panel: #ffffff; --panel-2: #f7f5f0; --panel-3: #ebe8e0; --linea: #e3dfd5; --linea-2: #d2cdc0;
    --tx: #17161a; --tx-2: #55535c; --tx-3: #75727c; --plata: #55535c;
    --oro: #b58a35; --oro-claro: #c79b45; --oro-tx: #86621d; --oro-prof: #8f7232; --sobre-oro: #17130a;
    --oro-suave: rgba(181, 138, 53, .12); --oro-linea: rgba(181, 138, 53, .45);
    --ok: #1f8a57; --ok-suave: rgba(31, 138, 87, .1); --ambar: #a86d0a; --ambar-suave: rgba(168, 109, 10, .1);
    --rojo: #c2413d; --rojo-suave: rgba(194, 65, 61, .09); --azul: #2f63c2; --violeta: #7246c2; --st-cerrado: #8a7f7f;
    --barra-bg: rgba(243, 241, 236, .88); --nav-bg: rgba(255, 255, 255, .94); --lado-bg: #ebe8e0; --th-bg: #f7f5f0;
    --sombra: 0 1px 2px rgba(20, 18, 10, .06), 0 8px 24px -14px rgba(20, 18, 10, .25);
    --toast-bg: #17161a; --toast-tx: #f3efe4; --fondo-hoja: rgba(20, 18, 12, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); overflow-anchor: none; }
body { margin: 0; min-height: var(--alto-pantalla); background: var(--bg); color: var(--tx); font: 400 15px/1.5 var(--f-tx);
  -webkit-font-smoothing: antialiased; font-feature-settings: 'cv11', 'ss01'; }
h1, h2, h3, h4 { font-family: var(--f-tit); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.15; }
p { margin: 0; }
a { color: var(--oro-tx); }
img { display: block; max-width: 100%; }
.ic { width: 20px; height: 20px; flex: none; }
.ic-mini { width: 14px; height: 14px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(202, 162, 79, .35); }
main, .vista { overflow-x: clip; }
.rojo { color: var(--rojo); } .ambar { color: var(--ambar); } .oro { color: var(--oro-tx); } .ok { color: var(--ok); }

/* ═══════════════ CONTROLES ═══════════════ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 13px;
  border: 1px solid var(--linea-2); background: var(--panel-2); color: var(--tx); font-weight: 600; font-size: 15px; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: transform 120ms var(--ease-out), background-color .15s, border-color .15s; }
.btn .ic { width: 19px; height: 19px; }
.btn-oro { background: var(--oro-grad); color: var(--sobre-oro); border-color: transparent; box-shadow: 0 8px 24px -12px rgba(202,162,79,.7); }
.btn-sec { background: transparent; }
.btn-ok { background: var(--ok-suave); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.btn-peligro { background: var(--rojo-suave); color: var(--rojo); border-color: color-mix(in srgb, var(--rojo) 40%, transparent); }
.btn-chico { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; gap: 6px; }
.btn-chico .ic { width: 16px; height: 16px; }
.btn-bloque { width: 100%; }
.btn:disabled { opacity: .45; cursor: default; }
.btn-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--tx-2); cursor: pointer; flex: none; text-decoration: none; }
.btn-ic-chico { width: 32px; height: 32px; }
.btn-ic-chico .ic { width: 16px; height: 16px; }
.btn-texto { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--oro-tx); font-weight: 600; font-size: 14px; padding: 6px 2px; cursor: pointer; text-decoration: none; }
.btn-wa-ic { color: #25d366; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--oro-linea); }
  .btn-oro:hover { filter: brightness(1.06); }
  .btn-ic:hover { background: var(--panel-2); color: var(--tx); }
  .btn-wa-ic:hover { color: #25d366; }
  .btn-texto:hover { text-decoration: underline; }
}

/* Píldoras: mismo relleno y peso elegidas o no → elegir no mueve nada. */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--linea-2); background: var(--panel); color: var(--tx-2); font-weight: 500; font-size: 14px; cursor: pointer;
  white-space: nowrap; transition: transform 120ms var(--ease-out), background-color .15s, border-color .15s, color .15s; }
.pill .ic { width: 16px; height: 16px; }
.pill-n { font: 600 12px/1 var(--f-tit); min-width: 18px; padding: 3px 6px; border-radius: 999px; background: var(--panel-3); color: var(--tx-2); font-variant-numeric: tabular-nums; }
.pill.on { background: var(--oro-suave); border-color: var(--oro); color: var(--oro-tx); }
.pill.on .pill-n { background: var(--oro); color: var(--sobre-oro); }
.pill[style*="--pc"].on { background: color-mix(in srgb, var(--pc) 14%, transparent); border-color: var(--pc); color: var(--tx); }
.pill[style*="--pc"]::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); flex: none; }
.pill[style*="--pc"].on .pill-n { background: var(--pc); color: #111; }
.pill:disabled { opacity: .4; cursor: default; }
@media (hover: hover) and (pointer: fine) { .pill:not(:disabled):not(.on):hover { border-color: var(--tx-3); color: var(--tx); } }
.en-filas { display: grid !important; width: 100%; }
.fila-p { display: flex; gap: inherit; }
.en-filas > .fila-p > * { flex: 1 1 auto; }
.midiendo { display: flex !important; flex-wrap: nowrap !important; width: max-content !important; max-width: none !important; }
.midiendo > .fila-p { display: contents !important; }
.midiendo > *, .midiendo > .fila-p > * { flex: none !important; }
.midiendo-ancho { width: 100% !important; max-width: none !important; }

.campo { display: grid; gap: 7px; min-width: 0; }
.campo > span, .rotulo { font-size: 12.5px; font-weight: 600; color: var(--tx-2); letter-spacing: .02em; }
.campo small, .ayuda { font-size: 12.5px; color: var(--tx-3); }
.inp { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--linea-2); background: var(--panel);
  color: var(--tx); font-size: 15px; outline: none; transition: border-color .15s, box-shadow .15s; min-width: 0; }
textarea.inp { min-height: 70px; resize: vertical; line-height: 1.45; }
@media (pointer: coarse) { .inp { font-size: 16px; } }
.inp:focus { border-color: var(--oro); box-shadow: 0 0 0 3px rgba(202,162,79,.16); }
.inp::placeholder { color: var(--tx-3); opacity: .8; }
.inp[type="date"], .inp[type="time"] { -webkit-appearance: none; appearance: none; text-align: left; min-height: 46px; }
.inp::-webkit-date-and-time-value { text-align: left; }
.buscador { position: relative; }
.buscador .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tx-3); pointer-events: none; }
.buscador .inp { padding-left: 44px; border-radius: 14px; }
.form { display: grid; gap: 18px; }
.form-2 { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fila-inp { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--linea);
  border-radius: 12px; background: var(--panel-2); cursor: pointer; }
.interruptor b { font-weight: 600; font-size: 14.5px; }
.interruptor small { display: block; color: var(--tx-3); font-size: 12.5px; }
.interruptor input { appearance: none; -webkit-appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--panel-3);
  border: 1px solid var(--linea-2); position: relative; flex: none; cursor: pointer; transition: background-color .2s; }
.interruptor input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--tx-2);
  transition: transform .2s var(--ease-out), background-color .2s; }
.interruptor input:checked { background: var(--oro-suave); border-color: var(--oro); }
.interruptor input:checked::after { transform: translateX(18px); background: var(--oro); }
.monto-m { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.monto-m .inp { font: 600 17px/1 var(--f-tit); font-variant-numeric: tabular-nums; }
.fecha-r { display: grid; gap: 8px; }
.acc-fila { display: flex; flex-wrap: wrap; gap: 8px; }
.error-form { color: var(--rojo); font-size: 14px; min-height: 20px; }

.chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--panel-3); color: var(--tx-2); white-space: nowrap; text-decoration: none; }
.chip-oro { background: var(--oro-suave); color: var(--oro-tx); }
.chip-est { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--ec); background: color-mix(in srgb, var(--ec) 14%, transparent); white-space: nowrap; flex: none; }
.chip-est::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ec); }
.chip-area { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--tx); background: color-mix(in srgb, var(--ac) 16%, transparent); border: 1px solid color-mix(in srgb, var(--ac) 40%, transparent); white-space: nowrap; }
.chip-btn { display: inline-flex; align-items: center; gap: 3px; padding: 0; border: 0; background: none; color: var(--tx-2); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ac, var(--tx-3)); flex: none; }

/* ═══════════════ AVISO Y HOJAS ═══════════════ */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav) + 18px + var(--seguro-abajo)); transform: translate(-50%, 16px); opacity: 0; z-index: 90;
  max-width: min(92vw, 460px); display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-radius: 14px; background: var(--toast-bg); color: var(--toast-tx);
  font-weight: 600; font-size: 14.5px; box-shadow: 0 16px 40px -14px rgba(0,0,0,.7); pointer-events: none;
  transition: opacity .2s var(--ease-out), transform .25s var(--ease-out); }
.toast.ver { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-mal { background: #f6d6d6; color: #4a1111; }
.toast-btn { border: 0; background: none; color: inherit; font: 700 14px/1 var(--f-tx); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; cursor: pointer; white-space: nowrap; }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.hoja-fondo { position: fixed; inset: 0; z-index: 80; background: var(--fondo-hoja); opacity: 0; transition: opacity .2s var(--ease-out);
  display: flex; align-items: flex-end; justify-content: center; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.hoja-fondo.ver { opacity: 1; }
.hoja-fondo.saliendo { opacity: 0; }
.hoja { width: min(100%, var(--app-max)); max-height: calc(var(--alto-pantalla) - 28px - var(--seguro-arriba)); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--linea); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -20px 60px -20px rgba(0,0,0,.6);
  transform: translateY(24px); transition: transform .32s var(--ease-drawer); }
.hoja-fondo.ver .hoja { transform: none; }
.hoja-fondo.saliendo .hoja { transform: translateY(30px); }
.hoja-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 12px 8px 20px; }
.hoja-cab h2 { font-size: 19px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hoja-body { flex: 1 1 auto; padding: 6px 20px 22px; overflow-y: auto; overflow-x: hidden; }
.hoja-pie { display: flex; gap: 10px; padding: 12px 20px calc(14px + var(--seguro-abajo)); border-top: 1px solid var(--linea); background: var(--panel); }
.hoja-pie .btn { flex: 1; }
.hoja-pie .btn-peligro { flex: none; width: 52px; padding: 0; }
.conf-txt { color: var(--tx-2); font-size: 15.5px; padding: 4px 0 8px; }
html.con-hoja, html.con-hoja body { overflow: hidden; }
@media (min-width: 900px) {
  .hoja-fondo { align-items: stretch; justify-content: flex-end; }
  .hoja { width: 520px; max-height: none; height: 100%; border-radius: 0; border: 0; border-left: 1px solid var(--linea); transform: translateX(30px); }
  .hoja-ancha { width: 680px; }
  .hoja-fondo.saliendo .hoja { transform: translateX(30px); }
  .hoja-pie { padding-bottom: 16px; }
}
.opciones { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-bottom: 6px; }
.opcion { display: grid; gap: 6px; align-content: start; justify-items: start; min-height: 128px; padding: 16px; border-radius: var(--r); border: 1px solid var(--linea);
  background: var(--panel-2); color: var(--tx); text-align: left; cursor: pointer; }
.opcion .ic { width: 26px; height: 26px; color: var(--oro); margin-bottom: 4px; }
.opcion b { font: 600 16px/1.2 var(--f-tit); }
.opcion small { color: var(--tx-3); font-size: 12.5px; line-height: 1.35; }
@media (hover: hover) and (pointer: fine) { .opcion:hover { border-color: var(--oro-linea); } }

/* ═══════════════ CÁSCARA ═══════════════ */
.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: var(--alto-pantalla); }
.lado { display: none; }
.col { min-width: 0; }
.barra { position: sticky; top: 0; z-index: 40; min-height: calc(var(--barra) + var(--seguro-arriba)); padding: calc(6px + var(--seguro-arriba)) 10px 6px;
  background: var(--barra-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--linea); }
.barra-in { width: 100%; max-width: var(--app-max); margin: 0 auto; display: flex; align-items: center; gap: 8px; min-height: 44px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tx); min-width: 0; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: var(--oro-grad); color: var(--sobre-oro); display: grid; place-items: center;
  font: 700 12.5px/1 var(--f-tit); letter-spacing: .02em; flex: none; box-shadow: 0 6px 16px -8px rgba(202,162,79,.8); }
.marca b { font: 600 17px/1.1 var(--f-tit); }
.marca small { display: block; font-size: 11.5px; color: var(--tx-3); font-weight: 500; }
.marca-tel { margin-left: 4px; }
.barra-tit { flex: 1; min-width: 0; font: 600 17px/1.2 var(--f-tit); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-der { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.demo-cinta { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--sobre-oro); background: var(--oro-grad); padding: 4px 8px; border-radius: 6px; margin-right: 4px; }
.main { width: 100%; max-width: var(--app-max); margin: 0 auto; padding: 14px 16px calc(var(--nav) + 30px + var(--seguro-abajo)); }

.navinf { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 6px 8px calc(6px + var(--seguro-abajo));
  background: var(--nav-bg); -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px); border-top: 1px solid var(--linea); }
.navinf-in { max-width: var(--app-max); margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; align-items: end; }
.navinf a, .nav-mas { position: relative; display: grid; justify-items: center; gap: 3px; padding: 4px 2px 3px; border-radius: 12px; text-decoration: none;
  color: var(--tx-3); font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 0; background: none; cursor: pointer; font-family: var(--f-tx); }
.nav-ic { position: relative; display: grid; place-items: center; height: 28px; }
.navinf a .ic { width: 23px; height: 23px; }
.navinf a.on { color: var(--oro-tx); }
.navinf a.on::before { content: ''; position: absolute; top: -7px; left: 50%; width: 26px; height: 3px; margin-left: -13px; border-radius: 0 0 3px 3px; background: var(--oro); }
.mas-c { display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; border-radius: 16px; background: var(--oro-grad); color: var(--sobre-oro);
  box-shadow: 0 10px 24px -10px rgba(202,162,79,.8), 0 0 0 4px var(--bg); }
.mas-c .ic { width: 24px; height: 24px; }
.nav-mas { color: var(--tx-2); }
.badge { position: absolute; top: -4px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--ambar); color: #1a1206; font: 700 11px/18px var(--f-tit); text-align: center; }
.badge.rojo { background: var(--rojo); color: #fff; }

@media (min-width: 900px) {
  .app { grid-template-columns: 232px minmax(0, 1fr); }
  .lado { position: sticky; top: 0; height: var(--alto-pantalla); display: flex; flex-direction: column; gap: 18px; padding: 18px 14px; border-right: 1px solid var(--linea); background: var(--lado-bg); }
  .lado-nav { display: grid; gap: 4px; }
  .lado-nav a { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--tx-2); text-decoration: none; font-weight: 600; font-size: 14.5px; }
  .lado-nav a.on { background: var(--oro-suave); color: var(--oro-tx); }
  .lado-nav .badge { position: static; margin-left: auto; }
  .lado-pie { margin-top: auto; display: grid; gap: 6px; font-size: 12.5px; color: var(--tx-3); overflow-wrap: anywhere; }
  .lado-pie .btn-texto { justify-self: start; }
  .navinf { display: none; }
  .marca-tel { display: none; }
  .barra { padding-left: 26px; padding-right: 26px; }
  .barra-in, .main { max-width: 1120px; }
  .main { padding: 22px 30px 60px; }
}
@media (min-width: 900px) and (hover: hover) and (pointer: fine) { .lado-nav a:not(.on):hover { background: var(--panel); color: var(--tx); } }

.vista { animation: entra .22s var(--ease-out); }
@keyframes entra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vista { animation: none; } .hoja, .toast, .hoja-fondo { transition-duration: .01s; } }

.cab-fila { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.cab-fila h1 { font-size: 26px; min-width: 0; }
.t-mes::first-letter { text-transform: uppercase; }
.sec-tit { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 10px; min-height: 36px; }
.sec-tit h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--tx); font-weight: 600; min-width: 0; }
.sec-tit h2 .ic { width: 18px; height: 18px; color: var(--oro); }
.cuenta { font: 600 12px/1 var(--f-tit); padding: 4px 7px; border-radius: 999px; background: var(--panel-3); color: var(--tx-2); font-variant-numeric: tabular-nums; }
.grupo { margin: 0 0 24px; }
.g-rojo .sec-tit h2 .ic { color: var(--rojo); }
.g-rojo .cuenta { background: var(--rojo-suave); color: var(--rojo); }
.g-ambar .sec-tit h2 .ic { color: var(--ambar); }
.vacio { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 34px 18px; color: var(--tx-2); border: 1px dashed var(--linea-2); border-radius: var(--r); }
.vacio .ic { width: 30px; height: 30px; color: var(--oro); }
.vacio b { color: var(--tx); font-family: var(--f-tit); font-size: 17px; }
.vacio-chico { color: var(--tx-3); font-size: 14px; padding: 4px 2px; }
.cargando { display: grid; place-items: center; min-height: 50vh; color: var(--tx-3); }
.girando { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--linea-2); border-top-color: var(--oro); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ═══════════════ RENGLONES (tareas, esperas, plata) ═══════════════ */
.items { display: grid; gap: 0; border: 1px solid var(--linea); border-radius: var(--r); background: var(--panel); overflow: hidden; }
.item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; min-height: 62px; border-bottom: 1px solid var(--linea); width: 100%;
  background: none; border-left: 0; border-right: 0; border-top: 0; color: var(--tx); font: inherit; text-align: left; padding: 0; }
.items > .item:last-child, .items > :last-child { border-bottom: 0; }
.check { display: grid; place-items: center; width: 44px; height: 100%; min-height: 58px; border: 0; background: none; color: var(--tx-3); cursor: pointer; padding: 0 0 0 4px; }
.check .ic { width: 24px; height: 24px; }
.item.hecha .check { color: var(--ok); }
.item.hecha .item-tx b { color: var(--tx-3); text-decoration: line-through; text-decoration-color: var(--linea-2); }
.item-tx { display: grid; gap: 3px; min-width: 0; padding: 10px 8px 10px 2px; border: 0; background: none; color: var(--tx); font: inherit; text-align: left; cursor: pointer; width: 100%; }
.item-tx b { font-weight: 600; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.item-sub { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--tx-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.item-sub > span { flex: 0 0 auto; }
.item-sub > .item-fr { flex: 0 1 auto; min-width: 4ch; overflow: hidden; text-overflow: ellipsis; color: var(--tx-2); }
.item-sub > .sep, .item-sub > i, .item-sub > svg { flex: none; }
.item-sub .quien { display: inline-flex; align-items: center; gap: 3px; }
.item-sub .quien .ic { width: 13px; height: 13px; color: var(--ambar); }
.item-sub .sep { color: var(--linea-2); }
.item-sub .ic-mini { color: var(--oro); }
.item-der { display: grid; justify-items: end; gap: 6px; padding: 8px 12px 8px 4px; }
.item > .btn-ic { margin-right: 6px; }
.item-plata { grid-template-columns: 44px minmax(0, 1fr) auto; }
.plata-ic { display: grid; place-items: center; width: 30px; height: 30px; margin-left: 9px; border-radius: 10px; background: var(--ok-suave); color: var(--ok); font: 700 15px/1 var(--f-tit); }
.plata-ic .ic { width: 16px; height: 16px; }
.item-plata.gasto .plata-ic { background: var(--rojo-suave); color: var(--rojo); }
.monto { font: 600 14.5px/1.1 var(--f-tit); font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-plata.hecha .monto { color: var(--tx-2); }
button.item { cursor: pointer; }
.dia-tit { padding: 10px 14px 6px; font: 600 12px/1 var(--f-tit); letter-spacing: .06em; text-transform: uppercase; color: var(--oro-tx); background: var(--panel-2); border-bottom: 1px solid var(--linea); }
@media (hover: hover) and (pointer: fine) { .item-tx:hover b { color: var(--oro-tx); } .check:hover { color: var(--ok); } button.item:hover { background: var(--panel-2); } }
.plegable > summary { list-style: none; cursor: pointer; }
.plegable > summary::-webkit-details-marker { display: none; }
.ic-plegar { color: var(--tx-3); transition: transform .2s var(--ease-out); }
.plegable[open] .ic-plegar { transform: rotate(180deg); }

/* ── Hoy ── */
.cab-hoy { display: grid; gap: 4px; margin: 6px 0 16px; }
.cab-hoy small { font: 600 12px/1 var(--f-tit); letter-spacing: .12em; text-transform: uppercase; color: var(--oro-tx); }
.cab-hoy h1 { font-size: 28px; }
.cab-hoy p { color: var(--tx-2); font-size: 14.5px; }
.anotar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 0 0 22px; }
.anotar-caja { position: relative; }
.anotar-caja .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--oro); pointer-events: none; }
.anotar-caja .inp { padding-left: 44px; border-radius: 14px; }
.anotar .btn { width: 50px; padding: 0; }
.chips-fr { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-fr { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px dashed var(--linea-2);
  background: var(--panel); color: var(--tx-2); font-weight: 600; font-size: 13.5px; cursor: pointer; }
.chip-fr .ic-mini { color: var(--oro); }

/* ── Agenda ── */
.mes-nav { display: flex; align-items: center; gap: 4px; }
.cal { border: 1px solid var(--linea); border-radius: var(--r); background: var(--panel); overflow: hidden; margin-bottom: 20px; }
.cal-sem { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--linea); background: var(--panel-2); }
.cal-sem span { padding: 8px 0; text-align: center; font: 600 11.5px/1 var(--f-tit); letter-spacing: .06em; text-transform: uppercase; color: var(--tx-3); }
.cal-grilla { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cel { position: relative; display: grid; grid-template-rows: auto 1fr; justify-items: center; align-content: start; gap: 4px; min-height: 58px; padding: 6px 2px;
  border: 0; border-right: 1px solid var(--linea); border-bottom: 1px solid var(--linea); background: none; color: var(--tx); cursor: pointer; font: inherit; min-width: 0; }
.cel:nth-child(7n) { border-right: 0; }
.cel.fuera { color: var(--tx-3); background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.cel-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font: 600 14px/1 var(--f-tit); font-variant-numeric: tabular-nums; }
.cel.hoy .cel-n { background: var(--oro-grad); color: var(--sobre-oro); }
.cel.sel { background: var(--oro-suave); box-shadow: inset 0 0 0 2px var(--oro); }
.cel-pts { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; max-width: 36px; }
.pt { width: 6px; height: 6px; border-radius: 50%; background: var(--ac, var(--tx-3)); }
.pt-espera { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ac, var(--tx-3)); }
.pt-plata { background: var(--ok); border-radius: 2px; }
.cel.con-atraso .cel-n { color: var(--rojo); }
.cel-tits { display: none; }
@media (min-width: 900px) {
  .cel { min-height: 104px; justify-items: stretch; padding: 6px; }
  .cel-n { justify-self: start; }
  .cel-pts { display: none; }
  .cel-tits { display: grid; gap: 3px; min-width: 0; }
  .cel-it { display: block; font-size: 11.5px; line-height: 1.25; padding: 2px 6px; border-radius: 6px; background: var(--panel-3); color: var(--tx-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
  .cel-it.cel-plata { background: var(--ok-suave); color: var(--ok); }
  .cel-mas { font-size: 11px; color: var(--tx-3); text-align: left; padding-left: 4px; }
}
@media (hover: hover) and (pointer: fine) { .cel:hover { background: var(--panel-2); } }

/* ── Frentes ── */
.filtros-fr { display: grid; gap: 10px; margin: 12px 0 20px; }
.grupo-area { margin-bottom: 24px; }
.area-tit { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--tx-2); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 10px; }
.frentes-g { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .frentes-g { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .frentes-g { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.frente-t { position: relative; display: grid; grid-template-rows: auto auto 1fr; gap: 10px; height: 148px; padding: 14px 14px 12px 16px; border-radius: var(--r);
  border: 1px solid var(--linea); background: var(--panel); color: var(--tx); text-decoration: none; min-width: 0; overflow: hidden; }
.frente-t::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ac); }
.ft-cab { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.ft-ini { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font: 700 13px/1 var(--f-tit); color: var(--tx);
  background: color-mix(in srgb, var(--ac) 20%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent); }
.ft-ini-g { width: 54px; height: 54px; border-radius: 16px; font-size: 18px; }
.ft-tit { min-width: 0; display: grid; gap: 2px; }
.ft-tit b { font: 600 16px/1.2 var(--f-tit); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-tit small { color: var(--tx-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-prox { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 13.5px; color: var(--tx-2); min-width: 0;
  padding: 8px 10px; border-radius: 10px; background: var(--panel-2); }
.ft-prox .ic { width: 16px; height: 16px; color: var(--oro); }
.ft-prox span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-prox em { font-style: normal; font-weight: 600; color: var(--tx); font-size: 12.5px; white-space: nowrap; }
.ft-prox.rojo em, .ft-prox.rojo .ic { color: var(--rojo); }
.ft-prox.espera .ic { color: var(--ambar); }
.ft-prox.sin { grid-template-columns: 16px minmax(0, 1fr); color: var(--ambar); background: var(--ambar-suave); }
.ft-prox.sin .ic { color: var(--ambar); }
.ft-pie { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--tx-3); min-width: 0; }
.ft-plata { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--tx-2); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ft-plata .ic { width: 15px; height: 15px; color: var(--ok); }
.ft-pie > span:last-child { flex: none; }
.ft-revisar { position: absolute; top: 0; right: 0; padding: 3px 9px; border-radius: 0 0 0 10px; background: var(--oro-grad); color: var(--sobre-oro); font: 700 10.5px/1.3 var(--f-tit); letter-spacing: .04em; }
.frente-t:has(.ft-revisar) .chip-est { margin-top: 10px; }
@media (hover: hover) and (pointer: fine) { .frente-t:hover { border-color: var(--linea-2); background: var(--panel-2); } .frente-t:hover .ft-prox { background: var(--panel-3); } }
.aviso-revisar { display: grid; grid-template-columns: 22px minmax(0, 1fr) 20px; gap: 12px; align-items: center; width: 100%; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--r);
  border: 1px solid var(--oro-linea); background: linear-gradient(135deg, var(--oro-suave), transparent 70%), var(--panel); color: var(--tx); text-align: left; font: inherit; font-size: 14px; cursor: pointer; }
.aviso-revisar .ic { color: var(--oro); }
.aviso-revisar b { font-weight: 600; }
.aviso-revisar.estatico { grid-template-columns: 22px minmax(0, 1fr); cursor: default; }
.aviso-revisar.estatico .rv-acc { grid-column: 1 / -1; }
.rv-f { padding: 14px 0; border-bottom: 1px solid var(--linea); display: grid; gap: 6px; }
.rv-f:last-child { border-bottom: 0; }
.rv-tit { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rv-tit b { font: 600 16px/1.2 var(--f-tit); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-f p { color: var(--tx-2); font-size: 13.5px; }
.rv-acc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ── Ficha ── */
.ficha-cab { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: start; margin: 4px 0 16px; }
.ficha-tit { display: grid; gap: 4px; min-width: 0; }
.ficha-tit h1 { font-size: 24px; overflow-wrap: anywhere; }
.ficha-tit p { color: var(--tx-2); font-size: 14px; }
.ficha-tit .chips { margin-top: 4px; }
.rapidas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.rapida { display: grid; justify-items: center; gap: 5px; padding: 11px 4px 9px; border-radius: 14px; border: 1px solid var(--linea); background: var(--panel);
  color: var(--tx); font-size: 12px; font-weight: 600; text-decoration: none; cursor: pointer; min-width: 0; font-family: var(--f-tx); }
.rapida span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rapida .ic { width: 22px; height: 22px; color: var(--oro); }
.rapida[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.proximo-c { display: grid; gap: 6px; margin-bottom: 16px; }
.proximo-c > small { font: 600 11.5px/1 var(--f-tit); letter-spacing: .1em; text-transform: uppercase; color: var(--oro-tx); padding-left: 2px; }
.proximo-c .item { border: 1px solid var(--oro-linea); border-radius: var(--r); background: linear-gradient(135deg, var(--oro-suave), transparent 75%), var(--panel); }
.tabs { position: sticky; top: calc(var(--barra) + var(--seguro-arriba) + 12px); z-index: 30; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 4px;
  margin: 0 0 16px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--linea); box-shadow: var(--sombra); }
.tab { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 38px; padding: 0 4px; border-radius: 10px; color: var(--tx-2); text-decoration: none;
  font-weight: 600; font-size: 13px; white-space: nowrap; min-width: 0; }
.tab b { font: 600 11px/1 var(--f-tit); padding: 3px 5px; border-radius: 999px; background: var(--panel-3); color: var(--tx-2); }
.tab.on { background: var(--panel); color: var(--oro-tx); box-shadow: 0 1px 6px rgba(0,0,0,.18); }
.tab.on b { background: var(--oro); color: var(--sobre-oro); }
@media (max-width: 420px) { .tab { font-size: 12px; gap: 3px; } .tab b { display: none; } }
@media (min-width: 900px) { .tabs { top: calc(var(--barra) + 18px); max-width: 640px; } }
.bloque { padding: 16px; border-radius: var(--r); border: 1px solid var(--linea); background: var(--panel); margin-bottom: 12px; }
.bloque > h2 { font-size: 14px; color: var(--tx-2); letter-spacing: .02em; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.bloque > h2 .ic { width: 17px; height: 17px; color: var(--oro); }
.bloque > h2 .der { margin-left: auto; font-size: 13.5px; }
.bloque .items { border-radius: var(--r-2); }
.desc { color: var(--tx); font-size: 15px; white-space: pre-wrap; overflow-wrap: anywhere; }
.datos { display: grid; }
.dato { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linea); font-size: 14.5px; }
.dato:first-child { padding-top: 0; }
.dato:last-child { border-bottom: 0; padding-bottom: 0; }
.dato .ic { width: 18px; height: 18px; color: var(--tx-3); margin-top: 2px; }
.dato small { display: block; color: var(--tx-3); font-size: 12px; }
.dato span { overflow-wrap: anywhere; }
.enlaces { display: grid; gap: 8px; }
.enlace { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--linea); }
.enlace a { text-decoration: none; color: var(--tx); min-width: 0; }
.enlace b { display: block; font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.enlace small { display: block; color: var(--tx-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lineas-ac { display: grid; gap: 8px; }
.linea-ac { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--linea);
  background: var(--panel-2); color: var(--tx); font: inherit; text-align: left; cursor: pointer; width: 100%; }
.linea-ac b { display: block; font-weight: 600; font-size: 14.5px; }
.linea-ac small { display: block; color: var(--tx-3); font-size: 12.5px; overflow-wrap: anywhere; }
.linea-ac .monto { color: var(--ok); }
.linea-ac.gasto .monto { color: var(--rojo); }
.linea-ac.apagada { opacity: .5; }
.nota-ac { margin-top: 12px; white-space: pre-wrap; }
.mini-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mini-nums + .mini-nums { margin-top: 8px; }
.mini-nums div { padding: 10px 8px; border-radius: 10px; background: var(--panel-2); text-align: center; min-width: 0; }
.mini-nums small { display: block; color: var(--tx-3); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-nums b { display: block; font: 600 14px/1.25 var(--f-tit); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; margin-top: 3px; }
@media (max-width: 480px) { .mini-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.contactos { display: grid; gap: 0; }
.contacto { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linea); }
.contacto:last-child { border-bottom: 0; }
.avatar-c { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: var(--panel-3); color: var(--oro-tx); font: 600 14px/1 var(--f-tit); }
.contacto-tx { display: grid; gap: 2px; min-width: 0; border: 0; background: none; color: var(--tx); text-align: left; font: inherit; cursor: pointer; padding: 0; }
.contacto-tx b { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contacto-tx small { color: var(--tx-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contacto-acc { display: flex; }
.historial { list-style: none; margin: 0; padding: 0; display: grid; }
.hito { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 0 0 16px; }
.hito::before { content: ''; position: absolute; left: 13px; top: 28px; bottom: 0; width: 1px; background: var(--linea-2); }
.hito:last-child { padding-bottom: 0; }
.hito:last-child::before { display: none; }
.hito-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--tx-2); }
.hito-ic .ic { width: 14px; height: 14px; }
.hito-estado .hito-ic, .hito-alta .hito-ic { background: var(--oro-suave); color: var(--oro-tx); }
.hito-hecho .hito-ic, .hito-plata .hito-ic { background: var(--ok-suave); color: var(--ok); }
.hito p { font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; padding-top: 3px; }
.hito small { display: block; margin-top: 2px; color: var(--tx-3); font-size: 12px; }

/* ── Plata ── */
.pills-mon { margin-bottom: 8px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 12px; }
.kpi { padding: 14px 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--linea); min-width: 0; }
.kpi small { color: var(--tx-3); font-size: 12.5px; font-weight: 600; }
.kpi b { display: block; font: 600 22px/1.15 var(--f-tit); margin-top: 4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi span { color: var(--tx-3); font-size: 12px; }
.kpi-ok b { color: var(--ok); }
.kpi-gasto b { color: var(--rojo); }
.kpi-oro { border-color: var(--oro-linea); background: linear-gradient(150deg, var(--oro-suave), transparent 80%), var(--panel); }
.kpi-oro b { color: var(--oro-tx); }
@media (max-width: 700px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi b { font-size: 19px; } }
.fijo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fijo small { display: block; color: var(--tx-3); font-size: 12.5px; font-weight: 600; }
.fijo b { display: block; font: 600 18px/1.25 var(--f-tit); font-variant-numeric: tabular-nums; margin: 3px 0 2px; }
.fijo span { color: var(--tx-3); font-size: 12px; }
.graf { width: 100%; height: auto; display: block; }
.graf .g-eje { stroke: var(--linea-2); stroke-width: 1; }
.graf .b-cobrado { fill: var(--ok); }
.graf .b-previsto { fill: none; stroke: var(--ok); stroke-width: 1.5; stroke-dasharray: 4 3; }
.graf .b-gasto { fill: color-mix(in srgb, var(--rojo) 75%, transparent); }
.graf .g-mes { fill: var(--tx-3); font: 600 12px var(--f-tit); text-anchor: middle; }
.graf .g-hoy { fill: var(--oro-tx); }
.leyenda { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 12.5px; color: var(--tx-2); }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 12px; height: 12px; border-radius: 3px; }
.l-cobrado { background: var(--ok); } .l-previsto { border: 1.5px dashed var(--ok); } .l-gasto { background: color-mix(in srgb, var(--rojo) 75%, transparent); }
.tabla-env { border: 1px solid var(--linea); border-radius: var(--r); overflow: hidden; background: var(--panel); }
table.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-size: 12px; font-weight: 600; color: var(--tx-3); letter-spacing: .03em; padding: 11px 14px; border-bottom: 1px solid var(--linea); background: var(--th-bg); white-space: nowrap; }
.tabla td { padding: 12px 14px; border-bottom: 1px solid var(--linea); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr { cursor: pointer; }
.tabla td b { font-weight: 600; }
.tabla .sub { display: block; color: var(--tx-3); font-size: 12.5px; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (hover: hover) and (pointer: fine) { .tabla tbody tr:hover td { background: var(--panel-2); } }
@media (max-width: 899px) {
  table.tabla thead { display: none; }
  table.tabla, .tabla tbody, .tabla tr, .tabla td { display: block; }
  .tabla tr { padding: 12px 14px; border-bottom: 1px solid var(--linea); }
  .tabla tr:last-child { border-bottom: 0; }
  .tabla td { padding: 2px 0; border: 0; }
  .tabla td[data-l] { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; font-size: 13.5px; }
  .tabla td[data-l]::before { content: attr(data-l); color: var(--tx-3); font-size: 12.5px; }
  .tabla .num { text-align: left; }
}

/* ── Ajustes ── */
.aviso-estado { display: grid; gap: 12px; }
.aviso-estado p { display: flex; gap: 10px; align-items: flex-start; color: var(--tx-2); font-size: 14.5px; }
.aviso-estado p .ic { margin-top: 1px; color: var(--oro); }
.aviso-estado p.ok { color: var(--ok); }
.aviso-estado p.ok .ic { color: var(--ok); }
.equipos { display: grid; gap: 6px; }
.equipo { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px 8px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--linea); font-size: 14px; }
.equipo .ic { color: var(--tx-3); }
.equipo small { display: block; color: var(--tx-3); font-size: 12px; }
.pasos-inst { margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--tx-2); font-size: 14px; }
.version { text-align: center; margin: 18px 0 6px; }

/* ── formularios: pasos que se abren solos, chips editables ── */
.pasos { display: grid; gap: 10px; }
.paso { border: 1px solid var(--linea); border-radius: var(--r); background: var(--panel-2); overflow: hidden; }
.paso-cab { display: grid; grid-template-columns: 28px auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 14px; }
.paso-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--panel-3); color: var(--tx-2); font: 700 13px/1 var(--f-tit); }
.paso.abierto .paso-n { background: var(--oro-grad); color: var(--sobre-oro); }
.paso.hecho .paso-n { background: var(--ok-suave); color: var(--ok); }
.paso-cab b { font: 600 15px/1.2 var(--f-tit); white-space: nowrap; }
.paso-res { color: var(--tx-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.paso-ed { visibility: hidden; }
.paso.hecho .paso-ed { visibility: visible; }
.paso-body { display: none; padding: 4px 14px 16px; }
.paso.abierto .paso-body { display: grid; gap: 16px; }
.paso.abierto { border-color: var(--oro-linea); background: var(--panel); }
.paso-sig { justify-self: end; }
.chips-ed { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-ed:empty { display: none; }
.chip-ed { padding-right: 4px; gap: 2px; }
.chip-ed button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; background: none; color: var(--tx-3); cursor: pointer; border-radius: 50%; }
.chip-ed .ic { width: 13px; height: 13px; }
#ff-socios { display: grid; gap: 8px; }

/* ── entrada ── */
.ingreso { min-height: var(--alto-pantalla); display: grid; place-items: center; padding: calc(24px + var(--seguro-arriba)) 20px calc(24px + var(--seguro-abajo));
  background: radial-gradient(120% 70% at 50% -10%, rgba(202,162,79,.16), transparent 60%), var(--bg); }
.ingreso-caja { width: min(100%, 400px); display: grid; gap: 18px; }
.ingreso-marca { display: grid; justify-items: center; gap: 12px; text-align: center; margin-bottom: 6px; }
.ingreso-marca .logo { width: 64px; height: 64px; border-radius: 18px; font-size: 21px; }
.ingreso-marca h1 { font-size: 30px; }
.ingreso-marca p { color: var(--tx-2); font-size: 14.5px; max-width: 30ch; }
.ingreso-pie { text-align: center; color: var(--tx-3); font-size: 12.5px; }
.ingreso-caja .btn-texto { justify-self: center; }

@media (max-width: 380px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .opciones { grid-template-columns: minmax(0, 1fr); }
  .opcion { min-height: 0; }
  .rapidas { gap: 6px; }
}
@media print {
  .lado, .navinf, .barra, .anotar, .tabs { display: none !important; }
  .main { padding: 0; max-width: none; }
}

/* ── tanda 2: filtros compactos, gráfico en HTML, Hoy en dos columnas ── */
.pills-chicas { gap: 6px; }
.pills-chicas .pill { min-height: 34px; padding: 0 11px; font-size: 13.5px; gap: 6px; }
.pills-chicas .pill-n { font-size: 11px; padding: 2px 5px; min-width: 16px; }
.pills-chicas .pill[style*="--pc"]::before { width: 7px; height: 7px; }
@media (max-width: 899px) { .t-mes { font-size: 22px !important; } }
.graf { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; height: 190px; align-items: stretch; padding-top: 6px; }
.gc { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; min-width: 0; }
.gc-barras { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3px; align-items: end; border-bottom: 1px solid var(--linea-2); padding: 0 2px; }
.gc-ing, .gc-gas { position: relative; height: 100%; display: flex; flex-direction: column-reverse; }
.gc i { display: block; width: 100%; border-radius: 4px 4px 0 0; min-height: 2px; }
.gc .b-cobrado { background: var(--ok); }
.gc .b-previsto { background: transparent; border: 1.5px dashed var(--ok); border-bottom: 0; }
.gc-ing .b-cobrado + .b-previsto, .gc-ing .b-previsto { border-radius: 4px 4px 0 0; }
.gc .b-gasto { background: color-mix(in srgb, var(--rojo) 72%, transparent); }
.gc-mes { text-align: center; font: 600 12px/1 var(--f-tit); color: var(--tx-3); }
.gc-hoy .gc-mes { color: var(--oro-tx); }
.gc-hoy .gc-barras { background: linear-gradient(to top, var(--oro-suave), transparent 70%); border-radius: 6px 6px 0 0; }
.leyenda-max { margin-left: auto; color: var(--tx-3); }
.hoy-cols { display: block; }
@media (min-width: 1100px) {
  .hoy-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
}

.hoja-llena { height: calc(var(--alto-pantalla) - 28px - var(--seguro-arriba)); }
.t-confecha { display: grid; gap: 18px; }
.t-confecha.apagado .campo > span, .t-confecha.apagado .inp { opacity: .5; }

/* ── Hoy compacto: «ver las otras» y pendientes por frente ── */
.mas-items { margin-top: 8px; }
.mas-items > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; color: var(--oro-tx); font-weight: 600; font-size: 14px; cursor: pointer; }
.mas-items > summary::-webkit-details-marker { display: none; }
.mas-items[open] > summary .ic-plegar { transform: rotate(180deg); }
.mas-items > .items { margin-top: 4px; }
.chip-cuenta { text-decoration: none; border-style: solid; color: var(--tx); }
.chip-cuenta b { font: 600 11.5px/1 var(--f-tit); padding: 3px 6px; border-radius: 999px; background: var(--panel-3); color: var(--tx-2); }
.nota-hoy { margin-top: 10px; }
