/* Panel de Piloto Fiscal — hoja de estilos del programa (29 sep 2026).
   Sale de las muestras aprobadas por Yerik (PROXMOX/PRODUCTOS/piloto-fiscal/panel/ronda-2/html/estilo.css);
   el diseño vive en docs/DISENO-PANEL.md. Esqueleto: barra 56 · ruta 40 · encabezado 72 · pestañas 44 · área.
   Señales por su forma (relleno = certeza). Letras servidas desde /static/panel/fuentes (OFL 1.1). */

@font-face { font-family: 'Archivo'; src: url('fuentes/archivo.woff2') format('woff2');
  font-weight: 400 800; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Next'; src: url('fuentes/atkinson-hyperlegible-next.woff2') format('woff2');
  font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Atkinson Hyperlegible Mono'; src: url('fuentes/atkinson-hyperlegible-mono.woff2') format('woff2');
  font-weight: 200 800; font-display: swap; }

:root {
  --papel: #F4F6F8; --tinta: #172033; --sello: #3B3AA8; --sello-claro: #A9B0FF; --cielo: #DCE7F3;
  --grafito: #5B6475; --positiva: #1E7A4F; --regla: #D5DAE1; --blanco: #FFFFFF;
  --ambar: #B26A00; --ambar-fondo: #FFF4DE; --rojo: #B42318; --rojo-fondo: #FDECEA; --verde-fondo: #E6F4EC;
  --sello-fondo: #F1F1FB;
  --franja: #5A2A82;                /* sólo para «estás viendo como otro despacho» */
  --f-titulo: 'Archivo', system-ui, sans-serif;
  --f-texto: 'Atkinson Hyperlegible Next', system-ui, sans-serif;
  --f-dato: 'Atkinson Hyperlegible Mono', ui-monospace, monospace;
  --ancho: 1240px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--papel); color: var(--tinta); font-family: var(--f-texto); font-size: 14.5px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
b, strong { font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sello); outline-offset: 2px; border-radius: 6px; }
.dato { font-family: var(--f-dato); }
.suave { color: var(--grafito); }
.der { text-align: right; }
.etq { font-family: var(--f-dato); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--grafito); }
.dentro { max-width: var(--ancho); margin: 0 auto; padding: 0 28px; }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: 8px; top: -60px; z-index: 20; background: var(--tinta); color: #fff; padding: 8px 12px; border-radius: 8px; }
.saltar:focus { top: 8px; }
.taller { background: var(--ambar); color: #fff; font-family: var(--f-dato); font-size: 0.62rem; letter-spacing: 0.08em;
  padding: 3px 7px; border-radius: 6px; white-space: nowrap; margin-left: -12px; }

/* ── Zona 1 · barra (56) ── */
.barra { height: 56px; background: var(--blanco); border-bottom: 1px solid var(--regla); }
.barra .dentro { height: 100%; display: flex; align-items: center; gap: 22px; }
.marca { display: flex; align-items: center; gap: 8px; font-family: var(--f-titulo); font-stretch: 125%; font-weight: 700; font-size: 0.98rem; white-space: nowrap; }
.marca svg { width: 28px; height: auto; }
.marca span { color: var(--grafito); font-weight: 600; }
.lugares { display: flex; height: 100%; gap: 2px; }
.lugares a { display: flex; align-items: center; padding: 0 12px; font-weight: 700; color: var(--grafito); border-bottom: 3px solid transparent; }
.lugares a:hover { color: var(--tinta); }
.lugares a.aqui { color: var(--tinta); border-bottom-color: var(--sello); }
.buscar { width: 320px; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--regla); border-radius: 9px; background: var(--papel); color: var(--grafito); font-size: 0.9rem; }
.buscar svg { width: 15px; height: 15px; flex: none; }
.buscar input { border: 0; background: transparent; outline: 0; width: 100%; min-width: 0; color: var(--tinta); }
.buscar input::placeholder { color: var(--grafito); }
.buscar:focus-within { border-color: var(--sello); background: var(--blanco); }
.barra .fin { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.cuenta { position: relative; }
.cuenta summary { list-style: none; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; white-space: nowrap; cursor: pointer; }
.cuenta summary::-webkit-details-marker { display: none; }
.cuenta i { width: 28px; height: 28px; border-radius: 50%; background: var(--cielo); display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 0.74rem; }
/* El menú de la cuenta crece hacia abajo en su lugar, sin tapar la pantalla (regla 3). */
.cuenta .menu { position: absolute; right: 0; top: 40px; z-index: 10; width: 250px; background: var(--blanco); border: 1px solid var(--regla); border-radius: 10px; padding: 6px; box-shadow: 0 6px 18px rgba(23,32,51,.08); }
.cuenta .menu p { padding: 8px 10px; font-size: 0.84rem; color: var(--grafito); border-bottom: 1px solid #E6E9EE; margin-bottom: 4px; }
.cuenta .menu a, .cuenta .menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; background: none; border: 0; cursor: pointer; font-size: 0.9rem; }
.cuenta .menu a:hover, .cuenta .menu button:hover { background: var(--papel); }

/* ── Zona 2 · regreso y ruta (40) ── */
.ruta { position: relative; height: 40px; border-bottom: 1px solid var(--regla); background: var(--papel); font-size: 0.86rem; }
.ruta .dentro { height: 100%; display: flex; align-items: center; gap: 16px; }
.ruta .volver { color: var(--sello); font-weight: 700; white-space: nowrap; }
.ruta .migas { color: var(--grafito); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ruta .fin { margin-left: auto; color: var(--grafito); display: flex; gap: 18px; align-items: center; white-space: nowrap; }
.ruta .paso { font-weight: 700; color: var(--tinta); }

/* ── Zona 3 · encabezado (72) ── */
.cabeza { min-height: 72px; background: var(--blanco); border-bottom: 1px solid var(--regla); }
.cabeza .dentro { min-height: 72px; display: flex; align-items: center; gap: 20px; padding-top: 8px; padding-bottom: 8px; }
.cabeza h1 { font-family: var(--f-titulo); font-stretch: 125%; font-weight: 700; font-size: 1.22rem; letter-spacing: -0.01em; line-height: 1.2; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cabeza h1 small { font-family: var(--f-texto); font-stretch: 100%; font-weight: 400; font-size: 0.86rem; color: var(--grafito); letter-spacing: 0; }
.cabeza h1 small.dato { font-family: var(--f-dato); color: var(--tinta); }
.cabeza .linea2 { margin-top: 5px; display: flex; gap: 18px; font-size: 0.86rem; color: var(--grafito); flex-wrap: wrap; align-items: center; }
.cabeza .linea2 span { display: inline-flex; align-items: center; gap: 6px; }
.cabeza .fin { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ── Zona 4 · pestañas (44) ── */
.pestanas { height: 44px; background: var(--blanco); border-bottom: 1px solid var(--regla); }
.pestanas .dentro { height: 100%; display: flex; gap: 4px; align-items: stretch; }
.pestanas a { display: flex; align-items: center; gap: 8px; padding: 0 14px; font-weight: 700; color: var(--grafito); border-bottom: 3px solid transparent; white-space: nowrap; }
.pestanas a:hover { color: var(--tinta); }
.pestanas a.aqui { color: var(--tinta); border-bottom-color: var(--sello); }
.pestanas a .cta { font-family: var(--f-dato); font-weight: 400; font-size: 0.74rem; background: var(--papel); border: 1px solid var(--regla); border-radius: 999px; padding: 0 7px; }
.pestanas a.despues { color: #9AA1AE; font-weight: 400; pointer-events: none; }
.pestanas .fin { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 0.86rem; color: var(--grafito); white-space: nowrap; }
.avance { display: flex; height: 44px; align-items: center; gap: 22px; font-size: 0.9rem; white-space: nowrap; overflow-x: auto; }
.avance b { font-family: var(--f-dato); font-size: 1.02rem; }

/* ── Zona 5 · área de trabajo ── */
.area { padding: 16px 0 24px; }
.con-pie .area { padding-bottom: 88px; }
.panel { background: var(--blanco); border: 1px solid var(--regla); border-radius: 12px; overflow: hidden; }
.panel > .tit { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 0 16px; border-bottom: 1px solid var(--regla); }
.panel > .tit h2 { font-family: var(--f-titulo); font-stretch: 125%; font-weight: 700; font-size: 0.9rem; }
.panel > .tit .nota { font-size: 0.8rem; color: var(--grafito); }
.panel .desliza { overflow-x: auto; }
.cols { display: grid; gap: 16px; align-items: start; }
.cols.lado { grid-template-columns: minmax(0, 1fr) 400px; }
.pila { display: grid; gap: 16px; align-content: start; }
.frase { font-size: 1.02rem; margin-bottom: 14px; }
.vacio { padding: 28px 16px; color: var(--grafito); text-align: center; }
.vacio b { color: var(--tinta); }

/* Botones: 40 de alto; de renglón 32 */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 9px; font-weight: 700; font-size: 0.9rem; white-space: nowrap; background: var(--sello); color: #fff; border: 1px solid var(--sello); cursor: pointer; }
.boton:hover { filter: brightness(1.08); }
.boton.b2 { background: var(--blanco); color: var(--tinta); border-color: var(--regla); }
.boton.b2:hover { border-color: #9AA1AE; filter: none; }
.boton.r { height: 32px; padding: 0 11px; font-size: 0.84rem; border-radius: 8px; }
.boton.b3 { background: var(--blanco); color: var(--sello); border-color: var(--sello); }
.boton.b3:hover { background: var(--sello-fondo); filter: none; }
.boton.peligro { background: var(--rojo); border-color: var(--rojo); }
.boton[disabled], .boton.apagado { background: #E6E9EE; border-color: #E6E9EE; color: #8A92A0; cursor: not-allowed; filter: none; }
.boton.ancho { width: 100%; }
.enlace { color: var(--sello); font-weight: 700; white-space: nowrap; background: none; border: 0; padding: 0; cursor: pointer; }
.enlace:hover { text-decoration: underline; }
form.enlinea { display: inline; }

/* Filtros y fichas */
.filtros { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; font-size: 0.86rem; }
.filtros .sep { width: 1px; height: 20px; background: var(--regla); margin: 0 6px; }
.ficha { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--regla); background: var(--blanco); font-size: 0.84rem; white-space: nowrap; cursor: pointer; }
.ficha:hover { border-color: #9AA1AE; }
.ficha.on { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.anio { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.anio a { color: var(--sello); padding: 0 4px; }

/* Campos: una columna, 560 como máximo; el ancho lo decide el dato (regla 8) */
.forma { max-width: 560px; display: grid; gap: 4px; }
.rotulo { font-size: 0.84rem; font-weight: 700; margin: 12px 0 5px; display: block; }
.ayuda { font-size: 0.8rem; color: var(--grafito); margin-top: 3px; }
.campo { height: 40px; padding: 0 11px; border: 1px solid #B9C0CB; border-radius: 8px; background: var(--blanco); font-size: 0.95rem; width: 100%; }
.campo:focus { outline: 0; border-color: var(--sello); box-shadow: 0 0 0 3px rgba(59,58,168,.18); }
.campo.dato { font-family: var(--f-dato); }
select.campo { padding-right: 28px; }
.w-rfc { width: 160px; } .w-pass { width: 260px; } .w-linea { width: 230px; } .w-folio { width: 350px; } .w-nombre { width: 480px; }
.w-codigo { width: 150px; font-family: var(--f-dato); font-size: 1.3rem; letter-spacing: 0.3em; text-align: center; }
.w-importe { width: 160px; font-family: var(--f-dato); text-align: right; }
.w-fecha { width: 170px; }
.contrasena { display: flex; gap: 8px; align-items: center; }
.error-campo { color: var(--rojo); font-size: 0.84rem; margin-top: 4px; }

/* Tablas: títulos 32 · grupo 36 · renglón 44 */
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th { height: 32px; padding: 0 12px; text-align: left; font-weight: 400; font-size: 0.78rem; color: var(--grafito); border-bottom: 1px solid var(--regla); white-space: nowrap; }
td { height: 44px; padding: 0 12px; border-bottom: 1px solid #E6E9EE; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
tbody:last-child tr:last-child td { border-bottom: 0; }
tr.grupo td { height: 36px; background: #FAFBFC; font-weight: 700; font-size: 0.88rem; border-bottom: 1px solid var(--regla); }
tr.grupo td .nota { font-weight: 400; color: var(--grafito); margin-left: 8px; }
tr.grupo .plegar { background: none; border: 0; padding: 0; cursor: pointer; font-weight: inherit; display: inline-flex; gap: 6px; align-items: center; }
tbody.plegado tr.grupo td { color: var(--grafito); font-weight: 400; }
tbody.plegado tr:not(.grupo) { display: none; }
tr.sub td { height: 30px; font-size: 0.84rem; color: var(--grafito); padding-left: 40px; background: #FCFCFD; }
tr.mas td { height: 36px; color: var(--grafito); font-size: 0.86rem; }
tr.fila-enlace { cursor: pointer; }
tr.fila-enlace:hover td { background: #FAFBFD; }
td.n { text-align: right; font-family: var(--f-dato); }
th.n { text-align: right; }
td.acc { text-align: right; }
td .nombre { font-weight: 700; }
td.sang { padding-left: 28px; }
tr.elegido td { background: var(--sello-fondo); }
td.abierta { height: auto; padding: 14px 16px 16px 40px; white-space: normal; overflow: visible; }

/* Señales: se distinguen por su forma. Relleno quiere decir certeza. */
.sg { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; white-space: nowrap; }
svg.s { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -4px; }
.sg svg { display: block; }
.sg .num { font-family: var(--f-dato); font-size: 0.8rem; }
.tira { display: inline-flex; gap: 2px; vertical-align: middle; }
.tira svg.s { width: 13px; height: 13px; display: block; }
.leyenda { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.8rem; color: var(--grafito); padding: 8px 16px; border-bottom: 1px solid var(--regla); }
.leyenda span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Cuadrícula de cobertura: celda × 36; grupo 28 */
.rejilla th, .rejilla td { padding: 0 0 0 10px; }
.rejilla td { height: 36px; }
.rejilla th.mes { font-family: var(--f-dato); font-size: 0.76rem; }
.rejilla tr.grupo td { height: 28px; font-size: 0.84rem; padding-left: 16px; }
.rejilla td.doc { padding-left: 34px; }
.rejilla td a.celda { display: flex; align-items: center; height: 30px; border-radius: 7px; padding-left: 2px; }
.rejilla td a.celda:hover { background: var(--sello-fondo); }
.rejilla td.sel a.celda { outline: 2px solid var(--sello); outline-offset: -1px; background: var(--sello-fondo); }
.rejilla td.abarca { padding-right: 6px; }
.rejilla td.abarca div { height: 24px; border-radius: 6px; background: var(--verde-fondo); display: flex; align-items: center; gap: 6px; padding: 0 8px; font-size: 0.8rem; }
.franja-detalle { border-top: 2px solid var(--tinta); background: #FAFBFC; padding: 12px 16px 14px; display: grid; grid-template-columns: 1fr auto; gap: 6px 20px; align-items: center; }
.franja-detalle .que { font-weight: 700; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.franja-detalle .acciones { display: flex; gap: 8px; grid-row: span 2; flex-wrap: wrap; justify-content: flex-end; }

/* e.firma: soltar los dos archivos, lo que se leyó, la contraseña */
.soltar { max-width: 560px; min-height: 96px; border: 2px dashed #9AA1AE; border-radius: 10px; background: #FAFBFC; display: grid; place-items: center; text-align: center; color: var(--grafito); font-size: 0.9rem; padding: 12px; cursor: pointer; }
.soltar.encima { border-color: var(--sello); background: var(--sello-fondo); }
.soltar.listo { border-style: solid; border-color: var(--positiva); background: var(--verde-fondo); color: var(--tinta); place-items: stretch; text-align: left; padding: 8px 14px; display: grid; gap: 3px; }
.soltar.listo span.arch { display: flex; align-items: center; gap: 8px; }
.paso-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--tinta); color: #fff; font-family: var(--f-dato); font-size: 0.76rem; margin-right: 8px; }
.leido { max-width: 560px; border: 1px solid var(--regla); border-radius: 10px; }
.leido div { display: grid; grid-template-columns: 110px 1fr auto; gap: 12px; align-items: center; min-height: 34px; padding: 0 12px; border-bottom: 1px solid #E6E9EE; font-size: 0.9rem; }
.leido div:last-child { border-bottom: 0; }
.bien { color: var(--positiva); font-weight: 700; font-size: 0.84rem; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mal { color: var(--rojo); font-weight: 700; font-size: 0.84rem; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }

/* Pedir un trámite: los meses pintados con lo que ya se tiene, y su casilla */
.mes-pedir { display: grid; justify-items: center; gap: 5px; padding: 7px 0 8px; border-radius: 8px; font-size: .78rem; }
a.mes-pedir:hover { background: var(--sello-fondo); }
.mes-pedir .caja { width: 18px; height: 18px; border: 1.5px solid #9AA1AE; border-radius: 4px; background: #fff; }
.mes-pedir.sel .caja { background: var(--sello); border-color: var(--sello); box-shadow: inset 0 0 0 3px #fff; }
.mes-pedir.futuro { opacity: .35; }

/* Avisos dentro de la pantalla (nunca ventanas encima, regla 3) */
.aviso { border: 1px solid var(--regla); border-left: 4px solid var(--sello); border-radius: 10px; background: var(--blanco); padding: 12px 16px; }
.aviso.ambar { border-left-color: var(--ambar); background: #FFFBF2; }
.aviso.rojo { border-left-color: var(--rojo); background: #FFF8F7; }
.aviso.verde { border-left-color: var(--positiva); background: #F5FBF7; }
.aviso h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.aviso p + p { margin-top: 6px; }
.avisos { display: grid; gap: 10px; margin-bottom: 14px; }
.barra-pie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; height: 64px; background: var(--blanco); border-top: 1px solid var(--regla); }
.barra-pie .dentro { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

/* Renglones de dos líneas (sólo en las entradas del día): 64 */
.asunto { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; min-height: 56px; padding: 6px 16px; border-bottom: 1px solid #E6E9EE; }
.asunto:last-child { border-bottom: 0; }
.asunto .que { font-weight: 700; }
.asunto .de { font-size: 0.84rem; color: var(--grafito); }
.asunto.una { min-height: 44px; }
details.grupo > summary { list-style: none; cursor: pointer; }
details.grupo > summary::-webkit-details-marker { display: none; }
.cab-grupo { display: flex; justify-content: space-between; align-items: center; min-height: 36px; padding: 0 16px; background: #FAFBFC; border-bottom: 1px solid var(--regla); font-weight: 700; font-size: 0.88rem; gap: 12px; }
details.grupo:not([open]) > .cab-grupo { font-weight: 400; color: var(--grafito); }
details.grupo:not([open]) > .cab-grupo .flecha::before { content: '▸'; }
details.grupo[open] > .cab-grupo .flecha::before { content: '▾'; }
.cab-grupo .nota { font-weight: 400; color: var(--grafito); }
.par { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 34px; padding: 0 16px; border-bottom: 1px solid #E6E9EE; font-size: 0.9rem; }
.par:last-child { border-bottom: 0; }

/* Franja de «estás viendo como otro»: un color que no se usa en nada más */
.viendo { background: var(--franja); color: #fff; min-height: 44px; font-size: 0.9rem; background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 10px, transparent 10px 20px); position: sticky; top: 0; z-index: 12; }
.viendo .dentro { min-height: 44px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.viendo b { letter-spacing: 0.04em; }
.viendo .fin { margin-left: auto; display: flex; gap: 8px; }
.viendo .boton { height: 30px; background: transparent; border-color: rgba(255,255,255,.6); font-size: 0.84rem; color: #fff; }
.viendo .boton.claro { background: #fff; color: var(--franja); border-color: #fff; }
.no-puede { font-size: 0.8rem; color: var(--grafito); font-style: italic; }

/* Entrar: una sola columna al centro, con la marca */
.entrar { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.entrar .caja { width: 100%; max-width: 420px; background: var(--blanco); border: 1px solid var(--regla); border-radius: 14px; padding: 28px 28px 24px; }
.entrar .marca { margin-bottom: 22px; font-size: 1.1rem; }
.entrar .marca svg { width: 34px; }
.entrar h1 { font-family: var(--f-titulo); font-stretch: 125%; font-size: 1.25rem; margin-bottom: 6px; }
.entrar .qr { display: grid; place-items: center; padding: 12px; border: 1px solid var(--regla); border-radius: 10px; background: #fff; margin: 12px 0; }
.entrar .qr svg { width: 200px; height: 200px; }
.entrar .clave { font-family: var(--f-dato); font-size: 1rem; letter-spacing: 0.06em; word-spacing: 0.3em; background: var(--papel); border-radius: 8px; padding: 8px 10px; text-align: center; }
.entrar .pie { margin-top: 18px; font-size: 0.8rem; color: var(--grafito); }
.entrar ol { padding-left: 20px; margin: 8px 0; font-size: 0.9rem; }
.entrar ol li { margin: 4px 0; }

/* Celular: los lugares bajan a una barra fija al pie (regla 11) */
.lugares-cel { display: none; }
.solo-cel { display: none; }
.cel-doc { color: inherit; }
.cel-mes .cel-acciones { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
@media (max-width: 860px) {
  .dentro { padding: 0 16px; }
  .buscar { display: none; }
  .barra .lugares { display: none; }
  .barra .fin > .boton { display: none; }
  .lugares-cel { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; height: 58px; background: var(--blanco); border-top: 1px solid var(--regla); }
  .lugares-cel a { display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: var(--grafito); }
  .lugares-cel a.aqui { color: var(--sello); }
  body.con-menu { padding-bottom: 58px; }
  .barra-pie { bottom: 58px; }
  .cols.lado { grid-template-columns: 1fr; }
  .cabeza .dentro { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .cabeza .fin { margin-left: 0; }
  .ruta .migas { display: none; }
  .pestanas .dentro { overflow-x: auto; }
  .pestanas .fin { display: none; }
  .w-nombre, .w-folio { width: 100%; }
  .franja-detalle { grid-template-columns: 1fr; }
  .franja-detalle .acciones { justify-content: flex-start; grid-row: auto; }
  /* La ruta en una línea: sin «Última lectura del SAT» (sigue en la computadora). */
  .ruta .lectura { display: none; }
  .ruta .paso { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* Hoy: la tira «de un vistazo» baja a dos renglones en lugar de salirse de la pantalla. */
  .pestanas:has(.avance) { height: auto; }
  .avance { height: auto; flex-wrap: wrap; row-gap: 4px; column-gap: 16px; padding: 10px 0; white-space: normal; }
  .avance .etq { flex-basis: 100%; }
  .filtros .campo { width: 100% !important; }
  .filtros .sep { display: none; }
  /* Tablas que en el teléfono son tarjetas: una por renglón, sin encabezados ni columnas de más. */
  .tabla-cel { table-layout: auto; }
  .tabla-cel colgroup, .tabla-cel thead, .tabla-cel .cel-no { display: none; }
  .tabla-cel, .tabla-cel tbody, .tabla-cel tr, .tabla-cel td { display: block; width: 100%; }
  .tabla-cel tr { padding: 8px 16px; border-bottom: 1px solid #E6E9EE; }
  .tabla-cel tr.grupo { padding: 0; }
  .tabla-cel td { height: auto; padding: 2px 0; border: 0; white-space: normal; }
  .tabla-cel td.sang { padding-left: 0; }
  .tabla-cel tr.grupo td { padding: 8px 16px; }
  .tabla-cel tbody.plegado tr:not(.grupo), .tabla-cel tr[hidden] { display: none; }
  .solo-cel { display: block; }
  .solo-compu { display: none !important; }
  .panel .tit { flex-wrap: wrap; row-gap: 2px; }
  .rejilla .filtros > span[style*="margin-left:auto"] { display: none; }
}
/* El punto que late junto a un grupo plegado que pide acción: late despacio mientras nadie lo abre (Yerik, 30 sep:
   que siga invitando); ya abierto ese día en esta computadora, se queda quieto. */
.latido { position: relative; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rojo); margin-left: 9px; vertical-align: middle; }
.latido::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--rojo); animation: latido 2s ease-out 0.4s infinite; }
.latido.visto::after { animation: none; }
@keyframes latido { 0% { transform: scale(1); opacity: .65; } 100% { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .latido::after { animation: none; } }
tr.ambito td { height: 30px; padding-top: 10px; font-family: var(--f-dato); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--grafito); background: var(--blanco); border-bottom: 1px solid var(--regla); }
.etiqueta { font-family: var(--f-dato); font-size: .7rem; color: var(--grafito); border: 1px solid var(--regla); border-radius: 999px; padding: 0 7px; margin-left: 6px; }
.anio i.sin { font-style: normal; color: #C3C8D0; padding: 0 4px; cursor: default; }

/* ── El visor de documentos, como el de BCI (revisión de Yerik, 30 sep) ── */
.visor { position: fixed; inset: 0; z-index: 60; background: rgba(23, 32, 51, .6); display: flex; flex-direction: column; }
.visor-barra { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--tinta); color: #fff; }
.visor-barra .clase { font-family: var(--f-dato); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.visor-barra .nombre { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.visor-marco { flex: 1; border: 0; background: #fff; }
.visor-aviso { flex: 1; display: grid; place-content: center; text-align: center; color: #fff; gap: 6px; }
.visor-aviso .grande { font-family: var(--f-titulo); font-stretch: 125%; font-size: 1.1rem; font-weight: 700; }
body.con-visor { overflow: hidden; }

/* ── La ficha de una factura (revisión de Yerik, 30 sep) ── */
tr.fila-desplegar { cursor: pointer; }
tr.fila-desplegar:hover td { background: var(--sello-fondo); }
tr.fila-desplegar.desplegada td { background: var(--sello-fondo); border-bottom-color: var(--sello-claro); }
tr.fila-detalle > td.abierta { padding: 12px 16px 16px; background: var(--papel); border-bottom: 2px solid var(--sello-claro); }
tr.fila-detalle .factura { gap: 10px; }
.factura { display: grid; gap: 12px; }
.fac-cabeza { padding: 16px; }
.fac-fila { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fac-total { font-family: var(--f-dato); font-size: 1.9rem; font-weight: 500; line-height: 1.15; margin: 2px 0; }
.fac-total small { font-size: .9rem; color: var(--grafito); }
.fac-estatus { text-align: right; }
.fac-acciones { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
.fac-partes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--regla); }
.fac-partes p { margin: 1px 0; }
@media print { .no-imprimir { display: none !important; } .factura .desliza { overflow: visible; } }

/* ── Lo que recibe el contribuyente (DISENO § 9, la muestra celular-contribuyente.png): una columna de teléfono ── */
.entrega-fondo { min-height: 100vh; }
.entrega { max-width: 440px; margin: 28px auto; background: var(--papel); border: 1px solid var(--regla); border-radius: 22px; overflow: hidden; }
.entrega .c-barra { min-height: 52px; background: var(--blanco); border-bottom: 1px solid var(--regla); display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; font-weight: 700; }
.entrega .c-ruta { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-size: 0.84rem; color: var(--grafito); border-bottom: 1px solid var(--regla); }
.entrega .c-ruta .enlace { color: var(--sello); font-weight: 700; }
.entrega .c-cuerpo { padding: 16px 16px 20px; display: grid; gap: 12px; align-content: start; }
.entrega h1 { font-family: var(--f-titulo); font-stretch: 125%; font-size: 1.14rem; font-weight: 700; line-height: 1.22; }
.entrega .bloque { background: var(--blanco); border: 1px solid var(--regla); border-radius: 12px; padding: 12px 14px; }
.entrega .bloque.bien-hecho { border-color: var(--positiva); background: var(--verde-fondo); }
.entrega .bloque.tropiezo { border-color: var(--rojo); background: var(--rojo-fondo); color: var(--rojo); font-weight: 700; }
.entrega .grande { font-family: var(--f-titulo); font-stretch: 125%; font-size: 1.12rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.entrega .lista-si { display: grid; gap: 6px; font-size: 0.93rem; }
.entrega .lista-si > span { display: flex; gap: 8px; align-items: flex-start; }
.entrega .boton { height: 46px; width: 100%; font-size: 0.95rem; }
.entrega .boton.r { height: 44px; width: auto; flex: none; }
.entrega .campo { height: 44px; font-size: 1rem; }
.entrega .elegir { cursor: pointer; }
.entrega input.oculto:focus-visible + .elegir { outline: 3px solid var(--sello); outline-offset: 2px; }
.entrega .archivo-elegido { font-size: 0.86rem; overflow-wrap: anywhere; margin-left: 6px; }
.entrega .bien { white-space: normal; margin-top: 8px; }
.entrega .mal { color: var(--rojo); font-weight: 700; font-size: 0.86rem; margin-top: 8px; display: block; white-space: normal; overflow-wrap: anywhere; }
.entrega .por-vencer { color: var(--ambar); font-weight: 700; font-size: 0.86rem; margin-top: 6px; }
.entrega .c-cuerpo > * { min-width: 0; }
.entrega .bien span, .entrega .archivo-elegido { overflow-wrap: anywhere; min-width: 0; }
.entrega .pie { text-align: center; font-size: 0.84rem; color: var(--grafito); }
@media (max-width: 480px) { .entrega { margin: 0; border: 0; border-radius: 0; min-height: 100vh; } }
@media print { .entrega .no-imprimir { display: none !important; } .entrega { border: 0; margin: 0 auto; } }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .barra, .ruta .fin, .pestanas, .lugares-cel, .barra-pie, .viendo .fin { display: none !important; } body { background: #fff; } }
