:root { --arena: #C4BD97; --arena2: #EEEBDD; --osc: #2b2a22; --azul: #1f6fa8; --ok: #2e7d4f; --mal: #b3261e; --pend: #b26a00; --borde: #d9d4bd; }
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--osc); background: #f7f6f1; font-size: 16px; }
button, input, select, textarea { font: inherit; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--borde); border-radius: 10px; background: #fff; }
label { display: block; font-size: .85rem; color: #555; margin: 8px 0; }
label input, label select { margin-top: 4px; color: var(--osc); }
.btn { border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 600; cursor: pointer; }
.btn.pri { background: var(--osc); color: #fff; }
.btn.sec { background: #fff; color: var(--osc); border: 1px solid var(--borde); }
.btn.grande { padding: 14px 18px; font-size: 1.05rem; width: 100%; }
.btn.chico { padding: 6px 10px; font-size: .85rem; }
.btn:disabled { opacity: .45; }
.barra { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 3px solid var(--arena); }
.barra img { height: 34px; }
.barra > div { flex: 1; display: flex; flex-direction: column; font-size: .9rem; }
.estado { font-size: .78rem; }
.estado.pend { color: var(--pend); } .estado.ok { color: var(--ok); }
.cont { max-width: 760px; margin: 0 auto; padding: 14px 16px 120px; }
.acciones { display: grid; gap: 10px; margin-bottom: 14px; }
.filtros { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 8px; }
@media (min-width: 640px) { .filtros { grid-template-columns: 2fr 1fr 2fr; } .acciones { grid-template-columns: 1fr 1fr; } }
.acciones2 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.chk { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--osc); }
.chk input { width: auto; }
.lista .fila { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.lista .fila input { width: 20px; height: 20px; }
.lista .info { flex: 1; cursor: pointer; }
.sub { color: #666; font-size: .85rem; margin: 2px 0; }
.tag { display: inline-block; font-size: .72rem; padding: 2px 8px; border-radius: 99px; background: var(--arena2); font-weight: 600; margin-right: 3px; }
.tag.ok { background: #d9efd9; color: var(--ok); } .tag.mal { background: #f7d4cf; color: var(--mal); } .tag.pend { background: #ffe8c2; color: var(--pend); } .tag.cor { background: #dbe9f5; color: var(--azul); }
.version { text-align: center; color: #aaa; font-size: .75rem; margin-top: 30px; }
.ingreso { max-width: 380px; margin: 60px auto; padding: 24px; text-align: center; }
.ingreso img { height: 64px; } .ingreso h1 { font-size: 1.3rem; margin: 10px 0 24px; }
.ingreso form { text-align: left; } .ingreso .btn { width: 100%; margin-top: 12px; }
.err { color: var(--mal); }
.aviso { background: #fff6e0; border: 1px solid #f0d48a; padding: 10px; border-radius: 10px; font-size: .9rem; }
.vcard { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 12px; margin-bottom: 8px; cursor: pointer; font-size: 1rem; }
.tarjeta { background: #fff; border: 1px solid var(--borde); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.tarjeta h3 { margin: 0 0 6px; font-size: 1rem; }
.fila-veh { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.ayuda { background: var(--arena2); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.grupo { background: #fff; border: 1px solid var(--borde); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.grupo h3 { margin: 0; padding: 12px 14px; font-size: 1rem; background: var(--arena2); display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.grupo .items { display: none; }
.grupo.abierto .items { display: block; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 8px 12px; border-top: 1px solid #eee; font-size: .93rem; }
.item.malo { background: #fdecea; }
.seg { display: flex; border: 1px solid var(--borde); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 8px 10px; min-width: 42px; font-weight: 600; color: #777; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--borde); }
.seg button.on { background: var(--osc); color: #fff; }
.seg button.on.SI { background: var(--ok); } .seg button.on.NO { background: var(--mal); } .seg button.on.NA { background: #888; }
.def { grid-column: 1 / -1; display: grid; gap: 6px; margin: 4px 0; }
.llantas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.llantas input { font-size: 1.2rem; text-align: center; }
.llantas input.bajo { border-color: var(--mal); background: #fdecea; color: var(--mal); font-weight: 700; }
.fotos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.foto { position: relative; height: 140px; border: 2px dashed var(--borde); border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #faf9f4 center / cover no-repeat; cursor: pointer; margin: 0; }
.foto span { background: rgba(255,255,255,.85); padding: 4px 8px; border-radius: 8px; font-weight: 600; color: var(--osc); }
.foto.con { border-style: solid; }
.foto input { position: absolute; inset: 0; opacity: 0; }
.resumen .sello { font-weight: 800; font-size: 1.1rem; padding: 12px; border-radius: 12px; text-align: center; }
.resumen .sello.ok { background: #d9efd9; color: var(--ok); } .resumen .sello.mal { background: #f7d4cf; color: var(--mal); }
.resumen ol { background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 10px 10px 10px 30px; font-size: .9rem; }
.pie-fijo { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 2fr 1fr; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--borde); z-index: 6; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.caja-modal { background: #fff; width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; border-radius: 16px 16px 0 0; padding: 16px; }
@media (min-width: 640px) { .modal { align-items: center; } .caja-modal { border-radius: 16px; } }
.botones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--osc); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 30; max-width: 90vw; }
/* Vista de impresión */
#impresion { position: fixed; inset: 0; background: #888; overflow: auto; z-index: 40; }
.barra-imp { position: sticky; top: 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; background: #fff; padding: 10px 14px; }
.hojas { padding: 16px 0; }
.hojas .dba { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hojas .hoja { background: #fff; padding: 8mm 10mm !important; width: 215.9mm !important; height: 355.6mm !important; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
@page { size: legal; margin: 8mm 10mm; }
@media print {
  body.imprimiendo > *:not(#impresion) { display: none !important; }
  #impresion { position: static; background: #fff; overflow: visible; }
  .no-imprimir { display: none !important; }
  .hojas { padding: 0; zoom: 1 !important; }
  .hojas .dba { display: block; }
  .hojas .hoja { box-shadow: none; padding: 0 !important; width: 196mm !important; height: 338mm !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
