/* Chicha Sonic v3 — mobile-first, compact, app-like interface. */
.compact-site{background:#f5f7fc;color:#0a1741;min-height:100dvh}
.compact-site :focus-visible,.admin-page :focus-visible{outline:3px solid #168bfd;outline-offset:3px}
.compact-site .shell{width:min(1120px,calc(100% - 36px))}
.compact-header{position:sticky;top:0;z-index:900;background:#fff;border-bottom:1px solid #e8ebf4;box-shadow:0 3px 16px #0d225b08}
.compact-nav{min-height:67px;display:flex;align-items:center;justify-content:space-between;gap:14px}
.compact-brand{display:flex;align-items:center;gap:10px;min-width:0}
.compact-brand img{height:44px;width:44px;border-radius:50%;border:2px solid #ebeff9;object-fit:cover;flex:none}
.compact-brand span{display:flex;flex-direction:column;min-width:0;gap:1px}
.compact-brand strong{font:900 18px/1 Outfit,system-ui,sans-serif;letter-spacing:-.6px;white-space:nowrap}
.compact-brand em{font-style:normal;color:#2254ef}
.compact-brand small{font-size:8px;letter-spacing:1px;font-weight:800;color:#7784a4;white-space:nowrap}
.compact-nav-right{display:flex;align-items:center;gap:12px;font-size:12px;font-weight:800}
.compact-nav-right>a{transition:background .15s}
.nav-map{color:#3b54a4}.nav-map:hover{color:#123dce}
.compact-ig{background:#eef2ff;color:#233ed1;border-radius:10px;padding:10px 12px}
.compact-main{padding-top:20px;padding-bottom:25px}
.compact-hero{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:20px;align-items:stretch;margin-bottom:27px}
.compact-hero-copy{background:linear-gradient(130deg,#07153d,#102c87 92%);color:#fff;border-radius:20px;padding:31px 30px;display:flex;flex-direction:column;align-items:flex-start;justify-content:center}
.micro-kicker{font-size:10px;font-weight:800;letter-spacing:1.6px;color:#bacdff;display:inline-flex;align-items:center;gap:8px}
.kicker-dot{background:#bde65e;width:8px;height:8px;border-radius:50%;box-shadow:0 0 0 4px #bde65e23}
.compact-hero h1{font:900 clamp(31px,3.35vw,45px)/1.06 Outfit,system-ui,sans-serif;letter-spacing:-1.5px;margin:15px 0 11px}
.compact-hero h1 span{color:#beef70}
.compact-hero p{color:#d5dff4;font-size:13px;line-height:1.7;max-width:310px;margin:0 0 19px}
.compact-go{background:#cfff83;color:#132141;border-radius:11px;min-height:43px;padding:10px 16px;display:inline-flex;align-items:center;gap:18px;font-weight:900;font-size:12px}
.compact-go:hover{background:#e0ffa8}
.compact-hero-media{border-radius:20px;overflow:hidden;background:#103393;min-height:244px;box-shadow:0 8px 26px #1326571e}
.compact-hero-media picture,.compact-hero-media img{width:100%;height:100%;display:block}
.compact-hero-media img{object-fit:cover;object-position:center}
.live-section{scroll-margin-top:84px}
.compact-section-top{display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin:0 0 16px}
.compact-overline{display:block;font-size:10px;font-weight:900;letter-spacing:1.1px;color:#5365a8;margin-bottom:5px}
.compact-section-top h2{font:900 29px/1.08 Outfit,system-ui,sans-serif;letter-spacing:-1px;margin:4px 0 6px}
.compact-section-top p{font-size:12px;color:#72809e;line-height:1.4;margin:0}
.compact-status{display:flex;gap:8px;align-items:center;justify-content:center;border:1px solid #e0e5f0;background:#fff;color:#697994;font-weight:900;letter-spacing:.45px;font-size:10px;white-space:nowrap;border-radius:30px;padding:9px 12px;align-self:center}
.compact-status .signal-dot{width:8px;height:8px;border-radius:50%;display:block;background:#a6b0c4;flex:none}
.compact-status.is-live{background:#e8fff3;border-color:#b5ead0;color:#116344}
.compact-status.is-live .signal-dot{background:#13b678;box-shadow:0 0 0 4px #19bd822b}
.live-layout{display:grid;grid-template-columns:minmax(0,1.52fr) minmax(310px,.75fr);gap:16px;align-items:stretch}
.compact-mapbox{position:relative;background:#e8eef8;border:1px solid #dce5f4;border-radius:18px;overflow:hidden;min-height:462px;box-shadow:0 6px 24px #12234e13}
.compact-mapbox #map{position:absolute;inset:0;z-index:0;background:#e8eef8}
.compact-mapbox .map-fallback{margin-top:90px}
.map-toolbar{position:absolute;top:12px;left:12px;z-index:405;display:flex;flex-wrap:wrap;gap:6px;max-width:calc(100% - 24px)}
.map-toolbar button{display:flex;gap:5px;align-items:center;background:#fff;border:1px solid #e0e7f4;color:#1a3264;border-radius:10px;font-size:11px;font-weight:800;padding:9px 10px;min-height:39px;box-shadow:0 3px 15px #1728521b}
.map-toolbar button:hover{background:#eaf1ff}
.map-toolbar button.is-on{background:#172b73;color:white}
.compact-map-overlay{position:absolute;z-index:400;top:50%;left:50%;transform:translate(-50%,-50%);background:#ffffffee;backdrop-filter:blur(7px);border:1px solid #dfe7f7;padding:13px 14px;border-radius:14px;display:flex;gap:11px;align-items:center;width:min(310px,calc(100% - 24px));box-shadow:0 7px 25px #14255b35;pointer-events:none}
.compact-map-overlay.is-hidden{display:none}
.map-off-icon{background:#edf2ff;height:42px;width:42px;border-radius:12px;display:grid;place-items:center;font-size:22px;flex:none}
.compact-map-overlay strong{font-size:12px;line-height:1.3;display:block}
.compact-map-overlay small{font-size:11px;color:#7786a1;line-height:1.45;display:block;margin-top:4px}
.compact-map-footer{position:absolute;z-index:406;left:0;right:0;bottom:0;background:#fff;min-height:50px;display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 17px;font-size:11px;color:#73809c}
.compact-map-footer strong{color:#172a56}
.compact-map-footer span:last-child{text-align:right}
.compact-mapbox .leaflet-bottom{bottom:49px}
.compact-mapbox .leaflet-control-attribution{font-size:9px}
.compact-mapbox .sonic-marker{height:52px;width:52px;font-size:25px}
.live-sidebar{display:flex;flex-direction:column;gap:12px;min-width:0}
.live-main-card{border:1px solid #e1e8f6;background:#fff;border-radius:18px;padding:22px;box-shadow:0 5px 23px #0b1f570a}
.live-card-intro{display:flex;align-items:center;gap:9px;margin-bottom:11px}
.live-card-icon{background:#eaf0ff;height:37px;width:37px;border-radius:11px;display:grid;place-items:center;font-size:22px}
.live-card-intro .compact-overline{margin-bottom:0}
.live-main-card h3{font:900 24px/1.1 Outfit,system-ui,sans-serif;letter-spacing:-.6px;margin:0 0 8px}
.live-main-card>p{font-size:12px;line-height:1.65;color:#74819f;margin:0 0 12px}
.live-main-card p.distance-note{background:#f0f6ff;color:#2246a4;font-weight:800;border-radius:8px;padding:9px 10px;font-size:11px}
.route-block{background:#f6f8fc;border:1px solid #e7ecf6;border-radius:13px;padding:13px;margin-top:15px}
.route-label{font-size:10px;font-weight:900;color:#54678a;letter-spacing:1px;display:block;margin-bottom:9px}
.route-buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.route-button{min-width:0;border:0;border-radius:10px;background:#183ac8;color:#fff;display:flex;align-items:center;justify-content:center;gap:6px;min-height:43px;padding:8px;font-size:11px;font-weight:800}
.route-button:last-child{background:#132453}
.route-button:disabled{cursor:not-allowed;background:#e4e9f3;color:#96a2b7}
.route-button:not(:disabled):hover{filter:brightness(1.13)}
.route-hint{display:block;font-size:10px;line-height:1.45;color:#8894aa;margin-top:10px}
.compact-whatsapp{display:flex;justify-content:space-between;align-items:center;background:#e4f9ed;color:#087340;border-radius:11px;padding:13px 15px;font-weight:900;font-size:12px;margin-top:12px}
.compact-whatsapp:hover{background:#bff1d5}
.compact-next-stop{display:flex;gap:11px;border:1px solid #e1e8f6;background:#fff;border-radius:16px;padding:16px 18px}
.next-mini-icon{display:grid;place-items:center;flex:none;border-radius:10px;background:#eaf0ff;height:37px;width:37px;font-size:18px}
.compact-next-stop .compact-overline{margin:0 0 5px}
.compact-next-stop h3{font:800 17px/1.2 Outfit,system-ui,sans-serif;margin:0 0 4px}
.compact-next-stop p{font-size:11px;line-height:1.55;color:#7a88a3;margin:0}
.compact-share{display:flex;justify-content:space-between;align-items:center;background:#fff;color:#344a89;border:1px solid #dbe3f3;padding:12px 16px;border-radius:12px;font-size:12px;font-weight:800;min-height:44px}
.compact-share:hover{background:#edf2ff}
.compact-demo-note{font-size:11px;line-height:1.6;color:#735d18;background:#fff9e1;border:1px solid #eee0aa;padding:12px 15px;border-radius:11px;margin-top:12px}
.compact-caution{font-size:11px;color:#7c89a5;line-height:1.6;margin:12px 2px 0}
.compact-contact{display:flex;align-items:center;justify-content:space-between;gap:20px;border-radius:17px;background:linear-gradient(110deg,#082465,#1c48ba);padding:20px 23px;color:white;margin-top:24px}
.compact-contact strong{font:800 18px Outfit,system-ui,sans-serif}
.compact-contact p{font-size:12px;color:#d7e3ff;margin:5px 0 0}
.compact-contact>a{background:#d0fd82;border-radius:10px;color:#102759;padding:13px 15px;font-size:12px;font-weight:900;white-space:nowrap}
.compact-footer{border-top:1px solid #e4e9f4;background:#fff;margin-top:18px}
.compact-footer-inner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-top:18px;padding-bottom:18px;font-size:11px;color:#78849f}
.compact-footer-inner div{display:flex;gap:18px;font-weight:800}
.compact-footer-inner a{color:#5068ab}
.mobile-action-dock{display:none}
@media(max-width:860px){.compact-hero{grid-template-columns:1fr 1.2fr;gap:12px}.compact-hero-copy{padding:22px}.compact-hero h1{font-size:32px}.live-layout{grid-template-columns:minmax(0,1fr) minmax(285px,.8fr)}.compact-mapbox{min-height:480px}.live-main-card{padding:16px}}
@media(max-width:700px){
 .compact-site .shell{width:calc(100% - 24px)}
 .compact-nav{min-height:59px}.compact-brand img{height:40px;width:40px}.compact-brand strong{font-size:16px}.compact-brand small{font-size:7px;letter-spacing:.6px}.compact-nav-right{gap:7px}.nav-map{display:none}.compact-ig{padding:8px 10px;font-size:11px}
 .compact-main{padding-top:12px;padding-bottom:12px}
 .compact-hero{display:flex;flex-direction:column-reverse;gap:0;margin-bottom:21px;border-radius:15px;overflow:hidden;background:#082568}
 .compact-hero-media{width:100%;min-height:0;height:194px;border-radius:0;box-shadow:none;flex:none}
 .compact-hero-copy{border-radius:0;padding:15px 16px 16px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:12px;row-gap:5px;background:#091c56}
 .compact-hero-copy .micro-kicker{grid-column:1/-1;font-size:8px;letter-spacing:1px}
 .compact-hero h1{font-size:22px;line-height:1.06;margin:1px 0 0;letter-spacing:-.4px}
 .compact-hero p{font-size:11px;line-height:1.4;grid-column:1/-1;grid-row:3;margin:0;color:#d5e0fb}
 .compact-go{grid-column:2;grid-row:2;min-height:38px;gap:6px;padding:8px 10px;font-size:10px;white-space:nowrap}
 .compact-section-top{align-items:center;gap:6px;margin-bottom:12px}
 .compact-section-top h2{font-size:23px;margin:3px 0 4px}.compact-section-top p{font-size:10px;max-width:225px;line-height:1.45}
 .compact-overline{font-size:9px}.compact-status{font-size:9px;gap:6px;padding:9px 10px}
 .live-layout{display:flex;flex-direction:column;gap:11px}
 .compact-mapbox{height:400px;min-height:400px;border-radius:14px}
 .map-toolbar{top:9px;left:8px;right:8px;gap:5px}
 .map-toolbar button{font-size:10px;min-height:36px;padding:7px 8px}
 .compact-map-footer{padding:11px 12px;font-size:10px;min-height:45px}
 .compact-mapbox .leaflet-bottom{bottom:45px}
 .live-main-card{padding:17px;border-radius:14px}
 .live-main-card h3{font-size:22px}.live-main-card>p{font-size:12px}
 .route-block{margin-top:12px}.compact-whatsapp{display:none}
 .compact-next-stop{padding:13px 15px;border-radius:13px}.compact-share{padding:11px 14px}
 .compact-contact{padding:16px;margin-top:18px}.compact-contact strong{font-size:16px}.compact-contact>a{padding:11px;font-size:11px}.compact-contact p{font-size:11px}
 .compact-footer{margin-top:0}.compact-footer-inner{padding-bottom:101px;flex-direction:column;align-items:flex-start;gap:10px}
 .mobile-action-dock{display:flex;position:fixed;bottom:0;left:0;right:0;z-index:901;gap:9px;padding:10px max(12px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#fff;box-shadow:0 -5px 26px #05123c24;border-top:1px solid #e5eaf3}
 .mobile-action-dock button,.mobile-action-dock a{min-height:48px;display:flex;align-items:center;justify-content:center;border-radius:12px;font-size:13px;font-weight:900;padding:10px 12px}
 .mobile-action-dock button{border:0;background:#204cdd;color:#fff;flex:1.3}.mobile-action-dock button:disabled{background:#d5dcec;color:#637394;cursor:not-allowed}
 .mobile-action-dock a{background:#dff9e9;color:#087442;flex:1}
 .compact-site .toast{bottom:84px}
}
@media(max-width:385px){.compact-hero-media{height:170px}.compact-go{font-size:9px}.compact-hero h1{font-size:20px}.compact-section-top h2{font-size:21px}.compact-status{font-size:8px}.map-toolbar button{font-size:9px;padding:6px}.compact-mapbox{height:355px;min-height:355px}.compact-contact{flex-direction:column;align-items:stretch}.compact-contact>a{text-align:center}}
/* Compact driver dashboard keeps the GPS action prominent without changing logic. */
.admin-page .admin-header{height:70px}.admin-page .admin-head-inner{height:70px}
.admin-page .admin-main{padding-top:28px}.admin-page .admin-intro{margin-bottom:18px}
.admin-page .admin-intro h1{font-size:32px}.admin-page .admin-intro p{font-size:13px}
.admin-page .driver-card{padding:20px;border-radius:16px}
.admin-page .driver-state-top h2{font-size:28px;margin:9px 0 7px}
.admin-page .driver-state-badge{margin:16px 0 18px}
.admin-page .driver-actions{margin-bottom:18px;gap:9px}
.admin-page .driver-actions .btn{min-height:52px}
.admin-page .gps-readings{padding:16px 0}
.admin-page .privacy-hint{margin-top:15px}
.admin-page .driver-sidebar{gap:12px}
.admin-page .driver-note{font-size:11px;margin-top:14px}
@media(max-width:770px){.admin-page .admin-header{height:62px}.admin-page .admin-head-inner{height:62px}.admin-page .admin-main{padding-top:22px}.admin-page .admin-intro h1{font-size:27px}.admin-page .driver-card{padding:17px}.admin-page .driver-state-top h2{font-size:26px}.admin-page .dashboard-grid{gap:12px}.admin-page .driver-actions .btn{min-height:53px}.admin-page .gps-readings b{font-size:11px}}
@media(prefers-reduced-motion:reduce){.compact-site *{scroll-behavior:auto!important;transition-duration:.01ms!important}}

/* Chicha Sonic v4 — diagnóstico compacto y verificable de transmisión. */
.admin-page .driver-transmission-note{margin:12px 0 0;padding:10px 12px;border-radius:10px;background:#f3f6ff;color:#506386;line-height:1.55;font-size:11px;font-weight:650}
.admin-page .connection-offline{color:#c53848!important}
@media(max-width:390px){.admin-page .driver-transmission-note{font-size:10.5px}}

/* V6: diagnóstico discreto de conexión del panel */
.sonic-diagnostic-link { margin: 1px 0 0; padding: 7px 0; color:#304da6; font:inherit; font-size:12px; font-weight:700; text-decoration:underline; text-underline-offset:3px; border:0; background:none; text-align:left; cursor:pointer; }
.sonic-diagnostic-link:disabled { opacity:.55; cursor:wait; }
.sonic-diagnostic-output { margin:0; padding:11px 12px; background:#edf3ff; color:#284374; font-size:11px; line-height:1.65; border-radius:10px; white-space:pre-line; overflow-wrap:anywhere; }

/* Chicha Sonic V5 — moto real en el mapa y tarjetas */
.leaflet-marker-icon.sonic-moto-marker {
  background: transparent; border: none;
  filter: drop-shadow(0 3px 6px rgba(4,16,44,.40));
}
.map-off-icon img, .live-card-icon img { width:100%; height:100%; object-fit:contain; display:block; }
.map-off-icon { display:inline-flex; align-items:center; justify-content:center; }
.live-card-icon { display:inline-flex; align-items:center; justify-content:center; }
