/* La Parada Corporativa — estilos comunes de las tres vistas. Móvil primero. */

:root {
  --petroleo: #005b70;
  --petroleo-oscuro: #003f4e;
  --petroleo-suave: #e3eff2;
  --naranja: #ff8200;
  --naranja-oscuro: #c25f00;
  --naranja-suave: #ffebd6;
  --verde: #1e7d4f;
  --verde-suave: #e2f3ea;
  --rojo: #b42318;
  --rojo-suave: #fde8e6;
  --gris: #6b7a80;
  --gris-suave: #e7ecee;
  --fondo: #f4f7f8;
  --tarjeta: #ffffff;
  --texto: #1b2a2e;
  --borde: #d9e2e5;
  --radio: 14px;
  --sombra: 0 1px 2px rgb(0 40 50 / 6%), 0 4px 14px rgb(0 40 50 / 6%);
  --cabecera: 60px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--texto);
  background: var(--fondo);
  -webkit-tap-highlight-color: transparent;
}

button, input, select { font: inherit; color: inherit; }

[hidden] { display: none !important; }

.oculto-visual { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Cabecera con el logo ---------- */

/* La cabecera vive dentro de su región (r-cab / o-cab / d-cab): es la región la que queda fija arriba. */
#r-cab, #o-cab, #d-cab { position: sticky; top: 0; z-index: 20; }
.cabecera {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--cabecera);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: var(--tarjeta);
  border-bottom: 3px solid var(--naranja);
}
.cabecera .marca { display: flex; align-items: center; gap: 8px; min-width: 0; text-decoration: none; }
.cabecera .marca-icono { height: 32px; width: auto; flex: none; }
.cabecera .marca-texto { height: 13px; width: auto; flex: none; }
@media (min-width: 480px) { .cabecera .marca-icono { height: 36px; } .cabecera .marca-texto { height: 16px; } }
.cabecera .marca-sub {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--naranja-oscuro); margin-top: 2px;
}
.cabecera .marca-col { display: flex; flex-direction: column; justify-content: center; }
.cabecera .acciones { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cabecera .sede-chip {
  font-size: 13px; font-weight: 600; color: var(--petroleo);
  background: var(--petroleo-suave); padding: 4px 10px; border-radius: 999px;
  max-width: 40vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.contenedor { max-width: 720px; margin: 0 auto; padding: 16px; }
.contenedor.ancho { max-width: 1100px; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 22px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
.titulo-seccion { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 20px 0 10px; }
.sutil { color: var(--gris); font-size: 14px; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0;
  font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none;
  transition: transform .06s ease, background-color .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primario { background: var(--naranja); color: #fff; text-shadow: 0 1px 0 rgb(0 0 0 / 18%); }
.btn-primario:hover { background: #f07800; }
.btn-secundario { background: var(--petroleo); color: #fff; }
.btn-secundario:hover { background: var(--petroleo-oscuro); }
.btn-borde { background: transparent; color: var(--petroleo); border: 2px solid var(--petroleo); }
.btn-peligro { background: #fff; color: var(--rojo); border: 2px solid var(--rojo); }
.btn-peligro:hover { background: var(--rojo-suave); }
.btn-texto { background: transparent; color: var(--petroleo); min-height: 36px; padding: 0 8px; font-weight: 600; }
.btn-bloque { width: 100%; }
.btn-grande { min-height: 52px; font-size: 17px; }

/* ---------- Formularios ---------- */

.campo { display: block; margin-bottom: 16px; }
.campo > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.entrada {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid var(--borde); background: #fff; font-size: 17px;
}
.entrada:focus { outline: none; border-color: var(--petroleo); box-shadow: 0 0 0 3px var(--petroleo-suave); }
.error { color: var(--rojo); background: var(--rojo-suave); padding: 10px 12px; border-radius: 10px; font-size: 14px; margin: 0 0 14px; }

.opciones-sede { display: grid; gap: 10px; }
.opcion-sede { position: relative; display: block; cursor: pointer; }
.opcion-sede input { position: absolute; opacity: 0; }
.opcion-sede .caja {
  display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px;
  border: 1.5px solid var(--borde); background: #fff;
}
.opcion-sede .caja::before {
  content: ""; width: 20px; height: 20px; border-radius: 50%; flex: none;
  border: 2px solid var(--borde); background: #fff;
}
.opcion-sede input:checked + .caja { border-color: var(--petroleo); background: var(--petroleo-suave); }
.opcion-sede input:checked + .caja::before { border: 6px solid var(--petroleo); }
.opcion-sede input:focus-visible + .caja { box-shadow: 0 0 0 3px var(--naranja-suave); }
.opcion-sede strong { display: block; }
.opcion-sede small { color: var(--gris); }

/* ---------- Pantalla de acceso ---------- */

.acceso { min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px 16px 32px; max-width: 440px; margin: 0 auto; }
.acceso .logo-grande { width: 180px; margin: 0 auto 8px; display: block; }
.acceso .bajada { text-align: center; color: var(--naranja-oscuro); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; margin: 0 0 6px; }
.acceso .lema { text-align: center; color: var(--gris); margin: 0 0 24px; }
.acceso .panel { background: var(--tarjeta); border-radius: 18px; padding: 20px; box-shadow: var(--sombra); }

/* ---------- Tarjetas genéricas ---------- */

.tarjeta { background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); padding: 16px; }

/* ---------- Catálogo ---------- */

.filtros-cat { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.filtros-cat::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--borde);
  background: #fff; font-weight: 600; font-size: 14px; cursor: pointer;
}
.chip[aria-pressed="true"] { background: var(--petroleo); border-color: var(--petroleo); color: #fff; }

/* Catálogo compacto: 3 columnas en el teléfono (6 productos a la vista), 4-5 en pantallas grandes. */
.catalogo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 560px) { .catalogo { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 760px) { .catalogo { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

.producto { background: var(--tarjeta); border-radius: 12px; box-shadow: var(--sombra); padding: 6px 6px 8px; display: flex; flex-direction: column; min-width: 0; }
.producto .foto {
  position: relative; aspect-ratio: 1 / 1; border-radius: 9px; overflow: hidden;
  display: grid; place-items: center; background: #fff;
}
.producto .foto img { width: 100%; height: 100%; object-fit: contain; display: block; }
.producto .foto .emoji { font-size: 40px; }
.producto .nombre {
  font-weight: 600; font-size: 13px; line-height: 1.2; margin-top: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.producto .precio { color: var(--petroleo); font-weight: 800; font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; }
/* Agotados: toda la tarjeta atenuada; se ven, pero al final de su categoría. */
.producto.agotado { opacity: .45; filter: grayscale(1); box-shadow: none; }
.etiqueta-agotado {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); white-space: nowrap;
  font-size: 10px; font-weight: 800; color: #fff; background: rgb(27 42 46 / 75%); padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em;
}

/* Agregar: círculo pequeño en la esquina de la foto; con cantidad, un control compacto en el mismo lugar. */
.btn-mas {
  position: absolute; top: 5px; right: 5px; width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: var(--naranja); color: #fff; font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 6px rgb(0 0 0 / 22%); display: grid; place-items: center; padding: 0 0 2px;
}
.btn-mas::after { content: ""; position: absolute; inset: -7px; } /* área táctil de 44 px */
.paso-foto { position: absolute; top: 5px; right: 5px; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 22%); border-radius: 999px; }
.paso-foto button { width: 28px; height: 30px; font-size: 18px; }
.paso-foto output { min-width: 14px; font-size: 13px; }

/* Barra de búsqueda (fija bajo la cabecera, solo en el catálogo). */
.buscador { position: sticky; top: var(--cabecera); z-index: 15; background: var(--fondo); padding: 10px 16px 6px; max-width: 720px; margin: 0 auto; }
.buscador .entrada { min-height: 42px; font-size: 16px; padding-left: 38px; border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7a80' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 13px center / 18px; }
#r-buscar + #r-principal { padding-top: 6px; }
.resultado-busqueda { margin: 0 0 10px; }
.saludo { font-size: 20px; }

/* Filas horizontales: "Vuelve a pedirlo" y "Pensado para ti". */
.fila-sugerida { margin-bottom: 14px; }
.fila-sugerida h2 { font-size: 16px; margin-bottom: 8px; }
.fila-h {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 20px) / 3.3); gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: none;
}
.fila-h::-webkit-scrollbar { display: none; }
.fila-h .producto { scroll-snap-align: start; }
@media (min-width: 560px) { .fila-h { grid-auto-columns: calc((100% - 40px) / 5.3); } }

.paso { display: inline-flex; align-items: center; border-radius: 12px; background: var(--petroleo-suave); }
.paso button { width: 36px; height: 40px; border: 0; background: transparent; font-size: 22px; font-weight: 700; color: var(--petroleo); cursor: pointer; }
.paso output { min-width: 22px; text-align: center; font-weight: 800; }

/* Barra flotante del carrito */
.barra-carrito {
  position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 15;
  padding: 0 16px 10px; pointer-events: none;
}
.barra-carrito .btn { pointer-events: auto; width: 100%; max-width: 688px; margin: 0 auto; display: flex; justify-content: space-between; box-shadow: 0 8px 24px rgb(255 130 0 / 35%); }

/* Navegación inferior */
.nav-inferior {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 16; display: flex;
  background: #fff; border-top: 1px solid var(--borde); padding-bottom: env(safe-area-inset-bottom);
}
.nav-inferior button {
  flex: 1; min-height: 64px; border: 0; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 12px; font-weight: 600; color: var(--gris); position: relative;
}
.nav-inferior button svg { width: 24px; height: 24px; }
.nav-inferior button[aria-current="page"] { color: var(--petroleo); }
.nav-inferior button[aria-current="page"]::after { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--naranja); }
.con-nav { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }

.punto { position: absolute; top: 10px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--naranja); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* ---------- Hoja inferior (carrito) ---------- */

.velo { position: fixed; inset: 0; background: rgb(0 30 38 / 45%); z-index: 30; }
.hoja {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 88dvh; overflow: auto;
  background: var(--fondo); border-radius: 20px 20px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  max-width: 720px; margin: 0 auto; animation: subir .18s ease-out;
}
@keyframes subir { from { transform: translateY(30px); opacity: .6; } }
.hoja .agarre { width: 44px; height: 5px; border-radius: 3px; background: var(--borde); margin: 4px auto 12px; }
.hoja-cab { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.linea { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--borde); }
.linea:last-child { border-bottom: 0; }
.linea .ico { font-size: 28px; width: 44px; height: 44px; border-radius: 10px; background: #fff; border: 1px solid var(--borde); display: grid; place-items: center; flex: none; overflow: hidden; }
.linea .ico img { width: 100%; height: 100%; object-fit: contain; }
.linea .info { flex: 1; min-width: 0; }
.linea .info strong { display: block; font-size: 15px; }
.linea.sin-stock .info strong { color: var(--rojo); }
.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 18px; font-weight: 800; padding: 14px 0; }
.aviso { background: var(--petroleo-suave); color: var(--petroleo-oscuro); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }

/* ---------- Seguimiento del pedido ---------- */

.codigo-retiro { text-align: center; padding: 20px 16px; }
.codigo-retiro .etq { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--gris); font-weight: 700; }
.codigo-retiro .codigo { font-size: 44px; font-weight: 900; color: var(--petroleo); letter-spacing: .04em; margin: 4px 0; font-variant-numeric: tabular-nums; }

.linea-tiempo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.linea-tiempo li { text-align: center; position: relative; padding-top: 34px; font-size: 13px; color: var(--gris); }
.linea-tiempo li::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 1;
  width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--borde);
}
.linea-tiempo li::after { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 3px; background: var(--borde); }
.linea-tiempo li:first-child::after { display: none; }
.linea-tiempo li.hecho { color: var(--texto); }
.linea-tiempo li.hecho::before { background: var(--petroleo); border-color: var(--petroleo); }
.linea-tiempo li.hecho::after { background: var(--petroleo); }
.linea-tiempo li.actual::before { background: var(--naranja); border-color: var(--naranja); box-shadow: 0 0 0 6px var(--naranja-suave); }
.linea-tiempo li strong { display: block; font-size: 14px; }

.cuenta { text-align: center; margin-top: 16px; padding: 12px; border-radius: 12px; background: var(--naranja-suave); color: var(--naranja-oscuro); font-weight: 700; }
.cuenta .reloj { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; display: block; color: var(--texto); }
.cuenta.urgente { background: var(--rojo-suave); color: var(--rojo); }

.estado {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.estado::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.estado-recibido { color: var(--petroleo); background: var(--petroleo-suave); }
.estado-aceptado { color: #6b4fa0; background: #efe9f8; }
.estado-armado { color: var(--naranja-oscuro); background: var(--naranja-suave); }
.estado-retirado { color: var(--verde); background: var(--verde-suave); }
.estado-cancelado { color: var(--gris); background: var(--gris-suave); }

.banner-pedido {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  border: 0; border-radius: var(--radio); padding: 12px 14px; margin-bottom: 14px;
  background: var(--petroleo); color: #fff; box-shadow: var(--sombra);
}
.banner-pedido .cod { font-size: 20px; font-weight: 900; }
.banner-pedido .txt { flex: 1; font-size: 14px; }
.banner-pedido.listo { background: var(--naranja); }

.lista-pedidos { display: grid; gap: 10px; }
.fila-pedido { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 0; cursor: pointer; }
.fila-pedido .cod { font-weight: 900; color: var(--petroleo); min-width: 66px; }
.fila-pedido .det { flex: 1; min-width: 0; font-size: 14px; color: var(--gris); }
.fila-pedido .det b { color: var(--texto); }

.vacio { text-align: center; color: var(--gris); padding: 32px 16px; }

/* Avisos al teléfono */
.tarjeta-avisos { display: flex; align-items: center; gap: 12px; background: var(--petroleo-suave); border-radius: var(--radio); padding: 12px 14px; margin-bottom: 14px; }
.tarjeta-avisos .ico { font-size: 26px; }
.tarjeta-avisos .txt { flex: 1; font-size: 13px; color: var(--petroleo-oscuro); }
.tarjeta-avisos .txt b { display: block; font-size: 15px; margin-bottom: 2px; }
.tarjeta-avisos { flex-wrap: wrap; }
.tarjeta-avisos .txt { min-width: 200px; }
.tarjeta-avisos .acciones-avisos { display: flex; gap: 4px; align-items: center; width: 100%; justify-content: flex-end; }
.tarjeta-avisos .btn { flex: none; min-height: 40px; padding: 0 14px; }
.diag-envio .diag-txt span { margin-top: 2px; }
.fila-ajuste { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-top: 16px; }
.lista-avisos, .pasos-instalar { margin: 0 0 14px; padding-left: 4px; list-style: none; display: grid; gap: 10px; }
.pasos-instalar { padding-left: 22px; list-style: decimal; }
.diag-resumen { font-weight: 700; margin-bottom: 12px; }
.diag-resumen.ok { background: var(--verde-suave); color: var(--verde); }
.diag-resumen.falta { background: var(--naranja-suave); color: var(--naranja-oscuro); }
.diag-lista { list-style: none; margin: 0 0 14px; padding: 4px 14px; }
.diag-fila { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.diag-fila:last-child { border-bottom: 0; }
.diag-ico { flex: none; width: 22px; }
.diag-txt { display: flex; flex-direction: column; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.diag-txt small { color: var(--gris); font-size: 12px; margin-top: 2px; }
.diag-acciones { display: grid; gap: 10px; }
.diag-prueba { font-size: 14px; overflow-wrap: anywhere; }
.diag-prueba ul { margin: 6px 0; padding-left: 18px; }
.icono-compartir { display: inline-block; border: 1.5px solid currentColor; border-radius: 4px; padding: 0 4px; font-size: 12px; }
.vacio .grande { font-size: 40px; display: block; margin-bottom: 8px; }

/* ---------- Operadora ---------- */

.alerta-sonido {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radio);
  background: var(--naranja-suave); color: var(--naranja-oscuro); margin-bottom: 14px; font-weight: 600;
}
.alerta-sonido .btn { margin-left: auto; flex: none; }

.pestanas { display: flex; gap: 6px; background: var(--gris-suave); padding: 4px; border-radius: 12px; margin-bottom: 14px; }
.pestanas button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; color: var(--gris); cursor: pointer; }
.pestanas button[aria-selected="true"] { background: #fff; color: var(--petroleo); box-shadow: 0 1px 3px rgb(0 0 0 / 10%); }
.pestanas .num { display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px; border-radius: 10px; background: var(--naranja); color: #fff; font-size: 12px; line-height: 20px; }

.columnas-op { display: grid; gap: 16px; }
@media (min-width: 900px) { .columnas-op { grid-template-columns: repeat(3, 1fr); align-items: start; } }

.pedido-op { background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); padding: 14px; border-left: 5px solid var(--petroleo); }
.pedido-op + .pedido-op { margin-top: 10px; }
.pedido-op.armado { border-left-color: var(--naranja); }
.pedido-op.aceptado { border-left-color: #6b4fa0; }
.pedido-op.por-vencer { border-left-color: var(--rojo); background: #fffafa; }
.pedido-op.nuevo { animation: destello 1.2s ease-in-out 3; }
.pedido-op.cancelado-cliente { border-left-color: var(--rojo); background: var(--rojo-suave); margin-bottom: 10px; animation: destello-rojo 1.2s ease-in-out 3; }
.pedido-op.cancelado-cliente .cod { color: var(--rojo); text-decoration: line-through; }
.pedido-op.cancelado-cliente li { text-decoration: line-through; color: var(--gris); }
.aviso-cancelado { margin: 8px 0; font-weight: 700; color: var(--rojo); }
@keyframes destello-rojo { 50% { box-shadow: 0 0 0 4px var(--rojo); } }
.estado-anulado { color: var(--rojo); background: #fff; border: 1px solid var(--rojo); }
@keyframes destello { 50% { box-shadow: 0 0 0 4px var(--naranja); } }
.pedido-op .cab { display: flex; align-items: center; gap: 10px; }
.pedido-op .cod { font-size: 24px; font-weight: 900; color: var(--petroleo); white-space: nowrap; }
.pedido-op .tiempo { margin-left: auto; font-size: 13px; color: var(--gris); font-weight: 600; text-align: right; }
.pedido-op .tiempo.rojo { color: var(--rojo); }
.pedido-op .cliente { font-size: 14px; color: var(--gris); margin: 2px 0 8px; }
.pedido-op ul { margin: 0 0 10px; padding: 0; list-style: none; }
.pedido-op li { display: flex; gap: 8px; padding: 4px 0; font-size: 15px; }
.pedido-op li .cant { font-weight: 900; color: var(--naranja-oscuro); min-width: 28px; }
.pedido-op .pie { display: flex; align-items: center; gap: 10px; }
.pedido-op .pie .monto { font-weight: 800; }
.pedido-op .pie .btn { margin-left: auto; }

.finalizados { font-size: 14px; }
.finalizados .fila { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--borde); }
.finalizados .fila:last-child { border-bottom: 0; }
.finalizados .fila .cod { font-weight: 800; min-width: 64px; }
.finalizados .fila .quien { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finalizados .fila .sutil { white-space: nowrap; }

.inventario-op .fila { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.inventario-op .fila:last-child { border-bottom: 0; }
.inventario-op .ico { font-size: 26px; width: 40px; text-align: center; }
.inventario-op .info { flex: 1; min-width: 0; }
.inventario-op .info strong { display: block; }
.inventario-op .fila.ex-agotado .info strong { color: var(--gris); }

/* Existencia en tres estados: verde disponible, amarillo pocas unidades, rojo agotado. */
:root { --amarillo: #b7791f; --amarillo-suave: #fff4d6; }
.inventario-op .fila { border-left: 5px solid transparent; padding-left: 8px; margin-left: -8px; }
.inventario-op .fila.ex-disponible { border-left-color: var(--verde); }
.inventario-op .fila.ex-pocas { border-left-color: #e0a100; background: linear-gradient(90deg, var(--amarillo-suave), transparent 60%); }
.inventario-op .fila.ex-agotado { border-left-color: var(--rojo); background: linear-gradient(90deg, var(--rojo-suave), transparent 60%); }
.selector-ex { display: inline-flex; flex: none; border: 1.5px solid var(--borde); border-radius: 10px; overflow: hidden; }
.op-ex { min-height: 40px; min-width: 58px; padding: 0 8px; border: 0; background: #fff; color: var(--gris); font-weight: 700; font-size: 13px; cursor: pointer; }
.op-ex + .op-ex { border-left: 1.5px solid var(--borde); }
.op-ex.disponible[aria-checked="true"] { background: var(--verde); color: #fff; }
.op-ex.pocas[aria-checked="true"] { background: #e0a100; color: #1b2a2e; }
.op-ex.agotado[aria-checked="true"] { background: var(--rojo); color: #fff; }
.resumen-inventario { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip-ex { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.chip-ex.disponible { background: var(--verde-suave); color: var(--verde); }
.chip-ex.pocas { background: var(--amarillo-suave); color: var(--amarillo); }
.chip-ex.agotado { background: var(--rojo-suave); color: var(--rojo); }
@media (max-width: 420px) { .inventario-op .fila { flex-wrap: wrap; } .selector-ex { width: 100%; } .op-ex { flex: 1; } }

/* Cancelación por el módulo y pestaña de cancelados */
.btn-cancelar { color: var(--rojo); margin-left: auto; }
.pedido-op .pie .btn-cancelar + .btn { margin-left: 0; }
.panel-cancelar { border-top: 1px solid var(--borde); padding-top: 10px; }
.panel-cancelar p { margin: 0 0 8px; font-size: 14px; }
.panel-cancelar .motivos { display: grid; gap: 8px; }
.barra-cancelados { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 12px; font-weight: 700; }
.barra-cancelados input { margin-left: 6px; }
.motivo-vencimiento { color: var(--gris); background: var(--gris-suave); }
.motivo-cliente { color: var(--rojo); background: var(--rojo-suave); }
.motivo-modulo { color: var(--naranja-oscuro); background: var(--naranja-suave); }
.pedido-op.cancelado { margin-bottom: 10px; }
.cab-cancelado { flex-wrap: wrap; }
.pedido-op .cliente b { color: var(--texto); }
.motivo-borde-vencimiento { border-left-color: var(--gris); }
.motivo-borde-cliente { border-left-color: var(--rojo); }
.motivo-borde-modulo { border-left-color: var(--naranja); }
.motivo-txt { margin: 0 0 8px; font-size: 14px; font-weight: 600; }

/* Cliente: etiqueta discreta para productos con pocas unidades */
.etiqueta-pocas { position: absolute; left: 5px; bottom: 5px; font-size: 10px; font-weight: 800; color: #8a5a00; background: #ffe9a8; padding: 2px 7px; border-radius: 999px; }

.teclado-pin { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.teclado-pin button { min-height: 56px; border-radius: 12px; border: 1.5px solid var(--borde); background: #fff; font-size: 22px; font-weight: 700; cursor: pointer; }
.teclado-pin button:active { background: var(--petroleo-suave); }
.puntos-pin { display: flex; justify-content: center; gap: 14px; margin: 8px 0 4px; }
.puntos-pin span { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--petroleo); }
.puntos-pin span.lleno { background: var(--petroleo); }

/* ---------- Director ---------- */

.titulo-dir { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.barra-periodo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 20px 0 0; font-weight: 700; }
.segmentado { display: inline-flex; background: var(--gris-suave); padding: 4px; border-radius: 12px; }
.segmentado button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; font-size: 14px; color: var(--gris); cursor: pointer; }
.segmentado button[aria-pressed="true"] { background: #fff; color: var(--petroleo); box-shadow: 0 1px 3px rgb(0 0 0 / 10%); }
.selector { min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--borde); background: #fff; font-weight: 600; }

/* Ventas de hoy, semana y mes: lo primero que se ve, en números grandes. */
.totales-periodo { display: grid; gap: 12px; }
@media (min-width: 760px) { .totales-periodo { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.total-periodo { background: var(--tarjeta); border-radius: var(--radio); box-shadow: var(--sombra); padding: 16px; }
.total-periodo .etq { font-size: 15px; font-weight: 800; color: var(--petroleo); display: flex; justify-content: space-between; gap: 8px; }
.total-periodo .etq span { font-weight: 600; color: var(--gris); font-size: 13px; }
.total-periodo .valor { font-size: clamp(28px, 7vw, 34px); font-weight: 900; color: var(--texto); font-variant-numeric: tabular-nums; margin-top: 6px; line-height: 1.1; }
.total-periodo .nota { font-size: 14px; color: var(--gris); margin-top: 6px; font-weight: 600; }
.total-periodo.destacado { background: var(--petroleo); }
.total-periodo.destacado .etq, .total-periodo.destacado .etq span { color: #fff; }
.total-periodo.destacado .valor { color: #fff; }
.total-periodo.destacado .nota { color: #cfe3e8; }

.frase { margin: 0 0 14px; font-size: 15px; }
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.dato { background: var(--fondo); border-radius: 12px; padding: 12px; }
.dato .numero { font-size: 30px; font-weight: 900; color: var(--petroleo); font-variant-numeric: tabular-nums; line-height: 1.1; }
.dato .etq { font-weight: 700; margin-top: 4px; }
.dato .nota { font-size: 13px; color: var(--gris); margin-top: 2px; }
.barra-h .relleno.gris { background: var(--gris); }
.barra-h .carril { flex: 1; min-width: 0; display: flex; }

.grilla-dir { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 900px) { .grilla-dir { grid-template-columns: 1fr 1fr; } .grilla-dir .completo { grid-column: 1 / -1; } }
.grilla-dir h2 { margin-bottom: 4px; }
.grilla-dir .sutil { margin: 0 0 14px; }

/* Panel del director: bloques con título, explicación y contenido */
.eyebrow { margin: 0 0 2px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--naranja-oscuro); }
.seccion-dir { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); margin: 28px 0 10px; padding-top: 14px; border-top: 1px solid var(--borde); }
.bloque h2 { font-size: 18px; }
.bloque .explica { margin: 4px 0 14px; font-size: 14px; color: var(--gris); line-height: 1.45; }
.mercado-bloque { margin-top: 16px; }
.txt-sube { color: var(--verde); }
.txt-baja { color: var(--rojo); }

.variacion { display: inline-flex; align-items: baseline; gap: 4px; font-weight: 800; font-size: 14px; padding: 3px 9px; border-radius: 999px; }
.variacion small { font-weight: 600; font-size: 12px; opacity: .85; }
.variacion.sube { color: var(--verde); background: var(--verde-suave); }
.variacion.baja { color: var(--rojo); background: var(--rojo-suave); }
.variacion.neutra { color: var(--gris); background: var(--gris-suave); font-weight: 600; font-size: 12px; }

/* Gráfico diario tipo mercado */
.mercado-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.mercado-cab .etq { display: block; font-size: 13px; font-weight: 700; color: var(--gris); }
.mercado-cab .monto { font-size: 24px; font-weight: 900; margin-right: 8px; font-variant-numeric: tabular-nums; }
.mercado-resumen { font-size: 13px; color: var(--gris); }
.mercado { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; height: 210px; align-items: end; border-bottom: 1px solid var(--borde); padding-top: 4px; }
.vela { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; position: relative; padding-bottom: 30px; }
.vela .barra { width: 100%; max-width: 30px; border-radius: 4px 4px 0 0; background: var(--gris); }
.vela.sube .barra { background: var(--verde); }
.vela.baja .barra { background: var(--rojo); }
.vela.hoy .barra { background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / 45%) 0 4px, transparent 4px 8px); }
.vela .var { font-size: 10.5px; font-weight: 800; margin-bottom: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.vela.sube .var { color: var(--verde); }
.vela.baja .var { color: var(--rojo); }
.vela.neutra .var { color: var(--gris); }
.vela .dia { position: absolute; bottom: 0; font-size: 10.5px; line-height: 1.15; text-align: center; color: var(--gris); }
.vela.hoy .dia { color: var(--texto); font-weight: 800; }
.leyenda i.rayado { background: var(--verde); background-image: repeating-linear-gradient(135deg, rgb(255 255 255 / 55%) 0 2px, transparent 2px 4px); }
@media (max-width: 640px) { .vela.antigua { display: none; } }

/* Ticket promedio */
.ticket-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.valor-grande { font-size: 32px; font-weight: 900; color: var(--petroleo); font-variant-numeric: tabular-nums; }
.mini-barras { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; height: 90px; align-items: end; }
.mini { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; padding-bottom: 18px; position: relative; }
.mini .barra { width: 100%; max-width: 22px; background: var(--petroleo); opacity: .55; border-radius: 3px 3px 0 0; }
.mini.hoy .barra { opacity: 1; background: var(--naranja); }
.mini .dia { position: absolute; bottom: 0; font-size: 9.5px; color: var(--gris); white-space: nowrap; }

/* Comportamiento de compra por sede */
.comparativo-sedes { display: grid; gap: 12px; }
@media (min-width: 760px) { .comparativo-sedes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sede-tarjeta { border: 1px solid var(--borde); border-radius: 12px; padding: 14px; }
.sede-tarjeta h3 { color: var(--petroleo); margin-bottom: 10px; }
.sede-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.sede-datos span { display: block; font-size: 12px; color: var(--gris); font-weight: 600; }
.sede-datos b { font-size: 16px; font-variant-numeric: tabular-nums; }
.sede-sub { margin: 14px 0 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); }
.sede-top { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.sede-top li span { display: inline-block; min-width: 0; }
.sede-top li b { float: right; font-variant-numeric: tabular-nums; }

/* Combinaciones y agotados */
.combos { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.combos li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: var(--fondo); border-radius: 10px; font-size: 14px; }
.combos .par i { font-style: normal; font-weight: 900; color: var(--naranja-oscuro); margin: 0 4px; }
.combos .cuantos { text-align: right; white-space: nowrap; font-size: 12px; color: var(--gris); }
.combos .cuantos b { display: block; font-size: 14px; color: var(--texto); }
.agotados { margin: 0; padding: 0; list-style: none; }
.agotados li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borde); }
.agotados li:last-child { border-bottom: 0; }
.agotados .ico { font-size: 24px; width: 32px; text-align: center; }
.agotados .info { flex: 1; min-width: 0; }
.agotados .info b { display: block; }
.agotados .info .sutil { font-size: 13px; }
.agotados .txt-baja { font-weight: 700; }
.txt-pocas { color: #8a5a00; font-weight: 700; }
.veces-doble { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 12px; color: var(--gris); white-space: nowrap; }
.veces-doble b { font-size: 16px; }
.veces-doble .pocas b { color: #b07a00; }
.veces-doble .agot b { color: var(--rojo); }
.agotados .veces { white-space: nowrap; font-size: 13px; color: var(--gris); }
.agotados .veces b { font-size: 18px; color: var(--rojo); }
.plazo .segmentado button { min-width: 72px; }

.barras-h { display: grid; gap: 10px; }
.barra-h { display: grid; grid-template-columns: minmax(90px, 38%) 1fr; gap: 10px; align-items: center; font-size: 14px; }
.barra-h .nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-h .pista { display: flex; align-items: center; gap: 8px; }
.barra-h .relleno { height: 18px; border-radius: 0 4px 4px 0; background: var(--petroleo); min-width: 2px; }
.barra-h .relleno.top { background: var(--naranja); }
.barra-h .num { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13px; }

.columnas-horas { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; gap: 4px; height: 180px; padding-top: 18px; border-bottom: 1px solid var(--borde); }
.columna-hora { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.columna-hora .col { width: 100%; max-width: 34px; border-radius: 4px 4px 0 0; background: var(--petroleo); min-height: 2px; }
.columna-hora .col.pico { background: var(--naranja); }
.columna-hora .val { font-size: 11px; font-weight: 700; color: var(--gris); margin-bottom: 3px; font-variant-numeric: tabular-nums; }
.ejes-horas { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; font-size: 11px; color: var(--gris); text-align: center; margin-top: 4px; }
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--gris); margin-top: 10px; }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th { text-align: left; font-size: 12px; color: var(--gris); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 6px 0; border-bottom: 1px solid var(--borde); }
.tabla td { padding: 10px 0; border-bottom: 1px solid var(--borde); font-variant-numeric: tabular-nums; }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .der { text-align: right; }

.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  background: var(--texto); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
  max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgb(0 0 0 / 25%);
}

.cargando { text-align: center; color: var(--gris); padding: 40px 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Reposición: pestaña de la operadora y bloque del director ---------- */
.pestanas button { padding: 0 6px; font-size: 14px; white-space: nowrap; }
.pestanas .num { color: var(--petroleo-oscuro); margin-left: 3px; }
@media (max-width: 420px) {
  .pestanas { display: grid; grid-template-columns: repeat(2, 1fr); }
}
.lista-reposicion { padding: 4px 14px; }
.fila-repo { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--borde); flex-wrap: wrap; }
.fila-repo:last-child { border-bottom: 0; }
.fila-repo .ico, .solicitudes-repo .ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; font-size: 26px; border-radius: 10px; overflow: hidden; background: var(--fondo); }
.fila-repo .ico img, .solicitudes-repo .ico img { width: 100%; height: 100%; object-fit: cover; }
.fila-repo .info { flex: 1; min-width: 140px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.fila-repo .chip-ex { font-size: 12px; padding: 2px 8px; }
.fila-repo .btn { min-height: 44px; }
.repo-solicitada { display: flex; flex-direction: column; font-size: 13px; color: var(--petroleo-oscuro); background: var(--petroleo-suave); border-radius: 10px; padding: 6px 12px; }
.repo-solicitada b { font-size: 14px; }
.repo-solicitada b::before { content: "⏳ "; }
@media (max-width: 420px) { .fila-repo .btn, .repo-solicitada { width: 100%; } }
.solicitudes-repo { list-style: none; margin: 0; padding: 0; }
.solicitudes-repo li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--borde); flex-wrap: wrap; }
.solicitudes-repo li:last-child { border-bottom: 0; }
.solicitudes-repo .info { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.solicitudes-repo .info b { font-size: 15px; }
.solicitudes-repo .btn { min-height: 44px; }
.solicitudes-repo li.atrasada .dias { color: var(--rojo); }
@media (max-width: 420px) { .solicitudes-repo .btn { width: 100%; } }

/* ---------- Director como app: barra superior fija, pestañas abajo ---------- */
.barra-filtros { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--tarjeta); border-bottom: 1px solid var(--borde); box-shadow: 0 2px 6px rgb(0 0 0 / 5%); }
.barra-filtros .selector { flex: 1; min-width: 0; max-width: 280px; min-height: 40px; }
.barra-filtros .segmentado { flex: none; margin-left: auto; }
.barra-filtros .segmentado button { min-height: 32px; padding: 0 10px; font-size: 13px; }
.barra-carga { height: 3px; background: linear-gradient(90deg, transparent, var(--naranja), transparent) 0 0 / 40% 100% no-repeat var(--naranja-suave); animation: carga 1s linear infinite; }
@keyframes carga { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.panel-director .titulo-pestana { font-size: 22px; margin: 16px 0 4px; }
.panel-director .bajada-pestana { margin: 0 0 12px; }
.panel-director .bloque { scroll-margin-top: calc(var(--cabecera) + 70px); }
.panel-director .grilla-dir { margin-top: 12px; }
.panel-director .mercado-bloque, .panel-director .bloque-alertas { margin-top: 12px; }
.panel-director .mercado-resumen { margin-bottom: 10px; }
.pie-dir { text-align: center; margin: 20px 0 8px; font-size: 12px; }
.nav-dir .punto { right: calc(50% - 26px); top: 8px; }
.punto { color: var(--petroleo-oscuro); }
.ver-mas { display: block; margin: 6px auto 0; min-height: 44px; }

/* Totales: Hoy a lo ancho, semana y mes lado a lado en el teléfono. */
.totales-periodo { grid-template-columns: 1fr 1fr; gap: 10px; }
.total-periodo.destacado { grid-column: 1 / -1; }
.total-periodo.destacado .variacion { margin-top: 8px; }
.total-periodo:not(.destacado) { padding: 12px 14px; }
.total-periodo:not(.destacado) .valor { font-size: 19px; }
.total-periodo:not(.destacado) .etq { flex-direction: column; gap: 0; font-size: 14px; }
.total-periodo:not(.destacado) .nota { font-size: 13px; }
@media (min-width: 760px) {
  .totales-periodo { grid-template-columns: 2fr 1fr 1fr; }
  .total-periodo.destacado { grid-column: auto; }
  .total-periodo:not(.destacado) .valor { font-size: 26px; }
}

/* Alertas del resumen: cada una lleva al detalle. */
.lista-alertas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.alerta { width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; text-align: left; border: 0; border-left: 5px solid var(--gris); border-radius: 12px; background: var(--fondo); padding: 10px 12px; cursor: pointer; }
.alerta .ico { font-size: 22px; flex: none; }
.alerta .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--gris); }
.alerta .txt b { font-size: 15px; color: var(--texto); }
.alerta .flecha { font-size: 24px; color: var(--gris); flex: none; }
.alerta.naranja { border-left-color: var(--naranja); background: var(--naranja-suave); }
.alerta.rojo { border-left-color: var(--rojo); background: var(--rojo-suave); }
.todo-en-orden { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--verde-suave); color: var(--verde); font-weight: 700; }

/* Comportamiento por sede: en el teléfono, una sede a la vez; en pantalla grande, las tres. */
.fichas-sede { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.fichas-sede .chip { min-height: 40px; }
@media (max-width: 759px) { .comparativo-sedes .sede-tarjeta:not(.elegida) { display: none; } }
@media (min-width: 760px) { .fichas-sede { display: none; } .sede-tarjeta.resaltada { border: 2px solid var(--petroleo); } }
@media (max-width: 640px) { .mercado { height: 170px; } }

/* Bloques del director más compactos, para que cada pestaña quepa en una o dos pantallas del teléfono. */
.panel-director.con-nav { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.panel-director .tarjeta.bloque { padding: 14px; }
.panel-director .bloque h2 { font-size: 17px; }
.panel-director .bloque .explica { font-size: 13px; line-height: 1.4; margin: 2px 0 10px; }
.panel-director .grilla-dir { gap: 12px; }
.panel-director .barras-h { gap: 8px; }
.panel-director .frase { margin-bottom: 8px; }
.panel-director .combos li { padding: 8px 10px; font-size: 13px; }
.panel-director .agotados li { padding: 8px 0; }
.panel-director .dato { padding: 10px; }
.panel-director .dato .numero { font-size: 24px; }
.panel-director .dato .etq { font-size: 13px; line-height: 1.25; }
.panel-director .dato .nota { font-size: 12px; line-height: 1.3; }
.panel-director .solicitudes-repo li { flex-wrap: nowrap; padding: 10px 0; }
.panel-director .solicitudes-repo .info { min-width: 0; font-size: 13px; }
@media (max-width: 420px) { .panel-director .solicitudes-repo .btn { width: auto; flex: none; padding: 0 14px; } }
.panel-director > div > .bajada-pestana:first-child { margin-top: 14px; }
.panel-director .combos .cuantos b { display: inline; font-size: 13px; margin-right: 4px; }
.panel-director .solicitudes-repo .ico { width: 40px; height: 40px; }
/* Al desplazar, el logo se va y solo el filtro queda fijo arriba (más espacio útil en el teléfono). */
#d-cab { position: static; }
.filtros-fijos { position: sticky; top: 0; z-index: 20; }
.barra-carga { position: absolute; left: 0; right: 0; bottom: -3px; }
.panel-director .bloque { scroll-margin-top: 72px; }

/* Franja de "sin conexión" (comun.js): fija arriba hasta que la API vuelva a responder. */
.franja-red { position: fixed; top: 0; left: 0; right: 0; z-index: 60; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--rojo); color: #fff; font-size: 14px; font-weight: 700; text-align: center; box-shadow: 0 2px 8px rgb(0 0 0 / 20%); }
