:root{font-family:Inter,ui-sans-serif,system-ui,sans-serif;color:#10233b;background:#f1f5fa}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;padding:10px 14px;border:1px solid #ced8e3;border-radius:10px;background:#fff;color:#203652;font-weight:600}button:hover{background:#eaf2fc}button.primary{background:#1265d8;color:#fff;border-color:#1265d8}button.primary:hover{background:#064caa}input,select{border:1px solid #bac9d9;border-radius:8px;background:white;padding:10px;min-width:0;color:#0d294b}label{font-size:.83rem;font-weight:600;display:flex;flex-direction:column;gap:6px;min-width:140px;flex:1}label.check{flex-direction:row;align-items:center;flex:unset}label.check input{width:auto}h1{font-size:1.45rem;margin:0 0 15px}h2{font-size:1.08rem;margin:0 0 14px}.hint{color:#688094;font-size:.78rem}.subhead{color:#768da4}.logo{font-size:1.35rem;font-weight:900;color:#1974df;display:flex;gap:8px;align-items:center}.logo span{color:#132c4a}.logo small{color:#8299aa;font-size:.64rem;padding-left:6px;letter-spacing:1px}.login-wrap{min-height:100vh;display:grid;place-content:center;padding:18px}.login-panel{display:flex;flex-direction:column;gap:15px;width:min(420px,90vw);background:white;padding:35px;border-radius:22px;box-shadow:0 16px 46px #24436420}.login-panel label{font-size:.9rem}.login-panel h1{margin:2px 0}header{height:auto;min-height:75px;background:#fff;border-bottom:1px solid #dbe3ec;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 22px}.head-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.head-actions span{color:#667b92;font-size:.85rem}.head-actions select{min-width:160px}.layout{display:flex;min-height:calc(100vh - 75px)}nav{width:218px;background:#132a47;padding:18px 12px;flex-shrink:0;display:flex;flex-direction:column;gap:7px}nav button{border:0;background:transparent;text-align:left;color:#c9d7e7}nav button.active,nav button:hover{color:white;background:#25476d}.side-note{color:#8ca3bb;padding:10px;font-size:.78rem;margin-top:auto}main{flex:1;min-width:0;padding:24px;max-width:1600px}.heading{display:flex;justify-content:space-between;align-items:center;gap:14px}.heading span{font-size:.8rem;color:#69819a}.tab{display:block}.tab[hidden],[hidden]{display:none!important}.card{background:white;border:1px solid #e0e8f1;border-radius:14px;padding:20px;margin:15px 0;box-shadow:0 4px 12px #16365708}.line{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:10px 0 15px}.line button{margin-bottom:1px}.monitor-grid{display:grid;grid-template-columns:minmax(230px,320px) 1fr;gap:15px;margin:12px 0}.fleet-list,.map-panel{background:white;border-radius:14px;padding:12px;border:1px solid #e1e9f2}.fleet-list input{width:100%;margin-bottom:10px}.fleet-rows{max-height:510px;overflow:auto}.fleet-item{padding:12px;border-radius:10px;margin-bottom:8px;border:1px solid #e3ebf4;cursor:pointer}.fleet-item.selected,.fleet-item:hover{background:#eaf4ff;border-color:#8ec0f6}.fleet-item small{display:block;color:#69829c;margin-top:5px}.fleet-item strong{font-size:.94rem}#map{height:440px;border-radius:10px;background:#e7eef4}.map-panel .hint{margin:8px 3px 0}.table{width:100%;border-collapse:collapse;min-width:650px}.table th,.table td{border-bottom:1px solid #e8eef5;text-align:left;padding:9px;font-size:.85rem}.table th{background:#f5f8fb;color:#63798f}.scroll{overflow:auto;max-height:400px}.status{font-weight:700;font-size:.77rem}.status.reporting{color:#07844d}.status.delayed{color:#ca8110}.status.no_recent_data{color:#a53b3b}.empty{color:#798da2;padding:15px}.chip{border-radius:20px;background:#ecf4fd;padding:4px 8px;font-size:.73rem;font-weight:600}#toast{position:fixed;top:16px;right:16px;max-width:450px;background:#182c44;color:white;padding:12px 16px;border-radius:10px;z-index:10000;display:none;box-shadow:0 8px 20px #0003}#toast.show{display:block}@media(max-width:900px){.monitor-grid{grid-template-columns:1fr}.layout{display:block}nav{width:auto;flex-direction:row;flex-wrap:wrap}.side-note{display:none}header{flex-wrap:wrap}main{padding:12px}#map{height:330px}} 

/* V0.8 - fleet and vehicle glyphs */
.fleet-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;margin:8px 0 14px}.fleet-toolbar label{display:flex;align-items:center;gap:8px}.fleet-toolbar select{width:auto}.vehicle-marker{border:0;background:transparent}.vehicle-pin{height:34px;width:34px;background:#fff;box-shadow:0 3px 11px #1233;border:3px solid #2563eb;border-radius:50%;display:grid;place-items:center;font-size:19px;line-height:1}.vehicle-pin.focused{height:39px;width:39px;box-shadow:0 0 0 4px #2563eb40}.subcard{margin-top:15px;background:#f5f8fc}.subcard .line{align-items:center}

/* CarTracker V0.8 H3 — pantalla de monitoreo profesional, proporción 32/68 */
body.h3-fleet-mode{background:#f3f6f9}
body.h3-fleet-mode header{min-height:54px;height:54px;padding:7px 16px;gap:10px}
body.h3-fleet-mode .head-actions{gap:8px;flex-wrap:nowrap}
body.h3-fleet-mode .head-actions button,body.h3-fleet-mode .head-actions select{padding:7px 10px;border-radius:6px;font-size:.8rem}
body.h3-fleet-mode .logo{font-size:1.22rem}
body.h3-fleet-mode .layout{display:block;min-height:calc(100vh - 54px)}
body.h3-fleet-mode nav{width:100%;height:44px;padding:5px 12px;display:flex;flex-direction:row;gap:4px;flex-wrap:nowrap;align-items:center;background:#354558;overflow-x:auto;white-space:nowrap}
body.h3-fleet-mode nav button{flex:0 0 auto;text-align:center;padding:7px 12px;font-size:.82rem;border-radius:4px;color:#edf5fb}
body.h3-fleet-mode nav button.active{background:#176db6;color:white}
body.h3-fleet-mode nav .side-note{display:none}
body.h3-fleet-mode main{max-width:none;min-width:0;margin:0;padding:0}
body.h3-fleet-mode #tab-fleet>.heading{height:48px;margin:0;padding:8px 14px;background:#fff;border-bottom:1px solid #dce5ef}
body.h3-fleet-mode #tab-fleet>.heading h1{font-size:1.05rem;font-weight:750;margin:0}
body.h3-fleet-mode #tab-fleet>.heading span{font-size:.75rem}
body.h3-fleet-mode .fleet-toolbar{height:40px;margin:0;padding:5px 14px;border-bottom:1px solid #dce5ef;background:#f8fafc;gap:10px}
body.h3-fleet-mode .fleet-toolbar label{flex:unset;font-size:.78rem;font-weight:600;flex-direction:row;gap:6px}
body.h3-fleet-mode .fleet-toolbar select{font-size:.76rem;padding:4px 24px 4px 8px;width:150px}
.h3-monitor-label{font-size:.75rem;font-weight:700;letter-spacing:.03em;color:#16835a}
body.h3-fleet-mode #fleetSummary{font-size:.77rem}
body.h3-fleet-mode .monitor-grid{display:grid;grid-template-columns:minmax(350px,32%) minmax(0,68%);gap:0;margin:0;min-height:calc(100vh - 54px - 44px - 48px - 40px - 32px);align-items:stretch}
body.h3-fleet-mode .fleet-list,body.h3-fleet-mode .map-panel{margin:0;padding:0;min-width:0;min-height:0;border:0;border-radius:0;box-shadow:none}
body.h3-fleet-mode .fleet-list{border-right:2px solid #d2dbe5;background:#fff;display:flex;flex-direction:column}
.h3-panel-head{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:41px;padding:7px 12px;background:#eef3f7;border-bottom:1px solid #dbe4ee}
.h3-panel-head strong{color:#2b4058;font-size:.84rem}
.h3-head-buttons{display:flex;gap:5px}
.h3-head-buttons button{border:1px solid #c9d9e8;border-radius:5px;padding:2px 8px;font-size:1rem;background:#fff}
body.h3-fleet-mode .fleet-list>input{margin:10px 12px 7px;width:calc(100% - 24px);font-size:.85rem;padding:8px 10px;border-radius:6px}
.h3-column-head{display:flex;justify-content:space-between;gap:4px;align-items:center;padding:7px 12px;background:#f7f9fc;border-top:1px solid #edf1f5;border-bottom:1px solid #dde4ed;color:#627d94;font-weight:700;font-size:.65rem;letter-spacing:.01em}
body.h3-fleet-mode .fleet-rows{flex:1;min-height:200px;max-height:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.h3-unit{display:grid;grid-template-columns:20px 30px minmax(0,1fr) auto;align-items:center;column-gap:6px;border-bottom:1px solid #e4eaf1;background:#fff;padding:8px 8px 8px 10px;min-height:62px;position:relative}
.h3-unit:hover{background:#f3f8ff}
.h3-unit.selected{background:#e7f2ff;border-left:3px solid #1674d5;padding-left:7px}
.h3-visible{display:block;min-width:0;flex:none;margin:0}
.h3-visible input{margin:0;width:15px;height:15px;accent-color:#2477d2;cursor:pointer}
.h3-vehicle{display:grid;place-items:center;font-size:1.15rem;width:30px;height:30px;background:#f1f5fa;border-radius:6px;border-bottom:2px solid var(--unit-color,#277cce)}
button.h3-unit-title{min-width:0;display:flex;flex-direction:column;text-align:left;padding:2px 0;background:transparent;border:0;border-radius:0;gap:3px;font-size:.83rem;color:#223750;font-weight:500}
button.h3-unit-title b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%;font-weight:750}
button.h3-unit-title small{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#8397aa;font-size:.67rem;max-width:100%}
.h3-unit-tools{display:flex;align-items:center;justify-content:flex-end;gap:3px;flex:0 0 auto}
button.h3-icon-btn{border:0;background:transparent;color:#4179ad;padding:2px 4px;border-radius:4px;font-size:1.13rem;line-height:1.6;min-width:25px;min-height:26px}
button.h3-icon-btn:hover,button.h3-icon-btn.active{background:#d4e8fb}
button.h3-icon-btn:disabled{color:#b9c6d4;cursor:not-allowed}
.h3-signal{width:21px;text-align:center;font-size:1rem;flex:0 0 auto;font-weight:750;line-height:26px;color:#8ca1b1}
.h3-signal.moving{color:#16a15e}.h3-signal.stopped{color:#e19b25}.h3-signal.unknown,.h3-signal.off{color:#bdc6d0}.h3-signal.on{color:#2f9b55}
.h3-unit-menu{grid-column:1 / -1;display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:9px 4px 3px;border-top:1px solid #dce6f1;margin-top:8px}
.h3-unit-menu button{white-space:normal;text-align:left;padding:8px 8px;font-size:.72rem;font-weight:600;border:1px solid #d7e2ed;border-radius:5px;color:#3a5778}
.h3-unit-menu button:hover{background:#e8f3ff}
.h3-list-foot{padding:8px 10px;background:#f7f9fb;border-top:1px solid #dde5ed;display:flex;justify-content:space-between;gap:6px;font-size:.65rem;color:#627e96;flex-wrap:wrap}
body.h3-fleet-mode .map-panel{position:relative;background:#e8edf2;display:flex;flex-direction:column}
body.h3-fleet-mode #map{flex:1;min-height:480px;height:calc(100vh - 54px - 44px - 48px - 40px - 52px);border-radius:0;background:#dde6ef}
.h3-map-actions{position:absolute;top:95px;left:12px;z-index:500;display:flex;flex-direction:column;gap:6px}
.h3-map-actions button{width:35px;height:35px;padding:0;border-radius:6px;background:#fff;color:#31597f;border:1px solid #c6d2de;font-size:1.3rem;box-shadow:0 1px 4px #0002}
body.h3-fleet-mode .map-panel>.hint{display:block;background:#fff;padding:6px 10px;margin:0;font-size:.68rem;min-height:30px}
body.h3-fleet-mode .h3-history-card{margin:0;border-radius:0;border-left:0;border-right:0;box-shadow:none;padding:12px 16px}
.h3-history-card h2{font-size:.96rem}.h3-caption{color:#71879a;font-size:.71rem;font-weight:500;margin-left:12px}
.h3-history-card .line{gap:8px;align-items:flex-end;flex-wrap:wrap}
.h3-history-card label{min-width:160px;max-width:260px;flex:1;font-size:.72rem}
.h3-history-card input{padding:8px;font-size:.8rem}
.h3-history-card button{padding:8px 10px;font-size:.8rem}
button.h3-accent{background:#dceefe;border-color:#9bc9ed;color:#0b66b8}
.h3-track-note{font-size:.74rem;margin:5px 0;color:#60778e}
.h3-statusbar{min-height:32px;display:flex;align-items:center;justify-content:space-between;gap:10px;background:#34485c;color:#f4f7fb;padding:6px 14px;font-size:.72rem;flex-wrap:wrap}
.h3-marker-shell{background:transparent;border:0}
.h3-marker{height:35px;width:35px;display:grid;place-items:center;border-radius:50%;border:3px solid var(--unit-color,#2475cc);background:white;box-shadow:0 2px 6px #18304866;font-size:1.12rem}
.h3-marker.offline{filter:grayscale(.7);opacity:.75}
.h3-marker.focused{box-shadow:0 0 0 4px #1d74d44c,0 2px 6px #182c4480}
.h3-profile-dialog{width:min(580px,95vw);max-height:85vh;overflow:auto;border:1px solid #c9d8e6;border-radius:12px;padding:21px;box-shadow:0 20px 50px #172a474d;color:#243b54}
.h3-profile-dialog::backdrop{background:#09213e88}
.h3-dialog-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.h3-dialog-title h2{margin:0}
.h3-dialog-title button{padding:5px 10px}
.h3-specs{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;margin:19px 0}
.h3-specs div{border-bottom:1px solid #e2eaf1;padding:8px 2px}
.h3-specs dt{font-size:.72rem;color:#7b92a7}.h3-specs dd{margin:5px 0;font-size:.88rem;overflow-wrap:anywhere;font-weight:600}
.h3-dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
@media(min-width:1600px){body.h3-fleet-mode .monitor-grid{grid-template-columns:minmax(440px,32%) minmax(0,68%)}}
@media(max-width:1100px){body.h3-fleet-mode .monitor-grid{grid-template-columns:minmax(320px,38%) minmax(0,62%)}.h3-signal{width:17px;font-size:.9rem}.h3-unit-tools{gap:0}body.h3-fleet-mode .head-actions span{display:none}}
@media(max-width:800px){body.h3-fleet-mode .monitor-grid{display:flex;flex-direction:column}body.h3-fleet-mode .fleet-list{min-height:300px;max-height:350px}body.h3-fleet-mode .fleet-rows{min-height:200px}body.h3-fleet-mode #map{min-height:380px;height:55vh}body.h3-fleet-mode nav{height:auto;max-height:86px;flex-wrap:wrap}body.h3-fleet-mode header{height:auto;min-height:54px;flex-wrap:wrap}body.h3-fleet-mode .h3-caption{display:block;margin:5px 0}body.h3-fleet-mode .h3-statusbar{justify-content:flex-start}}
@media(max-width:450px){.h3-unit{grid-template-columns:18px 26px minmax(0,1fr) auto;gap:3px;padding:7px 4px}.h3-signal{width:15px}.h3-unit-tools button{min-width:20px;padding:2px}.h3-profile-dialog{padding:12px}.h3-specs{grid-template-columns:1fr}}


/* CarTracker V0.8 H4 — controles por unidad y panel de recorridos bajo demanda */
body.h3-fleet-mode nav button.h4-history-nav.active{background:#1973b9;color:#fff;box-shadow:inset 0 -2px 0 #a8d7ff}
body.h3-fleet-mode .h3-history-card[hidden]{display:none!important}
body.h3-fleet-mode .h3-history-card h2{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
body.h3-fleet-mode .h3-history-card #h4HistoryClose{margin-left:auto;font-size:.74rem;padding:5px 9px;border-radius:5px}
body.h3-fleet-mode .h4-history-nav{border:1px solid #617487;white-space:nowrap}
/* El mapa llena la ventana hasta que se abre el panel de eventos. */
@media(min-width:801px){
 body.h3-fleet-mode .monitor-grid{height:calc(100dvh - 54px - 44px - 48px - 40px - 32px);min-height:390px}
 body.h3-fleet-mode #map{height:100%;min-height:330px}
 body.h3-fleet-mode.h4-history-open .monitor-grid{height:calc(100dvh - 54px - 44px - 48px - 40px - 32px - 260px);min-height:330px}
 body.h3-fleet-mode.h4-history-open #map{min-height:280px}
 body.h3-fleet-mode.h4-history-open .h3-history-card{max-height:260px;overflow:auto}
}
/* Distribución horizontal consistente para los controles de cada vehículo. */
.h3-unit{grid-template-columns:19px 32px minmax(95px,1fr) auto;column-gap:5px}
button.h3-vehicle.h4-detail-trigger{padding:0;cursor:pointer;color:#233b52;font-weight:600;border:1px solid #d6e5f2;border-bottom:2px solid var(--unit-color,#277cce);background:#f1f5fa;border-radius:5px;min-width:32px;min-height:32px}
button.h3-vehicle.h4-detail-trigger:hover,button.h3-vehicle.h4-detail-trigger[aria-expanded="true"]{background:#cfe7fb;box-shadow:0 0 0 2px #93c7ee}
.h3-unit-tools{gap:2px}
.h3-signal.h4-motion{width:38px;height:30px;display:grid;place-items:center;line-height:1}
.h3-signal.h4-motion svg{height:28px;width:38px;display:block}
.h3-signal.h4-motion.moving{color:#19bc50}.h3-signal.h4-motion.stopped{color:#e3363e}.h3-signal.h4-motion.unknown{color:#909ba5}
.h3-signal.h4-connect{width:27px;height:29px;display:grid;place-items:center;line-height:1}
.h3-signal.h4-connect svg{width:26px;height:27px;display:block}
.h3-signal.h4-connect.on{color:#11bd37}.h3-signal.h4-connect.off{color:#979ca0}
.h4-unit-expanded{grid-column:1 / -1;background:#fff;border-left:3px solid #3584d4;border-top:1px solid #e0e7ee;margin:7px -1px 2px 24px;padding:10px 10px 8px;min-width:0;color:#273d57;font-size:.76rem}
.h4-last-rx{color:#6b7890;font-size:.75rem;margin-bottom:6px}
.h4-address{background:#edf1f6;border-radius:5px;padding:8px;margin-bottom:8px;overflow-wrap:anywhere}
.h4-kpis{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.h4-kpis span{display:flex;flex-direction:column;gap:4px;background:#f1f5f9;border-radius:5px;padding:7px;color:#708296;font-size:.67rem}
.h4-kpis strong{font-size:.86rem;color:#274361}
.h4-details-heading{font-size:.73rem;font-weight:750;color:#24394f;margin-top:10px;margin-bottom:5px}
.h4-specs{display:grid;gap:3px;margin:0}
.h4-specs div{display:flex;justify-content:space-between;gap:8px;background:#f3f5f8;padding:6px 7px;border-radius:4px}
.h4-specs dt{font-size:.69rem;color:#64788e;flex:0 0 46%}
.h4-specs dd{margin:0;font-size:.69rem;font-weight:600;text-align:right;overflow-wrap:anywhere;min-width:0}
.h4-detail-foot{display:flex;justify-content:flex-end;margin-top:7px}
.h4-detail-foot button{padding:6px 9px;font-size:.68rem;border-radius:5px;color:#2863a0}
.h4-metric-hint{font-size:.66rem;color:#798a9e;line-height:1.35;margin:6px 0 0}
.h4-loading{color:#59748c}
@media(max-width:1250px){.h3-signal.h4-motion{width:30px}.h3-signal.h4-motion svg{width:30px}.h3-signal.h4-connect{width:24px}.h3-signal.h4-connect svg{width:23px}}
@media(max-width:800px){body.h3-fleet-mode.h4-history-open .h3-history-card{max-height:55vh;overflow:auto}.h3-unit{grid-template-columns:18px 30px minmax(70px,1fr) auto}.h3-signal.h4-motion{width:28px}.h3-signal.h4-motion svg{width:28px}.h3-signal.h4-connect{width:21px}.h3-signal.h4-connect svg{width:21px}.h4-unit-expanded{margin-left:8px}}

/* CarTracker V0.8 H5 — filas compactas, controles centrados y divisor arrastrable */
body.h3-fleet-mode .monitor-grid#h5MonitorGrid{
 --h5-units-width:32%;display:grid;
 grid-template-columns: minmax(300px,var(--h5-units-width)) 8px minmax(0,1fr);
 gap:0;min-width:0;
}
.h5-pane-divider{position:relative;z-index:520;background:#dce7f0;border-left:1px solid #b6c9d9;border-right:1px solid #b6c9d9;cursor:col-resize;touch-action:none;user-select:none;display:flex;align-items:center;justify-content:center;color:#476580;transition:background .1s}
.h5-pane-divider:hover,.h5-pane-divider:focus-visible,.h5-pane-divider.dragging{background:#91c3e7;color:#183e63;outline:2px solid #2777b9;outline-offset:-2px}
.h5-grip{font-size:18px;font-weight:900;line-height:30px;background:#eff6fd;border-radius:5px;width:13px;text-align:center;box-shadow:0 1px 3px #0002}
body.h3-fleet-mode .h3-unit.h5-unit{grid-template-columns:17px 27px minmax(0,1fr) auto;gap:3px;min-height:40px;padding:3px 5px;border-bottom:1px solid #e2e8ee}
body.h3-fleet-mode .h3-unit.h5-unit.selected{border-left:3px solid #1674d5;padding-left:2px}
body.h3-fleet-mode button.h3-vehicle.h4-detail-trigger{width:25px;min-width:25px;height:26px;min-height:26px;border-radius:4px;font-size:16px}
body.h3-fleet-mode button.h3-unit-title{font-size:.75rem;line-height:1.2;gap:1px;min-height:34px;justify-content:center}
body.h3-fleet-mode button.h3-unit-title b{font-size:.77rem;max-width:100%}
body.h3-fleet-mode button.h3-unit-title small{font-size:.63rem;max-width:100%}
.h3-unit-tools.h5-unit-tools{display:grid;grid-template-columns:30px 39px 29px 29px 30px;gap:1px;align-items:center;justify-items:center;width:161px}
.h3-unit-tools.h5-unit-tools>*{width:100%!important;height:32px!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;line-height:1!important;display:grid!important;place-items:center;overflow:hidden}
.h5-ui-icon{display:block;width:27px;height:27px;object-fit:contain;pointer-events:none;user-select:none}
.h5-motion .h5-ui-icon{width:37px;height:31px}
.h5-gps .h5-ui-icon{width:27px;height:27px}
.h5-center .h5-ui-icon{width:25px;height:25px}
.h5-options .h5-ui-icon{width:24px;height:24px}
.h5-motion.unknown .h5-ui-icon{filter:grayscale(1);opacity:.55}
.h5-gprs svg{display:block;width:25px!important;height:27px!important}
.h3-signal.h5-gprs.on{color:#15bd45}.h3-signal.h5-gprs.off{color:#8e979d}
.h5-column-head{display:flex!important;align-items:center;justify-content:space-between;gap:4px;padding:3px 5px!important;min-height:25px!important;font-size:.59rem!important;color:#627d96;white-space:nowrap}
.h5-column-head .h5-unit-column{flex:1;min-width:0}
.h5-tools-head{display:grid;grid-template-columns:30px 39px 29px 29px 30px;gap:1px;align-items:center;justify-items:center;text-align:center;width:161px;flex:none}
.h5-tools-head span{font-size:.59rem!important;overflow:visible;text-align:center;justify-self:center}
body.h3-fleet-mode .h4-unit-expanded{margin:5px 0 2px 14px;padding:8px;font-size:.72rem}
body.h3-fleet-mode .h3-unit-menu{padding:6px 3px 3px;margin-top:4px;gap:4px}
body.h3-fleet-mode .h3-unit-menu button{padding:6px 7px;font-size:.69rem}
@media(max-width:1250px){body.h3-fleet-mode .monitor-grid#h5MonitorGrid{grid-template-columns:minmax(300px,var(--h5-units-width)) 8px minmax(0,1fr)}.h3-unit-tools.h5-unit-tools,.h5-tools-head{grid-template-columns:26px 34px 25px 25px 26px;width:140px}.h5-motion .h5-ui-icon{width:32px;height:30px}.h5-column-head{font-size:.55rem!important}}
@media(max-width:800px){body.h3-fleet-mode .monitor-grid#h5MonitorGrid{display:flex;flex-direction:column}.h5-pane-divider{display:none}.h3-unit-tools.h5-unit-tools,.h5-tools-head{grid-template-columns:27px 36px 26px 26px 27px;width:146px}}
@media(max-width:420px){.h3-unit-tools.h5-unit-tools,.h5-tools-head{grid-template-columns:24px 30px 23px 23px 24px;width:128px}.h5-motion .h5-ui-icon{width:29px;height:27px}.h5-column-head .h5-tools-head span{font-size:.52rem!important}}

/* CarTracker V0.8 H6 — solo interfaz. */
.h6-restore-btn{color:#9b2f2f!important;font-weight:750;min-width:44px!important}
.h6-restore-btn:hover{background:#ffe1e1!important}
.h6-remove-button{color:#c71d2f!important;border:1px solid #f1b0b6!important;background:#fff0f1!important;font-weight:750!important}
.h6-marker-shell,.h6-mini-shell{border:0!important;background:transparent!important}
.h6-marker-body{width:160px;height:68px;position:relative;display:flex;align-items:center;flex-direction:column;overflow:visible;pointer-events:auto}
.h6-marker-body .h3-marker{flex:none;width:36px;height:36px;box-sizing:border-box}
.h6-marker-label{display:block;margin-top:3px;max-width:154px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:rgba(239,241,244,.92);border:1px solid #d4d9df;padding:2px 6px;border-radius:3px;color:#576170;font-size:11px;font-weight:600;text-align:center;line-height:15px;box-shadow:0 1px 2px #0002}
.leaflet-popup.h6-popup-container .leaflet-popup-content-wrapper{border-radius:8px;background:#fff;padding:0;box-shadow:0 7px 20px #142b4770}
.leaflet-popup.h6-popup-container .leaflet-popup-content{width:min(540px,calc(100vw - 90px))!important;max-height:min(325px,65vh);overflow-y:auto;margin:0;padding:0;color:#263950;font:13px/1.36 system-ui,sans-serif}
.leaflet-popup.h6-popup-container .leaflet-popup-close-button{width:30px;height:30px;top:5px;right:5px;color:#fff!important;font-size:23px;z-index:2}
.h6-popup-top{background:#5c6673;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:13px 36px 12px 16px;gap:8px}
.h6-popup-name{font-size:18px;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.h6-popup-top>span{font-size:12px;text-align:right;max-width:175px}
.h6-popup-location{background:#ecedf0;color:#34485b;padding:10px 15px;font-size:13px}
.h6-popup-location small{display:block;color:#697886;font-size:11px;margin-top:4px}
.h6-popup-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:8px 12px}
.h6-popup-grid span{background:#f1f3f6;padding:7px 9px;border-radius:4px;display:flex;flex-direction:column;gap:3px;min-height:44px}
.h6-popup-grid b{font-size:11px;color:#607287}.h6-popup-grid strong{font-size:13px;line-height:1.3;color:#203c56}
.h6-popup-grid .h6-positive{color:#12783e}.h6-popup-grid .h6-negative{color:#b33b39}
.h6-popup-subhead{color:#34465b;font-weight:800;padding:6px 15px 4px;font-size:12px}
.h6-popup-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:3px 12px;background:#f0f1f4;padding:5px 10px;border-radius:3px;font-size:12px}
.h6-popup-row span{color:#596e80}.h6-popup-row b{color:#2e4051;text-align:right}
.h6-popup-actions{display:flex;justify-content:flex-end;padding:10px 12px}
.h6-popup-actions button{background:#2e70af;color:#fff;border:0;border-radius:5px;padding:7px 12px;font:inherit;cursor:pointer}
body.h3-fleet-mode .map-panel{position:relative;isolation:isolate}
.h6-mini-window{position:absolute;z-index:1500;width:min(385px,calc(100% - 10px));height:294px;top:12px;left:12px;background:#fff;border:1px solid #b8c7d8;border-radius:7px;box-shadow:0 4px 16px #1e34518c;display:flex;flex-direction:column;overflow:hidden}
.h6-mini-window:focus{outline:2px solid #3883c3}
.h6-mini-head{height:40px;padding:0 8px 0 12px;display:flex;align-items:center;justify-content:space-between;gap:7px;background:#596674;color:white;cursor:move;touch-action:none;user-select:none}
.h6-mini-head strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.h6-mini-head button{padding:2px 8px;background:transparent;color:white;border:0;font-size:18px;cursor:pointer}
.h6-mini-status{padding:6px 9px;font-size:11px;background:#8b9098;color:white;min-height:28px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.h6-mini-map{flex:1;min-height:180px;z-index:1}
.h6-mini-foot{min-height:32px;background:#f2f5fa;display:flex;align-items:center;justify-content:space-between;padding:2px 8px;font-size:10px;color:#66788b;gap:7px}
.h6-mini-foot button{font-size:11px;padding:3px 7px}
.h6-mini-pin{display:grid;place-items:center;border:3px solid #246ec3;background:white;border-radius:50%;width:33px;height:33px;font-size:18px}
.h6-restore-dialog{width:min(520px,94vw);max-height:75vh;overflow:auto;padding:19px;border:1px solid #bdcbd8;border-radius:9px;color:#24364e;box-shadow:0 15px 40px #172c4566}
.h6-restore-dialog::backdrop{background:#09213e7a}
.h6-dialog-head,.h6-dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:10px}
.h6-dialog-head h2{font-size:17px;margin:0}.h6-dialog-head button{padding:4px 9px}
.h6-restore-row{padding:10px;border-bottom:1px solid #d8e2eb;display:flex;align-items:center;justify-content:space-between;gap:10px}
.h6-restore-row small{color:#687a8a}.h6-restore-row button{font-size:12px;padding:5px}
.h6-dialog-actions{margin-top:15px;justify-content:flex-end}
@media(max-width:610px){.h6-popup-grid{grid-template-columns:1fr}.leaflet-popup.h6-popup-container .leaflet-popup-content{max-height:55vh}}


/* CarTracker V0.8 H9 — cabecera azul, logo naranjo y popup compacto con recorrido */
header{background:#072a58!important;color:#fff;border-bottom:1px solid #0e4f90}
header .logo{color:#fff}
header #who{color:#c7d7ea}
header select,header button{border-color:#aabed3}
.h9-brand{display:flex;align-items:center;gap:12px;min-width:0}
.h9-brand-img{width:42px;height:42px;object-fit:contain;flex:none}
.h9-brand-text{display:flex;align-items:baseline;gap:10px;min-width:0;flex-wrap:wrap}
.h9-brand-text span{font-size:1.1rem;font-weight:800;color:#fff;line-height:1;text-transform:none;letter-spacing:.01em}
.h9-brand-text small{font-size:.72rem;font-weight:700;color:#a8c1dc;line-height:1.1;text-transform:uppercase;letter-spacing:.08em}
.h9-brand-login{display:flex;align-items:center;justify-content:center;gap:10px;color:#18335b;font-weight:800}
.h9-brand-login .h9-brand-img{width:46px;height:46px}
.h9-brand-login span{font-size:1.35rem;line-height:1.1}
.leaflet-popup.h9-popup-container .leaflet-popup-content-wrapper{border-radius:12px;background:#fff;padding:0;box-shadow:0 10px 22px #142b4750}
.leaflet-popup.h9-popup-container .leaflet-popup-content{margin:0!important;padding:0!important;min-width:210px;color:#32465a;font:12px/1.3 system-ui,sans-serif}
.leaflet-popup.h9-popup-container .leaflet-popup-tip{background:#fff}
.leaflet-popup.h9-popup-container .leaflet-popup-close-button{display:none}
.h9-popup{padding:8px 9px 10px}
.h9-popup-icons{display:flex;align-items:center;gap:8px;background:#fff}
.h9-popup-icon,.h9-popup-track{width:30px;height:30px;border-radius:7px;display:grid;place-items:center;border:0;background:#f2f4f7;padding:0;box-sizing:border-box}
.h9-popup-icon .h5-ui-icon{width:22px;height:22px}.h9-popup-icon.gprs svg{width:20px;height:20px}.h9-popup-icon.motion.moving{background:#e7f6eb;color:#24984d}.h9-popup-icon.motion.stopped,.h9-popup-icon.motion.unknown{background:#f1f3f5;color:#90979f}.h9-popup-icon.gps.on{background:#e9f2ff;color:#2367cf}.h9-popup-icon.gps.off{background:#eef0f2;color:#a0a7af}.h9-popup-icon.gprs.on{background:#e7f6eb;color:#23a34d}.h9-popup-icon.gprs.off{background:#eef0f2;color:#9ca4ad}
.h9-popup-track{cursor:pointer;background:#fff4ed;color:#e06724;border:1px solid #f4c1a0}.h9-popup-track:hover{background:#ffe6d6}.h9-popup-track svg{width:19px;height:19px;stroke:currentColor;stroke-width:2.15;fill:none;stroke-linecap:round;stroke-linejoin:round}
.h9-popup-name{margin-top:8px;background:#f0f2f5;border:1px solid #dde4ea;border-radius:6px;padding:5px 8px;text-align:center;color:#5e6672;font-weight:750;letter-spacing:.03em;text-transform:uppercase}
.leaflet-tooltip.h9-track-tooltip{background:#eef4ff;border:1px solid #96b5e5;border-radius:4px;color:#204166;box-shadow:0 1px 5px #0002;font-size:11px;font-weight:650;padding:3px 5px}.leaflet-tooltip.h9-track-tooltip:before{border-top-color:#96b5e5}
@media(max-width:860px){.h9-brand-text small{width:100%;margin-left:54px}.h9-brand-text{gap:5px}}


/* CarTracker V0.8 H10 — toggle de recorrido, logo embebido y centrado automático */
.h5-center{background:#fff}.h5-center.active{background:#e7f6eb;border-color:#9fd9b0;box-shadow:inset 0 0 0 1px #bce6c8}
.h10-center-svg{width:24px;height:24px;display:block}
.h9-popup-track.active{background:#e06724;color:#fff;border-color:#d76422;box-shadow:inset 0 0 0 1px #c45516}
.h9-brand-img{display:block;width:44px;height:44px;object-fit:contain;flex:none;min-width:44px;min-height:44px}
header .logo.h9-brand{overflow:hidden}
header .logo.h9-brand .h9-brand-text span{font-size:1.05rem}
header .logo.h9-brand .h9-brand-text small{font-size:.72rem}
.h9-brand-login .h9-brand-img{width:54px;height:54px;min-width:54px;min-height:54px}
