/* Palmas del Río
   Verde profundo de la palma + el amarillo de las hojas de control.
   Pensado primero para computadora, y también para celular al sol. */

@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-display: swap; src: url(/vendor/fuentes/atkinson-400.woff2) format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-display: swap; src: url(/vendor/fuentes/atkinson-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 600; font-display: swap; src: url(/vendor/fuentes/barlow-600.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 700; font-display: swap; src: url(/vendor/fuentes/barlow-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Semi Condensed"; font-weight: 800; font-display: swap; src: url(/vendor/fuentes/barlow-800.woff2) format("woff2"); }

:root {
  --fronda: #0E3B26;      /* verde profundo: menús, botones, módulos */
  --fronda-2: #185236;    /* fronda al pasar el mouse */
  --hoja: #1F7A45;        /* verde hoja: año actual, lo elegido */
  --hoja-clara: #E3F0E7;
  --amarillo: #F5C518;    /* amarillo de la hoja de control: lo más importante */
  --oro: #C48A00;         /* año anterior en gráficas */
  --fondo: #EAF0E8;
  --blanco: #FFFFFF;
  --tinta: #0B2416;
  --tinta-2: #3E5446;
  --borde: #B9C7BC;
  --borde-fuerte: #3E5446;
  --rojo: #B3261E;
  --titulo: "Barlow Semi Condensed", "Arial Narrow", sans-serif;
  --texto: "Atkinson Hyperlegible", system-ui, sans-serif;
  --radio: 12px;
  --nav: 70px;
  --lateral: 232px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--texto);
  font-size: 17px;
  line-height: 1.45;
  color: var(--tinta);
  background: var(--fondo);
  padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 16px);
}
h1, h2, h3 { font-family: var(--titulo); font-weight: 700; line-height: 1.15; }
h2 { font-size: 1.35rem; margin: 20px 0 8px; }
a { color: var(--hoja); font-weight: 700; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--fronda); outline-offset: 2px; }
.ico { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ================= Estructura ================= */
#lateral { display: none; }

#barra {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 12px 16px 10px; padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--fronda); color: var(--blanco);
}
#titulo { font-size: 1.4rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#usuario { font-size: .9rem; opacity: .85; }

main { max-width: 1180px; margin: 0 auto; padding: 14px 16px; }
.pantalla { display: flex; flex-direction: column; gap: 14px; }
.pantalla > h2 { margin-bottom: 0; }

/* Menú inferior (celular) */
#nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--nav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--fronda);
}
#nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 100%; color: #CFE0D4; text-decoration: none; font-size: .78rem;
}
#nav a.activa { color: var(--blanco); }
#nav a.activa:not(.nav-registrar)::after { content: ""; width: 26px; height: 4px; border-radius: 2px; background: var(--amarillo); }
#nav .nav-registrar span {
  width: 54px; height: 54px; margin-top: -28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--amarillo); color: var(--fronda);
  border: 4px solid var(--fronda);
}
#nav .nav-registrar .ico { width: 28px; height: 28px; stroke-width: 3; }
body.sin-sesion #nav, body.sin-sesion #usuario, body.sin-sesion #lateral { display: none !important; }
body.sin-sesion { padding-bottom: 16px; padding-left: 0 !important; }

.solo-compu { display: none !important; }

/* ================= Textos generales ================= */
.cargando, .vacio { color: var(--tinta-2); text-align: center; padding: 24px 8px; margin: 0; }
.suave { color: var(--tinta-2); font-size: .92rem; margin: 0; }
.centro { text-align: center; }
.saludo { font-size: 1.1rem; margin: 4px 0 0; font-weight: 700; }
.error-texto { color: var(--rojo); font-weight: 700; margin: 4px 0; }
.volver { text-decoration: none; align-self: flex-start; }
.tarjeta { background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px 16px; }
.tarjeta > h2:first-child { margin-top: 0; }
.seccion-titulo { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.seccion-titulo h2 { margin: 0; }

/* ================= Botones ================= */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 8px 20px; border-radius: var(--radio);
  border: 2px solid var(--fronda); background: var(--fronda); color: var(--blanco);
  font-family: var(--titulo); font-weight: 700; font-size: 1.15rem; line-height: 1.1;
  text-decoration: none; cursor: pointer; text-align: center;
}
.boton:hover { background: var(--fronda-2); }
.boton:active { transform: translateY(1px); }
.boton:disabled { opacity: .55; cursor: wait; }
.boton.grande { min-height: 58px; font-size: 1.25rem; }
.boton.principal { background: var(--amarillo); color: var(--fronda); }
.boton.principal:hover { background: #FFD43B; }
.boton.secundario { background: var(--blanco); color: var(--fronda); }
.boton.secundario:hover { background: var(--hoja-clara); }
.boton.peligro { background: var(--blanco); color: var(--rojo); border-color: var(--rojo); }
.boton.peligro:hover { background: #FDECEA; }
.boton.chico { min-height: 42px; padding: 6px 14px; font-size: 1rem; }
.botones-fila { display: flex; flex-wrap: wrap; gap: 8px; }

/* ================= Inicio ================= */
.inicio { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* La franja amarilla de la hoja de control */
.franja {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px;
  margin: -14px -16px 0; padding: 16px 18px 18px;
  background: var(--amarillo); color: var(--fronda); border-bottom: 3px solid var(--fronda);
}
.franja-cifra { display: flex; flex-direction: column; min-width: 0; }
.franja-cifra.grande { grid-column: 1 / -1; }
.franja-etiqueta { font-weight: 700; font-size: 1rem; }
.franja-valor { font-family: var(--titulo); font-weight: 800; font-size: 2.3rem; line-height: 1; font-variant-numeric: tabular-nums; }
.franja-cifra.grande .franja-valor { font-size: 3.4rem; letter-spacing: -.01em; }
.franja-valor small { font-size: 1.15rem; font-weight: 700; margin-left: 3px; }
.franja-nota { margin: 6px 0 0; font-weight: 700; font-size: .92rem; }

.inicio-accesos h2 { font-size: 1.25rem; margin: 4px 0 10px; }
.accesos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.acceso {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  min-height: 96px; padding: 14px; border-radius: 16px;
  background: var(--fronda); color: var(--blanco); text-decoration: none;
  font-family: var(--titulo); font-weight: 700; font-size: 1.3rem; line-height: 1.1;
}
.acceso:hover { background: var(--fronda-2); }
.acceso .acceso-icono { width: 36px; height: 36px; color: var(--amarillo); }
.accesos .acceso:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 64px; flex-direction: row; align-items: center; justify-content: flex-start; }

.inicio-grafica .grafica { height: 280px; }
.fila-envio {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 0; border-top: 1px solid #E1E8E2; color: inherit; text-decoration: none; font-weight: 400;
}
.inicio-envios .seccion-titulo + .fila-envio { border-top: 0; margin-top: 6px; }
.fila-envio:hover .fila-envio-no { background: var(--amarillo); }
.fila-envio small { display: block; color: var(--tinta-2); font-size: .88rem; }
.fila-envio-no { font-family: var(--titulo); font-weight: 700; font-size: 1.15rem; background: var(--fondo); border-radius: 8px; padding: 4px 9px; min-width: 58px; text-align: center; }
.fila-envio-t { font-family: var(--titulo); font-weight: 800; font-size: 1.35rem; white-space: nowrap; }

/* ================= Formularios ================= */
.formulario { max-width: 820px; width: 100%; margin: 0 auto; }
.campos { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.campos > * { grid-column: 1 / -1; min-width: 0; }
.campos > .mitad { grid-column: auto; }
.campo { display: flex; flex-direction: column; gap: 6px; border-radius: var(--radio); }
.campo.falta { outline: 3px solid var(--rojo); outline-offset: 5px; }
.etiqueta { font-weight: 700; font-size: 1.05rem; }
.ayuda { color: var(--tinta-2); font-size: .86rem; }
.entrada {
  width: 100%; min-height: 54px; padding: 10px 14px;
  font-size: 1.1rem; color: var(--tinta);
  background: var(--blanco); border: 2px solid var(--borde-fuerte); border-radius: 10px;
}
.entrada:focus { outline: none; border-color: var(--fronda); box-shadow: 0 0 0 4px var(--amarillo); }
.entrada.numero { font-family: var(--titulo); font-weight: 700; font-size: 1.4rem; font-variant-numeric: tabular-nums; }
textarea.entrada { min-height: 70px; resize: vertical; }
select.entrada { cursor: pointer; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 48px; padding: 6px 16px; border-radius: 24px;
  border: 2px solid var(--borde); background: var(--blanco); color: var(--tinta);
  font-weight: 700; font-size: 1.02rem; cursor: pointer;
}
.chip:hover { border-color: var(--hoja); }
.chip-nuevo { border-style: dashed; border-color: var(--hoja); color: var(--hoja); background: transparent; }
.chip-nuevo:hover { background: var(--hoja-clara); }
.fila-select { display: flex; gap: 8px; align-items: center; }
.fila-select select { flex: 1; min-width: 0; }
.chip.activo { background: var(--fronda); border-color: var(--fronda); color: var(--blanco); }
.chip.activo::before {
  content: ""; width: 13px; height: 7px; margin-top: -4px;
  border-left: 3px solid var(--amarillo); border-bottom: 3px solid var(--amarillo); transform: rotate(-45deg);
}
/* Lotes: teclado numérico grande */
.chips-lotes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.chips-lotes .chip { justify-content: center; padding: 0; border-radius: 10px; min-height: 52px; font-family: var(--titulo); font-size: 1.45rem; font-weight: 800; }
.chips-lotes .chip.activo::before { display: none; }

.cuadricula-racimos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.casilla-lote { display: flex; flex-direction: column; gap: 3px; font-size: .86rem; color: var(--tinta-2); font-weight: 700; }
.casilla-lote .entrada { text-align: center; padding: 8px 4px; min-height: 50px; border-color: var(--borde); }
.casilla-lote .entrada:not(:placeholder-shown) { border-color: var(--hoja); background: var(--hoja-clara); }

.panel-calculo { background: var(--blanco); border: 1px solid var(--borde); border-left: 6px solid var(--hoja); border-radius: 10px; padding: 12px 14px; }
.panel-calculo p { margin: 0 0 8px; }
.cifras { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 14px; }
.cifra { display: flex; flex-direction: column; }
.cifra-valor { font-family: var(--titulo); font-size: 1.7rem; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.cifra-etiqueta { font-size: .85rem; color: var(--tinta-2); }
.acciones-ronda { margin-top: 12px; }

.barra-acciones {
  position: sticky; bottom: calc(var(--nav) + env(safe-area-inset-bottom)); z-index: 5;
  display: flex; gap: 8px; padding: 14px 0;
  background: linear-gradient(to bottom, rgba(234,240,232,0), var(--fondo) 28%);
}
.barra-acciones .boton { flex: 1 1 0; min-width: 0; padding: 8px 10px; }
.barra-acciones .boton.peligro { flex: 0 0 auto; padding: 8px 18px; }

/* ================= Registros ================= */
.pestanas { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pestana {
  flex: 0 0 auto; padding: 9px 16px; border-radius: 22px; border: 2px solid var(--borde);
  background: var(--blanco); color: var(--tinta); text-decoration: none; font-size: .98rem;
}
.pestana:hover { border-color: var(--hoja); }
.pestana.activa { background: var(--fronda); border-color: var(--fronda); color: var(--blanco); }
details summary { font-family: var(--titulo); font-weight: 700; font-size: 1.1rem; cursor: pointer; min-height: 32px; }
.filtros { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; align-items: end; }
.tarjeta.filtros { margin-top: 0; }
.filtros select, .filtros .boton, .filtros .ayuda { grid-column: 1 / -1; }
.filtro-fecha { display: flex; flex-direction: column; gap: 3px; font-size: .9rem; font-weight: 700; color: var(--tinta-2); }
.filtro-fecha .entrada, .filtros select.entrada { min-width: 0; min-height: 48px; font-size: 1rem; padding: 6px 10px; }

.lista { display: flex; flex-direction: column; gap: 8px; }
.registro { display: block; color: inherit; text-decoration: none; font-weight: 400; }
.registro:hover { border-color: var(--hoja); }
.registro p { margin: 2px 0; font-size: .95rem; color: var(--tinta-2); }
.registro-cabeza { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.registro-cabeza b { font-family: var(--titulo); font-size: 1.15rem; }
.registro-derecha { font-family: var(--titulo); font-weight: 800; font-size: 1.2rem; white-space: nowrap; color: var(--hoja); }
.registro-pie { font-size: .82rem !important; }

/* ================= Tablas ================= */
.tabla-scroll { overflow-x: auto; background: var(--blanco); border: 1px solid var(--borde); border-radius: var(--radio); }
.tabla { border-collapse: collapse; width: 100%; font-size: .98rem; font-variant-numeric: tabular-nums; }
.tabla th, .tabla td { padding: 9px 12px; border-bottom: 1px solid #E1E8E2; text-align: left; white-space: nowrap; }
.tabla thead th {
  position: sticky; top: 0; background: var(--amarillo); color: var(--fronda);
  font-family: var(--titulo); font-weight: 700; font-size: 1.02rem; border-bottom: 2px solid var(--fronda);
}
.tabla tbody th { background: #FBF4D2; position: sticky; left: 0; font-weight: 700; }
.tabla tfoot { font-weight: 700; background: var(--hoja-clara); }
.tabla tfoot th, .tabla tfoot td { border-top: 2px solid var(--fronda); }
.tabla .num { text-align: right; }
.tabla-registros tbody tr { cursor: pointer; }
.tabla-registros tbody tr:hover, .tabla-registros tbody tr:focus-visible { background: var(--hoja-clara); outline: none; }
.tabla-registros th, .tabla-registros td { padding: 9px 10px; }
.tabla-registros td:not(.num) { white-space: normal; min-width: 90px; }
.tabla-registros td:first-child { white-space: nowrap; }
.tabla-registros thead th { white-space: normal; vertical-align: bottom; line-height: 1.1; }
.tabla-registros td a { color: var(--fronda); }
.suave-celda { color: var(--tinta-2); }
.celda {
  min-width: 70px; min-height: 36px; padding: 4px 6px; border: 0; background: none;
  text-align: right; font: inherit; color: inherit; cursor: pointer; border-radius: 6px;
}
.celda:hover { background: var(--hoja-clara); box-shadow: inset 0 0 0 2px var(--hoja); }
.celda.de-envios { background: var(--hoja-clara); color: var(--hoja); font-weight: 700; }

.grafica { position: relative; height: 280px; margin-top: 10px; }

/* ================= Reportes y menús ================= */
.reportes { display: grid; gap: 8px; }
.reporte {
  display: flex; align-items: center; gap: 14px; text-align: left;
  min-height: 68px; padding: 12px 16px; border-radius: var(--radio);
  border: 2px solid var(--borde); background: var(--blanco); color: var(--tinta); cursor: pointer;
}
.reporte:hover { border-color: var(--fronda); }
.reporte .ico { width: 30px; height: 30px; color: var(--hoja); }
.reporte span { display: flex; flex-direction: column; }
.reporte b { font-family: var(--titulo); font-size: 1.2rem; }
.reporte small { color: var(--tinta-2); font-size: .9rem; }
.reporte:disabled { opacity: .6; cursor: wait; }

.menu { padding: 0; }
.menu a {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 58px; padding: 10px 16px; border-bottom: 1px solid #E1E8E2;
  color: var(--tinta); text-decoration: none;
}
.menu a > span { display: inline-flex; align-items: center; gap: 12px; }
.menu a .ico { color: var(--hoja); }
.menu a:hover { background: var(--hoja-clara); }
.menu a:last-child { border-bottom: 0; }
.menu a small { color: var(--tinta-2); font-weight: 400; text-align: right; }
.menu a.inactivo { color: var(--tinta-2); text-decoration: line-through; }

/* ================= Inicio de sesión ================= */
.login { display: flex; flex-direction: column; gap: 14px; max-width: 440px; width: 100%; margin: 32px auto 0; border-top: 8px solid var(--amarillo); }
.login h2 { margin: 0; text-align: center; font-size: 1.8rem; color: var(--fronda); }
.login .suave { text-align: center; }
.logo { display: block; margin: 0 auto; border-radius: 16px; }

/* ================= Aviso flotante ================= */
#aviso {
  position: fixed; left: 16px; right: 16px; bottom: calc(var(--nav) + 18px + env(safe-area-inset-bottom));
  z-index: 20; max-width: 520px; margin: 0 auto;
  padding: 14px 18px; border-radius: var(--radio); font-weight: 700; font-size: 1.05rem;
  background: var(--fronda); color: var(--blanco); border-left: 8px solid var(--amarillo);
  box-shadow: 0 6px 20px rgba(14,59,38,.3);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s;
}
#aviso.visible { opacity: 1; transform: none; }
#aviso.error { background: var(--rojo); border-left-color: #FFD9D6; }

/* ================= Tableta ================= */
@media (min-width: 600px) {
  .accesos { grid-template-columns: repeat(3, 1fr); }
  .accesos .acceso:last-child:nth-child(odd) { grid-column: auto; min-height: 96px; flex-direction: column; align-items: stretch; justify-content: space-between; }
  .franja { grid-template-columns: 1.4fr 1fr 1fr; }
  .franja-cifra.grande { grid-column: auto; }
  .cuadricula-racimos { grid-template-columns: repeat(6, 1fr); }
  .cifras { grid-template-columns: repeat(4, 1fr); }
  .reportes { grid-template-columns: repeat(2, 1fr); }
  .filtros { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filtros select, .filtros .ayuda { grid-column: span 2; }
  .filtros .boton { grid-column: auto; }
}

/* ================= Computadora ================= */
@media (min-width: 900px) {
  body { padding-bottom: 32px; padding-left: var(--lateral); font-size: 17px; }
  #nav, .solo-celular, #usuario { display: none !important; }
  .solo-compu { display: block !important; }

  #lateral {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 12; width: var(--lateral);
    display: flex; flex-direction: column; gap: 6px; padding: 18px 14px;
    background: var(--fronda); color: var(--blanco); overflow-y: auto;
  }
  #lateral :focus-visible { outline-color: var(--amarillo); }
  .marca { display: flex; align-items: center; gap: 10px; color: var(--blanco); text-decoration: none; padding: 4px 6px 14px; font-family: var(--titulo); font-size: 1.25rem; line-height: 1.05; }
  .marca img { border-radius: 9px; }
  .lateral-registrar {
    display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 16px; margin-bottom: 12px;
    border-radius: var(--radio); background: var(--amarillo); color: var(--fronda); text-decoration: none;
    font-family: var(--titulo); font-weight: 800; font-size: 1.3rem;
  }
  .lateral-registrar .ico { stroke-width: 3; }
  .lateral-registrar:hover { background: #FFD43B; }
  .lateral-registrar.activa { box-shadow: 0 0 0 3px var(--blanco); }
  #lateral nav { display: flex; flex-direction: column; gap: 2px; }
  #lateral nav a {
    display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px;
    border-radius: 10px; color: #D5E5DA; text-decoration: none; font-size: 1.05rem; position: relative;
  }
  #lateral nav a:hover { background: var(--fronda-2); color: var(--blanco); }
  #lateral nav a.activa { background: var(--fronda-2); color: var(--blanco); }
  #lateral nav a.activa::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 5px; border-radius: 0 3px 3px 0; background: var(--amarillo); }
  .lateral-usuario { margin: auto 0 0; padding: 12px 8px 0; border-top: 1px solid var(--fronda-2); color: #B7CDBE; font-size: .92rem; }

  #barra { position: static; background: transparent; color: var(--tinta); padding: 26px 32px 4px; max-width: 1180px; margin: 0 auto; }
  #titulo { font-size: 2.1rem; font-weight: 800; color: var(--fronda); }
  main { padding: 12px 32px 32px; }

  /* Inicio en dos columnas */
  .inicio { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
  .franja { grid-column: 1 / -1; margin: 0; border-radius: 16px; border: 3px solid var(--fronda); padding: 22px 26px; grid-template-columns: 1.5fr 1fr 1fr; }
  .franja-cifra.grande .franja-valor { font-size: 4.4rem; }
  .franja-valor { font-size: 2.8rem; }
  .inicio-accesos { grid-column: 1 / -1; }
  .accesos { grid-template-columns: repeat(5, 1fr); }
  .accesos .acceso:last-child:nth-child(odd) { grid-column: auto; }
  .acceso { min-height: 118px; font-size: 1.4rem; }
  .acceso .acceso-icono { width: 42px; height: 42px; }
  .inicio-grafica .grafica { height: 320px; }

  /* Formularios en un panel */
  .formulario { background: var(--blanco); border: 1px solid var(--borde); border-radius: 16px; padding: 22px 26px 0; }
  .barra-acciones { bottom: 0; margin: 0 -26px; padding: 16px 26px; background: var(--blanco); border-top: 1px solid var(--borde); border-radius: 0 0 16px 16px; }
  .barra-acciones .boton { flex: 0 1 260px; }
  .barra-acciones .boton.peligro { margin-left: auto; }
  .chips-lotes { grid-template-columns: repeat(12, 1fr); }
  .formulario .panel-calculo { background: var(--fondo); }

  .reportes { grid-template-columns: repeat(3, 1fr); }
  .filtros { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
  .filtros select, .filtros .ayuda { grid-column: auto; }
  .filtros .ayuda { grid-column: 1 / -1; }

  /* Ajustes de listas: formulario y lista lado a lado */
  .catalogo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .catalogo > .volver { grid-column: 1 / -1; }
  .catalogo > form { grid-row: 2 / span 3; position: sticky; top: 16px; }
  .catalogo > h2 { margin: 0; }
  .pantalla > .boton.grande { align-self: flex-start; min-width: 280px; }

  #aviso { left: calc(var(--lateral) + 32px); right: auto; bottom: 28px; margin: 0; min-width: 320px; }
}

@media (prefers-reduced-motion: reduce) {
  #aviso { transition: none; }
}
