/* Ciclo HAMMY: oficina (tablero, detalle, reporte) y técnico (trabajos, evidencias, cierre). */

/* ── comunes ── */
.prio { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.prio-alta { background: var(--error-50); color: var(--error); }
.prio-media { background: var(--aviso-50); color: var(--aviso); }
.prio-baja { background: var(--acero-100); color: var(--acero-600); }
.overdue { color: var(--error) !important; font-weight: 700; }
.alert-dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--error); color: #fff; font-size: 0.7188rem; font-weight: 700; vertical-align: middle; }
ul.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.quote { margin-top: 8px; padding: 10px 12px; border-left: 3px solid var(--oro); background: var(--acero-50); border-radius: 0 10px 10px 0; white-space: pre-wrap; font-size: 0.875rem; }
.eval-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.eval-grid > div { display: grid; gap: 2px; padding: 10px 12px; background: var(--acero-50); border-radius: 12px; }
.stars { display: inline-flex; gap: 4px; }
.stars button, .stars span { border: 0; background: none; padding: 2px; color: var(--acero-200); cursor: pointer; line-height: 0; border-radius: 8px; }
.stars span { cursor: default; }
.stars .on { color: var(--oro); }
.stars .on svg { fill: var(--oro); }
.stars button:focus-visible { outline: 3px solid var(--oro-100); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.chip-x { border: 0; background: none; padding: 0 0 0 4px; font-size: 1rem; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.chip-x:hover { opacity: 1; }

/* ── oficina ── */
.hammy-overview { border: 1px solid var(--acero-100); }
.hammy-overview h3, .alerts-card h3 { display: flex; align-items: center; gap: 8px; }
.hammy-overview h3 svg { color: var(--oro-texto); }
.ov-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 14px 18px 16px; }
.ov { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--acero-100); background: var(--acero-50); text-align: left; cursor: pointer; font: inherit; color: var(--acero-600); font-size: 0.8125rem; font-weight: 600; }
.ov .n { font-family: var(--titulo); font-weight: 800; font-size: 1.75rem; line-height: 1.05; color: var(--grafito); }
.ov:hover { box-shadow: var(--sombra-2); background: var(--papel); }
.ov.gold { background: var(--oro-50); border-color: var(--oro-100); }
.ov.gold .n { color: var(--oro-texto); }
.ov.red { background: var(--error-50); border-color: #F3C3BE; }
.ov.red .n { color: var(--error); }
@media (max-width: 760px) { .ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ov:first-child { grid-column: 1 / -1; } }
.page > .hammy-overview { margin-bottom: 16px; }

.picker { position: relative; }
.picker-list { margin-top: 6px; max-height: 260px; overflow: auto; border: 1px solid var(--acero-200); border-radius: 12px; background: var(--papel); }
.picker-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-top: 1px solid var(--acero-100); background: none; text-align: left; font: inherit; cursor: pointer; }
.picker-item:first-child { border-top: 0; }
.picker-item:hover, .picker-item:focus-visible { background: var(--oro-50); }
.picked { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1.5px solid var(--oro); background: var(--oro-50); border-radius: 12px; }
.chip-prio-alta[aria-pressed="true"] { background: var(--error); border-color: var(--error); }
.chip-prio-media[aria-pressed="true"] { background: var(--aviso); border-color: var(--aviso); }
.chip-prio-baja[aria-pressed="true"] { background: var(--acero-600); border-color: var(--acero-600); }

.alerts-card { border: 1px solid #F3C3BE; margin-bottom: 14px; }
.alerts-card h3 svg { color: var(--error); }
.sev { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--aviso); }
.sev-alta { background: var(--error); box-shadow: 0 0 0 4px var(--error-50); }
.sev-baja { background: var(--acero-400); }
.hammy-badge { width: 40px; height: 40px; border-radius: 12px; background: var(--grafito); color: var(--oro); display: grid; place-items: center; flex: none; }

.timeline { display: grid; gap: 0; }
.tl-item { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--acero-100); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--acero-300); flex: none; margin-top: 3px; box-shadow: 0 0 0 3px var(--papel); position: relative; }
.tl-iniciar, .tl-retomar { background: var(--oro); }
.tl-cerrado, .tl-enviado { background: var(--ok); }
.tl-fin_jornada { background: var(--aviso); }
.tl-cancelado, .tl-foto_descartada { background: var(--error); }
.tl-asignado, .tl-reasignado, .tl-visto { background: var(--info); }

.evid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.evid figure { margin: 0; display: grid; gap: 6px; }
.evid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--acero-100); display: block; }
.evid figcaption { font-size: 0.75rem; color: var(--acero-600); line-height: 1.35; }
.evid .discarded img { opacity: .4; filter: grayscale(1); }
.thumb-pick { position: relative; border: 2px solid var(--ok); border-radius: 12px; padding: 0; overflow: hidden; background: none; cursor: pointer; display: grid; }
.thumb-pick img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.thumb-pick span { font-size: 0.7188rem; font-weight: 600; padding: 4px; background: var(--papel); }
.thumb-pick.off { border-color: var(--acero-200); }
.thumb-pick.off img { opacity: .35; }
.sig-view { margin-top: 6px; border: 1px solid var(--acero-200); border-radius: 12px; background: #fff; padding: 6px; max-width: 360px; }
.sig-view img { display: block; width: 100%; }

.hammy-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.hammy-split.with-map { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1680px) { .hammy-split.with-map { grid-template-columns: minmax(0, 1fr) 380px; } .hammy-split .card.sticky { position: sticky; top: 16px; } }

/* ── técnico ── */
.tabbar.four { grid-template-columns: repeat(4, 1fr); }
.tabbar.five { grid-template-columns: repeat(5, 1fr); }
.tab-ic { position: relative; display: inline-grid; }
.tab-ic svg { width: 24px; height: 24px; }
.tab-badge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--error); color: #fff; font-size: 0.6875rem; font-weight: 700; display: grid; place-items: center; }
.net-dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--aviso-50); color: var(--aviso); flex: none; }

.netbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--info-50); color: var(--info); font-size: 0.875rem; }
.netbar.off { background: var(--grafito); color: #fff; }
.netbar.off svg { color: var(--oro); }
.spin-slow { animation: spin 1.4s linear infinite; }

.group-title { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--acero-500); display: flex; align-items: center; gap: 8px; }
.group-title .n { background: var(--acero-100); color: var(--acero-700); border-radius: 9px; padding: 1px 8px; font-size: 0.75rem; letter-spacing: 0; }
.job-card { padding: 14px 16px; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); border-left: 5px solid var(--acero-200); }
.job-card.jc-alta { border-left-color: var(--error); }
.job-card.jc-media { border-left-color: var(--aviso); }
.job-detail, .job-head, .work-step, .photo-group, .mat-form, .wizard-body > .card { grid-template-columns: minmax(0, 1fr); }
.job-head .row > .grow, .job-card .row > .grow { min-width: 0; }
.job-card.live { box-shadow: 0 0 0 2px var(--oro), var(--sombra-2); }
.job-card .desc { font-size: 0.875rem; color: var(--acero-700); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.closed-list summary { padding: 14px 16px; cursor: pointer; font-weight: 700; }

.back-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0; font: inherit; font-weight: 600; color: var(--acero-700); cursor: pointer; width: fit-content; }
.job-head { padding: 16px; }
.attention { border: 2px solid var(--oro); }
.work-step { border: 1px solid var(--acero-100); }
.work-step.done { border-color: #B7E1C4; }
.step-n { width: 28px; height: 28px; border-radius: 50%; background: var(--grafito); color: var(--oro); display: grid; place-items: center; font-weight: 800; font-size: 0.875rem; flex: none; }
.work-step.done .step-n, .done-card .step-n { background: var(--ok); color: #fff; }
.chips.big .chip { padding: 10px 14px; font-size: 0.9375rem; min-height: 44px; }
.chip-ok[aria-pressed="true"] { background: var(--ok); border-color: var(--ok); }
.chip-aviso[aria-pressed="true"] { background: var(--aviso); border-color: var(--aviso); }
.chip-error[aria-pressed="true"] { background: var(--error); border-color: var(--error); }

.photo-group { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--acero-100); }
.photo-group:first-of-type { border-top: 0; padding-top: 0; }
.req { font-size: 0.7188rem; font-weight: 600; color: var(--aviso); text-transform: uppercase; letter-spacing: .04em; }
.thumb { position: relative; border-radius: 12px; overflow: hidden; background: var(--acero-100); aspect-ratio: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(11,12,14,.7); color: #fff; font-size: 1.125rem; line-height: 1; cursor: pointer; }
.thumb-sync { position: absolute; left: 4px; bottom: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--oro); color: var(--grafito); display: grid; place-items: center; }
.photo-btn { display: inline-flex; }
.photo-btn.block { display: flex; }
.mat-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--acero-50); border-radius: 10px; }
.mat-form { display: grid; gap: 10px; padding-top: 6px; border-top: 1px dashed var(--acero-200); }
.mat-qty { display: grid; grid-template-columns: minmax(84px, 110px) minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.mat-qty > * { min-width: 0; }
.mat-qty .btn { min-height: 46px; }
@media (max-width: 520px) {
  .mat-qty { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
  .mat-qty .btn { grid-column: 1 / -1; }
}
.eval-other { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--oro-50); border: 1px solid var(--oro-100, #FCE7B0); }
.svc-notes { display: grid; gap: 10px; }
.svc-note { display: grid; gap: 6px; padding: 12px; border-radius: 14px; border: 1px solid var(--acero-100); border-left: 4px solid var(--oro); background: var(--papel); }
.svc-note-head { display: flex; align-items: center; gap: 8px; }
.svc-n { width: 24px; height: 24px; border-radius: 50%; background: var(--grafito); color: var(--oro); display: grid; place-items: center; font-weight: 800; font-size: 0.7813rem; flex: none; }
.svc-done { display: grid; gap: 8px; }
.svc-done li { display: grid; gap: 2px; padding: 8px 12px; border-left: 3px solid var(--oro); background: var(--acero-50); border-radius: 0 10px 10px 0; }
.svc-done li span { font-size: 0.875rem; color: var(--acero-700); white-space: pre-wrap; }
.job-actions { position: sticky; bottom: calc(76px + var(--safe-b)); z-index: 50; display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; padding: 10px; margin: 0 -6px; background: rgba(246,246,243,.94); border-radius: 16px; }
.job-actions .btn { min-height: 52px; font-size: 1rem; }
.done-card { border: 1px solid #B7E1C4; background: #F6FCF8; }

.wizard { position: fixed; inset: 0; z-index: 1500; background: var(--fondo); display: flex; flex-direction: column; animation: rise .18s ease-out; }
.wizard-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--papel); border-bottom: 1px solid var(--acero-100); }
.wizard-head h2 { font-size: 1.1875rem; }
.wizard-body { flex: 1; overflow: auto; padding: 16px; display: grid; gap: 14px; align-content: start; grid-template-columns: minmax(0, 1fr); max-width: 760px; width: 100%; margin: 0 auto; }
.wizard-foot { padding: 12px 16px calc(12px + var(--safe-b)); background: var(--papel); border-top: 1px solid var(--acero-100); }
.wizard-foot .btn { min-height: 54px; font-size: 1.0625rem; max-width: 728px; margin: 0 auto; }
.blockers li { position: relative; padding-left: 18px; font-size: 0.875rem; color: var(--aviso); }
.blockers li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sig { display: grid; gap: 6px; }
.sig-pad { width: 100%; height: 190px; border: 2px dashed var(--acero-300); border-radius: 14px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
.sig-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ── verificación del QR ── */
.verify { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; gap: 14px; padding: 24px 16px; background: var(--oro-50); }
.verify-card { width: min(460px, calc(100vw - 32px)); background: var(--papel); border-radius: 22px; box-shadow: var(--sombra-2); padding: 22px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.verify-brand { font-family: var(--titulo); font-weight: 800; letter-spacing: .16em; font-size: 1.125rem; }
.verify-seal { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; background: var(--ok-50); color: var(--ok); }
.verify-seal svg { flex: none; }
.verify-seal.warn { background: var(--aviso-50); color: var(--aviso); }
.verify-seal.bad { background: var(--acero-100); color: var(--acero-700); }
.verify-seal div { color: var(--grafito); }

/* ── fase 1: pantalla completa, cliente final, materiales, voz, paro, gafete ── */
.drawer.full { width: 100vw; }
.hd-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.hd-grid > .stack { min-width: 0; }
@media (min-width: 1000px) { .drawer.full .hd-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.drawer.full .drawer-body { padding-left: max(18px, calc((100vw - 1180px) / 2)); padding-right: max(18px, calc((100vw - 1180px) / 2)); }
.drawer.full .drawer-head, .drawer.full .drawer-foot { padding-left: max(18px, calc((100vw - 1180px) / 2)); padding-right: max(18px, calc((100vw - 1180px) / 2)); }
.store-num.cf { background: var(--info); color: #fff; }
.helper-chips { margin-top: 8px; max-height: 220px; overflow: auto; }
.combo { position: relative; display: grid; gap: 4px; }
.combo-list { border: 1px solid var(--acero-200); border-radius: 12px; background: var(--papel); box-shadow: var(--sombra-2); overflow: hidden; }
.combo-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-top: 1px solid var(--acero-100); background: none; text-align: left; font: inherit; cursor: pointer; min-height: 48px; }
.combo-item:first-child { border-top: 0; }
.combo-item:hover, .combo-item:focus-visible { background: var(--oro-50); }
.dictate { display: grid; gap: 6px; }
.mic { justify-self: start; display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--acero-200); background: var(--papel); color: var(--acero-700); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.8438rem; font-weight: 600; cursor: pointer; }
.mic.on { background: var(--error); border-color: var(--error); color: #fff; animation: pulse 1.2s infinite; }
.paro-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; border: 2px solid var(--error); background: var(--error-50); color: var(--error); border-radius: 14px; font: inherit; font-weight: 700; font-size: 0.9688rem; cursor: pointer; }
.paro-btn:hover { background: #FBD5D0; }
.alerts-card .legend { font-weight: 400; }
.alerts-card .legend summary { cursor: pointer; color: var(--acero-600); }
.alerts-card .legend ul { position: absolute; right: 18px; z-index: 5; margin-top: 6px; padding: 12px 14px; background: var(--papel); border: 1px solid var(--acero-100); border-radius: 12px; box-shadow: var(--sombra-2); max-width: 420px; }
.alerts-card .legend li { display: flex; gap: 8px; align-items: baseline; }
.alerts-card .card-head { position: relative; }
.t.urgent { color: var(--error); }
label.check { display: flex; align-items: center; gap: 8px; font-size: 0.9063rem; cursor: pointer; }
label.check input { width: 20px; height: 20px; accent-color: var(--oro-600); }

.badge-wrap { display: grid; place-items: center; padding: 6px 0; }
.badge-card { width: 300px; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: var(--sombra-2); border: 1px solid var(--acero-100); text-align: center; display: grid; gap: 6px; padding-bottom: 16px; }
.badge-top { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--grafito); color: #fff; text-align: left; }
.badge-brand { font-family: var(--titulo); font-weight: 800; letter-spacing: .2em; font-size: 1.0625rem; }
.badge-sub { font-size: 0.6563rem; letter-spacing: .14em; text-transform: uppercase; color: var(--oro); }
.badge-photo { width: 120px; height: 120px; margin: 14px auto 4px; border-radius: 50%; overflow: hidden; border: 4px solid var(--oro); background: var(--acero-100); display: grid; place-items: center; color: var(--acero-400); }
.badge-photo img { width: 100%; height: 100%; object-fit: cover; }
.badge-name { font-family: var(--titulo); font-weight: 800; font-size: 1.1875rem; padding: 0 14px; line-height: 1.2; }
.badge-role { color: var(--oro-texto); font-weight: 700; font-size: 0.8438rem; text-transform: uppercase; letter-spacing: .06em; }
.badge-data { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 6px 18px 0; text-align: left; font-size: 0.7813rem; }
.badge-data dt { color: var(--acero-500); }
.badge-data dd { margin: 0; font-weight: 600; }
.badge-qr { display: flex; align-items: center; gap: 12px; margin: 8px 18px 0; padding-top: 10px; border-top: 1px dashed var(--acero-200); text-align: left; }
.badge-qr .qr { width: 86px; height: 86px; flex: none; }
.badge-qr .qr svg { width: 100%; height: 100%; }
.verify-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--oro); flex: none; }
@media print {
  body.print-badge * { visibility: hidden !important; }
  body.print-badge .badge-card, body.print-badge .badge-card * { visibility: visible !important; }
  body.print-badge .badge-card { position: fixed; left: 12mm; top: 12mm; box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Rediseño 2026: tablero HAMMY y lista en celular ── */
.ov { background: var(--papel); border: 1px solid var(--linea); position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.ov::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--acero-200); }
.ov:hover { transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(16, 18, 22, .35); }
.ov:first-child::before { background: var(--grafito); }
.ov.gold { background: #FFF8E3; border-color: #F8DC8F; }
.ov.gold::before { background: var(--oro); }
.ov.red { background: #FFF5F4; }
.ov.red::before { background: var(--error); }
.hammy-overview .card-head h3 svg { color: var(--oro-texto); }
.alerts-card { border-color: #F3C3BE; box-shadow: 0 10px 24px -16px rgba(185, 28, 28, .35); }
.job-card { border: 1px solid var(--linea); border-left-width: 5px; }
@media (max-width: 640px) {
  /* Lista de HAMMYs como tarjetas: tienda arriba, estado a la derecha; folio, técnico, prioridad y fecha abajo. */
  .hammy-split table.tbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tienda estado" "folio prio" "tech fecha"; gap: 6px 10px; }
  .hammy-split table.tbl td:nth-child(1) { grid-area: folio; }
  .hammy-split table.tbl td:nth-child(2) { grid-area: tienda; }
  .hammy-split table.tbl td:nth-child(3) { grid-area: tech; }
  .hammy-split table.tbl td:nth-child(4) { grid-area: prio; justify-self: end; }
  .hammy-split table.tbl td:nth-child(5) { grid-area: estado; justify-self: end; align-self: start; }
  .hammy-split table.tbl td:nth-child(6) { grid-area: fecha; justify-self: end; }
  .hammy-split table.tbl td:nth-child(6):empty, .hammy-split table.tbl td:nth-child(6):not(.overdue) { color: var(--acero-500); }
  .hammy-split table.tbl td .ellipsis { max-width: none !important; }
  .ov-grid { padding: 10px 12px 12px; gap: 8px; }
  .ov { display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 14px; border-radius: 12px; }
  .ov .n { font-size: 1.375rem; min-width: 1.4em; }
}

/* Inicio del técnico: resumen del día y herramientas rápidas */
.t-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 18px 18px 16px; color: #fff;
  background: var(--grad-grafito);
  box-shadow: 0 18px 36px -22px rgba(11, 12, 14, .7); }
.t-hero::after { content: ''; position: absolute; right: -30px; bottom: -56px; width: 190px; height: 190px; background: url('/brand/isotipo.svg') center / contain no-repeat; opacity: .07; transform: rotate(-12deg); pointer-events: none; }
.t-hero h2 { color: #fff; font-size: 1.625rem; margin-top: 4px; }
.t-hero .hero-date { font-size: 0.7188rem; }
.t-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; position: relative; z-index: 1; }
.t-stat { border-radius: 14px; padding: 10px 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 1px; }
.t-stat b { font-family: var(--titulo); font-size: 1.5rem; line-height: 1.1; color: #fff; }
.t-stat span { font-size: 0.75rem; color: #B4BAC4; font-weight: 600; line-height: 1.25; }
.t-stat.live { background: var(--grad-oro); border-color: transparent; }
.t-stat.live b, .t-stat.live span { color: #1A1407; }
.t-stat.warn { border-color: rgba(253, 178, 7, .55); }
.t-stat.warn b { color: var(--oro); }
.qtools { display: grid; gap: 8px; }
.qtools-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(62px, 1fr); gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.qtools-row::-webkit-scrollbar { display: none; }
.qtool { display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; min-width: 0; border-radius: 16px; background: var(--papel); border: 1px solid var(--linea); font: inherit; color: var(--grafito); cursor: pointer; box-shadow: var(--sombra-card); transition: transform .12s; }
.qtool:active { transform: scale(.96); }
.qtool-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--oro-50); color: var(--oro-texto); border: 1px solid var(--oro-100); }
.qtool-ic svg { width: 22px; height: 22px; }
.qtool-lbl { font-size: 0.7813rem; font-weight: 600; white-space: nowrap; }

/* Notas del HAMMY con historial (oficina) y corrección de notas del técnico */
.hn-list > li + li { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--acero-100); }
.hn-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.hn-strike { text-decoration: line-through; color: var(--acero-500); }
.hn-tag { color: var(--oro-700); font-weight: 600; }
.hn-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2px; }
.hn-remove { color: var(--error); }
.hn-hist { margin: 8px 0 0; padding: 8px 10px 8px 26px; background: var(--acero-50); border-radius: 10px; }
.hn-hist li + li { margin-top: 6px; }
.hn-before { color: var(--acero-600); white-space: pre-wrap; overflow-wrap: anywhere; }
.hn-removed { margin-top: 12px; }
.hn-removed summary { cursor: pointer; color: var(--acero-600); }
.tl-change { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 2px; }
.tech-notes > li + li { margin-top: 10px; }
.tech-notes .note-fix { margin-left: 8px; }
.audit-detail { margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--acero-700); }

/* Paro por urgencia: arriba de todas las alertas y en rojo */
.list-item.alert-urgent { background: var(--error-50); border-left: 4px solid var(--error); }
.list-item.alert-urgent .t.urgent { color: var(--error); font-weight: 700; }
.sin-folio-tag { color: var(--error); font-weight: 700; }
.check-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 12px; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--error); flex: none; }
.check-row.sin-folio:has(input:checked) { background: var(--error-50); border-color: var(--error); }
.check-row small { display: block; color: var(--acero-600); font-weight: 400; }

/* Fotos del reporte (las que mandó la tienda) */
.rp-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-thumb { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--linea); background: var(--acero-50); }
.rp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-x { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(17, 20, 24, .72); color: #fff; cursor: pointer; }
.rp-add { width: 76px; height: 76px; border-radius: 10px; border: 1.5px dashed var(--acero-300); display: grid; place-items: center; align-content: center; gap: 2px; color: var(--acero-600); font-size: 0.75rem; font-weight: 600; cursor: pointer; position: relative; }
.rp-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rp-add.busy { opacity: .6; pointer-events: none; }

/* Entrega a la tienda: PDF por correo y encuesta */
.deliver-card h3 { margin: 0; }
.survey-box { border-top: 1px solid var(--acero-100); padding-top: 10px; display: grid; gap: 6px; }
.survey-box .quote { margin: 0; }

/* Encuesta pública de calidad (/s/<token>) */
.ps-card { gap: 16px; }
.ps-intro p { margin: 0 0 4px; font-size: 1rem; }
.ps-q { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.ps-q legend { font-weight: 700; font-size: 0.9688rem; line-height: 1.35; margin-bottom: 8px; display: flex; gap: 8px; align-items: flex-start; }
.ps-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--oro-50); color: var(--oro-texto); font-size: 0.8125rem; border: 1px solid var(--oro-100); }
.ps-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ps-opt { display: grid; justify-items: center; gap: 2px; padding: 10px 2px 8px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--papel); font: inherit; color: var(--grafito); cursor: pointer; min-height: 60px; }
.ps-opt b { font-size: 1.125rem; line-height: 1; }
.ps-opt span { font-size: 0.6875rem; line-height: 1.15; text-align: center; color: var(--acero-600); }
.ps-opt[aria-checked="true"] { border-color: var(--oro); background: var(--oro-50); box-shadow: 0 0 0 2px var(--oro) inset; }
.ps-opt[aria-checked="true"] span { color: var(--grafito); font-weight: 600; }
.ps-yesno { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-width: 320px; }
.ps-yn { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--linea); background: var(--papel); font: inherit; font-weight: 700; font-size: 1rem; color: var(--grafito); cursor: pointer; }
.ps-yn[aria-checked="true"] { border-color: var(--oro); background: var(--oro-50); box-shadow: 0 0 0 2px var(--oro) inset; }
.ps-nps { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.ps-nps-btn { min-height: 42px; border-radius: 10px; border: 1.5px solid var(--linea); background: var(--papel); font-family: inherit; font-weight: 700; font-size: 0.9375rem; line-height: 1; color: var(--grafito); cursor: pointer; padding: 0; }
.ps-nps-btn[aria-checked="true"] { background: var(--grafito); border-color: var(--grafito); color: #fff; }
@media (max-width: 420px) { .ps-nps { grid-template-columns: repeat(6, 1fr); } .ps-opt span { font-size: 0.625rem; } }
.push-nudge { display: grid; gap: 12px; border: 1px solid var(--oro-100); }
.ios-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; line-height: 1.45; }
.ios-steps li::marker { font-weight: 700; }
.ios-share { vertical-align: -2px; color: #0a84ff; }

/* «Ahora» (pantalla principal del técnico) y «Siguiente» al terminar: lo que toca, con un solo botón grande */
.ahora { position: relative; overflow: hidden; display: grid; gap: 8px; border-radius: 22px; padding: 16px 16px 14px; color: #fff; background: var(--grad-grafito);
  box-shadow: 0 18px 36px -22px rgba(11, 12, 14, .7); min-width: 0; }
.ahora.live { box-shadow: 0 0 0 2px var(--oro) inset, 0 18px 36px -22px rgba(11, 12, 14, .7); }
.ahora-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ahora-tag { display: inline-flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 0.75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--oro); }
.ahora-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--oro); flex: none; animation: pulse 1.6s ease-in-out infinite; }
.ahora-dist { font-size: 0.7813rem; color: #B4BAC4; font-weight: 600; white-space: nowrap; }
.ahora-title { font: 800 1.3125rem/1.2 var(--titulo); letter-spacing: -.01em; color: #fff; overflow-wrap: anywhere; }
.ahora-sub { font-size: 0.8438rem; color: #C9CED6; line-height: 1.35; min-width: 0; }
.ahora .btn-lg { min-height: 56px; font-size: 1.0625rem; margin-top: 4px; }
/* El botón principal va en dorado sobre la tarjeta oscura (como en el encabezado de la oficina). */
.ahora .btn-primary { background: var(--vc-oro, var(--oro)); border-color: var(--vc-oro, var(--oro)); color: #14130F; }
.ahora .btn-primary:hover:not(:disabled) { background: #F0A800; border-color: #F0A800; }
.ahora .btn-primary svg { color: currentColor; }
.ahora-acts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 4px; }
.ahora-acts > .btn:only-child { grid-column: 1 / -1; }
.ahora-acts .btn-glass { min-height: 56px; padding: 0 18px; }
.next-card.done { display: flex; align-items: center; gap: 12px; }
@media (prefers-reduced-motion: reduce) { .ahora-dot { animation: none; } }

/* Cierre que espera la contraseña: rojo, en la pantalla principal y en el trabajo */
.repass { border: 2px solid var(--error); background: var(--error-50); }
.repass h3 { color: var(--error); font-size: 1rem; }
.repass .nowrap { white-space: nowrap; }
.repass-ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--error); color: #fff; flex: none; }

/* «Activa los avisos» compacto en la app de campo: una línea con su botón (no empuja todo hacia abajo) */
.tech .push-nudge { padding: 10px 12px; gap: 8px; box-shadow: none; }
.tech .push-nudge > .row { gap: 10px !important; align-items: center !important; }
.tech .push-nudge strong { font-size: 0.875rem; }
.tech .push-nudge p { font-size: 0.75rem !important; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tech .push-nudge[data-state="apagado"] { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.tech .push-nudge[data-state="apagado"] p { display: none; }
.tech .push-nudge[data-state="apagado"] .btn { width: auto; min-height: 44px; padding: 0 14px; }
.tech .push-nudge .push-ic { flex: none; width: 32px; height: 32px; border-radius: 10px; }
.tech .push-nudge .push-ic svg { width: 18px; height: 18px; }

/* Dictado sin señal: el micrófono se ve apagado */
.mic.off { opacity: .6; cursor: not-allowed; border-style: dashed; }

/* «Usé lo planeado» en material y HAMMY de la tienda en «Tiendas» */
.plan-use { display: grid; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--oro-50); border: 1px solid var(--oro-100); }
.sheet-job { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--oro-50); border: 1px solid var(--oro-100); min-width: 0; }
.sheet-job .grow { min-width: 0; }
.sheet-out { display: grid; gap: 8px; padding: 12px; border-radius: 14px; border: 1.5px dashed var(--acero-300); }
.eval-foot { align-items: center; }

/* Botones con forma de enlace en la app de campo: área de toque de al menos 44 px (más fácil con guantes o con prisa) */
.tech .link-btn { min-height: 44px; display: inline-flex; align-items: center; padding: 8px 4px; }
/* Dentro de un texto el enlace no cambia la línea, pero su área de toque sigue siendo alta. */
.tech .alert .link-btn, .tech p .link-btn, .tech .small .link-btn { min-height: 0; display: inline; padding: 12px 2px; margin: -12px 0; }
.tech .back-link { min-height: 44px; }
.tech .thumb-x { width: 34px; height: 34px; font-size: 1.25rem; }

/* R50 · videos del HAMMY (técnico, oficina) */
.vids { display: grid; gap: 10px; min-width: 0; }
.vids.compact { gap: 8px; }
.vid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.vid { position: relative; margin: 0; display: grid; gap: 6px; min-width: 0; background: var(--acero-50); border: 1px solid var(--acero-100); border-radius: 12px; padding: 8px; }
.vid video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #0B0C0E; border-radius: 8px; display: block; }
.vid figcaption { display: grid; gap: 2px; font-size: 0.875rem; min-width: 0; overflow-wrap: anywhere; }
.vid figcaption .err { color: var(--error); }
.vid-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2px; }
.link-btn.danger { color: var(--error); }
.vid-wait { aspect-ratio: 16 / 9; display: grid; place-items: center; align-content: center; gap: 6px; background: var(--acero-100); border-radius: 8px; color: var(--acero-600); font-size: 0.875rem; }
.vid .thumb-sync { position: absolute; top: 14px; right: 14px; }
.vid-add { display: grid; gap: 8px; }
.vid-add .field { max-width: 260px; }
.vid-rec-cam { position: relative; background: #0B0C0E; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; display: grid; place-items: center; color: #fff; }
.vid-rec-cam video { width: 100%; height: 100%; object-fit: contain; display: block; }
.vid-rec-cam .cam-msg { display: grid; justify-items: center; gap: 6px; }
.vid-rec-dot { position: absolute; top: 10px; left: 10px; background: rgba(198, 40, 40, .92); color: #fff; font-weight: 700; font-size: 0.875rem; padding: 4px 10px; border-radius: 999px; }

/* R51 · tabla de HAMMYs: encabezados que ordenan (ascendente / descendente) */
.th-sort { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; }
.th-sort:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; border-radius: 4px; }
.th-sort .th-arrow { opacity: .4; font-size: .75em; }
.th-sort.on .th-arrow { opacity: 1; color: var(--grafito); }
.th-sort:hover .th-arrow { opacity: .8; }
