/* =====================================================================
   taller.css — piezas propias del Taller de Mantención, sobre estilos.css
   (misma identidad: verde #127042, IBM Plex, controles de 48 px).
   ===================================================================== */

.badge.term{ background:#E7F3EC; color:#0D5A35; }
.badge.cerr{ background:#4A4F52; color:#fff; }
.btn-brand.rojo{ background:var(--alerta); border-color:var(--alerta); }
.btn-brand.rojo:hover{ background:#962A21; }
.btn-ghost.rojo{ color:var(--alerta); border-color:#E3A69F; }
.btn-ghost{ display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; }
.btn-brand{ display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none; }
.btn-brand svg, .btn-ghost svg{ width:20px; height:20px; flex:none; }
.toast.err{ border-left-color:var(--alerta); }
body.con-modal{ overflow:hidden; }
.modal.ancho{ max-width:900px; }
.modal-txt{ margin:10px 0 0; font-size:15px; color:var(--texto-2); line-height:1.5; }
.solo-jefe{ display:none !important; }
body.rol-jefe .solo-jefe{ display:revert !important; }
.solo-admin{ display:none !important; }
body.rol-admin .solo-admin{ display:revert !important; }
.oculto{ display:none !important; }
.cifra{ font-family:var(--f-titulo); font-weight:700; font-variant-numeric:tabular-nums; }
.muted{ color:var(--texto-2); }
.fila-flex{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.fila-flex .esp{ flex:1; }

/* ---------- Botón principal grande (Ingresar vehículo, etc.) ---------- */
.accion-principal{
  display:flex; align-items:center; gap:14px; width:100%; text-decoration:none; color:#fff; cursor:pointer;
  background:var(--verde-profundo); border:0; border-radius:var(--r-box); padding:16px 18px; margin-bottom:16px;
  font:inherit; text-align:left;
}
.accion-principal:hover{ background:var(--verde-profundo-2); }
.accion-principal svg{ width:30px; height:30px; flex:none; }
.accion-principal b{ display:block; font-family:var(--f-titulo); font-weight:600; font-size:21px; line-height:1.15; }
.accion-principal span{ display:block; font-size:14px; color:#D7EBDF; margin-top:2px; }
.accion-principal .ir{ width:22px; height:22px; margin-left:auto; color:#CFE6D8; }
.acciones-sec{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:-6px 0 16px; }
.acciones-sec .btn-ghost{ width:100%; }

/* ---------- Botones de acción dentro de la OT ---------- */
.acciones-ot{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:10px; margin:0 0 16px; }
@media(min-width:640px){ .acciones-ot{ grid-template-columns:repeat(4, minmax(0,1fr)); } }
.acc{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-height:84px;
  background:var(--blanco); border:1px solid var(--campo); border-radius:var(--r-box); color:var(--verde-profundo);
  font:inherit; font-size:15.5px; font-weight:600; cursor:pointer; padding:10px 8px; text-align:center; line-height:1.2;
}
.acc svg{ width:30px; height:30px; }
.acc:hover{ border-color:var(--verde-profundo); background:#F6FBF8; }
.acc:active{ background:var(--verde-tenue); }
.acc:disabled{ opacity:.45; cursor:not-allowed; }

/* ---------- Chips (selección de sistema, flota, prioridad) ---------- */
.chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  min-height:44px; padding:9px 14px; border:1px solid var(--campo); border-radius:999px; background:var(--blanco);
  font:inherit; font-size:14.5px; font-weight:500; color:var(--texto-2); cursor:pointer; line-height:1.2;
}
.chip:hover{ border-color:var(--grafito); }
.chip.activo{ background:var(--verde-profundo); border-color:var(--verde-profundo); color:#fff; font-weight:600; }
.chips-cat{ margin:10px 0 12px; flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; scrollbar-width:thin; }
.chips-cat .chip{ flex:none; min-height:38px; padding:7px 12px; font-size:13.5px; }

/* Opciones grandes de dos o más botones (tipo de OT, sí/no) */
.opciones{ display:grid; gap:8px; grid-template-columns:repeat(var(--n,2), minmax(0,1fr)); }
.opcion{
  display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:2px; min-height:56px;
  padding:10px 8px; border:1px solid var(--campo); border-radius:var(--r-ctl); background:var(--blanco);
  font:inherit; font-size:15px; font-weight:600; color:var(--texto-2); cursor:pointer; line-height:1.2;
}
.opcion small{ font-weight:400; font-size:13px; color:var(--apoyo); }
.opcion.activo{ background:var(--verde-profundo); border-color:var(--verde-profundo); color:#fff; }
.opcion.activo small{ color:#D7EBDF; }
.opcion.activo.rojo{ background:var(--alerta); border-color:var(--alerta); }
.horas-rapidas{ display:grid; grid-template-columns:repeat(6, minmax(0,1fr)); gap:6px; margin-bottom:8px; }
.horas-rapidas .opcion{ min-height:48px; font-size:16px; }

/* ---------- Selector de vehículo ---------- */
.veh-lista{ display:grid; gap:8px; max-height:60vh; overflow:auto; padding:2px; }
.veh-fila, .veh-card{
  display:flex; align-items:center; gap:14px; width:100%; text-align:left; background:var(--blanco);
  border:1px solid var(--linea); border-radius:var(--r-box); padding:12px 14px; font:inherit; color:var(--texto); cursor:pointer;
}
.veh-fila:hover{ border-color:var(--verde-profundo); }
.veh-card{ cursor:default; border-left:4px solid var(--verde-profundo); }
.veh-id{
  flex:none; min-width:88px; text-align:center; font-family:var(--f-titulo); font-weight:700; font-size:18px; letter-spacing:.03em;
  border:2px solid var(--texto); border-radius:5px; padding:4px 8px; background:#fff; font-variant-numeric:tabular-nums;
}
.veh-id.grande{ font-size:22px; min-width:110px; }
.veh-txt{ min-width:0; flex:1; display:flex; flex-direction:column; gap:2px; }
.veh-txt b{ font-weight:600; font-size:15.5px; }
.veh-txt span{ font-size:13.5px; color:var(--texto-2); }
.veh-txt .veh-extra{ display:flex; gap:6px; flex-wrap:wrap; margin-top:3px; }
.veh-fila .ir{ width:20px; height:20px; flex:none; color:var(--acero); }

/* ---------- Tarjetas de OT ---------- */
.ot-lista{ display:grid; gap:10px; }
.ot-card{
  display:block; text-decoration:none; color:var(--texto); background:var(--blanco); border:1px solid var(--linea);
  border-left:5px solid var(--celeste); border-radius:var(--r-box); padding:12px 14px;
}
.ot-card:hover{ border-color:var(--verde-profundo); }
.ot-card.en_trabajo{ border-left-color:var(--verde); }
.ot-card.esperando_repuesto{ border-left-color:var(--dorado); }
.ot-card.terminada{ border-left-color:var(--verde-profundo); }
.ot-card.cerrada{ border-left-color:var(--grafito); }
.ot-card.anulada{ border-left-color:var(--alerta); opacity:.75; }
.ot-card.falla{ border-left-color:var(--naranja); }
.ot-card.urgente{ border-left-color:var(--alerta); }
.ot-card.preventiva-card{ border-left-color:var(--verde); }
.ot-card .l1{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ot-card .l1 .veh-id{ min-width:0; font-size:17px; padding:2px 8px; }
.ot-card .l1 b{ font-size:15.5px; }
.ot-card .folio{ margin-left:auto; font-family:var(--f-titulo); font-weight:700; color:var(--verde-profundo); font-size:15px; }
.ot-card .l2{ margin-top:6px; font-size:14.5px; }
.ot-card .l3{ margin-top:6px; display:flex; gap:12px; flex-wrap:wrap; font-size:13.5px; color:var(--texto-2); align-items:center; }
.urg{ color:var(--alerta); font-weight:700; }

/* ---------- Cabecera de la OT ---------- */
.ot-cab{ background:var(--blanco); border:1px solid var(--linea); border-radius:var(--r-box); padding:16px 18px; margin-bottom:16px; }
.ot-cab .l1{ display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.ot-cab .folio-grande{ font-family:var(--f-titulo); font-weight:700; font-size:24px; color:var(--verde-profundo); }
.ot-cab .motivo{ font-size:16px; margin:12px 0 0; line-height:1.45; }
.ot-cab .det{ margin:12px 0 0; }
.estado-barra{ display:flex; gap:8px; flex-wrap:wrap; margin:14px 0 0; padding-top:14px; border-top:1px solid var(--linea); }
.estado-barra .btn-ghost, .estado-barra .btn-brand{ min-height:46px; padding:10px 16px; }
.costos{ display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:0; border:1px solid var(--linea); border-radius:var(--r-box); overflow:hidden; background:var(--blanco); margin-bottom:16px; }
.costos > div{ padding:12px 14px; border-right:1px solid var(--linea); border-bottom:1px solid var(--linea); margin:0 -1px -1px 0; }
.costos .n{ font-family:var(--f-titulo); font-weight:700; font-size:24px; line-height:1.1; font-variant-numeric:tabular-nums; }
.costos .t{ font-size:13px; color:var(--texto-2); margin-top:3px; }
.costos .total .n{ color:var(--verde-profundo); }

/* Listas dentro de la OT */
.lista-ot{ display:grid; gap:0; }
.li{ display:flex; gap:12px; align-items:flex-start; padding:12px 0; border-bottom:1px solid #E6EAE8; }
.li:last-child{ border-bottom:0; }
.li .cuerpo{ flex:1; min-width:0; }
.li .cuerpo b{ font-weight:600; }
.li .meta{ font-size:13.5px; color:var(--texto-2); margin-top:3px; display:flex; flex-wrap:wrap; gap:4px 12px; }
.li .lado{ flex:none; text-align:right; font-variant-numeric:tabular-nums; }
.li .lado .cifra{ font-size:18px; display:block; }
.li .acciones-li{ display:flex; gap:6px; margin-top:8px; flex-wrap:wrap; }
.li .acciones-li button{ min-height:36px; }
.li-ico{ width:36px; height:36px; flex:none; border-radius:var(--r-ctl); background:var(--verde-tenue); color:var(--verde-profundo); display:flex; align-items:center; justify-content:center; }
.li-ico svg{ width:20px; height:20px; }
.li-ico.ext{ background:#E8F6FC; color:#0F5273; }
.por-val{ background:#FFF1C2; color:#6F5200; font-weight:600; font-size:12.5px; padding:3px 10px; border-radius:999px; white-space:nowrap; cursor:pointer; border:0; font-family:inherit; }

/* Bitácora */
.bitacora{ list-style:none; margin:0; padding:0 0 0 14px; border-left:2px solid var(--linea); }
.bitacora li{ position:relative; padding:0 0 12px 12px; font-size:14px; }
.bitacora li::before{ content:''; position:absolute; left:-20px; top:5px; width:10px; height:10px; border-radius:50%; background:var(--verde); border:2px solid #fff; }
.bitacora li span{ display:block; font-size:12.5px; color:var(--apoyo); }

/* ---------- Fotos ---------- */
.fotos-botones{ display:grid; grid-template-columns:2fr 1fr; gap:8px; }
.btn-foto{
  display:flex; align-items:center; justify-content:center; gap:10px; min-height:56px; margin:0; cursor:pointer;
  border:1px dashed var(--verde-profundo); border-radius:var(--r-ctl); background:#F6FBF8; color:var(--verde-profundo);
  font-size:15.5px; font-weight:600;
}
.btn-foto.sec{ border-style:solid; border-color:var(--campo); background:var(--blanco); color:var(--texto-2); }
.btn-foto svg{ width:26px; height:26px; }
.foto-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(92px, 1fr)); gap:8px; margin-top:10px; }
.foto-grid:empty{ display:none; }
.foto-mini{ position:relative; aspect-ratio:1; border-radius:var(--r-ctl); overflow:hidden; background:var(--niebla); border:1px solid var(--linea); }
.foto-mini img{ width:100%; height:100%; object-fit:cover; display:block; cursor:pointer; }
.foto-mini .quitar{ position:absolute; top:4px; right:4px; width:30px; height:30px; border-radius:50%; border:0; background:rgba(0,0,0,.6); color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.foto-mini .quitar svg{ width:16px; height:16px; }
.foto-mini .etq{ position:absolute; left:0; right:0; bottom:0; background:rgba(0,0,0,.55); color:#fff; font-size:11.5px; padding:3px 6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.foto-grande{ text-align:center; background:#111; border-radius:var(--r-ctl); margin-top:4px; }
.foto-grande img{ max-width:100%; max-height:72vh; display:block; margin:0 auto; }

/* ---------- Pasos del ingreso (3) ---------- */
.tab-nav.tres{ grid-template-columns:repeat(3,1fr); }

/* ---------- Panel ---------- */
.periodo{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:16px; }
.periodo .chip{ min-height:40px; }
.barra-h{ display:flex; align-items:center; gap:8px; }
.barra-h .barra{ flex:1; }
.barra.multi{ display:flex; }
.barra.multi > i{ display:block; height:100%; }
.barra.multi > i.r{ background:var(--verde-profundo); }
.barra.multi > i.e{ background:#47B5DE; }
.barra.multi > i.c{ background:#E0A526; }
.leyenda{ display:flex; gap:16px; flex-wrap:wrap; font-size:13px; color:var(--texto-2); margin:4px 0 12px; }
.leyenda i{ display:inline-block; width:12px; height:12px; border-radius:2px; vertical-align:-1px; margin-right:6px; }
.meses{ display:grid; grid-template-columns:repeat(12, minmax(0,1fr)); gap:6px; align-items:end; height:170px; padding:8px 0 0; }
.mes{ display:flex; flex-direction:column; justify-content:flex-end; align-items:stretch; height:100%; gap:4px; text-align:center; }
.mes .col{ display:flex; flex-direction:column-reverse; border-radius:3px 3px 0 0; overflow:hidden; min-height:2px; background:#E4E8E6; }
.mes .col i{ display:block; }
.mes .col i.r{ background:var(--verde-profundo); }
.mes .col i.e{ background:#47B5DE; }
.mes .col i.c{ background:#E0A526; }
.mes small{ font-size:11.5px; color:var(--texto-2); white-space:nowrap; }
.mes .v{ font-size:11px; color:var(--texto-2); font-variant-numeric:tabular-nums; white-space:nowrap; overflow:hidden; }
@media(max-width:640px){ .meses{ gap:3px; } .mes .v{ display:none; } .mes small{ font-size:10.5px; } }

/* ---------- Menú: cifra en la tarjeta ---------- */
.tile .badge{ font-size:13px; }

/* ---------- Formularios en ventana ---------- */
.modal label:first-of-type{ margin-top:12px; }
.modal .pane-nav{ margin-top:20px; }
.campo-precio{ display:grid; grid-template-columns:1fr; gap:8px; }
.iva-opc{ --n:2; }
@media(max-width:640px){ .horas-rapidas{ grid-template-columns:repeat(3, minmax(0,1fr)); } .acciones-sec{ grid-template-columns:1fr; } }

/* Ajustes para teléfono */
.veh-card{ flex-wrap:wrap; }
.veh-card .veh-txt{ min-width:150px; }
.veh-card .cambiar{ margin-left:auto; }
@media(max-width:640px){
  .veh-id.grande{ font-size:19px; min-width:0; }
  .costos{ grid-template-columns:1fr 1fr; }
  .costos .n{ font-size:21px; }
  .estado-barra > *{ flex:1 1 auto; }
}

/* ---------- Indicador de registros por enviar ---------- */
.cola-chip{ display:inline-flex; align-items:center; gap:6px; min-height:36px; padding:6px 12px; margin-right:10px; border-radius:999px;
  border:1px solid #9FD3EA; background:#E8F6FC; color:#0F5273; font:inherit; font-size:13.5px; font-weight:600; cursor:pointer; white-space:nowrap; }
.cola-chip[hidden]{ display:none; }
.cola-chip svg{ width:18px; height:18px; }
.cola-chip.con-error{ background:#FDECEA; border-color:#E3A69F; color:var(--alerta); }
.pend{ opacity:.8; }
.badge.pend-b{ background:#E8F6FC; color:#0F5273; }
@media(max-width:640px){ .cola-chip span{ display:none; } .cola-chip{ padding:6px 9px; margin-right:6px; } }
.cola-chip b{ font-weight:700; }

/* ---------- Botón flotante «Anotar» (teléfono) ---------- */
.fab{ display:none; }
@media(max-width:760px){
  .fab{ display:flex; align-items:center; gap:8px; position:fixed; right:16px; bottom:18px; z-index:40; min-height:58px; padding:0 22px 0 18px;
    border:0; border-radius:999px; background:var(--verde-profundo); color:#fff; font:inherit; font-size:17px; font-weight:600;
    box-shadow:0 6px 18px rgba(0,0,0,.25); cursor:pointer; }
  .fab svg{ width:26px; height:26px; }
  body:has(.fab) main{ padding-bottom:96px; }
}
.chips-rapidos .chip{ min-height:40px; font-size:14px; }
.sin-foto{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; text-align:center; font-size:12px; color:var(--texto-2); }

@media(max-width:760px){ body:has(.fab) .toast{ bottom:92px; } }

/* Panel: cifras grandes que no se monten */
.kpis-panel{ grid-template-columns:repeat(auto-fit,minmax(175px,1fr)); }
.kpis-panel .kpi .n{ font-size:clamp(20px, 1.8vw, 26px); white-space:nowrap; }
#rangoFechas[hidden]{ display:none !important; }

/* Descargas PDF · Excel · CSV (v1.2) */
.kpis-pie{ display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin:8px 0 18px; }
.kpis-pie .kpis-nota{ flex:1 1 320px; margin:0; }
.exportar{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.exportar .exp-t{ font-size:13.5px; color:var(--texto-2); margin-right:2px; }
.exportar .btn-sm{ min-height:38px; padding:6px 14px; font-weight:600; }
.exportar .btn-sm[disabled]{ opacity:.6; }
.barra-exp{ display:flex; justify-content:flex-end; margin:0 0 12px; }
@media print{ .exportar,.barra-exp{ display:none !important; } }

/* Documento de compra (v1.3): tres opciones en una fila */
.doc-opc, #vTipoDoc{ --n:3; }
.doc-opc .opcion small, #vTipoDoc .opcion small{ font-size:11.5px; }

/* Inicio agrupado (v1.4): tarjeta por grupo con sus accesos siempre a la vista */
.grupo{ background:var(--blanco); border:1px solid var(--linea); border-radius:var(--r-box); padding:16px 18px; }
.grupo .g-cab{ display:flex; align-items:center; gap:14px; margin-bottom:12px; }
.grupo .g-cab .ico{ width:44px; height:44px; flex:none; display:flex; align-items:center; justify-content:center; background:var(--verde-profundo); color:#fff; border-radius:var(--r-ctl); }
.grupo .g-cab .ico svg{ width:24px; height:24px; }
.grupo .g-cab h3{ font-family:var(--f-titulo); font-weight:600; font-size:20px; line-height:1.2; margin:0; }
.grupo .g-cab p{ margin:2px 0 0; font-size:14px; color:var(--texto-2); }
.atajos{ display:grid; gap:8px; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr)); }
.atajo{ display:flex; align-items:center; gap:10px; min-height:54px; padding:8px 12px; text-decoration:none; color:var(--texto);
  border:1px solid var(--linea); border-radius:var(--r-ctl); background:var(--blanco); transition:border-color .15s, background .15s; }
.atajo:hover{ border-color:var(--verde-profundo); }
.atajo:active{ background:var(--niebla); }
.atajo .at-ico{ width:30px; height:30px; flex:none; display:flex; align-items:center; justify-content:center; color:var(--verde-profundo); background:var(--verde-tenue); border-radius:6px; }
.atajo .at-ico svg{ width:18px; height:18px; }
.atajo .at-tx{ flex:1; font-weight:600; font-size:15.5px; line-height:1.25; }
.atajo .badge{ flex:none; font-size:12.5px; }
.atajo .ir{ width:18px; height:18px; flex:none; color:var(--acero); }
@media (max-width:520px){ .atajos{ grid-template-columns:1fr; } .grupo{ padding:14px; } }
