
























:root {
  --bg: #0e0f11;
  --surface: #16181b;
  --surface-2: #1d2024;
  --surface-3: #292d33;
  --border: #2a2d32;
  --border-strong: #3a3e45;
  --text: #e3e5e8;
  --text-2: #c2c6cc;
  --muted: #8b9197;
  --grid: #23262a;

  --accent: #6aa3f5;
  --green: #3fb068;
  --red: #f0625c;
  --yellow: #d4a72c;
  --success: var(--green);
  --danger: var(--red);
  --warning: var(--yellow);

  --brand: #106020;
  --brand-text: #4caf64;
  --brand-tint: rgba(76, 175, 100, .13);



  --card: var(--surface);
  --fg: var(--text);

  --chart-grid: var(--grid);
  --chart-tick: var(--muted);
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Consolas, monospace;
  --radius: 3px;


  --gutter: 16px;



  --page-max: 1440px;
  --menu-shadow: 0 8px 24px rgba(0, 0, 0, .5);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f2f4;
  --surface-3: #e3e6ea;
  --border: #e1e4e8;
  --border-strong: #cfd4da;
  --text: #1b1f27;
  --text-2: #3d4450;
  --muted: #5b6472;
  --grid: #eceef1;

  --accent: #1f5fbf;
  --green: #1a7f37;
  --red: #c62828;
  --yellow: #9a6700;

  --brand-text: #106020;
  --brand-tint: #e8f2ea;
  --menu-shadow: 0 8px 24px rgba(20, 24, 31, .12);

  color-scheme: light;
}




body { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand-text); outline-offset: 1px; }
::selection { background: var(--brand-tint); }
html { scrollbar-color: var(--border-strong) transparent; }





body > footer {
  text-align: left;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  padding: 12px var(--page-pad);
  margin-top: 24px;
  border-top: 1px solid var(--border);
}
body > footer p { display: inline; margin: 0; font-size: 11px; }
body > footer p::before { content: "\00b7"; margin: 0 6px; }
body > footer a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
body > footer a:hover { color: var(--text); }












body { --page-pad: max(var(--gutter), calc((100% - var(--page-max)) / 2 + var(--gutter))); }
body.page-wide { --page-max: 100%; }
body > main:not(.reading) {
  box-sizing: border-box;
  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;
}
@media (min-width: 769px) {
  body > main:not(.reading) { padding-left: var(--gutter); padding-right: var(--gutter); }
}





body.ui2 { background: var(--bg); color: var(--text); }


body.ui2 .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: none;
}
body.ui2 .card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 10px;
}

body.ui2 .unit { color: var(--muted); font-weight: 400; margin-left: 4px; }

body.ui2 .title-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
body.ui2 .tools { display: flex; align-items: center; gap: 2px; margin-left: auto; }


body.ui2 .icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; padding: 0;
  background: none; border: 0; border-radius: var(--radius);
  color: var(--muted); cursor: pointer;
}
body.ui2 .icon-btn:hover { color: var(--text); background: var(--surface-2); }
body.ui2 .icon-btn svg { width: 14px; height: 14px; display: block; }


body.ui2 .btn, body.ui2 #jumpToday {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 10px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font: inherit; font-size: 12.5px; font-weight: 400; line-height: 1;
  cursor: pointer; white-space: nowrap;
}
body.ui2 .btn:hover, body.ui2 #jumpToday:hover { background: var(--surface-2); opacity: 1; }


body.ui2 .btn.btn-primary, body.ui2 .btn-primary {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 12px;
  background: var(--brand); color: #fff;
  border: 1px solid var(--brand); border-radius: var(--radius);
  font: inherit; font-size: 12.5px; font-weight: 500; line-height: 1;
  cursor: pointer; white-space: nowrap;
}
body.ui2 .btn-primary:hover { background: var(--brand); filter: brightness(1.12); }
body.ui2 .btn-primary:disabled { opacity: .55; cursor: wait; filter: none; }


body.ui2 input[type="date"], body.ui2 input[type="month"], body.ui2 input[type="number"], body.ui2 input[type="text"], body.ui2 select {
  height: 26px;
  padding: 0 6px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font: inherit;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
body.ui2 .card-title select, body.ui2 .card-title input { font-weight: 400; }


body.ui2 select[multiple], body.ui2 select[size] { height: auto; padding: 4px; }
body.ui2 input[type="date"]::-webkit-calendar-picker-indicator, body.ui2 input[type="month"]::-webkit-calendar-picker-indicator { opacity: .6; }
[data-theme="light"] body.ui2 input[type="date"]::-webkit-calendar-picker-indicator, [data-theme="light"] body.ui2 input[type="month"]::-webkit-calendar-picker-indicator { filter: none; }


body.ui2 .view-toggle { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; }
body.ui2 .view-toggle button {
  height: 26px; padding: 0 12px; margin: 0;
  background: var(--surface); color: var(--text-2);
  border: 0; border-radius: 0;
  font: inherit; font-size: 12.5px; font-weight: 400; cursor: pointer;
}
body.ui2 .view-toggle button + button { border-left: 1px solid var(--border-strong); }
body.ui2 .view-toggle button:hover { color: var(--text); }
body.ui2 .view-toggle button.active { background: var(--surface-3); color: var(--text); font-weight: 500; border-color: var(--border-strong); }


body.ui2 .zone-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 8px;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font: inherit; font-size: 12px; line-height: 1; white-space: nowrap; cursor: pointer;
  transition: none;
}
body.ui2 .zone-btn:hover { color: var(--text); }
body.ui2 .zone-btn.active { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
body.ui2 .zone-btn .zb-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
body.ui2 .zone-btn:not(.active) .zb-dot { opacity: .3; }


body.ui2 .status-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
body.ui2 .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: none; }
body.ui2 .status-dot.error { background: var(--red); }
body.ui2 .status-dot.info { background: var(--accent); }


body.ui2 .loading { color: var(--muted); font-size: 12px; min-height: 60px; height: auto; gap: 0; }
body.ui2 .spinner { display: none; }




body.ui2 .stat-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; box-shadow: none; }
body.ui2 .stat-tile .label { font-size: 12px; color: var(--muted); text-transform: none; letter-spacing: 0; }
body.ui2 .stat-tile .value { font-size: 22px; font-weight: 600; line-height: 1.2; margin-top: 3px; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -0.2px; }
body.ui2 .stat-tile .unit { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 3px; }
body.ui2 .stat-tile .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
body.ui2 .stat-strip { gap: 0 !important; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
body.ui2 .stat-strip > .stat-tile { border: 0; border-radius: 0; box-shadow: 1px 0 0 var(--grid), 0 1px 0 var(--grid); }


body.ui2 .card-subtitle { font-size: 12px; color: var(--muted); margin: -6px 0 10px; }
body.ui2 .chart-legend { gap: 6px 16px; margin-bottom: 8px; }
body.ui2 .legend-item { font-size: 12px; color: var(--muted); }


body.ui2 table.dt { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
body.ui2 .dt th { font-size: 11.5px; font-weight: 500; color: var(--muted); text-align: right; padding: 4px 6px 5px; border-bottom: 1px solid var(--border); white-space: nowrap; text-transform: none; letter-spacing: 0; }
body.ui2 .dt td { padding: 4px 6px; text-align: right; border-bottom: 1px solid var(--grid); white-space: nowrap; }
body.ui2 .dt th:first-child, body.ui2 .dt td:first-child { text-align: left; }
body.ui2 .dt tbody tr:last-child td { border-bottom: 0; }
body.ui2 .dt tbody tr:hover td { background: var(--surface-2); }





body.ui2 .leaflet-tooltip {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--menu-shadow); padding: 6px 8px;
  font: 12px/1.4 var(--font-sans);
}
body.ui2 .leaflet-tooltip-top:before { border-top-color: var(--border-strong); }
body.ui2 .leaflet-tooltip-bottom:before { border-bottom-color: var(--border-strong); }
body.ui2 .leaflet-tooltip-left:before { border-left-color: var(--border-strong); }
body.ui2 .leaflet-tooltip-right:before { border-right-color: var(--border-strong); }
body.ui2 .leaflet-popup-content-wrapper, body.ui2 .leaflet-popup-tip {
  background: var(--surface); color: var(--text); box-shadow: var(--menu-shadow);
}
body.ui2 .leaflet-popup-content-wrapper { border: 1px solid var(--border-strong); border-radius: var(--radius); }
body.ui2 .leaflet-popup-content { margin: 10px 12px; font: 12.5px/1.45 var(--font-sans); }
body.ui2 .leaflet-container a.leaflet-popup-close-button { color: var(--muted); }
body.ui2 .leaflet-bar { border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: none; }
body.ui2 .leaflet-bar a { background: var(--surface); color: var(--text); border-bottom-color: var(--border); }
body.ui2 .leaflet-bar a:hover { background: var(--surface-2); color: var(--text); }
body.ui2 .leaflet-bar a.leaflet-disabled { background: var(--surface); color: var(--muted); }
body.ui2 .leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); }
body.ui2 .leaflet-control-attribution a { color: var(--muted); }

@media (max-width: 768px) {


  body.ui2 input[type="date"], body.ui2 input[type="month"], body.ui2 input[type="number"], body.ui2 input[type="text"], body.ui2 select { font-size: 16px; height: 32px; }
  body.ui2 .card { padding: 10px 12px; }
  body.ui2 .view-toggle button, body.ui2 .zone-btn, body.ui2 #jumpToday { min-height: 32px; }
  body.ui2 .icon-btn { width: 32px; height: 32px; }
}
