/* Consola de IE · familia visual de la web de IE. Sin modo oscuro (B3). */
@font-face { font-family: "Anton"; src: url("fuentes/anton.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fuentes/figtree.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --azul: #1b2fff;
  --azul-osc: #0f1fd6;
  --azul-suave: #eceeff;
  --fondo: #f7f5f0;
  --blanco: #ffffff;
  --tinta: #15152b;
  --tinta-2: #4b4c63;
  --borde: #e2dfd6;
  --borde-fuerte: #c9c5b9;
  --verde: #126b2e; --verde-f: #e2f3e7;
  --ambar: #845000; --ambar-f: #fcefd2;
  --rojo: #a5221a; --rojo-f: #fde4e1;
  --gris: #4a4a55; --gris-f: #ebeae6;
  --radio: 10px;
  --sombra: 0 1px 2px rgba(21, 21, 43, .06), 0 4px 16px rgba(21, 21, 43, .04);
  --lateral: 236px;
}

* { box-sizing: border-box; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
       line-height: 1.5; font-size: 1rem; }
h1, h2, h3 { font-family: "Anton", "Impact", sans-serif; font-weight: 400; letter-spacing: .01em; line-height: 1.15; margin: 0; }
h1 { font-size: 2.15rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.12rem; letter-spacing: .02em; }
a { color: var(--azul); text-underline-offset: 3px; }
a:hover { color: var(--azul-osc); }
p { margin: 0 0 .6rem; }
small, .pequeno { font-size: .875rem; color: var(--tinta-2); }
.muted { color: var(--tinta-2); }
.oculto-visual { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Foco visible con teclado (AA) */
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; border-radius: 4px; }
.saltar { position: absolute; left: -999px; top: 8px; background: var(--azul); color: #fff; padding: .5rem 1rem; z-index: 100; border-radius: 6px; }
.saltar:focus { left: 8px; }

/* ---------------------------------------------------------------- estructura */
.lateral { position: fixed; inset: 0 auto 0 0; width: var(--lateral); background: var(--blanco); border-right: 1px solid var(--borde);
           display: flex; flex-direction: column; padding: 1.4rem 1rem; gap: 1.2rem; z-index: 20; }
.marca { display: flex; align-items: baseline; gap: .45rem; text-decoration: none; color: var(--tinta); padding: 0 .5rem; }
.marca b { font-family: "Anton", sans-serif; font-weight: 400; font-size: 1.6rem; letter-spacing: .02em; }
.marca span { font-size: .875rem; color: var(--tinta-2); }
.marca i { width: 10px; height: 10px; background: var(--azul); border-radius: 2px; display: inline-block; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; justify-content: space-between; align-items: center; padding: .55rem .7rem; border-radius: 8px; color: var(--tinta);
         text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--fondo); }
.nav a[aria-current="page"] { background: var(--azul); color: #fff; }
.nav a[aria-current="page"] .contador { background: #fff; color: var(--azul); }
.contador { background: var(--azul); color: #fff; font-size: .8rem; font-weight: 700; border-radius: 999px; padding: 0 .5rem; min-width: 1.6rem; text-align: center; }
.lateral-pie { margin-top: auto; font-size: .875rem; color: var(--tinta-2); padding: 0 .5rem; }
.lateral-pie strong { color: var(--tinta); display: block; font-weight: 600; }

.principal { margin-left: var(--lateral); min-height: 100vh; }
.barra { position: sticky; top: 0; z-index: 10; background: rgba(247, 245, 240, .92); backdrop-filter: blur(6px);
         display: flex; align-items: center; gap: 1rem; padding: .8rem 2.2rem; border-bottom: 1px solid var(--borde); }
.contenido { padding: 2rem 2.2rem 4rem; max-width: 1280px; }
.cabecera { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.cabecera p { margin: .35rem 0 0; color: var(--tinta-2); }
.migas { font-size: .875rem; color: var(--tinta-2); margin-bottom: .4rem; }
.migas a { color: var(--tinta-2); }
.acciones { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Buscador global */
.buscador { position: relative; flex: 1; max-width: 560px; }
.buscador input { width: 100%; padding: .6rem .9rem .6rem 2.3rem; border: 1px solid var(--borde-fuerte); border-radius: 999px; background: var(--blanco);
                  font: inherit; color: var(--tinta); }
.buscador svg { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--tinta-2); }
.buscador kbd { position: absolute; right: .7rem; top: 50%; transform: translateY(-50%); }
kbd { font-family: inherit; font-size: .8rem; border: 1px solid var(--borde-fuerte); border-bottom-width: 2px; border-radius: 5px; padding: 0 .4rem; color: var(--tinta-2); background: var(--blanco); }
.resultados { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio);
              box-shadow: var(--sombra); padding: .4rem; max-height: 70vh; overflow: auto; }
.resultados:empty { display: none; }
.resultados h4 { margin: .5rem .6rem .2rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tinta-2); }
.resultados a { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .6rem; border-radius: 6px; color: var(--tinta); text-decoration: none; }
.resultados a:hover, .resultados a:focus { background: var(--azul-suave); }
.resultados a small { white-space: nowrap; }
.usuario-barra { margin-left: auto; display: flex; align-items: center; gap: .8rem; font-size: .9rem; }

/* Selector de rol (solo maqueta) */
.maqueta { display: flex; align-items: center; gap: .35rem; font-size: .875rem; background: var(--ambar-f); color: var(--ambar);
           border: 1px dashed #d9a441; border-radius: 999px; padding: .2rem .3rem .2rem .7rem; }
.maqueta a { color: var(--ambar); text-decoration: none; padding: .1rem .5rem; border-radius: 999px; font-weight: 600; }
.maqueta a[aria-current="true"] { background: var(--ambar); color: #fff; }

/* ---------------------------------------------------------------- piezas */
.panel { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 1.4rem 1.5rem; }
.panel + .panel, .bloque + .bloque { margin-top: 1.4rem; }
.panel-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.rejilla-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
.rejilla-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.rejilla-lateral { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.4rem; align-items: start; }
.pegajoso { position: sticky; top: 84px; }

.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.6rem; }
.cifra { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 1.1rem 1.2rem; box-shadow: var(--sombra); }
.cifra dt { font-size: .875rem; color: var(--tinta-2); font-weight: 500; }
.cifra dd { margin: .25rem 0 0; font-family: "Anton", sans-serif; font-size: 1.95rem; line-height: 1.1; letter-spacing: .01em; }
.cifra dd small { font-family: "Figtree", sans-serif; font-size: .875rem; margin-left: .25rem; }
.cifra .nota { margin-top: .3rem; font-size: .875rem; color: var(--tinta-2); }
.cifra.alerta dd { color: var(--rojo); }

.estado { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; padding: .12rem .6rem; border-radius: 999px; white-space: nowrap; }
.estado::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.estado-verde { background: var(--verde-f); color: var(--verde); }
.estado-ambar { background: var(--ambar-f); color: var(--ambar); }
.estado-rojo { background: var(--rojo-f); color: var(--rojo); }
.estado-gris { background: var(--gris-f); color: var(--gris); }
.estado-azul { background: var(--azul-suave); color: var(--azul); }

.boton { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; font-size: .93rem; cursor: pointer;
         padding: .5rem 1rem; border-radius: 8px; border: 1px solid var(--azul); background: var(--azul); color: #fff; text-decoration: none; white-space: nowrap;
         min-height: 38px; }
.boton:hover { background: var(--azul-osc); border-color: var(--azul-osc); color: #fff; }
.boton.sec { background: var(--blanco); color: var(--azul); }
.boton.sec:hover { background: var(--azul-suave); color: var(--azul-osc); }
.boton.peligro { background: var(--blanco); color: var(--rojo); border-color: #e3a29c; }
.boton.peligro:hover { background: var(--rojo-f); }
.boton.peligro-lleno { background: var(--rojo); border-color: var(--rojo); color: #fff; }
.boton.peq { padding: .3rem .7rem; font-size: .875rem; min-height: 32px; }
.boton.grande { padding: .8rem 1.4rem; font-size: 1.05rem; }
.boton[disabled], .boton[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.enlace { background: none; border: 0; padding: 0; font: inherit; color: var(--azul); text-decoration: underline; cursor: pointer; }

.aviso { border-radius: 8px; padding: .75rem 1rem; border: 1px solid; margin: 0 0 1rem; font-size: .95rem; }
.aviso-verde { background: var(--verde-f); color: var(--verde); border-color: #b5dcc0; }
.aviso-ambar { background: var(--ambar-f); color: var(--ambar); border-color: #ecd09a; }
.aviso-rojo { background: var(--rojo-f); color: var(--rojo); border-color: #f0b9b3; }
.aviso-azul { background: var(--azul-suave); color: var(--azul-osc); border-color: #c7ccff; }
.aviso ul { margin: .3rem 0 0; padding-left: 1.2rem; }

.no-disponible { border: 1px dashed var(--borde-fuerte); border-radius: var(--radio); padding: 1.3rem 1.4rem; background: repeating-linear-gradient(-45deg, #fbfaf7, #fbfaf7 10px, #f6f4ee 10px, #f6f4ee 20px); color: var(--tinta-2); }
.no-disponible strong { color: var(--tinta); display: block; margin-bottom: .2rem; }
.vacio { text-align: center; padding: 2.5rem 1rem; color: var(--tinta-2); }
.vacio strong { display: block; color: var(--tinta); font-size: 1.05rem; }

/* Chips de filtro */
.filtros { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.fila-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.fila-chips > span { font-size: .875rem; color: var(--tinta-2); min-width: 6.5rem; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .75rem; border-radius: 999px; border: 1px solid var(--borde-fuerte); background: var(--blanco);
        color: var(--tinta); text-decoration: none; font-size: .875rem; font-weight: 500; }
.chip:hover { border-color: var(--azul); color: var(--azul); }
.chip[aria-pressed="true"] { background: var(--azul); border-color: var(--azul); color: #fff; }
.chip .x { font-weight: 700; }
.herramientas { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.herramientas input[type=search] { min-width: 280px; }

/* Tablas */
.tabla-envoltorio { overflow-x: auto; }
table.tabla { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabla th { text-align: left; font-weight: 600; font-size: .82rem; color: var(--tinta-2); text-transform: uppercase; letter-spacing: .05em;
            padding: .55rem .75rem; border-bottom: 1px solid var(--borde-fuerte); white-space: nowrap; }
.tabla td { padding: .7rem .75rem; border-bottom: 1px solid var(--borde); vertical-align: middle; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla tbody tr:hover { background: #fcfbf8; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla .accion { text-align: right; white-space: nowrap; }
.tabla .principal-celda a { font-weight: 600; color: var(--tinta); text-decoration: none; }
.tabla .principal-celda a:hover { color: var(--azul); text-decoration: underline; }
.tabla .sub { display: block; font-size: .875rem; color: var(--tinta-2); }
.tabla tr.rojo td { background: #fff7f6; }
.tabla tfoot td { font-weight: 700; border-top: 2px solid var(--borde-fuerte); }
.neg { color: var(--rojo); font-weight: 700; }
.pos { color: var(--verde); }

.paginacion { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; font-size: .9rem; color: var(--tinta-2); flex-wrap: wrap; }
.paginacion nav { display: flex; gap: .3rem; }

/* Pestañas */
.pestanas { display: flex; gap: .2rem; border-bottom: 1px solid var(--borde-fuerte); margin-bottom: 1.4rem; overflow-x: auto; }
.pestanas a { padding: .65rem 1rem; text-decoration: none; color: var(--tinta-2); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pestanas a:hover { color: var(--tinta); }
.pestanas a[aria-current="page"] { color: var(--azul); border-color: var(--azul); }

/* Datos clave-valor */
dl.datos { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 0; }
dl.datos dt { color: var(--tinta-2); font-size: .92rem; }
dl.datos dd { margin: 0; }
.id-copiable { font: inherit; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: .8rem; color: var(--tinta-2); background: var(--fondo);
               border: 1px solid var(--borde); border-radius: 5px; padding: .05rem .4rem; cursor: copy; }
.id-copiable:hover { border-color: var(--azul); color: var(--azul); }
.id-copiable.copiado::after { content: " ✓ copiado"; color: var(--verde); }

/* Uso frente al límite */
.uso { display: grid; gap: 1rem; }
.uso-fila { display: grid; grid-template-columns: 220px 1fr 160px; gap: 1rem; align-items: center; }
meter { width: 100%; height: 12px; }
meter::-webkit-meter-bar { background: var(--gris-f); border: 0; border-radius: 99px; height: 12px; }
meter::-webkit-meter-optimum-value { background: var(--azul); border-radius: 99px; }
meter::-webkit-meter-suboptimum-value { background: #d08a00; border-radius: 99px; }
meter::-webkit-meter-even-less-good-value { background: var(--rojo); border-radius: 99px; }
meter:-moz-meter-optimum::-moz-meter-bar { background: var(--azul); }
meter:-moz-meter-sub-optimum::-moz-meter-bar { background: #d08a00; }
meter:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: var(--rojo); }

/* Formularios */
label { font-weight: 600; font-size: .93rem; display: block; margin-bottom: .3rem; }
.campo { margin-bottom: 1rem; }
.campo small { display: block; margin-top: .25rem; }
input[type=text], input[type=email], input[type=search], input[type=number], input[type=url], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--tinta); background: var(--blanco); border: 1px solid var(--borde-fuerte); border-radius: 8px; padding: .55rem .75rem; min-height: 40px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--azul); outline: 3px solid rgba(27, 47, 255, .18); outline-offset: 0; }
input[readonly] { background: var(--fondo); }
.campos-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.campos-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; }
.opciones { display: flex; flex-wrap: wrap; gap: .5rem; }
.opcion { position: relative; }
.opcion input { position: absolute; opacity: 0; inset: 0; }
.opcion span { display: block; padding: .55rem .9rem; border: 1px solid var(--borde-fuerte); border-radius: 8px; background: var(--blanco); cursor: pointer; font-weight: 500; }
.opcion span small { display: block; font-weight: 400; }
.opcion input:checked + span { border-color: var(--azul); background: var(--azul-suave); color: var(--azul-osc); box-shadow: inset 0 0 0 1px var(--azul); }
.opcion input:focus-visible + span { outline: 3px solid var(--azul); outline-offset: 2px; }
.cantidad { display: grid; grid-template-columns: 1fr 96px; gap: .8rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--borde); }
.cantidad:last-child { border-bottom: 0; }
.cantidad label { margin: 0; font-weight: 500; }
.cantidad small { display: block; font-weight: 400; }
.secreto { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .7rem .9rem; border: 1px solid var(--borde); border-radius: 8px; background: var(--fondo); }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 600; font-size: .93rem; margin-bottom: .4rem; padding: 0; }

/* Pasos del editor */
.paso-editor { counter-increment: paso; }
.paso-editor > h2::before { content: counter(paso); display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--azul);
                            color: #fff; font-family: "Figtree", sans-serif; font-weight: 700; font-size: .95rem; margin-right: .6rem; vertical-align: .15em; }
.editor { counter-reset: paso; }
.resumen-lineas { width: 100%; border-collapse: collapse; font-size: .95rem; }
.resumen-lineas td { padding: .45rem 0; border-bottom: 1px solid var(--borde); vertical-align: top; }
.resumen-lineas td.num { text-align: right; white-space: nowrap; padding-left: 1rem; font-variant-numeric: tabular-nums; }
.resumen-lineas tr.total td { border-bottom: 0; font-weight: 700; font-size: 1.05rem; padding-top: .7rem; }
.resumen-lineas tr.sub td { color: var(--tinta-2); border-bottom: 0; padding: .15rem 0; }
.grande-total { font-family: "Anton", sans-serif; font-size: 2rem; }

/* Diálogo propio (no alert) */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(520px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(21, 21, 43, .3); color: var(--tinta); }
dialog::backdrop { background: rgba(21, 21, 43, .45); }
dialog form { padding: 1.5rem; }
dialog h2 { margin-bottom: .6rem; }
dialog .acciones { justify-content: flex-end; margin-top: 1.2rem; }

.avisos-flotantes { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 50; display: flex; flex-direction: column; gap: .5rem; max-width: 420px; }
.avisos-flotantes .aviso { box-shadow: var(--sombra); margin: 0; }

.linea-tiempo { list-style: none; padding: 0; margin: 0; }
.linea-tiempo li { display: grid; grid-template-columns: 160px 1fr auto; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--borde); align-items: start; }
.linea-tiempo li:last-child { border-bottom: 0; }
.para-hoy li { grid-template-columns: 1fr auto; }

.etiqueta { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tinta-2);
            background: var(--fondo); border: 1px solid var(--borde); border-radius: 5px; padding: 0 .4rem; }
.ejemplos { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.correo-cliente { white-space: pre-wrap; font-size: .93rem; background: var(--fondo); border: 1px solid var(--borde); border-radius: 8px; padding: .8rem 1rem; }
.dudas li { margin-bottom: .3rem; }
.codigo { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; word-break: break-all; }

/* ---------------------------------------------------------------- acceso */
.acceso { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.acceso .panel { width: min(440px, 100%); padding: 2.2rem; text-align: center; }
.acceso h1 { font-size: 2.4rem; margin: .6rem 0 .4rem; }
.acceso .boton { width: 100%; margin-top: 1.2rem; }
.acceso input { text-align: center; font-size: 1.6rem; letter-spacing: .4em; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- página del cliente (presupuesto) */
.pc { max-width: 760px; margin: 0 auto; padding: 2.5rem 16px 4rem; }
.pc header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.pc .panel { padding: 1.8rem; }
.pc h1 { font-size: 2.6rem; }
.pc .total-caja { background: var(--azul); color: #fff; border-radius: var(--radio); padding: 1.3rem 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.4rem 0; }
.pc .total-caja dt { font-size: .9rem; opacity: .85; }
.pc .total-caja dd { margin: 0; font-family: "Anton", sans-serif; font-size: 2rem; }
.casilla { display: flex; gap: .7rem; align-items: flex-start; font-weight: 400; margin: 1.2rem 0; }
.casilla input { width: 22px; height: 22px; margin-top: .1rem; flex: none; accent-color: var(--azul); }

/* ---------------------------------------------------------------- móvil */
.menu-movil { display: none; }
@media (max-width: 900px) {
  .lateral { display: none; }
  .menu-movil { display: block; position: sticky; top: 0; z-index: 30; background: var(--blanco); border-bottom: 1px solid var(--borde); }
  .menu-movil summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: .8rem 16px; cursor: pointer; }
  .menu-movil summary::-webkit-details-marker { display: none; }
  .menu-movil .nav { padding: 0 8px 12px; }
  .principal { margin-left: 0; }
  .barra { padding: .6rem 16px; position: static; flex-wrap: wrap; }
  .usuario-barra { margin-left: 0; width: 100%; justify-content: space-between; }
  .buscador kbd { display: none; }
  .contenido { padding: 1.2rem 16px 3rem; }
  h1 { font-size: 1.75rem; }
  .rejilla-2, .rejilla-3, .rejilla-lateral, .campos-2, .campos-3 { grid-template-columns: 1fr; }
  .pegajoso { position: static; }
  .uso-fila { grid-template-columns: 1fr; gap: .3rem; }
  .linea-tiempo li { grid-template-columns: 1fr; gap: .2rem; }
  .herramientas input[type=search] { min-width: 0; width: 100%; }
  .fila-chips > span { width: 100%; }
  /* Tablas que pasan a tarjetas */
  table.tarjetas-movil thead { display: none; }
  table.tarjetas-movil, table.tarjetas-movil tbody, table.tarjetas-movil tr, table.tarjetas-movil td { display: block; width: 100%; }
  table.tarjetas-movil tr { border: 1px solid var(--borde); border-radius: var(--radio); margin-bottom: .7rem; padding: .5rem .8rem; background: var(--blanco); }
  table.tarjetas-movil td { border: 0; padding: .3rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  table.tarjetas-movil td::before { content: attr(data-label); color: var(--tinta-2); font-size: .875rem; text-align: left; font-weight: 500; }
  table.tarjetas-movil td.principal-celda { display: block; text-align: left; font-size: 1.02rem; }
  table.tarjetas-movil td.principal-celda::before { content: none; }
  table.tarjetas-movil td.accion { justify-content: flex-end; }
  table.tarjetas-movil td.accion::before { content: none; }
  table.tarjetas-movil tfoot { display: block; }
  .pc .total-caja { grid-template-columns: 1fr; }
  dl.datos { grid-template-columns: 1fr; gap: 0; }
  dl.datos dd { margin-bottom: .6rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media print { .lateral, .barra, .menu-movil, .acciones { display: none !important; } .principal { margin: 0; } }

/* utilidades */
.arriba { margin-top: 1rem; }
hr { border: 0; border-top: 1px solid var(--borde); margin: 1.2rem 0; }
form.en-linea { display: inline-block; margin: 0; }
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { opacity: 1; }
details summary { cursor: pointer; color: var(--azul); font-weight: 500; }
.buscador input[type=search] { padding-left: 2.4rem; padding-right: 2.2rem; border-radius: 999px; }
.rejilla-2 > *, .rejilla-3 > *, .rejilla-lateral > * { margin-top: 0 !important; }
h1 small, h2 small, h3 small { font-family: "Figtree", sans-serif; font-size: .85rem; font-weight: 400; letter-spacing: 0; color: var(--tinta-2); }
.linea-medida .acciones { flex-wrap: nowrap; }
.linea-medida .acciones input { flex: 1; min-width: 0; }
.rejilla-2 + .panel, .rejilla-3 + .panel, .rejilla-lateral + .panel, .panel + .rejilla-2, .rejilla-2 + .rejilla-2, .tarjetas + .rejilla-2 { margin-top: 1.4rem !important; }
.pc .total-caja small { color: #fff; opacity: .9; font-size: .875rem; }
form.acciones input, form.acciones select { width: auto; flex: 1 1 200px; }
form.acciones select { flex: 0 1 160px; }
.panel h3 { margin: 1.2rem 0 .5rem; }
.panel-cab h3, .panel > h3:first-child { margin-top: 0; }
details.hecho { display: inline-block; text-align: left; }
details.hecho > summary { list-style: none; color: #fff; }
details.hecho > summary::-webkit-details-marker { display: none; }
details.hecho[open] form { margin-top: .6rem; min-width: 260px; background: var(--fondo); border: 1px solid var(--borde); border-radius: 8px; padding: .8rem; }
.acceso .qr { display: block; margin: 1rem auto; border: 1px solid var(--borde); border-radius: 8px; }
