/* base.css — the product's own operator theme (fixed dark, from spec/mvp/mockups). AC-15 colour rule:
   grey = norm, colour only for deviations, gold only on action buttons, a warning differs from an action
   by FORM (dashed border), not only by colour. Screen styles live in screens/<name>.css. */
:root {
  --bg: #0B1220; --panel: #121B2E; --panel-2: #18233A; --line: #25324A; --line-2: #3A4A66;
  --text: #E6EBF3; --muted: #93A0B6; --dim: #C9D3E3; --norm: #8FA1BC;
  --red: #F2555A; --red-line: #5A2A33; --amber: #F2A93B; --amber-line: #6B5427; --blue: #7AA2F7; --blue-line: #2B3E66;
  --gold: #F5B455; --gold-ink: #1A1206;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
       -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--dim); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.error { color: var(--red); }
.fatal { max-width: 560px; margin: 12vh auto; padding: 0 16px; color: var(--dim); }
.login-form form { display: flex; flex-direction: column; }
.login-form #login-submit { margin-top: 14px; }
.login-form .login-note { font-size: 11px; margin-top: 18px; }

.bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 15px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { padding: 6px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.tab.on { background: var(--panel-2); color: var(--text); }
.grow { flex: 1; }
.fresh { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12.5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--norm); }
.who { color: var(--muted); font-size: 12.5px; }
main#screen { padding: 14px 16px 40px; max-width: 1400px; margin: 0 auto; }

/* ---- left sidebar (W6, owner 24.09: «як у Claude Desktop»): open 248 px <-> rail 56 px, drawer on phones */
.app { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; container-type: inline-size; container-name: screen; }  /* grids follow the space the screen really has */
.sb { position: sticky; top: 0; height: 100vh; width: 248px; flex: none; display: flex; flex-direction: column;
  gap: 4px; padding: 10px 8px; box-sizing: border-box; background: var(--panel); border-right: 1px solid var(--line);
  overflow: hidden; transition: width .22s ease; z-index: 60; }
.sb-top { display: flex; align-items: center; gap: 10px; padding: 2px 2px 10px; }
.sb-toggle, .sb-burger { appearance: none; background: transparent; border: 0; color: var(--dim); cursor: pointer;
  border-radius: 8px; padding: 7px; display: inline-flex; align-items: center; gap: 8px; }
.sb-toggle:hover, .sb-burger:hover { background: var(--panel-2); color: var(--text); }
/* «Е-мережа» logo (W18, owner 10.10): a round disc on a transparent square PNG, one generator for every size —
   shown whole (contain), never cropped or squared; sizes unchanged. «Розробка: Solution Optimal» is a small line. */
.sb-mark { width: 30px; height: 30px; flex: none; display: block; object-fit: contain; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: .01em; }
.login-brand img { width: 56px; height: 56px; flex: none; object-fit: contain; }
.sb-brand { font-weight: 700; font-size: 14.5px; line-height: 1.15; white-space: nowrap; }
.sb-brand small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; color: var(--dim);
  text-decoration: none; white-space: nowrap; font-size: 14px; min-height: 36px; box-sizing: border-box; }
.sb-item:hover { background: var(--panel-2); color: var(--text); }
.sb-item.on { background: var(--panel-2); color: var(--text); }
.sb-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sb-foot { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.sb-foot .fresh { padding: 0 10px; white-space: nowrap; }
.sb-foot .who { padding: 0 10px; line-height: 1.35; white-space: normal; }
.sb-logout { width: 100%; justify-content: flex-start; border: 0; }
.sb-burger { display: none; margin: 8px 12px 0; font-size: 13px; }
.sb-scrim { display: none; }
html.sb-rail .sb { width: 56px; }
html.sb-rail .sb .sb-label { display: none; }
html.sb-rail .sb .sb-item, html.sb-rail .sb .sb-foot .fresh { justify-content: center; padding-left: 0; padding-right: 0; }
@media (max-width: 767px) {
  .sb { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-105%); transition: transform .22s ease; }
  html.sb-rail .sb { width: 272px; }
  html.sb-rail .sb .sb-label { display: revert; }
  html.sb-open .sb { transform: none; box-shadow: 8px 0 24px rgba(0, 0, 0, .4); }
  html.sb-open .sb-scrim { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 55; }
  .sb-burger { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) { .sb { transition: none; } }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.ph { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.ph h3 { margin: 0; font-size: 14px; font-weight: 600; }
.ph .hint { color: var(--muted); font-size: 12px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.tile .n { font-family: var(--mono); font-size: 26px; font-weight: 600; line-height: 1.1; color: var(--text); }
.tile .l { color: var(--muted); font-size: 12px; margin-top: 2px; }
.t-red { border-color: var(--red-line); } .t-red .n { color: var(--red); }
.t-amber { border-style: dashed; border-color: var(--amber-line); } .t-amber .n { color: var(--amber); }
.t-blue .n { color: var(--blue); }

/* tags: grey = norm; amber dashed = waiting (a warning); red = overdue/escalated; blue = at DTEK */
.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tag.g-amber { color: var(--amber); border: 1px dashed var(--amber-line); }
.tag.g-red { color: var(--red); border-color: var(--red-line); }
.tag.g-blue { color: var(--blue); border-color: var(--blue-line); }

/* buttons: gold = an action; everything else is quiet */
.btn { appearance: none; border: 0; border-radius: 10px; padding: 10px 16px; font: 600 14px/1.2 inherit; cursor: pointer;
       background: var(--gold); color: var(--gold-ink); min-height: 44px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-quiet { appearance: none; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 14px; font: 500 14px/1.2 inherit;
             background: transparent; color: var(--dim); cursor: pointer; min-height: 44px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; color: var(--muted); font-size: 13px; background: transparent; cursor: pointer; }
.chip.on { background: var(--panel-2); color: var(--text); border-color: var(--line-2); }

input, select, textarea { background: var(--panel-2); color: var(--text); border: 1px solid var(--line-2); border-radius: 8px;
                          padding: 9px 10px; font: inherit; width: 100%; }
label { display: block; color: var(--muted); font-size: 12.5px; margin: 10px 0 4px; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 14px; padding: 16px; max-width: 420px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0, 0, 0, .55); }

table.z { width: 100%; border-collapse: collapse; }
table.z th { text-align: right; color: var(--muted); font-weight: 500; font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.z th:first-child, table.z td:first-child { text-align: left; }
table.z td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--line); font-family: var(--mono); color: var(--norm); }
table.z tfoot td { color: var(--text); font-weight: 600; border-bottom: 0; }
td.c-red { color: var(--red); } td.c-amber { color: var(--amber); } td.c-blue { color: var(--blue); }

/* training mode (2026-09-24): the banner sits above everything; the tag sits before a request number.
   Colours do not matter here (owner): the words do. Hatched so it never reads as a status colour. */
.mode-banner { position: sticky; top: 0; z-index: 50; padding: 8px 16px; text-align: center;
  font-weight: 700; letter-spacing: .04em; color: var(--text); border-bottom: 1px solid var(--line-2);
  background: repeating-linear-gradient(135deg, var(--panel-2) 0 12px, var(--panel) 12px 24px); }
.test-tag { font-weight: 700; color: var(--text); white-space: nowrap; }
.dtek-test { font-weight: 700; padding: 6px 10px; border: 2px solid var(--text); display: inline-block; margin: 4px 0 8px; }

/* W15 item 2: a request several residents reported — marked in every UK row (number only, no names) */
.multi-reporters { background: color-mix(in srgb, var(--amber) 9%, transparent); }
.tag.reporters { margin-left: 6px; }
