/* Панель мониторинга ПСС v2 — стили по макету (pss-monitoring-references-v2).
   Токены — из render-references.py макета; размеры — логические пиксели
   холста 1440 px (они же CSS px). Тема одна — тёмная, как в макете.
   Компоненты описаны в docs/PANEL-V2.md; экраны собираются только из них. */

:root {
  color-scheme: dark;
  --bg: #0e141b;       --nav: #101922;     --panel: #151f29;   --inset: #111a23;
  --raised: #1a2633;   --border: #2a3847;  --sub: #213140;
  --text: #edf4fa;     --soft: #c2cedb;    --muted: #a1afbf;
  --blue: #84b9ff;     --blbg: #182f4d;
  --teal: #65dfbf;     --tebg: #153a35;
  --good: #78dfac;     --gobg: #16352d;
  --red: #ff9f9f;      --rebg: #3b2630;
  --amber: #ffd18c;    --ambg: #352c22;
  --gray: #bcc9d7;     --grbg: #283340;
  --violet: #c5b4ff;   --vibg: #2b2847;
  --font: "Segoe UI", system-ui, -apple-system, "Roboto", "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "Cascadia Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --nav-w: 215px; --top-h: 66px; --gutter: 32px; --content-max: 1161px;
  --r-card: 12px; --r-btn: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 400 14px/1.4 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); } .soft { color: var(--soft); }
.t-blue { color: var(--blue); } .t-teal { color: var(--teal); } .t-good { color: var(--good); }
.t-red { color: var(--red); } .t-amber { color: var(--amber); } .t-violet { color: var(--violet); }
.t-gray { color: var(--gray); } .t-muted { color: var(--muted); } .t-text { color: var(--text); }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
svg.i { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 14px; height: 14px; } svg.i.lg { width: 20px; height: 20px; }

/* ——— оболочка: меню слева, шапка, содержимое ——— */
.shell { display: grid; grid-template-columns: var(--nav-w) 1fr; min-height: 100vh; }
.side {
  background: var(--nav); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; height: var(--top-h); padding: 0 19px; border-bottom: 1px solid var(--border); }
.brand .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--blbg); border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--blue); }
.brand .logo svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.brand b { display: block; font-size: 18px; font-weight: 700; line-height: 1.1; letter-spacing: .01em; }
.brand small { display: block; font-size: 9px; font-weight: 600; color: var(--muted); letter-spacing: .04em; margin-top: 3px; }
.nav { padding: 18px 12px 0; flex: 1; overflow-y: auto; }
.nav h6 { margin: 8px 8px 10px; font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.nav hr { border: none; border-top: 1px solid var(--border); margin: 14px 8px 18px; }
.nav a {
  display: flex; align-items: center; gap: 12px; height: 37px; padding: 0 11px; margin-bottom: 7px;
  border-radius: 7px; color: var(--soft); font-size: 15px; position: relative; text-decoration: none;
}
.nav a:hover { background: var(--raised); }
.nav a .i { color: var(--muted); }
.nav a.on { background: var(--blbg); color: var(--blue); font-weight: 600; }
.nav a.on::before { content: ""; position: absolute; left: 0; top: 7px; width: 3px; height: 23px; border-radius: 2px; background: var(--blue); }
.nav a.on .i { color: var(--blue); }
.nav a .badge { margin-left: auto; }
.side-foot { border-top: 1px solid var(--border); margin: 0 20px; padding: 16px 0 22px; display: flex; gap: 10px; }
.side-foot b { display: block; font-size: 12px; font-weight: 600; color: var(--soft); }
.side-foot small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  height: var(--top-h); border-bottom: 1px solid var(--border); display: flex; align-items: center;
  padding: 0 22px 0 var(--gutter); gap: 14px; position: sticky; top: 0; background: var(--bg); z-index: 20;
}
.crumbs { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--soft); text-decoration: none; }
.crumbs .sep { width: 14px; height: 14px; color: var(--muted); }
.crumbs .cur { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.crumbs .mid { color: var(--soft); font-weight: 600; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.top-right .divider { width: 1px; height: 30px; background: var(--border); }
.usermenu { position: relative; }
.usermenu > button {
  display: flex; align-items: center; gap: 10px; background: none; border: none; cursor: pointer; padding: 6px 4px; color: var(--soft);
}
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--blbg); color: var(--blue); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.avatar.xl { width: 62px; height: 62px; font-size: 22px; }
.usermenu .who { font-size: 14px; font-weight: 600; text-align: left; line-height: 1.15; }
.usermenu .who small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.45); z-index: 30;
}
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 7px; background: none; border: none;
  color: var(--soft); font-size: 14px; cursor: pointer; text-align: left; text-decoration: none;
}
.menu a:hover, .menu button:hover { background: var(--raised); }
.burger { display: none; background: none; border: none; color: var(--soft); cursor: pointer; padding: 6px; }
.content { padding: 21px var(--gutter) 0; width: 100%; max-width: calc(var(--content-max) + 2 * var(--gutter)); }
.foot {
  margin: 34px 0 0; border-top: 1px solid var(--border); padding: 14px 0 18px; display: flex; justify-content: space-between; gap: 12px;
  font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase;
}
.foot span:last-child { font-size: 12px; }

/* ——— заголовок страницы ——— */
.ph { display: flex; gap: 24px; align-items: flex-start; }
.ph-main { min-width: 0; flex: 1; }
.eyebrow { font-size: 11px; font-weight: 600; color: var(--blue); letter-spacing: .04em; text-transform: uppercase; margin: 0 0 6px; }
.ph h1 { font-size: 33px; font-weight: 700; line-height: 1.06; margin: 0; letter-spacing: -.005em; overflow-wrap: anywhere; }
.ph .desc { font-size: 15px; color: var(--muted); margin: 8px 0 0; }
.ph-side { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; padding-top: 30px; }
.ph-side .stamp { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.ph-tags { display: flex; gap: 6px; margin-right: 18px; }

/* ——— вкладки ——— */
.tabs { display: flex; gap: 29px; border-bottom: 1px solid var(--border); margin: 6px 0 24px; overflow-x: auto; scrollbar-width: none; }
.tabs a { position: relative; padding: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--soft); }
.tabs a.on { color: var(--blue); }
.tabs a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 1px; background: var(--blue); }

/* ——— сетки ——— */
.grid { display: grid; gap: 11px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.g2-wide { grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr); gap: 24px; }
.g-main-aside { grid-template-columns: minmax(0, 1fr) 325px; gap: 24px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.sp { flex: 1; }
.mt-s { margin-top: 10px; } .mt-m { margin-top: 18px; } .mt-l { margin-top: 26px; }

/* ——— карточки ——— */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); padding: 17px 17px 18px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-h h2 { font-size: 19px; font-weight: 600; margin: 0; line-height: 1.25; }
.card-h .sub { font-size: 13px; color: var(--muted); margin-top: 5px; }
.card-h .right { margin-left: auto; font-size: 18px; font-weight: 600; white-space: nowrap; }
.card-h .right.ctl { font-size: 14px; font-weight: 400; white-space: normal; }
.section-h { display: flex; align-items: center; gap: 10px; margin: 28px 0 14px; flex-wrap: wrap; }
.section-h h2 { font-size: 23px; font-weight: 600; margin: 0; }
.inset { background: var(--inset); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; }

/* KPI: подпись, крупное значение с единицей, пояснение, значок справа */
.kpi { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); padding: 11px 16px 9px; min-height: 91px; min-width: 0; }
.kpi .l { font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.2; padding-right: 34px; }
.kpi .v { font-size: 29px; font-weight: 600; line-height: 1.08; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.kpi .s { font-size: 12px; line-height: 1.3; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.stale .v { color: var(--muted); }
.kpi .ic { position: absolute; top: 13px; right: 15px; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; }
.kpi .ic svg { width: 14px; height: 14px; }
.ic-blue { background: var(--blbg); color: var(--blue); } .ic-teal { background: var(--tebg); color: var(--teal); }
.ic-good { background: var(--gobg); color: var(--good); } .ic-red { background: var(--rebg); color: var(--red); }
.ic-amber { background: var(--ambg); color: var(--amber); } .ic-violet { background: var(--vibg); color: var(--violet); }

/* ——— пилюли, значки ——— */
.pill { display: inline-flex; align-items: center; gap: 7px; height: 25px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.sm { height: 24px; font-size: 12px; padding: 0 10px; }
.pill.lg { height: 30px; padding: 0 14px; font-size: 14px; border-radius: 15px; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-blue { color: var(--blue); background: var(--blbg); } .p-teal { color: var(--teal); background: var(--tebg); }
.p-good { color: var(--good); background: var(--gobg); } .p-red { color: var(--red); background: var(--rebg); }
.p-amber { color: var(--amber); background: var(--ambg); } .p-gray { color: var(--gray); background: var(--grbg); }
.p-violet { color: var(--violet); background: var(--vibg); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; font-weight: 600; color: var(--amber); background: var(--ambg); }

/* ——— кнопки и поля ——— */
.btn {
  display: inline-flex; align-items: center; gap: 9px; height: 37px; padding: 0 13px; border-radius: var(--r-btn);
  background: var(--inset); border: 1px solid var(--border); color: var(--soft); font-size: 14px; font-weight: 600;
  cursor: pointer; white-space: nowrap; text-decoration: none;
}
.btn:hover { border-color: #3a4c60; text-decoration: none; }
.btn .i { color: var(--muted); }
.btn.on, .btn.primary { background: var(--blbg); border-color: var(--blue); color: var(--blue); }
.btn.on .i, .btn.primary .i { color: var(--blue); }
.btn.danger { color: var(--red); border-color: #5a3440; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: default; }
.btn .trail { margin-left: auto; }
.link { background: none; border: none; color: var(--blue); cursor: pointer; padding: 0; font-weight: 600; font-size: inherit; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--text); }
.input, .select {
  height: 37px; border-radius: var(--r-btn); border: 1px solid var(--border); background: var(--inset); color: var(--text);
  padding: 0 12px; font-size: 14px; min-width: 0;
}
.input::placeholder { color: var(--muted); }
.input:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset; }
.select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1afbf' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 15px; }
.search { position: relative; }
.search .input { padding-left: 36px; width: 100%; }
.search .i { position: absolute; left: 12px; top: 10px; color: var(--muted); }
.input.lg { height: 45px; font-size: 15px; padding: 0 15px; }
textarea.input { height: auto; padding: 10px 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: var(--soft); }
.check input { width: 16px; height: 16px; accent-color: var(--blue); }
.result { font-size: 13px; min-height: 18px; margin-top: 8px; }
.result.ok { color: var(--good); } .result.bad { color: var(--red); }

/* ——— строки «ключ — значение» ——— */
.rows { display: flex; flex-direction: column; }
.rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0 6px; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.35; align-items: baseline; }
.rows > div:first-child { border-top: none; }
.rows .k { color: var(--muted); }
.rows .v { color: var(--text); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.rows .v.t-blue { color: var(--blue); } .rows .v.t-teal { color: var(--teal); } .rows .v.t-good { color: var(--good); }
.rows .v.t-red { color: var(--red); } .rows .v.t-amber { color: var(--amber); } .rows .v.t-violet { color: var(--violet); }
.rows .v.t-gray { color: var(--gray); } .rows .v.t-muted { color: var(--muted); }

/* ——— таблицы ——— */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: var(--soft); font-size: 12px; padding: 10px 8px; background: var(--inset); white-space: nowrap; }
.tbl th:first-child { border-radius: 7px 0 0 7px; } .tbl th:last-child { border-radius: 0 7px 7px 0; }
.tbl td { padding: 11px 8px; border-top: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:first-child td { border-top: none; }
.tbl .r { text-align: right; } .tbl .c { text-align: center; }
.tbl.big td { font-size: 14px; padding: 14px 8px; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--raised); }
.tbl-wrap { overflow-x: auto; }
.empty { color: var(--muted); padding: 18px 0; font-size: 14px; }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }

/* ——— плитки станций ——— */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.tile {
  display: block; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-card); padding: 17px 19px 12px;
  color: var(--text); text-decoration: none; min-width: 0; transition: border-color .12s;
}
.tile:hover { border-color: #3d5268; text-decoration: none; }
.tile .tags { display: flex; gap: 6px; align-items: center; }
.tile .tags .i { margin-left: auto; color: var(--muted); }
.tile h3 { font-size: 18px; font-weight: 600; margin: 11px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .code { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tile .mid { display: flex; align-items: center; justify-content: space-between; margin: 13px 0 11px; gap: 10px; }
.tile .pw { font-size: 18px; font-weight: 600; white-space: nowrap; }
.tile .bot { border-top: 1px solid var(--border); padding-top: 10px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.tile .bot b { display: block; font-size: 13px; font-weight: 600; }
.tile .bot small { display: block; font-size: 11px; color: var(--muted); }
.tile .bot .age { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ——— инциденты ——— */
.inc { background: var(--inset); border: 1px solid var(--border); border-radius: 10px; padding: 13px 14px 14px; }
.inc + .inc { margin-top: 15px; }
.inc h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 600; }
.inc .where { font-size: 13px; color: var(--soft); margin-top: 8px; }
.inc .what { font-size: 13px; color: var(--soft); margin-top: 8px; line-height: 1.45; }
.inc .pill { margin-top: 12px; }

/* ——— плашка качества данных ——— */
.banner { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-radius: var(--r-card); margin-top: 22px;
  background: #33291d; border: 1px solid #4a3a24; font-size: 15px; color: var(--soft); }
.banner b { color: var(--amber); margin-right: 10px; }
.banner .i { color: var(--amber); width: 20px; height: 20px; margin-top: 1px; }
.banner.red { background: #33222a; border-color: #4f2f3a; } .banner.red b, .banner.red .i { color: var(--red); }
.banner.blue { background: #142538; border-color: #22406a; } .banner.blue b, .banner.blue .i { color: var(--blue); }

/* ——— графики ——— */
.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; overflow: visible; }
.chart-box svg text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 11px; color: var(--muted); margin: 2px 0 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 15px; border-top: 2px solid currentColor; }
.legend i.dash { border-top-style: dashed; border-top-width: 1.6px; }
.chart-tip { position: absolute; pointer-events: none; background: var(--raised); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 10px; font-size: 12px; box-shadow: 0 8px 22px rgba(0,0,0,.4); white-space: nowrap; z-index: 5; }
.chart-tip b { display: block; margin-bottom: 3px; }

/* ——— окно (диалог) ——— */
.modal-bg { position: fixed; inset: 0; background: rgba(5,9,13,.66); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px);
  overflow: auto; padding: 22px 24px 20px; box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.modal h2 { margin: 0 0 14px; font-size: 21px; font-weight: 600; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.secret { font-family: var(--mono); background: var(--inset); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; word-break: break-all; font-size: 13px; }
.toast { position: fixed; right: 20px; bottom: 20px; background: var(--raised); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px;
  font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.45); z-index: 60; max-width: 420px; }
.toast.bad { border-color: #5a3440; color: var(--red); } .toast.ok { border-color: #245a45; color: var(--good); }

/* ——— экран входа (06-login) ——— */
.login { display: grid; grid-template-columns: 885px 1fr; min-height: 100vh; }
.login-l { background: #111922; border-right: 1px solid var(--border); padding: 42px 48px 34px 48px; display: flex; flex-direction: column; }
.login-l .brand { border: none; height: auto; padding: 0; gap: 14px; }
.login-l .brand .logo { width: 40px; height: 40px; border-radius: 10px; }
.login-l .brand b { font-size: 21px; } .login-l .brand small { font-size: 11px; }
.login-l .hero { margin: auto 0; padding-left: 9px; }
.login-l h1 { font-size: 46px; line-height: 1.28; font-weight: 700; margin: 0; max-width: 470px; }
.login-l p { font-size: 15px; color: var(--muted); margin: 26px 0 0; }
.login-l .foot, .login-r .foot { border: none; margin: 0; padding: 0; }
.login-r { display: flex; flex-direction: column; padding: 34px 56px; background: var(--bg); }
.login-card { margin: auto; width: min(560px, 100%); background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 26px 34px 30px; }
.login-card h2 { font-size: 27px; font-weight: 700; margin: 0; }
.login-card .lead { font-size: 14px; color: var(--muted); margin: 18px 0 22px; }
.login-card .field + .field { margin-top: 18px; }
.login-card .pw { position: relative; }
.login-card .pw .input { width: 100%; padding-right: 48px; }
.login-card .pw button { position: absolute; right: 8px; top: 7px; background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px; }
.login-card .btn.primary { height: 43px; margin-top: 26px; font-size: 15px; justify-content: center; width: 100%; }
.login-card hr { border: none; border-top: 1px solid var(--border); margin: 24px 0 18px; }
.login-card .help { font-size: 13px; color: var(--muted); }
.login-card .result { color: var(--red); }
.login-card .result.ok { color: var(--good); }

/* ——— узкие экраны ——— */
@media (max-width: 1280px) { .g-main-aside { grid-template-columns: 1fr; } .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g2, .g2-wide { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; } .login-l { display: none; } }
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 40; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .18s; }
  .shell.open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .burger { display: block; }
  .top { padding-left: 8px; }
  .usermenu .who { display: none; }
  .tiles, .g3 { grid-template-columns: 1fr; }
  .ph { flex-direction: column; gap: 8px; } .ph-side { padding-top: 0; justify-content: flex-start; }
  .ph h1 { font-size: 26px; }
  .login-r { padding: 24px 16px; } .login-card { padding: 22px 18px 24px; }
}
@media (max-width: 560px) { .g4 { grid-template-columns: 1fr; } .kpi .v { font-size: 25px; } }
