/* Lo propio de la app de logística (.lg-*). La base es leiten.css (.lt-*, ESTILO-LEITEN.md). */

/* Accesibilidad / baja visión: fuente muy legible (Atkinson Hyperlegible) y base más grande.
   Se sube el tamaño en :root para que todo (que usa rem) escale parejo. */
:root { --lt-font: 'Atkinson Hyperlegible', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
html { font-size: 106.25%; }                 /* base ~17px */
body { font-size: 1rem; line-height: 1.55; } /* pisa los 15px del sistema de diseño */

/* Blazor pone el foco en el h1 al navegar (FocusOnNavigate, para lectores de pantalla): sin el recuadro. */
h1:focus { outline: none; }

/* Franja de testing: §2.1 del funcional, en todas las pantallas. */
.lg-franja-testing {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; gap: var(--lt-3);
  background: var(--lt-rojo); color: #fff;          /* rojo: Leiten / Sinis */
  padding: .4rem var(--lt-4);
}
/* idee: amarillo oscuro (reusa el token de warning; no es el amarillo de marca). REGLAS-UI-UX.md, Regla 1. */
.lg-franja-testing--idee { background: var(--lt-warning); }

.lg-franja-testing__texto {
  flex: 1; text-align: center;
  font-size: .85rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
}

/* En pantallas angostas la franja mantiene el padding chico. */
@media (max-width: 640px) {
  .lg-franja-testing { gap: var(--lt-2); padding: .4rem var(--lt-2); }
}

/* Chapa de Sistemas (integración): tira fina negra abajo del header, en todas las pantallas.
   Identifica ambiente + app + pantalla y el build; sirve para soporte desde un screenshot.
   10px monoespaciada a propósito (no es contenido): discreta y copiable tal cual. */
.lg-chapa {
  flex: 0 0 auto;                /* en el shell flex queda fija arriba, pegada al header */
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--lt-3);
  padding: 2px var(--lt-4);
  background: #000;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 10px; line-height: 1.7; letter-spacing: .02em;
}
.lg-chapa__app   { color: #d9dde1; white-space: nowrap; flex: 0 0 auto; }  /* nombre: algo más claro */
.lg-chapa__cod   { color: #c3c8cd; text-align: right; min-width: 0; }       /* en angosto envuelve a 2ª línea */

/* Título de grupo dentro del menú lateral. */
.lg-nav__grupo {
  margin: var(--lt-3) var(--lt-4) var(--lt-1) !important;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: rgba(255,255,255,.45);
}

/* Inicio: una tarjeta grande por proceso, pensada para el dedo. */
.lg-tiles {
  display: grid; gap: var(--lt-3); margin-top: var(--lt-2);
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.lg-tile {
  display: flex; flex-direction: column; gap: .3rem;
  padding: var(--lt-4); min-height: 120px;
  background: var(--lt-surface); border: 1px solid var(--lt-border); border-radius: var(--lt-radius-lg);
  box-shadow: var(--lt-shadow-sm); color: var(--lt-text); text-decoration: none;
  transition: border-color var(--lt-transition), box-shadow var(--lt-transition), transform var(--lt-transition);
}
.lg-tile:hover  { border-color: var(--lt-amarillo-dark); box-shadow: var(--lt-shadow); }
.lg-tile:active { transform: translateY(1px); }
.lg-tile__icono  { font-size: 1.6rem; line-height: 1; }
.lg-tile__titulo { font-weight: 700; }
.lg-tile__desc   { font-size: .82rem; color: var(--lt-text-muted); }

/* Operaciones: cuadros chicos (casi cuadrados) con ícono de línea + nombre, al estilo "Más" de
   Mercado Libre. Varias columnas, livianos. */
/* Grilla fija de 4 columnas: cuando un grupo tiene 4 opciones, entran las 4 en la misma fila
   (antes el auto-fill con mínimo 104px dejaba 3 por fila en el celular y partía la fila de 4). */
.lg-ops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--lt-2); margin-top: var(--lt-2); }
.lg-op {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  min-height: 104px; padding: var(--lt-2) .35rem; text-align: center;
  /* Contenedor de consulta: ícono y texto se miden contra el ANCHO de la tarjeta (cqi),
     así se achican en tarjetas angostas y nada sobresale del recuadro (ej. "transferencia"). */
  container-type: inline-size;
  /* Amarillo monocromático: fondo bien claro; ícono amarillo saturado; texto ámbar oscuro (legible). */
  background: #fff8df; border: 1px solid #f3e7b4; border-radius: var(--lt-radius-lg);
  color: var(--lt-text); text-decoration: none;
  transition: border-color var(--lt-transition), box-shadow var(--lt-transition), transform var(--lt-transition);
}
.lg-op:hover  { border-color: var(--lt-amarillo-dark); box-shadow: var(--lt-shadow-sm); text-decoration: none; }
.lg-op:active { transform: translateY(1px); }
/* Escalan con el ancho de la tarjeta: tope = tamaños plenos (30px / .875rem) cuando la tarjeta es
   ancha; se achican en pantallas angostas para no desbordar. */
.lg-op__sym    { font-size: clamp(1.35rem, 30cqi, 1.875rem); color: #e6a800; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }   /* ícono en amarillo saturado (gold) */
.lg-op__nombre { font-weight: 700; font-size: clamp(.78rem, 13cqi, .875rem); line-height: 1.2; color: #8a6200; overflow-wrap: break-word; }   /* gold oscuro, legible (~5:1) */

/* Accesos grandes de entrada de una operación (ej. Remito conformado: QR / por número). */
.lg-acciones { display: flex; flex-direction: column; gap: var(--lt-3); margin-bottom: var(--lt-4); }
/* En mobile, la pantalla de entrada (QR / número, con o sin cartel de éxito) entra ENTERA: el
   cuerpo llena el alto del área scrolleable y los accesos quedan centrados (el cartel arriba). */
body.is-mobile .lt-page--proc:has(.lg-acciones--centro) { min-height: 100%; display: flex; flex-direction: column; }
body.is-mobile .lg-acciones--centro { flex: 1 1 auto; min-height: 0; justify-content: center; margin: 0; }
.lg-accion {
  display: flex; align-items: center; justify-content: space-between; gap: var(--lt-3); width: 100%; text-align: left;
  padding: var(--lt-5) var(--lt-4); border: 1px solid var(--lt-border); border-radius: var(--lt-radius-lg);
  background: var(--lt-surface); color: var(--lt-text); cursor: pointer;
  box-shadow: var(--lt-shadow-sm); transition: border-color 140ms ease;
}
.lg-accion:hover { border-color: var(--lt-amarillo-dark); text-decoration: none; }
.lg-accion:active { transform: translateY(1px); }
.lg-accion:disabled { opacity: .6; cursor: default; }
/* Regla: en botones con icono + texto en una fila, el icono va SIEMPRE después del texto
   (order:1 lo manda al final sin tocar el orden del DOM). */
.lg-accion__ico { font-size: 34px; color: #e6a800; flex-shrink: 0; order: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.lg-accion__titulo { font-weight: 700; font-size: 1.05rem; color: var(--lt-text); }

/* En la hoja del QR (celular/tablet) las opciones Cámara/Galería van compactas, como fila de
   app: bajas y con el ícono + texto a la izquierda. Los accesos grandes de la entrada no cambian. */
body.is-mobile .lg-qr-movil .lg-accion { padding: var(--lt-3) var(--lt-4); justify-content: flex-start; }
body.is-mobile .lg-qr-movil .lg-accion__ico { font-size: 26px; }

/* Modal estilo "hoja inferior" en celular/tablet: sube desde abajo, a lo ancho.
   En laptop queda el diálogo centrado de siempre. */
body.is-mobile .lt-hoja-overlay { align-items: flex-end; padding: 0; }
body.is-mobile .lt-hoja {
  width: 100%; max-width: none; height: auto; max-height: 85vh;
  border-radius: var(--lt-radius-lg) var(--lt-radius-lg) 0 0; border-top: none;
  padding-bottom: env(safe-area-inset-bottom, 0);
  animation: lt-hoja-subir 220ms cubic-bezier(.16, 1, .3, 1);
}
@keyframes lt-hoja-subir { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { body.is-mobile .lt-hoja { animation: none; } }

/* Errores. Laptop: modal centrado con cruz (fondo oscuro). Celular/tablet: cartel rojo fijo abajo,
   a lo ancho, sin cruz ni fondo (se limpia solo al reintentar). Misma estructura, el CSS la adapta. */
.lg-error-cap {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  padding: var(--lt-4); background: rgba(0,0,0,.5);
}
.lg-error-cartel {
  position: relative; display: flex; align-items: center; gap: var(--lt-3); max-width: 440px;
  background: #b91c1c; color: #fff; font-weight: 600; line-height: 1.35;
  padding: var(--lt-4) var(--lt-5); border-radius: var(--lt-radius-lg); box-shadow: var(--lt-shadow-lg);
}
.lg-error-cartel__txt { flex: 1; }
.lg-error-cartel__cerrar {
  background: none; border: none; color: #fff; font-size: 1.15rem; line-height: 1; cursor: pointer;
  opacity: .85; flex-shrink: 0; padding: 0;
}
.lg-error-cartel__cerrar:hover { opacity: 1; }

body.is-mobile .lg-error-cap {
  inset: auto 0 0 0; padding: 0; background: none; pointer-events: none; align-items: stretch;
}
body.is-mobile .lg-error-cartel {
  max-width: none; border-radius: 0; justify-content: center; text-align: center;
  padding: var(--lt-3) var(--lt-4); padding-bottom: calc(var(--lt-3) + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -2px 12px rgba(0,0,0,.25); animation: lt-error-subir 200ms ease-out;
}
body.is-mobile .lg-error-cartel__cerrar { display: none; }
@keyframes lt-error-subir { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { body.is-mobile .lg-error-cartel { animation: none; } }

/* "Cancelar" de abajo (como parte del contenido): solo en laptop; en mobile se usa la flecha del header. */
.lg-cancelar-abajo { display: flex; justify-content: center; margin-top: var(--lt-4); }
body.is-mobile .lg-cancelar-abajo { display: none; }

/* Buscador para filtrar operaciones (accesible: label visible arriba, input alto, borde con contraste). */
.lg-buscar { margin: var(--lt-3) 0 var(--lt-4); }
.lg-buscar__label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .35rem; color: var(--lt-text); }
.lg-buscar__input { font-size: 1rem; min-height: 48px; border-color: var(--lt-text-muted); }

/* Saludo "Bienvenido, <nombre>". */
.lg-saludo { font-size: 1.5rem; }

/* Cabecera colapsable: arriba el saludo; al bajar se colapsa y queda fijo el buscador. */
.lg-cab { position: sticky; top: 0; z-index: 6; background: var(--lt-bg); padding-top: var(--lt-1); }
.lg-cab__saludo { overflow: hidden; transition: max-height 200ms ease, opacity 160ms ease, margin 200ms ease; max-height: 3em; }
.lg-cab.is-compact .lg-cab__saludo { max-height: 0; opacity: 0; margin: 0; }
.lg-cab .lg-buscar { margin-bottom: var(--lt-3); }

/* En mobile, al colapsar: el buscador toma el lugar del header (barra amarilla full-width) y se
   oculta el header del logo. */
body.is-mobile .lg-cab.is-compact {
  background: var(--lt-amarillo); border-bottom: 1px solid var(--lt-amarillo-dark);
  margin-inline: calc(-1 * var(--lt-4));
  top: calc(-1 * var(--lt-4));   /* el sticky se fija al content-box (debajo del padding); top negativo lo pega al borde superior */
  padding: var(--lt-2) var(--lt-4);
}
body.is-mobile .lg-cab.is-compact .lg-buscar { margin-bottom: 0; }
body.is-mobile.op-compacto .lg-header { display: none; }

.lg-buscar__input::placeholder { color: var(--lt-text-muted); }

/* Ocultar la barra de scroll lateral (el scroll sigue por gesto/rueda). */
.lt-main { scrollbar-width: none; }
.lt-main::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Transición al cambiar de pantalla: entrada suave (fade + leve subida) en cada navegación.
   El @key por ruta (MainLayout) re-monta .lt-page y vuelve a disparar la animación.
   Solo transform/opacity, corta y ease-out para que no sea impactante. */
/* fill 'backwards' (no 'both'): aplica el estado inicial antes de arrancar, pero NO deja un
   transform residual al terminar (si no, crearía un bloque contenedor y atraparía a los fixed:
   el cartel de error de abajo y los overlays de modal). */
.lt-page { animation: lt-page-in 240ms cubic-bezier(.16, 1, .3, 1) backwards; }
@keyframes lt-page-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lt-page { animation: none; }
}

/* En celular/tablet el título de la operación va al header, así que ocultamos el bloque de título
   del cuerpo (eyebrow → h1 → descripción). Anclado al primer hijo para no tocar texto del medio.
   En laptop el header muestra el logo, así que el título del cuerpo se mantiene. */
body.is-mobile .lt-page--proc > .lt-eyebrow:first-child,
body.is-mobile .lt-page--proc > .lt-eyebrow:first-child + h1,
body.is-mobile .lt-page--proc > .lt-eyebrow:first-child + h1 + p { display: none; }

/* Íconos de línea (Material Symbols Outlined): finos y elegantes, heredan el color. */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined'; font-weight: normal; font-style: normal;
  line-height: 1; letter-spacing: normal; text-transform: none; white-space: nowrap;
  direction: ltr; display: inline-block;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* Íconos de acciones en blanco y negro (silueta de los emoji), al tono del logo, para que no
   desentonen con el resto. */
.lg-tile__icono { color: transparent; text-shadow: 0 0 0 var(--lt-negro); }

/* Esqueleto de cada pantalla. */
.lg-pasos { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .3rem; }
.lg-endpoints { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.lg-endpoints li { background: var(--lt-surface-2); border: 1px solid var(--lt-border); border-radius: var(--lt-radius-sm); padding: .3rem .5rem; overflow-wrap: anywhere; }

/* Lector QR. */
.lg-lector { width: 100%; min-height: 260px; border-radius: var(--lt-radius); overflow: hidden; background: #000; }
.lg-lector video { width: 100% !important; height: auto !important; }


/* Ficha de datos: etiqueta a la izquierda, valor a la derecha; apilado en el celular. */
.lg-datos { display: grid; grid-template-columns: max-content 1fr; gap: .45rem var(--lt-4); margin: 0; }
.lg-datos dt { color: var(--lt-text-muted); font-size: .85rem; }
.lg-datos dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Galería de fotos de un equipo. */
.lg-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: var(--lt-2); }
.lg-foto { position: relative; padding: 0; border: 1px solid var(--lt-border); border-radius: var(--lt-radius); overflow: hidden; background: var(--lt-surface-2); cursor: zoom-in; aspect-ratio: 1; }
.lg-foto__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lg-foto__badge { position: absolute; left: .3rem; top: .3rem; }
.lg-foto__grande { width: 100%; height: auto; display: block; border-radius: var(--lt-radius); }
.lg-img-error { display: flex; align-items: center; justify-content: center; font-size: .75rem; color: var(--lt-text-faint); }

/* "o" entre dos formas de buscar. */
.lg-separador { display: flex; align-items: center; gap: var(--lt-2); color: var(--lt-text-faint); font-size: .8rem; }
.lg-separador::before, .lg-separador::after { content: ""; flex: 1; border-top: 1px solid var(--lt-border); }

/* Opción elegible de una lista (equipos con la misma serie, etc.). */
.lg-opcion { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; width: 100%; text-align: left;
  padding: var(--lt-3); background: var(--lt-surface); border: 1px solid var(--lt-border); border-radius: var(--lt-radius); cursor: pointer; font: inherit; color: inherit; }
@media (hover: hover) and (pointer: fine) { .lg-opcion:hover { border-color: var(--lt-amarillo-dark); background: var(--lt-amarillo-wash); } }
/* Señal de que la tarjeta se toca para abrir: "Seleccionar" en celeste + chevron, abajo a la derecha. */
.lg-opcion__sel { align-self: flex-end; margin-top: .3rem; display: inline-flex; align-items: center; gap: .1rem;
  color: var(--lt-info); font-weight: 700; font-size: .9rem; }
.lg-opcion__sel .material-symbols-outlined { font-size: 1.15rem; }

/* Filtros: dos campos lado a lado, apilados en el celular. */
.lg-filtros__campos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--lt-2); }

/* Tarjeta de etiqueta pendiente (C2). */
.lg-etiqueta--ok { border-color: #a7dcba; background: #f2faf5; }
.lg-etiqueta__meta { display: flex; flex-wrap: wrap; gap: .25rem var(--lt-3); margin-top: var(--lt-2); font-size: .82rem; color: var(--lt-text-muted); }

/* Aviso cerrable (componente Aviso). */
.lg-aviso { display: flex; align-items: flex-start; gap: var(--lt-2); }
.lg-aviso__texto { flex: 1; min-width: 0; }
.lg-aviso__cerrar { flex: none; background: none; border: none; cursor: pointer; color: inherit; opacity: .6;
  font-size: 1rem; line-height: 1; padding: .1rem .25rem; margin: -.1rem -.25rem 0 0; border-radius: var(--lt-radius-sm); }
.lg-aviso__cerrar:hover { opacity: 1; background: rgba(0,0,0,.06); }
/* Texto armado por el front (regla de José): gris, sin fondo. Nunca se confunde con un mensaje del backend. */
.lg-nota { color: var(--lt-text-muted); font-size: .9rem; padding: .15rem 0; }
.lg-nota-campo { color: var(--lt-text-muted); font-size: .82rem; margin-top: .25rem; }
.lg-mb-3 { margin-bottom: var(--lt-3); }
.lg-mt-2 { margin-top: var(--lt-2); }

/* Checkbox grande, fácil de tocar con el dedo. */
.lg-check { display: flex; align-items: center; gap: var(--lt-2); padding: .45rem 0; cursor: pointer; font-weight: 500; }
.lg-check input { width: 1.25rem; height: 1.25rem; accent-color: var(--lt-negro); }

/* Campo de foto (CampoFoto). */
.lg-campo-foto { border: 1px dashed var(--lt-border-strong); border-radius: var(--lt-radius); padding: var(--lt-3); }
.lg-campo-foto--req { border-color: var(--lt-amarillo-dark); background: var(--lt-amarillo-wash); }
/* Variante "grande" (botones Cámara/Galería): sin recuadro, para que no parezca una caja aparte. */
.lg-campo-foto--plano { border: 0; padding: 0; background: none; }
.lg-campo-foto__titulo { display: flex; align-items: center; gap: var(--lt-2); font-weight: 600; margin-bottom: var(--lt-2); }
.lg-campo-foto__btn { flex: 1; }
.lg-campo-foto__preview img { width: 100%; max-height: 280px; object-fit: contain; background: var(--lt-surface-2); border-radius: var(--lt-radius); display: block; }
.lg-disabled { opacity: .5; pointer-events: none; }

/* Buscador con sugerencias (BuscadorTransporte). */
.lg-sugerencias { margin-top: var(--lt-1); border: 1px solid var(--lt-border); border-radius: var(--lt-radius); max-height: 260px; overflow-y: auto; background: var(--lt-surface); }
.lg-sugerencia { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; gap: .1rem;
  padding: .55rem var(--lt-3); background: none; border: none; border-bottom: 1px solid var(--lt-border); cursor: pointer; font: inherit; color: inherit; }
.lg-sugerencia:last-child { border-bottom: none; }
@media (hover: hover) and (pointer: fine) { .lg-sugerencia:hover { background: var(--lt-amarillo-wash); } }
.lg-elegido { display: flex; align-items: center; justify-content: space-between; gap: var(--lt-2);
  padding: var(--lt-2) var(--lt-3); border: 1px solid var(--lt-amarillo-dark); background: var(--lt-amarillo-wash); border-radius: var(--lt-radius); }

/* Líneas de un remito (ItemsTransferencia). */
.lg-items { list-style: none; padding: 0; margin: var(--lt-2) 0 0; border: 1px solid var(--lt-border); border-radius: var(--lt-radius); }
.lg-item { display: flex; align-items: center; justify-content: space-between; gap: var(--lt-3); padding: .55rem var(--lt-3); border-bottom: 1px solid var(--lt-border); }
.lg-item:last-child { border-bottom: none; }
.lg-item__cant { font-size: 1.1rem; min-width: 2.5rem; text-align: right; }

/* Opción que se puede abrir pero no operar (p. ej. transferencia que se recibe desde el ERP). */
.lg-opcion--apagada { background: var(--lt-surface-2); color: var(--lt-text-muted); }

/* Renglón con cantidad a cargar (B1/B2/B3). */
.lg-renglon { display: flex; flex-direction: column; gap: .3rem; padding: var(--lt-3); border: 1px solid var(--lt-border); border-radius: var(--lt-radius); }
.lg-renglon--on { border-color: var(--lt-amarillo-dark); background: var(--lt-amarillo-wash); }
.lg-renglon__fila { display: flex; align-items: center; justify-content: space-between; gap: var(--lt-3); }
.lg-renglon__cant { width: 8rem; text-align: right; font-size: 1.05rem; }

/* Proveedor con sus OC (BuscadorOc). */
.lg-proveedor { border: 1px solid var(--lt-border); border-radius: var(--lt-radius); overflow: hidden; }
.lg-proveedor__nombre { display: flex; flex-direction: column; padding: .55rem var(--lt-3); background: var(--lt-surface-2); border-bottom: 1px solid var(--lt-border); }

/* Obras: historial de texto acumulado (comentarios / clientes a procesar), tal cual lo guarda el ERP. */
.lg-historial { white-space: pre-wrap; font-size: .9rem; background: var(--lt-surface-2); border: 1px solid var(--lt-border);
  border-radius: var(--lt-radius); padding: var(--lt-3); max-height: 320px; overflow-y: auto; overflow-wrap: anywhere; }

/* Contacto de una obra. */
.lg-persona { padding: .55rem var(--lt-3); border-bottom: 1px solid var(--lt-border); }
.lg-persona:last-child { border-bottom: none; }
.lg-persona__datos { display: flex; flex-wrap: wrap; gap: .2rem var(--lt-3); font-size: .85rem; margin-top: .15rem; }
.lg-persona__datos a { color: var(--lt-info-text); text-decoration: none; overflow-wrap: anywhere; }

.lg-oc-fila { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--lt-2); }
.lg-oc-fila__txt { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.lg-oc-items { padding: var(--lt-2) var(--lt-3) var(--lt-3); border-bottom: 1px solid var(--lt-border); background: var(--lt-surface-2); display: flex; flex-direction: column; gap: var(--lt-2); align-items: flex-start; }
.lg-oc-items__lista { list-style: none; padding: 0; margin: 0; width: 100%; display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; }
.lg-oc-items__lista li { display: flex; justify-content: space-between; gap: var(--lt-3); }

.lg-adj-botones { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--lt-2); }
.lg-adj-botones .lt-btn { padding-inline: .4rem; }

@media (max-width: 768px) {
  .lg-filtros__campos { grid-template-columns: 1fr; }
  .lg-datos { grid-template-columns: 1fr; gap: 0; }
  .lg-datos dd { margin-bottom: .55rem; }
  .lg-tiles { grid-template-columns: 1fr 1fr; gap: var(--lt-2); }
  .lg-tile  { min-height: 110px; padding: var(--lt-3); }
  .lg-tile__desc { display: none; }
  .lt-main { padding: var(--lt-4) var(--lt-3); }
}

:root { --lg-rail-w: 72px; --lg-rail-exp: 232px; --lg-header-h: 64px; }

/* ── Header de la app ────────────────────────────────────────────────────────
   Full-width: logo grande y estable a la izquierda; a la derecha el usuario
   (nombre + legajo) con menú desplegable (Configuración, Cerrar sesión). */
.lg-header {
  display: flex; align-items: center; gap: var(--lt-3);
  padding: var(--lt-2) var(--lt-4); min-height: var(--lg-header-h);
  background: var(--lt-amarillo); border-bottom: 1px solid var(--lt-amarillo-dark); color: var(--lt-negro);
}
/* Botón de menú (ampliar/minimizar el rail), a la misma altura que el logo. */
.lg-header__menu, .lg-header__burger, .lg-header__back {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 42px; height: 42px; border: none; border-radius: var(--lt-radius);
  background: rgba(0,0,0,.06); color: var(--lt-negro); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.lg-header__menu:hover, .lg-header__burger:hover, .lg-header__back:hover { background: rgba(0,0,0,.12); }
.lg-header__burger, .lg-header__back { display: none; }   /* sólo mobile */
.lg-header__back { font-size: 1.4rem; }
.lg-header__logo { display: inline-flex; }
.lg-header__logo img { height: 46px; width: auto; display: block; }

/* Dentro de una operación, SOLO en celular/tablet: título + ícono en el lugar del logo
   (se mantiene todo el proceso). En laptop queda siempre el logo. */
.lg-header__op { display: none; align-items: center; gap: var(--lt-2); min-width: 0; }
body.is-mobile .lg-header__op { display: inline-flex; }
body.is-mobile .lg-header.is-op .lg-header__logo { display: none; }   /* en mobile, dentro de una op, se oculta el logo */
.lg-header__op-ico { font-size: 30px; color: var(--lt-negro); flex-shrink: 0;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.lg-header__op-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.lg-header__op-eyebrow {
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(0,0,0,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lg-header__op-titulo {
  font-size: 1.1rem; font-weight: 700; line-height: 1.15; color: var(--lt-negro);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Acción de la pantalla en el header (ej. "Actualizar" en una lista): pill oscuro sobre amarillo,
   texto + ícono (el ícono va después del texto, como en el resto de la app). */
.lg-header__accion {
  display: inline-flex; align-items: center; gap: .3rem; flex-shrink: 0;
  min-height: 42px; padding: 0 .75rem; border: none; border-radius: var(--lt-radius);
  background: rgba(0,0,0,.06); color: var(--lt-negro); font-family: inherit;
  font-size: .9rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.lg-header__accion:hover { background: rgba(0,0,0,.12); }
.lg-header__accion:disabled { opacity: .6; cursor: default; }
.lg-header__accion .material-symbols-outlined { font-size: 1.25rem; }
.lg-gira { animation: lg-gira 1s linear infinite; }
@keyframes lg-gira { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lg-gira { animation: none; } }


.lg-user { position: relative; }
.lg-user__btn {
  display: flex; align-items: center; gap: var(--lt-2);
  background: none; border: 1px solid transparent; border-radius: var(--lt-radius);
  padding: .3rem .5rem; cursor: pointer; font-family: inherit; color: var(--lt-negro);
}
.lg-user__btn:hover { background: rgba(0,0,0,.08); border-color: rgba(0,0,0,.12); }
.lg-user__avatar {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: var(--lt-pill);
  background: var(--lt-negro); color: var(--lt-amarillo);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem;
}
.lg-user__info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.lg-user__nombre { font-weight: 700; font-size: .88rem; color: var(--lt-negro); }
.lg-user__legajo { font-size: .72rem; color: rgba(0,0,0,.6); }
.lg-user__caret { color: rgba(0,0,0,.55); font-size: .7rem; }

.lg-user__backdrop { position: fixed; inset: 0; z-index: 90; }
.lg-user__menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 91; min-width: 210px;
  background: var(--lt-surface); border: 1px solid var(--lt-border); border-radius: var(--lt-radius-lg);
  box-shadow: var(--lt-shadow-lg); padding: var(--lt-1); display: flex; flex-direction: column;
}
.lg-user__item {
  display: flex; align-items: center; gap: var(--lt-2); width: 100%;
  padding: .55rem .7rem; border: none; background: none; border-radius: var(--lt-radius);
  font-family: inherit; font-size: .875rem; color: var(--lt-text); text-align: left;
  cursor: pointer; text-decoration: none;
}
.lg-user__item:hover { background: var(--lt-surface-2); text-decoration: none; }

/* ── Navigation rail ─────────────────────────────────────────────────────────
   Desktop/tablet: solo íconos con tooltip; el botón de arriba lo amplía o
   minimiza (.is-expanded). Mobile (≤768px): drawer con etiquetas. */
.lg-rail__panel { display: flex; flex-direction: column; min-height: 100%; padding-top: var(--lt-3); }
.lg-rail__label { white-space: nowrap; }

/* Íconos del menú = los mismos Material Symbols de las tarjetas: blancos cuando no están
   seleccionados, negros en el ítem activo (sobre el pill amarillo). */
.lg-rail .lt-nav__icon {
  width: auto; font-size: 24px; color: rgba(255,255,255,.82);
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.lg-rail .lt-nav a:hover .lt-nav__icon { color: #fff; }
.lg-rail .lt-nav a.active .lt-nav__icon,
.lg-rail .lt-nav a[aria-current="page"] .lt-nav__icon { color: var(--lt-negro); }

@media (min-width: 769px) {
  .lg-rail { flex: 0 0 var(--lg-rail-w); width: var(--lg-rail-w); overflow: visible;
             transition: flex-basis 180ms ease, width 180ms ease; }
  .lg-rail.is-expanded { flex: 0 0 var(--lg-rail-exp); width: var(--lg-rail-exp); }

  /* Colapsado: íconos centrados, sin texto, con tooltip. */
  .lg-rail.is-collapsed .lg-rail__label { display: none; }
  .lg-rail.is-collapsed .lt-nav a { justify-content: center; gap: 0; }
  .lg-rail.is-collapsed .lg-rail__only-exp { display: none; }

  /* Tooltip (cartelito) del rail colapsado. */
  .lg-rail.is-collapsed .lg-rail__item { position: relative; }
  .lg-rail.is-collapsed .lg-rail__item::after {
    content: attr(data-tip);
    position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%);
    white-space: nowrap; background: var(--lt-negro); color: #fff;
    padding: .3rem .55rem; border-radius: var(--lt-radius); font-size: .78rem; font-weight: 600;
    box-shadow: var(--lt-shadow); opacity: 0; pointer-events: none; transition: opacity 120ms ease;
    z-index: 200;
  }
  .lg-rail.is-collapsed .lg-rail__item:hover::after { opacity: 1; }
}

@media (max-width: 768px) {
  .lg-header__menu { display: none; }        /* en mobile usamos el burger (drawer) */
  .lg-header__burger { display: inline-flex; }
  .lg-header__logo img { height: 38px; }
  .lg-user__info { display: none; }          /* en mobile, solo el avatar */

  /* En mobile el rail es el drawer de siempre: etiquetas sí, tooltips no. */
  .lg-rail.is-collapsed .lg-rail__label { display: inline; }
  .lg-rail.is-collapsed .lg-rail__only-exp { display: block; }
  .lg-rail.is-collapsed .lt-nav a { justify-content: flex-start; gap: var(--lt-2); }
  .lg-rail.is-collapsed .lg-rail__item::after { display: none; }
}

/* ── Modo mobile (celular/tablet real, o simulado desde la franja) ────────────
   Se activa con body.is-mobile (js/testing.js): el rail pasa a drawer, el header
   se adapta y aparece la barra inferior de cuenta. */
body.is-mobile .lt-app { flex-direction: column; }

/* Header adaptado */
body.is-mobile .lg-header__menu { display: none; }
body.is-mobile .lg-header__burger { display: none; }  /* sin drawer por ahora: se navega por la barra inferior */
body.is-mobile .lg-header__back { display: inline-flex; }   /* flecha de volver, cuando no es el inicio */
body.is-mobile .lg-header__logo img { height: 38px; }
body.is-mobile .lg-user { display: none; }            /* la cuenta pasa a la barra inferior */

/* El header de operación es una fila fija de la columna de la app (ver "App instalada" más abajo):
   queda arriba al scrollear, sin depender de medir nada. */
body.is-mobile .lg-header { flex: 0 0 auto; }

/* Rail → drawer: oculto, entra desde la izquierda con el ☰. */
body.is-mobile .lg-rail {
  position: fixed; top: 0; left: 0; height: 100vh; width: min(82vw, 290px); z-index: 60;
  flex: none; overflow-y: auto;
  transform: translateX(-100%); transition: transform .25s ease; box-shadow: 2px 0 16px rgba(0,0,0,.25);
}
body.is-mobile .lg-rail.lt-sidebar--open { transform: translateX(0); }
body.is-mobile .lt-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }

/* En el drawer: etiquetas sí, íconos a la izquierda, sin tooltips. */
body.is-mobile .lg-rail .lg-rail__label { display: inline; }
body.is-mobile .lg-rail .lg-rail__only-exp { display: block; }
body.is-mobile .lg-rail .lt-nav a { justify-content: flex-start; gap: var(--lt-2); }
body.is-mobile .lg-rail .lg-rail__item::after { display: none; }

/* Padding uniforme en mobile (también dentro del marco) + lugar para la barra inferior. */
body.is-mobile .lt-main { padding: var(--lt-4); padding-bottom: 78px; }
/* Dentro de una operación NO hay barra inferior: el cuerpo no necesita el hueco de 78px. */
body.is-mobile .lt-main:has(.lt-page--proc) { padding-bottom: var(--lt-4); }

/* ── App instalada: columna de alto de pantalla, el cuerpo scrollea por dentro ────────────────
   La app ocupa exactamente el alto de la pantalla (100dvh) y se reparte con flexbox: la franja de
   testing y el header son filas FIJAS, y .lt-main es la única parte que scrollea. Así el documento
   NO scrollea (sin "juego"/rebote de página web), todo lo de arriba queda fijo y entra todo sin
   números mágicos ni medir alturas. Sólo en la app (MainLayout tiene .lg-shell); el login usa otro
   layout y no se toca. */
html:has(body.is-mobile .lg-shell), body.is-mobile:has(.lg-shell) { height: 100dvh; overflow: hidden; }
body.is-mobile > div:has(.lg-shell) { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
body.is-mobile .lg-franja-testing { position: static; flex: 0 0 auto; }
body.is-mobile .lg-shell { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
body.is-mobile .lt-app { flex: 1 1 auto; min-height: 0; height: auto; }
body.is-mobile .lt-main { min-height: 0; overscroll-behavior: contain; }
html, body { overscroll-behavior: none; }

/* La zona del sistema (barra de navegación del celular: volver / inicio / apps) queda SIEMPRE
   negra, no del color del contenido que quede atrás. */
body.is-mobile::after {
  content: ""; position: fixed; left: 0; right: 0; bottom: 0;
  height: env(safe-area-inset-bottom, 0); background: var(--lt-negro);
  z-index: 100; pointer-events: none;
}

/* ── Barra inferior de cuenta (sólo mobile) ─────────────────────────────────── */
.lg-bottombar { display: none; }
body.is-mobile .lg-bottombar {
  display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 58;
  background: var(--lt-negro); border-top: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 -2px 12px rgba(0,0,0,.25); padding-bottom: env(safe-area-inset-bottom, 0);
}
.lg-bottombar__item {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: .5rem .3rem; border: none; background: none; color: rgba(255,255,255,.62);
  font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.lg-bottombar__item:hover { color: #fff; text-decoration: none; }
.lg-bottombar__ico { font-size: 26px; line-height: 1; }   /* ícono de línea (Material Symbols), hereda el color del ítem */

/* Ítem activo: blanco pleno + subrayado amarillo corto arriba (resalta sobre el negro). */
.lg-bottombar__item.active { color: #fff; }
.lg-bottombar__item.active::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 42px; height: 5px; border-radius: 0 0 5px 5px; background: var(--lt-amarillo);
}

/* Página "Mi cuenta" (pantalla completa, desde la barra inferior). */
.lg-cuenta { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--lt-5); }
.lg-cuenta__perfil { display: flex; align-items: center; gap: var(--lt-4); }
.lg-cuenta__avatar { width: 56px; height: 56px; font-size: 1.1rem; }
.lg-cuenta__nombre { font-size: 1.3rem; margin: 0; }
.lg-cuenta__acciones { display: flex; flex-direction: column; gap: var(--lt-2); }

/* ── Marco de dispositivo (simulador Celular / Tablet) ───────────────────────
   Celular y Tablet muestran el MISMO layout mobile pero en un marco de ancho
   distinto. El drawer, el overlay y la barra inferior quedan DENTRO del marco. */
body[data-lg-size] { background: #e9ebef; }
body[data-lg-size] .lg-shell {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  height: calc(100vh - 104px); margin: 14px auto;
  background: var(--lt-bg);
  border: 1px solid var(--lt-border-strong); border-radius: 20px; box-shadow: var(--lt-shadow-lg);
}
body[data-lg-size="celular"] .lg-shell { width: 400px; }
body[data-lg-size="tablet"]  .lg-shell { width: 834px; }

body[data-lg-size] .lg-header { flex: none; }
body[data-lg-size] .lt-app { flex: 1 1 auto; min-height: 0; overflow: visible; display: flex; flex-direction: column; }
body[data-lg-size] .lt-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

/* Dentro del marco: posiciones relativas al shell, no al viewport. */
body[data-lg-size] .lg-rail { position: absolute; top: 0; left: 0; height: 100%; }
body[data-lg-size] .lt-overlay { position: absolute; }
body[data-lg-size] .lg-bottombar { position: absolute; }
body[data-lg-size] .lg-error-cap { position: absolute; }   /* en el simulador (mobile), dentro del marco */

#blazor-error-ui {
  display: none; position: fixed; bottom: 0; left: 0; width: 100%; z-index: 1000;
  background: var(--lt-danger-bg); color: var(--lt-danger-text); padding: .6rem 1.25rem; box-shadow: var(--lt-shadow);
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

/* Botón "Actualizar app" debajo de la caja de login: apilamos la caja y el botón en
   columna (el contenedor .lt-login centra en fila por defecto) y alineamos el ancho. */
.lt-login { flex-direction: column; gap: var(--lt-3); }
.lt-login__actualizar { width: 100%; max-width: 400px; }

/* Pantalla "Compartir la app": QR centrado, URL e instrucciones de instalación. */
.lg-compartir { max-width: 460px; margin: 0 auto; padding: var(--lt-4) var(--lt-4) var(--lt-6); display: flex; flex-direction: column; gap: var(--lt-3); }
.lg-compartir__titulo { margin: 0; }
.lg-compartir__bajada { margin: 0; }
.lg-compartir__qr {
  width: 260px; max-width: 72vw; aspect-ratio: 1; margin: var(--lt-2) auto;
  display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--lt-border); border-radius: var(--lt-radius-lg);
  padding: var(--lt-3); box-shadow: var(--lt-shadow);
}
.lg-compartir__url {
  text-align: center; word-break: break-all; font-size: .95rem;
  color: var(--lt-text-muted); background: var(--lt-surface-2);
  border-radius: var(--lt-radius); padding: .5rem .75rem;
}
.lg-compartir__aviso { text-align: center; }

.lg-instrucciones { margin-top: var(--lt-2); display: flex; flex-direction: column; gap: var(--lt-3); }
.lg-instrucciones__tit { margin: 0 0 var(--lt-1); font-size: 1.05rem; }
.lg-instrucciones__os {
  background: var(--lt-surface); border: 1px solid var(--lt-border);
  border-radius: var(--lt-radius-lg); padding: var(--lt-3) var(--lt-4);
}
.lg-instrucciones__os-tit { font-weight: 700; margin-bottom: var(--lt-1); }
.lg-instrucciones__os ol { margin: 0; padding-left: 1.25rem; line-height: 1.6; }
.lg-instrucciones__os li { margin: .15rem 0; }

/* Datos del usuario (Mi cuenta) como tabla: Centro y Empresa. */
.lg-datos-tabla { width: 100%; border-collapse: collapse; }
.lg-datos-tabla th, .lg-datos-tabla td { text-align: left; padding: .6rem .25rem; border-bottom: 1px solid var(--lt-border); vertical-align: top; }
.lg-datos-tabla tr:last-child th, .lg-datos-tabla tr:last-child td { border-bottom: 0; }
.lg-datos-tabla th { color: var(--lt-text-muted); font-weight: 600; font-size: .9rem; width: 40%; white-space: nowrap; }
.lg-datos-tabla td { font-weight: 600; overflow-wrap: anywhere; }
.lg-datos-tabla--wrap th { white-space: normal; }
.lg-datos-tabla__editable { padding-top: .35rem; padding-bottom: .35rem; }

/* Modal del QR (Remito conformado): dos interfaces. Celular/tablet = apps de cámara/galería
   (sin cruz, back del header); laptop = sacar foto en vivo / explorar / arrastrar un archivo. */
.lg-qr-laptop { display: flex; flex-direction: column; gap: var(--lt-3); }
.lg-qr-movil { display: none; }
body.is-mobile .lg-qr-laptop { display: none; }
body.is-mobile .lg-qr-movil { display: flex; flex-direction: column; gap: var(--lt-3); }
/* La cruz de cerrar sólo en laptop (en móvil se vuelve con la flecha del header). */
body.is-mobile .lg-oculto-movil { display: none; }

/* Zona de arrastrar + explorar (laptop). */
.lg-dropzone {
  display: flex; flex-direction: column; align-items: center; gap: var(--lt-2);
  padding: var(--lt-5) var(--lt-4); text-align: center;
  border: 2px dashed var(--lt-border); border-radius: var(--lt-radius-lg);
  background: var(--lt-surface-2); color: var(--lt-text-muted);
  transition: border-color .15s ease, background .15s ease;
}
.lg-dropzone.is-drag { border-color: var(--lt-amarillo); background: #fff8e6; }
.lg-dropzone__ico { font-size: 34px; color: var(--lt-text-muted); }
.lg-dropzone__txt { font-size: .95rem; }

/* Saludo del inicio ("Hola, Nombre"): más grande y oscuro que el eyebrow. */
.lg-saludo { font-size: 1.4rem; font-weight: 800; color: var(--lt-negro); margin-bottom: var(--lt-2); line-height: 1.2; }

/* Modal "Buscar fletero": lista de resultados (filtro + selección). */
.lg-fletero-lista { border: 1px solid var(--lt-border); border-radius: var(--lt-radius); max-height: 50vh; overflow-y: auto; background: var(--lt-surface); }
.lg-fletero-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; gap: .15rem;
  padding: var(--lt-3) var(--lt-4); background: none; border: none; border-bottom: 1px solid var(--lt-border); cursor: pointer; }
.lg-fletero-item:last-child { border-bottom: none; }
@media (hover: hover) and (pointer: fine) { .lg-fletero-item:hover { background: var(--lt-amarillo-wash); } }
.lg-fletero-item strong { font-weight: 700; }

/* Resumen final del asistente: miniaturas de las fotos cargadas. */
.lg-resumen-fotos { display: flex; gap: var(--lt-3); flex-wrap: wrap; }
.lg-resumen-foto { margin: 0; }
.lg-resumen-foto img { width: 120px; height: 120px; object-fit: cover; border-radius: var(--lt-radius); border: 1px solid var(--lt-border); display: block; }
.lg-resumen-foto figcaption { margin-top: .2rem; text-align: center; }

/* App móvil: se scrollea con el dedo, sin barras de scroll visibles en ningún lado
   (el frame del simulador, las listas, los modales, etc.). El scroll sigue funcionando. */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* Asistente de conformado estilo app (una pantalla por paso, con deslizamiento). */
.lg-paso-wrap { overflow-x: clip; }
.lg-paso { animation: lg-paso-in 260ms cubic-bezier(.16, 1, .3, 1) backwards; }
.lg-paso--atras { animation-name: lg-paso-in-atras; }
.lg-paso__titulo { margin: 0 0 var(--lt-4); font-size: 1.4rem; font-weight: 800; color: var(--lt-negro); line-height: 1.15; }
.lg-paso__sub { margin: 0 0 var(--lt-4); color: var(--lt-text-muted); font-size: .9rem; font-weight: 600; }
.lg-paso .lt-card { margin-bottom: var(--lt-4); }
@keyframes lg-paso-in { from { opacity: 0; transform: translateX(14%); } to { opacity: 1; transform: none; } }
@keyframes lg-paso-in-atras { from { opacity: 0; transform: translateX(-14%); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .lg-paso { animation: none; } }

/* Botón grande seleccionado (ej. firmantes del conformado). */
.lg-accion.is-sel { border-color: var(--lt-amarillo); background: var(--lt-amarillo-wash); box-shadow: inset 0 0 0 1px var(--lt-amarillo); }
.lg-accion.is-sel .lg-accion__ico { color: var(--lt-amarillo-dark); }

/* Control Sí/No (segmentado). */
.lg-segmento { display: flex; gap: var(--lt-2); }
.lg-seg { flex: 1; padding: var(--lt-3); border: 1px solid var(--lt-border); border-radius: var(--lt-radius);
  background: var(--lt-surface); color: var(--lt-text); font-weight: 700; cursor: pointer; }
.lg-seg.is-sel { border-color: var(--lt-amarillo); background: var(--lt-amarillo-wash); box-shadow: inset 0 0 0 1px var(--lt-amarillo); }
.lg-seg:disabled { opacity: .6; cursor: default; }

/* Selector estilo app (CampoSelector): control tocable que abre una hoja con la lista de opciones. */
.lg-selector { display: flex; flex-direction: column; gap: var(--lt-1); }
.lg-selector__titulo { font-weight: 600; font-size: .9rem; color: var(--lt-text); }
.lg-selector__control { display: flex; align-items: center; gap: var(--lt-2); width: 100%; min-height: 46px;
  padding: .55rem var(--lt-3); border: 1px solid var(--lt-border); border-radius: var(--lt-radius);
  background: var(--lt-surface); color: var(--lt-text); font: inherit; text-align: left; cursor: pointer; }
.lg-selector__control:disabled { opacity: .6; cursor: default; }
.lg-selector__val { flex: 1; min-width: 0; }
.lg-selector__val.is-vacio { color: var(--lt-text-muted); }
.lg-selector__chev { color: var(--lt-text-muted); flex-shrink: 0; }
/* Lista dentro de la hoja. */
.lg-selector__lista { display: flex; flex-direction: column; }
.lg-selector__opcion { display: flex; align-items: center; justify-content: space-between; gap: var(--lt-2);
  width: 100%; min-height: 50px; padding: var(--lt-3); border: 0; border-bottom: 1px solid var(--lt-border);
  background: none; color: var(--lt-text); font: inherit; text-align: left; cursor: pointer; }
.lg-selector__opcion:last-child { border-bottom: 0; }
.lg-selector__opcion.is-sel { font-weight: 700; color: var(--lt-amarillo-dark); }
@media (hover: hover) and (pointer: fine) { .lg-selector__opcion:hover { background: var(--lt-amarillo-wash); } }
.lg-selector__check { color: var(--lt-amarillo-dark); flex-shrink: 0; }

/* Carga de cantidad (CampoCantidad): caja tocable que abre un teclado numérico en una hoja. */
.lg-cant { display: inline-flex; align-items: center; justify-content: space-between; gap: var(--lt-2);
  min-width: 104px; min-height: 48px; padding: .45rem var(--lt-3); border: 1px solid var(--lt-border);
  border-radius: var(--lt-radius); background: var(--lt-surface); color: var(--lt-text); font: inherit; cursor: pointer; }
.lg-cant.is-cargada { border-color: var(--lt-amarillo); background: var(--lt-amarillo-wash); box-shadow: inset 0 0 0 1px var(--lt-amarillo); }
.lg-cant:disabled { opacity: .6; cursor: default; }
.lg-cant__val { font-weight: 800; font-size: 1.2rem; }
.lg-cant__val.is-vacio { font-weight: 600; font-size: .95rem; color: var(--lt-text-muted); }
.lg-cant__ico { color: var(--lt-text-muted); font-size: 20px; flex-shrink: 0; }

/* Teclado numérico de la hoja. */
.lg-teclado__sub { margin-bottom: var(--lt-2); }
.lg-teclado__display { text-align: right; font-weight: 800; font-size: 2.4rem; line-height: 1.1; color: var(--lt-negro);
  padding: var(--lt-2) var(--lt-1); min-height: 2.8rem; border-bottom: 2px solid var(--lt-border); margin-bottom: var(--lt-3); overflow: hidden; }
.lg-teclado__todo { margin-bottom: var(--lt-3); }
.lg-teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--lt-2); }
.lg-tecla { min-height: 60px; border: 1px solid var(--lt-border); border-radius: var(--lt-radius);
  background: var(--lt-surface); color: var(--lt-text); font: inherit; font-size: 1.5rem; font-weight: 700; cursor: pointer; }
.lg-tecla:active { background: var(--lt-amarillo-wash); }
.lg-tecla--borrar { font-size: 1.25rem; color: var(--lt-text-muted); }
.lg-teclado__ok { margin-top: var(--lt-4); }

/* Fotos del equipo (CampoFotos): miniaturas; al tocar una se abre una hoja (Reemplazar / Eliminar). */
.lg-fotos { display: flex; flex-wrap: wrap; gap: var(--lt-3); }
.lg-fotos__item { position: relative; width: 104px; height: 104px; flex: none; padding: 0; cursor: pointer;
  border: 1px solid var(--lt-border); border-radius: var(--lt-radius); overflow: hidden; background: var(--lt-bg); }
.lg-fotos__item img, .lg-fotos__item .lg-fotos__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lg-fotos__item:disabled { opacity: .6; cursor: default; }
/* Foto actual en solo lectura (vista previa del set vigente, sin acción por foto). */
.lg-fotos__item--ver { cursor: default; }
.lg-fotos__item--ver:active { transform: none; }
.lg-fotos__badge { position: absolute; left: 4px; bottom: 4px; font-size: .62rem; }
/* "Modificar" centrado sobre la foto, con sombra alrededor para que se lea sobre cualquier imagen. */
.lg-fotos__tocar { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  gap: 3px; color: #fff; font-size: .74rem; font-weight: 700; pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 6px rgba(0,0,0,.75); }
.lg-fotos__tocar .material-symbols-outlined { font-size: .95rem; }
.lg-fotos__sinimg { display: flex; align-items: center; justify-content: center; height: 100%;
  padding: var(--lt-2); font-size: .72rem; color: var(--lt-text-muted); text-align: center; }
.lg-fotos__cargando { display: flex; align-items: center; justify-content: center; cursor: default; }
.lg-fotos__agregar { width: 104px; height: 104px; flex: none; border: 1px dashed var(--lt-border-strong);
  border-radius: var(--lt-radius); background: var(--lt-surface); color: var(--lt-text-muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--lt-1);
  font: inherit; font-size: .85rem; font-weight: 600; }
.lg-fotos__agregar .material-symbols-outlined { font-size: 28px; color: var(--lt-amarillo-dark); }
@media (hover: hover) and (pointer: fine) { .lg-fotos__agregar:hover { border-color: var(--lt-amarillo-dark); } }
.lg-fotos__agregar:disabled { opacity: .6; cursor: default; }
/* Slot de la foto principal (vacío): borde marcado para distinguirlo de las secundarias. */
.lg-fotos__agregar--principal { border-style: solid; border-color: var(--lt-amarillo-dark); }

/* Carga de fotos como sub-pantalla (el header de la app queda arriba): sin chrome de tarjeta. */
.lg-mp--plano { background: transparent; border-radius: 0; }
.lg-mp__sec--plano { padding: 0; border-top: 0; }
/* Slots de carga: grilla de 2 columnas; la principal ocupa el ancho completo arriba. Las alturas
   van en dvh (acotadas) para que entren los 3 recuadros + Finalizar en una pantalla, sin scroll. */
.lg-fotos-grande { display: grid; grid-template-columns: 1fr 1fr; gap: var(--lt-3); }
.lg-fotos-grande .lg-fotos__item, .lg-fotos-grande .lg-fotos__agregar {
  width: 100%; height: 20dvh; min-height: 90px; max-height: 148px; aspect-ratio: auto; }
.lg-fotos-grande .lg-fotos__agregar .material-symbols-outlined { font-size: 30px; }
.lg-fotos-grande__principal { grid-column: 1 / -1; height: 24dvh; min-height: 116px; max-height: 196px; }
/* El editor ocupa el 100% del alto disponible y el botón principal (Finalizar) queda abajo de
   todo, como en una app móvil. */
body.is-mobile .lt-page--proc:has(.lg-fotos-grande) { min-height: 100%; display: flex; flex-direction: column; }
body.is-mobile .lt-page--proc:has(.lg-fotos-grande) > .lg-mp--plano { flex: 1 1 auto; min-height: 0; }
.lg-mp--plano { display: flex; flex-direction: column; }
.lg-mp--plano > .lg-mp__sec--plano { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.lg-mp__sec--plano > .lg-mp-confirmar { margin-top: auto; }
/* Ficha (solo lectura): fotos grandes, una abajo de la otra. */
.lg-fotos-grandes { display: flex; flex-direction: column; gap: var(--lt-3); }
.lg-foto-grande { position: relative; width: 100%; padding: 0; display: block; cursor: zoom-in;
  border: 1px solid var(--lt-border); border-radius: var(--lt-radius); overflow: hidden; background: var(--lt-surface-2); }
.lg-foto-grande__img { width: 100%; height: auto; display: block; }
.lg-foto-grande__badge { position: absolute; left: 8px; bottom: 8px; }

/* Opciones dentro de las hojas: icono después del texto. */
/* Cancelar en el header de una hoja/modal (a la derecha): mismo fondo que los botones del header, con sombra. */
.lg-hoja__cancelar {
  display: inline-flex; align-items: center; flex-shrink: 0;
  min-height: 34px; padding: 0 .8rem; border: none; border-radius: var(--lt-radius);
  background: rgba(0,0,0,.06); color: var(--lt-negro); font-family: inherit;
  font-size: .85rem; font-weight: 700; line-height: 1; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.22);
}
.lg-hoja__cancelar:hover { background: rgba(0,0,0,.12); }

.lg-fotos__opcion { display: flex; align-items: center; justify-content: center; gap: var(--lt-2); }
.lg-fotos__opcion .material-symbols-outlined { font-size: 1.2rem; }

/* Ícono de línea chico para usar como marcador inline en metadatos (depósito, impresora, contacto…). */
.lg-ico-inline { font-size: 1.1em; vertical-align: -.18em; color: var(--lt-text-muted); }

/* Feedback de press: los controles tocables se achican apenas al tocarlos (confirman el toque).
   Sólo transform/opacity (GPU). Los botones (.lt-btn) ya tienen su propio press. */
.lg-cant, .lg-seg, .lg-selector__control, .lg-selector__opcion, .lg-opcion,
.lg-fletero-item, .lg-fecha-fila, .lg-fotos__item, .lg-bottombar__item {
  transition: transform 120ms ease-out;
}
.lg-cant:not(:disabled):active, .lg-seg:not(:disabled):active,
.lg-selector__control:not(:disabled):active, .lg-selector__opcion:active,
.lg-opcion:active, .lg-fletero-item:active, .lg-fecha-fila:active,
.lg-fotos__item:not(:disabled):active, .lg-bottombar__item:active {
  transform: scale(.97);
}
/* Previsualización de la foto sobre la que se está trabajando (hoja de acción). */
.lg-fotos__previa { display: flex; justify-content: center; margin-bottom: var(--lt-4); }
.lg-fotos__previa img, .lg-fotos__previa .lg-fotos__previa-img {
  width: 160px; height: 160px; object-fit: cover; border-radius: var(--lt-radius); border: 1px solid var(--lt-border); }

/* Encabezado de paso: "Paso X de 4" grande y primero; la pregunta, como subtítulo debajo. */
.lg-paso__paso { margin: 0 0 .1rem; font-size: 1.4rem; font-weight: 800; color: var(--lt-negro); line-height: 1.15; }
.lg-paso__q { margin: 0 0 var(--lt-4); font-size: 1.1rem; font-weight: 600; color: var(--lt-text-muted); }

/* Contenido plano de cada paso del asistente (sin recuadros blancos, estilo app). */
.lg-campos { display: flex; flex-direction: column; gap: var(--lt-3); margin-bottom: var(--lt-4); }

/* Título de paso en una línea: "PASO X DE Y - Título", mismo color e importancia. */
.lg-paso__h { margin: 0 0 var(--lt-4); font-size: 1.3rem; font-weight: 800; color: var(--lt-negro); line-height: 1.25; }

/* Conformado en una pantalla, estilo Mercado Libre/Pago: UNA hoja blanca con las áreas separadas
   por líneas finas (menos ruido que cajas sueltas). */
.lg-mp { background: var(--lt-surface); border-radius: var(--lt-radius); overflow: hidden; }
.lg-mp__sec { padding: var(--lt-4); border-top: 1px solid var(--lt-border); }
.lg-mp__sec:first-child { border-top: 0; }
.lg-mp__tit { margin: 0 0 var(--lt-3); font-size: 1.05rem; font-weight: 800; color: var(--lt-negro); }
/* Fila "Fletero >" que abre la hoja (como las filas de MP con chevron). */
.lg-mp__row { display: flex; align-items: center; gap: var(--lt-2); width: 100%; margin-top: var(--lt-3);
  padding: var(--lt-3) 0 0; border: 0; border-top: 1px solid var(--lt-border); background: none; cursor: pointer; text-align: left; }
.lg-mp__row-lbl { font-weight: 700; color: var(--lt-text); }
.lg-mp__row-val { margin-left: auto; font-weight: 600; color: var(--lt-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.lg-mp__row-val.is-vacio { color: var(--lt-amarillo-dark); }
.lg-mp__row-chev { color: var(--lt-text-muted); flex-shrink: 0; }

/* Confirmar al final del formulario (no barra fija). */
.lg-mp-confirmar { margin-top: var(--lt-4); }
.lg-mp-bar__err { background: #fde8e8; color: #b3261e; border-radius: var(--lt-radius); padding: .5rem .75rem;
  margin-bottom: var(--lt-2); font-size: .9rem; font-weight: 600; text-align: center; }

/* Cartelito del último conformado registrado (en la entrada), para enganchar a registrar otro. */
.lg-ok-cartel { display: flex; align-items: flex-start; gap: var(--lt-2); margin-bottom: var(--lt-4);
  background: #e9f7ef; border: 1px solid #b7e4c7; border-radius: var(--lt-radius); padding: var(--lt-3) var(--lt-4); }
.lg-ok-cartel__ico { color: #1a7f45; font-size: 24px; flex-shrink: 0; }
.lg-ok-cartel__txt { flex: 1; }

/* Títulos de sección del conformado (estilo MP): sentence case, legibles. */
.lg-mp__tit { letter-spacing: normal; }

/* La hoja del conformado se funde con el fondo (gris) de la app: sólo quedan las líneas que
   separan áreas; los botones (Cámara/Galería) son las tarjetas blancas. */
.lg-mp { background: transparent; border-radius: 0; }

/* Estado "Sin foto de reverso" elegido: una tarjeta blanca a ancho completo, como los botones
   de foto, con lugar de sobra (el texto no se parte y "Agregar foto" no queda apretado). */
.lg-reverso-elegido {
  display: flex; align-items: center; justify-content: space-between; gap: var(--lt-3); flex-wrap: wrap;
  padding: var(--lt-4); border: 1px solid var(--lt-border); border-radius: var(--lt-radius-lg);
  background: var(--lt-surface); box-shadow: var(--lt-shadow-sm);
}
.lg-reverso-elegido__ok { font-weight: 700; font-size: 1.05rem; color: var(--lt-text); }

/* Fila de fecha (abre el calendario) y calendario de la hoja inferior. */
.lg-fecha-fila { display: flex; align-items: center; gap: var(--lt-2); width: 100%; padding: var(--lt-3) 0; border: 0; background: none; cursor: pointer; text-align: left; }
.lg-fecha-fila__lbl { font-weight: 700; color: var(--lt-text); }
.lg-fecha-fila__val { margin-left: auto; font-weight: 600; color: var(--lt-text); }
.lg-fecha-fila__ico { color: var(--lt-text-muted); }

.lg-cal__nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--lt-3); }
.lg-cal__navbtn { width: 40px; height: 40px; border: 1px solid var(--lt-border); border-radius: 50%; background: var(--lt-surface); font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--lt-text); }
.lg-cal__navbtn:disabled { opacity: .4; cursor: default; }
.lg-cal__titulo { font-weight: 700; font-size: 1.05rem; }
.lg-cal__grilla { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.lg-cal__dow { text-align: center; font-size: .75rem; font-weight: 700; color: var(--lt-text-muted); padding: .3rem 0; }
.lg-cal__dia { aspect-ratio: 1; border: 0; background: none; border-radius: 50%; font-size: .95rem; color: var(--lt-text); cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .lg-cal__dia:hover:not(:disabled) { background: var(--lt-surface-2); } }
.lg-cal__dia:disabled { color: var(--lt-text-faint); cursor: default; opacity: .5; }
.lg-cal__dia.is-hoy { font-weight: 800; color: var(--lt-amarillo-dark); }
.lg-cal__dia.is-sel { background: var(--lt-amarillo); color: var(--lt-negro); font-weight: 800; }

/* Recibir transferencia: dos llamados (recepción + conformado) con su resultado. */
.lg-pasos { display: flex; flex-direction: column; gap: var(--lt-3); margin-bottom: var(--lt-4);
  background: #fff; border: 1px solid var(--lt-border, #e5e7eb); border-radius: var(--lt-radius); padding: var(--lt-3) var(--lt-4); }
.lg-paso { display: flex; align-items: flex-start; gap: var(--lt-2); }
.lg-paso__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--lt-2); align-items: flex-start; }
.lg-paso__ico { font-size: 24px; flex-shrink: 0; }
.lg-paso__ico--ok { color: #1a7f45; }
.lg-paso__ico--err { color: #b3261e; }
.lg-paso__spin { width: 20px; height: 20px; margin: 2px; flex-shrink: 0; border-color: #999; border-top-color: transparent; }
.lg-paso__acciones { display: flex; flex-wrap: wrap; gap: var(--lt-2); }
.lg-selector__buscar { width: 100%; margin-bottom: var(--lt-3); }
.lg-renglon__prod { font-weight: 600; }
.lg-cant-input { width: 100%; text-align: right; font-weight: 700; }
.lg-cant-input.is-cargada { border-color: var(--lt-amarillo); background: var(--lt-amarillo-wash); }
.lg-renglon__fila .lg-cant-input { width: 8rem; flex-shrink: 0; }
