:root {
  --azul: #1a3560;
  --azul-claro: #e9eef6;
  --texto: #1f2933;
  --gris: #6b7785;
  --borde: #d5dce5;
  --verde: #1d7a46;
  --rojo: #b42318;
  --fondo: #f5f7fa;
}
/* Colores por empresa, tomados de sus logos */
.tema-bargo     { --azul: #2b4c9b; --azul-claro: #e8edf7; --acento: #1d3576; }
.tema-ductiline { --azul: #0066b3; --azul-claro: #e5f0f9; --acento: #8a8f9c; }
.tema-grupo     { --acento: #1a3560; }

* { box-sizing: border-box; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, sans-serif; color: var(--texto); background: var(--fondo); font-size: 15px; }
.barra { background: #fff; border-bottom: 4px solid var(--azul); display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1.5rem; flex-wrap: wrap; gap: 0.5rem; }
.marca { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; color: var(--azul); font-weight: 600; font-size: 1.05rem; }
.marca img { height: 44px; width: auto; }
.marca img + span { border-left: 2px solid var(--borde); padding-left: 0.9rem; }
nav { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
nav a, .enlace { color: var(--azul); font-weight: 600; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
nav a:hover, .enlace:hover { text-decoration: underline; }
.cambio-empresa button { font-size: 0.8rem; }
.portada { text-align: center; margin: 3rem auto; max-width: 820px; }
.portada h1 { font-size: 1.8rem; }
.portada p { color: var(--gris); }
.empresas { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; margin-top: 2rem; }
.empresa { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; background: #fff; border: 1px solid var(--borde); border-top: 6px solid var(--azul); border-radius: 10px; padding: 2.2rem 1.5rem; text-decoration: none; color: var(--gris); font-size: 0.85rem; transition: box-shadow 0.15s, transform 0.15s; }
.empresa:hover { box-shadow: 0 6px 18px rgba(20, 40, 80, 0.12); transform: translateY(-2px); }
.empresa img { max-height: 110px; max-width: 260px; }
.logo-login { display: block; max-height: 90px; max-width: 260px; margin: 0 auto 1.2rem; }
.nota a { color: var(--azul); }
.aviso-ok { background: #e6f4ec; color: var(--verde); border-radius: 6px; padding: 0.6rem 0.8rem; }
.etiqueta.advertencia { background: #fff4e0; color: #9a5b00; }
.sin-margen { margin-top: 0; }
.botones-checar { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
button.grande { font-size: 1.1rem; padding: 0.9rem 1.8rem; }
button.salida { background: var(--acento); }
button:disabled { opacity: 0.6; cursor: wait; }
.filtros label.ancho { flex: 1; min-width: 240px; }
.filtros label.ancho input { width: 100%; }
fieldset.dias { border: 1px solid var(--borde); border-radius: 6px; margin: 0 0 1rem; padding: 0.5rem 0.8rem; }
fieldset.dias legend { font-size: 0.85rem; color: var(--gris); }
fieldset.dias label { display: inline-flex; align-items: center; gap: 0.3rem; margin: 0 0.9rem 0 0; font-weight: 400; }
fieldset.dias input, input.casilla { width: auto; display: inline; margin: 0; }
.acciones-lote { margin-top: 1rem; }
.tarjeta + h2, table + h2 { margin-top: 2rem; }
main { max-width: 1200px; margin: 1.5rem auto; padding: 0 1.5rem; }
footer { text-align: center; color: var(--gris); font-size: 0.8rem; padding: 2rem 0; }
h1 { color: var(--azul); font-size: 1.5rem; margin: 0 0 1rem; }
h2 { color: var(--azul); font-size: 1.15rem; margin: 2rem 0 0.7rem; }
.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: 8px; padding: 1.8rem; }
.angosta { max-width: 440px; margin: 3rem auto; }
label { display: block; margin-bottom: 0.9rem; font-weight: 600; font-size: 0.9rem; }
input, select { display: block; width: 100%; margin-top: 0.3rem; padding: 0.55rem 0.65rem; border: 1px solid var(--borde); border-radius: 6px; font: inherit; }
input:focus, select:focus { outline: 2px solid var(--azul); outline-offset: 1px; }
button, .boton { background: var(--azul); color: #fff; border: 0; border-radius: 6px; padding: 0.6rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .boton:hover { filter: brightness(1.15); }
button.secundario { background: #fff; color: var(--azul); border: 1px solid var(--borde); padding: 0.3rem 0.7rem; font-weight: 500; font-size: 0.85rem; }
.en-linea { display: inline; margin: 0; }
.alerta { background: #fdecea; color: var(--rojo); border-radius: 6px; padding: 0.6rem 0.8rem; }
.aviso { background: var(--azul-claro); border-radius: 6px; padding: 0.8rem 1rem; margin-bottom: 1rem; }
.nota { color: var(--gris); font-size: 0.85rem; }
code { font-family: Consolas, "Cascadia Mono", monospace; }
.clave { font-size: 1rem; letter-spacing: 0.05em; }
.enlace-activacion { display: block; word-break: break-all; background: #fff; padding: 0.6rem; border-radius: 6px; border: 1px solid var(--borde); user-select: all; }
.qr { text-align: center; margin: 1rem 0; }
.qr svg { width: 220px; height: 220px; }
.codigos { columns: 2; list-style: none; padding: 0; font-size: 1.05rem; }
.codigos li { padding: 0.25rem 0; }
.indicadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.indicadores div { background: #fff; border: 1px solid var(--borde); border-radius: 8px; padding: 1rem 1.2rem; }
.indicadores strong { display: block; font-size: 1.6rem; color: var(--azul); }
.indicadores span { color: var(--gris); font-size: 0.85rem; }
.indicadores .bien strong { color: var(--verde); }
.indicadores .mal { border-color: var(--rojo); }
.indicadores .mal strong { color: var(--rojo); }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--borde); border-radius: 8px; overflow: hidden; font-size: 0.9rem; }
th { background: var(--azul); color: #fff; text-align: left; padding: 0.55rem 0.7rem; font-weight: 600; }
td { padding: 0.5rem 0.7rem; border-top: 1px solid var(--borde); }
tr:nth-child(even) td { background: #fafbfd; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.vacio { text-align: center; color: var(--gris); padding: 1.5rem; }
.inactivo td { color: var(--gris); }
.acciones { white-space: nowrap; }
.detalle { color: var(--gris); font-size: 0.82rem; }
.etiqueta { display: inline-block; border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.8rem; background: #eef1f5; color: var(--gris); }
.etiqueta.bien { background: #e6f4ec; color: var(--verde); }
.etiqueta.mal { background: #fdecea; color: var(--rojo); }
.filtros { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: flex-end; margin-bottom: 1rem; }
.filtros label { margin: 0; }
.filtros input, .filtros select { width: auto; min-width: 160px; }
