/* hp-web – dizajn "verzia 1" (tmavá zimná modrá, jantárová = kúrenie, modrá = TÚV) */
:root {
  --ground: #13202B;
  --text: #E6EDF2;
  --muted: #9DB0BF;
  --dim: #8599A9;
  --heat: #F2A541;
  --cold: #6EC1E4;
  --power: #EF7B6B;
  --ok: #5FC9A0;
  --warn: #E9C46A;
  --panel: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.07);
  --rule: rgba(255, 255, 255, 0.06);
  --num: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { background: var(--ground); }
body { margin: 0; color: var(--text); font: 17px/1.4 "Barlow", system-ui, sans-serif; }
a { color: #8FD3EE; }
a:hover { color: #C2E8F6; }
:focus-visible { outline: 2px solid var(--cold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.01em; }

.wrap { max-width: 1360px; margin: 0 auto; padding: 18px clamp(14px, 3vw, 40px) 48px; display: flex; flex-direction: column; gap: 26px; }
.n, .v { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* ---------- horná lišta ---------- */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; }
.top nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; color: var(--muted); text-decoration: none; font-weight: 500; }
.top nav a:hover { color: var(--text); background: var(--panel); }
.top nav a[aria-current="page"] { color: var(--text); background: rgba(255, 255, 255, 0.08); }
.top .status { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: #B8C7D3; font-size: 15px; white-space: nowrap; }
.pill::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--dim); }
.pill.ok { background: rgba(95, 201, 160, 0.12); color: #8FE0C0; } .pill.ok::before { background: var(--ok); }
.pill.warn { background: rgba(233, 196, 106, 0.13); color: #F0D891; } .pill.warn::before { background: var(--warn); }
.pill.bad { background: rgba(239, 123, 107, 0.14); color: #F4A196; } .pill.bad::before { background: var(--power); }
.pill.plain::before { display: none; }

.page-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.page-title h1 { margin: 0; font-size: 30px; }
.page-title .sub { color: var(--muted); }

/* ---------- panely a riadky ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; min-width: 0; }
.panel h2 { margin: 0 0 10px; font-size: 20px; }
.panel h2 small { font-size: 15px; font-weight: 400; color: var(--muted); }
.panel .head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 8px; }
.panel .head h2 { margin: 0; }
.panel.col { display: flex; flex-direction: column; }
.panel .foot { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--dim); }
.panel .foot a { font-size: 15px; }

.r { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.r:last-child { border-bottom: none; }
.k { color: var(--muted); }
.v { font-weight: 600; font-size: 19px; text-align: right; white-space: nowrap; }
.u { font-weight: 500; font-size: 15px; color: var(--muted); margin-left: 3px; }
.note { font-size: 14px; color: var(--dim); line-height: 1.5; }
.note code { font-size: 13px; color: var(--muted); }

.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 18px; align-items: stretch; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 18px; }
.full { grid-column: 1 / -1; }

/* veľké hodnoty (stránka Tepelné čerpadlo, štatistiky) */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 0 24px; }
.tile { padding: 10px 0 12px; border-bottom: 1px solid var(--rule); min-width: 0; }
.tile .k { font-size: 15px; display: block; }
.tile .big { font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 30px; font-weight: 600; line-height: 1.15; }
.tile .big.s { font-size: 22px; }
.tile .note { display: block; }

/* prepínače obdobia */
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button, .btn { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.seg button:hover, .btn:hover { background: var(--panel); }
.seg button.on { background: var(--text); color: var(--ground); border-color: var(--text); font-weight: 600; }
.opts { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; font-size: 15px; color: var(--muted); }
.opts label { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; cursor: pointer; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--cold); }

/* tabuľky */
.tablebox { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th, table.t td { padding: 8px 10px; text-align: right; white-space: nowrap; }
table.t th:first-child, table.t td:first-child, table.t .l { text-align: left; }
table.t th { color: var(--dim); font-weight: 500; font-size: 14px; border-bottom: 1px solid var(--line); }
table.t td { border-bottom: 1px solid var(--rule); font-family: var(--num); font-variant-numeric: tabular-nums; }
table.t td.l, table.t td.txt { font-family: inherit; }
table.t tr:last-child td { border-bottom: none; }
table.t .hex { color: var(--cold); }
table.t td.hyp { white-space: normal; min-width: 220px; color: #B8C7D3; }

.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: middle; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: middle; background: var(--dim); }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--power); } .dot.info { background: var(--cold); }
.tag { display: inline-block; font-size: 13px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--muted); font-family: "Barlow", sans-serif; }
.tag.ok { color: #8FE0C0; } .tag.prob { color: #F0D891; } .tag.cand { color: #F4B98A; } .tag.der { color: #8FD3EE; }
.cold { color: var(--cold); } .warm { color: var(--heat); }

.msgs { display: flex; flex-direction: column; gap: 6px; }
.msg { font-size: 15px; color: #E9DDBF; background: rgba(233, 196, 106, 0.09); border-radius: 10px; padding: 8px 12px; }
.msg.bad { color: #F6C3BB; background: rgba(239, 123, 107, 0.1); }
.msg.info { color: #C9E6F2; background: rgba(110, 193, 228, 0.08); }

.chart { position: relative; }
svg { display: block; }

/* ---------- hlavná stránka: stav + teplotný pás ---------- */
.hero { display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: stretch; }
.hero .state { flex: 1 1 280px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.hero .word { font-family: var(--num); font-weight: 700; font-size: clamp(44px, 6vw, 64px); line-height: 1; color: var(--heat); }
.hero .word.tuv { color: var(--cold); } .hero .word.idle { color: var(--muted); }
.hero .figs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hero .figs .n { font-size: 32px; font-weight: 600; }
.strip-wrap { flex: 3 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.strip { position: relative; height: 214px; margin: 0 14px; }
.strip .bar { position: absolute; left: 0; right: 0; top: 88px; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, #3E7FB0 0%, #6EC1E4 22%, #B9DCE3 33%, #E9C77C 60%, var(--heat) 78%, #E2683C 100%); }
.strip .zero { position: absolute; top: 84px; width: 2px; height: 20px; background: var(--ground); }
.strip .tick { position: absolute; top: 194px; transform: translateX(-50%); font-family: var(--num); font-size: 13px; color: var(--dim); }
.strip .line { position: absolute; width: 2px; height: 14px; background: var(--text); transform: translateX(-1px); }
.strip .line.up { top: 72px; } .strip .line.down { top: 102px; }
.strip .lab { position: absolute; transform: translateX(-50%); text-align: center; white-space: nowrap; }
.strip .lab.up { bottom: calc(214px - 70px); }
.strip .lab.down { top: 118px; }
.strip .lab .k { font-size: 15px; display: block; }
.strip .lab .n { font-size: 34px; font-weight: 600; line-height: 1.05; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 15px; color: var(--muted); }
.facts b { color: var(--text); font-family: var(--num); font-size: 17px; font-weight: 600; }

.fc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.fc > div { padding: 8px 8px; min-width: 0; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.fc .k { font-size: 14px; }
.fc .n { font-weight: 600; font-size: 17px; white-space: nowrap; }
.fc .wet { font-size: 14px; color: #8FD3EE; } .fc .dry { font-size: 14px; color: var(--dim); }

.ebar { display: flex; height: 4px; margin-top: 5px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, 0.05); }
.ebar span:first-child { background: var(--heat); } .ebar span:last-child { background: var(--cold); }
.erow { padding: 7px 0; border-bottom: 1px solid var(--rule); }
.egrid { display: grid; grid-template-columns: minmax(48px, 1fr) auto auto; gap: 0 16px; align-items: baseline; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 96px; margin-top: 12px; }
.bars > div { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; }
.bars .n { font-size: 14px; font-weight: 600; }
.bars i { display: block; width: 100%; background: var(--cold); border-radius: 4px 4px 1px 1px; }
.bars i.today { background: var(--heat); }
.blabels { display: flex; gap: 6px; margin-top: 4px; }
.blabels span { flex: 1 1 0; text-align: center; font-family: var(--num); font-size: 13px; color: var(--dim); }

.rooms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 0 28px; }
.room { display: grid; grid-template-columns: minmax(0, 1fr) auto 62px 18px; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.room .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room .tg { font-family: var(--num); color: var(--dim); font-size: 16px; }
.room svg { align-self: center; }
.badge-hdo { font-size: 14px; padding: 3px 10px; border-radius: 999px; background: rgba(239, 123, 107, 0.14); color: #F4A196; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 15px; color: #B8C7D3; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 3px; border-radius: 2px; display: inline-block; }

.noaccess { padding: 14px 18px; border-radius: 12px; background: rgba(239, 123, 107, 0.12); color: #F6C3BB; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .strip .lab .n { font-size: 26px; }
  .hero .figs .n { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
