/* Menú por espacios de la oficina: barra superior (buscador, «+ Nuevo», campana, correo y ajustes), pestañas de cada espacio
   y «Mis pendientes». Va al final de las hojas para mandar sobre la barra superior anterior (que en computadora no se veía). */

/* ───────── Barra superior en computadora ───────── */
@media (min-width: 901px) {
  .topbar {
    display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 30; min-height: 64px;
    padding: 10px clamp(16px, 3vw, 36px); background: var(--vc-papel); border-bottom: 1px solid var(--vc-linea);
  }
  .topbar .gs-wide { flex: 1; max-width: 560px; margin-right: auto; }
  .topbar .btn-ghost { color: var(--vc-texto-2); }
  .topbar .btn-ghost:hover:not(:disabled) { background: var(--vc-hover); color: var(--vc-tinta); }
  .topbar .btn-icon[aria-current="page"] { background: var(--vc-sel); color: var(--vc-oro-texto); }
  .topbar .nm { margin-right: 6px; }
  .topbar .nm .btn { min-height: 42px; padding: 0 16px; border-radius: 12px; }
  .topbar .nb-top .nb-btn { color: var(--vc-texto-2); width: 42px; height: 42px; }
  .topbar .nb-top .nb-btn:hover, .topbar .nb-top.is-open .nb-btn { background: var(--vc-hover); color: var(--vc-tinta); }
  .topbar .nb-count { box-shadow: 0 0 0 2px var(--vc-papel); }
  .topbar .top-me { margin-left: 6px; }
}

/* ───────── Buscador global ───────── */
.gs { position: relative; }
.gs-field { position: relative; display: flex; align-items: center; height: 42px; border: 1px solid var(--vc-linea); border-radius: 12px; background: var(--vc-arena);
  transition: background var(--vc-t2), border-color var(--vc-t2), box-shadow var(--vc-t2); }
.gs-field:focus-within { background: var(--vc-papel); border-color: var(--vc-oro); box-shadow: 0 0 0 3px rgba(var(--vc-oro-rgb), .22); }
.gs-ic { position: absolute; left: 12px; color: var(--vc-texto-3); pointer-events: none; }
.gs-input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 8px 0 38px; font: inherit; font-size: 0.9375rem; color: var(--vc-tinta); outline: none; }
.gs-input::placeholder { color: var(--vc-texto-3); }
.gs-input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.gs-kbd { margin-right: 10px; padding: 2px 7px; border: 1px solid var(--vc-linea); border-radius: 6px; background: var(--vc-papel); color: var(--vc-texto-3);
  font: 600 0.7188rem var(--vc-font-ui); white-space: nowrap; }
.gs-clear { flex: none; width: 34px; height: 34px; margin-right: 4px; border: 0; border-radius: 9px; background: none; color: var(--vc-texto-3); display: grid; place-items: center; cursor: pointer; }
.gs-clear:hover { background: var(--vc-hover); color: var(--vc-tinta); }
.gs-panel { position: absolute; z-index: 80; top: calc(100% + 6px); left: 0; width: max(100%, 440px); max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
  padding: 6px; background: var(--vc-papel); border: 1px solid var(--vc-linea); border-radius: 16px; box-shadow: var(--vc-sh-3); animation: fade .15s; }
.gs-hint { display: flex; align-items: center; gap: 8px; padding: 12px; margin: 0; font-size: 0.8438rem; color: var(--vc-texto-3); }
.gs-groups { display: grid; gap: 4px; }
.gs-glabel { display: flex; align-items: center; gap: 8px; padding: 10px 10px 4px; font-size: 0.7188rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vc-texto-3); }
.gs-item { display: grid; gap: 1px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.gs-item:hover, .gs-item[aria-selected="true"] { background: var(--vc-sel); }
.gs-t { font-weight: 600; font-size: 0.9063rem; color: var(--vc-tinta); }
.gs-s { font-size: 0.7813rem; color: var(--vc-texto-3); }
/* Celular: el buscador abre a pantalla completa. */
.gs-sheet { position: fixed; inset: 0; z-index: 2200; display: flex; flex-direction: column; background: var(--vc-papel); color: var(--vc-tinta); animation: fade .15s; }
.gs-sheet-head { display: flex; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 12px 10px; border-bottom: 1px solid var(--vc-linea); }
.gs-sheet-head .gs-field { flex: 1; height: 46px; }
.gs-sheet-head .gs-input { font-size: 1rem; }
.gs-cancel { flex: none; font-size: 0.9375rem; }
.gs-sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 8px calc(16px + var(--safe-b, 0px)); }
.gs-sheet .gs-item { padding: 10px; }

/* ───────── «+ Nuevo» ───────── */
.nm { position: relative; }
.nm-panel { position: absolute; z-index: 80; right: 0; top: calc(100% + 8px); width: 330px; display: grid; gap: 2px; padding: 6px;
  background: var(--vc-papel); border: 1px solid var(--vc-linea); border-radius: 16px; box-shadow: var(--vc-sh-3); animation: fade .15s; }
.nm-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; text-align: left; font: inherit; color: var(--vc-tinta); cursor: pointer; }
.nm-item:hover, .nm-item:focus-visible { background: var(--vc-hover); }
.nm-txt { display: grid; gap: 1px; min-width: 0; }
.nm-lbl { font-weight: 600; font-size: 0.9063rem; }
.nm-hint { font-size: 0.7813rem; color: var(--vc-texto-3); }

/* Pendientes de «Hoy»: dorado (no es un error, es lo que sigue). */
.sn .badge.is-soft { background: var(--vc-oro); color: var(--vc-oro-tinta); }
.tab-badge.is-soft { background: var(--vc-oro); color: var(--vc-oro-tinta); }

/* ───────── Mis pendientes ───────── */
.pend-area { display: grid; gap: 10px; }
.pend-area .section-title { margin: 0; }
.pend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.pend-card { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: 16px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  transition: border-color var(--vc-t2), box-shadow var(--vc-t2), transform var(--vc-t2); }
.pend-card:hover { border-color: #DCD5C7; box-shadow: var(--vc-sh-2); }
.pend-card:active { transform: scale(.99); }
.pend-card.tone-rojo { box-shadow: inset 3px 0 0 var(--vc-error); }
.pend-card.tone-rojo:hover { box-shadow: inset 3px 0 0 var(--vc-error), var(--vc-sh-2); }
.pend-3d { flex: none; }
.pend-txt { display: grid; gap: 3px; min-width: 0; flex: 1; }
.pend-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pend-n { font-family: var(--titulo); font-size: 1.875rem; font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--vc-tinta); }
.pend-card.tone-rojo .pend-n { color: var(--vc-error); }
.pend-amt { font-size: 0.8438rem; font-weight: 600; color: var(--vc-texto-2); }
.pend-lbl { font-weight: 650; font-size: 0.9375rem; color: var(--vc-tinta); }
.pend-hint { font-size: 0.8125rem; color: var(--vc-texto-3); }
.pend-go { flex: none; align-self: center; color: var(--vc-texto-3); }
.pend-pill { flex: none; min-width: 30px; height: 26px; padding: 0 9px; border-radius: 13px; display: grid; place-items: center; font-size: 0.8125rem; font-weight: 700;
  background: var(--vc-sel); color: var(--vc-oro-texto); }
.pend-pill.tone-rojo { background: var(--vc-error-bg); color: var(--vc-error); }
.pend-pill.tone-azul { background: var(--vc-info-bg); color: var(--vc-info); }
.pend-pill.tone-verde { background: var(--vc-ok-bg); color: var(--vc-ok); }

/* ───────── Celular: sección actual y mosaicos ───────── */
.sp-bar-wrap { padding: 10px 12px 0; }
.sp-bar { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--vc-linea); border-radius: 18px;
  background: var(--vc-papel); font: inherit; color: var(--vc-tinta); text-align: left; cursor: pointer; min-height: 64px; }
.sp-bar:active { background: var(--vc-hover); }
.sp-bar:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; }
.sp-bar-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sp-bar-k { font-size: 0.75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--vc-oro-texto); }
.sp-bar-t b { font-family: var(--vc-font-display); font-size: 1.0313rem; font-weight: 800; line-height: 1.2; white-space: normal; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-bar-go { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--vc-oro); color: var(--vc-oro-tinta);
  font-size: 0.8438rem; font-weight: 700; position: relative; transition: background-color var(--vc-t3), color var(--vc-t3); }
.sp-bar-go .badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--vc-error); color: #fff;
  font-size: 0.7188rem; font-weight: 700; display: inline-grid; place-items: center; box-shadow: 0 0 0 2px var(--vc-papel); }
.sp-bar-wrap + .page { padding-top: 16px; }

.sh-scrim { position: fixed; inset: 0; z-index: 1700; background: rgba(20, 19, 15, .45); display: flex; align-items: flex-end; justify-content: center; animation: sh-fade .16s ease-out; }
.sh-panel { width: 100%; max-width: 640px; max-height: 86vh; overflow: auto; overscroll-behavior: contain; background: var(--vc-arena); border-radius: 24px 24px 0 0;
  padding: 6px 14px calc(18px + env(safe-area-inset-bottom, 0px)); animation: sh-up .2s ease-out; outline: none; }
.sh-panel.is-full { min-height: 70vh; }
.sh-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--vc-linea); margin: 6px auto 8px; }
.sh-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 12px; position: sticky; top: -6px; background: var(--vc-arena); z-index: 1; }
.sh-head h2 { font-size: 1.25rem; }
@keyframes sh-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes sh-fade { from { opacity: 0; } to { opacity: 1; } }
body.sheet-open { overflow: hidden; }

.mt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mt-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border-radius: 18px; background: var(--vc-papel);
  border: 1px solid var(--vc-linea); color: var(--vc-tinta); text-decoration: none; text-align: center; min-height: 112px; min-width: 0; }
.mt-tile:active { transform: scale(.97); }
.mt-tile:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; }
.mt-tile.is-on { border-color: var(--vc-oro); background: var(--vc-sel); box-shadow: inset 0 0 0 1px var(--vc-oro); }
.mt-ic { position: relative; display: inline-grid; }
.mt-ic .badge { position: absolute; top: -6px; right: -10px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--vc-error); color: #fff;
  font-size: 0.75rem; font-weight: 700; display: inline-grid; place-items: center; box-shadow: 0 0 0 2px var(--vc-papel); }
.mt-ic .badge.is-soft { background: var(--vc-oro); color: var(--vc-oro-tinta); }
.mt-lbl { font-size: 0.8438rem; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mt-grid.is-small .mt-tile { min-height: 96px; padding: 12px 6px 10px; }
.launcher { display: grid; gap: 14px; }
.launcher-me { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--vc-papel); border: 1px solid var(--vc-linea); }
.launcher-me .me-name { color: var(--vc-tinta); font-size: 1rem; }
.launcher-h { font-size: 0.8125rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--vc-gris); margin: 4px 2px -4px; }
@media (max-width: 360px) { .mt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ───────── Celular ───────── */
@media (max-width: 900px) {
  .topbar .brand-lockup { flex: 1; }
  .topbar .nm .btn-icon { background: var(--vc-oro); color: var(--vc-oro-tinta); width: 40px; min-height: 40px; margin: 0 2px; }
  .topbar .nm .btn-icon:hover:not(:disabled) { background: var(--vc-oro-claro); }
  .nm-panel { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 64px); left: 8px; right: 8px; width: auto; max-width: 420px; margin-left: auto; }
  .pend-card { padding: 14px; gap: 12px; }
  .pend-n { font-size: 1.625rem; }
}
@media print { .sp-bar-wrap, .gs-panel, .nm-panel { display: none; } }
@media (prefers-reduced-motion: reduce) { .sn-sub, .sn-item[aria-current="page"] .sn-ic, .gs-panel, .nm-panel, .gs-sheet, .sh-panel, .sh-scrim { animation: none; } .mt-tile:active { transform: none; } .pend-card:active { transform: none; } }

/* ───────── Factura con archivos y bitácora de automatizaciones ───────── */
.inv-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.inv-file { justify-content: flex-start; min-width: 0; }
.inv-file.is-on { border-color: var(--vc-ok); color: var(--vc-ok); }
.ar-sends .list-item { padding: 10px 0; }
.auto-log summary { cursor: pointer; font-weight: 600; font-size: 0.875rem; padding: 6px 0; }
.auto-log .list-item { text-decoration: none; color: inherit; padding: 10px 0; }

/* ───────── Celular: nada se desliza de lado ─────────
   Botones de cada pantalla en cuadrícula (la acción principal arriba a todo lo ancho), filtros y pestañas que bajan de renglón
   en lugar de tiras que hay que deslizar. */
@media (max-width: 640px) {
  .page-head > .toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; margin: 0; padding: 0; }
  .page-head > .toolbar > * { min-width: 0; }
  .page-head > .toolbar > .btn-primary { order: -1; grid-column: 1 / -1; }
  .page-head > .toolbar > :last-child:nth-child(even):not(.btn-primary) { grid-column: auto; }
  .page-head > .toolbar .btn, .page-head > .btn { width: 100%; min-height: 46px; white-space: normal; line-height: 1.15; border-radius: 14px; }
  .page-head > .toolbar > .btn-icon { width: 100%; }

  .tabs, .page > .tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr)); width: 100%; max-width: none; margin: 0; overflow: visible; }
  .tabs .tabs-ind { display: none; }
  .tab { white-space: normal; text-align: center; line-height: 1.2; padding: 10px 8px; min-height: 42px; }

  .chips, .page > .chips, .toolbar > .chips, .cat-filters .chips, .qt-filters .chips, .co-tools .chips, .chain-chips-row .chain-chips,
  .ag-types, .fin-chip-scroll, .fin-chip-scroll .chips, .bz-chan, .fum-state, .rg-subnav, .pl-views, .rt-saved, .tbx-ruler-chips {
    flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; max-width: 100%; }
  .page > .chips .chip, .toolbar > .chips .chip, .fin-chip-scroll .chip { flex: 0 1 auto; }
  .fin-tabs { overflow: visible; }
  .fin-tabs .tabs { width: 100%; }
  .tbx-seg { flex-wrap: wrap; overflow: visible; }
  .pl-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .gc-people { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .qtools-row { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
}

/* Modo prueba: Dirección viendo la app como un técnico */
.vc-banner { position: fixed; z-index: 2650; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 14px; border-radius: 999px; background: #EA580C; color: #fff; font-size: 0.875rem; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); width: max-content; max-width: calc(100vw - 24px); }
.vc-banner button { border: 0; border-radius: 999px; background: #fff; color: #9A3412; font: inherit; font-weight: 700; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.vc-banner .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-height: 340px; overflow: auto; }
.vc-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; border: 1px solid var(--vc-linea); background: var(--vc-papel); min-width: 0; }
.vc-item > .btn { flex: none; }
@media print { .vc-banner { display: none; } }

/* Visor de documentos dentro de la app (certificados, órdenes de servicio). */
.doc-viewer { position: fixed; inset: 0; z-index: 2600; display: flex; flex-direction: column; background: #fff; }
.doc-bar { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; border-bottom: 1px solid var(--vc-linea); background: var(--vc-carbon, #141519); color: #fff; }
.doc-bar .btn-icon { color: #fff; }
.doc-bar b { font-size: 0.9375rem; min-width: 0; }
.doc-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--vc-linea); }
.doc-frame { flex: 1; width: 100%; border: 0; background: #fff; }
body.doc-open { overflow: hidden; }
.drawer.fin-sheet.full { width: 100vw; max-width: none; }

/* Versión nueva publicada: aviso para recargar (se aplica sola al cambiar de sección). */
.vf-update { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 2000; display: flex; align-items: center; gap: 12px;
  max-width: calc(100vw - 32px); padding: 10px 10px 10px 16px; border-radius: 12px; background: #0B0C0E; color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-size: 0.875rem; }
.vf-update button { flex: none; min-height: 38px; padding: 0 14px; border: 0; border-radius: 9px; background: #F2B705; color: #0B0C0E; font-weight: 700; cursor: pointer; }

/* ───────── Computadora: menú lateral claro por grupos que se despliegan ───────── */
@media (min-width: 901px) {
  .shell { grid-template-columns: 288px 1fr; }
  .side.sn-side { background: var(--vc-papel); color: var(--vc-tinta); border-right: 1px solid var(--vc-linea); box-shadow: none;
    padding: 0; gap: 0; display: flex; flex-direction: column; }
}
.sn-logo { flex: none; display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--vc-linea); }
.sn-tile { flex: none; width: 46px; height: 46px; border-radius: 13px; background: var(--vc-tinta); display: grid; place-items: center;
  box-shadow: 0 1px 2px rgba(20, 19, 15, .18), 0 4px 10px rgba(20, 19, 15, .10); }
.sn-tile img { width: 30px; height: auto; }
.sn-brand { display: grid; gap: 3px; min-width: 0; line-height: 1.1; }
.sn-brand b { font-family: var(--titulo); font-weight: 800; font-size: 1.125rem; letter-spacing: .06em; color: var(--vc-tinta); white-space: nowrap; }
.sn-brand em { font-style: normal; color: var(--vc-oro-texto); }
.sn-brand small { font-size: 0.8125rem; color: var(--vc-texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-logo:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: -4px; border-radius: 12px; }

.sn-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 12px 10px 14px 12px; scrollbar-width: thin; scrollbar-color: #CFC8BA transparent; }
.sn-scroll::-webkit-scrollbar { width: 8px; }
.sn-scroll::-webkit-scrollbar-thumb { background: #CFC8BA; border-radius: 8px; border: 2px solid var(--vc-papel); }
.sn { display: grid; gap: 2px; }
.sn-g { display: grid; }
.sn-head { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 7px 10px; border: 0; border-radius: 14px;
  background: none; font: inherit; color: var(--vc-tinta); text-align: left; cursor: pointer; transition: background var(--vc-t2); }
.sn-head:hover { background: var(--vc-hover); }
.sn-head:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: -2px; }
.sn-3d { flex: none; }
.sn-lbl { flex: 1; min-width: 0; font-size: 0.9688rem; font-weight: 650; letter-spacing: -.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sn-chev { flex: none; color: var(--vc-texto-3); transform: rotate(90deg); transition: transform var(--vc-t2); }
.sn-g.is-open .sn-chev { transform: rotate(-90deg); color: var(--vc-tinta); }
/* Grupo donde estás, cerrado: marca dorada a la orilla. */
.sn-g.is-cur:not(.is-open) .sn-head::before { content: ''; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--vc-oro-2); }
.sn-head .badge, .sn-item .badge { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--vc-error); color: #fff;
  font-size: 0.75rem; font-weight: 700; display: inline-grid; place-items: center; }

.sn-sub { display: grid; gap: 3px; margin: 2px 0 8px 26px; padding-left: 10px; border-left: 1.5px solid var(--vc-linea); animation: snIn .2s var(--vc-ease, ease-out); }
@keyframes snIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sn-item { position: relative; display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 6px 10px; border-radius: 12px; text-decoration: none;
  color: var(--vc-texto-2); font-size: 0.9063rem; font-weight: 500; transition: background var(--vc-t2), color var(--vc-t2); }
.sn-item:hover { background: var(--vc-arena); color: var(--vc-tinta); }
.sn-item:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: -2px; }
.sn-ic { flex: none; }
.sn-t { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.sn-item[aria-current="page"] { background: var(--vc-tinta); color: #fff; font-weight: 650; box-shadow: 0 2px 8px rgba(20, 19, 15, .18); }
.sn-item[aria-current="page"] .sn-ic { animation: vcIconPop .45s var(--vc-spring); }
/* Marca dorada en la orilla izquierda del menú, a la altura de la sección abierta. */
.sn-item[aria-current="page"]::before { content: ''; position: absolute; left: -49.5px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--vc-oro-2); transition: background-color var(--vc-t3); }
.sn-item[aria-current="page"] .badge { box-shadow: 0 0 0 2px var(--vc-tinta); }
.sn-item[aria-current="page"] .badge.is-soft { background: var(--vc-oro); color: var(--vc-oro-tinta); }

.sn-foot { flex: none; display: grid; gap: 8px; padding: 12px 14px 10px; border-top: 1px solid var(--vc-linea); background: var(--vc-papel); }
.sn-me { font-weight: 700; font-size: 0.9063rem; color: var(--vc-tinta); }
.sn-field { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; padding: 8px 16px; border: 0; border-radius: 14px;
  background: var(--vc-oro); color: var(--vc-oro-tinta); font: 700 1rem var(--vc-font-ui, inherit); cursor: pointer;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 4px 12px rgba(var(--vc-oro-rgb), .32); transition: transform var(--vc-t1), box-shadow var(--vc-t2), background var(--vc-t3), color var(--vc-t3); }
.sn-field:hover { background: var(--vc-oro-luz); box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 6px 16px rgba(var(--vc-oro-rgb), .4); }
.sn-field:active { transform: scale(.98); }
.sn-field:focus-visible { outline: 2px solid var(--vc-tinta); outline-offset: 2px; }
.sn-links { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.sn-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 36px; padding: 6px 6px; white-space: nowrap; border: 0; border-radius: 10px; background: none;
  font: 600 0.8125rem var(--vc-font-ui, inherit); color: var(--vc-texto-2); cursor: pointer; }
.sn-link:only-child, .sn-link.is-wide { grid-column: 1 / -1; }
.sn-link:hover { background: var(--vc-hover); color: var(--vc-tinta); }
.sn-link:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: -2px; }

/* ───────── Inicio: «Requiere tu atención» (lo urgente primero) ───────── */
.att { display: grid; gap: 10px; }
.att-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.att-head .section-title { margin: 0; display: flex; align-items: center; gap: 8px; }
.att-n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--vc-tinta); color: #fff;
  font-size: 0.7813rem; font-weight: 700; letter-spacing: 0; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.att-card { position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px 14px 18px; border: 1px solid var(--vc-linea);
  border-radius: 18px; background: var(--vc-papel); font: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--vc-t2), box-shadow var(--vc-t2), transform var(--vc-t1); }
.att-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--vc-oro); }
.att-card.tone-rojo::before { background: var(--vc-error); }
.att-card.tone-azul::before { background: var(--vc-info); }
.att-card.tone-verde::before { background: var(--vc-ok); }
.att-card:hover { border-color: #DCD5C7; box-shadow: var(--vc-sh-2); }
.att-card:active { transform: scale(.99); }
.att-card:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; }
.att-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.att-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.att-top b { font: 800 1.625rem/1 var(--titulo); color: var(--vc-tinta); letter-spacing: -.02em; }
.att-card.tone-rojo .att-top b { color: var(--vc-error); }
.att-top span { font-size: 0.8125rem; font-weight: 600; color: var(--vc-texto-2); }
.att-lbl { font-weight: 650; font-size: 0.9063rem; color: var(--vc-tinta); line-height: 1.25; overflow-wrap: anywhere; }
.att-area { font-size: 0.7188rem; color: var(--vc-texto-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.att-go { flex: none; color: var(--vc-texto-3); }
.att-ok { display: flex; align-items: center; gap: 14px; padding: 16px; }
.kpis.kpis-col { grid-template-columns: minmax(0, 1fr); align-content: start; }
.quick-filter { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--vc-sel); color: var(--vc-oro-texto);
  font-weight: 600; font-size: 0.875rem; width: fit-content; max-width: 100%; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .att-card:active { transform: none; } }

/* Buscador como paleta de comandos: «Crear» e «Ir a» primero, luego los datos. */
.gs-item.is-local .gs-t { color: var(--vc-tinta); }
.gs-foot { display: flex; align-items: center; gap: 4px; margin: 4px 0 0; padding: 8px 10px 4px; border-top: 1px solid var(--vc-linea); font-size: 0.75rem; color: var(--vc-texto-3); }
.gs-foot kbd { padding: 1px 6px; border: 1px solid var(--vc-linea); border-radius: 5px; background: var(--vc-arena); font: 600 0.6875rem var(--vc-font-ui, inherit); color: var(--vc-texto-2); }
@media (max-width: 900px) { .gs-foot { display: none; } }

/* ───────── Tema por empresa ─────────
   Al entrar a FIO, Limpieza o Ratagom (sus páginas y lo que se abre dentro), admin.js pone data-brand en <html>: el oro de los
   botones, marcas, focos y etiquetas toma el color de esa empresa y el logotipo del menú cambia al suyo. Mantenimiento (HAMMYs),
   Grupo VALCAB y el resto de la oficina se quedan con el oro VALCAB. Texto sobre el acento con contraste AA: blanco sobre rojo y
   azul marino, casi negro sobre amarillo (--vc-oro-tinta). */
:root[data-brand="ratagom"] {
  --vc-oro: #E01E26; --oro: #E01E26; --vc-grad-oro: #E01E26; --vc-grad-oro-h: #E01E26; --grad-oro: #E01E26;
  --vc-oro-tinta: #FFFFFF; --vc-oro-vivo: #FF5A5F; --vc-oro-2: #E01E26;
  --vc-oro-claro: #C8161D; --vc-oro-hondo: #B3121A; --vc-oro-hover: #C8161D; --vc-oro-luz: #C8161D; --oro-600: #C8161D; --oro-700: #A81218;
  --vc-oro-texto: #B3121A; --oro-texto: #B3121A;
  --vc-sel: #FDECEC; --vc-crema: #FFF4F4; --oro-50: #FEF2F2; --oro-100: #FBDADB;
  --vc-oro-rgb: 224, 30, 38;
}
:root[data-brand="limpieza"] {
  --vc-oro: #02416A; --oro: #02416A; --vc-grad-oro: #02416A; --vc-grad-oro-h: #02416A; --grad-oro: #02416A;
  --vc-oro-tinta: #FFFFFF; --vc-oro-vivo: #8DC21F; --vc-oro-2: #719F01;
  --vc-oro-claro: #0A5A8E; --vc-oro-hondo: #01304F; --vc-oro-hover: #01365A; --vc-oro-luz: #0A5A8E; --oro-600: #01365A; --oro-700: #012A46;
  --vc-oro-texto: #02416A; --oro-texto: #02416A;
  --vc-sel: #E6F0F6; --vc-crema: #F2F7EA; --oro-50: #EEF4F8; --oro-100: #D6E5EF;
  --vc-oro-rgb: 2, 65, 106;
}
:root[data-brand="fumigacion"] {
  --vc-oro: #F9CF31; --oro: #F9CF31; --vc-grad-oro: #F9CF31; --vc-grad-oro-h: #F9CF31; --grad-oro: #F9CF31;
  --vc-oro-tinta: #1E1E1E; --vc-oro-vivo: #F9CF31; --vc-oro-2: #F9CF31;
  --vc-oro-claro: #FBDC6A; --vc-oro-hondo: #D9AE14; --vc-oro-hover: #EDC12A; --vc-oro-luz: #FBD958; --oro-600: #EDC12A; --oro-700: #D4AA16;
  --vc-oro-texto: #7D6414; --oro-texto: #7D6414;
  --vc-sel: #FEF6DA; --vc-crema: #FFFAEB; --oro-50: #FFFAEA; --oro-100: #FDF0C4;
  --vc-oro-rgb: 249, 207, 49;
}
/* Texto sobre el acento en módulos que lo fijaban casi negro. */
:root[data-brand] :is(.ag-mini-d.is-today, .ag-dh.is-today .ag-dh-n, .ag-m-cell.is-today .ag-m-num, .ag-fab, .ag-stop-n, .ag-li-day.is-today .ag-li-n,
  .es-here, .es-step-n, .es-pbtn:not(:disabled):hover, .inv-tab-n, .pl-views .chip[aria-pressed="true"], .ts-stop-n, .thumb-sync, .emp-mtoday, .vz-rec,
  .tl-cover, .pol-eq > div.g, .rt-howto-n, .ay-msg.user .ay-bubble, .tl-iniciar, .tl-retomar, .t-stat.live, .t-stat.live *, .cmp-live, .cmp-stepnav button.on b) { color: var(--vc-oro-tinta); }
/* El acento sobre fondos oscuros (folios, contadores, íconos de los botones negros): la versión que se lee sobre negro. */
:root[data-brand] :is(.qt-folio, .vp-folio, .qt-sec-n, .qt-calc-btn.on, .qt-pay-opt[aria-checked="true"] .qt-pay-ic, .trk-avatar, .tbx-job-ic,
  .es-present-code, .net-dot, .job-head .mono, .pq-folio) { color: var(--vc-oro-vivo); }
/* Anillos y sombras que tenían el oro fijo. */
:root[data-brand] :is(.qt-line:focus-within) { box-shadow: 0 0 0 3px rgba(var(--vc-oro-rgb), .16); }
:root[data-brand] :is(.rg-qbox.on) { box-shadow: 0 0 0 3px rgba(var(--vc-oro-rgb), .35); }
:root[data-brand] :is(.ol-search:focus-within) { box-shadow: 0 0 0 3px rgba(var(--vc-oro-rgb), .18); }
:root[data-brand] :is(.tbl tr.sel td) { background: var(--vc-sel); }
:root[data-brand] :is(.fin-pick-list li[aria-selected="true"]) { background: var(--vc-sel); }
:root[data-brand] :is(.vz-rec) { box-shadow: 0 0 0 var(--ring) rgba(var(--vc-oro-rgb), .22), 0 14px 30px -12px rgba(16, 18, 22, .45); }
/* Íconos de azulejo plano en oro (menú lateral, indicadores): el azulejo toma el acento y el glifo su tinta; en los oscuros, el glifo va
   con el acento que se lee sobre negro. Las ilustraciones 3D no cambian (ya traen sus colores). */
svg.i3d > path, svg.i3d > g { transition: fill var(--vc-t3), stroke var(--vc-t3); }
:root[data-brand] svg.i3d-gold > path:first-of-type { fill: var(--vc-oro); }
:root[data-brand] svg.i3d-gold > g { stroke: var(--vc-oro-tinta); }
:root[data-brand] svg.i3d-dark > g { stroke: var(--vc-oro-vivo); }
/* El cambio de color se ve suave en lo que se queda en pantalla (las marcas del menú lateral). */
.sn-g .sn-head::before { transition: background-color var(--vc-t3); }

/* Logotipo del menú: VALCAB o, dentro de una empresa, el suyo en un recuadro blanco (los logotipos son para fondo claro). Las capas
   se enciman y se cruzan sin mover nada; el recuadro se ensancha para FIO (ancho) y queda cuadrado para Limpieza y Ratagom. */
.sn-tile { width: var(--tw, 46px); transition: width var(--vc-t3) var(--vc-ease), background-color var(--vc-t3), box-shadow var(--vc-t3); overflow: hidden; }
.sn-tile > img { grid-area: 1 / 1; transition: opacity var(--vc-t3) var(--vc-ease); }
.sn-tile > img.sn-mk-co { width: calc(var(--tw, 46px) - 8px); height: 38px; object-fit: contain; opacity: 0; }
.sn-logo.is-brand .sn-tile { background: #fff; box-shadow: inset 0 0 0 1px var(--vc-linea), 0 1px 2px rgba(20, 19, 15, .08); }
.sn-logo.is-brand .sn-tile > img.sn-mk-valcab { opacity: 0; }
.sn-tile > img.sn-mk-co.on { opacity: 1; }
.sn-brand.is-co { animation: vcFade var(--vc-t3) var(--vc-ease); }
.sn-brand.is-co b { letter-spacing: .02em; overflow: hidden; text-overflow: ellipsis; }
/* Celular: la barra de arriba es negra; el logotipo de la empresa va en su recuadro blanco. */
.brand-lockup.is-co .brand-chip { flex: none; height: 34px; width: var(--cw, 34px); padding: 3px 5px; border-radius: 9px; background: #fff; display: grid; place-items: center; animation: vcFade var(--vc-t3) var(--vc-ease); }
.brand-lockup.is-co .brand-chip img { width: 100%; height: 100%; object-fit: contain; }
.brand-lockup.is-co .brand-word { letter-spacing: .08em; overflow: hidden; text-overflow: ellipsis; }
.brand-lockup.is-co .brand-sub { letter-spacing: .14em; }
/* Botones con el color de la empresa (cinta de su página, app del técnico): el ícono va del color del texto, no del acento. */
.brand-band-act .btn-primary svg, .ts-job .btn-primary svg, .brand-btn svg { color: currentColor; }
/* Página de cada empresa: su logotipo oficial en la cinta oscura va sobre blanco. */
.brand-band-logo:has(> img[data-testid="brand-logo-fumigacion"], > img[data-testid="brand-logo-limpieza"], > img[data-testid="brand-logo-ratagom"]) { background: #fff; padding: 6px 10px; }
@media (prefers-reduced-motion: reduce) { .sn-tile, .sn-tile > img, .sn-brand.is-co, .brand-lockup.is-co .brand-chip { transition: none; animation: none; } }

/* ═══════════════ R39 · Experiencia simple: inicio «Hoy», «Mi app», menú con «Más» y la cuenta ═══════════════ */
/* Menú lateral: filas más altas y letra más grande; lo poco usado de cada grupo va bajo «Más». */
.sn-head { min-height: 54px; }
.sn-lbl { font-size: 1rem; }
.sn-item { min-height: 48px; font-size: 0.9688rem; gap: 12px; }
.sn-item[aria-current="page"]:focus-visible { outline-color: var(--vc-oro-vivo); }
.sn-more { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 12px; background: none;
  font: inherit; font-size: 0.9375rem; font-weight: 600; color: var(--vc-texto-2); cursor: pointer; text-align: left; }
.sn-more:hover { background: var(--vc-arena); color: var(--vc-tinta); }
.sn-more:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: -2px; }
.sn-more .badge { flex: none; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--vc-error); color: #fff; font-size: 0.75rem; font-weight: 700; display: inline-grid; place-items: center; }

/* Barra de abajo del celular (oficina): botones más altos y nombres que se leen. */
@media (max-width: 900px) {
  .tabbar.office { padding-top: 4px; }
  .tabbar.office button { min-height: 64px; font-size: clamp(12px, 0.8125rem, 15px); font-weight: 650; color: var(--vc-texto-2); gap: 4px; }
  .tabbar.office button[aria-current="page"] { color: var(--vc-tinta); }
  .tabbar.office .tab-ic svg { width: 26px; height: 26px; }
  .shell .main { padding-bottom: calc(86px + var(--safe-b)); }
}
@media (max-width: 380px) { .tabbar.office button { font-size: clamp(11px, 0.75rem, 13px); } }

/* Mi cuenta (avatar de arriba): Mi app, Ajustes, Ayuda y Cerrar sesión. */
.me-m { position: relative; flex: none; }
.me-m .top-me { width: 44px; height: 44px; display: grid; place-items: center; }
.me-panel { position: absolute; z-index: 90; right: 0; top: calc(100% + 8px); width: 320px; display: grid; gap: 2px; padding: 8px;
  background: var(--vc-papel); color: var(--vc-tinta); border: 1px solid var(--vc-linea); border-radius: 18px; box-shadow: var(--vc-sh-3); animation: fade .15s; }
.me-head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--vc-linea); }
.me-name { font-weight: 700; font-size: 1rem; }
.me-item { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--vc-tinta); }
.me-item:hover { background: var(--vc-hover); }
.me-item:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: -2px; }
.me-txt { display: grid; gap: 1px; min-width: 0; }
.me-lbl { font-weight: 650; font-size: 1rem; }
.me-hint { font-size: 0.8438rem; color: var(--vc-texto-3); }
@media (max-width: 900px) {
  .me-m .top-me { width: 40px; height: 40px; }
  .me-panel { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 64px); left: 8px; right: 8px; width: auto; max-width: 400px; margin-left: auto; }
}

/* Avisos y estados vacíos con el siguiente paso como botón. */
.alert.has-action { align-items: center; flex-wrap: wrap; }
.alert.has-action .alert-txt { flex: 1 1 220px; min-width: 0; }
.alert .alert-act { flex: none; }
.empty .empty-act { margin-top: 6px; }
@media (max-width: 640px) { .alert .alert-act { flex: 1 1 100%; } }

/* ───── Inicio «Hoy»: saludo, «Lo que importa hoy», mis accesos, buscar y «Más del día» ───── */
.home { gap: 26px; }
.home-hero { align-items: flex-end; }
.home-hero h1 { font-size: 2.25rem; }
.home-hero .home-lead { color: #fff; font-size: 1.1875rem; font-weight: 600; line-height: 1.4; margin-top: 10px; max-width: 640px; }
.home-hero .home-sub { color: #CFC9BD; font-size: 0.9375rem; margin-top: 6px; }
.home-hero .hero-actions .btn { font-size: 1rem; }
.hoy-sec { display: grid; gap: 12px; min-width: 0; }
.hoy-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
.hoy-sec-h .section-title { margin: 0; font-family: var(--titulo); font-size: 1.375rem; font-weight: 800; letter-spacing: -.015em; text-transform: none; color: var(--vc-tinta); }
.hoy-sec-h .section-title::after { display: none; }
.hoy-upd { flex: none; }
.hoy-all { justify-self: start; }
.hoy-sec .att-n { font-size: 0.875rem; min-width: 28px; height: 28px; border-radius: 14px; }
.hoy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.hoy-card { flex-direction: column; align-items: stretch; gap: 6px; min-height: 176px; padding: 18px 18px 16px 22px; }
.hoy-card-top { display: flex; align-items: center; gap: 14px; }
.hoy-num { display: grid; gap: 2px; min-width: 0; }
.hoy-n { font: 800 2.75rem/1 var(--titulo); letter-spacing: -.03em; color: var(--vc-tinta); }
.hoy-card.tone-rojo .hoy-n { color: var(--vc-error); }
.hoy-amt { font-size: 0.9375rem; font-weight: 650; color: var(--vc-texto-2); }
.hoy-lbl { font-weight: 700; font-size: 1.0625rem; line-height: 1.3; color: var(--vc-tinta); overflow-wrap: anywhere; }
.hoy-area { font-size: 0.75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--vc-texto-3); }
.hoy-act { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--vc-carbon); color: #fff; font-weight: 700; font-size: 0.9688rem; }
.hoy-card.tone-rojo .hoy-act { background: var(--vc-error); }
.hoy-card:hover .hoy-act { background: #2A2B31; }
.hoy-card.tone-rojo:hover .hoy-act { background: #8F1C13; }
.att-ok b { font-size: 1.125rem; }

.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.fav-btn { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 16px; border-radius: 18px; background: var(--vc-papel); border: 1px solid var(--vc-linea);
  color: var(--vc-tinta); text-decoration: none; font-weight: 700; font-size: 1.0625rem; line-height: 1.25; transition: border-color var(--vc-t2), box-shadow var(--vc-t2), transform var(--vc-t1); }
.fav-btn span { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.fav-btn:hover { border-color: #DCD5C7; box-shadow: var(--vc-sh-2); }
.fav-btn:active { transform: scale(.98); }
.fav-btn:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; }
.hoy-favs .link-btn { font-size: 1rem; }
.hoy-fav-tip { margin: -2px 2px 0; }

.gs-home .gs-field { height: 60px; border-radius: 16px; background: var(--vc-papel); border-width: 1.5px; }
.gs-home .gs-input { font-size: 1.0625rem; padding-left: 48px; }
.gs-home .gs-ic { left: 16px; }
.gs-home.gs-wide .gs-panel { width: 100%; }
.hs-trigger { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 0 18px; border: 1.5px solid var(--vc-linea); border-radius: 16px;
  background: var(--vc-papel); color: var(--vc-texto-3); font: inherit; font-size: 1.0625rem; text-align: left; cursor: pointer; }
.hs-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-trigger:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; }

.hoy-more-btn { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 12px 18px; border: 1px solid var(--vc-linea); border-radius: 18px;
  background: var(--vc-papel); font: inherit; color: var(--vc-tinta); text-align: left; cursor: pointer; }
.hoy-more-btn:hover { background: var(--vc-hover); }
.hoy-more-btn:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; }
.hoy-more-t { display: grid; gap: 2px; }
.hoy-more-t b { font-size: 1.0625rem; }
.hoy-more-btn[aria-expanded="true"] { border-color: transparent; background: none; padding-left: 4px; padding-right: 4px; min-height: 56px; }
.hoy-mas-body { margin-top: -10px; }
@media (max-width: 640px) {
  .home { gap: 22px; }
  /* Celular: saludo compacto para que «Lo que importa hoy» se vea sin bajar; las demás acciones en una fila de tres. */
  .home-hero { padding: 18px 16px 16px; gap: 14px; }
  .home-hero h1 { font-size: 1.75rem; margin-top: 6px; }
  .home-hero .home-lead { font-size: 1.0625rem; margin-top: 6px; }
  .home-hero .home-sub { display: none; }
  .home-hero .hero-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .home-hero .hero-actions .btn:not(.btn-primary) { flex-direction: column; gap: 4px; min-height: 68px; padding: 6px 4px; font-size: 0.875rem; line-height: 1.15; }
  .home-hero .hero-actions .btn-primary { min-height: 56px; font-size: 1.0625rem; }
  .hoy-upd { width: 48px; padding: 0; }
  .hoy-upd .hoy-upd-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .hoy-all { justify-self: stretch; }
  .hoy-sec-h { flex-wrap: nowrap; }
  .hoy-sec-h .section-title { font-size: 1.25rem; }
  .hoy-grid { gap: 12px; }
  .hoy-card { min-height: 0; padding: 16px 16px 14px 20px; }
  .hoy-n { font-size: 2.5rem; }
  .hoy-act { align-self: stretch; justify-content: center; min-height: 48px; font-size: 1rem; }
  .fav-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fav-btn { flex-direction: column; justify-content: center; text-align: center; min-height: 112px; padding: 14px 8px; gap: 8px; font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .fav-btn:active { transform: none; } }

/* ───── «Mi app» ───── */
.ma { max-width: 880px; }
.ma-sec { display: grid; gap: 14px; }
.ma-h { display: flex; align-items: flex-start; gap: 14px; }
.ma-h h2 { font-size: 1.375rem; }
.ma-h p { margin-top: 4px; }
.ma-sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ma-size { position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 104px; padding: 12px 8px; border: 2px solid var(--vc-linea);
  border-radius: 18px; background: var(--vc-papel); font: inherit; color: var(--vc-tinta); cursor: pointer; }
.ma-size:hover { border-color: #CFC8BA; }
.ma-size.is-on { border-color: var(--vc-tinta); background: var(--vc-sel); box-shadow: inset 0 0 0 1px var(--vc-tinta); }
.ma-aa { font-family: var(--titulo); font-weight: 800; line-height: 1; }
.ma-size.s0 .ma-aa { font-size: 24px; }
.ma-size.s1 .ma-aa { font-size: 30px; }
.ma-size.s2 .ma-aa { font-size: 38px; }
.ma-size-l { font-weight: 700; font-size: 1rem; }
.ma-ok { position: absolute; top: 8px; right: 8px; color: var(--vc-ok); }
.ma-sample { padding: 12px 14px; border-radius: 12px; background: var(--vc-arena); font-size: 1rem; line-height: 1.5; }
.ma-switch { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 12px 14px; border: 1px solid var(--vc-linea); border-radius: 16px;
  background: var(--vc-papel); font: inherit; color: var(--vc-tinta); text-align: left; cursor: pointer; }
.ma-switch:hover { background: var(--vc-hover); }
.ma-switch.is-on { border-color: var(--vc-tinta); }
.ma-sw-txt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ma-sw-txt b { font-size: 1.0625rem; }
.ma-sw-txt span { font-size: 0.9063rem; color: var(--vc-texto-3); }
.ma-sw-ui { flex: none; position: relative; width: 56px; height: 32px; border-radius: 16px; background: var(--acero-300); transition: background var(--vc-t2); }
.ma-sw-ui i { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform var(--vc-t2); }
.ma-switch.is-on .ma-sw-ui { background: var(--vc-ok); }
.ma-switch.is-on .ma-sw-ui i { transform: translateX(24px); }
.ma-sw-word { flex: none; min-width: 28px; font-weight: 800; font-size: 1rem; }
.ma-chosen { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ma-ch { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 10px; border-radius: 14px; background: var(--vc-sel); }
.ma-ch-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--vc-tinta); color: #fff; font-weight: 800; font-size: 0.875rem; }
.ma-ch-l { font-weight: 650; font-size: 1rem; overflow-wrap: break-word; }
.ma-empty { padding: 12px 14px; border-radius: 12px; border: 1.5px dashed var(--vc-linea); color: var(--vc-texto-2); }
.ma-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.ma-opt { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 10px; border: 1.5px solid var(--vc-linea); border-radius: 14px; background: var(--vc-papel);
  font: inherit; color: var(--vc-tinta); text-align: left; cursor: pointer; }
.ma-opt:hover { border-color: #CFC8BA; }
.ma-opt.is-on { border-color: var(--vc-tinta); background: var(--vc-sel); }
.ma-opt-l { flex: 1; min-width: 0; font-weight: 600; font-size: 0.9688rem; line-height: 1.25; overflow-wrap: break-word; hyphens: auto; }
.ma-opt-ck { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--acero-300); display: grid; place-items: center; }
.ma-opt.is-on .ma-opt-ck { background: var(--vc-tinta); border-color: var(--vc-tinta); color: #fff; }
.ma-status { text-align: center; }
.ma-group { display: grid; gap: 8px; }
.ma-group-h { font-family: var(--texto); font-size: 0.8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vc-texto-2); margin-top: 6px; }
.ma-done { display: flex; justify-content: center; max-width: 880px; }
@media (max-width: 640px) { .ma-done .btn { width: 100%; } }
@media (max-width: 640px) {
  .ma-sizes { gap: 8px; }
  .ma-size { min-height: 96px; padding: 10px 4px; }
  .ma-size-l { font-size: 0.9375rem; }
  .ma-opts { grid-template-columns: minmax(0, 1fr); }
  .ma-switch { gap: 12px; padding: 12px; }
  .ma-sw-word { display: none; }
}

/* ───── Celular: la acción principal de cada pantalla, grande y a todo lo ancho; las demás en pares (la que queda sola, a lo ancho) ───── */
@media (max-width: 640px) {
  .page-head > .toolbar > .btn-primary.btn-primary { order: -1; grid-column: 1 / -1; min-height: 56px; font-size: 1.0625rem; }
  .page-head > .toolbar > .btn:not(.btn-primary) { min-height: 48px; }
  .page-head > .toolbar:has(> .btn-primary:first-child) > :last-child:nth-child(even):not(.btn-primary),
  .page-head > .toolbar:has(> .btn-primary:last-child) > :nth-last-child(2):nth-child(odd),
  .page-head > .toolbar:not(:has(> .btn-primary)) > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  /* Caja de la oficina: primero «¿Qué vas a cobrar?»; los números del día, abajo. */
  .cj-page:not(.cj-field) > .cj-today { order: 4; }
  /* Cotizaciones como tarjetas: folio y total arriba, el asunto y el cliente debajo. */
  .qt-row.list-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "folio end" "main main"; gap: 8px 10px; align-items: center; }
  .qt-row > .qt-folio { grid-area: folio; justify-self: start; }
  .qt-row > .grow { grid-area: main; }
  .qt-row > .qt-row-end { grid-area: end; flex-direction: row; align-items: center; gap: 8px; }
  .qt-row > .grow .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* Todo el trabajo (pipeline): saltar a una etapa con un toque (con su número), sin arrastrar el tablero de lado. */
.pl-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-jump .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.pl-jump .chip b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--vc-tinta); color: #fff; font-size: 0.75rem; }
.pl-jump .chip.is-empty b { background: var(--acero-200); color: var(--vc-texto-2); }
@media (min-width: 1101px) { .pl-jump { display: none; } }

/* ═══════════════ R40 · celular de la oficina: «Crear» en la barra de abajo y su hoja de acciones rápidas ═══════════════ */
/* «Crear» va dentro de la barra, plano como las demás pestañas (no es un botón flotante): su ícono en un recuadro de oro. */
.tab-plus { width: 42px; height: 32px; border-radius: 12px; display: grid; place-items: center; background: var(--vc-oro); color: var(--vc-oro-tinta); transition: background-color var(--vc-t2); }
.tab-plus svg { width: 22px !important; height: 22px !important; stroke-width: 2.6; }
.tabbar.office .tab-crear { color: var(--vc-tinta); font-weight: 700; }
.tabbar.office .tab-crear[aria-expanded="true"] .tab-plus, .tabbar.office .tab-crear[aria-current="page"] .tab-plus { background: var(--vc-tinta); color: #fff; }
.tabbar.office .tab-crear:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: -3px; }

/* Hoja de abajo: se arrastra hacia abajo desde la manija o el título para cerrarla. */
.sh-grip, .sh-head { touch-action: none; }
.sh-grip { cursor: grab; }
.sh-scrim:not(.is-dragging) .sh-panel.is-anim { transition: transform .2s var(--vc-ease); }
.sh-ttl { min-width: 0; }
.sh-sub { margin: 2px 0 0; font-size: 0.9375rem; color: var(--vc-texto-2); }
.sh-panel.cr-sheet { max-height: 92vh; }
.sh-panel.cr-sheet .sh-head h2 { font-family: var(--vc-font-display); font-size: 1.5rem; font-weight: 800; }

/* Mosaicos grandes de acciones rápidas (en la hoja «Crear» y en #/rapido). */
.cr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cr-tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 140px; padding: 16px 14px; border-radius: 20px;
  background: var(--vc-papel); border: 1px solid var(--vc-linea); color: var(--vc-tinta); text-decoration: none; min-width: 0; overflow: hidden;
  transition: transform var(--vc-t1) var(--vc-ease), border-color var(--vc-t2); animation: vcRise .24s var(--vc-ease) backwards; }
.cr-tile:nth-child(2) { animation-delay: 30ms; } .cr-tile:nth-child(3) { animation-delay: 60ms; } .cr-tile:nth-child(4) { animation-delay: 90ms; }
.cr-tile:nth-child(5) { animation-delay: 120ms; } .cr-tile:nth-child(6) { animation-delay: 150ms; } .cr-tile:nth-child(7) { animation-delay: 180ms; }
.cr-tile::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--vc-oro); }
.cr-tile.tone-dark::before { background: var(--vc-carbon); }
.cr-tile.tone-green::before { background: var(--vc-ok); }
.cr-tile.tone-blue::before { background: var(--vc-info); }
.cr-tile.tone-light::before { background: #CFC8BA; }
.cr-tile:hover { border-color: #DCD5C7; }
.cr-tile:active { transform: scale(.97); }
.cr-tile:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; }
.cr-txt { display: grid; gap: 3px; min-width: 0; }
.cr-txt b { font-family: var(--vc-font-display); font-weight: 800; font-size: 1.0938rem; line-height: 1.2; letter-spacing: -.005em; overflow-wrap: anywhere; hyphens: auto; }
.cr-txt span { font-size: 0.8438rem; color: var(--vc-texto-2); line-height: 1.3; overflow-wrap: anywhere; }
.cr-h { font-size: 0.8125rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--vc-texto-2); margin: 18px 2px 8px; }
.cr-list { display: grid; gap: 8px; }
.cr-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid var(--vc-linea); border-radius: 16px; background: var(--vc-papel);
  font: inherit; color: var(--vc-tinta); text-align: left; cursor: pointer; }
.cr-row .cr-txt { flex: 1; }
.cr-row .cr-txt b { font-family: inherit; font-size: 1rem; font-weight: 700; }
.cr-row:hover { background: var(--vc-hover); }
.cr-row:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; }
.cr-go { flex: none; color: var(--vc-texto-3); }
@media (min-width: 901px) { .cr-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
@media (max-width: 340px) { .cr-grid { grid-template-columns: minmax(0, 1fr); } .cr-tile { min-height: 0; flex-direction: row; align-items: center; } }
@media (prefers-reduced-motion: reduce) { .cr-tile, .cr-tile:active { animation: none; transform: none; } .sh-scrim:not(.is-dragging) .sh-panel.is-anim { transition: none; } }

/* ───────── R42 · Título de la pantalla y «Atrás» en la barra de arriba ─────────
   Computadora: «Atrás» y el título a la izquierda del buscador. Celular: un segundo renglón de la barra (fija) con «Atrás» y el
   título; un solo renglón de texto que termina en «…» si no cabe (la letra crece con «Mi app» porque va en rem). */
.top-nav { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-title { min-width: 0; display: grid; line-height: 1.2; }
.top-title-k { font-size: 0.6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--vc-oro-texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-title-t { font-family: var(--vc-font-display); font-weight: 800; font-size: 1.125rem; letter-spacing: -.005em; color: var(--vc-tinta);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.top-back { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; min-width: 48px; padding: 0 14px 0 10px;
  border: 1px solid var(--vc-linea); border-radius: 12px; background: var(--vc-papel); color: var(--vc-tinta); font: inherit; font-size: 0.9375rem; font-weight: 700;
  cursor: pointer; transition: background-color var(--vc-t2), border-color var(--vc-t2), transform var(--vc-t1); }
.top-back:hover { background: var(--vc-hover); border-color: #DCD5C7; }
.top-back:active { transform: scale(.96); }
.top-back:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; }
@media (min-width: 901px) {
  .topbar .top-nav { flex: 0 1 auto; max-width: 40%; margin-right: 8px; }
  /* El buscador cede espacio antes que el título (que solo se corta con «…» si de verdad no cabe). */
  .topbar .gs-wide { flex: 1 1 0; min-width: 160px; max-width: 520px; }
}
/* Computadora angosta (laptop, tableta acostada): el título va en su propio renglón de la barra fija, completo, y los botones conservan su palabra. */
@media (min-width: 901px) and (max-width: 1279px) {
  .topbar { flex-wrap: wrap; row-gap: 2px; align-content: center; }
  .topbar .top-nav { order: 99; flex: 1 0 100%; max-width: none; margin-right: 0; padding: 0 0 6px; }
  .topbar .top-nav[data-kind="home"] { padding-bottom: 2px; }
}
@media (max-width: 900px) {
  .topbar.has-nav-row { flex-wrap: wrap; row-gap: 6px; align-content: center; }
  .topbar .top-nav { order: 99; flex: 1 0 100%; min-height: 48px; padding: 0 2px 2px 6px; }
  .topbar .top-nav[data-kind="home"] { min-height: 34px; }
  .topbar .top-back, .tech-top .top-back { min-height: 48px; border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 14px; font-size: 1rem; }
  .topbar .top-back:hover, .tech-top .top-back:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); }
  .topbar .top-back:focus-visible, .tech-top .top-back:focus-visible { outline-color: var(--vc-oro-vivo, #FDB207); }
  .topbar .top-title-t { color: #fff; font-size: 1.1875rem; }
}
/* App del técnico y del supervisor: un solo renglón (marca o «Atrás», título, señal, ayuda y foto). */
.tech-top .top-title { flex: 1; }
.tech-top .top-title-t { color: #fff; font-size: 1.1875rem; }
.tech-top .top-back { border-color: rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; }
.tech-top .top-back.is-compact { flex-direction: column; gap: 0; min-width: 56px; min-height: 48px; padding: 3px 6px; border-radius: 14px; font-size: 0.75rem; line-height: 1.1; }
.tech-top .tech-mark { flex: none; display: grid; place-items: center; width: 40px; height: 40px; }
.tech-top .tech-mark img { width: 32px; height: auto; }
@media (prefers-reduced-motion: reduce) { .top-back, .top-back:active { transition: none; transform: none; } }
@media print { .top-nav { display: none !important; } }

/* R42 · «Mi app» → WhatsApp en la computadora: dos opciones grandes (toda la fila se toca). */
.ma-wa { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.ma-wa-opt { position: relative; display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 12px 40px 12px 14px; border: 2px solid var(--vc-linea); border-radius: 16px;
  background: var(--vc-papel); color: var(--vc-tinta); font: inherit; text-align: left; cursor: pointer; transition: border-color var(--vc-t2), background-color var(--vc-t2); }
.ma-wa-opt:hover { border-color: #CFC8BA; }
.ma-wa-opt.is-on { border-color: var(--vc-tinta); background: var(--vc-sel); box-shadow: inset 0 0 0 1px var(--vc-tinta); }
.ma-wa-opt:focus-visible { outline: 3px solid var(--vc-foco); outline-offset: 2px; }
.ma-wa-opt .ma-ok { top: 50%; transform: translateY(-50%); right: 12px; }
.ma-wa-t { display: grid; gap: 2px; min-width: 0; }
.ma-wa-t b { font-size: 1rem; }
.ma-wa-t span { font-size: 0.875rem; color: var(--vc-texto-2); overflow-wrap: anywhere; }

/* R42 · Celular: como la barra de arriba ya dice en qué pantalla estás, la tarjeta de la sección queda delgada (sección y
   pantalla, en letra chica, y «Cambiar»), para no repetir el nombre en grande tres veces. Sigue siendo un botón ≥ 52 px de alto. */
.topbar.has-nav-row + .sp-bar-wrap { padding-top: 8px; }
.topbar.has-nav-row + .sp-bar-wrap .sp-bar { min-height: 52px; padding: 6px 8px 6px 10px; gap: 10px; border-radius: 14px; }
.topbar.has-nav-row + .sp-bar-wrap .sp-bar > .i3d { width: 30px !important; height: 30px !important; }
.topbar.has-nav-row + .sp-bar-wrap .sp-bar-k { font-size: 0.6875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar.has-nav-row + .sp-bar-wrap .sp-bar-t b { font-family: inherit; font-size: 0.9375rem; font-weight: 650; color: var(--vc-texto-2); -webkit-line-clamp: 1; }
.topbar.has-nav-row + .sp-bar-wrap .sp-bar-go { padding: 8px 12px; min-height: 40px; }
.topbar.has-nav-row + .sp-bar-wrap + .page { padding-top: 12px; }
