@font-face { font-family: Montserrat; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/montserrat-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/montserrat-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/montserrat-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: Montserrat; font-style: normal; font-weight: 800; font-display: swap; src: url(../fonts/montserrat-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/source-sans-3-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/source-sans-3-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/source-sans-3-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Code Pro'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/source-code-pro-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Source Code Pro'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/source-code-pro-latin-700-normal.woff2) format('woff2'); }

/* Evento de Granizo · VWM — CSA. Línea visual "Ejecutiva CSA" (continuidad del Reporte VWM):
   blanco, banda roja CSA, Montserrat para títulos y cifras, Source Sans 3 para texto, esquinas rectas, sin sombras. */
:root {
  --ink: #1E2328; --ink-2: #4A535C; --muted: #5C656E; --line: #E1E4E7; --line-2: #EEF0F2; --line-strong: #BFC5CB;
  --bg: #FFFFFF; --surface: #FFFFFF; --band: #F6F6F7; --navy: #44546A; --slate: #1E2328; --slate-2: #33393F;
  --csa: #E9463F; --csa-btn: #C8352D; --csa-dark: #A82A23; --csa-soft: #FDECEB;
  --vw: #44546A; --vw-soft: #EDF0F4;
  --ok: #1E7A46; --ok-soft: #E6F4EC; --warn: #8A6100; --warn-soft: #FFF4D6; --bad: #B42318; --bad-soft: #FDECEA;
  --r: 2px; --r-sm: 2px; --shadow: none;
  --font: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --head: Montserrat, 'Source Sans 3', system-ui, sans-serif;
  --mono: 'Source Code Pro', ui-monospace, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; overflow-x: hidden; display: flex; flex-direction: column; }
#app { flex: 1; display: flex; flex-direction: column; }
a { color: var(--ink); }
a:hover { color: var(--csa-btn); }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.01em; }
h1 { font-size: 1.45rem; font-weight: 800; margin: 0 0 .2rem; }
h2 { font-size: 1rem; font-weight: 700; margin: 0 0 .75rem; }
h3 { font-size: .85rem; font-weight: 700; margin: 1rem 0 .5rem; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
p { margin: .35rem 0; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.boot { display: grid; place-items: center; min-height: 100vh; color: var(--muted); font-family: var(--head); }
.mono { font-family: var(--mono); letter-spacing: .02em; }
.big { font-size: 1.15rem; }
.small { font-size: .875rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.pre { white-space: pre-wrap; }
.row { display: flex; align-items: center; }
.row.between { justify-content: space-between; } .row.gap { gap: .5rem; } .row.wrap, .wrap { flex-wrap: wrap; } .row.end { align-items: flex-end; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }

/* ===== Cabecera: banda roja + logo + pestañas ===== */
.topbar { position: sticky; top: 0; z-index: 20; background: #fff; border-top: 4px solid var(--csa); border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top); }
.topbar-inner { display: flex; align-items: center; gap: 1.25rem; padding: 0 1.5rem; min-height: 56px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); min-width: 0; flex: none; }
.brand-csa { height: 30px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; padding-left: .75rem; border-left: 1px solid var(--line); }
.brand-text strong { font: 700 .82rem var(--head); } .brand-text small { font-size: .78rem; color: var(--muted); }
.navtabs { display: flex; align-self: stretch; gap: 0; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.navtabs::-webkit-scrollbar { display: none; }
.navtabs a { display: flex; align-items: center; gap: .4rem; padding: 0 .85rem; min-height: 56px; white-space: nowrap; text-decoration: none; color: var(--ink-2);
  font: 600 .8rem var(--head); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.navtabs a:hover { color: var(--ink); }
.navtabs a.active { color: var(--ink); border-bottom-color: var(--csa); }
.navtabs .ic { width: 16px; height: 16px; }
.topbar-right { display: flex; align-items: center; gap: .75rem; margin-left: auto; flex: none; }
.sync-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: var(--r);
  color: var(--ink-2); text-decoration: none; font-size: .85rem; font-weight: 600; min-height: 36px; background: #fff; }
.sync-pill.pending { background: var(--warn-soft); border-color: #E7C66B; color: var(--warn); } .sync-pill.rejected { background: var(--bad-soft); border-color: #EBA59E; color: var(--bad); }
.sync-pill.syncing .net-dot { animation: pulse 1s infinite; }
.net-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #9AA7B1; }
.net-dot.on { background: var(--ok); } .net-dot.off { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }
.user-chip { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none; font-size: .85rem; padding-left: .75rem; border-left: 1px solid var(--line); }
.user-chip .user-name { display: flex; flex-direction: column; line-height: 1.15; } .user-chip .user-name small { color: var(--muted); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r); background: var(--ink); color: #fff; font: 700 .7rem var(--head); }
@media (max-width: 1100px) { .brand-text { display: none; } }
@media (max-width: 860px) {
  .topbar-inner { flex-wrap: wrap; padding: 0 1rem; gap: .5rem 1rem; }
  .navtabs { order: 3; flex: 1 0 100%; margin: 0 -1rem; padding: 0 .5rem; border-top: 1px solid var(--line-2); }
  .navtabs a { min-height: 46px; padding: 0 .7rem; }
  .user-chip .user-name, .sync-text { display: none; }
  .user-chip { border-left: 0; padding-left: 0; }
}
.appfoot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--csa); color: #fff; padding: .45rem 1.5rem calc(.45rem + env(safe-area-inset-bottom));
  font: 600 .72rem var(--head); margin-top: auto; }

/* Layout */
main { outline: none; flex: 1; }
.page { width: 100%; max-width: 1320px; margin: 0 auto; padding: 1.5rem; padding-bottom: 3rem; display: flex; flex-direction: column; gap: 1.25rem; }
@media (max-width: 640px) { .page { padding: 1rem; padding-bottom: 2.5rem; } }
.page-head { display: flex; flex-direction: column; gap: .15rem; }
.page-head.row { flex-direction: row; }
.page-head h1 + p, .page-head .muted { font-size: .95rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.25rem; }
.card > h2:first-child { padding-bottom: .6rem; border-bottom: 2px solid var(--ink); }
.card-attn { border: 1px solid #EBA59E; background: var(--csa-soft); padding: .75rem 1rem; border-radius: var(--r); }
.error-card { border-color: var(--bad); }
.back-link { text-decoration: none; font: 600 .85rem var(--head); display: inline-flex; align-items: center; gap: .3rem; color: var(--ink-2); }
.empty { padding: 1.25rem; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r); background: var(--band); }
.warn-line { background: var(--warn-soft); color: var(--warn); padding: .55rem .8rem; border-radius: var(--r); font-size: .92rem; font-weight: 600; }
.divider { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; margin: 1rem 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Controles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1.05rem; border-radius: var(--r);
  border: 1px solid var(--ink); background: #fff; color: var(--ink); font: 600 .82rem var(--head); letter-spacing: .01em; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--band); color: var(--ink); }
.btn:focus-visible, .input:focus-visible, .chip:focus-visible, .pin-key:focus-visible, .tile:focus-visible, .photo-slot:focus-visible, .navtabs a:focus-visible, .tray:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.btn.primary { background: var(--csa-btn); border-color: var(--csa-btn); color: #fff; } .btn.primary:hover { background: var(--csa-dark); border-color: var(--csa-dark); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--band); }
.danger-text { color: var(--bad) !important; }
.btn.small { min-height: 34px; padding: .3rem .7rem; font-size: .75rem; }
.btn-xl { min-height: 56px; font-size: .95rem; padding: .8rem 1.4rem; flex: 1; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; min-width: 44px; min-height: 44px; cursor: pointer; color: var(--ink-2); display: inline-grid; place-items: center; border-radius: var(--r); }
.icon-btn:hover { background: var(--band); }
.input { width: 100%; min-height: 46px; padding: .55rem .75rem; border: 1px solid var(--line-strong); border-radius: var(--r); background: #fff; font: 1rem var(--font); color: var(--ink); }
.input:focus { border-color: var(--ink); outline: none; }
.input-lg { min-height: 54px; font-size: 1.15rem; }
.input.num { text-align: right; }
.input.match { border-color: var(--ok); background: var(--ok-soft); }
textarea.input { min-height: 72px; resize: vertical; }
select.input { appearance: auto; }
.field { display: flex; flex-direction: column; gap: .3rem; margin: .5rem 0; }
.field-label { font: 700 .72rem var(--head); color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.field-hint { font-size: .85rem; color: var(--muted); } .field-hint.ok { color: var(--ok); font-weight: 600; } .field-hint.bad { color: var(--bad); font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; }
.check input { width: 22px; height: 22px; accent-color: var(--csa-btn); }
.checks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .25rem .75rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { min-height: 38px; padding: .3rem .85rem; border-radius: var(--r); border: 1px solid var(--line-strong); background: #fff; font: 600 .78rem var(--head); cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip-static { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .5rem; border-radius: var(--r); background: var(--line-2); font-size: .85rem; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); }
.tab { min-height: 46px; padding: .5rem 1rem; border: 0; background: none; font: 600 .82rem var(--head); color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab.active { color: var(--ink); border-color: var(--csa); }

/* Insignias de estado */
.badge { display: inline-block; padding: .18rem .55rem; border-radius: var(--r); font: 700 .7rem var(--head); letter-spacing: .03em; white-space: nowrap; border: 1px solid transparent; text-transform: uppercase; }
.st-pendiente { background: #EEF0F2; color: #4A535C; }
.st-checkin { background: #EDF0F4; color: #33445A; }
.st-asignada { background: #EEEAF8; color: #4A3A8A; }
.st-en_reparacion { background: #FFF4D6; color: #7A5500; }
.st-checkout { background: #E3F2F3; color: #0B5E68; }
.st-retrabajo { background: #FDECEA; color: #A1251B; }
.st-liberada { background: #E6F4EC; color: #17663F; }
.st-entregada { background: #1E2328; color: #fff; }
.st-cancelada { background: #F2F2F2; color: #6B6B6B; text-decoration: line-through; }
.st-adicional { background: var(--warn-soft); color: var(--warn); }
.st-bg-pendiente { background: #A7AFB7; } .st-bg-checkin { background: #44546A; } .st-bg-asignada { background: #6A5BB0; } .st-bg-en_reparacion { background: #D9A300; }
.st-bg-checkout { background: #1597A6; } .st-bg-retrabajo { background: #D9473D; } .st-bg-liberada { background: #00A04A; } .st-bg-entregada { background: #1E2328; } .st-bg-cancelada { background: #C4C4C4; }
.flags { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .5rem; }
.flag { padding: .1rem .45rem; border-radius: var(--r); font: 700 .68rem var(--head); text-transform: uppercase; letter-spacing: .03em; background: var(--warn-soft); color: var(--warn); }
.flag-prio { background: var(--csa-btn); color: #fff; } .flag-sync { background: var(--vw-soft); color: var(--navy); }
.cat-pill { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r); font: 800 .85rem var(--head); color: #fff; background: #9AA7B1; }
.cat-pill.cat-A { background: #B42318; } .cat-pill.cat-B { background: #44546A; } .cat-pill.cat-C { background: #7C8894; }
.prio-1 { color: var(--csa-btn); font-weight: 800; }

/* Acceso */
.login-wrap { min-height: 100vh; display: flex; flex-direction: column; background: #fff; border-top: 4px solid var(--csa); }
.login-main { flex: 1; display: grid; place-items: start center; padding: 2rem 1rem; }
@media (min-width: 700px) { .login-main { place-items: center; background: var(--band); } }
.login-card { width: 100%; max-width: 420px; background: #fff; padding: 1.75rem 1.75rem 1.25rem; display: flex; flex-direction: column; gap: .6rem; }
@media (min-width: 700px) { .login-card { border: 1px solid var(--line); } }
.login-brand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.login-csa { height: 46px; } .login-vwm { height: 22px; }
.login-kicker { font: 700 .72rem var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: .9rem 0 0; }
.login-title { font: 800 1.6rem var(--head); color: var(--csa); margin: 0 0 .25rem; }
.lang-bar { display: flex; gap: .35rem; flex-wrap: wrap; }
.lang-bar .chip { min-height: 32px; font-size: .72rem; }
.known-users .chips { margin-top: .3rem; }
.login-msg { min-height: 1.4em; text-align: center; color: var(--bad); font-weight: 600; }
.login-card .input { border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; padding-left: 2px; font: 700 1.2rem var(--head); letter-spacing: .04em; }
.login-card #login-device { font: 600 1rem var(--font); letter-spacing: 0; border-bottom-width: 1px; }
.pin-dots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; margin: .4rem 0 .6rem; }
.pin-dots span { height: 5px; background: var(--line-strong); }
.pin-dots span.on { background: var(--ink); }
.pin-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.pin-grid > *, .pin-grid > .pin-key { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pin-key { min-height: 58px; border: 0; background: #fff; font: 600 1.45rem var(--head); color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.pin-key:hover { background: var(--band); }
.pin-key:active { background: var(--line-2); }
.pin-key .ic { width: 24px; height: 24px; }

/* Inicio: franja de avance + bandejas */
.hero { background: var(--band); border-bottom: 1px solid var(--line); }
.hero-in { max-width: 1320px; margin: 0 auto; padding: 1.5rem; display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; align-items: center; }
.hero-main { flex: 1 1 420px; min-width: 0; }
.kicker { font: 700 .72rem var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.hero-title { font: 800 1.6rem/1.2 var(--head); margin: .3rem 0 0; }
.progress { position: relative; height: 12px; background: #E7E6E6; margin-top: 1rem; max-width: 680px; }
.progress .p-rep { position: absolute; inset: 0 auto 0 0; background: #00A04A; }
.progress .p-wip { position: absolute; top: 0; bottom: 0; background: #FFC000; }
.progress .p-plan { position: absolute; top: -5px; width: 2px; height: 22px; background: var(--ink); }
.progress-legend { display: flex; gap: 1.1rem; flex-wrap: wrap; font-size: .85rem; color: var(--ink-2); margin-top: .5rem; }
.progress-legend i { display: inline-block; width: 10px; height: 10px; margin-right: .35rem; vertical-align: -1px; }
.statbox { display: flex; flex-wrap: wrap; border: 1px solid var(--line); background: #fff; }
.statbox > div { padding: .9rem 1.4rem; border-right: 1px solid var(--line); min-width: 120px; }
.statbox > div:last-child { border-right: 0; }
.statbox .v { font: 800 1.7rem/1.1 var(--head); font-variant-numeric: tabular-nums; } .statbox .v small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.statbox .s { font-size: .82rem; font-weight: 600; }
@media (max-width: 640px) { .statbox { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; } .statbox > div { min-width: 0; padding: .7rem .75rem; } .statbox .v { font-size: 1.35rem; } .hero-title { font-size: 1.35rem; } .hero-in { padding: 1.1rem 1rem; } }
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 2rem; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; gap: 1.5rem; } }
.sec-title { font: 700 1rem var(--head); margin: 0; padding-bottom: .6rem; border-bottom: 2px solid var(--ink); }
.tray { display: flex; align-items: center; gap: 1rem; padding: 1rem .25rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tray:hover { background: var(--band); color: var(--ink); }
.tray-n { width: 64px; flex: none; font: 800 1.75rem var(--head); font-variant-numeric: tabular-nums; }
.tray-n.bad { color: var(--bad); } .tray-n.warn { color: var(--warn); } .tray-n.zero { color: var(--line-strong); }
.tray-t { flex: 1; min-width: 0; } .tray-t strong { display: block; font-size: 1.02rem; } .tray-t span { color: var(--muted); font-size: .9rem; }
.tray > .ic { color: var(--muted); }
.links { display: flex; flex-direction: column; }
.links a { display: flex; align-items: center; gap: .7rem; padding: .8rem .25rem; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 600; }
.links a:hover { background: var(--band); }
.links a .ic { color: var(--ink-2); } .links a .ic:last-child { margin-left: auto; color: var(--muted); }
.client-mark { display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--muted); margin-top: 1rem; }
.client-mark img { height: 16px; }

/* Mosaicos (compatibilidad) */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.tile { display: flex; flex-direction: column; gap: .3rem; padding: 1.1rem; min-height: 112px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--ink); }
.tile-primary { border-top: 4px solid var(--csa); }
.tile-icon { color: var(--ink-2); } .tile-icon .ic { width: 22px; height: 22px; } .tile-title { font: 700 1rem var(--head); } .tile-sub { font-size: .9rem; color: var(--muted); }

/* Pasos */
.stepper { display: flex; gap: .25rem; list-style: none; padding: 0; margin: 0; }
.stepper li { flex: 1; display: flex; align-items: center; gap: .4rem; padding: .5rem 0; border-top: 4px solid var(--line); color: var(--muted); font: 600 .78rem var(--head); }
.stepper li span { display: grid; place-items: center; width: 22px; height: 22px; background: var(--line); color: var(--ink-2); font-size: .72rem; }
.stepper li.active { color: var(--ink); border-color: var(--csa); } .stepper li.active span { background: var(--csa-btn); color: #fff; }
.stepper li.done { border-color: var(--navy); } .stepper li.done span { background: var(--navy); color: #fff; }
@media (max-width: 520px) { .stepper li { font-size: 0; } .stepper li span { font-size: .72rem; } }
.scan-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.unit-card { border-width: 1px; border-top-width: 4px; }
.unit-card.okcard { border-top-color: var(--ok); } .unit-card.blocked { border-top-color: var(--bad); } .unit-card.warncard { border-top-color: #D9A300; }
.unit-card-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.alert-red { background: var(--bad-soft); color: var(--bad); border-radius: var(--r); padding: .75rem; margin-top: .75rem; }
.alert-amber { background: var(--warn-soft); color: var(--warn); border-radius: var(--r); padding: .75rem; margin: .5rem 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; } .kv dd { margin: 0; font-weight: 600; }
.kv-lg dd { font-size: 1.05rem; }
.cat-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .75rem; }
.cat-btn { min-height: 84px; border-radius: var(--r); border: 1px solid var(--line-strong); background: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; font: 600 .82rem var(--head); color: var(--ink); }
.cat-letter { font: 800 1.8rem var(--head); }
.cat-btn.active { border: 2px solid var(--ink); background: var(--band); }
.cat-btn.cat-A.active { border-color: #B42318; background: var(--bad-soft); }

/* Fotos */
.counter { font: 800 1rem var(--head); padding: .2rem .6rem; border-radius: var(--r); background: var(--warn-soft); color: var(--warn); }
.counter.ok { background: var(--ok-soft); color: var(--ok); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .5rem; margin: .75rem 0; }
.photo-slot { position: relative; aspect-ratio: 4/3; border: 1px dashed var(--ink-2); border-radius: var(--r); background: var(--band); cursor: pointer; padding: 0; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink-2); }
.photo-slot.has { border-style: solid; border-color: var(--ok); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .guide { width: 60%; height: 70%; display: grid; place-items: center; } .photo-slot .guide svg { width: 100%; height: 100%; }
.slot-label { position: absolute; left: 0; right: 0; bottom: 0; padding: .2rem .35rem; background: rgba(30,35,40,.85); color: #fff; font-size: .74rem; font-weight: 600; text-align: left; }
.slot-ok { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; background: var(--ok); color: #fff; display: grid; place-items: center; }
.slot-ok .ic { width: 16px; height: 16px; stroke-width: 2.6; }
.photo-slot.add .plus { font-size: 2rem; color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.gallery figure { margin: 0; cursor: zoom-in; } .gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--line-2); }
.gallery figcaption { font-size: .78rem; color: var(--muted); }

/* Lista de unidades (tabla densa en PC) */
.unit-list { display: flex; flex-direction: column; border-top: 2px solid var(--ink); }
.unit-row { display: grid; grid-template-columns: minmax(190px, 1.3fr) 1.2fr 36px 1.2fr 50px auto; gap: .75rem; align-items: center; padding: .45rem .5rem; min-height: 50px;
  background: #fff; border: 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; width: 100%; }
.unit-row:hover { background: var(--band); color: var(--ink); }
.unit-row strong { color: var(--csa-btn); }
.unit-row-model { display: flex; flex-direction: column; } .unit-row-model small { color: var(--muted); }
.unit-row.selectable { grid-template-columns: 32px 1.4fr 1fr 1fr auto; }
@media (max-width: 760px) { .unit-row { grid-template-columns: 1fr auto; } .unit-row > :nth-child(n+3):not(.badge):not(input) { display: none; } .unit-row.selectable { grid-template-columns: 32px 1fr auto; } }

/* Técnico */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.tech-card { border-top: 4px solid var(--line-strong); display: flex; flex-direction: column; gap: .55rem; }
.tech-card.st-border-en_reparacion { border-top-color: var(--csa); } .tech-card.st-border-asignada { border-top-color: var(--navy); } .tech-card.st-border-retrabajo { border-top-color: var(--bad); }
.tech-card.over { background: var(--bad-soft); }
.tech-card .mono { font-size: 1rem; color: var(--muted); }
.tech-card .mono strong { display: block; color: var(--ink); font-size: 2rem; line-height: 1; font-weight: 700; }
.tech-meta { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.timer { display: inline-flex; align-items: center; gap: .35rem; font: 700 1.05rem var(--head); } .timer.bad { color: var(--bad); }
.stat-row { display: flex; margin-top: .6rem; border: 1px solid var(--line); background: var(--band); }
.stat { flex: 1; padding: .55rem .9rem; display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { font: 800 1.5rem/1.1 var(--head); } .stat span { font: 700 .68rem var(--head); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.actions-bar { display: flex; gap: .5rem; flex-wrap: wrap; position: sticky; bottom: 0; padding: .6rem 0; background: linear-gradient(transparent, #fff 30%); }
.timeline { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 160px 1fr auto; gap: .5rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line-2); }
.tl-note { grid-column: 2 / -1; color: var(--ink-2); }
@media (max-width: 640px) { .timeline li { grid-template-columns: 1fr; } }

/* Tablero */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); border: 1px solid var(--line); }
.kpi { background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; padding: .9rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; text-align: left; font: inherit; color: inherit; }
.kpi-btn { cursor: pointer; } .kpi-btn:hover { background: var(--band); }
.kpi-label { font: 700 .68rem var(--head); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi-value { font: 800 1.6rem/1.1 var(--head); font-variant-numeric: tabular-nums; } .kpi-value.small { font-size: 1rem; }
.kpi-sub { font-size: .85rem; color: var(--ink-2); font-weight: 600; }
.kpi-hero { border-top: 4px solid var(--csa); }
.kpi-bad .kpi-value, .kpi-bad .kpi-sub { color: var(--bad); }
.chart { position: relative; }
.chart-scroll { overflow-x: auto; }
.chart-svg { width: 100%; min-width: 560px; height: auto; display: block; }
.chart-svg .grid { stroke: var(--line-2); stroke-width: 1; }
.chart-svg .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart-svg .axis-today { fill: var(--ink); font-weight: 700; }
.chart-svg .crosshair { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-tip { position: absolute; top: 0; transform: translateX(-10%); background: var(--ink); color: #fff; padding: .45rem .6rem; font-size: .82rem; display: flex; flex-direction: column; gap: .1rem; pointer-events: none; }
.legend { display: flex; gap: 1rem; font-size: .85rem; color: var(--ink-2); }
.sw { display: inline-block; width: 12px; height: 12px; margin-right: .35rem; vertical-align: -1px; }
.hbars { display: flex; flex-direction: column; gap: .45rem; }
.hbar { display: grid; grid-template-columns: 140px 1fr 60px; gap: .6rem; align-items: center; text-decoration: none; color: var(--ink); min-height: 30px; }
.hbar-track { height: 10px; background: var(--line-2); overflow: hidden; }
.hbar-fill { display: block; height: 100%; }
.hbar-label { font-size: .92rem; } .hbar-val { text-align: right; font: 700 .95rem var(--head); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font: 700 .68rem var(--head); text-transform: uppercase; letter-spacing: .06em; color: #fff; background: var(--navy); padding: .55rem .6rem; white-space: nowrap; }
.table td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover td { background: var(--band); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table tr.inactive { opacity: .5; } .table tr.group td { background: var(--line-2); font: 700 .7rem var(--head); text-transform: uppercase; letter-spacing: .05em; }
.table th.center, .table td.center { text-align: center; } .perms-table input { width: 22px; height: 22px; accent-color: var(--csa-btn); }
ul.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.alerts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.alert-item { display: grid; grid-template-columns: 26px 1fr auto; gap: .6rem; align-items: start; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.alert-item .sev-icon { color: var(--muted); padding-top: 2px; }
.alert-item.sev-critical .sev-icon { color: var(--bad); } .alert-item.sev-warning .sev-icon { color: var(--warn); }
.queue-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.queue-list li { display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding: .55rem .6rem; border: 1px solid var(--line); border-radius: var(--r); flex-wrap: wrap; }
.queue-list li.q-rejected, .queue-list li.q-error { border-color: #EBA59E; background: var(--bad-soft); }
.queue-list li.q-waiting_auth { border-color: #E7C66B; background: var(--warn-soft); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .4rem; }
.plan-day { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; padding: .45rem; border: 1px solid var(--line); border-radius: var(--r); }
.plan-day.today { border-color: var(--csa); background: var(--csa-soft); } .plan-day.past { opacity: .65; }

/* Modal / avisos */
.modal-overlay { position: fixed; inset: 0; background: rgba(20,24,28,.55); display: grid; place-items: center; z-index: 100; padding: 1rem; }
.modal { background: #fff; border-top: 4px solid var(--csa); width: 100%; max-width: 480px; max-height: 92vh; overflow: auto; padding: 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .75rem; }
.modal-wide { max-width: 760px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; } .modal-head h2 { margin: 0; }
.modal-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.pin-modal { max-width: 360px; text-align: center; }
.pin-modal .pin-dots { margin: .6rem 0 .8rem; }
.scan-modal { max-width: 640px; }
.scan-frame { position: relative; background: #000; overflow: hidden; aspect-ratio: 4/3; }
.scan-video { width: 100%; height: 100%; object-fit: cover; }
.scan-reticle { position: absolute; left: 8%; right: 8%; top: 38%; height: 24%; border: 3px solid var(--csa); box-shadow: 0 0 0 999px rgba(0,0,0,.35); }
.scan-status { text-align: center; font-weight: 600; }
#toasts { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .4rem; width: min(92vw, 460px); }
.toast { padding: .75rem 1rem; background: var(--ink); color: #fff; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.2); transition: opacity .3s, transform .3s; }
.toast-success { background: var(--ok); } .toast-error { background: var(--bad); } .toast-warn { background: var(--warn); }
.toast.out { opacity: 0; transform: translateY(8px); }
.spinner-wrap { display: flex; align-items: center; gap: .6rem; justify-content: center; padding: 2rem; color: var(--muted); }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--csa); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.chart-tip[hidden], [hidden] { display: none !important; }
.chart-svg.fluid { min-width: 0; }
@media (max-width: 640px) { .table .muted.small { display: none; } .kpi-value { font-size: 1.35rem; } }

/* ===== Reporte VWM (formato Honda MTY) ===== */
.rc { display: flex; flex-direction: column; gap: .5rem; }
.rc-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.rc-page { background: #fff; border: 1px solid var(--line); overflow: hidden; font-family: Montserrat, var(--font); }
.rc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.1rem 1.25rem .4rem; }
.rc-title { color: #E9463F; font-size: 1.55rem; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.rc-sub { margin: .1rem 0 0; font-size: .95rem; color: #1a1a1a; }
.rc-logos { display: flex; align-items: center; gap: .9rem; }
.rc-logos img { height: 34px; width: auto; } .rc-logos img + .rc-sep + img { height: 44px; }
.rc-sep { width: 1px; height: 40px; background: #D9D9D9; }
.rc-body { display: grid; grid-template-columns: 26px minmax(0, 1fr) 250px; gap: .75rem; padding: .25rem 1.25rem 1rem 0; align-items: stretch; }
.rc-tabs { display: grid; grid-template-rows: 30% 70%; gap: 6px; padding-top: 4px; }
.rc-tab { background: #E9463F; color: #fff; writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.rc-main { min-width: 0; display: flex; flex-direction: column; gap: .4rem; }
.rc-chart-scroll { overflow-x: auto; }
.rc-svg { width: 100%; min-width: 600px; height: auto; display: block; }
.rc-svg .rc-ax { font-size: 9px; fill: #7F7F7F; font-family: Montserrat, var(--font); }
.rc-svg .rc-today { fill: #1a1a1a; font-weight: 700; }
.rc-svg .rc-cw { font-size: 9px; fill: #1a1a1a; font-weight: 700; font-family: Montserrat, var(--font); }
.rc-svg .rc-in { font-size: 9px; fill: #fff; font-weight: 600; font-family: Montserrat, var(--font); }
.rc-svg .rc-lbl { font-size: 10px; font-weight: 700; font-family: Montserrat, var(--font); }
.rc-legend { display: flex; justify-content: center; gap: 1.1rem; flex-wrap: wrap; font-size: .75rem; color: #404040; }
.rc-legend i { display: inline-block; width: 14px; height: 9px; margin-right: .35rem; vertical-align: 0; }
.rc-legend i.line { height: 3px; vertical-align: 3px; }
.rc-side { display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.rc-donut { width: 180px; height: 180px; }
.rc-pct { font-size: 26px; font-weight: 800; font-family: Montserrat, var(--font); fill: #000; }
.rc-pct-sub { font-size: 10px; fill: #404040; font-family: Montserrat, var(--font); }
.rc-veh { font-weight: 700; margin: 0; }
.rc-kpis { display: grid; grid-template-columns: 1fr auto; gap: .15rem .9rem; width: 100%; font-size: .85rem; margin: .4rem 0; }
.rc-kpis dt { color: #595959; } .rc-kpis dd { margin: 0; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.rc-status { margin-top: auto; font-size: .85rem; }
.rc-foot { display: flex; justify-content: space-between; background: #E9463F; color: #fff; font-size: .72rem; padding: .45rem 1.25rem; }
@media (max-width: 860px) {
  .rc-body { grid-template-columns: 22px minmax(0, 1fr); padding-right: .75rem; }
  .rc-side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: center; padding-left: .75rem; }
  .rc-kpis { width: auto; min-width: 200px; }
  .rc-head { flex-direction: column; } .rc-logos img { height: 26px; }
}

/* ===== Tablero de proceso (andon) ===== */
.pb-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.pb-live { color: var(--ok); font-weight: 700; display: inline-flex; align-items: center; gap: .3rem; }
.pb-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.pb-clock { font: 800 1em var(--head); font-variant-numeric: tabular-nums; color: var(--ink); }
.pb-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid var(--line); }
@media (max-width: 1100px) { .pb-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pb-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pb-kpi { background: #fff; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; padding: .9rem 1.1rem; display: flex; flex-direction: column; gap: .15rem; border-top: 4px solid var(--line-strong); }
.pb-kpi-l { font: 700 .68rem var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pb-kpi-v { font: 800 2.2rem/1.05 var(--head); font-variant-numeric: tabular-nums; }
.pb-kpi-v small { font-size: 1.1rem; color: var(--muted); font-weight: 600; }
.pb-kpi-s { font-size: .88rem; color: var(--ink-2); font-weight: 600; display: inline-flex; align-items: center; gap: .3rem; }
.pb-kpi.good { border-top-color: #00A04A; } .pb-kpi.good .pb-kpi-v { color: var(--ok); }
.pb-kpi.warn { border-top-color: #D9A300; } .pb-kpi.bad { border-top-color: var(--bad); }
.pb-today.good { background: var(--ok-soft); } .pb-today.warn { background: var(--warn-soft); } .pb-today.bad { background: var(--bad-soft); }
.pb-today.bad .pb-kpi-v, .pb-today.bad .pb-kpi-s { color: var(--bad); } .pb-today.warn .pb-kpi-s { color: var(--warn); } .pb-today.good .pb-kpi-s { color: var(--ok); }
.pb-bar { display: flex; height: 36px; overflow: hidden; background: #E7E6E6; }
.pb-bar .seg { display: flex; align-items: center; padding: 0 .6rem; color: #fff; font: 700 .8rem var(--head); white-space: nowrap; overflow: hidden; }
.pb-bar .seg + .seg { border-left: 2px solid #fff; }
.pb-bar .rep { background: #00A04A; } .pb-bar .wip { background: #FFC000; color: #1E2328; } .pb-bar .pen { background: #A7AFB7; }
.pb-flow-row { display: flex; align-items: stretch; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; }
.pb-arrow { align-self: center; color: var(--muted); display: inline-grid; }
.pb-st { flex: 1 0 128px; background: var(--band); border: 1px solid var(--line); padding: .6rem .75rem; display: flex; flex-direction: column; gap: .2rem; border-top: 4px solid #A7AFB7; }
.pb-st.wip { background: #fff; border-top-color: #D9A300; }
.pb-en_reparacion { border-top-color: var(--csa) !important; }
.pb-liberada, .pb-entregada { border-top-color: #00A04A !important; }
.pb-st-name { font: 700 .7rem var(--head); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
.pb-st-n { font: 800 1.8rem/1 var(--head); font-variant-numeric: tabular-nums; }
.pb-st-old { font-size: .8rem; color: var(--muted); } .pb-st-old.warn { color: var(--warn); font-weight: 700; } .pb-st-old.bad { color: var(--bad); font-weight: 700; }
.pb-st-pct { font-size: .8rem; color: var(--muted); }
.pb-aging { display: flex; height: 14px; overflow: hidden; background: var(--line-2); }
.ag { display: inline-flex; align-items: center; justify-content: center; font: 700 .64rem var(--head); color: #fff; min-width: 14px; }
.ag-lt2 { background: #00A04A; } .ag-h2_4 { background: #44546A; } .ag-h4_8 { background: #D9A300; color: #1E2328; } .ag-gt8 { background: #B42318; }
.pb-aging-legend { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.pb-aging-legend .ag { padding: 0 .4rem; height: 18px; }
.pb-rework { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; }
.pb-rework .pb-st { flex: 0 0 150px; border-top-color: var(--bad); }
.pb-loop { color: var(--bad); display: inline-grid; }
.pb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.25rem; }
@media (max-width: 900px) { .pb-grid { grid-template-columns: 1fr; } }
.pb-hours tr.cur td { background: var(--csa-soft); font-weight: 700; } .pb-hours tr.future td { color: #9AA3AB; }
.pill { display: inline-flex; align-items: center; gap: .25rem; padding: .12rem .5rem; border-radius: var(--r); font: 700 .7rem var(--head); text-transform: uppercase; letter-spacing: .03em; }
.pill .ic { width: 12px; height: 12px; stroke-width: 2.4; }
.pill.good { background: var(--ok-soft); color: var(--ok); } .pill.warn { background: var(--warn-soft); color: var(--warn); } .pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.neutral { background: var(--line-2); color: var(--muted); }
.pb-techs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; }
.pb-tech { border: 1px solid var(--line); padding: .6rem .7rem; display: flex; flex-direction: column; gap: .3rem; background: #fff; }
.pb-tech-u { display: flex; gap: .5rem; align-items: center; padding: .25rem .4rem; background: var(--ok-soft); font-size: .88rem; }
.pb-tech-u .cat-pill { width: 22px; height: 22px; font-size: .72rem; }
.pb-tech-u.warn { background: var(--warn-soft); } .pb-tech-u.bad { background: var(--bad-soft); color: var(--bad); font-weight: 700; } .pb-tech-u.idle { background: var(--line-2); color: var(--muted); }

/* Modo TV: misma línea clara, sin cabecera ni pie, tipografía grande para lectura a distancia */
body.tv .topbar, body.tv .appfoot { display: none; }
body.tv { border-top: 6px solid var(--csa); }
body.tv .page { max-width: none; padding: 1.5rem 2.2rem; gap: 1.5rem; }
body.tv .pb-head h1 { font-size: 2.6rem; }
body.tv .pb-head p { font-size: 1.4rem; }
body.tv .pb-kpi { padding: 1.2rem 1.4rem; }
body.tv .pb-kpi-l { font-size: 1rem; }
body.tv .pb-kpi-v { font-size: clamp(2.4rem, 3.6vw, 4.2rem); white-space: nowrap; } body.tv .pb-kpi-v small { font-size: 2rem; }
body.tv .pb-kpi-s { font-size: 1.25rem; }
body.tv .pb-bar { height: 52px; } body.tv .pb-bar .seg { font-size: 1.15rem; }
body.tv .card > h2:first-child, body.tv h2 { font-size: 1.5rem; }
body.tv .pb-st { flex: 1 0 140px; padding: .9rem 1rem; }
body.tv .pb-st-name { font-size: .95rem; } body.tv .pb-st-n { font-size: clamp(2rem, 2.8vw, 3.2rem); }
body.tv .pb-st-old, body.tv .pb-st-pct { font-size: 1.1rem; }
body.tv .pb-aging { height: 22px; } body.tv .ag { font-size: .9rem; }
body.tv .table { font-size: 1.35rem; } body.tv .table th { font-size: .95rem; padding: .7rem .8rem; } body.tv .table td { padding: .6rem .8rem; }
body.tv .pill { font-size: 1rem; }
body.tv .pb-tech { padding: .8rem 1rem; font-size: 1.15rem; } body.tv .pb-tech-u { font-size: 1.15rem; }
body.tv .small { font-size: 1.05rem; }

/* ===== Impresión: solo el reporte ===== */
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  body { background: #fff; }
  .topbar, .appfoot, .no-print, #toasts { display: none !important; }
  .page.dashboard > :not(.rc) { display: none !important; }
  .page { padding: 0; max-width: none; }
  .rc-page { border: 0; }
  .rc-svg { min-width: 0; }
  .rc-body { grid-template-columns: 26px minmax(0, 1fr) 230px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
body.tv .pb-rework .pb-st { flex: 0 0 220px; }

/* Asignación: subcategorías técnicas */
.sub-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: .25rem; }
.sub-col { display: flex; flex-direction: column; gap: .4rem; }
.sub-btn { min-height: 52px; border: 1px solid var(--line-strong); background: #fff; font: 800 1.15rem var(--head); color: var(--ink); cursor: pointer; border-radius: var(--r); }
.sub-btn:hover { border-color: var(--ink); }
.sub-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.sub-btn:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
/* Cierre de jornada */
.close-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
@media (max-width: 860px) { .close-areas { grid-template-columns: 1fr; } }
.close-area { border: 1px solid var(--line); border-top: 4px solid var(--line-strong); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.close-area.ok { border-top-color: #00A04A; background: var(--ok-soft); }
.close-area-head { display: flex; align-items: center; gap: .5rem; font-family: var(--head); }
.close-ok { color: var(--ok); font-weight: 700; display: inline-flex; align-items: center; gap: .35rem; }
.mail .mail-body { border-left: 3px solid var(--line-strong); padding: .4rem 0 .4rem 1rem; margin: 1rem 0; color: var(--ink-2); }
.mail .mail-body ul { margin: .4rem 0; padding-left: 1.2rem; }

/* ---- Ver como (solo lectura) ---- */
.viewas-bar { background: var(--navy, #44546A); color: #fff; position: sticky; top: 0; z-index: 60; }
.viewas-inner { max-width: 1400px; margin: 0 auto; padding: .55rem 1rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; font-size: .95rem; }
.viewas-inner > span { flex: 1 1 auto; }
.viewas-inner .btn { background: #fff; color: var(--ink); border-color: #fff; }
body.view-as .topbar { border-top-color: var(--navy, #44546A); }
.viewas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.viewas-card { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; background: var(--surface); border: 1px solid var(--line); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.viewas-card:hover, .viewas-card:focus-visible { border-color: var(--csa); outline: none; }
.viewas-card .va-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.viewas-card .va-txt small { color: var(--ink-2); }
.viewas-groups { display: flex; flex-direction: column; gap: 1rem; }
.pin-input { max-width: 9rem; font-size: 1.25rem; letter-spacing: .2em; }
.stack-sm { display: flex; flex-direction: column; gap: .5rem; }
