/* Capa de marca VALCAB: tokens, superficies planas premium, íconos 3D y microanimaciones. Se carga al final. */
/* Diseño plano: colores sólidos, sin degradados ni desenfoques; profundidad con líneas de 1 px y sombras mínimas.
   Escala: espacios 4/8/12/16/24/32 · radios 12/16/24. Acción principal en negro VALCAB; el oro es el acento. */

/* ───────── 1. Tokens de marca ─────────
   Públicos para los demás módulos (auth.css, tools.css, agenda.css, finanzas.css):
   color --vc-negro --vc-carbon --vc-carbon-2 --vc-oro --vc-oro-claro --vc-oro-hondo --vc-oro-texto --vc-crema --vc-arena --vc-papel
         --vc-oro-tinta (texto sobre el oro) --vc-oro-vivo (el oro sobre superficies oscuras) --vc-oro-2 (rayas y marcas finas)
         --vc-oro-hover --vc-oro-luz (al pasar el mouse) --vc-oro-rgb (para sombras y anillos con transparencia)
   Al entrar a FIO, Limpieza o Ratagom estos tokens toman el color de la empresa (shell.css, «Tema por empresa»).
         --vc-linea --vc-linea-suave --vc-texto --vc-texto-2 --vc-texto-3 --vc-hover --vc-sel
         --vc-ok --vc-ok-bg --vc-error --vc-error-bg --vc-aviso --vc-aviso-bg --vc-info --vc-info-bg
   superficies --vc-grad-oro --vc-grad-oro-h --vc-grad-noche (hoy colores sólidos) · sombras --vc-sh-1 --vc-sh-2 --vc-sh-3 --vc-sh-oro --vc-sh-noche
   radios --vc-r-sm (12) --vc-r-md (16) --vc-r-lg (24) --vc-r-pill · espacios --vc-sp-1…6 (4/8/12/16/24/32)
   tipografía --vc-font-display (Archivo) --vc-font-ui (Inter) --vc-font-mono · movimiento --vc-t1/2/3 (.15/.22/.32 s) --vc-ease --vc-spring */
:root {
  --vc-negro: #0B0C0E;
  --vc-carbon: #141519;
  --vc-carbon-2: #1E1F24;
  --vc-oro: #FDB207;
  --vc-oro-claro: #FFD45C;
  --vc-oro-hondo: #DE9200;
  --vc-oro-texto: #8A5A00;
  --vc-oro-tinta: #14130F;
  --vc-oro-vivo: #FDB207;
  --vc-oro-2: #FDB207;
  --vc-oro-hover: #F0A800;
  --vc-oro-luz: #FFC12E;
  --vc-oro-rgb: 253, 178, 7;
  --vc-crema: #FFF8E6;
  --vc-arena: #F4F1EA;
  --vc-papel: #FFFFFF;
  --vc-linea: #E8E3D9;
  --vc-linea-suave: #F0ECE4;
  --vc-tinta: #14130F;
  /* R39: textos secundarios más oscuros (contraste AA también sobre la arena del fondo). */
  --vc-gris: #5F5A51;
  --vc-texto: #14130F;
  --vc-texto-2: #4F4B44;
  --vc-texto-3: #5F5A51;
  /* Anillo de foco: tinta sobre lo claro; sobre lo oscuro (barra del celular, portada) se usa el oro (ver styles.css). */
  --vc-foco: #14130F;
  --vc-hover: #FBF8F1;
  --vc-sel: #FFF5D9;
  --vc-ok: #1D7A4B; --vc-ok-bg: #E7F4EC;
  --vc-error: #B42318; --vc-error-bg: #FCEDEB;
  --vc-aviso: #A65A08; --vc-aviso-bg: #FCF1DE;
  --vc-info: #2A55C5; --vc-info-bg: #ECF1FD;
  --vc-font-display: 'Archivo', 'Inter', system-ui, sans-serif;
  --vc-font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --vc-font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --vc-sp-1: 4px; --vc-sp-2: 8px; --vc-sp-3: 12px; --vc-sp-4: 16px; --vc-sp-5: 24px; --vc-sp-6: 32px;
  --vc-r-pill: 999px;
  /* Los nombres «grad» se conservan para los demás módulos, pero ya son colores sólidos. */
  --vc-grad-oro: #FDB207;
  --vc-grad-oro-h: #FDB207;
  --vc-grad-noche: #141519;
  --vc-sh-1: 0 1px 2px rgba(28, 22, 10, .05);
  --vc-sh-2: 0 1px 2px rgba(28, 22, 10, .06), 0 6px 16px -10px rgba(28, 22, 10, .2);
  --vc-sh-3: 0 1px 3px rgba(28, 22, 10, .08), 0 18px 40px -18px rgba(28, 22, 10, .3);
  --vc-sh-oro: none;
  --vc-sh-noche: none;
  --vc-r-sm: 12px;
  --vc-r-md: 16px;
  --vc-r-lg: 24px;
  --vc-ease: cubic-bezier(.22, 1, .36, 1);
  --vc-spring: cubic-bezier(.34, 1.45, .64, 1);
  --vc-t1: .15s;
  --vc-t2: .22s;
  --vc-t3: .32s;

  /* Tokens existentes, afinados: neutros cálidos y semánticos sobrios. */
  --fondo: var(--vc-arena);
  --papel: #FFFFFF;
  --linea: var(--vc-linea);
  --acero-50: #F8F6F1;
  --acero-100: #EFECE5;
  --acero-200: #E1DCD1;
  --acero-300: #C6C0B3;
  --acero-400: #8A8478;
  --acero-500: #5F5A51;
  --acero-600: #4F4B44;
  --acero-700: #3E3B35;
  --oro-50: #FFF8E6;
  --oro-100: #FFEDBF;
  --ok: var(--vc-ok); --ok-50: var(--vc-ok-bg);
  --error: var(--vc-error); --error-50: var(--vc-error-bg);
  --aviso: var(--vc-aviso); --aviso-50: var(--vc-aviso-bg);
  --info: var(--vc-info); --info-50: var(--vc-info-bg);
  --azul: #2F6BE0; --azul-50: #EAF0FD;
  --verde: #1D7A4B; --verde-50: #E7F4EC;
  --radio: 12px;
  --radio-lg: 16px;
  --sombra-1: var(--vc-sh-1);
  --sombra-2: var(--vc-sh-2);
  --sombra-3: var(--vc-sh-3);
  --sombra-card: var(--vc-sh-1);
  --grad-oro: var(--vc-grad-oro);
  --grad-grafito: var(--vc-grad-noche);
}

/* ───────── 2. Base ───────── */
body { background: var(--fondo); color: var(--vc-tinta); font-feature-settings: 'cv11', 'ss01'; text-rendering: optimizeLegibility; }
h1, h2 { letter-spacing: -.022em; }
h3 { letter-spacing: -.01em; }
::selection { background: rgba(var(--vc-oro-rgb), .32); }
:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; border-radius: 6px; }
:is(.topbar, .hero, .tech-top, .here, .pick-bar, .doc-bar, .toast) :focus-visible { outline-color: var(--vc-oro-vivo, #FDB207); }
.muted { color: var(--acero-500); }
a { color: var(--vc-oro-texto); }

/* ───────── 3. Movimiento ───────── */
@keyframes vcRise { from { opacity: 0; transform: translateY(10px); } }
@keyframes vcFade { from { opacity: 0; } }
@keyframes vcPop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes vcSheet { from { transform: translateY(100%); } }
@keyframes vcDrawer { from { opacity: .4; transform: translateX(56px); } }
@keyframes vcToast { from { opacity: 0; transform: translateY(18px) scale(.94); } }
@keyframes vcPulse { 50% { opacity: .55; } }
@keyframes vcIconPop { 0% { transform: scale(.55) rotate(-10deg); opacity: .3; } 70% { transform: scale(1.06) rotate(2deg); opacity: 1; } 100% { transform: none; } }

/* Entrada de la página: aparece y sube, en cascada (solo bloques de contenido; nunca capas fijas como modales). */
.page > :is(.page-head, .hero, .card, .kpis, .grid-2, .stack, .stack-lg, .chips, .toolbar, .tabs, .split, .hammy-split, .people, .section-title, .alert),
.tech-page > .here, .tech-page > .stack > :is(.t-hero, .qtools, section, .card, .row, .alert, .back-link, .btn, .paro-btn, .job-voice, .job-actions) {
  animation: vcRise .46s var(--vc-ease) backwards;
}
:is(.page, .tech-page > .stack) > :not(.overlay, .wizard):nth-child(2) { animation-delay: .04s; }
:is(.page, .tech-page > .stack) > :not(.overlay, .wizard):nth-child(3) { animation-delay: .08s; }
:is(.page, .tech-page > .stack) > :not(.overlay, .wizard):nth-child(4) { animation-delay: .12s; }
:is(.page, .tech-page > .stack) > :not(.overlay, .wizard):nth-child(5) { animation-delay: .16s; }
:is(.page, .tech-page > .stack) > :not(.overlay, .wizard):nth-child(n+6) { animation-delay: .2s; }
/* Tarjetas en cascada */
:is(.kpis, .ov-grid, .people, .qtools-row, .t-stats) > *, .stack > .job-card, .stack > .store-card { animation: vcRise .5s var(--vc-ease) backwards; }
:is(.kpis, .ov-grid, .people, .qtools-row, .t-stats) > :nth-child(2), .stack > .job-card:nth-child(3), .stack > .store-card:nth-child(4) { animation-delay: .05s; }
:is(.kpis, .ov-grid, .people, .qtools-row, .t-stats) > :nth-child(3), .stack > .job-card:nth-child(4), .stack > .store-card:nth-child(5) { animation-delay: .1s; }
:is(.kpis, .ov-grid, .people, .qtools-row) > :nth-child(4), .stack > .store-card:nth-child(6) { animation-delay: .15s; }
:is(.kpis, .ov-grid, .people, .qtools-row) > :nth-child(5), .stack > .store-card:nth-child(7) { animation-delay: .2s; }
.people > :nth-child(6) { animation-delay: .24s; }
.people > :nth-child(n+7) { animation-delay: .28s; }

/* ───────── 4. Portada de arranque ───────── */
.boot {
  min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 0; position: relative; overflow: hidden;
  background: var(--vc-negro);
}
.boot img { animation: none; }
.boot-mark { position: relative; width: 96px; height: 78px; animation: bootMark .56s var(--vc-ease) both; }
.boot-mark img { display: block; width: 96px; height: 78px; }
.boot-word { margin-top: 22px; font-family: var(--titulo); font-weight: 800; color: #fff; font-size: 1.5rem; letter-spacing: .34em; padding-left: .34em; animation: bootWord .52s .18s var(--vc-ease) both; }
.boot-sub { margin-top: 8px; font-size: 0.6875rem; font-weight: 700; letter-spacing: .5em; padding-left: .5em; text-transform: uppercase; color: var(--vc-oro); animation: vcFade .4s .4s both; }
/* Si la red tarda, una línea dorada indica que sigue cargando. */
.boot::after { content: ''; position: absolute; left: 50%; bottom: calc(48px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 2px; margin-left: -28px; border-radius: 2px; background: var(--vc-oro); opacity: 0; transform-origin: left; animation: bootBar 1.2s 1s ease-in-out infinite; }
@keyframes bootMark { from { opacity: 0; clip-path: inset(-40px 100% -40px -40px); transform: translateY(6px) scale(.96); } to { opacity: 1; clip-path: inset(-40px -40px -40px -40px); transform: none; } }
@keyframes bootWord { from { opacity: 0; letter-spacing: .6em; } to { opacity: 1; letter-spacing: .34em; } }
@keyframes bootBar { 0% { opacity: 1; transform: scaleX(0); } 60% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }

/* ───────── 5. Firma de marca (isotipo + VALCAB) ───────── */
.brand-lockup { display: inline-flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: var(--bm, 34px); height: auto; flex: none; }
.brand-text { display: grid; line-height: 1; min-width: 0; }
.brand-word { font-family: var(--titulo); font-weight: 800; color: #fff; font-size: calc(var(--bm, 34px) * .5); letter-spacing: .26em; white-space: nowrap; }
.brand-sub { margin-top: 5px; font-size: 0.625rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: var(--vc-oro-vivo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────── 6. Íconos 3D ─────────
   .i3d-art: ilustración 3D de VALCAB (imagen con fondo transparente); svg.i3d: azulejo plano de respaldo. */
.i3d { flex: none; display: inline-block; vertical-align: middle; overflow: visible; transition: transform var(--vc-t3) var(--vc-spring); }
img.i3d-art { object-fit: contain; user-select: none; -webkit-user-drag: none; }
/* El tamaño lo manda el atributo del ícono aunque el contenedor fije el de los íconos de trazo. */
svg.i3d[width="24"] { width: 24px; height: 24px; } svg.i3d[width="26"] { width: 26px; height: 26px; }
svg.i3d[width="28"] { width: 28px; height: 28px; } svg.i3d[width="30"] { width: 30px; height: 30px; }
svg.i3d[width="32"] { width: 32px; height: 32px; } svg.i3d[width="34"] { width: 34px; height: 34px; }
svg.i3d[width="36"] { width: 36px; height: 36px; } svg.i3d[width="38"] { width: 38px; height: 38px; }
svg.i3d[width="40"] { width: 40px; height: 40px; } svg.i3d[width="42"] { width: 42px; height: 42px; }
svg.i3d[width="44"] { width: 44px; height: 44px; } svg.i3d[width="48"] { width: 48px; height: 48px; }
svg.i3d[width="52"] { width: 52px; height: 52px; } svg.i3d[width="56"] { width: 56px; height: 56px; }
svg.i3d[width="64"] { width: 64px; height: 64px; }
@media (hover: hover) {
  :is(.kpi, .ov, .qtool, .person, .list-item, .nav-item):hover .i3d { transform: translateY(-2px) rotate(-4deg) scale(1.04); }
}

/* ───────── 7. Botones ───────── */
.btn {
  border-width: 1px; border-radius: 12px; min-height: 3rem; padding: 0 20px; font-size: 1rem; gap: 8px; font-weight: 600; letter-spacing: -.005em;
  transition: transform var(--vc-t1) var(--vc-ease), box-shadow var(--vc-t2) var(--vc-ease), background-color var(--vc-t2), border-color var(--vc-t2), color var(--vc-t2), filter var(--vc-t2);
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn-primary { background: var(--vc-carbon); color: #fff; border-color: var(--vc-carbon); box-shadow: none; }
/* R70 · El «hover» del botón principal solo con mouse (en el celular se queda pegado al tocar, y el botón que aparece en el mismo lugar
   en la pantalla siguiente nace «hover») y con la prioridad de la clase sola: si una pantalla pinta el botón de otro color (el dorado del
   técnico, el color de la marca), ese color se queda. Antes se volvía casi negro con el texto oscuro («Siguiente», «Listo»). */
@media (hover: hover) and (pointer: fine) {
  .btn-primary:where(:hover:not(:disabled)) { background: #2A2B31; border-color: #2A2B31; filter: none; box-shadow: none; }
}
.btn-primary svg { color: var(--vc-oro-vivo); }
.btn-gold, .btn-primary.btn-gold { background: var(--vc-oro); color: var(--vc-oro-tinta); border-color: var(--vc-oro); }
.btn-gold:hover:not(:disabled) { background: var(--vc-oro-hover); border-color: var(--vc-oro-hover); }
.btn-gold svg { color: currentColor; }
.btn-dark { background: var(--vc-carbon); color: #fff; border-color: var(--vc-carbon); box-shadow: none; }
.btn-dark:hover:not(:disabled) { background: #2A2B31; border-color: #2A2B31; }
.btn-outline { background: var(--papel); border-color: var(--acero-200); color: var(--vc-tinta); box-shadow: none; }
.btn-outline:hover:not(:disabled) { background: var(--acero-50); border-color: var(--acero-300); box-shadow: none; }
.btn-ghost { color: var(--acero-700); }
.btn-ghost:hover:not(:disabled) { background: rgba(28, 22, 10, .05); }
.btn-glass { background: #24252B; color: #fff; border-color: #34353C; box-shadow: none; }
.btn-glass:hover:not(:disabled) { background: #2E2F36; border-color: #44454D; }
.btn-danger { border-color: #F0CFCA; color: var(--error); }
.btn-solid-danger { background: var(--error); border-color: var(--error); box-shadow: none; }
.btn-whats { background: #1FA855; border-color: #1FA855; box-shadow: none; }
.btn-lg { min-height: 3.5rem; border-radius: 14px; font-size: 1.0625rem; padding: 0 26px; }
.btn-sm { min-height: 2.5rem; border-radius: 10px; padding: 0 14px; font-size: 0.9375rem; }
.btn-icon { width: 44px; min-height: 44px; border-radius: 12px; }
.btn:disabled { opacity: .45; }
.link-btn { color: var(--vc-oro-texto); font-weight: 650; text-decoration-thickness: 1.5px; text-decoration-color: rgba(138, 90, 0, .35); transition: color var(--vc-t1), text-decoration-color var(--vc-t1); }
.link-btn:hover { color: var(--vc-tinta); text-decoration-color: var(--vc-oro); }

/* ───────── 8. Formularios ───────── */
.field > label, .field-label { font-size: 0.9375rem; color: var(--acero-700); }
.input, select.input, textarea.input { border: 1px solid var(--acero-200); border-radius: 12px; background: #fff; box-shadow: none; transition: border-color var(--vc-t2), box-shadow var(--vc-t2); }
.input:hover { border-color: var(--acero-300); }
.input:focus { border-color: var(--vc-carbon); box-shadow: 0 0 0 3px rgba(var(--vc-oro-rgb), .28); }
.input::placeholder { color: var(--acero-400); }
.input-wrap > svg.lead { color: var(--acero-400); }

/* ───────── 9. Filtros, pestañas, etiquetas ───────── */
.chip { border: 1px solid var(--acero-200); background: #fff; color: var(--acero-700); padding: 7px 14px; box-shadow: none; transition: background var(--vc-t2), border-color var(--vc-t2), color var(--vc-t2), transform var(--vc-t1) var(--vc-ease), box-shadow var(--vc-t2); }
button.chip:active { transform: scale(.95); }
.chip:hover { border-color: var(--acero-300); }
.chip[aria-pressed="true"] { background: var(--vc-carbon); border-color: var(--vc-carbon); color: #fff; box-shadow: none; }
.chip[aria-pressed="true"] .n { color: var(--vc-oro-vivo); opacity: 1; }
.chip .n { font-variant-numeric: tabular-nums; }
.chip.chip-ok[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.chip.chip-aviso[aria-pressed="true"] { background: var(--aviso); border-color: var(--aviso); }
.chip.chip-error[aria-pressed="true"] { background: var(--error); border-color: var(--error); }
.chip.chip-prio-alta[aria-pressed="true"] { background: var(--error); border-color: var(--error); }
.chip.chip-prio-media[aria-pressed="true"] { background: var(--aviso); border-color: var(--aviso); }
.chip.chip-prio-baja[aria-pressed="true"] { background: var(--acero-600); border-color: var(--acero-600); }

.tabs { position: relative; background: #ECE8DF; padding: 4px; border-radius: 12px; box-shadow: none; }
.tab { position: relative; z-index: 1; border-radius: 9px; color: var(--acero-600); transition: color var(--vc-t2); }
.tab:hover { color: var(--vc-tinta); }
.tab[aria-selected="true"] { background: transparent; box-shadow: none; color: var(--vc-tinta); }
.tabs:not(:has(.tabs-ind)) .tab[aria-selected="true"] { background: #fff; box-shadow: var(--vc-sh-1); }
.tabs-ind { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; border-radius: 9px; background: #fff; box-shadow: 0 1px 2px rgba(28, 22, 10, .1); pointer-events: none; }
.tabs-ind.on { transition: transform var(--vc-t3) var(--vc-ease), width var(--vc-t3) var(--vc-ease); }

.pill { padding: 3px 10px; font-size: 0.75rem; font-weight: 600; letter-spacing: .005em; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent); }
.pill::before { width: 6px; height: 6px; }
.pill-gris { background: var(--acero-100); color: var(--acero-600); }
.kv dd .pill { white-space: normal; }
.role { font-size: 0.6563rem; letter-spacing: .1em; padding: 4px 9px; border-radius: 7px; }
.role-admin, .role-direccion { background: var(--vc-carbon); box-shadow: none; }
.role-tecnico { background: var(--oro-100); color: var(--oro-texto); }
.prio { border-radius: 6px; font-size: 0.6875rem; letter-spacing: .06em; padding: 3px 8px; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent); }
.store-num { background: var(--vc-carbon); color: var(--vc-oro-vivo); border-radius: 7px; padding: 4px 8px; font-size: 0.75rem; letter-spacing: .06em; box-shadow: none; white-space: nowrap; }
.store-num.cf { background: var(--vc-info); color: #fff; }

/* ───────── 10. Avisos ───────── */
.alert { gap: 12px; padding: 13px 16px; border-radius: 14px; font-size: 0.875rem; line-height: 1.45; align-items: center; animation: vcRise .3s var(--vc-ease) backwards; }
.alert > svg { width: 18px; height: 18px; padding: 7px; box-sizing: content-box; border-radius: 50%; margin: -2px 0; }
.alert-aviso { background: #FDF6E9; border-color: #F3DDB4; color: #6E3A06; }
.alert-aviso > svg { background: rgba(166, 90, 8, .12); color: var(--aviso); }
.alert-info { background: #F2F5FD; border-color: #D6E0FA; color: #1F3A86; }
.alert-info > svg { background: rgba(42, 85, 197, .12); color: var(--info); }
.alert-error { background: #FDF1EF; border-color: #F4CEC8; color: #7A1A12; }
.alert-error > svg { background: rgba(180, 35, 24, .12); color: var(--error); }
.alert-ok { background: #EFF8F2; border-color: #C8E6D3; color: #14532D; }
.alert-ok > svg { background: rgba(29, 122, 75, .12); color: var(--ok); }
.alert .link-btn { color: inherit; text-decoration-color: currentColor; margin-left: 2px; }

/* ───────── 11. Tarjetas y títulos de sección ───────── */
.card { border: 1px solid var(--vc-linea); border-radius: 16px; box-shadow: none; }
.card-pad { padding: 18px; }
.card-head { gap: 10px; padding: 16px 18px 0; min-height: 30px; }
.card-head h3, .section-title, .group-title {
  font-family: var(--texto); font-size: 0.75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--acero-600); line-height: 1.3;
}
.card-head h3 { color: var(--vc-tinta); }
.card-head > .i3d { margin: -2px 0; }
.card-head + .card-pad { padding-top: 14px; }
.section-title { display: flex; align-items: center; gap: 12px; margin: 4px 0 -6px; }
.section-title::after { content: ''; flex: 1; height: 1px; background: var(--vc-linea); }
.group-title { color: var(--acero-500); }
.group-title .n { background: var(--vc-tinta); color: var(--vc-oro-vivo); font-size: 0.6875rem; letter-spacing: 0; padding: 1px 8px; border-radius: 999px; }
@media (hover: hover) {
  :is(.kpi.link, .person, .ov, .qtool, .store-card, .job-card):hover { box-shadow: var(--vc-sh-2); }
  :is(.kpi.link, .person, .ov):hover { transform: translateY(-2px); }
}
:is(.kpi.link, .person, .ov, .qtool):active { transform: scale(.98); }
:is(.kpi, .person, .ov, .qtool, .store-card, .job-card) { transition: transform var(--vc-t2) var(--vc-ease), box-shadow var(--vc-t2) var(--vc-ease), border-color var(--vc-t2); }

/* Listas */
.list-item { padding: 13px 18px; border-top: 1px solid var(--vc-linea-suave); transition: background var(--vc-t1); }
button.list-item:hover { background: #FBF8F1; }
button.list-item:active { background: #F6F1E5; }
.list-item > svg:last-child { color: var(--acero-300); transition: transform var(--vc-t2) var(--vc-ease), color var(--vc-t2); }
button.list-item:hover > svg:last-child { transform: translateX(3px); color: var(--vc-oro-hondo); }
.list-item .t { font-weight: 600; letter-spacing: -.005em; }

/* Personas, avatares */
.avatar { background: #FCEBC0; color: #6B4500; box-shadow: none; letter-spacing: -.02em; }
.avatar.dark { background: var(--vc-carbon); color: var(--vc-oro-vivo); box-shadow: none; }
.avatar:has(img) { background: var(--acero-100); }
.people { gap: 14px; }
.person { padding: 18px; gap: 14px; border-radius: 16px; }
.person .nm { font-size: 0.9688rem; letter-spacing: -.01em; }

/* ───────── 12. Tablas ───────── */
table.tbl { font-size: 0.875rem; }
.tbl th { background: #FAF8F3; font-size: 0.6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--acero-500); padding: 12px 16px; border-bottom: 1px solid var(--vc-linea); position: sticky; top: 0; z-index: 2; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--vc-linea-suave); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tr.click td { transition: background var(--vc-t1); }
.tbl tr.click:hover td { background: #FBF7EC; }
.tbl tr.sel td { background: #FFF5D9; }
.tbl tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--vc-oro); }
.card.table-wrap { border-radius: 16px; }

/* ───────── 13. Capas: modal, panel lateral, avisos breves ───────── */
.overlay { background: rgba(11, 12, 14, .55); animation: vcFade var(--vc-t2) ease-out; }
.modal { border-radius: 24px; box-shadow: var(--vc-sh-3); animation: vcPop var(--vc-t3) var(--vc-spring); border: 0; }
.modal-head { padding: 20px 22px 12px; }
.modal-head h2 { font-size: 1.25rem; }
.modal-body { padding: 4px 22px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--vc-linea-suave); background: #FCFBF8; border-radius: 0 0 24px 24px; }
.drawer-overlay { background: rgba(11, 12, 14, .45); animation: vcFade var(--vc-t2) ease-out; }
.drawer { background: var(--fondo); animation: vcDrawer .38s var(--vc-ease); box-shadow: -1px 0 0 rgba(28, 22, 10, .06), var(--vc-sh-3); }
.drawer-head { padding: 16px 18px; border-bottom: 1px solid var(--vc-linea); }
.drawer-head h2 { font-size: 1.1875rem; }
.drawer-foot { border-top: 1px solid var(--vc-linea); box-shadow: none; }
.toast { border-radius: 16px; background: var(--vc-carbon); padding: 12px 18px 12px 12px; box-shadow: var(--vc-sh-3); border: 0; animation: vcToast .4s var(--vc-spring); font-size: 0.9063rem; }
.toast svg { width: 18px; height: 18px; padding: 6px; box-sizing: content-box; border-radius: 50%; background: #1F3B2B; }
.toast-error { background: #7A1A12; }
.toast-error svg { background: rgba(255, 255, 255, .14); color: #FFC9C2; }

/* ───────── 14. Carga y vacíos ───────── */
.skel { display: grid; gap: 16px; padding: 20px 18px; grid-template-columns: minmax(0, 1fr); }
.skel-row { display: flex; align-items: center; gap: 12px; animation: vcFade .3s ease-out backwards; animation-delay: var(--d, 0ms); }
.sk { display: block; border-radius: 8px; background: #ECE8DF; animation: vcPulse 1.4s ease-in-out infinite; }
.sk-ic { width: 40px; height: 40px; border-radius: 12px; flex: none; }
.sk-lines { flex: 1; display: grid; gap: 8px; min-width: 0; }
.sk-l1 { height: 12px; width: 64%; }
.sk-l2 { height: 10px; width: 38%; }
.hero.hero-skel { min-height: 150px; }
.empty { padding: 40px 16px 44px; gap: 10px; }
.empty-ic { display: grid; place-items: center; width: 92px; height: 92px; margin-bottom: 2px; animation: vcPop .5s var(--vc-spring) backwards; }
.empty strong { font-family: var(--titulo); font-size: 1.0625rem; font-weight: 700; color: var(--vc-tinta); letter-spacing: -.01em; }
.empty .small { max-width: 340px; color: var(--acero-500); }

/* ───────── 15. Oficina: menú lateral ───────── */
@media (min-width: 901px) { .shell { grid-template-columns: 264px 1fr; } }
.main { background: none; }
.side { background: #0F1012; border-right: 1px solid #1C1D21; padding: 22px 14px 16px; gap: 14px; color: #E8E4DB; }
.side-logo { padding: 4px 10px 20px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.nav { gap: 2px; }
.nav-group { font-size: 0.6563rem; letter-spacing: .18em; color: #6F6A61; padding: 14px 12px 5px; }
.nav-item { gap: 12px; padding: 6px 10px; border-radius: 12px; color: #BDB7AC; font-weight: 500; transition: background var(--vc-t2), color var(--vc-t2); }
.nav-item .nav-3d { opacity: .9; }
.nav-item:hover { background: #18191D; color: #fff; }
.nav-item[aria-current="page"] { background: #1D1E23; color: #fff; font-weight: 600; box-shadow: none; }
.nav-item[aria-current="page"] .nav-3d { opacity: 1; animation: vcIconPop .45s var(--vc-spring); }
.nav-item[aria-current="page"]::before { left: -14px; top: 11px; bottom: 11px; width: 3px; background: var(--vc-oro-2); box-shadow: none; }
.nav-item .badge { background: var(--error); box-shadow: 0 0 0 2px #0F1012; }
.side-user { border-top: 1px solid #1C1D21; padding-top: 14px; gap: 6px; }
.side-user .me { padding: 8px; border-radius: 14px; background: #16171A; border: 1px solid #222328; }
.side-user .me .avatar { box-shadow: 0 0 0 2px var(--vc-oro); }
.me-name { font-weight: 700; font-size: 0.875rem; color: #fff; }
.side-user .muted { color: #8C867B; }

/* ───────── 16. Encabezados de página ───────── */
.page { gap: 24px; padding-top: 32px; }
.page-head { gap: 16px; }
.page-head > .grow::before { content: ''; display: block; width: 28px; height: 3px; border-radius: 3px; background: var(--vc-oro-2); margin-bottom: 14px; transition: background-color var(--vc-t3); }
.page-head .grow h1 { font-size: 2rem; letter-spacing: -.028em; }
.page-head .grow p { color: var(--acero-500); margin-top: 6px; font-size: 0.9375rem; }
.toolbar { gap: 10px; }

/* ───────── 17. Tablero ───────── */
.hero {
  border-radius: 24px; padding: 30px 32px; gap: 20px; background: var(--vc-carbon); box-shadow: none; isolation: isolate;
}
.hero::before { display: none; }
.hero .btn-primary { background: var(--vc-oro); border-color: var(--vc-oro); color: var(--vc-oro-tinta); }
.hero .btn-primary:hover:not(:disabled) { background: var(--vc-oro-hover); border-color: var(--vc-oro-hover); }
.hero .btn-primary svg { color: currentColor; }
.hero::after { right: -24px; bottom: -84px; width: 320px; height: 320px; opacity: .07; z-index: -1; }
.hero-date { display: inline-flex; align-items: center; gap: 8px; font-size: 0.7188rem; letter-spacing: .18em; color: var(--vc-oro-vivo); }
.hero-date::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--vc-oro-vivo); }
.hero h1 { font-size: 2.25rem; margin-top: 10px; letter-spacing: -.03em; }
.hero p { color: #C9C3B7; margin-top: 8px; font-size: 0.9688rem; }
.hero-actions .btn { min-height: 48px; }

.kpis { gap: 14px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi { padding: 18px 18px 20px; gap: 12px; border-radius: 16px; }
.kpi-top { gap: 12px; }
.kpi-top .lbl { font-size: 0.8125rem; color: var(--acero-600); font-weight: 600; flex: 1; min-width: 0; }
.kpi-go { color: var(--acero-300); flex: none; transition: transform var(--vc-t2) var(--vc-ease), color var(--vc-t2); }
.kpi:hover .kpi-go { transform: translateX(3px); color: var(--vc-oro-hondo); }
.kpi .val { font-size: 2.5rem; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1; margin-top: 2px; }
.kpi .val small { font-size: 1.375rem; color: var(--acero-400); font-weight: 700; letter-spacing: -.02em; margin-left: 1px; }
.kpi .sub { color: var(--acero-500); font-size: 0.7813rem; }
.kpi .bar { height: 6px; border-radius: 6px; background: var(--acero-100); box-shadow: none; }
.kpi .bar span { background: var(--vc-oro-2); border-radius: 6px; box-shadow: none; transform-origin: left; animation: vcBar .9s .25s var(--vc-ease) backwards; }
@keyframes vcBar { from { transform: scaleX(0); } }
.tone-rojo .val { color: var(--error); }

/* Operación · HAMMYs */
.hammy-overview { border-color: var(--vc-linea); }
.page > .hammy-overview { margin-bottom: 0; }
.ov-grid { grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px 18px 18px; }
.ov { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--vc-linea); background: #fff; color: var(--acero-600); }
.ov::before { display: none; }
.ov .i3d { margin-bottom: 10px; }
.ov .n { font-size: 2.125rem; line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--vc-tinta); }
.ov .l { font-size: 0.8125rem; font-weight: 600; color: var(--acero-600); }
.ov.ov-main { background: var(--vc-carbon); border-color: transparent; color: #C9C3B7; box-shadow: none; position: relative; overflow: hidden; }
.ov.ov-main::after { content: ''; position: absolute; right: -18px; bottom: -26px; width: 110px; height: 110px; background: url('/brand/isotipo.svg') center / contain no-repeat; opacity: .08; transform: rotate(-12deg); }
.ov.ov-main .n { color: #fff; font-size: 2.5rem; }
.ov.ov-main .l { color: var(--vc-oro-vivo); }
.ov.gold { background: #EEF7F1; border-color: #CBE7D6; }
.ov.gold .n { color: var(--ok); }
.ov.red { background: #FDF0EE; border-color: #F4CEC8; }
.ov.red .n { color: var(--error); }

.map-key { font-size: 0.75rem; }
.grid-2 { gap: 20px; }
.grid-2 > .card .list { padding-top: 6px !important; }

/* Alertas de HAMMYs */
.alerts-card { border-color: #F2D2CD; box-shadow: none; }
.alerts-card .list-item .t { font-size: 0.9063rem; }
/* R60 · Pantalla «Alertas»: cada renglón abre su trabajo y, a la derecha, «Atendida». */
.alerta-row { gap: 12px; cursor: default; }
.alerta-open { all: unset; box-sizing: border-box; display: grid; gap: 2px; min-width: 0; cursor: pointer; padding: 2px 0; border-radius: 8px; }
.alerta-open:disabled { cursor: default; }
.alerta-open:focus-visible { outline: 2px solid var(--vc-carbon, #15171B); outline-offset: 2px; }
.alerta-open .t.urgent { color: var(--error); font-weight: 700; }
@media (max-width: 640px) { .alerta-row { flex-wrap: wrap; } .alerta-row .btn { margin-left: 26px; } }
.sev { width: 9px; height: 9px; }
.sev-alta { box-shadow: 0 0 0 4px rgba(180, 35, 24, .12); }
.sev-media { box-shadow: 0 0 0 4px rgba(166, 90, 8, .12); }
.alert-dot { background: var(--error); }
.ov:focus-visible, .kpi:focus-visible { outline-offset: 3px; }

/* ───────── 18. Barra superior y barra inferior (celular) ───────── */
.topbar .brand-sub { color: var(--vc-oro-vivo); }
.top-me { border: 0; background: none; padding: 0; border-radius: 50%; cursor: pointer; flex: none; line-height: 0; }
.top-me .avatar, .tech-top .btn-icon .avatar { box-shadow: 0 0 0 2px var(--vc-oro-vivo); transition: box-shadow var(--vc-t3); }
.tabbar { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; border-top: 1px solid var(--vc-linea); box-shadow: none; padding: 6px 6px calc(8px + var(--safe-b)); }
.tabbar button { min-height: 56px; gap: 3px; padding: 4px 2px 2px; font-size: 0.6875rem; font-weight: 600; color: var(--acero-500); transition: color var(--vc-t2); }
.tab-ic { width: 46px; height: 32px; padding: 0; display: grid; place-items: center; border-radius: 12px; transition: transform var(--vc-t1) var(--vc-ease); }
.tab-ic > svg:not(.i3d) { width: 23px; height: 23px; }
.tabbar button:active .tab-ic { transform: scale(.88); }
.tabbar button[aria-current="page"] { color: var(--vc-tinta); font-weight: 700; }
.tabbar button[aria-current="page"] .tab-ic { background: none; }
.tabbar button[aria-current="page"] .i3d { animation: vcIconPop .45s var(--vc-spring); }
.tab-badge { top: -5px; right: 0; background: var(--error); box-shadow: 0 0 0 2px #fff; z-index: 2; }
/* Indicador dorado que se desliza a la pestaña activa. */
.tab-ind { position: absolute; top: 0; left: 6px; width: calc((100% - 12px) / 5); height: 3px; display: flex; justify-content: center; pointer-events: none; transform: translateX(calc(var(--i, 0) * 100%)); transition: transform .42s var(--vc-spring); }
.tab-ind::before { content: ''; width: 30px; height: 3px; border-radius: 0 0 4px 4px; background: var(--vc-oro-2); box-shadow: none; transition: background-color var(--vc-t3); }

@media (max-width: 900px) {
  .topbar {
    position: sticky; background: var(--vc-negro); backdrop-filter: none; -webkit-backdrop-filter: none;
    padding: max(8px, env(safe-area-inset-top)) 12px 8px 6px; gap: 6px; min-height: 60px; box-shadow: none; border-bottom: 1px solid #1C1D21;
  }
  .topbar::after { display: none; }
  .topbar .btn-icon { width: 44px; min-height: 44px; }
  .side { width: 292px; }
  .side-scrim { background: rgba(11, 12, 14, .55); animation: vcFade var(--vc-t2) ease-out; }
  .side { transition: transform .34s var(--vc-ease); }
}

/* ───────── 19. Técnico ───────── */
.tech-top { background: var(--vc-negro); backdrop-filter: none; -webkit-backdrop-filter: none; padding: max(10px, env(safe-area-inset-top)) 12px 10px 16px; min-height: 60px; box-shadow: none; border-bottom: 1px solid #1C1D21; }
.tech-top::after { display: none; }
.tech-top .btn-icon { width: 44px; min-height: 44px; }
.tech-page { padding: 16px 16px 24px; gap: 16px; }
.net-dot { background: #2A2410; color: var(--vc-oro); }

.t-hero { border-radius: 24px; padding: 20px 18px 16px; background: var(--vc-carbon); box-shadow: none; isolation: isolate; }
.t-hero::before { display: none; }
.t-hero::after { z-index: -1; opacity: .07; width: 210px; height: 210px; right: -36px; bottom: -64px; }
.t-hero .hero-date { font-size: 0.6875rem; }
.t-hero h2 { font-size: 1.75rem; margin-top: 8px; letter-spacing: -.03em; }
.t-hello { color: #C9C3B7; font-size: 0.9063rem; margin-top: 6px; }
.t-stats { gap: 8px; margin-top: 16px; }
.t-stat { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 9px; row-gap: 8px; padding: 12px 11px 11px; border-radius: 16px; background: #1E1F25; border: 1px solid #2A2B31; box-shadow: none; }
.t-stat b { font-size: 1.75rem; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; }
.t-stat b .count { font: inherit; color: inherit; }
.t-stat > span { grid-column: 1 / -1; font-size: 0.7188rem; color: #B8B2A6; line-height: 1.25; }
.t-stat.live { background: var(--vc-oro); border-color: var(--vc-oro); box-shadow: none; }
.t-stat.live b, .t-stat.live > span { color: #1A1406; }
.t-stat.warn { border-color: #6B5214; background: #262012; }

.qtools { gap: 10px; }
.qtools .group-title { margin: 0; }
.qtools-row { gap: 8px; grid-auto-columns: minmax(64px, 1fr); padding: 2px 2px 6px; margin: -2px -2px -6px; }
.qtool { padding: 14px 2px 11px; gap: 9px; border-radius: 18px; border: 1px solid var(--vc-linea); box-shadow: none; }
.qtool-lbl { font-size: 0.75rem; color: var(--acero-700); }

.job-card { padding: 16px 16px 14px 18px; gap: 10px; border-radius: 18px; border: 1px solid var(--vc-linea); border-left-width: 1px; border-left-color: var(--vc-linea); position: relative; overflow: hidden; box-shadow: none; }
.job-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--acero-200); }
.job-card.jc-alta::before { background: var(--error); }
.job-card.jc-media::before { background: #E39A12; }
.job-card.live { box-shadow: 0 0 0 2px var(--vc-oro); }
.jc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.jc-folio { font-size: 0.7813rem; font-weight: 700; color: var(--acero-600); letter-spacing: .02em; }
.jc-cf { font-size: 0.7813rem; color: var(--acero-400); white-space: nowrap; }
.jc-store { font-family: var(--titulo); font-weight: 800; font-size: 1.0625rem; line-height: 1.2; letter-spacing: -.012em; overflow-wrap: anywhere; }
.job-card .desc { font-size: 0.9063rem; color: var(--acero-700); line-height: 1.45; }
.job-card .row > .store-num { margin-top: 1px; }
.jc-meta { gap: 8px; }
.job-card .store-actions { margin-top: 2px; }
.store-actions { gap: 10px; }
.store-actions .btn { min-height: 46px; }

.back-link { padding: 8px 14px 8px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--vc-linea); box-shadow: none; font-size: 0.9063rem; transition: transform var(--vc-t1) var(--vc-ease); }
.back-link:active { transform: scale(.96); }
.back-link svg { width: 18px; height: 18px; }

/* Encabezado del trabajo: superficie oscura de la marca */
.job-head { background: var(--vc-carbon); color: #fff; border: 0; border-radius: 22px; padding: 18px; position: relative; overflow: hidden; isolation: isolate; box-shadow: none; }
.job-head::after { content: ''; position: absolute; right: -30px; bottom: -50px; width: 180px; height: 180px; background: url('/brand/isotipo.svg') center / contain no-repeat; opacity: .07; transform: rotate(-12deg); z-index: -1; pointer-events: none; }
.job-head .mono { color: var(--vc-oro); letter-spacing: .02em; }
.job-head h2 { color: #fff; letter-spacing: -.02em; }
.job-head .muted { color: #ABA597; }
.job-head .store-num { background: var(--vc-oro); color: #1A1406; box-shadow: none; }
.job-head .pill { background: #26272D; box-shadow: none; }
.job-head .pill-ok { color: #74E0A6; } .job-head .pill-info { color: #A4BEFF; } .job-head .pill-aviso { color: #FFC871; }
.job-head .pill-error { color: #FF9F95; } .job-head .pill-gris { color: #DAD5CA; } .job-head .pill-oro { color: var(--vc-oro-claro); }
.job-head .prio { background: #26272D; color: #E8E4DB; box-shadow: none; }
.job-head .prio-alta { background: #3A1C1A; color: #FFB0A8; }
.job-head .prio-media { background: #3A2E14; color: #FFD08A; }
.job-head .btn-outline { background: #24252B; border-color: #34353C; color: #fff; box-shadow: none; }
.job-head .btn-outline:hover:not(:disabled) { background: #2E2F36; border-color: #44454D; }
.job-head .btn-ghost { color: #fff; }
.job-detail .btn-lg.btn-block { min-height: 58px; font-size: 1.0625rem; border-radius: 16px; }
.job-actions { background: var(--vc-arena); backdrop-filter: none; -webkit-backdrop-filter: none; border: 1px solid var(--vc-linea); box-shadow: var(--vc-sh-2); padding: 10px; border-radius: 18px; }
.work-step { border-color: var(--vc-linea); }
.step-n { background: var(--vc-carbon); box-shadow: none; }
.paro-btn { border-width: 1px; border-color: #EFC2BC; background: #FDF1EF; border-radius: 14px; transition: transform var(--vc-t1) var(--vc-ease), background var(--vc-t2); }
.paro-btn:active { transform: scale(.98); }
.job-voice { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; text-align: center; }

.store-card { padding: 16px; border-radius: 18px; gap: 12px; }
.dist { color: var(--vc-oro-texto); background: var(--oro-50); border: 1px solid var(--oro-100); border-radius: 999px; padding: 2px 9px; font-size: 0.8125rem; }
.here { background: var(--vc-carbon); border-radius: 20px; padding: 14px 14px 14px 16px; box-shadow: none; }

.profile-hero { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 28px 18px 22px; background: var(--vc-carbon); color: #fff; border: 0; border-radius: 24px; position: relative; overflow: hidden; isolation: isolate; box-shadow: none; }
.profile-hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; background: url('/brand/isotipo.svg') center / contain no-repeat; opacity: .06; transform: rotate(-12deg); z-index: -1; }
.profile-hero h2 { color: #fff; font-size: 1.4375rem; }
.profile-ring { padding: 3px; border-radius: 50%; background: var(--vc-oro); box-shadow: none; line-height: 0; }
.profile-ring .avatar { box-shadow: 0 0 0 3px #17181C; }
.profile-meta { display: flex; gap: 10px; justify-content: center; align-items: center; margin-top: 10px; color: #ABA597; font-size: 0.8125rem; }
.profile-hero .role-tecnico { background: #2A2410; color: var(--vc-oro); }
.profile-hero .btn { min-width: 180px; }
.done-card { border-color: #C8E6D3; background: #F5FBF7; }

/* ───────── 20. Celular ───────── */
@media (max-width: 760px) {
  .ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 14px 14px; gap: 10px; }
  .ov { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ic n" "ic l"; align-items: center; column-gap: 12px; row-gap: 0; padding: 12px; }
  .ov .i3d { grid-area: ic; margin: 0; }
  .ov .n { grid-area: n; font-size: 1.625rem; min-width: 0; align-self: end; }
  .ov .l { grid-area: l; font-size: 0.7813rem; align-self: start; margin-top: 3px; }
  .ov.ov-main { grid-column: 1 / -1; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "ic n l"; padding: 14px 16px; }
  .ov.ov-main .n { font-size: 2.125rem; align-self: center; }
  .ov.ov-main .l { align-self: center; margin: 0 0 0 2px; font-size: 0.8125rem; letter-spacing: .1em; text-transform: uppercase; }
  .ov svg.i3d[width="36"] { width: 34px; height: 34px; }
}
@media (max-width: 640px) {
  /* Objetivos táctiles cómodos para el pulgar. */
  .btn { min-height: 3rem; }
  .btn-sm { min-height: 2.75rem; }
  .btn-lg { min-height: 3.5rem; }
  .btn-icon { width: 48px; min-height: 48px; }
  .chips > button.chip { min-height: 44px; }
  .page { padding: 18px 16px 32px; gap: 18px; }
  .page-head > .grow::before { margin-bottom: 10px; width: 24px; }
  .page-head .grow h1, .page-head > .grow h1 { font-size: 1.6875rem; }
  .page-head > .grow p { font-size: 1rem; }
  /* Acciones de la página: una sola fila compacta bajo el título (la principal primero); si no caben, se desliza de lado. */
  .page-head > .toolbar { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
  .page-head > .toolbar::-webkit-scrollbar { display: none; }
  .page-head { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
  .page-head > .toolbar > * { flex: none; }
  .page-head > .toolbar > .btn-primary { order: -1; }
  .page-head > .toolbar .btn, .page-head > .btn { width: auto; min-height: 42px; padding: 0 14px; font-size: 0.875rem; white-space: nowrap; border-radius: 999px; }
  .page-head > .toolbar .btn svg { width: 17px; height: 17px; }
  .page-head > .toolbar > :last-child:nth-child(odd) { grid-column: auto; }

  .hero { padding: 22px 20px 20px; border-radius: 22px; }
  .hero::before { left: 20px; right: 20px; }
  .hero h1 { font-size: 1.6875rem; margin-top: 8px; }
  .hero p { font-size: 1rem; }
  .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  /* La acción principal arriba y a todo lo ancho; las demás en pares debajo. */
  .hero-actions .btn-primary { grid-column: 1 / -1; order: -1; }
  .hero-actions .btn { min-height: 50px; padding: 0 12px; }
  .section-title { margin: 6px 0 -4px; }
  .kpis { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px 14px 16px; gap: 10px; }
  .kpi-top { gap: 10px; align-items: flex-start; }
  .kpi-top .lbl { font-size: 0.7813rem; line-height: 1.25; }
  .kpi-go { display: none; }
  .kpi .val { font-size: 2rem; }
  .kpi .val small { font-size: 1.125rem; }
  .kpi svg.i3d[width="40"] { width: 34px; height: 34px; }


  .alerts-card .list-item .t { font-size: 0.875rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .alerts-card .card-head { padding-bottom: 4px; }
  .alerts-card .legend summary { font-size: 0.7813rem; }
  .card-head { padding: 14px 16px 0; }
  .list-item { padding: 12px 16px; }
  .modal { border-radius: 24px 24px 0 0; animation: vcSheet .36s var(--vc-ease); }
  .modal::before { content: ''; display: block; width: 38px; height: 4px; border-radius: 4px; background: var(--acero-200); margin: 8px auto 0; flex: none; }
  .modal-head { padding-top: 12px; }
  .modal-foot { border-radius: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .modal-foot > .btn { width: 100%; min-width: 0; padding: 0 10px; white-space: normal; line-height: 1.2; }
  .modal-foot > .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .drawer { animation: vcDrawer .34s var(--vc-ease); }
  .drawer-foot { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .drawer-foot > .btn { width: 100%; min-width: 0; padding: 0 10px; }
  .drawer-foot > .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  table.tbl tr { padding: 14px 16px; }
  .person { padding: 16px; }
  .tech-page { padding: 14px 14px 24px; gap: 14px; }
}

@media (max-width: 380px) {
  .t-stat { padding: 10px 9px; }
  .t-stat b { font-size: 1.4375rem; }
  .t-stat svg.i3d[width] { width: 26px; height: 26px; }
  .qtools-row { gap: 6px; grid-auto-columns: minmax(58px, 1fr); }
  .qtool-lbl { font-size: 0.7188rem; }
  .tabbar button { font-size: 0.625rem; letter-spacing: -.01em; padding-left: 0; padding-right: 0; }
  .page-head > .toolbar .btn { font-size: 0.8438rem; padding: 0 12px; }
  .tab-ic { width: 40px; }
}

/* ───────── 21. Sin animaciones si el teléfono lo pide ───────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .boot::after { display: none; }
  .sk { animation: none !important; }
}

/* Ajustes → Marcas: el logotipo oficial (o el subido) sobre la cinta de color va en un recuadro blanco. */
.brand-chip-w, .brand-preview-band .brand-chip-w { opacity: 1; }
.brand-chip-w { flex: none; display: inline-grid; place-items: center; padding: 4px 8px; border-radius: 10px; background: #fff; }
.brand-chip-w .brand-logo { display: block; width: auto; max-width: 200px; }
