/*
 * Angélica Arévalo · sistema visual compartido.
 * Paleta tomada de su marca: frambuesa del monograma, rosa empolvado de la fachada,
 * dorado del letrero y ciruela profunda para el texto. Fraunces (títulos) + Manrope (interfaz).
 */
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../fonts/fraunces-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('../fonts/fraunces-normal-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300 700; font-display: swap; src: url('../fonts/fraunces-italic-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fraunces'; font-style: italic; font-weight: 300 700; font-display: swap; src: url('../fonts/fraunces-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/manrope-normal-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url('../fonts/manrope-normal-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* marca */
  --rosa-50: #FFF6F8; --rosa-100: #FDE9EF; --rosa-200: #F9CEDB; --rosa-300: #F2A6BC; --rosa-400: #E5708F;
  --rosa-500: #D6336C; --rosa-600: #B8235A; --rosa-700: #8F1A45; --rosa-800: #651331;
  --coral: #EE5A62;
  --ciruela-950: #1E0F17; --ciruela-900: #2A1520; --ciruela-800: #3B1E2B; --ciruela-700: #55303F; --ciruela-500: #85606F; --ciruela-300: #BBA2AC; --ciruela-100: #EDE3E7;
  --oro-600: #A97B3E; --oro-500: #C39150; --oro-300: #E5C79A; --oro-100: #F7EBDA;
  --nude: #F6ECE8; --crema: #FFFBF9; --perla: #FCF7F6;
  --ok: #2E9C6A; --ok-suave: #E3F4EB; --alerta: #D98A1C; --alerta-suave: #FCF0DC; --error: #D64545; --error-suave: #FCE6E6; --info: #4E7AD6; --info-suave: #E7EEFC;
  /* superficies y texto */
  --fondo: #FCF7F6; --superficie: #FFFFFF; --superficie-2: #FBF4F5; --borde: rgba(59, 30, 43, .1); --borde-fuerte: rgba(59, 30, 43, .18);
  --texto: #2E1A24; --texto-2: #6B5260; --texto-3: #9C8792;
  --foco: 0 0 0 3px rgba(214, 51, 108, .28);
  --sombra-1: 0 1px 2px rgba(59, 30, 43, .05), 0 4px 14px rgba(59, 30, 43, .05);
  --sombra-2: 0 2px 6px rgba(59, 30, 43, .06), 0 16px 40px rgba(143, 26, 69, .1);
  --sombra-3: 0 30px 80px rgba(101, 19, 49, .22);
  --grad-marca: linear-gradient(135deg, #E5487D 0%, #D6336C 45%, #A91E52 100%);
  --grad-oro: linear-gradient(135deg, #E9CFA3, #C39150 55%, #A97B3E);
  --r-xs: 8px; --r-s: 12px; --r-m: 16px; --r-l: 22px; --r-xl: 30px;
  --f-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --f-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-rebote: cubic-bezier(.34, 1.56, .64, 1);
  color-scheme: light;
}

/* ───── base ───── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--f-ui); font-size: 15px; line-height: 1.5; color: var(--texto); background: var(--fondo); -webkit-font-smoothing: antialiased; font-feature-settings: 'ss01', 'cv11'; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--rosa-600); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: none; box-shadow: var(--foco); border-radius: 8px; }
::selection { background: var(--rosa-200); color: var(--ciruela-900); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.oculto { display: none !important; }
body.con-hoja { overflow: hidden; }

/* ───── tipografía ───── */
.display { font-family: var(--f-display); font-optical-sizing: auto; font-weight: 400; letter-spacing: -.02em; line-height: 1.02; }
.display em, .serif em { font-style: italic; font-weight: 300; color: var(--rosa-500); }
.serif { font-family: var(--f-display); font-optical-sizing: auto; }
.sobretitulo { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--rosa-600); }
.titulo-1 { font-family: var(--f-display); font-size: clamp(30px, 4.2vw, 52px); font-weight: 400; letter-spacing: -.02em; line-height: 1.05; }
.titulo-2 { font-family: var(--f-display); font-size: clamp(24px, 2.6vw, 34px); font-weight: 450; letter-spacing: -.015em; }
.titulo-3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.mute { color: var(--texto-2); }
.mute-2 { color: var(--texto-3); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }
.pequeno { font-size: 13px; }
.mini { font-size: 12px; }
.fuerte { font-weight: 700; }

/* ───── íconos ───── */
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico-s { width: 16px; height: 16px; }
.ico-l { width: 26px; height: 26px; }
.ico-xl { width: 34px; height: 34px; stroke-width: 1.4; }

/* ───── marca ───── */
.monograma { color: var(--rosa-500); }
.logo-marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo-mono { width: 40px; height: 40px; flex: none; }
.logo-texto { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.logo-nombre { font-family: var(--f-display); font-size: 20px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.logo-sub { font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--texto-2); margin-top: 3px; white-space: nowrap; }

/* ───── botones ───── */
.btn { --bg: var(--superficie); --fg: var(--texto); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; background: var(--bg); color: var(--fg); font-weight: 700; font-size: 14.5px; letter-spacing: -.005em; text-decoration: none; white-space: nowrap; transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s, border-color .2s, color .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.cargando { opacity: .55; pointer-events: none; }
.btn .ico { width: 18px; height: 18px; }
.btn-primario { --fg: #fff; background: var(--grad-marca); box-shadow: 0 6px 18px rgba(214, 51, 108, .32), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primario:hover { box-shadow: 0 10px 28px rgba(214, 51, 108, .42), inset 0 1px 0 rgba(255, 255, 255, .25); transform: translateY(-1px); }
.btn-oscuro { --bg: var(--ciruela-900); --fg: #fff; }
.btn-oscuro:hover { --bg: var(--ciruela-800); }
.btn-oro { --fg: #3B2610; background: var(--grad-oro); box-shadow: 0 6px 18px rgba(169, 123, 62, .3); }
.btn-suave { --bg: var(--rosa-100); --fg: var(--rosa-700); }
.btn-suave:hover { --bg: var(--rosa-200); }
.btn-borde { --bg: transparent; border-color: var(--borde-fuerte); }
.btn-borde:hover { border-color: var(--rosa-400); color: var(--rosa-600); }
.btn-fantasma { --bg: transparent; }
.btn-fantasma:hover { --bg: var(--rosa-50); }
.btn-peligro { --bg: var(--error); --fg: #fff; }
.btn-ok { --bg: var(--ok); --fg: #fff; }
.btn-whatsapp { --bg: #1FAF5A; --fg: #fff; box-shadow: 0 6px 18px rgba(31, 175, 90, .28); }
.btn-whatsapp:hover { --bg: #189A4E; }
.btn-s { min-height: 34px; padding: 0 13px; font-size: 13px; }
.btn-l { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-bloque { width: 100%; }
.btn-icono { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: var(--texto-2); transition: background .2s, color .2s; }
.btn-icono:hover { background: var(--rosa-50); color: var(--rosa-600); }

/* ───── formularios ───── */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > span, .etiqueta { font-size: 12.5px; font-weight: 700; color: var(--texto-2); letter-spacing: .01em; }
.entrada, .campo input, .campo select, .campo textarea { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--borde-fuerte); border-radius: var(--r-s); background: var(--superficie); transition: border-color .2s, box-shadow .2s; }
.campo textarea { min-height: 84px; resize: vertical; }
.entrada:focus, .campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--rosa-400); box-shadow: var(--foco); }
.campo .ayuda { font-size: 12px; color: var(--texto-3); }
.campo.error input { border-color: var(--error); }
.rejilla-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.buscador { position: relative; }
.buscador .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--texto-3); pointer-events: none; }
.buscador input { padding-left: 40px; border-radius: 999px; }

/* ───── chips, segmentado, insignias, avatar ───── */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--borde-fuerte); background: var(--superficie); font-size: 13.5px; font-weight: 600; color: var(--texto-2); transition: all .2s var(--ease); }
.chip:hover { border-color: var(--rosa-300); color: var(--rosa-700); }
.chip.activo, .chip[aria-pressed="true"] { background: var(--ciruela-900); border-color: var(--ciruela-900); color: #fff; }
.chip .ico { width: 16px; height: 16px; }
.segmentado { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: var(--superficie-2); border: 1px solid var(--borde); }
.segmentado button { min-height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; font-size: 13px; font-weight: 700; color: var(--texto-2); transition: all .22s var(--ease); }
.segmentado button[aria-pressed="true"] { background: var(--superficie); color: var(--texto); box-shadow: var(--sombra-1); }
.insignia { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--ciruela-100); color: var(--ciruela-700); }
.insignia::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.insignia.sin-punto::before { display: none; }
.insignia.ok { background: var(--ok-suave); color: #217A51; }
.insignia.alerta { background: var(--alerta-suave); color: #A86508; }
.insignia.error { background: var(--error-suave); color: #B22F2F; }
.insignia.info { background: var(--info-suave); color: #3560B8; }
.insignia.rosa { background: var(--rosa-100); color: var(--rosa-700); }
.insignia.oro { background: var(--oro-100); color: #8A5F25; }
.insignia.gris { background: #F1ECEE; color: var(--texto-3); }
.avatar { --av: var(--rosa-500); display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; background: color-mix(in srgb, var(--av) 16%, white); color: var(--av); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.avatar.grande { width: 56px; height: 56px; font-size: 18px; }
.punto-vivo { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(46, 156, 106, .5); animation: latido 2s infinite; }

/* ───── tarjetas ───── */
.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--r-l); box-shadow: var(--sombra-1); }
.tarjeta-pad { padding: 20px; }
.tarjeta-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; }
.tarjeta-cab h3 { font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.tarjeta-cuerpo { padding: 16px 20px 20px; }
.vidrio { background: rgba(255, 255, 255, .62); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255, 255, 255, .7); }
.kpi { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.kpi-etq { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--texto-2); }
.kpi-etq .ico { width: 17px; height: 17px; color: var(--rosa-500); }
.kpi-valor { font-family: var(--f-display); font-size: 34px; font-weight: 450; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi-pie { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--texto-2); }
.kpi .graf-spark { position: absolute; right: 0; bottom: 0; width: 46%; height: 46px; opacity: .9; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: 12px; padding: 2px 7px; border-radius: 999px; }
.delta .ico { width: 13px; height: 13px; stroke-width: 2.2; }
.delta.sube { background: var(--ok-suave); color: #217A51; }
.delta.baja { background: var(--error-suave); color: #B22F2F; }
.vacio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 20px; color: var(--texto-2); }
.vacio .ico { width: 36px; height: 36px; color: var(--rosa-300); stroke-width: 1.3; }
.vacio strong { color: var(--texto); font-size: 15px; }

/* ───── tablas ───── */
.tabla-envoltura { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { position: sticky; top: 0; z-index: 1; padding: 10px 14px; text-align: left; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--texto-3); background: var(--superficie-2); border-bottom: 1px solid var(--borde); white-space: nowrap; }
.tabla td { padding: 12px 14px; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr { transition: background .15s; }
.tabla tbody tr:hover { background: var(--rosa-50); }
.tabla .der { text-align: right; }
.tabla .clic { cursor: pointer; }

/* ───── hojas (modales) ───── */
.velo { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 20px; background: rgba(30, 15, 23, .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .28s var(--ease); }
.velo.abierto { opacity: 1; }
.hoja { position: relative; display: flex; flex-direction: column; width: 100%; max-height: min(88vh, 900px); background: var(--superficie); border-radius: var(--r-xl); box-shadow: var(--sombra-3); transform: translateY(18px) scale(.98); opacity: 0; transition: transform .38s var(--ease), opacity .3s var(--ease); }
.velo.abierto .hoja { transform: none; opacity: 1; }
.hoja-s { max-width: 420px; } .hoja-m { max-width: 600px; } .hoja-l { max-width: 860px; } .hoja-xl { max-width: 1120px; }
.hoja-asa { display: none; }
.hoja-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px 4px; }
.hoja-titulo { font-family: var(--f-display); font-size: 24px; font-weight: 500; letter-spacing: -.015em; }
.hoja-sub { margin-top: 4px; font-size: 13.5px; color: var(--texto-2); }
.hoja-cuerpo { padding: 14px 24px 22px; overflow-y: auto; overscroll-behavior: contain; }
.hoja-pie { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--borde); background: var(--superficie-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.texto-confirmar { font-size: 15px; color: var(--texto-2); }
@media (max-width: 640px) {
  .velo { place-items: end stretch; padding: 0; }
  .hoja { max-width: none; max-height: 92vh; border-radius: 26px 26px 0 0; transform: translateY(100%); }
  .hoja-pie { border-radius: 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .hoja-asa { display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--ciruela-100); }
}

/* ───── avisos ───── */
.avisos { position: fixed; z-index: 1000; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(92vw, 460px); }
.aviso { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--ciruela-900); color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--sombra-3); transform: translateY(16px) scale(.96); opacity: 0; transition: all .35s var(--ease-rebote); }
.aviso.visible { transform: none; opacity: 1; }
.aviso .ico { color: #7FE0AE; }
.aviso-error .ico { color: #FF9C9C; }
.aviso-info .ico { color: var(--rosa-300); }
.banda-demo { position: fixed; z-index: 800; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: rgba(42, 21, 32, .82); color: #fff; font-size: 12px; font-weight: 600; backdrop-filter: blur(8px); pointer-events: none; }
.banda-demo .ico { width: 15px; height: 15px; color: var(--rosa-300); }
.sin-conexion { position: fixed; z-index: 1001; top: 12px; left: 50%; transform: translate(-50%, -80px); display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--error); color: #fff; font-size: 13px; font-weight: 700; transition: transform .35s var(--ease); }
.sin-conexion.visible { transform: translate(-50%, 0); }

/* ───── gráficos ───── */
.graf { width: 100%; height: auto; overflow: visible; }
.graf-guia { stroke: var(--borde); stroke-dasharray: 3 5; }
.graf-eje { font-size: 11px; fill: var(--texto-3); font-family: var(--f-ui); font-weight: 600; }
.graf-valor { font-size: 11px; fill: var(--texto-2); font-weight: 800; }
.graf-barra rect:first-of-type { transform-box: fill-box; transform-origin: bottom; animation: crecer .9s var(--ease) both; animation-delay: calc(var(--i, 0) * 22ms); }
.graf-barra:hover rect:first-of-type { filter: brightness(1.12); }
.graf-linea { stroke-dasharray: 1; stroke-dashoffset: 1; animation: trazar 1.6s var(--ease) forwards; }
.graf-area .graf-linea[stroke-dasharray="5 5"] { stroke-dasharray: 5 5; stroke-dashoffset: 0; animation: aparecer .8s .6s both; }
.graf-relleno { animation: aparecer 1s .3s both; }
.graf-punto { animation: aparecer .5s 1.3s both; }
.graf-zona:hover { fill: rgba(214, 51, 108, .05); }
.graf-arco { transition: stroke-dasharray .9s var(--ease); animation: aparecer .6s both; animation-delay: calc(var(--i, 0) * 80ms); }
.graf-centro { font-family: var(--f-display); font-size: 24px; font-weight: 500; fill: var(--texto); }
.graf-centro-sub { font-size: 10.5px; font-weight: 700; fill: var(--texto-3); letter-spacing: .08em; text-transform: uppercase; }
.graf-anillo-txt { font-size: 15px; font-weight: 800; fill: var(--texto); font-family: var(--f-ui); }
.graf-h { display: flex; flex-direction: column; gap: 14px; }
.graf-h-fila { animation: subir .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.graf-h-cab { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }
.graf-h-etq { font-weight: 600; }
.graf-h-val { font-weight: 800; font-variant-numeric: tabular-nums; }
.graf-h-pista { height: 8px; border-radius: 999px; background: var(--superficie-2); overflow: hidden; }
.graf-h-barra { display: block; height: 100%; border-radius: 999px; transform-origin: left; animation: ensanchar 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 150ms); }
.graf-h-det { margin-top: 4px; font-size: 12px; color: var(--texto-3); }
.graf-calor { display: grid; grid-template-columns: 38px repeat(var(--cols), 1fr); gap: 3px; font-size: 10.5px; color: var(--texto-3); font-weight: 700; }
.graf-calor-col { text-align: center; }
.graf-calor-fila { display: flex; align-items: center; }
.graf-calor-celda { height: 22px; border-radius: 5px; transition: transform .15s; }
.graf-calor-celda:hover { transform: scale(1.18); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--rosa-400); }
.leyenda { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--texto-2); }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.leyenda i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* ───── armazón de las pantallas del personal ───── */
.cuerpo-app { background: radial-gradient(1200px 600px at 100% -10%, rgba(249, 206, 219, .5), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(247, 235, 218, .7), transparent 60%), var(--fondo); min-height: 100vh; }
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }
.app-lateral { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px 16px; color: #F5E7EC; background: radial-gradient(420px 300px at 0% 0%, rgba(214, 51, 108, .35), transparent 70%), linear-gradient(180deg, #2E1622, #1E0F17); overflow-y: auto; }
.app-lateral .logo-marca { padding: 0 8px 18px; }
.app-lateral .monograma { color: #F28CAE; }
.app-lateral .logo-nombre { font-size: 15px; color: #fff; }
.app-lateral .logo-sub { color: rgba(245, 231, 236, .55); font-size: 8.5px; }
.app-rol { margin: 0 8px 14px; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: rgba(245, 231, 236, .7); }
.app-rol strong { display: block; color: #fff; font-size: 13.5px; }
.app-nav { display: flex; flex-direction: column; gap: 3px; }
.app-nav-titulo { margin: 14px 12px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: rgba(245, 231, 236, .4); }
.app-nav-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: rgba(245, 231, 236, .78); font-size: 14px; font-weight: 600; text-align: left; text-decoration: none; transition: background .2s, color .2s; }
.app-nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.app-nav-item[aria-current="page"], .app-nav-item.activo { background: linear-gradient(90deg, rgba(214, 51, 108, .9), rgba(184, 35, 90, .75)); color: #fff; box-shadow: 0 8px 22px rgba(214, 51, 108, .35); }
.app-nav-item .ico { width: 19px; height: 19px; }
.app-nav-item .cuenta { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; }
.app-nav-item .cuenta.caliente { background: var(--coral); color: #fff; animation: latido-rosa 2s infinite; }
.app-lateral-pie { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: rgba(245, 231, 236, .55); display: flex; flex-direction: column; gap: 8px; }
.app-lateral-pie a { color: rgba(245, 231, 236, .8); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.app-lateral-pie a:hover { color: #fff; }
.app-reloj { font-family: var(--f-display); font-size: 30px; font-weight: 400; color: #fff; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.app-principal { min-width: 0; display: flex; flex-direction: column; }
.app-cabecera { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 18px 28px; background: rgba(252, 247, 246, .78); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--borde); }
.app-cabecera h1 { font-family: var(--f-display); font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.app-cabecera .sub { font-size: 13px; color: var(--texto-2); margin-top: 2px; }
.app-cabecera .acciones { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-vista { padding: 24px 28px 60px; }
.app-vista.entrando { animation: subir .45s var(--ease) both; }
.rejilla { display: grid; gap: 18px; }
.rejilla-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.rejilla-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rejilla-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rejilla-21 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.boton-menu { display: none; }
@media (max-width: 1100px) { .rejilla-21, .rejilla-3 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .app-lateral { position: fixed; z-index: 700; inset: auto 0 0 0; height: auto; flex-direction: row; padding: 6px 8px max(6px, env(safe-area-inset-bottom)); overflow-x: auto; overflow-y: hidden; background: #1E0F17; }
  .app-lateral .logo-marca, .app-rol, .app-nav-titulo, .app-lateral-pie { display: none; }
  .app-nav { flex-direction: row; gap: 2px; width: 100%; }
  .app-nav-item { flex: 1 0 auto; flex-direction: column; gap: 3px; min-height: 54px; padding: 6px 10px; font-size: 10.5px; justify-content: center; }
  .app-nav-item .cuenta { position: absolute; top: 4px; right: 6px; min-width: 18px; height: 18px; font-size: 10px; }
  .app-cabecera { padding: 14px 16px; }
  .app-cabecera h1 { font-size: 21px; }
  .app-vista { padding: 16px 14px 100px; }
  .rejilla-2 { grid-template-columns: 1fr; }
  .banda-demo { bottom: 78px; }
}

/* ───── utilidades de diseño ───── */
.fila { display: flex; align-items: center; gap: 10px; }
.fila-entre { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.col { display: flex; flex-direction: column; }
.envuelve { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.crece { flex: 1; min-width: 0; }
.cortar { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.separador { height: 1px; background: var(--borde); margin: 14px 0; border: 0; }
.esqueleto { background: linear-gradient(90deg, #F4EAED 25%, #FBF4F6 50%, #F4EAED 75%); background-size: 200% 100%; animation: brillo-esq 1.3s infinite; border-radius: 10px; }
[data-revelar] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--retraso, 0s); }
[data-revelar].revelado { opacity: 1; transform: none; }

/* ───── animaciones ───── */
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes crecer { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes ensanchar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes trazar { to { stroke-dashoffset: 0; } }
@keyframes latido { 0% { box-shadow: 0 0 0 0 rgba(46, 156, 106, .5); } 70% { box-shadow: 0 0 0 9px rgba(46, 156, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 156, 106, 0); } }
@keyframes latido-rosa { 0% { box-shadow: 0 0 0 0 rgba(238, 90, 98, .55); } 70% { box-shadow: 0 0 0 8px rgba(238, 90, 98, 0); } 100% { box-shadow: 0 0 0 0 rgba(238, 90, 98, 0); } }
@keyframes brillo-esq { to { background-position: -200% 0; } }
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes destello { 0% { box-shadow: 0 0 0 0 rgba(214, 51, 108, .45); } 100% { box-shadow: 0 0 0 16px rgba(214, 51, 108, 0); } }
.nuevo-destello { animation: destello 1.2s var(--ease) 3; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-revelar] { opacity: 1; transform: none; }
}

/* ───── impresión (recibos y reportes) ───── */
@media print {
  .app-lateral, .app-cabecera .acciones, .banda-demo, .avisos, .no-imprimir { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}
