/* VALCAB Field · sistema visual «luz de obra»: fondo claro cálido, grafito para el texto y oro de la marca. */
@font-face { font-family: 'Archivo'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/archivo-700.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 800; font-display: swap; src: url('/vendor/fonts/archivo-800.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url('/vendor/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url('/vendor/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url('/vendor/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-display: swap; src: url('/vendor/fonts/inter-700.woff2') format('woff2'); }

:root {
  --oro: #FDB207;
  --oro-600: #E5A000;
  --oro-700: #C98E00;
  --oro-texto: #8A5A00;
  --oro-50: #FFF8E3;
  --oro-100: #FFEFC2;
  --grafito: #0B0C0E;
  --grafito-800: #17191D;
  --grafito-700: #24272D;
  --acero-700: #3D434D;
  --acero-600: #565D68;
  --acero-500: #6B7280;
  --acero-400: #8A919C;
  --acero-300: #B4BAC4;
  --acero-200: #D5D9E0;
  --acero-100: #E9ECF0;
  --acero-50: #F3F4F6;
  --fondo: #F6F6F3;
  --papel: #FFFFFF;
  --ok: #15803D; --ok-50: #E3F5E9;
  --error: #B91C1C; --error-50: #FDE8E6;
  --aviso: #B45309; --aviso-50: #FFF1D6;
  --info: #1D4ED8; --info-50: #E3ECFF;
  --radio: 14px;
  --radio-lg: 20px;
  --sombra-1: 0 1px 2px rgba(11, 12, 14, .06), 0 1px 3px rgba(11, 12, 14, .05);
  --sombra-2: 0 8px 24px rgba(11, 12, 14, .08), 0 2px 6px rgba(11, 12, 14, .05);
  --sombra-3: 0 24px 64px rgba(11, 12, 14, .18);
  --titulo: 'Archivo', 'Inter', system-ui, sans-serif;
  --texto: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ───────── «Mi app»: tamaño de letra, alto contraste y menos animaciones (mi-app.js pone los atributos en <html>) ─────────
   Los textos van en rem: al crecer la letra raíz crece todo lo que se lee (también la app de campo). Se usan porcentajes para
   respetar además el tamaño de letra que la persona tenga en su navegador. */
html { font-size: 100%; }
html[data-texto="grande"] { font-size: 112.5%; }
html[data-texto="muy-grande"] { font-size: 125%; }
html[data-contraste="alto"] {
  --vc-texto-2: #2E2B26; --vc-texto-3: #3A3731; --vc-gris: #3A3731;
  --acero-400: #5F5A51; --acero-500: #3A3731; --acero-600: #2E2B26; --acero-700: #201E1A;
  --acero-200: #8C867A; --acero-300: #6F695E; --vc-linea: #8C867A; --linea: #8C867A; --vc-linea-suave: #B9B2A5;
  --vc-oro-texto: #5E3D00; --oro-texto: #5E3D00;
  --fondo: #FFFFFF; --vc-arena: #F7F5F0;
}
html[data-contraste="alto"] body { color: #000; }
html[data-contraste="alto"] :is(.card, .att-card, .pend-card, .hoy-card, .fav-btn, .mt-tile, .sp-bar, .list-item, .input, .chip, .btn-outline) { border-color: #6F695E; }
html[data-contraste="alto"] :is(.card, .att-card, .pend-card, .hoy-card, .fav-btn, .mt-tile, .sp-bar) { border-width: 2px; }
html[data-contraste="alto"] .btn-outline { border-width: 2px; }
html[data-contraste="alto"] :is(.link-btn, p a, li a, td a, .alert a, .small a) { text-decoration: underline; text-decoration-thickness: 2px; }
html[data-contraste="alto"] :focus-visible { outline-width: 4px; outline-offset: 3px; }
html[data-contraste="alto"] :is(.pill, .badge, .tab-badge) { box-shadow: inset 0 0 0 1.5px currentColor; }
html[data-contraste="alto"] .input::placeholder { color: #5F5A51; }
html[data-mov="menos"] *, html[data-mov="menos"] *::before, html[data-mov="menos"] *::after {
  animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--texto); font-size: 1rem; line-height: 1.5; color: var(--grafito);
  background: var(--fondo); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; }
svg { flex: none; }
body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--oro-texto); }
h1, h2, h3, h4 { font-family: var(--titulo); margin: 0; letter-spacing: -.01em; line-height: 1.15; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.375rem; font-weight: 800; }
h3 { font-size: 1.0625rem; font-weight: 700; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Una tabla no respeta width:1px (crece con su texto) y con letra grande desbordaba el celular: como bloque sí se recorta. */
table.sr-only { display: block; top: 0; left: 0; }
:focus-visible { outline: 3px solid rgba(var(--vc-oro-rgb, 253, 178, 7), .55); outline-offset: 2px; }

.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--grafito); }
.boot img { animation: pulse 1.4s ease-in-out infinite; }
.boot-word { font-family: var(--titulo); font-weight: 800; color: #fff; letter-spacing: .32em; font-size: 1.375rem; padding-left: .32em; }
@keyframes pulse { 50% { transform: scale(1.06); opacity: .85; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ───────── Botones ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: 0.9375rem; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
  user-select: none;
}
/* Con letra grande un botón con texto largo no debe salirse de la pantalla: en el celular el texto baja de renglón. */
.btn { max-width: 100%; }
@media (max-width: 640px) { .btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 6px; } }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--oro); color: var(--grafito); box-shadow: 0 1px 0 var(--oro-700); }
.btn-primary:hover:not(:disabled) { background: var(--oro-600); }
.btn-dark { background: var(--grafito); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--grafito-700); }
.btn-outline { background: var(--papel); border-color: var(--acero-200); color: var(--grafito); }
.btn-outline:hover:not(:disabled) { border-color: var(--acero-400); background: var(--acero-50); }
.btn-ghost { background: transparent; color: var(--acero-700); }
.btn-ghost:hover:not(:disabled) { background: var(--acero-100); }
.btn-danger { background: var(--papel); border-color: #F3C3BE; color: var(--error); }
.btn-danger:hover:not(:disabled) { background: var(--error-50); }
.btn-solid-danger { background: var(--error); color: #fff; }
.btn-whats { background: #1FAF53; color: #fff; }
.btn-whats:hover { background: #179345; }
.btn-lg { min-height: 52px; font-size: 1rem; padding: 0 24px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.875rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; border-radius: 12px; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--oro-texto); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--grafito); }

/* ───────── Formularios ───────── */
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-weight: 600; font-size: 0.875rem; color: var(--acero-700); }
.field .hint { font-size: 0.875rem; color: var(--acero-500); }
.field .err { font-size: 0.8125rem; color: var(--error); font-weight: 500; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg.lead { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--acero-400); pointer-events: none; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--acero-200); border-radius: 12px;
  background: var(--papel); font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 88px; resize: vertical; }
.input-wrap.has-lead .input { padding-left: 44px; }
.input-wrap.has-trail .input { padding-right: 52px; }
.input:hover { border-color: var(--acero-300); }
.input:focus { outline: none; border-color: var(--oro-600); box-shadow: none; }
.input[aria-invalid="true"] { border-color: var(--error); }
.trail-btn {
  position: absolute; right: 6px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent;
  border-radius: 10px; color: var(--acero-500); cursor: pointer;
}
.trail-btn:hover { background: var(--acero-100); color: var(--grafito); }
.trail-btn svg { width: 20px; height: 20px; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.875rem; color: var(--acero-700); }
.check input { width: 20px; height: 20px; accent-color: var(--oro-600); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { font-family: var(--titulo); font-weight: 700; font-size: 0.8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--acero-500); grid-column: 1 / -1; padding-top: 6px; border-top: 1px solid var(--acero-100); margin-top: 4px; }
.form-section:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ───────── Avisos ───────── */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 0.875rem; animation: rise .2s ease-out; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert-error { background: var(--error-50); color: #7F1D1D; }
.alert-ok { background: var(--ok-50); color: #14532D; }
.alert-aviso { background: var(--aviso-50); color: #7C2D12; }
.alert-info { background: var(--info-50); color: #1E3A8A; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.no-dot::before { display: none; }
.pill-ok { background: var(--ok-50); color: var(--ok); }
.pill-error { background: var(--error-50); color: var(--error); }
.pill-aviso { background: var(--aviso-50); color: var(--aviso); }
.pill-info { background: var(--info-50); color: var(--info); }
.pill-gris { background: var(--acero-100); color: var(--acero-600); }
.pill-oro { background: var(--oro-100); color: var(--oro-texto); }
.role { font-family: var(--titulo); font-weight: 700; font-size: 0.7188rem; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 8px; }
.role-admin { background: var(--grafito); color: var(--oro); }
.role-direccion { background: var(--grafito); color: #fff; }
.role-secretaria { background: var(--info-50); color: var(--info); }
.role-tecnico { background: var(--oro-100); color: var(--oro-texto); }

/* ───────── Toasts ───────── */
.toasts { position: fixed; z-index: 3000; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 440px); pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; background: var(--grafito); color: #fff; padding: 12px 16px; border-radius: 14px; box-shadow: var(--sombra-3); animation: rise .2s ease-out; font-weight: 500; }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast-ok svg { color: #4ADE80; }
.toast-error { background: #7F1D1D; }

/* ───────── Modales ───────── */
.overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(11, 12, 14, .5); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--papel); border-radius: var(--radio-lg); box-shadow: var(--sombra-3); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: rise .2s ease-out; }
.modal.wide { width: min(880px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 12px; }
.modal-head h2 { flex: 1; font-size: 1.25rem; }
.modal-body { padding: 4px 20px 20px; overflow: auto; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--acero-100); flex-wrap: wrap; }
@media (max-width: 640px) {
  .overlay { place-items: end center; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 94vh; border-radius: 22px 22px 0 0; padding-bottom: var(--safe-b); }
  .modal-foot .btn { flex: 1; }
}

.drawer-overlay { position: fixed; inset: 0; z-index: 1800; background: rgba(11, 12, 14, .4); animation: fade .15s; }
.drawer { position: fixed; z-index: 1900; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--fondo); box-shadow: var(--sombra-3); display: flex; flex-direction: column; animation: slidein .2s ease-out; }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--papel); border-bottom: 1px solid var(--acero-100); }
.drawer-head h2 { flex: 1; font-size: 1.1875rem; min-width: 0; }
.drawer-body { flex: 1; overflow: auto; padding: 18px; display: grid; gap: 16px; align-content: start; }
.drawer-foot { display: flex; gap: 10px; padding: 12px 18px calc(12px + var(--safe-b)); background: var(--papel); border-top: 1px solid var(--acero-100); flex-wrap: wrap; }

/* ───────── Tarjetas y piezas ───────── */
.card { background: var(--papel); border-radius: var(--radio-lg); box-shadow: var(--sombra-1); border: 1px solid var(--acero-100); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-head h3 { flex: 1; }
.muted { color: var(--acero-500); }
.small { font-size: 0.8438rem; }
.mono { font-family: var(--mono); }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 12px; }
.stack-lg { display: grid; gap: 20px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--acero-200); border-top-color: var(--oro-600); border-radius: 50%; animation: spin .8s linear infinite; }
.center-pad { display: grid; place-items: center; padding: 48px 16px; gap: 12px; text-align: center; }
.empty { display: grid; place-items: center; gap: 10px; padding: 40px 16px; text-align: center; color: var(--acero-500); }
.empty svg { width: 40px; height: 40px; color: var(--acero-300); }

.avatar { flex: none; border-radius: 50%; background: var(--oro-100); color: var(--oro-texto); display: grid; place-items: center; font-family: var(--titulo); font-weight: 800; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.dark { background: var(--grafito); color: var(--oro); }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--acero-100); border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { border: 0; background: transparent; padding: 9px 15px; border-radius: 9px; font-weight: 600; font-size: 0.9375rem; color: var(--acero-600); cursor: pointer; white-space: nowrap; }
.tab[aria-selected="true"] { background: var(--papel); color: var(--grafito); box-shadow: var(--sombra-1); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1.5px solid var(--acero-200); background: var(--papel); border-radius: 999px; padding: 7px 14px; font-size: 0.9063rem; font-weight: 600; cursor: pointer; color: var(--acero-700); }
.chip[aria-pressed="true"] { background: var(--grafito); border-color: var(--grafito); color: #fff; }
.chip .n { opacity: .7; margin-left: 4px; font-weight: 500; }

.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 14px; font-size: 0.875rem; }
.kv dt { color: var(--acero-500); }
.kv dd { margin: 0; font-weight: 500; word-break: break-word; }

/* ───────── Login ───────── */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, 1.05fr) 1fr; background: var(--fondo); }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 48px clamp(32px, 5vw, 72px); display: flex; flex-direction: column; justify-content: space-between;
  background:
    var(--grafito);
}
.auth-brand::after {
  content: ''; position: absolute; right: -140px; bottom: -120px; width: 520px; height: 520px; opacity: .06;
  background: url('/brand/isotipo.svg') center / contain no-repeat; transform: rotate(-8deg); pointer-events: none;
}
.auth-logo { display: flex; align-items: center; gap: 18px; }
.auth-logo img { width: 84px; height: auto; filter: none; }
.wordmark { font-family: var(--titulo); font-weight: 800; letter-spacing: .26em; font-size: 2.125rem; line-height: 1; padding-left: .02em; }
.wordmark-sub { font-size: 0.7813rem; font-weight: 600; letter-spacing: .34em; text-transform: uppercase; color: var(--oro); margin-top: 8px; }
.auth-hero { max-width: 520px; position: relative; z-index: 1; }
.auth-hero h1 { font-size: clamp(32px, 3.4vw, 46px); line-height: 1.06; color: #fff; }
.auth-hero h1 em { font-style: normal; color: var(--oro); }
.auth-hero p { margin-top: 16px; color: var(--acero-300); font-size: 1.0313rem; max-width: 440px; }
.auth-points { display: grid; gap: 14px; margin-top: 30px; }
.auth-point { display: flex; gap: 14px; align-items: center; color: #E9ECF0; font-weight: 500; }
.auth-point span.ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(253, 178, 7, .12); color: var(--oro); flex: none; }
.auth-point svg { width: 20px; height: 20px; }
.auth-foot { color: var(--acero-400); font-size: 0.8125rem; position: relative; z-index: 1; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: min(440px, 100%); background: var(--papel); border-radius: 24px; box-shadow: var(--sombra-2); border: 1px solid var(--acero-100); padding: 32px; display: grid; gap: 20px; animation: rise .25s ease-out; }
.auth-card h2 { font-size: 1.625rem; }
.auth-card .lead { color: var(--acero-500); margin-top: 6px; }
.auth-mobile-head { display: none; }
.auth-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.caps { font-size: 0.8125rem; color: var(--aviso); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.caps svg { width: 16px; height: 16px; }
.steps { display: grid; gap: 12px; }
.step { border: 1.5px solid var(--acero-100); border-radius: 16px; padding: 14px; display: grid; gap: 12px; }
.step.done { border-color: #BFE5CB; background: #FAFEFB; }
.step.bad { border-color: #F3C3BE; background: #FFFBFA; }
.step-head { display: flex; align-items: center; gap: 12px; }
.step-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--acero-100); color: var(--acero-600); flex: none; }
.step.done .step-num { background: var(--ok); color: #fff; }
.step.bad .step-num { background: var(--error); color: #fff; }
.step-num svg { width: 18px; height: 18px; }
.step-title { font-weight: 700; }
.step-sub { font-size: 0.8125rem; color: var(--acero-500); }
.who { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--oro-50); }
.rules { display: grid; gap: 6px; font-size: 0.8438rem; }
.rules li { list-style: none; display: flex; gap: 8px; align-items: center; color: var(--acero-500); }
.rules li.ok { color: var(--ok); }
.rules svg { width: 16px; height: 16px; }
.rules ul { margin: 0; padding: 0; display: grid; gap: 6px; }
.success-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-50); color: var(--ok); margin: 0 auto; }
.success-ic svg { width: 32px; height: 32px; }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-head {
    display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 20px 72px; color: #fff; text-align: center;
    background: var(--grafito);
    border-radius: 0 0 32px 32px;
  }
  .auth-mobile-head img { width: 76px; }
  .auth-mobile-head .wordmark { font-size: 1.75rem; }
  .auth-main { margin-top: -56px; align-items: start; padding: 0 14px 28px; }
  .auth-card { padding: 24px 20px; border-radius: 22px; }
}

/* ───────── Cámara ───────── */
.cam { position: relative; width: 100%; max-width: 280px; aspect-ratio: 1; margin: 0 auto; border-radius: 50%; overflow: hidden; background: var(--grafito); box-shadow: 0 0 0 4px var(--oro-100); }
.cam video, .cam img { width: 100%; height: 100%; object-fit: cover; }
.cam video { transform: scaleX(-1); }
.cam .cam-msg { position: absolute; inset: 0; display: grid; place-content: center; gap: 8px; color: var(--acero-300); text-align: center; padding: 24px; font-size: 0.875rem; }
.cam .cam-msg svg { width: 36px; height: 36px; margin: 0 auto; }
.cam-ring { position: absolute; inset: 10px; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .35); pointer-events: none; }
.cam-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ───────── App (oficina y técnico) ───────── */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--papel); border-right: 1px solid var(--acero-100); display: flex; flex-direction: column; padding: 18px 14px; gap: 18px; z-index: 50; }
.side-logo { display: flex; align-items: center; gap: 12px; padding: 4px 8px 10px; }
.side-logo .tile { width: 44px; height: 44px; border-radius: 12px; background: var(--grafito); display: grid; place-items: center; flex: none; }
.side-logo .tile img { width: 30px; }
.side-logo .name { font-family: var(--titulo); font-weight: 800; letter-spacing: .18em; font-size: 1.0625rem; }
.side-logo .sub { font-size: 0.6875rem; font-weight: 700; letter-spacing: .26em; color: var(--oro-texto); text-transform: uppercase; }
.nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--acero-700); text-decoration: none; font-weight: 600; font-size: 0.9375rem; position: relative; border: 0; background: none; cursor: pointer; width: 100%; text-align: left; }
.nav-item svg { width: 20px; height: 20px; color: var(--acero-400); }
.nav-item:hover { background: var(--acero-50); color: var(--grafito); }
.nav-item[aria-current="page"] { background: var(--oro-50); color: var(--grafito); }
.nav-item[aria-current="page"] svg { color: var(--oro-texto); }
.nav-item[aria-current="page"]::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--oro); }
.nav-item .badge { margin-left: auto; min-width: 22px; height: 22px; border-radius: 11px; background: var(--error); color: #fff; font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.side-user { margin-top: auto; border-top: 1px solid var(--acero-100); padding-top: 14px; display: grid; gap: 10px; }
.side-user .me { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.page { padding: 28px clamp(16px, 3vw, 36px) 48px; display: grid; gap: 20px; align-content: start; max-width: 1400px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.page-head .grow h1 { font-size: 1.75rem; }
.page-head .grow p { color: var(--acero-500); margin-top: 4px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { min-width: 220px; flex: 1; max-width: 420px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px; display: grid; gap: 6px; position: relative; overflow: hidden; }
.kpi .lbl { font-size: 0.8125rem; color: var(--acero-500); font-weight: 600; display: flex; gap: 8px; align-items: center; }
.kpi .lbl svg { width: 18px; height: 18px; color: var(--oro-texto); }
.kpi .val { font-family: var(--titulo); font-weight: 800; font-size: 2rem; line-height: 1.05; }
.kpi .sub { font-size: 0.8125rem; color: var(--acero-500); }
.kpi .bar { height: 6px; border-radius: 3px; background: var(--acero-100); overflow: hidden; margin-top: 4px; }
.kpi .bar span { display: block; height: 100%; background: var(--oro); border-radius: 3px; }
.kpi.link { cursor: pointer; text-align: left; border: 1px solid var(--acero-100); font: inherit; }
.kpi.link:hover { box-shadow: var(--sombra-2); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } }

.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--acero-100); background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; font: inherit; color: inherit; }
.list-item:first-child { border-top: 0; }
button.list-item { cursor: pointer; }
button.list-item:hover { background: var(--acero-50); }
.list-item .t { font-weight: 600; }
.thumb { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--acero-100); flex: none; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person { display: flex; gap: 14px; align-items: flex-start; padding: 16px; cursor: pointer; text-align: left; font: inherit; color: inherit; width: 100%; transition: box-shadow .15s, transform .15s; }
.person:hover { box-shadow: var(--sombra-2); transform: translateY(-1px); }
.person .info { min-width: 0; flex: 1; display: grid; gap: 4px; }
.person .nm { font-weight: 700; font-size: 0.9688rem; }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.tbl th { text-align: left; font-size: 0.7813rem; color: var(--acero-500); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--acero-100); white-space: nowrap; background: var(--acero-50); position: sticky; top: 0; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--acero-100); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--oro-50); }
.tbl tr.sel td { background: var(--oro-50); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; align-items: start; }
.split .card.sticky { position: sticky; top: 16px; }
@media (max-width: 1100px) { .split { grid-template-columns: 1fr; } .split .card.sticky { position: static; } }

.map { width: 100%; height: 420px; border-radius: 16px; overflow: hidden; background: var(--acero-100); z-index: 0; }
.map-wrap { position: relative; isolation: isolate; }
.map-canvas { position: absolute; inset: 0; }
.map-host { width: 100%; height: 100%; }
.map-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; }
.pin-face.gm { position: absolute; cursor: pointer; }
.gm-style .pop { font-family: var(--texto); font-size: 0.8438rem; line-height: 1.4; color: var(--grafito); padding: 2px 2px 0; }
.gm-style .gm-style-iw-c { border-radius: 14px; }
.map.tall { height: calc(100vh - 220px); min-height: 420px; }
.map.short { height: 260px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.7813rem; color: var(--acero-600); padding: 10px 4px 0; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.leaflet-container { font-family: var(--texto); }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 12px 14px; font-size: 0.8438rem; line-height: 1.4; }
.pop-title { font-weight: 700; margin-bottom: 2px; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #2563EB; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(37, 99, 235, .35), 0 2px 6px rgba(0,0,0,.3); }
.pin-face { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--oro); overflow: hidden; background: var(--grafito); box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.pin-face img { width: 100%; height: 100%; object-fit: cover; }

.selfie-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.selfie-pair figure { margin: 0; display: grid; gap: 6px; }
.selfie-pair img, .selfie-pair .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; background: var(--acero-100); display: grid; place-items: center; color: var(--acero-400); }
.selfie-pair figcaption { font-size: 0.7813rem; color: var(--acero-500); text-align: center; }

.temp-pass { font-family: var(--mono); font-size: 1.625rem; font-weight: 700; letter-spacing: .06em; text-align: center; padding: 16px; border-radius: 14px; background: var(--oro-50); border: 2px dashed var(--oro); user-select: all; word-break: break-all; }

/* Técnico: barra inferior */
.tech { min-height: 100vh; min-height: 100dvh; padding-bottom: calc(76px + var(--safe-b)); }
.tech-top { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--acero-100); }
.tech-top .tile { width: 38px; height: 38px; border-radius: 11px; background: var(--grafito); display: grid; place-items: center; }
.tech-top .tile img { width: 26px; }
.tech-top .ttl { font-family: var(--titulo); font-weight: 800; letter-spacing: .14em; font-size: 0.9375rem; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--papel); border-top: 1px solid var(--acero-100); padding: 6px 8px calc(6px + var(--safe-b)); box-shadow: 0 -6px 20px rgba(0,0,0,.05); }
.tabbar button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; padding: 8px 4px; font-size: 0.75rem; font-weight: 600; color: var(--acero-500); border-radius: 12px; cursor: pointer; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button[aria-current="page"] { color: var(--grafito); background: var(--oro-50); }
.tabbar button[aria-current="page"] svg { color: var(--oro-texto); }
.tech-page { padding: 16px; display: grid; gap: 14px; max-width: 760px; margin: 0 auto; }
.here { background: var(--grafito); color: #fff; border-radius: 18px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.here .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(253, 178, 7, .15); color: var(--oro); flex: none; }
.here .ic svg { width: 22px; height: 22px; }
.store-card { padding: 14px 16px; display: grid; gap: 10px; }
.store-num { font-family: var(--titulo); font-weight: 800; font-size: 0.7813rem; padding: 3px 8px; border-radius: 7px; background: var(--grafito); color: var(--oro); letter-spacing: .04em; }
.dist { font-weight: 700; color: var(--oro-texto); white-space: nowrap; font-size: 0.875rem; }
.store-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.store-actions .btn { flex: 1; min-width: 120px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--sombra-3); }
  .side.open { transform: none; }
  .side-scrim { position: fixed; inset: 0; background: rgba(11,12,14,.4); z-index: 40; }
  .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.94); padding: 10px 14px; border-bottom: 1px solid var(--acero-100); }
  .topbar .tile { width: 36px; height: 36px; border-radius: 10px; background: var(--grafito); display: grid; place-items: center; }
  .topbar .tile img { width: 24px; }
  .topbar .ttl { font-family: var(--titulo); font-weight: 800; flex: 1; font-size: 1.0625rem; }
  .page { padding: 18px 14px 40px; }
  .page-head .grow h1 { font-size: 1.5rem; }
  .map.tall { height: 60vh; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}
@media print { .side, .topbar, .tabbar { display: none !important; } .shell { display: block; } }

/* Las rejillas de una columna no deben crecer más que la pantalla por textos largos (se cortan con «…»). */
.stack, .stack-lg, .page, .tech-page, .drawer-body, .steps, .auth-card, .card-pad.stack { grid-template-columns: minmax(0, 1fr); }
.field, .input-wrap, .row > .grow { min-width: 0; }
.store-card, .kpi, .person .info, .selfie-pair figure, .center-pad, .empty, .auth-hero, .rules ul { grid-template-columns: minmax(0, 1fr); }
/* En paneles con scroll, ninguna fila se aplasta (las pestañas y tablas con scroll horizontal tenían alto mínimo 0). */
.drawer-body, .modal-body > .stack, .modal-body > .grid-2 { grid-auto-rows: max-content; }
.tabs, .table-wrap { min-height: max-content; }
.drawer-body > .table-wrap, .card.table-wrap { min-height: 0; }
.list, .nav, .side-user { grid-template-columns: minmax(0, 1fr); }
.side-user .me > div, .list-item > .grow { min-width: 0; }
.stack, .stack-lg { align-content: start; }
.grid-2 { align-items: start; }
select.input { padding-top: 0; padding-bottom: 0; height: 48px; min-height: 48px; }
.toolbar select.input, .card-head input.input { height: 40px; min-height: 40px; }
.tbl select.input { min-width: 150px; height: 40px; min-height: 40px; }
.split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.tbl td:last-child { white-space: nowrap; }
@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } }
.tech-page .map { height: 300px; }

/* ═══════════════ Rediseño 2026 · «grafito y oro» ═══════════════
   Más contraste y jerarquía: menú oscuro, tarjetas con relieve suave, indicadores con color
   y una versión de celular pensada para el pulgar (barra inferior, tablas como tarjetas). */
:root {
  --fondo: #F3F3EF;
  --linea: #E5E7EB;
  --radio-lg: 18px;
  --sombra-1: 0 1px 2px rgba(16, 18, 22, .05);
  --sombra-card: 0 1px 2px rgba(16, 18, 22, .04), 0 8px 24px -12px rgba(16, 18, 22, .12);
  --grad-oro: #FDB207;
  --grad-grafito: #141519;
  --azul: #2563EB; --azul-50: #E8F0FF;
  --verde: #15803D; --verde-50: #E3F5E9;
}

/* Piezas base */
.card { border: 1px solid var(--linea); box-shadow: var(--sombra-card); }
.card-head h3 { font-size: 1rem; }
.btn-primary { background: var(--grad-oro); box-shadow: 0 1px 0 var(--oro-700); }
.btn-primary:hover:not(:disabled) { background: var(--oro-600); }
.btn-glass { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .18); }
.btn-glass:hover:not(:disabled) { background: rgba(255, 255, 255, .15); }
.chip { transition: background .15s, border-color .15s, color .15s; }
.chip:hover { border-color: var(--acero-400); }
.chip[aria-pressed="true"] { box-shadow: 0 4px 12px -4px rgba(11, 12, 14, .45); }
.tabs { background: #E8E9EC; }
.alert { border: 1px solid transparent; }
.alert-aviso { border-color: #F8D9A8; }
.alert-info { border-color: #CADAFE; }
.alert-error { border-color: #F6C9C4; }
.alert-ok { border-color: #BFE5CB; }
.tbl th { background: #F7F7F5; letter-spacing: .02em; }

/* Menú lateral oscuro */
.side { background: var(--grad-grafito); border-right: 0; color: #E9ECF0; padding: 20px 14px; box-shadow: 1px 0 0 rgba(0, 0, 0, .2); }
.side-logo { padding: 4px 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.side-logo .tile { background: rgba(253, 178, 7, .08); box-shadow: none; }
.side-logo .name { color: #fff; }
.side-logo .sub { color: var(--oro); }
.nav { gap: 2px; overflow-y: auto; }
.nav-group { font-size: 0.6875rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6B7280; padding: 14px 12px 6px; }
.nav-group:first-child { padding-top: 4px; }
.nav-item { color: #C3C8D0; font-weight: 500; padding: 10px 12px; }
.nav-item svg { color: #7D8590; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item:hover svg { color: #D5D9E0; }
.nav-item[aria-current="page"] { background: rgba(253, 178, 7, .2); color: #fff; font-weight: 600; }
.nav-item[aria-current="page"] svg { color: var(--oro); }
.side-user { border-top-color: rgba(255, 255, 255, .08); }
.side-user .me { color: #fff; }
.side-user .muted { color: #8A919C; }
.side-user .btn-ghost { color: #C3C8D0; justify-content: flex-start; }
.side-user .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .06); color: #fff; }

/* Encabezado de página */
.page { gap: 22px; }
.page-head .grow h1 { letter-spacing: -.02em; }

/* Tablero: portada */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 26px 28px; color: #fff; display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap;
  background: var(--grad-grafito);
  box-shadow: 0 18px 40px -18px rgba(11, 12, 14, .55);
}
.hero::after { content: ''; position: absolute; right: -36px; bottom: -70px; width: 280px; height: 280px; background: url('/brand/isotipo.svg') center / contain no-repeat; opacity: .08; transform: rotate(-12deg); pointer-events: none; }
.hero-txt { flex: 1; min-width: 240px; position: relative; z-index: 1; }
.hero-date { font-size: 0.75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--oro); }
.hero h1 { color: #fff; font-size: 1.875rem; margin-top: 6px; }
.hero p { color: #B4BAC4; margin-top: 6px; max-width: 560px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }

/* Indicadores */
.kpis { gap: 14px; }
.kpi { padding: 16px 18px 18px; gap: 8px; transition: box-shadow .15s, transform .15s; }
.kpi.link:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(16, 18, 22, .3); }
.kpi-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.kpi-top .lbl { font-size: 0.8125rem; color: var(--acero-600); font-weight: 600; line-height: 1.25; }
.kpi-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.kpi-ic svg { width: 20px; height: 20px; }
.kpi .val { font-size: 2.125rem; letter-spacing: -.02em; }
.tone-oro .kpi-ic { background: var(--oro-100); color: var(--oro-texto); }
.tone-azul .kpi-ic { background: var(--azul-50); color: var(--azul); }
.tone-verde .kpi-ic { background: var(--verde-50); color: var(--verde); }
.tone-grafito .kpi-ic { background: var(--grafito); color: var(--oro); }
.tone-rojo .kpi-ic { background: var(--error-50); color: var(--error); }
.tone-rojo .val { color: var(--error); }
.tone-gris .kpi-ic { background: var(--acero-100); color: var(--acero-500); }
.map-key { display: inline-flex; align-items: center; gap: 6px; font-size: 0.7813rem; color: var(--acero-500); }
.map-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); }
.map-key i + i, .map-key i:not(:first-child) { margin-left: 8px; }
.map-key .k-azul { background: var(--azul); }
.map-key .k-oro { background: var(--oro); }

/* Personal */
.person { border: 1px solid var(--linea); }

/* Barra superior y barra inferior (celular) */
.tabbar.office { display: none; }
.tab-ic { position: relative; display: inline-grid; place-items: center; padding: 5px 16px; border-radius: 999px; transition: background .15s, color .15s; }
.tab-ic svg { width: 22px; height: 22px; }
.tabbar { border-top: 1px solid var(--linea); box-shadow: 0 -10px 30px -12px rgba(11, 12, 14, .18); padding: 6px 6px calc(8px + var(--safe-b)); background: rgba(255, 255, 255, .97); }
.tabbar button { gap: 4px; padding: 4px 2px; font-size: 0.7188rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tabbar button[aria-current="page"] { background: none; color: var(--grafito); font-weight: 700; }
.tabbar button[aria-current="page"] .tab-ic { background: var(--oro-100); color: var(--oro-texto); }
.tabbar button[aria-current="page"] svg { color: var(--oro-texto); }
.tab-badge { position: absolute; top: -4px; right: 2px; 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; box-shadow: 0 0 0 2px #fff; }

/* Técnico: barra superior oscura */
.tech-top { background: rgba(11, 12, 14, .97); border-bottom: 0; color: #fff; box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .6); }
.tech-top .ttl { color: #fff; }
.tech-top .muted { color: #9AA1AC; }
.tech-top .tile { background: rgba(253, 178, 7, .08); box-shadow: none; }

@media (max-width: 900px) {
  .topbar { background: rgba(11, 12, 14, .97); border-bottom: 0; color: #fff; padding: 10px 12px; box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .6); }
  .topbar .ttl { color: #fff; }
  .topbar .btn-ghost { color: #fff; }
  .topbar .btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .08); }
  .topbar .tile { background: rgba(253, 178, 7, .08); box-shadow: none; }
  .tabbar.office { display: grid; }
  .main { padding-bottom: calc(78px + var(--safe-b)); }
  .shell ~ .toasts, .tech ~ .toasts { bottom: calc(88px + var(--safe-b)); }
  .side { width: 290px; z-index: 2100; }
  .side-scrim { z-index: 2050; }
}

@media (max-width: 640px) {
  /* R39: letra de lectura de 17 px en el celular (crece con «Mi app»). */
  body { font-size: 1.0625rem; }
  .small { font-size: 0.875rem; }
  .page { padding: 16px 14px 32px; gap: 16px; }
  /* Encabezados: el título arriba y los botones abajo, a todo lo ancho (antes se aplastaba el texto). */
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head > .grow h1 { font-size: 1.5rem; }
  .page-head > .grow p { font-size: 1rem; }
  .page-head > .toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .page-head > .toolbar > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .page-head > .toolbar .btn, .page-head > .btn { width: 100%; min-width: 0; padding: 0 12px; }
  /* Filtros: buscador a lo ancho y listas desplegables lado a lado. */
  .toolbar { gap: 8px; }
  .toolbar > .search { flex: 1 1 100%; max-width: none; min-width: 0; }
  .toolbar > select.input { flex: 1 1 40%; min-width: 0; }
  /* Grupos de filtros en una sola fila que se desliza con el dedo. */
  .page > .chips, .toolbar > .chips, .page > .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px 4px; max-width: none; width: auto; }
  .page > .tabs { margin: 0; padding: 4px; width: 100%; }
  .page > .chips::-webkit-scrollbar, .toolbar > .chips::-webkit-scrollbar { display: none; }
  .page > .chips .chip, .toolbar > .chips .chip { flex: none; }
  /* Listas: el texto conserva su espacio y los botones bajan a su propia fila. */
  .list-item { flex-wrap: wrap; padding: 12px 16px; }
  .list-item > .grow { flex: 1 1 58%; }
  .list-item > .row.wrap { flex-basis: 100%; justify-content: flex-end; }
  .list-item > .row.wrap .btn { flex: 1; }
  /* Tablas como tarjetas. */
  table.tbl, table.tbl tbody { display: block; }
  table.tbl thead { display: none; }
  table.tbl tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 16px; border-bottom: 1px solid var(--linea); }
  table.tbl td { display: block; padding: 0; border: 0; }
  table.tbl td:first-child { flex-basis: 100%; }
  table.tbl tr.click:hover td, table.tbl tr.sel td { background: transparent; }
  table.tbl tr.click:active, table.tbl tr.sel { background: var(--oro-50); }
  /* Tablero */
  .hero { padding: 20px 18px; border-radius: 20px; }
  .hero h1 { font-size: 1.5625rem; }
  .hero p { font-size: 0.9063rem; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .kpi { padding: 14px; }
  .kpi .val { font-size: 1.75rem; }
  .kpi-ic { width: 34px; height: 34px; border-radius: 10px; }
  .kpi-top .lbl { font-size: 0.7813rem; }
  .card-head { flex-wrap: wrap; }
  .map { height: 320px; }
  .modal-foot .btn { min-width: 0; }
}

/* ───── Tiendas por cadena: insignia, chips, filas con foto, selección para ruta ───── */
.chain-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 0.7813rem; font-weight: 700; white-space: nowrap;
  color: var(--grafito); background: #F3F4F6; color: color-mix(in srgb, var(--c) 72%, #000); background: color-mix(in srgb, var(--c) 12%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); }
.chain-badge i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; box-sizing: border-box; border: 2.5px solid var(--c2, var(--c)); }
.chain-badge.is-logo { padding: 4px 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--acero-200); }
.chain-badge.is-logo img { display: block; width: auto; max-width: 120px; object-fit: contain; }
.chain-chips-row { display: flex; align-items: center; gap: 10px; }
.chain-chips-row .chain-chips { flex: 1; min-width: 0; }
.chain-chip i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 7px; vertical-align: -1px; box-shadow: 0 0 0 2px #fff; }
.chain-chip[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.chain-chip[aria-pressed="true"] i { box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.chain-manage { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.stores-filters > select.input { width: auto; max-width: 230px; }
.store-thumb { flex: none; display: grid; place-items: center; border-radius: 12px; overflow: hidden; color: var(--c); background: var(--acero-100);
  background: color-mix(in srgb, var(--c) 12%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 22%, transparent); }
.store-thumb .i3d-art { width: 86%; height: 86%; object-fit: contain; }
.store-hero-art { width: 96px; height: 96px; object-fit: contain; }
.store-thumb.has-photo { background: var(--acero-100); }
.store-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-list { padding: 0; max-height: calc(100vh - 300px); min-height: 320px; overflow: auto; }
.store-list-head { padding: 10px 16px; border-bottom: 1px solid var(--acero-100); position: sticky; top: 0; background: var(--papel); z-index: 1; }
.srow { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--acero-100); cursor: pointer; outline-offset: -3px; }
.srow:hover { background: var(--acero-50); }
.srow.sel { background: var(--oro-50); box-shadow: inset 3px 0 0 var(--oro); }
.srow.picked { background: var(--oro-50); }
.srow.off { opacity: .6; }
.srow-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.srow-t { display: flex; align-items: center; gap: 8px; font-weight: 700; min-width: 0; }
.srow-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; font-size: 0.7813rem; color: var(--acero-500); }
.sm-work { color: var(--oro-texto); font-weight: 700; }
.sm-warn { color: #B91C1C; font-weight: 600; }
.srow-chain { flex: none; }
.pick-box { width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--acero-300); display: grid; place-items: center; font-weight: 800; font-size: 0.8125rem; }
.pick-box.on { background: var(--oro); border-color: var(--oro); color: var(--vc-oro-tinta, var(--grafito)); }
.store-more { padding: 14px; display: grid; }
.pick-bar { position: sticky; bottom: 12px; z-index: 30; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-radius: 18px; background: var(--grafito); color: #fff; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); }
.pick-bar .btn-ghost { color: #fff; }
.pick-bar .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
/* Ficha de la tienda: foto de la fachada, números y acciones */
.store-hero { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--grafito); }
.store-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.store-hero.is-empty { aspect-ratio: auto; min-height: 150px; background: var(--acero-50); background: color-mix(in srgb, var(--c) 8%, #fff);
  border: 1.5px dashed var(--acero-300); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.store-hero-empty { display: grid; justify-items: center; align-content: center; gap: 8px; padding: 22px 16px 66px; font-weight: 600; text-align: center; color: var(--acero-600); color: color-mix(in srgb, var(--c) 75%, #000); }
.store-hero-actions { position: absolute; right: 10px; bottom: 10px; display: flex; gap: 8px; }
.store-hero.is-empty .store-hero-actions { left: 10px; justify-content: center; }
.store-hero-cap { position: absolute; left: 10px; top: 10px; font-size: 0.75rem; color: #fff; background: rgba(11, 12, 14, .55); padding: 3px 9px; border-radius: 999px; max-width: 52%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sstat { border-radius: 14px; background: var(--acero-50); padding: 10px 12px; display: grid; gap: 2px; min-width: 0; }
.sstat b { font-family: var(--titulo); font-size: 1.0625rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.sstat span { font-size: 0.75rem; color: var(--acero-500); }
.sstat.is-text b { font-family: inherit; font-size: 0.9063rem; font-weight: 700; }
.sstat.is-gold { background: #FFF4D6; }
.sstat.is-gold b { color: var(--oro-texto); }
.store-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.near .card-head { flex-wrap: wrap; }
/* Globo del mapa y pines numerados */
.pop.has-img { width: 220px; }
.pop-img { width: 100%; height: 110px; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 8px; }
.pop-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 700; margin: 4px 0; color: var(--acero-700); }
.pop-tag::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.pin-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.75rem; color: var(--grafito); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.legend.is-items { gap: 8px; }
.legend-it { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--acero-200); background: #fff; border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 0.7813rem; cursor: pointer; color: var(--acero-700); }
.legend-it b { font-weight: 700; color: var(--acero-500); }
.legend-it.on { border-color: var(--grafito); box-shadow: inset 0 0 0 1px var(--grafito); }
.legend.is-items i { margin-right: 0; }
.legend.is-items > span { display: inline-flex; align-items: center; gap: 6px; }
/* Cadenas (ventana de administración) */
.chain-list { display: grid; gap: 10px; }
.chain-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--acero-100); border-radius: 14px; flex-wrap: wrap; }
.chain-colors { display: flex; gap: 6px; }
.chain-color input { width: 40px; height: 40px; border: 0; padding: 0; background: none; border-radius: 10px; cursor: pointer; }
.chain-color.is-2 input { width: 30px; height: 30px; margin-top: 5px; }
.chain-color.is-empty input { opacity: .45; }
.chain-logo-box { width: 110px; height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--acero-50); overflow: hidden; }
.chain-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.chain-row-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.chain-add { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--acero-100); }
.chain-add .grow { flex: 1; min-width: 0; }
@media (max-width: 1100px) {
  .stores-split .store-map { order: -1; }
  .stores-split .store-map .map.tall { height: 300px; }
  .store-list { max-height: none; min-height: 0; overflow: visible; }
}
@media (max-width: 900px) {
  .pick-bar { bottom: calc(86px + var(--safe-b)); }
}

/* ───── Botones en celular: el texto baja de renglón en vez de cortarse ───── */
@media (max-width: 640px) {
  .hero-actions .btn, .modal-foot .btn, .drawer-foot .btn, .list-item > .row.wrap .btn {
    white-space: normal; line-height: 1.15; text-align: center; min-height: 46px; padding: 6px 10px; gap: 6px; font-size: 0.9063rem; }
  .chain-chips-row { flex-direction: column; align-items: stretch; gap: 4px; }
  .chain-chips-row .chain-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px 4px; }
  .chain-chips-row .chain-chips::-webkit-scrollbar { display: none; }
  .chain-chips .chip { flex: none; }
  .chain-manage { align-self: flex-end; }
  .stores-filters > select.input { flex: 1 1 45%; max-width: none; }
  .srow { padding: 12px 14px; gap: 10px; flex-wrap: wrap; }
  .srow-chain { flex-basis: 100%; padding-left: 62px; margin-top: -2px; }
  .srow.is-picking .srow-chain { padding-left: 98px; }
  .sstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chain-add { flex-wrap: wrap; }
}

/* ───── Tablero: cobertura por cadena, tiendas con más trabajo y agenda de hoy ───── */
.dash-chains .list { padding: 4px 0 8px; }
.dc-row { display: grid; gap: 6px; text-align: left; padding: 12px 18px; }
.dc-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.dc-n { font-family: var(--titulo); font-weight: 800; font-size: 0.9375rem; }
.dc-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 0.7813rem; color: var(--acero-500); }
.dc-meta .is-work { color: var(--oro-texto); font-weight: 700; }
.dc-bar { height: 6px; border-radius: 3px; background: var(--acero-100); overflow: hidden; }
.dc-bar span { display: block; height: 100%; border-radius: 3px; background: var(--c); }
.hot-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.hot-n { display: grid; justify-items: end; line-height: 1.1; flex: none; }
.hot-n b { font-family: var(--titulo); font-size: 1.25rem; font-weight: 800; }
.hot-n span { font-size: 0.7188rem; color: var(--acero-500); }
.hot-n em { font-style: normal; font-size: 0.7188rem; font-weight: 700; color: #B91C1C; }
.dash .list-item { flex-wrap: nowrap; }
.ag-time { flex: none; min-width: 52px; font-family: var(--titulo); font-weight: 800; font-size: 0.875rem; color: var(--grafito); }
.list-item.is-past { opacity: .55; }
.dash-bday { border-top: 1px solid var(--acero-100); }
@media (max-width: 640px) {
  .list-item.dc-row { display: grid; padding: 12px 16px; }
}


/* ───── Tour guiado: foco sobre la parte que se explica y tarjeta con la ilustración 3D ───── */
.tour { position: fixed; inset: 0; z-index: 400; }
.tour-dim { position: absolute; inset: 0; background: rgba(11, 12, 14, .62); animation: vcFade .25s ease-out; }
.tour-hole { position: absolute; border-radius: 16px; pointer-events: none; box-shadow: 0 0 0 3px var(--vc-oro, #FDB207), 0 0 0 9999px rgba(11, 12, 14, .62);
  transition: top .38s var(--vc-ease), left .38s var(--vc-ease), width .38s var(--vc-ease), height .38s var(--vc-ease); }
.tour-card { position: absolute; width: min(372px, calc(100vw - 32px)); background: #fff; color: var(--vc-tinta, #14130F); border-radius: 24px; padding: 20px 20px 16px;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55); display: grid; gap: 6px; transition: left .38s var(--vc-ease), top .38s var(--vc-ease); }
.tour.is-center .tour-card { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); text-align: center; justify-items: center; padding: 28px 24px 18px; }
.tour-art { width: 84px; height: 84px; display: grid; place-items: center; border-radius: 22px; background: var(--vc-arena, #F4F1EA); margin-bottom: 6px; animation: tourPop .5s var(--vc-spring) both; }
.tour.is-center .tour-art { width: 112px; height: 112px; border-radius: 30px; }
.tour.is-center .tour-art .i3d { width: 92px !important; height: 92px !important; }
.tour-step { font-size: 0.7188rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--vc-oro-texto, #8A5A00); }
.tour-t { font-family: var(--titulo); font-size: 1.3125rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; animation: vcRise .4s var(--vc-ease) both; }
.tour-x { font-size: 0.9375rem; line-height: 1.5; color: var(--acero-600, #59554D); animation: vcRise .4s .05s var(--vc-ease) both; }
.tour-dots { display: flex; gap: 5px; margin: 10px 0 4px; }
.tour-dots i { width: 16px; height: 4px; border-radius: 4px; background: var(--acero-200, #E1DCD1); transition: background .3s, width .3s; }
.tour-dots i.on { background: var(--vc-oro, #FDB207); }
.tour-dots i.cur { width: 26px; }
.tour-acts { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; }
.tour-acts .grow { flex: 1; }
.tour-skip { font-size: 0.875rem; color: var(--acero-500, #736E64); text-decoration: none; }
.tour-card-cta { display: flex; align-items: center; gap: 16px; }
@keyframes tourPop { from { opacity: 0; transform: scale(.7) rotate(-6deg); } 70% { transform: scale(1.06) rotate(1deg); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .tour-card { padding: 18px 16px 14px; }
  .tour-t { font-size: 1.1875rem; }
  .tour-x { font-size: 0.9063rem; }
}

/* ───── Modo prueba (capacitación): marco naranja alrededor de la pantalla y etiqueta arriba ───── */
.prueba-marco { position: fixed; inset: 0; z-index: 2600; pointer-events: none; border: 3px solid #EA580C; }
.prueba-chip { position: fixed; z-index: 1950; top: calc(2px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 0; border-radius: 0 0 10px 10px; cursor: pointer;
  background: #EA580C; color: #fff; font: 800 0.7188rem/1.2 var(--texto); letter-spacing: .08em;
  box-shadow: 0 4px 12px rgba(194, 65, 12, .35); }
.prueba-chip:focus-visible { outline: 3px solid var(--grafito); outline-offset: 2px; }
.prueba-explica { display: flex; gap: 14px; align-items: flex-start; }
.prueba-explica p { margin: 0; font-size: 0.9375rem; }
.prueba-card.compact h3 { font-size: 1rem; }
html.modo-prueba .topbar, html.modo-prueba .tech-top { box-shadow: inset 0 -3px 0 #EA580C; }
@media print { .prueba-marco, .prueba-chip { display: none; } html.modo-prueba body::before { content: 'MODO PRUEBA · SIN VALIDEZ'; display: block; text-align: center; font: 800 0.75rem/2 sans-serif; color: #fff; background: #C62828; } }

/* Tiendas → Revisar ubicaciones */
.count-dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--error); color: #fff; font-size: 0.75rem; font-weight: 700; line-height: 1; }
.audit-row { padding: 0; overflow: hidden; }
.audit-head { display: flex; gap: 10px; align-items: center; width: 100%; padding: 12px 14px; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.audit-head svg { flex: none; transition: transform .15s; }
.audit-row.open .audit-head svg { transform: rotate(90deg); }
.audit-body { padding: 0 14px 14px; }
.audit-body .map.short { height: 220px; }

/* Satisfacción (#/satisfaccion): tendencia, barras apiladas de 1 a 5 (rojo = mal, gris = regular, azul = bien) y editor de preguntas */
.sat-page { --sat-d1: #b8322f; --sat-d2: #ee8f8c; --sat-d3: #d9d8d2; --sat-d4: #86b6ef; --sat-d5: #1c5cab; --sat-line: #2a78d6; --sat-grid: #e1e0d9; }
.sat-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sat-trend { position: relative; margin: 0; }
.sat-trend svg { display: block; width: 100%; height: auto; overflow: visible; }
.sat-grid { stroke: var(--sat-grid); stroke-width: 1; }
.sat-axis { fill: var(--acero-600, #52514e); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.sat-line { fill: none; stroke: var(--sat-line); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.sat-dot { fill: var(--sat-line); stroke: var(--papel, #fff); stroke-width: 2; }
.sat-cross { stroke: #9a9992; stroke-width: 1; stroke-dasharray: 3 3; }
.sat-trend rect:focus { outline: none; }
.sat-empty { position: absolute; inset: 0; display: grid; place-items: center; }
.an-tip.sat-tip { top: 8px; transform: translateX(-50%); pointer-events: none; }
.sat-dist { display: grid; gap: 10px; }
.sat-drow { display: grid; grid-template-columns: minmax(150px, 240px) 1fr 70px; gap: 12px; align-items: center; }
.sat-dlbl { display: grid; min-width: 0; line-height: 1.25; }
.sat-davg { text-align: right; font-variant-numeric: tabular-nums; }
.sat-stack { display: flex; gap: 2px; height: 30px; min-width: 0; }
.sat-seg { position: relative; display: grid; place-items: center; min-width: 6px; outline: none; cursor: default; }
.sat-seg:first-child { border-radius: 4px 0 0 4px; }
.sat-seg:last-child { border-radius: 0 4px 4px 0; }
.sat-seg:only-child { border-radius: 4px; }
.sat-seg i { font-style: normal; font-size: 0.7188rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sat-seg.on, .sat-seg:focus-visible { box-shadow: 0 0 0 2px var(--grafito, #14151a); z-index: 2; }
.sat-seg.none { flex: 1; background: var(--acero-50, #f3f4f6); color: var(--acero-600, #52514e); font-size: 0.75rem; border-radius: 4px; }
.sat-seg .an-tip { top: calc(100% + 6px); left: 50%; transform: translateX(-50%); pointer-events: none; }
.d1.sat-seg, .sat-sw.d1 { background: var(--sat-d1); color: #fff; }
.d2.sat-seg, .sat-sw.d2 { background: var(--sat-d2); color: #0b0b0b; }
.d3.sat-seg, .sat-sw.d3 { background: var(--sat-d3); color: #0b0b0b; }
.d4.sat-seg, .sat-sw.d4 { background: var(--sat-d4); color: #0b0b0b; }
.d5.sat-seg, .sat-sw.d5 { background: var(--sat-d5); color: #fff; }
.sat-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.an-qrow.sel .an-hbar-lbl { font-weight: 800; }
.an-qrow.sel .an-qfill { box-shadow: 0 0 0 2px var(--grafito, #14151a); }
.q-list { display: grid; gap: 8px; }
.q-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--linea, #e5e7eb); border-radius: 12px; background: var(--papel, #fff); }
.q-item.off { opacity: .75; }
.q-label { font-weight: 600; line-height: 1.35; }
.q-actions { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; justify-content: flex-end; }
@media (max-width: 720px) {
  .sat-drow { grid-template-columns: 1fr 56px; }
  .sat-drow .sat-dlbl { grid-column: 1 / -1; }
  .q-item { flex-wrap: wrap; }
  .q-actions { width: 100%; justify-content: flex-start; }
}

/* Orden de compra del HAMMY */
.oc-tbl td, .oc-tbl th { padding: 8px 10px; }
.oc-tbl tfoot td { border-top: 1px solid var(--acero-100); }
.oc-tbl .oc-total td { font-size: 0.9375rem; }
.oc-tbl .oc-noprice td { background: #FFF7E6; }
.oc-concept { font-weight: 600; }
.oc-edit { display: grid; gap: 10px; }
.oc-erow { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; padding-bottom: 10px; border-bottom: 1px solid var(--acero-100); }
.oc-eamt { display: grid; min-width: 90px; text-align: right; padding-bottom: 10px; }

/* Seguimiento del servicio (cliente final): página pública /t/<token> y tarjeta de la oficina */
.trk-head { border-radius: 14px; padding: 14px 16px; background: var(--oro-50, #FFF8E6); border: 1px solid var(--oro-100, #FDE7A8); }
.trk-head.en_camino { background: #EAF2FD; border-color: #B7D3F6; }
.trk-head.terminado { background: #E3F5E9; border-color: #B6E2C4; }
.trk-head.cancelado { background: var(--acero-50, #f3f4f6); border-color: var(--linea, #e5e7eb); }
.trk-title { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.trk-sub { margin-top: 4px; font-size: 0.9375rem; }
.trk-tech { display: flex; gap: 12px; align-items: center; }
.trk-tech img, .trk-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--oro, #FDB207); }
.trk-avatar { display: grid; place-items: center; background: var(--grafito, #14151a); color: var(--oro, #FDB207); font-size: 1.625rem; font-weight: 800; }
.trk-name { font-size: 1.125rem; font-weight: 800; }
.trk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.trk-steps li { position: relative; display: flex; gap: 12px; padding: 0 0 16px; }
.trk-steps li:not(:last-child)::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--linea, #e5e7eb); }
.trk-steps li.done:not(:last-child)::before { background: var(--oro, #FDB207); }
.trk-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--linea, #d1d5db); background: var(--papel, #fff); color: #14151a; }
.trk-steps li.done .trk-dot { background: var(--oro, #FDB207); border-color: var(--oro, #FDB207); }
.trk-steps li.now .trk-dot { box-shadow: 0 0 0 4px rgba(253, 178, 7, .28); }
.trk-step { font-weight: 700; }
.trk-steps li:not(.done) .trk-step { color: var(--acero-600, #6b7280); font-weight: 600; }
.trk-kv { margin: 0; }
.trk-link { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px dashed var(--linea, #d1d5db); border-radius: 10px; min-width: 0; }
.trk-link code { flex: 1; min-width: 0; font-size: 0.7813rem; }

/* Pólizas Merza (#/polizas) */
.pol-page .pol-hero { align-items: center; }
.pol-eq { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.pol-eq > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); min-width: 110px; max-width: 170px; }
.pol-eq > div.g { background: var(--oro, #FDB207); border-color: var(--oro, #FDB207); color: #14151a; }
.pol-eq b { font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pol-eq span { font-size: 0.75rem; line-height: 1.3; opacity: .9; }
.pol-eq i { font-style: normal; align-self: center; font-size: 1.25rem; font-weight: 700; opacity: .7; }
.pol-lead { margin: 0; font-size: 0.9375rem; line-height: 1.5; }
.pol-h2 { margin: 0; font-size: 1.25rem; }
.pol-list { display: grid; gap: 8px; }
.pol-list li { position: relative; padding-left: 16px; line-height: 1.45; }
.pol-list li::before { content: ''; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 50%; background: var(--oro, #FDB207); }
.pol-find { display: grid; gap: 3px; padding: 10px 12px; border-left: 3px solid var(--acero-200, #d1d5db); background: var(--acero-50, #f8f8f6); border-radius: 0 10px 10px 0; }
.pol-find.hot { border-left-color: var(--error, #c62828); background: #fff5f4; }
.pol-gold { color: #8a5a00; }
.pol-good { color: var(--ok, #15803d); }
.pol-finds { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.pol-fnd { display: grid; gap: 8px; align-content: start; border-top: 3px solid var(--acero-200, #d1d5db); }
.pol-fnd.alta { border-top-color: var(--error, #c62828); }
.pol-fnd.media { border-top-color: #d97706; }
.pol-fnd.bien { border-top-color: var(--ok, #15803d); }
.pol-fnd h3 { margin: 0; font-size: 1rem; }
.pol-fnd p { margin: 0; line-height: 1.5; }
.pol-qv { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 0.8125rem; }
.pol-qv dt { font-weight: 700; color: var(--acero-600, #52514e); }
.pol-qv dd { margin: 0; }
.pol-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 10px 0; }
.pol-form .field-label { font-size: 0.7813rem; line-height: 1.3; }
.pol-range { display: grid; gap: 6px; max-width: 520px; }
.pol-range input { width: 100%; accent-color: #a86f00; }
.pol-vp { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.pol-vpc { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--linea, #e5e7eb); border-radius: 12px; }
.pol-vpc .gap { font-size: 0.7813rem; color: var(--error, #c62828); text-decoration: line-through; text-decoration-color: rgba(198, 40, 40, .4); }
.pol-ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pol-idea { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--linea, #e5e7eb); border-radius: 12px; align-content: start; }
.pol-idea h4 { margin: 0; font-size: 0.9375rem; }
.pol-idea dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; margin: 0; font-size: 0.8125rem; }
.pol-idea dt { font-weight: 700; }
.pol-idea dd { margin: 0; }
.pol-steps { display: grid; gap: 12px; }
.pol-step { display: grid; grid-template-columns: 150px 1fr; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--acero-100, #eceae4); }
.pol-step:last-child { border-bottom: 0; }
.pol-step .when { font-weight: 800; color: #8a5a00; font-size: 0.8125rem; }
.pol-step ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 0.8438rem; }
.pol-step p { margin: 4px 0 0; }
.pol-sort { border: 0; background: none; font: inherit; font-weight: 700; color: inherit; cursor: pointer; padding: 0; text-align: inherit; }
.pol-stores td, .pol-stores th { white-space: nowrap; }
.pol-det > td { background: var(--acero-50, #f8f8f6); white-space: normal; }
.pol-ped li { display: flex; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--acero-100, #eceae4); }
.pol-proj-in .input { min-height: 34px; padding: 4px 8px; }
.pol-job-out { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
@media (max-width: 720px) {
  .pol-step { grid-template-columns: 1fr; gap: 4px; }
  .pol-eq > div { max-width: none; flex: 1 1 40%; }
  .pol-finds { grid-template-columns: 1fr; }
}
/* Gráficas de Pólizas Merza */
.pc-fig { position: relative; margin: 0; min-width: 0; }
.pc-fig svg { display: block; max-width: 100%; overflow: visible; }
.pc-grid { stroke: #e1e0d9; stroke-width: 1; }
.pc-ax { fill: var(--acero-600, #52514e); font-size: 0.6875rem; font-variant-numeric: tabular-nums; }
.pc-sub { font-size: 0.6563rem; }
.pc-lbl { fill: var(--grafito, #14151a); font-size: 0.75rem; font-weight: 600; }
.pc-val { fill: var(--grafito, #14151a); font-size: 0.7188rem; font-weight: 700; font-variant-numeric: tabular-nums; paint-order: stroke; stroke: var(--papel, #fff); stroke-width: 3px; }
.pc-ref { stroke-width: 1.4; stroke-dasharray: 5 4; fill: none; }
.pc-band { fill: rgba(253, 178, 7, .14); }
.pc-mark { stroke: var(--grafito, #14151a); stroke-width: 1; }
.pc-cross { stroke: #9a9992; stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.pc-dot { stroke: var(--papel, #fff); stroke-width: 2; }
.pc-hrow { outline: none; }
.pc-hrow:focus-visible .pc-lbl, .pc-hrow:hover .pc-lbl { text-decoration: underline; }
.pc-click { cursor: pointer; }
.pc-on path, .pc-on rect[fill]:not([fill="transparent"]) { filter: brightness(.92); }
.pc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 8px; font-size: 0.7813rem; color: var(--acero-600, #52514e); }
.pc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pc-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pc-legend i.ln { width: 16px; height: 3px; border-radius: 2px; }
.pc-legend i.dot { border-radius: 50%; }
.pc-tip { position: absolute; z-index: 5; transform: translateX(-50%); min-width: 170px; max-width: 260px; display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; background: rgba(20, 21, 25, .95); color: #fff; font-size: 0.75rem; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.pc-tip b { font-size: 0.8125rem; }
.pc-tip span { display: flex; align-items: center; gap: 6px; color: #D5D9E0; }
.pc-tip span i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.pc-tip em { font-style: normal; font-weight: 700; color: #fff; margin-left: auto; font-variant-numeric: tabular-nums; }
.pol-wrap { display: block; white-space: normal; min-width: 280px; }
.pol-h4 { margin: 0; padding-bottom: 0; font-size: 0.875rem; }
.pol-count { white-space: nowrap; }
@media (max-width: 640px) { .pol-count { white-space: normal; } }
.pc-halo { paint-order: stroke; stroke: var(--papel, #fff); stroke-width: 3px; }
.pol-page .an-card-kv dd { white-space: normal; overflow: visible; }
@media (max-width: 640px) {
  /* Tablas de Pólizas con columnas comparables: se quedan como tabla y se deslizan de lado. */
  table.tbl.pol-keep { display: table; min-width: 480px; }
  table.tbl.pol-keep thead { display: table-header-group; }
  table.tbl.pol-keep tbody { display: table-row-group; }
  table.tbl.pol-keep tr { display: table-row; padding: 0; }
  table.tbl.pol-keep td { display: table-cell; padding: 8px 10px; border-bottom: 1px solid var(--acero-100); }
  .pol-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* R51 · jalar hacia abajo para actualizar (pull-refresh.js): el de la app reemplaza al del navegador */
html.ptr-on, html.ptr-on body { overscroll-behavior-y: contain; }
.ptr { position: fixed; z-index: 2550; top: env(safe-area-inset-top, 0px); left: 50%; transform: translate(-50%, -56px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; background: var(--grafito, #0B0C0E); color: #fff;
  font: 700 0.875rem/1.2 var(--texto, system-ui); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); transition: opacity .15s; }
.ptr-ico { color: var(--oro, #FDB207); font-weight: 800; transition: transform .15s; }
.ptr.armed .ptr-ico { transform: rotate(180deg); }
.ptr.busy::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); border-top-color: var(--oro, #FDB207); animation: ptrspin .7s linear infinite; }
@keyframes ptrspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .ptr.busy::before { animation: none; } }
