GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Solar and storage design / globalgrid2050 / solar-bess-topology-v7/gis-sld-financial-sandbox

GIS Single-Line Diagram (SLD) V5 and 1 more file (part 1)

A style sheet in the GIS SLD financial sandbox folder of GlobalGrid2050 covering battery storage (BESS), solar, substations and wind. Served with the page at https://globalgrid2050.com/solar-bess-topology-v7/gis-sld-financial-sandbox/.

700 lines of CSS and JavaScript from globalgrid2050, in 2 files. Topic: Solar and storage design. Section 102 of 2044.

Cut 2026-12-06T03:07:51+00:00. A copy for reading; the repository at the stated commit is the source.

In the State lines below, domain stage, users and canonical status are rule-based first approximations from code and path evidence (rules explore-agent-rules-v1), not observed facts: the rules.

In this section

  1. GIS Single-Line Diagram (SLD) V5 UI electrical · globalgrid2050 / solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js lines 1401–1484
  2. GIS Single-Line Diagram (SLD) V5 electrical · globalgrid2050 / solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5.css lines 1–616

GIS Single-Line Diagram (SLD) V5 UI

A JavaScript file in GlobalGrid2050 covering Renewable Energy Planning Database (REPD) master and uses data from OpenStreetMap Nominatim. Served with the page at https://globalgrid2050.com/solar-bess-topology-v7/gis-sld-financial-sandbox/.

electricalglobalgrid2050 / solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js · lines 1401–1484 of 1484 (continued from section 100) · Entry point · pattern wireAtlasV8PipelineDropdownWithStatus (shared by 2 files)

What it does
It draws REPD master, grid 66kV, grid 132kV and grid 275kV. Defines 98 functions or classes, including switchTab, applyLogisticsPreset, autoFillBifacial, updateExportCableLengthDisplay, updateArrayRotationDisplay. Side effects: changes the web page (DOM); makes network requests.
Why it exists in the grid workflow
Domain stage experimental (path word 'sandbox'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: 400kV, 275kV, 132kV, 66kV.
Inputs & outputs
In: data source: OpenStreetMap Nominatim; JSON file repd_master.json; GeoJSON file grid_66kv.geojson; GeoJSON file grid_132kv.geojson; GeoJSON file grid_275kv.geojson; GeoJSON file grid_400kv.geojson; form fields (user input). Voltage levels named: 400kV, 275kV, 132kV, 66kV.
Downstream impact
Used directly by 3 files: Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v7/gis-sld-financial-sandbox/); Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (globalgrid2050, https://globalgrid2050.com/testcode/202609052011/layer-apps/solar-bess-topology-v7/gis-sld-financial-sandbox/); Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (testcode). Reached from 145 other entry points, including Iterations — 43 Registry Growth Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/43-registry-growth/); Iterations — 47 Federation Honesty Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/47-federation-honesty/); Demonstration Videos (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v7/docs/demonstration-videos.html). It is itself an entry point, published at https://globalgrid2050.com/solar-bess-topology-v7/gis-sld-financial-sandbox/.
What it achieves
It applies logistics preset (`applyLogisticsPreset`), updates export cable length display (`updateExportCableLengthDisplay`) and updates array rotation display (`updateArrayRotationDisplay`). Defines `switchTab`, `applyLogisticsPreset`, `autoFillBifacial` and 95 more. Its code works with 132 kV, 275 kV and 400 kV. It reads `/dist/repd_master.json`. It responds to click, focus and input events.
Why it matters
Loaded by the GIS Single-Line Diagram (SLD) Financial Sandbox page at https://globalgrid2050.com/solar-bess-topology-v7/gis-sld-financial-sandbox/ and 2 other pages.
Application
globalgrid2050 · solar-bess-topology-v7/gis-sld-financial-sandbox · script
Uses
none found
Used by
loaded by Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (script src), loaded by Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (script src), loaded by Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (script src), mentioned in Standalone (comment link)
Produces
switchTab, applyLogisticsPreset, autoFillBifacial, updateExportCableLengthDisplay, updateArrayRotationDisplay, rotateArrayBy, resetArrayRotation, getCurrentArrayCenter, getArrayNudgeStepKm, clearRouteAfterArrayShift, nudgeArray, updateCableRouteStatus
Defines here
fitContextMapForPrint, setSatelliteForPrintPack, prepareGisSldPrintReport
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5-ui.js:1401-1484 · blob 71064ce4f68b527515dcd3f09e6b9697ef26bef3 · GitHub at these lines
State
achieves: name · context: readme_derived · stage: output · effects: dom, network · domain stage: experimental · users: none · canonical: production_core
        if (!bbox || bbox.length !== 4 || bbox.some(v => !Number.isFinite(v))) return null;
        return [[bbox[0], bbox[1]], [bbox[2], bbox[3]]];
    } catch (err) {
        console.warn("Print pack bbox failed", err);
        return null;
    }
}

async function fitContextMapForPrint() {
    const bounds = getTopologyBoundsForPrintPack();
    if (bounds) {
        map.fitBounds(bounds, { padding: 90, duration: 0, maxZoom: 12 });
    } else {
        const currentZoom = map.getZoom();
        map.setZoom(Math.max(currentZoom - 4, 7));
    }
    await sleepForPrintPack(750);
}

async function setSatelliteForPrintPack(active) {
    if (!map) return;
    if (typeof state !== "undefined") state.satActive = !!active;
    setLayerVisibilityForPrintPack("l-sat", !!active);
    const btn = $("btn_basemap");
    if (btn) {
        btn.textContent = active ? "DARK MATTER VIEW" : "SATELLITE VIEW";
        btn.classList.toggle("active", !!active);
    }
    await sleepForPrintPack(500);
}

async function prepareGisSldPrintReport() {
    if (!map) {
        window.print();
        return;
    }

    const btn = $("btn_print_report");
    const oldText = btn ? btn.textContent : "";
    if (btn) btn.textContent = "PREPARING";

    const saved = getMapPrintState();
    const pack = ensurePrintMapPackContainer();

    try {
        document.body.classList.add("preparing-print-pack");
        document.body.classList.remove("map-expanded");
        document.querySelector(".panel-right")?.classList.remove("map-expanded");
        $("map_tool_overlay")?.classList.add("tools-collapsed");
        $("map_legend")?.classList.add("key-collapsed");

        // Page 1 map: current working view, but clean with user selected layers retained.
        map.resize();
        await sleepForPrintPack(600);
        const currentMap = await captureCurrentMapForPrint();
        addPrintMapFigure(pack, "Map Figure 1: Current Project View", currentMap, "Current GIS SLD project view. Interactive controls are removed from print output.");

        // Page 2 map: zoomed out context. Keep current basemap and layer settings.
        await fitContextMapForPrint();
        const contextMap = await captureCurrentMapForPrint();
        addPrintMapFigure(pack, "Map Figure 2: Wider Grid And Route Context", contextMap, "Zoomed out context view showing wider relationship between project, route assumptions and grid geography.");

        // Page 3 map: satellite view, clean and full page.
        await setSatelliteForPrintPack(true);
        await fitContextMapForPrint();
        const satelliteMap = await captureCurrentMapForPrint();
        addPrintMapFigure(pack, "Map Figure 3: Satellite Context View", satelliteMap, "Satellite context view for visual land, route and surrounding area review. Indicative only.", true);

        await restoreMapPrintState(saved);
        document.body.classList.remove("preparing-print-pack");
        if (btn) btn.textContent = oldText || "PRINT";
        window.print();
    } catch (err) {
        console.error("GIS SLD print pack failed", err);
        await restoreMapPrintState(saved);
        document.body.classList.remove("preparing-print-pack");
        if (btn) btn.textContent = oldText || "PRINT";
        window.print();
    }
}

// Clean map defaults after the map and controls have loaded.
// setTimeout(enforceCleanDefaultMapLayers, 1200); // disabled by simple safe print fix

GIS Single-Line Diagram (SLD) V5

A style sheet in the GIS SLD financial sandbox folder of GlobalGrid2050 covering battery storage (BESS), solar, substations and wind. Served with the page at https://globalgrid2050.com/solar-bess-topology-v7/gis-sld-financial-sandbox/.

electricalglobalgrid2050 / solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5.css · lines 1–616 of 1937 · Entry point

What it does
Side effects: changes the web page (DOM).
Why it exists in the grid workflow
Domain stage experimental (path word 'sandbox'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: battery storage (BESS), solar, substations, wind, 400kV, 275kV. README: "It remains close to the V5 GIS SLD app and still uses legacy `gis-sld-v5` file names inside the V7 folder."
Inputs & outputs
Voltage levels named: 400kV, 275kV, 132kV, 66kV.
Downstream impact
Used directly by 3 files: Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v7/gis-sld-financial-sandbox/); Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (globalgrid2050, https://globalgrid2050.com/testcode/202609052011/layer-apps/solar-bess-topology-v7/gis-sld-financial-sandbox/); Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (testcode). Reached from 145 other entry points, including Iterations — 43 Registry Growth Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/43-registry-growth/); Iterations — 47 Federation Honesty Page (galaxies-wafers, https://ventusltd.github.io/galaxies-wafers/iterations/47-federation-honesty/); Demonstration Videos (globalgrid2050, https://globalgrid2050.com/solar-bess-topology-v7/docs/demonstration-videos.html). It is itself an entry point, published at https://globalgrid2050.com/solar-bess-topology-v7/gis-sld-financial-sandbox/.
What it achieves
The README says: It remains close to the V5 GIS SLD app and still uses legacy `gis-sld-v5` file names inside the V7 folder.
Why it matters
Loaded by the GIS Single-Line Diagram (SLD) Financial Sandbox page at https://globalgrid2050.com/solar-bess-topology-v7/gis-sld-financial-sandbox/ and 2 other pages.
Application
globalgrid2050 · solar-bess-topology-v7/gis-sld-financial-sandbox · style sheet
Uses
none found
Used by
loaded by Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (stylesheet), loaded by Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (stylesheet), loaded by Solar Battery Energy Storage System (BESS) Topology V7 — GIS Single-Line Diagram (SLD) Financial Sandbox Page (stylesheet)
Produces
none declared
Defines here
none
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 solar-bess-topology-v7/gis-sld-financial-sandbox/gis-sld-v5.css:1-616 · blob 36ce2f996340b4091a4731d485cb5ff81aba65a6 · GitHub at these lines
State
achieves: readme · context: readme_derived · stage: output · effects: dom · domain stage: experimental · users: none · canonical: production_core
:root {
  /* Backgrounds & UI */
  --bg: #050505;
  --panel: rgba(10, 10, 10, 0.96);
  --line: #2f343d;
  
  /* Typography & Accents */
  --text: #ffffff;
  --muted: #a6adbb;
  --accent: #00ffff;
  --accent-alt: #ff9900;
  
  /* Status & Specific Elements */
  --ok: #00ff88;
  --substation: #ff3333;
  --private-sub: #00ff88;
  --inverter: #ffff00;
  --mv: #6633ff;
  --bess: #ff00aa;
  --array-blue: #0066ff;
  --warn: #ff4444;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 20px;
  background: var(--bg);
  color: var(--text);
  font-family: "Courier New", monospace;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

/* Layout */
.dashboard {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 1600px;
  height: 100%;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

.panel-left {
  width: 440px;
  padding: 20px 20px 80px 20px;
  flex-shrink: 0;
  overflow-y: auto;
  align-items: stretch;
}

.panel-right {
  flex: 1 1 auto;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 400px;
}

/* Typography */
h2 {
  margin: 0 0 10px 0;
  color: var(--text);
  font-size: 18px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

h3 {
  margin: 15px 0 5px 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  border-bottom: 1px dashed #333;
  padding-bottom: 3px;
}

/* Tabs */
.tab-container {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin-bottom: 15px;
}

.tab-btn {
  flex: 1;
  padding: 10px 5px;
  background: transparent;
  color: var(--muted);
  border: none;
  cursor: pointer;
  font-family: monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: 0.2s;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  font-weight: bold;
  background: rgba(0, 255, 255, 0.05);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Inputs & Forms */
.input-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}

.input-group input[type="text"], 
.input-group input[type="number"], 
.input-group select {
  width: 95px;
  background: #111;
  color: var(--accent);
  border: 1px solid #444;
  padding: 5px;
  text-align: right;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
}

.input-group input[type="text"] {
  text-align: left;
}

.input-group select {
  width: auto;
  min-width: 140px;
  text-align: left;
}

.tab-content#central_tab .input-group input[type="number"], 
.tab-content#central_tab .input-group select {
  color: var(--accent-alt);
}

.input-group input:focus, 
.input-group select:focus {
  border-color: var(--text);
  outline: none;
}

/* Hide native number input arrows while preserving numeric typing */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Search Box */
.search-box {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}

.search-box input {
  flex: 1;
  background: #111;
  color: #fff;
  border: 1px solid #444;
  padding: 8px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 12px;
}

.search-box button {
  background: #222;
  color: var(--text);
  border: 1px solid #555;
  padding: 8px 12px;
  border-radius: 3px;
  cursor: pointer;
  font-family: monospace;
  font-weight: bold;
}

.search-box button:hover {
  background: #444;
  color: #fff;
}

/* Stats */
.stat-box {
  background: rgba(0, 255, 255, 0.05);
  border: 1px solid var(--accent);
  padding: 12px;
  border-radius: 3px;
  margin-top: 15px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 6px;
  color: var(--muted);
}

.stat-val {
  color: var(--text);
  font-weight: bold;
  text-align: right;
}

.stat-val.cyan {
  color: var(--accent);
  font-size: 13px;
}

.stat-val.orange {
  color: var(--accent-alt);
  font-size: 13px;
}

/* Finance Elements */
.finance-box {
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid var(--ok);
  border-radius: 3px;
  padding: 10px;
  margin-top: 15px;
}

.finance-box summary {
  color: var(--ok);
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.finance-headline {
  border: 1px solid #264d3a;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(0, 255, 136, 0.04);
}

.finance-box input[type="number"] {
  width: 95px;
  background: #111;
  color: var(--ok);
  border: 1px solid #444;
  padding: 5px;
  text-align: right;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
}

.finance-box input[type="checkbox"] {
  accent-color: var(--ok);
  cursor: pointer;
  margin: 0;
}

/* Messages & Notes */
.warning-box {
  color: #ffcc00;
  font-size: 10px;
  margin-top: 8px;
  line-height: 1.4;
}

.ux-note {
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
  font-style: italic;
}

.benchmark-box {
  background: rgba(17, 17, 17, 0.8);
  border: 1px solid #444;
  border-radius: 3px;
  padding: 10px;
  margin-top: 15px;
}

.disclaimer-box {
  background: rgba(255, 68, 68, 0.05);
  border: 1px solid #ff4444;
  color: #ff9999;
  font-size: 10px;
  padding: 12px;
  border-radius: 3px;
  margin-top: 15px;
  line-height: 1.5;
  text-align: justify;
}

.explainer-box {
  background: rgba(0, 255, 255, 0.04);
  border: 1px solid var(--accent);
  color: var(--muted);
  font-size: 10px;
  padding: 12px 12px 28px 12px;
  border-radius: 3px;
  margin-top: 15px;
  line-height: 1.55;
  text-align: justify;
  flex: 0 0 auto;
  max-height: none;
  overflow: visible;
}

.explainer-box strong {
  color: var(--text);
}

.explainer-box h3 {
  color: var(--accent);
  margin-top: 0;
}

/* Buttons */
.btn {
  padding: 10px;
  background: #000;
  color: var(--text);
  border: 1px solid #555;
  cursor: pointer;
  font-family: monospace;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 3px;
  margin-top: 10px;
  width: 100%;
  transition: 0.2s;
}

.btn:hover {
  background: #222;
  color: #fff;
}

.btn.draw-btn {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

.btn.draw-btn.central {
  background: var(--accent-alt);
  border-color: var(--accent-alt);
}

.map-toggle-btn {
  background: rgba(5, 5, 5, 0.85);
  color: var(--muted);
  border: 1px solid #444;
  padding: 6px 12px;
  border-radius: 3px;
  font-family: monospace;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.map-toggle-btn:hover {
  background: #222;
  border-color: #888;
}

.map-toggle-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 255, 255, 0.05);
}

.map-controls {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.map-toggle-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.voltage-toggle-row .map-toggle-btn {
  font-size: 10px;
  padding: 5px 8px;
}

.atlas-voltage-btn:not(.active) {
  color: #777;
  border-color: #333;
  opacity: 0.65;
}

.atlas-66kv.active { border-color: #66ff66; color: #66ff66; }
.atlas-132kv.active { border-color: #ffcc00; color: #ffcc00; }
.atlas-275kv.active { border-color: #ff66ff; color: #ff66ff; }
.atlas-400kv.active { border-color: #ff3333; color: #ff3333; }
body.map-expanded { overflow: hidden; padding: 0; }
body.map-expanded .dashboard { max-width: none; width: 100vw; height: 100vh; }
body.map-expanded .panel-left { display: none; }
.panel-right.map-expanded { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 9999; border-radius: 0; border: none; }
.panel-right.map-expanded #map { min-height: 100vh; }
.legend.key-collapsed { display: none; }
@media (max-width: 900px) {
  .map-controls { left: 10px; right: 10px; align-items: flex-end; }
  .map-toggle-row { gap: 6px; }
  .map-toggle-btn { font-size: 10px; padding: 5px 7px; }
}
.map-tool-overlay {
  position: absolute;
  top: 110px;
  right: 10px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  max-width: 520px;
}

.map-tool-overlay.tools-collapsed .map-tool-row-secondary,
.map-tool-overlay.tools-collapsed button:not(#btn_map_tools_toggle) {
  display: none;
}

.map-tool-row-secondary .map-toggle-btn {
  font-size: 10px;
  padding: 5px 7px;
}

@media (max-width: 900px) {
  .map-tool-overlay {
    left: 10px;
    right: 10px;
    top: 118px;
    max-width: none;
  }
}
/* Map Elements */
#map {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

.crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 24px;
  pointer-events: none;
  z-index: 10;
  text-shadow: 0 0 5px #000;
}

.legend {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px;
  font-size: 10px;
  z-index: 1;
  border-radius: 4px;
  pointer-events: none;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.swatch {
  width: 12px;
  height: 12px;
  border: 1px solid #666;
}

/* Maplibre Popups */
.maplibregl-popup-content {
  background: #111;
  color: #fff;
  border: 1px solid #444;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  padding: 12px;
  font-size: 11px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.maplibregl-popup-close-button {
  color: #888;
  padding: 4px;
}

.maplibregl-popup-close-button:hover {
  color: #fff;
}

.popup-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  border-bottom: 1px solid #222;
  padding-bottom: 2px;
  gap: 15px;
}

.popup-val {
  font-weight: bold;
  color: var(--accent);
}

/* Status Indicator */
#fetch_status {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
  background: rgba(5, 5, 5, 0.9);
  border: 1px solid #555;
  padding: 6px 10px;
  border-radius: 3px;
  font-size: 10px;
  color: var(--muted);
  display: none;
}

#fetch_status.error {
  color: #ff6666;
  border-color: #ff4444;
  display: block;
}

/* Responsive Design */
@media (max-width: 800px) {
  html, body {
    height: auto;
  }
  
  body {
    overflow: auto;
    padding: 10px;
  }
  
  .dashboard {
    flex-direction: column;
    height: auto;
  }
  
  .panel-left {
    width: 100%;
    max-height: none;
    flex-shrink: 0;
    padding-bottom: 80px;
  }
  
  .panel-right {