/* Вариант A «Светлые плитки» — утверждён Юрием 11.11.2026 */
:root {
  --bg: #eef1f4; --card: #ffffff; --ink: #1b2430; --muted: #5a6472; --line: #dde3ea; --soft: #f1f4f7;
  --accent: #1f5fbf; --warn-bg: #fff4e5; --warn-ink: #7a3d06; --bad-bg: #fde7e4; --bad-ink: #8f1d12;
  --ok-bg: #e3f3ea; --ok-ink: #1d6b3f; --warm-bg: #fde9dc; --warm-ink: #9a3b0b; --heat-bg: #e4edfb; --heat-ink: #1f4f9a;
  --font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-tap-highlight-color: transparent; }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left); }
main { max-width: 520px; margin: 0 auto; padding: 16px 16px 110px; display: flex; flex-direction: column; gap: 18px; font-variant-numeric: tabular-nums; }
button { font-family: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button[disabled] { opacity: .5; cursor: progress; }
h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.5px; }
h2 { margin: 0; font-size: 18px; font-weight: 600; }
.loading { padding: 40vh 0 0; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sec { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.card { background: var(--card); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }

.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.top .w { text-align: right; }
.top .w b { font-size: 26px; font-weight: 600; display: block; }

.alert { border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; background: var(--warn-bg); color: var(--warn-ink); }
.alert.l3 { background: var(--bad-bg); color: var(--bad-ink); }
.alert.l1 { background: var(--card); color: var(--ink); }
.alert b { display: block; font-size: 15px; }
.alert span { font-size: 13px; line-height: 1.4; opacity: .9; }

.tip { background: var(--accent); color: #fff; border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.tip .k { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; opacity: .85; }
.tip p { margin: 0; font-size: 15px; line-height: 1.4; }
.tip ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.4; }
.tip ol span { opacity: .85; }
.btn-w { min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; align-self: flex-start; }

.room .hd { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.room .nm { font-size: 14px; font-weight: 600; }
.chip { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.chip.норма { background: var(--ok-bg); color: var(--ok-ink); }
.chip.теплее { background: var(--warm-bg); color: var(--warm-ink); }
.chip.греется { background: var(--heat-bg); color: var(--heat-ink); }
.chip.нет { background: var(--soft); color: var(--muted); }
.room .t { font-size: 34px; font-weight: 600; letter-spacing: -1px; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--soft); border-radius: 12px; padding: 2px; }
.stepper button { width: 44px; height: 40px; border: 0; background: transparent; font-size: 22px; border-radius: 10px; }
.stepper button:active { background: #e3e8ee; }
.stepper span { font-size: 13px; color: #36404d; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.big { font-size: 28px; font-weight: 600; }
.phase { display: grid; grid-template-columns: 24px minmax(0, 1fr) 104px; gap: 10px; align-items: center; }
.phase b { font-size: 14px; }
.bar { height: 10px; background: #e8ecf1; border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 10px; background: #5b8def; border-radius: 999px; }
.bar i.low { background: #d97706; }
.phase span { font-size: 12px; text-align: right; color: #36404d; }
.phase span.low { color: #a34a00; font-weight: 600; }

.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: var(--soft); border-radius: 12px; padding: 4px; }
.seg button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; font-size: 13px; }
.seg button[aria-pressed="true"] { background: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.tog { min-height: 72px; border: 0; border-radius: 16px; background: var(--card); color: var(--ink); display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 12px; font-size: 14px; font-weight: 600; text-align: left; }
.tog small { font-size: 12px; font-weight: 400; }
.tog[aria-pressed="true"] { background: var(--ink); color: #fff; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { min-height: 44px; padding: 0 16px; border: 1px solid #c9d1db; border-radius: 999px; background: #fff; font-size: 14px; }

.foot { font-size: 12px; color: var(--muted); text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.foot button { border: 0; background: none; color: var(--accent); font-size: 13px; min-height: 44px; padding: 0 12px; }

.login { padding-top: 22vh; display: flex; flex-direction: column; gap: 14px; }
.login input { min-height: 52px; border: 1px solid #c9d1db; border-radius: 14px; padding: 0 16px; font: inherit; font-size: 17px; background: #fff; }
.login button { min-height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; }
.err { color: var(--bad-ink); font-size: 14px; }

#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; max-width: calc(100% - 32px); box-shadow: 0 4px 16px rgba(0,0,0,.2); }
@media (prefers-reduced-motion: no-preference) { #toast { transition: opacity .2s; } }
