/* Layout: barra lateral fija + área de trabajo; cada vista es una pantalla del portal. */
:root{
  --bg:#F5F7F6; --surface:#FFFFFF; --surface-2:#EEF2F0; --line:#DCE3DF;
  --fg:#16211C; --muted:#5E6B65; --accent:#00A959; --accent-ink:#007A40; --accent-soft:#E2F4EA;
  --good:#118A4B; --good-soft:#DDF2E6; --bad:#C93838; --bad-soft:#FBE3E3; --warn:#B86E00;
  --c-act:#D64545; --c-des:#8E5BD6; --c-det:#E08A1E; --c-mec:#6B7C8F; --c-gps:#2F7FD1; --c-sin:#1AA6A0;
  --side:#0F2A1D; --side-fg:#CFE3D7; --side-active:#00A959;
  --map-land:#F4F7F5; --map-stroke:#B3C3BA; --map-water:#D9E7E3; --map-other:#E5EBE8; --road-1:#D9A441; --road-2:#C5CEC9; --city:#3E4E46;
  --f-display:"Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-body:"Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-mono:"IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r:10px;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){
  --bg:#0E1512; --surface:#151F1A; --surface-2:#1B2721; --line:#283730;
  --fg:#E4EEE8; --muted:#94A69D; --accent:#22C474; --accent-ink:#5ED99A; --accent-soft:#16332A;
  --good:#3DCB7E; --good-soft:#163526; --bad:#F06B6B; --bad-soft:#3A1C1C; --warn:#E5A23A;
  --c-act:#F06B6B; --c-des:#A98AF0; --c-det:#EFA54A; --c-mec:#93A3B5; --c-gps:#5FA2EC; --c-sin:#3CC7C0;
  --side:#0A1410; --side-fg:#B7CFC1; --side-active:#22C474;
  --map-land:#1C2823; --map-stroke:#3A4C43; --map-water:#0C1613; --map-other:#141D19; --road-1:#A98236; --road-2:#33433C; --city:#B7C9BF; color-scheme:dark; } }
:root[data-theme="dark"]{
  --bg:#0E1512; --surface:#151F1A; --surface-2:#1B2721; --line:#283730;
  --fg:#E4EEE8; --muted:#94A69D; --accent:#22C474; --accent-ink:#5ED99A; --accent-soft:#16332A;
  --good:#3DCB7E; --good-soft:#163526; --bad:#F06B6B; --bad-soft:#3A1C1C; --warn:#E5A23A;
  --c-act:#F06B6B; --c-des:#A98AF0; --c-det:#EFA54A; --c-mec:#93A3B5; --c-gps:#5FA2EC; --c-sin:#3CC7C0;
  --side:#0A1410; --side-fg:#B7CFC1; --side-active:#22C474;
  --map-land:#1C2823; --map-stroke:#3A4C43; --map-water:#0C1613; --map-other:#141D19; --road-1:#A98236; --road-2:#33433C; --city:#B7C9BF; color-scheme:dark; }

*{box-sizing:border-box}
html,body{height:100%}
body{background:radial-gradient(55% 45% at 85% 0%, rgba(0,169,89,.07), transparent 70%),radial-gradient(40% 40% at 0% 100%, rgba(0,169,89,.05), transparent 70%),var(--bg);background-attachment:fixed;color:var(--fg);font-family:var(--f-body);font-size:14px;line-height:1.45;font-variant-numeric:tabular-nums}
button,select,input{font:inherit;color:inherit}
.app{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100%}
aside{background:var(--side);color:var(--side-fg);padding-block:22px;padding-left:max(18px, env(safe-area-inset-left,0px));padding-right:18px;display:flex;flex-direction:column;gap:22px}
.brand{display:flex;flex-direction:column;gap:2px}
.brand b{font-family:var(--f-display);font-stretch:85%;font-weight:800;font-size:21px;letter-spacing:.01em;color:#fff}
.brand b i{font-style:normal;color:var(--side-active)}
.brand>span:last-child{font-size:11px;letter-spacing:.14em;text-transform:uppercase;opacity:.75}
.brand .logo{display:block;padding:2px 0}
.brand .logo img{display:block;width:100%;height:auto}
nav{display:flex;flex-direction:column;gap:2px}
nav a{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:8px;color:var(--side-fg);text-decoration:none;font-weight:500}
nav a:hover{background:rgba(255,255,255,.06)}
nav a.on{background:rgba(0,169,89,.18);color:#fff;box-shadow:inset 3px 0 0 var(--side-active)}
nav a svg{width:17px;height:17px;flex:none}
.side-foot{margin-top:auto;font-size:12px;opacity:.8;display:flex;flex-direction:column;gap:6px}
.side-foot .sched{font-family:var(--f-mono);font-size:11px;line-height:1.6}
main{min-width:0;display:flex;flex-direction:column}
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:5;background:var(--surface);border-bottom:1px solid var(--line);display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px;padding-block:12px;padding-left:24px;padding-right:max(24px, env(safe-area-inset-right,0px))}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--surface)}
.top h1{font-family:var(--f-display);font-stretch:88%;font-size:20px;margin:0;font-weight:700;text-wrap:balance}
.top .spacer{flex:1}
.pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:600;background:var(--surface-2);color:var(--muted);white-space:nowrap}
.pill.demo{background:#FFF1D6;color:#8A5300}
:root[data-theme="dark"] .pill.demo{background:#3A2C10;color:#F3C77A}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .pill.demo{background:#3A2C10;color:#F3C77A} }
.pill.live::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent)}
.who{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:13px;min-width:0;max-width:100%}
.who select{max-width:100%;background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:5px 8px}
.content{padding-block:22px 40px;padding-left:24px;padding-right:max(24px, env(safe-area-inset-right,0px));display:flex;flex-direction:column;gap:18px}
.filters{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:end;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:12px 14px}
.filters label{display:flex;flex-direction:column;gap:4px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600}
.filters select{min-width:170px;max-width:100%;text-transform:none;letter-spacing:0;font-size:14px;font-weight:500;color:var(--fg);background:var(--surface-2);border:1px solid var(--line);border-radius:8px;padding:7px 9px}
.btn{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:7px 12px;font-weight:600;cursor:pointer}
.btn:hover{border-color:var(--accent)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn svg{width:15px;height:15px}
.btn:focus-visible,select:focus-visible,input:focus-visible,nav a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.grid{display:grid;gap:14px}
.kpis{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:13px 14px;display:flex;flex-direction:column;gap:4px;min-width:0}
.kpi .k{font-size:12px;color:var(--muted);font-weight:600;display:flex;align-items:center;gap:7px}
.kpi .k i{width:9px;height:9px;border-radius:2px;flex:none}
.kpi .v{font-family:var(--f-display);font-stretch:85%;font-size:28px;font-weight:700;line-height:1.1}
.kpi .s{font-size:12px;color:var(--muted)}
.kpi.big{border-color:var(--accent);background:linear-gradient(0deg,var(--accent-soft),var(--surface) 70%)}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;min-width:0;display:flex;flex-direction:column;gap:10px}
.panel h2{margin:0;font-family:var(--f-display);font-stretch:88%;font-size:16px;font-weight:700;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.panel h2 .sub{font-family:var(--f-body);font-size:12px;font-weight:500;color:var(--muted)}
.panel h2 .right{margin-left:auto;display:flex;gap:8px;align-items:center}
.two{grid-template-columns:repeat(auto-fit,minmax(min(100%,600px),1fr))}
.three{grid-template-columns:repeat(auto-fit,minmax(min(100%,380px),1fr))}
.wide-left{grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)}
.tbl-wrap{overflow:auto;max-height:340px;border:1px solid var(--line);border-radius:8px}
table{width:100%;border-collapse:collapse;font-size:13px}
th{position:sticky;top:0;background:var(--surface-2);text-align:left;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:700;padding:8px 10px;white-space:nowrap}
td{padding:7px 10px;border-top:1px solid var(--line);white-space:nowrap}
td.n,th.n{text-align:right}
td.name{white-space:normal;min-width:120px}
tr.low td{color:var(--muted)}
tr.low td.name::after{content:"pocos viajes";margin-left:8px;font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:1px 6px;border-radius:4px;background:var(--surface-2);color:var(--muted)}
tr.noop td.name::after{content:"sin captura";margin-left:8px;font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;padding:1px 6px;border-radius:4px;background:#FFF1D6;color:#8A5300}
.ratio{display:inline-block;min-width:64px;text-align:right;padding:2px 7px;border-radius:5px;font-weight:700}
.ratio.bad{background:var(--bad-soft);color:var(--bad)}
.ratio.good{background:var(--good-soft);color:var(--good)}
.bar{position:relative;height:6px;background:var(--surface-2);border-radius:3px;min-width:44px}
.bar{overflow:hidden}
.bar>span{position:absolute;inset:0 auto 0 0;border-radius:3px}
.slider{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);font-weight:600}
.slider input{width:110px;accent-color:var(--accent)}
.slider output{font-family:var(--f-mono);color:var(--fg);min-width:22px}
.check{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--good);background:var(--good-soft);border-radius:8px;padding:7px 11px;font-weight:600}
.check svg{width:16px;height:16px;flex:none}
.note{font-size:12.5px;color:var(--muted)}
.legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12.5px}
.legend span{display:flex;align-items:center;gap:6px}
.legend i{width:10px;height:10px;border-radius:2px}
.donut-row{display:flex;gap:18px;align-items:center;flex-wrap:wrap}
.donut-row svg{width:230px;max-width:100%;height:auto;flex:none}
.donut-row .legend{flex-direction:column;flex:1;min-width:180px}
.donut-row .legend span b{margin-left:auto;font-weight:700}
.chart svg{width:100%;height:auto;display:block}
.chart text{fill:var(--muted);font-size:11px;font-family:var(--f-body)}
.map-wrap{position:relative;background:var(--surface-2);border-radius:8px;overflow:hidden}
.map-wrap svg,.map-wrap canvas{display:block;width:100%;height:auto}
.map-wrap canvas{position:absolute;inset:0;pointer-events:none}
.map-wrap #pts{position:absolute;inset:0}
.map-tip{position:absolute;pointer-events:none;background:var(--surface);border:1px solid var(--line);border-radius:7px;padding:6px 9px;font-size:12px;box-shadow:0 4px 14px rgba(0,0,0,.12);white-space:nowrap}
.layers{display:flex;flex-wrap:wrap;gap:8px}
.layers label{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:999px;padding:5px 11px;font-size:13px;font-weight:600;cursor:pointer;background:var(--surface)}
.layers input{accent-color:var(--accent)}
.layers i{width:10px;height:10px;border-radius:50%}
.heat-scale{height:8px;border-radius:4px;background:linear-gradient(90deg,#2f6fd1,#3cd17a,#f2a33a,#e03b3b);width:160px}
.toast{position:fixed;right:max(18px, env(safe-area-inset-right,0px));bottom:calc(18px + env(safe-area-inset-bottom,0px));background:var(--fg);color:var(--bg);padding:11px 15px;border-radius:9px;font-size:13px;max-width:min(380px,calc(100vw - 36px));box-shadow:0 8px 24px rgba(0,0,0,.25);z-index:20}
.steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.step{border:1px solid var(--line);border-radius:9px;padding:12px;background:var(--surface);display:flex;flex-direction:column;gap:4px}
.step b{font-family:var(--f-display);font-stretch:88%;font-size:15px}
.step span{font-size:12.5px;color:var(--muted)}
.step em{font-style:normal;font-family:var(--f-mono);font-size:11px;color:var(--accent-ink)}
.tag{display:inline-block;padding:1px 7px;border-radius:4px;font-size:11px;font-weight:700;background:var(--surface-2);color:var(--muted)}
.tag.ok{background:var(--good-soft);color:var(--good)}
.tag.bad{background:var(--bad-soft);color:var(--bad)}
.login{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px}
.login-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:22px;display:flex;flex-direction:column;gap:12px;max-width:380px}
.login-card input{border:1px solid var(--line);background:var(--surface-2);border-radius:8px;padding:9px 10px;width:100%}
.login-card label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:600;color:var(--muted)}
@media (max-width:980px){ .wide-left,.login{grid-template-columns:minmax(0,1fr)} }
@media (max-width:760px){
  .app{grid-template-columns:minmax(0,1fr)}
  aside{padding-block:12px;padding-right:max(16px, env(safe-area-inset-right,0px));padding-left:max(16px, env(safe-area-inset-left,0px));gap:10px}
  nav{flex-direction:row;overflow-x:auto}
  nav a{white-space:nowrap}
  .side-foot{display:none}
  .top,.content{padding-left:max(16px, env(safe-area-inset-left,0px));padding-right:max(16px, env(safe-area-inset-right,0px))}
  .filters select{min-width:0;width:100%}
  .filters label{flex:1 1 140px}
}

/* Gráficas: entrada animada y brillo al pasar el cursor */
@keyframes aparecer{from{opacity:0;transform:translateY(6px)}}
@keyframes graf-crece-y{from{transform:scaleY(0)}}
@keyframes graf-crece-x{from{transform:scaleX(0)}}
@keyframes graf-dona{from{opacity:0;transform:rotate(-90deg) scale(.75)}}
@keyframes graf-surge{from{opacity:0;transform:translateY(5px)}}
@keyframes graf-reflejo{to{transform:translateX(120%)}}
.graf-y{transform-box:fill-box;transform-origin:50% 100%;animation:graf-crece-y .75s cubic-bezier(.2,.8,.2,1) both}
.graf-x{transform-origin:0 50%;animation:graf-crece-x .85s cubic-bezier(.2,.8,.2,1) both}
.graf-dona{transform-box:view-box;transform-origin:115px 115px;animation:graf-dona .9s cubic-bezier(.2,.8,.2,1) both}
.graf-surge{animation:graf-surge .45s ease-out both}
.graf-marca{transition:opacity .2s, filter .2s, transform .25s cubic-bezier(.2,.8,.2,1)}
.graf-activa{filter:brightness(1.12) drop-shadow(0 0 6px color-mix(in srgb, var(--graf-c, var(--accent)) 55%, transparent))}
.graf-brillo{position:relative;overflow:hidden}
.graf-brillo::after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(100deg,transparent 35%,rgba(255,255,255,.4) 50%,transparent 65%);transform:translateX(-120%);animation:graf-reflejo 1.1s ease-out .9s both}
.kpi{transition:transform .3s, box-shadow .3s, border-color .3s;animation:aparecer .35s ease-out both}
.kpi:hover{transform:translateY(-2px);border-color:color-mix(in srgb, var(--accent) 35%, var(--line));box-shadow:0 10px 26px rgba(0,0,0,.10),0 0 22px rgba(0,169,89,.12)}
.panel{animation:aparecer .35s ease-out both}
tbody tr{transition:background-color .15s}
tbody tr:hover td{background:color-mix(in srgb, var(--accent) 6%, transparent)}
tbody tr:hover .bar>span{filter:brightness(1.12) drop-shadow(0 0 5px color-mix(in srgb, var(--graf-c, var(--accent)) 60%, transparent))}
.chart{position:relative}
.chart .mb{cursor:pointer}
.chart-tip{position:absolute;z-index:6;pointer-events:none;transform:translate(-50%,calc(-100% - 10px));background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:7px 10px;font-size:12px;box-shadow:0 14px 40px rgba(0,0,0,.16),0 0 0 1px rgba(0,169,89,.10);white-space:nowrap;animation:aparecer .2s ease-out both;display:flex;flex-direction:column;gap:2px}
.chart-tip b{font-weight:700}
.chart-tip span{display:flex;align-items:center;gap:6px;color:var(--muted)}
.chart-tip span i{width:9px;height:9px;border-radius:2px}
.chart-tip span em{font-style:normal;margin-left:auto;padding-left:14px;color:var(--fg);font-weight:700}
.dona .seg{cursor:pointer}
.legend span{transition:opacity .2s, background-color .2s;border-radius:5px;padding:2px 5px;margin:0 -5px;cursor:default}
.legend span i{transition:transform .2s, box-shadow .2s}
.legend span.dim{opacity:.4}
.legend span.on{background:var(--surface-2)}
.legend span.on i{transform:scale(1.25);box-shadow:0 0 8px var(--graf-c)}
.map-wrap canvas{animation:aparecer .6s ease-out both}

/* Leaflet (estilos de la librería) */
/* required styles */

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-user-select: none;
	}

.leaflet-pane         { z-index: 400; }

.leaflet-tile-pane    { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane  { z-index: 500; }
.leaflet-marker-pane  { z-index: 600; }
.leaflet-tooltip-pane   { z-index: 650; }
.leaflet-popup-pane   { z-index: 700; }

.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg    { z-index: 200; }

.leaflet-vml-shape {
	width: 1px;
	height: 1px;
	}
.lvml {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}
.leaflet-top,
.leaflet-bottom {
	position: absolute;
	z-index: 1000;
	pointer-events: none;
	}
.leaflet-top {
	top: 0;
	}
.leaflet-right {
	right: 0;
	}
.leaflet-bottom {
	bottom: 0;
	}
.leaflet-left {
	left: 0;
	}
.leaflet-control {
	float: left;
	clear: both;
	}
.leaflet-right .leaflet-control {
	float: right;
	}
.leaflet-top .leaflet-control {
	margin-top: 10px;
	}
.leaflet-bottom .leaflet-control {
	margin-bottom: 10px;
	}
.leaflet-left .leaflet-control {
	margin-left: 10px;
	}
.leaflet-right .leaflet-control {
	margin-right: 10px;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(images/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(images/layers-2x.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(images/marker-icon.png);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
	-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;
	-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;
	-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;
	transition: transform 0.3s ease-out, opacity 0.3s ease-in;
}

.leaflet-cluster-spider-leg {
	/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */
	-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;
	-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;
	-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;
	transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;
}
.marker-cluster-small {
	background-color: rgba(181, 226, 140, 0.6);
	}
.marker-cluster-small div {
	background-color: rgba(110, 204, 57, 0.6);
	}

.marker-cluster-medium {
	background-color: rgba(241, 211, 87, 0.6);
	}
.marker-cluster-medium div {
	background-color: rgba(240, 194, 12, 0.6);
	}

.marker-cluster-large {
	background-color: rgba(253, 156, 115, 0.6);
	}
.marker-cluster-large div {
	background-color: rgba(241, 128, 23, 0.6);
	}

	/* IE 6-8 fallback colors */
.leaflet-oldie .marker-cluster-small {
	background-color: rgb(181, 226, 140);
	}
.leaflet-oldie .marker-cluster-small div {
	background-color: rgb(110, 204, 57);
	}

.leaflet-oldie .marker-cluster-medium {
	background-color: rgb(241, 211, 87);
	}
.leaflet-oldie .marker-cluster-medium div {
	background-color: rgb(240, 194, 12);
	}

.leaflet-oldie .marker-cluster-large {
	background-color: rgb(253, 156, 115);
	}
.leaflet-oldie .marker-cluster-large div {
	background-color: rgb(241, 128, 23);
}

.marker-cluster {
	background-clip: padding-box;
	border-radius: 20px;
	}
.marker-cluster div {
	width: 30px;
	height: 30px;
	margin-left: 5px;
	margin-top: 5px;

	text-align: center;
	border-radius: 15px;
	font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
	}
.marker-cluster span {
	line-height: 30px;
	}
/* Mapa: igual que el mapa de riesgo de AssistCargo */
#lmap{height:min(72vh,680px);min-height:440px;border-radius:10px;border:1px solid var(--line);background:var(--map-water);font-family:var(--f-body);z-index:0}
#lmap .leaflet-control-layers{background:var(--surface)!important;border:1px solid var(--line)!important;border-radius:14px!important;box-shadow:0 10px 30px -8px rgba(16,40,28,.3)!important;padding:0!important;overflow:hidden;min-width:230px;color:var(--fg)!important}
#lmap .leaflet-control-layers::before{content:"CAPAS DEL MAPA";display:block;font-size:12px;letter-spacing:.8px;font-weight:700;color:#fff;padding:11px 14px 10px;background:var(--accent)}
#lmap .leaflet-control-layers-toggle{display:none!important}
#lmap .leaflet-control-layers-expanded{padding:0!important}
#lmap .leaflet-control-layers-list{padding:8px 8px 10px!important;margin:0!important;display:flex;flex-direction:column;gap:4px}
#lmap .leaflet-control-layers-separator,#lmap .leaflet-control-layers-base{display:none!important}
#lmap .leaflet-control-layers-overlays{display:flex;flex-direction:column;gap:4px}
#lmap .leaflet-control-layers label{--c:var(--accent);display:flex!important;align-items:center;gap:10px;margin:0!important;padding:7px 10px;border-radius:9px;border:1px solid transparent;cursor:pointer;font-size:13px!important;color:var(--fg)!important;transition:background .15s,border-color .15s}
#lmap .leaflet-control-layers label>span,#lmap .leaflet-control-layers label>div{display:flex!important;align-items:center;gap:10px;flex:1;min-width:0}
#lmap .leaflet-control-layers label:hover{background:var(--surface-2)}
#lmap .leaflet-control-layers label:has(input:checked){background:color-mix(in srgb,var(--c) 10%,var(--surface));border-color:color-mix(in srgb,var(--c) 32%,var(--surface))}
#lmap .leaflet-control-layers-overlays input[type="checkbox"]{-webkit-appearance:none;appearance:none;width:32px;height:18px;border-radius:20px;background:var(--line);position:relative;cursor:pointer;margin:0!important;flex-shrink:0;transition:background .2s}
#lmap .leaflet-control-layers-overlays input[type="checkbox"]::before{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .2s}
#lmap .leaflet-control-layers-overlays input[type="checkbox"]:checked{background:var(--c)}
#lmap .leaflet-control-layers-overlays input[type="checkbox"]:checked::before{transform:translateX(14px)}
#lmap .leaflet-bar{border:1px solid var(--line)!important;border-radius:10px;overflow:hidden;box-shadow:0 4px 14px rgba(0,0,0,.12)}
#lmap .leaflet-bar a{background:var(--surface);color:var(--fg);border-bottom-color:var(--line)}
#lmap .leaflet-bar a:hover{background:var(--surface-2)}
#lmap .leaflet-popup-content-wrapper,#lmap .leaflet-popup-tip{background:var(--surface);color:var(--fg)}
#lmap .leaflet-popup-content-wrapper{border-radius:12px;box-shadow:0 12px 30px -8px rgba(16,40,28,.35)}
#lmap .leaflet-popup-content{font-size:13px;line-height:1.5}
#lmap .leaflet-tooltip{background:var(--surface);color:var(--fg);border-color:var(--line)}
#lmap .leaflet-control-scale-line{background:color-mix(in srgb,var(--surface) 80%,transparent);color:var(--fg);border-color:var(--muted)}
#lmap .leaflet-control-attribution{background:color-mix(in srgb,var(--surface) 75%,transparent);color:var(--muted)}
#lmap .leaflet-control-attribution a{color:var(--muted)}
.city-lbl{font-size:11px;font-weight:600;color:var(--city);white-space:nowrap;text-shadow:0 0 3px var(--map-land),0 0 3px var(--map-land),0 0 2px var(--map-land);pointer-events:none}
.city-lbl::before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;background:var(--city);margin-right:4px;vertical-align:1px}
.city-lbl.big{font-size:12.5px;font-weight:700}
.reset-btn{font-size:15px;line-height:30px;text-align:center;font-weight:700}
@media (prefers-reduced-motion: reduce){*{transition:none!important;animation:none!important}}
