/* Llantas la Sabana — estilos (sin dependencias externas) */
:root {
  --rojo: #d4141c;
  --rojo-osc: #a50f15;
  --negro: #17191c;
  --gris-9: #2b2f35;
  --gris-6: #5f6671;
  --gris-3: #d5d9df;
  --gris-1: #f3f4f6;
  --blanco: #fff;
  --ok: #157347;
  --ok-bg: #e6f4ec;
  --mal: #b42318;
  --mal-bg: #fdecea;
  --aviso-bg: #fff6e0;
  --aviso: #8a5a00;
  --radio: 10px;
  --sombra: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.05);
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--negro); background: var(--gris-1); line-height: 1.45;
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--rojo-osc); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h3 { font-size: 1rem; margin: 0 0 .6rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gris-6); }
.muted, .nota { color: var(--gris-6); }
.nota { font-size: .9rem; }
.oculto { display: none !important; }

/* Encabezado */
.top { background: var(--negro); color: var(--blanco); position: sticky; top: 0; z-index: 10; }
.top-in { max-width: 1200px; margin: 0 auto; padding: .5rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.marca { display: flex; align-items: center; gap: .5rem; color: var(--blanco); text-decoration: none; font-weight: 700; }
.marca img { background: var(--blanco); border-radius: 50%; }
.buscador { flex: 1 1 220px; max-width: 380px; }
.buscador input { width: 100%; border: 0; border-radius: 999px; padding: .5rem 1rem; }
.nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; margin-left: auto; }
.nav a, .nav .link { color: #e8eaed; text-decoration: none; padding: .45rem .7rem; border-radius: 8px; font-size: .95rem; }
.nav a:hover, .nav .link:hover { background: var(--gris-9); }
.nav a.act { background: var(--rojo); color: var(--blanco); }
.nav .sep { width: 1px; height: 1.4rem; background: var(--gris-9); margin: 0 .3rem; }
.menu-btn { display: none; background: none; border: 0; color: var(--blanco); font-size: 1.5rem; margin-left: auto; cursor: pointer; }
.inline { display: inline; margin: 0; }
.link { background: none; border: 0; cursor: pointer; font: inherit; }

/* Contenido */
.contenido { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 1.25rem 1rem 2rem; }
.panel, .ficha { background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra); padding: 1.25rem; }
.angosto { max-width: 640px; margin: 0 auto; }
.caja { background: var(--gris-1); border-radius: var(--radio); padding: 1rem; }
.pie { text-align: center; color: var(--gris-6); font-size: .85rem; padding: 1rem; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: .55rem 1rem;
  border: 1px solid var(--gris-3); background: var(--blanco); color: var(--negro); border-radius: 8px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--gris-6); }
.btn-pri { background: var(--rojo); border-color: var(--rojo); color: var(--blanco); }
.btn-pri:hover { background: var(--rojo-osc); border-color: var(--rojo-osc); }
.btn-peligro { color: var(--mal); border-color: #f0b3ad; }
.btn-peligro:hover { background: var(--mal); color: var(--blanco); }
.btn-sm { padding: .3rem .65rem; font-size: .85rem; }
.btn-bloque { width: 100%; }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }

/* Formularios */
.form label, .fila-form label { display: flex; flex-direction: column; gap: .25rem; font-size: .88rem; font-weight: 600; color: var(--gris-9); margin-bottom: .8rem; }
input, select, textarea { font: inherit; padding: .55rem .7rem; border: 1px solid var(--gris-3); border-radius: 8px; background: var(--blanco); color: var(--negro); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rojo); outline-offset: 1px; border-color: transparent; }
.js-mayus { text-transform: uppercase; }
input[type=email] { text-transform: none; }
.campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1rem; }
.campos .ancho { grid-column: 1 / -1; }
.grupo { border: 1px solid var(--gris-3); border-radius: var(--radio); padding: 1rem 1rem .2rem; margin: 0 0 1rem; }
.grupo legend { font-weight: 700; padding: 0 .4rem; }
.grupo-alerta { border-color: #f3c27a; background: var(--aviso-bg); }
.fila-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: 1rem; }
.fila-form label { margin: 0; }
.mini-form { display: flex; gap: .3rem; flex-wrap: wrap; min-width: 150px; }
.mini-form input { width: 100%; padding: .3rem .5rem; }
.mini-form .btn { width: 100%; }
small { font-weight: 400; }

/* Alertas */
.alerta { border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; }
.alerta ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.alerta-ok { background: var(--ok-bg); color: var(--ok); border-color: #b7dfc7; }
.alerta-error { background: var(--mal-bg); color: var(--mal); border-color: #f5c2bd; }
.alerta-aviso { background: var(--aviso-bg); color: var(--aviso); border-color: #f3dca0; }

/* Inicio */
.hero { background: var(--negro); color: var(--blanco); border-radius: var(--radio); padding: 1.5rem; margin-bottom: 1.25rem; }
.hero h1 { margin-bottom: .8rem; }
.buscador-grande { display: flex; gap: .5rem; margin-bottom: 1rem; }
.buscador-grande input { flex: 1; font-size: 1.1rem; padding: .7rem 1rem; }
.hero .buscador-grande { margin: 0; }
.h-sec { font-size: 1.05rem; margin: 1.25rem 0 .6rem; }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; }
.tarjeta { background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra); padding: 1rem; text-decoration: none; color: var(--negro); display: flex; flex-direction: column; border-left: 4px solid var(--gris-3); }
.tarjeta:hover { box-shadow: 0 2px 12px rgba(0,0,0,.12); }
.tarjeta .num { font-size: 2rem; font-weight: 800; }
.tarjeta .lbl { font-weight: 600; }
.tarjeta .sub { font-size: .82rem; color: var(--gris-6); }
.tarjeta-alerta { border-left-color: var(--rojo); }
.tarjeta-alerta .num { color: var(--rojo); }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.links { margin: 0; padding-left: 1.1rem; }
.links li { margin: .35rem 0; }

/* Tablas */
.tabla-wrap { overflow-x: auto; border: 1px solid var(--gris-3); border-radius: var(--radio); }
.tabla { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tabla th { text-align: left; background: var(--gris-1); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gris-6); }
.tabla th, .tabla td { padding: .55rem .7rem; border-bottom: 1px solid var(--gris-3); vertical-align: top; }
.tabla tbody tr:last-child td { border-bottom: 0; }
.tabla tbody tr:hover { background: #fafafa; }
.tabla .det { max-width: 280px; font-size: .85rem; }
.fila-ok td { background: var(--ok-bg); }
.fila-inactiva td { color: var(--gris-6); }
.placa { display: inline-block; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; background: #ffd400; color: #111; border: 1px solid #111; border-radius: 4px; padding: 0 .35rem; text-decoration: none; margin: 1px; }
.vacio { text-align: center; padding: 2rem 1rem; }
.cab-flex { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }

/* Ficha del vehículo */
.ficha-cab { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.placa-grande { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 2rem; font-weight: 800; background: #ffd400; border: 2px solid #111; border-radius: 6px; padding: .1rem .7rem; margin-right: .6rem; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: .2rem .65rem; background: var(--gris-1); color: var(--gris-6); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.mal { background: var(--mal-bg); color: var(--mal); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dl { display: grid; grid-template-columns: 120px 1fr; gap: .3rem .8rem; margin: 0 0 .8rem; font-size: .93rem; }
.dl dt { color: var(--gris-6); }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--gris-3); margin: 1rem 0; overflow-x: auto; }
.tabs a { padding: .6rem 1rem; text-decoration: none; color: var(--gris-6); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.act { color: var(--negro); border-bottom-color: var(--rojo); }
.lista { display: flex; flex-direction: column; gap: .7rem; }
.item { border: 1px solid var(--gris-3); border-radius: var(--radio); padding: .8rem 1rem; }
.item-cab { display: flex; gap: .8rem; flex-wrap: wrap; align-items: baseline; }
.item-txt { margin: .4rem 0; white-space: pre-line; }
.item-pie { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .88rem; }

/* Login */
body.simple { background: var(--negro); justify-content: center; align-items: center; padding: 1rem; }
.caja-login { background: var(--blanco); border-radius: 14px; padding: 2rem 1.75rem; width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.logo-login { display: block; margin: 0 auto .5rem; width: 150px; height: auto; }
.t-login { text-align: center; font-size: 1.15rem; color: var(--gris-6); font-weight: 600; }
.pie-login { text-align: center; color: var(--gris-6); font-size: .8rem; margin: 1.2rem 0 0; }

/* Móvil */
@media (max-width: 760px) {
  .menu-btn { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .nav.abierto { display: flex; }
  .nav .sep { display: none; }
  .buscador { order: 3; max-width: none; flex-basis: 100%; }
  .grid2 { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 100px 1fr; }
  .placa-grande { font-size: 1.5rem; }
  .buscador-grande { flex-direction: column; }
  .contenido { padding: 1rem .75rem 2rem; }
  .panel, .ficha { padding: 1rem; }
}

/* Impresión */
@media print {
  .top, .pie, .acciones, .no-print, .tabs, .fila-form { display: none !important; }
  body { background: #fff; }
  .panel, .ficha { box-shadow: none; padding: 0; }
  .tabla-wrap { border: 0; overflow: visible; }
}

/* Administración */
.clave-temporal .clave { display: inline-block; font-size: 1.3rem; font-weight: 800; letter-spacing: .08em; background: var(--blanco); border: 1px dashed var(--aviso); border-radius: 6px; padding: .2rem .6rem; margin: .3rem 0 .2rem .4rem; user-select: all; }
.clave-temporal p { margin: .3rem 0 0; font-size: .88rem; }
.acciones-fila { display: flex; flex-wrap: wrap; gap: .3rem; align-items: flex-start; }
.tabla .centro { text-align: center; }
.tabla .der, .tabla th.der { text-align: right; }
.nowrap { white-space: nowrap; }
.nowrap .inline { margin-left: .3rem; }
.tabla-permisos td:first-child { min-width: 260px; }
.fila-grupo td { background: var(--gris-1); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--gris-6); }
.marca-permiso.si { color: var(--ok); font-weight: 800; }
.marca-permiso.no { color: var(--gris-3); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .2rem 1rem; padding-bottom: .6rem; }
.form label.opcion, label.opcion { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; margin: .25rem 0; }
.opcion input { width: auto; }
.opciones-clave { margin-bottom: .6rem; }
.fila-alerta td { background: #fff4f2; }
.lbl-campo { display: block; font-size: .88rem; font-weight: 600; color: var(--gris-9); margin-bottom: .3rem; }
.checks-servicio { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); background: var(--gris-1); border-radius: 8px; padding: .5rem .8rem; margin-bottom: .8rem; }
.alerta-check { background: var(--aviso-bg); border: 1px solid #f3dca0; border-radius: 8px; padding: .5rem .8rem; color: var(--aviso); }
.aviso-dup { margin-bottom: 1rem; }

/* Sugerencias de búsqueda */
.con-sugerencias { position: relative; }
.sugerencias { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; list-style: none; margin: 0; padding: .3rem; background: var(--blanco); color: var(--negro); border: 1px solid var(--gris-3); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-height: 360px; overflow-y: auto; }
.sugerencias a { display: flex; gap: .4rem; align-items: center; padding: .45rem .6rem; border-radius: 6px; color: var(--negro); text-decoration: none; font-size: .92rem; }
.sugerencias a:hover, .sugerencias a.activo { background: var(--gris-1); }
.sugerencias .vacia { padding: .5rem .6rem; color: var(--gris-6); font-size: .88rem; }
.buscador-grande.con-sugerencias .sugerencias { right: 110px; }

/* Cliente */
.sin-margen { margin: 0; }
.lista-veh { list-style: none; margin: 0; padding: 0; }
.lista-veh li { padding: .35rem 0; border-bottom: 1px solid var(--gris-3); display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .92rem; }

/* Orden de servicio imprimible */
body.impresion { background: #fff; display: block; }
.barra-imp { display: flex; gap: .5rem; padding: 1rem; justify-content: center; }
.orden { max-width: 780px; margin: 0 auto 2rem; padding: 1.5rem; border: 1px solid var(--gris-3); border-radius: 8px; font-size: .95rem; }
.orden h1 { font-size: 1.3rem; margin: 0; }
.orden h3 { margin: 1rem 0 .3rem; }
.orden-cab { display: flex; gap: 1rem; align-items: center; border-bottom: 2px solid var(--negro); padding-bottom: .8rem; }
.orden-cab p { margin: .2rem 0 0; color: var(--gris-6); font-size: .85rem; }
.orden-num { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.orden-num strong { font-size: 1.3rem; color: var(--rojo); }
.orden-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.orden-items { columns: 2; margin: .3rem 0; padding-left: 0; list-style: none; }
.orden-det { white-space: pre-line; border: 1px solid var(--gris-3); border-radius: 6px; padding: .6rem; }
.orden-firmas { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 3rem; }
.orden-firmas div { border-top: 1px solid var(--negro); padding-top: .3rem; font-size: .85rem; }
.orden-firmas span { color: var(--gris-6); }
@media print { .orden { border: 0; padding: 0; } }

/* Tablero y gráficas */
.kpis { margin-bottom: 1.25rem; }
.graf-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 1rem; }
.graf-caja { margin: 0; border: 1px solid var(--gris-3); border-radius: var(--radio); padding: .9rem 1rem .6rem; background: var(--blanco); }
.graf-caja figcaption { display: flex; flex-direction: column; margin-bottom: .4rem; }
.graf-caja figcaption span { color: var(--gris-6); font-size: .82rem; }
.graf { width: 100%; height: auto; display: block; font-family: inherit; }
.graf-grid { stroke: #ebecef; stroke-width: 1; }
.graf-base { stroke: #c9ccd2; stroke-width: 1; }
.graf-eje { fill: var(--gris-6); font-size: 11px; }
.graf-cat { fill: var(--gris-9); font-size: 12px; }
.graf-valor { fill: var(--negro); font-size: 12px; font-weight: 700; }
.graf path:hover { opacity: .8; }
.graf-leyenda { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--gris-9); margin-top: .3rem; }
.graf-leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .35rem; vertical-align: -1px; }
.serie-0 { background: #2a78d6; } .serie-1 { background: #eb6834; } .serie-2 { background: #1baf7a; }
.datos-tabla { margin-top: 1rem; }
.datos-tabla summary { cursor: pointer; font-weight: 600; margin-bottom: .6rem; }
.datos-tabla .tabla-wrap { margin-bottom: .8rem; }
@media (max-width: 760px) { .graf-grid2 { grid-template-columns: 1fr; } }
.kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.subtabs { display: flex; gap: .4rem; margin: 0 0 .8rem; }
.subtabs a { padding: .35rem .8rem; border-radius: 999px; background: var(--gris-1); color: var(--gris-9); text-decoration: none; font-size: .88rem; font-weight: 600; }
.subtabs a.act { background: var(--negro); color: var(--blanco); }
.eliminar-usuario { display: inline-block; }
.eliminar-usuario summary { list-style: none; }
.eliminar-usuario summary::-webkit-details-marker { display: none; }
.eliminar-usuario[open] .mini-form { margin-top: .4rem; max-width: 240px; }
.angosto-izq { max-width: 640px; }
.volver { display: inline-block; margin-bottom: .6rem; font-weight: 600; text-decoration: none; color: var(--gris-9); }
.volver:hover { color: var(--rojo); }
.marca img, .logo-login, .orden-cab img, .logo-actual img { object-fit: contain; }
.logo-actual { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.logo-actual img { width: 160px; height: 160px; border: 1px solid var(--gris-3); border-radius: 8px; background: #fff; padding: .5rem; }
.hero-msg { margin: -.3rem 0 1rem; color: #d5d9df; font-size: 1.05rem; }
.angosto-izq > div + div { margin-top: 2rem; }
.form input[type=file] { padding: .4rem; }
.ocultos { margin-top: .8rem; border: 1px dashed var(--gris-3); border-radius: 8px; padding: .6rem .8rem; }
.ocultos summary { cursor: pointer; font-weight: 600; color: var(--gris-6); }
.ocultos[open] summary { margin-bottom: .6rem; }
.precio { color: var(--gris-6); font-weight: 600; font-size: .85em; white-space: nowrap; }
.total-servicio { margin: .4rem 0 0; font-size: .95rem; }
.orden-tabla { width: 100%; border-collapse: collapse; margin: .3rem 0 .6rem; }
.orden-tabla th, .orden-tabla td { padding: .3rem .5rem; border-bottom: 1px solid var(--gris-3); text-align: left; }
.orden-tabla .der { text-align: right; }
.orden-tabla tfoot th { border-bottom: 0; border-top: 2px solid var(--gris-9); }
.valor-form input { width: 9rem; }
.valor-corto { width: 8rem; }
/* SOAT / tecnomecánica: vigente = verde fino y fijo; sin vigente = alerta roja (titila si está activado en Ajustes) */
@keyframes alerta-titila {
  0%, 100% { background: var(--mal); color: #fff; box-shadow: 0 0 0 3px rgba(180, 35, 24, .35); }
  50%      { background: #fff; color: var(--mal); box-shadow: 0 0 0 2px var(--mal); }
}
.chip.vigencia-ok { font-size: .85rem; padding: .3rem .8rem; font-weight: 600; background: #f3fbf5; color: #1f7a3d; border: 1px solid #9fd4ae; }
.chip.vigencia-mal { font-size: .85rem; padding: .3rem .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em;
  background: var(--mal-bg); color: var(--mal); box-shadow: 0 0 0 2px var(--mal); }
.chip.vigencia-mal.titila { animation: alerta-titila 1s steps(1, end) infinite; }
@media print { .chip.vigencia-mal.titila { animation: none !important; } }
.chips-form { margin: -.3rem 0 1rem; }
.opcional { font-weight: 400; color: var(--gris-6); font-size: .9em; }
.alerta form.inline { margin-left: .4rem; }

/* Hoja de vida del vehículo (tamaño carta) */
@page { size: letter; margin: 12mm 12mm 14mm; @bottom-right { content: "Página " counter(page) " de " counter(pages); font-size: 8pt; color: #666; } }
.periodos { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; justify-content: center; padding: 0 1rem 1rem; }
.hoja { max-width: 816px; margin: 0 auto 2rem; padding: 1.5rem; border: 1px solid var(--gris-3); border-radius: 8px; font-size: .9rem; background: #fff; }
.hoja h1 { font-size: 1.25rem; margin: 0; }
.hoja h3 { margin: 1rem 0 .35rem; font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; }
.hoja h3 small { text-transform: none; font-weight: 400; color: var(--gris-6); letter-spacing: 0; }
.hoja .placa { font-family: monospace; background: #ffd400; border: 2px solid #222; border-radius: 4px; padding: 0 .4rem; color: #111; }
.hoja-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.hoja-dl { width: 100%; border-collapse: collapse; }
.hoja-dl th { text-align: left; font-weight: 600; color: var(--gris-6); width: 38%; padding: .15rem .3rem .15rem 0; vertical-align: top; }
.hoja-dl td { padding: .15rem 0; }
.hoja-estado { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1rem; }
.hoja-estado div { border: 1px solid var(--gris-3); border-radius: 6px; padding: .45rem .6rem; display: flex; flex-direction: column; }
.hoja-estado span { font-size: .75rem; color: var(--gris-6); text-transform: uppercase; }
.hoja-estado .ok { border-color: var(--ok); }
.hoja-estado .mal { border: 2px solid var(--mal); color: var(--mal); }
.hoja-tabla { width: 100%; border-collapse: collapse; font-size: .82rem; }
.hoja-tabla th, .hoja-tabla td { border-bottom: 1px solid var(--gris-3); padding: .28rem .35rem; text-align: left; vertical-align: top; }
.hoja-tabla thead th { background: #f2f3f5; font-size: .72rem; text-transform: uppercase; }
.hoja-tabla .der { text-align: right; }
.hoja-tabla tfoot th { border-top: 2px solid var(--gris-9); border-bottom: 0; }
.hoja-pie { margin-top: 1.2rem; border-top: 1px solid var(--gris-3); padding-top: .4rem; font-size: .75rem; color: var(--gris-6); }
@media print {
  .hoja { border: 0; padding: 0; max-width: none; font-size: 9.5pt; }
  .hoja-tabla { font-size: 8.5pt; }
  .hoja-tabla thead { display: table-header-group; }
  .hoja-tabla tr, .hoja-estado, .hoja-grid > div { break-inside: avoid; }
  .hoja h3 { break-after: avoid; }
  .hoja-tabla thead th { background: #f2f3f5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hoja .placa { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.hoja-tabla { table-layout: fixed; }
.hoja-tabla .c-fecha { width: 11%; } .hoja-tabla .c-km { width: 13%; } .hoja-tabla .c-os { width: 15%; } .hoja-tabla .c-valor { width: 12%; }
.hoja-tabla td { overflow-wrap: anywhere; }
.km-texto { font-size: .9em; color: var(--gris-6); }
/* Ajustes por secciones */
.tarjetas-ajuste { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.tarjetas-ajuste .grupo { margin: 0; }
.tarjetas-ajuste input[type=number] { max-width: 8rem; }
.listas-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; align-items: start; }
.listas-2 > div + div { margin-top: 0; }
.filtro-lista { width: 100%; max-width: 360px; margin: 0 0 .6rem; padding: .45rem .7rem; border: 1px solid var(--gris-3); border-radius: 8px; font: inherit; }
/* Encabezado con más opciones de menú */
.top-in { max-width: 1440px; }
.nav a, .nav .link { padding: .45rem .6rem; font-size: .92rem; white-space: nowrap; }
@media (max-width: 1350px) and (min-width: 761px) { .marca span { display: none; } .buscador { max-width: 300px; } }
/* Tablas ordenables */
.js-ordenable th { cursor: pointer; user-select: none; white-space: nowrap; }
.js-ordenable th::after { content: ' ↕'; color: var(--gris-3); }
.js-ordenable th.ord-asc::after { content: ' ▲'; color: var(--rojo); }
.js-ordenable th.ord-desc::after { content: ' ▼'; color: var(--rojo); }
.h-sec small { font-size: .78rem; font-weight: 400; text-transform: none; letter-spacing: 0; }
.orden-cab p.nit-emp { margin: 0; color: var(--gris-9); font-weight: 600; }
input:disabled { background: var(--gris-1); cursor: not-allowed; opacity: .7; }
.obligatorio { font-weight: 700; color: var(--mal); font-size: .9em; }
.obligatorio { font-weight: 700; color: var(--mal); font-size: .9em; }
.km-ultimo { display: inline-block; margin-top: .3rem; padding: .2rem .6rem; border-radius: 6px; background: var(--ok-bg); color: var(--ok); font-weight: 600; border: 1px solid var(--ok); }
.ayuda-cron { margin: 1rem 0; border: 1px solid var(--gris-3); border-radius: 8px; padding: .6rem .9rem; }
.ayuda-cron summary { cursor: pointer; font-weight: 600; }
.ayuda-cron code { font-size: .82rem; word-break: break-all; }
details.restaurar { display: inline-block; text-align: left; }
details.restaurar[open] .mini-form { position: absolute; right: 1rem; z-index: 5; width: 320px; background: #fff; border: 1px solid var(--gris-3); border-radius: 8px; padding: .8rem; box-shadow: 0 6px 24px rgba(0,0,0,.12); white-space: normal; }
.otros-servicio { margin-top: .7rem; display: flex; flex-direction: column; gap: .4rem; }
.fila-otro { display: grid; grid-template-columns: 1fr 9rem auto; gap: .5rem; max-width: 680px; align-items: center; }
.otro-msg { color: var(--ok); min-height: 1em; }
.otro-msg.mal { color: var(--mal); }
.opcion-nueva { background: #f3fbf5; border: 1px dashed #9fd4ae; border-radius: 6px; padding: .25rem .5rem; grid-column: span 2; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.opcion-nueva .quitar { margin-left: auto; flex: 0 0 auto; }
.opcion-nueva .nuevo { color: #1f7a3d; font-weight: 700; font-size: .72rem; text-transform: uppercase; }
.quitar { border: 0; background: var(--mal-bg); color: var(--mal); border-radius: 50%; width: 1.4rem; height: 1.4rem; line-height: 1.4rem; padding: 0; cursor: pointer; font-weight: 700; margin-left: .2rem; }
.quitar:hover { background: var(--mal); color: #fff; }
@media (max-width: 760px) { .fila-otro { grid-template-columns: 1fr 7rem; } .fila-otro .btn { grid-column: 1 / -1; } }
/* Casillas de servicio con valor alineado a la derecha y editable por orden */
.checks-servicio { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .25rem 1.2rem; }
.item-serv { display: grid; grid-template-columns: 1fr 6.5rem; align-items: center; gap: .5rem; border-bottom: 1px dotted var(--gris-3); padding: .15rem 0; }
.item-serv .opcion { margin: 0; }
.valor-item { width: 100%; text-align: right; padding: .25rem .45rem; border: 1px solid var(--gris-3); border-radius: 6px; font: inherit; font-size: .88rem; font-variant-numeric: tabular-nums; background: #fff; }
.valor-item:disabled { background: transparent; border-color: transparent; color: var(--gris-6); }
