
/* v1.4 · Gestión editable de unidades, choferes y estados */
.fleet-actions{display:flex;gap:9px;flex-wrap:wrap}.fleet-toolbar{display:grid;grid-template-columns:minmax(240px,1fr) 230px;gap:10px;margin:14px 0 18px}.fleet-card{position:relative;display:flex;flex-direction:column;min-height:255px}.fleet-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.fleet-card-actions{margin-top:auto;padding-top:13px;display:flex;gap:8px}.fleet-card-actions button{flex:1}.unit-status{margin-top:6px}.unit-status.operativo{background:#e4f6eb;color:#16834b}.unit-status.de-viaje{background:#e7f0ff;color:#245f9e}.unit-status.no-operativo{background:#edf1f5;color:#596878}.unit-status.fuera-servicio{background:#ffe8e8;color:#a72d2d}.fleet-card.is-unavailable{background:#fafbfc}.fleet-card.is-trip{border-color:#9bbce1}.fleet-card.is-service{border-color:#e6a1a1}.fleet-edit-note{font-size:10px;color:#245f9e;font-weight:850;margin-top:7px}.fleet-modal{position:fixed;inset:0;z-index:22000;display:grid;place-items:center;background:rgba(3,19,37,.68);padding:20px}.fleet-modal[hidden]{display:none!important}.fleet-dialog{width:min(900px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:20px;box-shadow:0 30px 90px rgba(0,0,0,.36);border:1px solid rgba(255,255,255,.5)}.fleet-dialog.wide{width:min(1180px,100%)}.fleet-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;padding:20px 22px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:2}.fleet-dialog-head h3{margin:0 0 4px;color:var(--navy)}.fleet-dialog-head p{margin:0;color:var(--muted);font-size:12px}.modal-close{border:0;background:#edf1f5;color:#344256;border-radius:9px;width:36px;height:36px;font-size:20px;font-weight:900}.fleet-dialog-body{padding:22px}.fleet-form-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-top:17px}.fleet-save-status{font-size:12px;font-weight:850;min-height:18px}.drivers-layout{display:grid;grid-template-columns:390px minmax(0,1fr);gap:18px}.driver-editor{background:#f8fbff;border:1px solid var(--line);border-radius:14px;padding:16px;height:max-content;position:sticky;top:82px}.driver-editor h4{margin:0 0 12px;color:var(--navy)}.driver-list-toolbar{display:flex;gap:9px;margin-bottom:12px}.driver-list-toolbar input{flex:1}.driver-list{display:grid;gap:9px;max-height:650px;overflow:auto;padding-right:3px}.driver-row{border:1px solid var(--line);border-radius:12px;padding:12px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center}.driver-row h5{margin:0 0 4px;color:var(--navy);font-size:14px}.driver-row p{margin:0;color:var(--muted);font-size:11px;line-height:1.45}.driver-row.inactive{opacity:.58;background:#f6f7f8}.driver-assignment{display:inline-flex;margin-top:6px;background:#e8f1ff;color:#164b84;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:850}.form-note{padding:10px 12px;background:#fff9d5;border:1px solid #f1d85d;border-radius:10px;color:#675500;font-size:11px;line-height:1.45;margin-top:12px}.danger-note{background:#fff0f0;border-color:#f0caca;color:#9c2c2c}.pill.red{background:#ffe8e8;color:#a72d2d}.pill.blue{background:#e7f0ff;color:#245f9e}.pill.gray{background:#edf1f5;color:#596878}
@media(max-width:900px){.drivers-layout{grid-template-columns:1fr}.driver-editor{position:static}.fleet-toolbar{grid-template-columns:1fr}.fleet-dialog-body{padding:15px}}
/* v1.5 · Ciclo de vida automático de despachos y disponibilidad */
.history-card-main{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.history-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:10px;font-weight:950}.history-status.programado{background:#fff2cc;color:#735d00}.history-status.en-proceso{background:#e7f0ff;color:#245f9e}.history-status.finalizado{background:#e4f6eb;color:#16834b}.history-status.cancelado{background:#ffe8e8;color:#a72d2d}.history-actions{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.history-card.is-cancelled{opacity:.68;background:#fafafa}.history-card.is-active{border-color:#9bbce1;box-shadow:0 7px 18px rgba(36,95,158,.08)}.status-changing{opacity:.55;pointer-events:none}
@media(max-width:760px){.history-card{align-items:flex-start;gap:14px}.history-metrics{flex-wrap:wrap;justify-content:flex-end}.history-actions{width:100%;justify-content:flex-end}}
