/* Archivo con ancho reducido: da el aire de rotulación de carretera */
.titulo-ancho { font-stretch: 82%; letter-spacing: -0.01em; }
.cifra { font-variant-numeric: tabular-nums; }

.campo {
  border: 1px solid rgb(4 6 119 / 0.18);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.campo:hover { border-color: rgb(4 6 119 / 0.35); }
.campo:focus, button:focus-visible, select:focus-visible, label:focus-within {
  outline: 2px solid #127A5B; outline-offset: 2px;
}

/* Chips de frente de costo */
.chip {
  border: 1px solid rgb(4 6 119 / 0.2);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  display: inline-flex; align-items: center; gap: 0.45rem;
}
.chip[aria-pressed="true"] { background: #040677; color: #fff; border-color: #040677; }
.chip .punto { width: 0.6rem; height: 0.6rem; border-radius: 2px; }

/* La placa colombiana: amarilla, borde negro, letra condensada */
.placa {
  font-family: 'Archivo', 'Arial Narrow', sans-serif;
  font-stretch: 75%;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  background: #F5C400;
  color: #111;
  border: 2px solid #111;
  border-radius: 5px;
  padding: 0.05rem 0.55rem 0.1rem;
  min-width: 6.2rem;
  text-align: center;
  line-height: 1.5;
  box-shadow: inset 0 0 0 2px #F5C400, inset 0 0 0 3px rgb(0 0 0 / 0.35);
}
.placa.sin { background: #DDE2E6; color: #4A5560; font-size: 0.85rem; letter-spacing: 0; }
button.fila-placa:hover .placa { transform: translateY(-1px); }

/* Matriz */
.matriz th, .matriz td { padding: 0.45rem 0.6rem; white-space: nowrap; }
.matriz thead th {
  font-weight: 600; font-size: 0.75rem; color: #5B6170; text-align: right;
  vertical-align: bottom; max-width: 7.5rem; white-space: normal; line-height: 1.2;
}
.matriz thead th:first-child { text-align: left; }
.matriz td { text-align: right; font-variant-numeric: tabular-nums; }
.matriz td:first-child { text-align: left; }
.matriz tr.total td { font-weight: 700; border-top: 2px solid #040677; }

/* Detalle */
.detalle th {
  text-align: left; font-weight: 600; color: #5B6170;
  border-bottom: 2px solid #040677; padding: 0.5rem; cursor: default;
}
.detalle th[data-orden] { cursor: pointer; }
.detalle th[data-orden]:hover { color: #040677; }
.detalle td { padding: 0.45rem 0.5rem; border-bottom: 1px solid rgb(4 6 119 / 0.08); vertical-align: top; }
.detalle td.valor { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.detalle td.negativo { color: #D0222A; }

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

/* Impresión para la junta: sin controles, sin cortes feos */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  section { break-inside: avoid; }
  header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bg-tinta, .placa { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------- Informe gerencial (hoja tipo documento) ---------------- */
.informe .hoja {
  background: #fff; max-width: 900px; margin: 2rem auto; padding: 3rem 3.25rem;
  box-shadow: 0 1px 3px rgb(4 6 119 / 0.12);
}
@media (max-width: 640px) { .informe .hoja { padding: 1.5rem 1.25rem; margin: 0; } }
.h-informe {
  font-family: 'DM Sans', 'Segoe UI', sans-serif; font-stretch: 82%;
  font-weight: 800; font-size: 1.25rem; color: #040677;
}
.prosa p, .prosa li { line-height: 1.65; margin-top: 0.6rem; max-width: 72ch; }
.lista-notas li { padding-left: 1rem; position: relative; }
.lista-notas li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 0.4rem; height: 2px; background: #5B6170; }
.nota { font-size: 0.8rem; color: #5B6170; margin-top: 0.4rem; }
.cifra-informe { background: #fff; padding: 1rem 1.1rem; }
.cifra-informe dt { font-size: 0.8rem; color: #5B6170; }
.cifra-informe dd { font-family: 'DM Sans', sans-serif; font-stretch: 82%; font-weight: 800; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.cifra-informe .sub { font-family: 'DM Sans', sans-serif; font-weight: 500; font-size: 0.8rem; color: #5B6170; font-stretch: 100%; }
.tabla-informe { width: 100%; font-size: 0.85rem; border-collapse: collapse; }
.tabla-informe th { text-align: left; font-weight: 600; color: #5B6170; border-bottom: 2px solid #040677; padding: 0.4rem 0.5rem; vertical-align: bottom; }
.tabla-informe td { padding: 0.4rem 0.5rem; border-bottom: 1px solid rgb(4 6 119 / 0.1); font-variant-numeric: tabular-nums; }
.tabla-informe .num { text-align: right; white-space: nowrap; }
.tabla-informe tr.parcial td { color: #5B6170; font-style: italic; }
.tabla-informe .sube { color: #D0222A; font-weight: 600; }
.tabla-informe .baja { color: #127A5B; font-weight: 600; }
.editable {
  min-height: 7rem; margin-top: 0.75rem; padding: 0.9rem 1rem; line-height: 1.65;
  border: 1px dashed rgb(4 6 119 / 0.35); border-radius: 4px;
}
.editable:empty::before { content: attr(data-vacio); color: #8A949C; }

@media print {
  @page { size: A4; margin: 14mm 12mm; }
  .informe { background: #fff; }
  .informe .hoja { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .salto { break-inside: avoid; }
  .editable { border-color: transparent; padding: 0; }
  .editable:empty { display: none; }
}

/* Semáforo de metas */
.estado { font-size: 0.75rem; font-weight: 700; border-radius: 3px; padding: 0.1rem 0.45rem; white-space: nowrap; }
.estado.ok { background: rgb(18 122 91 / 0.12); color: #127A5B; }
.estado.no { background: rgb(208 34 42 / 0.12); color: #D0222A; }
.meta-input { width: 4.2rem; border: 1px solid rgb(4 6 119 / 0.3); border-radius: 3px; padding: 0.1rem 0.3rem; text-align: right; }
[contenteditable="true"]:focus { outline: 2px solid #127A5B; outline-offset: 1px; }
.plan td[contenteditable="true"] { background: rgb(245 135 51 / 0.08); }
@media print { .plan td[contenteditable="true"] { background: none; } .meta-input { border: none; } }
.anexo-detalle { font-size: 0.72rem; }
.anexo-detalle td { vertical-align: top; }
@media print { #anexoB[hidden], #anexoA[hidden] { display: none; } }

/* Ventanas de la programación diaria */
.dialogo { width: min(860px, 94vw); max-height: 92vh; border-radius: 8px; padding: 0; color: #040677; box-shadow: 0 20px 60px rgb(0 0 0 / 0.35); }
.dialogo-chico { width: min(480px, 94vw); }
.dialogo::backdrop { background: rgb(4 6 119 / 0.55); }
.dialogo label { display: flex; flex-direction: column; gap: 0.25rem; color: #5B6170; font-weight: 500; }
.dialogo label.flex { flex-direction: row; }
.dialogo .campo { color: #040677; }
@media print {
  .diaria header, .diaria main { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .diaria section { break-inside: auto; }
  .diaria .detalle { font-size: 0.72rem; }
}

/* ---------------- Tabla editable de programación ---------------- */
.grilla-caja { overflow: auto; max-height: calc(100vh - 210px); background: #fff; border-radius: 8px; border: 1px solid rgb(4 6 119 / 0.1); }
/* Tabla principal de registros de cada módulo (5-nov): con uno o pocos registros igual tiene buen alto para leerlos */
.caja-registros { min-height: 55vh; background: #fff; }
.grilla { border-collapse: separate; border-spacing: 0; font-size: 0.8rem; min-width: 100%; }
.grilla th { position: sticky; top: 0; z-index: 2; background: #040677; color: #fff; font-weight: 600; text-align: left;
  padding: 0.55rem 0.5rem; white-space: nowrap; }
.grilla td { border-bottom: 1px solid rgb(4 6 119 / 0.08); border-right: 1px solid rgb(4 6 119 / 0.05); padding: 0.35rem 0.5rem; vertical-align: top; background: #fff; }
.grilla .col-placa { position: sticky; left: 0; z-index: 1; }
.grilla th.col-placa { z-index: 3; }
.grilla td.celda { cursor: text; min-width: 6rem; }
.grilla td.t-largo { min-width: 16rem; max-width: 26rem; white-space: pre-wrap; }
.grilla td.t-fecha { min-width: 6.5rem; white-space: nowrap; }
.grilla td.t-hora { min-width: 4.2rem; }
.grilla td.celda:hover { box-shadow: inset 0 0 0 2px rgb(18 122 91 / 0.35); }
.grilla td.editando { padding: 0; box-shadow: inset 0 0 0 2px #127A5B; }
.grilla .editor { width: 100%; min-width: 7rem; border: 0; padding: 0.4rem 0.5rem; font: inherit; background: #FFFBEA; outline: none; }
.grilla textarea.editor { min-width: 18rem; resize: vertical; }
.grilla tr.sel td { background: #FFF4C2; }
.grilla tr.vencido td:first-child { box-shadow: inset 4px 0 0 #D0222A; }
.grilla tr.cerrada td { color: #6b7680; background: #FAFBFB; }
.grilla tr.con-error td.celda[data-k="fecha_salida"] { background: rgb(208 34 42 / 0.1); }
.grilla tr.arrastrando td { opacity: 0.5; }
.grilla tr.nueva td { background: #FFF4C2; padding: 0.6rem 0.75rem; }
.grilla .col-sel, .grilla .col-num { width: 2rem; text-align: center; color: #5B6170; }
.grilla .col-mover { white-space: nowrap; color: #5B6170; }
.grilla .agarre { cursor: grab; padding: 0 0.25rem; font-size: 1rem; user-select: none; }
.grilla .flecha { font-size: 0.65rem; padding: 0 0.2rem; color: #5B6170; }
.grilla .flecha:hover { color: #040677; }
.sin-mover .grilla .col-mover { display: none; }
.grilla .acciones button { color: #127A5B; font-weight: 600; margin-right: 0.6rem; }
.grilla .acciones button.peligro { color: #D0222A; }
.grilla .acciones button:hover { text-decoration: underline; }
.pildora { display: inline-block; white-space: nowrap; font-size: 0.72rem; font-weight: 700; border-radius: 999px; padding: 0.1rem 0.55rem;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); }

/* ---------------- Diagrama de posiciones de llanta ---------------- */
.diagrama { display: flex; flex-direction: column; gap: 0.35rem; max-width: 420px; }
.eje-grupo { font-family: 'DM Sans', sans-serif; font-stretch: 82%; font-weight: 800; font-size: 0.8rem; color: #5B6170;
  text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.5rem; }
.eje { display: grid; grid-template-columns: 1fr 7.5rem 1fr; align-items: center; gap: 0.4rem; }
.eje-lado { display: flex; gap: 0.25rem; justify-content: center; }
.eje-centro { position: relative; text-align: center; font-size: 0.68rem; color: #5B6170; }
.eje-centro::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 3px solid #040677; z-index: 0; }
.eje-centro span { position: relative; background: #fff; padding: 0 0.3rem; }
.llanta { width: 2.6rem; height: 3.3rem; border: 2px solid #040677; border-radius: 6px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.05; font-variant-numeric: tabular-nums; }
.llanta-pos { font-size: 0.62rem; opacity: 0.75; }
.llanta-n { font-weight: 800; font-size: 0.95rem; }
@media print { .llanta { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* Usuario de consulta en la tabla editable */
.solo-lectura .grilla td.celda { cursor: default; }
.solo-lectura .grilla td.celda:hover { box-shadow: none; }
.solo-lectura .grilla .col-sel, .solo-lectura .grilla .col-mover, .solo-lectura .grilla .acciones button[data-acc="eliminar"],
.solo-lectura .grilla .acciones button[data-acc="duplicar"] { display: none; }

/* ---------------- Portal de inicio (estilo Gayco: portada con foto, tarjetas blancas, carretera del logo) ---------------- */
.portal { background: #F4F5FE; color: #1F2430; min-height: 100vh; }
.portal-portada { position: relative; overflow: hidden; color: #fff; text-align: center;
  background-image: linear-gradient(180deg, rgb(4 6 60 / 0.62) 0%, rgb(4 6 60 / 0.8) 62%, rgb(4 6 40 / 0.94) 100%), url("../img/portada.jpg");
  background-size: cover; background-position: center 60%; animation: portada-acercar 18s ease-out both; }
@keyframes portada-acercar { from { background-size: 112%; } to { background-size: 100%; } }
.portal-portada-texto { max-width: 1100px; margin: 0 auto; padding: 4.5rem 1.25rem 8.5rem; }
.portal-portada .portal-insignia { color: #F58733; border-color: rgb(245 135 51 / 0.5); background: rgb(245 135 51 / 0.12); }
.portal-portada h1 { font-family: 'DM Sans', sans-serif; font-weight: 800; font-size: clamp(2.2rem, 5.4vw, 4.2rem); line-height: 1.05; margin-top: 1rem; }
.portal-portada h1 .rojo { color: #ED3139; }
.portal-portada p { max-width: 640px; margin: 1rem auto 0; color: rgb(255 255 255 / 0.9); font-size: 1.1rem; line-height: 1.6; }
.portal-portada .portal-saludo { color: rgb(255 255 255 / 0.75) !important; font-size: 1rem; }
.portal-botones { margin-top: 2rem; display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }
.boton-gayco { display: inline-flex; align-items: center; gap: 0.5rem; background: #D0222A; color: #fff; font-family: 'DM Sans', sans-serif; font-weight: 700;
  font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.95rem 1.8rem; border-radius: 999px; transition: transform .2s, background .2s; }
.boton-gayco:hover { background: #A8141B; transform: translateY(-2px); }
.boton-gayco.borde { background: transparent; border: 2px solid rgb(255 255 255 / 0.75); }
.boton-gayco.borde:hover { background: rgb(255 255 255 / 0.1); }
.entra { animation: entra-subir .9s cubic-bezier(.2,.7,.2,1) both; }
.entra.d1 { animation-delay: .15s; } .entra.d2 { animation-delay: .3s; } .entra.d3 { animation-delay: .45s; }
@keyframes entra-subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.portal-hoja { max-width: 1140px; margin: 0 auto 3rem; padding: 0 1.25rem; }
.portal-seccion { margin-top: 2.5rem; }
.portal-titulo { text-align: center; }
.portal-titulo small { display: block; font-family: 'DM Sans', sans-serif; font-weight: 600; letter-spacing: 0.24em; font-size: 0.8rem; color: #D0222A; }
.portal-titulo h2 { font-family: 'DM Sans', sans-serif; font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); color: #040677; margin-top: 0.3rem; }
.portal-titulo::after { content: ""; display: block; margin: 0.9rem auto 0; width: 90px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, #ED3139 0 50%, #F58733 50% 100%); }
.portal-insignia { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: #D0222A; border: 1px solid rgb(208 34 42 / 0.3); background: rgb(208 34 42 / 0.06); border-radius: 999px; padding: 0.3rem 0.8rem; }
.portal-insignia svg { width: 0.95rem; height: 0.95rem; }
.portal-tarjeta { display: block; background: #fff; border-radius: 14px; padding: 1.4rem 1.5rem; box-shadow: 0 6px 20px rgb(4 6 119 / 0.07); color: #1F2430; }
.portal-tarjeta h2, .portal-tarjeta h3 { font-family: 'DM Sans', sans-serif; color: #040677; font-weight: 700; margin-top: 0.8rem; }
.portal-tarjeta h3 { font-size: 1.08rem; }
.portal-tarjeta h2 { font-size: 1.25rem; }
.portal-tarjeta p { color: #5B6170; font-size: 0.92rem; line-height: 1.6; margin-top: 0.4rem; }
.portal-icono { display: inline-flex; width: 3.2rem; height: 3.2rem; align-items: center; justify-content: center; border-radius: 14px;
  color: #D0222A; background: #FDECEC; transition: background .25s, color .25s; }
.portal-icono svg { width: 1.6rem; height: 1.6rem; }
.portal-num { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #8A90A0; }
.portal-modulo { transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column; }
.portal-modulo p { flex: 1; }
a.portal-modulo:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgb(4 6 119 / 0.16); }
a.portal-modulo:hover .portal-icono { background: #D0222A; color: #fff; }
.portal-abrir { margin-top: 1rem; font-family: 'DM Sans', sans-serif; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #D0222A; }
.portal-modulo.apagado { opacity: 0.6; }
.portal-modulo.apagado .portal-abrir { color: #8A90A0; letter-spacing: 0.04em; text-transform: none; font-weight: 600; }
.portal-intro { text-align: center; max-width: 720px; margin: 0 auto; color: #5B6170; font-size: 1.05rem; line-height: 1.7; }
.portal-intro strong { color: #040677; font-weight: 700; }
.portal-creador { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center; border-radius: 16px; padding: 1.8rem;
  background: linear-gradient(120deg, #040677, #0A0DA8); color: #fff; box-shadow: 0 14px 40px rgb(4 6 119 / 0.25); }
.portal-creador .portal-insignia { color: #F58733; border-color: rgb(245 135 51 / 0.5); background: rgb(245 135 51 / 0.12); }
.portal-foto { width: 6.5rem; height: 6.5rem; border-radius: 999px; object-fit: cover; border: 3px solid #F58733; box-shadow: 0 0 0 5px rgb(245 135 51 / 0.2); }
.portal-iniciales { display: flex; align-items: center; justify-content: center; font-family: 'DM Sans', sans-serif; font-weight: 800; font-size: 2rem;
  color: #fff; background: linear-gradient(135deg, #ED3139, #F58733); }
.portal-creador h3 { font-family: 'DM Sans', sans-serif; font-size: 1.5rem; font-weight: 800; color: #fff; margin-top: 0.6rem; }
.portal-cargo { color: #F58733; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.portal-creador blockquote { margin-top: 0.75rem; color: rgb(255 255 255 / 0.82); font-size: 0.9rem; line-height: 1.65; font-style: italic; }
.portal-pie { text-align: center; margin-top: 2rem; font-size: 0.78rem; color: #8A90A0; }
@media (max-width: 640px) { .portal-creador { grid-template-columns: 1fr; text-align: center; } .portal-foto { margin: 0 auto; } }

/* La carretera del logo con el tractocamión Gayco (static/js/carga.js): entra, frena suave y queda rodando en su carril
   mientras la carretera corre debajo (ruedas girando, suspensión, humo del exhosto y faro) */
.carretera { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; pointer-events: none; --camion: clamp(260px, 27vw, 390px); }
.carretera::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 58px;
  background: linear-gradient(180deg, #2C3037 0%, #22252B 40%, #1B1D22 100%); box-shadow: inset 0 3px 0 rgb(255 255 255 / 0.16); }
.carretera::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: #F58733; }
.carretera-rayas { position: absolute; left: 0; right: 0; bottom: 25px; height: 4px; z-index: 1;
  background-image: linear-gradient(90deg, #fff 0 46px, transparent 46px 92px); background-size: 92px 4px; animation: carretera-rayas .7s linear infinite; }
@keyframes carretera-rayas { to { background-position: -92px 0; } }
.camion-gayco { position: absolute; bottom: 31px; width: var(--camion); height: auto; z-index: 2; overflow: visible;
  left: calc(64% - var(--camion) / 2); animation: camion-entrar 3.2s cubic-bezier(.15,.75,.25,1) both, camion-crucero 7s 3.2s ease-in-out infinite alternate; }
@keyframes camion-entrar { from { left: calc(-1 * var(--camion) - 40px); } }
@keyframes camion-crucero { from { transform: translateX(-14px); } to { transform: translateX(14px); } }
.camion-gayco .rueda { transform-box: fill-box; transform-origin: center; animation: rueda-girar .55s linear infinite; }
@keyframes rueda-girar { to { transform: rotate(360deg); } }
.camion-gayco .cg-cuerpo { animation: cg-rebote .45s ease-in-out infinite alternate; }
@keyframes cg-rebote { to { transform: translateY(-0.9px); } }
.camion-gayco .cg-humo circle { opacity: 0; transform-box: fill-box; transform-origin: center; animation: cg-humo 1.8s ease-out infinite; }
.camion-gayco .cg-humo .p2 { animation-delay: .6s; } .camion-gayco .cg-humo .p3 { animation-delay: 1.2s; }
@keyframes cg-humo { 0% { opacity: .75; transform: translate(0, 0) scale(.5); } 100% { opacity: 0; transform: translate(-30px, -10px) scale(2.4); } }
.camion-gayco .cg-haz { animation: cg-haz 2.4s ease-in-out infinite alternate; }
@keyframes cg-haz { from { opacity: .55; } to { opacity: .95; } }

/* Pantalla de carga (static/js/carga.js): aparece al cambiar de página o mientras llegan datos pesados */
.carga-gayco { position: fixed; inset: 0; z-index: 1200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: rgb(3 5 79 / 0.94); color: #fff; font-family: 'DM Sans', 'Segoe UI', sans-serif; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.carga-gayco.visible { opacity: 1; visibility: visible; }
.carga-logo { background: #fff; border-radius: 14px; padding: 0.7rem 1.2rem; box-shadow: 0 12px 40px rgb(0 0 0 / 0.25); }
.carga-logo img { height: 3.2rem; width: auto; display: block; }
.carga-texto { font-family: 'DM Sans', sans-serif; font-weight: 700; font-size: 1.35rem; text-align: center; padding: 0 1rem; }
.carga-barra { width: min(420px, 80vw); height: 8px; border-radius: 8px; background: rgb(255 255 255 / 0.15); overflow: hidden; }
.carga-barra span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #ED3139, #F58733); animation: carga-llenar 2.4s ease-in-out infinite; }
@keyframes carga-llenar { 0% { width: 6%; } 70% { width: 88%; } 100% { width: 96%; } }
.carga-gayco .carretera { position: relative; width: min(760px, 92vw); height: 110px; margin-top: 1rem; border-radius: 10px; overflow: hidden; }
.carga-gayco .carretera { --camion: min(340px, 72vw); height: 128px; }
.carga-gayco .camion-gayco { left: calc(50% - var(--camion) / 2); animation: camion-entrar 1.3s cubic-bezier(.15,.75,.25,1) both, camion-crucero 5s 1.3s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) {
  .portal-portada, .entra, .carretera-rayas, .camion-gayco, .camion-gayco .rueda, .camion-gayco .cg-cuerpo, .camion-gayco .cg-humo circle, .camion-gayco .cg-haz, .carga-barra span { animation: none !important; }
}
@media print { .carretera, .carga-gayco { display: none !important; } .portal-portada { background: #040677; } }

/* ---------------- Inicio: portada con fotos de la flota que se turnan, tablero en vivo por área y creador ---------------- */
.inicio-portada { position: relative; overflow: hidden; color: #fff; background: #03054F; min-height: 25rem; }
.inicio-fotos, .inicio-capa { position: absolute; inset: 0; }
/* 3 fotos, 8 s cada una: aparece, se acerca despacio (efecto Ken Burns) y se funde con la siguiente */
.inicio-foto { position: absolute; inset: 0; background-size: cover; background-position: center 55%; opacity: 0;
  animation: foto-turno 24s linear infinite; animation-delay: calc(var(--i) * 8s - 1.2s); will-change: opacity, transform; }
@keyframes foto-turno { 0% { opacity: 0; transform: scale(1.12); } 5% { opacity: 1; } 33% { opacity: 1; } 39% { opacity: 0; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
.inicio-capa { background:
    linear-gradient(90deg, rgb(3 5 79 / 0.95) 0%, rgb(3 5 79 / 0.82) 38%, rgb(4 6 119 / 0.35) 72%, rgb(4 6 119 / 0.15) 100%),
    linear-gradient(0deg, rgb(3 5 40 / 0.85) 0%, transparent 45%); }
/* Franjas diagonales roja y naranja, como en los avisos de la compañía */
.inicio-diagonal { position: absolute; top: -20%; height: 140%; transform: skewX(-24deg); pointer-events: none; }
.inicio-diagonal.d1 { right: 9%; width: 3.2rem; background: linear-gradient(180deg, rgb(245 135 51 / 0.9), rgb(245 135 51 / 0)); }
.inicio-diagonal.d2 { right: calc(9% + 4.4rem); width: 0.9rem; background: linear-gradient(180deg, rgb(237 49 57 / 0.85), rgb(237 49 57 / 0)); }
.inicio-portada-cont { position: relative; z-index: 1; max-width: 1440px; margin: 0 auto; padding: 3.4rem 1.25rem 8rem; display: grid; gap: 2rem;
  grid-template-columns: minmax(0, 1fr); align-items: end; }
@media (min-width: 1024px) { .inicio-portada-cont { padding: 4rem 3rem 8.5rem; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.inicio-fecha { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: #F58733; border: 1px solid rgb(245 135 51 / 0.5); background: rgb(245 135 51 / 0.12); border-radius: 999px; padding: 0.35rem 0.85rem; }
.inicio-fecha svg { width: 0.95rem; height: 0.95rem; }
.inicio-texto h1 { font-weight: 800; font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.02; letter-spacing: -0.03em; margin-top: 1rem; }
.inicio-texto h1 .rojo { color: #ED3139; }
.inicio-texto p { max-width: 34rem; margin-top: 1rem; color: rgb(255 255 255 / 0.86); font-size: 1.08rem; line-height: 1.6; }
.inicio-firma { display: inline-flex; align-items: center; gap: 0.7rem; margin-top: 1.6rem; padding: 0.32rem 1.1rem 0.32rem 0.32rem; border-radius: 999px;
  background: rgb(255 255 255 / 0.1); border: 1px solid rgb(255 255 255 / 0.22); color: #fff; font-size: 0.9rem; backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.inicio-firma:hover { background: rgb(255 255 255 / 0.18); transform: translateY(-2px); }
.inicio-firma img { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; border: 2px solid #F58733; }
.inicio-firma strong { color: #F58733; }
/* El texto de cada foto (abajo a la derecha), sincronizado con la foto que se ve, y los indicadores de avance */
.inicio-lemas { position: relative; min-height: 6.5rem; justify-self: end; width: min(100%, 24rem); display: none; }
@media (min-width: 1024px) { .inicio-lemas { display: block; } }
.inicio-lema { position: absolute; left: 0; right: 0; bottom: 1.4rem; padding: 1rem 1.2rem; border-radius: 14px; background: rgb(3 5 79 / 0.55);
  border: 1px solid rgb(255 255 255 / 0.14); border-left: 4px solid #F58733; backdrop-filter: blur(8px); opacity: 0;
  animation: lema-turno 24s linear infinite; animation-delay: calc(var(--i) * 8s - 1.2s); }
@keyframes lema-turno { 0% { opacity: 0; transform: translateY(10px); } 4% { opacity: 1; transform: none; } 31% { opacity: 1; transform: none; } 35% { opacity: 0; transform: translateY(-6px); } 100% { opacity: 0; } }
.inicio-lema strong { display: block; font-size: 1.12rem; font-weight: 700; line-height: 1.25; }
.inicio-lema span { display: block; margin-top: 0.2rem; font-size: 0.82rem; color: rgb(255 255 255 / 0.72); }
.inicio-puntos { position: absolute; left: 0; bottom: 0; display: flex; gap: 0.4rem; }
.inicio-puntos span { width: 2.2rem; height: 4px; border-radius: 4px; background: rgb(255 255 255 / 0.25); overflow: hidden; }
.inicio-puntos i { display: block; height: 100%; width: 0; background: #F58733; animation: punto-avance 24s linear infinite; animation-delay: calc(var(--i) * 8s - 1.2s); }
@keyframes punto-avance { 0% { width: 0; } 33.3% { width: 100%; } 33.4%, 100% { width: 0; } }

.inicio-hoja { max-width: 1440px; margin: 0 auto 3rem; padding: 0 1.5rem; }
@media (min-width: 1024px) { .inicio-hoja { padding: 0 3rem; } }
.inicio-cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.6rem 1.5rem; margin-top: 2.4rem; }
.inicio-cab small { display: block; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.74rem; color: #D0222A; }
.inicio-cab h2 { font-weight: 800; font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.02em; color: #040677; line-height: 1.15; }
.inicio-hora { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: #5B6170; background: #fff; border-radius: 999px;
  padding: 0.4rem 0.9rem; box-shadow: 0 2px 10px rgb(4 6 119 / 0.06); }
.inicio-hora .punto { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #127A5B; box-shadow: 0 0 0 0 rgb(18 122 91 / 0.5); animation: latido 2s infinite; }
@keyframes latido { 70% { box-shadow: 0 0 0 7px rgb(18 122 91 / 0); } 100% { box-shadow: 0 0 0 0 rgb(18 122 91 / 0); } }
/* Áreas: Taller ocupa todo el ancho; Gestión y Cumplimiento van lado a lado */
.inicio-grupos { margin-top: 1.4rem; display: grid; gap: 1.6rem 1.4rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .inicio-grupos { grid-template-columns: repeat(2, minmax(0, 1fr)); } .inicio-grupo.ancho { grid-column: 1 / -1; } }
.inicio-area { display: flex; align-items: center; gap: 0.7rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #5B6170; margin-bottom: 0.7rem; }
.inicio-area::after { content: ""; flex: 1; height: 1px; background: #DDE0F0; }
.inicio-tarjetas { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); }
.dato { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 16px; padding: 1.15rem 1.3rem 1.1rem; color: #1F2430;
  box-shadow: 0 1px 2px rgb(4 6 119 / 0.06), 0 8px 24px rgb(4 6 119 / 0.06); border: 1px solid #ECEEF8; overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s; }
.dato::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #040677; }
.dato.alerta::before { background: linear-gradient(180deg, #ED3139, #F58733); }
.dato.sin-datos::before { background: #C3C7D6; }
.dato:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgb(4 6 119 / 0.14); border-color: #D9DCF2; }
.dato-cab { display: flex; align-items: center; gap: 0.6rem; }
.dato-ico { display: inline-flex; width: 2.3rem; height: 2.3rem; flex: none; align-items: center; justify-content: center; border-radius: 11px; color: #040677; background: #EDEEFC; transition: background .25s, color .25s; }
.dato.alerta .dato-ico { color: #D0222A; background: #FDECEC; }
.dato-ico svg { width: 1.15rem; height: 1.15rem; }
.dato:hover .dato-ico { background: #040677; color: #fff; }
.dato.alerta:hover .dato-ico { background: #D0222A; }
.dato-modulo { font-weight: 600; font-size: 0.86rem; color: #5B6170; }
.dato-estado { margin-left: auto; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap; }
.dato-estado.rojo { color: #A8141B; background: #FDECEC; }
.dato-estado.gris { color: #5B6170; background: #EEF0F6; }
.dato-num { font-weight: 800; font-size: 2.5rem; line-height: 1.05; letter-spacing: -0.03em; color: #040677; margin-top: 0.85rem; font-variant-numeric: tabular-nums; }
.dato.alerta .dato-num { color: #D0222A; }
.dato.sin-datos .dato-num { color: #A3A8B8; }
.dato-texto { font-weight: 600; font-size: 0.95rem; color: #1F2430; margin-top: 0.15rem; }
.dato-barra { display: block; height: 6px; border-radius: 6px; background: #EEF0F6; overflow: hidden; margin-top: 0.75rem; }
.dato-barra span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ED3139, #F58733); transform-origin: left; animation: barra-crecer 1s .3s cubic-bezier(.2,.7,.2,1) both; }
.dato-barra.bien span { background: linear-gradient(90deg, #040677, #3A3DB5); }
@keyframes barra-crecer { from { transform: scaleX(0); } }
.dato-pct { font-size: 0.75rem; color: #5B6170; margin-top: 0.3rem; font-weight: 500; }
.dato-detalle { font-size: 0.84rem; color: #5B6170; line-height: 1.5; margin-top: 0.55rem; flex: 1; }
.dato-ir { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.9rem; padding-top: 0.75rem; border-top: 1px solid #F0F1F8;
  font-size: 0.8rem; font-weight: 700; color: #D0222A; }
.dato-ir svg { width: 0.95rem; height: 0.95rem; transition: transform .2s; }
.dato:hover .dato-ir svg { transform: translateX(4px); }
.inicio-vacio { margin-top: 1.5rem; padding: 2rem; text-align: center; background: #fff; border-radius: 16px; color: #5B6170; }
@media (prefers-reduced-motion: reduce) {
  .inicio-foto, .inicio-lema, .inicio-puntos i, .dato-barra span, .inicio-hora .punto { animation: none !important; }
  .inicio-foto:first-child, .inicio-lema:first-of-type { opacity: 1; }
}
@media print { .inicio-fotos, .inicio-lemas, .inicio-diagonal { display: none !important; } }
.portal-creador-ancla { scroll-margin-top: 1rem; }
.portal-creador-ancla .portal-seccion { margin-top: 2.8rem; }
.portal-creador { padding: 2.2rem 2.4rem; gap: 2.2rem; background: linear-gradient(120deg, #03054F, #040677 50%, #0A0DA8); position: relative; overflow: hidden; }
.portal-creador::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgb(245 135 51 / 0.35), transparent 70%); pointer-events: none; }
.portal-creador .portal-foto, .portal-creador .foto-desarrollador { width: 9rem; height: 9rem; }
.portal-creador h3 { font-size: 2rem; }

/* ---------------- Cabecera de todas las pantallas: marca + cuenta (fila 1) y módulos por área (fila 2) ---------------- */
/* Las 4 apps (5-nov-2026): cada una con su color. La barra pone html[data-espacio=...] (templates/_pestanas.html).
   --esp-1/2/3: fondo de la cabecera · --esp-a1/a2: botón o pestaña activa · --esp-txt: letra sobre el activo
   · --esp-piso: fondo de la página. Sin app (inicio, usuarios...) queda el azul marino y rojo-naranja de Gayco. */
:root { --esp-1: #03054F; --esp-2: #040677; --esp-3: #0A0DA8; --esp-a1: #ED3139; --esp-a2: #F58733; --esp-txt: #fff; --esp-piso: #F4F5FE;
  --esp-brillo: rgb(245 135 51 / 0.16); }
html[data-espacio="administrativo"] { --esp-1: #03054F; --esp-2: #040677; --esp-3: #1B1FB8; --esp-a1: #E8A600; --esp-a2: #FFD166; --esp-txt: #231A00;
  --esp-piso: #F4F5FE; --esp-brillo: rgb(255 209 102 / 0.18); }
html[data-espacio="operativo"] { --esp-1: #02262F; --esp-2: #034A57; --esp-3: #0A7486; --esp-a1: #ED3139; --esp-a2: #F58733; --esp-txt: #fff;
  --esp-piso: #F0F6F7; --esp-brillo: rgb(245 135 51 / 0.20); }
html[data-espacio="combustible"] { --esp-1: #042315; --esp-2: #0A4429; --esp-3: #127047; --esp-a1: #1E9E57; --esp-a2: #62CF73; --esp-txt: #fff;
  --esp-piso: #F1F7F3; --esp-brillo: rgb(98 207 115 / 0.20); }
html[data-espacio="llantas"] { --esp-1: #101217; --esp-2: #20232B; --esp-3: #3A3F4C; --esp-a1: #F2B300; --esp-a2: #FFD84D; --esp-txt: #1A1A1A;
  --esp-piso: #F3F3F5; --esp-brillo: rgb(255 216 77 / 0.16); }
html[data-espacio]:not([data-espacio="inicio"]) body.bg-piso { background-color: var(--esp-piso); }
header.bg-tinta { position: relative; background:
    radial-gradient(640px 240px at 88% 100%, var(--esp-brillo), transparent 65%),
    radial-gradient(520px 220px at 8% 100%, rgb(237 49 57 / 0.10), transparent 65%),
    linear-gradient(120deg, var(--esp-1) 0%, var(--esp-2) 55%, var(--esp-3) 100%); }
header.bg-tinta::after { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--esp-a1) 0 35%, var(--esp-a2) 35% 100%); }
.barra-superior { background: rgb(2 3 40 / 0.35); backdrop-filter: blur(6px); position: relative; z-index: 60; }
.barra-fila { max-width: 1440px; margin: 0 auto; padding: 0.95rem 1.5rem 0.85rem; display: flex; align-items: center; gap: 1.25rem; }
@media (min-width: 1024px) { .barra-fila { padding: 1.05rem 3rem 0.95rem; } }
.barra-marca { display: flex; align-items: center; gap: 0.85rem; min-width: 0; flex: 1 1 auto; color: #fff; }
@media (max-width: 639px) {
  .barra-fila { gap: 0.5rem; padding: 0.5rem 0.9rem; }
  .barra-titulo { padding-left: 0.6rem; } .barra-titulo small { display: none; } .barra-titulo strong { font-size: 0.9rem; }
  .marca-logo img { height: 1.5rem; } .barra-boton { padding: 0 0.55rem; } .barra-acciones { flex: none; gap: 0.15rem; }
  .menu-fila { padding: 0 0.9rem; }
}
@media (max-width: 479px) { .barra-titulo { display: none; } }
.barra-marca:hover .marca-logo { box-shadow: 0 0 0 3px rgb(245 135 51 / 0.55); }
.barra-titulo { display: flex; flex-direction: column; gap: 0.15rem; line-height: 1.15; min-width: 0; padding-left: 1.1rem; margin-left: 0.25rem; border-left: 1px solid rgb(255 255 255 / 0.18); }
.barra-titulo small { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.55); }
.barra-titulo strong { font-size: 1.02rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barra-acciones { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.barra-boton { display: inline-flex; align-items: center; gap: 0.45rem; height: 2.5rem; padding: 0 0.95rem; border-radius: 10px; cursor: pointer; list-style: none;
  color: rgb(255 255 255 / 0.82); font-size: 0.82rem; font-weight: 500; white-space: nowrap; transition: background .2s, color .2s; }
.barra-boton:hover, .barra-desplegable[open] > .barra-boton { background: rgb(255 255 255 / 0.12); color: #fff; }
.barra-boton svg, .barra-usuario > svg { width: 1rem; height: 1rem; flex: none; }
.barra-desplegable { position: relative; }
.barra-desplegable > summary::-webkit-details-marker { display: none; }
.barra-usuario { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.22rem 0.6rem 0.22rem 0.22rem; border-radius: 999px; cursor: pointer; list-style: none;
  background: rgb(255 255 255 / 0.1); border: 1px solid rgb(255 255 255 / 0.14); color: rgb(255 255 255 / 0.7); transition: background .2s; margin-left: 0.25rem; }
.barra-usuario:hover, .barra-cuenta[open] > .barra-usuario { background: rgb(255 255 255 / 0.18); }
.barra-avatar { width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-weight: 700; font-size: 0.78rem; color: #fff; background: linear-gradient(135deg, #ED3139, #F58733); }
.barra-usuario strong { color: #fff; font-weight: 600; font-size: 0.82rem; line-height: 1.1; display: block; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-usuario small { color: rgb(255 255 255 / 0.6); font-size: 0.7rem; display: block; }
.barra-panel { position: absolute; top: calc(100% + 0.5rem); left: 0; min-width: 16rem; background: #fff; color: #1F2430; border-radius: 14px; padding: 0.4rem;
  box-shadow: 0 18px 50px rgb(3 5 79 / 0.28), 0 0 0 1px rgb(4 6 119 / 0.06); animation: panel-abrir .16s ease-out; z-index: 80; }
.barra-panel.derecha { left: auto; right: 0; }
@media (max-width: 639px) { .barra-panel { position: fixed; left: 0.75rem; right: 0.75rem; top: 3.6rem; min-width: 0; } .barra-panel.derecha { left: 0.75rem; right: 0.75rem; } }
@keyframes panel-abrir { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.barra-panel a { display: flex; align-items: center; gap: 0.7rem; padding: 0.6rem 0.7rem; border-radius: 10px; color: #1F2430; transition: background .15s; }
.barra-panel a:hover { background: #F4F5FE; }
.barra-panel a svg { width: 1.1rem; height: 1.1rem; color: #040677; flex: none; }
.barra-panel a strong { display: block; font-size: 0.88rem; font-weight: 600; }
.barra-panel a small { display: block; font-size: 0.74rem; color: #5B6170; }
.barra-panel a.peligro svg, .barra-panel a.peligro strong { color: #D0222A; }
.barra-panel-cab { padding: 0.6rem 0.7rem 0.7rem; margin-bottom: 0.3rem; border-bottom: 1px solid #ECEEF8; }
.barra-panel-cab strong { display: block; font-size: 0.92rem; color: #040677; }
.barra-panel-cab small { font-size: 0.74rem; color: #5B6170; }
.barra-version { font-size: 0.7rem; color: rgb(255 255 255 / 0.45); }
.barra-version-chip { align-items: center; gap: 0.4rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; color: rgb(255 255 255 / 0.7);
  padding: 0.3rem 0.7rem; border-radius: 999px; border: 1px solid rgb(255 255 255 / 0.14); background: rgb(255 255 255 / 0.05); white-space: nowrap; }
.barra-version-chip .punto { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: #3DD6A0; box-shadow: 0 0 0 3px rgb(61 214 160 / 0.2); }
.barra-panel .barra-version { color: #8A90A0; padding: 0.5rem 0.7rem 0.3rem; margin-top: 0.3rem; border-top: 1px solid #ECEEF8; }
@media print { header.bg-tinta { background: #040677; } }

/* Menú de módulos: se navega de un módulo a otro sin volver al inicio; una línea fina separa las áreas */
.menu-modulos { border-top: 1px solid rgb(255 255 255 / 0.08); overflow-x: auto; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 1.2rem, #000 calc(100% - 1.2rem), transparent); mask-image: linear-gradient(90deg, transparent, #000 1.2rem, #000 calc(100% - 1.2rem), transparent); }
.menu-modulos::-webkit-scrollbar { display: none; }
/* Centrada: con width max-content + margin auto queda en el centro si cabe, y si no cabe se desliza desde el primer módulo */
.menu-fila { width: max-content; margin: 0 auto; padding: 0.3rem 1.5rem 0; display: flex; align-items: center; gap: 0.15rem; }
@media (min-width: 1024px) { .menu-fila { padding: 0.3rem 3rem 0; } }
.menu-sep { flex: none; width: 1px; height: 1.4rem; margin: 0 0.6rem; background: rgb(255 255 255 / 0.18); }
/* Cada área con su color (sobre el azul marino): Taller naranja, Gestión dorado, Cumplimiento rojo, Terceros verde */
.menu-modulo { --c: #FFFFFF; position: relative; display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.7rem 0.7rem 0.85rem; white-space: nowrap;
  font-weight: 500; font-size: 0.9rem; letter-spacing: 0.005em; color: rgb(255 255 255 / 0.78); border-radius: 12px 12px 0 0;
  transition: color .2s, background .25s; animation: menu-entra .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--n) * 35ms); }
.menu-modulo.area-taller { --c: #FFA45C; } .menu-modulo.area-gestion { --c: #FFD166; }
.menu-modulo.area-cumplimiento { --c: #FF7A7A; } .menu-modulo.area-terceros { --c: #4FE3B0; }
@keyframes menu-entra { from { opacity: 0; transform: translateY(-6px); } }
.menu-ico { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 9px; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .25s, color .25s, box-shadow .25s; }
.menu-ico svg { width: 1.02rem; height: 1.02rem; }
/* Portátiles y pantallas medianas (1024–1800 px): un poco más compacto para que quepan todos los módulos sin desplazarse */
@media (min-width: 1024px) and (max-width: 1800px) {
  .menu-fila { padding-left: 2.4rem; padding-right: 2.4rem; }
  .menu-modulo { padding-left: 0.42rem; padding-right: 0.42rem; font-size: 0.85rem; gap: 0.42rem; }
  .menu-ico { width: 1.6rem; height: 1.6rem; } .menu-ico svg { width: 0.95rem; height: 0.95rem; }
  .menu-sep { margin: 0 0.35rem; }
}
@media (min-width: 1024px) and (max-width: 1340px) {
  .menu-fila { padding-left: 1rem; padding-right: 1rem; } .menu-modulo { padding-left: 0.32rem; padding-right: 0.32rem; font-size: 0.8rem; gap: 0.35rem; }
  .menu-ico { width: 1.45rem; height: 1.45rem; } .menu-sep { margin: 0 0.25rem; }
}
.menu-modulo:hover { color: #fff; background: rgb(255 255 255 / 0.06); }
.menu-modulo:hover .menu-ico { transform: scale(1.12) rotate(-6deg); background: color-mix(in srgb, var(--c) 26%, transparent); }
.menu-modulo::after { content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--c); transform: scaleX(0); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.menu-modulo:hover::after { transform: scaleX(0.55); }
.menu-modulo.activo { color: #fff; font-weight: 700; background: linear-gradient(180deg, rgb(255 255 255 / 0.04), rgb(255 255 255 / 0.11)); }
.menu-modulo.activo .menu-ico { color: var(--esp-txt); background: linear-gradient(135deg, var(--esp-a1), var(--esp-a2)); box-shadow: 0 4px 14px rgb(0 0 0 / 0.3); }
.menu-modulo.activo::after { transform: scaleX(1); background: linear-gradient(90deg, var(--esp-a1), var(--esp-a2)); }
@media (prefers-reduced-motion: reduce) { .menu-modulo { animation: none; } .menu-modulo:hover .menu-ico { transform: none; } }

/* Cinta de opciones por áreas (5-nov): Inicio · Mantenimiento operativo ▾ · Mantenimiento administrativo ▾ · Terceros.
   Cada grupo abre un panel ancho con sus módulos (descripción y páginas). Ya no se desliza a lo ancho: son pocos botones,
   y el panel necesita salirse de la barra (overflow visible). */
.menu-modulos { overflow: visible; -webkit-mask-image: none; mask-image: none; position: relative; }
.menu-fila { width: auto; justify-content: center; flex-wrap: wrap; gap: 0.35rem; }
.menu-modulo.area-operativo { --c: #FFA45C; } .menu-modulo.area-administrativo { --c: #FFD166; }
.menu-grupo { position: static; }
.menu-grupo > summary { list-style: none; cursor: pointer; user-select: none; }
.menu-grupo > summary::-webkit-details-marker { display: none; }
.menu-grupo-txt { display: flex; flex-direction: column; line-height: 1.1; }
.menu-grupo-txt .corto { display: none; }
.menu-grupo-txt small { font-size: 0.68rem; font-weight: 600; color: var(--c); letter-spacing: 0.02em; }
.menu-flecha svg { width: 0.95rem; height: 0.95rem; opacity: .7; transition: transform .2s; }
.menu-grupo[open] > summary { color: #fff; background: rgb(255 255 255 / 0.1); }
.menu-grupo[open] > summary .menu-flecha svg { transform: rotate(180deg); }
.menu-grupo[open] > summary::after { transform: scaleX(1); }
/* El panel: centrado bajo la barra, del ancho del contenido */
.menu-panel { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: min(1100px, calc(100vw - 1.5rem)); z-index: 85;
  background: #fff; color: #1F2430; border-radius: 0 0 18px 18px; padding: 1rem 1.1rem 1.15rem; animation: panel-abrir .16s ease-out;
  box-shadow: 0 24px 60px rgb(3 5 79 / 0.32), 0 0 0 1px rgb(4 6 119 / 0.06); border-top: 3px solid var(--c, #F58733); }
.menu-grupo.area-operativo .menu-panel { --c: #F58733; } .menu-grupo.area-administrativo .menu-panel { --c: #E0A800; }
.menu-panel-cab { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #040677; margin: 0 0 0.75rem 0.2rem; }
.menu-panel-cab span { font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: #8A90A0; margin-left: 0.4rem; }
.menu-panel-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.65rem; }
.menu-tarjeta { border: 1px solid #ECEEF8; border-radius: 14px; padding: 0.6rem; transition: border-color .15s, box-shadow .15s; }
.menu-tarjeta:hover { border-color: rgb(4 6 119 / 0.18); box-shadow: 0 6px 18px rgb(4 6 119 / 0.08); }
.menu-tarjeta.activo { border-color: #F58733; background: #FFF8F1; }
.menu-tarjeta-cab { display: flex; align-items: center; gap: 0.7rem; padding: 0.25rem; border-radius: 10px; color: #1F2430; }
.menu-tarjeta-cab:hover strong { color: #ED3139; }
.menu-tarjeta-cab .menu-ico { --c: #040677; width: 2.3rem; height: 2.3rem; border-radius: 11px; color: #040677; background: #EEF0FC; box-shadow: none; }
.menu-tarjeta.activo .menu-tarjeta-cab .menu-ico { color: #fff; background: linear-gradient(135deg, #ED3139, #F58733); }
.menu-tarjeta-cab .menu-ico svg { width: 1.2rem; height: 1.2rem; }
.menu-tarjeta-cab strong { display: block; font-size: 0.95rem; font-weight: 700; color: #040677; transition: color .15s; }
.menu-tarjeta-cab small { display: block; font-size: 0.76rem; color: #5B6170; line-height: 1.3; }
.menu-paginas { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.45rem 0 0 3.25rem; }
.menu-paginas a { font-size: 0.74rem; font-weight: 500; color: #3A4060; background: #F4F5FE; border-radius: 999px; padding: 0.22rem 0.6rem; transition: background .15s, color .15s; }
.menu-paginas a:hover { background: #040677; color: #fff; }
.menu-paginas a.activa { background: linear-gradient(135deg, #ED3139, #F58733); color: #fff; font-weight: 700; }
/* Celulares: textos cortos y el panel ocupa toda la pantalla de ancho */
@media (max-width: 639px) {
  .menu-grupo-txt small, .menu-flecha, .menu-grupo-txt .largo { display: none; }
  .menu-grupo-txt .corto { display: inline; }
  .menu-fila { gap: 0.1rem; flex-wrap: nowrap; justify-content: flex-start; width: max-content; }
  .menu-modulos { overflow-x: auto; }   /* el panel es fixed en celular: no lo recorta */
  .menu-modulo.area-inicio > span:not(.menu-ico) { display: none; }   /* Inicio: solo la casita */
  .menu-modulo { padding: 0.55rem 0.45rem 0.7rem; font-size: 0.78rem; gap: 0.35rem; }
  .menu-panel { position: fixed; top: 6.3rem; left: 0.5rem; right: 0.5rem; width: auto; transform: none; max-height: 70vh; overflow-y: auto; border-radius: 16px; }
  .menu-panel-rejilla { grid-template-columns: 1fr; }
  .menu-paginas { margin-left: 0; }
}
@media print { .menu-panel { display: none !important; } }

/* ---------- Las 4 apps (5-nov-2026) ---------- */
/* Color propio de cada app (para íconos, tarjetas y el selector, aunque la página sea de otra app) */
.esp-inicio { --app-1: #040677; --app-2: #ED3139; --app-3: #F58733; --app-suave: #EEF0FC; }
.esp-administrativo { --app-1: #040677; --app-2: #E8A600; --app-3: #FFD166; --app-suave: #FFF6DC; }
.esp-operativo { --app-1: #034A57; --app-2: #ED3139; --app-3: #F58733; --app-suave: #E3F2F4; }
.esp-combustible { --app-1: #0A4429; --app-2: #1E9E57; --app-3: #62CF73; --app-suave: #E4F5E8; }
.esp-llantas { --app-1: #20232B; --app-2: #F2B300; --app-3: #FFD84D; --app-suave: #F1F1F3; }
/* Barra: punto de color con el nombre de la app; dentro de una app los íconos toman su color */
.barra-app-punto { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.45rem; vertical-align: 0.05em;
  background: linear-gradient(135deg, var(--esp-a1), var(--esp-a2)); box-shadow: 0 0 0 3px rgb(255 255 255 / 0.12); }
html[data-espacio]:not([data-espacio="inicio"]) .menu-modulo { --c: var(--esp-a2); }
.menu-modulo.area-apps { --c: #fff; font-weight: 600; }
.menu-pagina { padding-left: 0.9rem; padding-right: 0.9rem; }
.menu-app-tab .menu-ico { color: var(--app-3); background: color-mix(in srgb, var(--app-3) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--app-3) 35%, transparent); }
/* Selector de apps: un panel más angosto con las 4 apps y el inicio */
.menu-panel-apps { width: min(720px, calc(100vw - 1.5rem)); --c: var(--esp-a2); }
.menu-apps-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0.5rem; }
.menu-app { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.7rem; border-radius: 14px; border: 1px solid #ECEEF8; color: #1F2430;
  transition: background .15s, border-color .15s; }
.menu-app:hover { background: var(--app-suave); border-color: transparent; }
.menu-app.activo { border-color: var(--app-2); background: var(--app-suave); }
.menu-app .menu-ico { width: 2.4rem; height: 2.4rem; border-radius: 12px; color: #fff; box-shadow: none; background: linear-gradient(135deg, var(--app-1), var(--app-2)); }
.menu-app .menu-ico svg { width: 1.2rem; height: 1.2rem; }
.menu-app strong { display: block; font-size: 0.95rem; color: var(--app-1); }
.menu-app small { display: block; font-size: 0.75rem; color: #5B6170; }
/* Barra superior con vida (5-nov: "muy básica, estática y pequeña"): logo más grande con brillo, título grande con punto
   que late, reloj en vivo, botones tipo píldora animados y el avatar con un aro de colores que gira */
.barra-superior { background: linear-gradient(110deg, transparent 35%, rgb(255 255 255 / 0.07) 48%, transparent 60%) 0 0 / 260% 100%, rgb(2 3 40 / 0.35);
  animation: barra-reflejo 10s linear infinite; }
@keyframes barra-reflejo { from { background-position: 130% 0, 0 0; } to { background-position: -130% 0, 0 0; } }
.barra-fila { padding-top: 1rem; padding-bottom: 0.95rem; }
.marca-logo { position: relative; overflow: hidden; padding: 0.4rem 0.75rem; border-radius: 12px; box-shadow: 0 6px 18px rgb(0 0 0 / 0.3); }
.marca-logo img { height: 2.35rem; }
.marca-logo::after { content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 45%; transform: skewX(-20deg); pointer-events: none;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.85), transparent); animation: logo-brillo 7s ease-in-out infinite 2s; }
@keyframes logo-brillo { 0%, 80% { left: -70%; } 92%, 100% { left: 140%; } }
.barra-marca:hover .marca-logo { transform: translateY(-1px) rotate(-1.5deg); }
.marca-logo { transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .2s; }
.barra-titulo { gap: 0.2rem; }
.barra-titulo small { font-size: 0.7rem; color: rgb(255 255 255 / 0.65); }
.barra-titulo strong { font-size: 1.32rem; font-weight: 800; letter-spacing: -0.02em; }
.barra-app-punto { animation: punto-late 2.4s ease-in-out infinite; }
@keyframes punto-late { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--esp-a2) 70%, transparent); } 60% { box-shadow: 0 0 0 7px transparent; } }
/* Reloj en vivo */
.barra-reloj { flex-direction: column; align-items: flex-end; justify-content: center; line-height: 1.05; padding: 0.3rem 0.85rem; border-radius: 14px;
  background: rgb(255 255 255 / 0.07); border: 1px solid rgb(255 255 255 / 0.12); color: #fff; }
.barra-reloj b { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.barra-reloj small { font-size: 0.68rem; color: rgb(255 255 255 / 0.6); }
.barra-reloj, .barra-reloj b, .barra-reloj small { white-space: nowrap; flex: none; }
.barra-titulo small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1600px) { .barra-fila { max-width: 1760px; } }
@media (max-width: 639px) { .barra-titulo small { display: none; } }
/* Botones tipo píldora */
.barra-boton { height: 2.6rem; border-radius: 999px; padding: 0 1.05rem; background: rgb(255 255 255 / 0.07); border: 1px solid rgb(255 255 255 / 0.12);
  font-weight: 600; transition: background .2s, color .2s, transform .2s, border-color .2s; }
.barra-boton:hover, .barra-desplegable[open] > .barra-boton { transform: translateY(-1px); border-color: color-mix(in srgb, var(--esp-a2) 60%, transparent); }
.barra-boton svg { transition: transform .5s cubic-bezier(.34,1.56,.64,1); }
.b-actualizar:hover svg { transform: rotate(200deg); }
.b-actualizar.girando svg { animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.b-admin:hover > svg:first-child, .b-admin[open] > svg:first-child, .barra-desplegable[open] > .b-admin > svg:first-child { transform: rotate(90deg); }
/* Usuario: aro de colores que gira alrededor del avatar y punto verde de "en línea" */
.barra-usuario { padding: 0.25rem 0.75rem 0.25rem 0.25rem; }
.barra-avatar-aro { position: relative; display: inline-flex; padding: 2px; border-radius: 50%; flex: none;
  background: conic-gradient(from var(--giro, 0deg), var(--esp-a1), var(--esp-a2), #fff, var(--esp-a1)); animation: aro-gira 6s linear infinite; }
@property --giro { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes aro-gira { to { --giro: 360deg; } }
.barra-avatar-aro .barra-avatar { width: 2.3rem; height: 2.3rem; font-size: 0.85rem; border: 2px solid #0B0F3A; }
.barra-en-linea { position: absolute; right: 0; bottom: 0; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #3DD6A0; border: 2px solid #0B0F3A; }
.barra-usuario strong { font-size: 0.9rem; }
@media (min-width: 1024px) and (max-height: 820px) { .barra-fila { padding-top: 0.7rem; padding-bottom: 0.65rem; } .marca-logo img { height: 2.1rem; } }
@media (max-width: 639px) { .barra-titulo strong { font-size: 1rem; } .marca-logo img { height: 1.7rem; } .barra-boton { height: 2.3rem; padding: 0 0.6rem; } }
@media (prefers-reduced-motion: reduce) { .barra-superior, .marca-logo::after, .barra-app-punto, .barra-avatar-aro { animation: none; } }

/* Inicio: las 4 apps como botones grandes de color (5-nov: "muy aburrido, estático y pequeño") */
.apps-botones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; width: min(1340px, 100%); padding: 0.55rem 0 0.9rem; }
.app-boton { position: relative; display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 0.9rem; border-radius: 18px; overflow: hidden; color: #fff;
  background: radial-gradient(260px 120px at 100% 0%, color-mix(in srgb, var(--app-3) 45%, transparent), transparent 70%),
              linear-gradient(135deg, var(--app-1), color-mix(in srgb, var(--app-1) 55%, var(--app-2)));
  border: 1px solid color-mix(in srgb, var(--app-3) 45%, transparent);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.15);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, border-color .25s;
  animation: menu-entra .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--n) * 80ms); }
/* Brillo que cruza cada botón cada pocos segundos, uno detrás del otro */
.app-boton::before { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.28), transparent); transform: skewX(-20deg);
  animation: app-brillo 6s ease-in-out infinite; animation-delay: calc(1.2s + var(--n) * 0.45s); }
@keyframes app-brillo { 0%, 70% { left: -60%; } 85%, 100% { left: 130%; } }
.app-boton::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--app-2), var(--app-3)); }
.app-boton:hover { transform: translateY(-4px) scale(1.02); border-color: var(--app-3);
  box-shadow: 0 16px 36px rgb(0 0 0 / 0.38), 0 0 0 3px color-mix(in srgb, var(--app-3) 30%, transparent); }
.app-boton-ico { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 14px; flex: none;
  color: var(--app-1); background: linear-gradient(135deg, var(--app-3), #fff); box-shadow: 0 6px 16px rgb(0 0 0 / 0.3);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.app-boton-ico svg { width: 1.55rem; height: 1.55rem; }
.app-boton:hover .app-boton-ico { transform: rotate(-8deg) scale(1.1); }
.app-boton-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.app-boton-txt i { font-style: normal; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--app-3); }
.app-boton-txt strong { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-boton-txt small { font-size: 0.72rem; color: rgb(255 255 255 / 0.72); margin-top: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-boton-flecha { margin-left: auto; display: inline-flex; width: 2rem; height: 2rem; flex: none; align-items: center; justify-content: center; border-radius: 50%;
  background: rgb(255 255 255 / 0.14); transition: transform .25s, background .25s; }
.app-boton-flecha svg { width: 1rem; height: 1rem; }
.app-boton:hover .app-boton-flecha { transform: translateX(3px); background: var(--app-3); color: var(--app-1); }
@media (max-width: 1100px) { .apps-botones { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px) { .apps-botones { gap: 0.5rem; padding: 0.4rem 0.6rem 0.7rem; width: calc(100vw - 0.4rem); }
  .app-boton { padding: 0.55rem; gap: 0.5rem; border-radius: 14px; } .app-boton-ico { width: 2.3rem; height: 2.3rem; border-radius: 11px; }
  .app-boton-txt strong { font-size: 0.9rem; white-space: normal; } .app-boton-txt small, .app-boton-flecha { display: none; } }
@media (prefers-reduced-motion: reduce) { .app-boton, .app-boton::before { animation: none; } }
/* "Más herramientas" (apps de un solo módulo con muchas páginas) */
.menu-panel-mas { width: min(520px, calc(100vw - 1.5rem)); --c: var(--esp-a2); }
.menu-mas-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.35rem; }
.menu-mas-lista a { padding: 0.6rem 0.8rem; border-radius: 10px; font-size: 0.88rem; font-weight: 600; color: var(--esp-2); background: #F5F6FA; transition: background .15s, color .15s; }
.menu-mas-lista a:hover { background: color-mix(in srgb, var(--esp-a2) 20%, #fff); }
.menu-mas-lista a.activa { background: linear-gradient(135deg, var(--esp-a1), var(--esp-a2)); color: var(--esp-txt); }
/* Llantas: sus páginas ya están en la barra; la fila de pestañas de la cabecera sobra */
html[data-espacio="llantas"] header.bg-tinta > div:has(> nav[aria-label="Llantas"]) { display: none; }

/* Inicio: las 4 apps en tarjetas grandes */
.apps-rejilla { margin-top: 1.4rem; display: grid; gap: 1.3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .apps-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.app-tarjeta { display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden; border: 1px solid #ECEEF8;
  box-shadow: 0 1px 2px rgb(4 6 119 / 0.06), 0 10px 30px rgb(4 6 119 / 0.07); transition: transform .25s, box-shadow .25s; }
.app-tarjeta:hover { transform: translateY(-3px); box-shadow: 0 20px 44px rgb(4 6 119 / 0.14); }
.app-cab { position: relative; display: flex; align-items: center; gap: 1rem; padding: 1.3rem 1.4rem; color: #fff; overflow: hidden;
  background: radial-gradient(380px 160px at 100% 0%, color-mix(in srgb, var(--app-3) 35%, transparent), transparent 70%),
              linear-gradient(120deg, var(--app-1), color-mix(in srgb, var(--app-1) 70%, var(--app-2))); }
.app-cab::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: linear-gradient(90deg, var(--app-2), var(--app-3)); }
.app-ico { display: inline-flex; align-items: center; justify-content: center; width: 3.4rem; height: 3.4rem; border-radius: 16px; flex: none;
  color: var(--app-1); background: linear-gradient(135deg, var(--app-3), #fff); box-shadow: 0 8px 20px rgb(0 0 0 / 0.25); }
.app-ico svg { width: 1.7rem; height: 1.7rem; }
.app-nombre small { display: block; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--app-3); }
.app-nombre strong { display: block; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.app-entrar { margin-left: auto; display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.55rem 1rem; border-radius: 999px; font-weight: 700; font-size: 0.85rem;
  background: rgb(255 255 255 / 0.14); border: 1px solid rgb(255 255 255 / 0.25); white-space: nowrap; transition: background .2s; }
.app-entrar svg { width: 1rem; height: 1rem; transition: transform .2s; }
.app-cab:hover .app-entrar { background: rgb(255 255 255 / 0.25); }
.app-cab:hover .app-entrar svg { transform: translateX(4px); }
.app-desc { padding: 1rem 1.4rem 0.2rem; font-size: 0.9rem; color: #5B6170; line-height: 1.5; }
.app-modulos { list-style: none; margin: 0; padding: 0.5rem 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.15rem; }
.app-modulo { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.55rem; border-radius: 12px; color: #1F2430; transition: background .15s; }
.app-modulo:hover { background: var(--app-suave); }
.app-modulo > svg { width: 1rem; height: 1rem; color: var(--app-2); flex: none; }
.app-modulo-ico { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 10px; flex: none;
  color: var(--app-1); background: var(--app-suave); }
.app-modulo-ico svg { width: 1.05rem; height: 1.05rem; }
.app-modulo-nombre { font-weight: 600; font-size: 0.92rem; }
.app-modulo-dato { margin-left: auto; text-align: right; min-width: 0; max-width: 60%; line-height: 1.15; }
.app-modulo-dato strong { font-size: 1.05rem; font-weight: 800; color: var(--app-1); font-variant-numeric: tabular-nums; }
.app-modulo-dato small { display: block; font-size: 0.72rem; color: #8A90A0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-modulo.alerta .app-modulo-dato strong { color: #D0222A; }
.app-dato-unico { padding: 0.4rem 0.55rem 0.7rem; display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.app-dato-unico strong { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; color: var(--app-1); }
.app-dato-unico span { font-size: 0.85rem; color: #5B6170; }
.app-dato-unico.alerta strong { color: #D0222A; }

/* Portada de una app: cabecera con su ícono y los módulos en tarjetas con su dato y sus páginas */
.app-portada-cab { display: flex; align-items: center; gap: 1.1rem; }
.app-portada-ico { display: inline-flex; align-items: center; justify-content: center; width: 4rem; height: 4rem; border-radius: 18px; flex: none;
  color: var(--esp-txt); background: linear-gradient(135deg, var(--esp-a1), var(--esp-a2)); box-shadow: 0 10px 26px rgb(0 0 0 / 0.3); }
.app-portada-ico svg { width: 2rem; height: 2rem; }
.app-portada-fecha { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--esp-a2); }
.app-portada-hora { font-size: 0.8rem; color: rgb(255 255 255 / 0.7); }
.modulos-rejilla { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.modulo-tarjeta::before { background: linear-gradient(180deg, var(--esp-a1), var(--esp-a2)); }
.modulo-tarjeta .dato-cab { color: inherit; }
.modulo-tarjeta .dato-ico { color: var(--esp-2); background: color-mix(in srgb, var(--esp-a2) 18%, #fff); }
.modulo-titulo { display: block; font-weight: 800; font-size: 1.1rem; color: var(--esp-2); }
.modulo-desc { display: block; font-size: 0.78rem; color: #5B6170; }
.modulo-tarjeta .dato-num { color: var(--esp-2); }
.modulo-paginas { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.9rem; padding-top: 0.8rem; border-top: 1px solid #F0F1F8; }
.modulo-paginas a { font-size: 0.78rem; font-weight: 600; color: var(--esp-2); background: color-mix(in srgb, var(--esp-a2) 14%, #fff); border-radius: 999px;
  padding: 0.3rem 0.75rem; transition: background .15s, color .15s; }
.modulo-paginas a:hover { background: linear-gradient(135deg, var(--esp-a1), var(--esp-a2)); color: var(--esp-txt); }

/* Marca de la barra superior: el logo en su placa blanca, y la franja roja y naranja del logo */
.marca-logo { display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 0.3rem 0.6rem; transition: box-shadow .2s; flex: none; }
.marca-logo img { height: 1.9rem; width: auto; display: block; }
.franja-gayco { height: 5px; background: linear-gradient(90deg, #ED3139 0 35%, #F58733 35% 100%); }


/* Foto del desarrollador: usa la imagen ubicada en static/foto_desarrollador.jpg */
.foto-desarrollador {
  display: block;
  width: 6.5rem;
  height: 6.5rem;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 3px solid #F58733;
  box-shadow: 0 0 0 4px rgb(245 135 51 / 0.15);
}

/* Filtro de varias opciones */
.multi { position: relative; }
.multi-boton { white-space: nowrap; }
.multi-boton.multi-activo { border-color: #127A5B; color: #127A5B; font-weight: 600; background: rgb(18 122 91 / 0.06); }
.multi-menu { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; min-width: 15rem; max-height: 22rem; overflow-y: auto;
  background: #fff; border: 1px solid rgb(4 6 119 / 0.15); border-radius: 8px; padding: 0.6rem 0.8rem; box-shadow: 0 10px 30px rgb(0 0 0 / 0.15); }
.multi-menu label { cursor: pointer; white-space: nowrap; }
/* Técnicos en el formulario */
.chip-on { background: #040677; color: #fff; border-color: #040677; }

/* ---------------- Botones comunes (todos los módulos) ---------------- */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border-radius: 999px; padding: 0.55rem 1.15rem;
  font-family: 'DM Sans', 'Segoe UI', sans-serif; font-size: 0.85rem; font-weight: 600; line-height: 1.25; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; transition: transform .2s ease, background .2s ease, box-shadow .2s ease; }
.boton:not(:disabled):hover { transform: translateY(-1px); }
.boton:disabled { opacity: 0.45; cursor: not-allowed; }
.boton-principal { background: #D0222A; color: #fff; box-shadow: 0 4px 14px rgb(208 34 42 / 0.25); }
.boton-placa { background: #F58733; color: #040677; }
.boton-peligro { background: #8E1219; color: #fff; }
.boton-principal:hover { background: #A8141B; }
.boton-peligro:hover { filter: brightness(1.15); }
.boton-placa:hover { filter: brightness(0.95); }
.boton-borde { background: #fff; color: #040677; border-color: rgb(4 6 119 / 0.2); }
.boton-borde:hover { background: #F4F5FE; }
.boton-claro { color: #fff; border-color: rgb(255 255 255 / 0.3); }   /* sobre la cabecera oscura */
.boton-claro:hover { background: rgb(255 255 255 / 0.1); }
.boton-chico { padding: 0.25rem 0.6rem; font-size: 0.75rem; }
.enlace { color: #127A5B; font-weight: 600; }
.enlace:hover { text-decoration: underline; }
.chip { cursor: pointer; user-select: none; }
.detalle tr.con-alerta td:first-child { box-shadow: inset 4px 0 0 #D0222A; }

/* Indicador "En vivo desde SYSCOM" (templates/_estado_costos.html) */
.estado-punto { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: rgba(255,255,255,.4); flex: none; }
.estado-punto.ok { background: #40C057; box-shadow: 0 0 0 0 rgba(64,192,87,.6); animation: latido 2.4s infinite; }
.estado-punto.espera { background: #F58733; }
.estado-punto.falla { background: #F0643C; }
@keyframes latido { 70% { box-shadow: 0 0 0 7px rgba(64,192,87,0); } 100% { box-shadow: 0 0 0 0 rgba(64,192,87,0); } }
@media (prefers-reduced-motion: reduce) { .estado-punto.ok { animation: none; } }

/* Plataforma en vivo (static/js/en_vivo.js): mantenimiento, reconexión y versión nueva */
.vivo-cortina { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 1rem; background: rgb(11 20 27 / 0.82); backdrop-filter: blur(3px); }
.vivo-pagina { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: #040677; }
.vivo-tarjeta { box-sizing: border-box; width: 100%; max-width: 30rem; background: #fff; color: #040677; border-radius: 12px; padding: 2rem 1.75rem;
  text-align: center; border-top: 6px solid #F58733; box-shadow: 0 20px 50px rgb(0 0 0 / 0.35); }
.vivo-icono { width: 4rem; height: 4rem; margin: 0 auto 0.75rem; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; background: #F58733; color: #040677; }
.vivo-seccion { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #5B6170; }
.vivo-tarjeta h2, .vivo-tarjeta h1 { font-size: 1.9rem; font-weight: 800; line-height: 1.15; margin-top: 0.15rem; }
.vivo-mensaje { margin-top: 0.75rem; font-size: 1.05rem; }
.vivo-firma { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid rgb(4 6 119 / 0.12); }
.vivo-nota { margin-top: 0.5rem; font-size: 0.8rem; color: #5B6170; }
.vivo-boton { display: inline-block; margin-top: 1rem; background: #040677; color: #fff; font-weight: 600; border-radius: 6px;
  padding: 0.5rem 1rem; cursor: pointer; text-decoration: none; border: 0; }
.vivo-boton:hover { background: #127A5B; }
.vivo-franja .vivo-boton { margin: 0 0 0 0.6rem; background: #F58733; color: #040677; padding: 0.3rem 0.75rem; }
html.vivo-tapado, html.vivo-tapado body { overflow: hidden; }
.vivo-franja { position: fixed; right: 1rem; bottom: 1rem; left: auto; z-index: 1001; max-width: calc(100vw - 2rem);
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; padding: 0.65rem 1rem; border-radius: 8px;
  font-size: 0.9rem; color: #fff; background: #040677; box-shadow: 0 8px 24px rgb(0 0 0 / 0.3); }
.vivo-franja.red { background: #5B6170; bottom: 4.5rem; }
.vivo-girando { width: 0.9rem; height: 0.9rem; border-radius: 50%; border: 2px solid rgb(255 255 255 / 0.35);
  border-top-color: #fff; animation: vivo-giro 0.9s linear infinite; }
@keyframes vivo-giro { to { transform: rotate(360deg); } }
.vivo-admin { background: #F58733; color: #040677; font-size: 0.875rem; padding: 0.55rem 1.25rem; text-align: center; }
.vivo-admin a { color: inherit; font-weight: 700; text-decoration: underline; margin-left: 0.5rem; }
@media (prefers-reduced-motion: reduce) { .vivo-girando { animation: none; } }
@media print { .vivo-cortina, .vivo-franja, .vivo-admin { display: none !important; } }

/* ---- Asistente (static/js/asistente.js): Omar saluda y guía en cada página ---- */
.asis { position: fixed; left: 1rem; bottom: 1rem; z-index: 990; font-family: 'DM Sans', 'Segoe UI', sans-serif; }
.asis-boton { position: relative; display: block; width: 4rem; height: 4rem; border-radius: 50%; padding: 0; border: 3px solid #F58733;
  background: #fff; box-shadow: 0 6px 20px rgb(4 6 119 / 0.35); cursor: pointer; transition: transform .15s; }
.asis-boton:hover { transform: scale(1.06); }
.asis-boton img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.asis-punto { position: absolute; right: 0.1rem; bottom: 0.15rem; width: 0.8rem; height: 0.8rem; border-radius: 50%;
  background: #2E9E5B; border: 2px solid #fff; }
.asis-mano { position: absolute; right: -0.55rem; top: -0.45rem; font-size: 1.3rem; opacity: 0; transform-origin: 70% 80%; }
.asis-boton.saluda .asis-mano { opacity: 1; animation: asis-saludo 1.6s ease-in-out 3; }
@keyframes asis-saludo { 0%, 100% { transform: rotate(0); } 15%, 45% { transform: rotate(18deg); } 30%, 60% { transform: rotate(-12deg); } }
.asis-burbuja { position: absolute; left: 4.6rem; bottom: 0.9rem; width: max-content; max-width: min(19rem, calc(100vw - 6.5rem));
  background: #040677; color: #fff; font-size: 0.86rem; line-height: 1.4; padding: 0.6rem 0.85rem; border-radius: 0.8rem 0.8rem 0.8rem 0.2rem;
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.25); cursor: pointer; animation: asis-entra .25s ease-out; }
.asis-burbuja strong { color: #F58733; }
.asis-panel { position: absolute; left: 0; bottom: 5rem; width: min(23rem, calc(100vw - 2rem)); max-height: min(34rem, calc(100vh - 7rem));
  display: flex; flex-direction: column; background: #fff; color: #040677; border-radius: 0.9rem; overflow: hidden;
  box-shadow: 0 14px 40px rgb(4 6 119 / 0.35); animation: asis-entra .2s ease-out; }
.asis-panel[hidden], .asis-burbuja[hidden] { display: none; }
@keyframes asis-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.asis-cab { display: flex; align-items: center; gap: 0.65rem; background: #040677; color: #fff; padding: 0.7rem 0.9rem; }
.asis-cab div { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.asis-cab span { font-size: 0.75rem; color: rgb(255 255 255 / 0.65); }
.asis-mini { width: 2.4rem; height: 2.4rem; border-radius: 50%; object-fit: cover; border: 2px solid #F58733; }
.asis-x { background: none; border: 0; color: rgb(255 255 255 / 0.7); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 0.2rem; }
.asis-x:hover { color: #fff; }
.asis-cuerpo { padding: 0.9rem 1rem; overflow-y: auto; font-size: 0.88rem; line-height: 1.5; display: flex; flex-direction: column; gap: 0.6rem; }
.asis-hola strong { color: #D0222A; }
.asis-suave { color: #5B6170; font-size: 0.8rem; }
.asis-pasos { padding-left: 1.2rem; list-style: decimal; display: flex; flex-direction: column; gap: 0.45rem; }
.asis-consejos { padding-left: 1.1rem; list-style: disc; display: flex; flex-direction: column; gap: 0.45rem; }
.asis-ver { font-size: 0.75rem; font-weight: 600; color: #127A5B; text-decoration: underline; background: none; border: 0; cursor: pointer; padding: 0; }
.asis-cifras { display: flex; flex-direction: column; border-top: 1px solid #F4F5FE; }
.asis-cifras li { display: flex; justify-content: space-between; gap: 0.8rem; padding: 0.35rem 0; border-bottom: 1px solid #F4F5FE; }
.asis-cifras span { color: #5B6170; }
.asis-cifras strong { font-variant-numeric: tabular-nums; text-align: right; }
.asis-ojo { background: rgb(208 34 42 / 0.08); color: #8E3220; border-radius: 0.5rem; padding: 0.5rem 0.65rem; font-size: 0.82rem; }
.asis-pie { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.7rem 0.9rem; border-top: 1px solid #F4F5FE; background: #F7F9FA; }
.asis-pie button { font-size: 0.78rem; font-weight: 600; padding: 0.35rem 0.65rem; border-radius: 999px; border: 1px solid rgb(4 6 119 / 0.15);
  background: #fff; color: #040677; cursor: pointer; }
.asis-pie button:hover { border-color: #F58733; background: #FFF8DC; }
.asis-foco { outline: 3px solid #F58733 !important; outline-offset: 4px; border-radius: 0.5rem; animation: asis-pulso 1s ease-in-out 3; }
@keyframes asis-pulso { 50% { outline-color: rgb(245 135 51 / 0.3); } }
@media (prefers-reduced-motion: reduce) { .asis-boton.saluda .asis-mano, .asis-foco, .asis-panel, .asis-burbuja { animation: none; } }
@media print { .asis { display: none !important; } }

/* ---------------- Cabecera interna de cada módulo (misma temática en todos) ----------------
   Todos los módulos arman su cabecera igual: subpestañas (nav.inline-flex.rounded), una línea pequeña
   ("Transportes Gayco S.A.S. — …"), el título h1, una descripción y botones. Aquí se les da el mismo estilo. */
/* Misma sangría que la barra superior y el Inicio */
body .max-w-\[1400px\] { max-width: 1440px; }
@media (min-width: 1024px) { body .lg\:px-8 { padding-left: 3rem; padding-right: 3rem; } }

/* ---------------- Todo tipo de pantallas (4-nov-2026) ---------------- */
/* Pantallas grandes: el contenido se abre más en vez de quedar en una columna angosta en el centro */
@media (min-width: 2000px) {
  body .max-w-\[1400px\], .barra-fila, .inicio-hoja, .inicio-portada-cont { max-width: 1760px; }
}
/* Portátiles con pantalla baja (hasta 820 px de alto): cabeceras más compactas, así se ve más tabla y menos cabecera */
@media (min-width: 1024px) and (max-height: 820px) {
  .barra-fila { padding-top: 0.55rem; padding-bottom: 0.5rem; }
  .menu-fila { padding-top: 0.1rem; }
  .menu-modulo { padding-top: 0.5rem; padding-bottom: 0.6rem; }
  header.bg-tinta > .max-w-\[1400px\] { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
  header.bg-tinta h1 { font-size: 1.6rem !important; }
  .inicio-portada-cont { padding-top: 2.4rem; padding-bottom: 7rem; }
}
/* Tabletas y pantallas angostas: el nombre del usuario se ve al abrir su menú, en la barra solo las iniciales */
@media (max-width: 1023px) { .barra-usuario .sm\:block { display: none; } }
/* Subpestañas: barra de vidrio redondeada; la activa en el rojo-naranja de la marca */
header.bg-tinta nav.inline-flex.rounded { gap: 0.25rem; padding: 0.3rem; border-radius: 999px; background: rgb(255 255 255 / 0.07);
  border: 1px solid rgb(255 255 255 / 0.12); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06); backdrop-filter: blur(6px); }
header.bg-tinta nav.inline-flex.rounded > a { border-radius: 999px !important; padding: 0.48rem 1.05rem !important; font-weight: 500; color: rgb(255 255 255 / 0.78);
  transition: background .2s, color .2s, box-shadow .2s, transform .2s; }
header.bg-tinta nav.inline-flex.rounded > a:hover { background: rgb(255 255 255 / 0.1); color: #fff; }
header.bg-tinta nav.inline-flex.rounded > a.bg-white, header.bg-tinta nav.inline-flex.rounded > a[aria-current="page"] {
  background: linear-gradient(135deg, var(--esp-a1), var(--esp-a2)) !important; color: var(--esp-txt) !important; font-weight: 700; box-shadow: 0 6px 18px rgb(0 0 0 / 0.25); }
header.bg-tinta > div:has(> nav.inline-flex.rounded) { padding-top: 1.4rem; }
/* Título del módulo: línea superior en naranja con la rayita de la marca, título grande y más aire */
header.bg-tinta > div.flex-wrap:has(h1) { padding-top: 1.5rem; padding-bottom: 1.9rem; }
header.bg-tinta p.text-white\/60:has(+ h1) { display: flex; align-items: center; gap: 0.6rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: #F7A35C; margin-bottom: 0.35rem; }
header.bg-tinta p.text-white\/60:has(+ h1)::before { content: ""; width: 1.6rem; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #ED3139 0 50%, #F58733 50%); }
header.bg-tinta h1 { letter-spacing: -0.02em; font-weight: 800; text-wrap: balance; animation: entra-subir .6s cubic-bezier(.2,.7,.2,1) both; }
header.bg-tinta h1 + p, header.bg-tinta h1 + * + p { color: rgb(255 255 255 / 0.78); line-height: 1.55; max-width: 60rem; }
/* Portátiles (pantallas de poca altura), 5-nov: el encabezado del módulo se comía media pantalla y los datos quedaban
   abajo. Pestañas pegadas al título, sin la línea "Transportes Gayco — Área de mantenimiento" (ya está en la barra)
   y título más chico: los filtros y la tabla suben ~110 px. Va después de las reglas de arriba para ganarles. */
@media (min-width: 1024px) and (max-height: 820px) {
  header.bg-tinta > div:has(> nav.inline-flex.rounded) { padding-top: 0.6rem; }
  header.bg-tinta nav.inline-flex.rounded > a { padding: 0.36rem 0.95rem !important; }
  header.bg-tinta > div.flex-wrap:has(h1) { padding-top: 0.6rem !important; padding-bottom: 0.9rem !important; row-gap: 0.6rem; }
  header.bg-tinta p.text-white\/60:has(+ h1) { display: none; }
  header.bg-tinta h1 { font-size: 1.45rem !important; line-height: 1.2; }
  header.bg-tinta h1 + p, header.bg-tinta h1 + * + p { font-size: 0.85rem; line-height: 1.4; margin-top: 0.15rem; }
}
/* Botones de la cabecera: todos redondeados, como en el resto de la plataforma */
header.bg-tinta > div.flex-wrap:has(h1) > div > a, header.bg-tinta > div.flex-wrap:has(h1) > div > button { border-radius: 999px !important; transition: transform .2s, box-shadow .2s, background .2s; }
header.bg-tinta > div.flex-wrap:has(h1) > div > a:hover, header.bg-tinta > div.flex-wrap:has(h1) > div > button:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgb(0 0 0 / 0.2); }
/* Tarjetas del contenido: más redondeadas, con sombra suave (sin tocar el borde de color de los indicadores) */
body.bg-piso main .bg-white.rounded-lg, body.bg-piso main .bg-white.rounded { border-radius: 16px; box-shadow: 0 1px 2px rgb(4 6 119 / 0.06), 0 8px 24px rgb(4 6 119 / 0.06); }
@media (prefers-reduced-motion: reduce) { header.bg-tinta h1 { animation: none; } }
/* ---------------- Interacción común (static/js/interaccion.js) ---------------- */
/* Lo que está más abajo al abrir la página aparece suavemente al bajar */
html.js-revelar .por-revelar:not(.revelado) { opacity: 0; transform: translateY(16px); }
html.js-revelar .por-revelar { transition: opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1); }
/* Cifras: números de ancho fijo para que no "bailen" mientras cuentan */
.cifra, .dato-num { font-variant-numeric: tabular-nums; }
/* Tablas del contenido: la fila bajo el mouse se resalta (sin tapar los colores propios de cada celda) y los números alinean */
main table tbody tr { transition: box-shadow .15s; }
main table tbody tr:hover > td { box-shadow: inset 0 0 0 9999px rgb(4 6 119 / 0.04); }
main table td, main table th { font-variant-numeric: tabular-nums; }
@media print { html.js-revelar .por-revelar { opacity: 1 !important; transform: none !important; } }

/* Rendimiento (6-nov-2026): a los 20 s de abrir la página (interaccion.js pone html.quieto) los adornos se quedan quietos.
   Siguen andando el trineo, los regalos que ya iban cayendo, las fotos del Inicio y todo lo que indica "cargando". */
html.quieto *:not(.nv-trineo, .nv-regalo-cae, .carga-gayco *, .vivo-girando, .girando svg, .carga-barra span, .inicio-foto, .inicio-lema, .inicio-puntos i),
html.quieto *::before, html.quieto *::after { animation-play-state: paused !important; }
/* 18-nov-2026: lo marcado 'hidden' queda oculto siempre (con el Tailwind local, reglas como .dr-capa { display:grid } lo mostraban). */
[hidden] { display: none !important; }
