/* P1S v8.26.0 — la visibilidad de rutas no oculta el GPS base cuando la ruta está oculta/no seleccionada. */
@charset "UTF-8";
:root{--ink:#202720;--muted:#737b73;--line:#e2e7e0;--paper:#f5f7f3;--lime:#d4ed59;--olive:#66702c;--green:#26764a;--amber:#936421;--radius:13px;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none;color-scheme:light}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,a,input,select,summary{-webkit-tap-highlight-color:transparent}button,a,summary{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}button{color:inherit}button:disabled{cursor:wait;opacity:.6}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #819b28;outline-offset:3px}button,input,select{border-radius:8px}input,select{font-size:.875rem}h1,h2,h3,p{margin:0}[hidden]{display:none!important}.icon{display:inline-flex;width:20px;height:20px;flex-shrink:0;align-items:center;justify-content:center}.icon svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:fixed;top:-100px;left:16px;z-index:9999;background:var(--lime);padding:14px}.skip-link:focus{top:12px}
.topbar{height:82px;background:#1c231d;color:white;padding:0 4%;display:flex;align-items:center;justify-content:space-between;gap:24px}.brand{display:flex;align-items:center;gap:22px;flex-shrink:0}.brand img{width:112px;height:58px;object-fit:contain;filter:brightness(0) saturate(100%) invert(89%) sepia(52%) saturate(643%) hue-rotate(14deg) brightness(101%) contrast(87%)}.brand-divider{width:1px;height:29px;background:#ffffff26}.brand>span:last-child{font-size:.68rem;letter-spacing:.16em;line-height:1.7;color:#a6afa5}.brand strong{font-size:.72rem;font-weight:600;color:#e8ece4;letter-spacing:.12em}.topbar-center{display:flex;gap:9px;align-items:center;font-size:.875rem;color:#c7cec2}.topbar-center .icon{color:var(--lime);width:18px}.header-actions{display:flex;gap:24px;align-items:center}.top-link{display:flex;align-items:center;gap:9px;font-size:.875rem;color:#d9dfd5}.top-link .icon{width:16px}.account-button{width:36px;height:36px;border:1px solid #ffffff26;background:#ffffff0b;border-radius:50%;display:grid;place-items:center;color:#e8ecdf}.workspace{max-width:1550px;margin:auto;padding:36px 4% 0}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}.eyebrow{font-size:.6875rem;font-weight:700;letter-spacing:.14em;color:#78836f;margin-bottom:10px}h1{font-size:clamp(1.6rem,2.5vw,2.2rem);letter-spacing:-.045em;line-height:1.22;font-weight:650}.title-dot{color:#839933}.page-intro{font-size:.9375rem;color:var(--muted);margin-top:8px;line-height:1.5}.heading-actions{display:flex;align-items:center;gap:18px}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid transparent;min-height:42px;padding:10px 16px;font-size:.875rem;line-height:1.4;font-weight:600;transition:background .15s,box-shadow .15s}.button-primary{background:var(--lime);color:#252b16;border-color:#c8e047}.button-primary:hover{background:#c7e348;box-shadow:0 3px 9px #a7ba3424}.button-outline{background:white;border-color:#dce2d7}.button-outline:hover{background:#f3f6ec}.connection-badge{display:flex;align-items:center;gap:7px;font-size:.8125rem;color:#706743;white-space:nowrap}.status-dot{width:7px;height:7px;display:inline-block;border-radius:50%;background:#a39869;flex-shrink:0}.connection-badge.live{color:var(--green)}.live .status-dot{background:#409565;box-shadow:0 0 0 3px #40956512}.notice{display:flex;align-items:center;gap:11px;background:#eef2df;border:1px solid #e3e8d3;border-radius:9px;padding:12px 16px;color:#596142;font-size:.875rem;line-height:1.5;margin-bottom:22px}.notice>.icon{width:17px}.notice p{flex:1}.notice strong{font-weight:600;color:#424b31}.text-button{border:0;background:transparent;font-size:.8125rem;font-weight:650;white-space:nowrap;padding:5px 0 5px 10px}.text-button span{margin-left:5px}.alert{padding:14px 16px;margin:0 0 18px;border:1px solid #ecd1c2;border-radius:9px;background:#fff3ec;color:#8b3e20;font-size:.875rem;line-height:1.5}
.stats{display:grid;grid-template-columns:repeat(4,1fr);background:white;border:1px solid var(--line);border-radius:var(--radius);margin-bottom:26px;box-shadow:0 2px 3px #26311a02}.stat{padding:21px 24px;display:flex;align-items:flex-start;gap:15px;position:relative}.stat+.stat:before{content:"";position:absolute;left:0;top:24px;bottom:24px;width:1px;background:var(--line)}.stat-icon{width:40px;height:40px;border-radius:10px;background:#f1f3ed;display:grid;place-items:center;color:#657345;flex-shrink:0}.stat-icon.green{background:#edf5ee;color:#348159}.stat-icon.amber{background:#f8f2e7;color:#a7894d}.stat p{font-size:.8125rem;color:#697362;line-height:1.5;margin-bottom:5px}.stat strong{font-size:1.85rem;line-height:1.1;font-weight:620;letter-spacing:-.04em}.stat-foot{display:block;color:#92988e;font-size:.6875rem;line-height:1.4;margin-top:5px}.monitor-window{border:1px solid #d9e0d4;background:white;border-radius:var(--radius);overflow:hidden;box-shadow:0 4px 13px #2a352108;margin-bottom:31px;position:relative}.window-toolbar{display:flex;align-items:center;justify-content:space-between;min-height:60px;padding:0 18px;gap:12px;border-bottom:1px solid var(--line)}.view-tabs{display:flex;align-self:stretch;gap:23px}.view-tab{position:relative;display:flex;align-items:center;gap:8px;font-size:.875rem;padding:18px 0;border:0;background:transparent;color:#798172;border-radius:0;font-weight:500}.view-tab.active{color:#38462a;font-weight:650}.view-tab.active:after{content:"";position:absolute;bottom:-1px;left:0;right:0;height:3px;background:#8d9f3f;border-radius:3px 3px 0 0}.view-tab .icon{width:17px}.window-actions{display:flex;align-items:center;gap:7px}.read-time{font-size:.75rem;color:#858d7e;margin-right:12px}.icon-button{display:inline-flex;align-items:center;justify-content:center;border:1px solid #e3e7de;background:white;width:33px;height:33px;color:#66725f;border-radius:7px}.icon-button .icon{width:16px;height:16px}.icon-button:hover{background:#f1f4e9}.map-panel{position:relative;height:390px;isolation:isolate;background:#e8eddf}.map-panel #map{width:100%;height:100%;background:#e8eddf;z-index:1}.leaflet-container{font-family:inherit;font-size:.875rem}.leaflet-tile-pane{filter:none}.map-label{position:absolute;z-index:450;top:19px;left:20px;display:flex;align-items:center;gap:8px;background:white;padding:10px 13px;border-radius:7px;box-shadow:0 2px 6px #1c28121a;font-size:.6875rem;font-weight:650;letter-spacing:.06em;color:#5d6852}.map-label .status-dot{width:6px;height:6px;background:#99a256}.fit-button{position:absolute;z-index:450;top:19px;right:20px;background:white;border:1px solid #dfe3db;padding:9px 12px;display:flex;align-items:center;gap:7px;font-size:.8125rem;box-shadow:0 2px 5px #00000008;color:#4d5944}.fit-button .icon{width:16px;height:16px}.leaflet-control-zoom{border:1px solid #d7ddd1!important;box-shadow:0 2px 5px #1c281215!important;margin-bottom:34px!important;margin-right:20px!important}.leaflet-control-zoom a{font-size:21px!important;font-weight:400!important;color:#5d6852!important;width:33px!important;height:33px!important;line-height:32px!important}.leaflet-control-attribution{font-size:.625rem!important;background:#ffffffde!important}.leaflet-control-attribution a{color:#596847!important}.guard-icon{background:none;border:0}.guard-pin{display:flex;align-items:center;justify-content:center;width:37px;height:37px;background:#78893d;border:3px solid #fff;border-radius:50%;box-shadow:0 3px 10px #24341d32;position:relative;color:#fff;transition:background .15s}.guard-pin:after{content:"";position:absolute;inset:-7px;border:1px solid #7990413d;border-radius:50%;background:#849a3320;z-index:-1}.guard-pin svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.guard-pin.offline{background:#9b8358}.guard-pin.unknown{background:#838b82}.guard-pin.selected{background:#20291d;color:#d4ed59;border-color:#d4ed59}.guard-pin.selected:after{background:#d4ed5940;border-color:#c1d44a77;inset:-10px}.marker-name{background:#ffffffed;border:1px solid #e0e5d9;border-radius:4px;box-shadow:0 2px 5px #15280c0a;color:#465239;font-size:.6875rem;font-weight:650;padding:3px 6px}.marker-name:before{display:none}.selected-card{position:absolute;z-index:450;bottom:20px;left:20px;width:286px;padding:17px;background:white;border:1px solid #e0e5da;border-radius:10px;box-shadow:0 4px 18px #26311a16}.selected-top{display:flex;align-items:center;gap:11px;margin-bottom:12px}.avatar{width:39px;height:39px;border-radius:10px;background:#edf1dd;color:#72823c;font-size:.6875rem;font-weight:700;display:grid;place-items:center;flex-shrink:0}.selected-top strong{font-size:.875rem;display:block}.selected-top small{display:block;font-size:.6875rem;color:#879078;margin-top:3px}.selected-top>.status-dot{margin-left:auto}.selected-address{font-size:.8125rem;color:#56614d;line-height:1.5;border-top:1px solid #eef0e9;padding-top:10px;display:flex;gap:7px;align-items:flex-start}.selected-address .icon{width:14px;height:17px}.selected-time{display:block;font-size:.6875rem;color:#8c9486;margin:7px 0 0 21px}.window-footer{padding:12px 19px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:white;border-top:1px solid var(--line)}.legend{display:flex;gap:20px;font-size:.6875rem;color:#7b8571}.legend span{display:flex;align-items:center;gap:6px}.legend-dot{display:inline-block;width:6px;height:6px;border-radius:50%}.online{background:#67853d}.offline{background:#ac9364}.unknown{background:#9aa194}.source-label{display:flex;gap:6px;align-items:center;font-size:.6875rem;color:#8a9282}.source-label .icon{width:12px;height:12px}.traccar-panel{background:#f6f8f3}.frame-notice{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:12px 18px;font-size:.75rem;color:#6d7565;line-height:1.5;border-bottom:1px solid var(--line)}.frame-notice a{display:flex;align-items:center;gap:6px;white-space:nowrap;font-weight:600;color:#586733}.frame-notice .icon{width:13px}.traccar-launch{min-height:620px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:46px 24px;background:linear-gradient(180deg,#fbfcf9,#f4f7ef)}.traccar-launch-icon{width:62px;height:62px;border-radius:18px;background:#eaf2c8;color:#718250;display:grid;place-items:center;margin-bottom:17px}.traccar-launch-icon .icon{width:30px;height:30px}.traccar-launch h3{font-size:1.45rem;letter-spacing:-.03em;margin:4px 0 10px}.traccar-launch>p:not(.eyebrow){max-width:600px;color:#6d7565;line-height:1.65;margin-bottom:22px}.traccar-launch-button{min-width:240px;justify-content:center}.traccar-launch .text-button{margin-top:15px}.traccar-launch small{display:block;max-width:540px;color:#8b9384;line-height:1.5;margin-top:15px}.map-empty{position:absolute;z-index:449;top:50%;left:50%;transform:translate(-50%,-50%);width:min(90%,350px);padding:24px;border:1px solid #dbe3d1;border-radius:12px;background:#fffffff5;text-align:center;box-shadow:0 8px 30px #182a1410}.map-empty>.icon{width:26px;height:26px;color:#899950;margin-bottom:10px}.map-empty strong{display:block;font-size:.875rem}.map-empty p{font-size:.8125rem;color:#79806f;line-height:1.5;margin-top:7px}.map-warning{position:absolute;z-index:460;bottom:4px;left:50%;transform:translateX(-50%);background:#fff4df;border:1px solid #ddc995;border-radius:6px;padding:6px 10px;font-size:.75rem;max-width:95%}.monitor-window:fullscreen,.monitor-window.expanded{height:100vh;width:100vw;margin:0;border:0;border-radius:0;background:white;display:flex;flex-direction:column}.monitor-window.expanded{position:fixed;inset:0;z-index:900}.monitor-window:fullscreen .map-panel,.monitor-window.expanded .map-panel{flex:1;height:auto}.monitor-window:fullscreen .traccar-panel,.monitor-window.expanded .traccar-panel{display:flex;flex:1;flex-direction:column}.monitor-window:fullscreen .traccar-launch,.monitor-window.expanded .traccar-launch{flex:1;min-height:0}.monitor-window:fullscreen .window-footer,.monitor-window.expanded .window-footer{margin-top:auto}
.section-heading{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:19px}.section-title{display:flex;align-items:center;gap:10px}h2{font-size:1.2rem;letter-spacing:-.025em;font-weight:620;line-height:1.4}.count-badge{font-size:.6875rem;font-weight:650;background:#e8eddd;border:1px solid #dce4cd;border-radius:5px;color:#6a7852;padding:2px 6px;min-width:24px;text-align:center}.section-heading p{font-size:.8125rem;color:#818978;margin-top:6px;line-height:1.4}.list-controls{display:flex;gap:9px;flex-shrink:0}.search-field{display:flex;align-items:center;gap:8px;background:white;border:1px solid #dfe4d9;border-radius:8px;padding:0 10px;width:245px;min-height:39px}.search-field .icon{width:16px;height:16px;color:#86917c}.search-field input{border:0;padding:9px 0;background:transparent;outline:0!important;width:100%;font-size:.75rem;color:var(--ink)}.search-field:focus-within{outline:2px solid #899b48;outline-offset:1px}input::placeholder{color:#929a88}.list-controls select{padding:9px 25px 9px 11px;border:1px solid #dfe4d9;background:white;color:#647055;font-size:.75rem;max-width:180px}.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:10px;background:white}table{width:100%;border-collapse:collapse;text-align:left;font-size:.8125rem}th{background:#fafbf7;padding:13px 18px;color:#849078;font-size:.6875rem;font-weight:550;white-space:nowrap;border-bottom:1px solid var(--line)}td{padding:16px 18px;border-bottom:1px solid #edf0e8;vertical-align:middle}tr:last-child td{border-bottom:0}tbody tr{transition:background .15s}tbody tr:hover{background:#fbfcf7}tbody tr.selected{background:#f4f7e9}tbody tr.selected td:first-child{box-shadow:inset 3px 0 #99ad51}.guard-name{display:flex;gap:11px;align-items:center;min-width:143px}.guard-name .avatar{width:34px;height:34px;border-radius:8px;background:#eff2e7;font-size:.625rem}.guard-name strong{display:block;font-size:.8125rem;font-weight:600}.guard-name small{display:block;font-size:.625rem;margin-top:4px;color:#909984;letter-spacing:.025em}.user-names{color:#68715e;font-size:.75rem;max-width:170px;line-height:1.5;overflow-wrap:anywhere}.address-line{display:block;color:#59664d;font-weight:500;line-height:1.5;font-size:.8125rem;max-width:290px;min-width:155px}.coordinate-line{display:block;color:#949d89;font-size:.6875rem;margin-top:4px;font-variant-numeric:tabular-nums}.status-pill{display:inline-flex;align-items:center;gap:6px;font-size:.6875rem;white-space:nowrap;border-radius:5px;padding:5px 8px;background:#eef4e8;color:#5b793b}.status-pill.offline{background:#f7f2e7;color:#937846}.status-pill.unknown{background:#f0f2ed;color:#7e8974}.status-pill .status-dot{width:5px;height:5px;background:currentColor}.report-time{color:#616e54;font-size:.75rem;white-space:nowrap}.report-date{display:block;color:#929b87;font-size:.625rem;margin-top:4px}.row-map-button{display:flex;align-items:center;gap:5px;background:transparent;border:1px solid #dfe6d4;white-space:nowrap;padding:7px 9px;font-size:.6875rem;font-weight:550;color:#667b42}.row-map-button .icon{width:13px;height:13px}.row-map-button:hover{background:#eaf1db;border-color:#b6c88f}.row-map-button:disabled{cursor:default}.table-footer{display:flex;justify-content:space-between;gap:20px;padding:13px 3px;color:#8a947f;font-size:.6875rem}.table-footer>span:last-child{display:flex;gap:5px;align-items:center}.table-footer .icon{width:12px;height:12px}.list-empty{padding:40px 20px;text-align:center}.list-empty>.icon{width:27px;height:27px;color:#869469;margin-bottom:12px}.list-empty h3{font-size:1rem}.list-empty p{font-size:.875rem;color:#818a75;margin:8px 0 18px}.permission-note{font-size:.75rem;line-height:1.5;color:#849078;padding:8px 0}.page-footer{border-top:1px solid var(--line);margin-top:35px;padding:21px 0 25px;display:flex;justify-content:space-between;gap:20px;color:#98a08e;font-size:.6875rem}.page-footer strong{color:#5c694c;font-size:.8125rem;letter-spacing:.06em}.page-footer>span:last-child{display:flex;gap:9px}
dialog{border:1px solid #dbe3d0;border-radius:18px;width:450px;max-width:calc(100% - 30px);max-height:calc(100dvh - 40px);padding:31px;color:var(--ink);background:#fff;box-shadow:0 25px 80px #0d230d30}dialog::backdrop{background:#15201580;backdrop-filter:blur(4px)}.dialog-close{position:absolute;right:17px;top:17px;border:0}.dialog-symbol{width:48px;height:48px;border-radius:13px;display:grid;place-items:center;background:var(--lime);color:#455622;margin-bottom:21px}.dialog-symbol .icon{width:26px;height:26px}dialog .eyebrow{font-size:.625rem;margin-bottom:7px}dialog h2{font-size:1.45rem;margin-bottom:10px}#login-description{font-size:.875rem;line-height:1.65;color:#7a8370}.server-chip{font-size:.8125rem;color:#687650;display:flex;align-items:center;gap:8px;background:#f4f6ef;border:1px solid #e7ecdd;border-radius:7px;padding:10px 12px;margin:18px 0 21px}.server-chip .icon{width:14px;height:14px}#login-form label{display:block;font-size:.8125rem;font-weight:600;margin:16px 0 7px}#login-form input{width:100%;border:1px solid #dbe2d3;padding:11px 12px;background:white;color:var(--ink);height:43px}.password-field{position:relative}.password-field input{padding-right:43px!important}.password-field button{position:absolute;right:4px;top:4px;bottom:4px;width:35px;background:transparent;border:0;color:#89967a;display:grid;place-items:center}.password-field .icon{width:17px}details{font-size:.75rem;color:#808c70;margin:16px 0;line-height:1.5}summary{cursor:pointer}details input{letter-spacing:.2em}.login-submit{width:100%;margin:3px 0 15px;min-height:45px}.privacy-note{font-size:.6875rem;line-height:1.6;color:#8c9680;display:flex;align-items:flex-start;gap:7px}.privacy-note .icon{width:13px;height:15px;margin-top:2px}.setup-link{display:block;text-align:center;color:#7e8a69;font-size:.6875rem;margin-top:18px}.form-error{font-size:.8125rem;line-height:1.5;color:#98482c;background:#fff3ed;border:1px solid #f1d7c8;border-radius:7px;padding:10px;margin:12px 0}.toast{position:fixed;z-index:10000;bottom:22px;left:50%;transform:translateX(-50%);border-radius:9px;padding:13px 20px;background:#28321f;color:#eef4e2;box-shadow:0 6px 30px #15240d30;font-size:.875rem;max-width:90vw}.noscript{padding:30px;background:#fff4d7;position:fixed;bottom:0;left:0;right:0;z-index:10000}.spin .icon{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
/* Compact metadata is secondary; operational labels remain readable. */
.eyebrow,.brand>span:last-child,.brand strong,.stat-foot,.map-label,.legend,.source-label,.marker-name,.selected-time,.selected-top small,.guard-name small,.guard-name .avatar,.status-pill,.report-date,.row-map-button,.table-footer,.page-footer,.privacy-note,.setup-link,dialog .eyebrow{font-size:max(.75rem,12px)}.stat p,.view-tab,.search-field input,.list-controls select,table,.user-names,.report-time,.address-line,.guard-name strong,.selected-address,.frame-notice,.section-heading p{font-size:.875rem}th{font-size:.75rem}.coordinate-line{font-size:.75rem}.leaflet-control-attribution{font-size:12px!important}
@media(min-width:1600px){.map-panel{height:450px}.workspace{padding-top:40px}}@media(max-width:1190px){.topbar-center{display:none}.workspace{padding-left:3%;padding-right:3%}.stat{padding:20px 17px;gap:11px}.stat-foot{font-size:.75rem}.section-heading{align-items:flex-start;flex-direction:column;gap:15px}.list-controls{width:100%;justify-content:space-between}.search-field{width:min(380px,68%)}.heading-actions{gap:12px}.page-intro{font-size:.875rem}.connection-badge{display:none}.map-panel{height:375px}}
@media(max-width:760px){.topbar{height:72px;padding:0 5%;gap:10px}.brand{gap:13px}.brand img{width:85px;height:45px}.brand>span:last-child,.brand strong{font-size:.625rem}.brand-divider{height:25px}.header-actions{gap:13px}.top-link{font-size:.75rem}.top-link .icon{width:13px}.workspace{padding:26px 4.5% 0}.page-heading{align-items:flex-start;gap:12px}.page-intro{max-width:260px;line-height:1.5}h1{font-size:1.65rem}.heading-actions .button{font-size:.75rem;padding:10px;min-height:39px}.heading-actions .icon{display:none}.eyebrow{margin-bottom:8px}.notice{padding:11px 13px;font-size:.8125rem;align-items:flex-start}.notice>.icon{margin-top:3px}.notice>.text-button{display:none}.stats{grid-template-columns:repeat(2,1fr);margin-bottom:22px}.stat{padding:17px 18px;gap:12px}.stat:nth-child(3),.stat:nth-child(4){border-top:1px solid var(--line)}.stat:nth-child(3):before{display:none}.stat+.stat:before{top:18px;bottom:18px}.stat p{font-size:.8125rem}.stat strong{font-size:1.5rem}.stat-icon{width:34px;height:34px}.stat-icon .icon{width:18px;height:18px}.stat-foot{font-size:.75rem}.window-toolbar{padding:0 12px;gap:8px;flex-wrap:wrap;min-height:56px}.view-tabs{gap:17px}.view-tab{font-size:.8125rem;padding:16px 0}.view-tab .icon{width:16px}.read-time{display:none}.window-actions{gap:5px}.icon-button{width:30px;height:30px}.map-panel{height:395px}.map-label{left:13px;top:13px;padding:9px 11px;font-size:.625rem}.fit-button{right:13px;top:13px;font-size:.75rem;padding:8px}.selected-card{left:13px;bottom:27px;width:235px;padding:13px}.selected-address{font-size:.8125rem}.selected-time{font-size:.75rem;margin-top:4px}.window-footer{padding:11px 13px;gap:7px}.legend{gap:12px;font-size:.625rem}.source-label{font-size:.625rem}.source-label>.icon{display:none}.section-heading{margin-bottom:15px}.section-heading h2{font-size:1.05rem}.section-heading p{font-size:.8125rem;max-width:400px}.search-field{width:60%;padding:0 9px}.search-field input,.list-controls select{font-size:.8125rem}.list-controls select{max-width:40%;padding:8px}.locations table{min-width:0}.locations thead{display:none}.locations tbody{display:grid;grid-template-columns:1fr}.locations tr{display:grid;grid-template-columns:1fr auto;padding:16px;gap:11px 10px;border-bottom:1px solid #e8eddc}.locations tr:last-child{border-bottom:0}.locations td{border:0;padding:0}.locations td:nth-child(1){grid-column:1;grid-row:1}.locations td:nth-child(2){grid-column:1;grid-row:2}.locations td:nth-child(2):before{content:"Usuario: ";font-size:.75rem;color:#8b947f}.locations td:nth-child(2) .user-names{display:inline;font-size:.75rem;max-width:100%}.locations td:nth-child(3){grid-column:1 / 3;grid-row:3;padding:10px 0;border-top:1px solid #e5ebd9}.locations td:nth-child(4){grid-column:2;grid-row:1;align-self:center}.locations td:nth-child(5){grid-column:1;grid-row:4}.locations td:nth-child(6){grid-column:2;grid-row:4;align-self:center}.locations tbody tr.selected td:first-child{box-shadow:none}.locations tbody tr.selected{box-shadow:inset 3px 0 #99ad51}.address-line{font-size:.875rem;max-width:100%}.coordinate-line{font-size:.75rem}.guard-name strong{font-size:.875rem}.guard-name small{font-size:.75rem}.guard-name .avatar{width:38px;height:38px;font-size:.75rem}.status-pill,.row-map-button{font-size:.75rem}.report-time{font-size:.8125rem}.report-date{display:inline;font-size:.75rem;margin-left:8px}.table-footer{font-size:.75rem;line-height:1.4;gap:10px}.table-footer>span:last-child{align-items:flex-start;max-width:47%}.table-footer .icon{flex-shrink:0;margin-top:2px}.frame-notice{font-size:.75rem;padding:10px;align-items:flex-start}.traccar-launch{min-height:480px;padding:34px 18px}.page-footer{margin-top:22px;font-size:.75rem;line-height:1.5}.page-footer>span:last-child{max-width:48%;text-align:right}.page-footer>span:last-child span{display:none}.monitor-window{margin-bottom:25px}.map-warning{width:90%;font-size:.75rem;bottom:0}.source-label{max-width:125px;line-height:1.3;text-align:right}.legend{flex-wrap:wrap;row-gap:5px}}
@media(max-width:430px){.top-link{font-size:0}.top-link .icon{width:18px;height:18px}.header-actions{gap:12px}.page-heading{flex-direction:column;gap:16px}.heading-actions{width:100%;justify-content:space-between}.connection-badge{display:flex}.heading-actions .button{font-size:.8125rem;padding:9px 14px}.page-intro{max-width:100%}.stat{padding:16px 12px;gap:9px}.stat-icon{width:30px;height:30px}.stat-foot{font-size:.75rem}.view-tabs{gap:13px}.view-tab{font-size:.75rem}.view-tab .icon{display:none}.window-toolbar{gap:5px;padding:0 10px}.window-actions{gap:5px}.map-panel{height:405px}.fit-button{font-size:.75rem}.map-label{font-size:.625rem;max-width:185px}.map-label .status-dot{display:none}.selected-card{width:225px}.legend{gap:9px}.legend span{font-size:.625rem}.source-label{font-size:.625rem}.list-controls{flex-wrap:wrap}.search-field{width:100%}.list-controls select{max-width:100%;width:100%}.section-title{align-items:flex-start}.section-heading h2{font-size:1.05rem}.page-footer{font-size:.625rem}.page-footer>span:last-child{max-width:43%}dialog{padding:25px}dialog h2{font-size:1.3rem}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

.export-button{font-size:.8125rem;min-height:39px;padding:8px 12px;color:#57713b;background:#f8fbef;border-color:#d7e1c7}.export-button .icon{width:16px;height:16px}#history-description{font-size:.875rem;color:#77836b;line-height:1.6}#history-form label{display:block;font-size:.875rem;font-weight:550;margin:18px 0 7px}#history-form input,#history-form select{width:100%;padding:11px 12px;border:1px solid #dbe2d3;color:#35432b;background:white;font-size:.875rem;min-height:44px}.history-hint{font-size:.75rem;color:#859477;line-height:1.5;margin:14px 0 16px}#history-submit{margin:0 0 14px}.list-controls{flex-wrap:wrap;justify-content:flex-end}.section-heading{align-items:flex-start}.section-heading>div:first-child{min-width:260px}.search-field{width:220px}@media(max-width:1190px){.list-controls{justify-content:flex-start}.search-field{flex:1;min-width:210px}}@media(max-width:760px){.list-controls .export-button{width:100%;justify-content:center}.search-field{width:60%;min-width:0}.list-controls{justify-content:space-between}}@media(max-width:430px){.search-field{width:100%;flex:auto}}

.report-age{display:block;font-size:.75rem;color:#6f815b;margin-top:5px}.report-age.stale{color:#a26b29;font-weight:600}.accuracy-line{display:block;margin-top:4px;color:#7b866e}.frame-notice .text-button{font-size:.75rem;padding:0}.guard-name .avatar .icon{width:17px;height:17px}

/* v2.3 · dirección enriquecida */
.selected-address>span{min-width:0}.selected-street{display:block;color:#35412f;font-weight:700;line-height:1.35}.selected-full-address{display:block;margin-top:3px;color:#66715d;line-height:1.4}.selected-geocode-source{display:block;margin-top:5px;color:#929a89;font-size:.625rem;line-height:1.35}.selected-address .selected-street:first-child{word-break:break-word}

.top-link-button{border:0;background:transparent;padding:0;cursor:pointer}
.selected-card{width:min(390px,calc(100% - 40px))}.selected-full-address{max-width:330px}
@media(max-width:760px){.traccar-panel{height:560px}.traccar-embed-toolbar{align-items:flex-start}.traccar-embed-toolbar .button{min-height:34px;padding:7px 9px;font-size:.75rem}.selected-card{width:min(330px,calc(100% - 26px))}}

/* v3.1 · geocercas, recorridos y entorno */
.map-tool-button{min-height:34px;padding:7px 10px;font-size:.75rem;white-space:nowrap}.map-tool-button .icon{width:15px;height:15px}.route-summary-card{position:absolute;right:18px;bottom:26px;z-index:520;width:min(360px,calc(100% - 36px));background:#fffffff2;border:1px solid #dfe6d6;border-radius:10px;box-shadow:0 8px 30px #24351a1f;padding:13px 15px;color:#3c4935;font-size:.75rem;line-height:1.45}.route-summary-card strong{display:block;color:#263121;font-size:.875rem;margin-bottom:4px}.route-summary-card .route-meta{display:flex;gap:10px;flex-wrap:wrap;color:#718066}.route-summary-card .route-stops{margin-top:8px;max-height:120px;overflow:auto;border-top:1px solid #e5eadf;padding-top:7px}.route-summary-card .route-stop{display:flex;justify-content:space-between;gap:8px;padding:4px 0}.route-summary-card button{border:0;background:transparent;color:#607d39;font-weight:600;cursor:pointer;padding:5px 0}#route-form label{display:block;font-size:.875rem;font-weight:550;margin:15px 0 7px}#route-form input,#route-form select{width:100%;padding:11px 12px;border:1px solid #dbe2d3;color:#35432b;background:white;font-size:.875rem;min-height:44px}#route-submit{width:100%;margin-top:16px}.geofence-label{background:#f4f8e8;border:1px solid #b9ca79;color:#4b5d30;font-weight:700;border-radius:6px;box-shadow:0 2px 8px #23300f1a;padding:2px 6px}.poi-icon{background:#fff;border:2px solid #4f6335;border-radius:50%;width:28px!important;height:28px!important;display:grid;place-items:center;font-size:14px;box-shadow:0 3px 10px #1d251722}.stop-icon{background:#fff6df;border:2px solid #b78025;border-radius:50%;width:26px!important;height:26px!important;display:grid;place-items:center;font-size:11px;font-weight:700;color:#8d651d;box-shadow:0 3px 9px #5a411b2b}@media(max-width:760px){.map-tool-button{font-size:0;width:31px;padding:0;display:grid;place-items:center}.map-tool-button .icon{width:16px;height:16px}.route-summary-card{left:13px;right:13px;bottom:28px;width:auto}.selected-card:not([hidden])~.route-summary-card{bottom:190px}}

/* v3.2 · navegación táctil, flechas de recorrido y POI más legibles */
.zoom-hint{position:absolute;left:50%;top:14px;transform:translateX(-50%);z-index:510;background:#172013dd;color:#f7faef;border:1px solid #ffffff24;border-radius:999px;padding:7px 12px;font-size:.6875rem;line-height:1.2;box-shadow:0 5px 16px #0002;pointer-events:none;transition:opacity .35s ease,transform .35s ease;white-space:nowrap}.zoom-hint.fade{opacity:0;transform:translate(-50%,-8px)}
.route-main-line{filter:drop-shadow(0 1px 1px #fff)}
.route-arrow-wrap{background:transparent;border:0}.route-arrow-wrap>div{position:relative;width:40px;height:40px}.route-arrow{position:absolute;left:8px;top:8px;width:24px;height:24px;display:grid;place-items:center;background:#fff;border:2px solid #527b38;border-radius:50%;font-size:18px;line-height:1;color:#355b25;box-shadow:0 3px 10px #1c2d1738;transform-origin:50% 50%}.route-seq{position:absolute;right:-2px;bottom:-2px;min-width:18px;height:18px;padding:0 4px;display:grid;place-items:center;border-radius:999px;background:#263b1f;color:#fff;border:2px solid #fff;font-size:9px;font-weight:800;font-variant-numeric:tabular-nums}.route-arrow-wrap.revisit .route-arrow{border-style:double;border-width:4px;background:#fff8dc}.route-revisit-badge{position:absolute;left:-8px;top:-8px;min-width:22px;height:19px;padding:0 4px;border-radius:999px;display:grid;place-items:center;background:#9d6d1f;color:white;border:2px solid white;font-size:9px;box-shadow:0 2px 7px #0003}.route-popup{min-width:235px;color:#35422f}.route-popup-head{display:flex;align-items:center;gap:9px;margin-bottom:8px}.route-popup-head strong{display:block;font-size:.9rem}.route-popup-head small{display:block;color:#87937e;margin-top:1px}.route-popup-avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#edf3df;color:#4a6a32}.route-popup-avatar svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}.route-revisit-chip{display:inline-flex;background:#fff1c8;color:#805b18;border:1px solid #e6c978;border-radius:999px;padding:3px 7px;font-size:.67rem;font-weight:700;margin-bottom:7px}.route-popup-time{font-weight:650;margin-bottom:7px}.route-popup-address{display:flex;flex-direction:column;gap:2px;padding-top:7px;border-top:1px solid #e5eadf}.route-popup-address span,.route-popup-meta{font-size:.7rem;color:#778372}.route-popup-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}.route-stop-popup{display:flex;flex-direction:column;gap:4px;min-width:210px}.route-stop-popup span{color:#697665}.route-help{margin:8px 0 0;color:#697665;font-size:.7rem;line-height:1.45}.stop-icon{display:grid!important;grid-template-columns:1fr;grid-template-rows:1fr;place-items:center}.stop-icon span{font-size:12px;line-height:1}.stop-icon b{position:absolute;right:-5px;bottom:-5px;background:#835d1c;color:#fff;border:2px solid #fff;border-radius:999px;min-width:16px;height:16px;display:grid;place-items:center;font-size:8px}.poi-icon{background:transparent!important;border:0!important;box-shadow:none!important}.poi-icon span{width:32px;height:32px;display:grid;place-items:center;border-radius:50%;background:#fff;border:2px solid #546a40;box-shadow:0 3px 10px #1d25172b;font-size:18px}.poi-police span{border-color:#3d5f86}.poi-traffic_signal span{border-color:#6b6b42}.poi-roadwork span{border-color:#956b2d}.poi-popup{display:flex;flex-direction:column;gap:4px;min-width:210px}.poi-popup span{color:#677563}.poi-popup small{color:#8a9483;line-height:1.35}
@media(max-width:760px){.zoom-hint{top:auto;bottom:76px;max-width:84%;white-space:normal;text-align:center;font-size:.625rem}.route-arrow{width:26px;height:26px}.route-popup{min-width:200px}.leaflet-control-zoom a{width:38px!important;height:38px!important;line-height:38px!important;font-size:22px!important}.leaflet-control-scale{margin-bottom:8px!important}}



/* v3.4 · tema oscuro neón + rendimiento de recorridos */
html{background:#050806}html.light-mode{background:var(--paper)}
.theme-toggle{width:36px;height:36px;border:1px solid #39ff14;background:#07100a;border-radius:50%;display:grid;place-items:center;color:#7dff6a;box-shadow:0 0 0 1px #39ff1424,0 0 18px #39ff1415;transition:border-color .18s,box-shadow .18s,transform .18s}.theme-toggle:hover{border-color:#79ff65;box-shadow:0 0 22px #39ff1433}.theme-toggle:active{transform:scale(.96)}.theme-toggle .icon{width:18px;height:18px}body.light-mode .theme-toggle{border-color:#dce2d7;background:white;color:#5f6e54;box-shadow:none}
body:not(.light-mode){--ink:#eaf6eb;--muted:#91a798;--line:#183d26;--paper:#050806;--lime:#65ff52;--olive:#54c866;--green:#43ff7b;--amber:#ffc85b;color:#eaf6eb;background:radial-gradient(circle at 50% -20%,#0d2b17 0,#07100a 34%,#050806 68%);color-scheme:dark;min-height:100vh}
body:not(.light-mode) .topbar{background:#030604;border-bottom:1px solid #1b7f38;box-shadow:0 8px 28px #0008,0 0 24px #39ff1410}
body:not(.light-mode) .brand img{filter:brightness(0) saturate(100%) invert(91%) sepia(95%) saturate(1720%) hue-rotate(47deg) brightness(111%) contrast(107%)}
body:not(.light-mode) .brand-divider{background:#39ff1438}body:not(.light-mode) .brand>span:last-child{color:#789581}body:not(.light-mode) .brand strong,body:not(.light-mode) .top-link{color:#d9f7dc}body:not(.light-mode) .account-button{border-color:#2dc64d66;background:#07100a;color:#74ff7d;box-shadow:0 0 16px #39ff1412}
body:not(.light-mode) .eyebrow{color:#66e77b}body:not(.light-mode) .title-dot{color:#65ff52}body:not(.light-mode) .page-intro,body:not(.light-mode) .section-heading p{color:#8da296}
body:not(.light-mode) .button-primary{background:#58f24f;color:#021005;border-color:#80ff70;box-shadow:0 0 18px #39ff1422}body:not(.light-mode) .button-primary:hover{background:#72ff65;box-shadow:0 0 24px #39ff1438}
body:not(.light-mode) .button-outline,body:not(.light-mode) .icon-button,body:not(.light-mode) .export-button{background:#070c08;border-color:#1f7f38;color:#baf7c1}body:not(.light-mode) .button-outline:hover,body:not(.light-mode) .icon-button:hover,body:not(.light-mode) .export-button:hover{background:#0b1710;border-color:#3eea62;box-shadow:0 0 14px #39ff1418}
body:not(.light-mode) .connection-badge{color:#a7c5ae}body:not(.light-mode) .connection-badge.live{color:#5cff83}body:not(.light-mode) .status-dot{background:#7d927f}body:not(.light-mode) .live .status-dot{background:#46ff79;box-shadow:0 0 0 3px #46ff7920,0 0 10px #46ff7955}
body:not(.light-mode) .notice{background:#07140b;border-color:#1c6331;color:#9cc5a4}body:not(.light-mode) .notice strong{color:#d6f7da}body:not(.light-mode) .alert,body:not(.light-mode) .form-error{background:#1a0c09;border-color:#7e3428;color:#ff9f8c}
body:not(.light-mode) .stats,body:not(.light-mode) .monitor-window,body:not(.light-mode) .table-wrap{background:#070b08;border-color:#1d7134;box-shadow:0 8px 34px #0007,0 0 24px #39ff1408}
body:not(.light-mode) .stat+.stat:before{background:#153c23}body:not(.light-mode) .stat p{color:#91ad98}body:not(.light-mode) .stat-foot{color:#6e8675}body:not(.light-mode) .stat-icon,body:not(.light-mode) .stat-icon.green,body:not(.light-mode) .stat-icon.amber,body:not(.light-mode) .avatar{background:#0c1c11;color:#66ff7b;border:1px solid #1d713455}
body:not(.light-mode) .window-toolbar,body:not(.light-mode) .window-footer{background:#060a07;border-color:#173f25}body:not(.light-mode) .view-tab{color:#789281}body:not(.light-mode) .view-tab.active{color:#c8f7ce}body:not(.light-mode) .view-tab.active:after{background:#56ff6d;box-shadow:0 0 12px #39ff1466}body:not(.light-mode) .read-time,body:not(.light-mode) .legend,body:not(.light-mode) .source-label{color:#789080}
body:not(.light-mode) .map-panel,body:not(.light-mode) .map-panel #map{background:#050806}body:not(.light-mode) .leaflet-tile-pane{filter:brightness(.54) invert(1) contrast(1.32) hue-rotate(155deg) saturate(.42)}
body:not(.light-mode) .map-label,body:not(.light-mode) .fit-button{background:#061009eF;border:1px solid #2aa84a;color:#c7f9ce;box-shadow:0 0 18px #39ff141d}body:not(.light-mode) .map-label .status-dot{background:#58ff70;box-shadow:0 0 10px #58ff70}
body:not(.light-mode) .leaflet-control-zoom{border-color:#247b38!important;box-shadow:0 0 16px #39ff1418!important}body:not(.light-mode) .leaflet-control-zoom a{background:#061009!important;color:#79ff87!important;border-color:#173f25!important}body:not(.light-mode) .leaflet-control-attribution{background:#040804e8!important;color:#6f8b76!important}body:not(.light-mode) .leaflet-control-attribution a{color:#79d98a!important}
body:not(.light-mode) .leaflet-popup-content-wrapper,body:not(.light-mode) .leaflet-popup-tip{background:#07100a;color:#d9f5dd}body:not(.light-mode) .leaflet-popup-content-wrapper{border:1px solid #247b38;box-shadow:0 8px 30px #0009,0 0 18px #39ff1415}body:not(.light-mode) .leaflet-popup-close-button{color:#7eff8a!important}
body:not(.light-mode) .guard-pin{background:#12823a;border-color:#63ff7b;box-shadow:0 0 16px #39ff1450}body:not(.light-mode) .guard-pin.offline{background:#755a27;border-color:#d4aa55}body:not(.light-mode) .guard-pin.unknown{background:#435048;border-color:#8fa297}body:not(.light-mode) .guard-pin.selected{background:#020703;color:#7dff70;border-color:#7dff70;box-shadow:0 0 24px #39ff1470}body:not(.light-mode) .marker-name{background:#061009ef;border-color:#247b38;color:#bdf6c4;box-shadow:0 0 12px #39ff1414}
body:not(.light-mode) .selected-card,body:not(.light-mode) .route-summary-card,body:not(.light-mode) .map-empty{background:#061009f2;border-color:#247b38;color:#dff8e2;box-shadow:0 8px 30px #0009,0 0 18px #39ff1412}body:not(.light-mode) .selected-top small,body:not(.light-mode) .selected-time,body:not(.light-mode) .selected-full-address,body:not(.light-mode) .selected-geocode-source{color:#7f9986}body:not(.light-mode) .selected-address{color:#b6d8bc;border-color:#173f25}body:not(.light-mode) .selected-street{color:#e6f9e8}
body:not(.light-mode) .route-summary-card strong{color:#e5f8e7}body:not(.light-mode) .route-summary-card .route-meta,body:not(.light-mode) .route-help{color:#84a08b}body:not(.light-mode) .route-summary-card .route-stops{border-color:#173f25}body:not(.light-mode) .route-summary-card button{color:#68ff7a}body:not(.light-mode) .route-main-line{filter:drop-shadow(0 0 4px #39ff14)}body:not(.light-mode) .route-arrow{background:#041007;border-color:#67ff78;color:#67ff78;box-shadow:0 0 14px #39ff144f}body:not(.light-mode) .route-seq{background:#123d20;border-color:#65ff75;color:#effff1}body:not(.light-mode) .route-arrow-wrap.revisit .route-arrow{background:#151407;border-color:#d5c04e}body:not(.light-mode) .route-revisit-badge{background:#9b7a23;border-color:#f1db6f}body:not(.light-mode) .route-popup,body:not(.light-mode) .route-stop-popup{color:#ddf5e0}body:not(.light-mode) .route-popup-avatar{background:#0c2514;color:#69ff7d}body:not(.light-mode) .route-popup-head small,body:not(.light-mode) .route-popup-address span,body:not(.light-mode) .route-popup-meta,body:not(.light-mode) .route-stop-popup span{color:#84a08a}body:not(.light-mode) .route-popup-address{border-color:#1d4e2c}
body:not(.light-mode) .section-title h2{color:#eaf6eb}body:not(.light-mode) .count-badge{background:#0b1a10;border-color:#1c6931;color:#70ef83}body:not(.light-mode) .search-field,body:not(.light-mode) .list-controls select{background:#060b07;border-color:#1f6d34;color:#d9f1dd}body:not(.light-mode) .search-field:focus-within{outline-color:#45e762}body:not(.light-mode) input::placeholder{color:#657b6b}
body:not(.light-mode) th{background:#08100a;color:#7f9986;border-color:#173f25}body:not(.light-mode) td{border-color:#112e1c}body:not(.light-mode) tbody tr:hover{background:#0a140d}body:not(.light-mode) tbody tr.selected{background:#0c1b10}body:not(.light-mode) tbody tr.selected td:first-child{box-shadow:inset 3px 0 #54ff6a}body:not(.light-mode) .address-line,body:not(.light-mode) .guard-name strong,body:not(.light-mode) .report-time{color:#d8efdc}body:not(.light-mode) .coordinate-line,body:not(.light-mode) .report-date,body:not(.light-mode) .report-age,body:not(.light-mode) .user-names,body:not(.light-mode) .table-footer,body:not(.light-mode) .page-footer{color:#799080}body:not(.light-mode) .status-pill.online{background:#0a2413;color:#63ff7d;border-color:#1c7135}body:not(.light-mode) .status-pill.offline{background:#241c0c;color:#e2b65d;border-color:#715721}body:not(.light-mode) .status-pill.unknown{background:#151a17;color:#a6b7aa;border-color:#3f4e43}body:not(.light-mode) .row-map-button{color:#6fff7d}
body:not(.light-mode) dialog{background:#07100a;color:#e9f8eb;border-color:#2ba749;box-shadow:0 25px 90px #000c,0 0 26px #39ff1415}body:not(.light-mode) dialog::backdrop{background:#010401d9;backdrop-filter:blur(7px)}body:not(.light-mode) .dialog-symbol{background:#57ff63;color:#042007;box-shadow:0 0 22px #39ff1440}body:not(.light-mode) #login-description,body:not(.light-mode) #history-description{color:#91a798}body:not(.light-mode) .server-chip{background:#0a160d;border-color:#1c6030;color:#a7cdb0}body:not(.light-mode) #login-form input,body:not(.light-mode) #history-form input,body:not(.light-mode) #history-form select,body:not(.light-mode) #route-form input,body:not(.light-mode) #route-form select{background:#050906;border-color:#206f36;color:#e6f6e8}body:not(.light-mode) .password-field button{color:#72e983}body:not(.light-mode) .history-hint,body:not(.light-mode) .privacy-note,body:not(.light-mode) .setup-link{color:#76917d}
body:not(.light-mode) .geofence-label{background:#07140b;border-color:#2dc253;color:#9cffaa}body:not(.light-mode) .poi-icon span{background:#07100a;border-color:#42e568;box-shadow:0 0 13px #39ff142e}body:not(.light-mode) .poi-popup span,body:not(.light-mode) .poi-popup small{color:#809a87}
body:not(.light-mode) .toast{background:#061009;color:#dcfbe0;border:1px solid #36ce55;box-shadow:0 8px 34px #000a,0 0 22px #39ff1423}
body:not(.light-mode) .monitor-window:fullscreen,body:not(.light-mode) .monitor-window.expanded{background:#050806}
body:not(.light-mode) *{scrollbar-color:#246d38 #07100a;scrollbar-width:thin}
@media(max-width:760px){.theme-toggle{width:32px;height:32px}.theme-toggle .icon{width:16px;height:16px}body:not(.light-mode) .locations tr{border-color:#153b23}body:not(.light-mode) .locations td:nth-child(3){border-color:#153b23}}


/* Mobile compact selected-card optimization */
@media(max-width:760px){
  .selected-card{
    left:10px;
    bottom:10px;
    width:min(210px,calc(100% - 20px));
    padding:10px 11px;
    border-radius:9px;
  }
  .selected-top{gap:8px;margin-bottom:8px}
  .selected-top strong{font-size:.8125rem;line-height:1.2}
  .selected-top small{font-size:.625rem;margin-top:2px;line-height:1.25}
  .avatar{width:32px;height:32px;border-radius:8px}
  .selected-address{
    padding-top:8px;
    gap:6px;
    font-size:.75rem;
    line-height:1.3;
  }
  .selected-address .icon{width:12px;height:14px;margin-top:1px}
  .selected-address>span{display:block;min-width:0}
  .selected-street{display:block;font-size:.78125rem;line-height:1.25}
  .selected-full-address{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    overflow:hidden;
    margin-top:2px;
  }
  .selected-geocode-source{display:none}
  .selected-time{margin:6px 0 0 18px;font-size:.625rem;line-height:1.35}
  .selected-time .accuracy-line{display:block;margin-top:2px}
  .selected-card:not([hidden])~.route-summary-card{bottom:150px}
}
@media(max-width:430px){
  .selected-card{
    left:9px;
    bottom:9px;
    width:min(190px,calc(100% - 18px));
    padding:9px 10px;
  }
  .selected-top{gap:7px;margin-bottom:7px}
  .selected-top strong{font-size:.78125rem}
  .selected-top small{font-size:.59375rem}
  .selected-address{font-size:.71875rem;line-height:1.25}
  .selected-street{font-size:.75rem}
  .selected-full-address{display:none}
  .selected-time{margin-left:17px;font-size:.59375rem}
  .selected-card:not([hidden])~.route-summary-card{bottom:138px}
}


/* v3.5 · grupos, bitácora operativa y tarjeta móvil compacta */
.group-link-line{stroke:#4ecf69;filter:drop-shadow(0 0 3px #39ff1440)}
.group-map-label-wrap,.event-map-wrap,.route-endpoint-wrap{background:transparent!important;border:0!important}
.group-map-label{min-width:118px;max-width:155px;padding:5px 9px;border-radius:8px;background:#f8fff5e8;border:1px solid #75a45c;box-shadow:0 4px 14px #24351a22;display:flex;flex-direction:column;align-items:center;text-align:center;line-height:1.15;color:#33452d;backdrop-filter:blur(4px)}
.group-map-label b{font-size:.68rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:138px}.group-map-label small{font-size:.55rem;color:#70806a;margin-top:2px}
.group-popup,.event-popup{display:flex;flex-direction:column;gap:5px;min-width:210px}.group-popup>span,.group-popup>small,.event-popup>span,.event-popup>small{color:#70806a;font-size:.72rem;line-height:1.4}.event-popup p{margin:3px 0 0;padding-top:6px;border-top:1px solid #e5eadf;font-size:.76rem;line-height:1.4}
.event-map-icon{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#fff;border:2px solid #527b38;color:#355b25;font-size:.7rem;font-weight:800;box-shadow:0 3px 10px #1c2d1738}.event-map-icon.event-contratiempo{border-color:#b75b47;color:#913d2d}.event-map-icon.event-descanso{border-color:#5b78a9;color:#375985}.event-map-icon.event-parada{border-color:#b48739;color:#86611e}
.route-endpoint{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#fff;border:3px solid #4a8c52;box-shadow:0 3px 13px #1c2d1744;color:#34723e;font-size:15px}.route-endpoint.flag{border-color:#3d5f86;color:#284e78}
.route-endpoints{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}.route-endpoints>div{border:1px solid #e0e7da;border-radius:8px;padding:7px;min-width:0}.route-endpoints b,.route-endpoints span,.route-endpoints small{display:block}.route-endpoints b{font-size:.67rem;text-transform:uppercase;letter-spacing:.05em}.route-endpoints span{font-size:.68rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.route-endpoints small,.route-stop small{font-size:.6rem;color:#899482;margin-top:2px;display:block}.route-events{max-height:95px!important}.route-event-item{border-left:2px solid #ad7135;padding-left:7px!important}

.ops-dialog{width:min(780px,calc(100% - 30px))}.event-dialog{width:min(520px,calc(100% - 30px))}.ops-description{font-size:.83rem;line-height:1.55;color:#77816f;margin-bottom:18px}.groups-layout{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(300px,1.2fr);gap:22px;align-items:start}.ops-section-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:9px;font-size:.82rem}.groups-list{display:flex;flex-direction:column;gap:8px;max-height:465px;overflow:auto;padding-right:3px}.group-card{border:1px solid #e0e6db;border-radius:10px;padding:10px 11px;display:flex;justify-content:space-between;gap:9px;background:#fafbf8}.group-card>div:first-child{min-width:0}.group-card strong{font-size:.78rem;display:block}.group-card small{display:block;color:#7d8775;font-size:.66rem;line-height:1.35;margin-top:3px}.group-card p{font-size:.62rem;line-height:1.4;color:#90998b;margin-top:5px}.group-card-actions{display:flex;flex-direction:column;gap:3px;flex-shrink:0}.group-card-actions button{border:0;background:transparent;color:#617348;font-size:.66rem;font-weight:650;padding:3px}
#group-form label,.event-dialog form label{display:block;font-size:.76rem;font-weight:600;margin:11px 0 5px}#group-form input,.event-dialog form input,.event-dialog form select,.event-dialog form textarea{width:100%;border:1px solid #dbe2d3;padding:9px 10px;background:white;color:var(--ink);border-radius:8px}.event-dialog form textarea{resize:vertical;min-height:74px;font:inherit;font-size:.82rem}.ops-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 10px}.members-fieldset{border:1px solid #e1e7db;border-radius:10px;margin:14px 0;padding:10px}.members-fieldset legend{font-size:.72rem;font-weight:650;padding:0 5px}.member-checks{display:grid;grid-template-columns:1fr 1fr;gap:7px;max-height:210px;overflow:auto}.member-check{display:flex!important;align-items:center;gap:8px;border:1px solid #e7ebe3;border-radius:8px;padding:7px;margin:0!important;background:#fbfcfa;cursor:pointer}.member-check input{width:16px!important;height:16px;margin:0}.member-check span{min-width:0}.member-check strong,.member-check small{display:block}.member-check strong{font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.member-check small{font-size:.6rem;color:#899283;margin-top:2px}.ops-empty{font-size:.72rem;color:#8a9483;line-height:1.45;padding:10px 2px}#group-save,.event-dialog form .button{width:100%;margin-top:8px}.event-location-preview{display:flex;align-items:flex-start;gap:8px;padding:9px 10px;margin-top:12px;border:1px solid #dde5d7;border-radius:8px;background:#f7f9f4;color:#687661}.event-location-preview .icon{width:15px;height:17px}.event-location-preview span,.event-location-preview strong,.event-location-preview small{display:block}.event-location-preview strong{font-size:.69rem}.event-location-preview small{font-size:.64rem;line-height:1.4;margin-top:2px}.recent-events{margin-top:18px;padding-top:13px;border-top:1px solid #e2e8dc}.recent-events>strong{font-size:.76rem}.events-list{display:flex;flex-direction:column;gap:6px;margin-top:8px;max-height:210px;overflow:auto}.event-row{display:grid;grid-template-columns:24px 1fr 24px;gap:8px;align-items:start;padding:7px;border:1px solid #e5eae0;border-radius:8px}.event-dot{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;border:1px solid #6a8555;font-size:.6rem;font-weight:800}.event-dot.event-contratiempo{border-color:#ad5a49}.event-dot.event-descanso{border-color:#5874a3}.event-row strong,.event-row small,.event-row p{display:block}.event-row strong{font-size:.68rem}.event-row small{font-size:.59rem;color:#8b9585;margin-top:2px}.event-row p{font-size:.64rem;line-height:1.3;color:#6f7b69;margin-top:3px}.event-row button{border:0;background:transparent;color:#8b9485;font-size:1rem;line-height:1;padding:1px}

body:not(.light-mode) .group-map-label{background:#061009ef;border-color:#30bd50;color:#c9f7ce;box-shadow:0 0 15px #39ff1424}body:not(.light-mode) .group-map-label small{color:#7f9a85}body:not(.light-mode) .group-link-line{stroke:#59ff70;filter:drop-shadow(0 0 4px #39ff1460)}body:not(.light-mode) .event-map-icon,body:not(.light-mode) .route-endpoint{background:#061009;border-color:#5dff74;color:#79ff8a;box-shadow:0 0 14px #39ff143f}body:not(.light-mode) .event-map-icon.event-contratiempo{border-color:#ff806d;color:#ff9d8e}body:not(.light-mode) .event-map-icon.event-descanso{border-color:#79a8ff;color:#a8c6ff}body:not(.light-mode) .route-endpoint.flag{border-color:#78aaff;color:#a9c6ff}body:not(.light-mode) .group-popup>span,body:not(.light-mode) .group-popup>small,body:not(.light-mode) .event-popup>span,body:not(.light-mode) .event-popup>small{color:#86a08c}body:not(.light-mode) .event-popup p{border-color:#173f25}body:not(.light-mode) .route-endpoints>div{border-color:#1a5130;background:#07120a}body:not(.light-mode) .route-endpoints small,body:not(.light-mode) .route-stop small{color:#789080}
body:not(.light-mode) .ops-description{color:#8ca294}body:not(.light-mode) .group-card,body:not(.light-mode) .member-check,body:not(.light-mode) .event-row{background:#07120a;border-color:#1c5e30}body:not(.light-mode) .group-card small,body:not(.light-mode) .group-card p,body:not(.light-mode) .member-check small,body:not(.light-mode) .event-row small,body:not(.light-mode) .event-row p{color:#789080}body:not(.light-mode) .group-card-actions button{color:#72f286}body:not(.light-mode) #group-form input,body:not(.light-mode) .event-dialog form input,body:not(.light-mode) .event-dialog form select,body:not(.light-mode) .event-dialog form textarea{background:#050906;border-color:#206f36;color:#e6f6e8}body:not(.light-mode) .members-fieldset{border-color:#1b5830}body:not(.light-mode) .event-location-preview{background:#07150b;border-color:#1d6633;color:#a5c6ac}body:not(.light-mode) .recent-events{border-color:#173f25}

@media(max-width:760px){
  .ops-dialog{padding:22px;width:calc(100% - 18px);max-width:none}.groups-layout{grid-template-columns:1fr;gap:16px}.groups-list{max-height:200px}.ops-grid{grid-template-columns:1fr 1fr}.member-checks{grid-template-columns:1fr 1fr;max-height:170px}.route-endpoints{grid-template-columns:1fr}.route-summary-card{max-height:58%;overflow:auto}
  .selected-card{left:8px;bottom:8px;width:min(205px,calc(100% - 70px));padding:8px 9px}.selected-top{margin-bottom:5px}.selected-top .avatar{width:29px;height:29px}.selected-address{padding-top:5px;font-size:.69rem;line-height:1.2}.selected-full-address,.selected-geocode-source,.accuracy-line{display:none!important}.selected-time{margin:4px 0 0 17px;font-size:.58rem;line-height:1.2}.selected-top small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:132px}.selected-card:not([hidden])~.route-summary-card{bottom:118px}
}
@media(max-width:430px){.ops-grid,.member-checks{grid-template-columns:1fr}.selected-card{width:min(190px,calc(100% - 62px));padding:7px 8px}.selected-top .avatar{width:27px;height:27px}.selected-address{font-size:.66rem}.selected-time{font-size:.56rem}.selected-card:not([hidden])~.route-summary-card{bottom:108px}}

/* v3.6 · tarjeta GPS móvil ultracompacta */
@media(max-width:760px){
  .map-label{left:8px;top:8px;padding:6px 8px;border-radius:7px;font-size:.56rem;max-width:155px;line-height:1.15}
  .fit-button{right:8px;top:8px;padding:6px 8px;font-size:.66rem;min-height:31px;border-radius:7px}
  .fit-button .icon{width:14px;height:14px}

  .selected-card{
    left:7px!important;
    bottom:38px!important;
    width:min(188px,calc(100% - 64px))!important;
    max-height:92px;
    overflow:hidden;
    padding:7px 8px!important;
    border-radius:8px!important;
    box-shadow:0 5px 16px #0003!important;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
  }
  .selected-top{gap:6px!important;margin-bottom:4px!important;min-width:0}
  .selected-top .avatar{width:25px!important;height:25px!important;border-radius:7px!important}
  .selected-top .avatar .icon{width:13px!important;height:13px!important}
  .selected-top>div{min-width:0;flex:1}
  .selected-top strong{font-size:.70rem!important;line-height:1.1!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .selected-top small{font-size:.52rem!important;line-height:1.1!important;margin-top:2px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:125px!important}
  .selected-top>.status-dot{width:6px!important;height:6px!important;flex:0 0 6px!important}
  .selected-address{padding-top:4px!important;gap:4px!important;font-size:.60rem!important;line-height:1.12!important;min-width:0}
  .selected-address .icon{width:10px!important;height:12px!important;margin-top:0!important;flex:0 0 10px}
  .selected-address>span{min-width:0;overflow:hidden}
  .selected-street{font-size:.62rem!important;line-height:1.12!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .selected-full-address,.selected-geocode-source,.accuracy-line{display:none!important}
  .selected-time{margin:3px 0 0 14px!important;font-size:.50rem!important;line-height:1.1!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .selected-card:not([hidden])~.route-summary-card{bottom:142px!important}

  /* Un toque amplía la ficha; otro toque vuelve al modo compacto. */
  .selected-card.mobile-expanded{
    width:min(320px,calc(100% - 14px))!important;
    max-height:230px;
    padding:11px 12px!important;
    bottom:34px!important;
    overflow:auto;
  }
  .selected-card.mobile-expanded .selected-top{gap:8px!important;margin-bottom:8px!important}
  .selected-card.mobile-expanded .selected-top .avatar{width:32px!important;height:32px!important}
  .selected-card.mobile-expanded .selected-top strong{font-size:.80rem!important}
  .selected-card.mobile-expanded .selected-top small{font-size:.61rem!important;max-width:none!important}
  .selected-card.mobile-expanded .selected-address{padding-top:8px!important;gap:6px!important;font-size:.72rem!important;line-height:1.3!important}
  .selected-card.mobile-expanded .selected-address .icon{width:13px!important;height:15px!important}
  .selected-card.mobile-expanded .selected-street{font-size:.75rem!important;line-height:1.25!important;white-space:normal}
  .selected-card.mobile-expanded .selected-full-address{display:block!important;font-size:.66rem;margin-top:3px;line-height:1.3}
  .selected-card.mobile-expanded .selected-geocode-source{display:block!important;font-size:.55rem;margin-top:4px}
  .selected-card.mobile-expanded .selected-time{margin:6px 0 0 19px!important;font-size:.60rem!important;white-space:normal;line-height:1.3!important}
  .selected-card.mobile-expanded .accuracy-line{display:block!important;margin-top:2px}
  .selected-card.mobile-expanded:not([hidden])~.route-summary-card{bottom:260px!important}
}
@media(max-width:430px){
  .map-label{max-width:142px;padding:5px 7px;font-size:.53rem}
  .fit-button{width:31px;height:31px;padding:0;font-size:0;display:grid;place-items:center}
  .fit-button .icon{width:15px;height:15px}
  .selected-card{width:min(176px,calc(100% - 58px))!important;max-height:88px;bottom:36px!important;padding:6px 7px!important}
  .selected-top .avatar{width:23px!important;height:23px!important}
  .selected-top strong{font-size:.67rem!important}
  .selected-top small{font-size:.49rem!important;max-width:112px!important}
  .selected-address{font-size:.57rem!important}.selected-street{font-size:.59rem!important}.selected-time{font-size:.48rem!important}
  .selected-card.mobile-expanded{width:calc(100% - 12px)!important;max-height:215px;left:6px!important}
}


/* v3.7 · resumen de recorrido minimizable para liberar el mapa */
.route-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.route-summary-heading{min-width:0;flex:1}
.route-summary-heading>strong{margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.route-summary-mini{display:none;color:#718066;font-size:.66rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.route-summary-toggle{width:30px;height:30px!important;min-width:30px;padding:0!important;display:grid;place-items:center;border:1px solid #dbe3d5!important;border-radius:8px!important;background:#f8faf5!important;color:#4f623f!important}
.route-summary-toggle .icon{width:15px;height:15px}
.route-summary-card.collapsed{width:auto;max-width:min(245px,calc(100% - 72px));padding:8px 9px;overflow:visible!important;max-height:none!important}
.route-summary-card.collapsed .route-summary-body{display:none}
.route-summary-card.collapsed .route-summary-mini{display:block}
.route-summary-card.collapsed .route-summary-head{align-items:center}
.route-summary-card.collapsed .route-summary-toggle{width:28px;height:28px!important;min-width:28px}
body:not(.light-mode) .route-summary-toggle{background:#07150b!important;border-color:#2c8d43!important;color:#73ff82!important}
body:not(.light-mode) .route-summary-card.collapsed .route-summary-mini{color:#8bad92}

@media(max-width:760px){
  .route-summary-card{left:8px!important;right:8px!important;bottom:148px!important;max-height:42%!important;overflow:auto;border-radius:11px;padding:10px 11px}
  .selected-card.mobile-expanded:not([hidden])~.route-summary-card:not(.collapsed){bottom:260px!important}
  .route-summary-card.collapsed{left:8px!important;right:auto!important;top:48px!important;bottom:auto!important;width:auto!important;max-width:calc(100% - 64px)!important;padding:7px 8px!important;box-shadow:0 4px 14px #0003!important}
  .selected-card:not([hidden])~.route-summary-card.collapsed,.selected-card.mobile-expanded:not([hidden])~.route-summary-card.collapsed{bottom:auto!important}
  .route-summary-card.collapsed .route-summary-heading>strong{font-size:.70rem!important;line-height:1.15}
  .route-summary-card.collapsed .route-summary-mini{font-size:.56rem;max-width:160px}
  .route-summary-card.collapsed .route-summary-toggle{width:27px!important;height:27px!important;min-width:27px!important}
}
@media(max-width:430px){
  .route-summary-card:not(.collapsed){bottom:132px!important;max-height:38%!important}
  .route-summary-card.collapsed{top:44px!important;max-width:calc(100% - 54px)!important}
  .route-summary-card.collapsed .route-summary-mini{max-width:145px}
}

.route-history-dot{stroke:#425f30;fill:#c7ec63;filter:drop-shadow(0 0 2px #20311855)}
body:not(.light-mode) .route-history-dot{stroke:#0b2010;fill:#71ff82;filter:drop-shadow(0 0 3px #39ff1470)}


/* v3.8 · panel de recorrido cerrable y mejor densidad visual */
.map-tool-button.active-tool{background:#eaf8e8;border-color:#8dbb6d;color:#305126;box-shadow:0 0 0 1px #d9ecd5 inset}
body:not(.light-mode) .map-tool-button.active-tool{background:#08170c;border-color:#39ff5a;color:#88ff97;box-shadow:0 0 14px #39ff1428,0 0 0 1px #1f7a34 inset}
.route-summary-actions{display:flex;align-items:center;gap:6px;flex-shrink:0}
.route-summary-close .icon{width:13px;height:13px}
.route-summary-card[hidden]{display:none!important}
@media(max-width:760px){
  .route-summary-actions{gap:5px}
  .route-summary-toggle,.route-summary-close{width:28px!important;height:28px!important;min-width:28px!important}
}


/* v3.9 · Entorno en toda el área visible */
.map-tool-button.loading-tool .icon{animation:p1sPulse 1s ease-in-out infinite}
@keyframes p1sPulse{0%,100%{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1.08)}}
.poi-icon span{font-weight:800;font-family:system-ui,-apple-system,Segoe UI,sans-serif}
.poi-traffic_signal span{border-color:#87a43e!important;background:#f8fff0!important}
.poi-hospital span{border-color:#a44343!important;color:#8d3030!important}
.poi-fire_station span{border-color:#c16b36!important;color:#a34b1f!important}
.poi-fuel span{border-color:#4e6f88!important}
.poi-toll span{border-color:#82683a!important;color:#685225!important}
body:not(.light-mode) .poi-icon span{background:#061009!important;box-shadow:0 0 12px #39ff1422!important}
body:not(.light-mode) .poi-traffic_signal span{border-color:#73ff82!important;color:#eaffed!important}
body:not(.light-mode) .poi-hospital span{border-color:#ff6868!important;color:#ffb2b2!important}
body:not(.light-mode) .poi-fire_station span{border-color:#ff934d!important;color:#ffc49d!important}
body:not(.light-mode) .poi-fuel span{border-color:#6fb8ff!important;color:#b9ddff!important}
body:not(.light-mode) .poi-toll span{border-color:#e4c36b!important;color:#ffeba9!important}


/* v4.0 · Entorno resiliente: reintentos, caché y estado compacto */
.map-tool-button.tool-warning{border-color:#b99b43!important;box-shadow:0 0 0 1px #b99b432b inset!important}
body:not(.light-mode) .map-tool-button.tool-warning{border-color:#e6ca5d!important;color:#f2dc7a!important;box-shadow:0 0 12px #e6ca5d24!important}
@media(max-width:760px){
  .toast{max-width:min(250px,76vw);padding:9px 12px;font-size:.72rem;line-height:1.35;border-radius:8px;bottom:18px;text-align:left}
}


/* v4.1 · Paradas 10+ min y alarma SOS */
.stop-icon.stop-long{border-color:#a66a20!important;background:#fff2d8!important;box-shadow:0 0 0 3px #f2b64d2b,0 4px 12px #4f351b33!important}
body:not(.light-mode) .stop-icon.stop-long{background:#160d03!important;border-color:#ffae3f!important;color:#ffd28a!important;box-shadow:0 0 14px #ff9f2440!important}
.sos-sound-button{position:relative}
.sos-sound-button.sos-active{border-color:#ff3434!important;color:#c51616!important;background:#fff0f0!important;animation:sosButtonPulse .75s ease-in-out infinite alternate}
body:not(.light-mode) .sos-sound-button.sos-active{border-color:#ff4f4f!important;color:#ff7b7b!important;background:#250707!important;box-shadow:0 0 18px #ff26265c!important}
@keyframes sosButtonPulse{from{transform:scale(1)}to{transform:scale(1.05)}}
.sos-settings-dialog{max-width:460px}
.sos-symbol{background:#fff0f0!important;color:#b62828!important}
body:not(.light-mode) .sos-symbol{background:#260909!important;color:#ff6363!important}
.sos-volume-label{display:flex!important;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 8px!important}
.sos-volume-label>span{display:flex;align-items:center;gap:8px}.sos-volume-label .icon{width:18px;height:18px}
.sos-volume{width:100%;accent-color:#d42b2b}
.sos-alert{position:fixed;z-index:5000;right:18px;top:88px;width:min(390px,calc(100vw - 36px));padding:18px;border:2px solid #e12f2f;border-radius:16px;background:#fff7f7;color:#321010;box-shadow:0 18px 60px #5f08083d;animation:sosAlertPulse 1s ease-in-out infinite alternate}
.sos-alert[hidden]{display:none!important}
.sos-alert-head{display:flex;align-items:center;gap:12px}.sos-alert-head small{display:block;font-size:.72rem;font-weight:900;letter-spacing:.12em;color:#b51616}.sos-alert-head strong{display:block;font-size:1.15rem;margin-top:2px}.sos-alert-icon{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:#d72d2d;color:white}.sos-alert-icon .icon{width:24px;height:24px}.sos-alert p{margin:10px 0 0;font-size:.82rem;line-height:1.4}.sos-alert-actions{display:flex;gap:8px;margin-top:14px}.sos-alert-actions button{flex:1;border:1px solid #d95a5a;background:white;color:#8c1a1a;border-radius:9px;padding:9px 10px;font-weight:700}.sos-alert-actions button:last-child{background:#c91f1f;color:white;border-color:#c91f1f}
body:not(.light-mode) .sos-alert{background:#160606;color:#ffe8e8;border-color:#ff4c4c;box-shadow:0 18px 60px #000a,0 0 26px #ff24243b}body:not(.light-mode) .sos-alert p{color:#e5bcbc}body:not(.light-mode) .sos-alert-actions button{background:#240909;color:#ffb2b2;border-color:#7b2626}body:not(.light-mode) .sos-alert-actions button:last-child{background:#d22d2d;color:white;border-color:#ff5353}
@keyframes sosAlertPulse{from{box-shadow:0 18px 60px #5f08083d}to{box-shadow:0 18px 60px #5f08085c,0 0 26px #e12f2f55}}
@media(max-width:760px){.sos-alert{top:82px;left:10px;right:10px;width:auto;padding:14px;border-radius:13px}.sos-alert-head strong{font-size:1rem}.sos-alert p{font-size:.74rem}.sos-alert-actions{flex-direction:column}.sos-alert-actions button{min-height:38px}}


/* v4.2 · Alertas de resguardo detenido: 10 min + repetición cada 40 min */
.stop-notify-settings{margin-top:18px;padding-top:15px;border-top:1px solid #e7e9e3}.stop-notify-settings>strong{display:block;font-size:.86rem}.stop-notify-settings>p{margin:6px 0 12px;color:#77806f;font-size:.76rem;line-height:1.45}.stop-notify-settings .button{width:100%;justify-content:center}
body:not(.light-mode) .stop-notify-settings{border-color:#173f25}body:not(.light-mode) .stop-notify-settings>p{color:#829489}
.stop-alert{position:fixed;z-index:4900;right:18px;top:88px;width:min(410px,calc(100vw - 36px));padding:16px;border:2px solid #e49528;border-radius:15px;background:#fffaf0;color:#39260d;box-shadow:0 16px 55px #6a421d35}
.stop-alert[hidden]{display:none!important}.stop-alert-head{display:flex;align-items:center;gap:11px}.stop-alert-head small{display:block;font-size:.70rem;font-weight:900;letter-spacing:.10em;color:#9c5e12}.stop-alert-head strong{display:block;font-size:1.08rem;margin-top:2px}.stop-alert-icon{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;background:#e59427;color:white}.stop-alert-icon .icon{width:22px;height:22px}.stop-alert p{margin:9px 0 0;font-size:.80rem;line-height:1.4}.stop-alert-actions{display:flex;gap:7px;margin-top:13px}.stop-alert-actions button{flex:1;border:1px solid #d7a154;background:white;color:#75501d;border-radius:8px;padding:8px 9px;font-weight:700;font-size:.75rem}.stop-alert-actions button:first-child{background:#e59427;color:#241604;border-color:#e59427}
body:not(.light-mode) .stop-alert{background:#130d04;color:#ffe8bd;border-color:#ffad37;box-shadow:0 16px 55px #000a,0 0 20px #ff9c2438}body:not(.light-mode) .stop-alert p{color:#ddc49c}body:not(.light-mode) .stop-alert-actions button{background:#211507;color:#ffd798;border-color:#70491d}body:not(.light-mode) .stop-alert-actions button:first-child{background:#e89024;color:#170e02;border-color:#ffb64d}
@media(max-width:760px){.stop-alert{top:82px;left:10px;right:10px;width:auto;padding:13px;border-radius:12px}.stop-alert-head strong{font-size:.96rem}.stop-alert p{font-size:.72rem}.stop-alert-actions{display:grid;grid-template-columns:1fr 1fr}.stop-alert-actions button:first-child{grid-column:1 / 3}.stop-alert-actions button{min-height:37px}}


/* v4.3 · reporte profesional de flotas */
.fleet-export-button{border-color:#9bc58f;background:#f5fff4}
body:not(.light-mode) .fleet-export-button{background:#07150b;border-color:#2c9143;color:#82ff91}
@media(max-width:760px){.list-controls .fleet-export-button{width:100%;justify-content:center}}

/* v4.7 · colores de estado más claros en modo oscuro */
body:not(.light-mode) .selected-top .status-dot.online{background:#46ff79!important;box-shadow:0 0 0 3px #46ff7920,0 0 10px #46ff7955}
body:not(.light-mode) .selected-top .status-dot.offline{background:#d8b15b!important;box-shadow:0 0 0 3px #d8b15b1e,0 0 10px #d8b15b33}
body:not(.light-mode) .selected-top .status-dot.unknown{background:#98a59d!important;box-shadow:0 0 0 3px #98a59d1c}
body:not(.light-mode) .selected-top.status-online strong{color:#7dff70!important}
body:not(.light-mode) .selected-top.status-offline strong{color:#f0d48c!important}
body:not(.light-mode) .selected-top.status-unknown strong{color:#dff8e2!important}
body:not(.light-mode) .marker-name.marker-name-online{color:#7dff70!important;border-color:#2dbd4f!important;box-shadow:0 0 14px #39ff1426!important}
body:not(.light-mode) .marker-name.marker-name-offline{color:#f0d48c!important;border-color:#b98b3f!important;box-shadow:0 0 12px #d8b15b1f!important}
body:not(.light-mode) .marker-name.marker-name-unknown{color:#d7e5da!important;border-color:#587062!important}


/* v4.8 · leyenda de estados con colores inequívocos en modo oscuro */
body:not(.light-mode) .window-footer .legend span:nth-child(1){color:#67ff7a!important;font-weight:700}
body:not(.light-mode) .window-footer .legend span:nth-child(1) .legend-dot{background:#46ff79!important;box-shadow:0 0 8px #46ff7966}
body:not(.light-mode) .window-footer .legend span:nth-child(2){color:#d8b15b!important}
body:not(.light-mode) .window-footer .legend span:nth-child(2) .legend-dot{background:#d8b15b!important}
body:not(.light-mode) .window-footer .legend span:nth-child(3){color:#9da9a1!important}
body:not(.light-mode) .window-footer .legend span:nth-child(3) .legend-dot{background:#9da9a1!important}


/* v4.9 · barra móvil compacta como el diseño original (una sola fila) */
@media(max-width:760px){
  .monitor-window .window-toolbar{
    position:relative!important;
    z-index:650!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    min-height:auto!important;
    padding:12px 12px 0!important;
    gap:8px!important;
    overflow:visible!important;
  }
  .monitor-window .view-tabs{
    width:100%!important;
    min-width:0!important;
    align-self:auto!important;
    gap:0!important;
  }
  .monitor-window .view-tab{
    padding:12px 0 10px!important;
  }
  .monitor-window .window-actions{
    width:100%!important;
    display:grid!important;
    grid-template-columns:repeat(7,minmax(0,1fr))!important;
    align-items:center!important;
    justify-items:stretch!important;
    gap:7px!important;
    padding:0 0 0!important;
    margin:0 auto!important;
  }
  .monitor-window .window-actions>*{
    margin:0!important;
    min-width:0!important;
  }
  .monitor-window .read-time{display:none!important}
  .monitor-window .map-tool-button,
  .monitor-window .icon-button{
    position:relative!important;
    z-index:2!important;
    pointer-events:auto!important;
    touch-action:manipulation!important;
    width:100%!important;
    height:42px!important;
    min-width:0!important;
    min-height:42px!important;
    padding:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    border-radius:9px!important;
    line-height:1!important;
  }
  .monitor-window .map-tool-button{
    font-size:0!important;
    white-space:nowrap!important;
  }
  .monitor-window .map-tool-button .icon,
  .monitor-window .icon-button .icon{
    width:18px!important;
    height:18px!important;
    margin:0!important;
    display:block!important;
    flex:0 0 18px!important;
  }
}
@media(max-width:430px){
  .monitor-window .window-toolbar{padding-left:10px!important;padding-right:10px!important}
  .monitor-window .window-actions{gap:6px!important}
  .monitor-window .map-tool-button,
  .monitor-window .icon-button{height:40px!important;min-height:40px!important;border-radius:8px!important}
  .monitor-window .map-tool-button .icon,
  .monitor-window .icon-button .icon{width:17px!important;height:17px!important;flex-basis:17px!important}
}
@media(max-width:360px){
  .monitor-window .window-actions{gap:5px!important}
  .monitor-window .map-tool-button,
  .monitor-window .icon-button{height:38px!important;min-height:38px!important}
  .monitor-window .map-tool-button .icon,
  .monitor-window .icon-button .icon{width:16px!important;height:16px!important;flex-basis:16px!important}
}


/* v5.0 · estabilidad de controles */
.monitor-window .map-tool-button:disabled,.monitor-window .icon-button:disabled{opacity:.55;cursor:wait}
@media(max-width:760px){
  .monitor-window .window-actions{isolation:isolate}
  .monitor-window .window-actions button{user-select:none;-webkit-tap-highlight-color:transparent}
}


/* v5.2 mejoras móvil */
.dialog-close{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:transparent;z-index:3}.dialog-close .icon{width:18px;height:18px}.event-ops-grid input{text-transform:none}
@media(max-width:760px){dialog{width:calc(100% - 14px);max-width:none;max-height:calc(100dvh - 16px);padding:56px 16px 18px;border-radius:16px;margin:8px auto}.dialog-close{top:10px;right:10px;width:42px;height:42px;background:rgba(255,255,255,.06);border:1px solid rgba(114,242,134,.22)}.ops-dialog,.event-dialog,.sos-settings-dialog{width:calc(100% - 14px)!important;padding:56px 16px 18px!important;border-radius:16px!important}.event-dialog{max-width:none!important}.event-ops-grid{grid-template-columns:1fr!important}.event-dialog .recent-events{padding-top:12px}.event-dialog .events-list{max-height:180px}}
body:not(.light-mode) .dialog-close{background:#07120a;border-color:#1f6c34}


/* v5.3 · Modo Viaje */
.trip-toolbar{display:flex;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--line);background:var(--panel)}
.trip-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;padding:9px 14px;border:1px solid #2f7e43;border-radius:10px;background:transparent;color:var(--ink);font-weight:700;cursor:pointer}
.trip-button .icon{width:18px;height:18px}.trip-button.active{border-color:#42ff69;color:#42ff69;box-shadow:0 0 14px #42ff6920}
.trip-status{flex:1;display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:9px;min-width:0;border:1px solid #2f7e43;border-radius:10px;padding:8px 10px;background:#f7fbf4}
.trip-status[hidden]{display:none!important}.trip-status-icon{width:31px;height:31px;border-radius:9px;display:grid;place-items:center;background:#dff6d8;color:#2e6c35}.trip-status-icon .icon{width:17px;height:17px}.trip-status strong,.trip-status small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trip-status strong{font-size:.76rem}.trip-status small{font-size:.66rem;color:#74806d;margin-top:2px}.trip-mini-button{width:34px;height:34px;border:1px solid #cbd8c3;background:white;color:#49633f;border-radius:8px;display:grid;place-items:center;cursor:pointer}.trip-mini-button .icon{width:16px;height:16px}.trip-preview{display:flex;flex-direction:column;gap:5px;margin-top:14px;padding:11px 12px;border:1px solid #dbe5d6;border-radius:10px;background:#f7faf5}.trip-preview strong{font-size:.82rem}.trip-preview span{font-size:.74rem}.trip-preview small{font-size:.66rem;color:#788572}.trip-dialog form label{display:block;font-size:.76rem;font-weight:600;margin:12px 0 5px}.trip-dialog form select{width:100%;min-height:43px;border:1px solid #dbe2d3;border-radius:8px;padding:9px 10px;background:white;color:var(--ink)}.trip-dialog form .button{width:100%;margin-top:14px}.trip-route-line{stroke:#43ff68!important;filter:drop-shadow(0 0 4px rgba(67,255,104,.35))}.trip-destination-pin{width:36px;height:36px;border-radius:12px;background:#07120a;border:2px solid #45ff69;color:#45ff69;display:grid;place-items:center;box-shadow:0 0 15px #45ff6940}.trip-destination-pin svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}.trip-destination-label{background:#07120a!important;color:#7cff8f!important;border:1px solid #3dff60!important;border-radius:7px!important;box-shadow:0 0 12px #3dff6020!important;font-weight:700!important;padding:4px 7px!important}
body:not(.light-mode) .trip-toolbar{background:#030806;border-color:#165529}body:not(.light-mode) .trip-button{color:#cfe8d3;border-color:#24753a;background:#041009}body:not(.light-mode) .trip-status{background:#041009;border-color:#267b3d}body:not(.light-mode) .trip-status-icon{background:#0a2512;color:#5dff78}body:not(.light-mode) .trip-status small{color:#7ea489}body:not(.light-mode) .trip-mini-button{background:#061009;border-color:#1f6c34;color:#8dff9e}body:not(.light-mode) .trip-preview{background:#061009;border-color:#1d6432}body:not(.light-mode) .trip-dialog form select{background:#050906;border-color:#206f36;color:#e6f6e8}
@media(max-width:760px){.trip-toolbar{padding:9px 10px;gap:8px}.trip-button{width:44px;height:44px;min-height:44px;padding:0;border-radius:11px;flex:0 0 44px}.trip-button-text{display:none}.trip-button .icon{width:21px;height:21px}.trip-status{grid-template-columns:auto minmax(0,1fr) auto auto;padding:7px 8px;gap:7px}.trip-status-icon{width:30px;height:30px}.trip-status strong{font-size:.72rem}.trip-status small{font-size:.61rem}.trip-mini-button{width:32px;height:32px}.trip-dialog{width:calc(100% - 14px)!important;max-height:calc(100dvh - 16px)!important;padding:56px 16px 18px!important;border-radius:16px!important}}

/* v5.4 · viaje individual para personal de resguardo */
.trip-dialog form input{width:100%;min-height:43px;border:1px solid #dbe2d3;border-radius:8px;padding:9px 10px;background:white;color:var(--ink);font:inherit}
.trip-solo-grid{margin-top:2px}
#trip-group-fields[hidden],#trip-solo-fields[hidden]{display:none!important}
body:not(.light-mode) .trip-dialog form input{background:#050906;border-color:#206f36;color:#e6f6e8}
@media(max-width:760px){.trip-solo-grid{grid-template-columns:1fr!important}.trip-dialog form input,.trip-dialog form select{min-height:45px}}


/* v5.5 · creación de geocercas desde P1S */
.trip-toolbar-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.geofence-create-button{border-color:#2e8e46}.geofence-create-button .icon{color:#77ff8a}.geofence-pick-hint{display:flex;align-items:center;justify-content:center;gap:9px;padding:9px 12px;background:#102015;color:#dfffe4;border-top:1px solid #276c39;font-size:.76rem;font-weight:650}.geofence-pick-hint[hidden]{display:none}.geofence-pick-hint .icon{width:16px;height:16px;color:#72ff84}.geofence-pick-hint button{border:1px solid #3f8350;border-radius:8px;background:#07100a;color:#bfffc8;padding:5px 9px;font-size:.69rem;font-weight:700}.geofence-picking{cursor:crosshair!important}.geofence-dialog{width:min(520px,calc(100% - 30px))}.geofence-dialog form label{display:block;font-size:.76rem;font-weight:600;margin:12px 0 6px}.geofence-dialog form>input{width:100%;border:1px solid #dbe2d3;padding:10px 11px;background:white;color:var(--ink);border-radius:8px;min-height:43px}.geofence-radius-row{display:grid;grid-template-columns:1fr 78px;gap:12px;align-items:center}.geofence-radius-row input{width:100%}.geofence-radius-row strong{text-align:center;border:1px solid #dce5d5;border-radius:8px;padding:8px 6px;font-size:.78rem}.geofence-pick-button,#geofence-submit{width:100%;margin-top:14px}.geofence-coordinate-preview{margin-top:11px;border:1px solid #dfe7da;border-radius:9px;padding:10px 11px;background:#f7faf4}.geofence-coordinate-preview strong,.geofence-coordinate-preview span{display:block}.geofence-coordinate-preview strong{font-size:.75rem}.geofence-coordinate-preview span{font-size:.68rem;color:#788570;margin-top:3px}.geofence-draft-circle{stroke:#48f768;fill:#36ff5d}.geofence-draft-center{stroke:#dfffe5;fill:#39ff63}body:not(.light-mode) .geofence-dialog form>input{background:#050906;border-color:#206f36;color:#e6f6e8}body:not(.light-mode) .geofence-radius-row strong,body:not(.light-mode) .geofence-coordinate-preview{background:#07150b;border-color:#1d6633;color:#dfffe4}body:not(.light-mode) .geofence-coordinate-preview span{color:#8fb399}
@media(max-width:760px){.trip-toolbar{align-items:stretch}.trip-toolbar-actions{display:grid;grid-template-columns:1fr 1fr;width:100%;gap:8px}.trip-toolbar-actions .trip-button{width:100%;justify-content:center}.geofence-pick-hint{position:relative;z-index:650;flex-wrap:wrap;text-align:center}.geofence-dialog{width:calc(100% - 14px)!important;padding:56px 16px 18px!important}.geofence-radius-row{grid-template-columns:1fr 72px}}


/* v5.6 · búsqueda de ubicación para geocercas */
.geofence-search-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;border:1px solid #dbe2d3;border-radius:9px;background:white;overflow:hidden;min-height:44px}
.geofence-search-row>.icon{width:17px;height:17px;margin-left:11px;color:#718169}.geofence-search-row input{width:100%;height:42px;border:0!important;outline:0;background:transparent!important;color:var(--ink);padding:8px 8px!important;min-height:42px!important}.geofence-search-row button{height:34px;margin-right:5px;padding:0 12px;border:1px solid #cbd9c3;border-radius:7px;background:#f6faef;color:#4f683f;font-weight:750;cursor:pointer}.geofence-search-row button:disabled{opacity:.65;cursor:wait}
.geofence-search-results{display:flex;flex-direction:column;gap:7px;margin-top:8px;max-height:245px;overflow:auto;border:1px solid #dfe7da;border-radius:10px;padding:7px;background:#f9fbf7}.geofence-search-results[hidden]{display:none!important}.geofence-search-result{width:100%;display:grid;grid-template-columns:32px minmax(0,1fr) auto;gap:8px;align-items:center;text-align:left;border:1px solid #e0e8dc;border-radius:9px;background:white;color:var(--ink);padding:8px;cursor:pointer}.geofence-search-result:hover{border-color:#78b96e;background:#f6fff5}.geofence-search-result>span:nth-child(2){min-width:0}.geofence-search-result strong,.geofence-search-result small{display:block}.geofence-search-result strong{font-size:.74rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.geofence-search-result small{font-size:.62rem;color:#7a8674;line-height:1.35;margin-top:2px}.geofence-search-result b{font-size:.62rem;color:#427448}.geofence-result-pin{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:#e9f7e5;color:#3d7745}.geofence-result-pin .icon{width:15px;height:15px}.geofence-search-message{font-size:.7rem;line-height:1.45;color:#768371;padding:7px 8px}.geofence-coordinate-preview small{display:block;font-size:.62rem;line-height:1.35;color:#687a65;margin-top:5px}
body:not(.light-mode) .geofence-search-row{background:#050906;border-color:#206f36}body:not(.light-mode) .geofence-search-row input{color:#e6f6e8!important}body:not(.light-mode) .geofence-search-row button{background:#09200f;border-color:#25773b;color:#9dffac}body:not(.light-mode) .geofence-search-results{background:#041009;border-color:#1d6633}body:not(.light-mode) .geofence-search-result{background:#07120a;border-color:#184d29;color:#dff7e2}body:not(.light-mode) .geofence-search-result:hover{background:#0a1b0e;border-color:#3fb75d}body:not(.light-mode) .geofence-search-result small,body:not(.light-mode) .geofence-search-message{color:#83a18a}body:not(.light-mode) .geofence-search-result b{color:#79ff8d}body:not(.light-mode) .geofence-result-pin{background:#0a2812;color:#69ff80}
@media(max-width:760px){.geofence-search-row{grid-template-columns:32px minmax(0,1fr) auto}.geofence-search-row button{padding:0 10px;font-size:.72rem}.geofence-search-results{max-height:210px}.geofence-search-result{grid-template-columns:30px minmax(0,1fr);padding:8px}.geofence-search-result>b{grid-column:2;margin-top:2px}.geofence-result-pin{width:26px;height:26px}}


/* v5.7 · Excel automático de viaje */
.trip-report-button{border-color:#3f8d4e}.trip-report-button .icon{color:#8cff9a}.trip-report-button:disabled{opacity:.42;cursor:not-allowed;box-shadow:none!important}
@media(max-width:760px){.trip-toolbar-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}.trip-report-button{width:100%!important}}


/* v5.8 · repetición de trayecto + convoy */
.trip-toolbar{flex-wrap:wrap}.replay-button{border-color:#477f93}.replay-button .icon{color:#7edcff}.replay-status{width:100%;display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:9px 12px;align-items:center;border:1px solid #376f83;border-radius:11px;padding:9px 10px;background:#f3fafc}.replay-status[hidden]{display:none!important}.replay-status-main{display:flex;align-items:center;gap:9px;min-width:0}.replay-status-icon{width:31px;height:31px;border-radius:9px;display:grid;place-items:center;background:#dff5fb;color:#246a82}.replay-status-icon .icon{width:17px;height:17px}.replay-status strong,.replay-status small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.replay-status strong{font-size:.76rem}.replay-status small{font-size:.66rem;color:#6b7f87;margin-top:2px}.replay-controls{display:flex;align-items:center;gap:5px}.replay-controls button{width:34px;height:34px;border:1px solid #bfd3da;border-radius:8px;background:white;color:#356b7d;display:grid;place-items:center;cursor:pointer}.replay-controls button .icon{width:16px;height:16px}.replay-controls select{height:34px;border:1px solid #bfd3da;border-radius:8px;background:white;color:#345963;padding:0 6px;font-weight:700}.replay-slider{grid-column:1/-1;width:100%;accent-color:#42badd}.replay-dialog form label{display:block;font-size:.76rem;font-weight:600;margin:12px 0 5px}.replay-dialog form select,.replay-dialog form input{width:100%;min-height:43px;border:1px solid #dbe2d3;border-radius:8px;padding:9px 10px;background:white;color:var(--ink)}.replay-dialog form .button{width:100%;margin-top:14px}.replay-moving-wrap{background:transparent!important;border:0!important}.replay-moving-dot{display:block;width:26px;height:26px;border-radius:50%;background:var(--replay-color,#53ff72);border:4px solid #07120a;box-shadow:0 0 0 2px var(--replay-color,#53ff72)}.replay-moving-label{position:absolute;left:34px;top:3px;padding:4px 7px;border:1px solid var(--replay-color,#53ff72);border-radius:7px;background:#07120aed;color:#f0fff3;font-size:.66rem;font-weight:750;white-space:nowrap;max-width:115px;overflow:hidden;text-overflow:ellipsis}.convoy-toggle{display:flex!important;align-items:center;gap:9px;margin:14px 0 8px!important;padding:10px 11px;border:1px solid #dce6d8;border-radius:9px;background:#f8fbf6;cursor:pointer}.convoy-toggle input{width:18px!important;height:18px;min-height:0!important;margin:0}.convoy-fields{border:1px solid #dce6d8;border-radius:10px;padding:10px 11px;margin-bottom:13px;background:#fbfdf9}.convoy-fields[hidden]{display:none!important}.convoy-fields textarea,.convoy-fields input{width:100%;border:1px solid #dbe2d3;border-radius:8px;padding:9px 10px;background:white;color:var(--ink);font:inherit}.convoy-fields textarea{resize:vertical}
body:not(.light-mode) .replay-status{background:#061017;border-color:#23627a}body:not(.light-mode) .replay-status-icon{background:#082500;color:#79dcff}body:not(.light-mode) .replay-status small{color:#81a5b2}body:not(.light-mode) .replay-controls button,body:not(.light-mode) .replay-controls select{background:#061017;border-color:#235f73;color:#a8e7ff}body:not(.light-mode) .replay-dialog form select,body:not(.light-mode) .replay-dialog form input{background:#050906;border-color:#206f36;color:#e6f6e8}body:not(.light-mode) .convoy-toggle,body:not(.light-mode) .convoy-fields{background:#07120a;border-color:#1d5d30}body:not(.light-mode) .convoy-fields textarea,body:not(.light-mode) .convoy-fields input{background:#050906;border-color:#206f36;color:#e6f6e8}
@media(max-width:760px){.trip-toolbar-actions{grid-template-columns:repeat(4,minmax(0,1fr))!important}.replay-status{grid-template-columns:1fr;padding:8px}.replay-controls{justify-content:space-between}.replay-controls button{flex:1;max-width:44px}.replay-controls select{flex:1;min-width:58px}.replay-dialog{width:calc(100% - 14px)!important;padding:56px 16px 18px!important}.replay-date-grid{grid-template-columns:1fr!important}.convoy-fields .ops-grid{grid-template-columns:1fr!important}}


/* v6.0 · salida, llegada y regreso en repetición */
.replay-legend{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:7px 13px;align-items:center;font-size:.63rem;color:#647981}.replay-legend span{display:inline-flex;align-items:center;gap:5px}.replay-legend-dot{width:10px;height:10px;border-radius:50%;display:inline-block;border:2px solid #07120a}.replay-legend-dot.start{background:#9d56ff;box-shadow:0 0 0 1px #9d56ff}.replay-legend-dot.arrival{background:#2f8cff;box-shadow:0 0 0 1px #2f8cff}.replay-legend-line{display:inline-block;width:18px;height:4px;border-radius:4px}.replay-legend-line.outbound{background:#53ff72}.replay-legend-line.returning{background:#2f8cff}.replay-start-wrap,.replay-arrival-wrap{background:transparent!important;border:0!important}.replay-start-pin,.replay-arrival-pin{display:grid;width:28px;height:28px;place-items:center;border-radius:50%;font-size:.65rem;font-weight:900;color:white;border:3px solid #07120a;box-shadow:0 0 0 2px currentColor,0 3px 12px #0007}.replay-start-pin{background:#9d56ff;color:#c79dff}.replay-arrival-pin{background:#2f8cff;color:#7cb7ff}.replay-return-line{filter:drop-shadow(0 0 4px rgba(47,140,255,.35))}.replay-moving-label{max-width:160px!important}.leaflet-tooltip{font-family:inherit}
body:not(.light-mode) .replay-legend{color:#8fb0ba}
@media(max-width:760px){.replay-legend{gap:6px 10px;font-size:.59rem}.replay-moving-label{max-width:140px!important}}


/* v6.1 · repetición rápida: grupos + múltiples resguardos opcionales */
.replay-select-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:13px 0 6px}.replay-select-head>label{margin:0!important;font-size:.76rem!important;font-weight:700!important}.replay-select-head>label span{font-weight:500;color:#849188}.replay-select-actions{display:flex;gap:8px}.replay-select-head .text-button{font-size:.67rem;padding:4px 0}.replay-choice-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;max-height:190px;overflow:auto;border:1px solid #dce5d8;border-radius:10px;padding:8px;background:#fbfdf9}.replay-member-list{max-height:230px}.replay-choice{display:flex;align-items:center;gap:8px;border:1px solid #e4eae1;border-radius:8px;padding:8px 9px;margin:0!important;background:#fff;cursor:pointer;min-width:0}.replay-choice input{width:17px!important;height:17px!important;min-height:0!important;margin:0!important;flex:0 0 auto}.replay-choice span{min-width:0}.replay-choice strong,.replay-choice small{display:block}.replay-choice strong{font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.replay-choice small{font-size:.61rem;color:#7c8a80;margin-top:2px;line-height:1.25}.replay-choice.auto-selected{border-color:#5ab96d;background:#effcf2}.replay-choice.auto-selected input{accent-color:#53ff72}.replay-selection-summary{margin:9px 0 2px;padding:8px 10px;border:1px solid #dfe6dc;border-radius:8px;background:#f5f8f4;color:#738078;font-size:.7rem}.replay-selection-summary.has-selection{border-color:#42a95a;color:#285f35;background:#effaf1;font-weight:700}
body:not(.light-mode) .replay-choice-list{background:#061009;border-color:#1d5d30}body:not(.light-mode) .replay-choice{background:#07120a;border-color:#174e29}body:not(.light-mode) .replay-choice small{color:#789080}body:not(.light-mode) .replay-choice.auto-selected{background:#08202f;border-color:#2d9a4a}body:not(.light-mode) .replay-selection-summary{background:#07120a;border-color:#1b5630;color:#789080}body:not(.light-mode) .replay-selection-summary.has-selection{background:#08202f;border-color:#2d9a4a;color:#8bff9a}
@media(max-width:760px){.replay-choice-list{grid-template-columns:1fr;max-height:180px}.replay-member-list{max-height:220px}.replay-select-head{align-items:flex-end}.replay-select-actions{gap:10px}.replay-choice{min-height:48px;padding:8px 10px}}


/* v6.2 · repetición estable: ruta fija + marcador fluido */
.replay-static-line{stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.replay-progress-line,.replay-return-line{stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.replay-moving-wrap{will-change:transform;pointer-events:none!important}
.replay-moving-dot{will-change:auto}
.leaflet-zoom-animated .replay-moving-wrap{transition:none!important}

/* v6.3 · proveedor de mapa */
.source-stack{display:flex;flex-direction:column;align-items:flex-end;gap:2px}.map-provider-label{font-size:.58rem;color:#7d8b7f;white-space:nowrap}body:not(.light-mode) .map-provider-label{color:#789080}@media(max-width:760px){.map-provider-label{font-size:.56rem}.source-stack{max-width:150px}}


/* v6.4 · seguimiento dinámico hacia geocerca */
.trip-route-remaining{stroke:#2f8cff!important;stroke-width:6px!important;stroke-linecap:round!important;stroke-linejoin:round!important;filter:drop-shadow(0 0 5px rgba(47,140,255,.38))!important;transition:stroke-dashoffset .2s linear}
body:not(.light-mode) .trip-route-remaining{stroke:#3d9cff!important;filter:drop-shadow(0 0 6px rgba(61,156,255,.42))!important}


/* v6.5 · alertas reforzadas y estados visibles */
.status-pill.online .status-dot{background:#39f86a!important;box-shadow:0 0 0 3px #39f86a22,0 0 10px #39f86a88!important}
.status-pill.offline .status-dot{background:#d7ad57!important;box-shadow:none!important}
.status-pill.unknown .status-dot{background:#98a59d!important;box-shadow:none!important}
body:not(.light-mode) .status-pill.online .status-dot{background:#46ff79!important;box-shadow:0 0 0 3px #46ff7928,0 0 12px #46ff79aa!important}
.sos-volume{height:28px}.stop-notify-settings{border:1px solid #2c6f3b33;border-radius:12px;padding:13px;margin-top:16px}.stop-notify-settings>strong{display:block;margin-bottom:6px}.stop-notify-settings>p{font-size:.76rem;line-height:1.5;color:#7d8e80;margin-bottom:10px}body:not(.light-mode) .stop-notify-settings{border-color:#1d6531;background:#061009}body:not(.light-mode) .stop-notify-settings>p{color:#8ca294}


/* v6.6 · usuarios Traccar + ruta de viaje verde neón con borde negro */
.traccar-users-badge{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:6px 10px;border:1px solid #2b7040;border-radius:999px;background:#07110a;color:#8cff9d;font-size:.72rem;font-weight:700;white-space:nowrap;box-shadow:inset 0 0 0 1px #0008,0 0 11px #39ff1418}
.traccar-users-badge[hidden]{display:none!important}.traccar-users-badge .icon{width:16px;height:16px;color:#62ff7b}.traccar-users-badge strong{font-size:.82rem;color:#ecfff0;font-variant-numeric:tabular-nums}.traccar-users-text{color:#78c987;font-weight:650}
.trip-route-outline{stroke:#020603!important;stroke-width:7px!important;stroke-linecap:round!important;stroke-linejoin:round!important;filter:drop-shadow(0 0 2px #000)!important}
.trip-route-remaining{stroke:#43ff68!important;stroke-width:3px!important;stroke-linecap:round!important;stroke-linejoin:round!important;filter:drop-shadow(0 0 4px rgba(67,255,104,.55))!important;transition:stroke-dashoffset .2s linear}
body:not(.light-mode) .trip-route-remaining{stroke:#50ff73!important;filter:drop-shadow(0 0 5px rgba(80,255,115,.58))!important}
@media(max-width:760px){.traccar-users-badge{padding:6px 8px;gap:5px;min-height:32px}.traccar-users-text{display:none}.traccar-users-badge .icon{width:17px;height:17px}.traccar-users-badge strong{font-size:.78rem}}


/* v6.7 · usuarios Traccar visibles y panel de detalle */
button.traccar-users-badge{font:inherit;cursor:pointer}.traccar-users-badge:focus-visible{outline:2px solid #65ff78;outline-offset:2px}.traccar-users-badge:hover{border-color:#47d765;background:#09170d}.traccar-users-dialog{width:min(520px,calc(100% - 24px))}.traccar-users-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.traccar-users-summary>div{border:1px solid #dce5da;border-radius:11px;padding:12px;background:#f8faf6}.traccar-users-summary span,.traccar-users-summary strong{display:block}.traccar-users-summary span{font-size:.68rem;color:#7d8979;margin-bottom:4px}.traccar-users-summary strong{font-size:1.15rem}.traccar-current-account{grid-column:1/-1}.traccar-current-account strong{font-size:.9rem}.traccar-user-list-head{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid #e1e8df;padding-top:14px;margin-top:4px}.traccar-user-list-head strong{font-size:.78rem}.traccar-user-list-head span{font-size:.67rem;color:#889387}.traccar-user-list{display:flex;flex-direction:column;gap:7px;max-height:280px;overflow:auto;margin:9px 0 14px}.traccar-user-row{display:grid;grid-template-columns:36px minmax(0,1fr) auto;gap:9px;align-items:center;border:1px solid #e1e8df;border-radius:10px;padding:8px 10px;background:#fbfcfa}.traccar-user-avatar{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;background:#eef5e9;color:#438b51}.traccar-user-avatar .icon{width:17px;height:17px}.traccar-user-row strong,.traccar-user-row small{display:block}.traccar-user-row strong{font-size:.76rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.traccar-user-row small{font-size:.63rem;color:#8a9588;margin-top:2px}.traccar-current-chip{font-size:.6rem;text-transform:uppercase;letter-spacing:.06em;border:1px solid #84c98f;border-radius:999px;padding:3px 6px;color:#367a43;background:#effaf1}.light-mode .traccar-users-badge{background:white;color:#2f7e43}.light-mode .traccar-users-badge strong{color:#203824}.light-mode .traccar-users-text{color:#568661}body:not(.light-mode) .traccar-users-summary>div,body:not(.light-mode) .traccar-user-row{background:#07120a;border-color:#1d5d30}body:not(.light-mode) .traccar-users-summary span,body:not(.light-mode) .traccar-user-list-head span,body:not(.light-mode) .traccar-user-row small{color:#799083}body:not(.light-mode) .traccar-user-list-head{border-color:#184a28}body:not(.light-mode) .traccar-user-avatar{background:#0b2011;color:#65ff78}body:not(.light-mode) .traccar-current-chip{background:#0d2513;border-color:#348a48;color:#77ff8d}@media(max-width:760px){.traccar-users-dialog{width:calc(100% - 14px)!important}.traccar-users-summary{grid-template-columns:1fr 1fr}.traccar-user-list{max-height:42vh}.traccar-user-row{grid-template-columns:34px minmax(0,1fr) auto;padding:8px}.traccar-users-badge{min-width:52px;justify-content:center}}

/* v6.8 mejoras */
.guard-bubble{position:relative;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:999px;background:radial-gradient(circle at 30% 30%,rgba(142,255,172,.65),rgba(32,255,111,.15) 62%,rgba(0,0,0,.0) 63%);filter:drop-shadow(0 0 14px rgba(72,255,128,.45));}
.guard-bubble::after{content:'';position:absolute;left:50%;bottom:-9px;transform:translateX(-50%);width:16px;height:16px;background:linear-gradient(135deg,rgba(19,28,22,.96),rgba(12,14,14,.92));border-right:1px solid rgba(98,255,139,.65);border-bottom:1px solid rgba(98,255,139,.65);rotate:45deg;border-bottom-right-radius:4px;box-shadow:0 4px 12px rgba(0,0,0,.32);}
.guard-bubble-core{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:999px;border:1px solid rgba(118,255,151,.8);background:linear-gradient(180deg,rgba(14,18,16,.96),rgba(9,10,10,.98));box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 0 0 1px rgba(0,0,0,.35);font-size:18px;line-height:1;}
.guard-bubble.online .guard-bubble-core{box-shadow:inset 0 0 0 1px rgba(255,255,255,.04),0 0 14px rgba(64,255,113,.25);}
.guard-bubble.offline .guard-bubble-core,.guard-bubble.unknown .guard-bubble-core{border-color:rgba(183,198,189,.55);color:#b8c7bc;filter:saturate(.4);}
.guard-bubble.selected .guard-bubble-core{transform:scale(1.08);border-color:#b9ffc9;box-shadow:0 0 18px rgba(116,255,150,.4);}
.leaflet-tooltip.marker-name{margin-left:4px;}
.trip-route-outline,.trip-route-line,.trip-route-remaining{shape-rendering:geometricPrecision;stroke-linecap:round;stroke-linejoin:round;}
.trip-route-outline{filter:drop-shadow(0 0 6px rgba(0,0,0,.42));}
.trip-route-line,.trip-route-remaining{filter:drop-shadow(0 0 7px rgba(79,255,134,.28));}
.trip-destination-pin{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:999px;background:linear-gradient(180deg,rgba(18,24,18,.96),rgba(8,10,8,.98));border:1px solid rgba(110,255,147,.78);box-shadow:0 0 14px rgba(80,255,129,.28);color:#8bff9e;}
.cleanup-button{white-space:nowrap;}
.cleanup-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0 14px;}
.cleanup-card,.cleanup-trash-box{border:1px solid rgba(83,255,130,.2);border-radius:18px;background:rgba(255,255,255,.03);padding:14px;display:flex;flex-direction:column;gap:6px;}
.cleanup-card span{font-size:1.4rem;font-weight:700;color:#a4ffb8;}
.cleanup-trash-box{margin-bottom:14px;}
.cleanup-trash-box small{opacity:.75;}
.cleanup-actions{display:flex;flex-wrap:wrap;gap:10px;}
@media (max-width:700px){.cleanup-grid{grid-template-columns:1fr;}}

/* v6.9 · seguimiento múltiple en vivo */
.multi-trip-button{border-color:#6d55b8}.multi-trip-button .icon{color:#b79bff}.multi-trip-button.active{border-color:#a98aff!important;color:#c9b6ff!important;box-shadow:0 0 16px rgba(176,140,255,.22)!important}
.multi-trip-dialog{width:min(620px,calc(100% - 30px))}.multi-trip-dialog form>label{display:block;font-size:.76rem;font-weight:650;margin:13px 0 6px}.multi-trip-dialog form>select{width:100%;min-height:44px;border:1px solid #dbe2d3;border-radius:9px;padding:9px 10px;background:white;color:var(--ink)}.multi-trip-dialog .button-primary{width:100%;margin-top:14px}
.multi-trip-status{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid #654f9a;border-radius:12px;padding:9px 10px;background:#f7f4ff}.multi-trip-status[hidden]{display:none!important}.multi-trip-status-main{display:flex;align-items:center;gap:9px;min-width:0}.multi-trip-status-main strong,.multi-trip-status-main small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.multi-trip-status-main strong{font-size:.76rem}.multi-trip-status-main small{font-size:.66rem;color:#736b83;margin-top:2px}.multi-trip-status-actions{display:flex;gap:6px;flex:0 0 auto}
body:not(.light-mode) .multi-trip-status{background:#0a0811;border-color:#57418c}body:not(.light-mode) .multi-trip-status-main small{color:#9d91b5}body:not(.light-mode) .multi-trip-dialog form>select{background:#050906;border-color:#206f36;color:#e6f6e8}
.multi-trip-outline,.multi-trip-route{shape-rendering:geometricPrecision;stroke-linecap:round;stroke-linejoin:round}.multi-trip-route{filter:drop-shadow(0 0 4px color-mix(in srgb,currentColor 28%,transparent))}.multi-trip-route-label{background:#07100af2!important;border:1px solid #44644d!important;color:#e9ffed!important;border-radius:7px!important;font-size:.66rem!important;font-weight:750!important;padding:4px 7px!important;box-shadow:0 3px 12px #0005!important}
.multi-live-wrap,.multi-target-chip-wrap{background:transparent!important;border:0!important}.multi-live-bubble{position:relative;display:grid;place-items:center;width:34px;height:34px;border-radius:999px;background:#050806;border:2px solid var(--route-color,#43ff68);box-shadow:0 0 0 3px rgba(0,0,0,.65),0 0 14px var(--route-color,#43ff68)}.multi-live-bubble::after{content:'';position:absolute;bottom:-7px;width:11px;height:11px;background:#050806;border-right:2px solid var(--route-color,#43ff68);border-bottom:2px solid var(--route-color,#43ff68);transform:rotate(45deg);border-radius:2px}.multi-live-bubble>span{position:relative;z-index:2;font-size:17px;line-height:1}.multi-live-bubble.arrived{opacity:.72;filter:saturate(.65)}.multi-live-label{background:#061009ef!important;border:1px solid #247b38!important;color:#dcffe2!important;border-radius:6px!important;font-size:.66rem!important;font-weight:700!important;padding:3px 6px!important}
.multi-target-chip{display:block;max-width:150px;padding:5px 8px;border-radius:999px;border:1px solid var(--route-color,#43ff68);background:#061009ed;color:#effff2;font-size:.64rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;box-shadow:0 0 12px rgba(0,0,0,.45)}
@media(max-width:760px){.trip-toolbar-actions{grid-template-columns:repeat(5,minmax(0,1fr))!important}.multi-trip-dialog{width:calc(100% - 14px)!important;max-height:calc(100dvh - 16px)!important;padding:56px 16px 18px!important}.multi-trip-status{padding:8px}.multi-trip-status-main{min-width:0}.multi-trip-status-main strong{font-size:.7rem}.multi-trip-status-main small{font-size:.6rem}}
@media(max-width:410px){.trip-toolbar-actions{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px!important}.trip-toolbar-actions .trip-button{min-width:0!important}.multi-trip-status{align-items:flex-start}.multi-trip-status-actions{padding-top:1px}}
.guard-bubble-core svg,.multi-live-bubble svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;color:#8dff9e}.multi-live-bubble svg{position:relative;z-index:2;color:#effff2}
/* v6.9 · ruta principal más fina y estable al hacer zoom */
.trip-route-outline{stroke-width:5px!important;filter:drop-shadow(0 0 1px rgba(0,0,0,.75))!important}
.trip-route-remaining{stroke-width:2.35px!important;filter:drop-shadow(0 0 2px rgba(67,255,104,.35))!important}

/* v7.0 · resguardos normales + policía diferenciada + movimiento fluido */
.guard-pin-police{font-size:18px;line-height:1;background:#0c1610!important;color:#fff!important;border-color:#67ff7a!important;box-shadow:0 0 16px rgba(65,255,113,.38)!important}
.guard-pin-police .police-emoji{display:grid;place-items:center;width:100%;height:100%;font-size:18px;line-height:1;transform:translateY(-.5px)}
.guard-pin-police.offline{border-color:#d8b15b!important;box-shadow:0 0 12px rgba(216,177,91,.28)!important}
.guard-pin-police.unknown{border-color:#9da9a1!important;box-shadow:none!important}
.leaflet-marker-icon.guard-icon{will-change:transform;backface-visibility:hidden;transform-style:preserve-3d}
/* Los globos v6.8 ya no se usan para los resguardos normales. */
.guard-bubble{display:none!important}

/* v7.1 · alarmas permanentes, SOS y centrado móvil */
.stat-icon.sos{background:#fff0f0;color:#c62828}
body:not(.light-mode) .stat-icon.sos{background:#200708;color:#ff5d64;box-shadow:0 0 14px #ff31312c}
.motion-alert{position:fixed;z-index:4990;right:18px;top:88px;width:min(390px,calc(100vw - 36px));padding:18px;border:2px solid #31d77a;border-radius:16px;background:#f4fff8;color:#0c3320;box-shadow:0 18px 60px #08773d33,0 0 24px #24e7782b;animation:motionAlertPulse 1s ease-in-out infinite alternate}
.motion-alert[hidden]{display:none!important}.motion-alert-head{display:flex;align-items:center;gap:12px}.motion-alert-head small{display:block;font-size:.72rem;font-weight:900;letter-spacing:.12em;color:#0b8a48}.motion-alert-head strong{display:block;font-size:1.05rem;margin-top:2px}.motion-alert-icon{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:#19a85b;color:white}.motion-alert-icon .icon{width:24px;height:24px}.motion-alert p{margin:10px 0 0;font-size:.82rem;line-height:1.4}.motion-alert-actions{display:flex;gap:8px;margin-top:14px}.motion-alert-actions button{flex:1;border:1px solid #45b979;background:white;color:#117342;border-radius:9px;padding:9px 10px;font-weight:700}.motion-alert-actions button:last-child{background:#128a4c;color:white;border-color:#128a4c}
body:not(.light-mode) .motion-alert{background:#04120a;color:#e8fff0;border-color:#42ff8d;box-shadow:0 18px 60px #000a,0 0 28px #26ff7a2f}body:not(.light-mode) .motion-alert p{color:#a7cfb2}body:not(.light-mode) .motion-alert-actions button{background:#07180e;color:#9dffbc;border-color:#267847}body:not(.light-mode) .motion-alert-actions button:last-child{background:#0b7c42;color:white;border-color:#32df7b}
@keyframes motionAlertPulse{from{transform:translateY(0)}to{transform:translateY(1px)}}
@media(max-width:760px){
  .motion-alert{top:82px;left:10px;right:10px;width:auto;padding:14px;border-radius:13px}
  .motion-alert-head strong{font-size:1rem}.motion-alert p{font-size:.74rem}
  .monitor-window .window-actions button{position:relative!important;display:grid!important;place-items:center!important;text-align:center!important}
  .monitor-window .window-actions button .icon{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;margin:0!important}
  .monitor-window .window-actions button .icon svg{display:block!important;margin:0 auto!important}
}


/* v7.4 · corrección de ancho móvil / franja lateral */
html,body{width:100%;max-width:100%;overflow-x:hidden;overscroll-behavior-x:none}
body{position:relative;min-width:0}
.workspace,.monitor-window,.map-panel,.trip-toolbar,.window-toolbar,.window-footer{min-width:0;max-width:100%}
.workspace{width:100%}
@media(max-width:760px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  .topbar{width:100%!important;max-width:100%!important;min-width:0!important;padding-left:14px!important;padding-right:14px!important;gap:8px!important;overflow:hidden!important}
  .topbar .brand{min-width:0!important;flex:1 1 auto!important;gap:10px!important;overflow:hidden!important}
  .topbar .brand img{flex:0 0 auto!important}
  .topbar .brand>span:last-child{min-width:0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .topbar .header-actions{min-width:0!important;flex:0 0 auto!important;gap:8px!important}
  .topbar .top-link,.topbar .traccar-users-badge,.topbar .theme-toggle,.topbar .account-button{flex:0 0 auto!important}
  .workspace{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important;padding-left:4.5%!important;padding-right:4.5%!important}
  .monitor-window{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important}
  .map-panel,#map,.trip-toolbar,.window-toolbar,.window-footer{width:100%!important;max-width:100%!important}
  .leaflet-container{max-width:100%!important}
}
@media(max-width:430px){
  .topbar{padding-left:12px!important;padding-right:12px!important;gap:6px!important}
  .topbar .brand{gap:7px!important}
  .topbar .brand img{width:78px!important;height:42px!important}
  .topbar .brand-divider{display:none!important}
  .topbar .brand>span:last-child{display:none!important}
  .topbar .header-actions{gap:6px!important}
  .topbar .top-link{width:32px!important;height:32px!important;display:grid!important;place-items:center!important}
  .topbar .traccar-users-badge{min-width:44px!important;padding:5px 7px!important}
  .topbar .theme-toggle,.topbar .account-button{width:32px!important;height:32px!important}
}

/* v7.5 · roles y permisos */
.access-role-badge{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:0 10px;border:1px solid #245d36;border-radius:999px;background:#071109;color:#8effa4;font-size:.68rem;font-weight:800;letter-spacing:.04em;white-space:nowrap}
.access-role-badge[data-role="owner"]{border-color:#6dff84;box-shadow:0 0 14px #39ff1425;color:#baffc6}.access-role-badge[data-role="admin"]{border-color:#4ddb69;color:#9effae}.access-role-badge[data-role="operator"]{border-color:#83a34b;color:#c7e995}.access-role-badge[data-role="guest"]{border-color:#4d5d52;color:#9ca99f}
.access-manage-button{width:100%;justify-content:center;margin-top:14px}.access-dialog{max-width:760px}.access-dialog>label{display:block;font-size:.78rem;font-weight:700;margin:15px 0 6px}.access-dialog>select{width:100%;min-height:44px;border:1px solid #285f39;border-radius:10px;background:#061009;color:#e7f8e9;padding:10px 12px}.access-user-summary{display:flex;flex-direction:column;gap:3px;padding:12px 14px;margin:10px 0 4px;border:1px solid #173f25;border-radius:12px;background:#07110a}.access-user-summary strong{font-size:.88rem}.access-user-summary span{font-size:.72rem;color:#829589}.access-permissions-head{display:flex;justify-content:space-between;gap:10px;align-items:end;margin:17px 0 8px}.access-permissions-head strong{font-size:.82rem}.access-permissions-head small{font-size:.68rem;color:#7c8b80;text-align:right}.access-permissions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.access-permission{display:flex;gap:9px;align-items:flex-start;border:1px solid #153c22;border-radius:11px;background:#061009;padding:10px 11px;cursor:pointer}.access-permission input{margin-top:3px;accent-color:#55ff72}.access-permission span{min-width:0}.access-permission strong,.access-permission small{display:block}.access-permission strong{font-size:.74rem;color:#dff7e3}.access-permission small{margin-top:2px;font-size:.64rem;color:#75877b;line-height:1.35}.access-permission:has(input:checked){border-color:#2eb950;background:#08170c;box-shadow:0 0 12px #39ff1412}.access-permission:has(input:disabled){opacity:.72;cursor:default}.access-dialog #access-save{width:100%;justify-content:center;margin-top:14px}
@media(max-width:760px){.access-role-badge{min-height:30px;padding:0 8px;font-size:.62rem}.access-dialog{width:calc(100% - 14px)!important;max-width:none!important}.access-permissions{grid-template-columns:1fr}.access-permissions-head{align-items:flex-start;flex-direction:column}.access-permissions-head small{text-align:left}}

/* v7.7 · convoy detallado y movimientos GPS */
.groups-dialog-v77{width:min(1120px,calc(100vw - 28px));max-width:1120px}
.group-command-grid{margin:14px 0 10px}
.optional-label{font-size:.72em;font-weight:500;opacity:.68}
.convoy-count-row{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:10px 0 14px}
.convoy-count-row>div{min-width:210px}
.convoy-unit-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.convoy-unit-card{border:1px solid rgba(80,255,125,.2);border-radius:16px;background:rgba(255,255,255,.025);padding:14px;box-shadow:inset 0 0 0 1px rgba(255,255,255,.01)}
.convoy-unit-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:10px;padding-bottom:8px;border-bottom:1px solid rgba(80,255,125,.12)}
.convoy-unit-head strong{font-size:.9rem;color:#a6ffb6}.convoy-unit-head span{font-size:.7rem;opacity:.65}
.convoy-unit-card label{display:block;margin:8px 0 5px!important}.convoy-unit-card input,.convoy-unit-card select{width:100%}
.convoy-add-unit{width:100%;justify-content:center;margin-top:12px}
.movement-dialog{width:min(850px,calc(100vw - 24px));max-width:850px}
.movement-toolbar{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:end;margin:16px 0 10px}.movement-toolbar label{grid-column:1/-1;margin:0!important}.movement-toolbar select{min-height:44px}
.movement-summary{display:flex;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid rgba(80,255,125,.16);border-radius:12px;background:rgba(255,255,255,.025);margin-bottom:10px}.movement-summary strong{color:#a7ffb7}.movement-summary span{opacity:.72}
.movement-list{max-height:430px;overflow:auto;display:flex;flex-direction:column;gap:8px;padding-right:3px}
.movement-row{display:grid;grid-template-columns:36px 1fr 34px;gap:10px;align-items:start;padding:11px;border:1px solid rgba(80,255,125,.15);border-radius:12px;background:rgba(255,255,255,.025)}
.movement-pin{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:rgba(60,255,112,.08);color:#69ff88}.movement-pin .icon{width:18px;height:18px}
.movement-row>div:nth-child(2){min-width:0}.movement-row strong,.movement-row small,.movement-row span,.movement-row a{display:block}.movement-row strong{font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.movement-row small,.movement-row span{font-size:.7rem;opacity:.72;margin-top:3px}.movement-row a{font-size:.72rem;color:#7dff93;margin-top:5px;text-decoration:none}.movement-row>button{width:32px;height:32px;border:1px solid rgba(255,115,115,.24);border-radius:9px;background:rgba(255,70,70,.05);color:#ff9393;font-size:18px}
.movement-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.movement-actions .button{flex:1 1 180px;justify-content:center}
@media(max-width:760px){.groups-dialog-v77{width:calc(100% - 14px)!important;max-width:none!important}.convoy-unit-list{grid-template-columns:1fr}.convoy-count-row{display:block}.convoy-count-row>div{min-width:0}.movement-toolbar{grid-template-columns:1fr}.movement-toolbar label{grid-column:auto}.movement-list{max-height:48vh}.movement-actions{display:grid;grid-template-columns:1fr}.movement-actions .button{width:100%}.groups-dialog-v77 .groups-layout{grid-template-columns:1fr!important}.group-command-grid,.convoy-unit-grid{grid-template-columns:1fr!important}}
.movement-summary>div{min-width:0}.movement-summary small{display:block;margin-top:4px;opacity:.72;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:560px}

/* v7.8 · formulario de convoy corregido */
.groups-dialog-v78{width:min(1120px,calc(100vw - 28px));max-width:1120px}
.groups-dialog-v78 .field-help{display:block;margin-top:5px;color:var(--muted,#7f9182);font-size:.68rem;line-height:1.35}
.groups-dialog-v78 #group-leader-device:disabled{opacity:.86;cursor:default}
.groups-dialog-v78 .convoy-fields-v78{margin-top:12px;padding:14px;border:1px solid rgba(78,255,126,.18);border-radius:16px;background:rgba(255,255,255,.02)}
.groups-dialog-v78 .convoy-count-only{max-width:330px;margin:0 0 14px}
.groups-dialog-v78 .convoy-count-only label{display:block;margin:0 0 6px!important}
.groups-dialog-v78 .convoy-count-only input{width:100%;min-height:46px;font-size:1rem;font-weight:700}
.groups-dialog-v78 .convoy-count-only small{display:block;margin-top:6px;color:#7f9182;line-height:1.4}
.groups-dialog-v78 .convoy-units-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 10px;padding-top:14px;border-top:1px solid rgba(79,255,126,.14)}
.groups-dialog-v78 .convoy-units-title strong{display:block;font-size:.9rem}
.groups-dialog-v78 .convoy-units-title span{display:block;margin-top:3px;font-size:.7rem;color:#7f9182}
.groups-dialog-v78 .convoy-unit-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.groups-dialog-v78 .convoy-unit-card{min-width:0;border:1px solid rgba(80,255,125,.22);border-radius:16px;background:rgba(255,255,255,.025);padding:14px}
.groups-dialog-v78 .convoy-unit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.groups-dialog-v78 .convoy-unit-head strong{font-size:.84rem;color:#b6ffc4}
.groups-dialog-v78 .convoy-unit-head span{font-size:.68rem;color:#7f9182;text-align:right}
.groups-dialog-v78 .convoy-unit-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.groups-dialog-v78 .convoy-add-unit{margin-top:12px}
@media(max-width:760px){
  .groups-dialog-v78{width:calc(100% - 14px)!important;max-width:none!important;padding-left:14px!important;padding-right:14px!important}
  .groups-dialog-v78 .groups-layout{grid-template-columns:1fr!important}
  .groups-dialog-v78 .group-command-grid,.groups-dialog-v78 .convoy-unit-grid{grid-template-columns:1fr!important}
  .groups-dialog-v78 .convoy-unit-list{grid-template-columns:1fr!important}
  .groups-dialog-v78 .convoy-count-only{max-width:none}
  .groups-dialog-v78 .convoy-unit-head{align-items:center}
}


/* v7.9 · panel propietario y vista invitado */
body:not(.light-mode) .theme-toggle{color:#fff!important}
body:not(.light-mode) .theme-toggle .icon,body:not(.light-mode) .theme-toggle .icon svg{color:#fff!important;stroke:#fff!important}
body:not(.light-mode) .account-button .icon,body:not(.light-mode) .account-button .icon svg{color:#fff!important;stroke:#fff!important}
body:not(.light-mode) .account-button.owner-account{border-color:#64ff7d!important;background:#071109!important;box-shadow:0 0 0 1px #39ff1430,0 0 18px #39ff1438!important}
body:not(.light-mode) .account-button.owner-account .icon svg{stroke:#8cff9d!important}
.owner-symbol{background:#07120a!important;color:#8cff9d!important;border:1px solid #2d9e49!important;box-shadow:0 0 18px #39ff1420!important}
.owner-symbol .icon svg{stroke:currentColor!important}
.guest-view .stats{grid-template-columns:repeat(3,1fr)}
.guest-view .window-actions{justify-content:flex-end}
@media(max-width:760px){.guest-view .stats{grid-template-columns:repeat(2,1fr)}.guest-view .stats .stat:nth-child(3){grid-column:1/-1}.account-button.owner-account{box-shadow:0 0 16px #39ff1440!important}.access-dialog .owner-symbol{margin-top:0}}

/* v8.0 · estabilidad del mapa al aplicar permisos/roles */
#map,.map-panel{overflow:hidden!important;}
.leaflet-map-pane,.leaflet-tile-pane{backface-visibility:hidden;transform-style:preserve-3d;}
.leaflet-tile{will-change:transform;}

/* v8.1 · cuentas de acceso + convoy amplio + brevete */
.groups-dialog-v81{
  width:min(1320px,calc(100vw - 24px))!important;
  max-width:1320px!important;
  max-height:calc(100dvh - 24px)!important;
  overflow:auto!important;
}
.groups-dialog-v81 .groups-layout{
  grid-template-columns:minmax(230px,280px) minmax(0,1fr)!important;
  gap:24px!important;
  align-items:start!important;
}
.groups-dialog-v81 #group-form{min-width:0!important}
.groups-dialog-v81 .group-command-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}
.groups-dialog-v81 .convoy-fields-v78{
  padding:18px!important;
  border-radius:18px!important;
}
.groups-dialog-v81 .convoy-count-only{max-width:420px!important}
.groups-dialog-v81 .convoy-unit-list{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:16px!important;
  margin-top:14px!important;
}
.groups-dialog-v81 .convoy-unit-card{
  width:100%!important;
  padding:18px!important;
  border-radius:18px!important;
}
.groups-dialog-v81 .convoy-unit-grid{
  display:grid!important;
  grid-template-columns:minmax(150px,.8fr) minmax(220px,1.25fr) minmax(170px,.9fr)!important;
  gap:12px 14px!important;
  align-items:end!important;
}
.groups-dialog-v81 .convoy-unit-grid>div{min-width:0!important}
.groups-dialog-v81 .convoy-unit-detail{grid-column:span 2!important}
.groups-dialog-v81 .convoy-unit-card input,
.groups-dialog-v81 .convoy-unit-card select{
  width:100%!important;
  min-width:0!important;
  min-height:46px!important;
}
.groups-dialog-v81 .convoy-unit-head{margin-bottom:12px!important}
.groups-dialog-v81 .convoy-unit-head strong{font-size:.94rem!important}
.groups-dialog-v81 .convoy-unit-head span{font-size:.72rem!important}
.access-dialog #access-user option{font-size:.86rem}

@media(max-width:900px){
  .groups-dialog-v81 .groups-layout{grid-template-columns:1fr!important}
  .groups-dialog-v81 .convoy-unit-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .groups-dialog-v81 .convoy-unit-detail{grid-column:1/-1!important}
}
@media(max-width:760px){
  .groups-dialog-v81{
    width:calc(100vw - 8px)!important;
    max-width:none!important;
    max-height:calc(100dvh - 8px)!important;
    padding:16px 12px 18px!important;
    border-radius:16px!important;
  }
  .groups-dialog-v81 .groups-layout{display:block!important}
  .groups-dialog-v81 .groups-layout>section{margin-bottom:18px!important}
  .groups-dialog-v81 .group-command-grid,
  .groups-dialog-v81 .convoy-unit-grid{grid-template-columns:1fr!important;gap:10px!important}
  .groups-dialog-v81 .convoy-unit-detail{grid-column:auto!important}
  .groups-dialog-v81 .convoy-fields-v78{padding:12px!important}
  .groups-dialog-v81 .convoy-unit-card{padding:14px!important}
  .groups-dialog-v81 .convoy-unit-head{display:block!important}
  .groups-dialog-v81 .convoy-unit-head span{display:block!important;text-align:left!important;margin-top:3px!important}
  .groups-dialog-v81 .convoy-count-only{max-width:none!important}
}

/* v8.2 · estabilidad integral, ficha GPS y responsive */
.selected-card{width:min(430px,calc(100% - 40px));}
.selected-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:10px;padding-top:9px;border-top:1px solid #eef0e9;font-variant-numeric:tabular-nums}
.selected-metric{min-width:0;padding:7px 8px;border:1px solid #e8eee4;border-radius:8px;background:#f8faf6}
.selected-metric span{display:block;color:#899184;font-size:.57rem;text-transform:uppercase;letter-spacing:.035em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.selected-metric strong{display:block;margin-top:3px;color:#30402b;font-size:.72rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.selected-last-trip{margin-top:7px;padding:8px 10px;border:1px solid #e5ece1;border-radius:8px;background:#fbfcfa;line-height:1.3}
.selected-last-trip>span{display:block;color:#899184;font-size:.57rem;text-transform:uppercase;letter-spacing:.04em}
.selected-last-trip strong{display:block;margin-top:3px;color:#35472f;font-size:.71rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.selected-last-trip small{display:block;margin-top:3px;color:#858e80;font-size:.61rem}
.selected-insight-loading{margin-top:6px;color:#7c8978;font-size:.59rem;line-height:1.3}.selected-insight-error{color:#b77a54}
body:not(.light-mode) .selected-metrics{border-color:#173f25}
body:not(.light-mode) .selected-metric{background:#07120a;border-color:#184b29}
body:not(.light-mode) .selected-metric span,body:not(.light-mode) .selected-last-trip>span,body:not(.light-mode) .selected-insight-loading{color:#71897a}
body:not(.light-mode) .selected-metric strong,body:not(.light-mode) .selected-last-trip strong{color:#dff8e2}
body:not(.light-mode) .selected-last-trip{background:#07120a;border-color:#184b29}
body:not(.light-mode) .selected-last-trip small{color:#7f9986}
body:not(.light-mode) .selected-insight-error{color:#efad78}
@media(min-width:1367px){.map-panel{height:520px}}
@media(min-width:761px) and (max-width:1366px){.map-panel{height:460px}}
@media(min-width:761px) and (max-width:1100px){
  .monitor-window .window-toolbar{align-items:flex-start;flex-wrap:wrap;padding-top:9px;padding-bottom:9px}
  .monitor-window .window-actions{flex:1 1 100%;justify-content:flex-end;flex-wrap:wrap}
  .monitor-window .read-time{margin-left:auto}
}
@media(max-width:760px){
  .map-panel{height:min(62dvh,470px)}
  .selected-metrics,.selected-last-trip,.selected-insight-loading{display:none!important}
  .selected-card.mobile-expanded{width:calc(100% - 12px)!important;max-height:min(72dvh,370px)!important;left:6px!important;bottom:8px!important;overflow:auto!important}
  .selected-card.mobile-expanded .selected-metrics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:8px;padding-top:8px}
  .selected-card.mobile-expanded .selected-last-trip,.selected-card.mobile-expanded .selected-insight-loading{display:block!important}
  .selected-card.mobile-expanded .selected-metric{padding:6px 7px}
  .selected-card.mobile-expanded .selected-metric span,.selected-card.mobile-expanded .selected-last-trip>span{font-size:.54rem}
  .selected-card.mobile-expanded .selected-metric strong,.selected-card.mobile-expanded .selected-last-trip strong{font-size:.68rem}
  .selected-card.mobile-expanded:not([hidden])~.route-summary-card:not(.collapsed){bottom:380px!important}
}
@media(max-width:430px){
  .selected-card.mobile-expanded{max-height:min(70dvh,345px)!important}
  .selected-card.mobile-expanded:not([hidden])~.route-summary-card:not(.collapsed){bottom:355px!important}
}


/* v8.3 · tema claro fijo, ficha minimizable, georutas y recorridos operativos */
html,body{color-scheme:light!important;background:#f5f7f3!important}
body.light-mode{background:#f5f7f3!important;color:#202720!important}
.theme-toggle{display:none!important}
#theme-toggle.theme-toggle{display:none!important;visibility:hidden!important;pointer-events:none!important}
.georoute-export-button{border-color:#cfe0d2!important;background:#f8fbf8!important;color:#2f6842!important}
.georoute-export-button:hover{background:#edf6ef!important}
.georoute-report-dialog{width:min(620px,calc(100vw - 24px))!important}
.selected-card{transition:width .18s ease,max-height .18s ease,padding .18s ease;overflow:hidden}
.selected-top{position:relative;padding-right:34px}
.selected-collapse-button{position:absolute;right:0;top:50%;transform:translateY(-50%);width:30px;height:30px;border:1px solid #dfe8df;border-radius:8px;background:#f7faf7;color:#496052;display:grid;place-items:center;padding:0}
.selected-collapse-button:hover{background:#edf5ef}.selected-collapse-button .icon{width:16px;height:16px}
.selected-card.collapsed{width:min(245px,calc(100% - 40px));padding:11px 12px;max-height:68px}
.selected-card.collapsed .selected-top{margin:0}.selected-card.collapsed .selected-card-body{display:none!important}
.selected-map-link,.route-stop a,.route-stop-popup a{display:inline-block;margin-top:5px;color:#2d6e43;font-size:.62rem;font-weight:700;text-decoration:underline;text-underline-offset:2px}
.route-line-legend{display:flex;gap:12px;flex-wrap:wrap;margin:8px 0 10px;font-size:.66rem;color:#657266}
.route-line-legend span{display:inline-flex;align-items:center;gap:6px}.route-line-legend i{display:inline-block;width:24px;height:4px;border-radius:999px;background:#2f7d4a}.route-line-legend .returning i{background:#5368b7;background-image:linear-gradient(90deg,#5368b7 60%,transparent 60%);background-size:8px 4px}
.route-stop{align-items:flex-start!important}.route-stop>span{min-width:0;line-height:1.4}.route-stop>strong{white-space:nowrap}
.route-outbound-line,.route-return-line{filter:drop-shadow(0 1px 1px rgba(20,40,26,.18))}
.route-arrow-wrap{transform:scale(.88)}
@media(max-width:760px){
  .selected-card{left:8px!important;bottom:9px!important;width:min(310px,calc(100% - 16px))!important;padding:12px!important;max-height:min(55dvh,310px)!important;overflow:auto!important}
  .selected-card.collapsed{width:min(230px,calc(100% - 16px))!important;max-height:62px!important;overflow:hidden!important}
  .selected-metrics{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .selected-last-trip,.selected-insight-loading{display:block!important}
  .selected-card.collapsed .selected-metrics,.selected-card.collapsed .selected-last-trip,.selected-card.collapsed .selected-insight-loading{display:none!important}
  .route-summary-card:not(.collapsed){max-height:48dvh!important;overflow:auto!important}
  .georoute-report-dialog{width:calc(100vw - 10px)!important;max-height:calc(100dvh - 10px)!important}
}


/* v8.3.0 final · georutas, alarmas automáticas, recorrido profesional y responsive */
html,body{overflow-x:hidden!important}
.workspace,.monitor-window,.section-heading,.list-controls,.table-wrap,.trip-toolbar,.window-toolbar,.window-actions{min-width:0!important;max-width:100%!important}
.sos-sound-button.alerts-ready{border-color:#7ab48a!important;background:#f2faf4!important;color:#2a7142!important;box-shadow:inset 0 0 0 1px rgba(72,157,94,.08)}
.sos-sound-button.alerts-system-ready{border-color:#57a36c!important;background:#ebf8ef!important}
.sos-sound-button.alerts-ready .icon{color:#2b8c4c!important}
.route-summary-card{width:min(430px,calc(100% - 36px));max-height:min(72%,620px);overflow:auto;scrollbar-width:thin}
.route-summary-head{position:sticky;top:-13px;z-index:2;display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin:-13px -15px 8px;padding:12px 14px 10px;background:rgba(255,255,255,.97);border-bottom:1px solid #e5eae2;backdrop-filter:blur(8px)}
.route-summary-heading{min-width:0}.route-summary-heading strong{margin:0!important}.route-summary-mini{display:block;margin-top:2px;color:#778478;font-size:.61rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.route-summary-actions{display:flex;gap:4px;flex:0 0 auto}.route-summary-toggle{width:30px;height:30px!important;display:grid;place-items:center!important;padding:0!important;border:1px solid #dfe7df!important;border-radius:8px!important;background:#f9fbf9!important}.route-summary-toggle .icon{width:15px;height:15px}.route-summary-close{color:#7d665f!important}
.route-summary-card.collapsed{width:min(280px,calc(100% - 36px));max-height:58px!important;overflow:hidden!important;padding-bottom:6px!important}.route-summary-card.collapsed .route-summary-head{position:static;margin:-13px -15px 0;border-bottom:0}.route-summary-card.collapsed .route-summary-body{display:none!important}
.route-meta{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px!important;margin:6px 0 8px}.route-meta span{padding:6px 7px;border:1px solid #e3e9e1;border-radius:7px;background:#f8faf7;color:#5f6c60!important;font-size:.61rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.route-line-legend{padding:7px 0 2px;border-top:1px solid #edf0eb}.route-line-legend .paused i{height:10px;width:10px;border-radius:50%;background:#c8943d!important;box-shadow:0 0 0 2px #f4e6c8}
.route-timeline{margin-top:10px;padding:10px 10px 5px;border:1px solid #e3e9e1;border-radius:10px;background:#fbfcfa}
.route-timeline-title{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:6px}.route-timeline-title b{font-size:.72rem;color:#304032}.route-timeline-title span{font-size:.58rem;color:#879187}
.route-timeline-row{position:relative;display:grid;grid-template-columns:18px minmax(0,1fr);gap:7px;padding:6px 0 7px}.route-timeline-row:not(:last-child):before{content:"";position:absolute;left:8px;top:20px;bottom:-5px;width:2px;background:#dfe6df}.route-timeline-node{width:10px;height:10px;margin:4px 0 0 4px;border-radius:50%;background:#2f7d4a;box-shadow:0 0 0 3px #e8f3eb;z-index:1}.route-timeline-row.return .route-timeline-node{background:#5368b7;box-shadow:0 0 0 3px #e9ecf7}.route-timeline-row.stop10 .route-timeline-node{background:#c9a354;box-shadow:0 0 0 3px #f5eedf}.route-timeline-row.stop20 .route-timeline-node{background:#d18443;box-shadow:0 0 0 3px #f8e9dc}.route-timeline-row.stop40 .route-timeline-node{background:#bd5f52;box-shadow:0 0 0 3px #f8e4e1}.route-timeline-row.end .route-timeline-node{background:#445e78;box-shadow:0 0 0 3px #e7edf2}
.route-timeline-row>div{min-width:0}.route-timeline-row strong,.route-timeline-row span,.route-timeline-row small{display:block}.route-timeline-row strong{font-size:.68rem;color:#344236}.route-timeline-row span{margin-top:1px;font-size:.64rem;color:#647165;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.route-timeline-row small{margin-top:2px;font-size:.58rem;color:#899389}.route-timeline-row a{display:inline-block;margin-top:3px;font-size:.58rem;font-weight:700;color:#2d6e43;text-decoration:underline;text-underline-offset:2px}
.route-endpoints>div{background:#fbfcfa}.route-stops{max-height:180px!important}.route-events{max-height:130px!important}
.stop-icon.stop-long{background:#fff9ed!important;border-color:#c58e34!important}.route-arrow-wrap .route-seq{font-size:8px!important}
/* Mantener todos los formularios y casillas en tema claro */
dialog,.ops-dialog,.access-dialog,.movement-dialog,.groups-dialog-v81{background:#fff!important;color:#202720!important;border-color:#dfe6df!important;box-shadow:0 24px 70px rgba(31,46,34,.18)!important}
.access-dialog>select,.access-dialog input,.access-dialog select,.groups-dialog-v81 input,.groups-dialog-v81 select,.groups-dialog-v81 textarea,.movement-dialog select{background:#fff!important;color:#263027!important;border-color:#d9e3d9!important}
.access-user-summary,.access-permission,.groups-dialog-v81 .convoy-fields-v78,.groups-dialog-v81 .convoy-unit-card,.movement-row,.movement-summary{background:#f8faf8!important;border-color:#dde7dd!important;color:#273128!important}
.access-permission strong,.groups-dialog-v81 .convoy-unit-head strong{color:#304a35!important}.access-permission small,.access-user-summary span,.groups-dialog-v81 .convoy-unit-head span{color:#758176!important}
.access-permission:has(input:checked){background:#eff8f1!important;border-color:#7ab88a!important;box-shadow:none!important}.access-permission input{accent-color:#3b9155!important}
.dialog-close{background:#f8faf8!important;border-color:#dde6dd!important;color:#526153!important}
.georoute-report-dialog form label{display:block;font-size:.76rem;font-weight:650;margin:13px 0 6px}.georoute-report-dialog form input,.georoute-report-dialog form select{width:100%;min-height:44px;padding:9px 10px;border:1px solid #d9e3d9;background:#fff;color:#202720;border-radius:8px}.georoute-report-dialog .login-submit{width:100%;margin-top:4px}
@media(max-width:760px){
  .window-toolbar{overflow:hidden!important}.monitor-window .window-actions{grid-template-columns:repeat(7,minmax(0,1fr))!important;width:100%!important}.monitor-window .window-actions>*{min-width:0!important;max-width:100%!important}
  .route-summary-card{left:8px!important;right:8px!important;bottom:8px!important;width:auto!important;max-height:52dvh!important;border-radius:11px!important}.selected-card:not([hidden])~.route-summary-card:not(.collapsed){bottom:8px!important}.route-summary-card.collapsed{left:auto!important;right:8px!important;bottom:8px!important;width:min(255px,calc(100% - 16px))!important;max-height:57px!important}
  .route-meta{grid-template-columns:repeat(2,minmax(0,1fr))}.route-timeline{padding:8px 8px 4px}.route-timeline-title{display:block}.route-timeline-title span{display:block;margin-top:2px}.route-timeline-row{padding:5px 0 6px}
  .selected-card{max-width:calc(100% - 16px)!important}.selected-card.collapsed{max-width:calc(100% - 16px)!important}
  .section-heading{display:block!important}.section-heading>div:first-child{min-width:0!important}.list-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:7px!important;margin-top:12px}.list-controls .export-button{width:100%!important;min-width:0!important;padding-left:7px!important;padding-right:7px!important;font-size:.7rem!important}.search-field{grid-column:1/-1;width:100%!important;min-width:0!important}.list-controls select{width:100%!important;max-width:none!important;min-width:0!important}.cleanup-button,.movement-button{width:100%!important}
  .table-wrap{width:100%!important;max-width:100%!important;overflow-x:hidden!important}
  .locations tr{min-width:0!important}.locations td{min-width:0!important}.address-line,.user-names{overflow-wrap:anywhere}
}
@media(max-width:430px){
  .list-controls{grid-template-columns:1fr 1fr!important}.route-summary-card:not(.collapsed){max-height:50dvh!important}.route-summary-heading{max-width:190px}.route-summary-mini{max-width:190px}
}

/* v8.3.0 · ajuste final de superposición móvil */
@media(max-width:760px){
  .route-summary-card,.route-summary-card:not(.collapsed){top:62px!important;bottom:auto!important;left:8px!important;right:8px!important;max-height:44dvh!important}
  .route-summary-card.collapsed{top:62px!important;bottom:auto!important;left:auto!important;right:8px!important;width:min(255px,calc(100% - 16px))!important;max-height:57px!important}
  .selected-card:not([hidden])~.route-summary-card,.selected-card:not([hidden])~.route-summary-card:not(.collapsed){top:62px!important;bottom:auto!important}
}

/* P1S v8.3.1 · estabilidad de OpenStreetMap en Android/PC */
.leaflet-tile-pane{filter:none!important;}
.leaflet-map-pane,.leaflet-tile-pane{backface-visibility:visible!important;transform-style:flat!important;}
.leaflet-tile{will-change:auto!important;image-rendering:auto;}
@media(max-width:760px){.leaflet-zoom-animated{will-change:auto!important}.route-history-dot{pointer-events:none}}


/* P1S 8.4.0 · Google Maps JavaScript API VECTOR como mapa base oficial */
.map-panel{position:relative;isolation:isolate;background:#f7f8f5}
.google-map-base{position:absolute;inset:0;z-index:0;opacity:0;visibility:hidden;transition:opacity .18s ease;background:#f7f8f5;pointer-events:none}
.map-panel.google-base-active .google-map-base{opacity:1;visibility:visible}
.map-panel #map{position:absolute;inset:0;z-index:1;background:transparent!important}
.map-panel.google-base-active #map,.map-panel.google-base-active .leaflet-container{background:transparent!important}
.map-panel.google-base-active .leaflet-tile-pane{display:none!important}
.map-panel.google-base-active .leaflet-control-attribution{display:none!important}
.map-panel.google-base-active .leaflet-map-pane{background:transparent!important}
.map-panel.google-base-active .leaflet-overlay-pane,.map-panel.google-base-active .leaflet-marker-pane,.map-panel.google-base-active .leaflet-tooltip-pane,.map-panel.google-base-active .leaflet-popup-pane{pointer-events:auto}
.google-map-base .gm-style{font-family:Roboto,Arial,sans-serif}

/* Respaldo vectorial OpenFreeMap/MapLibre debajo de las capas Leaflet P1S. */
.map-panel.vector-base-active .google-map-base{opacity:1;visibility:visible}
.map-panel.vector-base-active #map,.map-panel.vector-base-active .leaflet-container{background:transparent!important}
.map-panel.vector-base-active .leaflet-tile-pane{display:none!important}
.map-panel.vector-base-active .leaflet-map-pane{background:transparent!important}
.map-panel.vector-base-active .leaflet-overlay-pane,.map-panel.vector-base-active .leaflet-marker-pane,.map-panel.vector-base-active .leaflet-tooltip-pane,.map-panel.vector-base-active .leaflet-popup-pane{pointer-events:auto}
.map-panel.vector-base-active .leaflet-control-attribution{display:block!important;background:#ffffffea!important;max-width:82%;white-space:normal}
.vector-map-base .maplibregl-map,.vector-map-base .maplibregl-canvas-container,.vector-map-base canvas{width:100%!important;height:100%!important}
.vector-map-base .maplibregl-control-container{display:none!important}


/* P1S 8.4.3 · Google Híbrido oficial por defecto + Carreteras/Satélite */
.google-map-type-control{position:absolute;z-index:550;top:12px;right:78px;display:flex;align-items:center;padding:3px;background:rgba(255,255,255,.96);border:1px solid #dfe5df;border-radius:10px;box-shadow:0 2px 9px rgba(24,38,27,.14);font-family:Roboto,Arial,sans-serif;backdrop-filter:blur(8px)}
.google-map-type-control button{border:0;background:transparent;color:#4f5b51;min-height:34px;padding:0 11px;border-radius:7px;font:600 .7rem/1 Roboto,Arial,sans-serif;cursor:pointer;white-space:nowrap}
.google-map-type-control button:hover{background:#f2f5f2;color:#1f2b21}.google-map-type-control button.active{background:#fff;color:#166b32;box-shadow:0 1px 4px rgba(22,46,29,.18);outline:1px solid #cfe0d2}
.map-panel.google-base-active{background:#f7f8f5!important}.map-panel.google-base-active .leaflet-control-attribution{display:none!important}
@media(max-width:760px){.google-map-type-control{top:9px;right:66px;max-width:calc(100% - 130px);padding:2px;border-radius:9px}.google-map-type-control button{min-height:32px;padding:0 8px;font-size:.62rem}.fit-button{z-index:560!important}}
@media(max-width:420px){.google-map-type-control{right:61px}.google-map-type-control button{padding:0 6px}.google-map-type-control button[data-google-map-type="satellite"]{display:none}}

/* P1S 8.4.3 · control compacto para Google Híbrido en Android */
@media(max-width:520px){.google-map-type-control button[data-google-map-type="hybrid"]{font-weight:700}.google-map-type-control button[data-google-map-type="hybrid"]{max-width:104px;overflow:hidden;text-overflow:ellipsis}.google-map-type-control button[data-google-map-type="roadmap"]{max-width:78px}}

/* P1S 8.4.4 · estabilidad final Google Híbrido / Android */
.google-map-base{contain:layout paint style;transform:translateZ(0)}
.map-panel.google-base-active .google-map-base{background:#f7f8f5!important}
@media(max-width:760px){.google-map-base{transition:none}.map-panel{overscroll-behavior:contain}.google-map-type-control{z-index:570}}
/* P1S 8.4.4 · controles del mapa sin superposición en móvil */
@media(max-width:760px){
  .google-map-type-control{top:56px!important;right:10px!important;left:auto!important;max-width:calc(100% - 20px)!important;transform:none!important}
  .google-map-type-control button{min-height:30px!important;padding:0 7px!important}
  .fit-button{top:12px!important;right:12px!important}
  .map-label{top:12px!important;left:12px!important;max-width:calc(100% - 110px)!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}


/* P1S 8.6.2 · mapa estable: un solo motor Leaflet para mantener GPS/geozonas anclados */
.google-map-base,.google-map-type-control{display:none!important}
.map-panel{background:#f7f8f5!important;contain:layout paint}
.map-panel #map{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;background:#f7f8f5!important;z-index:1!important}
.leaflet-tile.p1s-map-tiles{filter:saturate(.9) brightness(1.035) contrast(.98);image-rendering:auto}
.leaflet-map-pane,.leaflet-tile-pane,.leaflet-overlay-pane,.leaflet-marker-pane{backface-visibility:hidden!important;transform-style:flat!important}
.leaflet-zoom-animated{transform-origin:0 0}
.geofence-label{font-weight:750!important;background:rgba(255,255,255,.94)!important;border:1px solid #88a56f!important;color:#38543a!important;box-shadow:0 2px 8px rgba(42,72,46,.12)!important}
.leaflet-interactive.geofence-draft-circle{stroke:#2f8f55!important}
.poi-icon{background:transparent!important;border:0!important}
.poi-icon>span{display:grid;width:27px;height:27px;place-items:center;border-radius:50%;background:#fff;border:2px solid #4f7a52;box-shadow:0 2px 7px rgba(22,42,26,.22);font-size:14px;line-height:1;color:#234a2c}
.poi-traffic_signal>span{border-color:#5c6b59}.poi-hospital>span,.poi-pharmacy>span{border-color:#bd4c4c;color:#a22f2f}.poi-police>span{border-color:#416ba0;color:#365c8a}.poi-fuel>span{border-color:#b9822f}.poi-school>span{border-color:#6f69a7}.poi-supermarket>span{border-color:#4f8f66}
@media(max-width:760px){.leaflet-control-zoom{margin-right:13px!important;margin-bottom:18px!important}.fit-button{right:12px!important;top:12px!important}.map-label{left:12px!important;top:12px!important}.poi-icon>span{width:25px;height:25px;font-size:13px}}


/* P1S 8.6.2 · mapa móvil rápido, telemetría visible y entorno manual */
.p1s-map-tiles{image-rendering:auto!important}
.row-live-metrics{display:flex;flex-wrap:wrap;gap:5px 10px;margin-top:7px;color:#72806f;font-size:.66rem;line-height:1.35;font-variant-numeric:tabular-nums}
.row-live-metrics span{white-space:nowrap}.row-live-metrics b{color:#4b5d49;font-weight:700}
#nearby-button.active-tool{border-color:#6ca879!important;background:#eef8f0!important;color:#28663a!important;box-shadow:inset 0 0 0 1px rgba(47,128,70,.08)}
#nearby-button.active-tool .icon{color:#2d8a4a!important}
@media(max-width:760px){
  .map-panel{height:min(64dvh,500px)!important;min-height:390px}
  .leaflet-control-attribution{max-width:72%!important;white-space:normal!important;line-height:1.15!important;padding:2px 4px!important}
  .selected-card{width:calc(100% - 16px)!important;max-height:min(58dvh,330px)!important}
  .selected-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .row-live-metrics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 8px;margin-top:9px;padding-top:8px;border-top:1px solid #e7ece3;font-size:.68rem}
  .row-live-metrics span{white-space:normal;min-width:0}
  .row-live-metrics span:nth-child(3){grid-column:1/-1}
  .locations td:nth-child(3){padding-bottom:11px!important}
  .marker-name{font-size:.68rem!important;padding:3px 6px!important}
  .guard-pin{width:38px;height:38px}
}
@media(max-width:430px){
  .map-panel{height:min(62dvh,470px)!important;min-height:370px}
  .row-live-metrics{font-size:.66rem}
  .selected-card{max-height:min(56dvh,315px)!important}
}
\n\n/* P1S 8.6.2 · estado de Entorno y controles táctiles */
.nearby-status{position:absolute;z-index:525;top:62px;right:20px;max-width:min(360px,calc(100% - 40px));padding:7px 10px;border:1px solid #cfdac8;border-radius:9px;background:rgba(255,255,255,.95);box-shadow:0 4px 14px rgba(29,48,24,.12);color:#4a5d44;font-size:.7rem;font-weight:650;line-height:1.3;pointer-events:none;backdrop-filter:blur(5px)}
.nearby-status[data-state="loading"]{border-color:#9fba8d;color:#3c673f}
.nearby-status[data-state="ok"]{border-color:#84b88c;color:#2e6940}
.nearby-status[data-state="warn"]{border-color:#c9a95b;color:#7c6424;background:rgba(255,250,235,.96)}
.nearby-coverage{stroke:#4f9460;fill:#69a973;fill-opacity:.045;stroke-opacity:.55;stroke-dasharray:5 7;pointer-events:none}
#nearby-button.loading-tool{cursor:pointer!important;pointer-events:auto!important}
#nearby-button.loading-tool:after{content:"";position:absolute;right:5px;top:5px;width:6px;height:6px;border-radius:50%;background:#4f9d62;box-shadow:0 0 0 3px rgba(79,157,98,.14)}
@media(max-width:760px){.nearby-status{top:12px;right:54px;left:auto;max-width:calc(100% - 175px);padding:6px 8px;font-size:.64rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.monitor-window .window-actions button{touch-action:manipulation!important}.map-panel{overscroll-behavior:contain}}
@media(max-width:430px){.nearby-status{right:50px;max-width:calc(100% - 160px);font-size:.61rem}}

/* P1S 8.9.1 · Operación, búsqueda, perfiles y exportación unificada */
.theme-toggle{display:grid!important;place-items:center!important}
.account-photo,.account-profile-image,.profile-preview-image,.traccar-user-photo,.device-avatar-photo,.guard-pin-photo{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.account-button{overflow:hidden}.account-button .account-photo{width:28px;height:28px;border-radius:50%}.avatar{overflow:hidden}.device-avatar-photo{width:32px;height:32px;border-radius:9px}.guard-pin-photo{width:100%;height:100%;border-radius:50%;object-fit:cover}.traccar-user-photo{width:34px;height:34px;border-radius:9px}
.map-search-strip{position:relative;display:grid;grid-template-columns:minmax(250px,1fr) auto auto;gap:8px;align-items:center;padding:9px 12px;border-bottom:1px solid #e0e7dd;background:#fbfcf9;z-index:15}.map-search-field{display:flex;align-items:center;gap:8px;min-height:40px;border:1px solid #d9e2d5;border-radius:10px;background:#fff;padding:0 11px}.map-search-field .icon{width:16px;height:16px;color:#64806a}.map-search-field input{border:0!important;outline:0!important;background:transparent!important;width:100%;min-width:0;color:#263229;font:inherit;font-size:.78rem}.map-search-strip .button{min-height:40px;margin:0;white-space:nowrap}.map-search-results{position:absolute;left:12px;top:54px;width:min(620px,calc(100% - 24px));max-height:300px;overflow:auto;padding:7px;border:1px solid #dbe4d7;border-radius:11px;background:#fff;box-shadow:0 14px 30px rgba(25,43,28,.18);z-index:1200}.map-search-result{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:9px;align-items:center;text-align:left;border:1px solid transparent;border-radius:9px;padding:8px;background:#fff;color:#263229;cursor:pointer}.map-search-result:hover{background:#f4f9f2;border-color:#c9ddc9}.map-search-result strong,.map-search-result small{display:block}.map-search-result strong{font-size:.75rem}.map-search-result small{font-size:.64rem;color:#7d8b7d;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.map-search-result b{font-size:.65rem;color:#3a8548}.map-search-result-pin{display:grid;place-items:center;width:31px;height:31px;border-radius:9px;background:#edf7e9;color:#438f4f}.map-search-message{padding:9px 10px;color:#728071;font-size:.7rem}.map-search-pin{display:grid;width:34px;height:34px;place-items:center;border-radius:50% 50% 50% 8px;transform:rotate(-45deg);background:#071009;color:#57ff73;border:2px solid #65ff7c;box-shadow:0 0 0 3px rgba(74,255,106,.18),0 4px 16px rgba(0,0,0,.3)}.map-search-pin svg{width:17px;height:17px;transform:rotate(45deg)}.map-search-label{font-weight:750!important;border-color:#77c882!important}
.account-menu-dialog{width:min(620px,calc(100% - 24px))}.account-menu-head{display:grid;grid-template-columns:64px 1fr;gap:14px;align-items:center;margin-bottom:16px}.account-profile-preview{width:60px;height:60px;border-radius:18px;display:grid;place-items:center;background:#edf5e8;color:#3e884c;overflow:hidden;border:1px solid #d3dfce}.account-profile-preview .icon{width:26px;height:26px}.account-menu-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.account-menu-action{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:center;text-align:left;border:1px solid #dae4d6;border-radius:12px;background:#fafcf8;color:#273329;padding:11px;cursor:pointer;min-height:70px}.account-menu-action:hover{border-color:#81ba87;background:#f1f8ef}.account-menu-action>.icon{width:20px;height:20px;color:#408c4f}.account-menu-action span strong,.account-menu-action span small{display:block}.account-menu-action strong{font-size:.76rem}.account-menu-action small{font-size:.64rem;color:#7f8e7f;margin-top:3px}.account-menu-action.active{border-color:#4fc967;box-shadow:inset 0 0 0 1px rgba(69,202,99,.18)}
.access-scope-panel{margin:14px 0;padding:12px;border:1px solid #dce5d8;border-radius:12px;background:#fafcf8}.access-scope-panel>div:first-child select{width:100%;margin-top:5px}.access-scope-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.access-scope-columns>div>strong,.access-scope-columns>div>small{display:block}.access-scope-columns>div>strong{font-size:.74rem}.access-scope-columns>div>small{font-size:.63rem;color:#819080;margin:3px 0 7px}.access-scope-list{max-height:190px;overflow:auto;display:flex;flex-direction:column;gap:6px;padding:5px;border:1px solid #e1e8df;border-radius:9px;background:#fff}.access-scope-choice{display:grid;grid-template-columns:18px 1fr;gap:7px;align-items:start;padding:7px;border-radius:8px;background:#fafcf9}.access-scope-choice span strong,.access-scope-choice span small{display:block}.access-scope-choice strong{font-size:.7rem}.access-scope-choice small{font-size:.61rem;color:#7b897a}
.profile-dialog{width:min(500px,calc(100% - 24px))}.profile-editor{display:grid;grid-template-columns:150px 1fr;gap:16px;align-items:center;margin-top:14px}.profile-preview{width:142px;height:142px;border-radius:24px;display:grid;place-items:center;overflow:hidden;border:1px solid #d8e2d4;background:#f2f7ef;color:#4a8c54}.profile-preview>.icon{width:42px;height:42px}.profile-editor input[type=file]{width:100%;font-size:.7rem;margin-bottom:10px}.profile-editor .button{width:100%;margin:5px 0 0}
.movement-toolbar-global{display:grid!important;grid-template-columns:minmax(130px,1fr) minmax(120px,.8fr) minmax(155px,1fr) minmax(155px,1fr) auto!important;gap:7px!important;align-items:end!important}.movement-toolbar-global label{font-size:.62rem;color:#718071}.movement-toolbar-global select,.movement-toolbar-global input{width:100%;min-height:39px;border:1px solid #dbe4d7;border-radius:8px;background:#fff;color:#29342b;padding:0 8px;font-size:.7rem}.movement-toolbar-global .button{min-height:39px;margin:0}.movement-actions[hidden]{display:none!important}
.sos-focus-point{stroke:#ff3541!important;fill:#ff3541!important;filter:drop-shadow(0 0 8px rgba(255,38,58,.7))}
.route-outbound-outline,.route-return-outline,.replay-progress-outline,.replay-return-outline{stroke:#020603!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.35))}.route-outbound-line,.replay-progress-line{stroke:#39ff63!important;filter:drop-shadow(0 0 4px rgba(57,255,99,.34))}.route-return-line,.replay-return-line{stroke:#2f8cff!important;filter:drop-shadow(0 0 4px rgba(47,140,255,.36))}.route-line-legend .outbound i,.replay-legend-line.outbound{background:#39ff63!important;box-shadow:0 0 0 2px #020603}.route-line-legend .returning i,.replay-legend-line.returning{background:#2f8cff!important;background-image:none!important;box-shadow:0 0 0 2px #020603}
body:not(.light-mode){background:#020503!important;color:#e9f8eb!important}body:not(.light-mode) .site-header{background:#030805!important;border-bottom:1px solid #124d25!important;box-shadow:0 0 24px rgba(45,255,87,.08)}body:not(.light-mode) .monitor-window,body:not(.light-mode) .stats,body:not(.light-mode) .list-section,body:not(.light-mode) dialog{background:#040805!important;border-color:#15552a!important;box-shadow:0 0 0 1px rgba(57,255,99,.04),0 18px 55px rgba(0,0,0,.5)}body:not(.light-mode) .window-toolbar,body:not(.light-mode) .trip-toolbar,body:not(.light-mode) .window-footer,body:not(.light-mode) .map-search-strip{background:#030704!important;border-color:#124d25!important}body:not(.light-mode) .map-search-field,body:not(.light-mode) .map-search-results,body:not(.light-mode) .map-search-result,body:not(.light-mode) .access-scope-list,body:not(.light-mode) .movement-toolbar-global select,body:not(.light-mode) .movement-toolbar-global input{background:#061009!important;border-color:#1d6934!important;color:#e7f7e9!important}body:not(.light-mode) .map-search-result:hover{background:#0a1a0e!important;border-color:#3ac45a!important}body:not(.light-mode) .map-search-result small,body:not(.light-mode) .map-search-message,body:not(.light-mode) .movement-toolbar-global label{color:#7e9c84!important}body:not(.light-mode) .map-search-result b{color:#66ff7d!important}body:not(.light-mode) .map-search-result-pin{background:#0b2511!important;color:#62ff79!important}body:not(.light-mode) .account-profile-preview,body:not(.light-mode) .profile-preview{background:#07150a!important;border-color:#24713a!important;color:#61ff79!important;box-shadow:0 0 18px rgba(57,255,99,.09)}body:not(.light-mode) .account-menu-action,body:not(.light-mode) .access-scope-panel,body:not(.light-mode) .access-scope-choice{background:#061009!important;border-color:#184f2a!important;color:#dff5e2!important}body:not(.light-mode) .account-menu-action:hover{background:#0a1b0e!important;border-color:#3fd15f!important;box-shadow:0 0 14px rgba(57,255,99,.1)}body:not(.light-mode) .account-menu-action>.icon{color:#61ff79!important}body:not(.light-mode) .account-menu-action small,body:not(.light-mode) .access-scope-columns>div>small,body:not(.light-mode) .access-scope-choice small{color:#7f9985!important}body:not(.light-mode) .button-outline,body:not(.light-mode) .trip-button,body:not(.light-mode) .icon-button{border-color:#1e7137!important;background:#050d07!important;color:#c9ffd1!important}body:not(.light-mode) .button-outline:hover,body:not(.light-mode) .trip-button:hover{border-color:#4eff6b!important;box-shadow:0 0 12px rgba(57,255,99,.17)!important}body:not(.light-mode) .button-primary{background:#37ff5d!important;color:#041007!important;border-color:#56ff74!important;box-shadow:0 0 18px rgba(57,255,99,.18)}body:not(.light-mode) input,body:not(.light-mode) select,body:not(.light-mode) textarea{color-scheme:dark}body:not(.light-mode) .leaflet-control-zoom a{background:#050b06!important;color:#72ff85!important;border-color:#1f7138!important}body:not(.light-mode) .leaflet-control-attribution{background:rgba(3,8,5,.88)!important;color:#89a68e!important}body:not(.light-mode) .leaflet-control-attribution a{color:#70ff84!important}
@media(max-width:900px){.movement-toolbar-global{grid-template-columns:1fr 1fr!important}.movement-toolbar-global .button{grid-column:1/-1}.map-search-strip{grid-template-columns:1fr auto}.map-search-strip #map-search-geofence{grid-column:1/-1}.access-scope-columns{grid-template-columns:1fr}}
@media(max-width:760px){.map-search-strip{padding:8px;gap:6px}.map-search-field{grid-column:1/-1}.map-search-strip #map-location-search-button,.map-search-strip #map-search-geofence{grid-column:auto}.map-search-results{left:8px;top:55px;width:calc(100% - 16px)}.account-menu-grid{grid-template-columns:1fr}.profile-editor{grid-template-columns:1fr}.profile-preview{width:112px;height:112px;margin:0 auto}.movement-toolbar-global{grid-template-columns:1fr!important}.movement-toolbar-global .button{grid-column:1}.account-menu-dialog,.profile-dialog{width:calc(100% - 14px)!important}}
/* v8.9.1 · etiqueta de resguardo en Movimientos globales */
.movement-device-label{display:inline-flex;align-items:center;width:max-content;max-width:100%;margin:0 0 4px;padding:3px 7px;border:1px solid #c9dcc7;border-radius:999px;background:#f0f7ed;color:#397347;font-style:normal;font-size:.58rem;font-weight:800;letter-spacing:.025em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body:not(.light-mode) .movement-device-label{background:#07180c;border-color:#257b3d;color:#70ff84;box-shadow:0 0 10px rgba(57,255,99,.08)}

/* P1S v8.9.1 · operación clara, sin modo oscuro */
html.light-mode,body.light-mode{background:var(--paper)!important;color:var(--ink)!important;color-scheme:light!important}
.theme-toggle{display:none!important}

/* Buscador de ubicaciones: marcador claro, visible y profesional */
.map-search-pin-wrap{filter:drop-shadow(0 7px 11px rgba(45,74,35,.24))}
.map-search-pin{position:relative;display:grid;width:40px;height:40px;place-items:center;border-radius:50% 50% 50% 10px;transform:rotate(-45deg);background:linear-gradient(145deg,#e7f85d,#bde83d);color:#243315;border:3px solid #fff;box-shadow:0 0 0 2px #7b9c32,0 6px 18px rgba(58,82,34,.28);animation:p1sSearchPinFloat 1.65s ease-in-out infinite}
.map-search-pin:after{content:"";position:absolute;width:15px;height:15px;border-radius:50%;background:rgba(152,192,57,.2);border:1px solid rgba(103,135,41,.45);left:50%;top:100%;transform:translate(-50%,13px) rotate(45deg);animation:p1sSearchPinPulse 1.65s ease-out infinite}
.map-search-pin svg{width:18px;height:18px;transform:rotate(45deg);stroke-width:2}
.map-search-label{background:#fff!important;color:#344128!important;border:1px solid #afc765!important;border-radius:7px!important;box-shadow:0 3px 10px rgba(29,46,25,.14)!important;font-weight:750!important;padding:4px 8px!important}
@keyframes p1sSearchPinFloat{0%,100%{transform:rotate(-45deg) translate(0,0)}50%{transform:rotate(-45deg) translate(3px,-3px)}}
@keyframes p1sSearchPinPulse{0%{opacity:.7;transform:translate(-50%,9px) rotate(45deg) scale(.55)}100%{opacity:0;transform:translate(-50%,9px) rotate(45deg) scale(1.8)}}

/* Accesos: P1S GRUPO + PARKANO */
.access-groups-block>strong,.access-groups-block>small{display:block}.access-groups-block>strong{font-size:.76rem;color:#34402f}.access-groups-block>small{font-size:.64rem;color:#7c8a7a;margin:4px 0 8px;line-height:1.45}
.access-company-list{display:grid;grid-template-columns:1fr;gap:7px;padding:7px;border:1px solid #e0e7dc;border-radius:10px;background:#fff}
.access-company-choice{display:grid;grid-template-columns:20px 1fr;gap:9px;align-items:center;padding:9px 10px;border:1px solid #e2e8de;border-radius:9px;background:#fafcf8;cursor:pointer;transition:.16s ease}
.access-company-choice:hover{border-color:#a6c46d;background:#f4f8ed}.access-company-choice:has(input:checked){border-color:#8faf45;background:#f1f7df;box-shadow:inset 3px 0 #9fbe45}
.access-company-choice input{width:16px;height:16px;accent-color:#789238}.access-company-choice span strong,.access-company-choice span small{display:block}.access-company-choice strong{font-size:.73rem}.access-company-choice small{font-size:.62rem;color:#7c8a79;margin-top:2px}

/* Editor de foto con recorte interactivo */
.profile-dialog{width:min(700px,calc(100% - 24px))!important}.profile-editor{grid-template-columns:155px minmax(0,1fr)!important;align-items:start!important}.profile-current-column{display:flex;flex-direction:column;gap:7px;align-items:center}.profile-column-label{font-size:.64rem;color:#7e8b7b;font-weight:700;text-transform:uppercase;letter-spacing:.06em}.profile-crop-column{min-width:0}.profile-crop-wrap{margin-top:10px}.profile-crop-stage{position:relative;width:min(320px,100%);aspect-ratio:1;border-radius:18px;overflow:hidden;border:1px solid #cbd9c6;background:#eef4ea;box-shadow:inset 0 0 0 1px #ffffff,0 8px 22px rgba(35,55,30,.09);touch-action:none;user-select:none}.profile-crop-stage canvas{display:block;width:100%;height:100%;cursor:grab}.profile-crop-stage canvas:active{cursor:grabbing}.profile-crop-ring{pointer-events:none;position:absolute;inset:18px;border:2px solid rgba(255,255,255,.95);border-radius:50%;box-shadow:0 0 0 999px rgba(24,37,22,.28),0 0 0 1px rgba(83,116,54,.5)}.profile-crop-hint{font-size:.65rem;color:#71806e;margin:8px 0 6px;line-height:1.4}.profile-crop-controls{display:grid;grid-template-columns:auto minmax(120px,1fr) auto;gap:9px;align-items:center}.profile-crop-controls label{font-size:.68rem;font-weight:700;color:#596a53}.profile-crop-controls input[type=range]{width:100%;accent-color:#8da33e}.profile-crop-controls .button{min-height:34px;padding:6px 11px;margin:0}.profile-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.profile-actions .button{margin:0!important}.profile-editor input[type=file]{border:1px dashed #c6d5bf;border-radius:9px;background:#fafcf8;padding:9px}

/* Exportación consolidada */
.general-export-dialog{width:min(690px,calc(100% - 24px))}.date-range-pro{display:grid;grid-template-columns:1fr auto 1fr;gap:9px;align-items:end;margin:8px 0 13px}.date-range-pro>div{min-width:0}.date-range-pro label{display:block;margin-bottom:5px}.date-range-arrow{display:grid;place-items:center;width:34px;height:42px;color:#748465;font-weight:800}.export-section-fieldset{border:1px solid #dce5d7;border-radius:12px;padding:10px;margin:12px 0;background:#fafcf8}.export-section-fieldset legend{padding:0 7px;font-size:.7rem;font-weight:800;color:#46583f}.export-section-choice{display:grid;grid-template-columns:18px minmax(0,1fr);gap:9px;align-items:start;padding:9px;border-radius:9px;cursor:pointer}.export-section-choice:hover{background:#f0f6ea}.export-section-choice input{width:16px;height:16px;margin-top:2px;accent-color:#81983b}.export-section-choice span strong,.export-section-choice span small{display:block}.export-section-choice strong{font-size:.72rem}.export-section-choice small{font-size:.62rem;color:#7b8978;margin-top:2px;line-height:1.35}.export-section-all{border-bottom:1px solid #e1e7dd;margin-bottom:5px;border-radius:7px 7px 0 0}.georoute-extra-sections{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.georoute-extra-sections .export-section-choice{border:1px solid #e1e7dd;background:#fff}

/* Fechas y horas más limpias: evita el aspecto de selector pesado */
input[type="datetime-local"]{min-height:42px;width:100%;border:1px solid #d7e0d3!important;border-radius:10px!important;background:linear-gradient(#fff,#fbfcfa)!important;color:#2d392c!important;padding:0 11px!important;font-variant-numeric:tabular-nums;box-shadow:inset 0 1px 0 #fff,0 1px 2px rgba(30,48,27,.04);color-scheme:light}
input[type="datetime-local"]:focus{border-color:#92aa4b!important;outline:3px solid rgba(142,164,64,.14)!important;outline-offset:0!important}
input[type="datetime-local"]::-webkit-calendar-picker-indicator{opacity:.75;cursor:pointer;padding:7px;border-radius:7px;background-color:#eff4e7}
.movement-toolbar-global input[type="datetime-local"]{min-width:175px}

/* Barra inferior simplificada: no duplicar creación de geocerca ni excels de viaje */
.trip-toolbar-actions{gap:8px}.trip-toolbar-actions .trip-button{min-height:39px}

@media(max-width:760px){.profile-editor{grid-template-columns:1fr!important}.profile-current-column{align-items:flex-start}.profile-preview{width:92px!important;height:92px!important}.profile-crop-stage{margin-inline:auto}.profile-actions{grid-template-columns:1fr}.date-range-pro{grid-template-columns:1fr}.date-range-arrow{display:none}.georoute-extra-sections{grid-template-columns:1fr}.general-export-dialog{width:calc(100% - 14px)!important}.access-company-list{padding:5px}}

/* v8.9.3 · confirmación/cancelación segura de geocerca */
.geofence-submit-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin-top:14px}.geofence-submit-actions .button{width:100%;margin:0;min-height:44px}.geofence-submit-actions #geofence-cancel{border-color:#ccd7c8;background:#fff;color:#5d6b59}.geofence-submit-actions #geofence-submit{box-shadow:0 5px 16px rgba(104,160,63,.12)}@media(max-width:560px){.geofence-submit-actions{grid-template-columns:1fr}.geofence-submit-actions #geofence-submit{order:1}.geofence-submit-actions #geofence-cancel{order:2}}

/* v8.9.3 · Recorrido profesional + alertas operativas sobre mapa */
.route-summary-card{width:min(430px,calc(100% - 36px));max-height:min(72vh,720px);overflow:auto;padding:13px 15px 14px;border-radius:14px;border-color:#d8e2d5;box-shadow:0 18px 48px rgba(31,49,29,.16),0 2px 8px rgba(31,49,29,.08)}
.route-kpi-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:8px 0 10px}
.route-kpi-grid>div{min-width:0;padding:8px 9px;border:1px solid #e0e7dc;border-radius:10px;background:linear-gradient(180deg,#fff,#f8faf6)}
.route-kpi-grid small,.route-kpi-grid strong{display:block}.route-kpi-grid small{font-size:.56rem;letter-spacing:.02em;color:#7e8979;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.route-kpi-grid strong{margin:3px 0 0!important;font-size:.78rem!important;color:#263427!important;font-variant-numeric:tabular-nums}
.route-line-legend .traffic i{height:5px;background:repeating-linear-gradient(90deg,#e79a23 0 6px,transparent 6px 11px)!important;box-shadow:none!important}
.route-traffic-line{filter:drop-shadow(0 1px 1px rgba(91,57,7,.22))}
.route-arrow-pro{width:22px!important;height:22px!important;left:4px!important;top:4px!important;font-size:14px!important;background:#fff!important;border-width:2px!important;box-shadow:0 3px 10px rgba(20,35,18,.24)!important}
.route-history-dot{stroke:#21351f!important;fill:#f7fff3!important}
.stop-icon.stop-short{background:#fff9e9;border-color:#c8a151;color:#765a1f}.stop-icon.stop-long{background:#fff1dc;border-color:#b97a23;color:#74490f}.stop-icon b{right:-10px!important;bottom:-8px!important;min-width:27px!important;height:17px!important;padding:0 4px!important;border-radius:999px!important;font-size:8px!important;white-space:nowrap!important}
.route-traffic-marker-wrap,.route-speed-marker-wrap{background:transparent!important;border:0!important}.route-traffic-marker,.route-speed-marker{display:grid;place-items:center;border-radius:50%;background:#fff;border:3px solid #e79a23;color:#9b5e08;font-size:.7rem;font-weight:900;box-shadow:0 4px 14px rgba(84,54,9,.28)}.route-traffic-marker{width:28px;height:28px}.route-speed-marker{width:34px;height:34px;border-color:#d95a42;color:#a63124;font-size:.64rem;background:#fff8f6}
.route-timeline-row{width:100%;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer;border-radius:7px}.route-timeline-row:hover{background:#f1f6ee}.route-timeline-row:focus-visible{outline:2px solid #8ba24a;outline-offset:1px}.route-timeline-row.traffic .route-timeline-node{background:#e79a23;box-shadow:0 0 0 3px #fff1d8}.route-timeline-row.speedup .route-timeline-node{background:#d95a42;box-shadow:0 0 0 3px #fde9e5}
.route-help b{color:#4f5f4a}.route-summary-card .route-stops{max-height:180px}.route-summary-card .route-stop>a,.route-summary-card .route-stop a{font-size:.58rem;color:#2d6e43;font-weight:700}
.route-summary-mini{font-variant-numeric:tabular-nums}

.map-alert-stack{position:absolute;top:74px;right:18px;z-index:780;display:flex;flex-direction:column;gap:8px;width:min(410px,calc(100% - 36px));max-height:calc(100% - 88px);overflow:visible;visibility:visible;opacity:1;pointer-events:none}
.map-alert-card{display:grid;grid-template-columns:34px minmax(0,1fr) auto;gap:10px;align-items:start;padding:10px 10px 10px 11px;border-radius:12px;background:rgba(255,255,255,.97);border:1px solid #dde5d9;box-shadow:0 14px 36px rgba(31,47,28,.22);backdrop-filter:blur(10px);transform:translateY(-7px);opacity:0;transition:opacity .18s ease,transform .18s ease;pointer-events:auto;color:#2e3b2d}.map-alert-card.visible{opacity:1;transform:none}.map-alert-card.leaving{opacity:0;transform:translateY(-5px)}
.map-alert-symbol{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;font-size:.85rem;font-weight:900;background:#f4f7f1;border:1px solid #dce5d8}.map-alert-card.sos{border-color:#e54848;box-shadow:0 14px 38px rgba(143,18,18,.28),0 0 0 1px rgba(229,72,72,.10)}.map-alert-card.sos .map-alert-symbol{background:#d92e2e;border-color:#ff7777;color:#fff;font-size:.55rem;letter-spacing:.04em}.map-alert-card.sos .map-alert-copy small{color:#b71717}.map-alert-card.stop .map-alert-symbol{background:#fff4dc;border-color:#edcf91;color:#9b690b}.map-alert-card.motion .map-alert-symbol{background:#eaf8ec;border-color:#abd7b1;color:#26783a}
.map-alert-copy{min-width:0}.map-alert-copy small,.map-alert-copy strong,.map-alert-copy span,.map-alert-copy em{display:block}.map-alert-copy small{font-size:.54rem;font-weight:800;letter-spacing:.08em;color:#73806e}.map-alert-copy strong{font-size:.76rem;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.map-alert-copy span{font-size:.65rem;color:#576655;margin-top:2px}.map-alert-copy em{font-style:normal;font-size:.59rem;color:#849080;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.map-alert-actions{display:flex;gap:4px}.map-alert-actions button{width:29px;height:29px;border-radius:8px;border:1px solid #dce4d8;background:#fff;color:#52614f;display:grid;place-items:center;cursor:pointer}.map-alert-actions button:hover{border-color:#9bb58f;background:#f5f9f2}.map-alert-actions .icon{width:14px;height:14px}
.map-alert-pulse{animation:p1sMapAlertPulse 1.4s ease-out infinite}.map-alert-pulse.sos{stroke:#e12828!important;fill:#ff3c3c!important;animation-duration:.85s}.map-alert-pulse.stop{stroke:#dc941f!important;fill:#f7b83a!important}.map-alert-pulse.motion{stroke:#2f9a4f!important;fill:#52d36f!important}@keyframes p1sMapAlertPulse{0%{stroke-width:3;fill-opacity:.24}70%{stroke-width:9;fill-opacity:.04}100%{stroke-width:3;fill-opacity:.18}}

@media(max-width:760px){.route-summary-card{left:10px;right:10px;width:auto;max-height:58dvh;border-radius:12px}.route-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.map-alert-stack{top:58px;left:10px;right:10px;width:auto}.map-alert-card{grid-template-columns:31px minmax(0,1fr) auto;padding:9px}.map-alert-symbol{width:29px;height:29px}.route-summary-card .route-stops{max-height:135px}}
.map-alert-card.arrival .map-alert-symbol{background:#eaf8ec;border-color:#a8d7b0;color:#26783a}.map-alert-pulse.arrival{stroke:#2e9b4d!important;fill:#4dd46b!important}

/* v8.9.7 · Selector premium P1S de fecha y hora (reemplaza el nativo del navegador) */
.p1s-datetime-native{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;white-space:nowrap!important}
.p1s-datetime-trigger{width:100%;min-height:44px;border:1px solid #d8e1d4;border-radius:11px;background:linear-gradient(180deg,#fff,#fbfcfa);color:#253025;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 12px;box-shadow:0 1px 2px rgba(29,47,28,.05);font:inherit;cursor:pointer;text-align:left;transition:border-color .16s ease,box-shadow .16s ease,transform .16s ease}
.p1s-datetime-trigger:hover{border-color:#9fb56b;box-shadow:0 4px 14px rgba(67,93,45,.08)}
.p1s-datetime-trigger:focus-visible{outline:3px solid rgba(170,208,65,.20);outline-offset:1px;border-color:#86a53e}
.p1s-datetime-trigger .p1s-dt-left{display:flex;align-items:center;gap:9px;min-width:0}.p1s-datetime-trigger .icon{width:17px;height:17px;color:#5e7348;flex:0 0 auto}.p1s-datetime-trigger strong{font-size:.78rem;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.p1s-datetime-trigger small{font-size:.58rem;color:#899485;display:block;margin-top:1px}.p1s-datetime-trigger .p1s-dt-chevron{font-size:1.1rem;color:#788672;line-height:1}
.p1s-datetime-dialog{width:min(1040px,calc(100vw - 28px))!important;max-width:none!important;max-height:calc(100dvh - 28px)!important;padding:0!important;border:0!important;border-radius:22px!important;background:transparent!important;overflow:visible!important;color:#202820!important;box-shadow:none!important}
.p1s-datetime-dialog::backdrop{background:rgba(30,39,31,.58)!important;backdrop-filter:blur(6px)!important}
.p1s-datetime-panel{background:#fff;border:1px solid #dfe7dc;border-radius:22px;box-shadow:0 28px 90px rgba(20,35,22,.26);overflow:hidden}
.p1s-datetime-header{display:grid;grid-template-columns:52px minmax(0,1fr) 42px;gap:14px;align-items:center;padding:24px 26px 18px;border-bottom:1px solid #edf1ea;background:linear-gradient(180deg,#fff,#fbfcfa)}
.p1s-datetime-symbol{width:52px;height:52px;border-radius:15px;background:linear-gradient(145deg,#d8ff5d,#b7e632);color:#40571b;display:grid;place-items:center;box-shadow:0 8px 22px rgba(160,208,45,.20)}.p1s-datetime-symbol .icon{width:27px;height:27px}
.p1s-datetime-header .eyebrow{margin:0 0 3px;font-size:.58rem!important;letter-spacing:.13em;color:#78886f;font-weight:800}.p1s-datetime-header h2{margin:0!important;font-size:1.38rem!important;letter-spacing:-.025em}.p1s-datetime-header p:last-child{margin:4px 0 0;color:#859181;font-size:.75rem}
.p1s-datetime-close{width:39px!important;height:39px!important;border:1px solid #e6ebe2!important;background:#f8faf7!important;color:#667260!important}.p1s-datetime-close:hover{background:#f0f5ec!important;color:#2b3728!important}
.p1s-datetime-current{margin:18px 26px 0;border:1px solid #deead7;background:linear-gradient(90deg,#f7fbf3,#fff);border-radius:13px;padding:11px 13px;display:flex;align-items:center;gap:10px}.p1s-datetime-current .icon{width:19px;height:19px;color:#6d8f34}.p1s-datetime-current small{display:block;color:#7d8978;font-size:.62rem;margin-bottom:2px}.p1s-datetime-current strong{font-size:.88rem;font-variant-numeric:tabular-nums;color:#293629}
.p1s-datetime-body{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr);gap:18px;padding:18px 26px 20px}
.p1s-calendar-card,.p1s-time-card{border:1px solid #e1e8de;border-radius:17px;background:#fff;box-shadow:0 8px 24px rgba(27,44,28,.055)}
.p1s-calendar-card{padding:16px}.p1s-calendar-head{display:grid;grid-template-columns:38px 1fr 38px;align-items:center;gap:8px;margin-bottom:14px}.p1s-calendar-head strong{text-align:center;font-size:.88rem;text-transform:capitalize}.p1s-calendar-head button{width:36px;height:36px;border:1px solid #e5ebe1;background:#fafcf8;border-radius:10px;color:#40513c;font-size:1.4rem;line-height:1;cursor:pointer}.p1s-calendar-head button:hover{border-color:#b7ca8b;background:#f4f9ed}
.p1s-calendar-weekdays,.p1s-calendar-days{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.p1s-calendar-weekdays{margin-bottom:6px}.p1s-calendar-weekdays span{text-align:center;color:#87938a;font-size:.58rem;font-weight:800;letter-spacing:.04em}.p1s-calendar-days button{height:40px;border:0;border-radius:10px;background:transparent;color:#263126;font:inherit;font-size:.73rem;font-variant-numeric:tabular-nums;cursor:pointer;position:relative}.p1s-calendar-days button:hover{background:#f0f6e9}.p1s-calendar-days button.other-month{color:#b4bcb1}.p1s-calendar-days button.today:not(.selected){box-shadow:inset 0 0 0 1px #b5cc81;color:#526b33;font-weight:800}.p1s-calendar-days button.selected{background:linear-gradient(180deg,#8fb43a,#6e9627);color:#fff;font-weight:900;box-shadow:0 6px 14px rgba(89,126,32,.24)}.p1s-calendar-days button:disabled{opacity:.3;cursor:not-allowed;background:transparent!important}
.p1s-calendar-actions{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #eef2eb;margin-top:10px;padding-top:10px}.p1s-calendar-actions button{border:0;background:transparent;color:#648132;font-weight:800;font-size:.68rem;padding:6px 8px;cursor:pointer;border-radius:8px}.p1s-calendar-actions button:hover{background:#f1f7ea}
.p1s-time-card{padding:18px;display:flex;flex-direction:column}.p1s-time-title{display:flex;gap:9px;align-items:center;padding-bottom:13px;border-bottom:1px solid #edf1eb}.p1s-time-title .icon{width:19px;height:19px;color:#708a3c}.p1s-time-title strong,.p1s-time-title small{display:block}.p1s-time-title strong{font-size:.82rem}.p1s-time-title small{font-size:.6rem;color:#899486;margin-top:2px}
.p1s-time-wheels{display:grid;grid-template-columns:1fr 22px 1fr;align-items:center;gap:7px;margin:18px 0 12px}.p1s-time-wheel-group{display:grid;grid-template-rows:auto 28px 174px 28px;gap:4px;text-align:center}.p1s-time-label{font-size:.64rem;font-weight:800;color:#5f6d5d}.p1s-wheel-step{border:0;background:transparent;color:#64725e;font-size:1rem;cursor:pointer;border-radius:7px}.p1s-wheel-step:hover{background:#f0f5eb}.p1s-time-colon{font-size:1.55rem;font-weight:800;color:#2a3528;text-align:center;margin-top:31px}.p1s-time-wheel{height:174px;border-left:1px solid #f0f2ed;border-right:1px solid #f0f2ed;display:flex;flex-direction:column;justify-content:center;gap:0;overflow:hidden;outline:none;position:relative;border-radius:10px;background:linear-gradient(180deg,#fff 0,#fbfcfa 35%,#f4faeb 49%,#f4faeb 51%,#fbfcfa 65%,#fff 100%)}.p1s-time-wheel::before,.p1s-time-wheel::after{content:"";position:absolute;left:0;right:0;height:1px;background:#d9e7ca;top:69px}.p1s-time-wheel::after{top:105px}.p1s-time-wheel button{height:35px;flex:0 0 35px;border:0;background:transparent;color:#a0aaa0;font:inherit;font-size:.76rem;font-variant-numeric:tabular-nums;cursor:pointer;position:relative;z-index:1}.p1s-time-wheel button.near{color:#697567}.p1s-time-wheel button.selected{color:#182508;font-size:1rem;font-weight:900;background:linear-gradient(90deg,#eff9df,#dcf6b3,#eff9df)}
.p1s-time-quick{display:grid;grid-template-columns:repeat(5,1fr);gap:5px;margin-top:auto}.p1s-time-quick button{border:1px solid #e0e7dc;background:#fafcf8;color:#53634d;border-radius:9px;padding:8px 4px;font-size:.62rem;font-weight:750;cursor:pointer}.p1s-time-quick button:hover{border-color:#afc57b;background:#f2f8e9;color:#314828}
.p1s-datetime-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 26px 22px;border-top:1px solid #edf1ea;background:#fcfdfb}.p1s-datetime-footer>p{margin:0;display:flex;align-items:center;gap:7px;color:#849081;font-size:.63rem}.p1s-datetime-footer>p .icon{width:15px;height:15px}.p1s-datetime-footer>div{display:flex;gap:9px}.p1s-datetime-footer .button{min-height:42px;border-radius:10px}.p1s-datetime-footer .button-primary{min-width:210px}
.route-dialog{width:min(650px,calc(100% - 30px))!important}.route-dialog #route-form>.p1s-datetime-trigger{margin-bottom:3px}
@media(max-width:760px){.p1s-datetime-dialog{width:calc(100vw - 12px)!important;max-height:calc(100dvh - 12px)!important;margin:6px auto!important}.p1s-datetime-panel{border-radius:16px}.p1s-datetime-header{grid-template-columns:44px minmax(0,1fr) 38px;padding:16px 15px 13px;gap:10px}.p1s-datetime-symbol{width:44px;height:44px;border-radius:12px}.p1s-datetime-header h2{font-size:1.05rem!important}.p1s-datetime-current{margin:12px 14px 0}.p1s-datetime-body{grid-template-columns:1fr;padding:12px 14px 14px;gap:10px;max-height:calc(100dvh - 285px);overflow:auto}.p1s-calendar-card{padding:12px}.p1s-calendar-days button{height:36px}.p1s-time-card{padding:13px}.p1s-time-wheel-group{grid-template-rows:auto 24px 144px 24px}.p1s-time-wheel{height:144px}.p1s-time-wheel::before{top:54px}.p1s-time-wheel::after{top:89px}.p1s-datetime-footer{padding:12px 14px 14px;flex-direction:column;align-items:stretch}.p1s-datetime-footer>p{display:none}.p1s-datetime-footer>div{display:grid;grid-template-columns:1fr 1.35fr}.p1s-datetime-footer .button-primary{min-width:0}.p1s-time-quick{grid-template-columns:repeat(5,1fr)}}
@media(max-width:430px){.p1s-datetime-header p:last-child{display:none}.p1s-datetime-current{padding:9px 10px}.p1s-calendar-days button{height:34px;font-size:.68rem}.p1s-time-quick{grid-template-columns:repeat(3,1fr)}.p1s-datetime-footer>div{grid-template-columns:1fr}.p1s-datetime-footer .button{width:100%}}


/* v8.9.7 · tráfico solo en vías, aceleraciones y geocercas */
.route-surge-marker-wrap{background:transparent!important;border:0!important}
.route-surge-marker{width:42px;height:42px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;background:#fff;border:3px solid #e95c49;color:#9b2b20;box-shadow:0 5px 16px rgba(112,39,28,.3);line-height:1}
.route-surge-marker b{font-size:.72rem;font-weight:900}.route-surge-marker small{font-size:.43rem;font-weight:800;margin-top:2px;text-transform:uppercase}
.map-alert-card.geofence .map-alert-symbol{background:#eefbdc;border-color:#b8df63;color:#4e741b}.map-alert-pulse.geofence{stroke:#8fc72d!important;fill:#c7f34c!important}
.map-alert-card.group .map-alert-symbol{background:#eaf5ff;border-color:#9bc9ef;color:#286995}.map-alert-pulse.group{stroke:#2e83be!important;fill:#75bcea!important}


/* P1S 8.9.7 · mapa más alto/proporcionado y fullscreen fluido */
@media(min-width:761px){
  .map-panel{
    height:clamp(500px,56dvh,680px)!important;
    min-height:500px!important;
  }
}
@media(max-width:760px){
  .map-panel{
    height:clamp(430px,60dvh,600px)!important;
    min-height:430px!important;
  }
}
@media(max-width:430px){
  .map-panel{
    height:clamp(410px,58dvh,560px)!important;
    min-height:410px!important;
  }
}
.monitor-window:fullscreen,.monitor-window.expanded{
  width:100vw!important;
  height:100dvh!important;
  min-height:100dvh!important;
  max-height:100dvh!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  contain:layout paint style;
}
.monitor-window:fullscreen .window-toolbar,.monitor-window.expanded .window-toolbar,
.monitor-window:fullscreen .map-search-strip,.monitor-window.expanded .map-search-strip,
.monitor-window:fullscreen .trip-toolbar,.monitor-window.expanded .trip-toolbar,
.monitor-window:fullscreen .window-footer,.monitor-window.expanded .window-footer{
  flex:0 0 auto!important;
}
.monitor-window:fullscreen .map-panel,.monitor-window.expanded .map-panel{
  flex:1 1 auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  width:100%!important;
  transform:translateZ(0);
  backface-visibility:hidden;
  overscroll-behavior:contain;
}
.monitor-window:fullscreen #map,.monitor-window.expanded #map{
  width:100%!important;
  height:100%!important;
  transform:translateZ(0);
  backface-visibility:hidden;
}
html.p1s-map-fullscreen,html.p1s-map-fullscreen body{overflow:hidden!important;overscroll-behavior:none!important}
.monitor-window.fullscreen-transition .map-panel{pointer-events:none}


/* P1S 8.9.7 · zoom continuo sin pantalla blanca
   Mantiene el nivel anterior escalado mientras llegan los mosaicos nuevos. */
.map-panel,.map-panel #map,.leaflet-container{background:#e5eadf!important}
.leaflet-tile-pane{background:#e5eadf!important}
.leaflet-zoom-anim .leaflet-zoom-animated{
  -webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1)!important;
  transition:transform .25s cubic-bezier(0,0,.25,1)!important;
}
.leaflet-fade-anim .leaflet-tile{
  -webkit-transition:opacity .18s linear!important;
  transition:opacity .18s linear!important;
}
.leaflet-tile{will-change:transform,opacity!important;backface-visibility:hidden!important}
.leaflet-tile-container{will-change:transform,opacity;backface-visibility:hidden}
.map-panel.p1s-zooming .leaflet-tile-pane{visibility:visible!important;opacity:1!important}
.monitor-window:fullscreen .leaflet-container,.monitor-window.expanded .leaflet-container{
  transform:translateZ(0);backface-visibility:hidden;perspective:1000px;
}

/* 8.10: shared communication, lime accents and comfortable mobile profiles. */
#account-button{width:54px;height:54px;min-width:54px;overflow:hidden}#account-button .account-photo{width:100%;height:100%;object-fit:cover}.account-profile-preview{width:92px!important;height:92px!important;flex:0 0 92px}.account-profile-image{width:100%;height:100%;object-fit:cover}.traccar-user-avatar{width:52px!important;height:52px!important;flex:0 0 52px}.traccar-user-photo{width:100%;height:100%;object-fit:cover}
.global-chat-trigger{display:inline-flex;align-items:center;gap:7px;border:1px solid #b1c34b;border-radius:13px;background:#d4f354;color:#25311a;padding:10px 13px;font-weight:750;cursor:pointer}.global-chat-trigger[hidden]{display:none}.global-chat-trigger b{background:#25311a;color:white;border-radius:20px;padding:2px 6px;font-size:11px}
.global-chat-dialog{width:min(720px,calc(100vw - 24px));height:min(820px,90dvh);max-height:90dvh;padding:0!important;overflow:hidden!important;border-radius:24px;box-sizing:border-box;background:#f7f9f4;color:#253025}.global-chat-dialog[open]{display:flex;flex-direction:column}.global-chat-head{display:flex;align-items:flex-start;justify-content:space-between;padding:24px 24px 14px;background:#202b25;color:#f8fbef;gap:16px}.global-chat-head .eyebrow{color:#d5ef73;font-size:10px;margin:0 0 8px}.global-chat-head h2{color:inherit;margin:0;font-size:25px}.global-chat-head p[role=status]{margin:8px 0 0;font-size:12px;color:#d1ddce;max-width:550px}.global-chat-head .icon-button{color:#d7eabf;font-size:28px}.global-chat-head p.chat-error{color:#ffd39e}.chat-live-dot{display:inline-block;width:9px;height:9px;margin-left:5px;border-radius:50%;background:#d4f354;box-shadow:0 0 12px #c7ef6970}.chat-presence{padding:12px 24px;border-bottom:1px solid #dce3d7;font-size:13px}.chat-presence summary{cursor:pointer;font-weight:650}.chat-presence[open]{max-height:200px;overflow:auto}.chat-person{display:flex;align-items:center;gap:12px;margin-top:12px}.chat-person>span:nth-child(2){display:flex;flex-direction:column;gap:3px;min-width:0}.chat-person small{color:#6b7867;font-size:11px}.chat-person i{width:7px;height:7px;background:#4e9d52;border-radius:50%;margin-left:auto}.chat-monitor-note{margin:8px 24px;font-size:11px;color:#687563}.chat-older{border:0;background:transparent;color:#4b6336;font-size:12px;text-decoration:underline;cursor:pointer;padding:8px}.global-chat-messages{flex:1;min-height:100px;overflow:auto;overscroll-behavior:contain;padding:8px 20px 20px}.chat-message{display:flex;gap:12px;margin:0 0 18px;align-items:flex-start}.chat-avatar{width:48px;height:48px;flex:0 0 48px;border-radius:16px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#e6eddc;color:#43582c}.chat-avatar svg{width:24px;height:24px}.chat-avatar>span{font-size:12px;font-weight:800}.chat-photo{width:100%;height:100%;object-fit:cover}.chat-message-content{background:#fff;border:1px solid #e2e7db;padding:12px 14px;border-radius:4px 16px 16px;flex:1;min-width:0}.chat-message-heading{display:flex;justify-content:space-between;align-items:baseline;gap:8px}.chat-message-heading strong{font-size:13px;overflow-wrap:anywhere}.chat-message time{font-size:10px;color:#7a8376;white-space:nowrap}.chat-message-content>small{display:block;font-size:11px;color:#728166;margin:4px 0 0;overflow-wrap:anywhere}.chat-message p{font-size:14px;line-height:1.5;margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.chat-sos .chat-message-content{border-color:#edb3a9;background:#fff2ee}.chat-sos .chat-avatar{background:#ad3b32;color:white}.chat-geofence .chat-message-content{background:#f1f8db;border-color:#c6dd8d}.chat-event .chat-message-content{border-left:3px solid #87a33a}.global-chat-form{display:flex;align-items:center;gap:10px;padding:16px 20px;background:white;border-top:1px solid #dee5d7}.global-chat-form textarea{flex:1;min-width:0;resize:none;max-height:120px;font:inherit;font-size:14px;border:1px solid #ccd8bd;border-radius:14px;padding:12px;background:#f7f9f3;color:#263224}.global-chat-form .button{width:auto;min-height:48px}.chat-empty{text-align:center;color:#7a8471;padding:50px 15px;font-size:14px;line-height:1.7}.my-name-form{padding:16px 0;border-top:1px solid #e0e5d9;margin-top:16px}.my-name-form label{font-size:12px}.my-name-form>div{display:flex;gap:10px;margin-top:7px}.my-name-form input{min-width:0;flex:1}.my-name-form .button{width:auto}.delete-geofence-row{display:flex;gap:16px;align-items:center;border-bottom:1px solid #e0e6d7;padding:14px 0}.delete-geofence-row>span{flex:1}.delete-geofence-row small{display:block;color:#77816e;margin-top:4px}.delete-geofence-row .button{width:auto;color:#9a3e32}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
@media(max-width:600px){.global-chat-dialog{width:100vw;max-width:100vw;height:94dvh;max-height:94dvh;border-radius:22px 22px 0 0;margin:auto 0 0}.global-chat-head{padding:20px 16px 14px}.global-chat-messages{padding:8px 12px 16px}.chat-message{gap:9px}.chat-avatar{width:44px;height:44px;flex-basis:44px;border-radius:14px}.chat-message-heading{flex-wrap:wrap;gap:3px}.global-chat-form{padding:12px;padding-bottom:max(12px,env(safe-area-inset-bottom))}.global-chat-trigger{padding:10px;font-size:12px}.header-actions{gap:7px!important}#account-button{width:48px;height:48px;min-width:48px}.my-name-form>div{flex-wrap:wrap}.chat-presence{padding:12px 16px}}

.avatar{width:44px;min-width:44px;height:44px}.device-avatar-photo{width:44px;height:44px}.traccar-user-avatar .traccar-user-photo{width:100%;height:100%}
/* Keep permission-hidden controls hidden even under older mobile overrides. */
.topbar .header-actions [hidden],.account-menu-dialog [hidden]{display:none!important}
@media(max-width:760px){.topbar .brand>span{display:none!important}.topbar .header-actions{flex-wrap:wrap!important;justify-content:flex-end;max-width:calc(100% - 84px)}.topbar .access-role-badge{display:none!important}.topbar{height:auto!important;min-height:78px;padding-top:10px!important;padding-bottom:10px!important}.topbar .brand img{width:72px!important}.topbar #account-button{width:48px!important;height:48px!important;min-width:48px!important}.global-chat-trigger{white-space:nowrap}}

/* Fleet labels are anchored to the same GPS marker, including during zoom/movement. */
.guard-icon{overflow:visible!important}.fleet-marker-label{position:absolute;bottom:calc(100% + 12px);left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:3px;min-width:135px;max-width:215px;width:max-content;background:#17261f;color:#f3f9ea;padding:8px 11px;border:1px solid var(--fleet-accent,#ceef52);border-top:3px solid var(--fleet-accent,#ceef52);border-radius:12px;box-shadow:0 3px 12px #07110935;pointer-events:none;font:12px/1.3 system-ui,sans-serif;text-align:center;white-space:normal}.fleet-marker-label:after{content:"";position:absolute;bottom:-7px;left:calc(50% - 5px);width:9px;height:9px;background:#17261f;border-right:1px solid var(--fleet-accent);border-bottom:1px solid var(--fleet-accent);transform:rotate(45deg)}.fleet-marker-label strong{display:flex;align-items:center;justify-content:center;gap:6px;color:var(--fleet-accent);font-size:12px;overflow-wrap:anywhere}.fleet-marker-label b{font-size:8px;letter-spacing:.06em;border:1px solid currentColor;border-radius:4px;padding:2px 3px}.fleet-marker-label small{font-size:11px;color:#f3f9ea;overflow-wrap:anywhere}.fleet-marker-label em{font-style:normal;font-size:10px;color:#b7c7b5}.group-card-actions{flex-wrap:wrap!important;gap:6px!important}#groups-sync-note{margin:10px 0 16px;color:#56723e}#group-destination{width:100%;margin-bottom:8px}@media(max-width:600px){.fleet-marker-label{min-width:118px;max-width:178px;padding:6px 8px}.fleet-marker-label strong{font-size:11px}.fleet-marker-label small{font-size:10px}}

/* P1S 8.10.2 · Chat global flotante tipo esfera. Mantiene visible el GPS y no altera autenticación. */
.global-chat-orb{position:fixed;right:22px;bottom:24px;z-index:4600;width:72px;height:72px;border:1px solid rgba(211,255,76,.78);border-radius:50%;padding:0;display:grid;place-items:center;cursor:pointer;color:#efffd0;background:radial-gradient(circle at 34% 28%,#405531 0 14%,#17211b 38%,#07100b 76%);box-shadow:0 14px 40px rgba(4,16,8,.38),0 0 0 1px rgba(212,243,84,.12),0 0 30px rgba(189,255,42,.24);isolation:isolate;transition:transform .2s ease,box-shadow .2s ease,opacity .2s ease}.global-chat-orb[hidden]{display:none}.global-chat-orb:hover{transform:translateY(-2px) scale(1.025);box-shadow:0 18px 45px rgba(4,16,8,.44),0 0 36px rgba(201,255,57,.32)}.global-chat-orb:active{transform:scale(.97)}.global-chat-orb:focus-visible{outline:3px solid rgba(203,255,67,.35);outline-offset:4px}.global-chat-orb-radar{position:absolute;inset:-7px;border:1px solid rgba(197,255,60,.27);border-radius:50%;animation:p1sChatRadar 2.5s ease-out infinite;pointer-events:none}.global-chat-orb-core{position:relative;z-index:2;width:56px;height:56px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;background:linear-gradient(145deg,rgba(214,255,78,.24),rgba(72,112,53,.12));box-shadow:inset 0 0 18px rgba(221,255,116,.12)}.global-chat-orb-core .icon{width:22px;height:22px}.global-chat-orb-core small{font-size:8px;letter-spacing:.15em;font-weight:900;color:#d8ff6a}.global-chat-orb-live{position:absolute;right:7px;bottom:7px;width:12px;height:12px;border-radius:50%;background:#62f76f;border:3px solid #0c1710;box-shadow:0 0 13px #62f76f}.global-chat-orb b{position:absolute;right:-3px;top:-4px;z-index:4;min-width:24px;height:24px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:#eaff62;color:#17200f;border:2px solid #142019;font-size:11px;font-weight:900}.global-chat-orb.has-unread{animation:p1sChatNudge .62s ease}.global-chat-orb.chat-offline .global-chat-orb-live{background:#ff9d5c;box-shadow:0 0 12px #ff9d5c}.global-chat-orb.chat-offline{border-color:rgba(255,157,92,.62)}
@keyframes p1sChatRadar{0%{transform:scale(.82);opacity:.75}75%,100%{transform:scale(1.24);opacity:0}}@keyframes p1sChatNudge{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}50%{transform:translateX(3px)}75%{transform:translateX(-2px)}}
.global-chat-dialog{position:fixed!important;inset:88px 18px 18px auto!important;margin:0!important;width:min(430px,calc(100vw - 36px))!important;height:calc(100dvh - 106px)!important;max-height:none!important;padding:0!important;overflow:hidden!important;border-radius:26px!important;border:1px solid rgba(204,225,191,.72)!important;background:rgba(246,249,244,.97)!important;box-shadow:0 26px 80px rgba(11,29,16,.3),0 0 0 1px rgba(255,255,255,.68) inset!important;color:#1c291f!important;backdrop-filter:blur(18px);z-index:4700}.global-chat-dialog[open]{display:flex!important;flex-direction:column!important}.global-chat-dialog::backdrop{background:transparent!important;backdrop-filter:none!important}.global-chat-head{display:flex;align-items:center;justify-content:space-between;padding:17px 17px 15px;background:linear-gradient(145deg,#111d16,#203024 58%,#17251b);color:#f5ffe9;gap:12px;border-bottom:1px solid rgba(211,255,93,.13)}.global-chat-head-main{display:flex;align-items:center;gap:12px;min-width:0}.chat-head-gps{width:42px;height:42px;flex:0 0 42px;border-radius:14px;display:grid;place-items:center;color:#dfff64;background:rgba(207,255,70,.11);border:1px solid rgba(207,255,70,.2);box-shadow:0 0 22px rgba(197,255,57,.08)}.chat-head-gps .icon{width:22px;height:22px}.global-chat-head .eyebrow{color:#dfff64!important;font-size:9px!important;letter-spacing:.14em;margin:0 0 4px!important}.global-chat-head h2{font-size:20px!important;line-height:1.15;margin:0!important}.global-chat-head p[role=status]{margin:4px 0 0!important;font-size:11px!important;color:#b9c8bb!important;max-width:260px}.global-chat-head .icon-button{width:38px;height:38px;min-width:38px;border-radius:13px;color:#dff7d7!important;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.08);font-size:24px!important}.chat-live-dot{width:8px!important;height:8px!important;background:#6af67b!important;box-shadow:0 0 12px #6af67b!important}.chat-gps-strip{display:flex;align-items:center;gap:11px;margin:12px 13px 4px;padding:10px 11px;border-radius:16px;background:linear-gradient(135deg,#f5f8ef,#edf4df);border:1px solid #dce7d0;box-shadow:0 4px 15px rgba(35,62,38,.04)}.chat-gps-pulse{width:36px;height:36px;flex:0 0 36px;border-radius:50%;display:grid;place-items:center;background:#1c2c20;color:#dfff64;box-shadow:0 0 0 5px rgba(211,243,84,.11)}.chat-gps-pulse .icon{width:18px;height:18px}.chat-gps-strip>div{min-width:0;display:flex;flex-direction:column;gap:2px}.chat-gps-strip strong{font-size:12px;color:#273329}.chat-gps-strip small{font-size:10px;color:#71806f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-storage-badge{margin-left:auto;flex:0 0 auto;border:1px solid #cfddbe;background:#fff;color:#53644d;border-radius:999px;padding:5px 7px;font-size:8px;font-weight:800;letter-spacing:.04em;text-transform:uppercase}.chat-presence{padding:7px 15px 8px!important;margin:0!important;border-bottom:1px solid #e2e9dc!important;font-size:12px!important;color:#566452!important}.chat-presence summary{font-weight:750}.chat-presence[open]{max-height:170px!important;overflow:auto}.chat-person{margin-top:9px!important;gap:9px!important}.chat-person .chat-avatar{width:34px!important;height:34px!important;flex-basis:34px!important;border-radius:11px!important}.chat-person small{font-size:10px!important}.chat-monitor-note{margin:7px 15px 3px!important;font-size:9px!important;line-height:1.45;color:#7a8875!important}.chat-older{align-self:center;color:#536b42!important;font-size:10px!important;padding:7px 10px!important;text-decoration:none!important;border-radius:999px!important;background:#eef4e7!important;margin:2px 0!important}.global-chat-messages{flex:1;min-height:0!important;overflow:auto!important;overscroll-behavior:contain;padding:8px 13px 14px!important;scrollbar-width:thin;scrollbar-color:#c9d6bf transparent}.chat-message{display:flex;gap:9px;margin:0 0 12px!important;align-items:flex-end!important}.chat-avatar{width:36px!important;height:36px!important;flex:0 0 36px!important;border-radius:12px!important;background:#e3ebdd!important;color:#36502f!important}.chat-avatar svg{width:19px!important;height:19px!important}.chat-message-content{max-width:82%;flex:0 1 auto!important;background:#fff!important;border:1px solid #e0e7dc!important;padding:9px 11px!important;border-radius:6px 16px 16px 16px!important;box-shadow:0 3px 14px rgba(24,46,29,.045)}.chat-message-heading{gap:7px!important}.chat-message-heading strong{font-size:11px!important}.chat-message time{font-size:8px!important;color:#8b9686!important}.chat-message-content>small{font-size:9px!important;color:#74816e!important;margin-top:2px!important}.chat-message p{font-size:12px!important;line-height:1.45!important;margin:5px 0 0!important}.chat-message.chat-me{flex-direction:row-reverse}.chat-message.chat-me .chat-message-content{background:#26382b!important;color:#f4ffef!important;border-color:#314834!important;border-radius:16px 6px 16px 16px!important}.chat-message.chat-me .chat-message-content>small,.chat-message.chat-me time{color:#abc1ac!important}.chat-message.chat-me .chat-avatar{background:#dfff64!important;color:#23321d!important}.chat-sos .chat-message-content{background:#fff0ec!important;border-color:#efb9ab!important;color:#6f2822!important}.chat-sos .chat-avatar{background:#b94a3f!important;color:white!important}.chat-geofence .chat-message-content{background:#eff7da!important;border-color:#c9dc96!important;color:#344723!important}.chat-event .chat-message-content{border-left:3px solid #8aa83d!important}.chat-empty{padding:44px 16px!important;color:#768273!important;font-size:12px!important}.global-chat-form{display:flex;align-items:flex-end;gap:8px;padding:10px 11px max(10px,env(safe-area-inset-bottom))!important;background:rgba(255,255,255,.96)!important;border-top:1px solid #dfe6db!important}.chat-compose{flex:1;min-width:0;display:flex;flex-direction:column}.global-chat-form textarea{width:100%;min-height:46px;max-height:110px;resize:none;font:inherit;font-size:12px!important;line-height:1.4;border:1px solid #d3dece!important;border-radius:15px!important;padding:10px 11px!important;background:#f6f9f3!important;color:#263224!important;outline:none}.global-chat-form textarea:focus{border-color:#9bb656!important;box-shadow:0 0 0 3px rgba(201,237,89,.12)}.chat-compose>small{font-size:8px;color:#929c8e;margin:4px 3px 0}.chat-send-button{width:46px;height:46px;flex:0 0 46px;border:0;border-radius:15px;display:grid;place-items:center;cursor:pointer;background:linear-gradient(145deg,#dfff64,#bcd93d);color:#223018;box-shadow:0 7px 18px rgba(119,151,42,.24);transition:transform .15s ease,filter .15s ease}.chat-send-button:hover{filter:brightness(1.03);transform:translateY(-1px)}.chat-send-button:disabled{opacity:.55;cursor:not-allowed;transform:none}.chat-send-button .icon{width:20px;height:20px}.global-chat-status.chat-error{color:#ffbe8f!important}
body.chat-panel-open .global-chat-orb{opacity:.22;pointer-events:none;transform:scale(.82)}
body:not(.light-mode) .global-chat-dialog{background:rgba(8,15,10,.97)!important;color:#edf9ea!important;border-color:rgba(77,244,107,.22)!important;box-shadow:0 26px 90px rgba(0,0,0,.58),0 0 28px rgba(58,255,86,.06)!important}body:not(.light-mode) .chat-gps-strip{background:linear-gradient(135deg,#101b13,#0a140d);border-color:#24422a}body:not(.light-mode) .chat-gps-strip strong{color:#e8f7e5}body:not(.light-mode) .chat-gps-strip small,body:not(.light-mode) .chat-monitor-note{color:#819a84!important}body:not(.light-mode) .chat-storage-badge{background:#0a140d;border-color:#284630;color:#9db7a0}body:not(.light-mode) .chat-presence{border-color:#203727!important;color:#a4b8a6!important}body:not(.light-mode) .chat-older{background:#122019!important;color:#aedd7a!important}body:not(.light-mode) .chat-message-content{background:#101b13!important;border-color:#203727!important;color:#e7f2e5!important}body:not(.light-mode) .chat-message.chat-me .chat-message-content{background:#21372a!important;border-color:#31553a!important}body:not(.light-mode) .global-chat-form{background:#0b140e!important;border-color:#1e3524!important}body:not(.light-mode) .global-chat-form textarea{background:#09110b!important;border-color:#26442d!important;color:#e9f5e7!important}
@media(max-width:700px){.global-chat-orb{right:15px;bottom:18px;width:66px;height:66px}.global-chat-orb-core{width:51px;height:51px}.global-chat-dialog{inset:auto 7px 7px 7px!important;width:calc(100vw - 14px)!important;height:72dvh!important;max-height:72dvh!important;border-radius:24px 24px 20px 20px!important}.global-chat-head{padding:14px 14px 12px!important}.chat-head-gps{width:38px;height:38px;flex-basis:38px}.global-chat-head h2{font-size:18px!important}.chat-gps-strip{margin:9px 10px 3px;padding:9px 10px}.chat-storage-badge{display:none}.chat-presence{padding:7px 12px!important}.chat-monitor-note{margin:6px 12px 2px!important}.global-chat-messages{padding:7px 10px 12px!important}.chat-message-content{max-width:84%}.global-chat-form{padding:9px 9px max(9px,env(safe-area-inset-bottom))!important}.chat-compose>small{display:none}.global-chat-form textarea{min-height:44px}.chat-send-button{width:44px;height:44px;flex-basis:44px}body.chat-panel-open .global-chat-orb{display:none}}


/* P1S 8.10.3 · chat lateral minimizable sobre el mapa */

#map-panel .global-chat-orb,#map-panel .global-chat-dialog{position:absolute!important}
#map-panel .global-chat-orb{right:16px;bottom:16px;z-index:660;width:74px;height:74px;border:1px solid rgba(211,255,76,.85);border-radius:50%;padding:0;display:grid;place-items:center;cursor:pointer;color:#efffd0;background:radial-gradient(circle at 34% 28%,#45642d 0 16%,#132018 42%,#07100b 78%);box-shadow:0 18px 44px rgba(7,19,11,.38),0 0 0 1px rgba(212,243,84,.14),0 0 32px rgba(189,255,42,.22);transition:transform .22s ease,box-shadow .22s ease,opacity .2s ease}
#map-panel .global-chat-orb:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 22px 50px rgba(7,19,11,.48),0 0 38px rgba(201,255,57,.30)}
#map-panel .global-chat-orb:active{transform:scale(.97)}
#map-panel .global-chat-orb-core{position:relative;z-index:2;width:58px;height:58px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;background:linear-gradient(145deg,rgba(214,255,78,.22),rgba(72,112,53,.14));box-shadow:inset 0 0 18px rgba(221,255,116,.12)}
#map-panel .global-chat-orb-logo{width:27px;height:27px;object-fit:cover;filter:drop-shadow(0 0 10px rgba(210,255,89,.16))}
#map-panel .global-chat-orb-core small{font-size:8px;letter-spacing:.16em;font-weight:900;color:#d8ff6a}
#map-panel .global-chat-orb-live{position:absolute;right:7px;bottom:7px;width:12px;height:12px;border-radius:50%;background:#62f76f;border:3px solid #0c1710;box-shadow:0 0 13px #62f76f}
#map-panel .global-chat-orb b{position:absolute;right:-3px;top:-4px;z-index:4;min-width:24px;height:24px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:#eaff62;color:#17200f;border:2px solid #142019;font-size:11px;font-weight:900}
#map-panel .global-chat-orb.chat-offline .global-chat-orb-live{background:#ffae65;box-shadow:0 0 12px #ffae65}
#map-panel .global-chat-dialog{top:14px;right:14px;bottom:14px;left:auto!important;width:min(390px,calc(100% - 28px))!important;max-height:calc(100% - 28px)!important;height:auto!important;margin:0!important;padding:0!important;display:none;overflow:hidden!important;border-radius:24px!important;border:1px solid rgba(205,230,188,.74)!important;background:rgba(247,250,245,.98)!important;box-shadow:0 28px 70px rgba(8,24,12,.26),0 0 0 1px rgba(255,255,255,.58) inset!important;color:#1c291f!important;backdrop-filter:blur(16px);z-index:655}
#map-panel .global-chat-dialog[open]{display:flex!important;flex-direction:column!important}
body.chat-panel-open #map-panel .global-chat-orb{opacity:0;pointer-events:none;transform:scale(.9)}
#map-panel .global-chat-head{display:flex;align-items:center;justify-content:space-between;padding:14px 14px 12px;background:linear-gradient(145deg,#102116,#1d3022 60%,#15271b);color:#f5ffe9;gap:12px;border-bottom:1px solid rgba(211,255,93,.10)}
#map-panel .global-chat-head-main{display:flex;align-items:center;gap:12px;min-width:0}
#map-panel .chat-head-logo{width:42px;height:42px;flex:0 0 42px;border-radius:14px;display:grid;place-items:center;background:rgba(208,255,73,.12);border:1px solid rgba(208,255,73,.2);overflow:hidden}
#map-panel .chat-head-logo img{width:100%;height:100%;object-fit:cover}
#map-panel .global-chat-title-wrap{min-width:0}
#map-panel .global-chat-head .eyebrow{color:#dfff64!important;font-size:9px!important;letter-spacing:.14em;margin:0 0 3px!important}
#map-panel .global-chat-head h2{font-size:20px!important;line-height:1.05;margin:0!important;color:#fff!important}
#map-panel .global-chat-head p[role=status]{margin:4px 0 0!important;font-size:11px!important;color:#b9c8bb!important;max-width:none}
#map-panel .global-chat-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
#map-panel .chat-mini-stat{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;border:1px solid rgba(204,255,102,.16);background:rgba(255,255,255,.08);color:#ecf8d1;font-size:11px;font-weight:700;line-height:1}
#map-panel .global-chat-head .icon-button{width:36px;height:36px;min-width:36px;border-radius:13px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08);color:#f6ffe6;font-size:22px}
#map-panel .chat-presence{margin:10px 12px 0;padding:0;border:0;background:#edf4df;border-radius:15px;overflow:hidden}
#map-panel .chat-presence summary{list-style:none;cursor:pointer;padding:11px 13px;font-weight:800;color:#334327;font-size:12px;display:flex;align-items:center;justify-content:space-between}
#map-panel .chat-presence[open] summary{border-bottom:1px solid #d9e7c2}
#map-panel .chat-person{display:flex;align-items:center;gap:10px;margin:0;padding:11px 13px;border-top:1px solid rgba(36,58,30,.06)}
#map-panel .chat-person:first-of-type{border-top:0}
#map-panel .chat-older{align-self:center;margin:9px auto 2px;padding:4px 10px;border:0;background:transparent;color:#5f7344;font-size:12px;text-decoration:none;font-weight:700;cursor:pointer}
#map-panel .global-chat-messages{flex:1;min-height:120px;overflow:auto;overscroll-behavior:contain;padding:12px 12px 10px;background:linear-gradient(180deg,rgba(241,246,236,.92),rgba(248,250,246,.98))}
#map-panel .chat-message{display:flex;gap:10px;margin:0 0 12px;align-items:flex-start}
#map-panel .chat-message.chat-me{flex-direction:row-reverse}
#map-panel .chat-avatar{width:42px;height:42px;flex:0 0 42px;border-radius:14px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#e4ecd7;color:#43582c}
#map-panel .chat-avatar>span{font-size:11px;font-weight:900;letter-spacing:.03em}
#map-panel .chat-message-content{background:#fff;border:1px solid #e1e9d7;padding:10px 12px;border-radius:16px 16px 16px 6px;flex:1;min-width:0;box-shadow:0 8px 22px rgba(18,33,21,.04)}
#map-panel .chat-message.chat-me .chat-message-content{background:linear-gradient(180deg,#f4fadf,#eef7d3);border-color:#d8e7a5;border-radius:16px 6px 16px 16px}
#map-panel .chat-message-heading{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
#map-panel .chat-message-heading strong{font-size:13px;overflow-wrap:anywhere;color:#1f2d1a}
#map-panel .chat-message time{font-size:10px;color:#7a8376;white-space:nowrap}
#map-panel .chat-message-content>small{display:block;font-size:10px;color:#728166;margin:4px 0 0;overflow-wrap:anywhere}
#map-panel .chat-message p{font-size:13px;line-height:1.45;margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;color:#263224}
#map-panel .chat-sos .chat-message-content{border-color:#edb3a9;background:#fff2ee}
#map-panel .chat-sos .chat-avatar{background:#ad3b32;color:white}
#map-panel .chat-geofence .chat-message-content{background:#f1f8db;border-color:#c6dd8d}
#map-panel .chat-event .chat-message-content{border-left:3px solid #87a33a}
#map-panel .global-chat-form{display:flex;align-items:flex-end;gap:10px;padding:12px;background:rgba(255,255,255,.92);border-top:1px solid #dee5d7}
#map-panel .chat-compose{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
#map-panel .global-chat-form textarea{flex:1;min-width:0;resize:none;min-height:56px;max-height:118px;font:inherit;font-size:15px;border:1px solid #cfdbc2;border-radius:18px;padding:14px 16px;background:#f7f9f3;color:#263224;box-shadow:inset 0 1px 0 rgba(255,255,255,.62)}
#map-panel .global-chat-form small{display:block;padding-left:4px;font-size:10px;color:#82917a;line-height:1.2}
#map-panel .chat-send-button{width:52px;height:52px;min-width:52px;border:0;border-radius:18px;display:grid;place-items:center;background:linear-gradient(180deg,#dfff67,#c2eb35);box-shadow:0 14px 26px rgba(177,223,36,.24);color:#203014}
#map-panel .chat-send-button .icon{width:20px;height:20px}
#map-panel .chat-send-button:disabled{opacity:.55;cursor:not-allowed;box-shadow:none}
#map-panel .chat-empty{text-align:center;color:#6f7e6a;padding:34px 16px;font-size:13px;line-height:1.65}
#map-panel .chat-hidden-note{display:none}
@media(max-width:760px){
  #map-panel .global-chat-dialog{top:10px;right:10px;bottom:10px;width:min(360px,calc(100% - 20px))!important;max-height:calc(100% - 20px)!important;border-radius:22px!important}
  #map-panel .global-chat-orb{right:12px;bottom:12px;width:70px;height:70px}
  #map-panel .global-chat-orb-core{width:54px;height:54px}
  #map-panel .global-chat-head{padding:12px 12px 11px}
  #map-panel .global-chat-head h2{font-size:18px!important}
  #map-panel .global-chat-head-actions{gap:6px}
  #map-panel .chat-mini-stat{padding:6px 8px;font-size:10px}
  #map-panel .chat-head-logo{width:38px;height:38px;flex-basis:38px}
  #map-panel .global-chat-messages{padding:10px}
  #map-panel .chat-avatar{width:38px;height:38px;flex-basis:38px}
  #map-panel .global-chat-form{padding:10px;padding-bottom:max(10px,env(safe-area-inset-bottom))}
  #map-panel .chat-send-button{width:50px;height:50px;min-width:50px}
}


/* P1S 8.10.5 · botón del chat abajo y panel más limpio */

.global-chat-orb{position:fixed!important;right:14px!important;bottom:calc(18px + env(safe-area-inset-bottom))!important;top:auto!important;left:auto!important;z-index:960!important;width:70px!important;height:70px!important}
.global-chat-dialog{position:fixed!important;right:12px!important;bottom:calc(98px + env(safe-area-inset-bottom))!important;top:auto!important;left:auto!important;width:min(390px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;height:min(66dvh,560px)!important;max-height:min(66dvh,560px)!important;z-index:955!important;border-radius:22px!important}
.global-chat-head .icon-button{font-size:0!important}
.global-chat-head .icon-button::before{content:'–';font-size:28px;line-height:1;color:#f6ffe6;display:block;transform:translateY(-2px)}
.global-chat-form .chat-send-button .icon svg{transform:translateX(1px) rotate(-10deg)}
.global-chat-form textarea{font-size:14px!important}
.global-chat-form small{opacity:.88}
@media (max-width:760px){
  .global-chat-orb{right:12px!important;bottom:calc(14px + env(safe-area-inset-bottom))!important;width:68px!important;height:68px!important}
  .global-chat-dialog{right:10px!important;bottom:calc(90px + env(safe-area-inset-bottom))!important;width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;height:min(62dvh,520px)!important;max-height:min(62dvh,520px)!important;border-radius:20px!important}
}


/* P1S 8.10.6 · corrección final de burbuja/logo/chat */

.global-chat-orb{position:fixed!important;right:14px!important;bottom:calc(18px + env(safe-area-inset-bottom))!important;left:auto!important;top:auto!important;overflow:hidden!important;z-index:5000!important}
.global-chat-orb,.global-chat-orb *{box-sizing:border-box}
.global-chat-orb-core{width:54px!important;height:54px!important;max-width:54px!important;max-height:54px!important;overflow:hidden!important;border-radius:50%!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:2px!important;padding:0!important}
.global-chat-orb-logo{display:block!important;width:26px!important;height:26px!important;max-width:26px!important;max-height:26px!important;min-width:26px!important;min-height:26px!important;object-fit:contain!important;object-position:center!important;border-radius:6px!important;flex:0 0 26px!important}
.global-chat-orb-radar{pointer-events:none!important}
.global-chat-orb-live{right:6px!important;bottom:6px!important}
body.chat-panel-open .global-chat-orb{display:none!important}
.global-chat-dialog{position:fixed!important;right:10px!important;bottom:calc(96px + env(safe-area-inset-bottom))!important;left:auto!important;top:auto!important;width:min(390px,calc(100vw - 20px))!important;max-width:calc(100vw - 20px)!important;height:min(64dvh,560px)!important;max-height:min(64dvh,560px)!important;z-index:4990!important;border-radius:22px!important}
.chat-head-logo{width:42px!important;height:42px!important;min-width:42px!important;flex:0 0 42px!important;border-radius:14px!important;display:grid!important;place-items:center!important;overflow:hidden!important;background:rgba(208,255,73,.12)!important;border:1px solid rgba(208,255,73,.2)!important}
.chat-head-logo img{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:cover!important;object-position:center!important}
.global-chat-head .icon-button{font-size:0!important}
.global-chat-head .icon-button::before{content:'–';display:block;font-size:28px;line-height:1;color:#f6ffe6;transform:translateY(-2px)}
.global-chat-form{align-items:flex-end!important}
.chat-compose{flex:1!important;min-width:0!important;display:flex!important;flex-direction:column!important}
.global-chat-form textarea{width:100%!important;min-height:48px!important;max-height:110px!important;font-size:13px!important;border-radius:16px!important}
.chat-send-button{width:48px!important;height:48px!important;min-width:48px!important;flex:0 0 48px!important;border-radius:16px!important}
.chat-send-button .icon{width:20px!important;height:20px!important}
.chat-send-button .icon svg{transform:translateX(1px) rotate(-10deg)!important}
@media(max-width:700px){
  .global-chat-orb{right:12px!important;bottom:calc(14px + env(safe-area-inset-bottom))!important;width:68px!important;height:68px!important}
  .global-chat-orb-core{width:52px!important;height:52px!important;max-width:52px!important;max-height:52px!important}
  .global-chat-orb-logo{width:24px!important;height:24px!important;max-width:24px!important;max-height:24px!important;min-width:24px!important;min-height:24px!important}
  .global-chat-dialog{right:8px!important;bottom:calc(88px + env(safe-area-inset-bottom))!important;width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;height:min(60dvh,500px)!important;max-height:min(60dvh,500px)!important;border-radius:20px!important}
  .chat-head-logo{width:38px!important;height:38px!important;min-width:38px!important;flex-basis:38px!important}
}


/* P1S 8.10.7 · compatibilidad PC / escritorio */
@media (min-width:901px){
  .global-chat-orb{
    right:28px!important;
    bottom:28px!important;
    width:74px!important;
    height:74px!important;
    z-index:5000!important;
  }
  .global-chat-orb-core{
    width:58px!important;
    height:58px!important;
    max-width:58px!important;
    max-height:58px!important;
  }
  .global-chat-orb-logo{
    width:28px!important;
    height:28px!important;
    max-width:28px!important;
    max-height:28px!important;
    min-width:28px!important;
    min-height:28px!important;
  }
  .global-chat-dialog{
    right:28px!important;
    bottom:112px!important;
    top:auto!important;
    left:auto!important;
    width:420px!important;
    max-width:min(420px,calc(100vw - 56px))!important;
    height:min(70vh,650px)!important;
    max-height:calc(100vh - 140px)!important;
    min-height:430px!important;
    border-radius:24px!important;
    box-shadow:0 28px 80px rgba(10,26,14,.28),0 0 0 1px rgba(255,255,255,.45) inset!important;
  }
  .global-chat-head{
    padding:16px 16px 14px!important;
  }
  .global-chat-head-actions{
    flex-wrap:nowrap!important;
    gap:7px!important;
  }
  .chat-mini-stat{
    padding:7px 9px!important;
    font-size:10px!important;
    white-space:nowrap!important;
  }
  .chat-head-logo{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    flex-basis:44px!important;
  }
  .global-chat-messages{
    padding:12px 14px 14px!important;
    scrollbar-width:thin;
  }
  .chat-message-content{
    max-width:330px!important;
  }
  .global-chat-form{
    padding:12px 14px 14px!important;
    gap:10px!important;
  }
  .global-chat-form textarea{
    min-height:52px!important;
    max-height:128px!important;
    font-size:14px!important;
  }
  .chat-send-button{
    width:52px!important;
    height:52px!important;
    min-width:52px!important;
    flex-basis:52px!important;
  }
}
@media (min-width:1400px){
  .global-chat-dialog{
    width:440px!important;
    max-width:440px!important;
    height:min(72vh,690px)!important;
  }
  .chat-message-content{max-width:350px!important}
}
@media (min-width:901px) and (max-height:720px){
  .global-chat-dialog{
    bottom:96px!important;
    height:calc(100vh - 122px)!important;
    max-height:calc(100vh - 122px)!important;
    min-height:360px!important;
  }
  .global-chat-orb{bottom:18px!important}
}


/* P1S 8.10.8 · refinamiento visual del chat global */

.global-chat-orb{position:fixed!important;right:16px!important;bottom:calc(18px + env(safe-area-inset-bottom))!important;z-index:5000!important;overflow:hidden!important}
.global-chat-orb-core{width:56px!important;height:56px!important;max-width:56px!important;max-height:56px!important;padding:0!important;gap:0!important;background:transparent!important;box-shadow:none!important}
.global-chat-orb-core small{display:none!important}
.global-chat-orb-logo{display:block!important;width:50px!important;height:50px!important;max-width:50px!important;max-height:50px!important;border-radius:50%!important;object-fit:cover!important;object-position:center!important;box-shadow:0 6px 18px rgba(0,0,0,.18)}
.global-chat-dialog{right:10px!important;bottom:calc(92px + env(safe-area-inset-bottom))!important;left:auto!important;top:auto!important;width:min(400px,calc(100vw - 20px))!important;max-width:calc(100vw - 20px)!important;height:min(66dvh,620px)!important;max-height:min(66dvh,620px)!important;border-radius:24px!important;overflow:hidden!important}
.global-chat-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;gap:10px!important;padding:16px 16px 14px!important}
.global-chat-head-main{min-width:0!important;display:flex!important;align-items:center!important;gap:12px!important}
.chat-head-logo{width:46px!important;height:46px!important;min-width:46px!important;flex:0 0 46px!important;border-radius:16px!important;overflow:hidden!important}
.chat-head-logo img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}
.global-chat-head h2{font-size:18px!important;line-height:1.1!important}
.global-chat-head p[role=status]{font-size:11px!important;max-width:none!important}
.global-chat-head-actions{display:grid!important;grid-template-columns:auto auto 40px!important;grid-auto-rows:min-content!important;gap:7px!important;align-items:start!important;justify-items:end!important;justify-content:end!important}
#global-chat-device-count{grid-column:1!important;grid-row:1!important}
#global-chat-online-badge{grid-column:2!important;grid-row:1!important}
#global-chat-close{grid-column:3!important;grid-row:1!important;align-self:start!important;justify-self:end!important;margin:0!important;width:40px!important;height:40px!important;min-width:40px!important;border-radius:14px!important;background:rgba(255,255,255,.07)!important;border:1px solid rgba(255,255,255,.12)!important;color:#f8fff0!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.06)!important}
.global-chat-head .icon-button::before{content:'–';display:block;font-size:28px;line-height:1;color:#f6ffe6;transform:translateY(-2px)}
.chat-mini-stat{padding:6px 9px!important;border-radius:999px!important;font-size:10px!important;white-space:nowrap!important}
.global-chat-messages{padding:10px 12px 8px!important}
.chat-message{margin-bottom:12px!important}
.chat-avatar,.chat-person .chat-avatar{border-radius:50%!important;overflow:hidden!important;background:#e7efdd!important}
.chat-photo{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}
.global-chat-form{position:relative!important;display:block!important;padding:12px 12px max(12px,env(safe-area-inset-bottom))!important;background:rgba(255,255,255,.96)!important;border-top:1px solid #dfe6db!important}
.chat-compose{position:relative!important;background:linear-gradient(180deg,#f9fbf7,#f2f6ec)!important;border:1px solid #d7e3ca!important;border-radius:24px!important;padding:12px 64px 9px 14px!important;box-shadow:0 10px 25px rgba(32,55,27,.06), inset 0 1px 0 rgba(255,255,255,.8)!important}
.global-chat-form textarea{width:100%!important;min-height:26px!important;max-height:90px!important;resize:none!important;border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;font-size:16px!important;line-height:1.35!important;color:#243123!important}
.global-chat-form textarea:focus{outline:none!important;box-shadow:none!important}
.chat-compose>small{display:block!important;margin-top:5px!important;padding-left:1px!important;font-size:10px!important;color:#8c9888!important;line-height:1.2!important}
.chat-send-button{position:absolute!important;right:20px!important;bottom:18px!important;width:42px!important;height:42px!important;min-width:42px!important;border-radius:50%!important;display:grid!important;place-items:center!important;border:0!important;background:linear-gradient(180deg,#dcff61,#bfe334)!important;box-shadow:0 10px 24px rgba(171,214,43,.28)!important;color:#1e2d16!important}
.chat-send-button .icon{width:18px!important;height:18px!important}
.chat-send-button .icon svg{transform:translateX(1px) rotate(-8deg)!important}
.chat-send-button:disabled{opacity:.58!important;box-shadow:none!important}
@media(min-width:920px){
  .global-chat-dialog{width:min(420px,28vw)!important;min-width:360px!important;height:min(72dvh,720px)!important;max-height:min(72dvh,720px)!important;right:16px!important;bottom:18px!important}
  .global-chat-orb{right:18px!important;bottom:18px!important}
}
@media(max-width:700px){
  .global-chat-orb{right:12px!important;bottom:calc(14px + env(safe-area-inset-bottom))!important;width:68px!important;height:68px!important}
  .global-chat-orb-core{width:52px!important;height:52px!important;max-width:52px!important;max-height:52px!important}
  .global-chat-orb-logo{width:46px!important;height:46px!important;max-width:46px!important;max-height:46px!important}
  .global-chat-dialog{right:8px!important;bottom:calc(86px + env(safe-area-inset-bottom))!important;width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;height:min(64dvh,540px)!important;max-height:min(64dvh,540px)!important;border-radius:22px!important}
  .global-chat-head{padding:14px 14px 12px!important}
  .chat-head-logo{width:42px!important;height:42px!important;min-width:42px!important;flex-basis:42px!important}
  .global-chat-head h2{font-size:17px!important}
  .global-chat-head-actions{grid-template-columns:auto auto 38px!important;gap:6px!important}
  #global-chat-close{width:38px!important;height:38px!important;min-width:38px!important;border-radius:13px!important}
  .chat-mini-stat{font-size:9px!important;padding:5px 8px!important}
  .global-chat-form{padding:10px 10px max(10px,env(safe-area-inset-bottom))!important}
  .chat-compose{padding:11px 60px 8px 12px!important;border-radius:22px!important}
  .global-chat-form textarea{font-size:15px!important}
  .chat-send-button{right:18px!important;bottom:16px!important;width:40px!important;height:40px!important;min-width:40px!important}
}


/* P1S 8.10.9 · ajuste visual final */
.global-chat-dialog{backdrop-filter:blur(20px)!important;background:rgba(247,250,245,.98)!important;border:1px solid rgba(208,255,86,.28)!important;box-shadow:0 30px 80px rgba(7,18,11,.28),0 0 0 1px rgba(255,255,255,.45) inset!important}
.global-chat-head{background:radial-gradient(circle at top right, rgba(176,255,72,.18), rgba(19,34,24,.0) 28%), linear-gradient(135deg,#102116,#15271b 52%,#1b3320)!important}
.global-chat-title-wrap{display:flex!important;flex-direction:column!important;min-width:0!important}
.global-chat-title-wrap h2{margin-bottom:2px!important}
.global-chat-title-wrap p[role=status]{opacity:.96!important}
.chat-online-faces{display:flex!important;align-items:center!important;gap:0!important;margin-top:8px!important;min-height:26px}
.chat-online-face,.chat-online-more{width:26px!important;height:26px!important;border-radius:50%!important;display:grid!important;place-items:center!important;border:2px solid rgba(12,22,16,.85)!important;background:#24331f!important;margin-left:-6px!important;overflow:hidden!important;box-shadow:0 4px 12px rgba(0,0,0,.18)!important}
.chat-online-face:first-child{margin-left:0!important}
.chat-face-photo{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
.chat-online-more{font-size:10px!important;font-weight:800!important;color:#effbd1!important;background:rgba(255,255,255,.11)!important;padding:0 3px!important}
.global-chat-head-actions{padding-top:1px!important}
#global-chat-close{background:rgba(255,255,255,.09)!important;border:1px solid rgba(255,255,255,.14)!important;box-shadow:0 10px 20px rgba(0,0,0,.08)!important}
.global-chat-head .icon-button::before{content:'–';font-size:26px!important}
.chat-presence{margin:10px 10px 0!important;border-radius:14px!important;background:#eff5e6!important}
.chat-presence summary{font-size:12px!important}
.global-chat-messages{background:linear-gradient(180deg,#f4f8ef 0%, #f9fbf7 60%, #fbfcfa 100%)!important}
.chat-message-content{border-radius:18px 18px 18px 8px!important;padding:11px 13px!important}
.chat-message.chat-me .chat-message-content{border-radius:18px 8px 18px 18px!important}
.chat-message p{font-size:14px!important}
.global-chat-form{padding:10px 10px max(10px,env(safe-area-inset-bottom))!important}
.chat-compose{display:flex!important;align-items:flex-end!important;gap:10px!important;position:relative!important;padding:8px 10px!important;border-radius:26px!important;border:1px solid #d6e2c7!important;background:linear-gradient(180deg,#ffffff,#f1f6ea)!important;box-shadow:0 8px 24px rgba(28,46,22,.06), inset 0 1px 0 rgba(255,255,255,.8)!important}
.chat-plus-button{width:38px!important;height:38px!important;min-width:38px!important;border-radius:50%!important;border:0!important;display:grid!important;place-items:center!important;background:#eef4e4!important;color:#5c6f49!important;box-shadow:inset 0 0 0 1px #dce7cf!important;opacity:.9}
.chat-plus-button .icon{width:18px!important;height:18px!important}
.chat-plus-button:disabled{opacity:.88!important}
.global-chat-form textarea{flex:1!important;min-height:38px!important;max-height:96px!important;padding:10px 2px 10px 0!important;font-size:15px!important;line-height:1.35!important}
.chat-send-button{position:static!important;right:auto!important;bottom:auto!important;width:40px!important;height:40px!important;min-width:40px!important;margin-bottom:2px!important}
.chat-compose-hint{display:block!important;padding:5px 12px 0!important;color:#8b9788!important;font-size:10px!important}
.global-chat-orb{width:72px!important;height:72px!important;border-radius:50%!important;background:radial-gradient(circle at 32% 28%,#48682d 0 15%,#142018 42%,#08110c 78%)!important;box-shadow:0 18px 44px rgba(7,19,11,.36),0 0 0 1px rgba(212,243,84,.18),0 0 32px rgba(189,255,42,.22)!important}
.global-chat-orb-logo{width:52px!important;height:52px!important;max-width:52px!important;max-height:52px!important}
@media(min-width:920px){
  .global-chat-dialog{width:min(430px,29vw)!important;min-width:370px!important;height:min(74dvh,760px)!important;max-height:min(74dvh,760px)!important}
}
@media(max-width:700px){
  .global-chat-dialog{width:calc(100vw - 14px)!important;max-width:calc(100vw - 14px)!important;right:7px!important;bottom:calc(84px + env(safe-area-inset-bottom))!important;height:min(65dvh,560px)!important;max-height:min(65dvh,560px)!important;border-radius:22px!important}
  .global-chat-head{padding:13px 13px 11px!important;grid-template-columns:minmax(0,1fr) auto!important}
  .chat-head-logo{width:40px!important;height:40px!important;min-width:40px!important;flex-basis:40px!important}
  .global-chat-head-actions{grid-template-columns:auto auto 36px!important;gap:5px!important}
  #global-chat-close{width:36px!important;height:36px!important;min-width:36px!important;border-radius:12px!important}
  .chat-mini-stat{padding:5px 8px!important;font-size:9px!important}
  .chat-online-face,.chat-online-more{width:24px!important;height:24px!important}
  .global-chat-form{padding:8px 8px max(8px,env(safe-area-inset-bottom))!important}
  .chat-compose{padding:7px 9px!important;gap:8px!important;border-radius:24px!important}
  .chat-plus-button{width:34px!important;height:34px!important;min-width:34px!important}
  .global-chat-form textarea{font-size:14px!important;min-height:34px!important}
  .chat-send-button{width:38px!important;height:38px!important;min-width:38px!important}
}


/* P1S 8.11.0 · corrección fuerte del chat */
#global-chat-dialog.global-chat-dialog{position:fixed!important;right:8px!important;bottom:calc(84px + env(safe-area-inset-bottom))!important;top:auto!important;left:auto!important;width:min(410px,calc(100vw - 16px))!important;max-width:calc(100vw - 16px)!important;height:min(68dvh,640px)!important;max-height:min(68dvh,640px)!important;border-radius:26px!important;overflow:hidden!important;background:#f6faf4!important;border:1px solid rgba(198,237,101,.34)!important;box-shadow:0 28px 70px rgba(11,21,14,.28),0 0 0 1px rgba(255,255,255,.46) inset!important}
#global-chat-dialog .global-chat-head{display:flex!important;align-items:flex-start!important;justify-content:space-between!important;gap:12px!important;padding:15px 15px 12px!important;background:linear-gradient(135deg,#0c1c13 0%,#133120 48%,#173b22 100%)!important;color:#f6ffe8!important;border-bottom:none!important}
#global-chat-dialog .global-chat-head-main{display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important;flex:1!important}
#global-chat-dialog .chat-head-logo{width:48px!important;height:48px!important;min-width:48px!important;flex:0 0 48px!important;border-radius:16px!important;border:1px solid rgba(224,255,120,.18)!important;background:rgba(228,255,108,.08)!important;overflow:hidden!important}
#global-chat-dialog .chat-head-logo img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}
#global-chat-dialog .global-chat-title-wrap{display:flex!important;flex-direction:column!important;min-width:0!important}
#global-chat-dialog .global-chat-title-wrap .eyebrow{margin:0 0 2px!important;color:#dfff64!important;font-size:10px!important;letter-spacing:.15em!important}
#global-chat-dialog .global-chat-title-wrap h2{margin:0!important;color:#ffffff!important;font-size:20px!important;line-height:1.05!important}
#global-chat-dialog #global-chat-status{margin:5px 0 0!important;color:#d4ddd0!important;font-size:11px!important;line-height:1.25!important}
#global-chat-dialog .global-chat-head-actions{display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;justify-content:flex-end!important;max-width:42%!important}
#global-chat-dialog .chat-mini-stat{display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:7px 10px!important;border-radius:999px!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.10)!important;color:#eff9db!important;font-size:11px!important;font-weight:700!important;white-space:nowrap!important}
#global-chat-dialog #global-chat-close{width:38px!important;height:38px!important;min-width:38px!important;border-radius:14px!important;display:grid!important;place-items:center!important;margin:0!important;padding:0!important;background:rgba(255,255,255,.08)!important;border:1px solid rgba(255,255,255,.12)!important;box-shadow:none!important;align-self:flex-start!important}
#global-chat-dialog #global-chat-close::before{content:'–';font-size:28px!important;line-height:1!important;color:#f8ffe9!important;transform:translateY(-2px)!important}
#global-chat-dialog #global-chat-close>*{display:none!important}
#global-chat-dialog .chat-head-strip{display:flex!important;align-items:center!important;justify-content:flex-start!important;padding:0 15px 11px!important;background:linear-gradient(135deg,#0c1c13 0%,#173b22 100%)!important}
#global-chat-dialog .chat-online-faces{display:flex!important;align-items:center!important;gap:0!important;min-height:28px!important}
#global-chat-dialog .chat-online-face,#global-chat-dialog .chat-online-more{width:28px!important;height:28px!important;margin-left:-6px!important;border-radius:50%!important;border:2px solid #163020!important;background:#284123!important;display:grid!important;place-items:center!important;overflow:hidden!important;color:#ecfbd3!important;font-size:10px!important;font-weight:800!important}
#global-chat-dialog .chat-online-face:first-child{margin-left:0!important}
#global-chat-dialog .chat-face-photo{width:100%!important;height:100%!important;display:block!important;object-fit:cover!important}
#global-chat-dialog .chat-presence{margin:0!important;border-radius:0!important;background:#eff4e8!important;border-top:1px solid rgba(36,58,30,.06)!important;border-bottom:1px solid rgba(36,58,30,.06)!important}
#global-chat-dialog .chat-presence summary{padding:12px 14px!important;font-size:12px!important;color:#425039!important}
#global-chat-dialog .chat-older{margin:10px auto 6px!important;padding:7px 14px!important;background:#eef4e6!important;border-radius:999px!important;color:#596c47!important;font-size:12px!important;font-weight:700!important}
#global-chat-dialog .global-chat-messages{padding:12px 12px 8px!important;background:linear-gradient(180deg,#f5f8f2 0%,#fbfcfa 100%)!important}
#global-chat-dialog .chat-avatar{width:42px!important;height:42px!important;flex:0 0 42px!important;border-radius:50%!important;overflow:hidden!important;background:#dfe8d7!important}
#global-chat-dialog .chat-message{gap:10px!important;margin:0 0 12px!important}
#global-chat-dialog .chat-message-content{padding:12px 13px!important;border-radius:18px 18px 18px 8px!important;background:#ffffff!important;border:1px solid #e1e9d7!important;box-shadow:0 6px 18px rgba(20,33,19,.04)!important}
#global-chat-dialog .chat-message.chat-me .chat-message-content{background:linear-gradient(180deg,#21402b,#173222)!important;border-color:#264934!important;color:#ffffff!important;border-radius:18px 8px 18px 18px!important}
#global-chat-dialog .chat-message.chat-me .chat-message-content strong,#global-chat-dialog .chat-message.chat-me .chat-message-content p,#global-chat-dialog .chat-message.chat-me .chat-message-content small,#global-chat-dialog .chat-message.chat-me .chat-message-content time{color:#ffffff!important}
#global-chat-dialog .chat-message-heading strong{font-size:13px!important}
#global-chat-dialog .chat-message p{font-size:14px!important;line-height:1.42!important;margin-top:7px!important}
#global-chat-dialog .chat-message time{font-size:10px!important;color:#7e8880!important}
#global-chat-dialog .chat-empty{padding:42px 18px!important;color:#6f7b6e!important}
#global-chat-dialog #global-chat-form{display:block!important;padding:10px 10px max(10px,env(safe-area-inset-bottom))!important;background:#ffffff!important;border-top:1px solid #dfe5da!important}
#global-chat-dialog #global-chat-form .chat-compose{display:flex!important;align-items:flex-end!important;gap:10px!important;padding:9px 10px 9px 14px!important;border-radius:24px!important;border:1px solid #d5e3c7!important;background:linear-gradient(180deg,#ffffff 0%,#f2f7eb 100%)!important;box-shadow:0 8px 24px rgba(31,49,25,.06), inset 0 1px 0 rgba(255,255,255,.8)!important}
#global-chat-dialog #global-chat-text{flex:1!important;min-width:0!important;min-height:42px!important;max-height:96px!important;resize:none!important;border:0!important;background:transparent!important;box-shadow:none!important;padding:10px 0!important;font-size:15px!important;line-height:1.35!important;color:#243123!important}
#global-chat-dialog #global-chat-text:focus{outline:none!important;box-shadow:none!important}
#global-chat-dialog .chat-send-button{position:static!important;width:42px!important;height:42px!important;min-width:42px!important;border-radius:50%!important;border:0!important;display:grid!important;place-items:center!important;background:linear-gradient(180deg,#dfff67,#c7eb3b)!important;color:#203015!important;box-shadow:0 10px 22px rgba(173,214,53,.30)!important;margin:0 0 2px!important}
#global-chat-dialog .chat-send-button .icon{width:18px!important;height:18px!important}
#global-chat-dialog .chat-send-button .icon svg{transform:translateX(1px) rotate(-8deg)!important}
#global-chat-dialog .chat-compose-hint{display:block!important;padding:5px 10px 0 12px!important;font-size:10px!important;color:#8a9687!important;line-height:1.2!important}
.global-chat-orb{width:72px!important;height:72px!important;border-radius:50%!important}
.global-chat-orb-logo{width:52px!important;height:52px!important;max-width:52px!important;max-height:52px!important}
@media(min-width:920px){#global-chat-dialog.global-chat-dialog{right:16px!important;bottom:16px!important;width:min(430px,29vw)!important;min-width:380px!important;height:min(76dvh,760px)!important;max-height:min(76dvh,760px)!important}}
@media(max-width:700px){
 #global-chat-dialog.global-chat-dialog{right:7px!important;bottom:calc(83px + env(safe-area-inset-bottom))!important;width:calc(100vw - 14px)!important;max-width:calc(100vw - 14px)!important;height:min(66dvh,575px)!important;max-height:min(66dvh,575px)!important;border-radius:24px!important}
 #global-chat-dialog .global-chat-head{padding:13px 13px 10px!important}
 #global-chat-dialog .chat-head-logo{width:44px!important;height:44px!important;min-width:44px!important;flex-basis:44px!important}
 #global-chat-dialog .global-chat-title-wrap h2{font-size:18px!important}
 #global-chat-dialog .global-chat-head-actions{gap:6px!important;max-width:43%!important}
 #global-chat-dialog .chat-mini-stat{padding:6px 8px!important;font-size:10px!important}
 #global-chat-dialog #global-chat-close{width:36px!important;height:36px!important;min-width:36px!important;border-radius:12px!important}
 #global-chat-dialog .chat-head-strip{padding:0 13px 10px!important}
 #global-chat-dialog .chat-online-face,#global-chat-dialog .chat-online-more{width:26px!important;height:26px!important}
 #global-chat-dialog #global-chat-form{padding:8px 8px max(8px,env(safe-area-inset-bottom))!important}
 #global-chat-dialog #global-chat-form .chat-compose{padding:8px 9px 8px 12px!important;gap:8px!important;border-radius:22px!important}
 #global-chat-dialog #global-chat-text{min-height:40px!important;font-size:14px!important}
 #global-chat-dialog .chat-send-button{width:40px!important;height:40px!important;min-width:40px!important}
}


/* P1S 8.11.1 · envío rápido y barra compacta */
#global-chat-dialog #global-chat-form{padding:8px 8px max(8px,env(safe-area-inset-bottom))!important}
#global-chat-dialog #global-chat-form .chat-compose{padding:6px 7px 6px 12px!important;border-radius:22px!important;gap:8px!important;align-items:flex-end!important}
#global-chat-dialog #global-chat-text{min-height:42px!important;height:42px!important;max-height:96px!important;padding:10px 0 8px!important;font-size:14px!important;line-height:1.32!important;overflow:hidden!important}
#global-chat-dialog .chat-send-button{width:38px!important;height:38px!important;min-width:38px!important;box-shadow:0 8px 16px rgba(173,214,53,.24)!important}
#global-chat-dialog .chat-compose-hint{padding:4px 8px 0 12px!important;font-size:9px!important}
#global-chat-dialog .chat-message.chat-pending .chat-message-content{opacity:.86!important}
#global-chat-dialog .chat-message.chat-pending time{color:#d9f0a2!important}
@media(max-width:700px){
 #global-chat-dialog #global-chat-form .chat-compose{padding:6px 7px 6px 11px!important;border-radius:20px!important}
 #global-chat-dialog #global-chat-text{min-height:40px!important;height:40px!important;font-size:13.5px!important}
 #global-chat-dialog .chat-send-button{width:36px!important;height:36px!important;min-width:36px!important}
}


/* P1S 8.12.0 · tema oscuro tipo dashboard neon */
html{background:#040805}
body:not(.light-mode){
  --ink:#eef8ef!important;
  --muted:#92a895!important;
  --line:#1b4d2b!important;
  --paper:#050906!important;
  background:
    radial-gradient(circle at 15% -10%, rgba(79,255,128,.12), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(192,255,74,.08), transparent 28%),
    linear-gradient(180deg,#061009 0%,#040805 32%,#030503 100%)!important;
}
body:not(.light-mode) .workspace{max-width:1640px;padding-top:30px!important}
body:not(.light-mode) .topbar{
  background:linear-gradient(180deg,rgba(6,12,8,.96),rgba(4,9,6,.9))!important;
  border-bottom:1px solid rgba(112,255,142,.18)!important;
  box-shadow:0 14px 34px rgba(0,0,0,.45), inset 0 -1px 0 rgba(126,255,157,.06)!important;
}
body:not(.light-mode) .header-actions{gap:14px!important}
body:not(.light-mode) .top-link-button,
body:not(.light-mode) .traccar-users-badge,
body:not(.light-mode) .access-role-badge{
  background:rgba(8,18,12,.88)!important;
  border:1px solid rgba(111,255,139,.18)!important;
  color:#f0f8ee!important;
  border-radius:16px!important;
  min-height:44px!important;
  padding:10px 14px!important;
  box-shadow:0 10px 28px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04)!important;
}
body:not(.light-mode) .traccar-users-badge{display:inline-flex;align-items:center;gap:8px}
body:not(.light-mode) .traccar-users-badge strong{color:#cfff75!important}
body:not(.light-mode) #account-button{
  width:44px!important;height:44px!important;min-width:44px!important;border-radius:50%!important;
  border:1px solid rgba(111,255,139,.28)!important;background:linear-gradient(180deg,#101a12,#09110c)!important;
  box-shadow:0 0 0 1px rgba(57,255,113,.06),0 0 20px rgba(57,255,113,.14)!important;
}
body:not(.light-mode) .page-heading{margin-bottom:20px!important}
body:not(.light-mode) .stats{
  background:transparent!important;border:0!important;box-shadow:none!important;gap:14px!important;
}
body:not(.light-mode) .stat{
  background:linear-gradient(180deg,rgba(11,23,15,.96),rgba(8,16,11,.94))!important;
  border:1px solid rgba(103,255,129,.16)!important;border-radius:22px!important;
  box-shadow:0 18px 42px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.03)!important;
  min-height:134px;
}
body:not(.light-mode) .stat+.stat:before{display:none!important}
body:not(.light-mode) .stat strong{color:#f2fbef!important}
body:not(.light-mode) .stat p{color:#9eb3a2!important}
body:not(.light-mode) .monitor-window{
  border-radius:28px!important;
  border:1px solid rgba(106,255,132,.16)!important;
  background:linear-gradient(180deg,rgba(7,14,9,.96),rgba(5,11,7,.96))!important;
  box-shadow:0 26px 70px rgba(0,0,0,.38), 0 0 0 1px rgba(57,255,99,.04), 0 0 28px rgba(57,255,99,.08)!important;
}
body:not(.light-mode) .window-toolbar{padding:14px 18px!important}
body:not(.light-mode) .view-tabs{gap:10px!important;flex-wrap:wrap}
body:not(.light-mode) .view-tab{
  padding:11px 15px!important;border-radius:14px!important;border:1px solid rgba(90,255,121,.16)!important;
  background:rgba(8,15,10,.8)!important;color:#dff0e1!important;
}
body:not(.light-mode) .view-tab.active{
  background:linear-gradient(180deg,rgba(54,255,92,.18),rgba(26,74,37,.34))!important;
  color:#dfff89!important;border-color:rgba(150,255,104,.36)!important;
  box-shadow:0 0 0 1px rgba(207,255,103,.05),0 0 18px rgba(74,255,101,.12)!important;
}
body:not(.light-mode) .view-tab.active:after{display:none!important}
body:not(.light-mode) .read-time{color:#8ca291!important}
body:not(.light-mode) .search-field,
body:not(.light-mode) .map-search-field,
body:not(.light-mode) .list-controls select,
body:not(.light-mode) .movement-toolbar-global input,
body:not(.light-mode) .movement-toolbar-global select{
  background:rgba(8,17,11,.95)!important;border:1px solid rgba(83,210,111,.18)!important;
  color:#edf8ed!important;border-radius:15px!important;
}
body:not(.light-mode) .button-outline,
body:not(.light-mode) .trip-button,
body:not(.light-mode) .icon-button,
body:not(.light-mode) .fit-button{
  background:rgba(8,17,11,.94)!important;border:1px solid rgba(91,232,121,.18)!important;color:#ebf7eb!important;
  border-radius:14px!important;
}
body:not(.light-mode) .button-primary{
  background:linear-gradient(180deg,#b9ff4b,#7fe82b)!important;
  border-color:#ccff72!important;color:#12200f!important;
  box-shadow:0 12px 26px rgba(173,214,53,.24),0 0 22px rgba(173,214,53,.12)!important;
}
body:not(.light-mode) .map-panel,
body:not(.light-mode) .map-panel #map{background:#041008!important}
body:not(.light-mode) .map-label,
body:not(.light-mode) .fit-button,
body:not(.light-mode) .selected-card,
body:not(.light-mode) .route-summary-card{
  backdrop-filter:blur(14px)!important;
}
body:not(.light-mode) .map-label{border-radius:14px!important}
body:not(.light-mode) .selected-card{
  width:330px!important;border-radius:20px!important;
  background:linear-gradient(180deg,rgba(8,17,12,.96),rgba(5,11,8,.92))!important;
  border:1px solid rgba(100,255,130,.2)!important;
  box-shadow:0 20px 46px rgba(0,0,0,.42),0 0 22px rgba(57,255,99,.08)!important;
}
body:not(.light-mode) .legend,
body:not(.light-mode) .source-label{color:#88a08d!important}
body:not(.light-mode) .window-footer{padding:14px 18px!important}
body:not(.light-mode) .list-section,
body:not(.light-mode) .table-wrap{
  border-radius:24px!important;
  border:1px solid rgba(101,255,129,.14)!important;
  background:linear-gradient(180deg,rgba(8,15,10,.96),rgba(5,11,8,.96))!important;
  box-shadow:0 22px 60px rgba(0,0,0,.30)!important;
}
body:not(.light-mode) th{
  background:rgba(8,17,11,.98)!important;color:#89a08d!important;border-color:#153723!important;
}
body:not(.light-mode) td{border-color:#0f2818!important}
body:not(.light-mode) tbody tr:hover{background:rgba(16,35,21,.75)!important}
body:not(.light-mode) tbody tr.selected{background:rgba(17,42,24,.86)!important}
body:not(.light-mode) .status-pill.online{background:#0c2412!important;color:#71ff8a!important}
body:not(.light-mode) .status-pill.offline{background:#291d0a!important;color:#ffc76b!important}
body:not(.light-mode) .status-pill.unknown{background:#141816!important;color:#b3c1b5!important}
body:not(.light-mode) .page-footer{color:#728a78!important}
body:not(.light-mode) .global-chat-dialog{
  border-radius:30px!important;
  border:1px solid rgba(132,255,159,.24)!important;
  background:linear-gradient(180deg,rgba(8,15,10,.98),rgba(8,13,10,.97))!important;
  box-shadow:0 28px 90px rgba(0,0,0,.56),0 0 0 1px rgba(255,255,255,.02) inset,0 0 32px rgba(88,255,113,.10)!important;
}
body:not(.light-mode) #global-chat-dialog .global-chat-head{
  background:radial-gradient(circle at 10% 0%,rgba(120,255,120,.16),transparent 22%), linear-gradient(135deg,#08150d 0%,#112117 55%,#0b1510 100%)!important;
}
body:not(.light-mode) #global-chat-dialog .chat-head-strip{background:linear-gradient(180deg,#08150d,#0e1c12)!important}
body:not(.light-mode) #global-chat-dialog .chat-presence{background:#0c1510!important;border-color:#15241a!important}
body:not(.light-mode) #global-chat-dialog .global-chat-messages{background:linear-gradient(180deg,#07110b 0%,#09110d 100%)!important}
body:not(.light-mode) #global-chat-dialog .chat-message-content{
  background:linear-gradient(180deg,#131f16,#0d1711)!important;border-color:#1b3021!important;color:#eef8ed!important;
}
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me .chat-message-content{
  background:linear-gradient(180deg,#1d6140,#164f34)!important;border-color:#2e7a53!important;
}
body:not(.light-mode) #global-chat-dialog #global-chat-form{
  background:linear-gradient(180deg,#08110b,#09120c)!important;border-top:1px solid #142318!important;
}
body:not(.light-mode) #global-chat-dialog #global-chat-form .chat-compose{
  background:linear-gradient(180deg,#0f1a12 0%,#0a140e 100%)!important;
  border-color:#20412a!important;
  box-shadow:0 10px 26px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.02)!important;
}
body:not(.light-mode) #global-chat-dialog #global-chat-text{color:#edf8ee!important}
body:not(.light-mode) #global-chat-dialog #global-chat-text::placeholder{color:#6f8574!important}
body:not(.light-mode) #global-chat-dialog .chat-send-button{
  background:linear-gradient(180deg,#d4ff59,#95ef36)!important;color:#11230e!important;
  box-shadow:0 12px 24px rgba(173,214,53,.25),0 0 18px rgba(173,214,53,.12)!important;
}
body:not(.light-mode) .global-chat-orb{
  background:radial-gradient(circle at 32% 24%,#4d742d 0 14%,#132018 40%,#08110c 78%)!important;
  border-color:rgba(199,255,76,.9)!important;
  box-shadow:0 20px 46px rgba(7,19,11,.44),0 0 0 1px rgba(212,243,84,.16),0 0 34px rgba(189,255,42,.24)!important;
}
body:not(.light-mode) .global-chat-orb-logo{box-shadow:0 8px 20px rgba(0,0,0,.28)!important}
@media(min-width:980px){
  body:not(.light-mode) #global-chat-dialog.global-chat-dialog{width:min(500px,31vw)!important;min-width:430px!important;height:min(78dvh,820px)!important}
}
@media(max-width:760px){
  body:not(.light-mode) .stats{grid-template-columns:repeat(2,1fr)!important}
  body:not(.light-mode) .stat{min-height:118px!important;border-radius:18px!important}
  body:not(.light-mode) .monitor-window{border-radius:22px!important}
}


/* P1S v8.12.2 · theme toggle + polished chat/account panel */
#theme-toggle.theme-toggle{display:grid!important;place-items:center!important;flex:0 0 auto!important}
.header-actions{gap:12px!important}
.topbar .traccar-users-badge,.topbar .top-link-button,.topbar .access-role-badge{height:44px!important}
body.light-mode .topbar{background:#1c231d!important;color:#fff!important}
body.light-mode .monitor-window,body.light-mode .list-section,body.light-mode .table-wrap,body.light-mode .selected-card{box-shadow:0 16px 42px rgba(32,51,35,.08)!important}

/* account panel */
.account-menu-dialog{width:min(700px,calc(100vw - 24px))!important;padding:28px!important;border-radius:28px!important;overflow:hidden!important}
.account-menu-head{display:grid!important;grid-template-columns:92px minmax(0,1fr)!important;gap:18px!important;align-items:center!important;margin-bottom:10px!important}
.account-menu-copy{min-width:0}
.account-menu-copy .eyebrow{margin:0 0 6px!important}
#account-menu-title{margin:0!important;font-size:clamp(1.65rem,2vw,2.15rem)!important;line-height:1.06!important;letter-spacing:-.03em!important}
#account-menu-user{margin:8px 0 0!important;font-size:.96rem!important;line-height:1.45!important;color:var(--muted)!important;word-break:break-word!important}
.account-profile-preview{width:92px!important;height:92px!important;border-radius:24px!important;display:grid!important;place-items:center!important;overflow:hidden!important;box-shadow:0 12px 32px rgba(0,0,0,.12)!important}
.my-name-form{padding:18px 0 0!important;border-top:1px solid rgba(128,144,123,.25)!important;margin-top:18px!important}
.my-name-form label{display:block!important;font-size:.84rem!important;font-weight:600!important;margin-bottom:10px!important}
.my-name-form>div{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important}
.my-name-form input{height:48px!important;border-radius:14px!important;padding:0 15px!important}
#my-name-save{min-width:150px!important;border-radius:14px!important}
.account-menu-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important;margin-top:18px!important}
.account-menu-action{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;align-items:start!important;gap:12px!important;padding:16px!important;min-height:96px!important;border-radius:20px!important}
.account-menu-action span:last-child,.account-menu-action span{min-width:0!important}
.account-menu-action strong{font-size:.96rem!important;line-height:1.2!important}
.account-menu-action small{font-size:.78rem!important;line-height:1.45!important;margin-top:6px!important;display:block!important}
.privacy-note{margin-top:16px!important;line-height:1.6!important}
body:not(.light-mode) .account-menu-dialog{background:linear-gradient(180deg,#07110b 0%,#07140d 100%)!important;border:1px solid rgba(108,255,133,.20)!important;box-shadow:0 28px 85px rgba(0,0,0,.58),0 0 0 1px rgba(255,255,255,.02) inset,0 0 26px rgba(88,255,113,.09)!important}
body:not(.light-mode) #account-menu-user{color:#a8beab!important}
body:not(.light-mode) .account-profile-preview{background:linear-gradient(180deg,#0f1e13,#0b1610)!important;border-color:#2d7a45!important}
body:not(.light-mode) .my-name-form{border-top-color:#183522!important}
body:not(.light-mode) .my-name-form input{background:#0b1510!important;border:1px solid #21422b!important;color:#ecf8ee!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.03)!important}
body:not(.light-mode) .account-menu-action{background:linear-gradient(180deg,#09150d 0%,#08120c 100%)!important;border:1px solid rgba(90,233,121,.18)!important;box-shadow:0 14px 34px rgba(0,0,0,.26)!important}
body:not(.light-mode) .account-menu-action:hover{transform:translateY(-1px);background:linear-gradient(180deg,#0d1d12 0%,#0b1710 100%)!important;border-color:#63ff82!important;box-shadow:0 16px 40px rgba(0,0,0,.34),0 0 20px rgba(99,255,130,.08)!important}
body:not(.light-mode) .account-menu-action strong{color:#f1fbf2!important}
body:not(.light-mode) .account-menu-action small{color:#93a997!important}
body:not(.light-mode) .privacy-note{color:#8ea391!important}

/* chat polished */
.global-chat-dialog{padding:0!important;width:min(500px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;height:min(80dvh,820px)!important;max-height:min(80dvh,820px)!important;border-radius:30px!important;overflow:hidden!important}
.global-chat-dialog[open]{display:flex!important;flex-direction:column!important}
.global-chat-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;gap:14px!important;padding:22px 22px 14px!important;border-bottom:1px solid rgba(255,255,255,.05)!important}
.global-chat-head-main{display:flex!important;align-items:center!important;gap:14px!important;min-width:0!important}
.chat-head-logo{width:60px!important;height:60px!important;min-width:60px!important;border-radius:18px!important;display:grid!important;place-items:center!important;overflow:hidden!important;box-shadow:0 8px 26px rgba(0,0,0,.22)!important}
.chat-head-logo img{width:100%!important;height:100%!important;object-fit:cover!important}
.global-chat-title-wrap{min-width:0!important}
.global-chat-title-wrap .eyebrow{margin:0 0 5px!important;font-size:.7rem!important;letter-spacing:.16em!important}
.global-chat-head h2{margin:0!important;font-size:2.05rem!important;line-height:1.02!important;letter-spacing:-.04em!important}
#global-chat-status{margin:7px 0 0!important;font-size:.92rem!important;line-height:1.35!important;color:rgba(236,244,230,.82)!important;max-width:26ch!important}
.global-chat-head-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:10px!important;flex-wrap:wrap!important;max-width:180px!important}
.chat-mini-stat{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:38px!important;padding:0 12px!important;border-radius:999px!important;font-size:.85rem!important;font-weight:650!important;white-space:nowrap!important}
#global-chat-close{width:42px!important;height:42px!important;min-width:42px!important;border-radius:14px!important;font-size:26px!important;line-height:1!important;padding:0!important;display:grid!important;place-items:center!important}
.chat-head-strip{display:flex!important;justify-content:flex-end!important;align-items:center!important;padding:0 22px 12px!important;min-height:24px!important}
.chat-online-faces{display:flex!important;align-items:center!important;justify-content:flex-end!important}
.chat-online-face,.chat-online-more{width:30px!important;height:30px!important;border-radius:50%!important;margin-left:-8px!important;border:2px solid rgba(10,18,12,.92)!important;display:grid!important;place-items:center!important;overflow:hidden!important}
.chat-online-face:first-child{margin-left:0!important}
.chat-online-more{font-size:.72rem!important;font-weight:700!important}
.chat-presence{margin:0 22px!important;border-radius:16px!important;padding:10px 14px!important}
.chat-presence summary{list-style:none!important;display:flex!important;align-items:center!important;gap:8px!important}
.chat-presence summary::-webkit-details-marker{display:none!important}
.chat-older{align-self:center!important;margin:14px auto 0!important;padding:10px 14px!important;border-radius:999px!important;text-decoration:none!important;font-weight:600!important}
.global-chat-messages{flex:1 1 auto!important;padding:18px 18px 16px!important;overflow:auto!important;background:transparent!important}
.chat-message{display:flex!important;align-items:flex-end!important;gap:10px!important;margin:0 0 14px!important}
.chat-message:not(.chat-me) .chat-message-content{max-width:78%!important;border-radius:20px 20px 20px 8px!important}
.chat-message.chat-me{justify-content:flex-end!important}
.chat-message.chat-me .chat-avatar{order:2!important}
.chat-message.chat-me .chat-message-content{order:1!important;max-width:78%!important;border-radius:20px 20px 8px 20px!important}
.chat-avatar{width:42px!important;height:42px!important;flex:0 0 42px!important;border-radius:50%!important;overflow:hidden!important}
.chat-message-content{padding:12px 14px!important;border:1px solid rgba(128,144,123,.18)!important;box-shadow:0 12px 24px rgba(0,0,0,.08)!important}
.chat-message-heading{display:flex!important;justify-content:space-between!important;align-items:flex-start!important;gap:12px!important}
.chat-message-heading strong{font-size:.95rem!important}
.chat-message time{font-size:.76rem!important;opacity:.88!important}
.chat-message-content>small{font-size:.75rem!important;line-height:1.35!important;margin-top:5px!important}
.chat-message p{font-size:.98rem!important;line-height:1.5!important;margin-top:8px!important}
#global-chat-form.global-chat-form{display:block!important;padding:14px 16px 16px!important}
#global-chat-form .chat-compose{display:flex!important;align-items:flex-end!important;gap:10px!important;padding:10px 10px 10px 14px!important;border-radius:24px!important;border:1px solid rgba(127,146,121,.24)!important}
#global-chat-text{flex:1 1 auto!important;min-width:0!important;min-height:42px!important;max-height:120px!important;height:42px!important;padding:10px 0 8px!important;border:0!important;background:transparent!important;resize:none!important;line-height:1.38!important}
.chat-send-button{width:46px!important;height:46px!important;min-width:46px!important;border-radius:16px!important;border:0!important;display:grid!important;place-items:center!important}
.chat-send-button .icon{width:20px!important;height:20px!important}
.chat-compose-hint{display:block!important;padding:7px 4px 0 10px!important;font-size:.72rem!important;line-height:1.3!important}
body:not(.light-mode) .global-chat-dialog{background:linear-gradient(180deg,#07120b 0%,#07100b 100%)!important;border:1px solid rgba(123,255,147,.26)!important;box-shadow:0 28px 90px rgba(0,0,0,.58),0 0 0 1px rgba(255,255,255,.03) inset,0 0 35px rgba(102,255,127,.12)!important}
body:not(.light-mode) .global-chat-head{background:radial-gradient(circle at 15% -10%,rgba(85,255,102,.16),transparent 34%),linear-gradient(135deg,#0b1a10 0%,#102116 55%,#0b1510 100%)!important}
body:not(.light-mode) .chat-head-logo{background:linear-gradient(180deg,#1b2d18,#0f1a12)!important;border:1px solid rgba(203,255,88,.22)!important}
body:not(.light-mode) .chat-mini-stat{background:rgba(255,255,255,.06)!important;border:1px solid rgba(255,255,255,.08)!important;color:#f0f7ee!important}
body:not(.light-mode) #global-chat-close{background:rgba(255,255,255,.05)!important;border:1px solid rgba(255,255,255,.08)!important;color:#eef8ef!important}
body:not(.light-mode) .chat-online-more{background:#1a241d!important;color:#f0f8f0!important}
body:not(.light-mode) .chat-presence{background:rgba(255,255,255,.035)!important;border:1px solid rgba(255,255,255,.06)!important;color:#eaf6eb!important}
body:not(.light-mode) .chat-older{background:rgba(230,240,225,.08)!important;color:#f1f7ef!important}
body:not(.light-mode) .chat-avatar{background:#0b1610!important;border:1px solid rgba(255,255,255,.08)!important;color:#ddffe4!important}
body:not(.light-mode) .chat-message-content{background:linear-gradient(180deg,#121d16,#0e1712)!important;border-color:#1f3226!important;color:#edf7ee!important;box-shadow:0 10px 26px rgba(0,0,0,.26)!important}
body:not(.light-mode) .chat-message.chat-me .chat-message-content{background:linear-gradient(180deg,#1f6a45,#1b5739)!important;border-color:#2d8255!important}
body:not(.light-mode) .chat-message time,body:not(.light-mode) .chat-message-content>small,body:not(.light-mode) .chat-compose-hint{color:#94a695!important}
body:not(.light-mode) #global-chat-form{background:linear-gradient(180deg,#07110b,#08120c)!important;border-top:1px solid #142218!important}
body:not(.light-mode) #global-chat-form .chat-compose{background:linear-gradient(180deg,#0d1812 0%,#0a140e 100%)!important;border-color:#1f3e29!important;box-shadow:0 12px 28px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.03)!important}
body:not(.light-mode) #global-chat-text{color:#edf8ee!important}
body:not(.light-mode) #global-chat-text::placeholder{color:#7d9282!important}
body:not(.light-mode) .chat-send-button{background:linear-gradient(180deg,#d2ff57,#98ef38)!important;color:#11210e!important;box-shadow:0 12px 24px rgba(173,214,53,.25),0 0 18px rgba(173,214,53,.12)!important}
body.light-mode .global-chat-dialog{background:#f7f9f5!important;border-color:#dbe5d6!important;box-shadow:0 24px 70px rgba(28,35,29,.18)!important}
body.light-mode .global-chat-head{background:linear-gradient(135deg,#1d2b22,#223228)!important;color:#f6fbef!important}
body.light-mode .chat-head-logo{background:#314031!important}
body.light-mode .chat-mini-stat{background:#ffffff14!important;border:1px solid #ffffff1a!important;color:#f8fbef!important}
body.light-mode .chat-presence{background:#f2f5ef!important;border:1px solid #dce4d7!important}
body.light-mode .chat-older{background:#eef3e8!important;color:#415139!important}
body.light-mode .chat-message.chat-me .chat-message-content{background:linear-gradient(180deg,#dff8dc,#c9f0c3)!important;border-color:#b0daab!important}
body.light-mode #global-chat-form{background:#fbfcf9!important}
body.light-mode #global-chat-form .chat-compose{background:#fff!important;border-color:#d6e2d2!important}
body.light-mode .chat-send-button{background:linear-gradient(180deg,#d4ff59,#b5ee46)!important;color:#20311a!important}

@media(max-width:760px){
  .header-actions{gap:8px!important}
  .topbar .traccar-users-badge,.topbar .top-link-button,.topbar .access-role-badge{height:40px!important;padding:8px 12px!important}
  .account-menu-dialog{width:calc(100vw - 14px)!important;padding:18px!important;border-radius:24px!important}
  .account-menu-head{grid-template-columns:74px minmax(0,1fr)!important;gap:14px!important;align-items:start!important}
  .account-profile-preview{width:74px!important;height:74px!important;border-radius:20px!important}
  #account-menu-title{font-size:1.75rem!important}
  #account-menu-user{font-size:.88rem!important}
  .my-name-form>div{grid-template-columns:1fr!important}
  #my-name-save{width:100%!important}
  .account-menu-grid{grid-template-columns:1fr!important;gap:12px!important}
  .account-menu-action{min-height:86px!important;border-radius:18px!important}
  .global-chat-dialog{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;height:min(74dvh,690px)!important;max-height:min(74dvh,690px)!important;right:8px!important;left:auto!important;bottom:calc(74px + env(safe-area-inset-bottom))!important;border-radius:24px!important}
  .global-chat-head{grid-template-columns:1fr!important;padding:18px 16px 12px!important;gap:12px!important}
  .global-chat-head-main{align-items:flex-start!important}
  .chat-head-logo{width:50px!important;height:50px!important;min-width:50px!important;border-radius:16px!important}
  .global-chat-head h2{font-size:1.7rem!important}
  #global-chat-status{font-size:.85rem!important;max-width:none!important}
  .global-chat-head-actions{max-width:none!important;justify-content:flex-start!important}
  .chat-head-strip{padding:0 16px 12px!important;justify-content:flex-start!important}
  .chat-presence{margin:0 16px!important}
  .global-chat-messages{padding:16px 12px 14px!important}
  .chat-message:not(.chat-me) .chat-message-content,.chat-message.chat-me .chat-message-content{max-width:calc(100% - 54px)!important}
  #global-chat-form.global-chat-form{padding:12px!important;padding-bottom:max(12px,env(safe-area-inset-bottom))!important}
  #global-chat-form .chat-compose{padding:8px 8px 8px 12px!important;border-radius:20px!important}
  #global-chat-text{font-size:14px!important}
  .chat-send-button{width:42px!important;height:42px!important;min-width:42px!important;border-radius:14px!important}
}

/* P1S v8.12.4 CHAT V2 */
#global-chat-dialog.p1s-chat-v2{position:fixed!important;inset:auto 16px 16px auto!important;margin:0!important;width:min(520px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px)!important;height:min(78dvh,780px)!important;max-height:min(78dvh,780px)!important;padding:0!important;overflow:hidden!important;border-radius:28px!important;border:1px solid rgba(70,255,154,.52)!important;background:linear-gradient(180deg,rgba(5,16,12,.99),rgba(5,12,10,.99))!important;color:#eff8f1!important;box-shadow:0 30px 90px rgba(0,0,0,.58),0 0 0 1px rgba(255,255,255,.03) inset,0 0 32px rgba(63,255,133,.10)!important;backdrop-filter:blur(22px)!important;z-index:5000!important}#global-chat-dialog.p1s-chat-v2[open]{display:flex!important;flex-direction:column!important}#global-chat-dialog.p1s-chat-v2::backdrop{background:transparent!important}.p1s-chat-top{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:14px!important;align-items:start!important;padding:22px 22px 18px!important;background:radial-gradient(circle at 12% -15%,rgba(48,255,121,.18),transparent 36%),linear-gradient(135deg,#07150e 0%,#0d2116 60%,#08150f 100%)!important;border-bottom:1px solid rgba(118,255,159,.12)!important}.p1s-chat-brand{display:flex!important;align-items:center!important;gap:14px!important;min-width:0!important}.p1s-chat-logo{width:62px!important;height:62px!important;flex:0 0 62px!important;border-radius:20px!important;overflow:hidden!important;border:1px solid rgba(185,255,84,.22)!important;background:#102117!important}.p1s-chat-logo img{width:100%!important;height:100%!important;object-fit:cover!important}.p1s-chat-heading .eyebrow{margin:0 0 5px!important;color:#baff4e!important;font-size:.67rem!important;letter-spacing:.18em!important;font-weight:800!important}.p1s-chat-title-line{display:flex!important;align-items:center!important;gap:9px!important}.p1s-chat-title-line h2{margin:0!important;font-size:2rem!important;line-height:1.05!important;color:#fff!important}.p1s-chat-live-dot{width:10px!important;height:10px!important;border-radius:50%!important;background:#2dff82!important;box-shadow:0 0 14px rgba(45,255,130,.95)!important}.p1s-chat-heading #global-chat-status{margin:6px 0 0!important;color:#bacbc0!important;font-size:.9rem!important}.p1s-chat-top-actions{display:grid!important;grid-template-columns:auto auto!important;gap:8px!important;justify-items:end!important}.p1s-chat-top-actions .chat-mini-stat{min-height:38px!important;display:inline-flex!important;align-items:center!important;padding:0 12px!important;border-radius:999px!important;background:rgba(255,255,255,.055)!important;border:1px solid rgba(255,255,255,.09)!important;color:#edf7ef!important;font-size:.78rem!important}.p1s-chat-window-button{width:40px!important;height:40px!important;border-radius:13px!important;border:1px solid rgba(255,255,255,.08)!important;background:rgba(255,255,255,.05)!important;color:#eff8f0!important;font-size:24px!important;display:grid!important;place-items:center!important}.p1s-chat-tabs{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:8px!important;padding:12px 16px!important;background:#07120d!important;border-bottom:1px solid rgba(255,255,255,.06)!important}.p1s-chat-tab{height:44px!important;border:1px solid transparent!important;border-radius:13px!important;background:transparent!important;color:#a9b9ad!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;font:inherit!important;font-size:.9rem!important;font-weight:700!important}.p1s-chat-tab.active{color:#d9ffd0!important;background:linear-gradient(180deg,rgba(48,255,121,.17),rgba(31,130,68,.18))!important;border-color:rgba(55,255,125,.18)!important;box-shadow:inset 0 -2px 0 #34ff7f!important}.p1s-chat-panel{flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;background:linear-gradient(180deg,#07100c,#07110d)!important}.p1s-chat-panel[hidden]{display:none!important}.p1s-chat-panel.active{display:flex!important;flex-direction:column!important}.p1s-chat-users-preview{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:8px 18px!important;border-bottom:1px solid rgba(255,255,255,.055)!important;color:#a8b9ad!important;font-size:.78rem!important}.p1s-chat-v2 .global-chat-messages{flex:1!important;min-height:0!important;overflow:auto!important;padding:16px!important;background:transparent!important}.p1s-chat-v2 .chat-message{display:flex!important;align-items:flex-end!important;gap:10px!important;margin:0 0 14px!important}.p1s-chat-v2 .chat-avatar{width:40px!important;height:40px!important;flex:0 0 40px!important;border-radius:50%!important;background:#173028!important}.p1s-chat-v2 .chat-message-content{max-width:78%!important;padding:11px 13px!important;border-radius:18px 18px 18px 7px!important;background:linear-gradient(180deg,#18250d,#121c17)!important;border:1px solid rgba(255,255,255,.055)!important;color:#f2f8f3!important}.p1s-chat-v2 .chat-message.chat-me{flex-direction:row-reverse!important}.p1s-chat-v2 .chat-message.chat-me .chat-message-content{background:linear-gradient(180deg,#0e7142,#0b5735)!important;border-radius:18px 18px 7px 18px!important}.p1s-chat-v2 .chat-message p{font-size:.95rem!important;line-height:1.42!important}.p1s-chat-section-head{display:flex!important;justify-content:space-between!important;padding:18px!important;border-bottom:1px solid rgba(255,255,255,.055)!important}.p1s-chat-people{padding:10px 16px 18px!important;overflow:auto!important}.p1s-chat-empty-files{margin:auto!important;max-width:300px!important;padding:28px 20px!important;text-align:center!important;color:#83978a!important}.p1s-chat-composer{display:grid!important;grid-template-columns:42px minmax(0,1fr) 46px!important;grid-template-rows:auto auto!important;gap:8px 10px!important;align-items:end!important;padding:12px 14px max(12px,env(safe-area-inset-bottom))!important;background:#07110c!important;border-top:1px solid rgba(255,255,255,.065)!important}.p1s-chat-round-action{width:42px!important;height:42px!important;border-radius:50%!important;border:1px solid rgba(255,255,255,.07)!important;background:#132019!important;color:#d9e6dc!important;display:grid!important;place-items:center!important}.p1s-chat-input-wrap{display:flex!important;align-items:flex-end!important;gap:6px!important;min-height:46px!important;padding:5px 8px 5px 13px!important;border:1px solid rgba(115,255,154,.17)!important;border-radius:18px!important;background:#0b1711!important}.p1s-chat-v2 #global-chat-text{flex:1!important;height:36px!important;min-height:36px!important;max-height:96px!important;padding:9px 0 7px!important;border:0!important;background:transparent!important;color:#eef8f0!important;resize:none!important;font-size:.9rem!important}.p1s-chat-emoji{width:34px!important;height:34px!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#c9d7cd!important;font-size:20px!important}.p1s-chat-v2 .chat-send-button{width:46px!important;height:46px!important;min-width:46px!important;border-radius:14px!important;border:0!important;background:linear-gradient(180deg,#baff4e,#78eb37)!important;color:#11210e!important;display:grid!important;place-items:center!important}.p1s-chat-v2 .chat-compose-hint{grid-column:2/4!important;color:#6e8375!important;font-size:.67rem!important}.light-mode #global-chat-dialog.p1s-chat-v2{background:#f7faf6!important;color:#243124!important;border-color:#d7e5d3!important}.light-mode .p1s-chat-tabs,.light-mode .p1s-chat-composer{background:#f2f6ef!important}.light-mode .p1s-chat-panel{background:#f8faf6!important}.light-mode .p1s-chat-v2 .chat-message-content{background:#fff!important;color:#273429!important}.light-mode .p1s-chat-v2 .chat-message.chat-me .chat-message-content{background:#d5f1d0!important;color:#203522!important}.light-mode .p1s-chat-input-wrap{background:#fff!important}.light-mode .p1s-chat-v2 #global-chat-text{color:#263428!important}@media(max-width:700px){#global-chat-dialog.p1s-chat-v2{inset:auto 8px calc(82px + env(safe-area-inset-bottom)) auto!important;width:calc(100vw - 16px)!important;height:min(72dvh,650px)!important;max-height:min(72dvh,650px)!important;border-radius:24px!important}.p1s-chat-top{padding:16px 14px 13px!important;gap:10px!important}.p1s-chat-logo{width:50px!important;height:50px!important;flex-basis:50px!important}.p1s-chat-title-line h2{font-size:1.48rem!important}.p1s-chat-heading #global-chat-status{font-size:.74rem!important}.p1s-chat-top-actions .chat-mini-stat{min-height:32px!important;padding:0 8px!important;font-size:.68rem!important}.p1s-chat-window-button{width:34px!important;height:34px!important}.p1s-chat-tabs{padding:9px 10px!important}.p1s-chat-tab{height:40px!important;font-size:.78rem!important}.p1s-chat-v2 .global-chat-messages{padding:12px 10px 14px!important}.p1s-chat-v2 .chat-avatar{width:36px!important;height:36px!important;flex-basis:36px!important}.p1s-chat-composer{grid-template-columns:38px minmax(0,1fr) 42px!important;padding:9px!important}.p1s-chat-round-action{width:38px!important;height:38px!important}.p1s-chat-v2 .chat-send-button{width:42px!important;height:42px!important;min-width:42px!important}}


/* =============================================================
   P1S 8.12.5 · CHAT V3 — reemplazo visual completo del chat viejo
   Mantiene la identidad visual histórica P1S
   ============================================================= */
#global-chat-dialog.p1s-chat-v2{
  position:fixed!important;right:18px!important;bottom:18px!important;left:auto!important;top:auto!important;inset:auto 18px 18px auto!important;
  width:min(540px,calc(100vw - 36px))!important;max-width:calc(100vw - 36px)!important;
  height:min(82dvh,820px)!important;max-height:min(82dvh,820px)!important;
  margin:0!important;padding:0!important;border-radius:30px!important;overflow:hidden!important;
  border:1px solid rgba(73,255,157,.62)!important;
  background:linear-gradient(180deg,rgba(4,15,11,.99),rgba(4,11,9,.99))!important;
  color:#f1f8f3!important;box-shadow:0 34px 100px rgba(0,0,0,.64),0 0 0 1px rgba(255,255,255,.025) inset,0 0 40px rgba(67,255,138,.12)!important;
  backdrop-filter:blur(24px)!important;z-index:5000!important;
}
#global-chat-dialog.p1s-chat-v2[open]{display:flex!important;flex-direction:column!important}
#global-chat-dialog.p1s-chat-v2::backdrop{background:transparent!important;backdrop-filter:none!important}

/* HEADER */
#global-chat-dialog .p1s-chat-top{
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:18px!important;align-items:start!important;
  padding:22px 22px 18px!important;
  background:radial-gradient(circle at 12% -8%,rgba(48,255,112,.18),transparent 33%),linear-gradient(135deg,#07160e 0%,#0a1d13 56%,#06120d 100%)!important;
  border-bottom:1px solid rgba(131,255,168,.12)!important;
}
#global-chat-dialog .p1s-chat-brand{display:flex!important;align-items:center!important;gap:15px!important;min-width:0!important}
#global-chat-dialog .p1s-chat-logo{
  width:68px!important;height:68px!important;min-width:68px!important;flex:0 0 68px!important;border-radius:21px!important;
  display:grid!important;place-items:center!important;overflow:hidden!important;background:linear-gradient(180deg,#20371b,#101d13)!important;
  border:1px solid rgba(190,255,89,.28)!important;box-shadow:0 12px 30px rgba(0,0,0,.25),0 0 24px rgba(155,255,72,.07)!important;
}
#global-chat-dialog .p1s-chat-logo img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}
#global-chat-dialog .p1s-chat-heading{min-width:0!important}
#global-chat-dialog .p1s-chat-heading .eyebrow{margin:0 0 5px!important;color:#baff4e!important;font-size:.68rem!important;letter-spacing:.18em!important;font-weight:800!important}
#global-chat-dialog .p1s-chat-title-line{display:flex!important;align-items:center!important;gap:9px!important;min-width:0!important}
#global-chat-dialog .p1s-chat-title-line h2{margin:0!important;color:#fff!important;font-size:2.15rem!important;line-height:1.02!important;letter-spacing:-.045em!important;white-space:nowrap!important}
#global-chat-dialog .p1s-chat-live-dot{width:11px!important;height:11px!important;border-radius:50%!important;background:#30ff83!important;box-shadow:0 0 16px rgba(48,255,131,.95)!important}
#global-chat-dialog .p1s-chat-heading #global-chat-status{margin:7px 0 0!important;color:#aebfb4!important;font-size:.92rem!important;line-height:1.35!important;max-width:28ch!important}
#global-chat-dialog .p1s-chat-top-side{display:flex!important;flex-direction:column!important;align-items:flex-end!important;gap:10px!important;min-width:158px!important}
#global-chat-dialog .p1s-chat-window-actions{display:flex!important;gap:10px!important;justify-content:flex-end!important}
#global-chat-dialog .p1s-chat-window-button{
  width:44px!important;height:44px!important;min-width:44px!important;border-radius:15px!important;border:1px solid rgba(255,255,255,.08)!important;
  background:rgba(255,255,255,.05)!important;color:#f1f8f3!important;font-size:26px!important;line-height:1!important;display:grid!important;place-items:center!important;padding:0!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
#global-chat-dialog .p1s-chat-window-button:hover{background:rgba(255,255,255,.09)!important;border-color:rgba(126,255,162,.18)!important}
#global-chat-dialog .p1s-chat-online-pill{
  min-height:42px!important;display:flex!important;align-items:center!important;gap:9px!important;padding:0 13px!important;border-radius:999px!important;
  border:1px solid rgba(255,255,255,.12)!important;background:rgba(2,10,7,.46)!important;color:#f0f8f1!important;font-size:.84rem!important;font-weight:700!important;white-space:nowrap!important;
}
#global-chat-dialog .p1s-chat-online-pill .icon{width:18px!important;height:18px!important;color:#f3fbf4!important}
#global-chat-dialog .p1s-chat-online-pill i{width:9px!important;height:9px!important;border-radius:50%!important;background:#38ff79!important;box-shadow:0 0 12px rgba(56,255,121,.9)!important}
#global-chat-dialog .p1s-chat-gps-stat{display:none!important}

/* TABS */
#global-chat-dialog .p1s-chat-tabs{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;padding:10px 16px!important;background:#06110c!important;border-bottom:1px solid rgba(255,255,255,.065)!important;
}
#global-chat-dialog .p1s-chat-tab{
  height:46px!important;border-radius:14px!important;border:1px solid transparent!important;background:transparent!important;color:#a8b8ad!important;
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;font:inherit!important;font-size:.92rem!important;font-weight:700!important;position:relative!important;
}
#global-chat-dialog .p1s-chat-tab .icon{width:20px!important;height:20px!important}
#global-chat-dialog .p1s-chat-tab.active{color:#dcffd4!important;background:linear-gradient(180deg,rgba(54,255,125,.13),rgba(26,116,58,.13))!important;border-color:rgba(65,255,131,.12)!important}
#global-chat-dialog .p1s-chat-tab.active::after{content:'';position:absolute;left:18px!important;right:18px!important;bottom:-1px!important;height:3px!important;border-radius:999px!important;background:#34ff7f!important;box-shadow:0 0 12px rgba(52,255,127,.55)!important}

/* MAIN PANELS */
#global-chat-dialog .p1s-chat-panel{flex:1 1 auto!important;min-height:0!important;overflow:hidden!important;background:radial-gradient(circle at 75% 18%,rgba(41,255,113,.03),transparent 28%),linear-gradient(180deg,#06100b,#07100c)!important}
#global-chat-dialog .p1s-chat-panel[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-panel.active{display:flex!important;flex-direction:column!important}
#global-chat-dialog .p1s-chat-users-preview{display:flex!important;align-items:center!important;justify-content:flex-end!important;min-height:38px!important;padding:7px 18px 4px!important;color:#84998c!important;font-size:.76rem!important;border:0!important}
#global-chat-dialog .p1s-chat-users-preview #global-chat-online{display:none!important}
#global-chat-dialog .chat-online-faces{display:flex!important;align-items:center!important;justify-content:flex-end!important}
#global-chat-dialog .chat-online-face,#global-chat-dialog .chat-online-more{width:29px!important;height:29px!important;border-radius:50%!important;margin-left:-8px!important;border:2px solid #07110c!important;background:#1a2b21!important;display:grid!important;place-items:center!important;overflow:hidden!important;color:#eef8ef!important;font-size:.68rem!important;font-weight:800!important}
#global-chat-dialog .chat-online-face:first-child{margin-left:0!important}
#global-chat-dialog .chat-face-photo{width:100%!important;height:100%!important;object-fit:cover!important}
#global-chat-dialog .chat-older{align-self:center!important;margin:7px auto 8px!important;padding:8px 14px!important;border-radius:999px!important;border:0!important;background:rgba(255,255,255,.055)!important;color:#aabbb0!important;font-size:.72rem!important;text-decoration:none!important;font-weight:600!important}
#global-chat-dialog .global-chat-messages{flex:1 1 auto!important;min-height:0!important;overflow:auto!important;padding:12px 18px 18px!important;background:transparent!important;scrollbar-width:thin!important;scrollbar-color:#20412c transparent!important}

/* MESSAGE LAYOUT LIKE MOCKUP */
#global-chat-dialog .chat-message{display:flex!important;align-items:flex-end!important;gap:10px!important;margin:0 0 16px!important;width:100%!important}
#global-chat-dialog .chat-avatar{width:42px!important;height:42px!important;min-width:42px!important;flex:0 0 42px!important;border-radius:50%!important;display:grid!important;place-items:center!important;overflow:hidden!important;background:#203129!important;border:1px solid rgba(255,255,255,.06)!important;color:#f0f8f2!important}
#global-chat-dialog .chat-photo{width:100%!important;height:100%!important;object-fit:cover!important}
#global-chat-dialog .chat-message-content{max-width:76%!important;min-width:0!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;color:#f1f7f2!important}
#global-chat-dialog .chat-message-heading{display:flex!important;align-items:baseline!important;justify-content:flex-start!important;gap:10px!important;margin:0 0 6px!important}
#global-chat-dialog .chat-message-heading strong{font-size:.91rem!important;line-height:1.2!important;color:#fff!important}
#global-chat-dialog .chat-message time{font-size:.72rem!important;color:#768a7d!important;white-space:nowrap!important}
#global-chat-dialog .chat-message-content>small{display:none!important}
#global-chat-dialog .chat-message p{display:block!important;width:fit-content!important;max-width:100%!important;margin:0!important;padding:11px 14px!important;border-radius:18px 18px 18px 7px!important;background:linear-gradient(180deg,#1a2720,#151f1a)!important;border:1px solid rgba(255,255,255,.055)!important;color:#f2f7f3!important;font-size:.93rem!important;line-height:1.48!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;box-shadow:0 8px 22px rgba(0,0,0,.14)!important}
#global-chat-dialog .chat-message.chat-me{justify-content:flex-end!important;flex-direction:row!important}
#global-chat-dialog .chat-message.chat-me .chat-avatar{display:none!important}
#global-chat-dialog .chat-message.chat-me .chat-message-content{display:flex!important;flex-direction:column!important;align-items:flex-end!important;max-width:78%!important}
#global-chat-dialog .chat-message.chat-me .chat-message-heading{justify-content:flex-end!important;margin-right:2px!important}
#global-chat-dialog .chat-message.chat-me .chat-message-heading strong{font-weight:750!important}
#global-chat-dialog .chat-message.chat-me p{border-radius:18px 18px 7px 18px!important;background:linear-gradient(180deg,#087444,#075b37)!important;border-color:rgba(63,255,141,.20)!important;color:#fff!important;box-shadow:0 9px 24px rgba(0,80,45,.22)!important}
#global-chat-dialog .chat-message.chat-pending{opacity:.74!important}
#global-chat-dialog .chat-empty{margin:auto!important;padding:44px 20px!important;color:#718678!important;text-align:center!important}

/* USERS / FILES */
#global-chat-dialog .p1s-chat-section-head{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:18px!important;border-bottom:1px solid rgba(255,255,255,.055)!important;color:#edf7ef!important}
#global-chat-dialog .p1s-chat-section-head span{color:#788c7f!important;font-size:.76rem!important}
#global-chat-dialog .p1s-chat-people{padding:8px 16px 20px!important;overflow:auto!important}
#global-chat-dialog .chat-person{display:flex!important;align-items:center!important;gap:12px!important;padding:11px 8px!important;border-bottom:1px solid rgba(255,255,255,.045)!important}
#global-chat-dialog .chat-person .chat-avatar{width:44px!important;height:44px!important;flex-basis:44px!important}
#global-chat-dialog .chat-person strong{color:#f1f7f2!important}
#global-chat-dialog .chat-person small{color:#7e9385!important}
#global-chat-dialog .p1s-chat-empty-files{margin:auto!important;max-width:330px!important;padding:30px 22px!important;text-align:center!important;color:#778c80!important}
#global-chat-dialog .p1s-chat-empty-files .icon{width:32px!important;height:32px!important;margin:0 auto 12px!important;color:#8ca292!important}
#global-chat-dialog .p1s-chat-empty-files strong{display:block!important;color:#e5efe7!important;margin-bottom:7px!important}

/* COMPOSER */
#global-chat-dialog .p1s-chat-composer{display:grid!important;grid-template-columns:44px minmax(0,1fr) 48px!important;grid-template-rows:auto auto!important;gap:8px 10px!important;align-items:end!important;padding:13px 16px max(13px,env(safe-area-inset-bottom))!important;background:linear-gradient(180deg,#06100b,#06100b)!important;border-top:1px solid rgba(255,255,255,.07)!important}
#global-chat-dialog .p1s-chat-round-action{width:44px!important;height:44px!important;border-radius:50%!important;border:1px solid rgba(255,255,255,.065)!important;background:#15231b!important;color:#e3ede5!important;display:grid!important;place-items:center!important}
#global-chat-dialog .p1s-chat-round-action .icon{width:20px!important;height:20px!important}
#global-chat-dialog .p1s-chat-input-wrap{display:flex!important;align-items:flex-end!important;gap:7px!important;min-height:48px!important;padding:5px 7px 5px 14px!important;border:1px solid rgba(117,255,156,.16)!important;border-radius:20px!important;background:#0a1710!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.02)!important}
#global-chat-dialog #global-chat-text{flex:1 1 auto!important;min-width:0!important;height:38px!important;min-height:38px!important;max-height:108px!important;padding:10px 0 8px!important;border:0!important;background:transparent!important;color:#eef8f0!important;resize:none!important;outline:none!important;font-size:.9rem!important;line-height:1.36!important}
#global-chat-dialog #global-chat-text::placeholder{color:#74897c!important}
#global-chat-dialog .p1s-chat-emoji{width:36px!important;height:36px!important;min-width:36px!important;border:0!important;border-radius:50%!important;background:transparent!important;color:#c6d5ca!important;font-size:21px!important;display:grid!important;place-items:center!important}
#global-chat-dialog .chat-send-button{width:48px!important;height:48px!important;min-width:48px!important;border-radius:15px!important;border:0!important;background:linear-gradient(180deg,#baff4e,#79eb38)!important;color:#11220e!important;display:grid!important;place-items:center!important;box-shadow:0 12px 27px rgba(143,238,55,.24),0 0 20px rgba(144,255,63,.08)!important}
#global-chat-dialog .chat-send-button .icon{width:21px!important;height:21px!important}
#global-chat-dialog .chat-compose-hint{grid-column:2/4!important;padding-left:7px!important;color:#687c70!important;font-size:.66rem!important;line-height:1.25!important}

/* LIGHT THEME — same structure */
.light-mode #global-chat-dialog.p1s-chat-v2{background:#f8faf6!important;color:#263429!important;border-color:#cfe0cb!important;box-shadow:0 26px 76px rgba(31,43,34,.20)!important}
.light-mode #global-chat-dialog .p1s-chat-top{background:linear-gradient(135deg,#233328,#1f3025)!important}
.light-mode #global-chat-dialog .p1s-chat-tabs{background:#f3f7f0!important;border-color:#dde6d9!important}
.light-mode #global-chat-dialog .p1s-chat-tab{color:#6a786c!important}
.light-mode #global-chat-dialog .p1s-chat-tab.active{color:#245b2f!important;background:#e7f4e2!important}
.light-mode #global-chat-dialog .p1s-chat-panel{background:#f8faf6!important}
.light-mode #global-chat-dialog .chat-older{background:#edf3e9!important;color:#52644f!important}
.light-mode #global-chat-dialog .chat-message p{background:#eef2ef!important;color:#263429!important;border-color:#dde5dc!important}
.light-mode #global-chat-dialog .chat-message-heading strong{color:#263429!important}
.light-mode #global-chat-dialog .chat-message.chat-me p{background:linear-gradient(180deg,#d5f2d0,#c4e9bd)!important;color:#18381e!important;border-color:#b1dcaa!important}
.light-mode #global-chat-dialog .p1s-chat-composer{background:#f8faf6!important;border-color:#dce5d8!important}
.light-mode #global-chat-dialog .p1s-chat-input-wrap{background:#fff!important;border-color:#d3dfcf!important}
.light-mode #global-chat-dialog #global-chat-text{color:#263429!important}
.light-mode #global-chat-dialog #global-chat-text::placeholder{color:#849184!important}
.light-mode #global-chat-dialog .p1s-chat-round-action{background:#eef3ea!important;color:#536452!important;border-color:#dbe4d7!important}
.light-mode #global-chat-dialog .p1s-chat-section-head{color:#263429!important;border-color:#dfe6dc!important}
.light-mode #global-chat-dialog .chat-person{border-color:#e3e9e0!important}
.light-mode #global-chat-dialog .chat-person strong{color:#263429!important}

/* MOBILE */
@media(max-width:700px){
  #global-chat-dialog.p1s-chat-v2{right:7px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important;inset:auto 7px calc(78px + env(safe-area-inset-bottom)) auto!important;width:calc(100vw - 14px)!important;max-width:calc(100vw - 14px)!important;height:min(76dvh,680px)!important;max-height:min(76dvh,680px)!important;border-radius:24px!important}
  #global-chat-dialog .p1s-chat-top{grid-template-columns:minmax(0,1fr) auto!important;padding:16px 14px 13px!important;gap:10px!important}
  #global-chat-dialog .p1s-chat-brand{gap:10px!important}
  #global-chat-dialog .p1s-chat-logo{width:52px!important;height:52px!important;min-width:52px!important;flex-basis:52px!important;border-radius:17px!important}
  #global-chat-dialog .p1s-chat-heading .eyebrow{font-size:.58rem!important;letter-spacing:.14em!important}
  #global-chat-dialog .p1s-chat-title-line h2{font-size:1.55rem!important;white-space:normal!important}
  #global-chat-dialog .p1s-chat-heading #global-chat-status{font-size:.74rem!important;line-height:1.25!important;max-width:22ch!important}
  #global-chat-dialog .p1s-chat-top-side{min-width:auto!important;gap:7px!important}
  #global-chat-dialog .p1s-chat-window-actions{gap:7px!important}
  #global-chat-dialog .p1s-chat-window-button{width:34px!important;height:34px!important;min-width:34px!important;border-radius:11px!important;font-size:22px!important}
  #global-chat-dialog .p1s-chat-online-pill{min-height:32px!important;padding:0 8px!important;gap:6px!important;font-size:.66rem!important}
  #global-chat-dialog .p1s-chat-online-pill .icon{display:none!important}
  #global-chat-dialog .p1s-chat-tabs{padding:8px 9px!important;gap:5px!important}
  #global-chat-dialog .p1s-chat-tab{height:39px!important;font-size:.76rem!important;gap:6px!important}
  #global-chat-dialog .p1s-chat-tab .icon{width:17px!important;height:17px!important}
  #global-chat-dialog .p1s-chat-users-preview{padding:6px 12px 2px!important;min-height:31px!important}
  #global-chat-dialog .global-chat-messages{padding:10px 10px 14px!important}
  #global-chat-dialog .chat-message{gap:8px!important;margin-bottom:13px!important}
  #global-chat-dialog .chat-avatar{width:36px!important;height:36px!important;min-width:36px!important;flex-basis:36px!important}
  #global-chat-dialog .chat-message-content{max-width:80%!important}
  #global-chat-dialog .chat-message.chat-me .chat-message-content{max-width:82%!important}
  #global-chat-dialog .chat-message-heading{gap:7px!important;margin-bottom:5px!important}
  #global-chat-dialog .chat-message-heading strong{font-size:.82rem!important}
  #global-chat-dialog .chat-message time{font-size:.65rem!important}
  #global-chat-dialog .chat-message p{font-size:.86rem!important;padding:10px 12px!important}
  #global-chat-dialog .p1s-chat-composer{grid-template-columns:39px minmax(0,1fr) 44px!important;padding:9px!important;gap:7px!important}
  #global-chat-dialog .p1s-chat-round-action{width:39px!important;height:39px!important}
  #global-chat-dialog .p1s-chat-input-wrap{min-height:43px!important;border-radius:18px!important;padding-left:11px!important}
  #global-chat-dialog #global-chat-text{height:35px!important;min-height:35px!important;font-size:.84rem!important}
  #global-chat-dialog .p1s-chat-emoji{width:32px!important;height:32px!important;min-width:32px!important;font-size:19px!important}
  #global-chat-dialog .chat-send-button{width:44px!important;height:44px!important;min-width:44px!important;border-radius:14px!important}
  #global-chat-dialog .chat-compose-hint{font-size:.59rem!important;padding-left:4px!important}
}


/* P1S 8.12.6 · chat limpio, avatars visibles, sin adjuntos ni botón de envío */
#global-chat-dialog .p1s-chat-tabs{grid-template-columns:repeat(2,minmax(0,1fr))!important}
#global-chat-dialog .p1s-chat-tab{max-width:none!important}
#global-chat-dialog .p1s-chat-composer{display:block!important;padding:12px 14px max(12px,env(safe-area-inset-bottom))!important}
#global-chat-dialog .p1s-chat-input-wrap{display:flex!important;align-items:center!important;width:100%!important;min-height:48px!important;padding:5px 8px 5px 14px!important;border-radius:22px!important}
#global-chat-dialog #global-chat-text{display:block!important;width:100%!important;min-width:0!important;height:40px!important;min-height:40px!important;max-height:40px!important;padding:9px 0!important;border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;font:inherit!important;font-size:.94rem!important;line-height:1.3!important}
#global-chat-dialog #global-chat-send{display:none!important}
#global-chat-dialog .chat-compose-hint{display:block!important;margin:6px 0 0!important;padding:0 4px!important;font-size:.67rem!important;line-height:1.35!important;text-align:left!important}
#global-chat-dialog .p1s-chat-emoji{width:34px!important;height:34px!important;min-width:34px!important;flex:0 0 34px!important}
#global-chat-dialog .chat-message{display:flex!important;align-items:flex-end!important;gap:10px!important}
#global-chat-dialog .chat-message .chat-avatar{display:flex!important;width:40px!important;height:40px!important;min-width:40px!important;flex:0 0 40px!important;border-radius:50%!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;font-weight:800!important;font-size:.95rem!important;background:linear-gradient(180deg,#173228,#10241c)!important;color:#dffbe7!important;border:1px solid rgba(109,255,151,.15)!important}
#global-chat-dialog .chat-message .chat-avatar.chat-avatar-initial{background:linear-gradient(145deg,#244238,#173029)!important;color:#effff3!important}
#global-chat-dialog .chat-message .chat-photo{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
#global-chat-dialog .chat-message.chat-me{display:flex!important;flex-direction:row!important;justify-content:flex-end!important}
#global-chat-dialog .chat-message.chat-me .chat-message-content{order:1!important;max-width:calc(100% - 52px)!important}
#global-chat-dialog .chat-message.chat-me .chat-avatar{display:flex!important;order:2!important;background:linear-gradient(145deg,#275541,#173e2e)!important}
#global-chat-dialog .chat-message:not(.chat-me) .chat-message-content{order:2!important;max-width:calc(100% - 52px)!important}
#global-chat-dialog .chat-message:not(.chat-me) .chat-avatar{order:1!important}
#global-chat-dialog .chat-message-content{min-width:0!important;overflow-wrap:anywhere!important}
#global-chat-dialog .chat-message p{white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important}
#global-chat-dialog #global-chat-close::before{content:none!important;display:none!important}
#global-chat-dialog #global-chat-close{font-size:26px!important;line-height:1!important}
#global-chat-dialog #global-chat-minimize{font-size:25px!important;line-height:1!important}
@media(max-width:700px){
 #global-chat-dialog .p1s-chat-composer{padding:10px!important;padding-bottom:max(10px,env(safe-area-inset-bottom))!important}
 #global-chat-dialog .p1s-chat-input-wrap{min-height:46px!important;border-radius:20px!important;padding-left:12px!important}
 #global-chat-dialog #global-chat-text{height:38px!important;min-height:38px!important;max-height:38px!important;font-size:14px!important}
 #global-chat-dialog .chat-message .chat-avatar{width:36px!important;height:36px!important;min-width:36px!important;flex-basis:36px!important}
 #global-chat-dialog .chat-message.chat-me .chat-message-content,#global-chat-dialog .chat-message:not(.chat-me) .chat-message-content{max-width:calc(100% - 46px)!important}
 #global-chat-dialog .chat-compose-hint{font-size:.62rem!important}
}


/* P1S v8.12.8 · fix visual de burbujas del chat */
#global-chat-dialog .global-chat-messages{padding:14px 14px 18px!important;}
#global-chat-dialog .chat-message{display:flex!important;align-items:flex-end!important;gap:10px!important;margin:0 0 14px!important;width:100%!important;}
#global-chat-dialog .chat-message .chat-avatar{width:40px!important;height:40px!important;min-width:40px!important;flex:0 0 40px!important;border-radius:50%!important;overflow:hidden!important;display:flex!important;align-items:center!important;justify-content:center!important;}
#global-chat-dialog .chat-message-content{display:flex!important;flex-direction:column!important;gap:7px!important;max-width:min(84%,320px)!important;min-width:0!important;padding:11px 13px!important;border-radius:18px!important;background:linear-gradient(180deg,#18250d 0%,#111a15 100%)!important;border:1px solid rgba(255,255,255,.06)!important;box-shadow:0 10px 24px rgba(0,0,0,.15)!important;color:#eff8f0!important;overflow:hidden!important;}
#global-chat-dialog .chat-message-heading{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin:0!important;flex-wrap:wrap!important;}
#global-chat-dialog .chat-message-heading strong{display:block!important;flex:1 1 auto!important;min-width:0!important;font-size:.88rem!important;line-height:1.2!important;color:#ffffff!important;white-space:normal!important;overflow-wrap:anywhere!important;}
#global-chat-dialog .chat-message time{display:block!important;flex:0 0 auto!important;font-size:.72rem!important;line-height:1!important;color:#9cb1a3!important;white-space:nowrap!important;}
#global-chat-dialog .chat-message-content>small{display:block!important;margin:0!important;font-size:.72rem!important;line-height:1.25!important;color:#86a08f!important;white-space:normal!important;overflow-wrap:anywhere!important;}
#global-chat-dialog .chat-message p{display:block!important;width:auto!important;max-width:100%!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;color:inherit!important;font-size:.95rem!important;line-height:1.5!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
#global-chat-dialog .chat-message.chat-me{justify-content:flex-end!important;}
#global-chat-dialog .chat-message.chat-me .chat-message-content{order:1!important;align-items:flex-start!important;max-width:min(84%,320px)!important;background:linear-gradient(180deg,#166943 0%,#115234 100%)!important;border-color:rgba(119,255,179,.16)!important;color:#ffffff!important;}
#global-chat-dialog .chat-message.chat-me .chat-avatar{order:2!important;background:linear-gradient(145deg,#275541,#173e2e)!important;}
#global-chat-dialog .chat-message.chat-me .chat-message-heading strong,
#global-chat-dialog .chat-message.chat-me p{color:#ffffff!important;}
#global-chat-dialog .chat-message.chat-me .chat-message-content>small,
#global-chat-dialog .chat-message.chat-me .chat-message time{color:#d7efe0!important;}
#global-chat-dialog .chat-message:not(.chat-me) .chat-message-content{order:2!important;}
#global-chat-dialog .chat-message:not(.chat-me) .chat-avatar{order:1!important;}
.light-mode #global-chat-dialog .chat-message-content{background:#ffffff!important;border-color:#dce6db!important;color:#263428!important;box-shadow:0 10px 24px rgba(26,39,29,.08)!important;}
.light-mode #global-chat-dialog .chat-message-heading strong{color:#263428!important;}
.light-mode #global-chat-dialog .chat-message p{color:#263428!important;}
.light-mode #global-chat-dialog .chat-message time{color:#7b8d7d!important;}
.light-mode #global-chat-dialog .chat-message-content>small{color:#70826f!important;}
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content{background:linear-gradient(180deg,#d8f2d2 0%,#c7e8bf 100%)!important;border-color:#b8d8b2!important;color:#1f3724!important;}
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-heading strong,
.light-mode #global-chat-dialog .chat-message.chat-me p{color:#1f3724!important;}
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content>small,
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message time{color:#4f6a55!important;}
@media(max-width:700px){
  #global-chat-dialog .global-chat-messages{padding:12px 10px 16px!important;}
  #global-chat-dialog .chat-message{gap:8px!important;margin-bottom:12px!important;}
  #global-chat-dialog .chat-message .chat-avatar{width:36px!important;height:36px!important;min-width:36px!important;flex-basis:36px!important;}
  #global-chat-dialog .chat-message-content,
  #global-chat-dialog .chat-message.chat-me .chat-message-content{max-width:calc(100% - 44px)!important;padding:10px 12px!important;border-radius:16px!important;}
  #global-chat-dialog .chat-message-heading strong{font-size:.84rem!important;}
  #global-chat-dialog .chat-message time{font-size:.67rem!important;}
  #global-chat-dialog .chat-message-content>small{font-size:.69rem!important;}
  #global-chat-dialog .chat-message p{font-size:.9rem!important;}
}


/* P1S v8.12.8 · una sola burbuja + imágenes en chat */
#global-chat-dialog .chat-message-content{
  display:flex!important;flex-direction:column!important;gap:7px!important;
  max-width:min(82%,340px)!important;min-width:112px!important;
  padding:11px 13px!important;border-radius:18px!important;
  background:linear-gradient(180deg,#18250d 0%,#111a15 100%)!important;
  border:1px solid rgba(255,255,255,.06)!important;
  box-shadow:0 9px 22px rgba(0,0,0,.14)!important;color:#eff8f0!important;
}
#global-chat-dialog .chat-message.chat-me .chat-message-content{
  background:linear-gradient(180deg,#166943 0%,#115234 100%)!important;
  border-color:rgba(119,255,179,.16)!important;color:#fff!important;
}
/* El texto ya no es una segunda burbuja. */
#global-chat-dialog .chat-message p{display:none!important;background:none!important;border:0!important;box-shadow:none!important;padding:0!important}
#global-chat-dialog .chat-message-text{
  display:block!important;margin:0!important;padding:0!important;background:transparent!important;
  border:0!important;box-shadow:none!important;border-radius:0!important;
  color:inherit!important;font-size:.95rem!important;line-height:1.48!important;
  white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important;
}
#global-chat-dialog .chat-message-media{display:block!important;width:100%!important;margin:1px 0 2px!important;overflow:hidden!important;border-radius:13px!important;background:#0a120d!important}
#global-chat-dialog .chat-message-image{display:block!important;width:100%!important;max-width:300px!important;max-height:300px!important;aspect-ratio:auto!important;object-fit:cover!important;border-radius:13px!important;background:#0a120d!important}
#global-chat-dialog .p1s-chat-input-wrap{gap:7px!important;padding-left:7px!important}
#global-chat-dialog .p1s-chat-image-button{
  width:34px!important;height:34px!important;min-width:34px!important;flex:0 0 34px!important;
  display:grid!important;place-items:center!important;border:0!important;border-radius:50%!important;
  background:transparent!important;color:#8fa79a!important;cursor:pointer!important;
}
#global-chat-dialog .p1s-chat-image-button:hover{background:rgba(123,255,159,.08)!important;color:#c8f8d4!important}
#global-chat-dialog .p1s-chat-image-button:disabled{opacity:.45!important;cursor:wait!important}
#global-chat-dialog .p1s-chat-image-button .icon{width:19px!important;height:19px!important}
.light-mode #global-chat-dialog .chat-message-content{background:#fff!important;border-color:#dce6db!important;color:#263428!important}
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content{background:linear-gradient(180deg,#d8f2d2 0%,#c7e8bf 100%)!important;border-color:#b8d8b2!important;color:#1f3724!important}
.light-mode #global-chat-dialog .chat-message-media,.light-mode #global-chat-dialog .chat-message-image{background:#edf2ec!important}
.light-mode #global-chat-dialog .p1s-chat-image-button{color:#647567!important}
@media(max-width:700px){
  #global-chat-dialog .chat-message-content,#global-chat-dialog .chat-message.chat-me .chat-message-content{max-width:calc(100% - 44px)!important;min-width:96px!important;padding:10px 12px!important}
  #global-chat-dialog .chat-message-text{font-size:.9rem!important}
  #global-chat-dialog .chat-message-image{max-width:240px!important;max-height:260px!important}
  #global-chat-dialog .p1s-chat-image-button{width:32px!important;height:32px!important;min-width:32px!important;flex-basis:32px!important}
}

/* P1S v8.13.0 · Chat de Operaciones: selección, emojis, alertas y borrado */
.p1s-chat-selection-shell{padding:8px 12px;background:rgba(8,18,12,.98);border-bottom:1px solid rgba(255,255,255,.06)}
.p1s-chat-select-toggle,.p1s-chat-selection-bar button{border:1px solid rgba(111,255,139,.16);background:#0d1a12;color:#dff6e4;border-radius:12px;padding:8px 11px;font:inherit;font-size:.78rem;cursor:pointer}
.p1s-chat-select-toggle{width:100%;background:transparent;color:#91a997;border-style:dashed}
.p1s-chat-selection-bar{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.p1s-chat-selection-bar[hidden]{display:none!important}
.p1s-chat-selection-bar strong{margin-right:auto;font-size:.78rem;color:#ecf8ee}
.p1s-chat-selection-bar button:disabled{opacity:.38;cursor:not-allowed}
#chat-delete-all:not(:disabled){border-color:rgba(255,105,105,.28);color:#ffd0d0}
#chat-delete-me{color:#d7e9ff}
#chat-selection-cancel{color:#a9b8ac}
.chat-select-check{width:24px;height:24px;min-width:24px;flex:0 0 24px;border-radius:50%;border:1px solid rgba(113,255,145,.32);background:#0d1a12;color:#07110b;display:grid;place-items:center;font-weight:900;cursor:pointer;padding:0}
.chat-select-check.selected{background:#b9ff4f;border-color:#d8ff84;box-shadow:0 0 14px rgba(185,255,79,.22)}
#global-chat-dialog .chat-message.chat-selected .chat-message-content{outline:2px solid rgba(183,255,81,.42);outline-offset:2px}
#global-chat-dialog .chat-message-text{display:block!important;width:auto!important;max-width:100%!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:inherit!important;font-size:.95rem!important;line-height:1.5!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important}
#global-chat-dialog .chat-message-media{margin:2px 0 0!important;border-radius:14px!important;overflow:hidden!important;background:transparent!important}
#global-chat-dialog .chat-message-image{display:block!important;width:auto!important;max-width:100%!important;max-height:320px!important;object-fit:contain!important;border-radius:14px!important;background:#050a07!important}
#global-chat-dialog .chat-stop .chat-message-content{border-color:rgba(255,194,70,.25)!important;background:linear-gradient(180deg,#322810,#241d0c)!important}
#global-chat-dialog .chat-sos .chat-message-content{border-color:rgba(255,85,85,.34)!important;background:linear-gradient(180deg,#351313,#250e0e)!important}
#global-chat-dialog .chat-event .chat-message-content{border-color:rgba(92,211,255,.22)!important}
#global-chat-dialog .chat-geofence .chat-message-content{border-color:rgba(187,255,88,.24)!important}
.p1s-chat-emoji-picker{position:absolute;left:14px;right:14px;bottom:78px;z-index:20;max-height:210px;overflow:auto;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:5px;padding:10px;border:1px solid rgba(102,255,139,.2);border-radius:18px;background:rgba(6,15,10,.98);box-shadow:0 18px 50px rgba(0,0,0,.45);backdrop-filter:blur(18px)}
.p1s-chat-emoji-picker[hidden]{display:none!important}
.p1s-emoji-choice{height:36px;border:0;border-radius:9px;background:transparent;font-size:1.35rem;cursor:pointer;display:grid;place-items:center}
.p1s-emoji-choice:hover,.p1s-emoji-choice:focus{background:rgba(120,255,143,.10);outline:none}
.p1s-chat-emoji{cursor:pointer}
.light-mode .p1s-chat-selection-shell{background:#f4f7f1;border-color:#dce5d8}
.light-mode .p1s-chat-select-toggle,.light-mode .p1s-chat-selection-bar button{background:#fff;color:#445445;border-color:#d4e1d1}
.light-mode .p1s-chat-selection-bar strong{color:#253326}
.light-mode .chat-select-check{background:#fff;color:#17321c;border-color:#9dcca4}
.light-mode #global-chat-dialog .chat-stop .chat-message-content{background:#fff6df!important;color:#3e341b!important;border-color:#ecd79a!important}
.light-mode #global-chat-dialog .chat-sos .chat-message-content{background:#fff0ef!important;color:#532321!important;border-color:#eab8b4!important}
.light-mode .p1s-chat-emoji-picker{background:rgba(255,255,255,.98);border-color:#d5e2d2;box-shadow:0 18px 45px rgba(31,48,34,.18)}
.light-mode .p1s-emoji-choice:hover,.light-mode .p1s-emoji-choice:focus{background:#edf5e9}
@media(max-width:700px){
 .p1s-chat-selection-shell{padding:7px 9px}
 .p1s-chat-selection-bar{gap:5px}
 .p1s-chat-selection-bar strong{width:100%;margin:0 0 2px}
 .p1s-chat-selection-bar button{padding:7px 8px;font-size:.7rem}
 .chat-select-check{width:22px;height:22px;min-width:22px;flex-basis:22px}
 .p1s-chat-emoji-picker{left:8px;right:8px;bottom:72px;grid-template-columns:repeat(7,minmax(0,1fr));max-height:190px}
 #global-chat-dialog .chat-message-image{max-height:260px!important}
}

#global-chat-form{position:relative!important;}


/* P1S v8.13.0 · selección de grupo en Exportación general */
.general-export-scope-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:end;margin-bottom:6px}.general-export-scope-grid>div{min-width:0}.general-export-scope-grid label{display:block;margin-bottom:7px;font-size:.8rem;font-weight:650}.general-export-scope-grid select{width:100%;min-width:0}.general-export-dialog #general-export-scope-help{margin:0 0 12px;color:#7b8878;font-size:.7rem;line-height:1.45}.light-mode .general-export-dialog #general-export-scope-help{color:#758273}@media(max-width:620px){.general-export-scope-grid{grid-template-columns:1fr;gap:8px}}


/* P1S v8.13.2 · panel visible de emojis + opciones de mensaje */
#global-chat-dialog .p1s-chat-selection-shell{display:block!important;padding:9px 12px!important;background:rgba(7,16,11,.98)!important;border-bottom:1px solid rgba(255,255,255,.07)!important}
#global-chat-dialog .p1s-chat-tools-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
#global-chat-dialog .p1s-chat-tool-button{min-height:40px!important;border-radius:13px!important;border:1px solid rgba(104,255,140,.16)!important;background:#0c1811!important;color:#dff4e4!important;font:inherit!important;font-size:.82rem!important;font-weight:650!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;cursor:pointer!important}
#global-chat-dialog .p1s-chat-tool-button.emoji{border-color:rgba(190,255,90,.24)!important;color:#edffd5!important}
#global-chat-dialog .p1s-chat-tool-button.select.active{background:linear-gradient(180deg,#1f5a36,#17462b)!important;border-color:#56e47b!important;color:#fff!important}
#global-chat-dialog .p1s-chat-selection-bar{margin-top:8px!important;padding:9px!important;border-radius:14px!important;background:#0a1510!important;border:1px solid rgba(255,255,255,.06)!important}
#global-chat-dialog .p1s-chat-selection-bar strong{width:100%!important;margin:0 0 3px!important;color:#f0f8f1!important}
#global-chat-dialog .p1s-chat-selection-bar button{min-height:36px!important;padding:7px 10px!important;border-radius:11px!important}
#global-chat-dialog .p1s-chat-emoji-picker{position:absolute!important;left:12px!important;right:12px!important;bottom:76px!important;z-index:80!important;max-height:min(44vh,330px)!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;padding:0!important;border:1px solid rgba(117,255,151,.24)!important;border-radius:20px!important;background:rgba(5,13,8,.985)!important;box-shadow:0 24px 70px rgba(0,0,0,.58),0 0 0 1px rgba(255,255,255,.03) inset!important;backdrop-filter:blur(20px)!important}
#global-chat-dialog .p1s-chat-emoji-picker[hidden]{display:none!important}
#global-chat-dialog .p1s-emoji-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center!important;gap:10px!important;padding:12px 14px!important;border-bottom:1px solid rgba(255,255,255,.07)!important;background:#0b1810!important;color:#eff8f0!important}
#global-chat-dialog .p1s-emoji-head strong{font-size:.92rem!important}
#global-chat-dialog .p1s-emoji-head span{font-size:.7rem!important;color:#8fa493!important}
#global-chat-dialog .p1s-emoji-head button{width:32px!important;height:32px!important;border-radius:10px!important;border:1px solid rgba(255,255,255,.08)!important;background:#101f16!important;color:#ecf6ee!important;font-size:1.25rem!important;cursor:pointer!important}
#global-chat-dialog .p1s-emoji-grid{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:5px!important;padding:10px!important;overflow:auto!important;overscroll-behavior:contain!important}
#global-chat-dialog .p1s-emoji-choice{height:39px!important;min-width:0!important;border-radius:10px!important;background:transparent!important;font-size:1.42rem!important}
#global-chat-dialog .p1s-emoji-choice:hover,#global-chat-dialog .p1s-emoji-choice:focus{background:rgba(119,255,150,.11)!important}
#global-chat-dialog .chat-message{position:relative!important;padding-right:30px!important}
#global-chat-dialog .chat-message.chat-me{padding-left:30px!important;padding-right:0!important}
#global-chat-dialog .chat-message-actions{position:relative!important;align-self:center!important;flex:0 0 26px!important;z-index:12!important}
#global-chat-dialog .chat-message.chat-me .chat-message-actions{order:0!important}
#global-chat-dialog .chat-message-menu-toggle{width:28px!important;height:28px!important;min-width:28px!important;border-radius:50%!important;border:1px solid transparent!important;background:transparent!important;color:#819889!important;font-size:20px!important;line-height:1!important;display:grid!important;place-items:center!important;cursor:pointer!important;padding:0!important}
#global-chat-dialog .chat-message-menu-toggle:hover,#global-chat-dialog .chat-message-menu-toggle[aria-expanded="true"]{background:rgba(255,255,255,.06)!important;border-color:rgba(255,255,255,.06)!important;color:#e9f7ed!important}
#global-chat-dialog .chat-message-menu{position:absolute!important;top:32px!important;right:0!important;width:180px!important;padding:6px!important;border-radius:14px!important;background:#0b1710!important;border:1px solid rgba(108,255,139,.18)!important;box-shadow:0 18px 50px rgba(0,0,0,.48)!important;display:grid!important;gap:4px!important;z-index:100!important}
#global-chat-dialog .chat-message.chat-me .chat-message-menu{right:auto!important;left:0!important}
#global-chat-dialog .chat-message-menu button{width:100%!important;text-align:left!important;border:0!important;border-radius:10px!important;padding:9px 10px!important;background:transparent!important;color:#e6f2e8!important;font:inherit!important;font-size:.78rem!important;cursor:pointer!important}
#global-chat-dialog .chat-message-menu button:hover{background:rgba(111,255,139,.08)!important}
#global-chat-dialog .chat-message-menu button.danger{color:#ffb9b9!important}
.light-mode #global-chat-dialog .p1s-chat-selection-shell{background:#f5f8f2!important;border-color:#dce5d8!important}
.light-mode #global-chat-dialog .p1s-chat-tool-button{background:#fff!important;color:#415344!important;border-color:#d3e1d0!important}
.light-mode #global-chat-dialog .p1s-chat-tool-button.emoji{color:#3d563d!important}
.light-mode #global-chat-dialog .p1s-chat-selection-bar{background:#fff!important;border-color:#dce5d8!important}
.light-mode #global-chat-dialog .p1s-chat-selection-bar strong{color:#253326!important}
.light-mode #global-chat-dialog .p1s-chat-emoji-picker{background:rgba(255,255,255,.99)!important;border-color:#d4e2d1!important;box-shadow:0 24px 65px rgba(31,48,34,.22)!important}
.light-mode #global-chat-dialog .p1s-emoji-head{background:#f6f9f4!important;color:#263428!important;border-color:#dfe7dc!important}
.light-mode #global-chat-dialog .p1s-emoji-head button{background:#fff!important;color:#354639!important;border-color:#d8e3d5!important}
.light-mode #global-chat-dialog .chat-message-menu{background:#fff!important;border-color:#d6e2d4!important;box-shadow:0 16px 42px rgba(31,48,34,.18)!important}
.light-mode #global-chat-dialog .chat-message-menu button{color:#324336!important}
.light-mode #global-chat-dialog .chat-message-menu button.danger{color:#a94343!important}
.light-mode #global-chat-dialog .chat-message-menu-toggle{color:#708171!important}
@media(max-width:700px){
 #global-chat-dialog .p1s-chat-selection-shell{padding:8px!important}
 #global-chat-dialog .p1s-chat-tool-button{min-height:38px!important;font-size:.76rem!important}
 #global-chat-dialog .p1s-chat-emoji-picker{left:8px!important;right:8px!important;bottom:70px!important;max-height:43vh!important;border-radius:18px!important}
 #global-chat-dialog .p1s-emoji-grid{grid-template-columns:repeat(7,minmax(0,1fr))!important;padding:8px!important}
 #global-chat-dialog .p1s-emoji-choice{height:38px!important;font-size:1.35rem!important}
 #global-chat-dialog .chat-message{padding-right:24px!important}
 #global-chat-dialog .chat-message.chat-me{padding-left:24px!important;padding-right:0!important}
 #global-chat-dialog .chat-message-actions{flex-basis:24px!important}
 #global-chat-dialog .chat-message-menu-toggle{width:26px!important;height:26px!important;min-width:26px!important}
 #global-chat-dialog .chat-message-menu{width:168px!important}
}


/* P1S v8.13.5 · Traccar activos + fotos de perfil en Chat de Operaciones */
#global-chat-dialog .p1s-chat-users-preview{justify-content:space-between!important;gap:12px!important;}
#global-chat-dialog .p1s-chat-users-preview #global-chat-online{display:block!important;margin-left:auto!important;font-weight:700!important;color:#9db2a3!important;white-space:nowrap!important;}
#global-chat-dialog .chat-online-face{background:#16281e!important;}
#global-chat-dialog .chat-online-face .chat-face-photo{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important;}
#global-chat-dialog .p1s-chat-section-head{align-items:center!important;gap:12px!important;}
#global-chat-dialog .p1s-chat-section-head span{font-size:.75rem!important;color:#82988a!important;text-align:right!important;}
#global-chat-dialog .p1s-traccar-user-row{display:flex!important;align-items:center!important;gap:11px!important;padding:11px 9px!important;border-bottom:1px solid rgba(255,255,255,.055)!important;margin:0!important;}
#global-chat-dialog .p1s-traccar-user-row:last-child{border-bottom:0!important;}
#global-chat-dialog .p1s-traccar-user-row .chat-avatar{width:44px!important;height:44px!important;min-width:44px!important;flex:0 0 44px!important;border-radius:50%!important;}
#global-chat-dialog .p1s-traccar-user-row>span{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important;flex:1!important;}
#global-chat-dialog .p1s-traccar-user-row strong{font-size:.9rem!important;color:#eff8f1!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
#global-chat-dialog .p1s-traccar-user-row small{font-size:.7rem!important;line-height:1.35!important;color:#83988b!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;}
#global-chat-dialog .p1s-traccar-user-row em{font-style:normal!important;font-size:.68rem!important;color:#a9b8ae!important;}
#global-chat-dialog .p1s-traccar-user-row>i{width:8px!important;height:8px!important;min-width:8px!important;border-radius:50%!important;background:#425249!important;box-shadow:none!important;}
#global-chat-dialog .p1s-traccar-user-row>i.is-live{background:#38ff79!important;box-shadow:0 0 10px rgba(56,255,121,.75)!important;}
.light-mode #global-chat-dialog .p1s-traccar-user-row{border-bottom-color:#e0e8de!important;}
.light-mode #global-chat-dialog .p1s-traccar-user-row strong{color:#263429!important;}
.light-mode #global-chat-dialog .p1s-traccar-user-row small,.light-mode #global-chat-dialog .p1s-traccar-user-row em{color:#718174!important;}
@media(max-width:700px){
 #global-chat-dialog .p1s-chat-users-preview{padding:7px 12px 5px!important;}
 #global-chat-dialog .p1s-chat-users-preview #global-chat-online{font-size:.69rem!important;}
 #global-chat-dialog .p1s-chat-section-head{padding:14px 12px!important;}
 #global-chat-dialog .p1s-chat-section-head span{font-size:.68rem!important;}
 #global-chat-dialog .p1s-traccar-user-row{padding:10px 7px!important;}
 #global-chat-dialog .p1s-traccar-user-row .chat-avatar{width:40px!important;height:40px!important;min-width:40px!important;flex-basis:40px!important;}
}


/* P1S v8.13.6 · mensajes propios negros con texto blanco */
#global-chat-dialog .chat-message.chat-me .chat-message-content,
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content{
  background:linear-gradient(180deg,#0b0d0c 0%,#151816 100%)!important;
  border:1px solid rgba(255,255,255,.10)!important;
  color:#ffffff!important;
  box-shadow:0 10px 26px rgba(0,0,0,.22)!important;
}
#global-chat-dialog .chat-message.chat-me .chat-message-heading strong,
#global-chat-dialog .chat-message.chat-me .chat-message-content>small,
#global-chat-dialog .chat-message.chat-me .chat-message time,
#global-chat-dialog .chat-message.chat-me p,
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-heading strong,
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content>small,
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message time,
.light-mode #global-chat-dialog .chat-message.chat-me p{
  color:#ffffff!important;
}
#global-chat-dialog .chat-message.chat-me .chat-message time,
#global-chat-dialog .chat-message.chat-me .chat-message-content>small,
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message time,
.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content>small{
  color:#d7ddd9!important;
}
#global-chat-dialog .chat-message.chat-pending.chat-me .chat-message-content{opacity:.92!important;}


/* P1S v8.13.9 · envío cache-first instantáneo */
#global-chat-dialog .chat-message.chat-pending{opacity:1!important;}
#global-chat-dialog .chat-message.chat-pending time{color:#cfe8d7!important;}
#global-chat-dialog .chat-message-content{transition:opacity .16s ease,transform .16s ease!important;}
#global-chat-dialog .chat-message.chat-pending .chat-message-content{transform:none!important;}

/* P1S v8.14.3 · oculta texto técnico de Traccar en el chat */
#global-chat-online{display:none!important;}


/* P1S v8.14.4 · mapa adaptativo claro/oscuro */
#map .leaflet-tile-pane{transition:opacity .22s ease;}
body:not(.light-mode) .map-panel,
body:not(.light-mode) .map-panel #map{background:#07100b!important;}
body.light-mode .map-panel,
body.light-mode .map-panel #map{background:#e9eee7!important;}
body:not(.light-mode) .map-label,
body:not(.light-mode) .fit-button{background:rgba(5,14,8,.94)!important;color:#f4fff4!important;border-color:#265b34!important;box-shadow:0 8px 24px rgba(0,0,0,.34)!important;}
body:not(.light-mode) .marker-name{background:rgba(5,14,8,.96)!important;color:#fff!important;border-color:#2f7441!important;box-shadow:0 6px 18px rgba(0,0,0,.34)!important;text-shadow:0 1px 1px #000;}
body.light-mode .marker-name{background:rgba(255,255,255,.96)!important;color:#253428!important;border-color:#d7e0d3!important;box-shadow:0 5px 16px rgba(28,43,31,.12)!important;text-shadow:none!important;}
body:not(.light-mode) .fleet-marker-label{background:#08120c!important;color:#fff!important;border-color:var(--fleet-accent,#ceef52)!important;box-shadow:0 8px 22px rgba(0,0,0,.42)!important;}
body:not(.light-mode) .fleet-marker-label:after{background:#08120c!important;}
body:not(.light-mode) .fleet-marker-label small{color:#f4fff4!important;}
body:not(.light-mode) .fleet-marker-label em{color:#b8cabb!important;}
body.light-mode .fleet-marker-label{background:#fff!important;color:#243027!important;border-color:var(--fleet-accent,#809641)!important;box-shadow:0 8px 22px rgba(30,45,33,.16)!important;}
body.light-mode .fleet-marker-label:after{background:#fff!important;}
body.light-mode .fleet-marker-label small{color:#243027!important;}
body.light-mode .fleet-marker-label em{color:#667468!important;}
body:not(.light-mode) .leaflet-tooltip.trip-destination-label,
body:not(.light-mode) .leaflet-tooltip.multi-trip-route-label{background:#07120b!important;color:#fff!important;border:1px solid #2d6d3d!important;box-shadow:0 6px 18px rgba(0,0,0,.38)!important;}
body.light-mode .leaflet-tooltip.trip-destination-label,
body.light-mode .leaflet-tooltip.multi-trip-route-label{background:#fff!important;color:#233027!important;border:1px solid #d1ddd0!important;box-shadow:0 6px 18px rgba(30,45,33,.12)!important;}
body:not(.light-mode) .leaflet-control-zoom{border-color:#245e34!important;box-shadow:0 8px 20px rgba(0,0,0,.36)!important;}
body:not(.light-mode) .leaflet-control-zoom a{background:#07120b!important;color:#fff!important;border-color:#1c4a2a!important;}
body:not(.light-mode) .leaflet-control-zoom a:hover{background:#0f2416!important;color:#8cff9e!important;}
body.light-mode .leaflet-control-zoom a{background:#fff!important;color:#344537!important;border-color:#d7e0d3!important;}
body:not(.light-mode) .leaflet-control-attribution{background:rgba(4,10,6,.86)!important;color:#b7c8b9!important;text-shadow:0 1px 1px #000!important;}
body:not(.light-mode) .leaflet-control-attribution a{color:#baf8c4!important;}
body.light-mode .leaflet-control-attribution{background:rgba(255,255,255,.88)!important;color:#59675b!important;text-shadow:none!important;}
body.light-mode .leaflet-control-attribution a{color:#355c3c!important;}


/* P1S v8.14.6 · mapa sin API key + contraste de texto */
/* El mismo mosaico OSM se usa en ambos temas. En oscuro solo cambia su tratamiento visual. */
body:not(.light-mode) #map img.leaflet-tile{
  filter:brightness(.62) invert(1) contrast(1.16) hue-rotate(180deg) saturate(.72)!important;
}
body.light-mode #map img.leaflet-tile{
  filter:none!important;
}
#map img.leaflet-tile{transition:filter .18s ease,opacity .16s ease!important;}

/* Texto principal y secundario: blanco real en oscuro, oscuro nítido en claro. */
body:not(.light-mode){--ink:#ffffff!important;--muted:#e5eee7!important;}
body:not(.light-mode) .page-heading p,
body:not(.light-mode) .stat p,
body:not(.light-mode) .section-heading p,
body:not(.light-mode) .read-time,
body:not(.light-mode) .source-label,
body:not(.light-mode) .page-footer,
body:not(.light-mode) .selected-top small,
body:not(.light-mode) .selected-time,
body:not(.light-mode) .selected-address,
body:not(.light-mode) .user-names,
body:not(.light-mode) .coordinate-line,
body:not(.light-mode) .report-date,
body:not(.light-mode) .table-footer,
body:not(.light-mode) .legend,
body:not(.light-mode) .privacy-note,
body:not(.light-mode) .ops-description,
body:not(.light-mode) .map-search-message,
body:not(.light-mode) .map-search-result small,
body:not(.light-mode) .movement-toolbar-global label,
body:not(.light-mode) .account-menu-action small,
body:not(.light-mode) .access-scope-choice small,
body:not(.light-mode) #account-menu-user,
body:not(.light-mode) .chat-message time,
body:not(.light-mode) .chat-message-content>small,
body:not(.light-mode) .chat-compose-hint,
body:not(.light-mode) .p1s-traccar-user-row small,
body:not(.light-mode) .p1s-traccar-user-row em{
  color:#edf5ee!important;
}
body:not(.light-mode) h1,
body:not(.light-mode) h2,
body:not(.light-mode) h3,
body:not(.light-mode) strong,
body:not(.light-mode) label,
body:not(.light-mode) td,
body:not(.light-mode) .address-line,
body:not(.light-mode) .selected-address strong,
body:not(.light-mode) .chat-person strong{
  color:#ffffff!important;
}

body.light-mode{--ink:#162019!important;--muted:#334238!important;}
body.light-mode .page-heading p,
body.light-mode .stat p,
body.light-mode .section-heading p,
body.light-mode .read-time,
body.light-mode .source-label,
body.light-mode .selected-top small,
body.light-mode .selected-time,
body.light-mode .user-names,
body.light-mode .coordinate-line,
body.light-mode .report-date,
body.light-mode .table-footer,
body.light-mode .legend,
body.light-mode .privacy-note,
body.light-mode .ops-description{
  color:#334238!important;
}

/* Controles y rótulos sobre el mapa conservan contraste en ambos temas. */
body:not(.light-mode) .map-label,
body:not(.light-mode) .fit-button,
body:not(.light-mode) .marker-name,
body:not(.light-mode) .fleet-marker-label,
body:not(.light-mode) .leaflet-tooltip,
body:not(.light-mode) .leaflet-control-attribution{
  color:#ffffff!important;
}
body.light-mode .map-label,
body.light-mode .fit-button,
body.light-mode .marker-name,
body.light-mode .fleet-marker-label,
body.light-mode .leaflet-tooltip{
  color:#162019!important;
}


/* P1S v8.14.7 · Panel de cuenta alineado */
.account-menu-grid .account-menu-action{
  grid-template-columns:42px minmax(0,1fr)!important;
  align-items:center!important;
  gap:12px!important;
  min-height:96px!important;
  padding:16px 18px!important;
}
.account-menu-grid .account-menu-action>.icon{
  width:22px!important;
  height:22px!important;
  align-self:center!important;
  justify-self:center!important;
}
.account-menu-grid .account-menu-action>span:last-child{
  min-width:0!important;
  width:100%!important;
}
.account-menu-grid .account-menu-action strong{
  display:block!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  line-height:1.25!important;
  margin:0!important;
}
.account-menu-grid .account-menu-action small{
  display:block!important;
  white-space:normal!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  line-height:1.4!important;
}
@media(max-width:760px){
  .account-menu-grid .account-menu-action{
    min-height:84px!important;
    padding:14px 16px!important;
  }
}

/* P1S v8.14.8 · corrección integral de contraste para tema oscuro */
body:not(.light-mode){
  --ink:#f7fff8!important;
  --muted:#cbd8ce!important;
  --line:#21452d!important;
  color:#f7fff8!important;
  color-scheme:dark!important;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
body:not(.light-mode) .page-intro,
body:not(.light-mode) #route-description,
body:not(.light-mode) #history-description,
body:not(.light-mode) #login-description,
body:not(.light-mode) .stat-foot,
body:not(.light-mode) .guard-name small,
body:not(.light-mode) .report-age,
body:not(.light-mode) .history-hint,
body:not(.light-mode) .privacy-note,
body:not(.light-mode) .ops-empty,
body:not(.light-mode) .permission-note,
body:not(.light-mode) .setup-link,
body:not(.light-mode) .route-help,
body:not(.light-mode) .route-summary-card .route-meta,
body:not(.light-mode) .selected-top small,
body:not(.light-mode) .selected-time,
body:not(.light-mode) .selected-full-address,
body:not(.light-mode) .selected-geocode-source{
  color:#c9d7cc!important;
}
body:not(.light-mode) .stat p,
body:not(.light-mode) .section-heading p,
body:not(.light-mode) .read-time,
body:not(.light-mode) .legend,
body:not(.light-mode) .source-label,
body:not(.light-mode) .table-footer,
body:not(.light-mode) .page-footer,
body:not(.light-mode) .coordinate-line,
body:not(.light-mode) .report-date,
body:not(.light-mode) .user-names{
  color:#dce8de!important;
}
body:not(.light-mode) input::placeholder,
body:not(.light-mode) textarea::placeholder{color:#9fb2a3!important;opacity:1!important}
body:not(.light-mode) select option{background:#07100a!important;color:#f7fff8!important}

/* Diálogos y formularios: ninguna superficie blanca en modo oscuro. */
body:not(.light-mode) dialog:not(.p1s-datetime-dialog){
  background:linear-gradient(180deg,#061009 0%,#040906 100%)!important;
  color:#f7fff8!important;
  border-color:#285f39!important;
  box-shadow:0 28px 90px #000d,0 0 0 1px rgba(99,255,130,.04) inset,0 0 30px rgba(57,255,20,.10)!important;
}
body:not(.light-mode) dialog:not(.p1s-datetime-dialog)::backdrop{background:rgba(0,3,1,.86)!important;backdrop-filter:blur(8px)!important}
body:not(.light-mode) dialog label{color:#f5fff6!important}
body:not(.light-mode) dialog .dialog-close,
body:not(.light-mode) dialog .icon-button{background:#08150d!important;border-color:#285f39!important;color:#eaffed!important}
body:not(.light-mode) dialog .dialog-close:hover,
body:not(.light-mode) dialog .icon-button:hover{background:#0d2114!important;border-color:#51d66c!important;color:#ffffff!important}
body:not(.light-mode) #route-form select,
body:not(.light-mode) #history-form select,
body:not(.light-mode) #login-form input,
body:not(.light-mode) .ops-dialog input:not([type="checkbox"]):not([type="radio"]),
body:not(.light-mode) .ops-dialog select,
body:not(.light-mode) .ops-dialog textarea{
  background:#08120c!important;
  color:#f7fff8!important;
  border-color:#285f39!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
body:not(.light-mode) #route-form select:focus,
body:not(.light-mode) #history-form select:focus,
body:not(.light-mode) .ops-dialog input:focus,
body:not(.light-mode) .ops-dialog select:focus,
body:not(.light-mode) .ops-dialog textarea:focus{border-color:#62e779!important;outline-color:rgba(98,231,121,.22)!important}

/* Fecha/hora nativa: respaldo si el selector personalizado no se inicializa. */
body:not(.light-mode) input[type="datetime-local"],
body:not(.light-mode) input[type="date"],
body:not(.light-mode) input[type="time"]{
  background:#08120c!important;
  color:#f7fff8!important;
  border-color:#285f39!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
  color-scheme:dark!important;
}
body:not(.light-mode) input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body:not(.light-mode) input[type="date"]::-webkit-calendar-picker-indicator,
body:not(.light-mode) input[type="time"]::-webkit-calendar-picker-indicator{
  background-color:#102319!important;
  border-radius:7px!important;
  filter:invert(1) brightness(1.35)!important;
  opacity:.9!important;
}

/* Botón visible Desde/Hasta: corrige el blanco observado en móvil. */
body:not(.light-mode) .p1s-datetime-trigger{
  background:linear-gradient(180deg,#0b1710 0%,#07110b 100%)!important;
  color:#f7fff8!important;
  border-color:#2b6b3d!important;
  box-shadow:0 7px 20px rgba(0,0,0,.24),inset 0 1px 0 rgba(255,255,255,.035)!important;
}
body:not(.light-mode) .p1s-datetime-trigger:hover{background:#0d1d13!important;border-color:#55d86e!important;box-shadow:0 8px 24px rgba(0,0,0,.30),0 0 14px rgba(85,216,110,.08)!important}
body:not(.light-mode) .p1s-datetime-trigger:focus-visible{outline-color:rgba(99,255,130,.24)!important;border-color:#63e47b!important}
body:not(.light-mode) .p1s-datetime-trigger strong{color:#ffffff!important}
body:not(.light-mode) .p1s-datetime-trigger small{color:#aec0b1!important}
body:not(.light-mode) .p1s-datetime-trigger .icon,
body:not(.light-mode) .p1s-datetime-trigger .p1s-dt-chevron{color:#8cff9b!important}

/* Selector profesional de fecha/hora completamente oscuro. */
body:not(.light-mode) .p1s-datetime-dialog{color:#f7fff8!important;color-scheme:dark!important}
body:not(.light-mode) .p1s-datetime-dialog::backdrop{background:rgba(0,3,1,.88)!important;backdrop-filter:blur(8px)!important}
body:not(.light-mode) .p1s-datetime-panel{background:#050b07!important;border-color:#285f39!important;box-shadow:0 30px 100px rgba(0,0,0,.72),0 0 28px rgba(72,255,103,.08)!important}
body:not(.light-mode) .p1s-datetime-header{background:linear-gradient(180deg,#0a1710,#07110b)!important;border-bottom-color:#193c25!important}
body:not(.light-mode) .p1s-datetime-header .eyebrow{color:#77ef8a!important}
body:not(.light-mode) .p1s-datetime-header h2{color:#ffffff!important}
body:not(.light-mode) .p1s-datetime-header p:last-child{color:#b4c6b7!important}
body:not(.light-mode) .p1s-datetime-close{background:#0b1710!important;border-color:#285f39!important;color:#effff1!important}
body:not(.light-mode) .p1s-datetime-close:hover{background:#11251a!important;border-color:#59de71!important;color:#ffffff!important}
body:not(.light-mode) .p1s-datetime-current{background:linear-gradient(90deg,#0a1710,#07110b)!important;border-color:#244f31!important}
body:not(.light-mode) .p1s-datetime-current .icon{color:#75ff86!important}
body:not(.light-mode) .p1s-datetime-current small{color:#a9bbaa!important}
body:not(.light-mode) .p1s-datetime-current strong{color:#ffffff!important}
body:not(.light-mode) .p1s-calendar-card,
body:not(.light-mode) .p1s-time-card{background:#07110b!important;border-color:#214b2e!important;box-shadow:0 10px 30px rgba(0,0,0,.24)!important}
body:not(.light-mode) .p1s-calendar-head strong,
body:not(.light-mode) .p1s-time-title strong,
body:not(.light-mode) .p1s-time-label{color:#f5fff6!important}
body:not(.light-mode) .p1s-calendar-head button{background:#0b1810!important;border-color:#285f39!important;color:#eaffed!important}
body:not(.light-mode) .p1s-calendar-head button:hover{background:#102619!important;border-color:#55d86e!important}
body:not(.light-mode) .p1s-calendar-weekdays span{color:#a8b9ab!important}
body:not(.light-mode) .p1s-calendar-days button{color:#eaf5ec!important}
body:not(.light-mode) .p1s-calendar-days button:hover{background:#102318!important}
body:not(.light-mode) .p1s-calendar-days button.other-month{color:#718277!important}
body:not(.light-mode) .p1s-calendar-days button.today:not(.selected){box-shadow:inset 0 0 0 1px #59d773!important;color:#a8ffb4!important}
body:not(.light-mode) .p1s-calendar-days button.selected{background:linear-gradient(180deg,#73f668,#48c952)!important;color:#041007!important;box-shadow:0 8px 18px rgba(72,201,82,.24)!important}
body:not(.light-mode) .p1s-calendar-actions{border-top-color:#193b24!important}
body:not(.light-mode) .p1s-calendar-actions button{color:#8dff9d!important}
body:not(.light-mode) .p1s-calendar-actions button:hover{background:#102318!important}
body:not(.light-mode) .p1s-time-title{border-bottom-color:#193b24!important}
body:not(.light-mode) .p1s-time-title .icon{color:#78ff89!important}
body:not(.light-mode) .p1s-time-title small{color:#a9bbaa!important}
body:not(.light-mode) .p1s-wheel-step{color:#b5c6b8!important}
body:not(.light-mode) .p1s-wheel-step:hover{background:#102318!important;color:#ffffff!important}
body:not(.light-mode) .p1s-time-colon{color:#ffffff!important}
body:not(.light-mode) .p1s-time-wheel{background:linear-gradient(180deg,#07110b 0,#09150e 35%,#102819 49%,#102819 51%,#09150e 65%,#07110b 100%)!important;border-color:#193b24!important}
body:not(.light-mode) .p1s-time-wheel::before,
body:not(.light-mode) .p1s-time-wheel::after{background:#2b6f3d!important}
body:not(.light-mode) .p1s-time-wheel button{color:#74877a!important}
body:not(.light-mode) .p1s-time-wheel button.near{color:#b7c8ba!important}
body:not(.light-mode) .p1s-time-wheel button.selected{color:#ffffff!important;background:linear-gradient(90deg,rgba(68,190,79,.10),rgba(87,238,99,.22),rgba(68,190,79,.10))!important}
body:not(.light-mode) .p1s-time-quick button{background:#0b1810!important;border-color:#285f39!important;color:#dff9e3!important}
body:not(.light-mode) .p1s-time-quick button:hover{background:#102619!important;border-color:#55d86e!important;color:#ffffff!important}
body:not(.light-mode) .p1s-datetime-footer{background:#061009!important;border-top-color:#193b24!important}
body:not(.light-mode) .p1s-datetime-footer>p{color:#a9bbaa!important}

/* Superficies principales y tarjetas: contraste consistente sin grises demasiado oscuros. */
body:not(.light-mode) .stats,
body:not(.light-mode) .monitor-window,
body:not(.light-mode) .table-wrap{border-color:#214b2e!important}
body:not(.light-mode) .stat{background:linear-gradient(180deg,rgba(9,20,13,.94),rgba(6,13,9,.96))!important}
body:not(.light-mode) .stat-icon{border-color:#285f39!important}
body:not(.light-mode) th{color:#c5d4c8!important;background:#09130d!important}
body:not(.light-mode) td{color:#f3fbf4!important}
body:not(.light-mode) .address-line,
body:not(.light-mode) .guard-name strong,
body:not(.light-mode) .report-time{color:#ffffff!important}
body:not(.light-mode) .row-map-button{background:#08150d!important;border-color:#285f39!important;color:#93ffa1!important}
body:not(.light-mode) .row-map-button:hover{background:#102619!important;border-color:#55d86e!important;color:#ffffff!important}

/* P1S v8.14.9 · auditoría total de tema oscuro
   Normaliza TODAS las vistas, opciones, formularios, tarjetas y paneles sin alterar el tema claro. */
body:not(.light-mode){
  --p1s-dark-0:#030704;
  --p1s-dark-1:#050b07;
  --p1s-dark-2:#07110b;
  --p1s-dark-3:#0a1710;
  --p1s-dark-4:#102319;
  --p1s-dark-line:#214f30;
  --p1s-dark-line-strong:#2d7442;
  --p1s-dark-text:#f5fff6;
  --p1s-dark-muted:#b5c7b8;
  --p1s-dark-muted-2:#92a797;
  --p1s-dark-accent:#73ff87;
  background:radial-gradient(circle at 50% -18%,#0c2414 0,#06100a 34%,#030704 72%)!important;
  color:var(--p1s-dark-text)!important;
  color-scheme:dark!important;
}
body:not(.light-mode) html{color-scheme:dark!important}

/* Formularios: regla única de respaldo para cualquier opción actual o futura. */
body:not(.light-mode) dialog input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body:not(.light-mode) dialog select,
body:not(.light-mode) dialog textarea,
body:not(.light-mode) .monitor-window input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body:not(.light-mode) .monitor-window select,
body:not(.light-mode) .monitor-window textarea{
  background:linear-gradient(180deg,#09150d,#061009)!important;
  color:#f7fff8!important;
  border-color:#285f39!important;
  caret-color:#7dff91!important;
  color-scheme:dark!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important;
}
body:not(.light-mode) dialog input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
body:not(.light-mode) dialog select:focus,
body:not(.light-mode) dialog textarea:focus,
body:not(.light-mode) .monitor-window input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
body:not(.light-mode) .monitor-window select:focus,
body:not(.light-mode) .monitor-window textarea:focus{
  border-color:#63e47b!important;
  outline:3px solid rgba(99,228,123,.15)!important;
  outline-offset:0!important;
}
body:not(.light-mode) dialog input::placeholder,
body:not(.light-mode) dialog textarea::placeholder,
body:not(.light-mode) .monitor-window input::placeholder,
body:not(.light-mode) .monitor-window textarea::placeholder{color:#96aa9a!important;opacity:1!important}
body:not(.light-mode) dialog select option,
body:not(.light-mode) dialog select optgroup,
body:not(.light-mode) .monitor-window select option,
body:not(.light-mode) .monitor-window select optgroup{background:#061009!important;color:#f5fff6!important}
body:not(.light-mode) dialog input[type="checkbox"],
body:not(.light-mode) dialog input[type="radio"]{accent-color:#63f779!important;color-scheme:dark!important}
body:not(.light-mode) dialog input[type="range"]{accent-color:#68f77d!important;color-scheme:dark!important}
body:not(.light-mode) dialog input[type="file"]::file-selector-button{
  background:#0c1d12!important;color:#dffff0!important;border:1px solid #2a6840!important;border-radius:8px!important;padding:7px 10px!important;
}
body:not(.light-mode) dialog input[type="file"]::file-selector-button:hover{background:#102819!important;border-color:#59d873!important}
body:not(.light-mode) dialog details,
body:not(.light-mode) dialog summary{color:#c7d6ca!important}
body:not(.light-mode) dialog fieldset{border-color:#214f30!important;background:rgba(7,17,11,.72)!important}
body:not(.light-mode) dialog legend{color:#effff1!important}
body:not(.light-mode) dialog hr{border-color:#183b25!important}
body:not(.light-mode) dialog .field-help,
body:not(.light-mode) dialog small,
body:not(.light-mode) dialog .ops-description,
body:not(.light-mode) dialog .history-hint,
body:not(.light-mode) dialog .privacy-note{color:#aebfb1!important}
body:not(.light-mode) dialog .text-button{color:#8eff9f!important}
body:not(.light-mode) dialog .button-outline{background:#08150d!important;border-color:#285f39!important;color:#eaffed!important}
body:not(.light-mode) dialog .button-outline:hover{background:#102619!important;border-color:#55d86e!important;color:#fff!important}
body:not(.light-mode) dialog .button-primary{background:linear-gradient(180deg,#baff50,#7fe82d)!important;border-color:#caff73!important;color:#10200d!important}

/* Paneles secundarios de la página principal. */
body:not(.light-mode) .traccar-panel{background:#040805!important}
body:not(.light-mode) .frame-notice{background:#061009!important;border-color:#173f25!important;color:#b9cbbd!important}
body:not(.light-mode) .frame-notice a{color:#8dff9f!important}
body:not(.light-mode) .traccar-launch{background:linear-gradient(180deg,#07110b,#040805)!important;color:#f5fff6!important}
body:not(.light-mode) .traccar-launch-icon{background:#0b2513!important;color:#7dff8f!important;border:1px solid #285f39!important}
body:not(.light-mode) .traccar-launch>p:not(.eyebrow),
body:not(.light-mode) .traccar-launch small{color:#a8baac!important}
body:not(.light-mode) .map-warning{background:#241a08!important;border-color:#7d6125!important;color:#ffd684!important;box-shadow:0 8px 24px rgba(0,0,0,.38)!important}
body:not(.light-mode) .nearby-status{background:rgba(5,14,8,.95)!important;border-color:#2a6a3d!important;color:#ddf8e2!important;box-shadow:0 8px 24px rgba(0,0,0,.36)!important}
body:not(.light-mode) .nearby-status[data-state="loading"]{border-color:#4d8a58!important;color:#bfe8c5!important}
body:not(.light-mode) .nearby-status[data-state="ok"]{border-color:#3ab95d!important;color:#8dffa0!important}
body:not(.light-mode) .nearby-status[data-state="warn"]{background:#211906!important;border-color:#9d7a2d!important;color:#ffd882!important}
body:not(.light-mode) #nearby-button.active-tool{background:#0a2011!important;border-color:#3fb75c!important;color:#93ffa3!important;box-shadow:0 0 14px rgba(66,255,105,.10)!important}
body:not(.light-mode) #nearby-button.active-tool .icon{color:#78ff8b!important}
body:not(.light-mode) .row-live-metrics{color:#b2c4b6!important;border-color:#1a4228!important}
body:not(.light-mode) .row-live-metrics b{color:#f0fff2!important}
body:not(.light-mode) .sos-sound-button.alerts-ready,
body:not(.light-mode) .sos-sound-button.alerts-system-ready{background:#08170d!important;border-color:#2e7844!important;color:#a6ffb5!important;box-shadow:0 0 14px rgba(63,255,103,.10)!important}
body:not(.light-mode) .sos-sound-button.alerts-ready .icon{color:#79ff8e!important}
body:not(.light-mode) .georoute-export-button{background:#08150d!important;border-color:#285f39!important;color:#a9ffb6!important}
body:not(.light-mode) .georoute-export-button:hover{background:#102619!important;border-color:#55d86e!important}
body:not(.light-mode) .selected-collapse-button{background:#08150d!important;border-color:#285f39!important;color:#dfffe4!important}
body:not(.light-mode) .selected-collapse-button:hover{background:#102619!important;border-color:#55d86e!important}

/* Recorrido visible sobre el mapa: elimina las cajas blancas del panel lateral. */
body:not(.light-mode) .route-summary-card{background:linear-gradient(180deg,rgba(6,16,10,.97),rgba(3,9,6,.96))!important;border-color:#285f39!important;color:#effff1!important}
body:not(.light-mode) .route-summary-head{background:rgba(5,13,8,.96)!important;border-bottom-color:#1d4a2b!important;color:#f5fff6!important}
body:not(.light-mode) .route-summary-mini{color:#a8baac!important}
body:not(.light-mode) .route-meta span,
body:not(.light-mode) .route-kpi-grid>div,
body:not(.light-mode) .route-timeline,
body:not(.light-mode) .route-endpoints>div,
body:not(.light-mode) .route-stop{
  background:#07120a!important;
  border-color:#1d4f2c!important;
  color:#eaf8ec!important;
}
body:not(.light-mode) .route-kpi-grid small,
body:not(.light-mode) .route-timeline-title span,
body:not(.light-mode) .route-timeline-row span,
body:not(.light-mode) .route-timeline-row small,
body:not(.light-mode) .route-endpoints small,
body:not(.light-mode) .route-stop small{color:#9fb3a3!important}
body:not(.light-mode) .route-kpi-grid strong,
body:not(.light-mode) .route-timeline-title b,
body:not(.light-mode) .route-timeline-row strong,
body:not(.light-mode) .route-help b{color:#f5fff6!important}
body:not(.light-mode) .route-line-legend,
body:not(.light-mode) .route-summary-card .route-stops{border-color:#193f25!important}
body:not(.light-mode) .route-timeline-row:not(:last-child):before{background:#214f30!important}
body:not(.light-mode) .route-timeline-row:hover{background:#0d2114!important}
body:not(.light-mode) .route-timeline-node{box-shadow:0 0 0 3px #0b2213!important}
body:not(.light-mode) .route-timeline-row.return .route-timeline-node{box-shadow:0 0 0 3px #111b2d!important}
body:not(.light-mode) .route-timeline-row.stop10 .route-timeline-node,
body:not(.light-mode) .route-timeline-row.stop20 .route-timeline-node{box-shadow:0 0 0 3px #2a210d!important}
body:not(.light-mode) .route-timeline-row.stop40 .route-timeline-node{box-shadow:0 0 0 3px #2b1110!important}
body:not(.light-mode) .route-timeline-row.end .route-timeline-node{box-shadow:0 0 0 3px #13202b!important}
body:not(.light-mode) .route-arrow-pro{background:#07120a!important;border-color:#68ff7f!important;color:#68ff7f!important;box-shadow:0 4px 14px rgba(0,0,0,.48)!important}
body:not(.light-mode) .route-history-dot{stroke:#102919!important;fill:#79ff8b!important}
body:not(.light-mode) .stop-icon.stop-short{background:#211906!important;border-color:#b88c39!important;color:#ffd27d!important}
body:not(.light-mode) .stop-icon.stop-long{background:#241207!important;border-color:#d78a2f!important;color:#ffc670!important}

/* Exportaciones y reportes. */
body:not(.light-mode) .export-section-fieldset{background:#07120a!important;border-color:#214f30!important}
body:not(.light-mode) .export-section-fieldset legend{color:#f0fff2!important}
body:not(.light-mode) .export-section-choice{color:#eef9ef!important}
body:not(.light-mode) .export-section-choice:hover{background:#0d2114!important}
body:not(.light-mode) .export-section-choice small{color:#a6b8a9!important}
body:not(.light-mode) .export-section-all{border-bottom-color:#1d462a!important}
body:not(.light-mode) .georoute-extra-sections .export-section-choice{background:#08150d!important;border-color:#214f30!important}
body:not(.light-mode) .general-export-dialog #general-export-scope-help{color:#a9bbac!important}
body:not(.light-mode) .date-range-arrow{color:#91ffa2!important}

/* Viajes, repetición y geocercas. */
body:not(.light-mode) .trip-preview,
body:not(.light-mode) .replay-choice-list,
body:not(.light-mode) .replay-selection-summary,
body:not(.light-mode) .geofence-search-results,
body:not(.light-mode) .geofence-coordinate-preview{background:#07120a!important;border-color:#214f30!important;color:#effff1!important}
body:not(.light-mode) .replay-choice,
body:not(.light-mode) .geofence-search-result{background:#08150d!important;border-color:#1d4f2c!important;color:#effff1!important}
body:not(.light-mode) .replay-choice:hover,
body:not(.light-mode) .geofence-search-result:hover{background:#0d2114!important;border-color:#45ba60!important}
body:not(.light-mode) .replay-choice.auto-selected,
body:not(.light-mode) .replay-selection-summary.has-selection{background:#0a2512!important;border-color:#35a952!important;color:#9dffac!important}
body:not(.light-mode) .geofence-search-row{background:#07120a!important;border-color:#285f39!important}
body:not(.light-mode) .geofence-search-row button{background:#0c2012!important;border-color:#2d7442!important;color:#b8ffc3!important}
body:not(.light-mode) .geofence-radius-row strong{background:#08150d!important;border-color:#285f39!important;color:#f5fff6!important}
body:not(.light-mode) .geofence-result-pin{background:#0b2814!important;color:#7dff91!important}
body:not(.light-mode) .trip-preview small,
body:not(.light-mode) .replay-choice small,
body:not(.light-mode) .geofence-search-result small,
body:not(.light-mode) .geofence-search-message,
body:not(.light-mode) .geofence-coordinate-preview span,
body:not(.light-mode) .geofence-coordinate-preview small{color:#a4b7a7!important}

/* Grupos, convoyes y novedades. Corrige reglas antiguas que forzaban tarjetas claras con !important. */
body:not(.light-mode) .group-card,
body:not(.light-mode) .member-check,
body:not(.light-mode) .event-row,
body:not(.light-mode) .event-location-preview,
body:not(.light-mode) .groups-dialog-v81 .convoy-fields-v78,
body:not(.light-mode) .groups-dialog-v81 .convoy-unit-card{
  background:#07120a!important;
  border-color:#214f30!important;
  color:#effff1!important;
}
body:not(.light-mode) .members-fieldset{background:#061009!important;border-color:#214f30!important}
body:not(.light-mode) .group-card small,
body:not(.light-mode) .group-card p,
body:not(.light-mode) .member-check small,
body:not(.light-mode) .event-row small,
body:not(.light-mode) .event-row p,
body:not(.light-mode) .groups-dialog-v81 .convoy-unit-head span,
body:not(.light-mode) #groups-sync-note{color:#a3b6a6!important}
body:not(.light-mode) .groups-dialog-v81 .convoy-unit-head strong{color:#dfffe4!important}
body:not(.light-mode) .recent-events{border-color:#1a4228!important}

/* Usuarios, accesos y permisos. */
body:not(.light-mode) .traccar-users-summary>div,
body:not(.light-mode) .traccar-user-row,
body:not(.light-mode) .access-user-summary,
body:not(.light-mode) .access-permission,
body:not(.light-mode) .access-scope-panel,
body:not(.light-mode) .access-scope-list,
body:not(.light-mode) .access-company-list,
body:not(.light-mode) .access-company-choice{
  background:#07120a!important;
  border-color:#214f30!important;
  color:#effff1!important;
}
body:not(.light-mode) .access-company-choice:hover{background:#0c2012!important;border-color:#3aa755!important}
body:not(.light-mode) .access-company-choice:has(input:checked),
body:not(.light-mode) .access-permission:has(input:checked){background:#0a2512!important;border-color:#39b85a!important;box-shadow:inset 3px 0 #62f678!important}
body:not(.light-mode) .access-groups-block>strong{color:#f3fff4!important}
body:not(.light-mode) .access-groups-block>small,
body:not(.light-mode) .access-company-choice small,
body:not(.light-mode) .access-scope-columns>div>small,
body:not(.light-mode) .access-scope-choice small,
body:not(.light-mode) .access-user-summary span,
body:not(.light-mode) .access-permission small,
body:not(.light-mode) .traccar-users-summary span,
body:not(.light-mode) .traccar-user-list-head span,
body:not(.light-mode) .traccar-user-row small{color:#a2b5a5!important}
body:not(.light-mode) .traccar-user-list-head{border-color:#1a4228!important}
body:not(.light-mode) .traccar-user-avatar{background:#0b2513!important;color:#7dff90!important;border:1px solid #285f39!important}

/* Movimientos, papelera y perfil. */
body:not(.light-mode) .movement-summary,
body:not(.light-mode) .movement-row,
body:not(.light-mode) .cleanup-card,
body:not(.light-mode) .cleanup-trash-box{
  background:#07120a!important;
  border-color:#214f30!important;
  color:#effff1!important;
}
body:not(.light-mode) .movement-summary strong{color:#aaffb7!important}
body:not(.light-mode) .movement-summary span,
body:not(.light-mode) .movement-summary small,
body:not(.light-mode) .movement-row small,
body:not(.light-mode) .movement-row span,
body:not(.light-mode) .cleanup-trash-box small{color:#a6b9a9!important;opacity:1!important}
body:not(.light-mode) .movement-row>button{background:#210a0a!important;border-color:#6a2b2b!important;color:#ff9a9a!important}
body:not(.light-mode) .profile-crop-stage{background:#061009!important;border-color:#285f39!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02),0 10px 28px rgba(0,0,0,.34)!important}
body:not(.light-mode) .profile-column-label,
body:not(.light-mode) .profile-crop-hint,
body:not(.light-mode) .profile-crop-controls label{color:#b0c2b3!important}
body:not(.light-mode) .profile-editor input[type="file"]{background:#07120a!important;border-color:#2a6840!important;color:#dfffe4!important}

/* Ajustes SOS y estados de alerta. */
body:not(.light-mode) .stop-notify-settings{background:#07120a!important;border-color:#214f30!important;color:#effff1!important}
body:not(.light-mode) .stop-notify-settings>p{color:#a6b8a9!important}
body:not(.light-mode) .sos-volume-label{color:#f5fff6!important}
body:not(.light-mode) .sos-volume{accent-color:#ff5d64!important}

/* Contraste final de textos interactivos y estados deshabilitados. */
body:not(.light-mode) dialog button:disabled,
body:not(.light-mode) dialog input:disabled,
body:not(.light-mode) dialog select:disabled,
body:not(.light-mode) dialog textarea:disabled{opacity:.62!important;color:#9eafa1!important}
body:not(.light-mode) dialog a{color:#8dff9f}
body:not(.light-mode) dialog a:hover{color:#c6ffcf}


/* P1S 8.15.0 · destinos por geocerca/enlace, visor de geocercas y reportes de viaje */
.destination-search-row{margin-top:6px}.destination-search-row input{min-width:0}.compact-destination-preview{margin-top:8px}.trip-report-download:disabled{opacity:.45;cursor:not-allowed}.trip-report-download:not(:disabled){border-color:rgba(67,255,104,.46);box-shadow:0 0 0 1px rgba(67,255,104,.08) inset}.geofences-view-dialog{width:min(760px,calc(100vw - 24px))}.geofences-view-list{display:grid;gap:10px;margin-top:16px;max-height:min(58vh,560px);overflow:auto;padding-right:2px}.geofence-view-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;padding:12px 14px;border:1px solid rgba(86,255,117,.2);border-radius:14px;background:rgba(3,14,8,.7)}.geofence-view-row strong{display:block;color:#f4fff6}.geofence-view-row small{display:block;margin-top:4px;color:rgba(229,244,233,.68);line-height:1.35}.geofence-view-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.geofence-view-actions button,.geofence-view-actions a{appearance:none;border:1px solid rgba(86,255,117,.25);border-radius:10px;background:rgba(8,26,15,.9);color:#ecfff0;padding:8px 10px;text-decoration:none;font:inherit;font-size:.78rem;cursor:pointer}.geofence-view-actions button:hover,.geofence-view-actions a:hover{border-color:#62ff7c;color:#fff}.destination-kind-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 7px;border-radius:999px;border:1px solid rgba(92,255,123,.2);font-size:.68rem;color:#a8f5b5;background:rgba(26,78,38,.2)}
body.light-mode .geofence-view-row{background:#fff;border-color:rgba(28,104,54,.18)}body.light-mode .geofence-view-row strong{color:#183021}body.light-mode .geofence-view-row small{color:#607267}body.light-mode .geofence-view-actions button,body.light-mode .geofence-view-actions a{background:#f6faf5;color:#173421;border-color:rgba(28,104,54,.2)}
@media(max-width:760px){.geofence-view-row{grid-template-columns:1fr}.geofence-view-actions{justify-content:flex-start}.destination-search-row{grid-template-columns:auto minmax(0,1fr)}.destination-search-row button{grid-column:1/-1;width:100%}.trip-toolbar-actions .trip-report-download{display:inline-flex!important}}

/* P1S 8.15.3 · control profesional de visibilidad de Modo viaje y Multi viaje */
.route-view-control{display:flex;align-items:center;gap:9px;min-width:min(440px,100%);padding:8px 10px;border:1px solid rgba(72,190,96,.28);border-radius:11px;background:rgba(247,252,247,.92)}
.route-view-control[hidden]{display:none!important}.route-view-control-label{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;font-size:.72rem;font-weight:750;color:#2d5937;white-space:nowrap}.route-view-control-label .icon{width:15px;height:15px}.route-view-control select{min-width:0;flex:1 1 auto;height:36px;border:1px solid #cfe1d2;border-radius:9px;background:#fff;color:#25412c;padding:0 34px 0 10px;font-size:.75rem;font-weight:650}
#route-visibility-button.routes-hidden{opacity:.82;border-style:dashed!important;box-shadow:none!important}#route-visibility-button.routes-hidden .icon{opacity:.72}
body:not(.light-mode) .route-view-control{background:#061009;border-color:#245c35;box-shadow:inset 0 0 0 1px rgba(78,255,108,.035)}body:not(.light-mode) .route-view-control-label{color:#a9ffb7}body:not(.light-mode) .route-view-control select{background:#030906!important;border-color:#22683a!important;color:#edfff0!important;color-scheme:dark}body:not(.light-mode) #route-visibility-button.routes-hidden{background:#030805!important;border-color:#35533d!important;color:#8da193!important}
body.light-mode .route-view-control{background:#f8fbf7;border-color:#d5e4d5}body.light-mode .route-view-control-label{color:#315d39}body.light-mode .route-view-control select{background:#fff;color:#25412c;border-color:#cfdfd0}
@media(max-width:760px){.route-view-control{order:2;width:100%;min-width:0;padding:7px 8px;gap:7px}.route-view-control-label>span:last-child{display:none}.route-view-control-label .icon{width:17px;height:17px}.route-view-control select{height:40px;font-size:.72rem}.trip-status,.multi-trip-status,.replay-status{order:3}}


/* P1S 8.15.3 · desplazamiento móvil seguro + panel de permisos delegado */
.ops-dialog{
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
}
.account-menu-dialog{
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain!important;
  -webkit-overflow-scrolling:touch!important;
  touch-action:pan-y!important;
}
.access-permission:has(input[data-access-permission="manageUsers"]){
  border-style:dashed;
}
body:not(.light-mode) .access-permission:has(input[data-access-permission="manageUsers"]){
  border-color:rgba(111,255,139,.38)!important;
  background:linear-gradient(180deg,rgba(14,39,20,.92),rgba(7,21,11,.94))!important;
}
@media(max-width:760px){
  dialog.ops-dialog,
  .account-menu-dialog,
  .access-dialog,
  .profile-dialog,
  .groups-dialog,
  .trip-dialog,
  .multi-trip-dialog,
  .replay-dialog,
  .geofence-dialog,
  .geofences-view-dialog{
    max-height:calc(100dvh - 12px)!important;
    margin:6px auto!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior-y:contain!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
  }
  .account-menu-dialog{
    width:calc(100vw - 12px)!important;
    padding:18px 18px calc(30px + env(safe-area-inset-bottom))!important;
  }
  .account-menu-grid{
    padding-bottom:4px!important;
  }
  .account-menu-action{
    touch-action:pan-y!important;
  }
  .access-dialog{
    padding-bottom:calc(28px + env(safe-area-inset-bottom))!important;
  }
}

/* P1S 8.15.3 · auditoría integral: scroll móvil, diagnóstico y estabilidad visual */
html{min-height:100%;text-size-adjust:100%;-webkit-text-size-adjust:100%}
body{min-height:100%;min-height:100dvh}
dialog[open]{pointer-events:auto}
.ops-dialog{scroll-padding-top:64px;scroll-padding-bottom:calc(24px + env(safe-area-inset-bottom));max-block-size:calc(100dvh - 24px)}
.account-menu-dialog,.access-dialog,.groups-dialog,.trip-dialog,.multi-trip-dialog,.replay-dialog,.geofence-dialog,.geofences-view-dialog,.system-status-dialog{min-height:0;max-block-size:calc(100dvh - 24px);overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;overscroll-behavior-y:contain!important}
.account-menu-dialog .account-menu-grid,.access-dialog form,.groups-dialog form,.trip-dialog form,.multi-trip-dialog form,.replay-dialog form,.geofence-dialog form{min-height:0;touch-action:pan-y}
.system-status-dialog{width:min(760px,calc(100vw - 24px))}
.system-status-summary{display:flex;align-items:center;gap:9px;margin:14px 0 12px;padding:11px 13px;border:1px solid rgba(74,181,96,.25);border-radius:12px;background:rgba(17,56,27,.08);font-size:.8rem;line-height:1.45;color:#385942}
.system-status-summary::before{content:"";width:9px;height:9px;border-radius:50%;background:#4fbd6c;box-shadow:0 0 0 4px rgba(79,189,108,.1);flex:0 0 auto}
.system-status-summary.is-warning::before{background:#d7a83b;box-shadow:0 0 0 4px rgba(215,168,59,.12)}
.system-status-summary.is-error::before{background:#df5b55;box-shadow:0 0 0 4px rgba(223,91,85,.12)}
.system-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:12px}
.system-status-card{min-width:0;padding:12px 13px;border:1px solid #dde6dc;border-radius:12px;background:#f8fbf7}
.system-status-card>span{display:block;font-size:.64rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#7a8a7d;margin-bottom:5px}
.system-status-card>strong{display:block;color:#263c2a;font-size:.85rem;line-height:1.35;overflow-wrap:anywhere}
.system-status-card>small{display:block;margin-top:4px;color:#748077;font-size:.7rem;line-height:1.4}
.system-status-card[data-state="ok"]{border-color:rgba(48,160,78,.28)}.system-status-card[data-state="warn"]{border-color:rgba(199,145,39,.35)}.system-status-card[data-state="error"]{border-color:rgba(199,69,62,.35)}
.system-status-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.system-status-actions .button{flex:1 1 220px}
body:not(.light-mode) .system-status-summary{background:rgba(9,31,15,.88);border-color:#225d34;color:#cce5d1}
body:not(.light-mode) .system-status-card{background:#061009;border-color:#1d4d2c}
body:not(.light-mode) .system-status-card>span{color:#8fa797}body:not(.light-mode) .system-status-card>strong{color:#f0fff2}body:not(.light-mode) .system-status-card>small{color:#9caf9f}
body:not(.light-mode) .system-status-card[data-state="ok"]{border-color:#286e3d}body:not(.light-mode) .system-status-card[data-state="warn"]{border-color:#765d24}body:not(.light-mode) .system-status-card[data-state="error"]{border-color:#773a35}
@media(max-width:760px){
  dialog.ops-dialog,.account-menu-dialog,.access-dialog,.profile-dialog,.groups-dialog,.trip-dialog,.multi-trip-dialog,.replay-dialog,.geofence-dialog,.geofences-view-dialog,.system-status-dialog{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;height:auto!important;max-height:calc(100svh - 12px)!important;max-block-size:calc(100svh - 12px)!important;margin:6px auto!important;padding-bottom:calc(26px + env(safe-area-inset-bottom))!important;overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;overscroll-behavior-y:contain!important;scrollbar-gutter:auto!important}
  @supports(height:100dvh){dialog.ops-dialog,.account-menu-dialog,.access-dialog,.profile-dialog,.groups-dialog,.trip-dialog,.multi-trip-dialog,.replay-dialog,.geofence-dialog,.geofences-view-dialog,.system-status-dialog{max-height:calc(100dvh - 12px)!important;max-block-size:calc(100dvh - 12px)!important}}
  .account-menu-dialog{padding-left:16px!important;padding-right:16px!important}
  .account-menu-grid{gap:10px!important}
  .account-menu-action{min-height:76px!important;padding:13px 14px!important;touch-action:pan-y!important}
  .system-status-grid{grid-template-columns:1fr}
  .system-status-actions{position:sticky;bottom:-1px;z-index:4;padding:10px 0 calc(2px + env(safe-area-inset-bottom));background:linear-gradient(180deg,transparent 0%,rgba(255,255,255,.96) 25%,#fff 100%)}
  body:not(.light-mode) .system-status-actions{background:linear-gradient(180deg,transparent 0%,rgba(3,10,5,.96) 25%,#030a05 100%)}
}
@media(max-width:760px){.account-menu-grid .account-menu-action{min-height:78px!important;padding:12px 14px!important}.account-menu-grid .account-menu-action strong{font-size:.94rem!important}.account-menu-grid .account-menu-action small{font-size:.72rem!important;line-height:1.32!important}}
@media(max-width:760px){
  dialog:not(.p1s-datetime-dialog):not(#global-chat-dialog){overflow-y:auto!important;overflow-x:hidden!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-y!important;overscroll-behavior-y:contain!important;max-height:calc(100svh - 12px)!important;max-block-size:calc(100svh - 12px)!important;scroll-padding-top:56px;scroll-padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  @supports(height:100dvh){dialog:not(.p1s-datetime-dialog):not(#global-chat-dialog){max-height:calc(100dvh - 12px)!important;max-block-size:calc(100dvh - 12px)!important}}
}


/* P1S v8.15.8 · chat más compacto y título reducido */
#global-chat-dialog.p1s-chat-v2{
  width:min(392px,calc(100vw - 34px))!important;
  max-width:calc(100vw - 34px)!important;
  height:min(70dvh,690px)!important;
  max-height:min(70dvh,690px)!important;
  border-radius:24px!important;
}
#global-chat-dialog .p1s-chat-top{
  padding:18px 18px 14px!important;
  gap:12px!important;
}
#global-chat-dialog .p1s-chat-brand{gap:12px!important}
#global-chat-dialog .p1s-chat-logo{
  width:56px!important;
  height:56px!important;
  min-width:56px!important;
  flex-basis:56px!important;
  border-radius:18px!important;
}
#global-chat-dialog .p1s-chat-heading .eyebrow{
  font-size:.6rem!important;
  letter-spacing:.16em!important;
  margin:0 0 4px!important;
}
#global-chat-dialog .p1s-chat-title-line{
  gap:8px!important;
  align-items:center!important;
}
#global-chat-dialog .p1s-chat-title-line h2{
  font-size:1.48rem!important;
  line-height:1.06!important;
  letter-spacing:-.025em!important;
  white-space:normal!important;
}
#global-chat-dialog .p1s-chat-live-dot{
  width:9px!important;
  height:9px!important;
}
#global-chat-dialog .p1s-chat-heading #global-chat-status{
  margin:5px 0 0!important;
  font-size:.8rem!important;
  max-width:24ch!important;
}
#global-chat-dialog .p1s-chat-top-side{
  min-width:126px!important;
  gap:8px!important;
}
#global-chat-dialog .p1s-chat-window-actions{gap:8px!important}
#global-chat-dialog .p1s-chat-window-button{
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  border-radius:13px!important;
  font-size:22px!important;
}
#global-chat-dialog .p1s-chat-online-pill{
  min-height:36px!important;
  padding:0 10px!important;
  gap:7px!important;
  font-size:.74rem!important;
}
#global-chat-dialog .p1s-chat-tabs{padding:8px 12px!important}
#global-chat-dialog .p1s-chat-tab{
  height:42px!important;
  font-size:.84rem!important;
}
#global-chat-dialog .global-chat-messages{padding:12px 14px 16px!important}
#global-chat-dialog .chat-message-heading strong{font-size:.86rem!important}
#global-chat-dialog .chat-message p{
  font-size:.89rem!important;
  line-height:1.42!important;
}
#global-chat-dialog .p1s-chat-composer{padding:10px 12px max(10px,env(safe-area-inset-bottom))!important}
#global-chat-dialog .p1s-chat-input-wrap{min-height:44px!important}
#global-chat-dialog #global-chat-text{
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;
  font-size:.88rem!important;
}
#global-chat-dialog .chat-compose-hint{font-size:.62rem!important}

@media(max-width:700px){
  #global-chat-dialog.p1s-chat-v2{
    inset:auto 9px calc(78px + env(safe-area-inset-bottom)) auto!important;
    width:calc(100vw - 18px)!important;
    max-width:calc(100vw - 18px)!important;
    height:min(64dvh,560px)!important;
    max-height:min(64dvh,560px)!important;
    border-radius:22px!important;
  }
  #global-chat-dialog .p1s-chat-top{
    padding:14px 12px 11px!important;
    gap:9px!important;
  }
  #global-chat-dialog .p1s-chat-brand{gap:9px!important}
  #global-chat-dialog .p1s-chat-logo{
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    flex-basis:44px!important;
    border-radius:15px!important;
  }
  #global-chat-dialog .p1s-chat-heading .eyebrow{font-size:.52rem!important}
  #global-chat-dialog .p1s-chat-title-line h2{
    font-size:1.18rem!important;
    line-height:1.08!important;
  }
  #global-chat-dialog .p1s-chat-heading #global-chat-status{
    font-size:.68rem!important;
    max-width:18ch!important;
  }
  #global-chat-dialog .p1s-chat-top-side{
    min-width:auto!important;
    gap:6px!important;
  }
  #global-chat-dialog .p1s-chat-window-actions{gap:6px!important}
  #global-chat-dialog .p1s-chat-window-button{
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    border-radius:10px!important;
    font-size:20px!important;
  }
  #global-chat-dialog .p1s-chat-online-pill{
    min-height:30px!important;
    padding:0 7px!important;
    gap:5px!important;
    font-size:.63rem!important;
  }
  #global-chat-dialog .p1s-chat-tabs{
    padding:7px 8px!important;
    gap:4px!important;
  }
  #global-chat-dialog .p1s-chat-tab{
    height:36px!important;
    font-size:.72rem!important;
    gap:5px!important;
  }
  #global-chat-dialog .p1s-chat-tab .icon{
    width:16px!important;
    height:16px!important;
  }
  #global-chat-dialog .global-chat-messages{padding:10px 10px 12px!important}
  #global-chat-dialog .chat-message{gap:7px!important;margin-bottom:12px!important}
  #global-chat-dialog .chat-message .chat-avatar{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    flex-basis:34px!important;
  }
  #global-chat-dialog .chat-message.chat-me .chat-message-content,
  #global-chat-dialog .chat-message:not(.chat-me) .chat-message-content{
    max-width:calc(100% - 43px)!important;
  }
  #global-chat-dialog .chat-message-heading strong{font-size:.79rem!important}
  #global-chat-dialog .chat-message time{font-size:.62rem!important}
  #global-chat-dialog .chat-message p{
    font-size:.82rem!important;
    padding:9px 11px!important;
  }
  #global-chat-dialog .p1s-chat-composer{padding:8px 9px max(9px,env(safe-area-inset-bottom))!important}
  #global-chat-dialog .p1s-chat-input-wrap{
    min-height:40px!important;
    border-radius:18px!important;
    padding-left:10px!important;
  }
  #global-chat-dialog #global-chat-text{
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    font-size:.8rem!important;
  }
  #global-chat-dialog .chat-compose-hint{font-size:.58rem!important}
}


/* P1S v8.15.8 · panel de usuarios más legible y separado */
.traccar-user-row{grid-template-columns:58px minmax(0,1fr) auto!important;column-gap:16px!important;padding:11px 14px!important;min-height:72px!important}
.traccar-user-avatar{width:52px!important;height:52px!important;min-width:52px!important;margin-right:2px!important}
.traccar-user-row>div{min-width:0!important;padding-left:2px!important}
.traccar-user-row strong{font-size:.84rem!important;line-height:1.25!important}
.traccar-user-row small{font-size:.69rem!important;line-height:1.4!important;margin-top:4px!important}
@media(max-width:760px){.traccar-user-row{grid-template-columns:50px minmax(0,1fr) auto!important;column-gap:12px!important;padding:10px 11px!important}.traccar-user-avatar{width:46px!important;height:46px!important;min-width:46px!important}}


/* P1S v8.15.8 · restaurar tamaño amplio del chat + lectura cómoda */
#global-chat-dialog.p1s-chat-v2{
  width:min(540px,calc(100vw - 36px))!important;
  max-width:calc(100vw - 36px)!important;
  height:min(82dvh,820px)!important;
  max-height:min(82dvh,820px)!important;
  border-radius:30px!important;
}
#global-chat-dialog .p1s-chat-top{padding:22px 22px 18px!important;gap:18px!important}
#global-chat-dialog .p1s-chat-brand{gap:15px!important}
#global-chat-dialog .p1s-chat-logo{width:68px!important;height:68px!important;min-width:68px!important;flex-basis:68px!important;border-radius:21px!important}
#global-chat-dialog .p1s-chat-heading .eyebrow{font-size:.68rem!important;letter-spacing:.18em!important;margin:0 0 5px!important}
#global-chat-dialog .p1s-chat-title-line h2{font-size:2.15rem!important;line-height:1.02!important;letter-spacing:-.045em!important;white-space:nowrap!important}
#global-chat-dialog .p1s-chat-heading #global-chat-status{font-size:.92rem!important;max-width:28ch!important}
#global-chat-dialog .p1s-chat-top-side{min-width:158px!important;gap:10px!important}
#global-chat-dialog .p1s-chat-window-button{width:44px!important;height:44px!important;min-width:44px!important;border-radius:15px!important;font-size:26px!important}
#global-chat-dialog .p1s-chat-online-pill{min-height:42px!important;padding:0 13px!important;font-size:.84rem!important}
#global-chat-dialog .p1s-chat-tabs{padding:10px 16px!important;gap:8px!important}
#global-chat-dialog .p1s-chat-tab{height:46px!important;font-size:.92rem!important}
#global-chat-dialog .global-chat-messages{padding:14px 18px 18px!important}
#global-chat-dialog .chat-message-heading strong{font-size:.91rem!important}
#global-chat-dialog .chat-message p{font-size:.93rem!important;line-height:1.48!important}
#global-chat-dialog .p1s-chat-composer{padding:12px 14px max(12px,env(safe-area-inset-bottom))!important}
#global-chat-dialog #global-chat-text{height:40px!important;min-height:40px!important;max-height:40px!important;font-size:.94rem!important}
@media(max-width:700px){
  #global-chat-dialog.p1s-chat-v2{right:7px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important;inset:auto 7px calc(78px + env(safe-area-inset-bottom)) auto!important;width:calc(100vw - 14px)!important;max-width:calc(100vw - 14px)!important;height:min(76dvh,680px)!important;max-height:min(76dvh,680px)!important;border-radius:24px!important}
  #global-chat-dialog .p1s-chat-top{padding:16px 14px 13px!important;gap:10px!important}
  #global-chat-dialog .p1s-chat-brand{gap:10px!important}
  #global-chat-dialog .p1s-chat-logo{width:52px!important;height:52px!important;min-width:52px!important;flex-basis:52px!important;border-radius:17px!important}
  #global-chat-dialog .p1s-chat-heading .eyebrow{font-size:.58rem!important;letter-spacing:.14em!important}
  #global-chat-dialog .p1s-chat-title-line h2{font-size:1.55rem!important;white-space:normal!important}
  #global-chat-dialog .p1s-chat-heading #global-chat-status{font-size:.74rem!important;max-width:22ch!important}
  #global-chat-dialog .p1s-chat-top-side{min-width:auto!important;gap:7px!important}
  #global-chat-dialog .p1s-chat-window-button{width:34px!important;height:34px!important;min-width:34px!important;border-radius:11px!important;font-size:22px!important}
  #global-chat-dialog .p1s-chat-online-pill{min-height:32px!important;padding:0 8px!important;font-size:.66rem!important}
  #global-chat-dialog .p1s-chat-tabs{padding:8px 9px!important;gap:5px!important}
  #global-chat-dialog .p1s-chat-tab{height:39px!important;font-size:.76rem!important}
  #global-chat-dialog .global-chat-messages{padding:10px 10px 14px!important}
  #global-chat-dialog .chat-message p{font-size:.86rem!important;padding:10px 12px!important}
  #global-chat-dialog .p1s-chat-composer{padding:10px!important;padding-bottom:max(10px,env(safe-area-inset-bottom))!important}
  #global-chat-dialog #global-chat-text{height:38px!important;min-height:38px!important;max-height:38px!important;font-size:14px!important}
}


/* P1S v8.15.9 · Invitado en modo solo lectura */
#global-chat-dialog #global-chat-text:disabled{cursor:not-allowed!important;opacity:.72!important}
#global-chat-dialog #global-chat-image-button:disabled{opacity:.35!important;cursor:not-allowed!important}
.guest-view #my-name-form{display:none!important}
.guest-view .p1s-chat-selection-shell{display:none!important}
.access-permission input:disabled+span{opacity:.72}


/* P1S v8.17.0 · geometría idéntica del chat en tema claro y oscuro */
html body:not(.light-mode) #global-chat-dialog.p1s-chat-v2.global-chat-dialog,
html body.light-mode #global-chat-dialog.p1s-chat-v2.global-chat-dialog{
  right:18px!important;
  bottom:18px!important;
  left:auto!important;
  top:auto!important;
  inset:auto 18px 18px auto!important;
  width:min(540px,calc(100vw - 36px))!important;
  min-width:0!important;
  max-width:calc(100vw - 36px)!important;
  height:min(82dvh,820px)!important;
  min-height:0!important;
  max-height:min(82dvh,820px)!important;
  border-radius:30px!important;
  box-sizing:border-box!important;
}
html body:not(.light-mode) #global-chat-dialog.p1s-chat-v2.global-chat-dialog .p1s-chat-top,
html body.light-mode #global-chat-dialog.p1s-chat-v2.global-chat-dialog .p1s-chat-top{
  padding:22px 22px 18px!important;
}
@media(max-width:700px){
  html body:not(.light-mode) #global-chat-dialog.p1s-chat-v2.global-chat-dialog,
  html body.light-mode #global-chat-dialog.p1s-chat-v2.global-chat-dialog{
    right:7px!important;
    bottom:calc(78px + env(safe-area-inset-bottom))!important;
    inset:auto 7px calc(78px + env(safe-area-inset-bottom)) auto!important;
    width:calc(100vw - 14px)!important;
    min-width:0!important;
    max-width:calc(100vw - 14px)!important;
    height:min(76dvh,680px)!important;
    max-height:min(76dvh,680px)!important;
    border-radius:24px!important;
  }
  html body:not(.light-mode) #global-chat-dialog.p1s-chat-v2.global-chat-dialog .p1s-chat-top,
  html body.light-mode #global-chat-dialog.p1s-chat-v2.global-chat-dialog .p1s-chat-top{
    padding:16px 14px 13px!important;
  }
}

/* El botón de historial solo aparece cuando el servidor confirma mensajes anteriores. */
#global-chat-dialog #global-chat-older[hidden]{display:none!important}


/* P1S 8.17.0 · modo claro fijo + chat de operaciones tipo mensajería */
html,body{color-scheme:light!important}
.theme-toggle{display:none!important}
#global-chat-dialog .p1s-chat-room-strip{display:flex;align-items:center;padding:8px 12px;background:#f7faf3;border-bottom:1px solid #e0e8d9}
#global-chat-dialog .p1s-chat-room-current{width:100%;display:flex;align-items:center;gap:9px;border:1px solid #dfe8d6;background:#fff;border-radius:14px;padding:8px 11px;text-align:left;color:#263524;box-shadow:0 3px 12px rgba(28,46,24,.04)}
#global-chat-dialog .p1s-chat-room-current>span{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:#21402b;color:#dfff67;font-weight:900}
#global-chat-dialog .p1s-chat-room-current strong{font-size:13px;line-height:1.15}
#global-chat-dialog .p1s-chat-room-current small{margin-left:auto;color:#758270;font-size:10px}
#global-chat-dialog .p1s-chat-tab b{min-width:18px;height:18px;padding:0 5px;border-radius:999px;display:inline-grid;place-items:center;background:#d9f557;color:#1d2b18;font-size:10px;margin-left:4px}
#global-chat-dialog .p1s-chat-groups-panel{padding:0!important;overflow:auto;background:#f7faf4}
#global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px;border-bottom:1px solid #e1e8dc;background:#fff}
#global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head>div{display:flex;flex-direction:column;gap:2px}
#global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head span{font-size:10px;color:#7d8978}
#global-chat-dialog .p1s-chat-new-group{border:0;border-radius:12px;padding:9px 11px;background:#21402b;color:#fff;font-weight:800;font-size:11px}
#global-chat-dialog .p1s-chat-groups-list{padding:8px}
#global-chat-dialog .p1s-chat-group-row{width:100%;display:flex;align-items:center;gap:10px;padding:10px;border:0;border-bottom:1px solid #edf1e9;background:transparent;text-align:left;color:#263424}
#global-chat-dialog .p1s-chat-group-row:hover,#global-chat-dialog .p1s-chat-group-row.active{background:#eef5e7;border-radius:12px}
#global-chat-dialog .p1s-chat-group-avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#21402b;color:#dfff67;font-weight:900;flex:0 0 42px}
#global-chat-dialog .p1s-chat-group-row>span:nth-child(2){display:flex;flex-direction:column;gap:3px;min-width:0;flex:1}
#global-chat-dialog .p1s-chat-group-row strong{font-size:13px;color:#263424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#global-chat-dialog .p1s-chat-group-row small{font-size:10px;color:#83907e}
#global-chat-dialog .p1s-chat-group-row>b{min-width:22px;height:22px;border-radius:999px;display:grid;place-items:center;background:#dfff67;color:#203015;font-size:10px}
#global-chat-dialog .p1s-chat-group-create{margin:8px;padding:12px;background:#fff;border:1px solid #dfe8d8;border-radius:16px;box-shadow:0 10px 28px rgba(30,52,26,.08)}
#global-chat-dialog .p1s-chat-group-create-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
#global-chat-dialog .p1s-chat-group-create-head button{width:30px;height:30px;border:0;border-radius:10px;background:#eef3e9;color:#45543f;font-size:20px}
#global-chat-dialog .p1s-chat-group-create label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:700;color:#475542}
#global-chat-dialog .p1s-chat-group-create input[type="text"]{height:42px;border:1px solid #d6e1ce;border-radius:12px;padding:0 12px;background:#fbfdf9;color:#263424}
#global-chat-dialog .p1s-chat-group-create>p{margin:12px 0 6px;font-size:11px;color:#657160}
#global-chat-dialog .p1s-chat-group-members{max-height:190px;overflow:auto;border:1px solid #e2eadc;border-radius:12px;background:#fafcf8}
#global-chat-dialog .p1s-chat-member-option{display:flex!important;flex-direction:row!important;align-items:center;gap:9px;padding:9px 10px;border-bottom:1px solid #edf1e9;font-weight:600!important}
#global-chat-dialog .p1s-chat-member-option:last-child{border-bottom:0}
#global-chat-dialog .p1s-chat-member-option span{display:flex;flex-direction:column;font-size:11px;color:#344131}
#global-chat-dialog .p1s-chat-member-option small{font-size:9px;color:#899485;font-weight:400}
#global-chat-dialog .p1s-chat-group-create .button{width:100%;margin-top:10px}
#global-chat-dialog .chat-message-menu{z-index:8}
.global-chat-orb b#global-chat-badge{position:absolute!important;top:-4px!important;right:-4px!important;min-width:25px!important;height:25px!important;padding:0 7px!important;border-radius:999px!important;display:grid!important;place-items:center!important;background:#ef3f4f!important;color:#fff!important;border:3px solid #fff!important;font-size:11px!important;font-weight:900!important;box-shadow:0 5px 15px rgba(190,29,49,.28)!important}
.global-chat-orb b#global-chat-badge[hidden]{display:none!important}
.global-chat-orb.has-unread{animation:p1sChatUnreadPulse 1.35s ease-in-out infinite}
@keyframes p1sChatUnreadPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.045)}}
@media(max-width:700px){#global-chat-dialog .p1s-chat-room-current small{display:none}#global-chat-dialog .p1s-chat-group-members{max-height:150px}}


/* P1S v8.20.7 · Chat de Operaciones profesional claro + grupos táctiles */
#global-chat-dialog.p1s-chat-v2.global-chat-dialog{
  width:min(580px,calc(100vw - 36px))!important;
  height:min(84dvh,860px)!important;
  max-height:min(84dvh,860px)!important;
  border:1px solid #dbe5d8!important;
  border-radius:26px!important;
  background:#f6f8f4!important;
  color:#263329!important;
  box-shadow:0 28px 80px rgba(30,48,34,.20),0 2px 10px rgba(30,48,34,.06)!important;
}
#global-chat-dialog .p1s-chat-top{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:16px!important;
  padding:14px 16px!important;background:#fff!important;border-bottom:1px solid #e4eae1!important;
}
#global-chat-dialog .p1s-chat-brand{gap:11px!important;align-items:center!important}
#global-chat-dialog .p1s-chat-logo{width:46px!important;height:46px!important;flex:0 0 46px!important;border-radius:14px!important;border:1px solid #dce7d8!important;background:#eef5eb!important}
#global-chat-dialog .p1s-chat-heading .eyebrow{margin:0 0 2px!important;color:#4f7557!important;font-size:9px!important;letter-spacing:.12em!important;font-weight:900!important}
#global-chat-dialog .p1s-chat-title-line{gap:7px!important}
#global-chat-dialog .p1s-chat-title-line h2{margin:0!important;color:#253128!important;font-size:17px!important;line-height:1.15!important;font-weight:850!important;letter-spacing:-.02em!important}
#global-chat-dialog .p1s-chat-live-dot{width:8px!important;height:8px!important;background:#33b85c!important;box-shadow:0 0 0 4px rgba(51,184,92,.12)!important}
#global-chat-dialog .p1s-chat-heading #global-chat-status{display:block!important;margin:3px 0 0!important;color:#7d8b7f!important;font-size:10px!important}
#global-chat-dialog .p1s-chat-top-side{display:grid!important;grid-template-columns:auto auto!important;align-items:center!important;gap:7px!important}
#global-chat-dialog .p1s-chat-window-actions{grid-column:2!important;grid-row:1 / span 2!important;display:flex!important;gap:5px!important}
#global-chat-dialog .p1s-chat-window-button{width:32px!important;height:32px!important;min-width:32px!important;border-radius:10px!important;border:1px solid #e1e8df!important;background:#f7faf6!important;color:#536257!important;font-size:19px!important;box-shadow:none!important}
#global-chat-dialog .p1s-chat-window-button:hover{background:#edf4ea!important;color:#24442d!important}
#global-chat-dialog .p1s-chat-online-pill,#global-chat-dialog .p1s-chat-gps-stat{min-height:27px!important;height:27px!important;border:1px solid #dde7da!important;border-radius:999px!important;background:#f8fbf7!important;color:#5a685d!important;padding:0 9px!important;font-size:9px!important;font-weight:800!important;box-shadow:none!important}
#global-chat-dialog .p1s-chat-online-pill{grid-column:1!important;grid-row:1!important}
#global-chat-dialog .p1s-chat-gps-stat{grid-column:1!important;grid-row:2!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}
#global-chat-dialog .p1s-chat-online-pill i{background:#35b95d!important}

#global-chat-dialog .p1s-chat-tabs{display:flex!important;gap:5px!important;padding:7px 10px!important;background:#fff!important;border-bottom:1px solid #e5ebe2!important}
#global-chat-dialog .p1s-chat-tab{flex:1!important;height:36px!important;border:1px solid transparent!important;border-radius:11px!important;background:transparent!important;color:#718075!important;font-size:11px!important;font-weight:800!important;gap:6px!important;box-shadow:none!important}
#global-chat-dialog .p1s-chat-tab.active{background:#edf5e9!important;color:#25482f!important;border-color:#dbe9d6!important;box-shadow:none!important}
#global-chat-dialog .p1s-chat-tab b{background:#2d6a3b!important;color:#fff!important;min-width:18px!important;height:18px!important;font-size:9px!important}

#global-chat-dialog .p1s-chat-room-strip{padding:8px 10px!important;background:#f6f8f4!important;border-bottom:1px solid #e3e9e0!important}
#global-chat-dialog .p1s-chat-room-current{display:grid!important;grid-template-columns:36px minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;width:100%!important;min-height:52px!important;padding:7px 9px!important;border:1px solid #dce6d9!important;border-radius:14px!important;background:#fff!important;color:#28352b!important;box-shadow:0 3px 10px rgba(33,51,35,.04)!important;text-align:left!important}
#global-chat-dialog .p1s-chat-room-avatar{width:36px!important;height:36px!important;border-radius:12px!important;display:grid!important;place-items:center!important;background:linear-gradient(145deg,#254b31,#173c26)!important;color:#e7ff76!important;font-size:14px!important;font-weight:900!important}
#global-chat-dialog .p1s-chat-room-copy{display:flex!important;flex-direction:column!important;min-width:0!important;gap:2px!important}
#global-chat-dialog .p1s-chat-room-copy strong{font-size:12px!important;color:#263329!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#global-chat-dialog .p1s-chat-room-copy small{margin:0!important;color:#7c8a7e!important;font-size:9px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#global-chat-dialog .p1s-chat-room-switch{display:inline-flex!important;align-items:center!important;gap:5px!important;padding:6px 8px!important;border-radius:9px!important;background:#f0f5ed!important;color:#56705b!important;font-size:9px!important;font-weight:800!important;white-space:nowrap!important}

#global-chat-dialog .p1s-chat-selection-shell{background:#fff!important;border-bottom:1px solid #e6ece3!important}
#global-chat-dialog .p1s-chat-tools-row{display:flex!important;align-items:center!important;justify-content:space-between!important;min-height:32px!important;padding:4px 11px!important}
#global-chat-dialog .p1s-chat-tools-label{font-size:9px!important;color:#8c978e!important;letter-spacing:.02em!important}
#global-chat-dialog .p1s-chat-tool-button.select{min-height:26px!important;padding:0 8px!important;border:1px solid transparent!important;border-radius:8px!important;background:transparent!important;color:#68766b!important;font-size:9px!important;font-weight:800!important}
#global-chat-dialog .p1s-chat-tool-button.select:hover,#global-chat-dialog .p1s-chat-tool-button.select.active{background:#eef4eb!important;border-color:#dde8d9!important;color:#2f5839!important}
#global-chat-dialog .p1s-chat-selection-bar{gap:6px!important;padding:7px 10px!important;background:#f6f9f4!important;border-top:1px solid #e5ece1!important}

#global-chat-dialog .p1s-chat-panel{background:#f6f8f4!important}
#global-chat-dialog .p1s-chat-users-preview{min-height:34px!important;padding:5px 11px!important;background:#f9fbf8!important;border-bottom:1px solid #e8ede6!important}
#global-chat-dialog .global-chat-messages{padding:13px 12px 18px!important;background:
 radial-gradient(circle at 20% 10%,rgba(70,130,77,.035),transparent 26%),
 linear-gradient(#f5f7f2,#f5f7f2)!important;
 scrollbar-width:thin!important;scrollbar-color:#c8d4c6 transparent!important;
}
#global-chat-dialog .chat-message{gap:7px!important;margin:0 0 9px!important;position:relative!important}
#global-chat-dialog .chat-avatar{width:32px!important;height:32px!important;flex:0 0 32px!important;border-radius:50%!important;border:1px solid #dfe7dc!important;box-shadow:none!important}
#global-chat-dialog .chat-message-content{max-width:78%!important;padding:8px 10px 7px!important;border:1px solid #dfe6dd!important;border-radius:14px 14px 14px 5px!important;background:#fff!important;color:#29342b!important;box-shadow:0 2px 5px rgba(32,49,34,.035)!important}
#global-chat-dialog .chat-message.chat-me .chat-message-content{background:#e5f3df!important;border-color:#d2e8cb!important;color:#24402b!important;border-radius:14px 14px 5px 14px!important}
#global-chat-dialog .chat-message-heading{gap:12px!important;margin-bottom:2px!important}
#global-chat-dialog .chat-message-heading strong{font-size:10px!important;color:#385540!important;font-weight:850!important}
#global-chat-dialog .chat-message-heading time{font-size:8px!important;color:#8b968d!important}
#global-chat-dialog .chat-message-content>small{display:block!important;margin:0 0 4px!important;font-size:8px!important;color:#89948b!important}
#global-chat-dialog .chat-message-text{font-size:12px!important;line-height:1.38!important;color:inherit!important;overflow-wrap:anywhere!important}
#global-chat-dialog .chat-message-actions{align-self:flex-start!important;margin-top:2px!important}
#global-chat-dialog .chat-message-menu-toggle{width:27px!important;height:27px!important;border-radius:8px!important;background:transparent!important;color:#8b978d!important}
#global-chat-dialog .chat-message-menu{border:1px solid #dce5d9!important;border-radius:12px!important;background:#fff!important;box-shadow:0 14px 30px rgba(33,48,35,.14)!important;overflow:hidden!important}
#global-chat-dialog .chat-message-menu button{font-size:10px!important;color:#405045!important;background:#fff!important}
#global-chat-dialog .chat-message-menu button:hover{background:#f3f7f1!important}
#global-chat-dialog .chat-message-menu button.danger{color:#b23d43!important}
#global-chat-dialog .chat-older{align-self:center!important;margin:8px auto 0!important;border:1px solid #dbe5d8!important;border-radius:999px!important;background:#fff!important;color:#55705a!important;font-size:9px!important;font-weight:800!important;padding:6px 10px!important}
#global-chat-dialog .chat-empty{margin:auto!important;padding:36px 24px!important;color:#89958a!important;font-size:11px!important;text-align:center!important}

#global-chat-dialog .p1s-chat-composer{display:grid!important;grid-template-columns:minmax(0,1fr) 42px!important;grid-template-rows:auto auto!important;gap:5px 7px!important;padding:9px 10px max(9px,env(safe-area-inset-bottom))!important;background:#fff!important;border-top:1px solid #e0e8dd!important}
#global-chat-dialog .p1s-chat-input-wrap{grid-column:1!important;display:flex!important;align-items:center!important;gap:3px!important;min-height:42px!important;padding:3px 5px!important;border:1px solid #d9e4d6!important;border-radius:14px!important;background:#f8faf7!important;box-shadow:inset 0 1px 2px rgba(40,58,42,.025)!important}
#global-chat-dialog .p1s-chat-emoji-inline,#global-chat-dialog .p1s-chat-image-button{width:34px!important;height:34px!important;min-width:34px!important;border:0!important;border-radius:10px!important;background:transparent!important;color:#68776b!important;display:grid!important;place-items:center!important;font-size:18px!important}
#global-chat-dialog .p1s-chat-emoji-inline:hover,#global-chat-dialog .p1s-chat-image-button:hover{background:#edf3ea!important;color:#2f5b39!important}
#global-chat-dialog #global-chat-text{flex:1!important;width:100%!important;height:34px!important;min-height:34px!important;max-height:34px!important;padding:7px 5px!important;border:0!important;outline:0!important;background:transparent!important;color:#273229!important;font-size:12px!important}
#global-chat-dialog .p1s-chat-send-visible{grid-column:2!important;grid-row:1!important;width:42px!important;height:42px!important;border:0!important;border-radius:13px!important;background:linear-gradient(145deg,#315d3b,#1f4a2c)!important;color:#eaff7a!important;display:grid!important;place-items:center!important;box-shadow:0 5px 12px rgba(38,79,48,.18)!important}
#global-chat-dialog .p1s-chat-send-visible:disabled{opacity:.45!important;box-shadow:none!important}
#global-chat-dialog .chat-compose-hint{grid-column:1/3!important;margin-left:4px!important;color:#95a096!important;font-size:8px!important}
#global-chat-dialog .p1s-chat-emoji-picker{left:10px!important;right:10px!important;bottom:65px!important;border:1px solid #dbe5d8!important;background:#fff!important;box-shadow:0 14px 34px rgba(31,46,32,.16)!important}

/* Grupos y conversaciones */
#global-chat-dialog .p1s-chat-groups-panel{position:relative!important;display:flex!important;flex-direction:column!important;min-height:0!important;overflow:hidden!important;background:#f6f8f4!important}
#global-chat-dialog .p1s-chat-groups-panel[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head{flex:0 0 auto!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:12px 12px 9px!important;border-bottom:0!important;background:#f6f8f4!important}
#global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head>div{display:flex!important;flex-direction:column!important;gap:1px!important}
#global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head strong{font-size:13px!important;color:#29352b!important}
#global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head span{font-size:9px!important;color:#849087!important;text-align:left!important}
#global-chat-dialog .p1s-chat-new-group{display:inline-flex!important;align-items:center!important;gap:4px!important;min-height:34px!important;padding:0 10px!important;border:1px solid #d7e5d4!important;border-radius:11px!important;background:#fff!important;color:#2f5838!important;font-size:10px!important;font-weight:850!important;box-shadow:0 2px 7px rgba(34,52,36,.04)!important}
#global-chat-dialog .p1s-chat-new-group:hover{background:#edf5e9!important;border-color:#cde0c9!important}
#global-chat-dialog .p1s-chat-groups-search{flex:0 0 auto!important;display:flex!important;align-items:center!important;gap:7px!important;margin:0 12px 8px!important;height:38px!important;padding:0 10px!important;border:1px solid #dce5d9!important;border-radius:12px!important;background:#fff!important;color:#839086!important}
#global-chat-dialog .p1s-chat-groups-search input{flex:1!important;min-width:0!important;border:0!important;outline:0!important;background:transparent!important;color:#2a352c!important;font-size:11px!important}
#global-chat-dialog .p1s-chat-groups-list{flex:1 1 auto!important;min-height:0!important;padding:0 8px 10px!important;overflow-y:auto!important;overscroll-behavior:contain!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:thin!important;scrollbar-color:#c9d5c6 transparent!important}
#global-chat-dialog .p1s-chat-group-row{width:100%!important;display:grid!important;grid-template-columns:44px minmax(0,1fr) auto!important;align-items:center!important;gap:10px!important;min-height:60px!important;padding:8px!important;margin:0 0 4px!important;border:1px solid transparent!important;border-radius:14px!important;background:transparent!important;color:#29352b!important;text-align:left!important;transition:background .15s,border-color .15s!important}
#global-chat-dialog .p1s-chat-group-row:hover{background:#fff!important;border-color:#e3eae0!important}
#global-chat-dialog .p1s-chat-group-row.active{background:#edf5e9!important;border-color:#d7e8d2!important;box-shadow:inset 3px 0 0 #4b8155!important}
#global-chat-dialog .p1s-chat-group-avatar{width:44px!important;height:44px!important;flex:0 0 44px!important;border-radius:14px!important;background:linear-gradient(145deg,#31583a,#24482e)!important;color:#e8ff7a!important;font-size:15px!important;font-weight:900!important}
#global-chat-dialog .p1s-chat-group-main{display:flex!important;flex-direction:column!important;gap:3px!important;min-width:0!important}
#global-chat-dialog .p1s-chat-group-line{display:flex!important;align-items:center!important;gap:6px!important;min-width:0!important}
#global-chat-dialog .p1s-chat-group-line strong{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:11px!important;color:#2a362c!important}
#global-chat-dialog .p1s-chat-group-line em{font-style:normal!important;padding:2px 5px!important;border-radius:999px!important;background:#d9ead4!important;color:#376540!important;font-size:7px!important;font-weight:900!important;text-transform:uppercase!important;letter-spacing:.04em!important}
#global-chat-dialog .p1s-chat-group-main small{font-size:9px!important;color:#879288!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#global-chat-dialog .p1s-chat-group-row>b{min-width:22px!important;height:22px!important;padding:0 6px!important;border-radius:999px!important;background:#2f683b!important;color:#fff!important;font-size:9px!important;font-weight:900!important}
#global-chat-dialog .p1s-chat-group-chevron{font-size:21px!important;line-height:1!important;color:#a4aea6!important;padding-right:3px!important}
#global-chat-dialog .p1s-chat-groups-empty{height:100%!important;min-height:180px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;color:#8b978e!important;text-align:center!important;padding:20px!important}
#global-chat-dialog .p1s-chat-groups-empty strong{font-size:11px!important;color:#5b685e!important}
#global-chat-dialog .p1s-chat-groups-empty small{font-size:9px!important}

/* El creador de grupos es una vista completa independiente: no compite por scroll con la lista */
#global-chat-dialog .p1s-chat-group-create{
  position:absolute!important;inset:0!important;z-index:20!important;margin:0!important;padding:0!important;
  display:flex!important;flex-direction:column!important;min-height:0!important;max-height:none!important;
  border:0!important;border-radius:0!important;background:#f6f8f4!important;box-shadow:none!important;overflow:hidden!important;
}
#global-chat-dialog .p1s-chat-group-create[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-group-create-head{flex:0 0 auto!important;display:grid!important;grid-template-columns:34px minmax(0,1fr) auto!important;align-items:center!important;gap:9px!important;margin:0!important;padding:10px 11px!important;border-bottom:1px solid #e1e8de!important;background:#fff!important}
#global-chat-dialog .p1s-chat-group-create-head .p1s-chat-group-back{width:34px!important;height:34px!important;border:1px solid #e1e8df!important;border-radius:11px!important;background:#f7faf6!important;color:#405046!important;font-size:18px!important}
#global-chat-dialog .p1s-chat-group-create-head>span{display:flex!important;flex-direction:column!important;min-width:0!important;gap:1px!important}
#global-chat-dialog .p1s-chat-group-create-head small{font-size:8px!important;letter-spacing:.10em!important;color:#718a75!important;font-weight:900!important}
#global-chat-dialog .p1s-chat-group-create-head strong{font-size:12px!important;color:#29352b!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#global-chat-dialog .p1s-chat-group-create-head>b{padding:4px 7px!important;border-radius:999px!important;background:#edf5e9!important;color:#45634b!important;font-size:8px!important;font-weight:850!important;white-space:nowrap!important}
#global-chat-dialog .p1s-chat-group-create-body{flex:1 1 auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;padding:12px!important;overflow:hidden!important}
#global-chat-dialog .p1s-chat-group-name-field{flex:0 0 auto!important;display:flex!important;flex-direction:column!important;gap:5px!important;font-size:9px!important;font-weight:850!important;color:#55635a!important}
#global-chat-dialog .p1s-chat-group-name-field input{height:40px!important;border:1px solid #d9e4d6!important;border-radius:12px!important;padding:0 11px!important;background:#fff!important;color:#29352b!important;font-size:11px!important;outline:0!important}
#global-chat-dialog .p1s-chat-group-name-field input:focus,#global-chat-dialog .p1s-chat-member-search:focus-within{border-color:#9fc5a0!important;box-shadow:0 0 0 3px rgba(72,129,80,.08)!important}
#global-chat-dialog .p1s-chat-group-members-head{flex:0 0 auto!important;display:flex!important;align-items:center!important;justify-content:space-between!important;margin:12px 1px 6px!important}
#global-chat-dialog .p1s-chat-group-members-head>span{display:flex!important;flex-direction:column!important;gap:1px!important}
#global-chat-dialog .p1s-chat-group-members-head strong{font-size:10px!important;color:#3a493d!important}
#global-chat-dialog .p1s-chat-group-members-head small{font-size:8px!important;color:#8a958c!important}
#global-chat-dialog .p1s-chat-member-search{flex:0 0 auto!important;height:38px!important;display:flex!important;align-items:center!important;gap:7px!important;padding:0 10px!important;border:1px solid #dbe5d8!important;border-radius:12px!important;background:#fff!important;color:#87948a!important}
#global-chat-dialog .p1s-chat-member-search input{flex:1!important;min-width:0!important;border:0!important;outline:0!important;background:transparent!important;color:#2a352c!important;font-size:10px!important}
#global-chat-dialog .p1s-chat-group-members{flex:1 1 auto!important;min-height:120px!important;max-height:none!important;margin-top:7px!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:thin!important;scrollbar-color:#c6d3c4 transparent!important;border:1px solid #e0e8dd!important;border-radius:14px!important;background:#fff!important;outline:0!important}
#global-chat-dialog .p1s-chat-member-option{display:grid!important;grid-template-columns:20px 34px minmax(0,1fr) 8px!important;align-items:center!important;gap:9px!important;min-height:52px!important;padding:7px 9px!important;border-bottom:1px solid #edf1eb!important;background:#fff!important;color:#334035!important;font-weight:600!important;cursor:pointer!important;touch-action:pan-y!important}
#global-chat-dialog .p1s-chat-member-option[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-member-option:last-child{border-bottom:0!important}
#global-chat-dialog .p1s-chat-member-option:hover{background:#f8faf7!important}
#global-chat-dialog .p1s-chat-member-option:has(input:checked){background:#f0f6ed!important}
#global-chat-dialog .p1s-chat-member-option input{width:17px!important;height:17px!important;accent-color:#356b41!important}
#global-chat-dialog .p1s-chat-member-avatar{width:34px!important;height:34px!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:#e8efe5!important;color:#36553e!important;font-size:11px!important;font-weight:900!important}
#global-chat-dialog .p1s-chat-member-copy{display:flex!important;flex-direction:column!important;min-width:0!important;gap:2px!important}
#global-chat-dialog .p1s-chat-member-copy strong{font-size:10px!important;color:#344137!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#global-chat-dialog .p1s-chat-member-copy small{font-size:8px!important;color:#8a958c!important;font-weight:500!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#global-chat-dialog .p1s-chat-member-status{width:7px!important;height:7px!important;border-radius:50%!important;background:#c7d0c7!important}
#global-chat-dialog .p1s-chat-member-status.live{background:#35b95d!important;box-shadow:0 0 0 3px rgba(53,185,93,.10)!important}
#global-chat-dialog .p1s-chat-group-create .form-error{flex:0 0 auto!important;margin:7px 1px 0!important;font-size:9px!important;color:#b74248!important}
#global-chat-dialog .p1s-chat-group-create-footer{flex:0 0 auto!important;display:grid!important;grid-template-columns:1fr 1.35fr!important;gap:8px!important;padding:9px 11px max(9px,env(safe-area-inset-bottom))!important;border-top:1px solid #e0e8dd!important;background:#fff!important}
#global-chat-dialog .p1s-chat-group-create-footer .button{width:100%!important;min-height:39px!important;margin:0!important;border-radius:11px!important;font-size:10px!important;font-weight:850!important}
#global-chat-dialog .p1s-chat-group-create-footer .button-primary{background:#285736!important;border-color:#285736!important;color:#efff79!important}
#global-chat-dialog .p1s-chat-group-create-footer .button-outline{background:#fff!important;border-color:#dbe5d8!important;color:#536159!important}

#global-chat-dialog .p1s-chat-people{padding:7px 9px 14px!important;overflow-y:auto!important;overscroll-behavior:contain!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important}
#global-chat-dialog .p1s-traccar-user-row{border-radius:12px!important;border-bottom:1px solid #e9eee7!important;background:transparent!important;padding:8px!important}

@media(max-width:700px){
 #global-chat-dialog.p1s-chat-v2.global-chat-dialog{right:5px!important;bottom:calc(74px + env(safe-area-inset-bottom))!important;inset:auto 5px calc(74px + env(safe-area-inset-bottom)) auto!important;width:calc(100vw - 10px)!important;max-width:calc(100vw - 10px)!important;height:min(78dvh,720px)!important;max-height:min(78dvh,720px)!important;border-radius:20px!important}
 #global-chat-dialog .p1s-chat-top{padding:10px 10px!important}
 #global-chat-dialog .p1s-chat-logo{width:40px!important;height:40px!important;flex-basis:40px!important;border-radius:12px!important}
 #global-chat-dialog .p1s-chat-title-line h2{font-size:15px!important}
 #global-chat-dialog .p1s-chat-online-pill,#global-chat-dialog .p1s-chat-gps-stat{display:none!important}
 #global-chat-dialog .p1s-chat-window-actions{grid-column:1!important;grid-row:1!important}
 #global-chat-dialog .p1s-chat-room-switch{font-size:0!important;padding:7px!important}
 #global-chat-dialog .p1s-chat-room-switch .icon{font-size:14px!important}
 #global-chat-dialog .p1s-chat-room-current{grid-template-columns:34px minmax(0,1fr) auto!important;min-height:48px!important}
 #global-chat-dialog .p1s-chat-room-avatar{width:34px!important;height:34px!important}
 #global-chat-dialog .p1s-chat-tools-label{display:none!important}
 #global-chat-dialog .p1s-chat-tools-row{justify-content:flex-end!important;min-height:28px!important}
 #global-chat-dialog .global-chat-messages{padding:10px 8px 14px!important}
 #global-chat-dialog .chat-avatar{width:29px!important;height:29px!important;flex-basis:29px!important}
 #global-chat-dialog .chat-message-content{max-width:82%!important}
 #global-chat-dialog .p1s-chat-composer{grid-template-columns:minmax(0,1fr) 40px!important;padding:7px 8px max(7px,env(safe-area-inset-bottom))!important}
 #global-chat-dialog .p1s-chat-send-visible{width:40px!important;height:40px!important}
 #global-chat-dialog .p1s-chat-input-wrap{min-height:40px!important}
 #global-chat-dialog .p1s-chat-emoji-inline,#global-chat-dialog .p1s-chat-image-button{width:31px!important;height:31px!important;min-width:31px!important}
 #global-chat-dialog .chat-compose-hint{display:none!important}
 #global-chat-dialog .p1s-chat-group-create-head{grid-template-columns:34px minmax(0,1fr) auto!important;padding:8px!important}
 #global-chat-dialog .p1s-chat-group-create-body{padding:9px!important}
 #global-chat-dialog .p1s-chat-group-members{min-height:130px!important}
 #global-chat-dialog .p1s-chat-member-option{min-height:50px!important;padding:6px 8px!important}
}


/* v8.18.1 · limpieza visual del encabezado de conversación */
#global-chat-dialog .p1s-chat-room-strip{
  padding:10px 12px !important;
  background:linear-gradient(180deg,#f8fbf6 0%,#f2f7ef 100%) !important;
  border-bottom:1px solid #dfe8dc !important;
}
#global-chat-dialog .p1s-chat-room-current{
  display:grid !important;
  grid-template-columns:40px minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:12px !important;
  width:100% !important;
  min-height:58px !important;
  padding:10px 12px !important;
  border:1px solid #dce6d8 !important;
  border-radius:16px !important;
  background:#ffffff !important;
  color:#28352b !important;
  box-shadow:0 6px 18px rgba(31,51,31,.05) !important;
  text-align:left !important;
}
#global-chat-dialog .p1s-chat-room-current:hover{
  background:#fbfdf9 !important;
  border-color:#cfe0cc !important;
}
#global-chat-dialog .p1s-chat-room-current > span{
  width:auto !important;
  height:auto !important;
  background:none !important;
  color:inherit !important;
  border-radius:0 !important;
  display:block !important;
  place-items:initial !important;
}
#global-chat-dialog .p1s-chat-room-avatar{
  width:40px !important;
  height:40px !important;
  min-width:40px !important;
  border-radius:13px !important;
  display:grid !important;
  place-items:center !important;
  background:linear-gradient(145deg,#21452d,#183723) !important;
  color:#e6ff75 !important;
  font-size:15px !important;
  font-weight:900 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 6px 14px rgba(20,45,26,.14) !important;
}
#global-chat-dialog .p1s-chat-room-copy{
  display:flex !important;
  flex-direction:column !important;
  justify-content:center !important;
  min-width:0 !important;
  gap:3px !important;
}
#global-chat-dialog .p1s-chat-room-copy strong{
  font-size:14px !important;
  line-height:1.15 !important;
  color:#223025 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#global-chat-dialog .p1s-chat-room-copy small{
  display:block !important;
  margin:0 !important;
  color:#708071 !important;
  font-size:11px !important;
  line-height:1.2 !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
#global-chat-dialog .p1s-chat-room-switch{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:6px !important;
  min-height:34px !important;
  padding:0 11px !important;
  border:1px solid #dbe6d7 !important;
  border-radius:11px !important;
  background:linear-gradient(180deg,#f8fbf7 0%,#eef5ec 100%) !important;
  color:#506756 !important;
  font-size:10px !important;
  font-weight:800 !important;
  white-space:nowrap !important;
}
#global-chat-dialog .p1s-chat-room-switch .icon{
  width:15px !important;
  height:15px !important;
}
#global-chat-dialog .p1s-chat-tools-row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:10px !important;
  min-height:38px !important;
  padding:7px 12px !important;
}
#global-chat-dialog .p1s-chat-tools-label{
  display:inline-flex !important;
  align-items:center !important;
  gap:6px !important;
  font-size:11px !important;
  color:#869286 !important;
}
#global-chat-dialog .p1s-chat-tools-label::before{
  content:'';
  width:8px;
  height:8px;
  border-radius:50%;
  background:#35c46a;
  box-shadow:0 0 0 4px rgba(53,196,106,.12);
}
#global-chat-dialog .p1s-chat-tool-button.select{
  min-height:32px !important;
  padding:0 12px !important;
  border-radius:10px !important;
  border:1px solid #d8e3d6 !important;
  background:#fff !important;
  color:#405544 !important;
  font-size:11px !important;
  font-weight:800 !important;
}
#global-chat-dialog .p1s-chat-tool-button.select:hover{
  background:#f5f9f3 !important;
}
#global-chat-dialog .p1s-chat-group-row{
  box-shadow:0 1px 0 rgba(0,0,0,.02) !important;
}
#global-chat-dialog .p1s-chat-group-row .p1s-chat-group-chevron{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:24px !important;
  height:24px !important;
  border-radius:50% !important;
  background:#f1f5ef !important;
  color:#69806e !important;
  font-size:14px !important;
}
@media (max-width:700px){
  #global-chat-dialog .p1s-chat-room-current{
    grid-template-columns:36px minmax(0,1fr) auto !important;
    min-height:54px !important;
    padding:8px 10px !important;
    gap:10px !important;
  }
  #global-chat-dialog .p1s-chat-room-avatar{
    width:36px !important;
    height:36px !important;
    min-width:36px !important;
    font-size:13px !important;
  }
  #global-chat-dialog .p1s-chat-room-copy strong{font-size:13px !important;}
  #global-chat-dialog .p1s-chat-room-copy small{font-size:10px !important;}
  #global-chat-dialog .p1s-chat-room-switch{
    min-height:32px !important;
    padding:0 9px !important;
    font-size:0 !important;
  }
  #global-chat-dialog .p1s-chat-room-switch .icon{
    width:16px !important;
    height:16px !important;
  }
  #global-chat-dialog .p1s-chat-tools-row{
    min-height:34px !important;
    padding:6px 10px !important;
  }
  #global-chat-dialog .p1s-chat-tools-label{
    font-size:10px !important;
  }
}

/* v8.20.7 · perfil compartido de grupos */
#global-chat-dialog .p1s-chat-room-strip{
  gap:8px!important;
}
#global-chat-dialog .p1s-chat-room-current{
  flex:1 1 auto!important;
  width:auto!important;
  min-width:0!important;
}
#global-chat-dialog .p1s-chat-room-edit{
  flex:0 0 42px!important;
  width:42px!important;
  height:42px!important;
  border:1px solid #d9e4d6!important;
  border-radius:13px!important;
  background:#fff!important;
  color:#315b3a!important;
  font-size:18px!important;
  font-weight:900!important;
  display:grid!important;
  place-items:center!important;
  box-shadow:0 4px 12px rgba(31,51,31,.04)!important;
  cursor:pointer!important;
}
#global-chat-dialog .p1s-chat-room-edit[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-room-edit:hover{background:#eef6eb!important;border-color:#c9ddc6!important}
#global-chat-dialog .p1s-chat-room-avatar,
#global-chat-dialog .p1s-chat-group-avatar{
  overflow:hidden!important;
}
#global-chat-dialog .p1s-chat-room-avatar img,
#global-chat-dialog .p1s-chat-group-avatar img{
  width:100%!important;
  height:100%!important;
  display:block!important;
  object-fit:cover!important;
}
#global-chat-dialog .p1s-chat-room-avatar.has-photo{
  background:#e9efe7!important;
  color:transparent!important;
  box-shadow:0 4px 12px rgba(24,52,30,.10)!important;
}
#global-chat-dialog .p1s-chat-group-profile-editor{
  flex:0 0 auto!important;
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  padding:11px!important;
  border:1px solid #dfe8dc!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 4px 16px rgba(31,51,31,.035)!important;
}
#global-chat-dialog .p1s-chat-group-photo-block{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
}
#global-chat-dialog .p1s-chat-group-photo-preview{
  width:58px!important;
  height:58px!important;
  flex:0 0 58px!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  border-radius:17px!important;
  border:1px solid #d5e2d2!important;
  background:linear-gradient(145deg,#31583a,#21462d)!important;
  color:#eaff79!important;
  font-size:20px!important;
  font-weight:900!important;
  box-shadow:0 7px 18px rgba(30,67,39,.12)!important;
}
#global-chat-dialog .p1s-chat-group-photo-preview img{
  width:100%!important;
  height:100%!important;
  display:block!important;
  object-fit:cover!important;
}
#global-chat-dialog .p1s-chat-group-photo-actions{
  flex:1!important;
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:6px!important;
}
#global-chat-dialog .p1s-chat-group-photo-button,
#global-chat-dialog .p1s-chat-group-photo-remove{
  min-height:32px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:0 10px!important;
  border:1px solid #d8e4d5!important;
  border-radius:10px!important;
  background:#f7faf6!important;
  color:#365740!important;
  font:inherit!important;
  font-size:9px!important;
  font-weight:850!important;
  cursor:pointer!important;
}
#global-chat-dialog .p1s-chat-group-photo-remove{color:#8d4b4b!important;background:#fff8f7!important;border-color:#ecd9d6!important}
#global-chat-dialog .p1s-chat-group-photo-remove[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-group-photo-actions small{
  flex-basis:100%!important;
  color:#8a958c!important;
  font-size:8px!important;
  line-height:1.3!important;
}
#global-chat-dialog .p1s-chat-group-description-field{
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  color:#55635a!important;
  font-size:9px!important;
  font-weight:850!important;
}
#global-chat-dialog .p1s-chat-group-description-field textarea{
  width:100%!important;
  min-height:62px!important;
  max-height:92px!important;
  resize:vertical!important;
  border:1px solid #d9e4d6!important;
  border-radius:12px!important;
  padding:9px 11px!important;
  background:#fff!important;
  color:#29352b!important;
  font:inherit!important;
  font-size:11px!important;
  line-height:1.35!important;
  outline:0!important;
  box-sizing:border-box!important;
}
#global-chat-dialog .p1s-chat-group-description-field textarea:focus{
  border-color:#9fc5a0!important;
  box-shadow:0 0 0 3px rgba(72,129,80,.08)!important;
}
#global-chat-dialog .p1s-chat-group-description-field small{
  color:#8b968d!important;
  font-size:8px!important;
  font-weight:500!important;
}
#global-chat-dialog .p1s-chat-group-members-section{
  flex:1 1 auto!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
}
#global-chat-dialog .p1s-chat-group-members-section[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-group-create.editing-group .p1s-chat-group-create-body{
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
  -webkit-overflow-scrolling:touch!important;
}
#global-chat-dialog .p1s-chat-group-create.editing-group .p1s-chat-group-profile-editor{
  margin-bottom:auto!important;
}
@media(max-width:700px){
  #global-chat-dialog .p1s-chat-room-edit{
    flex-basis:38px!important;
    width:38px!important;
    height:38px!important;
    border-radius:12px!important;
  }
  #global-chat-dialog .p1s-chat-group-photo-preview{
    width:52px!important;
    height:52px!important;
    flex-basis:52px!important;
    border-radius:15px!important;
  }
  #global-chat-dialog .p1s-chat-group-profile-editor{
    padding:9px!important;
    gap:9px!important;
  }
}


/* v8.20.7 · logos completos, sin recorte */
#global-chat-dialog .p1s-chat-logo{
  width:76px!important;
  height:54px!important;
  flex:0 0 76px!important;
  padding:8px!important;
  box-sizing:border-box!important;
  border-radius:16px!important;
  overflow:hidden!important;
  background:linear-gradient(145deg,#f7faef,#e6edd7)!important;
  border:1px solid rgba(213,255,95,.26)!important;
}
#global-chat-dialog .p1s-chat-logo img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  display:block!important;
}
.global-chat-orb-core .global-chat-orb-logo{
  width:44px!important;
  height:34px!important;
  max-width:44px!important;
  max-height:34px!important;
  object-fit:contain!important;
  object-position:center!important;
  padding:3px!important;
  box-sizing:border-box!important;
}
#global-chat-dialog .p1s-chat-room-avatar img,
#global-chat-dialog .p1s-chat-group-avatar img,
#global-chat-dialog .p1s-chat-group-photo-preview img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  padding:4px!important;
  box-sizing:border-box!important;
  background:#ffffff!important;
}
#global-chat-dialog .p1s-chat-room-avatar.p1s-official-logo,
#global-chat-dialog .p1s-chat-group-avatar.p1s-official-logo{
  background:#ffffff!important;
  border:1px solid #dce6d8!important;
  color:transparent!important;
  box-shadow:0 4px 12px rgba(30,55,34,.08)!important;
}
#global-chat-dialog .p1s-chat-room-avatar.p1s-official-logo img,
#global-chat-dialog .p1s-chat-group-avatar.p1s-official-logo img{
  padding:5px!important;
}
#global-chat-dialog .p1s-chat-group-photo-preview{
  background:#ffffff!important;
}
#global-chat-dialog .p1s-chat-group-photo-button::before{
  content:'▣';
  margin-right:5px;
  font-size:12px;
}
#global-chat-dialog .p1s-chat-group-description-field textarea:required:invalid:not(:placeholder-shown){
  border-color:#d6a0a0!important;
}
@media(max-width:700px){
  #global-chat-dialog .p1s-chat-logo{
    width:66px!important;
    height:48px!important;
    flex-basis:66px!important;
    padding:7px!important;
  }
}


/* v8.20.7 · creador de grupos: un solo desplazamiento, mouse/trackpad/táctil */
#global-chat-dialog .p1s-chat-group-create-body{
  flex:1 1 auto!important;
  min-height:0!important;
  display:block!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain!important;
  touch-action:pan-y!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin!important;
  scrollbar-color:#bdcbbb transparent!important;
  padding:12px 12px 20px!important;
  scroll-behavior:smooth!important;
}
#global-chat-dialog .p1s-chat-group-create-body::-webkit-scrollbar{width:8px!important}
#global-chat-dialog .p1s-chat-group-create-body::-webkit-scrollbar-thumb{background:#bdcbbb!important;border-radius:999px!important;border:2px solid transparent!important;background-clip:padding-box!important}
#global-chat-dialog .p1s-chat-group-profile-editor{
  display:flex!important;
  flex-direction:column!important;
  flex:0 0 auto!important;
  min-height:auto!important;
}
#global-chat-dialog .p1s-chat-group-members-section{
  display:flex!important;
  flex-direction:column!important;
  flex:0 0 auto!important;
  min-height:auto!important;
  margin-top:4px!important;
}
#global-chat-dialog .p1s-chat-group-members-section[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-group-members{
  display:block!important;
  flex:0 0 auto!important;
  min-height:0!important;
  max-height:none!important;
  height:auto!important;
  overflow:visible!important;
  overscroll-behavior:auto!important;
  touch-action:auto!important;
  -webkit-overflow-scrolling:auto!important;
  margin-top:7px!important;
}
#global-chat-dialog .p1s-chat-member-option{
  touch-action:manipulation!important;
  user-select:none!important;
}
#global-chat-dialog .p1s-chat-group-create-footer{
  position:relative!important;
  z-index:25!important;
  flex:0 0 auto!important;
  box-shadow:0 -8px 24px rgba(31,51,35,.06)!important;
}
#global-chat-dialog .p1s-chat-group-members-head strong::after{
  content:' · Traccar';
  color:#6d7d70;
  font-weight:700;
}
@media(max-width:700px){
  #global-chat-dialog .p1s-chat-group-create-body{
    padding:10px 10px 18px!important;
    scroll-padding-bottom:18px!important;
  }
  #global-chat-dialog .p1s-chat-group-create-footer{
    padding-bottom:max(9px,env(safe-area-inset-bottom))!important;
  }
}


/* v8.20.7 · logo dedicado para la esfera del chat */
.global-chat-orb{overflow:visible!important}
.global-chat-orb-core{background:transparent!important;box-shadow:none!important;padding:0!important}
.global-chat-orb-logo{display:block!important;width:58px!important;height:58px!important;max-width:58px!important;max-height:58px!important;min-width:58px!important;min-height:58px!important;object-fit:contain!important;object-position:center center!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;filter:drop-shadow(0 6px 14px rgba(0,0,0,.18))!important}
.global-chat-orb-core small{display:none!important}
#map-panel .global-chat-orb-logo{width:58px!important;height:58px!important;max-width:58px!important;max-height:58px!important;object-fit:contain!important;object-position:center center!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;filter:drop-shadow(0 6px 14px rgba(0,0,0,.18))!important}
@media(max-width:700px){.global-chat-orb-logo,#map-panel .global-chat-orb-logo{width:54px!important;height:54px!important;max-width:54px!important;max-height:54px!important;min-width:54px!important;min-height:54px!important}}


/* v8.20.7 · presencia de usuarios estilo WhatsApp */
#global-chat-dialog .p1s-chat-header-presence{display:flex!important;align-items:center!important;gap:6px!important;min-height:28px!important;margin-top:6px!important;max-width:300px!important;overflow:hidden!important}
#global-chat-dialog .p1s-presence-chip{display:inline-flex!important;align-items:center!important;gap:5px!important;min-width:0!important;max-width:112px!important;padding:3px 7px 3px 4px!important;border-radius:999px!important;background:rgba(255,255,255,.075)!important;border:1px solid rgba(255,255,255,.09)!important}
#global-chat-dialog .p1s-presence-chip strong{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:9px!important;font-weight:800!important;color:#e4eee6!important}
#global-chat-dialog .p1s-presence-more{display:inline-grid!important;place-items:center!important;min-width:25px!important;height:22px!important;padding:0 6px!important;border-radius:999px!important;background:rgba(255,255,255,.08)!important;color:#d2ded5!important;font-size:9px!important;font-weight:900!important}
#global-chat-dialog .p1s-presence-empty{display:inline-flex!important;align-items:center!important;gap:7px!important;color:#a1b0a5!important;font-size:9px!important}
#global-chat-dialog .p1s-presence-empty>i{width:8px!important;height:8px!important;border-radius:50%!important;background:#87928b!important;box-shadow:0 0 0 4px rgba(135,146,139,.11)!important}
#global-chat-dialog .p1s-mini-presence-avatar{position:relative!important;width:24px!important;height:24px!important;min-width:24px!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:#edf2e9!important;color:#31513a!important;font-size:9px!important;font-weight:900!important;overflow:visible!important}
#global-chat-dialog .p1s-mini-presence-avatar>img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important;display:block!important}
#global-chat-dialog .p1s-mini-presence-avatar>span{width:100%!important;height:100%!important;border-radius:50%!important;display:grid!important;place-items:center!important;overflow:hidden!important}
#global-chat-dialog .p1s-mini-presence-avatar>i{position:absolute!important;right:-1px!important;bottom:-1px!important;width:8px!important;height:8px!important;border-radius:50%!important;border:2px solid #203128!important;background:#929c95!important;box-sizing:border-box!important}
#global-chat-dialog .p1s-mini-presence-avatar.is-live>i{background:#34d16d!important;box-shadow:0 0 7px rgba(52,209,109,.65)!important}
#global-chat-dialog .chat-online-face{position:relative!important;overflow:visible!important}
#global-chat-dialog .chat-online-face .chat-face-photo{width:100%!important;height:100%!important;border-radius:50%!important;overflow:hidden!important}
#global-chat-dialog .chat-online-face>i{position:absolute!important;right:-1px!important;bottom:-1px!important;width:8px!important;height:8px!important;border-radius:50%!important;border:2px solid #f7faf6!important;background:#34d16d!important;box-shadow:0 0 7px rgba(52,209,109,.55)!important}
#global-chat-dialog .p1s-group-presence-line{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin-top:5px!important;min-height:23px!important}
#global-chat-dialog .p1s-group-presence-faces{display:flex!important;align-items:center!important;min-width:0!important}
#global-chat-dialog .p1s-group-presence-faces .p1s-mini-presence-avatar{width:21px!important;height:21px!important;min-width:21px!important;margin-left:-5px!important;border:2px solid #fff!important}
#global-chat-dialog .p1s-group-presence-faces .p1s-mini-presence-avatar:first-child{margin-left:0!important}
#global-chat-dialog .p1s-group-presence-faces .p1s-mini-presence-avatar>i{width:7px!important;height:7px!important;border-width:1.5px!important;border-color:#fff!important}
#global-chat-dialog .p1s-group-presence-count{display:inline-flex!important;align-items:center!important;gap:5px!important;color:#7f8d82!important;font-size:9px!important;white-space:nowrap!important}
#global-chat-dialog .p1s-group-presence-count>i{width:7px!important;height:7px!important;border-radius:50%!important;background:#949d97!important}
#global-chat-dialog .p1s-group-presence-count>i.is-live{background:#31c969!important;box-shadow:0 0 7px rgba(49,201,105,.45)!important}
#global-chat-dialog .chat-author-line{display:inline-flex!important;align-items:center!important;gap:7px!important;min-width:0!important;flex-wrap:wrap!important}
#global-chat-dialog .chat-author-presence{display:inline-flex!important;align-items:center!important;gap:4px!important;font-size:9px!important;font-weight:700!important;color:#879188!important;white-space:nowrap!important}
#global-chat-dialog .chat-author-presence>i{width:7px!important;height:7px!important;border-radius:50%!important;background:#929b95!important}
#global-chat-dialog .chat-author-presence.is-live{color:#3d8050!important}
#global-chat-dialog .chat-author-presence.is-live>i{background:#34ca68!important;box-shadow:0 0 7px rgba(52,202,104,.48)!important}
#global-chat-dialog .chat-message.chat-me .chat-author-presence{color:rgba(255,255,255,.78)!important}
#global-chat-dialog .p1s-traccar-user-row>i.is-offline{background:#9aa39d!important;box-shadow:0 0 0 3px rgba(154,163,157,.12)!important}
@media(max-width:700px){
 #global-chat-dialog .p1s-chat-header-presence{max-width:210px!important;gap:4px!important;margin-top:4px!important}
 #global-chat-dialog .p1s-presence-chip{max-width:84px!important;padding-right:5px!important}
 #global-chat-dialog .p1s-presence-chip strong{font-size:8px!important}
 #global-chat-dialog .p1s-mini-presence-avatar{width:21px!important;height:21px!important;min-width:21px!important}
 #global-chat-dialog .chat-author-presence em{display:none!important}
}


/* v8.20.7 · bloque de participantes debajo de la conversación */
#global-chat-dialog .p1s-chat-users-preview{display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important;gap:9px!important;min-height:94px!important;padding:11px 12px 12px!important;background:linear-gradient(180deg,#fbfdf9 0%,#f5f9f2 100%)!important;border-bottom:1px solid #e1e8de!important;color:#334238!important}
#global-chat-dialog .p1s-chat-users-preview-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-width:0!important}
#global-chat-dialog .p1s-chat-users-preview-head>span{display:inline-flex!important;align-items:center!important;gap:8px!important;min-width:0!important}
#global-chat-dialog .p1s-chat-users-preview-head>span>i{width:8px!important;height:8px!important;flex:0 0 8px!important;border-radius:50%!important;background:#34ca68!important;box-shadow:0 0 0 4px rgba(52,202,104,.12)!important}
#global-chat-dialog .p1s-chat-users-preview-head strong{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:11px!important;color:#334238!important;font-weight:850!important}
#global-chat-dialog .p1s-chat-users-preview-head small{flex:0 0 auto!important;color:#78867b!important;font-size:9px!important;font-weight:700!important;white-space:nowrap!important}
#global-chat-dialog .chat-online-faces{display:flex!important;align-items:stretch!important;justify-content:flex-start!important;gap:7px!important;width:100%!important;min-width:0!important;overflow-x:auto!important;overflow-y:hidden!important;padding:1px 1px 3px!important;scrollbar-width:thin!important;scrollbar-color:#ccd9c9 transparent!important;overscroll-behavior-x:contain!important;-webkit-overflow-scrolling:touch!important}
#global-chat-dialog .p1s-participant-chip{flex:0 0 auto!important;min-width:118px!important;max-width:154px!important;min-height:48px!important;display:grid!important;grid-template-columns:32px minmax(0,1fr)!important;align-items:center!important;gap:8px!important;padding:7px 9px!important;border:1px solid #e0e8dc!important;border-radius:14px!important;background:#fff!important;box-shadow:0 3px 12px rgba(31,51,35,.04)!important}
#global-chat-dialog .p1s-participant-chip .p1s-mini-presence-avatar{width:32px!important;height:32px!important;min-width:32px!important}
#global-chat-dialog .p1s-participant-chip .p1s-mini-presence-avatar>i{width:9px!important;height:9px!important;border-color:#fff!important}
#global-chat-dialog .p1s-participant-copy{display:flex!important;flex-direction:column!important;gap:2px!important;min-width:0!important}
#global-chat-dialog .p1s-participant-copy strong{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:10px!important;line-height:1.2!important;color:#2d3b31!important;font-weight:850!important}
#global-chat-dialog .p1s-participant-copy small{font-size:8.5px!important;line-height:1.2!important;color:#879188!important;font-weight:650!important}
#global-chat-dialog .p1s-participant-chip.is-live .p1s-participant-copy small{color:#438052!important}
#global-chat-dialog .p1s-participant-more,#global-chat-dialog .p1s-participant-empty{flex:0 0 auto!important;min-height:48px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0 13px!important;border:1px dashed #d8e2d5!important;border-radius:14px!important;background:#f8faf7!important;color:#758278!important;font-size:9px!important;font-weight:800!important}
@media(max-width:700px){#global-chat-dialog .p1s-chat-users-preview{min-height:88px!important;padding:10px 10px 11px!important;gap:8px!important}#global-chat-dialog .p1s-chat-users-preview-head strong{font-size:10px!important}#global-chat-dialog .p1s-chat-users-preview-head small{font-size:8px!important}#global-chat-dialog .p1s-participant-chip{min-width:108px!important;max-width:138px!important;min-height:44px!important;grid-template-columns:29px minmax(0,1fr)!important;padding:6px 8px!important}#global-chat-dialog .p1s-participant-chip .p1s-mini-presence-avatar{width:29px!important;height:29px!important;min-width:29px!important}#global-chat-dialog .p1s-participant-copy strong{font-size:9px!important}#global-chat-dialog .p1s-participant-copy small{font-size:8px!important}}


/* v8.20.7 · subtítulo operativo en cabecera del Chat de Operaciones */
#global-chat-dialog .p1s-chat-service-subtitle{
  display:inline-flex!important;
  align-items:center!important;
  gap:7px!important;
  min-height:18px!important;
  margin:2px 0 3px!important;
  color:#b9cbbd!important;
  font-size:9px!important;
  line-height:1!important;
  font-weight:850!important;
  letter-spacing:.16em!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
}
#global-chat-dialog .p1s-chat-service-subtitle i{
  width:4px!important;
  height:4px!important;
  border-radius:50%!important;
  background:#41d66e!important;
  box-shadow:0 0 7px rgba(65,214,110,.55)!important;
  flex:0 0 4px!important;
}
#global-chat-dialog .p1s-chat-service-subtitle span:first-child{color:#d8e7db!important}
#global-chat-dialog .p1s-chat-service-subtitle span:last-child{color:#9fb3a5!important}
@media(max-width:700px){
  #global-chat-dialog .p1s-chat-service-subtitle{
    margin:1px 0 2px!important;
    gap:6px!important;
    font-size:8px!important;
    letter-spacing:.13em!important;
  }
  #global-chat-dialog .p1s-chat-service-subtitle i{width:3px!important;height:3px!important;flex-basis:3px!important}
}


/* v8.20.7 · cabecera compacta: estado junto a GPS · MONITOREO */
#global-chat-dialog .p1s-chat-heading{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  min-width:0!important;
  gap:0!important;
}
#global-chat-dialog .p1s-chat-heading .eyebrow{
  margin:0 0 4px!important;
}
#global-chat-dialog .p1s-chat-service-subtitle{
  display:inline-flex!important;
  align-items:center!important;
  align-self:flex-start!important;
  gap:6px!important;
  min-height:16px!important;
  margin:0 0 5px!important;
  line-height:1!important;
}
#global-chat-dialog .p1s-chat-service-subtitle b{
  display:inline!important;
  color:#71917a!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:900!important;
}
#global-chat-dialog .p1s-chat-service-subtitle>i:not(.p1s-chat-service-live-dot){display:none!important}
#global-chat-dialog .p1s-chat-service-live-dot{
  display:inline-block!important;
  width:8px!important;
  height:8px!important;
  min-width:8px!important;
  flex:0 0 8px!important;
  margin-left:3px!important;
  border-radius:50%!important;
  background:#35d36c!important;
  box-shadow:0 0 0 4px rgba(53,211,108,.12),0 0 9px rgba(53,211,108,.48)!important;
}
#global-chat-dialog .p1s-chat-title-line{
  display:none!important;
  height:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
}
#global-chat-dialog .p1s-chat-live-dot{display:none!important}
#global-chat-dialog .p1s-chat-heading #global-chat-status{
  margin:0 0 4px!important;
  line-height:1.15!important;
}
#global-chat-dialog .p1s-chat-header-presence{
  min-height:24px!important;
  margin-top:0!important;
}
#global-chat-dialog .p1s-chat-top{
  padding-top:12px!important;
  padding-bottom:12px!important;
}
@media(max-width:700px){
  #global-chat-dialog .p1s-chat-service-subtitle{
    min-height:14px!important;
    margin:0 0 4px!important;
    gap:5px!important;
  }
  #global-chat-dialog .p1s-chat-service-live-dot{
    width:7px!important;
    height:7px!important;
    min-width:7px!important;
    flex-basis:7px!important;
    margin-left:2px!important;
    box-shadow:0 0 0 3px rgba(53,211,108,.12),0 0 7px rgba(53,211,108,.45)!important;
  }
  #global-chat-dialog .p1s-chat-heading #global-chat-status{margin-bottom:3px!important}
  #global-chat-dialog .p1s-chat-header-presence{min-height:22px!important;margin-top:0!important}
  #global-chat-dialog .p1s-chat-top{padding-top:10px!important;padding-bottom:10px!important}
}


/* v8.20.7 · recorrido operativo con STOP por duración */
#route-dialog #route-stop-minutes{width:100%;min-height:44px;border:1px solid #d9e3d5;border-radius:10px;background:#fff;color:#29362b;padding:0 11px;font:inherit}
#route-dialog .route-stop-help{display:block;margin-top:5px;color:#778477;font-size:.68rem;line-height:1.4}
.route-stop-sign-wrap{background:transparent!important;border:0!important;overflow:visible!important;filter:drop-shadow(0 5px 9px rgba(69,22,17,.24))}
.route-stop-sign{position:absolute;left:10px;top:0;width:34px;height:34px;display:grid;place-items:center;background:#d83e35;color:#fff;clip-path:polygon(29% 0,71% 0,100% 29%,100% 71%,71% 100%,29% 100%,0 71%,0 29%);border:2px solid #fff;box-shadow:0 0 0 2px #9e2722;font-weight:900;letter-spacing:.02em}
.route-stop-sign b{font-size:8px;line-height:1;color:#fff}
.route-stop-duration{position:absolute;left:2px;top:36px;min-width:50px;height:20px;padding:0 5px;display:grid;place-items:center;border-radius:999px;background:#fff;color:#7d241f;border:1px solid #e5c0bd;font-size:9px;font-weight:900;white-space:nowrap;box-shadow:0 3px 9px rgba(34,38,34,.15)}
.route-stop-sign-wrap.stop-medium .route-stop-sign{background:#c93a30;box-shadow:0 0 0 2px #8e261f}
.route-stop-sign-wrap.stop-long .route-stop-sign,.route-stop-sign-wrap.stop-critical .route-stop-sign{background:#a9211c;box-shadow:0 0 0 2px #701510}
.route-stop-sign-wrap.stop-long .route-stop-duration,.route-stop-sign-wrap.stop-critical .route-stop-duration{color:#7b1713;border-color:#dfa9a6}
.route-stop-popup-pro strong{color:#a32a24;font-size:.86rem}
.route-stop-breakdown{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0 10px}
.route-stop-breakdown>span{display:flex;align-items:center;justify-content:center;gap:5px;min-height:34px;border:1px solid #e3e8df;border-radius:9px;background:#fff;color:#667263;font-size:.62rem;font-weight:700}
.route-stop-breakdown>span b{font-size:.8rem;color:#a32a24}
.route-stop-breakdown>small{grid-column:1/-1;color:#879187;font-size:.58rem;line-height:1.35}
.route-stop.stop-brief{border-left:3px solid #df766f!important}.route-stop.stop-medium{border-left:3px solid #c7473e!important}.route-stop.stop-long,.route-stop.stop-critical{border-left:3px solid #9f2721!important}
body:not(.light-mode) #route-dialog #route-stop-minutes{background:#07120a;color:#e7f5e9;border-color:#1d4b2b}
body:not(.light-mode) #route-dialog .route-stop-help{color:#8fa492}
body:not(.light-mode) .route-stop-duration{background:#07110b;color:#ffb9b3;border-color:#71332f}
body:not(.light-mode) .route-stop-breakdown>span{background:#07120a;border-color:#1a4529;color:#9fb1a2}
body:not(.light-mode) .route-stop-breakdown>span b{color:#ff978f}
@media(max-width:760px){.route-stop-sign{width:31px;height:31px;left:11px}.route-stop-duration{top:33px;font-size:8px}.route-stop-breakdown{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.route-stop-breakdown>span{font-size:.56rem;padding:0 3px}}


/* P1S 8.20.7 · selector de mapas */
#google-map-base.google-map-base{display:block!important;position:absolute!important;inset:0!important;z-index:0!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;background:#f7f8f5!important}
#map-panel.google-base-active #google-map-base.google-map-base{opacity:1!important;visibility:visible!important}
#map-panel.google-base-active #map{background:transparent!important}
#map-panel.google-base-active .leaflet-tile-pane{display:none!important}
#map-panel.google-base-active .leaflet-control-attribution{display:none!important}

/* v8.21.8 · selector de mapa: reglas antiguas incompletas retiradas; el control operativo actual permanece oculto. */
#map-panel.google-base-active #map,
#map-panel.google-base-active #map.leaflet-container{background:transparent!important}
#map-panel.google-base-active #google-map-base{display:block!important;opacity:1!important;visibility:visible!important}

#map-panel .route-summary-card{
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
}
#map-panel .route-summary-card[hidden]{display:none!important}
#map-panel .route-summary-card .route-summary-head{flex:0 0 auto!important}
#map-panel .route-summary-card .route-summary-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin!important;
  scrollbar-color:#b9c9b6 transparent!important;
  padding-right:3px!important;
}
#map-panel .route-summary-card .route-summary-body::-webkit-scrollbar{width:6px!important}
#map-panel .route-summary-card .route-summary-body::-webkit-scrollbar-thumb{background:#b9c9b6!important;border-radius:999px!important}
#map-panel .route-summary-card:not(.collapsed){max-height:min(68dvh,660px)!important}
#map-panel .route-summary-card.collapsed{display:block!important;overflow:hidden!important}
#map-panel .route-summary-card.collapsed .route-summary-body{display:none!important}

@media(max-width:760px){
  #map-panel .route-summary-card:not(.collapsed){top:50px!important;bottom:auto!important;left:7px!important;right:7px!important;max-height:58dvh!important;width:auto!important}
  #map-panel .route-summary-card .route-summary-body{padding-bottom:8px!important}
}


/* v8.20.7 final · selector desplegable + scroll recorrido */
#google-map-base.google-map-base{width:100%!important;height:100%!important;z-index:0!important;transform:translateZ(0)!important}
#map-panel.google-base-loading #google-map-base.google-map-base{opacity:.35!important}
.route-summary-card:not(.collapsed){overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:thin!important;scrollbar-gutter:stable!important;pointer-events:auto!important}.route-summary-scroll-hint{display:block!important;margin-top:3px!important;color:#879389!important;font-size:.56rem!important;font-weight:650!important}
@media(max-width:760px){
  #map-panel.map-style-menu-open .route-summary-card:not(.collapsed){top:118px!important;max-height:46dvh!important}
}


/* v8.21.8 · auditoría CSS: panel de recorrido con un único scroll válido */
#map-panel .route-summary-card,
#map-panel .route-summary-card:not(.collapsed){overflow:hidden!important}
#map-panel .route-summary-card .route-summary-body{overflow-y:auto!important;overflow-x:hidden!important;min-height:0!important;overscroll-behavior:contain!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important}
#map-panel.map-style-menu-open .route-summary-card:not(.collapsed){top:88px!important;max-height:calc(100% - 96px)!important}
@media(max-width:760px){
  #map-panel .route-summary-card:not(.collapsed){top:52px!important;bottom:8px!important;max-height:calc(100% - 60px)!important}
  #map-panel.map-style-menu-open .route-summary-card:not(.collapsed){top:112px!important;max-height:calc(100% - 120px)!important}
}

/* v8.20.7 · recorrido tipo consola externa + responsive compacto */
.map-route-layout{
  display:grid!important;
  grid-template-columns:auto minmax(0,1fr)!important;
  grid-template-areas:"route map"!important;
  min-width:0!important;
  width:100%!important;
  align-items:stretch!important;
  background:#f6f8f4!important;
  border-bottom:1px solid #e1e7de!important;
}
.map-route-layout>.map-panel{grid-area:map!important;min-width:0!important;width:100%!important;border-left:0!important}
.map-route-layout>#route-summary-card{
  grid-area:route!important;
  position:relative!important;
  inset:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  top:auto!important;
  z-index:20!important;
  width:340px!important;
  min-width:300px!important;
  max-width:360px!important;
  height:100%!important;
  max-height:none!important;
  margin:0!important;
  padding:12px 13px 13px!important;
  border:0!important;
  border-right:1px solid #dde5da!important;
  border-radius:0!important;
  background:#fbfcfa!important;
  box-shadow:none!important;
  overflow:hidden!important;
  color:#334035!important;
  display:flex!important;
  flex-direction:column!important;
}
.map-route-layout>#route-summary-card[hidden]{display:none!important}
.map-route-layout>#route-summary-card .route-summary-head{
  position:sticky!important;
  top:0!important;
  z-index:3!important;
  margin:-12px -13px 8px!important;
  padding:11px 12px 9px!important;
  background:rgba(251,252,250,.98)!important;
  border-bottom:1px solid #e1e7de!important;
  backdrop-filter:blur(8px)!important;
}
.map-route-layout>#route-summary-card .route-summary-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin!important;
  scrollbar-color:#b9c9b6 transparent!important;
  padding-right:3px!important;
}
.map-route-layout>#route-summary-card .route-summary-body::-webkit-scrollbar{width:6px!important}
.map-route-layout>#route-summary-card .route-summary-body::-webkit-scrollbar-thumb{background:#b9c9b6!important;border-radius:999px!important}
.map-route-layout>#route-summary-card.collapsed{
  width:270px!important;
  min-width:270px!important;
  height:auto!important;
  align-self:start!important;
  padding-bottom:6px!important;
  overflow:hidden!important;
}
.map-route-layout>#route-summary-card.collapsed .route-summary-head{position:static!important;margin:-12px -13px 0!important;border-bottom:0!important}
.map-route-layout>#route-summary-card.collapsed .route-summary-body{display:none!important}
.map-route-layout>#route-summary-card .route-summary-scroll-hint{display:block!important}

/* El botón Recorrido funciona como interruptor visible. */
#route-button{transition:background .15s,border-color .15s,color .15s,box-shadow .15s!important}
#route-button.active-tool{background:#e8f5e5!important;border-color:#74a77c!important;color:#245c32!important;box-shadow:inset 0 0 0 1px rgba(52,113,67,.08)!important}
#route-button.active-tool .icon{color:#2c7b42!important}

/* Monitor más compacto en escritorio y laptop. */
.monitor-window .window-toolbar{min-height:52px!important;padding:6px 12px!important;gap:8px!important}
.monitor-window .window-actions{gap:5px!important;min-width:0!important;flex-wrap:wrap!important;justify-content:flex-end!important}
.monitor-window .map-tool-button{min-height:32px!important;padding:6px 9px!important;font-size:.69rem!important;border-radius:7px!important}
.monitor-window .map-tool-button .icon{width:14px!important;height:14px!important}
.monitor-window .icon-button{width:31px!important;height:31px!important;min-width:31px!important}
.monitor-window .read-time{font-size:.66rem!important;margin-right:4px!important}
.monitor-window .map-search-strip{padding:7px 10px!important;gap:6px!important}
.monitor-window .map-search-field{min-height:36px!important}
.monitor-window .map-search-field input{font-size:.72rem!important}
.monitor-window .map-search-strip>.button{min-height:36px!important;padding:7px 10px!important;font-size:.68rem!important}
.monitor-window .trip-toolbar{padding:7px 10px!important;gap:7px!important}
.monitor-window .trip-toolbar-actions{gap:5px!important}
.monitor-window .trip-button{min-height:34px!important;padding:6px 9px!important;font-size:.67rem!important}
.stats{margin-bottom:20px!important}.stat{padding:16px 18px!important}.stat-icon{width:36px!important;height:36px!important}.stat strong{font-size:1.55rem!important}.stat-foot{font-size:.64rem!important}
.locations .section-heading{gap:10px!important}.list-controls{gap:6px!important}.list-controls .button,.list-controls select,.list-controls .search-field{min-height:36px!important}.list-controls .button{padding:7px 9px!important;font-size:.68rem!important}

/* Fullscreen/expandido: mapa y panel aprovechan toda la altura. */
.monitor-window:fullscreen .map-route-layout,.monitor-window.expanded .map-route-layout{flex:1 1 auto!important;min-height:0!important;height:auto!important}
.monitor-window:fullscreen .map-route-layout>.map-panel,.monitor-window.expanded .map-route-layout>.map-panel{height:100%!important;min-height:0!important}
.monitor-window:fullscreen .map-route-layout>#route-summary-card,.monitor-window.expanded .map-route-layout>#route-summary-card{height:100%!important;max-height:none!important}

@media(max-width:1180px){
  .map-route-layout>#route-summary-card{width:300px!important;min-width:280px!important;max-width:310px!important}
  .monitor-window .map-tool-button{font-size:0!important;width:32px!important;min-width:32px!important;padding:0!important;display:grid!important;place-items:center!important}
  .monitor-window .map-tool-button .icon{width:15px!important;height:15px!important}
  .monitor-window .window-actions{flex-wrap:nowrap!important;overflow-x:auto!important;overscroll-behavior-x:contain!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important}
  .monitor-window .window-actions::-webkit-scrollbar{display:none!important}
  .monitor-window .read-time{display:none!important}
}

@media(max-width:920px){
  .map-route-layout{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"map" "route"!important;
  }
  .map-route-layout>#route-summary-card,
  .map-route-layout>#route-summary-card.collapsed{
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:auto!important;
    max-height:min(42dvh,420px)!important;
    border-right:0!important;
    border-top:1px solid #dce5d9!important;
    border-radius:0!important;
  }
  .map-route-layout>#route-summary-card:not(.collapsed){min-height:210px!important}
  .map-route-layout>#route-summary-card.collapsed{max-height:62px!important}
  .map-route-layout>#route-summary-card .route-summary-body{max-height:min(34dvh,330px)!important}
  .monitor-window .map-panel{height:min(52dvh,500px)!important;min-height:350px!important}
}

@media(max-width:760px){
  .workspace{padding-left:10px!important;padding-right:10px!important;padding-top:18px!important}
  .monitor-window{border-radius:12px!important;margin-bottom:20px!important}
  .monitor-window .window-toolbar{padding:6px 8px!important;min-height:48px!important;flex-wrap:nowrap!important}
  .monitor-window .view-tabs{flex:0 0 auto!important}
  .monitor-window .view-tab{padding:12px 0!important;font-size:.74rem!important}
  .monitor-window .window-actions{flex:1 1 auto!important;justify-content:flex-start!important;overflow-x:auto!important}
  .monitor-window .map-tool-button{width:31px!important;height:31px!important;min-width:31px!important}
  .monitor-window .map-search-strip{padding:6px 8px!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important}
  .monitor-window .map-search-strip>.button{padding:6px 8px!important;min-height:34px!important}
  #map-search-geofence{grid-column:1/-1!important;width:100%!important}
  .monitor-window .map-panel{height:min(49dvh,430px)!important;min-height:330px!important}
  .monitor-window .trip-toolbar{padding:6px 8px!important;overflow-x:auto!important;scrollbar-width:none!important}
  .monitor-window .trip-toolbar::-webkit-scrollbar{display:none!important}
  .monitor-window .trip-toolbar-actions{flex-wrap:nowrap!important;min-width:max-content!important}
  .monitor-window .trip-button{white-space:nowrap!important;min-height:32px!important}
  .map-route-layout>#route-summary-card{max-height:min(45dvh,390px)!important;padding:10px 10px 11px!important}
  .map-route-layout>#route-summary-card .route-summary-head{margin:-10px -10px 7px!important;padding:9px 10px 8px!important}
  .map-route-layout>#route-summary-card .route-summary-body{max-height:min(36dvh,310px)!important}
  .route-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important}
  .route-kpi-grid>div{padding:6px!important}
  .route-line-legend{gap:7px!important;font-size:.58rem!important}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-bottom:16px!important}.stat{padding:12px 10px!important;gap:8px!important}.stat-icon{width:31px!important;height:31px!important}.stat strong{font-size:1.3rem!important}.stat p{font-size:.72rem!important}.stat-foot{font-size:.58rem!important}
  .locations .section-heading{margin-bottom:10px!important}.list-controls{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}.list-controls .search-field{grid-column:1/-1!important;width:100%!important}.list-controls select{width:100%!important}.table-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
}

@media(max-width:430px){
  .monitor-window .map-panel{height:min(47dvh,390px)!important;min-height:315px!important}
  .route-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .map-route-layout>#route-summary-card{max-height:min(44dvh,360px)!important}
  .map-route-layout>#route-summary-card .route-summary-body{max-height:min(34dvh,280px)!important}
  .stats{gap:0!important}.stat{padding:10px 8px!important}.stat-foot{line-height:1.25!important}
}
@media(min-width:921px){
  .map-route-layout{height:clamp(500px,56dvh,680px)!important;min-height:500px!important;max-height:680px!important}
  .map-route-layout>.map-panel{height:100%!important;min-height:0!important;max-height:none!important}
  .map-route-layout>#route-summary-card{height:100%!important;max-height:100%!important;align-self:stretch!important}
  .monitor-window:fullscreen .map-route-layout,.monitor-window.expanded .map-route-layout{height:auto!important;min-height:0!important;max-height:none!important}
}


/* v8.20.7 · barra de herramientas restaurada con icono + texto en PC, laptop y móvil */
.monitor-window .window-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:6px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:none!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior-x:contain!important;
}
.monitor-window .window-actions::-webkit-scrollbar{display:none!important}
.monitor-window .map-tool-button{
  width:auto!important;
  min-width:max-content!important;
  min-height:34px!important;
  height:34px!important;
  padding:6px 10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:6px!important;
  font-size:.70rem!important;
  line-height:1!important;
  white-space:nowrap!important;
  flex:0 0 auto!important;
}
.monitor-window .map-tool-button .icon{
  width:14px!important;
  height:14px!important;
  min-width:14px!important;
  flex:0 0 14px!important;
  margin:0!important;
}
.monitor-window .icon-button{flex:0 0 auto!important}
@media(max-width:760px){
  .monitor-window .window-toolbar{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:6px!important;
    padding:7px 8px!important;
  }
  .monitor-window .view-tabs{width:100%!important}
  .monitor-window .window-actions{width:100%!important;padding:0 0 2px!important}
  .monitor-window .map-tool-button{
    width:auto!important;
    min-width:max-content!important;
    height:33px!important;
    min-height:33px!important;
    padding:5px 9px!important;
    font-size:.66rem!important;
    border-radius:8px!important;
  }
  .monitor-window .map-tool-button .icon{width:13px!important;height:13px!important;min-width:13px!important;flex-basis:13px!important}
}
@media(max-width:430px){
  .monitor-window .map-tool-button{font-size:.63rem!important;padding:5px 8px!important;height:32px!important;min-height:32px!important}
}
/* El selector despliega la fila debajo del botón, sin cubrir los controles superiores. */
/* v8.20.7 · mapa único y rutas viales */
#map-panel .p1s-map-style-control,#map-panel [data-map-style],#map-panel [data-map-style-choice]{display:none!important}
.trip-status-detail.is-routing,.multi-trip-status-detail.is-routing{opacity:.78}
@media(max-width:760px){.map-tool-button{font-size:.72rem!important;width:auto!important;min-width:max-content!important;padding:7px 9px!important;display:inline-flex!important;align-items:center!important;gap:5px!important}.window-actions{overflow-x:auto!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important}.window-actions::-webkit-scrollbar{display:none!important}}


/* v8.20.7 · confirmación estética centrada para eliminar mensajes */
#global-chat-dialog .p1s-chat-confirm-overlay{position:absolute;inset:0;z-index:90;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(10,20,13,.38);backdrop-filter:blur(6px)}
#global-chat-dialog .p1s-chat-confirm-overlay[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-confirm-card{position:relative;width:min(380px,calc(100% - 8px));padding:20px 18px 16px;border-radius:24px;background:linear-gradient(180deg,#ffffff 0%,#f3f8ed 100%);border:1px solid rgba(203,226,173,.95);box-shadow:0 24px 60px rgba(6,18,11,.32),0 0 0 1px rgba(255,255,255,.72) inset;color:#213122;text-align:center}
#global-chat-dialog .p1s-chat-confirm-close{position:absolute;top:12px;right:12px;width:36px;height:36px;border-radius:12px;border:1px solid #d7e5ca;background:#fff;color:#4b5d47;font-size:24px;line-height:1;display:grid;place-items:center;cursor:pointer}
#global-chat-dialog .p1s-chat-confirm-icon{width:68px;height:68px;margin:0 auto 12px;border-radius:20px;display:grid;place-items:center;background:radial-gradient(circle at 30% 30%,#eeffb7,#d7f15f 58%,#c6e740 100%);box-shadow:0 18px 34px rgba(174,214,54,.28),0 0 0 10px rgba(223,255,103,.18);font-size:31px}
#global-chat-dialog .p1s-chat-confirm-kicker{margin:0 0 6px;color:#688056;font-size:10px;font-weight:800;letter-spacing:.18em}
#global-chat-dialog .p1s-chat-confirm-card h3{margin:0;color:#1f2d1f;font-size:22px;line-height:1.08}
#global-chat-dialog .p1s-chat-confirm-card p{margin:8px 0 0;color:#61715e;font-size:13px;line-height:1.45}
#global-chat-dialog .p1s-chat-confirm-meta{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:14px 0 0}
#global-chat-dialog .p1s-chat-confirm-meta span{display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:7px 12px;border-radius:999px;font-size:12px;font-weight:800;border:1px solid #dbe7d0;background:#fff;color:#334233}
#global-chat-dialog .p1s-chat-confirm-meta .scope.all{background:linear-gradient(180deg,#fff0ee,#ffe2de);border-color:#f2c0b9;color:#9f3e33}
#global-chat-dialog .p1s-chat-confirm-meta .scope.me{background:linear-gradient(180deg,#f7fbf1,#eef7e4);border-color:#d6e4c5;color:#3f5f33}
#global-chat-dialog .p1s-chat-confirm-note{margin-top:12px;padding:11px 12px;border-radius:16px;background:#f7faf3;border:1px dashed #d6e4c7;color:#567056;font-size:12px;line-height:1.5}
#global-chat-dialog .p1s-chat-confirm-actions{display:flex;gap:10px;justify-content:center;margin-top:16px}
#global-chat-dialog .p1s-chat-confirm-actions .button{width:auto;min-width:132px;justify-content:center}
#global-chat-dialog .p1s-chat-confirm-actions .danger{background:linear-gradient(180deg,#28492e,#173621)!important;border-color:#28492e!important;color:#f4ffe9!important;box-shadow:0 14px 28px rgba(18,42,24,.2)}
#global-chat-dialog .p1s-chat-confirm-actions .danger.scope-all{background:linear-gradient(180deg,#a94739,#7d2c22)!important;border-color:#8d3428!important;color:#fff8f6!important;box-shadow:0 14px 28px rgba(105,26,16,.22)}
@media(max-width:640px){#global-chat-dialog .p1s-chat-confirm-overlay{padding:14px}#global-chat-dialog .p1s-chat-confirm-card{width:min(100%,340px);padding:18px 14px 14px;border-radius:22px}#global-chat-dialog .p1s-chat-confirm-card h3{font-size:20px}#global-chat-dialog .p1s-chat-confirm-actions{flex-direction:column}#global-chat-dialog .p1s-chat-confirm-actions .button{width:100%}}


/* v8.20.7 · Chat compacto + selector directo + miembros bajo menú */
#global-chat-dialog .p1s-chat-tools-label{display:none!important}
#global-chat-dialog .p1s-chat-users-preview{display:none!important}
#global-chat-dialog .p1s-chat-selection-shell{min-height:38px!important;background:#f8faf6!important;border-bottom:1px solid #e3e9e0!important}
#global-chat-dialog .p1s-chat-tools-row{justify-content:flex-end!important;min-height:38px!important;padding:4px 10px!important}
#global-chat-dialog .p1s-chat-room-strip{position:relative!important;display:grid!important;grid-template-columns:minmax(0,1fr) 38px!important;gap:7px!important;align-items:center!important;padding:7px 9px!important}
#global-chat-dialog .p1s-chat-room-current{min-height:48px!important;padding:6px 8px!important;border-radius:13px!important}
#global-chat-dialog .p1s-chat-room-avatar{width:34px!important;height:34px!important;min-width:34px!important;border-radius:11px!important}
#global-chat-dialog .p1s-chat-room-copy strong{font-size:12px!important}
#global-chat-dialog .p1s-chat-room-copy small{font-size:9px!important}
#global-chat-dialog .p1s-chat-room-switch{min-height:29px!important;padding:0 8px!important;border-radius:9px!important;font-size:9px!important}
#global-chat-dialog .p1s-chat-room-edit{display:none!important}
#global-chat-dialog .p1s-chat-room-menu-open{width:38px;height:38px;border-radius:12px;border:1px solid #dce6d8;background:#fff;color:#435345;font-size:24px;line-height:1;display:grid;place-items:center;cursor:pointer;box-shadow:0 3px 10px rgba(30,49,31,.05)}
#global-chat-dialog .p1s-chat-room-menu-open:hover{background:#f0f6ed;border-color:#cddfc9}
#global-chat-dialog .p1s-chat-room-switcher,#global-chat-dialog .p1s-chat-room-menu{position:absolute;z-index:78;top:calc(100% - 2px);right:9px;width:min(330px,calc(100% - 18px));border:1px solid #dce7d8;border-radius:16px;background:rgba(255,255,255,.985);box-shadow:0 18px 42px rgba(18,39,23,.18);overflow:hidden}
#global-chat-dialog .p1s-chat-room-switcher[hidden],#global-chat-dialog .p1s-chat-room-menu[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-room-switcher{left:9px;right:auto}
#global-chat-dialog .p1s-chat-room-popover-head{display:flex;flex-direction:column;gap:2px;padding:11px 12px 8px;border-bottom:1px solid #edf1ea;background:#f7faf5}
#global-chat-dialog .p1s-chat-room-popover-head strong{font-size:11px;color:#2c3c2e}
#global-chat-dialog .p1s-chat-room-popover-head small{font-size:9px;color:#7b887c}
#global-chat-dialog .p1s-chat-room-switcher-list{max-height:250px;overflow-y:auto;padding:6px;overscroll-behavior:contain;touch-action:pan-y}
#global-chat-dialog .p1s-chat-switcher-row{width:100%;display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:50px;padding:7px;border:0;border-radius:11px;background:transparent;text-align:left;color:#2e3c30;cursor:pointer}
#global-chat-dialog .p1s-chat-switcher-row:hover,#global-chat-dialog .p1s-chat-switcher-row.active{background:#edf5e9}
#global-chat-dialog .p1s-chat-switcher-row>span:nth-child(2){display:flex;flex-direction:column;gap:2px;min-width:0}
#global-chat-dialog .p1s-chat-switcher-row strong{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#global-chat-dialog .p1s-chat-switcher-row small{font-size:9px;color:#7d897e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#global-chat-dialog .p1s-chat-switcher-row>b{min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#2d6a3b;color:#fff;display:grid;place-items:center;font-size:9px}
#global-chat-dialog .p1s-chat-switcher-row>em{font-style:normal;color:#819083;font-size:18px}
#global-chat-dialog .p1s-chat-switcher-avatar{width:34px!important;height:34px!important;min-width:34px!important;border-radius:10px!important}
#global-chat-dialog .p1s-chat-room-menu{width:220px;padding:6px}
#global-chat-dialog .p1s-chat-room-menu>button{width:100%;display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:8px;padding:9px;border:0;border-radius:10px;background:transparent;color:#2e3c30;text-align:left;cursor:pointer}
#global-chat-dialog .p1s-chat-room-menu>button:hover{background:#eef5eb}
#global-chat-dialog .p1s-chat-room-menu>button[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-room-menu>button>span:first-child{width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:#f0f5ed;font-size:14px}
#global-chat-dialog .p1s-chat-room-menu>button>span:last-child{display:flex;flex-direction:column;gap:1px;min-width:0}
#global-chat-dialog .p1s-chat-room-menu strong{font-size:10px}
#global-chat-dialog .p1s-chat-room-menu small{font-size:8px;color:#7e8b7f}
#global-chat-dialog .p1s-chat-members-overlay{position:absolute;inset:0;z-index:86;display:flex;align-items:center;justify-content:center;padding:14px;background:rgba(12,24,15,.32);backdrop-filter:blur(5px)}
#global-chat-dialog .p1s-chat-members-overlay[hidden]{display:none!important}
#global-chat-dialog .p1s-chat-members-card{width:min(340px,calc(100% - 8px));max-height:min(72%,440px);display:flex;flex-direction:column;border:1px solid #d8e6d2;border-radius:20px;background:#fff;box-shadow:0 24px 60px rgba(11,30,16,.26);overflow:hidden}
#global-chat-dialog .p1s-chat-members-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;border-bottom:1px solid #e8eee5;background:linear-gradient(180deg,#f8fbf6,#f1f7ed)}
#global-chat-dialog .p1s-chat-members-card-head>span{display:flex;flex-direction:column;gap:1px;min-width:0}
#global-chat-dialog .p1s-chat-members-card-head small{font-size:8px;font-weight:850;letter-spacing:.15em;color:#738273}
#global-chat-dialog .p1s-chat-members-card-head strong{font-size:15px;color:#263628;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#global-chat-dialog .p1s-chat-members-card-head em{font-style:normal;font-size:9px;color:#748176}
#global-chat-dialog .p1s-chat-members-card-head button{width:34px;height:34px;min-width:34px;border-radius:11px;border:1px solid #dbe5d7;background:#fff;color:#4d5e4f;font-size:21px;display:grid;place-items:center;cursor:pointer}
#global-chat-dialog .p1s-chat-members-list{overflow-y:auto;padding:6px;overscroll-behavior:contain;touch-action:pan-y}
#global-chat-dialog .p1s-chat-member-view{display:grid;grid-template-columns:36px minmax(0,1fr) auto;align-items:center;gap:9px;min-height:50px;padding:7px 8px;border-radius:11px}
#global-chat-dialog .p1s-chat-member-view:hover{background:#f6f9f4}
#global-chat-dialog .p1s-chat-member-view>span:nth-child(2){display:flex;flex-direction:column;gap:2px;min-width:0}
#global-chat-dialog .p1s-chat-member-view strong{font-size:10px;color:#2d3c2f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#global-chat-dialog .p1s-chat-member-view small{font-size:8px;color:#849085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#global-chat-dialog .p1s-chat-member-view>em{display:inline-flex;align-items:center;gap:5px;font-style:normal;font-size:8px;font-weight:800;color:#879188;white-space:nowrap}
#global-chat-dialog .p1s-chat-member-view>em i{width:7px;height:7px;border-radius:50%;background:#a9b2a8}
#global-chat-dialog .p1s-chat-member-view.is-live>em{color:#2e7b43}
#global-chat-dialog .p1s-chat-member-view.is-live>em i{background:#35c96a;box-shadow:0 0 0 3px rgba(53,201,106,.12)}
#global-chat-dialog .p1s-chat-members-empty{padding:24px;text-align:center;color:#7b877c;font-size:11px}

/* Panel más pequeño para conservar contexto del mapa */
#global-chat-dialog.global-chat-dialog{width:min(370px,calc(100vw - 22px))!important;height:min(63dvh,590px)!important;max-height:min(63dvh,590px)!important;right:11px!important;bottom:18px!important;border-radius:23px!important}
#global-chat-dialog .p1s-chat-top{padding:10px 11px!important;gap:10px!important}
#global-chat-dialog .p1s-chat-logo{width:48px!important;height:48px!important;flex-basis:48px!important;border-radius:15px!important}
#global-chat-dialog .p1s-chat-heading .eyebrow{font-size:.58rem!important;letter-spacing:.14em!important;margin-bottom:2px!important}
#global-chat-dialog .p1s-chat-service-subtitle{font-size:8px!important}
#global-chat-dialog .p1s-chat-top-side{min-width:118px!important;gap:6px!important}
#global-chat-dialog .p1s-chat-online-pill,#global-chat-dialog .p1s-chat-gps-stat{min-height:28px!important;padding:0 8px!important;font-size:9px!important}
#global-chat-dialog .p1s-chat-tabs{padding:6px 8px!important;gap:4px!important}
#global-chat-dialog .p1s-chat-tab{height:34px!important;font-size:10px!important}
#global-chat-dialog .p1s-chat-panel.active{min-height:0!important}
#global-chat-dialog .global-chat-messages{padding:8px 9px 10px!important}
@media(min-width:920px){#global-chat-dialog.global-chat-dialog{width:min(370px,26vw)!important;min-width:340px!important;height:min(66dvh,630px)!important;max-height:min(66dvh,630px)!important;right:14px!important;bottom:14px!important}}
@media(max-width:700px){#global-chat-dialog.global-chat-dialog{right:6px!important;bottom:calc(72px + env(safe-area-inset-bottom))!important;width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px)!important;height:min(60dvh,520px)!important;max-height:min(60dvh,520px)!important;border-radius:21px!important}#global-chat-dialog .p1s-chat-top{padding:9px 9px!important}#global-chat-dialog .p1s-chat-logo{width:44px!important;height:44px!important;flex-basis:44px!important}#global-chat-dialog .p1s-chat-room-switcher{width:calc(100% - 18px)}#global-chat-dialog .p1s-chat-room-menu{right:9px;width:210px}}

/* v8.20.7 · rutas adaptativas de grupo / convoy */
.p1s-group-route-badge-wrap{background:transparent!important;border:0!important;overflow:visible!important}.p1s-group-route-badge{display:flex;flex-direction:column;align-items:flex-start;gap:1px;max-width:190px;padding:6px 9px;border-radius:12px;border:1px solid var(--route-color,#43ff68);background:rgba(6,16,9,.94);color:#f4fff4;box-shadow:0 8px 20px rgba(0,0,0,.30);white-space:nowrap}.p1s-group-route-badge strong{max-width:168px;overflow:hidden;text-overflow:ellipsis;font-size:.68rem;line-height:1.15;font-weight:850}.p1s-group-route-badge small{max-width:168px;overflow:hidden;text-overflow:ellipsis;color:#c9d9c9;font-size:.57rem;line-height:1.15}.p1s-group-route-connector{filter:drop-shadow(0 0 3px rgba(0,0,0,.16))}.p1s-group-branch-route{filter:drop-shadow(0 0 5px rgba(67,255,104,.20))}body.light-mode .p1s-group-route-badge{background:rgba(255,255,255,.96);color:#223027;border-color:#cbd9c8;box-shadow:0 7px 18px rgba(27,47,31,.14)}body.light-mode .p1s-group-route-badge small{color:#667367}@media(max-width:700px){.p1s-group-route-badge{max-width:154px;padding:5px 7px;border-radius:10px}.p1s-group-route-badge strong,.p1s-group-route-badge small{max-width:138px}.p1s-group-route-badge strong{font-size:.62rem}.p1s-group-route-badge small{font-size:.53rem}}

/* v8.20.7 · selección masiva oculta; eliminación solo desde ⋮ por mensaje */
#global-chat-dialog .p1s-chat-selection-shell,#global-chat-dialog #chat-select-toggle,#global-chat-dialog #chat-selection-bar{display:none!important}


/* v8.20.7 · movilidad visual, rutas profesionales y panel derecho */
.guard-pin{position:relative!important}
.guard-motion-badge{position:absolute;right:-17px;top:-15px;z-index:6;width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#10261a;border:2px solid #f7fff2;box-shadow:0 6px 15px rgba(8,27,15,.28),0 0 0 3px rgba(79,228,107,.16);font-size:15px;line-height:1;transform-origin:50% 80%;animation:p1sTransportFloat 1.15s ease-in-out infinite;pointer-events:none}
.guard-motion-badge.mode-walk{animation-name:p1sWalkStep}.guard-motion-badge.mode-bike{animation-name:p1sWheelRide}.guard-motion-badge.mode-moto,.guard-motion-badge.mode-vehicle,.guard-motion-badge.mode-bus{animation-name:p1sVehicleRide}
@keyframes p1sTransportFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}
@keyframes p1sWalkStep{0%,100%{transform:translate(-1px,0) rotate(-2deg)}50%{transform:translate(2px,-2px) rotate(2deg)}}
@keyframes p1sWheelRide{0%,100%{transform:translateX(-1px)}50%{transform:translateX(2px) translateY(-1px)}}
@keyframes p1sVehicleRide{0%,100%{transform:translateX(-1px)}50%{transform:translateX(2px)}}
@media(prefers-reduced-motion:reduce){.guard-motion-badge,.replay-moving-vehicle,.replay-progress-line,.replay-return-line{animation:none!important}}
.row-motion-chip{display:inline-flex;align-items:center;gap:5px;width:max-content;margin-top:4px;padding:3px 7px;border-radius:999px;border:1px solid #d7e7d5;background:#f3f8ef;color:#47604b;font-size:.58rem;font-weight:750;white-space:nowrap}.row-motion-chip i{font-style:normal;font-size:.72rem;animation:p1sTransportFloat 1.15s ease-in-out infinite}
.guard-icon.route-context-active .fleet-marker-label,.leaflet-tooltip.route-context-hidden{display:none!important}
.p1s-route-identity-wrap,.p1s-group-route-badge-wrap{background:transparent!important;border:0!important;overflow:visible!important}
.p1s-route-identity,.p1s-group-route-badge{display:flex;align-items:center;gap:8px;width:max-content;min-width:160px;max-width:220px;padding:6px 10px 6px 6px;border-radius:14px;background:rgba(7,20,12,.94);border:1px solid var(--route-color,#43ff68);box-shadow:0 10px 24px rgba(0,0,0,.28),0 0 16px color-mix(in srgb,var(--route-color,#43ff68) 20%,transparent);color:#f2fff3;pointer-events:none}
.p1s-route-identity img,.p1s-group-route-badge img{width:32px;height:32px;flex:0 0 32px;object-fit:contain;border-radius:9px;background:#f2f6dc;padding:3px}
.p1s-route-identity>span,.p1s-group-route-badge>span{display:flex;flex-direction:column;min-width:0;line-height:1.12}
.p1s-route-identity small,.p1s-group-route-badge small{font-size:8px;letter-spacing:.13em;text-transform:uppercase;color:#a7c7aa;font-weight:800}
.p1s-route-identity strong,.p1s-group-route-badge strong{font-size:11px;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:150px}
.p1s-route-identity em,.p1s-group-route-badge em{margin-top:2px;font-style:normal;font-size:8px;color:var(--route-color,#aaffb6);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:155px}
.p1s-route-identity.arrived{opacity:.72;filter:saturate(.65)}
/* Repetición: línea fina y flujo visual discreto */
.replay-static-line{stroke-width:1.2px!important;opacity:.13!important}
.replay-progress-outline,.replay-return-outline{stroke-width:4.6px!important;opacity:.72!important;filter:drop-shadow(0 1px 2px rgba(0,0,0,.26))!important}
.replay-progress-line,.replay-return-line{stroke-width:2.15px!important;stroke-dasharray:10 6!important;animation:p1sReplayFlow 1.05s linear infinite;filter:drop-shadow(0 0 3px rgba(57,255,99,.22))!important}
.replay-return-line{filter:drop-shadow(0 0 3px rgba(47,140,255,.24))!important}
@keyframes p1sReplayFlow{to{stroke-dashoffset:-32}}
.replay-moving-vehicle{position:absolute;left:0;top:1px;width:34px;height:34px;display:grid;place-items:center;border-radius:13px;background:#07120a;border:2px solid var(--replay-color,#43ff68);box-shadow:0 8px 20px rgba(0,0,0,.3),0 0 0 3px rgba(255,255,255,.7);font-size:18px;animation:p1sVehicleRide .9s ease-in-out infinite}
.replay-moving-label{left:42px!important;top:-1px!important;display:flex!important;flex-direction:column!important;gap:1px!important;max-width:165px!important;padding:5px 8px!important;border-radius:10px!important}
.replay-moving-label small{font-size:7px;letter-spacing:.12em;text-transform:uppercase;color:#9bb9a0}.replay-moving-label strong{font-size:10px;color:#fff}.replay-moving-label em{font-size:8px;font-style:normal;color:var(--replay-color,#baffc5)}
/* STOP P1S: señal octagonal con halo y duración integrada */
.route-stop-sign-wrap{width:58px!important;height:62px!important;overflow:visible!important}
.route-stop-halo{position:absolute;left:8px;top:-2px;width:42px;height:42px;border-radius:50%;background:rgba(210,52,43,.14);box-shadow:0 0 0 5px rgba(210,52,43,.08);animation:p1sStopPulse 2.1s ease-in-out infinite}
.route-stop-sign{left:12px!important;top:2px!important;width:34px!important;height:34px!important;background:linear-gradient(145deg,#e34d42,#a71f1b)!important;border:2px solid #fff!important;box-shadow:0 0 0 2px #7d1916,0 7px 14px rgba(84,22,17,.25)!important}
.route-stop-sign:before{content:'';position:absolute;inset:3px;clip-path:inherit;border:1px solid rgba(255,255,255,.5)}
.route-stop-sign b{font-size:7px!important;letter-spacing:.08em!important;text-shadow:0 1px 1px rgba(0,0,0,.2)}
.route-stop-stem{position:absolute;left:27px;top:35px;width:4px;height:9px;background:#7d1916;border-radius:0 0 3px 3px}
.route-stop-duration{left:4px!important;top:43px!important;min-width:50px!important;height:19px!important;padding:0 7px!important;border-radius:8px!important;background:#fff!important;color:#75221e!important;border:1px solid #e3b5b1!important;box-shadow:0 5px 12px rgba(35,25,23,.14)!important;font-size:8px!important;gap:4px!important;grid-auto-flow:column!important}
.route-stop-duration i{width:5px;height:5px;border-radius:50%;background:#d6463c;box-shadow:0 0 0 2px rgba(214,70,60,.12)}
@keyframes p1sStopPulse{0%,100%{transform:scale(.92);opacity:.7}50%{transform:scale(1.05);opacity:1}}
/* Recorrido en escritorio: mapa a la izquierda, panel operativo a la derecha */
@media(min-width:921px){
 .map-route-layout{grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:"map route"!important}
 .map-route-layout>.map-panel{border-right:0!important}
 .map-route-layout>#route-summary-card{grid-area:route!important;border-right:0!important;border-left:1px solid #dde5da!important;width:325px!important;min-width:300px!important;max-width:350px!important}
 .map-route-layout>#route-summary-card.collapsed{width:255px!important;min-width:255px!important;max-width:255px!important;align-self:start!important;border-left:1px solid #dde5da!important}
}
@media(max-width:920px){.map-route-layout{grid-template-areas:"map" "route"!important}.map-route-layout>#route-summary-card{border-left:0!important;border-top:1px solid #dde5da!important}}


/* v8.21.4 · confirmaciones internas P1S: reemplazo total de ventanas nativas del navegador */
.p1s-confirm-overlay{position:fixed;inset:0;z-index:99999;width:100%;max-width:none;height:100%;max-height:none;margin:0;border:0;padding:22px;background:rgba(8,17,11,.40);display:grid;place-items:center;backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.p1s-confirm-overlay::backdrop{background:transparent!important}
.p1s-confirm-overlay[hidden]{display:none!important}
.p1s-confirm-card{position:relative;width:min(420px,calc(100vw - 36px));padding:24px 22px 20px;border-radius:26px;background:linear-gradient(180deg,#ffffff 0%,#f4f8ef 100%);border:1px solid #d7e7c9;box-shadow:0 30px 90px rgba(6,19,10,.34),0 0 0 1px rgba(255,255,255,.84) inset;text-align:center;color:#213022;animation:p1sConfirmIn .18s ease-out both}
@keyframes p1sConfirmIn{from{opacity:0;transform:translateY(8px) scale(.975)}to{opacity:1;transform:none}}
.p1s-confirm-close{position:absolute;top:13px;right:13px;width:38px;height:38px;border:1px solid #dce8d3;border-radius:13px;background:#fff;color:#50604c;font-size:25px;line-height:1;display:grid;place-items:center;cursor:pointer}
.p1s-confirm-symbol{width:72px;height:72px;margin:0 auto 14px;border-radius:23px;display:grid;place-items:center;background:radial-gradient(circle at 30% 30%,#efffb7,#d7f060 62%,#bee137);color:#243819;box-shadow:0 18px 38px rgba(171,210,48,.25),0 0 0 10px rgba(217,246,91,.14)}
.p1s-confirm-symbol .icon{width:30px;height:30px}.p1s-confirm-symbol .icon svg{width:100%;height:100%;stroke:currentColor;fill:none;stroke-width:1.8}
.p1s-confirm-eyebrow{margin:0 0 7px;font-size:10px;font-weight:900;letter-spacing:.18em;color:#6c815d}
.p1s-confirm-card h2{margin:0;font-size:23px;line-height:1.08;color:#1f2c20}.p1s-confirm-card>p:not(.p1s-confirm-eyebrow){margin:10px auto 0;max-width:330px;font-size:13px;line-height:1.55;color:#62705f}
.p1s-confirm-note{margin:14px 0 0;padding:11px 13px;border-radius:15px;background:#f8fbf4;border:1px dashed #d7e3ce;color:#566954;font-size:12px;line-height:1.45}
.p1s-confirm-actions{display:flex;gap:10px;justify-content:center;margin-top:19px}.p1s-confirm-actions .button{width:auto;min-width:145px;justify-content:center}
.p1s-confirm-overlay[data-tone="danger"] .p1s-confirm-symbol{background:radial-gradient(circle at 30% 30%,#fff0ec,#ef9b86 62%,#d76550);color:#fff;box-shadow:0 18px 38px rgba(163,54,37,.22),0 0 0 10px rgba(231,107,85,.12)}
.p1s-confirm-overlay[data-tone="danger"] #p1s-confirm-accept{background:linear-gradient(180deg,#aa493b,#7e2f24)!important;border-color:#8f3529!important;color:#fff!important}
.p1s-confirm-overlay[data-tone="warning"] .p1s-confirm-symbol{background:radial-gradient(circle at 30% 30%,#fff8cc,#f0cf63 62%,#daa93f);color:#5c4614;box-shadow:0 18px 38px rgba(181,137,31,.20),0 0 0 10px rgba(236,196,71,.12)}
.p1s-confirm-overlay[data-tone="success"] .p1s-confirm-symbol{background:radial-gradient(circle at 30% 30%,#e6ffd7,#93e36d 62%,#4cba63);color:#173d21}
@media(max-width:640px){.p1s-confirm-overlay{padding:14px}.p1s-confirm-card{width:min(100%,360px);padding:21px 16px 16px;border-radius:23px}.p1s-confirm-card h2{font-size:21px}.p1s-confirm-actions{flex-direction:column}.p1s-confirm-actions .button{width:100%}}


/* v8.21.4 · STOP completo + panel de recorrido lateral solo cuando está activo */
/* Estado normal: el mapa ocupa todo el ancho. El panel no reserva espacio si no hay recorrido. */
.map-route-layout{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"map"!important;transition:grid-template-columns .18s ease!important}
.map-route-layout>.map-panel{grid-area:map!important;width:100%!important;min-width:0!important;border-right:0!important;border-left:0!important}
.map-route-layout>#route-summary-card[hidden]{display:none!important}
@media(min-width:921px){
  .map-route-layout.route-panel-active{grid-template-columns:minmax(0,1fr) 325px!important;grid-template-areas:"map route"!important}
  .map-route-layout.route-panel-active>#route-summary-card{display:flex!important;grid-area:route!important;width:325px!important;min-width:300px!important;max-width:350px!important;height:100%!important;max-height:none!important;border-left:1px solid #dde5da!important;border-right:0!important;border-top:0!important;align-self:stretch!important}
  .map-route-layout.route-panel-active>#route-summary-card.collapsed{width:255px!important;min-width:255px!important;max-width:255px!important;height:auto!important;align-self:start!important}
}
@media(max-width:920px){
  .map-route-layout,.map-route-layout.route-panel-active{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"map"!important}
  .map-route-layout.route-panel-active{grid-template-areas:"map" "route"!important}
  .map-route-layout.route-panel-active>#route-summary-card{grid-area:route!important;display:flex!important;width:100%!important;min-width:0!important;max-width:none!important;border-left:0!important;border-top:1px solid #dde5da!important}
}
/* Leaflet no debe dibujar caja blanca alrededor del marcador STOP. */
.leaflet-marker-icon.route-stop-sign-wrap,.route-stop-sign-wrap{background:transparent!important;border:0!important;outline:0!important;box-shadow:none!important;border-radius:0!important}
.route-stop-sign-wrap:before,.route-stop-sign-wrap:after{display:none!important;content:none!important}
.route-stop-sign{left:11px!important;top:1px!important;width:36px!important;height:36px!important;border:0!important;outline:0!important;background:linear-gradient(145deg,#eb5147 0%,#c32f28 52%,#8f1916 100%)!important;box-shadow:0 0 0 2px #791512,0 7px 15px rgba(84,22,17,.28)!important;clip-path:polygon(29% 0,71% 0,100% 29%,100% 71%,71% 100%,29% 100%,0 71%,0 29%)!important}
.route-stop-sign:before{display:block!important;content:''!important;position:absolute!important;inset:3px!important;clip-path:inherit!important;border:1px solid rgba(103,18,15,.58)!important;pointer-events:none!important}
.route-stop-sign b{font-size:7px!important;letter-spacing:.08em!important;color:#fff!important;text-shadow:0 1px 2px rgba(0,0,0,.28)!important}
.route-stop-halo{left:7px!important;top:-3px!important;width:44px!important;height:44px!important;background:rgba(208,49,41,.12)!important;box-shadow:0 0 0 4px rgba(208,49,41,.07)!important}
.route-stop-stem{left:27px!important;top:36px!important;background:#791512!important}
.route-stop-duration{left:3px!important;top:44px!important;min-width:52px!important;background:#fff8f7!important;color:#7d201b!important;border:1px solid #e4b1ad!important}
body:not(.light-mode) .leaflet-marker-icon.route-stop-sign-wrap{background:transparent!important;border:0!important;box-shadow:none!important}
/* El mapa vuelve visualmente a su estado original al cerrar el recorrido. */
.monitor-window:not(.route-panel-active) .map-route-layout>.map-panel{width:100%!important}


/* v8.21.4 · resguardos autorizados siempre visibles, sin apariencia apagada */
.locations tbody tr.device-visible{
  opacity:1!important;
  filter:none!important;
  color:var(--ink)!important;
  background:#fff!important;
}
.locations tbody tr.device-visible:hover{background:#fbfcf7!important}
.locations tbody tr.device-visible.selected{background:#f4f7e9!important}
.locations tbody tr.device-visible.status-offline,
.locations tbody tr.device-visible.status-unknown{
  opacity:1!important;
  filter:none!important;
}
.locations tbody tr.device-visible.status-offline .guard-name strong,
.locations tbody tr.device-visible.status-unknown .guard-name strong,
.locations tbody tr.device-visible.status-offline .address-line,
.locations tbody tr.device-visible.status-unknown .address-line,
.locations tbody tr.device-visible.status-offline .report-time,
.locations tbody tr.device-visible.status-unknown .report-time{
  color:#3f4c3b!important;
  opacity:1!important;
}
.locations tbody tr.device-visible.status-offline .coordinate-line,
.locations tbody tr.device-visible.status-unknown .coordinate-line,
.locations tbody tr.device-visible.status-offline .row-live-metrics,
.locations tbody tr.device-visible.status-unknown .row-live-metrics{
  opacity:1!important;
}
/* El estado se expresa con un punto, no apagando el marcador completo. */
.guard-pin.offline,.guard-pin.unknown{
  background:#78893d!important;
  color:#fff!important;
  border-color:#fff!important;
  opacity:1!important;
  filter:none!important;
}
.guard-pin.offline:before,.guard-pin.unknown:before{
  content:"";
  position:absolute;
  top:-4px;
  right:-4px;
  width:9px;
  height:9px;
  border-radius:50%;
  border:2px solid #fff;
  z-index:3;
  box-shadow:0 1px 4px rgba(20,35,18,.24);
}
.guard-pin.offline:before{background:#d7ad57!important}
.guard-pin.unknown:before{background:#98a59d!important}
.marker-name-offline,.marker-name-unknown{
  opacity:1!important;
  filter:none!important;
  color:#3e4b3a!important;
  background:#fff!important;
  border-color:#dfe6d9!important;
}
@media(max-width:760px){
 .locations tbody tr.device-visible{background:#fff!important}
 .locations tbody tr.device-visible.selected{background:#f4f7e9!important}
}


/* v8.21.4 · respuesta visual inmediata durante consultas */
.loading-tool{pointer-events:none;opacity:.72}
#route-submit:disabled,#replay-submit:disabled,#general-export-submit:disabled,#fleet-report-submit:disabled{cursor:progress}
#route-summary-card[hidden]{display:none!important}


/* v8.21.4 · indicador animado de movilidad en la ficha del resguardo */
.selected-top{padding-right:74px!important}
.selected-motion-badge{position:absolute;right:38px;top:50%;transform:translateY(-50%);z-index:5;width:29px;height:29px;display:grid;place-items:center;border-radius:10px;background:linear-gradient(160deg,#173722,#0d2516);border:1px solid rgba(113,240,133,.42);box-shadow:0 5px 14px rgba(15,44,24,.20),0 0 0 3px rgba(79,228,107,.10);pointer-events:none;overflow:visible}
.selected-motion-badge i{font-style:normal;font-size:16px;line-height:1;display:block;transform-origin:50% 75%;animation:p1sTransportFloat 1.15s ease-in-out infinite}
.selected-motion-badge::after{content:'';position:absolute;inset:-4px;border-radius:13px;border:1px solid rgba(79,228,107,.18);animation:p1sMotionPulse 1.6s ease-out infinite}
.selected-motion-badge.mode-walk i{animation-name:p1sWalkStep}
.selected-motion-badge.mode-bike i{animation-name:p1sWheelRide}
.selected-motion-badge.mode-moto i,.selected-motion-badge.mode-bus i,.selected-motion-badge.mode-vehicle i{animation-name:p1sVehicleRide}
@keyframes p1sMotionPulse{0%{opacity:.55;transform:scale(.92)}70%,100%{opacity:0;transform:scale(1.22)}}
body.light-mode .selected-motion-badge{background:linear-gradient(160deg,#f4faec,#e5f2d9);border-color:#b9d8ae;box-shadow:0 5px 13px rgba(41,72,43,.13),0 0 0 3px rgba(90,174,89,.08)}
body.light-mode .selected-motion-badge::after{border-color:rgba(75,160,78,.22)}
.selected-card.collapsed .selected-motion-badge{width:27px;height:27px;right:36px}.selected-card.collapsed .selected-motion-badge i{font-size:15px}
@media(max-width:760px){.selected-top{padding-right:70px!important}.selected-motion-badge{right:36px;width:27px;height:27px;border-radius:9px}.selected-motion-badge i{font-size:15px}}
@media(max-width:430px){.selected-top{padding-right:66px!important}.selected-motion-badge{right:34px;width:25px;height:25px}.selected-motion-badge i{font-size:14px}}
@media(prefers-reduced-motion:reduce){.selected-motion-badge i,.selected-motion-badge::after{animation:none!important}}

/* v8.21.6 · corrección del icono seleccionado + movilidad sin borde blanco */
/* El estado offline/unknown no debe anular el estilo seleccionado. */
.guard-pin.selected,
.guard-pin.selected.offline,
.guard-pin.selected.unknown{
  background:#20291d!important;
  color:#d4ed59!important;
  border-color:#d4ed59!important;
  opacity:1!important;
  filter:none!important;
  box-shadow:0 0 0 3px rgba(212,237,89,.18),0 5px 18px rgba(35,48,29,.30)!important;
}
.guard-pin.selected:after,
.guard-pin.selected.offline:after,
.guard-pin.selected.unknown:after{
  inset:-10px!important;
  background:rgba(212,237,89,.24)!important;
  border-color:rgba(193,212,74,.52)!important;
}
body:not(.light-mode) .guard-pin.selected,
body:not(.light-mode) .guard-pin.selected.offline,
body:not(.light-mode) .guard-pin.selected.unknown{
  background:#020703!important;
  color:#7dff70!important;
  border-color:#7dff70!important;
  box-shadow:0 0 0 3px rgba(125,255,112,.14),0 0 24px rgba(57,255,20,.44)!important;
}
body:not(.light-mode) .guard-pin.selected:after,
body:not(.light-mode) .guard-pin.selected.offline:after,
body:not(.light-mode) .guard-pin.selected.unknown:after{
  background:rgba(125,255,112,.16)!important;
  border-color:rgba(125,255,112,.50)!important;
}
/* El punto de estado queda separado del icono de movilidad. */
.guard-pin.offline:before,.guard-pin.unknown:before{right:auto!important;left:-4px!important}
/* Movilidad: icono completo, sin aro blanco, con contorno verde discreto. */
.guard-motion-badge{
  right:-16px!important;
  top:-14px!important;
  width:29px!important;
  height:29px!important;
  box-sizing:border-box!important;
  overflow:visible!important;
  border:1px solid rgba(101,238,126,.55)!important;
  background:linear-gradient(160deg,#10291a,#07170e)!important;
  box-shadow:0 5px 13px rgba(5,25,12,.30),0 0 0 2px rgba(79,228,107,.10)!important;
  font-size:16px!important;
}
body.light-mode .guard-motion-badge{
  background:linear-gradient(160deg,#f3faee,#e4f2dc)!important;
  border-color:#9dc998!important;
  box-shadow:0 5px 12px rgba(41,72,43,.14),0 0 0 2px rgba(90,174,89,.08)!important;
}

/* v8.21.8 · paradas detalladas, STOP en vivo y salida */
#stops-dialog{width:min(720px,calc(100vw - 28px));max-width:720px}
#stops-dialog .stops-date-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.stops-dialog-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.stops-dialog-actions .button{flex:1;min-width:180px;justify-content:center}
.stops-summary{margin-top:16px;padding:12px;border:1px solid #dce6d8;border-radius:14px;background:linear-gradient(180deg,#f9fcf5,#f3f8ee)}
.stops-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.stops-kpis>div{min-width:0;padding:10px;border:1px solid #e0e8dc;border-radius:11px;background:#fff}.stops-kpis small{display:block;color:#71806e;font-size:.65rem}.stops-kpis strong{display:block;margin-top:2px;color:#263b29;font-size:.96rem;overflow-wrap:anywhere}.stops-summary-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.stops-summary-actions .button{min-height:36px;padding:7px 10px;font-size:.72rem}
.stops-results{margin-top:10px;max-height:390px;overflow:auto;padding-right:3px;overscroll-behavior:contain}.stops-limit-note{margin:0 0 8px;padding:8px 10px;border-radius:9px;background:#f3f5ef;color:#687567;font-size:.69rem;line-height:1.4}.stop-result-card{border:1px solid #e0e7dc;border-radius:12px;background:#fff;overflow:hidden;margin-bottom:7px}.stop-result-card.ongoing{border-color:#9acb87;box-shadow:0 0 0 2px rgba(100,201,92,.08)}.stop-result-main{width:100%;border:0;background:transparent;color:inherit;padding:10px;display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px;text-align:left}.stop-result-main:hover{background:#f7faf4}.stop-result-sign{width:40px;height:40px;display:grid;place-items:center;clip-path:polygon(29% 0,71% 0,100% 29%,100% 71%,71% 100%,29% 100%,0 71%,0 29%);background:linear-gradient(145deg,#e34d42,#9b201b);color:#fff;font-size:8px;font-weight:900;letter-spacing:.07em}.stop-result-main>div{min-width:0}.stop-result-main strong,.stop-result-main b,.stop-result-main span,.stop-result-main small{display:block}.stop-result-main strong{font-size:.78rem;color:#26372a}.stop-result-main b{margin-top:2px;font-size:.72rem;color:#8d2a24}.stop-result-main span:not(.stop-result-sign){margin-top:2px;color:#60705f;font-size:.68rem;white-space:normal;overflow-wrap:anywhere}.stop-result-main small{margin-top:4px;color:#849083;font-size:.62rem;line-height:1.38}.stop-result-main>em{font-style:normal;font-weight:850;font-size:.72rem;color:#7e251f;white-space:nowrap;padding:6px 8px;border-radius:8px;background:#fff3f1;border:1px solid #edcbc7}.stops-empty{padding:22px;text-align:center;border:1px dashed #d9e2d6;border-radius:12px;color:#6b7968}.stops-empty strong,.stops-empty span{display:block}.stops-empty span{margin-top:5px;font-size:.72rem;line-height:1.45}
.stop-history-sign-wrap.ongoing .route-stop-halo{background:rgba(75,213,87,.16)!important;box-shadow:0 0 0 6px rgba(75,213,87,.08)!important}.stop-history-popup{min-width:220px;display:flex;flex-direction:column;gap:4px;color:#26372a}.stop-history-popup>small{font-size:9px;font-weight:900;letter-spacing:.12em;color:#9f2f27}.stop-history-popup>strong{font-size:14px}.stop-history-popup>b{font-size:12px;color:#80302a}.stop-history-popup>span{font-size:11px;color:#69766a;line-height:1.35}.stop-history-popup dl{display:grid;grid-template-columns:58px minmax(0,1fr);gap:3px 7px;margin:6px 0;font-size:10px}.stop-history-popup dt{font-weight:800;color:#667262}.stop-history-popup dd{margin:0;color:#39483c}.stop-history-popup a{font-size:10px;font-weight:750;color:#2f723b}
/* Etiqueta STOP sobre el icono del resguardo seleccionado. */
.leaflet-tooltip.marker-stop-tooltip{min-width:174px!important;max-width:260px!important;padding:0!important;border-radius:11px!important;overflow:hidden!important;background:rgba(11,20,13,.96)!important;border:1px solid rgba(96,244,113,.52)!important;color:#eefcf0!important;box-shadow:0 9px 24px rgba(7,16,9,.28),0 0 15px rgba(63,236,85,.14)!important;margin-top:-3px!important}
.marker-stop-label{display:flex;flex-direction:column;padding:7px 9px;gap:1px}.marker-stop-label b{font-size:10px;letter-spacing:.08em;color:#ffb1aa}.marker-stop-label small{font-size:9px;color:#e7efe7;line-height:1.25}.marker-stop-label em{font-size:8px;font-style:normal;color:#9ed0a5;line-height:1.25;white-space:normal;max-width:235px}.marker-stop-label.departed b{color:#83ff8e}.leaflet-tooltip.marker-stop-tooltip.departed{border-color:rgba(96,244,113,.34)!important}
body.light-mode .leaflet-tooltip.marker-stop-tooltip{background:rgba(255,255,255,.98)!important;border-color:#b9d7b7!important;color:#27352a!important;box-shadow:0 8px 22px rgba(28,43,31,.16)!important}.light-mode .marker-stop-label small{color:#49574b}.light-mode .marker-stop-label em{color:#657866}.light-mode .marker-stop-label.departed b{color:#26713a}
.selected-stop-state{display:flex;align-items:center;gap:8px;margin:9px 0 0 21px;padding:8px 9px;border:1px solid #e3b8b4;border-radius:10px;background:#fff5f3}.selected-stop-state .selected-stop-sign{min-width:39px;height:29px;display:grid;place-items:center;clip-path:polygon(29% 0,71% 0,100% 29%,100% 71%,71% 100%,29% 100%,0 71%,0 29%);background:#b62e27;color:#fff;font-size:7px;font-weight:900;letter-spacing:.07em}.selected-stop-state>div{min-width:0}.selected-stop-state strong,.selected-stop-state small{display:block}.selected-stop-state strong{font-size:.69rem;color:#7e251f}.selected-stop-state small{margin-top:2px;color:#6f786e;font-size:.59rem;line-height:1.35}.selected-stop-state.departed{background:#f2faef;border-color:#c7dfc1}.selected-stop-state.departed .selected-stop-sign{clip-path:none;border-radius:7px;background:#2f7b42}.selected-stop-state.departed strong{color:#2b693b}
body:not(.light-mode) #stops-dialog .stops-summary{background:linear-gradient(180deg,#08130b,#071009);border-color:#1c4c29}body:not(.light-mode) .stops-kpis>div,body:not(.light-mode) .stop-result-card{background:#07120a;border-color:#1d4628}body:not(.light-mode) .stops-kpis small,body:not(.light-mode) .stop-result-main span:not(.stop-result-sign),body:not(.light-mode) .stop-result-main small{color:#91a395}body:not(.light-mode) .stops-kpis strong,body:not(.light-mode) .stop-result-main strong{color:#e8f7ea}body:not(.light-mode) .stop-result-main:hover{background:#0b1a0f}body:not(.light-mode) .stop-result-main>em{background:#23100e;border-color:#65302c;color:#ffaaa3}body:not(.light-mode) .selected-stop-state{background:#1e0e0c;border-color:#67302c}body:not(.light-mode) .selected-stop-state strong{color:#ffaaa3}body:not(.light-mode) .selected-stop-state small{color:#a9b7ab}body:not(.light-mode) .selected-stop-state.departed{background:#0b1c0f;border-color:#245c31}body:not(.light-mode) .selected-stop-state.departed strong{color:#7dff8a}
@media(max-width:640px){#stops-dialog{width:calc(100vw - 18px)}#stops-dialog .stops-date-grid{grid-template-columns:1fr}.stops-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.stops-kpis>div{padding:8px}.stops-kpis small{font-size:.58rem}.stops-kpis strong{font-size:.78rem}.stops-results{max-height:330px}.stop-result-main{grid-template-columns:36px minmax(0,1fr);gap:8px;padding:9px}.stop-result-sign{width:34px;height:34px}.stop-result-main>em{grid-column:2;justify-self:start;margin-top:1px}.leaflet-tooltip.marker-stop-tooltip{min-width:154px!important;max-width:220px!important}.marker-stop-label{padding:6px 8px}.selected-stop-state{margin-left:0}.stops-dialog-actions .button{min-width:135px}}
@media(prefers-reduced-motion:reduce){.stop-history-sign-wrap .route-stop-halo{animation:none!important}}
.guard-stop-badge{position:absolute;left:3px;top:-27px;z-index:8;width:31px;height:31px;display:grid;place-items:center;clip-path:polygon(29% 0,71% 0,100% 29%,100% 71%,71% 100%,29% 100%,0 71%,0 29%);background:linear-gradient(145deg,#ef554a,#9d1f1a);color:#fff;font-size:6px;font-weight:950;letter-spacing:.07em;text-shadow:0 1px 2px rgba(0,0,0,.28);box-shadow:0 0 0 2px #fff,0 0 0 4px rgba(142,29,24,.42),0 6px 13px rgba(73,18,14,.28);animation:p1sStopPulse 1.8s ease-in-out infinite;pointer-events:none}
body:not(.light-mode) .guard-stop-badge{box-shadow:0 0 0 2px #07100a,0 0 0 4px rgba(255,103,92,.45),0 0 15px rgba(255,75,66,.24)}
@media(prefers-reduced-motion:reduce){.guard-stop-badge{animation:none!important}}

/* P1S v8.21.9 · Paradas activables + panel flotante/minimizable + avisos 30 min */
.stop-tool-button{min-width:42px!important;width:42px!important;height:38px!important;padding:0!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;border-radius:10px!important}
.stop-tool-sign,.stops-panel-stop-sign{position:relative;display:inline-flex;align-items:center;justify-content:center;aspect-ratio:1;color:#fff;background:linear-gradient(145deg,#e51d2f,#9e0e1d);font-weight:900;letter-spacing:.08em;line-height:1;clip-path:polygon(30% 0,70% 0,100% 30%,100% 70%,70% 100%,30% 100%,0 70%,0 30%);box-shadow:0 0 0 1px rgba(255,255,255,.22) inset}
.stop-tool-sign{width:27px;font-size:6px}.stop-tool-button.active-tool{border-color:rgba(255,67,83,.66)!important;background:rgba(151,11,26,.12)!important;box-shadow:0 0 0 2px rgba(255,52,72,.08) inset!important}.stop-tool-button.active-tool .stop-tool-sign{filter:drop-shadow(0 0 7px rgba(255,41,61,.7))}
#stops-dialog[open]{position:fixed!important;inset:76px 18px auto auto!important;margin:0!important;width:min(720px,calc(100vw - 36px))!important;max-width:720px!important;max-height:calc(100dvh - 94px)!important;padding:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:18px!important;z-index:4600!important;box-shadow:0 22px 65px rgba(0,0,0,.28)!important}
#stops-dialog::backdrop{background:transparent!important;pointer-events:none!important}
.stops-panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 15px;border-bottom:1px solid var(--border,#dfe5dc);background:linear-gradient(180deg,rgba(24,48,35,.98),rgba(17,38,28,.98));color:#f4fff3;flex:0 0 auto}
.stops-panel-heading{display:flex;align-items:center;gap:12px;min-width:0}.stops-panel-stop-sign{width:42px;flex:0 0 42px;font-size:8px;filter:drop-shadow(0 0 8px rgba(255,45,63,.28))}.stops-panel-heading>div{min-width:0}.stops-panel-heading .eyebrow{margin:0 0 3px;color:#9bdf71;font-size:.62rem;letter-spacing:.14em}.stops-panel-heading h2{margin:0;color:#f8fff7;font-size:1.05rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.stops-panel-controls{display:flex;align-items:center;gap:6px;flex:0 0 auto}.stops-panel-controls .icon-button{width:36px;height:36px;min-width:36px;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.055);color:#e9f7e8}.stops-panel-controls .icon-button:hover{background:rgba(255,255,255,.11)}
.stops-panel-content{padding:18px;overflow:auto;min-height:0;overscroll-behavior:contain;background:var(--surface,#fff)}
#stops-dialog.is-minimized{width:min(390px,calc(100vw - 36px))!important;max-height:none!important}#stops-dialog.is-minimized .stops-panel-content{display:none!important}#stops-dialog.is-minimized .stops-panel-head{border-bottom:0}
#stops-dialog.is-expanded{inset:18px 18px auto auto!important;width:min(980px,calc(100vw - 36px))!important;max-width:980px!important;max-height:calc(100dvh - 36px)!important}
#stops-dialog .stops-dialog-actions{position:sticky;bottom:0;z-index:2;padding-top:10px;background:linear-gradient(180deg,transparent,var(--surface,#fff) 28%)}
body:not(.light-mode) #stops-dialog .stops-panel-content{background:#071009;color:#eaf6eb}body:not(.light-mode) #stops-dialog .stops-dialog-actions{background:linear-gradient(180deg,transparent,#071009 28%)}
#global-chat-dialog .chat-motion .chat-message-content{border-color:rgba(90,222,116,.3)!important;background:linear-gradient(180deg,#102c19,#0b2113)!important}#global-chat-dialog .chat-motion .chat-avatar{background:#276d3a!important;color:#eaffed!important}.light-mode #global-chat-dialog .chat-motion .chat-message-content{background:#edf9ef!important;color:#24432b!important;border-color:#acd8b5!important}.light-mode #global-chat-dialog .chat-motion .chat-avatar{background:#d9f1df!important;color:#276d3a!important}
@media(max-width:700px){.stop-tool-button{width:40px!important;min-width:40px!important}.stop-tool-sign{width:25px}#stops-dialog[open],#stops-dialog.is-expanded{inset:auto 8px 10px 8px!important;width:auto!important;max-width:none!important;max-height:82dvh!important;border-radius:17px!important}.stops-panel-head{padding:11px 12px}.stops-panel-stop-sign{width:36px;flex-basis:36px}.stops-panel-heading h2{font-size:.94rem}.stops-panel-controls{gap:4px}.stops-panel-controls .icon-button{width:34px;height:34px;min-width:34px}.stops-panel-content{padding:14px}#stops-dialog.is-minimized{left:auto!important;right:8px!important;bottom:10px!important;width:min(365px,calc(100vw - 16px))!important}.stops-dialog-actions{display:grid!important;grid-template-columns:1fr!important}.stops-dialog-actions .button{width:100%!important}}

/* v8.22.0 · STOP más pequeño en detección para no tapar el resguardo */
.route-stop-sign-wrap{width:48px!important;height:52px!important}
.route-stop-halo{left:8px!important;top:0!important;width:32px!important;height:32px!important;box-shadow:0 0 0 3px rgba(208,49,41,.06)!important}
.route-stop-sign{left:10px!important;top:2px!important;width:28px!important;height:28px!important;box-shadow:0 0 0 2px #791512,0 5px 11px rgba(84,22,17,.22)!important}
.route-stop-sign b{font-size:6px!important;letter-spacing:.07em!important}
.route-stop-stem{left:22px!important;top:29px!important;width:4px!important;height:7px!important}
.route-stop-duration{left:0!important;top:36px!important;min-width:48px!important;height:17px!important;padding:0 6px!important;font-size:7px!important}
.route-stop-duration i{width:4px!important;height:4px!important}
@media(max-width:760px){
  .route-stop-sign-wrap{width:44px!important;height:48px!important}
  .route-stop-halo{left:8px!important;top:1px!important;width:28px!important;height:28px!important}
  .route-stop-sign{left:10px!important;top:3px!important;width:24px!important;height:24px!important}
  .route-stop-sign b{font-size:5px!important}
  .route-stop-stem{left:20px!important;top:26px!important;height:6px!important}
  .route-stop-duration{top:31px!important;min-width:44px!important;height:16px!important;font-size:6px!important;padding:0 5px!important}
}

/* v8.22.1 · menú de opciones del chat: recibido a la derecha y sin quedar cortado por el marco */
#global-chat-dialog .chat-message,
#global-chat-dialog .chat-message-actions{overflow:visible!important}
#global-chat-dialog .chat-message:not(.chat-me){padding-right:0!important}
#global-chat-dialog .chat-message:not(.chat-me) .chat-avatar{order:1!important}
#global-chat-dialog .chat-message:not(.chat-me) .chat-message-content{order:2!important}
#global-chat-dialog .chat-message:not(.chat-me) .chat-message-actions{order:3!important;margin-left:2px!important;margin-right:0!important;z-index:220!important}
#global-chat-dialog .chat-message.chat-me .chat-message-actions{order:0!important;margin-right:2px!important;margin-left:0!important;z-index:220!important}
#global-chat-dialog .chat-message-menu{z-index:520!important;overflow:visible!important}
#global-chat-dialog .chat-message:not(.chat-me) .chat-message-menu{right:0!important;left:auto!important}
#global-chat-dialog .chat-message.chat-me .chat-message-menu{left:0!important;right:auto!important}
#global-chat-dialog .chat-message-menu.menu-open-up{top:auto!important;bottom:32px!important}
#global-chat-dialog .chat-message-menu.menu-shift-right{left:0!important;right:auto!important}
#global-chat-dialog .chat-message-menu.menu-shift-left{right:0!important;left:auto!important}
@media(max-width:700px){
  #global-chat-dialog .chat-message:not(.chat-me){padding-right:0!important}
  #global-chat-dialog .chat-message:not(.chat-me) .chat-message-actions{margin-left:1px!important}
  #global-chat-dialog .chat-message-menu{z-index:620!important}
}


/* v8.22.2 · estado EN MOVIMIENTO con telemetría GPS compacta */
.leaflet-tooltip.marker-motion-tooltip{min-width:220px!important;max-width:286px!important;padding:0!important;border-radius:13px!important;overflow:hidden!important;background:linear-gradient(160deg,rgba(5,25,13,.98),rgba(8,43,22,.97))!important;border:1px solid rgba(83,247,117,.58)!important;color:#effff1!important;box-shadow:0 10px 28px rgba(2,18,8,.34),0 0 20px rgba(61,255,101,.13)!important;margin-top:-4px!important}
.marker-motion-label{display:flex;flex-direction:column;padding:8px 9px 9px;gap:4px}.marker-motion-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.marker-motion-head b{font-size:10px;letter-spacing:.09em;color:#75ff8a}.marker-motion-head strong{font-size:10px;color:#fff;white-space:nowrap}.marker-motion-label>small{font-size:8px;color:#bfd5c4;line-height:1.3}.marker-motion-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}.marker-motion-grid>span{min-width:0;padding:5px 4px;border:1px solid rgba(113,243,137,.16);border-radius:8px;background:rgba(255,255,255,.045);text-align:center}.marker-motion-grid em,.marker-motion-grid strong{display:block}.marker-motion-grid em{font-size:6px;line-height:1.1;font-style:normal;letter-spacing:.07em;color:#87aa8e}.marker-motion-grid strong{margin-top:2px;font-size:8px;line-height:1.1;color:#f2fff4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.marker-motion-foot{font-size:7px;color:#9bc4a2;line-height:1.25}.marker-motion-label>u{font-size:7px;text-decoration:none;color:#cfe8d3;line-height:1.3;white-space:normal}
body.light-mode .leaflet-tooltip.marker-motion-tooltip{background:linear-gradient(160deg,rgba(250,255,249,.99),rgba(237,249,238,.99))!important;border-color:#9acda2!important;color:#253a29!important;box-shadow:0 9px 24px rgba(25,62,32,.17)!important}.light-mode .marker-motion-head b{color:#23743a}.light-mode .marker-motion-head strong{color:#1e3d25}.light-mode .marker-motion-label>small{color:#586c5c}.light-mode .marker-motion-grid>span{background:#f8fcf5;border-color:#cfe1cd}.light-mode .marker-motion-grid em{color:#708273}.light-mode .marker-motion-grid strong{color:#27472e}.light-mode .marker-motion-foot{color:#607963}.light-mode .marker-motion-label>u{color:#435c48}
.selected-stop-state.moving{background:linear-gradient(180deg,#effbf1,#e7f7ea);border-color:#b9ddc0}.selected-stop-state.moving .selected-stop-sign{clip-path:none;border-radius:8px;background:#2e8b48;font-size:12px}.selected-stop-state.moving strong{color:#246d39}.selected-stop-state.moving small{color:#58715e}.selected-stop-state.moving em{display:block;margin-top:2px;font-size:.56rem;font-style:normal;line-height:1.35;color:#718276}
body:not(.light-mode) .selected-stop-state.moving{background:linear-gradient(180deg,#081a0e,#07150b);border-color:#236238}body:not(.light-mode) .selected-stop-state.moving .selected-stop-sign{background:#1f7f3c;color:#eaffed}body:not(.light-mode) .selected-stop-state.moving strong{color:#72ff8a}body:not(.light-mode) .selected-stop-state.moving small{color:#a6c3ac}body:not(.light-mode) .selected-stop-state.moving em{color:#829d87}
@media(max-width:640px){.leaflet-tooltip.marker-motion-tooltip{min-width:205px!important;max-width:250px!important}.marker-motion-label{padding:7px 8px}.marker-motion-grid{gap:3px}.marker-motion-grid>span{padding:4px 3px}.marker-motion-head b,.marker-motion-head strong{font-size:9px}.marker-motion-grid strong{font-size:7px}}

/* v8.22.4 · estado de movimiento: título limpio + hora y parada en líneas separadas */
.marker-motion-label>small+small{margin-top:-2px;font-weight:650;color:#d4e7d7}
body.light-mode .marker-motion-label>small+small{color:#405d46}
.selected-stop-state.moving em{font-weight:650;color:#52705a}
body:not(.light-mode) .selected-stop-state.moving em{color:#b7d2bc}

/* P1S v8.22.6 · Excel aislado por cuenta + acabado visual de reportes */
.export-scope-lock{
  display:flex;align-items:center;gap:11px;margin:12px 0 14px;padding:10px 12px;
  border:1px solid #c9dfcb;border-radius:12px;
  background:linear-gradient(135deg,#f6fbf4,#edf7ee);
  box-shadow:inset 3px 0 0 #55ad61,0 5px 16px rgba(39,82,46,.06)
}
.export-scope-lock::before{
  content:'✓';width:27px;height:27px;display:grid;place-items:center;flex:0 0 27px;
  border-radius:9px;background:#2d7d3f;color:#fff;font-size:12px;font-weight:900;
  box-shadow:0 0 0 3px rgba(62,168,80,.10)
}
.export-scope-lock strong{flex:0 0 auto;font-size:.60rem;line-height:1;letter-spacing:.105em;color:#286239}
.export-scope-lock span{min-width:0;font-size:.70rem;line-height:1.42;color:#516756;font-weight:650}
.general-export-dialog .export-section-fieldset,.georoute-report-dialog .export-section-fieldset{
  border-radius:13px;border-color:#d8e5d7;background:linear-gradient(180deg,rgba(248,252,247,.92),rgba(243,249,242,.82))
}
.general-export-dialog .export-section-choice,.georoute-report-dialog .export-section-choice{
  border-radius:10px;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease,transform .16s ease
}
.general-export-dialog .export-section-choice:has(input:checked),.georoute-report-dialog .export-section-choice:has(input:checked){
  border-color:#a9d2ad;background:#f2faf2;box-shadow:inset 0 0 0 1px rgba(57,139,70,.06)
}
.general-export-dialog select:focus-visible,.general-export-dialog input:focus-visible,
#history-dialog select:focus-visible,#history-dialog input:focus-visible,
#fleet-report-dialog select:focus-visible,#fleet-report-dialog input:focus-visible,
#georoute-report-dialog select:focus-visible,#georoute-report-dialog input:focus-visible,
#stops-dialog select:focus-visible,#stops-dialog input:focus-visible{
  outline:2px solid rgba(74,178,90,.36);outline-offset:1px;border-color:#64ad6e!important
}
body:not(.light-mode) .export-scope-lock{
  border-color:rgba(85,230,110,.31);background:linear-gradient(135deg,rgba(9,28,15,.98),rgba(8,39,18,.96));
  box-shadow:inset 3px 0 0 #55ee72,0 0 18px rgba(67,255,101,.055)
}
body:not(.light-mode) .export-scope-lock::before{
  background:linear-gradient(145deg,#2aa74c,#145c29);color:#f1fff4;box-shadow:0 0 0 3px rgba(65,255,98,.10),0 0 14px rgba(61,255,96,.10)
}
body:not(.light-mode) .export-scope-lock strong{color:#78f58d}
body:not(.light-mode) .export-scope-lock span{color:#b5cabb}
body:not(.light-mode) .general-export-dialog .export-section-fieldset,
body:not(.light-mode) .georoute-report-dialog .export-section-fieldset{border-color:#1f4429;background:linear-gradient(180deg,#08130b,#071009)}
body:not(.light-mode) .general-export-dialog .export-section-choice:has(input:checked),
body:not(.light-mode) .georoute-report-dialog .export-section-choice:has(input:checked){border-color:#2f7641;background:linear-gradient(180deg,#0c1f11,#092016);box-shadow:inset 0 0 0 1px rgba(92,255,119,.05)}
@media(max-width:640px){
  .export-scope-lock{align-items:flex-start;gap:9px;padding:9px 10px;margin:10px 0 12px}
  .export-scope-lock::before{width:25px;height:25px;flex-basis:25px}
  .export-scope-lock strong{font-size:.56rem;padding-top:5px}
  .export-scope-lock span{font-size:.65rem}
}


/* P1S v8.22.7 · STOP visible sobre todos los resguardos detenidos */
.guard-stop-badge{left:3px!important;top:-27px!important}
@media(max-width:760px){.guard-stop-badge{left:4px!important;top:-25px!important;width:29px!important;height:29px!important;font-size:5.5px!important}}

/* P1S v8.25.7 · avisos del mapa siempre visibles y SOS prioritario */
body:not(.light-mode) .map-alert-card.sos{background:rgba(31,4,4,.97);border-color:#ff5353;color:#ffecec;box-shadow:0 15px 42px rgba(0,0,0,.56),0 0 24px rgba(255,54,54,.22)}
body:not(.light-mode) .map-alert-card.sos .map-alert-copy small{color:#ff7777}
body:not(.light-mode) .map-alert-card.sos .map-alert-copy span,body:not(.light-mode) .map-alert-card.sos .map-alert-copy em{color:#e6b8b8}
body:not(.light-mode) .map-alert-card.sos .map-alert-actions button{background:#230808;border-color:#713030;color:#ffd2d2}
@media(max-width:760px){.map-alert-stack{top:58px;left:8px;right:8px;width:auto;max-height:calc(100% - 70px)}.map-alert-card.sos .map-alert-symbol{font-size:.52rem}}


/* P1S v8.25.7 · Repetición estable + avatar real del resguardo */
.replay-static-line{stroke-width:2.35px!important;opacity:.62!important;stroke:#42534b!important;filter:drop-shadow(0 1px 1px rgba(0,0,0,.18))!important;}
.replay-moving-avatar{position:absolute;left:0;top:1px;width:36px;height:36px;display:grid;place-items:center;border-radius:12px;overflow:hidden;background:#07120a;border:2px solid var(--replay-color,#43ff68);box-shadow:0 8px 20px rgba(0,0,0,.3),0 0 0 3px rgba(255,255,255,.82);color:#fff;}
.replay-moving-avatar img{width:100%;height:100%;object-fit:cover;display:block;}
.replay-moving-avatar svg,.replay-moving-avatar .icon{width:20px;height:20px;display:block;color:#fff;fill:none;stroke:currentColor;}
.replay-moving-label{left:44px!important;}
@media(max-width:760px){.replay-moving-avatar{width:34px;height:34px}.replay-moving-label{left:42px!important;}}


/* P1S v8.25.7 · Repetición anclada durante zoom */
.leaflet-replay-route-pane{pointer-events:none!important;will-change:transform;}
.leaflet-replay-route-pane svg{overflow:hidden;pointer-events:none!important;}
.p1s-zooming .replay-progress-line,.p1s-zooming .replay-return-line{animation-play-state:paused!important;}

/* P1S v8.25.7 · Excel unificado profesional */
#fleet-export-button,#georoute-export-button{display:none!important}
.p1s-unified-export-card{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0;padding:14px;border:1px solid #d8e3d1;border-radius:16px;background:linear-gradient(145deg,#f8fbf5,#eef5e9);box-shadow:inset 3px 0 0 #9ed400}
.p1s-unified-export-card strong{grid-column:1/-1;font-size:.82rem;letter-spacing:.04em;text-transform:uppercase;color:#26391d}
.p1s-unified-export-card span{display:flex;align-items:center;min-height:42px;padding:9px 11px;border:1px solid #dbe7d4;border-radius:12px;background:#fff;font-size:.78rem;font-weight:700;color:#31442a}
.p1s-unified-export-card span::before{content:'✓';display:grid;place-items:center;width:22px;height:22px;margin-right:8px;border-radius:8px;background:#26391d;color:#c9ff1f;font-size:.72rem}
.p1s-unified-export-card small{grid-column:1/-1;color:#647160;line-height:1.45}
body:not(.light-mode) .p1s-unified-export-card{border-color:#24412b;background:linear-gradient(145deg,#0a160d,#0d1d11);box-shadow:inset 3px 0 0 #a8e000}
body:not(.light-mode) .p1s-unified-export-card strong{color:#dff5d7}
body:not(.light-mode) .p1s-unified-export-card span{border-color:#24412b;background:#0a140d;color:#cfdec9}
body:not(.light-mode) .p1s-unified-export-card span::before{background:#a8e000;color:#0a1208}
body:not(.light-mode) .p1s-unified-export-card small{color:#95a991}
@media(max-width:760px){.p1s-unified-export-card{grid-template-columns:1fr}.p1s-unified-export-card strong,.p1s-unified-export-card small{grid-column:1}}

/* P1S v8.25.7 · un solo punto de exportación Excel */
#fleet-export-button,#georoute-export-button,#trip-report-button,#multi-trip-report-button{display:none!important}

/* P1S v8.25.7 · Excel único y sin accesos secundarios */
#fleet-export-button,#georoute-export-button,#trip-report-button,#multi-trip-report-button,#stops-excel{display:none!important}
.p1s-unified-export-card{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:760px){.p1s-unified-export-card{grid-template-columns:1fr}}

/* v8.25.7 final · una sola entrada de exportación */
#fleet-export-button,#georoute-export-button,#trip-report-button,#multi-trip-report-button,#stops-excel{display:none!important}

/* P1S v8.25.7 · Excel General: una sola fecha, un solo archivo */
#fleet-export-button,#georoute-export-button,#trip-report-button,#multi-trip-report-button,#stops-excel{display:none!important}
#general-export-dialog .p1s-export-date-only{display:grid;gap:8px;margin:18px 0 14px;font-weight:800;color:var(--text,#1d2b22)}
#general-export-dialog .p1s-export-date-only input{width:100%;min-height:54px;border:1px solid rgba(42,79,54,.18);border-radius:14px;padding:0 16px;background:rgba(255,255,255,.86);font:inherit;font-weight:750;color:inherit}
#general-export-dialog .p1s-export-auto-note{display:grid;gap:5px;margin:12px 0 16px;padding:14px 16px;border:1px solid rgba(91,143,66,.18);border-radius:16px;background:linear-gradient(180deg,rgba(223,246,214,.72),rgba(246,250,243,.9))}
#general-export-dialog .p1s-export-auto-note strong{font-size:.88rem}.p1s-export-auto-note span{font-weight:750}.p1s-export-auto-note small{line-height:1.4;opacity:.72}
.light-mode #general-export-dialog .p1s-export-date-only input{background:#fff}


/* P1S v8.25.7 · Modo viaje / Multi viaje anclado al icono real del resguardo */
.p1s-route-identity-wrap{
  width:190px!important;
  height:82px!important;
  margin:0!important;
  background:transparent!important;
  border:0!important;
  overflow:visible!important;
  pointer-events:none!important;
}
.p1s-route-identity.attached{
  position:absolute!important;
  left:50%!important;
  bottom:42px!important;
  transform:translateX(-50%)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:132px!important;
  width:max-content!important;
  max-width:188px!important;
  padding:6px 10px!important;
  border-radius:11px!important;
  background:rgba(7,20,12,.96)!important;
  border:1px solid var(--route-color,#43ff68)!important;
  box-shadow:0 7px 18px rgba(0,0,0,.25)!important;
  color:#f2fff3!important;
  text-align:center!important;
}
.p1s-route-identity.attached:after{
  content:"";
  position:absolute;
  left:50%;
  bottom:-6px;
  width:10px;
  height:10px;
  transform:translateX(-50%) rotate(45deg);
  background:rgba(7,20,12,.96);
  border-right:1px solid var(--route-color,#43ff68);
  border-bottom:1px solid var(--route-color,#43ff68);
}
.p1s-route-identity.attached>span{display:flex!important;flex-direction:column!important;align-items:center!important;min-width:0!important;line-height:1.12!important}
.p1s-route-identity.attached small{font-size:7px!important;letter-spacing:.13em!important;text-transform:uppercase!important;color:#a7c7aa!important;font-weight:850!important}
.p1s-route-identity.attached strong{font-size:10px!important;max-width:166px!important;color:#fff!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.p1s-route-identity.attached em{margin-top:2px!important;font-size:8px!important;max-width:166px!important;color:var(--route-color,#aaffb6)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
body.light-mode .p1s-route-identity.attached{background:rgba(255,255,255,.97)!important;color:#223027!important;box-shadow:0 7px 18px rgba(27,47,31,.16)!important}
body.light-mode .p1s-route-identity.attached:after{background:#fff!important}
body.light-mode .p1s-route-identity.attached strong{color:#223027!important}
body.light-mode .p1s-route-identity.attached small{color:#677968!important}
/* El pin real del GPS queda por encima de las líneas, sin etiquetas duplicadas. */
.guard-icon.route-context-active{z-index:760!important}
.guard-icon.route-context-active .guard-pin{filter:drop-shadow(0 5px 10px rgba(0,0,0,.20))}
.guard-icon.route-context-active .fleet-marker-label,.leaflet-tooltip.route-context-hidden{display:none!important}
@media(max-width:700px){
  .p1s-route-identity-wrap{width:164px!important;height:76px!important}
  .p1s-route-identity.attached{bottom:40px!important;min-width:118px!important;max-width:162px!important;padding:5px 8px!important;border-radius:10px!important}
  .p1s-route-identity.attached strong,.p1s-route-identity.attached em{max-width:144px!important}
}


/* P1S v8.25.7 · tarjeta Viaje/Multi viaje lateral al pin, sin superposición */
.p1s-route-identity-wrap{
  width:190px!important;
  height:80px!important;
  margin:0!important;
  overflow:visible!important;
  pointer-events:none!important;
}
.p1s-route-identity.attached{
  top:50%!important;
  bottom:auto!important;
  transform:translateY(-50%)!important;
  min-width:132px!important;
  max-width:188px!important;
  padding:6px 10px!important;
  text-align:left!important;
}
.p1s-route-identity.attached.side-right{
  left:calc(50% + 30px)!important;
  right:auto!important;
}
.p1s-route-identity.attached.side-left{
  right:calc(50% + 30px)!important;
  left:auto!important;
}
.p1s-route-identity.attached:after{display:none!important}
.p1s-route-identity.attached:before{
  content:"";
  position:absolute;
  top:50%;
  width:24px;
  height:2px;
  border-radius:999px;
  background:var(--route-color,#43ff68);
  opacity:.88;
  transform:translateY(-50%);
}
.p1s-route-identity.attached.side-right:before{right:100%}
.p1s-route-identity.attached.side-left:before{left:100%}
.p1s-route-identity.attached>span{
  align-items:flex-start!important;
  text-align:left!important;
}
@media(max-width:700px){
  .p1s-route-identity-wrap{width:164px!important;height:72px!important}
  .p1s-route-identity.attached{top:50%!important;bottom:auto!important;min-width:112px!important;max-width:150px!important;padding:5px 8px!important}
  .p1s-route-identity.attached.side-right{left:calc(50% + 25px)!important}
  .p1s-route-identity.attached.side-left{right:calc(50% + 25px)!important}
  .p1s-route-identity.attached:before{width:20px!important}
  .p1s-route-identity.attached strong,.p1s-route-identity.attached em{max-width:134px!important}
}


/* P1S v8.25.7 · identidad de todos los resguardos en viaje: avatar arriba, texto debajo */
.p1s-route-identity-wrap.stacked{
  width:184px!important;
  height:96px!important;
  margin:0!important;
  overflow:visible!important;
  pointer-events:none!important;
  background:transparent!important;
  border:0!important;
}
.p1s-route-identity.stacked{
  position:absolute!important;
  left:50%!important;
  top:0!important;
  right:auto!important;
  bottom:auto!important;
  transform:translateX(-50%)!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  gap:3px!important;
  width:184px!important;
  min-width:0!important;
  max-width:184px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  text-align:center!important;
}
.p1s-route-identity.stacked:before,.p1s-route-identity.stacked:after{display:none!important}
.p1s-route-avatar{
  position:relative!important;
  z-index:3!important;
  display:grid!important;
  place-items:center!important;
  width:36px!important;
  height:36px!important;
  flex:0 0 36px!important;
  border-radius:50%!important;
  overflow:hidden!important;
  background:#0d1c11!important;
  border:2px solid var(--route-color,#43ff68)!important;
  box-shadow:0 5px 13px rgba(0,0,0,.28),0 0 0 3px rgba(255,255,255,.82)!important;
  color:#dfffdf!important;
}
.p1s-route-avatar img{width:100%!important;height:100%!important;object-fit:cover!important;border:0!important;border-radius:50%!important;padding:0!important;background:transparent!important}
.p1s-route-avatar svg{width:18px!important;height:18px!important;display:block!important}
.p1s-route-avatar-fallback{background:#2f3f12!important;padding:0!important;overflow:hidden!important}
.p1s-route-avatar-fallback img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important;background:transparent!important;padding:0!important}
.p1s-route-card{
  position:relative!important;
  z-index:2!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  min-width:122px!important;
  max-width:176px!important;
  padding:5px 9px 6px!important;
  border-radius:10px!important;
  background:rgba(7,20,12,.96)!important;
  border:1px solid var(--route-color,#43ff68)!important;
  box-shadow:0 7px 18px rgba(0,0,0,.25)!important;
  line-height:1.1!important;
}
.p1s-route-card:before{
  content:"";
  position:absolute;
  left:50%;
  top:-5px;
  width:8px;
  height:8px;
  transform:translateX(-50%) rotate(45deg);
  background:rgba(7,20,12,.96);
  border-left:1px solid var(--route-color,#43ff68);
  border-top:1px solid var(--route-color,#43ff68);
}
.p1s-route-card small{font-size:7px!important;letter-spacing:.11em!important;text-transform:uppercase!important;color:#a7c7aa!important;font-weight:850!important;max-width:160px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.p1s-route-card strong{font-size:10px!important;color:#fff!important;max-width:160px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.p1s-route-card em{margin-top:2px!important;font-size:8px!important;font-style:normal!important;color:var(--route-color,#aaffb6)!important;max-width:160px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.p1s-route-identity.stacked.arrived{opacity:.76!important}
body.light-mode .p1s-route-avatar{background:#162118!important;box-shadow:0 5px 12px rgba(27,47,31,.18),0 0 0 3px rgba(255,255,255,.94)!important}
body.light-mode .p1s-route-card{background:rgba(255,255,255,.98)!important;box-shadow:0 7px 18px rgba(27,47,31,.16)!important}
body.light-mode .p1s-route-card:before{background:#fff!important}
body.light-mode .p1s-route-card strong{color:#223027!important}
body.light-mode .p1s-route-card small{color:#677968!important}
/* Durante Viaje/Multi viaje el avatar de seguimiento reemplaza al pin base para evitar duplicados. */
.guard-icon.journey-context-active .guard-pin{opacity:0!important;visibility:hidden!important}
.guard-icon.journey-context-active .fleet-marker-label{display:none!important}
@media(max-width:700px){
  .p1s-route-identity-wrap.stacked{width:156px!important;height:90px!important}
  .p1s-route-identity.stacked{width:156px!important;max-width:156px!important}
  .p1s-route-avatar{width:32px!important;height:32px!important;flex-basis:32px!important}
  .p1s-route-card{min-width:106px!important;max-width:150px!important;padding:4px 7px 5px!important}
  .p1s-route-card small,.p1s-route-card strong,.p1s-route-card em{max-width:136px!important}
}

/* v8.25.7 · etiqueta de viaje con logo P1S + restauración segura del pin base */
.p1s-route-label-wrap{background:transparent!important;border:0!important;overflow:visible!important;width:188px!important;height:56px!important}
.p1s-route-label-wrap,.p1s-route-label-wrap *{box-sizing:border-box}
.p1s-route-label-only{position:relative;display:inline-flex!important;align-items:center;gap:7px;width:188px;min-width:188px;max-width:188px;padding:5px 8px 5px 5px;border-radius:12px;background:rgba(7,20,12,.96);border:1px solid var(--route-color,#43ff68);box-shadow:0 8px 22px rgba(0,0,0,.28),0 0 12px color-mix(in srgb,var(--route-color,#43ff68) 22%,transparent);color:#f2fff3;pointer-events:none;line-height:1.12;overflow:hidden}
.p1s-route-label-only:before{content:"";position:absolute;left:50%;top:-5px;width:8px;height:8px;transform:translateX(-50%) rotate(45deg);background:rgba(7,20,12,.96);border-left:1px solid var(--route-color,#43ff68);border-top:1px solid var(--route-color,#43ff68)}
.p1s-route-brand{width:34px;height:34px;flex:0 0 34px;display:block;border-radius:9px;background:#2f3f12 url('p1s-label-logo-v8257.jpg') center/cover no-repeat;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.p1s-route-label-copy{display:flex;flex-direction:column;min-width:0;max-width:134px;gap:1px}
.p1s-route-label-only small{display:block;font-size:7px;letter-spacing:.11em;text-transform:uppercase;color:#a7c7aa;font-weight:850;max-width:134px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p1s-route-label-only strong{display:block;font-size:10px;color:#fff;max-width:134px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p1s-route-label-only em{display:block;margin-top:2px;font-size:8px;font-style:normal;color:var(--route-color,#aaffb6);max-width:134px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.p1s-route-label-only.arrived{opacity:.76;filter:saturate(.65)}
body.light-mode .p1s-route-label-only{background:rgba(255,255,255,.98);box-shadow:0 7px 18px rgba(27,47,31,.16);color:#223027}
body.light-mode .p1s-route-label-only:before{background:#fff}
body.light-mode .p1s-route-label-only strong{color:#223027}
body.light-mode .p1s-route-label-only small{color:#677968}
@media(max-width:700px){.p1s-route-label-wrap{width:172px!important;height:54px!important}.p1s-route-label-only{width:172px;min-width:172px;max-width:172px;padding:4px 7px 4px 4px;gap:6px}.p1s-route-brand{width:30px;height:30px;flex:0 0 30px;background-size:cover;background-position:center}.p1s-route-label-copy{max-width:122px}.p1s-route-label-only small,.p1s-route-label-only strong,.p1s-route-label-only em{max-width:122px}.p1s-route-label-only strong{font-size:9px}.p1s-route-label-only em{font-size:7px}}
/* Pin base oculto durante seguimiento activo; al finalizar se restaura por JS y vuelve a su tamaño normal. */
.guard-icon.journey-base-hidden,.guard-icon.journey-base-hidden *{opacity:0!important;visibility:hidden!important;pointer-events:none!important;width:1px!important;height:1px!important;min-width:0!important;min-height:0!important;border:0!important;background:transparent!important;box-shadow:none!important}

/* ============================================================
   P1S v8.26.0 · INTERFAZ PROFESIONAL
   Tema oscuro negro + borde luminoso blanco. El mapa conserva
   siempre la cartografía estándar de OpenStreetMap sin filtros.
   ============================================================ */
:root{
  --p1s-pro-radius:16px;
  --p1s-pro-radius-sm:11px;
  --p1s-pro-ease:cubic-bezier(.2,.7,.2,1);
  --p1s-pro-glow:0 0 0 1px rgba(255,255,255,.035),0 20px 55px rgba(0,0,0,.35);
}
html:not(.light-mode){background:#050607!important;color-scheme:dark!important}
body:not(.light-mode){
  --ink:#f4f7f4!important;
  --muted:#a0aaa3!important;
  --line:rgba(255,255,255,.115)!important;
  --paper:#050607!important;
  --lime:#d9f06a!important;
  --olive:#a9b65f!important;
  --green:#67dc8a!important;
  --amber:#e5b95b!important;
  background:
    radial-gradient(circle at 13% -12%,rgba(218,240,106,.08),transparent 28%),
    radial-gradient(circle at 94% 4%,rgba(255,255,255,.045),transparent 22%),
    linear-gradient(180deg,#050607 0%,#070908 45%,#050607 100%)!important;
  color:#f4f7f4!important;
}
body:not(.light-mode)::before{
  content:"";position:fixed;inset:0;pointer-events:none;z-index:-1;opacity:.38;
  background-image:linear-gradient(rgba(255,255,255,.016) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.012) 1px,transparent 1px);
  background-size:44px 44px;
  mask-image:linear-gradient(to bottom,black,transparent 72%);
}
body:not(.light-mode) *{scrollbar-color:#3c433e #090b0a!important}

/* Encabezado / marca */
body:not(.light-mode) .topbar{
  position:sticky;top:0;z-index:1800;height:82px!important;
  background:rgba(5,7,6,.94)!important;border-bottom:1px solid rgba(255,255,255,.13)!important;
  box-shadow:0 14px 40px rgba(0,0,0,.34),0 1px 0 rgba(255,255,255,.025) inset!important;
  backdrop-filter:blur(18px) saturate(120%);
}
body:not(.light-mode) .brand img{filter:brightness(0) invert(1) drop-shadow(0 0 14px rgba(255,255,255,.08))!important;opacity:.98}
body:not(.light-mode) .brand-divider{background:rgba(255,255,255,.18)!important}
body:not(.light-mode) .brand>span:last-child{color:#9ba49e!important}
body:not(.light-mode) .brand strong{color:#fff!important}
.topbar-center>span:last-child{display:grid;gap:2px}.topbar-center strong{font-size:.78rem;line-height:1.15;font-weight:700;color:inherit}.topbar-center small{font-size:.65rem;line-height:1.2;color:#8f9992;letter-spacing:.025em}
body:not(.light-mode) .topbar-center{color:#e7ece8!important}
body:not(.light-mode) .topbar-center .icon{color:#d9f06a!important;filter:drop-shadow(0 0 8px rgba(217,240,106,.25))}
body:not(.light-mode) .account-button,
body:not(.light-mode) .theme-toggle{
  border:1px solid rgba(255,255,255,.16)!important;background:rgba(255,255,255,.045)!important;color:#fff!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.02) inset,0 8px 20px rgba(0,0,0,.18)!important;
}
body:not(.light-mode) .account-button:hover,
body:not(.light-mode) .theme-toggle:hover{border-color:rgba(255,255,255,.48)!important;background:rgba(255,255,255,.085)!important;box-shadow:0 0 18px rgba(255,255,255,.12)!important}
.theme-toggle{width:auto!important;min-width:40px!important;height:38px!important;padding:0 11px!important;border-radius:12px!important;display:inline-flex!important;gap:7px!important}
.theme-toggle-label{font-size:.68rem;font-weight:700;letter-spacing:.02em}
body.light-mode .theme-toggle{width:auto!important;min-width:40px!important;height:38px!important;padding:0 11px!important;border-radius:12px!important;display:inline-flex!important;gap:7px!important}

/* Cabecera de página */
.page-kicker{display:flex;flex-wrap:wrap;gap:7px;margin-top:13px}.page-kicker span{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;border:1px solid #dde4d9;background:#fff;color:#697369;font-size:.67rem;font-weight:650}.page-kicker i{width:6px;height:6px;border-radius:50%;background:#4f9f66}
body:not(.light-mode) .page-kicker span{background:rgba(255,255,255,.035)!important;border-color:rgba(255,255,255,.12)!important;color:#aeb8b1!important;box-shadow:0 1px 0 rgba(255,255,255,.03) inset}
body:not(.light-mode) .page-kicker i{background:#74df94;box-shadow:0 0 10px rgba(116,223,148,.45)}
body:not(.light-mode) .eyebrow{color:#d9f06a!important}
body:not(.light-mode) .title-dot{color:#d9f06a!important;text-shadow:0 0 18px rgba(217,240,106,.25)}
body:not(.light-mode) .page-intro{color:#9ca69f!important}
body:not(.light-mode) h1,body:not(.light-mode) h2,body:not(.light-mode) h3{color:#f7faf7!important}
body:not(.light-mode) .connection-badge{padding:7px 10px;border-radius:999px;border:1px solid rgba(255,255,255,.09);background:rgba(255,255,255,.025);color:#aab4ad!important}
body:not(.light-mode) .connection-badge.live{color:#9ce7b1!important;border-color:rgba(103,220,138,.22);background:rgba(103,220,138,.055)}
body:not(.light-mode) .connection-badge.live .status-dot{background:#67dc8a!important;box-shadow:0 0 12px rgba(103,220,138,.7)!important;animation:p1sProPulse 2.2s ease-in-out infinite}

/* Botones */
body:not(.light-mode) .button-primary{background:linear-gradient(180deg,#e3f578,#cfe65f)!important;color:#12150c!important;border-color:#efffa0!important;box-shadow:0 8px 22px rgba(205,230,95,.14),0 0 0 1px rgba(255,255,255,.14) inset!important}
body:not(.light-mode) .button-primary:hover{background:linear-gradient(180deg,#ecfa91,#d9ee70)!important;box-shadow:0 10px 26px rgba(205,230,95,.2),0 0 14px rgba(255,255,255,.06)!important;transform:translateY(-1px)}
body:not(.light-mode) .button-outline,
body:not(.light-mode) .icon-button,
body:not(.light-mode) .trip-button,
body:not(.light-mode) .export-button{
  background:#0a0d0b!important;border-color:rgba(255,255,255,.13)!important;color:#e5eae6!important;
  box-shadow:0 1px 0 rgba(255,255,255,.03) inset!important;
}
body:not(.light-mode) .button-outline:hover,
body:not(.light-mode) .icon-button:hover,
body:not(.light-mode) .trip-button:hover,
body:not(.light-mode) .export-button:hover{background:#101411!important;border-color:rgba(255,255,255,.38)!important;color:#fff!important;box-shadow:0 0 16px rgba(255,255,255,.075)!important}
.button,.icon-button,.trip-button,.map-tool-button,.row-map-button,.theme-toggle,.account-button{transition:transform .18s var(--p1s-pro-ease),background-color .18s,border-color .18s,box-shadow .18s,color .18s!important}

/* Avisos y métricas */
body:not(.light-mode) .notice{background:linear-gradient(180deg,rgba(217,240,106,.055),rgba(255,255,255,.022))!important;border:1px solid rgba(217,240,106,.16)!important;color:#aeb8ae!important;box-shadow:0 8px 28px rgba(0,0,0,.16)!important}
body:not(.light-mode) .notice strong{color:#f1f5ed!important}
body:not(.light-mode) .stats{background:transparent!important;border:0!important;box-shadow:none!important;gap:12px}
body:not(.light-mode) .stat{
  border:1px solid rgba(255,255,255,.12)!important;border-radius:15px!important;background:linear-gradient(155deg,#0b0e0c 0%,#070908 100%)!important;
  box-shadow:0 13px 34px rgba(0,0,0,.25),0 1px 0 rgba(255,255,255,.035) inset!important;overflow:hidden;
  transition:transform .22s var(--p1s-pro-ease),border-color .22s,box-shadow .22s;
}
body:not(.light-mode) .stat::after{content:"";position:absolute;inset:auto -18% -52% 42%;height:90px;background:radial-gradient(circle,rgba(255,255,255,.06),transparent 66%);pointer-events:none}
body:not(.light-mode) .stat:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.25)!important;box-shadow:0 18px 44px rgba(0,0,0,.34),0 0 18px rgba(255,255,255,.04)!important}
body:not(.light-mode) .stat+.stat:before{display:none!important}
body:not(.light-mode) .stat p{color:#a7b0aa!important}
body:not(.light-mode) .stat strong{color:#fff!important;text-shadow:0 0 18px rgba(255,255,255,.05)}
body:not(.light-mode) .stat-foot{color:#747d77!important}
body:not(.light-mode) .stat-icon,body:not(.light-mode) .stat-icon.green,body:not(.light-mode) .stat-icon.amber,body:not(.light-mode) .stat-icon.sos{background:rgba(255,255,255,.045)!important;border:1px solid rgba(255,255,255,.105)!important;color:#d9f06a!important;box-shadow:none!important}

/* Ventana de monitoreo */
body:not(.light-mode) .monitor-window{background:#080a09!important;border:1px solid rgba(255,255,255,.13)!important;border-radius:18px!important;box-shadow:0 24px 66px rgba(0,0,0,.35),0 0 0 1px rgba(255,255,255,.018) inset!important}
body:not(.light-mode) .window-toolbar,
body:not(.light-mode) .map-search-strip,
body:not(.light-mode) .trip-toolbar,
body:not(.light-mode) .window-footer{background:#090c0a!important;border-color:rgba(255,255,255,.095)!important}
body:not(.light-mode) .view-tab{color:#909a93!important}
body:not(.light-mode) .view-tab.active{color:#f7faf7!important}
body:not(.light-mode) .view-tab.active:after{background:#d9f06a!important;box-shadow:0 0 12px rgba(217,240,106,.28)!important}
body:not(.light-mode) .read-time,body:not(.light-mode) .legend,body:not(.light-mode) .source-label,body:not(.light-mode) .map-provider-label{color:#89928c!important}
body:not(.light-mode) .map-search-field,
body:not(.light-mode) .map-search-results,
body:not(.light-mode) .map-search-result{background:#0d100e!important;border-color:rgba(255,255,255,.12)!important;color:#eef2ef!important}
body:not(.light-mode) .map-search-result:hover{background:#141815!important;border-color:rgba(255,255,255,.28)!important}
body:not(.light-mode) .map-search-result small,body:not(.light-mode) .map-search-message{color:#8d978f!important}
body:not(.light-mode) .map-search-result b{color:#d9f06a!important}
body:not(.light-mode) .map-search-result-pin{background:#171b16!important;color:#d9f06a!important}

/* El mapa NO cambia de tema. Se anulan filtros/oscuridad de versiones previas. */
body:not(.light-mode) .map-panel,
body:not(.light-mode) .map-panel #map{background:#e8eddf!important;color-scheme:light!important}
body:not(.light-mode) .map-panel .leaflet-tile-pane,
body:not(.light-mode) .leaflet-tile-pane{filter:none!important;opacity:1!important}
body:not(.light-mode) .map-panel .leaflet-control-zoom{border-color:#d7ddd1!important;box-shadow:0 2px 7px rgba(20,30,20,.16)!important}
body:not(.light-mode) .map-panel .leaflet-control-zoom a{background:#fff!important;color:#4e5a4a!important;border-color:#e0e5dc!important}
body:not(.light-mode) .map-panel .leaflet-control-attribution{background:rgba(255,255,255,.91)!important;color:#687267!important}
body:not(.light-mode) .map-panel .leaflet-control-attribution a{color:#4a6342!important}
body:not(.light-mode) .map-panel .map-label,
body:not(.light-mode) .map-panel .fit-button{background:rgba(255,255,255,.96)!important;border-color:#dce2d9!important;color:#485445!important;box-shadow:0 5px 16px rgba(32,45,31,.15)!important}
body:not(.light-mode) .map-panel .map-label .status-dot{background:#718344!important;box-shadow:none!important}
body:not(.light-mode) .leaflet-popup-content-wrapper,
body:not(.light-mode) .leaflet-popup-tip{background:#fff!important;color:#253027!important}
body:not(.light-mode) .leaflet-popup-content-wrapper{border-color:#d7e0d3!important;box-shadow:0 8px 30px rgba(25,38,27,.2)!important}
body:not(.light-mode) .leaflet-popup-close-button{color:#687268!important}
body:not(.light-mode) .marker-name{background:rgba(255,255,255,.95)!important;border-color:#e0e5d9!important;color:#465239!important;box-shadow:0 2px 6px rgba(20,35,18,.12)!important}

/* Ficha de resguardo sobre el mapa (sí sigue el tema de la interfaz). */
body:not(.light-mode) .selected-card{background:rgba(8,11,9,.97)!important;border:1px solid rgba(255,255,255,.18)!important;color:#eff3ef!important;box-shadow:0 18px 46px rgba(0,0,0,.48),0 0 20px rgba(255,255,255,.05)!important;backdrop-filter:blur(18px)}
body:not(.light-mode) .selected-address{border-color:rgba(255,255,255,.09)!important;color:#d3dad5!important}
body:not(.light-mode) .selected-street{color:#fff!important}
body:not(.light-mode) .selected-full-address,body:not(.light-mode) .selected-geocode-source,body:not(.light-mode) .selected-time{color:#8f9992!important}
.selected-identity-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:10px 0 2px}.selected-identity-grid>span{display:grid;gap:2px;padding:8px 9px;border-radius:9px;background:#f5f7f3;border:1px solid #e2e7df;min-width:0}.selected-identity-grid small{font-size:.61rem;color:#7a847b;text-transform:uppercase;letter-spacing:.06em}.selected-identity-grid strong{font-size:.69rem;line-height:1.25;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;color:#2c382d}
body:not(.light-mode) .selected-identity-grid>span{background:rgba(255,255,255,.035)!important;border-color:rgba(255,255,255,.095)!important}body:not(.light-mode) .selected-identity-grid small{color:#8e9891!important}body:not(.light-mode) .selected-identity-grid strong{color:#f5f8f5!important}
body:not(.light-mode) .selected-metric,body:not(.light-mode) .selected-last-trip{background:rgba(255,255,255,.03)!important;border-color:rgba(255,255,255,.09)!important}
body:not(.light-mode) .selected-metric span,body:not(.light-mode) .selected-last-trip span{color:#8e9891!important}
body:not(.light-mode) .selected-metric strong,body:not(.light-mode) .selected-last-trip strong{color:#f4f7f4!important}

/* Herramientas y rutas */
body:not(.light-mode) .map-tool-button.active-tool,
body:not(.light-mode) .trip-button.active{background:rgba(217,240,106,.09)!important;border-color:rgba(217,240,106,.33)!important;color:#eaf59f!important;box-shadow:0 0 16px rgba(217,240,106,.06)!important}
body:not(.light-mode) .route-summary-card{background:rgba(8,11,9,.97)!important;border-color:rgba(255,255,255,.17)!important;color:#e9eeea!important;box-shadow:0 18px 48px rgba(0,0,0,.46)!important}
body:not(.light-mode) .route-summary-card strong{color:#fff!important}
body:not(.light-mode) .route-summary-card .route-meta,body:not(.light-mode) .route-help{color:#8f9992!important}
body:not(.light-mode) .route-summary-card .route-stops{border-color:rgba(255,255,255,.09)!important}
body:not(.light-mode) .route-summary-card button{color:#d9f06a!important}

/* Resguardos / tabla */
body:not(.light-mode) .locations{position:relative;padding:2px 0 0}
body:not(.light-mode) .section-heading p{color:#929c95!important}
body:not(.light-mode) .count-badge{background:rgba(217,240,106,.07)!important;border-color:rgba(217,240,106,.2)!important;color:#e5f28e!important;border-radius:999px!important;padding-inline:8px!important}
body:not(.light-mode) .search-field,
body:not(.light-mode) .list-controls select{background:#0a0d0b!important;border-color:rgba(255,255,255,.13)!important;color:#eef2ef!important;box-shadow:0 1px 0 rgba(255,255,255,.025) inset!important}
body:not(.light-mode) .search-field:focus-within{outline:2px solid rgba(217,240,106,.42)!important;outline-offset:1px}
body:not(.light-mode) input::placeholder{color:#727c75!important}
body:not(.light-mode) .table-wrap{background:#080a09!important;border:1px solid rgba(255,255,255,.13)!important;border-radius:16px!important;box-shadow:0 20px 52px rgba(0,0,0,.26),0 1px 0 rgba(255,255,255,.02) inset!important;overflow:auto}
body:not(.light-mode) th{position:sticky;top:0;z-index:3;background:rgba(11,14,12,.98)!important;color:#919b94!important;border-color:rgba(255,255,255,.09)!important;letter-spacing:.035em}
body:not(.light-mode) td{border-color:rgba(255,255,255,.065)!important}
body:not(.light-mode) tbody tr{background:transparent!important;transition:background .18s,border-color .18s,box-shadow .18s!important}
body:not(.light-mode) tbody tr:hover{background:rgba(255,255,255,.028)!important}
body:not(.light-mode) tbody tr.selected{background:linear-gradient(90deg,rgba(217,240,106,.075),rgba(255,255,255,.018))!important}
body:not(.light-mode) tbody tr.selected td:first-child{box-shadow:inset 3px 0 #d9f06a!important}
body:not(.light-mode) .guard-name .avatar{background:#111511!important;border:1px solid rgba(255,255,255,.11)!important;color:#d9f06a!important}
body:not(.light-mode) .guard-name strong,body:not(.light-mode) .address-line,body:not(.light-mode) .report-time{color:#f2f5f2!important}
body:not(.light-mode) .guard-name small,body:not(.light-mode) .coordinate-line,body:not(.light-mode) .report-date,body:not(.light-mode) .report-age{color:#818b84!important}
body:not(.light-mode) .row-live-metrics{color:#a4aea7!important;border-color:rgba(255,255,255,.09)!important}
body:not(.light-mode) .row-live-metrics span{background:rgba(255,255,255,.025)!important;border-color:rgba(255,255,255,.075)!important}
body:not(.light-mode) .row-live-metrics b{color:#e6ebe7!important}
body:not(.light-mode) .status-pill{border:1px solid transparent!important;border-radius:999px!important;padding:6px 9px!important}
body:not(.light-mode) .status-pill.online{background:rgba(103,220,138,.09)!important;color:#8ee6a8!important;border-color:rgba(103,220,138,.18)!important}
body:not(.light-mode) .status-pill.offline{background:rgba(229,185,91,.09)!important;color:#e6bd69!important;border-color:rgba(229,185,91,.18)!important}
body:not(.light-mode) .status-pill.unknown{background:rgba(255,255,255,.05)!important;color:#aeb7b0!important;border-color:rgba(255,255,255,.11)!important}
body:not(.light-mode) .row-map-button{background:#0c100d!important;border-color:rgba(255,255,255,.13)!important;color:#eef2ef!important;border-radius:9px!important}
body:not(.light-mode) .row-map-button:hover{background:#151915!important;border-color:rgba(217,240,106,.35)!important;color:#edf5b3!important;box-shadow:0 0 14px rgba(217,240,106,.06)!important}
body:not(.light-mode) .table-footer,body:not(.light-mode) .page-footer{color:#828c85!important}
body:not(.light-mode) .page-footer{border-color:rgba(255,255,255,.09)!important}
body:not(.light-mode) .page-footer strong{color:#e8ede9!important}

/* Diálogos: negro profesional, sin perder funcionalidad. */
body:not(.light-mode) dialog{background:#090c0a!important;color:#f1f5f2!important;border:1px solid rgba(255,255,255,.16)!important;box-shadow:0 32px 100px rgba(0,0,0,.68),0 0 22px rgba(255,255,255,.035)!important}
body:not(.light-mode) dialog::backdrop{background:rgba(0,0,0,.72)!important;backdrop-filter:blur(9px)!important}
body:not(.light-mode) .dialog-symbol{background:rgba(217,240,106,.1)!important;color:#e5f28e!important;border:1px solid rgba(217,240,106,.22)!important;box-shadow:none!important}
body:not(.light-mode) dialog input,
body:not(.light-mode) dialog select,
body:not(.light-mode) dialog textarea,
body:not(.light-mode) .movement-toolbar-global input,
body:not(.light-mode) .movement-toolbar-global select{background:#0b0f0c!important;border-color:rgba(255,255,255,.14)!important;color:#eef2ef!important;box-shadow:none!important}
body:not(.light-mode) dialog input:focus,body:not(.light-mode) dialog select:focus,body:not(.light-mode) dialog textarea:focus{border-color:rgba(217,240,106,.45)!important;outline:2px solid rgba(217,240,106,.16)!important}
body:not(.light-mode) .ops-description,body:not(.light-mode) .privacy-note,body:not(.light-mode) .history-hint{color:#939d96!important}

/* Chat conserva su identidad oscura y gana coherencia con el resto. */
body:not(.light-mode) #global-chat-dialog.p1s-chat-v2.global-chat-dialog{border-color:rgba(255,255,255,.16)!important;box-shadow:0 28px 90px rgba(0,0,0,.66),0 0 24px rgba(255,255,255,.035)!important}

/* Animaciones discretas */
@keyframes p1sProPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.18);opacity:.7}}
@keyframes p1sProIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}
@keyframes p1sProGlow{0%,100%{box-shadow:0 0 0 rgba(255,255,255,0)}50%{box-shadow:0 0 18px rgba(255,255,255,.07)}}
body:not(.light-mode) .page-heading{animation:p1sProIn .42s var(--p1s-pro-ease) both}
body:not(.light-mode) .stats{animation:p1sProIn .5s .04s var(--p1s-pro-ease) both}
body:not(.light-mode) .monitor-window{animation:p1sProIn .56s .08s var(--p1s-pro-ease) both}
body:not(.light-mode) .locations{animation:p1sProIn .62s .12s var(--p1s-pro-ease) both}
body:not(.light-mode) .selected-card:not([hidden]){animation:p1sProIn .24s var(--p1s-pro-ease) both}
body:not(.light-mode) dialog[open]{animation:p1sProIn .22s var(--p1s-pro-ease) both}

/* Accesibilidad / rendimiento */
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}}
@media(max-width:1190px){.theme-toggle-label{display:none}.theme-toggle{width:38px!important;padding:0!important}.page-kicker{max-width:560px}}
@media(max-width:760px){
  body:not(.light-mode) .topbar{height:72px!important}.page-kicker{gap:5px;margin-top:10px}.page-kicker span{font-size:.61rem;padding:5px 7px}.page-kicker span:nth-child(3){display:none}
  body:not(.light-mode) .stats{gap:8px}.selected-identity-grid{grid-template-columns:1fr;margin-top:7px}.selected-identity-grid>span:nth-child(3),.selected-identity-grid>span:nth-child(4){display:none}
  body:not(.light-mode) .locations tr{border-color:rgba(255,255,255,.075)!important}.theme-toggle{width:34px!important;height:34px!important;min-width:34px!important}
}
@media(max-width:430px){.page-kicker span:nth-child(2){display:none}.page-kicker span:first-child{display:inline-flex}.header-actions{gap:8px!important}}


/* P1S v8.26.2 · dark polish + map label text + advanced selected-card actions */
body:not(.light-mode){background:#050706!important;color:#e7f2e9!important;color-scheme:dark!important}
html body:not(.light-mode){color-scheme:dark!important}
body:not(.light-mode) .theme-toggle{display:inline-flex!important}
body:not(.light-mode) .button-outline,
body:not(.light-mode) .icon-button,
body:not(.light-mode) .window-toolbar,
body:not(.light-mode) .window-footer,
body:not(.light-mode) .search-field,
body:not(.light-mode) .list-controls select,
body:not(.light-mode) .fit-button,
body:not(.light-mode) .map-label,
body:not(.light-mode) .selected-card,
body:not(.light-mode) .trip-toolbar,
body:not(.light-mode) .route-view-control,
body:not(.light-mode) .trip-status,
body:not(.light-mode) .multi-trip-status,
body:not(.light-mode) .replay-status,
body:not(.light-mode) .geofence-pick-hint,
body:not(.light-mode) .notice,
body:not(.light-mode) .stat,
body:not(.light-mode) .stats,
body:not(.light-mode) .section-heading .count-badge{background:#08100b!important;border-color:#1c5a30!important;color:#e7f3e9!important}
body:not(.light-mode) .button-outline:hover,body:not(.light-mode) .icon-button:hover,body:not(.light-mode) .row-map-button:hover,body:not(.light-mode) .selected-action-button:hover{background:#0d1a12!important}
body:not(.light-mode) .search-field input,body:not(.light-mode) .list-controls select,body:not(.light-mode) input::placeholder{color:#dbe9de!important}
body:not(.light-mode) .table-wrap,
body:not(.light-mode) .table-wrap table,
body:not(.light-mode) .table-wrap thead,
body:not(.light-mode) .table-wrap tbody,
body:not(.light-mode) .table-wrap tr,
body:not(.light-mode) .table-wrap td,
body:not(.light-mode) .table-wrap th,
body:not(.light-mode) .locations tbody tr,
body:not(.light-mode) .locations tbody tr td{background:#080d0a!important}
body:not(.light-mode) .locations tbody tr{border-color:#143321!important}
body:not(.light-mode) .row-live-metrics span{background:#09140f!important;border-color:#153724!important;color:#d6ead9!important}
body:not(.light-mode) .row-map-button{background:#0a1510!important;border-color:#1e5d31!important;color:#d8eedb!important}
body:not(.light-mode) .guard-name .avatar,
body:not(.light-mode) .avatar{background:#0d1a12!important;color:#9fffaa!important;border:1px solid #1f5e33!important}

body:not(.light-mode) .marker-name,
body:not(.light-mode) .leaflet-tooltip.marker-name,
body:not(.light-mode) .map-search-label,
body:not(.light-mode) .map-search-label *{background:#ddf6e2!important;border-color:#94d3a0!important;color:#0e1310!important;box-shadow:0 4px 12px rgba(0,0,0,.22)!important}
body:not(.light-mode) .marker-name *,body:not(.light-mode) .marker-normal-label,body:not(.light-mode) .marker-stop-label,body:not(.light-mode) .marker-motion-tooltip{color:#0e1310!important}
body:not(.light-mode) .leaflet-tooltip.marker-name:before{border-top-color:#94d3a0!important}

.selected-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.selected-action-button{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:7px 10px;border-radius:10px;border:1px solid #d9e3d8;background:#f6faf6;color:#2b3b2e;font-size:.72rem;font-weight:700}
.selected-action-button .icon{width:14px;height:14px}
.selected-action-button.active{background:#e7f7ea;border-color:#69c77a;color:#15301d}
body:not(.light-mode) .selected-action-button{background:#09130d!important;border-color:#1e6534!important;color:#dff3e2!important}
body:not(.light-mode) .selected-action-button.active{background:#10321d!important;border-color:#43ff67!important;color:#baffc6!important;box-shadow:0 0 0 1px rgba(67,255,103,.18) inset,0 0 12px rgba(67,255,103,.12)!important}

body:not(.light-mode) #global-chat-dialog.p1s-chat-v2.global-chat-dialog{background:#060b08!important;border-color:#1f5c32!important;color:#e8f4ea!important;box-shadow:0 30px 80px rgba(0,0,0,.45),0 0 0 1px rgba(67,255,103,.05) inset!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-top,
body:not(.light-mode) #global-chat-dialog .p1s-chat-tabs,
body:not(.light-mode) #global-chat-dialog .p1s-chat-room-strip,
body:not(.light-mode) #global-chat-dialog .p1s-chat-selection-shell,
body:not(.light-mode) #global-chat-dialog .p1s-chat-tools-row,
body:not(.light-mode) #global-chat-dialog .p1s-chat-selection-bar,
body:not(.light-mode) #global-chat-dialog .p1s-chat-panel,
body:not(.light-mode) #global-chat-dialog .global-chat-messages,
body:not(.light-mode) #global-chat-dialog .p1s-chat-composer,
body:not(.light-mode) #global-chat-dialog .p1s-chat-groups-panel,
body:not(.light-mode) #global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head,
body:not(.light-mode) #global-chat-dialog .p1s-chat-emoji-picker,
body:not(.light-mode) #global-chat-dialog .p1s-chat-members-card,
body:not(.light-mode) #global-chat-dialog .p1s-chat-members-card-head,
body:not(.light-mode) #global-chat-dialog .p1s-chat-confirm-card,
body:not(.light-mode) #global-chat-dialog .p1s-chat-group-create{background:#08100b!important;border-color:rgba(78,255,126,.14)!important;color:#e8f4ea!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-room-current,
body:not(.light-mode) #global-chat-dialog .p1s-chat-room-switcher,
body:not(.light-mode) #global-chat-dialog .p1s-chat-room-menu,
body:not(.light-mode) #global-chat-dialog .p1s-chat-window-button,
body:not(.light-mode) #global-chat-dialog .p1s-chat-online-pill,
body:not(.light-mode) #global-chat-dialog .p1s-chat-gps-stat,
body:not(.light-mode) #global-chat-dialog .p1s-chat-new-group,
body:not(.light-mode) #global-chat-dialog .p1s-chat-groups-search,
body:not(.light-mode) #global-chat-dialog .p1s-chat-input-wrap,
body:not(.light-mode) #global-chat-dialog .p1s-chat-group-members,
body:not(.light-mode) #global-chat-dialog .p1s-chat-group-members-head,
body:not(.light-mode) #global-chat-dialog .p1s-chat-member-search,
body:not(.light-mode) #global-chat-dialog .chat-older,
body:not(.light-mode) #global-chat-dialog .chat-message-menu,
body:not(.light-mode) #global-chat-dialog .chat-message-menu button,
body:not(.light-mode) #global-chat-dialog .p1s-chat-members-card-head button{background:#0b1510!important;border-color:#1d5c31!important;color:#e8f4ea!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-tab{color:#92a79a!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-tab.active{background:#0f2617!important;color:#d7ffdf!important;border-color:#235f36!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-room-copy strong,
body:not(.light-mode) #global-chat-dialog .p1s-chat-group-row strong,
body:not(.light-mode) #global-chat-dialog .p1s-chat-members-card-head strong,
body:not(.light-mode) #global-chat-dialog .chat-message-heading strong,
body:not(.light-mode) #global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head strong{color:#edf8ef!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-room-copy small,
body:not(.light-mode) #global-chat-dialog .p1s-chat-heading #global-chat-status,
body:not(.light-mode) #global-chat-dialog .p1s-chat-tools-label,
body:not(.light-mode) #global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head span,
body:not(.light-mode) #global-chat-dialog .p1s-chat-group-row small,
body:not(.light-mode) #global-chat-dialog .chat-message-heading time,
body:not(.light-mode) #global-chat-dialog .chat-message-content>small,
body:not(.light-mode) #global-chat-dialog .chat-compose-hint,
body:not(.light-mode) #global-chat-dialog .p1s-chat-members-card-head em,
body:not(.light-mode) #global-chat-dialog .p1s-chat-members-card-head small,
body:not(.light-mode) #global-chat-dialog .p1s-chat-member-option small{color:#93a799!important}
body:not(.light-mode) #global-chat-dialog .chat-message-content{background:#0c1510!important;border-color:#1f5c31!important;color:#ecf7ee!important;box-shadow:none!important}
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me .chat-message-content{background:#11301c!important;border-color:#2b8a45!important;color:#f1fff4!important}
body:not(.light-mode) #global-chat-dialog #global-chat-text,
body:not(.light-mode) #global-chat-dialog .p1s-chat-groups-search input,
body:not(.light-mode) #global-chat-dialog input,
body:not(.light-mode) #global-chat-dialog textarea{color:#eaf5ec!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-group-row:hover,
body:not(.light-mode) #global-chat-dialog .p1s-chat-group-row.active,
body:not(.light-mode) #global-chat-dialog .chat-message-menu button:hover,
body:not(.light-mode) #global-chat-dialog .p1s-chat-emoji-inline:hover,
body:not(.light-mode) #global-chat-dialog .p1s-chat-image-button:hover{background:#102017!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-send-visible{background:linear-gradient(145deg,#2f7a43,#1a512b)!important;color:#f2ffb5!important;box-shadow:0 10px 24px rgba(0,0,0,.3)!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-members-overlay,
body:not(.light-mode) #global-chat-dialog .p1s-chat-confirm-overlay{background:rgba(1,6,3,.7)!important}

@media(max-width:760px){
  .selected-actions{gap:5px;margin-top:8px}
  .selected-action-button{min-height:30px;padding:6px 8px;font-size:.63rem;border-radius:8px}
  .selected-action-button .icon{width:12px;height:12px}
  body:not(.light-mode) .locations tbody tr,
  body:not(.light-mode) .locations tbody tr td{background:#080d0a!important}
}


/* P1S v8.26.3 · Operaciones PRO */
.ops-intelligence{display:grid;grid-template-columns:minmax(260px,1.05fr) minmax(360px,1.7fr) minmax(300px,1.25fr);gap:12px;margin:-8px 0 24px;align-items:stretch}
.ops-intelligence-main,.ops-kpis,.ops-priority{border:1px solid rgba(255,255,255,.11);background:linear-gradient(180deg,#090d0a,#070a08);border-radius:16px;box-shadow:0 14px 34px rgba(0,0,0,.22);min-width:0}
.ops-intelligence-main{display:flex;align-items:center;gap:13px;padding:14px 16px}
.ops-health-orb{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;flex:0 0 44px;background:#111813;border:1px solid #263129;color:#94a099;transition:.2s ease}
.ops-health-orb .icon{width:22px;height:22px}.ops-health-orb[data-state="healthy"]{background:#0a2413;border-color:#277b3e;color:#6dff82;box-shadow:0 0 18px rgba(66,255,96,.10)}.ops-health-orb[data-state="warning"]{background:#261d0b;border-color:#7c5e20;color:#ffd36a}.ops-health-orb[data-state="critical"]{background:#2a1012;border-color:#8d333a;color:#ff7b84;box-shadow:0 0 18px rgba(255,70,83,.10)}
.ops-health-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.ops-health-kicker{font-size:.58rem;font-weight:900;letter-spacing:.14em;color:#74817a}.ops-health-copy strong{font-size:.92rem;color:#edf5ef;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ops-health-copy small{font-size:.69rem;color:#829187;line-height:1.35}
.ops-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:hidden}.ops-kpi{position:relative;border:0;border-right:1px solid rgba(255,255,255,.08);background:transparent;color:#dce8df;padding:12px 13px;text-align:left;min-width:0}.ops-kpi:last-child{border-right:0}.ops-kpi:hover,.ops-kpi.active{background:#0c1510}.ops-kpi span,.ops-kpi small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ops-kpi span{font-size:.62rem;color:#7f8e84}.ops-kpi strong{display:block;font-size:1.15rem;line-height:1.15;margin:3px 0;color:#edf7ef}.ops-kpi small{font-size:.55rem;color:#627168}.ops-kpi.warning strong{color:#ffd56e}.ops-kpi.danger strong{color:#ff838c}.ops-kpi.active:after{content:"";position:absolute;left:10px;right:10px;bottom:0;height:2px;border-radius:2px;background:#55ff72}
.ops-priority{padding:10px}.ops-priority-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:1px 2px 8px}.ops-priority-head>span{display:flex;flex-direction:column;min-width:0}.ops-priority-head strong{font-size:.72rem;color:#e6f1e8}.ops-priority-head small{font-size:.57rem;color:#7d8b82;margin-top:2px}.ops-priority-actions{display:flex;gap:5px}.ops-priority-actions button{border:1px solid #1f4930;background:#0a1510;color:#b9c8bd;border-radius:8px;min-height:28px;padding:0 8px;font-size:.58rem;font-weight:800;display:inline-flex;align-items:center;gap:4px}.ops-priority-actions button .icon{width:12px;height:12px}.ops-priority-actions button:hover{background:#102117;border-color:#2f7047;color:#eaffee}.ops-priority-list{display:flex;gap:6px;overflow:auto;scrollbar-width:thin}.ops-priority-item{min-width:150px;max-width:205px;display:grid;grid-template-columns:7px minmax(0,1fr) auto;align-items:center;gap:7px;border:1px solid #3e2225;background:#160c0e;border-radius:10px;color:#e8efea;padding:7px 8px;text-align:left}.ops-priority-item:hover{background:#211012;border-color:#73333a}.ops-priority-dot{width:7px;height:7px;border-radius:50%;background:#ff5864;box-shadow:0 0 8px rgba(255,70,84,.45)}.ops-priority-item>span:nth-child(2){min-width:0}.ops-priority-item strong,.ops-priority-item small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ops-priority-item strong{font-size:.62rem}.ops-priority-item small{font-size:.53rem;color:#bb8b90;margin-top:2px}.ops-priority-item b{font-size:.53rem;color:#ff9aa1}.ops-priority-empty{display:flex;align-items:center;min-height:42px;color:#718078;font-size:.62rem;padding:0 5px}

.quick-filter-bar{display:flex;align-items:center;gap:7px;margin:0 0 10px;overflow-x:auto;padding:1px 1px 4px;scrollbar-width:thin}.quick-filter{display:inline-flex;align-items:center;gap:7px;min-height:34px;padding:0 10px;border-radius:10px;border:1px solid rgba(255,255,255,.11);background:#080d0a;color:#91a097;font-size:.68rem;font-weight:750;white-space:nowrap}.quick-filter b{min-width:20px;height:20px;padding:0 5px;border-radius:999px;display:grid;place-items:center;background:#101813;color:#aab9af;font-size:.58rem}.quick-filter:hover{background:#0d1510}.quick-filter.active{background:#102218;border-color:#286e3e;color:#dff6e3;box-shadow:0 0 0 1px rgba(76,255,107,.08) inset}.quick-filter.active b{background:#1f6a37;color:#edfff0}.quick-filter.critical:not(.active){border-color:#452126;color:#d99aa0}.quick-filter.critical b{background:#2a1114;color:#ff8790}
body:not(.light-mode) .locations tr.is-critical{box-shadow:inset 3px 0 #8c3540!important}body:not(.light-mode) .locations tr.is-critical.selected{box-shadow:inset 3px 0 #ff6671!important}body:not(.light-mode) .locations tr.is-low-battery .row-live-metrics span:nth-child(4){border-color:#74571d!important;color:#ffd36a!important;background:#201807!important}body:not(.light-mode) .locations tr.is-stale .report-age{color:#ff8d96!important}

@media(max-width:1180px){.ops-intelligence{grid-template-columns:1fr 1.6fr}.ops-priority{grid-column:1/-1}.ops-priority-list{max-width:100%}}
@media(max-width:760px){
  .ops-intelligence{grid-template-columns:1fr;margin:-4px 0 18px;gap:8px}.ops-intelligence-main{padding:11px 12px}.ops-health-orb{width:38px;height:38px;flex-basis:38px;border-radius:12px}.ops-health-copy strong{font-size:.82rem}.ops-health-copy small{font-size:.61rem}.ops-kpis{grid-template-columns:repeat(4,minmax(86px,1fr));overflow-x:auto}.ops-kpi{min-width:86px;padding:10px}.ops-kpi strong{font-size:1rem}.ops-priority{grid-column:auto}.ops-priority-head{align-items:flex-start}.ops-priority-actions button{font-size:0;width:30px;padding:0;justify-content:center}.ops-priority-actions button .icon{display:block}.ops-priority-actions #ops-show-critical{font-size:.54rem;width:auto;padding:0 7px}.ops-priority-list{padding-bottom:2px}.quick-filter-bar{margin-bottom:8px}.quick-filter{min-height:32px;font-size:.62rem;padding:0 9px}.quick-filter b{height:18px;min-width:18px;font-size:.54rem}
}
@media(max-width:430px){.ops-kpis{grid-template-columns:repeat(4,88px)}.ops-health-copy small{max-width:250px}.ops-priority-item{min-width:138px}.quick-filter{font-size:.59rem}}


/* P1S v8.26.4 · interfaz operativa compacta, SOS integrado y marcador de resguardo mejorado */
.legacy-stat-bridge{display:none!important}
.ops-intelligence{margin-top:0!important}
.ops-kpis{grid-template-columns:repeat(5,minmax(0,1fr))!important}
.ops-kpi.sos-kpi{border-right:0!important;position:relative}
.ops-kpi.sos-kpi strong{color:#ff8b93!important}
.ops-kpi.sos-kpi::before{content:"SOS";position:absolute;right:9px;top:9px;display:grid;place-items:center;min-width:24px;height:16px;padding:0 4px;border-radius:6px;background:#2a1012;border:1px solid #6f2930;color:#ff8b93;font-size:.46rem;font-weight:900;letter-spacing:.04em}
.ops-kpi.sos-kpi.sos-live{background:linear-gradient(180deg,#2c0d11,#17080a)!important;border-color:#a7353e!important;box-shadow:inset 0 0 0 1px rgba(255,76,88,.12),0 0 18px rgba(255,57,71,.14)!important;animation:p1sSosKpiPulse 1.35s ease-in-out infinite}
.ops-kpi.sos-kpi.sos-live strong,.ops-kpi.sos-kpi.sos-live small,.ops-kpi.sos-kpi.sos-live span{color:#ffd8db!important}
@keyframes p1sSosKpiPulse{0%,100%{box-shadow:inset 0 0 0 1px rgba(255,76,88,.12),0 0 10px rgba(255,57,71,.10)}50%{box-shadow:inset 0 0 0 1px rgba(255,76,88,.24),0 0 24px rgba(255,57,71,.24)}}

/* Marcador P1S de resguardo: más visible, compacto y profesional. */
.guard-icon{overflow:visible!important}
.guard-pin{width:44px!important;height:44px!important;border-width:2px!important;background:linear-gradient(160deg,#0b2012,#0f5c28)!important;border-color:#7bff8e!important;box-shadow:0 8px 22px rgba(0,0,0,.30),0 0 0 3px rgba(67,255,103,.12)!important;overflow:visible!important}
.guard-pin::after{inset:-6px!important;background:rgba(67,255,103,.08)!important;border:1px solid rgba(91,255,118,.24)!important}
.guard-pin.offline,.guard-pin.unknown{background:linear-gradient(160deg,#122219,#284231)!important;border-color:#b5c4b9!important}
.guard-pin.offline:before,.guard-pin.unknown:before{display:none!important}
.guard-pin-core{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;overflow:hidden;background:linear-gradient(160deg,#15351f,#0a1a10);border:1px solid rgba(255,255,255,.17);box-shadow:inset 0 0 0 1px rgba(0,0,0,.22)}
.guard-pin-core svg{width:18px!important;height:18px!important;stroke:#f4fff5!important}
.guard-pin-core .guard-pin-photo,.guard-pin-core img{width:100%!important;height:100%!important;border-radius:50%!important;object-fit:cover!important}
.guard-pin-state-dot{position:absolute;left:-2px;bottom:-2px;width:12px;height:12px;border-radius:50%;border:2px solid #071009;box-shadow:0 0 0 1px rgba(255,255,255,.20),0 2px 5px rgba(0,0,0,.3);z-index:8}
.guard-pin-state-dot.online{background:#49ff6c!important}.guard-pin-state-dot.offline{background:#e8b752!important}.guard-pin-state-dot.unknown{background:#9ba9a0!important}
.guard-pin.selected,.guard-pin.selected.offline,.guard-pin.selected.unknown{width:46px!important;height:46px!important;background:linear-gradient(160deg,#07140b,#0f5226)!important;border-color:#dfff73!important;box-shadow:0 0 0 4px rgba(223,255,115,.15),0 0 28px rgba(74,255,98,.42)!important}
.guard-pin.sos-active{background:linear-gradient(160deg,#3a090e,#a11722)!important;border-color:#ff8790!important;box-shadow:0 0 0 4px rgba(255,77,90,.18),0 0 30px rgba(255,45,61,.55)!important;animation:p1sGuardSosPulse 1.05s ease-in-out infinite}
.guard-pin.sos-active::after{background:rgba(255,62,78,.12)!important;border-color:rgba(255,102,114,.55)!important}
@keyframes p1sGuardSosPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.07)}}
.guard-motion-badge{right:-14px!important;top:-12px!important}
.guard-stop-badge{z-index:9!important}

/* Nombre del resguardo sobre mapa: texto negro, estado visible y sin caja pesada. */
body:not(.light-mode) .marker-name,body:not(.light-mode) .leaflet-tooltip.marker-name{background:#f4fff5!important;border:1px solid #b7d8bd!important;color:#0a0e0b!important;border-radius:10px!important;box-shadow:0 6px 18px rgba(0,0,0,.24)!important;padding:5px 8px!important;text-shadow:none!important}
body:not(.light-mode) .marker-name *,body:not(.light-mode) .marker-normal-label{color:#0a0e0b!important;text-shadow:none!important}
.marker-normal-label{display:flex!important;align-items:center!important;gap:7px!important;min-width:0!important}
.marker-label-dot{width:8px;height:8px;border-radius:50%;flex:0 0 8px;box-shadow:0 0 0 2px rgba(0,0,0,.06)}
.marker-label-dot.online{background:#1bcf4b}.marker-label-dot.offline{background:#d99b26}.marker-label-dot.unknown{background:#87948b}
.marker-label-copy{display:flex;flex-direction:column;min-width:0;line-height:1.08}
.marker-label-copy strong{font-size:.72rem!important;font-weight:900!important;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.marker-label-copy small{font-size:.48rem!important;font-weight:800!important;letter-spacing:.06em;color:#5f6e63!important;margin-top:2px;text-transform:uppercase}
.marker-name-sos{background:#fff1f2!important;border-color:#ff818c!important;box-shadow:0 0 0 2px rgba(255,60,75,.08),0 8px 20px rgba(0,0,0,.25)!important}
.marker-name-sos .marker-label-dot{background:#f23546!important;animation:p1sMarkerDotPulse .9s ease-in-out infinite}
.marker-name-sos .marker-label-copy small{color:#b51f2d!important}
@keyframes p1sMarkerDotPulse{0%,100%{opacity:.55}50%{opacity:1;box-shadow:0 0 0 4px rgba(242,53,70,.14)}}

/* Diagnóstico visible en la lista: evita revisar cada ficha manualmente. */
.row-health-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
.row-health-chip{display:inline-flex;align-items:center;min-height:18px;padding:2px 6px;border-radius:999px;border:1px solid #35513d;background:#101a13;color:#b8c9bc;font-size:.5rem;font-weight:850;letter-spacing:.02em;white-space:nowrap}
.row-health-chip.sos{background:#2c0d11;border-color:#88343b;color:#ff9ca4}
.row-health-chip.offline{background:#271d0b;border-color:#765a21;color:#e9c06a}
.row-health-chip.unknown{background:#151b17;border-color:#465349;color:#b2c0b6}
.row-health-chip.stale{background:#20170b;border-color:#654a20;color:#dfb763}
.row-health-chip.battery{background:#241511;border-color:#6f3c2d;color:#e6a487}
.locations tr.is-sos{box-shadow:inset 3px 0 #ff4f5f!important}
.locations tr.is-sos .guard-name strong{color:#ff9ea6!important}

@media(max-width:1180px){.ops-kpis{grid-template-columns:repeat(5,minmax(92px,1fr))!important;overflow-x:auto}}
@media(max-width:760px){
 .ops-kpis{grid-template-columns:repeat(5,92px)!important;overflow-x:auto!important}
 .ops-kpi{min-width:92px!important}
 .guard-pin{width:42px!important;height:42px!important}.guard-pin-core{width:32px;height:32px}.guard-pin.selected{width:44px!important;height:44px!important}
 .marker-label-copy strong{font-size:.68rem!important;max-width:118px}.marker-label-copy small{font-size:.45rem!important}
 .row-health-chips{gap:3px}.row-health-chip{font-size:.48rem;padding:2px 5px}
}
@media(prefers-reduced-motion:reduce){.ops-kpi.sos-kpi.sos-live,.guard-pin.sos-active,.marker-name-sos .marker-label-dot{animation:none!important}}


/* v8.26.4 · identidad visual del resguardo */
body:not(.light-mode) .selected-top .avatar{width:42px!important;height:42px!important;border-radius:13px!important;background:linear-gradient(160deg,#112a19,#08150d)!important;border:1px solid #2f7a43!important;color:#85ff95!important;box-shadow:0 8px 18px rgba(0,0,0,.24),inset 0 0 0 1px rgba(255,255,255,.025)!important}
body:not(.light-mode) .selected-top .avatar .icon{width:20px!important;height:20px!important}
.selected-name-copy{display:flex!important;flex-direction:column!important;min-width:0!important;gap:1px!important}
.selected-role-label{font-size:.46rem!important;line-height:1!important;font-weight:900!important;letter-spacing:.14em!important;color:#6f8575!important}
body:not(.light-mode) .selected-name-copy strong{font-size:.82rem!important;line-height:1.12!important;font-weight:900!important;color:#ecfff0!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:145px!important}
body:not(.light-mode) .selected-name-copy small{font-size:.56rem!important;color:#91a799!important}
body:not(.light-mode) .guard-name .avatar{background:linear-gradient(160deg,#102619,#08140d)!important;border-color:#275e39!important;color:#7dff8f!important}
body:not(.light-mode) .guard-name .avatar .icon{width:17px!important;height:17px!important}
body:not(.light-mode) .guard-name strong{font-weight:850!important;letter-spacing:-.01em!important}
@media(max-width:760px){body:not(.light-mode) .selected-top .avatar{width:34px!important;height:34px!important;border-radius:10px!important}.selected-role-label{font-size:.42rem!important}body:not(.light-mode) .selected-name-copy strong{font-size:.74rem!important;max-width:116px!important}}


/* P1S v8.26.5 · STOP acoplado al mapa + restauración automática */
.map-route-layout.stops-panel-active{
  grid-template-columns:minmax(0,1fr) minmax(330px,390px)!important;
  grid-template-areas:"map stops"!important;
  align-items:stretch!important;
}
.map-route-layout.stops-panel-active.stops-panel-expanded{grid-template-columns:minmax(0,1fr) minmax(390px,470px)!important}
.map-route-layout.stops-panel-active.stops-panel-minimized{grid-template-columns:minmax(0,1fr) 255px!important}
.map-route-layout.stops-panel-active>#route-summary-card{display:none!important}
.map-route-layout>#stops-dialog:not([open]){display:none!important}
.map-route-layout>#stops-dialog[open]{
  grid-area:stops!important;
  position:relative!important;
  inset:auto!important;
  margin:0!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  padding:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  align-self:stretch!important;
  border-radius:0!important;
  border-top:0!important;
  border-right:0!important;
  border-bottom:0!important;
  border-left:1px solid #dce5da!important;
  box-shadow:-14px 0 34px rgba(20,40,24,.08)!important;
  z-index:20!important;
}
.map-route-layout>#stops-dialog .stops-panel-head{flex:0 0 auto!important}
.map-route-layout>#stops-dialog .stops-panel-content{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important}
.map-route-layout>#stops-dialog.is-minimized{height:auto!important;min-height:0!important;max-height:none!important;align-self:start!important}
.map-route-layout>#stops-dialog.is-expanded{inset:auto!important;width:100%!important;max-width:none!important;max-height:none!important}
.map-route-layout.stops-panel-active .map-panel{min-width:0!important}
.monitor-window.stops-panel-active .map-panel{transition:width .18s ease!important}
body:not(.light-mode) .map-route-layout>#stops-dialog[open]{border-left-color:#214b2e!important;box-shadow:-16px 0 36px rgba(0,0,0,.25)!important;background:#071009!important}

/* El panel lateral es más compacto y operativo. */
.map-route-layout>#stops-dialog .stops-panel-head{padding:12px 13px!important}
.map-route-layout>#stops-dialog .stops-panel-stop-sign{width:38px!important;flex-basis:38px!important}
.map-route-layout>#stops-dialog .stops-panel-content{padding:13px!important}
.map-route-layout>#stops-dialog .ops-description{font-size:.72rem!important;line-height:1.45!important}
.map-route-layout>#stops-dialog .stops-results{max-height:none!important}
.map-route-layout>#stops-dialog .stop-result-main{grid-template-columns:38px minmax(0,1fr)!important;padding:9px!important;gap:8px!important}
.map-route-layout>#stops-dialog .stop-result-main>em{grid-column:2!important;justify-self:start!important;margin-top:2px!important}
.map-route-layout>#stops-dialog .stops-kpis{grid-template-columns:repeat(3,minmax(0,1fr))!important}

/* En teléfono el STOP deja de tapar el mapa: se acopla debajo. */
@media(max-width:920px){
  .map-route-layout.stops-panel-active,
  .map-route-layout.stops-panel-active.stops-panel-expanded,
  .map-route-layout.stops-panel-active.stops-panel-minimized{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-areas:"map" "stops"!important;
  }
  .map-route-layout.stops-panel-active>#stops-dialog[open]{
    grid-area:stops!important;
    width:100%!important;
    max-width:none!important;
    height:auto!important;
    max-height:min(54dvh,560px)!important;
    border-left:0!important;
    border-top:1px solid #dce5da!important;
    border-radius:0!important;
    box-shadow:0 -12px 28px rgba(20,40,24,.08)!important;
  }
  body:not(.light-mode) .map-route-layout.stops-panel-active>#stops-dialog[open]{border-top-color:#214b2e!important;box-shadow:0 -12px 28px rgba(0,0,0,.22)!important}
  .map-route-layout.stops-panel-active>#stops-dialog.is-minimized{max-height:62px!important}
  .map-route-layout.stops-panel-active>#stops-dialog.is-expanded{max-height:min(70dvh,680px)!important}
}
@media(max-width:520px){
  .map-route-layout>#stops-dialog .stops-panel-heading h2{font-size:.88rem!important}
  .map-route-layout>#stops-dialog .stops-panel-heading .eyebrow{font-size:.55rem!important}
  .map-route-layout>#stops-dialog .stops-panel-controls .icon-button{width:31px!important;height:31px!important;min-width:31px!important}
  .map-route-layout>#stops-dialog .stops-panel-content{padding:11px!important}
  .map-route-layout>#stops-dialog .stops-kpis>div{padding:7px!important}
}

/* Acción renombrada: ahora comparte la ubicación completa, no solo coordenadas. */
.selected-action-button#selected-card-copy{white-space:nowrap}


/* P1S v8.26.6 · MAPA XL + selector de tema corregido + acciones operativas */
/* El mapa gana espacio vertical para que la ficha completa del resguardo quede cómoda sin tapar la operación. */
@media(min-width:1200px){
  .map-panel{height:clamp(640px,70dvh,860px)!important;min-height:640px!important}
  .selected-card{width:min(410px,calc(100% - 46px))!important;max-height:calc(100% - 42px)!important;overflow:auto!important;bottom:20px!important;left:20px!important}
}
@media(min-width:761px) and (max-width:1199px){
  .map-panel{height:clamp(580px,66dvh,760px)!important;min-height:580px!important}
  .selected-card{width:min(385px,calc(100% - 36px))!important;max-height:calc(100% - 34px)!important;overflow:auto!important}
}
@media(max-width:760px){
  .map-panel{height:clamp(520px,67dvh,700px)!important;min-height:520px!important}
}
@media(max-width:430px){
  .map-panel{height:clamp(500px,65dvh,660px)!important;min-height:500px!important}
}

/* El icono ahora representa el tema ACTIVO: sol = claro, luna = oscuro. */
.theme-toggle[data-active-theme="light"]{background:#fff!important;border-color:#cfd8cf!important;color:#243126!important;box-shadow:0 5px 14px rgba(20,40,24,.08)!important}
.theme-toggle[data-active-theme="light"] .icon,.theme-toggle[data-active-theme="light"] .icon svg{color:#243126!important;stroke:#243126!important}
.theme-toggle[data-active-theme="dark"]{background:#07100a!important;border-color:#2a6b3b!important;color:#f3fff4!important;box-shadow:0 0 18px rgba(65,255,100,.10)!important}
.theme-toggle[data-active-theme="dark"] .icon,.theme-toggle[data-active-theme="dark"] .icon svg{color:#f3fff4!important;stroke:#f3fff4!important}
body.light-mode .theme-toggle-label{color:#243126!important}
body:not(.light-mode) .theme-toggle-label{color:#f0f7f1!important}

/* Acciones de la ficha: distribución más limpia y táctil. */
.selected-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;margin-top:10px!important}
.selected-action-button{justify-content:center!important;min-width:0!important;text-decoration:none!important;text-align:center!important}
.selected-action-button span{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
#selected-card-copy{grid-column:span 1!important}
@media(max-width:760px){
  .selected-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .selected-action-button{font-size:.61rem!important;padding:6px 7px!important}
}

/* Mejor lectura del resguardo seleccionado. */
.selected-card{scrollbar-width:thin;scrollbar-color:#345e3e transparent}
body:not(.light-mode) .selected-card::-webkit-scrollbar{width:7px}
body:not(.light-mode) .selected-card::-webkit-scrollbar-thumb{background:#294b32;border-radius:999px}
.selected-top{position:sticky;top:-1px;z-index:2;padding-bottom:8px}
body:not(.light-mode) .selected-top{background:linear-gradient(180deg,rgba(8,11,9,.995) 0,rgba(8,11,9,.96) 78%,rgba(8,11,9,0) 100%)}
body.light-mode .selected-top{background:linear-gradient(180deg,rgba(255,255,255,.995) 0,rgba(255,255,255,.96) 78%,rgba(255,255,255,0) 100%)}

/* P1S v8.26.7 · Chat operativo tipo mensajería + alertas compartidas */
#global-chat-dialog .chat-message:not(.chat-system-event){align-items:flex-end!important}
#global-chat-dialog .chat-message.chat-me{justify-content:flex-end!important}
#global-chat-dialog .chat-message.chat-me .chat-avatar{order:2!important}
#global-chat-dialog .chat-message.chat-me .chat-message-content{order:1!important;position:relative!important;padding-bottom:18px!important}
#global-chat-dialog .chat-delivery-check{position:absolute;right:8px;bottom:4px;font-size:9px;font-weight:900;letter-spacing:-2px;color:#55b878}
body:not(.light-mode) #global-chat-dialog .chat-delivery-check{color:#64f58a!important}

#global-chat-dialog .chat-system-event{display:grid!important;grid-template-columns:36px minmax(0,1fr)!important;align-items:start!important;gap:8px!important;margin:9px 0 12px!important;padding:0 4px!important}
#global-chat-dialog .chat-ops-symbol{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:#17371f;color:#9cffac;border:1px solid #2d6f3d;font-size:10px;font-weight:950;box-shadow:0 4px 12px rgba(0,0,0,.13)}
#global-chat-dialog .chat-system-event.chat-sos .chat-ops-symbol{background:#421216;color:#ffb0b6;border-color:#8c2e36}
#global-chat-dialog .chat-system-event.chat-stop .chat-ops-symbol{background:#3d2c0d;color:#ffe09a;border-color:#8b6a21}
#global-chat-dialog .chat-system-event.chat-motion .chat-ops-symbol{background:#0e3b24;color:#aaffbd;border-color:#2a8750}
#global-chat-dialog .chat-system-event.chat-geofence .chat-ops-symbol{background:#123247;color:#b8e8ff;border-color:#2a678d}
#global-chat-dialog .chat-ops-card{min-width:0;border:1px solid #dbe7d8;border-radius:15px;background:#fff;padding:10px 11px;box-shadow:0 4px 14px rgba(23,45,28,.055)}
#global-chat-dialog .chat-ops-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}
#global-chat-dialog .chat-ops-head strong{font-size:10px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:#36583e}
#global-chat-dialog .chat-ops-head time{font-size:8px;color:#8d998f;white-space:nowrap}
#global-chat-dialog .chat-ops-card .chat-message-text{font-size:11px!important;line-height:1.42!important;color:#263b2b!important}
#global-chat-dialog .chat-ops-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;padding-top:7px;border-top:1px solid #edf1eb}
#global-chat-dialog .chat-ops-foot>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;color:#819084}
#global-chat-dialog .chat-ops-focus{flex:0 0 auto;min-height:27px;padding:0 9px;border:1px solid #cfe0cc;border-radius:9px;background:#f0f7ed;color:#315a39;font-size:9px;font-weight:850}
body:not(.light-mode) #global-chat-dialog .chat-ops-card{background:#0a1510!important;border-color:#205a32!important;box-shadow:none!important}
body:not(.light-mode) #global-chat-dialog .chat-ops-head strong{color:#bfffc9!important}
body:not(.light-mode) #global-chat-dialog .chat-ops-head time,body:not(.light-mode) #global-chat-dialog .chat-ops-foot>span{color:#8ea698!important}
body:not(.light-mode) #global-chat-dialog .chat-ops-card .chat-message-text{color:#e7f4e9!important}
body:not(.light-mode) #global-chat-dialog .chat-ops-foot{border-color:#183e27!important}
body:not(.light-mode) #global-chat-dialog .chat-ops-focus{background:#10261a!important;border-color:#2b7240!important;color:#aaffb8!important}

#global-chat-dialog .p1s-traccar-user-row{display:grid!important;grid-template-columns:40px minmax(0,1fr) 10px auto!important;align-items:center!important;gap:9px!important;min-height:62px!important;padding:9px 10px!important;border-bottom:1px solid #e8eee5!important}
#global-chat-dialog .p1s-traccar-user-row>span{min-width:0!important}
#global-chat-dialog .p1s-chat-direct-button{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:0 10px;border:1px solid #d3e2d0;border-radius:10px;background:#eff7ed;color:#315b38;font-size:9px;font-weight:850;white-space:nowrap}
#global-chat-dialog .p1s-chat-direct-button .icon{width:13px;height:13px}
#global-chat-dialog .p1s-chat-me-badge{padding:5px 8px;border-radius:999px;background:#eef2ec;color:#708074;font-size:8px;font-weight:850}
body:not(.light-mode) #global-chat-dialog .p1s-traccar-user-row{border-color:#173823!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-direct-button{background:#0d2416!important;border-color:#2b6b3d!important;color:#b9ffc5!important}
body:not(.light-mode) #global-chat-dialog .p1s-chat-me-badge{background:#132019!important;color:#9bb1a0!important}

#global-chat-dialog .p1s-chat-group-row.direct-room .p1s-chat-group-avatar{border-radius:50%!important}
#global-chat-dialog .p1s-chat-group-row.direct-room .p1s-chat-group-line strong::after{content:' · privado';font-size:8px;font-weight:700;color:#87948a}
body:not(.light-mode) #global-chat-dialog .p1s-chat-group-row.direct-room .p1s-chat-group-line strong::after{color:#7f9a87!important}

@media(max-width:700px){
 #global-chat-dialog .p1s-traccar-user-row{grid-template-columns:36px minmax(0,1fr) 8px auto!important;padding:8px!important;gap:7px!important}
 #global-chat-dialog .p1s-chat-direct-button{min-height:30px;padding:0 8px;font-size:8px}
 #global-chat-dialog .chat-system-event{grid-template-columns:31px minmax(0,1fr)!important;gap:6px!important}
 #global-chat-dialog .chat-ops-symbol{width:30px;height:30px;border-radius:9px;font-size:9px}
 #global-chat-dialog .chat-ops-card{padding:8px 9px;border-radius:13px}
}


/* P1S v8.26.9 · estados vivos sobre el resguardo + lectura operativa mejorada */
.guard-live-state{position:absolute;left:50%;top:-42px;z-index:12;transform:translateX(-50%);display:flex;align-items:center;gap:5px;min-height:27px;padding:3px 7px 3px 4px;border-radius:10px;white-space:nowrap;pointer-events:none;box-shadow:0 7px 18px rgba(0,0,0,.28),0 0 0 1px rgba(255,255,255,.08) inset;backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.guard-live-state::after{content:"";position:absolute;left:50%;bottom:-5px;width:8px;height:8px;transform:translateX(-50%) rotate(45deg);border-right:1px solid currentColor;border-bottom:1px solid currentColor}
.guard-live-state>span{display:flex;flex-direction:column;line-height:1;gap:1px}.guard-live-state strong{font-size:7px;font-weight:950;letter-spacing:.055em}.guard-live-state small{font-size:6px;font-weight:800;opacity:.78}
.guard-live-state.stopped{background:linear-gradient(180deg,#40100f,#250706);border:1px solid #ff6e65;color:#ffe4e2}.guard-live-state.stopped::after{background:#250706}.guard-live-state.stopped>b{width:25px;height:25px;display:grid;place-items:center;clip-path:polygon(29% 0,71% 0,100% 29%,100% 71%,71% 100%,29% 100%,0 71%,0 29%);background:linear-gradient(145deg,#ef4d45,#a61410);color:#fff;font-size:5.5px;font-weight:950;letter-spacing:.05em;box-shadow:0 0 0 1px rgba(255,255,255,.25)}
.guard-live-state.moving{background:linear-gradient(180deg,#0c3118,#071d0f);border:1px solid #49f06a;color:#eaffed;animation:p1sLiveMove 1.5s ease-in-out infinite}.guard-live-state.moving::after{background:#071d0f}.guard-live-state.moving>i{width:25px;height:25px;display:grid;place-items:center;border-radius:8px;background:#123f20;color:#7dff8d;border:1px solid rgba(111,255,133,.35)}.guard-live-state.moving>i svg{width:15px!important;height:15px!important;stroke:currentColor!important;fill:none!important;stroke-width:1.8!important}
@keyframes p1sLiveMove{0%,100%{transform:translateX(-50%) translateY(0)}50%{transform:translateX(-50%) translateY(-2px)}}
.marker-name-moving{border-color:#77d98a!important}.marker-name-moving .marker-label-copy small{color:#1e7534!important}.marker-name-stopped{border-color:#e7a49e!important}.marker-name-stopped .marker-label-copy small{color:#a32923!important}
.row-health-chip.stopped{background:#2a0e0c;border-color:#7c302b;color:#ffada6}.quick-filter.stopped.active{border-color:#9f3d36!important;background:#28100e!important;color:#ffc1bb!important;box-shadow:0 0 0 1px rgba(255,94,83,.12) inset!important}
.selected-live-state{display:flex;align-items:center;gap:7px;margin:-3px 0 10px;padding:7px 9px;border-radius:10px;border:1px solid;line-height:1.05}.selected-live-state>span{display:flex;flex-direction:column;gap:2px}.selected-live-state strong{font-size:.68rem;font-weight:900;letter-spacing:.05em}.selected-live-state small{font-size:.58rem;font-weight:750;opacity:.82}.selected-live-state.stopped{background:#250b09;border-color:#71302b;color:#ffc0bb}.selected-live-state.stopped>b{width:29px;height:29px;display:grid;place-items:center;clip-path:polygon(29% 0,71% 0,100% 29%,100% 71%,71% 100%,29% 100%,0 71%,0 29%);background:#c42c26;color:#fff;font-size:6px;letter-spacing:.05em}.selected-live-state.moving{background:#0a2110;border-color:#275f34;color:#a8ffb4}.selected-live-state.moving>i{width:29px;height:29px;display:grid;place-items:center;border-radius:8px;background:#12391d;color:#6fff80}.selected-live-state.moving>i svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8}
@media(max-width:760px){.guard-live-state{top:-37px;min-height:24px;padding:2px 6px 2px 3px;border-radius:9px;gap:4px}.guard-live-state strong{font-size:6px}.guard-live-state small{font-size:5.5px}.guard-live-state.stopped>b,.guard-live-state.moving>i{width:22px;height:22px}.guard-live-state.moving>i svg{width:13px!important;height:13px!important}.selected-live-state{margin-top:-1px}}
@media(prefers-reduced-motion:reduce){.guard-live-state.moving{animation:none!important}}


/* P1S v8.27.0 · contexto GPS al iniciar sesión + tema claro corregido */
.recent-trail-swatch{display:inline-block;width:16px;height:0;border-top:2px dashed #58bd78;opacity:.9}
.p1s-recent-trail,.p1s-recent-trail-outline{pointer-events:none}
.shared-route-badge-wrap,.shared-route-destination-wrap{background:none!important;border:0!important;overflow:visible!important}
.shared-route-badge{display:flex;align-items:center;gap:7px;width:max-content;max-width:176px;padding:6px 8px;border-radius:11px;background:rgba(6,20,29,.94);border:1px solid rgba(83,190,255,.62);color:#effaff;box-shadow:0 8px 20px rgba(0,0,0,.26);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.shared-route-badge>i{width:28px;height:28px;border-radius:8px;display:grid;place-items:center;background:#0d3146;color:#68caff;flex:0 0 28px}.shared-route-badge>i svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}.shared-route-badge>span{min-width:0;display:flex;flex-direction:column;line-height:1.1}.shared-route-badge small{font-size:6px;letter-spacing:.09em;font-weight:900;color:#7dcfff}.shared-route-badge strong{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.shared-route-badge em{font-style:normal;font-size:7px;color:#b8dbea;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.shared-route-destination{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;background:#0a2a3a;color:#75d1ff;border:1px solid #3d9ac7;box-shadow:0 6px 16px rgba(0,0,0,.25)}.shared-route-destination svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}

/* Tema claro real: superficies claras, texto oscuro y acentos P1S. El mapa conserva su tema estándar. */
body.light-mode{background:#f4f7f4!important;color:#172019!important}
body.light-mode .topbar{background:#ffffff!important;color:#1c2920!important;border-bottom:1px solid #dce6dc!important;box-shadow:0 4px 18px rgba(35,55,39,.06)!important}
body.light-mode .brand img{filter:brightness(.28) saturate(1.1)!important}
body.light-mode .brand-divider{background:#d7e2d7!important}
body.light-mode .brand>span:last-child,body.light-mode .brand strong,body.light-mode .topbar-center,body.light-mode .topbar-center strong,body.light-mode .topbar-center small,body.light-mode .top-link{color:#324239!important}
body.light-mode .account-button,body.light-mode .theme-toggle,body.light-mode .traccar-users-badge,body.light-mode .access-role-badge{background:#f7faf7!important;border-color:#d5e2d6!important;color:#2b3e31!important}
body.light-mode .workspace,body.light-mode .page-heading,body.light-mode .section-heading{color:#172019!important}
body.light-mode .page-intro,body.light-mode .section-heading p{color:#637067!important}
body.light-mode .page-kicker span{background:#ffffff!important;border-color:#dbe5db!important;color:#425048!important}
body.light-mode .error-banner,body.light-mode .alert{background:#fff4f3!important;border-color:#f1cbc8!important;color:#8f342f!important}
body.light-mode .ops-intelligence-main,body.light-mode .ops-kpis,body.light-mode .ops-priority{background:#ffffff!important;border-color:#dbe5dc!important;box-shadow:0 10px 28px rgba(34,55,39,.07)!important}
body.light-mode .ops-health-orb{background:#f1f6f1!important;border-color:#d7e4d8!important;color:#52635a!important}
body.light-mode .ops-health-orb[data-state="healthy"]{background:#eaf7ec!important;border-color:#acd8b6!important;color:#28763c!important;box-shadow:none!important}
body.light-mode .ops-health-orb[data-state="warning"]{background:#fff7e8!important;border-color:#e3c783!important;color:#8a661b!important}.light-mode .ops-health-orb[data-state="critical"]{background:#fff0f1!important;border-color:#e2a3aa!important;color:#9d3039!important;box-shadow:none!important}
body.light-mode .ops-health-kicker,body.light-mode .ops-health-copy small,body.light-mode .ops-kpi span,body.light-mode .ops-kpi small,body.light-mode .ops-priority-head small{color:#738078!important}
body.light-mode .ops-health-copy strong,body.light-mode .ops-kpi,body.light-mode .ops-kpi strong,body.light-mode .ops-priority-head strong{color:#26352b!important}
body.light-mode .ops-kpi{border-right-color:#e6ece6!important;background:#fff!important}body.light-mode .ops-kpi:hover,body.light-mode .ops-kpi.active{background:#f2f8f3!important}.light-mode .ops-kpi.warning strong{color:#8b6417!important}.light-mode .ops-kpi.danger strong{color:#a9363d!important}
body.light-mode .ops-kpi.sos-kpi::before{background:#fff1f2!important;border-color:#e1a4a9!important;color:#a63b43!important}.light-mode .ops-kpi.sos-kpi.sos-live{background:#fff0f1!important;border-color:#d9858d!important;box-shadow:none!important}.light-mode .ops-kpi.sos-kpi.sos-live strong,.light-mode .ops-kpi.sos-kpi.sos-live small,.light-mode .ops-kpi.sos-kpi.sos-live span{color:#8e3037!important}
body.light-mode .ops-priority-actions button{background:#f8fbf8!important;border-color:#d5e4d7!important;color:#3e5445!important}.light-mode .ops-priority-actions button:hover{background:#eef6ef!important;border-color:#b8d4bd!important;color:#24442f!important}
body.light-mode .ops-priority-item{background:#fff5f5!important;border-color:#efc7ca!important;color:#582d31!important}.light-mode .ops-priority-item:hover{background:#fff0f1!important;border-color:#dfa4a9!important}.light-mode .ops-priority-item small{color:#9b5d63!important}.light-mode .ops-priority-item b{color:#a83a43!important}.light-mode .ops-priority-empty{color:#748078!important}
body.light-mode .quick-filter{background:#ffffff!important;border-color:#dce6dc!important;color:#526057!important}.light-mode .quick-filter b{background:#edf3ee!important;color:#53645a!important}.light-mode .quick-filter:hover{background:#f4f8f4!important}.light-mode .quick-filter.active{background:#e9f6ec!important;border-color:#a8d4b2!important;color:#28543a!important;box-shadow:none!important}.light-mode .quick-filter.active b{background:#caead1!important;color:#245c36!important}.light-mode .quick-filter.critical:not(.active){border-color:#edc5c8!important;color:#9a4b52!important}.light-mode .quick-filter.critical b{background:#fbe9eb!important;color:#9c3b43!important}.light-mode .quick-filter.stopped.active{background:#fff0ee!important;border-color:#e4aaa4!important;color:#8f362f!important;box-shadow:none!important}
body.light-mode .monitor-window,body.light-mode .window-toolbar,body.light-mode .window-footer,body.light-mode .trip-toolbar,body.light-mode .route-view-control,body.light-mode .selected-card{background:#ffffff!important;border-color:#dce6dc!important;color:#223028!important;box-shadow:0 12px 28px rgba(37,58,42,.07)!important}
body.light-mode .map-tool-button,body.light-mode .icon-button,body.light-mode .trip-button{background:#ffffff!important;border-color:#d9e4da!important;color:#405048!important}.light-mode .map-tool-button:hover,.light-mode .icon-button:hover,.light-mode .trip-button:hover{background:#f1f7f2!important}
body.light-mode .selected-top{background:linear-gradient(180deg,rgba(255,255,255,.995) 0,rgba(255,255,255,.96) 78%,rgba(255,255,255,0) 100%)!important}
body.light-mode .selected-live-state.stopped{background:#fff1ef!important;border-color:#e3aaa5!important;color:#8e3832!important}.light-mode .selected-live-state.moving{background:#eef8f0!important;border-color:#a8d5b2!important;color:#29623b!important}.light-mode .selected-live-state.moving>i{background:#dff1e3!important;color:#2c7a43!important}.light-mode .selected-live-state.stopped>b{background:#c9433b!important}
body.light-mode .selected-action-button{background:#f8fbf8!important;border-color:#d7e3d8!important;color:#34483a!important}.light-mode .selected-action-button:hover{background:#edf5ee!important}.light-mode .selected-action-button.active{background:#e8f6eb!important;border-color:#9ed0a9!important;color:#255a35!important;box-shadow:none!important}
body.light-mode .table-wrap{background:#ffffff!important;border-color:#dce6dc!important;box-shadow:0 10px 28px rgba(34,55,39,.05)!important}.light-mode .table-wrap table,.light-mode .table-wrap thead,.light-mode .table-wrap tbody,.light-mode .table-wrap tr,.light-mode .table-wrap td{background:#ffffff!important}.light-mode .table-wrap th{background:#f6f9f6!important;color:#66746b!important;border-color:#dfe8df!important}.light-mode .table-wrap td{border-color:#edf1ed!important}.light-mode .locations tbody tr:hover{background:#f8fbf8!important}.light-mode .locations tbody tr.selected{background:#eef7ef!important}.light-mode .guard-name strong,.light-mode .address-line,.light-mode .report-time{color:#243229!important}.light-mode .coordinate-line,.light-mode .report-date,.light-mode .report-age,.light-mode .user-names,.light-mode .table-footer,.light-mode .page-footer{color:#748178!important}.light-mode .row-live-metrics span{background:#f5f8f5!important;border-color:#e1e8e1!important;color:#4a594f!important}.light-mode .status-pill.online{background:#ebf7ed!important;color:#2e7640!important}.light-mode .status-pill.offline{background:#fff6e8!important;color:#8a651e!important}.light-mode .status-pill.unknown{background:#f1f3f1!important;color:#657068!important}.light-mode .row-map-button{background:#ffffff!important;border-color:#d9e4da!important;color:#38533f!important}
body.light-mode .search-field,body.light-mode .list-controls select{background:#ffffff!important;border-color:#d9e4da!important;color:#2f3d34!important}.light-mode .search-field input{color:#243229!important}.light-mode input::placeholder{color:#8b978f!important}
body.light-mode #global-chat-dialog.p1s-chat-v2.global-chat-dialog{background:#f7faf7!important;border-color:#d9e4d9!important;color:#26342b!important;box-shadow:0 24px 70px rgba(31,48,34,.16)!important}
body.light-mode #global-chat-dialog .p1s-chat-top,body.light-mode #global-chat-dialog .p1s-chat-tabs,body.light-mode #global-chat-dialog .p1s-chat-room-strip,body.light-mode #global-chat-dialog .p1s-chat-selection-shell,body.light-mode #global-chat-dialog .p1s-chat-tools-row,body.light-mode #global-chat-dialog .p1s-chat-selection-bar,body.light-mode #global-chat-dialog .p1s-chat-panel,body.light-mode #global-chat-dialog .global-chat-messages,body.light-mode #global-chat-dialog .p1s-chat-composer,body.light-mode #global-chat-dialog .p1s-chat-groups-panel,body.light-mode #global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head{background:#f7faf7!important;color:#26342b!important;border-color:#dfe8df!important}
body.light-mode #global-chat-dialog .p1s-chat-room-current,body.light-mode #global-chat-dialog .p1s-chat-window-button,body.light-mode #global-chat-dialog .p1s-chat-online-pill,body.light-mode #global-chat-dialog .p1s-chat-gps-stat,body.light-mode #global-chat-dialog .p1s-chat-new-group,body.light-mode #global-chat-dialog .p1s-chat-groups-search,body.light-mode #global-chat-dialog .p1s-chat-input-wrap,body.light-mode #global-chat-dialog .p1s-chat-group-members,body.light-mode #global-chat-dialog .p1s-chat-member-search{background:#ffffff!important;border-color:#d9e4da!important;color:#2f3d34!important}
body.light-mode #global-chat-dialog .chat-message-content{background:#ffffff!important;border-color:#dde6dd!important;color:#27342b!important}.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content{background:#e5f3df!important;border-color:#d0e6ca!important;color:#24402b!important}.light-mode #global-chat-dialog .chat-ops-card{background:#ffffff!important;border-color:#dbe7d8!important}.light-mode #global-chat-dialog .chat-ops-card .chat-message-text{color:#263b2b!important}
@media(max-width:760px){body.light-mode .locations tbody tr,body.light-mode .locations tbody tr td{background:#ffffff!important}.shared-route-badge{max-width:150px;padding:5px 7px}.shared-route-badge>i{width:25px;height:25px;flex-basis:25px}.shared-route-badge strong{font-size:8px}.shared-route-badge em{font-size:6px}}


/* P1S v8.27.1 · sincronización operativa multi-cuenta */
.selected-shared-route{width:100%;display:grid;grid-template-columns:32px minmax(0,1fr) auto;align-items:center;gap:8px;margin:9px 0 1px;padding:9px 10px;border:1px solid #b8d9bf;border-radius:11px;background:#f3faf4;color:#203426;text-align:left;cursor:pointer}
.selected-shared-route>.icon{width:28px;height:28px;border-radius:9px;background:#dff3e3;color:#267a3e;display:grid;place-items:center}
.selected-shared-route>.icon svg{width:16px;height:16px}.selected-shared-route>span:nth-child(2){display:flex;flex-direction:column;min-width:0}.selected-shared-route small{font-size:.55rem;letter-spacing:.08em;font-weight:850;color:#557260}.selected-shared-route strong{font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selected-shared-route em{font-size:.58rem;font-style:normal;color:#788b7d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.selected-shared-route>b{font-size:.62rem;color:#317545}
body:not(.light-mode) .selected-shared-route{background:#08170d;border-color:#226d39;color:#e7f6ea}body:not(.light-mode) .selected-shared-route>.icon{background:#0d2b17;color:#72ff8a}body:not(.light-mode) .selected-shared-route small{color:#82a98a}body:not(.light-mode) .selected-shared-route em{color:#8ea598}body:not(.light-mode) .selected-shared-route>b{color:#70ff86}
.shared-route-badge{max-width:190px}.shared-route-badge em{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;max-width:145px}
@media(max-width:760px){.selected-shared-route{grid-template-columns:28px minmax(0,1fr) auto;padding:7px 8px}.selected-shared-route>.icon{width:25px;height:25px}.selected-shared-route strong{font-size:.66rem}.selected-shared-route em{font-size:.53rem}}


/* P1S v8.27.2 · Entorno: texto según tema + iconos visuales fijos del tema claro */
/* El botón Entorno adapta únicamente el texto; su icono conserva la paleta clara. */
body:not(.light-mode) #nearby-button,
body:not(.light-mode) #nearby-button.active-tool{color:#ffffff!important}
body.light-mode #nearby-button,
body.light-mode #nearby-button.active-tool{color:#26332a!important}
#nearby-button .icon,
body:not(.light-mode) #nearby-button .icon,
body:not(.light-mode) #nearby-button.active-tool .icon,
body.light-mode #nearby-button .icon,
body.light-mode #nearby-button.active-tool .icon{color:#2d8a4a!important}

/* Mensaje de estado de Entorno: blanco en oscuro y oscuro en claro. */
body:not(.light-mode) .nearby-status,
body:not(.light-mode) .nearby-status[data-state="loading"],
body:not(.light-mode) .nearby-status[data-state="ok"]{color:#ffffff!important}
body:not(.light-mode) .nearby-status[data-state="warn"]{color:#fff3d1!important}
body.light-mode .nearby-status,
body.light-mode .nearby-status[data-state="loading"],
body.light-mode .nearby-status[data-state="ok"]{color:#243127!important}
body.light-mode .nearby-status[data-state="warn"]{color:#5d4817!important}

/* Los iconos POI de Entorno siempre mantienen el aspecto del tema claro. */
body:not(.light-mode) .poi-icon>span,
body.light-mode .poi-icon>span{
  background:#ffffff!important;
  color:#234a2c!important;
  border-color:#4f7a52!important;
  box-shadow:0 2px 7px rgba(22,42,26,.22)!important;
}
body:not(.light-mode) .poi-police>span,body.light-mode .poi-police>span{border-color:#416ba0!important;color:#365c8a!important}
body:not(.light-mode) .poi-traffic_signal>span,body.light-mode .poi-traffic_signal>span{border-color:#5c6b59!important;color:#234a2c!important}
body:not(.light-mode) .poi-roadwork>span,body.light-mode .poi-roadwork>span{border-color:#956b2d!important;color:#6e4a1c!important}
body:not(.light-mode) .poi-hospital>span,body.light-mode .poi-hospital>span,
body:not(.light-mode) .poi-pharmacy>span,body.light-mode .poi-pharmacy>span{border-color:#bd4c4c!important;color:#a22f2f!important}
body:not(.light-mode) .poi-fire_station>span,body.light-mode .poi-fire_station>span{border-color:#c16b36!important;color:#a34b1f!important}
body:not(.light-mode) .poi-fuel>span,body.light-mode .poi-fuel>span{border-color:#4e6f88!important;color:#355a73!important}
body:not(.light-mode) .poi-toll>span,body.light-mode .poi-toll>span{border-color:#82683a!important;color:#685225!important}
body:not(.light-mode) .poi-school>span,body.light-mode .poi-school>span{border-color:#6f69a7!important;color:#514b89!important}
body:not(.light-mode) .poi-supermarket>span,body.light-mode .poi-supermarket>span{border-color:#4f8f66!important;color:#306947!important}

/* Popup de Entorno aislado del resto del mapa. */
body:not(.light-mode) .poi-leaflet-popup .leaflet-popup-content-wrapper,
body:not(.light-mode) .poi-leaflet-popup .leaflet-popup-tip{
  background:#08100b!important;
  color:#ffffff!important;
}
body:not(.light-mode) .poi-leaflet-popup .leaflet-popup-content-wrapper{
  border:1px solid #255f37!important;
  box-shadow:0 10px 28px rgba(0,0,0,.42)!important;
}
body:not(.light-mode) .poi-leaflet-popup .leaflet-popup-close-button{color:#ffffff!important}
body:not(.light-mode) .poi-leaflet-popup .poi-popup strong,
body:not(.light-mode) .poi-leaflet-popup .poi-popup span,
body:not(.light-mode) .poi-leaflet-popup .poi-popup small{color:#ffffff!important}
body:not(.light-mode) .poi-leaflet-popup .poi-popup small{color:#c8d7cc!important}

body.light-mode .poi-leaflet-popup .leaflet-popup-content-wrapper,
body.light-mode .poi-leaflet-popup .leaflet-popup-tip{
  background:#ffffff!important;
  color:#243127!important;
}
body.light-mode .poi-leaflet-popup .leaflet-popup-content-wrapper{
  border:1px solid #d5dfd2!important;
  box-shadow:0 8px 24px rgba(25,38,27,.16)!important;
}
body.light-mode .poi-leaflet-popup .leaflet-popup-close-button{color:#526057!important}
body.light-mode .poi-leaflet-popup .poi-popup strong{color:#1d291f!important}
body.light-mode .poi-leaflet-popup .poi-popup span{color:#4f5f53!important}
body.light-mode .poi-leaflet-popup .poi-popup small{color:#718077!important}


/* P1S v8.27.3 · Chat multicuenta: corrección visual definitiva y contraste por tema */
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-switcher,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-menu,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-popover-head,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-switcher-list,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-members-card,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-members-card-head,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-members-list{
  background:#08110c!important;border-color:#1d5d31!important;color:#eaf6ec!important;
}
html body:not(.light-mode) #global-chat-dialog .p1s-chat-switcher-row,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-menu>button,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-group-row,
html body:not(.light-mode) #global-chat-dialog .p1s-traccar-user-row,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-member-view,
html body:not(.light-mode) #global-chat-dialog .chat-person{
  background:#0a130e!important;color:#edf8ef!important;border-color:#173a24!important;
}
html body:not(.light-mode) #global-chat-dialog .p1s-chat-switcher-row:hover,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-switcher-row.active,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-menu>button:hover,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-group-row:hover,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-group-row.active,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-member-view:hover,
html body:not(.light-mode) #global-chat-dialog .p1s-traccar-user-row:hover{
  background:#102319!important;border-color:#2b7542!important;
}
html body:not(.light-mode) #global-chat-dialog .p1s-chat-switcher-row strong,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-menu strong,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-member-view strong,
html body:not(.light-mode) #global-chat-dialog .p1s-traccar-user-row strong,
html body:not(.light-mode) #global-chat-dialog .chat-person strong{color:#f1fbf3!important}
html body:not(.light-mode) #global-chat-dialog .p1s-chat-switcher-row small,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-menu small,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-member-view small,
html body:not(.light-mode) #global-chat-dialog .p1s-traccar-user-row small,
html body:not(.light-mode) #global-chat-dialog .chat-person small{color:#8fa493!important}
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-menu-open,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-edit,
html body:not(.light-mode) #global-chat-dialog .p1s-chat-group-edit-open{
  background:#0a1510!important;border-color:#245f36!important;color:#dff3e2!important;
}
html body:not(.light-mode) #global-chat-dialog .p1s-chat-switcher-row>em{color:#8ca392!important}
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-popover-head strong{color:#effaf1!important}
html body:not(.light-mode) #global-chat-dialog .p1s-chat-room-popover-head small{color:#8ba08f!important}

html body.light-mode #global-chat-dialog .p1s-chat-room-switcher,
html body.light-mode #global-chat-dialog .p1s-chat-room-menu,
html body.light-mode #global-chat-dialog .p1s-chat-room-popover-head,
html body.light-mode #global-chat-dialog .p1s-chat-room-switcher-list,
html body.light-mode #global-chat-dialog .p1s-chat-members-card,
html body.light-mode #global-chat-dialog .p1s-chat-members-card-head,
html body.light-mode #global-chat-dialog .p1s-chat-members-list{background:#fff!important;color:#263329!important;border-color:#dce7d8!important}
html body.light-mode #global-chat-dialog .p1s-chat-switcher-row,
html body.light-mode #global-chat-dialog .p1s-chat-room-menu>button,
html body.light-mode #global-chat-dialog .p1s-chat-group-row,
html body.light-mode #global-chat-dialog .p1s-traccar-user-row,
html body.light-mode #global-chat-dialog .p1s-chat-member-view,
html body.light-mode #global-chat-dialog .chat-person{background:#fff!important;color:#263329!important;border-color:#e4ebe1!important}
html body.light-mode #global-chat-dialog .p1s-chat-switcher-row:hover,
html body.light-mode #global-chat-dialog .p1s-chat-switcher-row.active,
html body.light-mode #global-chat-dialog .p1s-chat-room-menu>button:hover,
html body.light-mode #global-chat-dialog .p1s-chat-group-row:hover,
html body.light-mode #global-chat-dialog .p1s-chat-group-row.active,
html body.light-mode #global-chat-dialog .p1s-chat-member-view:hover,
html body.light-mode #global-chat-dialog .p1s-traccar-user-row:hover{background:#edf5e9!important;border-color:#d6e7d2!important}

/* Presencia y botones de conversación más legibles */
#global-chat-dialog .p1s-traccar-user-row>span:nth-child(2){min-width:0;display:flex;flex-direction:column;gap:2px}
#global-chat-dialog .p1s-traccar-user-row>span:nth-child(2)>strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#global-chat-dialog .p1s-chat-direct-button{min-width:86px;justify-content:center}
#global-chat-dialog .p1s-chat-switcher-row{border:1px solid transparent!important;margin-bottom:3px}
#global-chat-dialog .p1s-chat-room-menu{overflow:visible!important}


/* P1S v8.27.4 · Búsqueda Perú + contraste definitivo del tema claro */
html body.light-mode{background:#f4f7f3!important;color:#172019!important;color-scheme:light!important}
html body.light-mode .page-heading h1,
html body.light-mode .section-heading h2,
html body.light-mode .section-heading h3,
html body.light-mode .ops-summary strong,
html body.light-mode .ops-kpi strong,
html body.light-mode .guard-name strong,
html body.light-mode .address-line,
html body.light-mode .report-time,
html body.light-mode .selected-card strong,
html body.light-mode dialog strong,
html body.light-mode dialog label{color:#172019!important}
html body.light-mode .page-intro,
html body.light-mode .section-heading p,
html body.light-mode .ops-summary small,
html body.light-mode .ops-kpi small,
html body.light-mode .guard-name small,
html body.light-mode .coordinate-line,
html body.light-mode .report-date,
html body.light-mode .report-age,
html body.light-mode .selected-time,
html body.light-mode .selected-full-address,
html body.light-mode .selected-geocode-source,
html body.light-mode .field-help,
html body.light-mode .privacy-note{color:#536158!important}

/* Resultados del buscador y geocercas: negro/gris oscuro en tema claro. */
html body.light-mode .map-search-strip,
html body.light-mode .map-search-field,
html body.light-mode .map-search-results,
html body.light-mode .map-search-result,
html body.light-mode .geofence-search-row,
html body.light-mode .geofence-search-results,
html body.light-mode .geofence-search-result{background:#fff!important;border-color:#d7e1d5!important;color:#172019!important}
html body.light-mode .map-search-field input,
html body.light-mode .geofence-search-row input{color:#172019!important;-webkit-text-fill-color:#172019!important}
html body.light-mode .map-search-field input::placeholder,
html body.light-mode .geofence-search-row input::placeholder{color:#68756c!important;opacity:1!important}
html body.light-mode .map-search-result strong,
html body.light-mode .geofence-search-result strong{color:#172019!important}
html body.light-mode .map-search-result small,
html body.light-mode .geofence-search-result small,
html body.light-mode .map-search-message,
html body.light-mode .geofence-search-message{color:#59675e!important}
html body.light-mode .map-search-result b,
html body.light-mode .geofence-search-result b{color:#245f34!important}
html body.light-mode .map-search-result:hover,
html body.light-mode .geofence-search-result:hover{background:#f0f7ef!important;border-color:#9fc7a4!important}
html body.light-mode .map-search-result-pin,
html body.light-mode .geofence-result-pin{background:#e7f4e8!important;color:#2d6d3d!important}

/* Chat: ningún texto claro sobre fondo claro. */
html body.light-mode #global-chat-dialog.p1s-chat-v2.global-chat-dialog,
html body.light-mode #global-chat-dialog .p1s-chat-top,
html body.light-mode #global-chat-dialog .p1s-chat-tabs,
html body.light-mode #global-chat-dialog .p1s-chat-room-strip,
html body.light-mode #global-chat-dialog .p1s-chat-panel,
html body.light-mode #global-chat-dialog .global-chat-messages,
html body.light-mode #global-chat-dialog .p1s-chat-composer,
html body.light-mode #global-chat-dialog .p1s-chat-groups-panel,
html body.light-mode #global-chat-dialog .p1s-chat-groups-panel .p1s-chat-section-head{background:#fff!important;color:#172019!important;border-color:#dce6da!important}
html body.light-mode #global-chat-dialog .p1s-chat-title-line h2,
html body.light-mode #global-chat-dialog .p1s-chat-room-copy strong,
html body.light-mode #global-chat-dialog .p1s-chat-group-row strong,
html body.light-mode #global-chat-dialog .p1s-traccar-user-row strong,
html body.light-mode #global-chat-dialog .chat-person strong,
html body.light-mode #global-chat-dialog .chat-message-heading strong,
html body.light-mode #global-chat-dialog .p1s-chat-members-card-head strong{color:#172019!important}
html body.light-mode #global-chat-dialog .p1s-chat-heading #global-chat-status,
html body.light-mode #global-chat-dialog .p1s-chat-room-copy small,
html body.light-mode #global-chat-dialog .p1s-chat-group-row small,
html body.light-mode #global-chat-dialog .p1s-traccar-user-row small,
html body.light-mode #global-chat-dialog .chat-person small,
html body.light-mode #global-chat-dialog .chat-message-heading time,
html body.light-mode #global-chat-dialog .chat-message-content>small,
html body.light-mode #global-chat-dialog .chat-compose-hint{color:#5b685f!important}
html body.light-mode #global-chat-dialog .chat-message-content{background:#fff!important;color:#172019!important;border-color:#dce6da!important}
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content{background:#dff1df!important;color:#15321d!important;border-color:#c4dfc5!important}
html body.light-mode #global-chat-dialog .chat-message-text{color:inherit!important}
html body.light-mode #global-chat-dialog #global-chat-text{color:#172019!important;-webkit-text-fill-color:#172019!important}
html body.light-mode #global-chat-dialog #global-chat-text::placeholder{color:#718078!important;opacity:1!important}
html body.light-mode #global-chat-dialog .p1s-chat-room-menu-open,
html body.light-mode #global-chat-dialog .p1s-chat-room-edit,
html body.light-mode #global-chat-dialog .p1s-chat-group-edit-open{background:#fff!important;color:#27362b!important;border-color:#d5e0d3!important}

/* Ficha y tabla en claro: texto operativo oscuro y legible. */
html body.light-mode .selected-card{background:rgba(255,255,255,.97)!important;color:#172019!important;border-color:#d7e2d5!important}
html body.light-mode .selected-address,
html body.light-mode .selected-address strong,
html body.light-mode .selected-street{color:#172019!important}
html body.light-mode .selected-identity-grid>span,
html body.light-mode .selected-metric,
html body.light-mode .selected-last-trip{background:#f5f8f4!important;border-color:#dfe7dc!important;color:#172019!important}
html body.light-mode .selected-identity-grid strong,
html body.light-mode .selected-metric strong,
html body.light-mode .selected-last-trip strong{color:#172019!important}
html body.light-mode .selected-identity-grid small,
html body.light-mode .selected-metric span,
html body.light-mode .selected-last-trip span{color:#5e6b62!important}
html body.light-mode .table-wrap,
html body.light-mode .table-wrap table,
html body.light-mode .table-wrap tbody,
html body.light-mode .table-wrap tr,
html body.light-mode .table-wrap td{background:#fff!important;color:#172019!important}
html body.light-mode .table-wrap th{background:#f4f7f2!important;color:#425047!important}

/* P1S v8.27.5 · Chat tema claro: mensaje propio con tipografía oscura completa */
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content,
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content * {
  color:#122417!important;
  -webkit-text-fill-color:#122417!important;
}
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-heading strong,
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-author-presence,
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-heading time,
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content>small,
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-text,
html body.light-mode #global-chat-dialog .chat-message.chat-me p,
html body.light-mode #global-chat-dialog .chat-message.chat-me small,
html body.light-mode #global-chat-dialog .chat-message.chat-me time {
  color:#122417!important;
  -webkit-text-fill-color:#122417!important;
  opacity:1!important;
}
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content {
  background:linear-gradient(180deg,#dff1df 0%,#d4ead4 100%)!important;
  border-color:#bfd9c0!important;
}
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-heading time,
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content>small {
  color:#445c49!important;
  -webkit-text-fill-color:#445c49!important;
}
html body.light-mode #global-chat-dialog .chat-message.chat-me .chat-author-presence i {
  background:#22a447!important;
}


/* P1S v8.27.6 · corrección definitiva de legibilidad del mensaje propio en tema claro. */
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-message-content,
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-message-heading,
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-author-line,
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-author-line strong,
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-author-presence,
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-author-presence em,
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-message-heading time,
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-message-content > small,
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-message-text,
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me p,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-heading,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-author-line,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-author-line strong,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-author-presence,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-author-presence em,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-heading time,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content > small,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-text,
body.light-mode #global-chat-dialog .chat-message.chat-me p {
  color:#14261a!important;
  -webkit-text-fill-color:#14261a!important;
  opacity:1!important;
  text-shadow:none!important;
}
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-message-content,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content {
  background:#dff1df!important;
  border-color:#bfd9c0!important;
}
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-message-heading time,
html[data-theme="light"] body #global-chat-dialog .chat-message.chat-me .chat-message-content > small,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-heading time,
body.light-mode #global-chat-dialog .chat-message.chat-me .chat-message-content > small {
  color:#405746!important;
  -webkit-text-fill-color:#405746!important;
}

/* P1S v8.27.7 · sincronización multi-cuenta reforzada; sin cambios visuales invasivos. */


/* P1S v8.28.3 · alarmas inteligentes + continuidad de rutas */
.stop-threshold-label{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:14px 0;padding:12px 13px;border:1px solid #dfe8dc;border-radius:12px;background:#f8fbf7;color:#26362b}.stop-threshold-label>span:first-child{display:flex;flex-direction:column;gap:3px;min-width:0}.stop-threshold-label strong{font-size:.78rem}.stop-threshold-label small{font-size:.68rem;color:#748177;line-height:1.35}.stop-threshold-control{display:flex;align-items:center;gap:8px;flex:0 0 auto}.stop-threshold-control select{min-height:38px;padding:7px 28px 7px 10px;border:1px solid #d3dfcf;background:#fff;color:#203027}.stop-threshold-control b{font-size:.72rem;min-width:58px;text-align:right;color:#45624d}body:not(.light-mode) .stop-threshold-label{background:#08120c;border-color:#1b5d31;color:#e7f4ea}body:not(.light-mode) .stop-threshold-label small{color:#8fa394}body:not(.light-mode) .stop-threshold-control select{background:#0b1610;border-color:#226337;color:#e9f6eb}body:not(.light-mode) .stop-threshold-control b{color:#a9f6b4}@media(max-width:620px){.stop-threshold-label{align-items:flex-start;flex-direction:column}.stop-threshold-control{width:100%}.stop-threshold-control select{flex:1}.stop-threshold-control b{min-width:68px}}


/* P1S v8.28.3 · rutas estables + Modo viaje cómodo en móvil */
/* Mantiene el trazo GPS anclado a sus coordenadas al acercar/alejar. */
.trip-route-line,.trip-route-outline,.multi-trip-route,.multi-trip-outline,.shared-route-line,.shared-route-outline,
.p1s-group-branch-route,.p1s-group-route-connector,.p1s-recent-trail,.p1s-recent-trail-outline,
.route-outbound-line,.route-outbound-outline,.route-return-line,.route-return-outline,.route-traffic-line,
.replay-static-line,.replay-progress-line,.replay-progress-outline,.replay-return-line,.replay-return-outline{
  vector-effect:non-scaling-stroke;
  shape-rendering:geometricPrecision;
}

@media(max-width:760px){
  /* En móvil Modo viaje ocupa una fila propia; PC conserva el diseño anterior. */
  .monitor-window .trip-toolbar{overflow:visible!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:stretch!important;gap:7px!important}
  .monitor-window .trip-toolbar-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;min-width:0!important;gap:7px!important}
  .monitor-window #trip-button{grid-column:1/-1!important;width:100%!important;min-height:42px!important;justify-content:center!important;font-size:.76rem!important;font-weight:800!important;border-radius:10px!important}
  .monitor-window #replay-button,.monitor-window #multi-trip-button{width:100%!important;min-width:0!important;justify-content:center!important;min-height:36px!important}
  .monitor-window .route-view-control,.monitor-window .trip-status,.monitor-window .multi-trip-status,.monitor-window .replay-status{width:100%!important;max-width:100%!important}
}

/* Journey history and operational notification assets */
.p1s-notification-icon{display:block;width:44px;height:44px}.chat-ops-symbol:has(.p1s-notification-icon){background:transparent;border:0}
#global-chat-dialog .chat-system-event:has(.p1s-notification-icon){grid-template-columns:44px minmax(0,1fr)!important}
#global-chat-dialog .chat-ops-symbol:has(.p1s-notification-icon){width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;padding:0!important;overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important}
#global-chat-dialog .p1s-notification-icon{width:44px!important;height:44px!important;max-width:44px!important;max-height:44px!important;object-fit:contain!important;margin:0!important;display:block!important}
@media(max-width:760px){#global-chat-dialog .chat-system-event:has(.p1s-notification-icon){grid-template-columns:36px minmax(0,1fr)!important}#global-chat-dialog .chat-ops-symbol:has(.p1s-notification-icon){width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important}#global-chat-dialog .p1s-notification-icon{width:36px!important;height:36px!important;max-width:36px!important;max-height:36px!important}}
#journey-history-dialog{width:min(760px,94vw);max-height:88dvh;overflow:auto;background:#101c24;color:#edf4f8;border:1px solid #38505b;border-radius:20px;padding:24px}
#journey-history-dialog::backdrop{background:#020910bb}#journey-history-dialog button,#journey-history-button{padding:10px 15px;border:1px solid #527364;border-radius:10px;background:#183a2a;color:#dcffe9;cursor:pointer}
.journey-history-card{padding:18px;margin:16px 0;border:1px solid #344b58;border-radius:14px;background:#152630;overflow-wrap:anywhere}.journey-history-card p{line-height:1.7}.journey-history-card a{color:#83d6ff}.journey-history-card h3{margin:0 0 10px}

/* Non-overlapping map labels and route panel */
.p1s-label-connectors{display:none!important;position:absolute;inset:0;width:100%;height:100%;z-index:590;pointer-events:none!important;overflow:hidden}.p1s-label-connectors line{display:none!important}
.p1s-label-shifted::before{display:none!important}.route-panel-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.route-panel-tabs button[aria-pressed="true"]{background:#286442!important;border-color:#7de5a0!important}.journey-history-card button{margin:6px 8px 0 0}
#simple-finish-route{padding:10px 14px;border:1px solid #ac6565;border-radius:10px;background:#3c1e20;color:#fff;cursor:pointer}#simple-finish-route[hidden]{display:none!important}

/* Corrección conservada · finalización unificada de rutas y feedback profesional */
#simple-finish-route{transition:opacity .14s ease,transform .14s ease,box-shadow .14s ease,filter .14s ease}
#simple-finish-route.is-busy{cursor:progress!important;opacity:.72;filter:saturate(.8);pointer-events:none}
#simple-finish-route.is-busy{min-width:132px}
#simple-finish-route:disabled{cursor:not-allowed}
.p1s-confirm-card{isolation:isolate}
.p1s-confirm-card h2{font-weight:850!important;letter-spacing:-.015em}
.p1s-confirm-card>p:not(.p1s-confirm-eyebrow){color:#4f614d!important;font-weight:560}
.p1s-confirm-note{color:#435941!important;background:#f5f9ef!important;border-color:#c9dabb!important}
body:not(.light-mode) .p1s-confirm-overlay{background:rgba(1,8,4,.62)!important}
body:not(.light-mode) .p1s-confirm-card{background:linear-gradient(180deg,#fbfff7 0%,#eff6e8 100%)!important;color:#1d2b1e!important;border-color:#c9dcb9!important}
body:not(.light-mode) .p1s-confirm-card h2{color:#1b281c!important}
body:not(.light-mode) .p1s-confirm-card>p:not(.p1s-confirm-eyebrow){color:#4b5d49!important}
body:not(.light-mode) .p1s-confirm-note{color:#3f553e!important;background:#f3f8ee!important;border-color:#c7d8bb!important}
.leaflet-tooltip.marker-name,.p1s-route-label-only,.p1s-group-route-badge,.shared-route-badge{transition:opacity .12s ease,translate .12s ease}


/* Corrección conservada · selector único para finalizar rutas */
#simple-finish-route{display:inline-flex;align-items:center;justify-content:center;min-height:40px;font-weight:800;letter-spacing:.01em;box-shadow:0 8px 22px rgba(70,20,22,.18)}
#simple-finish-route:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.08);box-shadow:0 10px 26px rgba(70,20,22,.24)}
#finish-route-dialog{width:min(640px,94vw);max-height:88dvh;overflow:auto;border:1px solid #355343;border-radius:20px;padding:24px;background:#0d1712;color:#eef8f0;box-shadow:0 24px 70px rgba(0,0,0,.45)}
#finish-route-dialog::backdrop{background:rgba(1,8,4,.68);backdrop-filter:blur(3px)}
#finish-route-dialog .dialog-close{position:absolute;right:16px;top:16px}
#finish-route-dialog h2{margin:.2rem 0 .45rem;font-size:1.35rem}.finish-route-help{margin:0 0 16px;color:#b8c9bd;line-height:1.5}
.finish-route-list{display:grid;gap:10px;margin:14px 0 18px}.finish-route-choice{display:flex;gap:12px;align-items:flex-start;padding:13px 14px;border:1px solid #355343;border-radius:13px;background:#122019;cursor:pointer;transition:border-color .14s ease,background .14s ease,transform .14s ease}.finish-route-choice:hover{border-color:#63a978;transform:translateY(-1px)}.finish-route-choice.is-selected{border-color:#79dc96;background:#173323;box-shadow:0 0 0 2px rgba(121,220,150,.12)}.finish-route-choice input{margin-top:3px;accent-color:#58c777}.finish-route-choice span{display:grid;gap:4px;min-width:0}.finish-route-choice strong{font-size:.88rem;overflow-wrap:anywhere}.finish-route-choice small{font-size:.73rem;color:#a8bbb0;overflow-wrap:anywhere}.finish-route-confirm{width:100%;min-height:44px;background:#5b2528!important;border-color:#a75a60!important;color:#fff!important;font-weight:850}.finish-route-confirm:disabled{opacity:.5;cursor:not-allowed}.finish-route-confirm:not(:disabled):hover{filter:brightness(1.08)}
body.light-mode #finish-route-dialog{background:#fbfdf9;color:#1d2a20;border-color:#bed0c2}body.light-mode .finish-route-help{color:#5c6e61}body.light-mode .finish-route-choice{background:#f4f8f3;border-color:#d2dfd3}body.light-mode .finish-route-choice.is-selected{background:#e9f7ec;border-color:#68ad78}body.light-mode .finish-route-choice small{color:#627166}
@media(max-width:720px){#simple-finish-route{flex:1 1 100%;width:100%}#finish-route-dialog{width:calc(100vw - 20px);max-height:90dvh;padding:20px 16px 18px}.finish-route-choice{padding:12px}.finish-route-confirm{position:sticky;bottom:0;z-index:2;box-shadow:0 -8px 18px rgba(4,12,7,.35)}}

/* Corrección conservada · legibilidad del chat propio en tema oscuro */
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me .chat-message-content,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me .chat-message-content{
  background:linear-gradient(180deg,#123820 0%,#0d2a18 100%)!important;
  border-color:#2b8a45!important;
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me .chat-message-heading,
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me .chat-author-line,
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me .chat-author-line strong,
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me .chat-author-presence,
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me .chat-author-presence em,
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me .chat-message-text,
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me p,
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me strong,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me .chat-message-heading,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me .chat-author-line,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me .chat-author-line strong,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me .chat-author-presence,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me .chat-author-presence em,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me .chat-message-text,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me p,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me strong{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  opacity:1!important;
  text-shadow:none!important;
}
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me time,
html[data-theme="dark"] body #global-chat-dialog .chat-message.chat-me .chat-message-content>small,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me time,
body:not(.light-mode) #global-chat-dialog .chat-message.chat-me .chat-message-content>small{
  color:#d5eadb!important;
  -webkit-text-fill-color:#d5eadb!important;
  opacity:1!important;
}
html[data-theme="dark"] body #global-chat-dialog #global-chat-text,
body:not(.light-mode) #global-chat-dialog #global-chat-text{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  caret-color:#dfff64!important;
  opacity:1!important;
}
html[data-theme="dark"] body #global-chat-dialog #global-chat-text::placeholder,
body:not(.light-mode) #global-chat-dialog #global-chat-text::placeholder{
  color:#9fb1a4!important;
  -webkit-text-fill-color:#9fb1a4!important;
  opacity:1!important;
}


/* ============================================================
   P1S v9.0.0 · REVISIÓN INTEGRAL DE INTERFAZ Y UX
   - jerarquía visual consistente
   - panel de cuenta rediseñado
   - tema claro/oscuro coherente
   - controles táctiles y estados de foco
   - superficies y diálogos estabilizados
   ============================================================ */
:root{
  --p1s-ui-green:#237b3c;
  --p1s-ui-green-2:#2d9650;
  --p1s-ui-green-soft:#edf7ef;
  --p1s-ui-lime:#c7ee4a;
  --p1s-ui-ink:#19251d;
  --p1s-ui-muted:#69766d;
  --p1s-ui-line:#dbe5dc;
  --p1s-ui-surface:#ffffff;
  --p1s-ui-bg:#f3f6f3;
  --p1s-ui-danger:#b44949;
  --p1s-ui-shadow:0 18px 50px rgba(24,48,31,.10);
  --p1s-ui-shadow-soft:0 8px 24px rgba(24,48,31,.07);
}
html{scroll-behavior:smooth}
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
button,input,select,textarea{font:inherit}
button{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:3px solid rgba(70,157,87,.24)!important;
  outline-offset:2px!important;
}
button:disabled{transform:none!important;box-shadow:none!important}
.icon svg{stroke-linecap:round;stroke-linejoin:round}
.p1s-mini-spinner{width:14px;height:14px;border-radius:50%;border:2px solid currentColor;border-right-color:transparent;display:inline-block;animation:p1s8300spin .72s linear infinite}
@keyframes p1s8300spin{to{transform:rotate(360deg)}}

/* Cabecera */
.topbar{
  min-height:76px!important;
  padding-inline:clamp(18px,3.4vw,54px)!important;
  gap:18px!important;
}
.brand{gap:16px!important;text-decoration:none!important}
.brand img{width:96px!important;height:50px!important}
.brand-divider{height:34px!important}
.brand>span:last-child{line-height:1.48!important;letter-spacing:.13em!important}
.topbar-center{
  min-width:0;
  padding:8px 12px!important;
  border-radius:13px;
}
.header-actions{gap:9px!important}
.account-button,.theme-toggle,.topbar .top-link-button,.topbar .traccar-users-badge,.topbar .access-role-badge{
  min-height:40px!important;
  border-radius:12px!important;
}
.account-button{width:42px!important;height:42px!important;overflow:hidden}
.account-button .account-photo{width:100%!important;height:100%!important;object-fit:cover!important}
body.light-mode .topbar{
  background:rgba(255,255,255,.94)!important;
  backdrop-filter:blur(18px) saturate(125%)!important;
  -webkit-backdrop-filter:blur(18px) saturate(125%)!important;
  border-bottom:1px solid #dbe6dc!important;
  box-shadow:0 8px 28px rgba(32,55,38,.07)!important;
}
body.light-mode .topbar-center{
  background:#f7faf7!important;
  border:1px solid #e0e8e0!important;
  color:#304238!important;
}
body.light-mode .account-button,
body.light-mode .theme-toggle,
body.light-mode .topbar .top-link-button,
body.light-mode .topbar .traccar-users-badge,
body.light-mode .topbar .access-role-badge{
  background:#fff!important;
  border:1px solid #d8e4d9!important;
  box-shadow:0 3px 10px rgba(31,54,37,.05)!important;
}
body:not(.light-mode) .topbar{
  background:rgba(5,8,6,.95)!important;
  border-bottom:1px solid rgba(255,255,255,.11)!important;
}
body:not(.light-mode) .topbar-center{
  background:rgba(255,255,255,.035)!important;
  border:1px solid rgba(255,255,255,.09)!important;
}

/* Espaciado y encabezado principal */
.workspace{
  max-width:1680px!important;
  padding:30px clamp(18px,3.4vw,54px) 30px!important;
}
.page-heading{margin-bottom:20px!important;gap:20px!important}
.page-heading h1{font-size:clamp(1.75rem,2.35vw,2.45rem)!important;font-weight:780!important;letter-spacing:-.045em!important}
.page-intro{max-width:760px}
.heading-actions{gap:10px!important;flex-wrap:wrap;justify-content:flex-end}
.connection-badge{min-height:38px;padding:0 11px!important;border-radius:999px!important}
.button{
  border-radius:11px!important;
  min-height:41px!important;
  font-weight:720!important;
  letter-spacing:-.005em;
}
body.light-mode{background:linear-gradient(180deg,#f6f8f6 0,#f2f5f2 42%,#eef2ef 100%)!important}
body.light-mode .button-primary{
  background:linear-gradient(180deg,#2f914c,#23793d)!important;
  color:#fff!important;
  border-color:#1e7036!important;
  box-shadow:0 6px 16px rgba(35,121,61,.18)!important;
}
body.light-mode .button-primary:hover{background:linear-gradient(180deg,#329c52,#257f40)!important;box-shadow:0 9px 22px rgba(35,121,61,.23)!important}
body.light-mode .button-outline{background:#fff!important;border-color:#d6e2d7!important;color:#33483b!important}
body.light-mode .button-outline:hover{background:#f4f8f4!important;border-color:#b9d0bc!important}
body:not(.light-mode) .button{border-radius:11px!important}

/* Avisos y tarjetas operativas */
.notice,.alert{border-radius:13px!important}
body.light-mode .notice{
  background:#f2f7ef!important;border-color:#dce8d7!important;color:#526057!important;
  box-shadow:0 5px 18px rgba(37,59,42,.04)!important;
}
.ops-intelligence{gap:10px!important;margin-bottom:18px!important}
.ops-intelligence-main,.ops-kpis,.ops-priority{border-radius:15px!important}
body.light-mode .ops-intelligence-main,
body.light-mode .ops-kpis,
body.light-mode .ops-priority{
  background:linear-gradient(180deg,#fff,#fbfdfb)!important;
  border:1px solid #dce6dd!important;
  box-shadow:var(--p1s-ui-shadow-soft)!important;
}
body.light-mode .ops-kpi{border-right-color:#e5ece6!important}
body.light-mode .ops-kpi:hover,
body.light-mode .ops-kpi.active{background:#f3f8f4!important}
body.light-mode .ops-priority-list{scrollbar-color:#c6d5c8 transparent}
body.light-mode .ops-priority-actions button{border-radius:9px!important}

/* Ventana principal y barra de herramientas */
.monitor-window{
  overflow:hidden!important;
  border-radius:18px!important;
}
body.light-mode .monitor-window{
  border:1px solid #d8e3d9!important;
  box-shadow:0 20px 50px rgba(31,55,38,.09)!important;
  background:#fff!important;
}
.monitor-window .window-toolbar{
  min-height:58px!important;
  padding:8px 12px!important;
}
.monitor-window .view-tabs{flex:0 0 auto}
.monitor-window .view-tab{
  min-height:38px!important;
  padding:0 11px!important;
  border-radius:10px!important;
  font-weight:780!important;
}
.monitor-window .window-actions{
  gap:6px!important;
  align-items:center!important;
}
.monitor-window .map-tool-button{
  min-height:36px!important;
  padding:7px 10px!important;
  border-radius:9px!important;
  font-size:.71rem!important;
}
.monitor-window .icon-button{
  width:36px!important;height:36px!important;min-width:36px!important;border-radius:9px!important;
}
body.light-mode .window-toolbar,
body.light-mode .map-search-strip,
body.light-mode .trip-toolbar,
body.light-mode .window-footer{
  background:#fbfdfb!important;
  border-color:#e0e9e1!important;
}
.map-search-strip{padding:9px 12px!important}
.map-search-field{border-radius:11px!important}
body.light-mode .map-search-field{background:#fff!important;border:1px solid #d8e4da!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)!important}
body.light-mode .map-search-field:focus-within{border-color:#83b48d!important;box-shadow:0 0 0 3px rgba(67,139,80,.10)!important}
.map-panel{min-height:520px}
#map{background:#eef2ee}
.fit-button{border-radius:10px!important}
.map-label{border-radius:999px!important}
.selected-card{border-radius:15px!important}

/* Tabla/listado */
.section-heading{gap:16px!important}
.table-wrap{border-radius:16px!important;overflow:hidden!important}
body.light-mode .table-wrap{border:1px solid #dbe5dc!important;box-shadow:0 12px 30px rgba(31,55,38,.06)!important}
.locations thead th{letter-spacing:.035em!important}
.locations tbody tr{transition:background-color .14s ease,box-shadow .14s ease}
body.light-mode .locations tbody tr:hover td{background:#f8fbf8!important}
body.light-mode .locations tbody tr.selected td{background:#eef7ef!important}
.search-field,.list-controls select{border-radius:10px!important}
.row-map-button{border-radius:9px!important}

/* Todos los diálogos */
dialog.ops-dialog,dialog:not(.p1s-datetime-dialog){
  border-radius:20px!important;
}
dialog::backdrop{
  background:rgba(18,28,20,.52)!important;
  backdrop-filter:blur(7px) saturate(90%)!important;
  -webkit-backdrop-filter:blur(7px) saturate(90%)!important;
}
body.light-mode dialog,
body.light-mode .ops-dialog{
  background:#fff!important;
  color:#1d2a21!important;
  border:1px solid #dbe5dc!important;
  box-shadow:0 28px 90px rgba(24,45,30,.20)!important;
}
body:not(.light-mode) dialog,
body:not(.light-mode) .ops-dialog{
  background:linear-gradient(180deg,#0a0f0b,#070b08)!important;
  color:#edf6ef!important;
  border:1px solid rgba(117,209,137,.25)!important;
  box-shadow:0 30px 100px rgba(0,0,0,.66)!important;
}
.dialog-close{
  width:42px!important;height:42px!important;border-radius:13px!important;
  transition:transform .14s ease,background .14s ease,border-color .14s ease!important;
}
.dialog-close:hover{transform:rotate(2deg) scale(1.03)}
body.light-mode .dialog-close{background:#f8faf8!important;border:1px solid #dbe5dc!important;color:#3f5045!important}
body.light-mode .dialog-close:hover{background:#eef5ef!important;border-color:#bcd0bf!important}
body:not(.light-mode) .dialog-close{background:#0d1510!important;border:1px solid #245034!important;color:#e8f4ea!important}
body:not(.light-mode) .dialog-close:hover{background:#132218!important;border-color:#3d7b50!important}
.ops-description{line-height:1.55!important}
body.light-mode .ops-description{color:#68756c!important}
body:not(.light-mode) .ops-description{color:#a5b3a8!important}
body.light-mode dialog input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.light-mode dialog select,
body.light-mode dialog textarea{
  background:#fff!important;color:#1e2d23!important;border:1px solid #d4e0d5!important;border-radius:10px!important;
}
body:not(.light-mode) dialog input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body:not(.light-mode) dialog select,
body:not(.light-mode) dialog textarea{
  background:#08100a!important;color:#f0f7f1!important;border:1px solid #275239!important;border-radius:10px!important;
}
body.light-mode dialog input:focus,
body.light-mode dialog select:focus,
body.light-mode dialog textarea:focus{border-color:#7fae89!important;box-shadow:0 0 0 3px rgba(51,127,68,.10)!important;outline:0!important}
body:not(.light-mode) dialog input:focus,
body:not(.light-mode) dialog select:focus,
body:not(.light-mode) dialog textarea:focus{border-color:#5bb672!important;box-shadow:0 0 0 3px rgba(80,189,105,.12)!important;outline:0!important}

/* Mi panel: rediseño completo */
.account-menu-dialog{
  width:min(700px,calc(100vw - 28px))!important;
  max-height:min(860px,calc(100dvh - 34px))!important;
  padding:26px!important;
  overflow:auto!important;
}
.account-menu-dialog .dialog-close{right:18px!important;top:18px!important}
.account-menu-head{
  display:grid!important;
  grid-template-columns:76px minmax(0,1fr)!important;
  gap:17px!important;
  align-items:center!important;
  margin:0 56px 18px 0!important;
  padding-bottom:18px!important;
  border-bottom:1px solid #e1e8e2!important;
}
.account-profile-preview{
  width:72px!important;height:72px!important;border-radius:20px!important;
  display:grid!important;place-items:center!important;overflow:hidden!important;
}
.account-profile-preview .icon{width:32px!important;height:32px!important}
.account-profile-preview img{width:100%!important;height:100%!important;object-fit:cover!important}
.account-menu-copy{min-width:0}
.account-menu-copy .eyebrow{margin:0 0 3px!important;font-size:.66rem!important;letter-spacing:.16em!important}
.account-menu-copy h2{
  margin:0!important;
  font-size:clamp(1.75rem,3vw,2.15rem)!important;
  line-height:1.02!important;
  font-weight:820!important;
  letter-spacing:-.045em!important;
}
.account-menu-copy .ops-description{
  margin:7px 0 0!important;
  font-size:.82rem!important;
  white-space:normal!important;
}
body.light-mode .account-profile-preview{
  background:linear-gradient(145deg,#f0f8ee,#e7f3e7)!important;
  border:1px solid #d3e5d2!important;
  color:#237b3c!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8)!important;
}
body:not(.light-mode) .account-menu-head{border-bottom-color:#1f3526!important}
body:not(.light-mode) .account-profile-preview{
  background:linear-gradient(145deg,#0b1e11,#0b2b16)!important;
  border:1px solid #295a38!important;
  color:#6fe487!important;
}

.my-name-form{
  margin:0 0 18px!important;
  padding:0!important;
}
.my-name-form>label{
  display:block!important;
  margin:0 0 7px!important;
  font-size:.75rem!important;
  font-weight:800!important;
}
.my-name-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:10px!important;
}
.my-name-form input{
  min-width:0!important;
  height:44px!important;
  padding:0 13px!important;
  border-radius:11px!important;
}
#my-name-save{
  min-width:145px!important;
  min-height:44px!important;
  padding-inline:16px!important;
  border-radius:11px!important;
  white-space:nowrap!important;
}
#my-name-save .icon{width:16px!important;height:16px!important}
.my-name-status{
  display:block;
  min-height:16px;
  margin-top:5px;
  font-size:.64rem;
  line-height:1.25;
}
.my-name-status:empty{min-height:0;margin-top:0}
.my-name-status[data-state="ok"]{color:#2f7d45}
.my-name-status[data-state="error"]{color:#b14c4c}
.my-name-status[data-state="loading"]{color:#6b786f}
body:not(.light-mode) .my-name-status[data-state="ok"]{color:#7be791}
body:not(.light-mode) .my-name-status[data-state="error"]{color:#ff9292}
body:not(.light-mode) .my-name-status[data-state="loading"]{color:#9aada0}

.account-menu-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
}
.account-menu-action{
  position:relative!important;
  display:grid!important;
  grid-template-columns:46px minmax(0,1fr) 18px!important;
  gap:11px!important;
  align-items:center!important;
  min-height:82px!important;
  padding:12px 13px!important;
  border-radius:15px!important;
  text-align:left!important;
  overflow:hidden!important;
  transition:transform .15s ease,border-color .15s ease,background-color .15s ease,box-shadow .15s ease!important;
}
.account-menu-action::after{
  content:"›";
  display:grid;
  place-items:center;
  width:18px;height:28px;
  font-size:1.35rem;
  font-weight:500;
  line-height:1;
  opacity:.72;
}
.account-menu-action>.icon{
  width:42px!important;height:42px!important;
  display:grid!important;place-items:center!important;
  border-radius:13px!important;
  padding:10px!important;
}
.account-menu-action>.icon svg{width:22px!important;height:22px!important}
.account-menu-action>span:nth-child(2){min-width:0}
.account-menu-action strong{
  font-size:.82rem!important;
  line-height:1.25!important;
  font-weight:800!important;
}
.account-menu-action small{
  margin-top:4px!important;
  font-size:.67rem!important;
  line-height:1.35!important;
}
.account-menu-action:hover{transform:translateY(-1px)!important}
body.light-mode .account-menu-action{
  background:linear-gradient(180deg,#fff,#fbfdfb)!important;
  border:1px solid #dbe6dc!important;
  color:#213028!important;
  box-shadow:0 4px 14px rgba(34,58,40,.035)!important;
}
body.light-mode .account-menu-action>.icon{
  background:#edf7ef!important;
  color:#278242!important;
}
body.light-mode .account-menu-action small{color:#758279!important}
body.light-mode .account-menu-action:hover{
  background:#f7fbf7!important;
  border-color:#a9cfb0!important;
  box-shadow:0 8px 20px rgba(37,91,51,.08)!important;
}
body.light-mode .account-menu-action::after{color:#357648}
body.light-mode .account-menu-danger>.icon{background:#fff1f1!important;color:#b44a4a!important}
body.light-mode .account-menu-danger:hover{border-color:#e3b4b4!important;background:#fffafa!important}
body.light-mode .account-menu-danger::after{color:#a34a4a}
body:not(.light-mode) .account-menu-action{
  background:linear-gradient(180deg,#0c1510,#09110c)!important;
  border:1px solid #1f432d!important;
  color:#edf6ef!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.02)!important;
}
body:not(.light-mode) .account-menu-action>.icon{
  background:#10261a!important;
  color:#70df88!important;
}
body:not(.light-mode) .account-menu-action small{color:#96aa9b!important}
body:not(.light-mode) .account-menu-action:hover{
  background:#102019!important;border-color:#367b4c!important;box-shadow:0 10px 24px rgba(0,0,0,.22)!important;
}
body:not(.light-mode) .account-menu-action::after{color:#78d88c}
body:not(.light-mode) .account-menu-danger>.icon{background:#2a1212!important;color:#ff8888!important}
body:not(.light-mode) .account-menu-danger:hover{border-color:#7b3d3d!important;background:#1b1010!important}
body:not(.light-mode) .account-menu-danger::after{color:#ff8888}
.account-menu-dialog>.privacy-note{
  margin:17px 0 0!important;
  padding-top:14px!important;
  border-top:1px solid #e4eae4!important;
  display:block!important;
  font-size:.66rem!important;
  line-height:1.5!important;
}
body.light-mode .account-menu-dialog>.privacy-note{color:#6d7971!important}
body:not(.light-mode) .account-menu-dialog>.privacy-note{border-top-color:#1e3425!important;color:#8fa194!important}

/* Toast y feedback */
.toast{
  min-width:min(420px,calc(100vw - 28px));
  text-align:center;
  border-radius:12px!important;
  font-weight:700!important;
  box-shadow:0 16px 44px rgba(0,0,0,.22)!important;
}
body.light-mode .toast{background:#183f27!important;color:#fff!important}

/* Reducir saltos visuales cuando un panel abre/cierra */
dialog[open]{animation:p1s8300dialogIn .16s ease-out}
@keyframes p1s8300dialogIn{from{opacity:0;transform:translateY(6px) scale(.992)}to{opacity:1;transform:none}}

/* Responsive */
@media(max-width:1080px){
  .topbar-center{display:none!important}
  .workspace{padding-top:24px!important}
  .ops-intelligence{grid-template-columns:1fr 1fr!important}
  .ops-priority{grid-column:1/-1!important}
}
@media(max-width:760px){
  .topbar{height:66px!important;min-height:66px!important;padding-inline:12px!important}
  .brand img{width:78px!important;height:42px!important}
  .brand-divider,.brand>span:last-child{display:none!important}
  .header-actions{gap:6px!important;margin-left:auto!important}
  .topbar .top-link-button{display:none!important}
  .workspace{padding:18px 10px 22px!important}
  .page-heading{display:grid!important;grid-template-columns:1fr!important;gap:14px!important;margin-bottom:16px!important}
  .heading-actions{justify-content:flex-start!important;gap:7px!important}
  .heading-actions .button{flex:1 1 auto!important}
  .ops-intelligence{grid-template-columns:1fr!important;gap:8px!important}
  .ops-priority{grid-column:auto!important}
  .monitor-window{border-radius:14px!important}
  .monitor-window .window-toolbar{display:block!important;padding:8px!important}
  .monitor-window .view-tabs{margin-bottom:7px!important}
  .monitor-window .window-actions{
    display:flex!important;
    flex-wrap:nowrap!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain!important;
    scrollbar-width:none!important;
    padding-bottom:2px!important;
  }
  .monitor-window .window-actions::-webkit-scrollbar{display:none!important}
  .monitor-window .map-tool-button{flex:0 0 auto!important;min-height:38px!important}
  .map-search-strip{padding:8px!important}
  .map-panel{min-height:480px}
  .account-menu-dialog{
    width:calc(100vw - 12px)!important;
    max-width:none!important;
    max-height:calc(100dvh - 12px)!important;
    margin:6px auto!important;
    padding:18px 15px calc(22px + env(safe-area-inset-bottom))!important;
    border-radius:18px!important;
  }
  .account-menu-dialog .dialog-close{top:12px!important;right:12px!important}
  .account-menu-head{
    grid-template-columns:62px minmax(0,1fr)!important;
    gap:12px!important;
    margin-right:45px!important;
    padding-bottom:14px!important;
  }
  .account-profile-preview{width:60px!important;height:60px!important;border-radius:17px!important}
  .account-menu-copy h2{font-size:1.65rem!important}
  .account-menu-copy .ops-description{font-size:.72rem!important}
  .my-name-row{grid-template-columns:1fr!important;gap:7px!important}
  #my-name-save{width:100%!important;min-width:0!important}
  .account-menu-grid{grid-template-columns:1fr!important;gap:8px!important}
  .account-menu-action{min-height:76px!important;padding:11px 12px!important;grid-template-columns:42px minmax(0,1fr) 18px!important}
  .account-menu-action>.icon{width:40px!important;height:40px!important}
  .account-menu-action strong{font-size:.84rem!important}
  .account-menu-action small{font-size:.68rem!important}
}
@media(max-width:430px){
  .connection-badge{font-size:.68rem!important}
  .page-heading h1{font-size:1.75rem!important}
  .notice{align-items:flex-start!important}
  .notice .text-button{padding-left:0!important}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}
}
/* P1S 9.0.0: modo claro único. */
html,body,html.light-mode,body.light-mode{color-scheme:light!important;background:var(--paper)!important;color:var(--ink)!important}
.theme-toggle{display:none!important}
#theme-toggle.theme-toggle{display:none!important;visibility:hidden!important;pointer-events:none!important}
