:root {
  color-scheme: light;
  --bg: #f4f4f1;
  --surface: #fcfcfb;
  --surface-2: #f0efec;
  --line: #e2e1dc;
  --line-strong: #cfcdc6;
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #7a7974;
  --accent: #2a78d6;
  --accent-ink: #1c5cab;
  --accent-soft: #e6f0fc;
  --good: #0ca30c;
  --good-ink: #006300;
  --critical: #d03b3b;
  --warning: #fab219;
  --serious: #ec835a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);
  --radius: 10px;
  /* категориальная палитра: агенты (соседние территории — разные цвета) и дни недели */
  --c0: #2a78d6; --c1: #eb6834; --c2: #1baf7a; --c3: #eda100;
  --c4: #e87ba4; --c5: #008300; --c6: #4a3aa7; --c7: #e34948;
  --font: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 var(--font);
  display: flex; flex-direction: column; min-height: 100vh; }
.muted { color: var(--muted); font-weight: 400; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); cursor: pointer;
  font-weight: 550; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-ink); }
.btn.icon { width: 34px; padding: 0; justify-content: center; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn.link { border: 0; background: none; padding: 0; height: auto; color: var(--accent-ink); }
.btn:focus-visible, .seg button:focus-visible, .tab-head button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 0 10px; height: 32px; cursor: pointer; color: var(--text-2); font-variant-numeric: tabular-nums; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--text); color: #fff; }

.menu { position: relative; }
.menu-list {
  position: absolute; z-index: 1200; top: 40px; left: 0; width: 280px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.menu-list button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 6px; background: none; cursor: pointer; text-align: left;
}
.menu-list button:hover { background: var(--surface-2); }
.menu-list span { color: var(--text-2); font-size: 12.5px; }
