@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');
:root{
  --p:#7C3AED;--p2:#A78BFA;--p3:#EDE9FE;--p4:#6D28D9;
  --accent:#06B6D4;--green:#10B981;--amber:#F59E0B;--red:#EF4444;--blue:#3B82F6;
  --bg:#FAFAFE;--surface:#fff;--surface2:#F5F3FF;--surface3:#EDE9FE;
  --text:#1A1530;--text2:#44405A;--text3:#7C7893;--text4:#A9A3BE;
  --border:#E5E0F0;--border2:#D4CCE8;
  --shadow:0 2px 12px rgba(0,0,0,.06);--shadow2:0 8px 30px rgba(0,0,0,.1);
  --r:12px;--rs:8px;--rx:5px;
  --tr:.2s ease;
  --f:'Outfit',system-ui,sans-serif;--fm:'JetBrains Mono',monospace;
}
*{margin:0;padding:0;box-sizing:border-box}
body{background:var(--bg);color:var(--text);font-family:var(--f);overflow:hidden;height:100vh;height:100dvh;-webkit-font-smoothing:antialiased}

/* ══════ HEADER ══════ */
.header{
  height:62px;padding:0 16px;
  background:linear-gradient(135deg,#1E1B2E,#2D1B69 50%,#1E1B2E);
  border-bottom:2px solid var(--p);
  display:flex;align-items:center;gap:12px;z-index:100;position:relative;
}
.header-brand{display:flex;align-items:center;gap:10px;flex-shrink:0}
.header-logo{height:46px;width:auto;filter:drop-shadow(0 0 12px rgba(124,58,237,.5))}
.header-texts{display:flex;flex-direction:column;gap:0}
.header-title{font:700 .82rem var(--f);color:#fff;letter-spacing:-.01em}
.header-sub{font:400 .52rem var(--f);color:rgba(255,255,255,.45);letter-spacing:.08em;text-transform:uppercase}
.header-stats{display:flex;gap:6px;margin-left:auto;align-items:center}
.stat-chip{display:flex;flex-direction:column;align-items:center;padding:3px 10px;border-radius:6px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08)}
.stat-num{font:700 .78rem var(--fm);line-height:1.2}
.stat-label{font:400 .42rem var(--f);color:rgba(255,255,255,.4);text-transform:uppercase;letter-spacing:.04em}
.stat-chip.green .stat-num{color:#86efac}
.stat-chip.amber .stat-num{color:#fde68a}
.stat-chip.blue .stat-num{color:var(--accent)}
.btn-refresh{width:34px;height:34px;border-radius:var(--rx);border:1px solid rgba(255,255,255,.15);background:transparent;color:rgba(255,255,255,.5);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:var(--tr);flex-shrink:0}
.btn-refresh:hover{color:var(--accent);border-color:var(--accent)}
.btn-refresh.spinning svg{animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ══════ LAYOUT ══════ */
.layout{display:flex;height:calc(100vh - 62px);height:calc(100dvh - 62px)}

/* ══════ PANEL ══════ */
.panel{width:280px;flex-shrink:0;background:var(--surface);border-right:1px solid var(--border);overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--p2) transparent}
.panel::-webkit-scrollbar{width:3px}
.panel::-webkit-scrollbar-thumb{background:var(--p2);border-radius:3px}
.panel-section{padding:10px 12px;border-bottom:1px solid var(--border)}
.search-box{position:relative;display:flex;align-items:center;background:var(--surface2);border:1px solid var(--border);border-radius:var(--rs);overflow:hidden}
.search-icon{position:absolute;left:8px;color:var(--text4);pointer-events:none}
.search-box input{width:100%;border:none;background:transparent;color:var(--text);font:400 .8rem var(--f);padding:9px 10px 9px 28px;outline:none}
.search-box input::placeholder{color:var(--text4);font-size:.75rem}
.search-box:focus-within{border-color:var(--p);box-shadow:0 0 0 2px rgba(124,58,237,.1)}
.search-results{display:none;background:var(--surface);border:1px solid var(--border);border-top:none;border-radius:0 0 var(--rs) var(--rs);max-height:260px;overflow-y:auto;box-shadow:var(--shadow2);z-index:20;position:relative}
.search-results.show{display:block}
.sr-item{display:flex;align-items:center;gap:6px;padding:8px 10px;cursor:pointer;transition:background .15s;border-bottom:1px solid rgba(0,0,0,.03)}
.sr-item:hover{background:var(--surface2)}
.sr-item:active{background:var(--surface3)}
.sr-icon{font-size:11px;flex-shrink:0}
.sr-info{flex:1;min-width:0}
.sr-name{font:500 .72rem var(--f);color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sr-name mark,.sr-detail mark{background:#E9D5FF;color:var(--p4);padding:0 1px;border-radius:2px}
.sr-detail{font:400 .58rem var(--f);color:var(--text4);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sr-empty{padding:14px;text-align:center;color:var(--text4);font-size:.72rem}
.filter-label{font:600 .55rem var(--f);color:var(--text3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:4px;display:block}
.filter-select{width:100%;padding:8px 28px 8px 10px;border:1px solid var(--border);border-radius:var(--rx);background:var(--surface);color:var(--text);font:400 .75rem var(--f);outline:none;cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23A9A3BE'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;transition:var(--tr)}
.filter-select:focus{border-color:var(--p);box-shadow:0 0 0 2px rgba(124,58,237,.08)}

/* Global Stats */
.gstat-title{font:700 .7rem var(--f);color:var(--text);margin-bottom:8px}
.gstat-row{display:flex;align-items:center;gap:6px;font-size:.7rem;padding:3px 0}
.gstat-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.gstat-name{flex:1;font-weight:600;color:var(--text)}
.gstat-count{font:600 .65rem var(--fm);color:var(--text2);min-width:28px;text-align:right}
.gstat-pct{font:700 .65rem var(--fm);min-width:38px;text-align:right}
.gstat-meta{font:400 .58rem var(--f);color:var(--text4);margin-top:6px;padding-top:6px;border-top:1px solid var(--border)}

/* Ganadores por municipio */
.muni-winners{display:flex;flex-direction:column;gap:4px;max-height:220px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--p2) transparent}
.muni-row{padding:6px 8px;background:var(--surface2);border-radius:var(--rx);display:flex;flex-direction:column;gap:1px}
.muni-info{display:flex;justify-content:space-between;align-items:baseline}
.muni-name{font:600 .65rem var(--f);color:var(--text)}
.muni-dep{font:400 .5rem var(--f);color:var(--text4)}
.muni-winner{display:flex;justify-content:space-between;font:700 .62rem var(--fm)}
.muni-partido{font-weight:700}
.muni-pct{font-weight:800}
.muni-meta{font:400 .48rem var(--f);color:var(--text4)}

/* Layer toggles */
.layer-toggles{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.layer-toggle{display:flex;align-items:center;gap:7px;font:500 .7rem var(--f);color:var(--text);cursor:pointer;padding:6px 8px;border-radius:var(--rx);transition:background var(--tr);user-select:none}
.layer-toggle:hover{background:var(--surface2)}
.layer-toggle input[type="checkbox"]{width:15px;height:15px;accent-color:var(--p);cursor:pointer;flex-shrink:0}
.layer-swatch{width:14px;height:10px;border-radius:2px;border:1.5px solid;flex-shrink:0}

/* Resumen Municipal */
.resumen-card{background:var(--surface2);border:1px solid var(--border);border-radius:var(--rs);padding:10px}
.resumen-titulo{font:700 .78rem var(--f);color:var(--text);margin-bottom:8px}
.resumen-barra{height:8px;background:var(--surface3);border-radius:10px;overflow:hidden;display:flex;margin-bottom:8px}
.resumen-barra-seg{height:100%;transition:width .5s ease}
.resumen-lista{display:flex;flex-direction:column;gap:4px}
.resumen-row{display:flex;align-items:center;gap:5px;font-size:.68rem}
.resumen-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}
.resumen-partido{flex:1;font-weight:600;color:var(--text)}
.resumen-votos{font:500 .62rem var(--fm);color:var(--text3);min-width:32px;text-align:right}
.resumen-pct{font:700 .62rem var(--fm);min-width:36px;text-align:right}
.resumen-meta{font:400 .55rem var(--f);color:var(--text4);margin-top:6px;padding-top:5px;border-top:1px solid var(--border)}

/* ══════ MAP ══════ */
.map-area{flex:1;position:relative;background:#f0f0f4}
#map{width:100%;height:100%;z-index:1}
.mobile-bar{display:none;position:absolute;top:10px;right:10px;z-index:10;flex-direction:column;gap:5px}
.mob-btn{width:40px;height:40px;border-radius:var(--rs);background:var(--surface);border:1px solid var(--border);color:var(--text2);cursor:pointer;display:flex;align-items:center;justify-content:center;transition:var(--tr);box-shadow:var(--shadow)}
.mob-btn:hover,.mob-btn.active{color:var(--p);border-color:var(--p)}
.float-search{display:none;position:absolute;top:10px;left:10px;right:60px;z-index:12;flex-direction:column}
.float-search.show{display:flex}
.float-search input{width:100%;padding:10px 38px 10px 12px;border:1px solid var(--border);border-radius:var(--rs);background:var(--surface);color:var(--text);font:400 .82rem var(--f);outline:none;box-shadow:var(--shadow2)}
.float-search input:focus{border-color:var(--p)}
.float-close{position:absolute;right:6px;top:6px;width:28px;height:28px;border:none;background:var(--surface2);border-radius:4px;color:var(--text3);font-size:13px;cursor:pointer;display:flex;align-items:center;justify-content:center}
.float-results{margin-top:3px;border-radius:var(--rs);box-shadow:var(--shadow2)}

/* Legend */
/* Legend - collapsible */
.map-legend{position:absolute;bottom:32px;left:8px;z-index:10;background:rgba(255,255,255,.92);backdrop-filter:blur(6px);border:1px solid var(--border);border-radius:var(--rs);display:none;flex-direction:column;max-width:170px;box-shadow:var(--shadow);overflow:hidden}
.map-legend.show{display:flex}
.legend-toggle{display:flex;align-items:center;justify-content:space-between;padding:6px 10px;cursor:pointer;font:600 .6rem var(--f);color:var(--text2);background:var(--surface2);border:none;width:100%;text-align:left;gap:4px;user-select:none}
.legend-toggle:hover{background:var(--border)}
.legend-toggle-icon{transition:transform .2s;font-size:10px}
.legend-toggle-icon.open{transform:rotate(180deg)}
.legend-body{display:none;padding:6px 10px;flex-direction:column;gap:3px;max-height:200px;overflow-y:auto;scrollbar-width:thin}
.legend-body.open{display:flex}
.legend-title{font:600 .52rem var(--f);color:var(--text3);text-transform:uppercase;letter-spacing:.05em;margin-bottom:1px}
.legend-item{display:flex;align-items:center;gap:5px;font:400 .6rem var(--f);color:var(--text2)}
.legend-dot{width:7px;height:7px;border-radius:50%;flex-shrink:0}

/* Watermark logo */
.map-watermark{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);z-index:10;pointer-events:none;opacity:.12}
.map-watermark img{height:60px;width:auto}
/* Credit */
.map-credit{position:absolute;bottom:6px;right:6px;z-index:10;font:500 .6rem var(--f);color:rgba(30,21,48,.55);background:rgba(255,255,255,.85);backdrop-filter:blur(4px);padding:4px 12px;border-radius:8px;pointer-events:none;user-select:none;border:1px solid rgba(124,58,237,.15)}
.map-credit strong{font-weight:700;color:rgba(30,21,48,.75)}

/* Leaflet */
.leaflet-control-zoom a{background:var(--surface)!important;color:var(--text2)!important;border-color:var(--border)!important}
.leaflet-control-zoom a:hover{background:var(--surface2)!important}
.leaflet-interactive{cursor:pointer;transition:none;outline:none!important}
.leaflet-interactive:focus{outline:none!important}
path.leaflet-interactive:focus{outline:none!important}
.leaflet-container svg:focus{outline:none!important}
.leaflet-overlay-pane svg{outline:none!important}
.leaflet-container path{outline:none!important}
.leaflet-container path:focus{outline:none!important}
.leaflet-container *:focus{outline:none!important}

/* Popup elegante */
.pp-popup .leaflet-popup-content-wrapper{background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:0 8px 32px rgba(0,0,0,.12);padding:0;overflow:hidden}
.pp-popup .leaflet-popup-content{margin:0!important;width:100%!important}
.pp-popup .leaflet-popup-tip{background:var(--surface);border:1px solid var(--border)}
.pp-popup .leaflet-popup-close-button{top:8px!important;right:8px!important;color:var(--text4)!important;font-size:18px!important;width:24px!important;height:24px!important;display:flex!important;align-items:center;justify-content:center;background:var(--surface2);border-radius:6px}
.pp-popup .leaflet-popup-close-button:hover{color:var(--red)!important}

.pp-card{font-family:var(--f);width:100%}
.pp-header{padding:12px 14px;border-bottom:1px solid var(--border);background:var(--surface2)}
.pp-title{font:700 .88rem var(--f);color:var(--text);line-height:1.2}
.pp-subtitle{font:400 .6rem var(--f);color:var(--text3);margin-top:2px}
.pp-stats{display:flex;gap:1px;background:var(--border);padding:0}
.pp-stat{flex:1;background:var(--surface);padding:10px 8px;text-align:center}
.pp-stat-val{font:800 1rem var(--fm);color:var(--text);line-height:1}
.pp-stat-lbl{font:400 .48rem var(--f);color:var(--text4);text-transform:uppercase;letter-spacing:.05em;margin-top:3px}
.pp-avance{padding:8px 14px}
.pp-avance-bar{height:5px;background:var(--surface2);border-radius:10px;overflow:hidden;margin-bottom:4px}
.pp-avance-fill{height:100%;border-radius:10px;transition:width .5s}
.pp-avance-text{font:400 .55rem var(--f);color:var(--text3)}
.pp-section{padding:6px 14px 10px}
.pp-section-title{font:700 .6rem var(--f);color:var(--text3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:5px;padding-top:4px;border-top:1px solid var(--border)}
.pp-result-row{display:flex;align-items:center;gap:6px;padding:3px 0;font-size:.68rem}
.pp-result-row.pp-winner{font-weight:700}
.pp-partido{flex:1;color:var(--text);font-weight:600}
.pp-votos{font:500 .62rem var(--fm);color:var(--text2);min-width:36px;text-align:right}
.pp-pct{font:700 .62rem var(--fm);color:var(--text3);min-width:36px;text-align:right}
.pp-result-row.pp-winner .pp-pct{color:var(--green)}
.pp-total{font:500 .55rem var(--f);color:var(--text4);margin-top:4px;padding-top:4px;border-top:1px solid rgba(0,0,0,.04);text-align:right}
.pp-macro .pp-header{background:linear-gradient(135deg,var(--surface2),var(--surface))}

/* Recinto detail list */
.pp-recs{display:flex;flex-direction:column;gap:2px;max-height:160px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--p2) transparent}
.pp-recs::-webkit-scrollbar{width:3px}
.pp-recs::-webkit-scrollbar-thumb{background:var(--p2);border-radius:3px}
.pp-rec-row{display:flex;align-items:center;gap:5px;padding:4px 6px;background:var(--surface2);border-radius:4px;font-size:.6rem}
.pp-rec-estado{font-size:10px;flex-shrink:0;width:14px;text-align:center}
.pp-rec-name{flex:1;font:500 .58rem var(--f);color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.pp-rec-mesas{font:600 .55rem var(--fm);color:var(--p);white-space:nowrap;flex-shrink:0;background:var(--p3);padding:1px 5px;border-radius:3px}
.pp-rec-more{font:500 .55rem var(--f);color:var(--text4);text-align:center;padding:4px 0;font-style:italic}

.zona-tooltip,.macro-tooltip{font-family:var(--f)!important;font-size:.7rem!important;padding:5px 8px!important;border-radius:6px!important;box-shadow:0 3px 12px rgba(0,0,0,.12)!important}
.zona-tooltip{background:rgba(255,255,255,.95)!important;border:1px solid var(--p2)!important;color:var(--text)!important}
.macro-tooltip{background:rgba(255,255,255,.95)!important;border:1px solid var(--accent)!important;color:var(--text)!important}

/* ══════ MODAL ══════ */
.modal-overlay{display:none;position:fixed;inset:0;z-index:200;background:rgba(0,0,0,.4);backdrop-filter:blur(4px);align-items:center;justify-content:center}
.modal-overlay.open{display:flex}
.modal{background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow2);max-width:460px;width:88vw;max-height:65vh;display:flex;flex-direction:column;animation:mIn .25s ease}
@keyframes mIn{from{transform:translateY(20px) scale(.98);opacity:0}to{transform:none;opacity:1}}
.modal-head{padding:8px 10px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:6px;flex-shrink:0}
.modal-logo{height:24px;width:auto;flex-shrink:0}
.modal-head-info{flex:1;min-width:0}
.modal-title{font:700 .75rem var(--f);color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.modal-sub{font:400 .5rem var(--f);color:var(--text3)}
.modal-x{width:24px;height:24px;border:1px solid var(--border);border-radius:var(--rx);background:transparent;color:var(--text4);font-size:13px;cursor:pointer;flex-shrink:0;display:flex;align-items:center;justify-content:center;transition:var(--tr)}
.modal-x:hover{color:var(--red);border-color:var(--red)}
.modal-body{padding:8px 10px;overflow-y:auto;flex:1;min-height:0;scrollbar-width:thin;scrollbar-color:var(--p2) transparent}
.modal-body::-webkit-scrollbar{width:3px}
.modal-body::-webkit-scrollbar-thumb{background:var(--p2);border-radius:3px}
.modal-credit{flex-shrink:0;text-align:right;padding:3px 10px;font:400 .4rem var(--f);color:var(--text4);border-top:1px solid var(--border);opacity:.6}

/* Modal compact stats */
.m-stats{display:flex;gap:4px;margin-bottom:8px;flex-wrap:wrap}
.m-stat{flex:1;min-width:50px;background:var(--surface2);border:1px solid var(--border);border-radius:var(--rs);padding:5px 4px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:0}
.m-stat.winner{border-width:2px}
.m-stat-v{font:700 .72rem var(--fm);color:var(--text);line-height:1.1}
.m-stat-l{font:400 .42rem var(--f);color:var(--text4);text-transform:uppercase;letter-spacing:.03em}

/* Compact chart - names above bars for alignment */
.m-chart{display:flex;flex-direction:column;gap:5px;margin-bottom:8px}
.m-row{display:flex;flex-direction:column;gap:2px}
.m-row-top{display:flex;align-items:baseline;justify-content:space-between;gap:4px}
.m-sigla{display:flex;align-items:center;gap:5px;font:700 .65rem var(--f);color:var(--text);flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:55%}
.m-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;display:inline-block}
.m-row-nums{display:flex;gap:8px;align-items:baseline;flex-shrink:0}
.m-vnum{font:500 .58rem var(--f);color:var(--text3)}
.m-vnum small{font-size:.45rem;color:var(--text4);font-weight:400;letter-spacing:.02em}
.m-vpct{font:800 .68rem var(--fm);background:var(--surface2);padding:1px 6px;border-radius:4px;min-width:40px;text-align:center}
.m-bar-bg{width:100%;height:12px;background:var(--surface2);border-radius:4px;overflow:hidden}
.m-bar-fill{height:100%;border-radius:4px;transition:width .5s ease;min-width:2px}

/* Fotos */
.m-fotos-head{font:700 .72rem var(--f);color:var(--text);margin-bottom:6px;padding-top:8px;border-top:1px solid var(--border)}
.m-fotos{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:6px}
.m-foto{position:relative;border-radius:var(--rs);overflow:hidden;aspect-ratio:4/3;background:var(--surface2);border:1px solid var(--border);cursor:pointer;transition:var(--tr)}
.m-foto:hover{border-color:var(--p);box-shadow:0 4px 16px rgba(124,58,237,.12)}
.m-foto img{width:100%;height:100%;object-fit:cover;display:block}
.m-foto-fallback{width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:24px;color:var(--text4);background:var(--surface2)}
.m-foto-label{position:absolute;bottom:0;left:0;right:0;padding:3px 6px;background:linear-gradient(to top,rgba(0,0,0,.6),transparent);font:600 .52rem var(--f);color:#fff;text-align:center}

/* No data */
.no-data{text-align:center;padding:28px 16px;color:var(--text3)}
.no-data-icon{font-size:36px;margin-bottom:6px;opacity:.4}
.no-data-text{font:600 .82rem var(--f);margin-bottom:2px}
.no-data-sub{font:400 .68rem var(--f);color:var(--text4)}

/* ══════ LOADING ══════ */
.loader-overlay{display:none;position:fixed;inset:0;z-index:300;background:rgba(0,0,0,.5);backdrop-filter:blur(3px);align-items:center;justify-content:center;flex-direction:column;gap:12px}
.loader-overlay.show{display:flex}
.loader-ring{width:36px;height:36px;border:3px solid rgba(255,255,255,.2);border-top-color:var(--accent);border-radius:50%;animation:spin .7s linear infinite}
.loader-text{color:#fff;font:500 .75rem var(--f)}

/* ══════ TOAST ══════ */
.toast{position:fixed;bottom:16px;right:16px;z-index:400;background:var(--surface);border:1px solid var(--border);border-radius:var(--rs);padding:10px 14px;display:none;align-items:center;gap:8px;box-shadow:var(--shadow2);font:500 .72rem var(--f);color:var(--text);max-width:320px;animation:toastIn .25s ease}
.toast.show{display:flex}
.toast.success{border-left:3px solid var(--green)}
.toast.error{border-left:3px solid var(--red)}
.toast-icon{font-size:15px}
@keyframes toastIn{from{transform:translateY(16px);opacity:0}to{transform:none;opacity:1}}

/* ══════ RESPONSIVE ══════ */
@media(max-width:1024px){
  .panel{width:260px}
  .stat-chip{padding:2px 8px}
  .stat-num{font-size:.7rem}
}
@media(max-width:768px){
  .header{height:58px;padding:0 10px;gap:8px}
  .header-logo{height:44px}
  .header-sub{display:none}
  .header-title{font-size:.75rem}
  .stat-chip{padding:2px 5px}
  .stat-num{font-size:.62rem}
  .stat-label{display:none}
  .btn-refresh{width:30px;height:30px}
  .layout{height:calc(100vh - 58px);height:calc(100dvh - 58px)}
  .panel{position:absolute;left:-100%;top:0;bottom:0;width:82%;max-width:300px;z-index:20;transition:left .25s ease;box-shadow:6px 0 24px rgba(0,0,0,.15)}
  .panel.show{left:0}
  .mobile-bar{display:flex}
  .modal{width:92vw;max-height:60vh;border-radius:12px}
  .modal-head{padding:10px 12px;gap:8px}
  .modal-logo{height:26px}
  .modal-title{font-size:.78rem}
  .modal-body{padding:10px 12px}
  .m-stats{gap:4px}
  .m-stat{padding:6px 4px;min-width:55px}
  .m-stat-v{font-size:.72rem}
  .m-chart{gap:6px}
  .m-row{gap:1px}
  .m-sigla{font-size:.6rem}
  .m-dot{width:7px;height:7px}
  .m-bar-bg{height:14px}
  .m-vnum{font-size:.52rem}
  .m-vnum small{font-size:.4rem}
  .m-vpct{font-size:.6rem;padding:1px 5px;min-width:36px}
  .m-fotos{grid-template-columns:repeat(2,1fr);gap:5px}
  .map-watermark img{height:44px}
  .map-legend{bottom:28px;padding:6px 8px}
  .legend-item{font-size:.55rem}
  .map-credit{font-size:.48rem;padding:3px 8px;bottom:4px;right:4px;background:rgba(255,255,255,.7);border:none}
  .map-credit strong{font-weight:600}
  .toast{left:10px;right:10px;bottom:10px;max-width:none}
  .pp-popup .leaflet-popup-content-wrapper{max-width:85vw!important}
  .pp-popup{max-width:85vw!important}
  .pp-stat-val{font-size:.85rem}
  .pp-stat-lbl{font-size:.42rem}
  .pp-rec-row{padding:3px 5px}
  .pp-rec-name{font-size:.52rem}
  .pp-recs{max-height:120px}
}
@media(max-width:480px){
  .header{height:54px;padding:0 8px}
  .header-logo{height:40px}
  .header-stats{gap:3px}
  .layout{height:calc(100vh - 54px);height:calc(100dvh - 54px)}
  .modal{width:94vw;max-height:58vh;border-radius:10px;max-width:94vw}
  .modal-head{padding:6px 8px;gap:5px}
  .modal-logo{height:20px}
  .modal-title{font-size:.68rem}
  .modal-sub{font-size:.45rem}
  .modal-body{padding:6px 8px}
  .modal-credit{font-size:.35rem;padding:2px 8px}
  .m-stats{gap:2px}
  .m-stat{padding:3px 2px;min-width:40px;border-radius:5px}
  .m-stat-v{font-size:.58rem}
  .m-stat-l{font-size:.36rem}
  .m-chart{gap:3px}
  .m-sigla{font-size:.52rem}
  .m-dot{width:5px;height:5px}
  .m-bar-bg{height:8px}
  .m-vnum{font-size:.44rem}
  .m-vnum small{font-size:.34rem}
  .m-vpct{font-size:.48rem;padding:1px 3px;min-width:28px}
  .m-fotos{grid-template-columns:repeat(2,1fr);gap:4px}
  .m-fotos-head{font-size:.65rem}
  .mob-btn{width:36px;height:36px}
  .map-watermark img{height:36px}
  .panel-section{padding:8px 10px}
  .search-box input{padding:8px 8px 8px 26px;font-size:.75rem}
  .filter-select{padding:7px 24px 7px 8px;font-size:.7rem}
}
@media(max-width:375px){
  .header-stats{display:none}
  .header{height:50px}
  .header-logo{height:36px}
  .layout{height:calc(100vh - 50px);height:calc(100dvh - 50px)}
  .m-fotos{grid-template-columns:1fr 1fr}
}
@media(max-height:500px) and (orientation:landscape){
  .header{height:38px}
  .header-logo{height:26px}
  .layout{height:calc(100vh - 38px)}
  .modal{max-height:55vh}
  .modal-body{padding:8px}
  .m-stats{gap:3px}
}
@media(hover:none) and (pointer:coarse){
  .sr-item{padding:10px;min-height:44px}
  .mob-btn{min-width:44px;min-height:44px}
  .m-foto:hover{transform:none;box-shadow:none}
  .filter-select{min-height:40px}
}
