:root {
  --bg: #efebe4;
  --panel: #fbf9f5;
  --panel-2: #f4f0e8;
  --border: #e3dcd0;
  --text: #2a241d;
  --muted: #8a7f72;
  --accent: #e2601f;
  --accent-soft: #f7d9c4;
  --red: #d03a1f;
  --yellow: #ffcf33;
  --radius: 8px;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 13px/1.4 Inter, system-ui, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.sm { font-size: 11.5px; }
.pad { padding: 12px 14px; }
.ic { width: 15px; height: 15px; flex: none; }
[hidden] { display: none !important; }

#app { display: grid; grid-template-rows: 50px 1fr; height: 100vh; }

/* ---------- Cabecera */
/* Sin overflow:hidden: recortaría los menús desplegables. La cabecera queda por encima del cuerpo. */
.topbar { position: relative; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--panel); border-bottom: 1px solid var(--border); white-space: nowrap; min-width: 0; }
.incident-btn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.menu { flex: none; }
.brand { display: flex; align-items: center; gap: 8px; }
.logo { width: 30px; height: 18px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand-sub { color: var(--muted); }
.vsep { width: 1px; height: 22px; background: var(--border); }
.incident-btn { display: flex; align-items: center; gap: 6px; border: 0; background: none; font-weight: 600; padding: 4px 6px; border-radius: 6px; }
.incident-btn:hover { background: var(--panel-2); }
.chev { width: 12px; height: 12px; }
.daterange { display: flex; align-items: center; gap: 6px; }
.modes { display: flex; gap: 4px; margin-left: 6px; }
.mode { display: flex; align-items: center; gap: 6px; border: 1px solid transparent; background: none; padding: 5px 10px; border-radius: 7px; color: var(--muted); font-weight: 500; }
.mode:hover { background: var(--panel-2); }
.mode.active { background: var(--panel-2); border-color: var(--border); color: var(--text); }
.badge { background: var(--accent); color: #fff; border-radius: 9px; font-size: 10.5px; font-weight: 600; padding: 0 6px; line-height: 16px; }
.spacer { flex: 1; }
.menu { position: relative; }
.menu-btn { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 8px; border-radius: 6px; }
.menu-btn:hover, .menu.open .menu-btn { background: var(--panel-2); }
.menu-pop { display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 50; min-width: 240px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(40, 30, 20, 0.15); padding: 4px; }
.menu-pop.right { left: auto; right: 0; }
.menu.open .menu-pop { display: block; }
.menu-pop button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 7px 10px; border-radius: 6px; }
.menu-pop button:hover { background: var(--panel-2); }

/* ---------- Disposición */
.body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 0; }
.left { display: grid; grid-template-rows: minmax(0, 1fr) 262px; min-height: 0; min-width: 0; }
.mapwrap { position: relative; min-height: 0; overflow: hidden; background: #d8d0c0; }
#map { position: absolute; inset: 0; }

.compass { position: absolute; top: 14px; left: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.08); background: rgba(251, 249, 245, 0.92); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); padding: 4px; }
.compass svg { width: 100%; height: 100%; overflow: visible; transition: transform 0.1s; }
.sim-badge { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); background: rgba(42, 36, 29, 0.72); color: #fff; padding: 4px 10px; border-radius: 12px; font-size: 11.5px; backdrop-filter: blur(4px); pointer-events: none; }
.map-ctrls { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 6px; }
.ctl { height: 30px; min-width: 34px; display: grid; place-items: center; background: rgba(251, 249, 245, 0.94); border: 1px solid var(--border); border-radius: 7px; font-weight: 600; padding: 0 8px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.ctl.active { background: var(--accent); color: #fff; border-color: var(--accent); }
select.ctl { appearance: auto; }
.toast { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 12.5px; max-width: 80%; overflow: hidden; text-overflow: ellipsis; }

.tip { position: absolute; top: 0; left: 0; pointer-events: none; background: rgba(32, 27, 22, 0.88); color: #f3eee6; border-radius: 7px; padding: 8px 10px; font-size: 12px; line-height: 1.5; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); min-width: 220px; z-index: 5; }
.tip .muted { color: #c7bcae; }
.tip-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #c7bcae; margin-right: 6px; vertical-align: -0.5px; }
.tip-dot.in { background: #ff8a3d; border-color: #ff8a3d; }
.tip-coord { font-family: ui-monospace, Consolas, monospace; color: #c7bcae; font-size: 11px; margin-top: 2px; }

/* ---------- Marcadores */
.place-label { color: #fff; font-weight: 600; font-size: 12px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 8px rgba(0, 0, 0, 0.5); pointer-events: none; white-space: nowrap; }
.place-label.peak { display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.2; }
.place-label.peak i { font-style: normal; font-size: 10px; }
.place-label.peak span { font-weight: 500; }
.ign-marker { position: relative; width: 22px; height: 22px; }
.ign-marker .flare { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; pointer-events: none; opacity: var(--flare, 0); background: radial-gradient(circle, rgba(255, 250, 220, 0.95) 0 6%, rgba(255, 200, 90, 0.55) 14%, rgba(255, 120, 30, 0.18) 36%, transparent 62%), repeating-conic-gradient(from 0deg, rgba(255, 220, 140, 0.35) 0 3deg, transparent 3deg 22deg); -webkit-mask: radial-gradient(circle, #000 25%, transparent 70%); mask: radial-gradient(circle, #000 25%, transparent 70%); animation: flare 6s linear infinite; mix-blend-mode: screen; }
@keyframes flare { from { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.08); } to { transform: rotate(360deg) scale(1); } }
.ign-marker .core { position: absolute; inset: 6px; border-radius: 50%; background: #ff4b1f; border: 2px solid #fff; box-shadow: 0 0 10px #ff5a1f; }
.ign-marker .pulse { position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(255, 120, 60, 0.85); animation: pulse 2s ease-out infinite; }
@keyframes pulse { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.ign-label { position: absolute; left: 26px; top: -4px; color: #fff; font-size: 12.5px; line-height: 1.25; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); white-space: nowrap; }
.time-marker { position: relative; width: 14px; height: 14px; pointer-events: none; }
.time-marker .ring { position: absolute; inset: 0; border-radius: 50%; border: 2.5px solid #ffcf33; background: rgba(255, 140, 30, 0.6); }
.time-marker.passed .ring { background: #ff8a1f; }
.tm-label { position: absolute; left: 18px; top: -4px; background: rgba(32, 27, 22, 0.82); color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }
.drone-marker { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.drone-icon { width: 26px; height: 26px; color: var(--c); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8)); }
.drone-icon svg { width: 100%; height: 100%; }
.drone-icon circle, .drone-icon path:not(:first-child) { fill: rgba(20, 20, 20, 0.55); stroke: var(--c); stroke-width: 1.4; }
.drone-label { font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(20, 20, 20, 0.7); padding: 0 5px; border-radius: 4px; margin-top: 1px; }
.evidence-marker { width: 24px; height: 24px; border-radius: 50%; background: #2a241d; color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; border: 2px solid #ffcf33; cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }

/* ---------- Panel inferior */
.bottom { display: grid; grid-template-columns: minmax(0, 1fr) 250px; background: var(--panel); border-top: 1px solid var(--border); min-height: 0; }
.bottom-main { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; }
.sec-title { font-weight: 600; font-size: 12.5px; }
.tl { padding: 10px 14px 4px; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; }
.tl-range { font-size: 11.5px; }
.tl-row { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.tl-ctrls { display: flex; align-items: center; gap: 5px; }
.icon-btn { width: 30px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--panel); border-radius: 6px; padding: 0; }
.icon-btn svg { width: 13px; height: 13px; }
.icon-btn:hover { background: var(--panel-2); }
.icon-btn.on { background: var(--text); color: #fff; border-color: var(--text); }
.sel-sm { height: 28px; border: 1px solid var(--border); background: var(--panel); border-radius: 6px; padding: 0 4px; }
.tl-track { position: relative; flex: 1; height: 58px; cursor: pointer; touch-action: none; user-select: none; }
.tl-evts { position: absolute; left: 0; right: 0; top: 10px; height: 14px; }
.tl-evt { position: absolute; width: 13px; height: 13px; transform: translateX(-50%); }
.tl-evt svg { width: 100%; height: 100%; display: block; }
.tl-bar { position: absolute; left: 0; right: 0; top: 27px; height: 4px; border-radius: 2px; background: #e8e1d5; }
.tl-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, #f3a35f, var(--red)); }
.tl-ticks { position: absolute; left: 0; right: 0; top: 34px; height: 24px; }
.tick { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); text-align: center; display: flex; flex-direction: column; line-height: 1.15; }
.tick b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); display: none; }
.tick.major { color: var(--text); }
.tick.major::before { content: ''; position: absolute; top: -9px; left: 50%; width: 1px; height: 7px; background: var(--muted); }
.tick.major i { font-weight: 600; }
.tick i { font-style: normal; }
.tick.major b { display: block; position: static; transform: none; order: 2; font-weight: 600; }
.tl-handle { position: absolute; top: 22px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3); }
.tl-bubble { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--text); color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; white-space: nowrap; }

.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); min-height: 0; }
.chart-card { display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 8px 10px 4px; border-right: 1px solid var(--border); min-width: 0; min-height: 0; }
.chart-card:last-child { border-right: 0; }
.chart-head { font-weight: 600; font-size: 12px; }
.chart-head .muted { font-weight: 400; }
.chart { position: relative; min-height: 0; overflow: hidden; }
.chart svg { display: block; position: absolute; inset: 0; }
.chart .grid { stroke: #ece6db; }
.chart .ylab { font-size: 10px; fill: var(--muted); text-anchor: end; }
.chart .xlab { font-size: 10px; fill: var(--muted); text-anchor: middle; }
.chart .fill-accent { fill: #f2a77c; opacity: 0.45; }
.chart .line-accent { fill: none; stroke: #d9692f; stroke-width: 1.8; }
.chart .line-future { fill: none; stroke: #d9a07f; stroke-width: 1.4; stroke-dasharray: 3 3; }
.chart .line-future.red { stroke: #e39a8d; }
.chart .line-red { fill: none; stroke: var(--red); stroke-width: 1.8; }
.chart .fill-terrain { fill: #a8ae97; opacity: 0.6; }
.chart .line-terrain { fill: none; stroke: #4f5a3e; stroke-width: 1.8; }
.chart .cursor { stroke: var(--text); stroke-width: 1; stroke-dasharray: 2 2; }
.chart .dot { fill: #fff; stroke: #d9692f; stroke-width: 2; }
.chart .dot.red { stroke: var(--red); }
.chart .val { font-size: 10.5px; font-weight: 600; fill: var(--text); }

.events { border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.events-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 6px; }
.btn-sm { border: 1px solid var(--border); background: var(--panel); border-radius: 6px; padding: 2px 8px; font-size: 11.5px; }
.btn-sm:hover { background: var(--panel-2); }
#evtForm { padding: 0 10px 6px; }
#evtInput { width: 100%; border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; background: #fff; }
#evtList { list-style: none; margin: 0; padding: 0 6px 8px; overflow: auto; }
#evtList li { display: grid; grid-template-columns: 16px 1fr auto; gap: 7px; align-items: center; padding: 6px 6px; border-radius: 6px; cursor: pointer; font-size: 12px; }
#evtList li:hover { background: var(--panel-2); }
#evtList li.active { background: #fbe7d9; box-shadow: inset 2px 0 0 var(--accent); }
#evtList li.future { color: var(--muted); }
#evtList .ei svg { width: 14px; height: 14px; display: block; }
#evtList .et { color: var(--muted); font-size: 11px; white-space: nowrap; }

/* ---------- Panel lateral */
.sidebar { display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--border); min-height: 0; }
.side-scroll { flex: 1; overflow: auto; min-height: 0; }
.tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.tabs button { border: 0; background: none; padding: 7px 10px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; }
.tabs button.active { color: var(--text); border-bottom-color: var(--text); }
#layerList { list-style: none; margin: 0; padding: 8px 10px; }
#layerList li { display: grid; grid-template-columns: minmax(0, 1fr) 70px 36px; align-items: center; gap: 8px; padding: 4px 2px; }
#layerList li.off .lyr-name, #layerList li.off .pct { color: var(--muted); }
#layerList li.off input[type=range] { opacity: 0.4; }
.lyr { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.lyr input { accent-color: var(--text); margin: 0; }
.sw { width: 22px; height: 16px; border-radius: 3px; flex: none; border: 1px solid rgba(0, 0, 0, 0.08); }
.lyr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
input[type=range] { width: 100%; accent-color: var(--text); height: 14px; }
.pct { text-align: right; font-size: 11.5px; color: var(--muted); }

.card { margin: 8px 10px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 10px 12px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; margin-bottom: 6px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0; font-size: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #c9a227; margin-right: 6px; }
.weather { margin-top: 0; flex: none; }
.wx { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 8px; }
.wx > div { display: grid; grid-template-columns: 20px 1fr; column-gap: 4px; align-items: center; }
.wx .wi { grid-row: span 3; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; align-self: start; margin-top: 2px; }
.wx b { font-size: 13.5px; }
.wx .sm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

textarea#notes { width: 100%; min-height: 260px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; resize: vertical; background: #fff; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.kpis > div { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; background: #fff; }
.kpis b { font-size: 16px; }
#analysis .sec-title, #panel-drones .sec-title, #panel-resources .sec-title { margin: 12px 0 6px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 70px; gap: 8px; align-items: center; font-size: 11.5px; margin: 3px 0; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; }
.bar-val { text-align: right; color: var(--muted); }

.evlist { list-style: none; margin: 0; padding: 0 10px 10px; }
.evlist li { display: flex; gap: 10px; padding: 8px; border-radius: var(--radius); cursor: pointer; }
.evlist li:hover { background: var(--panel-2); }
.evlist li div { display: flex; flex-direction: column; }
.evn { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #2a241d; color: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; border: 2px solid #ffcf33; }

.drone-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 10px; margin-bottom: 8px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.drone-card.following { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.dc-head { display: flex; align-items: center; gap: 7px; }
.dc-head .btn-sm { margin-left: auto; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dc-stats { display: flex; gap: 12px; font-size: 11.5px; margin-top: 4px; }
.batt { height: 4px; border-radius: 2px; background: var(--panel-2); overflow: hidden; margin-top: 4px; }
.batt i { display: block; height: 100%; background: #6aa84f; }
table.det, table.res { width: 100%; border-collapse: collapse; font-size: 11.5px; }
table.det td, table.res td, table.res th { padding: 5px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.res th { text-align: right; color: var(--muted); font-weight: 500; }
table.res td span { display: block; }
table.det tr[data-lng] { cursor: pointer; }
table.det tr[data-lng]:hover { background: var(--panel-2); }
.num { text-align: right; white-space: nowrap; }

/* ---------- Cargador */
#loader { position: fixed; inset: 0; background: var(--bg); display: grid; place-items: center; z-index: 100; transition: opacity 0.5s; }
#loader.done { opacity: 0; pointer-events: none; }
.loader-box { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 300px; }
.logo.big { width: 64px; height: 38px; }
.loader-title { font-size: 22px; font-weight: 700; }
.loader-stage { color: var(--muted); min-height: 1.4em; text-align: center; }
#loader.error .loader-stage { color: var(--red); }
.loader-track { width: 100%; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.loader-track i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s; }

.maplibregl-ctrl-attrib { font-size: 10.5px; }

@media (max-width: 1400px) { .hide-lg { display: none; } }
@media (max-width: 1250px) { .menu-btn .lbl { display: none; } }
@media (max-width: 1150px) { .hide-md { display: none; } .bottom { grid-template-columns: minmax(0, 1fr) 210px; } }
@media (max-width: 900px) {
  #app { height: auto; min-height: 100vh; }
  .modes .mode { padding: 5px 7px; }
  .brand-name { display: none; }
  .body { grid-template-columns: 1fr; }
  .left { grid-template-rows: 60vh auto; }
  .bottom { grid-template-columns: 1fr; }
  .charts { grid-template-columns: 1fr; }
  .chart-card { height: 150px; border-right: 0; border-bottom: 1px solid var(--border); }
  .events { border-left: 0; border-top: 1px solid var(--border); }
  .sidebar { border-left: 0; border-top: 1px solid var(--border); }
}

/* ---------- Flota y recursos propios */
.sec-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 8px; }
.chk { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.chk input { accent-color: var(--text); margin: 0; }
.btn-wide { width: 100%; border: 1px dashed #cfc6b8; background: transparent; border-radius: var(--radius); padding: 7px; color: var(--text); font-weight: 500; margin: 2px 0 6px; }
.btn-wide:hover { background: var(--panel-2); border-style: solid; }
.btn-primary { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 6px; padding: 4px 12px; font-weight: 600; font-size: 12px; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-icon { border: 0; background: none; color: var(--muted); padding: 2px 5px; border-radius: 5px; font-size: 12px; line-height: 1; }
.btn-icon:hover { background: #f3e2d8; color: var(--red); }
.dc-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.dc-head .dc-actions .btn-sm { margin-left: 0; }
.fleet-form { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 10px; margin: 2px 0 10px; display: flex; flex-direction: column; gap: 8px; }
.fleet-form label { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
.fleet-form input, .fleet-form select { border: 1px solid var(--border); border-radius: 6px; padding: 5px 7px; background: #fff; color: var(--text); font-size: 12.5px; min-width: 0; }
.fleet-form p { margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 6px; }
table.res td:last-child { width: 1%; }

.pick-hint { position: absolute; top: 48px; left: 0; right: 0; margin: 0 auto; width: fit-content; z-index: 6; display: flex; align-items: center; gap: 10px; background: rgba(32, 27, 22, 0.92); color: #fff; padding: 7px 8px 7px 14px; border-radius: 10px; font-size: 12.5px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); max-width: calc(100% - 32px); }
.pick-hint .pick-count { color: #ffcf33; font-weight: 600; white-space: nowrap; }
.pick-hint button { border: 0; border-radius: 6px; padding: 4px 10px; font-weight: 600; font-size: 12px; background: #fff; color: var(--text); }
.pick-hint button[data-pick="cancel"] { background: transparent; color: #f0e6da; border: 1px solid rgba(255, 255, 255, 0.35); }

/* ---------- Recursos visibles en el mapa */
.place-label.base i { font-style: normal; margin-right: 2px; }
.res-marker { display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.res-icon { width: 30px; height: 30px; color: var(--c); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85)); }
.res-icon svg { width: 100%; height: 100%; fill: var(--c); stroke: rgba(20, 15, 10, 0.75); stroke-width: 1; }
.res-icon .rotor { fill: none; stroke: var(--c); stroke-width: 2.2; stroke-linecap: round; }
.res-marker.ground .res-icon { width: 26px; height: 26px; background: rgba(32, 27, 22, 0.78); border-radius: 50%; padding: 3px; border: 1.5px solid var(--c); }
.res-marker.ground.done { opacity: 0.55; }
.res-label { font-size: 10.5px; font-weight: 700; color: #fff; background: rgba(20, 20, 20, 0.72); padding: 0 5px; border-radius: 4px; margin-top: 1px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Efectividad y planes */
.res-row { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 8px 10px; margin-bottom: 6px; display: flex; flex-direction: column; gap: 2px; }
.res-row.off { background: var(--panel-2); }
.res-row.off b { color: var(--muted); }
.rr-head { display: flex; align-items: center; gap: 6px; }
.rr-contrib { display: grid; grid-template-columns: 70px 1fr; gap: 8px; align-items: center; margin-top: 3px; font-size: 11.5px; }
.rr-contrib > span.muted { grid-column: 1 / -1; }
.contrib { height: 7px; border-radius: 4px; background: var(--panel-2); overflow: hidden; }
.contrib i { display: block; height: 100%; background: #4a9d5b; border-radius: 4px; }
.kpis b.good { color: #3c8a4d; }
.eval-bar { height: 4px; border-radius: 2px; background: var(--panel-2); overflow: hidden; margin: 2px 0 4px; }
.eval-bar i { display: block; height: 100%; background: var(--accent); transition: width 0.2s; }
.plan-save { display: flex; gap: 6px; margin: 8px 0 10px; }
.plan-save input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; background: #fff; }
.plans-wrap { overflow-x: auto; }
table.plans { width: 100%; border-collapse: collapse; font-size: 11.5px; }
table.plans th { text-align: right; color: var(--muted); font-weight: 500; padding: 4px; white-space: nowrap; }
table.plans th:first-child { text-align: left; }
table.plans td { padding: 6px 4px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; vertical-align: top; }
table.plans td:first-child { text-align: left; white-space: normal; }
table.plans td span { display: block; }
table.plans td.best { color: #2f7a40; font-weight: 700; background: #eaf5ec; }
table.plans tr.current td { background: #fbf1e9; }
table.plans tr.ref td { color: var(--muted); }
table.plans .btn-sm { margin-right: 2px; }
.chart .line-none { fill: none; stroke: #8a7f72; stroke-width: 1.3; stroke-dasharray: 4 3; }
.chart .none-lab { font-size: 10px; fill: #8a7f72; text-anchor: end; }

/* ---------- Laboratorio: condiciones y optimizador */
.ign-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ign-row > span { display: flex; flex-direction: column; font-size: 12px; }
.ign-row b { font-family: ui-monospace, Consolas, monospace; font-weight: 500; font-size: 11.5px; }
.fleet-form label.slider { gap: 2px; }
.fleet-form label.slider > span { display: flex; justify-content: space-between; color: var(--text); font-size: 12px; }
.fleet-form label.slider b { font-weight: 600; }
.fleet-form label.slider input { padding: 0; border: 0; }
.fleet-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt-result { border: 1px solid #bfe0c6; background: #f3faf4; border-radius: var(--radius); padding: 10px; margin-bottom: 10px; }
.opt-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.opt-head .good { color: #2f7a40; font-weight: 700; }
.opt-result ol { margin: 8px 0; padding-left: 18px; font-size: 12px; }
.opt-result li { margin-bottom: 5px; }
.opt-result li span { display: block; }
.io-row { display: flex; gap: 6px; }
.file-btn { cursor: pointer; display: inline-flex; align-items: center; }

.perf-info { border-top: 1px solid var(--border); margin-top: 4px; padding: 8px 10px 6px; font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.perf-info b { color: var(--text); font-weight: 600; }
.perf-info .warn { color: var(--red); font-style: normal; }

/* ---------- Caso real */
.menu-pop.align-left { right: auto; left: 0; }
.incident-menu .menu-btn { font-weight: 600; }
.chart .line-obs { fill: none; stroke: #c0392b; stroke-width: 1.8; stroke-dasharray: 1 2.5; stroke-linecap: round; }
.chart .obs-lab { font-size: 10px; fill: #c0392b; }
table.plans.val td:first-child { white-space: nowrap; }
