/* ===========================================================================
   clientes.loexa.cloud  ·  Portal de Clientes LOEXA
   theme.css  ·  Tokens de marca + base del sistema visual
   ---------------------------------------------------------------------------
   TOKENS DE MARCA  (ajuste aqui los colores reales de LOEXA)
   Paleta: azul naval (seriedad logistica) + azul senal (marca) +
   naranja de carga/senalizacion vial (acento, usado con moderacion).
   =========================================================================== */

:root {
  /* --- Marca (configurable) --------------------------------------------- */
  --lx-brand:        #2D1B6F;   /* azul senal — color principal de marca     */
  --lx-brand-dark:   #221452;   /* hover/activo del color de marca           */
  --lx-brand-soft:   #ECE9F7;   /* fondos suaves teñidos de marca            */
  --lx-accent:       #FF6B1A;   /* naranja carga — acento vivo, con moderacion*/
  --lx-accent-soft:  #FFEDDD;

  /* --- Tinta y superficies ---------------------------------------------- */
  --lx-ink:          #0E1A2B;   /* azul naval profundo (no negro tintado)    */
  --lx-ink-2:        #35475E;   /* texto secundario                          */
  --lx-ink-3:        #6B7C92;   /* texto terciario / metadatos               */
  --lx-line:         #E2E8F0;   /* lineas / bordes                           */
  --lx-line-strong:  #CBD5E1;
  --lx-surface:      #F1F1F6;   /* fondo de la aplicacion (gris claro anticipos)*/
  --lx-surface-2:    #EAEAEF;   /* fondo alterno / celdas                    */
  --lx-card:         #FFFFFF;   /* tarjetas                                  */

  /* --- Estados de remesa ------------------------------------------------ */
  --lx-pend:         #7A8AA0;   /* pendiente (gris)                          */
  --lx-pend-soft:    #EDF1F6;
  --lx-ruta:         #E8820E;   /* en ruta (ambar)                           */
  --lx-ruta-soft:    #FFF3E0;
  --lx-entregado:    #1E9E6A;   /* entregado (verde)                         */
  --lx-entregado-soft:#E4F6EE;
  --lx-alerta:       #D64545;   /* retraso / alerta (rojo)                   */
  --lx-alerta-soft:  #FCE8E8;

  /* --- Tipografia (sistema, igual que anticipos) ------------------------ */
  --lx-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;

  /* Escala tipografica (Elements of Typographic Style, razon ~1.25) */
  --t-xs:   0.6875rem; /* 11 */
  --t-sm:   0.8125rem; /* 13 */
  --t-base: 0.875rem;  /* 14 (base anticipos) */
  --t-md:   1.0rem;    /* 16 */
  --t-lg:   1.25rem;   /* 20 */
  --t-xl:   1.5rem;    /* 24 */
  --t-xxl:  2.0rem;    /* 32 */

  /* --- Geometria (compacta, estilo anticipos) --------------------------- */
  --r-sm: 9px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  /* Sombras planas (anticipos usa cartas casi sin sombra) */
  --sh-1: 0 1px 2px rgba(35,35,43,.04);
  --sh-2: 0 2px 8px rgba(35,35,43,.06);
  --sh-3: 0 14px 50px rgba(0,0,0,.30);

  --gutter: 16px;
}

/* ===========================================================================
   RESET LIGERO
   =========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--lx-font);
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--lx-ink);
  background: var(--lx-surface);
  font-feature-settings: "ss01", "cv01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,p,figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

/* Cifras tabulares para datos (tiempos, distancias) */
.tnum { font-variant-numeric: tabular-nums; }

/* Accesibilidad: foco visible por teclado */
:focus-visible {
  outline: 2.5px solid var(--lx-brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Respeto a prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================================================================
   UTILIDADES COMPARTIDAS
   =========================================================================== */

/* Chip de estado (pendiente / en ruta / entregado / alerta) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--r-pill);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.chip--urbano    { color: var(--lx-brand);     background: var(--lx-brand-soft); }
.chip--urbano::before { display: none; }
.chip--pend      { color: var(--lx-pend);      background: var(--lx-pend-soft); }
.chip--ruta      { color: var(--lx-ruta);      background: var(--lx-ruta-soft); }
.chip--entregado { color: var(--lx-entregado); background: var(--lx-entregado-soft); }
.chip--alerta    { color: var(--lx-alerta);    background: var(--lx-alerta-soft); }
/* el punto "en ruta" late para indicar movimiento en vivo */
.chip--ruta::before { animation: pulso 1.8s ease-in-out infinite; }
@keyframes pulso {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .45; transform: scale(.72); }
}

/* Boton primario / secundario */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-md);
  font-weight: 700;
  font-size: var(--t-base);
  transition: background .15s ease, transform .08s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--lx-brand); color: #fff; box-shadow: var(--sh-1); }
.btn--primary:hover { background: var(--lx-brand-dark); }
.btn--ghost { background: var(--lx-card); color: var(--lx-ink); box-shadow: inset 0 0 0 1px var(--lx-line); }
.btn--ghost:hover { background: var(--lx-surface-2); }
.btn--block { width: 100%; }

/* Tarjeta base */
.card {
  background: var(--lx-card);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

/* Spinner de carga */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--lx-line);
  border-top-color: var(--lx-brand);
  border-radius: 50%;
  animation: giro .7s linear infinite;
}
@keyframes giro { to { transform: rotate(360deg); } }

/* Toast / aviso flotante */
.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  background: var(--lx-ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  font-size: var(--t-base);
  font-weight: 600;
  box-shadow: var(--sh-3);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 2000;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast--ok    { background: var(--lx-entregado); }
.toast--error { background: var(--lx-alerta); }

/* Lector de pantalla */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ===== LOGO LOEXA (transparente, sobre barra clara, sin recuadro) ===== */
.brand__logobox{
  background:transparent; border-radius:0; padding:0;
  display:inline-flex; align-items:center; line-height:0;
  box-shadow:none; flex:none;
}
.brand__logobox .brand__logo{ height:30px !important; width:auto !important; display:block; }
/* Subtitulo con borde izquierdo naranja (estilo anticipos) */
.brand__sub{
  color:var(--lx-ink); font-size:13px; font-weight:700; margin-left:12px;
  padding-left:11px; border-left:4px solid var(--lx-accent); line-height:1.1;
}
/* login: fondo OSCURO -> el logo necesita recuadro claro para contrastar */
.login__logo .brand__logobox{
  padding:10px 16px; border-radius:12px; background:#fff;
}
.login__logo .brand__logobox .brand__logo{ height:44px !important; }
.login__logo .brand__sub{
  color:var(--lx-ink-2); margin-left:0; margin-top:10px; font-size:14px;
  border-left:0; padding-left:0;
}
.login__logo{ display:flex; flex-direction:column; align-items:flex-start; gap:6px; }
