/* JAR Tecnologías — panel de validación y administración.
   Rediseño visual (nov. 2026): mismo sistema de clases e IDs que usa app.js/auditoria.js,
   nuevo lenguaje visual estilo "producto premium" (Kowalski/Linear): tokens OKLCH, sombras
   multicapa, bordes micro-translúcidos, tipografía geométrica con tabular-nums y
   microinteracciones con curvas de resorte. No se tocó ninguna clase ni id que lea JS. */
:root {
  /* ---- identidad de marca JAR, convertida a OKLCH (mismos nombres de variable) ---- */
  --azo: oklch(27% 0.085 262); --az: oklch(40% 0.135 261); --az2: oklch(56% 0.175 256); --az-claro: oklch(95.5% 0.025 252);
  --tx: oklch(23% 0.03 262); --sutil: oklch(48% 0.025 259); --gr: oklch(97.2% 0.006 258); --borde: oklch(26% 0.06 262 / .09); --tarjeta: oklch(99.3% 0.002 258);
  --grad: linear-gradient(132deg, oklch(61% 0.16 250), oklch(49% 0.175 263));
  --ok: oklch(52% 0.12 157); --ok-fondo: oklch(94.5% 0.045 157); --mal: oklch(55% 0.185 25); --mal-fondo: oklch(95% 0.04 23); --pend: oklch(55% 0.125 73); --pend-fondo: oklch(94.5% 0.058 85);
  --radio: 20px; --radio-s: 12px;
  --sombra: 0 1px 1px oklch(26% 0.06 262 / .045), 0 10px 26px oklch(26% 0.06 262 / .07);
  --sombra-hover: 0 4px 10px oklch(26% 0.06 262 / .06), 0 22px 44px oklch(26% 0.06 262 / .13);
  --hh: 68px;

  /* ---- tokens nuevos: superficie, acento, movimiento, tipografía ---- */
  --bg-wash-1: oklch(93% 0.035 252 / .5); --bg-wash-2: oklch(92% 0.03 230 / .32);
  --surface-2: oklch(95.8% 0.008 255); --borde-fuerte: oklch(26% 0.06 262 / .15);
  --accent: var(--az2); --accent-ring: oklch(56% 0.175 256 / .22);
  --ease: cubic-bezier(.16, 1, .3, 1); --ease-snap: cubic-bezier(.34, 1.56, .64, 1);
  --font-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --rail-w: 80px;

  font-family: var(--font-body); color: var(--tx);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }
body {
  margin: 0; font-size: 15px; line-height: 1.45; min-height: 100vh; color: var(--tx);
  background:
    radial-gradient(1100px 620px at 14% -8%, var(--bg-wash-1), transparent 60%),
    radial-gradient(900px 560px at 104% 4%, var(--bg-wash-2), transparent 55%),
    var(--gr);
  background-attachment: fixed;
}
[hidden] { display: none !important; }
h2 { font: 700 .92rem/1.25 var(--font-display); letter-spacing: .4px; margin: 0 0 1rem; color: var(--azo); text-transform: uppercase; }
h3 { font: 650 .76rem/1.3 var(--font-mono); text-transform: uppercase; letter-spacing: .07em; color: var(--sutil); margin: 1rem 0 .5rem; }
.sutil { color: var(--sutil); font-size: .9rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- entrada de vistas: fade-up suave al mostrarse (sin tocar JS, [hidden] ya lo dispara) ---------- */
.vista:not([hidden]) { animation: entrarVista .45s var(--ease) both; }
.vista:not([hidden]) > * { animation: entrarVista .5s var(--ease) both; }
.vista:not([hidden]) > *:nth-child(2) { animation-delay: .03s; }
.vista:not([hidden]) > *:nth-child(3) { animation-delay: .06s; }
.vista:not([hidden]) > *:nth-child(4) { animation-delay: .09s; }
.vista:not([hidden]) > *:nth-child(5) { animation-delay: .12s; }
.vista:not([hidden]) > *:nth-child(n+6) { animation-delay: .14s; }
@keyframes entrarVista { from { opacity: 0; transform: translateY(8px); } }

/* ---------- cabecera ---------- */
.barra { position: sticky; top: 0; z-index: 50; height: var(--hh); display: flex; align-items: center; gap: 18px; padding: 0 clamp(14px, 4vw, 48px);
  background: oklch(99.5% 0.002 258 / .85); -webkit-backdrop-filter: saturate(1.5) blur(14px); backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--borde); box-shadow: 0 1px 0 oklch(99% 0 0 / .6) inset, 0 10px 24px oklch(26% 0.06 262 / .06); }
.marca { display: flex; align-items: center; gap: 10px; flex: none; color: var(--tx); }
.marca .logo { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(145deg, var(--azo), var(--az2)); color: #fff;
  display: grid; place-items: center; font: 800 14px/1 var(--font-display); letter-spacing: -.3px;
  box-shadow: 0 1px 0 oklch(100% 0 0 / .25) inset, 0 6px 16px oklch(40% 0.14 261 / .4); }
.marca b { display: block; font: 700 18px/1 var(--font-display); letter-spacing: -.2px; }
.marca small { display: block; font: 650 9px/1.3 var(--font-mono); letter-spacing: 1.4px; color: var(--az); margin-top: 4px; text-transform: uppercase; }
.marca.grande .logo { width: 48px; height: 48px; font-size: 18px; border-radius: 14px; }
.marca.grande b { font-size: 23px; }
.pestanas { display: flex; align-items: center; gap: 2px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; position: relative; }
.pestanas::-webkit-scrollbar { display: none; }
.pestana-pild { position: absolute; z-index: 0; left: 0; top: 0; border-radius: 22px; background: var(--az-claro); pointer-events: none; opacity: 0;
  transition: transform .4s var(--ease), width .4s var(--ease), height .4s var(--ease), opacity .25s var(--ease); }
#pestanas button[data-vista] { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; }
.pestanas button { background: none; border: 0; padding: 10px 14px; border-radius: 22px; font: 650 12px var(--font-body); letter-spacing: .3px;
  text-transform: uppercase; color: var(--tx); cursor: pointer; white-space: nowrap; transition: color .2s var(--ease), transform .2s var(--ease), background-color .2s; }
.pestanas button:hover { color: var(--az); transform: translateY(-1px); }
.pestanas button[aria-current="page"] { color: var(--az); }
.pestanas button[data-vista]::before { content: ""; display: block; width: 16px; height: 16px; flex: none; background-color: currentColor; opacity: .62;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; transition: opacity .2s; }
.pestanas button[aria-current="page"]::before { opacity: .92; }
.pestanas .contador { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 2px; padding: 0 5px; border-radius: 10px;
  background: var(--mal); color: #fff; font: 700 10.5px var(--font-mono); letter-spacing: 0; box-shadow: 0 2px 6px oklch(55% 0.185 25 / .45); }
.usuario { display: flex; align-items: center; gap: 10px; flex: none; font-size: .85rem; color: var(--sutil); white-space: nowrap; }
.boton-menu { display: none; width: 44px; height: 44px; border: 0; border-radius: 14px; background: var(--az); cursor: pointer; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px; padding: 0; flex: none; transition: transform .18s var(--ease-snap); }
.boton-menu:active { transform: scale(.94); }
.boton-menu i { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: #fff; transition: transform .25s var(--ease), opacity .2s; }
.barra.abierta .boton-menu i:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.barra.abierta .boton-menu i:nth-child(2) { opacity: 0; }
.barra.abierta .boton-menu i:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
.velo { position: fixed; inset: 0; background: oklch(27% 0.07 262 / .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.velo.visible { opacity: 1; pointer-events: auto; }

main { max-width: 1320px; margin: 0 auto; padding: clamp(12px, 2.5vw, 28px); transition: margin-left .3s var(--ease); }

/* ---------- íconos de navegación (data-vista), trazo propio estilo Lucide ---------- */
#pestanas button[data-vista="capital"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V10M12 20V4M20 20v-7'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="aprobaciones"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="discrepancias"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l9.3 16H2.7L12 3.5z'/%3E%3Cpath d='M12 10v4.2M12 17.2h.01'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="auditoria"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7.5 2.7v5.4c0 4.6-3.2 7.4-7.5 8.4-4.3-1-7.5-3.8-7.5-8.4V5.7L12 3z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="binance"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='9' r='5.2'/%3E%3Ccircle cx='15.2' cy='15.2' r='5.2'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="clientes"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.6'/%3E%3Cpath d='M2.5 20c.6-3.6 3.3-5.6 6.5-5.6s5.9 2 6.5 5.6'/%3E%3Cpath d='M16 4.6a3.4 3.4 0 0 1 0 6.6M18 14.6c2 .7 3.2 2.6 3.5 5.4'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="pagos"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='6' width='18' height='13' rx='2.2'/%3E%3Cpath d='M3 10.3h18'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="proformas"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l4 4v14H7z'/%3E%3Cpath d='M14 3v4h4M9 12.5h6M9 16.5h6'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="gastos"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7.5h13.5M14 4.3l3.5 3.2-3.5 3.2'/%3E%3Cpath d='M20 16.5H6.5M10 13.3l-3.5 3.2 3.5 3.2'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="cierre"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2.2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3Cpath d='M9 15.3l2 2 4-4.3'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="fondos"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10l9-6 9 6'/%3E%3Cpath d='M5 10v9M9.5 10v9M14.5 10v9M19 10v9M3 21h18'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="cxp"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3.3' width='14' height='17.4' rx='2'/%3E%3Cpath d='M9 3.3V2.3h6v1'/%3E%3Cpath d='M8 9.3h8M8 13h8M8 16.7h5'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="inventario"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.3l9-4 9 4-9 4-9-4z'/%3E%3Cpath d='M3 7.3v9.8l9 4 9-4V7.3M12 11.3v9.8'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="presupuestos"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='2.8' width='14' height='18.4' rx='2.2'/%3E%3Cpath d='M8 7h8M8.5 11.5h.01M12 11.5h.01M15.5 11.5h.01M8.5 15h.01M12 15h.01M15.5 15h.01M8.5 18h.01M12 18h3.5'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="diferencial"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13l-3.5-3.5M20 16H7l3.5 3.5'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="conciliacion"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4v6h6M20 20v-6h-6'/%3E%3Cpath d='M4.5 10.2a7.7 7.7 0 0113.6-4.7M19.5 13.8a7.7 7.7 0 01-13.6 4.7'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="reportes"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 3h10l4 4v14H5z'/%3E%3Cpath d='M8 17v-4M12 17v-7M16 17v-2.5'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="usuarios"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8' r='3.2'/%3E%3Cpath d='M3.2 20c0-3.3 2.6-6 5.8-6s5.8 2.7 5.8 6'/%3E%3Ccircle cx='17.3' cy='9' r='2.4'/%3E%3Cpath d='M15.6 14.2c2.6.4 4.4 2.5 4.4 5'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="cargar"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M8 8l4-4 4 4'/%3E%3Cpath d='M4 16v3a2 2 0 002 2h12a2 2 0 002-2v-3'/%3E%3C/svg%3E"); }

/* ---------- tarjetas y rejillas ---------- */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra);
  padding: clamp(14px, 2vw, 22px); transition: box-shadow .3s var(--ease), border-color .3s var(--ease); min-width: 0; }
.tarjeta.sin-relleno { padding: 0; overflow: hidden; }
.dos-col { display: grid; grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); gap: clamp(12px, 2vw, 22px); align-items: start; }
.titulo-fila { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .8rem; flex-wrap: wrap; }
.titulo-fila h2 { margin: 0; }
.relleno { padding: clamp(14px, 2vw, 22px) clamp(14px, 2vw, 22px) 0; }
.espacio-arriba { margin-top: clamp(12px, 2vw, 22px); }
.portada { position: relative; overflow: hidden; background: linear-gradient(110deg, var(--azo) 20%, var(--az) 100%); color: #fff; border-radius: var(--radio);
  padding: clamp(16px, 3vw, 26px) clamp(16px, 3vw, 30px); margin-bottom: clamp(12px, 2vw, 22px); box-shadow: 0 1px 0 oklch(100% 0 0 / .1) inset, 0 18px 36px oklch(27% 0.085 262 / .32); }
.portada::after { content: ""; position: absolute; inset: 0; background: radial-gradient(420px 220px at 88% -20%, oklch(70% 0.1 250 / .4), transparent 70%); pointer-events: none; }
.portada h1 { font: 700 clamp(1.1rem, 2.3vw, 1.5rem)/1.2 var(--font-display); margin: 0; letter-spacing: -.2px; position: relative; }
.portada p { margin: .4rem 0 0; color: oklch(95% 0.02 252); position: relative; max-width: 72ch; }

/* ---------- formularios ---------- */
label { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; font-weight: 600; color: var(--tx); margin-bottom: .85rem; min-width: 0; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--tx); padding: .64rem .82rem; border: 1px solid var(--borde-fuerte); border-radius: var(--radio-s);
  background: var(--surface-2); min-width: 0; width: 100%; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background-color .18s var(--ease); }
input:hover, select:hover, textarea:hover { border-color: oklch(26% 0.06 262 / .22); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--tarjeta); box-shadow: 0 0 0 4px var(--accent-ring); }
.fila { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.error { color: var(--mal); font-size: .88rem; min-height: 1.2em; margin: 0 0 .6rem; }
fieldset.cambio { border: 1px solid var(--borde); background: var(--surface-2); border-radius: var(--radio-s); padding: .9rem 1rem .2rem; margin: 0 0 .9rem; min-width: 0; }
fieldset.cambio legend { font-weight: 700; font-size: .78rem; padding: 0 .4rem; color: var(--az); text-transform: uppercase; letter-spacing: .5px; }
.segmentado { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .4rem; margin-bottom: .9rem; }
.segmentado label { margin: 0; }
.segmentado input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.segmentado span { display: block; text-align: center; padding: .62rem; border: 1px solid var(--borde-fuerte); border-radius: 22px; background: var(--tarjeta); cursor: pointer;
  font-weight: 650; font-size: .85rem; transition: all .25s var(--ease); }
.segmentado span:hover { border-color: var(--az2); color: var(--az); }
.segmentado input:checked + span { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 1px 0 oklch(100% 0 0 / .18) inset, 0 6px 16px oklch(56% 0.175 256 / .35); }
.segmentado input:focus-visible + span { outline: 2px solid var(--az2); outline-offset: 2px; }

/* ---------- botones ---------- */
.btn { position: relative; overflow: hidden; font: 650 .88rem var(--font-body); letter-spacing: .2px; border-radius: 26px; padding: .64rem 1.3rem; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease); display: inline-flex; align-items: center; justify-content: center; gap: .4rem; isolation: isolate; }
.btn:hover { transform: translateY(-1.5px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .1s; }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }
.btn.primario { background: var(--grad); color: #fff; box-shadow: 0 1px 0 oklch(100% 0 0 / .22) inset, 0 6px 16px oklch(56% 0.175 256 / .35); }
.btn.primario:hover { box-shadow: 0 1px 0 oklch(100% 0 0 / .22) inset, 0 10px 24px oklch(56% 0.175 256 / .45); }
.btn.primario::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(115deg, transparent 40%, oklch(100% 0 0 / .35) 50%, transparent 60%);
  transform: translateX(-120%); transition: transform .6s var(--ease); }
.btn.primario:hover::after { transform: translateX(120%); }
.btn.exito { background: linear-gradient(135deg, oklch(60% 0.13 157), oklch(46% 0.11 157)); color: #fff; box-shadow: 0 1px 0 oklch(100% 0 0 / .2) inset, 0 6px 16px oklch(52% 0.12 157 / .35); }
.btn.peligro { background: var(--tarjeta); color: var(--mal); border-color: oklch(55% 0.185 25 / .35); }
.btn.peligro:hover { background: var(--mal-fondo); border-color: var(--mal); }
.btn.fantasma { background: var(--tarjeta); border-color: var(--borde-fuerte); color: var(--az); }
.btn.fantasma:hover { background: var(--az-claro); border-color: var(--az2); }
.btn.mini { padding: .34rem .8rem; font-size: .76rem; }
.btn.ancho { width: 100%; }
.barra .btn.fantasma { padding: .46rem 1rem; }

/* ---------- login ---------- */
.login { min-height: calc(100vh - 60px); display: grid; place-items: center; }
.login-caja { width: min(400px, 100%); animation: entrarVista .6s var(--ease) both; }
.login-caja .sutil { margin: .4rem 0 1.3rem; }
body.en-login {
  background:
    radial-gradient(900px 600px at 20% 10%, oklch(55% 0.12 255 / .55), transparent 60%),
    radial-gradient(1000px 700px at 100% 100%, oklch(45% 0.1 262 / .5), transparent 65%),
    linear-gradient(135deg, var(--azo) 15%, var(--az) 100%);
}

/* ---------- carga de imágenes ---------- */
.soltar { position: relative; display: grid; place-items: center; min-height: 140px; border: 2px dashed oklch(56% 0.175 256 / .35); border-radius: var(--radio-s); background: var(--surface-2);
  text-align: center; color: var(--sutil); font-weight: 500; cursor: pointer; overflow: hidden; transition: border-color .25s var(--ease), background .25s var(--ease), transform .2s var(--ease); }
.soltar:hover { transform: translateY(-1px); }
.soltar:hover, .soltar.encima { border-color: var(--az2); background: var(--az-claro); }
.soltar input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.soltar img { max-width: 100%; max-height: 260px; display: block; }
.mini-soltar { min-height: 90px; }

/* ---------- listas ---------- */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .78rem .4rem; margin: 0 -.4rem; border-top: 1px solid var(--borde); flex-wrap: wrap;
  border-radius: var(--radio-s); transition: background-color .2s var(--ease), transform .2s var(--ease); }
.lista li:first-child { border-top: 0; }
.lista li:hover { background: var(--surface-2); transform: translateX(2px); }
.lista li > div:first-child { min-width: 0; flex: 1 1 220px; }
.lista .principal { font-weight: 650; overflow-wrap: anywhere; }
.lista .derecha { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.lista .tachado .principal { text-decoration: line-through; color: var(--sutil); }
.lista .motivo { font-size: .82rem; color: var(--mal); margin-top: .2rem; }
.lista .pagador { font-size: .82rem; color: var(--ok); margin-top: .2rem; }
.vacio { color: var(--sutil); padding: 1.5rem 0; text-align: center; }
.estado { display: inline-block; padding: .18rem .62rem; border-radius: 99px; font-size: .72rem; font-weight: 700; text-transform: capitalize; white-space: nowrap; letter-spacing: .2px; }
.estado.pendiente { background: var(--pend-fondo); color: var(--pend); }
.estado.verificado, .estado.aprobada { background: var(--ok-fondo); color: var(--ok); }
.estado.rechazado, .estado.rechazada { background: var(--mal-fondo); color: var(--mal); }
.etiqueta { display: inline-block; padding: .14rem .55rem; border-radius: 8px; background: var(--az-claro); font: 700 .7rem var(--font-mono); color: var(--az); white-space: nowrap; }

/* ---------- indicadores y tablas ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: clamp(10px, 1.6vw, 16px); margin-bottom: clamp(12px, 2vw, 18px); }
.kpi { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.1rem 1.25rem; box-shadow: var(--sombra);
  position: relative; transition: transform .3s var(--ease), box-shadow .3s var(--ease); min-width: 0; }
.kpi::after { content: ""; position: absolute; left: 1.25rem; right: 1.25rem; bottom: 0; height: 2px; border-radius: 2px; background: var(--az2); transform: scaleX(.3); transform-origin: left; opacity: .5; transition: transform .35s var(--ease), opacity .35s var(--ease); }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); }
.kpi:hover::after { transform: scaleX(1); opacity: 1; }
.kpi .etq { font: 700 .68rem var(--font-mono); color: var(--sutil); text-transform: uppercase; letter-spacing: .5px; }
.kpi .val { font: 700 clamp(1.2rem, 2.2vw, 1.6rem) var(--font-display); font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; margin-top: .3rem; color: var(--azo); overflow-wrap: anywhere; letter-spacing: -.3px; }
.kpi.ok::after { background: var(--ok); } .kpi.ok .val { color: var(--ok); }
.kpi.pend::after { background: var(--pend); } .kpi.pend .val { color: var(--pend); }
.filtros { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 .8rem; margin-bottom: clamp(12px, 2vw, 18px); align-items: end; }
.filtros.compacto { margin-bottom: .6rem; }
.tarjeta .filtros.compacto { border: 0; padding: 0; box-shadow: none; }
.acciones-filtro { display: flex; gap: .5rem; margin-bottom: .85rem; flex-wrap: wrap; }
.tabla-envoltura { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; }
.tabla th { text-align: left; font: 650 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--sutil); padding: .78rem 1rem; background: var(--surface-2);
  border-bottom: 1px solid var(--borde); white-space: nowrap; }
.tabla td { padding: .74rem 1rem; border-bottom: 1px solid var(--borde); font-variant-numeric: tabular-nums; }
.tabla tbody tr { transition: background-color .15s var(--ease); }
.tabla tbody tr[tabindex] { cursor: pointer; }
.tabla tbody tr[tabindex]:hover { background: var(--az-claro); }
.tabla tbody tr:focus-visible { outline: 2px solid var(--az2); outline-offset: -2px; }
.paginacion { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; gap: .5rem; flex-wrap: wrap; }
.paginacion .btn { margin-left: .4rem; }
.saldo-btn { background: none; border: 0; font: inherit; font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer; padding: .25rem .45rem; border-radius: 8px; color: var(--azo); transition: background-color .18s var(--ease); }
.saldo-btn:hover { background: var(--az-claro); text-decoration: underline; }
.negativo { color: var(--mal) !important; } .positivo { color: var(--ok) !important; }
.mini-tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.mini-tabla td { padding: .4rem 0; border-bottom: 1px solid var(--borde); vertical-align: top; }
.mini-tabla td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; overflow-wrap: anywhere; padding-left: .8rem; }
.mini-tabla tr.total td { border-bottom: 0; font-weight: 800; color: var(--azo); }
.bloque { margin-bottom: 1.2rem; }
.reporte-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: clamp(12px, 2vw, 20px); margin-top: 1rem; }
.reporte-titulo { margin: .4rem 0 0; color: var(--sutil); }

/* ---------- avisos ---------- */
.resultado { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: var(--radio-s); border: 1px solid; animation: entrarVista .3s var(--ease) both; }
.resultado .grande { font: 700 1.05rem var(--font-display); margin-bottom: .3rem; }
.resultado.ok { background: var(--ok-fondo); border-color: oklch(52% 0.12 157 / .3); color: var(--ok); }
.resultado.mal { background: var(--mal-fondo); border-color: oklch(55% 0.185 25 / .3); color: var(--mal); }
.resultado.pend { background: var(--pend-fondo); border-color: oklch(55% 0.125 73 / .3); color: var(--pend); }
.resultado p { margin: .2rem 0 0; color: var(--tx); font-size: .9rem; }
.aviso { padding: .78rem .95rem; border-radius: var(--radio-s); margin-bottom: 1rem; font-weight: 650; font-size: .9rem; }
.aviso.ok { background: var(--ok-fondo); color: var(--ok); } .aviso.mal { background: var(--mal-fondo); color: var(--mal); } .aviso.pend { background: var(--pend-fondo); color: var(--pend); }
.alertas { list-style: none; padding: 0; margin: 0 0 1rem; }
.alertas li { padding: .58rem .78rem; border-radius: var(--radio-s); margin-bottom: .4rem; font-size: .88rem; }
.alertas .alta { background: var(--mal-fondo); color: oklch(38% 0.15 25); } .alertas .media { background: var(--pend-fondo); color: oklch(40% 0.1 70); } .alertas .info { background: var(--az-claro); color: var(--tx); }
.analisis { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--borde); border-radius: var(--radio-s); padding: .9rem; font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
.semaforo { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }
.semaforo.verde { background: var(--ok); } .semaforo.amarillo { background: var(--pend); } .semaforo.rojo { background: var(--mal); }

/* ---------- proformas: firma y selfie ---------- */
.pasos { display: flex; gap: .4rem; margin-bottom: 1rem; flex-wrap: wrap; }
.pasos span { flex: 1 1 90px; text-align: center; font: 700 .68rem var(--font-mono); letter-spacing: .4px; text-transform: uppercase; color: var(--sutil);
  padding: .48rem; border-radius: 22px; background: var(--surface-2); transition: all .3s var(--ease); }
.pasos span.activo { background: var(--grad); color: #fff; box-shadow: 0 6px 16px oklch(56% 0.175 256 / .35); }
.pasos span.hecho { background: var(--ok-fondo); color: var(--ok); }
.lienzo-firma { width: 100%; height: 190px; background: var(--tarjeta); border: 2px dashed oklch(56% 0.175 256 / .35); border-radius: var(--radio-s); touch-action: none; cursor: crosshair; display: block; }
.proforma { border: 1px solid var(--borde); border-radius: var(--radio-s); overflow: hidden; }
.proforma .cabeza { background: linear-gradient(110deg, var(--azo), var(--az)); color: #fff; padding: .8rem 1rem; font-weight: 700; }
.proforma .cuerpo { padding: .4rem 1rem .8rem; }
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .6rem; margin: .8rem 0; }
.galeria figure { margin: 0; text-align: center; font-size: .75rem; color: var(--sutil); }
.galeria img { width: 100%; height: 130px; object-fit: cover; border-radius: var(--radio-s); border: 1px solid var(--borde); background: var(--surface-2); cursor: zoom-in; transition: transform .25s var(--ease); }
.galeria img:hover { transform: scale(1.03); }

/* ---------- paneles laterales ---------- */
.panel-lateral { margin: 0 0 0 auto; height: 100vh; height: 100dvh; max-height: 100dvh; width: min(560px, 100vw); border: 0; padding: 0;
  box-shadow: -8px 0 40px oklch(27% 0.085 262 / .22); }
.panel-lateral::backdrop { background: oklch(27% 0.07 262 / .4); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.panel-lateral[open] { animation: entrar .3s var(--ease); }
@keyframes entrar { from { transform: translateX(28px); opacity: 0; } }
@keyframes aparecer { from { transform: translateY(6px); opacity: 0; } }
@keyframes deslizar { from { transform: translateX(100%); } }
@keyframes deslizarIzq { from { transform: translateX(-100%); } }
@keyframes pulsoAnillo { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.4); opacity: 0; } }
.det-cabeza { position: sticky; top: 0; background: oklch(99.5% 0.002 258 / .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--borde); z-index: 1; gap: .6rem; }
.det-cabeza h2 { margin: 0; }
.det-cuerpo { padding: 1.2rem; }
#det-img, #panel-cuerpo > img { width: 100%; max-height: 420px; object-fit: contain; background: var(--surface-2); border-radius: var(--radio-s); display: block; margin-bottom: 1rem; }
.datos { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .4rem 1rem; margin: 0 0 1rem; font-size: .92rem; }
.datos dt { color: var(--sutil); }
.datos dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.datos.binance { background: var(--surface-2); border: 1px solid var(--borde); border-radius: var(--radio-s); padding: .8rem; }
.det-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.det-acciones #btn-verificar { grid-column: 1 / -1; }

.toast { position: fixed; bottom: max(1.2rem, env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 20px); background: var(--azo); color: #fff; padding: .78rem 1.2rem;
  border-radius: 26px; opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .3s var(--ease); max-width: min(92vw, 560px); z-index: 80;
  box-shadow: 0 1px 0 oklch(100% 0 0 / .14) inset, 0 14px 32px oklch(27% 0.085 262 / .4); text-align: center; }
.toast.ver { opacity: 1; transform: translate(-50%, 0); }
.toast.mal { background: var(--mal); }

/* ---------- adaptable ---------- */
@media (max-width: 1100px) {
  .dos-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .boton-menu { display: inline-flex; }
  .usuario #quien { display: none; }
  /* menú del teléfono: sale por la IZQUIERDA (pedido del dueño 16-11-2026) */
  .pestanas { position: fixed; top: var(--hh); left: 0; width: min(300px, 86vw); height: calc(100dvh - var(--hh)); background: var(--tarjeta); flex-direction: column;
    align-items: stretch; gap: 4px; padding: 14px; margin: 0; overflow-y: auto; z-index: 45; box-shadow: 10px 0 36px oklch(27% 0.085 262 / .18);
    display: none; }
  .barra.abierta .pestanas { display: flex; animation: deslizarIzq .3s var(--ease); }
  /* el botón del menú va a la IZQUIERDA, antes del logo (en el teléfono quedaba cortado a la derecha) */
  .usuario { display: contents; }
  .boton-menu { order: -1; flex: none; }
  .marca { margin-right: auto; min-width: 0; }
  .pestanas button { text-align: left; padding: 13px 14px; font-size: 13px; justify-content: flex-start; border-radius: 14px; }
  .pestanas button[aria-current="page"] { background: var(--az-claro); }
  .pestana-pild { display: none; }
}
@media (min-width: 901px) {
  /* ---- rail lateral esbelto: mismo DOM, solo se reposiciona por CSS ---- */
  .barra { justify-content: space-between; }
  .pestanas {
    position: fixed; top: var(--hh); left: 0; bottom: 0; width: var(--rail-w); z-index: 30;
    height: calc(100dvh - var(--hh));  /* el backdrop-filter de .barra la vuelve el contenedor del fixed: sin alto explícito medía 32 px */
    flex-direction: column; align-items: stretch; gap: 3px; margin: 0; padding: 16px 10px;
    overflow-y: auto; overflow-x: hidden; background: oklch(99.5% 0.002 258 / .88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-right: 1px solid var(--borde); box-shadow: 4px 0 24px oklch(26% 0.06 262 / .04);
  }
  main { margin-left: var(--rail-w); max-width: calc(1320px); }
  #pestanas button[data-vista] { flex-direction: column; gap: 5px; padding: 11px 4px; border-radius: 14px; }
  .pestanas button { font-size: 9.5px; letter-spacing: .2px; text-align: center; white-space: normal; line-height: 1.15; }
  .pestanas button[data-vista]::before { width: 19px; height: 19px; }
  .pestanas button[aria-current="page"] { background: var(--az-claro); }
  .pestana-pild { display: block; }
  .pestanas .contador { position: absolute; top: 2px; right: 10px; }
}
@media (min-width: 1700px) {
  main { max-width: 1560px; }
  body { font-size: 16px; }
}
@media (max-width: 640px) {
  :root { --hh: 60px; }
  body { font-size: 14.5px; }
  .marca small { display: none; }
  .fila { grid-template-columns: 1fr; gap: 0; }
  .det-acciones { grid-template-columns: 1fr; }
  .paginacion { justify-content: center; }
  /* las tablas se convierten en tarjetas: cada celda muestra su encabezado */
  .tabla.apilable thead { display: none; }
  .tabla.apilable, .tabla.apilable tbody, .tabla.apilable tr, .tabla.apilable td { display: block; width: 100%; }
  .tabla.apilable tr { padding: .7rem 1rem; border-bottom: 1px solid var(--borde); }
  .tabla.apilable td { display: flex; justify-content: space-between; gap: 1rem; padding: .22rem 0; border: 0; text-align: right; }
  .tabla.apilable td::before { content: attr(data-label); color: var(--sutil); font-size: .78rem; font-weight: 600; text-align: left; flex: none; }
  .tabla.apilable td.vacio { display: block; text-align: center; }
  .tabla.apilable td.vacio::before { content: none; }
}
@media (max-width: 640px) {
  .tema-txt { display: none; }  /* en el teléfono el botón del tema queda solo con su ícono */
  .marca small { display: none; }
  #cambiar-tema { margin-right: 0 !important; padding-left: .7rem; padding-right: .7rem; }
  #mi-clave, #salir { padding-left: .55rem !important; padding-right: .55rem !important; }
  #mi-clave, #salir, #cambiar-tema { flex: none; }
  .marca { flex: 1 1 0 !important; min-width: 0; }
  .marca .logo { flex: none; }
  .marca > div { min-width: 0; overflow: hidden; }
  .marca b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }  /* caben llave, tema y Salir sin cortarse */
}
@media (max-width: 390px) {
  .barra { gap: 8px; padding: 0 10px; }
  .marca { gap: 7px; }
  .marca .logo { width: 34px; height: 34px; font-size: 13px; border-radius: 10px; }
  .marca b { font-size: 15.5px; }
  .barra .btn.fantasma { padding: .35rem .7rem; font-size: .75rem; }
  .boton-menu { width: 40px; height: 40px; }
}
@media print {
  .barra, form, .paginacion, .toast, dialog, .velo { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; margin-left: 0 !important; }
  .vista:not(#v-reportes) { display: none !important; }
  .tarjeta, .kpi { box-shadow: none; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- tasa del día ---------- */
.tasa-dia { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; background: var(--az-claro); color: var(--azo);
  border: 1px solid var(--borde); border-radius: var(--radio-s); padding: .6rem .95rem; margin-bottom: 14px; font-size: .92rem; }
.tasa-dia b { font: 700 1.1rem var(--font-mono); color: var(--az); }
.tasa-dia .sutil { font-size: .82rem; }
.tasa-dia button { margin-left: auto; }

/* ---------- bloqueo de auditoría ---------- */
.portada.alerta { background: linear-gradient(110deg, oklch(35% 0.14 23) 20%, oklch(55% 0.185 25)); }
.bloqueo .tarjeta { margin-top: 14px; }
.bloqueo .hecho { color: var(--ok); font-weight: 700; }

/* ---------- auditoría ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: .6rem 0 1rem; }
.kpi { border: 1px solid var(--borde); border-radius: var(--radio-s); padding: .68rem .78rem; background: var(--tarjeta); min-width: 0; }
.kpi small { display: block; color: var(--sutil); font: 650 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .4px; }
.kpi b { display: block; font: 700 1.1rem var(--font-display); margin-top: .18rem; overflow-wrap: anywhere; }
.kpi .origen { font-size: .68rem; margin-top: .2rem; }
.origen { display: inline-block; border-radius: 999px; padding: 0 .48rem; font-weight: 700; font-size: .7rem; }
.origen.dato_real { background: var(--ok-fondo); color: var(--ok); }
.origen.calculado { background: var(--az-claro); color: var(--az); }
.origen.supuesto { background: var(--pend-fondo); color: var(--pend); }
.alerta-item { border-left: 4px solid var(--borde); padding: .52rem .72rem; margin: .45rem 0; background: var(--tarjeta); border-radius: 0 var(--radio-s) var(--radio-s) 0; }
.alerta-item.grave { border-color: var(--mal); background: var(--mal-fondo); }
.alerta-item.media { border-color: var(--pend); background: var(--pend-fondo); }
.alerta-item.info { border-color: var(--az2); }
.alerta-item b { overflow-wrap: anywhere; }
.alerta-item .cod { font: 700 .7rem/1 var(--font-mono); background: oklch(26% 0.06 262 / .08); border-radius: 6px; padding: .16rem .36rem; margin-right: .35rem; }
.grafico { width: 100%; height: auto; display: block; }
.graficos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: .5rem 0 1rem; }
.graficos figure { margin: 0; border: 1px solid var(--borde); border-radius: var(--radio-s); padding: .6rem; background: var(--tarjeta); min-width: 0; }
.graficos figcaption { font-weight: 700; font-size: .85rem; color: var(--azo); margin-bottom: .3rem; }
.leyenda { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .75rem; color: var(--sutil); margin-top: .3rem; }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: middle; }
.analisis-ia { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--borde); border-radius: var(--radio-s); padding: .8rem; font-size: .9rem; overflow-wrap: anywhere; }
.req { display: flex; justify-content: space-between; gap: .6rem; padding: .4rem 0; border-top: 1px solid var(--borde); flex-wrap: wrap; }
.req:first-child { border-top: 0; }
.req .ok { color: var(--ok); font-weight: 700; } .req .falta { color: var(--mal); font-weight: 700; }
.mapeo-tabla td, .mapeo-tabla th { font-size: .78rem; white-space: nowrap; }
.mapeo-tabla select { font-size: .78rem; padding: .2rem; }
.desplazable { overflow-x: auto; max-width: 100%; }
details.seccion { border-top: 1px solid var(--borde); padding: .6rem 0; }
details.seccion summary { cursor: pointer; font-weight: 700; color: var(--azo); }

/* Cambio de divisa, fase 3: acuerdo + firma + selfie del cliente */
.columna-proformas { display: grid; gap: clamp(12px, 2vw, 22px); align-content: start; min-width: 0; }
#f-firma-cambio { border: 2px solid oklch(56% 0.175 256 / .3); }
#f-firma-cambio .proforma { margin-bottom: .8rem; }
.acuerdo { background: var(--surface-2); border-left: 4px solid var(--az); padding: .8rem 1rem; border-radius: var(--radio-s);
  line-height: 1.55; font-size: .95rem; margin: .4rem 0 .8rem; }
.casilla { display: flex; flex-direction: row; align-items: center; font-size: .95rem; color: var(--azo); gap: .6rem; font-weight: 700; margin-bottom: .8rem; cursor: pointer; }
.casilla input { width: 22px; height: 22px; flex: none; accent-color: var(--az); }
#f-firma-cambio .soltar { margin-top: .8rem; }

.correccion { border: 2px solid oklch(55% 0.125 73 / .5); background: var(--pend-fondo); margin: .8rem 0; }
.correccion h3 { margin: 0 0 .3rem; font-size: 1rem; }

/* Cédula/RIF: letra fija afuera + solo números */
.doc-grupo { display: flex; gap: .4rem; align-items: stretch; }
.doc-grupo select { width: auto; flex: none; min-width: 4.4rem; font-weight: 700; }
.doc-grupo input { flex: 1; min-width: 0; }

/* Binance: la opción guardada de cada movimiento se ve marcada */
.opciones-mov { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.btn.mini.elegido { background: var(--ok); color: #fff; border: 1px solid var(--ok); box-shadow: none; }

/* ---------- discrepancias por aclarar: notificación flotante con glow + pulso ---------- */
.aviso-disc {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid oklch(55% 0.185 25 / .35); border-radius: 16px;
  padding: 13px 18px; margin: 0 0 14px; font: 650 .92rem/1.3 var(--font-body); cursor: pointer; color: #fff;
  background: linear-gradient(100deg, oklch(45% 0.17 25), oklch(55% 0.19 20));
  box-shadow: 0 1px 0 oklch(100% 0 0 / .14) inset, 0 10px 26px oklch(55% 0.185 25 / .3);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.aviso-disc:hover { transform: translateY(-1.5px); box-shadow: 0 1px 0 oklch(100% 0 0 / .14) inset, 0 14px 34px oklch(55% 0.185 25 / .4); }
.aviso-disc::before {
  content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: #fff; position: relative;
  box-shadow: 0 0 0 0 oklch(100% 0 0 / .6);
}
.aviso-disc::after {
  content: ""; position: absolute; left: 24px; width: 10px; height: 10px; border-radius: 50%; background: #fff;
  animation: pulsoAnillo 1.8s var(--ease) infinite;
}
.aviso-disc.amarillo { border-color: oklch(70% 0.14 80 / .4); background: linear-gradient(100deg, oklch(56% 0.14 75), oklch(66% 0.16 78)); box-shadow: 0 1px 0 oklch(100% 0 0 / .14) inset, 0 10px 26px oklch(60% 0.14 75 / .32); }
.aviso-disc.amarillo:hover { box-shadow: 0 1px 0 oklch(100% 0 0 / .14) inset, 0 14px 34px oklch(60% 0.14 75 / .42); }
.disc-grid { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 16px; }
@media (max-width: 860px) { .disc-grid { grid-template-columns: 1fr; } }
#disc-lista li { cursor: pointer; border-left: 3px solid transparent; padding-left: .6rem; }
#disc-lista li.rojo { border-left-color: var(--mal); } #disc-lista li.amarillo { border-left-color: var(--pend); }
#disc-lista li.activo { background: var(--az-claro); }
.disc-estado { font: 650 .72rem var(--font-body); padding: 2px 9px; border-radius: 10px; background: var(--surface-2); color: var(--sutil); white-space: nowrap; }
.disc-estado.abierta { background: var(--mal-fondo); color: var(--mal); } .disc-estado.explicada { background: var(--pend-fondo); color: var(--pend); }
.disc-estado.verificando { background: var(--az-claro); color: var(--az); } .disc-estado.resuelta, .disc-estado.aceptada, .disc-estado.asumida { background: var(--ok-fondo); color: var(--ok); }
.disc-chat { display: flex; flex-direction: column; min-height: 420px; }
.disc-cab { border-radius: 12px; padding: 11px 13px; margin-bottom: 10px; background: var(--mal-fondo); border-left: 4px solid var(--mal); }
.disc-cab.amarillo { background: var(--pend-fondo); border-left-color: var(--pend); }
.burbujas { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 52vh; padding: 4px 2px 10px; }
.burbuja { max-width: 85%; padding: 9px 13px; border-radius: 16px; line-height: 1.45; white-space: pre-wrap; animation: entrarVista .25s var(--ease) both; }
.burbuja .quien { display: block; font-size: .72rem; opacity: .75; margin-bottom: 2px; }
.burbuja.administracion { align-self: flex-end; background: var(--az2); color: #fff; border-bottom-right-radius: 5px; }
.burbuja.gerencia { align-self: flex-end; background: var(--azo); color: #fff; border-bottom-right-radius: 5px; }
.burbuja.jarvis { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.burbuja.sistema { align-self: center; background: var(--tarjeta); color: var(--sutil); font-size: .85rem; border: 1px dashed var(--borde-fuerte); }
.burbuja .veredicto { font-weight: 700; }
.burbuja a.adj { color: inherit; text-decoration: underline; cursor: pointer; }
.barra-chat { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--borde); padding-top: 10px; }
.barra-chat textarea { width: 100%; min-height: 70px; resize: vertical; }
.barra-chat .fila-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- cuentas por pagar ---------- */
.tramo { margin: 9px 0; } .tramo .barra { height: 12px; border-radius: 6px; background: var(--surface-2); overflow: hidden; box-shadow: inset 0 1px 2px oklch(26% 0.06 262 / .08); }
.tramo .barra span { display: block; height: 100%; border-radius: 6px; margin: 0; padding: 0; transition: width 1s var(--ease); }
@starting-style { .tramo .barra span { width: 0 !important; } }
.tramo .cab { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: 4px; }
.cxp-vencida { color: var(--mal); font-weight: 650; } .cxp-prox { color: var(--pend); font-weight: 650; } .cxp-ok { color: var(--ok); }
.cxp-dif { margin-top: 12px; font-size: .88rem; background: var(--pend-fondo); border-left: 4px solid var(--pend); padding: 9px 11px; border-radius: 8px; }

/* ---------- tablero financiero ---------- */
.fin-hero {
  position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 28px 32px; border-radius: 24px; color: #fff;
  background:
    repeating-linear-gradient(115deg, oklch(100% 0 0 / .05) 0px, oklch(100% 0 0 / .05) 1px, transparent 1px, transparent 34px),
    radial-gradient(620px 320px at 88% 8%, oklch(68% 0.13 248 / .5), transparent 55%),
    linear-gradient(142deg, oklch(22% 0.08 262) 0%, oklch(30% 0.1 261) 45%, oklch(45% 0.15 258) 100%);
  box-shadow: 0 1px 0 oklch(100% 0 0 / .14) inset, 0 24px 56px oklch(22% 0.08 262 / .4);
}
.fin-hero::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(140deg, oklch(100% 0 0 / .35), transparent 30%, transparent 70%, oklch(100% 0 0 / .14));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.fin-hero > * { position: relative; }
.fin-hero small { letter-spacing: 3px; font: 700 .7rem var(--font-mono); opacity: .75; }
.fin-capital { font: 700 clamp(2rem, 4.6vw, 3.2rem)/1.1 var(--font-display); letter-spacing: -1.2px; margin: 6px 0; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
  background: linear-gradient(100deg, #fff 30%, oklch(90% 0.04 240)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fin-sub { opacity: .82; font-size: .92rem; }
.fin-acciones { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.fin-spark { width: 220px; height: 60px; animation: entrarVista .6s var(--ease) both; }
.fin-spark path.linea { fill: none; stroke: oklch(85% 0.06 240); stroke-width: 2.2; } .fin-spark path.area { fill: oklch(85% 0.06 240 / .16); }
.fin-fresco { font-size: .78rem; opacity: .78; margin: 0; text-align: right; }
.fin-faltan { margin: 12px 0 0; padding: 11px 15px; border-radius: 12px; background: var(--pend-fondo); color: oklch(38% 0.11 73); border-left: 4px solid var(--pend); font-size: .9rem; }
.fin-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0; }
.fin-kpi { background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 16px; padding: 15px 17px; box-shadow: var(--sombra); border-top: 3px solid var(--c, var(--az2));
  transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.fin-kpi:hover { transform: translateY(-3px); box-shadow: var(--sombra-hover); }
.fin-kpi small { display: block; color: var(--sutil); font: 650 .7rem var(--font-mono); letter-spacing: .5px; text-transform: uppercase; }
.fin-kpi b { display: block; font: 700 1.25rem var(--font-display); margin-top: 5px; font-variant-numeric: tabular-nums; letter-spacing: -.2px; }
.fin-kpi span { display: block; font-size: .78rem; color: var(--sutil); margin-top: 2px; }
.fin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .fin-grid { grid-template-columns: 1fr; } .fin-acciones { align-items: flex-start; } }
.fin-barra { display: flex; height: 22px; border-radius: 11px; overflow: hidden; margin: 8px 0 14px; background: var(--surface-2); box-shadow: inset 0 1px 2px oklch(26% 0.06 262 / .08); }
.fin-barra span { height: 100%; transition: width 1.1s var(--ease); }
@starting-style { .fin-barra span { width: 0 !important; } }
.fin-leyenda { display: grid; grid-template-columns: auto 1fr auto auto; gap: 6px 10px; align-items: center; font-size: .9rem; }
.fin-leyenda i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.fin-leyenda .pct { color: var(--sutil); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
.fin-leyenda .neg { color: var(--mal); }
.fin-ind { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fin-ind div { background: var(--surface-2); border-radius: 12px; padding: 11px 13px; } .fin-ind b { font: 700 1.1rem var(--font-display); display: block; }
.fin-ind small { color: var(--tx); display: block; } .fin-ind em { color: var(--sutil); font-size: .76rem; font-style: normal; }
.fin-jarvis #fin-jarvis { white-space: pre-wrap; line-height: 1.55; max-height: 420px; overflow-y: auto; font-size: .93rem; }
.fin-alerta { padding: 2px 10px; border-radius: 10px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.fin-alerta.agotado { background: var(--mal-fondo); color: oklch(38% 0.15 25); } .fin-alerta.critico { background: oklch(93% 0.07 55); color: oklch(42% 0.12 45); } .fin-alerta.bajo { background: var(--pend-fondo); color: oklch(40% 0.1 70); }
.fin-egr { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: .93rem; } .fin-egr .tot { font-weight: 700; border-top: 1px solid var(--borde); padding-top: 6px; }
.fin-egr .aparte { color: var(--sutil); }

/* ---------- inventario ---------- */
.rot { padding: 2px 10px; border-radius: 10px; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.rot.alta { background: var(--ok-fondo); color: var(--ok); } .rot.media { background: var(--az-claro); color: var(--az); } .rot.baja { background: var(--pend-fondo); color: var(--pend); }
.rot.nula { background: var(--mal-fondo); color: var(--mal); } .rot.agotado { background: oklch(32% 0.14 25); color: #fff; }
.rot.nuevo { background: oklch(30% 0.08 295); color: #c4b5fd; }
.rot.trasladar { background: oklch(32% 0.07 200); color: #7dd3fc; }
.xyz { font-weight: 800; font-size: .8rem; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--tx); }
#tbody-inv tr { cursor: pointer; } #tbody-inv td.sug { font-size: .84rem; color: var(--tx); max-width: 340px; }
.inv-barras { display: flex; align-items: flex-end; gap: 6px; height: 110px; margin: 10px 0 4px; }
.inv-barras div { flex: 1; background: linear-gradient(180deg, var(--az2), var(--az)); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; transition: height .9s var(--ease); }
@starting-style { .inv-barras div { height: 0 !important; } }
.inv-barras div span { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: .68rem; color: var(--tx); font-variant-numeric: tabular-nums; }
.inv-meses { display: flex; gap: 6px; font-size: .66rem; color: var(--sutil); } .inv-meses span { flex: 1; text-align: center; }

/* ---------- menú desplegable «Administrativo» (aprobaciones, discrepancias, proformas, movimientos) ---------- */
.grupo-pest { position: relative; display: flex; flex-direction: column; }
#pestanas .grupo-boton { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5A2 2 0 015 5.5h4l2 2h8a2 2 0 012 2V18a2 2 0 01-2 2H5a2 2 0 01-2-2z'/%3E%3C/svg%3E"); }
#pestanas .grupo-boton::before { content: ""; display: block; width: 16px; height: 16px; flex: none; background-color: currentColor; opacity: .62;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.grupo-pest .flecha { font-size: 10px; transition: transform .2s; display: inline-block; }
.grupo-pest.abierto .flecha { transform: rotate(180deg); }
.grupo-pest.activa > .grupo-boton { background: var(--az-claro); color: var(--az); }
.grupo-pest .submenu { display: none; flex-direction: column; gap: 2px; }
@media (min-width: 901px) {
  #pestanas .grupo-boton { flex-direction: column; gap: 5px; padding: 11px 2px; border-radius: 14px; font-size: 8.3px; letter-spacing: .2px; line-height: 1.15; }
  #pestanas .grupo-boton::before { width: 19px; height: 19px; }
  .grupo-pest .flecha { display: none; }
  /* en la barra lateral el menú se despliega hacia abajo, dentro de la barra (abierto al tocarlo o si su vista está activa) */
  .grupo-pest .submenu { margin: 2px 4px 4px; padding: 3px 0; border-radius: 12px; background: oklch(96% 0.012 258 / .7); }
  .grupo-pest.abierto .submenu, .grupo-pest.activa .submenu { display: flex; animation: deslizar .22s var(--ease, ease); }
  #pestanas .submenu button[data-vista] { padding: 8px 2px; font-size: 8.8px; }
  #pestanas .submenu button[data-vista]::before { width: 16px; height: 16px; }
}
@media (max-width: 900px) {
  .grupo-pest .submenu { display: flex; padding-left: 14px; }
  .grupo-pest .flecha { display: none; }
}

/* ---------- gráfico de cápsulas (ventas por mes) ---------- */
.capsulas-tarjeta { margin-top: 16px; }
.cap-resumen { text-align: right; } .cap-resumen b { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.cap-resumen small { color: var(--sutil); }
.capsulas { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 6px; height: 260px; padding: 34px 4px 0; }
.capsula { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; min-width: 0; }
.capsula .pista { position: relative; flex: 1; width: clamp(16px, 2.2vw, 28px); border-radius: 9999px; background: rgba(15, 23, 42, .06);
  display: flex; align-items: flex-end; cursor: pointer; outline: none; }
.capsula .relleno { position: relative; width: 100%; height: 0; min-height: 0; border-radius: 9999px;
  background: linear-gradient(to top, rgba(38, 132, 232, .25), rgba(38, 132, 232, .9));
  transition: height 1s cubic-bezier(.16, 1, .3, 1), filter .25s, transform .25s; transform-origin: bottom; }
.capsula .valor { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%) rotate(-90deg); transform-origin: center; white-space: nowrap;
  font-size: 9.5px; font-weight: 700; letter-spacing: .3px; opacity: .85; pointer-events: none; }
.capsula .mes { font-size: .72rem; color: var(--sutil); text-transform: capitalize; }
.capsula .tip { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 6px); opacity: 0; pointer-events: none; white-space: nowrap;
  padding: 6px 10px; border-radius: 10px; font-size: .78rem; font-weight: 700; background: rgba(15, 23, 42, .9); color: #fff; transition: opacity .2s, transform .2s; z-index: 5; }
.capsula .tip small { display: block; font-weight: 500; opacity: .75; }
.capsula .pista:hover .relleno, .capsula .pista:focus .relleno { filter: brightness(1.25); transform: scaleY(1.03); }
.capsula .pista:hover .tip, .capsula .pista:focus .tip { opacity: 1; transform: translate(-50%, 0); }
.capsula.actual .mes { color: var(--tx); font-weight: 700; }
@media (max-width: 640px) { .capsulas { height: 210px; gap: 3px; } .capsula .valor { display: none; } }
.capsulas .capsula .pista { width: clamp(18px, 1.9vw, 26px) !important; max-width: 26px; }

/* ---------- Presupuestos ---------- */
.pre-buscar { margin-bottom: .4rem; }
.pre-resultados { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.pre-resultados:empty { display: none; }
.pre-item { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto 28px; align-items: center; gap: 10px;
  text-align: left; padding: .55rem .7rem; border-radius: 12px; border: 1px solid var(--borde); background: var(--tarjeta); color: inherit;
  font: inherit; cursor: pointer; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.pre-item:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--acento, #2684e8); }
.pre-item:active:not(:disabled) { transform: scale(.99); }
.pre-item:disabled { opacity: .55; cursor: default; }
.pre-item-txt { display: grid; min-width: 0; }
.pre-item-txt strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.pre-exist { font-size: .78rem; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; }
.pre-exist.hay { background: rgba(52, 211, 153, .16); color: #34d399; }
.pre-exist.no-hay { background: rgba(248, 113, 113, .16); color: #f87171; }
.pre-precio { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pre-mas { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #2684e8, #176ed5); color: #fff; font-weight: 700; }
.pre-num { width: 6.5rem; text-align: right; font-variant-numeric: tabular-nums; }
.pre-num[readonly] { opacity: .7; }
.pre-aviso { color: #fbbf24; font-size: .78rem; }
.pre-aviso:empty { display: none; }
.pre-totales { display: grid; gap: 4px; margin: .9rem 0 .4rem; padding: .8rem .9rem; border-radius: 14px; border: 1px solid var(--borde); }
.pre-total { display: flex; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.pre-total.grande { font-size: 1.25rem; padding: .25rem 0; }
.pre-total.grande strong { color: #2684e8; }
.pre-total.bien strong { color: #34d399; }
.pre-total.mal strong { color: #f87171; }
.acciones-fila { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 700px) {
  .pre-item { grid-template-columns: minmax(0, 1fr) auto 28px; }
  .pre-exist { grid-column: 1; justify-self: start; }
  .pre-num { width: 100%; }
}
.pre-margen { border: 1px solid var(--borde); border-radius: 14px; padding: .6rem .8rem .75rem; margin: .4rem 0 0; }
.pre-margen legend { padding: 0 .35rem; font-size: .85rem; }
.pre-margen-fila { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pre-margen-fila .btn.activo { background: linear-gradient(135deg, #2684e8, #176ed5); color: #fff; border-color: transparent; }
.pre-margen-otro { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.pre-margen-otro input { width: 4.6rem; text-align: right; }
#pre-libre { margin: 0 0 .7rem; }
.pre-anclado { position: relative; }
.pre-flotante { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin-top: 4px; background: rgba(15, 18, 26, .96); border-radius: 12px; padding: 4px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.pre-cli { grid-template-columns: minmax(0, 1fr); }
.pre-cats { display: flex; flex-wrap: wrap; gap: 6px; margin: .2rem 0 .6rem; }
.pre-cats .btn.activo { background: linear-gradient(135deg, #2684e8, #176ed5); color: #fff; border-color: transparent; }
.pre-exist.cat-bateria { background: rgba(52, 211, 153, .16); color: #34d399; }
.pre-exist.cat-inversor { background: rgba(38, 132, 232, .18); color: #60a5fa; }
.pre-exist.cat-panel { background: rgba(245, 180, 20, .18); color: #fbbf24; }
.pila { display: grid; gap: .6rem; }
#pre-margen-botones .pre-margen-otro { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.pre-lineas td:first-child { min-width: 220px; }
.pre-energia { border: 1px solid var(--borde); border-radius: 14px; padding: .7rem .9rem; margin: .6rem 0 0; }
.pre-autonomia { font-size: 1.6rem; font-weight: 700; color: #38a8f2; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.pre-autonomia small { font-size: .8rem; font-weight: 400; color: var(--sutil, #a8a29e); }
.pre-energia-datos { font-size: .82rem; margin: .2rem 0 .4rem; }
.pre-recs { margin: .3rem 0 0; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: .86rem; }
.pre-recs li::marker { color: #22c58b; }
.pre-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: .5rem 0 .8rem; }
.pre-ficha-img { max-width: 220px; max-height: 160px; border-radius: 10px; object-fit: contain; background: #fff; }
.pre-li { display: flex; gap: 6px; align-items: stretch; }
.pre-li .pre-item { flex: 1; min-width: 0; }
.pre-editar { flex: none; width: 38px; padding: 0; border-radius: 12px; }
.pre-editando { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: .55rem .8rem; margin-bottom: .7rem;
  border-radius: 12px; background: rgba(245, 180, 20, .14); border: 1px solid rgba(245, 180, 20, .4); color: #fbbf24; font-size: .88rem; }
.pre-asis-chat { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding: .3rem .1rem; margin: .5rem 0; }
.pre-msg { max-width: 82%; padding: .6rem .85rem; border-radius: 16px; line-height: 1.45; white-space: pre-wrap; }
.pre-msg.yo { justify-self: end; background: linear-gradient(135deg, #2684e8, #176ed5); color: #fff; border-bottom-right-radius: 4px; }
.pre-msg.asis { justify-self: start; background: rgba(255, 255, 255, .07); border: 1px solid var(--borde); border-bottom-left-radius: 4px; }
.pre-msg.asis.mal { border-color: rgba(248, 113, 113, .5); color: #fca5a5; }
.pre-msg.pensando .pre-msg-txt { animation: pre-pulso 1.2s ease-in-out infinite; }
@keyframes pre-pulso { 50% { opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .pre-msg.pensando .pre-msg-txt { animation: none; } }
.pre-msg-prop { margin-top: .5rem; display: grid; gap: .4rem; white-space: normal; }
.pre-msg-prop ul { margin: 0; padding-left: 1.1rem; font-size: .85rem; }
.pre-asis-form { display: flex; gap: 8px; align-items: flex-end; }
.pre-asis-form textarea { flex: 1; resize: vertical; min-height: 2.6rem; }
.pre-fase { display: grid; gap: 6px; padding: .5rem 0; border-bottom: 1px dashed var(--borde); }
.pre-fase:last-child { border-bottom: 0; }
.pre-fase-fila { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; }
.pre-fase-pct { display: inline-flex; align-items: center; gap: 4px; }
.pre-fase-pct .pre-num { width: 4.4rem; }
.pre-fase-monto { min-width: 6rem; text-align: right; font-variant-numeric: tabular-nums; }
.pre-fase textarea { resize: vertical; }
#pre-mejorar-desarrollo { justify-self: start; margin: -.2rem 0 .4rem; }
@media (max-width: 700px) { .pre-fase-fila { grid-template-columns: minmax(0, 1fr) auto auto; } .pre-fase-monto { grid-column: 1 / -1; text-align: left; } }

.ok-txt { color: #34d399; } .mal-txt { color: #f87171; }
.kpi.bien b { color: #34d399; } .kpi.mal b { color: #f87171; }
tr.anulado td { opacity: .5; text-decoration: line-through; } tr.anulado td:last-child, tr.anulado td:nth-child(7) { text-decoration: none; }
.pre-nuevo { font-size: .72rem; padding: 0 .35rem; margin-left: .3rem; border-radius: 999px; background: rgba(245, 180, 20, .2); color: #fbbf24; }
@media (max-width: 700px) { .pre-msg { max-width: 94%; } .pre-asistente { padding-bottom: 5rem; } }

/* pop-up de transferencias de Binance */
.dlg-mov { max-width: 26rem; width: calc(100% - 2rem); border: 1px solid var(--borde, #2a3b5c); border-radius: 16px; padding: 1.25rem; }
.dlg-mov::backdrop { background: rgba(3, 12, 30, .7); }
.dlg-mov h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.dlg-mov-texto { font-size: 1.05rem; font-weight: 600; margin: 0 0 1rem; }
.dlg-mov-botones { display: grid; gap: .5rem; margin-bottom: .5rem; }

/* asistente con IA (todas las pestañas) */
.asis-fab { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 58px; height: 58px; border-radius: 50%; border: 0;
  background: var(--grad); color: #fff; font-size: 26px; box-shadow: var(--sombra-hover); cursor: pointer; transition: transform .15s ease; }
.asis-fab:hover { transform: scale(1.06); }
.asis-fab:active { transform: scale(.96); }
body.en-login .asis-fab { display: none; }
.dlg-asis { width: min(30rem, calc(100% - 1.5rem)); height: min(40rem, calc(100dvh - 2rem)); padding: 0; border: 1px solid var(--borde);
  border-radius: var(--radio); display: none; flex-direction: column; margin: auto 1rem 1rem auto; }
.dlg-asis[open] { display: flex; }
.dlg-asis::backdrop { background: oklch(20% 0.05 262 / .35); }
.asis-cabeza { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--borde); }
.asis-cabeza h2 { margin: 0; font-size: 1.05rem; }
.asis-cabeza small { color: var(--sutil); font-weight: 500; font-size: .8rem; }
.asis-acciones { display: flex; gap: .25rem; }
#asis-voz-salida[aria-pressed="false"] { opacity: .45; }
.asis-chat { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.asis-msg { max-width: 88%; padding: .6rem .8rem; border-radius: 14px; white-space: pre-wrap; line-height: 1.4; font-size: .95rem; }
.asis-msg.yo { align-self: flex-end; background: var(--az2); color: #fff; border-bottom-right-radius: 4px; }
.asis-msg.ia { align-self: flex-start; background: var(--az-claro); color: var(--tx); border-bottom-left-radius: 4px; }
.asis-msg.ia.error { background: var(--mal-fondo); color: var(--mal); }
.asis-msg .btn { margin-top: .5rem; }
.asis-pensando { align-self: flex-start; color: var(--sutil); font-size: .9rem; }
.asis-form { display: flex; gap: .5rem; align-items: flex-end; padding: .75rem; border-top: 1px solid var(--borde); }
.asis-form textarea { flex: 1; resize: none; max-height: 7rem; }
.asis-mic { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--borde); background: var(--tarjeta); font-size: 20px; cursor: pointer; flex: none; }
.asis-mic.escuchando { background: var(--mal); color: #fff; animation: asis-pulso 1.2s ease-in-out infinite; }
@keyframes asis-pulso { 0%, 100% { box-shadow: 0 0 0 0 oklch(55% 0.185 25 / .5); } 50% { box-shadow: 0 0 0 10px oklch(55% 0.185 25 / 0); } }
@media (prefers-reduced-motion: reduce) { .asis-mic.escuchando { animation: none; } .asis-fab { transition: none; } }
@media (max-width: 600px) { .dlg-asis { margin: auto; height: calc(100dvh - 1.5rem); } }

/* ---- robot del asistente (estilo del video: blanco brillante, pantalla negra con LEDs cian) ---- */
.robot { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.robot-cabeza { position: relative; display: block; background: radial-gradient(120% 90% at 30% 20%, #fff 0 40%, #e4e9ef 75%, #c9d1da);
  border-radius: 46% 46% 42% 42% / 52% 52% 46% 46%; box-shadow: inset -4px -6px 10px rgb(0 0 0 / .12), 0 6px 14px rgb(0 20 40 / .25); }
.robot-pantalla { position: absolute; inset: 15% 11% 17%; background: radial-gradient(90% 90% at 50% 35%, #0b1a22, #02070a);
  border-radius: 40% / 46%; display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 8px #000; }
.robot-pantalla canvas { width: 86%; height: auto; }
.robot-oreja { position: absolute; top: 34%; width: 9%; height: 34%; background: linear-gradient(#f4f7fa, #c8d0d8); border-radius: 40%; }
.robot-oreja::after { content: ""; position: absolute; inset: 22% 30%; border-radius: 4px; background: #5fe6ff; box-shadow: 0 0 6px #5fe6ff; }
.robot-oreja.izq { left: -5%; } .robot-oreja.der { right: -5%; }
.robot.mini .robot-cabeza { width: 46px; height: 38px; }
.asis-fab { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #1a3550, #071420); padding: 0; }
.robot.grande .robot-cabeza { width: 132px; height: 108px; z-index: 2; }
.robot-cuello { width: 34px; height: 10px; margin-top: -2px; background: linear-gradient(#2c3a44, #10181e); border-radius: 0 0 8px 8px; }
.robot-torso { position: relative; width: 120px; height: 46px; margin-top: -1px; border-radius: 48px 48px 14px 14px;
  background: radial-gradient(110% 120% at 35% 0%, #fff 0 35%, #dde3ea 75%, #c3ccd5); box-shadow: inset -3px -5px 9px rgb(0 0 0 / .1); }
.robot-luz { position: absolute; left: 50%; top: 10px; width: 3px; height: 22px; translate: -50% 0; border-radius: 2px; background: #5fe6ff; box-shadow: 0 0 8px #5fe6ff; }
.robot-brazo { position: absolute; right: -26px; top: 96px; width: 16px; height: 58px; border-radius: 10px;
  background: linear-gradient(90deg, #fff, #cfd7df); transform-origin: 50% 90%; rotate: 0deg; z-index: 1; opacity: 0; }
.robot-mano { position: absolute; top: -12px; left: -3px; width: 22px; height: 18px; border-radius: 50% 50% 40% 40%; background: #eef2f6; box-shadow: inset 0 -3px 4px rgb(0 0 0 / .12); }
.robot.saludando .robot-brazo { opacity: 1; top: 30px; animation: robot-saludo .55s ease-in-out 4 alternate; }
@keyframes robot-saludo { from { rotate: 8deg; } to { rotate: 34deg; } }
.robot.escuchando .robot-oreja::after, .robot.hablando .robot-luz { animation: robot-brillo .6s ease-in-out infinite alternate; }
@keyframes robot-brillo { to { opacity: .35; } }
.robot.grande { animation: robot-flota 4s ease-in-out infinite; }
@keyframes robot-flota { 50% { translate: 0 -4px; } }
.asis-escena { position: relative; display: flex; flex-direction: column; align-items: center; padding: .9rem 0 .4rem;
  background: radial-gradient(70% 90% at 50% 30%, oklch(88% 0.04 220 / .35), transparent 70%); border-bottom: 1px solid var(--borde); flex: none; }
.asis-estado { margin: .35rem 0 0; font-size: .8rem; color: var(--sutil); letter-spacing: .02em; }
.asis-holo { position: absolute; left: 12px; top: 22px; width: 92px; height: 70px; border: 1px solid #5fe6ff66; border-radius: 8px;
  background: linear-gradient(160deg, #5fe6ff1f, #5fe6ff08); box-shadow: 0 0 14px #5fe6ff33; opacity: .85; rotate: y 18deg; }
.holo-dona { position: absolute; left: 8px; top: 8px; width: 24px; height: 24px; border-radius: 50%;
  background: conic-gradient(#5fe6ff 0 65%, #5fe6ff33 0); mask: radial-gradient(circle, transparent 45%, #000 47%); }
.holo-barras { position: absolute; right: 8px; bottom: 8px; display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.holo-barras i { width: 5px; background: #5fe6ffaa; border-radius: 1px; animation: holo-barra 2.4s ease-in-out infinite; }
.holo-barras i:nth-child(1) { height: 40%; } .holo-barras i:nth-child(2) { height: 70%; animation-delay: .3s; }
.holo-barras i:nth-child(3) { height: 55%; animation-delay: .6s; } .holo-barras i:nth-child(4) { height: 90%; animation-delay: .9s; }
.holo-barras i:nth-child(5) { height: 65%; animation-delay: 1.2s; }
@keyframes holo-barra { 50% { scale: 1 .6; } }
.holo-linea { position: absolute; left: 38px; top: 12px; width: 44px; height: 14px; border-bottom: 2px solid #5fe6ffaa; border-radius: 0 0 50% 20%; }
@media (max-width: 600px) { .asis-holo { width: 70px; height: 56px; } }
@media (prefers-reduced-motion: reduce) {
  .robot.grande, .robot.saludando .robot-brazo, .holo-barras i, .robot-oreja::after, .robot-luz { animation: none !important; }
}

.asis-botones { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.asis-botones .btn { margin-top: 0; }

/* ventas por día: 30 cápsulas finas, valores solo al tocar */
.cap-periodo { margin: 4px 0 6px; width: max-content; }
.capsulas.denso { gap: 3px; }
.capsulas.denso .capsula .pista { width: clamp(7px, 1.4vw, 16px) !important; }
.capsulas.denso .capsula .valor { display: none; }
.capsulas.denso .capsula .mes { font-size: .62rem; }
.capsulas.denso .capsula:nth-child(odd):not(.actual) .mes { visibility: hidden; }
.capsula.finde .mes { color: var(--az2); }
@media (min-width: 900px) { .capsulas.denso .capsula:nth-child(odd):not(.actual) .mes { visibility: visible; } }

/* informes de los agentes con formato */
.informe-agente { white-space: normal; line-height: 1.55; font-size: .93rem; }
.informe-agente h3 { font-size: 1.05rem; margin: 0 0 .6rem; line-height: 1.35; }
.informe-agente h4 { font-size: .98rem; margin: 1.3rem 0 .5rem; padding-top: .9rem; border-top: 1px solid var(--borde); }
.informe-agente p { margin: .4rem 0; }
.informe-agente ul, .informe-agente ol { margin: .4rem 0 .6rem; padding-left: 1.25rem; display: grid; gap: .35rem; }
.informe-agente .tabla-envoltura { margin: .6rem 0 .9rem; overflow-x: auto; }
.informe-tabla { font-size: .84rem; min-width: 560px; }
.informe-tabla th { white-space: nowrap; text-align: left; }
.informe-tabla td { vertical-align: top; }
.informe-tabla td:first-child { font-weight: 600; min-width: 11rem; }
.analisis .informe-agente { white-space: normal; }
#fin-jarvis, #inv-agente { white-space: normal; }

/* Inventario ordenado: informe a todo el ancho, secciones plegables, tablas legibles */
.informe-agente h3, .informe-agente h4, .informe-seccion > summary { font-family: inherit !important; text-transform: none !important; letter-spacing: normal !important; }
.informe-seccion { border-top: 1px solid var(--borde); padding: .2rem 0; }
.informe-seccion > summary { cursor: pointer; font-weight: 700; font-size: 1rem; padding: .7rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.informe-seccion > summary::-webkit-details-marker { display: none; }
.informe-seccion > summary::after { content: "▾"; color: var(--sutil); transition: rotate .2s ease; }
.informe-seccion:not([open]) > summary::after { rotate: -90deg; }
.informe-seccion[open] { padding-bottom: .8rem; }
.informe-agente li.subtitulo { list-style: none; margin-left: -1.25rem; margin-top: .6rem; font-weight: 700; }
.inv-informe .informe-tabla { min-width: 760px; }
.inv-informe .informe-tabla td:last-child { min-width: 16rem; }
.inv-informe .informe-tabla td { padding: .55rem .6rem; }
@media (prefers-reduced-motion: reduce) { .informe-seccion > summary::after { transition: none; } }

/* tabla de productos de inventario: filas compactas */
#v-inventario .inv-prod { min-width: 13rem; max-width: 20rem; }
#v-inventario .inv-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#tbody-inv td.sug { min-width: 16rem; }
#tbody-inv tr { cursor: pointer; }
.cap-periodo { display: inline-flex !important; flex-direction: row !important; flex-wrap: nowrap; gap: 4px; width: auto !important; }
.cap-periodo label { flex: none; }
.cap-periodo label span { padding: .3rem .9rem; min-height: 0; }
.capsula .relleno { padding: 0 !important; box-sizing: border-box; }

/* configuración: frecuencia del agente */
#pestanas button[data-vista="config"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z'/%3E%3C/svg%3E"); }
.config-agente { max-width: 46rem; display: grid; gap: 1rem; }
.config-agente fieldset { border: 0; padding: 0; margin: 0; }
.config-agente legend { font-weight: 650; margin-bottom: .5rem; }
.chips-config { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-cfg input { position: absolute; opacity: 0; pointer-events: none; }
.chip-cfg span { display: inline-block; padding: .4rem .75rem; border-radius: 999px; border: 1px solid var(--borde); cursor: pointer; font-size: .9rem; user-select: none; transition: background .15s ease, color .15s ease; }
.chip-cfg input:checked + span { background: var(--az2); color: #fff; border-color: transparent; }
.chip-cfg input:focus-visible + span { outline: 2px solid var(--az2); outline-offset: 2px; }
.cfg-fila { display: grid; gap: .3rem; max-width: 22rem; }
.cfg-check { display: flex; gap: .6rem; align-items: flex-start; }
.cfg-check input { margin-top: .25rem; }
.cfg-resumen { margin: 0; padding: .7rem .9rem; border-radius: var(--radio-s); background: var(--az-claro); color: var(--tx); font-size: .92rem; }
.config-agente .cfg-check { display: flex !important; flex-direction: row !important; gap: .6rem; align-items: flex-start; font-weight: 500; }
.config-agente .cfg-check input { width: 1.1rem !important; height: 1.1rem; flex: none; margin: .15rem 0 0; }

.cap-periodo label.bloqueado { opacity: .4; cursor: not-allowed; }
.cap-periodo label.bloqueado span { cursor: not-allowed; }

/* tareas de venta */
#pestanas button[data-vista="tareas"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3 8-8'/%3E%3Cpath d='M20 12v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9'/%3E%3C/svg%3E"); }
.tareas-bono { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; align-items: start; }
.bono-cifra { display: grid; gap: .2rem; }
.bono-cifra small { color: var(--sutil); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: .72rem; }
.bono-cifra b { font-size: 1.9rem; font-variant-numeric: tabular-nums; color: var(--ok); }
.bono-regla { grid-column: 1 / -1; margin: 0; padding: .7rem .9rem; border-radius: var(--radio-s); background: var(--ok-fondo); color: var(--tx); font-size: .92rem; }
.tareas-lista { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-top: .6rem; }
.tarea { border: 1px solid var(--borde); border-radius: var(--radio-s); padding: .9rem; display: grid; gap: .45rem; background: var(--tarjeta); }
.tarea.obligatoria { border-left: 4px solid var(--az2); }
.tarea.vencida { border-left-color: var(--mal); background: var(--mal-fondo); }
.tarea-cabeza { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; }
.tarea-cliente { font-size: 1.02rem; }
.tarea-producto { font-size: .9rem; }
.tarea-precio { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.tarea-precio b { font-size: 1.35rem; color: var(--az2); font-variant-numeric: tabular-nums; }
.tarea-sug, .tarea-nota { margin: 0; font-size: .86rem; }
.tarea-plazo { margin: 0; font-weight: 650; font-size: .88rem; }
.tarea-plazo.mal { color: var(--mal); }
.tarea-acciones { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.tarea-check { display: inline-flex !important; gap: .45rem; align-items: center; font-weight: 600; cursor: pointer; }
.tarea-check input { width: 1.15rem !important; height: 1.15rem; }
.tarea-form { display: grid; gap: .55rem; padding-top: .6rem; border-top: 1px dashed var(--borde); }
.tarea-venta { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

.tarea-acciones .tarea-check { display: inline-flex !important; flex-direction: row !important; gap: .45rem; align-items: center; margin: 0; width: auto; }
.tarea-acciones .tarea-check input { width: 1.15rem !important; height: 1.15rem; margin: 0 !important; flex: none; }
.tarea-acciones .tarea-check span { margin: 0; }

.tarea-precio .tp-costo b { color: var(--tx); font-size: 1.05rem; }
.tarea-precio .tp-oferta b { color: var(--az2); font-size: 1.35rem; }
.tarea-precio .tp-flecha { color: var(--sutil); font-weight: 700; }
.tarea-todos { margin: 0; font-size: .9rem; font-weight: 600; }
.tarea-sugeridos { margin: 0; padding-left: 1.1rem; font-size: .85rem; color: var(--sutil); display: grid; gap: .15rem; }
.tarea-ventas { display: grid; gap: .4rem; padding-top: .5rem; border-top: 1px dashed var(--borde); }
.tarea-ventas > small { font-weight: 650; color: var(--sutil); }
.venta-fila { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; font-size: .88rem; flex-wrap: wrap; }
.venta-der { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
#tar-confirmar { grid-template-columns: 1fr; }
#tar-confirmar .venta-fila { border: 1px solid var(--borde); border-radius: var(--radio-s); padding: .7rem; }

/* ---------- Panel de ventas en secciones (graficos.js) ---------- */
.pv-titulo { flex-wrap: wrap; gap: 10px 18px; }
.pv-barra { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pv-barra .btn[disabled] { opacity: .5; }
.pv-estado { font-size: .78rem; }
.pv-rejilla { display: grid; gap: 14px; margin-top: 14px; grid-template-columns: 1fr; }
.pv-rejilla[data-n="2"], .pv-rejilla[data-n="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pv-rejilla[data-n="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .pv-rejilla[data-n="6"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .pv-rejilla[data-n] { grid-template-columns: 1fr; } }
.pv-seccion { min-width: 0; border-radius: 18px; padding: 14px 14px 10px; background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 8px; }
.pv-rejilla[data-n="1"] .pv-seccion { background: transparent; border: 0; padding: 0; }
.pv-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.pv-cab h3 { margin: 0; font-size: .92rem; font-weight: 700; }
.pv-controles { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pv-controles select { width: auto !important; min-width: 0; flex: 0 0 auto; font-size: .78rem; padding: 4px 8px; border-radius: 9999px; background: rgba(255, 255, 255, .08);
  color: inherit; border: 1px solid rgba(255, 255, 255, .14); }
.pv-controles select option { color: #111; }
.pv-per span { font-size: .74rem; padding: 3px 10px !important; }
.pv-grafico { position: relative; min-height: 180px; display: flex; flex-direction: column; justify-content: flex-end; }
.pv-seccion .capsulas { height: 230px; }
.pv-rejilla[data-n="4"] .capsulas, .pv-rejilla[data-n="6"] .capsulas { height: 190px; padding-top: 18px; }
.pv-rejilla[data-n="4"] .capsula .valor, .pv-rejilla[data-n="6"] .capsula .valor { display: none; }
.pv-info { margin: 0; font-size: .76rem; min-height: 1.2em; }
/* barras horizontales */
.pv-barras { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; padding-right: 4px; }
.pv-fila { all: unset; cursor: pointer; display: grid; grid-template-columns: 62px 1fr 62px; align-items: center; gap: 8px; font-size: .74rem; }
.pv-fila .pv-et { color: var(--sutil); text-transform: capitalize; white-space: nowrap; }
.pv-fila b { text-align: right; font-variant-numeric: tabular-nums; }
.pv-barras { scrollbar-width: thin; }
.pv-pista { height: 12px; border-radius: 9999px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.pv-pista i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1d4ed8, #2684e8 60%, #7dc4ff);
  transition: width .9s cubic-bezier(.16, 1, .3, 1); box-shadow: 0 0 10px rgba(38, 132, 232, .35); }
.pv-fila.finde i { background: linear-gradient(90deg, #4338ca, #6366f1 60%, #a5b4fc); }
.pv-fila.actual i { background: linear-gradient(90deg, #c2410c, #f97316 60%, #fdba74); }
.pv-fila.actual .pv-et { color: var(--tx); font-weight: 700; }
.pv-fila:hover i, .pv-fila:focus-visible i { filter: brightness(1.2); }
/* SVG: líneas, áreas, combinado */
.pv-svg { width: 100%; height: auto; display: block; overflow: visible; }
.pv-ejes line { stroke: rgba(255, 255, 255, .09); stroke-dasharray: 3 5; }
.pv-ejes text, .pv-svg text { fill: var(--sutil); font-size: 11px; }
.pv-ejes text.actual { fill: #fdba74; font-weight: 700; }
.pv-linea { fill: none; stroke: #7dc4ff; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; animation: pv-trazo 1.1s cubic-bezier(.16, 1, .3, 1) forwards;
  filter: drop-shadow(0 0 6px rgba(38, 132, 232, .55)); }
.pv-prom { stroke: #fdba74; stroke-width: 2.2; filter: drop-shadow(0 0 5px rgba(249, 115, 22, .5)); }
@keyframes pv-trazo { to { stroke-dashoffset: 0; } }
.pv-punto { fill: #0b1220; stroke: #7dc4ff; stroke-width: 2; cursor: pointer; }
.pv-punto.actual { fill: #f97316; stroke: #fdba74; }
.pv-punto:hover { stroke-width: 3.5; }
.pv-col { fill: #2684e8; opacity: .85; cursor: pointer; }
.pv-col.finde { fill: #6366f1; }
.pv-col.actual { fill: #f97316; opacity: 1; }
.pv-col:hover { opacity: 1; filter: brightness(1.2); }
.pv-leyenda { margin: 0; font-size: .72rem; color: var(--sutil); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pv-leyenda i { width: 12px; height: 4px; border-radius: 2px; display: inline-block; }
.pv-leyenda .c-col { background: #2684e8; height: 10px; } .pv-leyenda .c-prom { background: #fdba74; }
/* medidor */
.pv-medidor { max-width: 340px; margin: 0 auto; }
.pv-zona { fill: none; stroke-width: 20; opacity: .18; }
.pv-zona.bajo { stroke: #ef4444; } .pv-zona.medio { stroke: #f97316; } .pv-zona.bien { stroke: #22c55e; }
.pv-valor { fill: none; stroke-width: 20; stroke-linecap: round; }
.pv-valor.bajo { stroke: #ef4444; } .pv-valor.medio { stroke: #f97316; } .pv-valor.bien { stroke: #22c55e; }
.pv-aguja { stroke: #e2e8f0; stroke-width: 3.5; stroke-linecap: round; }
.pv-eje { fill: #e2e8f0; }
.pv-svg .pv-grande { fill: var(--tx); font-size: 28px; font-weight: 800; }
.pv-medidor-txt { text-align: center; margin: 4px 0 0; font-size: .82rem; color: var(--sutil); }
.pv-medidor-txt b { color: var(--tx); font-size: 1rem; }
/* dona */
.pv-dona-caja { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: center; }
.pv-dona { width: min(200px, 100%); transform: rotate(-90deg); }
.pv-dona text { transform: rotate(90deg); transform-origin: 100px 100px; }
.pv-dona .pv-grande { font-size: 22px; }
.pv-dona-fondo { fill: none; stroke: rgba(255, 255, 255, .06); stroke-width: 26; }
.pv-seg { fill: none; stroke-width: 26; cursor: pointer; transition: stroke-width .2s; }
.pv-seg:hover { stroke-width: 32; }
.pv-dona-ley { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .76rem; min-width: 150px; }
.pv-dona-ley li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; }
.pv-dona-ley i { width: 10px; height: 10px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .pv-linea { animation: none; stroke-dashoffset: 0; } }

/* ---------- Reparto del pago (vendedor) ---------- */
.reparto { border: 1px solid rgba(38, 132, 232, .35); border-radius: 14px; padding: 12px 14px; margin: 4px 0 8px; display: grid; gap: 8px; }
.reparto legend { padding: 0 6px; font-weight: 700; }
.reparto p { margin: 0; }
.reparto-filas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .reparto-filas { grid-template-columns: 1fr; } }
.reparto-cuenta { font-weight: 700; font-size: .86rem; }
.reparto-cuenta.ok { color: var(--ok); } .reparto-cuenta.mal { color: var(--pend); }
.reparto-txt { font-size: .8rem; color: var(--az, #2684e8); }
.sutil.bloque { display: block; margin-top: 2px; }

/* ---------- Tesorería ---------- */
.tes-saldos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 10px; }
.tes-calculo { margin: 0; font-weight: 700; font-size: .86rem; color: var(--az, #2684e8); min-height: 1.2em; }
#f-tes-cambio textarea { resize: vertical; }
.tes-elegidos { display: block; color: var(--ok); font-weight: 700; margin-top: 4px; word-break: break-all; }
.tes-soportes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tes-soporte-img { max-width: 100%; border-radius: 12px; }

.cli-valery { display: block; margin-top: 4px; min-height: 1em; color: #fbbf24; }
.cli-valery.ok { color: #34d399; }
.cli-nada { padding: .5rem .7rem; }
.cli-ofrecer { background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .8rem; }
.cli-ofrecer ul { margin: .4rem 0 0; padding-left: 1.1rem; }

/* Conteo de inventario */
.conteo-barra { height: 8px; border-radius: 6px; background: var(--surface-2, rgba(255,255,255,.08)); overflow: hidden; margin: .3rem 0 .8rem; }
.conteo-barra span { display: block; height: 100%; background: linear-gradient(90deg, #2684e8, #34d399); transition: width .3s ease; }
.conteo-filtros { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; margin-bottom: .5rem; }
.conteo-agregar { margin: .2rem 0 .8rem; }
.conteo-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.conteo-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: .65rem .8rem; border-radius: 12px;
  border: 1px solid var(--borde, rgba(255,255,255,.12)); background: var(--surface-2, rgba(255,255,255,.04)); }
.conteo-item.listo { grid-template-columns: minmax(0, 1fr) auto auto; opacity: .92; }
.conteo-info { display: grid; min-width: 0; }
.conteo-info strong { font-size: .92rem; }
.conteo-info span { font-size: .82rem; color: var(--texto-2, #94a3b8); overflow: hidden; text-overflow: ellipsis; }
.conteo-entrada { display: flex; gap: 6px; align-items: center; }
.conteo-entrada input { width: 6.5rem; text-align: right; font-size: 1.05rem; }
.conteo-res { display: flex; gap: 12px; align-items: center; font-size: .85rem; flex-wrap: wrap; justify-content: flex-end; }
.conteo-dif { font-weight: 700; padding: .1rem .5rem; border-radius: 8px; }
.conteo-dif.ok { color: #34d399; } .conteo-dif.mal { color: #f87171; background: rgba(248,113,113,.12); } .conteo-dif.sobra { color: #fbbf24; background: rgba(251,191,36,.12); }
@media (max-width: 640px) {
  .conteo-item, .conteo-item.listo { grid-template-columns: minmax(0, 1fr); }
  .conteo-entrada input { flex: 1; width: auto; }
  .conteo-res { justify-content: flex-start; }
  .conteo-filtros { grid-template-columns: minmax(0, 1fr); }
}
#pestanas button[data-vista="conteo"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3.5' width='14' height='18' rx='2'/%3E%3Cpath d='M9 3.5h6v3H9z'/%3E%3Cpath d='m8.5 12 2 2 4-4'/%3E%3Cpath d='M8.5 17.5h7'/%3E%3C/svg%3E"); }
.conteo-vivo { flex-basis: 100%; text-align: right; font-size: .74rem; }
.conteo-vivo.esperando { color: #93c5fd; } .conteo-vivo.ok { color: #34d399; } .conteo-vivo.mal { color: #fbbf24; }
@media (max-width: 640px) { .conteo-vivo { text-align: left; } }

/* conteo: pasa / no pasa y la nota de la tesorera */
.conteo-pasa { white-space: nowrap; }
.conteo-item.sin-nota { border-color: rgba(248,113,113,.55); box-shadow: inset 3px 0 0 #f87171; }
.conteo-nota { grid-column: 1 / -1; display: grid; gap: 6px; font-size: .85rem; }
.conteo-nota textarea { width: 100%; resize: vertical; }
.conteo-nota .btn { justify-self: start; }
.conteo-casos li { align-items: flex-start; gap: 10px; }
.conteo-casos .conteo-nota { margin-top: .3rem; display: block; }
.aviso-conteo { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 3px solid #fbbf24; }

/* discrepancias: lo que dijo JARVIS manda el caso */
.burbuja.jarvis.destacada.j-dudosa, .burbuja.jarvis.destacada.j-insuficiente { border: 1px solid rgba(251,191,36,.6); background: rgba(251,191,36,.10); }
.burbuja.jarvis.destacada.j-sensata { border: 1px solid rgba(52,211,153,.6); background: rgba(52,211,153,.10); }
.disc-estado.j-sensata.explicada { color: #34d399; }
.disc-estado.j-dudosa.abierta, .disc-estado.j-insuficiente.abierta { color: #fbbf24; }
.disc-pide { margin-top: .5rem; padding: .55rem .7rem; border-radius: 10px; background: rgba(251,191,36,.12); border-left: 3px solid #fbbf24; font-size: .88rem; }

/* débitos fiscales (IVA) */
.fiscal-item { align-items: flex-start; gap: 10px; }
.fiscal-ctrl { list-style: none; margin: .3rem 0; padding: 0; font-size: .82rem; display: grid; gap: 2px; }
.fiscal-est.cuadra { color: #34d399; } .fiscal-est.no_cuadra, .fiscal-est.error { color: #f87171; }

/* JARVIS escribiendo en vivo en el chat del caso */
.burbuja.jarvis.escribiendo { border: 1px dashed rgba(96,165,250,.55); }
.burbuja.jarvis.escribiendo .quien { color: #60a5fa; opacity: 1; }
.cursor-escribe { display: inline-block; width: .5em; height: 1em; margin-left: 2px; vertical-align: -2px; background: currentColor; opacity: .6; animation: parpadeoEscribe 1s steps(2) infinite; }
@keyframes parpadeoEscribe { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor-escribe { animation: none; } }

/* Aviso de factura fiscal */
.fiscal-calc { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin: 6px 0; min-height: 1.5em; }
.fiscal-cobra { font-size: 1.05rem; margin-top: 4px; }
.fiscal-cobra b { font-size: 1.15rem; }
.fiscal-bcv { margin: 6px 0; }
.fiscal-del-aviso { flex-basis: 100%; grid-column: 1 / -1; width: 100%; margin: 0; padding: 8px 10px; border-radius: 10px; border: 1px dashed var(--borde-fuerte); }
li.aviso-vencido { border-left: 3px solid #dc2626; }

/* Tareas: precio normal tachado y mensaje de remate para WhatsApp */
.tp-antes { flex-basis: 100%; color: var(--sutil, #9aa4b2); }
.tp-antes s { color: inherit; }
.tarea-ws { margin: .6rem 0; border: 1px solid rgba(37, 211, 102, .35); border-radius: 10px; padding: .5rem .7rem; background: rgba(37, 211, 102, .06); }
.tarea-ws summary { cursor: pointer; font-weight: 600; color: #25d366; }
.ws-texto { width: 100%; box-sizing: border-box; margin: .5rem 0; font: inherit; font-size: .9rem; line-height: 1.4; resize: vertical;
  background: rgba(0, 0, 0, .25); color: inherit; border: 1px solid rgba(255, 255, 255, .12); border-radius: 8px; padding: .5rem; }
.ws-aviso { margin-left: .4rem; }

/* Supervisión de tareas (solo lectura) */
#pestanas button[data-vista="supervision"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.sup-filtros { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.sup-filtros label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; min-width: 140px; flex: 1 1 140px; }
.sup-rapidos { display: flex; gap: 6px; flex-wrap: wrap; }
.sup-vendedores { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.sup-vend { border: 1px solid var(--borde); border-radius: 12px; padding: 10px 14px; }
.sup-vend h3 { margin: 0 0 4px; font-size: 1rem; }
.sup-vend p { margin: 2px 0; font-size: .88rem; }
.sup-lista { display: grid; gap: 12px; }
.sup-tarea { display: grid; grid-template-columns: 1fr; gap: 12px; border: 1px solid var(--borde); border-left: 4px solid var(--az2); border-radius: 12px; padding: 12px 14px; }
.sup-tarea.con-lateral { grid-template-columns: 1fr 150px; }
.sup-tarea.revisar { border-left-color: var(--pend, #f9a825); }
.sup-tarea p { margin: 4px 0; overflow-wrap: anywhere; }
.sup-tarea .tarea-cabeza { display: flex; flex-wrap: wrap; gap: 6px 10px; justify-content: space-between; }
.sup-tarea .tarea-cabeza > div:first-child { flex: 1 1 180px; min-width: 0; }
.sup-chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.sup-quien { font-size: .9rem; }
.sup-nota { white-space: pre-line; }
.sup-alerta { color: #ffd166; background: rgba(249, 168, 37, .14); border: 1px solid rgba(249, 168, 37, .35); border-radius: 8px; padding: 6px 10px; font-size: .88rem; }
.sup-captura { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sup-captura.sin { justify-content: center; color: var(--mal, #c62828); font-size: .85rem; border: 1px dashed var(--borde); border-radius: 10px; }
.sup-mini { position: relative; width: 100%; aspect-ratio: 9 / 16; max-height: 240px; padding: 0; border: 1px solid var(--borde); border-radius: 10px;
  overflow: hidden; background: rgba(127, 127, 127, .08); cursor: zoom-in; }
.sup-mini img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; opacity: 0; transition: opacity .25s; }
.sup-mini.lista img { opacity: 1; }
.sup-mini-cargando { position: absolute; inset: 0; display: grid; place-items: center; font-size: .8rem; color: var(--sutil); }
.sup-mini.lista .sup-mini-cargando { display: none; }
.sup-ventas { margin-top: 8px; display: grid; gap: 8px; }
.sup-venta { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; }
.sup-venta .sup-mini { max-height: 110px; }
@media (max-width: 560px) { .sup-tarea.con-lateral { grid-template-columns: 1fr 96px; } .sup-chips { justify-content: flex-start; } }

/* Débito fiscal: solo foto + nota; lo demás plegado */
.fiscal-mas { flex-basis: 100%; grid-column: 1 / -1; }
.fiscal-mas summary { cursor: pointer; color: var(--sutil, #8aa0c0); font-size: .85rem; padding: .2rem 0; }
.fiscal-mas[open] { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; }
.fiscal-mas[open] summary { flex-basis: 100%; }
.disc-nota-fiscal input { width: 7.5rem; margin-left: .3rem; }

/* Caja escritorio: conteo de billetes */
.caja-tipo { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin: .4rem 0 .6rem; }
.caja-billetes { display: grid; grid-template-columns: 4.5rem minmax(5rem, 9rem) 1fr; gap: .35rem .8rem; align-items: center; margin-bottom: .6rem; }
.caja-billetes input { width: 100%; font-variant-numeric: tabular-nums; }
.caja-billetes .num { text-align: right; font-variant-numeric: tabular-nums; }
.caja-enc { font-size: .8rem; color: var(--sutil, #8aa0c0); }
.caja-tot-et { grid-column: 1 / 3; border-top: 1px solid rgba(255,255,255,.15); padding-top: .35rem; }
.caja-tot { border-top: 1px solid rgba(255,255,255,.15); padding-top: .35rem; font-size: 1.15rem; }
.caja-lista { display: grid; gap: .5rem; }
.caja-mov { border-left: 3px solid #2e7d32; padding: .35rem .6rem; background: rgba(255,255,255,.03); border-radius: .4rem; }
.caja-mov.egreso { border-left-color: #c62828; }
.caja-mov-cab { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.caja-conf-lista { margin: .3rem 0 .5rem 1.1rem; padding: 0; }

/* Conteo: corregir la cantidad en línea */
.conteo-corregir { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .4rem; }
.conteo-corregir input { width: 7rem; margin-left: .3rem; }

/* Tablero del conteo: faltantes vs sobrantes al costo */
.ct-barra { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); margin: 4px 0 8px; }
.ct-barra-f { background: #c62828; }
.ct-barra-s { background: #2e7d32; }
.ct-formula { font-variant-numeric: tabular-nums; margin: 4px 0 12px; }
.ct-falta { color: #ff8a80; }
.ct-sobra { color: #81c784; }
.ct-listas h3 { margin: 6px 0; font-size: .95rem; }
.ct-tabla td, .ct-tabla th { font-variant-numeric: tabular-nums; }
.ct-mas summary { cursor: pointer; color: var(--sutil, #8aa0c0); margin: 6px 0; }
.espacio-abajo { margin-bottom: 16px; }
.ct-tabla td.num { white-space: nowrap; }
.ct-tabla td:first-child b { overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .ct-tabla .ct-costo { display: none; }
  .ct-tabla th, .ct-tabla td { padding-left: 6px; padding-right: 6px; }
}

/* ===== cuadros compactos del tablero (2026-11-15): agrupados, una línea de detalle, al tocar se despliega ===== */
.fin-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: start; }
.fin-kpi-grupo { grid-column: 1 / -1; margin: 8px 0 -2px; font: 650 .66rem var(--font-mono); letter-spacing: .9px; text-transform: uppercase; color: var(--sutil); }
.fin-kpi-grupo:first-child { margin-top: 0; }
.fin-kpi { min-width: 0; padding: 9px 12px; border-radius: 12px; border-top: 1px solid var(--borde); }
.fin-kpi small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .64rem; }
.fin-kpi small::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; vertical-align: 1px;
  background: var(--c, var(--az2)); box-shadow: 0 0 8px color-mix(in srgb, var(--c, var(--az2)) 70%, transparent); }
.fin-kpi b { font-size: 1.08rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-kpi span { font-size: .72rem; margin-top: 1px; }
.fin-kpi[role="button"] { cursor: pointer; }
.fin-kpi[role="button"] span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fin-kpi.abierto span { white-space: normal; overflow: visible; }
.fin-kpi:focus-visible { outline: 2px solid var(--c, var(--az2)); outline-offset: 2px; }
@media (max-width: 900px) { .fin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .fin-kpi b { font-size: 1rem; } }

/* íconos que faltaban en el menú (salían como cuadro gris) */
#pestanas button[data-vista="tesoreria"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4' width='17' height='15' rx='2'/%3E%3Ccircle cx='12' cy='11.5' r='3.2'/%3E%3Cpath d='M12 8.3v1M12 13.7v1M8.8 11.5h1M14.2 11.5h1M6 19v1.5M18 19v1.5'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="nomina"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8.5' cy='8' r='3.2'/%3E%3Cpath d='M2.5 19.5c.5-3.3 2.9-5.2 6-5.2 1.4 0 2.6.4 3.6 1'/%3E%3Ccircle cx='17' cy='15.5' r='4'/%3E%3Cpath d='M17 13.6v3.8M15.8 14.5h2a.8.8 0 010 1.6h-1.6a.8.8 0 000 1.6h2'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="caja"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='6.5' width='19' height='11' rx='2'/%3E%3Ccircle cx='12' cy='12' r='2.6'/%3E%3Cpath d='M6 9.5v.01M18 14.5v.01'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="tesoreriaops"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h13l-3.5-3.5M20 16H7l3.5 3.5'/%3E%3C/svg%3E"); }
#pestanas button[data-vista="pedidos"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2.2l2.2 10.2a1.5 1.5 0 001.5 1.2h8.4a1.5 1.5 0 001.5-1.1L20.5 8H6.3'/%3E%3Ccircle cx='9.5' cy='19.5' r='1.3'/%3E%3Ccircle cx='17' cy='19.5' r='1.3'/%3E%3C/svg%3E"); }

/* «Ver como» del dueño (2026-11-23) */
.ver-como-sel{max-width:260px;font-size:.85rem;padding:.3rem .45rem;border-radius:8px;margin-right:.5rem}
.ver-como-franja{position:sticky;top:0;z-index:60;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:.4rem .8rem;
  padding:.45rem 1rem;background:#7c3aed;color:#fff;font-weight:700;font-size:.9rem;text-align:center}
.ver-como-franja .btn{background:#fff;color:#5b21b6;border:0}
@media (max-width:700px){.ver-como-sel{max-width:100%;width:100%;margin:0 0 .4rem}}

/* Pestaña del dueño «Barinas | Energy Life» (23-11-2026): dos apps separadas */
.tienda-app{position:sticky;top:var(--hh);z-index:45;display:flex;justify-content:center;gap:.5rem;padding:.5rem 1rem;
  background:oklch(22% 0.03 262 / .82);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  border-bottom:1px solid oklch(100% 0 0 / .12)}
.tienda-app button{flex:0 1 220px;min-height:44px;padding:.55rem 1rem;border-radius:999px;border:1px solid oklch(100% 0 0 / .3);
  background:transparent;color:#fff;font-weight:700;font-size:1rem;cursor:pointer;transition:background .15s,border-color .15s}
.tienda-app button.activa{background:#2563eb;border-color:#2563eb;color:#fff;box-shadow:0 2px 10px rgba(37,99,235,.45)}
.tienda-app button:focus-visible{outline:2px solid #93c5fd;outline-offset:2px}
@media (max-width:700px){.tienda-app button{flex:1 1 0;font-size:.95rem;padding:.6rem .5rem}}
