/* COP monitoring – felület 2.1
   Hűvös semleges alap, mély tengerészkék tinta, kobaltkék kiemelés. Kék = villamos, narancs = hő (minden grafikonon ugyanaz).
   A fő elem a sötét „hőmérleg” kártya a COP-ívvel; körülötte minden visszafogott. */
:root {
  color-scheme: light;
  --bg: #f2f4f9; --surface: #ffffff; --sunk: #f1f3f9; --side: #ffffff;
  --ink: #0e1630; --muted: #5f6a86; --faint: #8b94ab; --line: #e2e6f0; --line-soft: #edf0f6;
  --brand: #2f5bea; --brand-ink: #ffffff; --brand-soft: #e9eeff;
  --el: #257de0; --heat: #f47230; --s3: #00b894; --s4: #f2a600;
  --el-soft: #e6f0fd; --heat-soft: #ffeee4;
  --good: #0f9d58; --good-soft: #e2f6ea; --warn: #b7791f; --warn-soft: #fdf3d7; --crit: #d63a3b; --crit-soft: #fde8e8; --off: #8b94ab; --off-soft: #eceff5;
  --hero-a: #0e1630; --hero-b: #1c2c66;
  --shadow: 0 1px 2px rgba(14, 22, 48, .05), 0 8px 24px -12px rgba(14, 22, 48, .12);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "SF Pro Text", Roboto, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "SF Pro Display", Roboto, sans-serif;
  --r: 16px; --r-sm: 10px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0f1e; --surface: #131a2e; --sunk: #0f1528; --side: #0e1426;
  --ink: #e9edf8; --muted: #94a0c0; --faint: #6b7696; --line: #232c48; --line-soft: #1b233c;
  --brand: #7391ff; --brand-ink: #0a0f1e; --brand-soft: #1b2650;
  --el: #338ced; --heat: #e76624; --s3: #00a888; --s4: #d28e05;
  --el-soft: #14284a; --heat-soft: #3a2218;
  --good: #3ecf8e; --good-soft: #10301f; --warn: #e5b454; --warn-soft: #33290f; --crit: #f0696a; --crit-soft: #3a1a1d; --off: #6b7696; --off-soft: #1a2138;
  --hero-a: #162047; --hero-b: #24388a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a0f1e; --surface: #131a2e; --sunk: #0f1528; --side: #0e1426;
    --ink: #e9edf8; --muted: #94a0c0; --faint: #6b7696; --line: #232c48; --line-soft: #1b233c;
    --brand: #7391ff; --brand-ink: #0a0f1e; --brand-soft: #1b2650;
    --el: #338ced; --heat: #e76624; --s3: #00a888; --s4: #d28e05;
    --el-soft: #14284a; --heat-soft: #3a2218;
    --good: #3ecf8e; --good-soft: #10301f; --warn: #e5b454; --warn-soft: #33290f; --crit: #f0696a; --crit-soft: #3a1a1d; --off: #6b7696; --off-soft: #1a2138;
    --hero-a: #162047; --hero-b: #24388a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 650; margin: 0; letter-spacing: -.015em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.num, .tbl td.r, .val b, .tile b { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }
svg.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- váz: oldalsáv + tartalom */
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 20px 14px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.mark { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 650 17px var(--display); letter-spacing: -.01em; padding: 2px 8px 18px; }
.mark svg { width: 32px; height: 32px; flex: none; }
.wm { font-weight: 500; letter-spacing: -.03em; white-space: nowrap; }
.wm b { font-weight: 800; }
.wm i { font-style: normal; opacity: .55; }
.side-h { font-size: 12px; color: var(--faint); padding: 16px 10px 6px; }
.side a.item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--r-sm); text-decoration: none; color: var(--muted); font-weight: 500; min-width: 0; }
.side a.item:hover { background: var(--sunk); color: var(--ink); }
.side a.item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.side a.item span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.side a.site { padding: 7px 10px; font-weight: 400; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--off); flex: none; margin: 0 5px; }
.dot.run, .dot.defrost { background: var(--good); }
.dot.alarm { background: var(--crit); }
.dot.partial { background: var(--warn); }
.dot.standby { background: var(--faint); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line-soft); display: grid; gap: 4px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; text-decoration: none; color: var(--ink); border-radius: var(--r-sm); min-width: 0; }
.side-user:hover { background: var(--sunk); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 700; flex: none; }
.side-user div { min-width: 0; line-height: 1.25; }
.side-user div b, .side-user div span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-row { display: flex; gap: 6px; }
.side-row .btn { flex: 1; justify-content: center; }
.badge { background: var(--brand); color: var(--brand-ink); border-radius: 20px; font-size: 12px; padding: 0 7px; font-weight: 700; line-height: 20px; }
.mtop { display: none; }
.demo-bar { background: var(--warn-soft); color: var(--ink); text-align: center; padding: 6px 14px; font-size: 13px; }
main { max-width: 1160px; width: 100%; margin: 0 auto; padding: 30px 32px 70px; }

/* ---------- alapelemek */
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 8px 14px; cursor: pointer; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 500; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--sunk); border-color: var(--faint); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.1); background: var(--brand); }
.btn.danger { color: var(--crit); }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.btn.icon { padding: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field label, .lbl { font-size: 13px; color: var(--muted); display: grid; gap: 5px; }
.lbl { display: block; }
input[type=text], input[type=password], input[type=number], select { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 9px 12px; width: 100%; min-width: 0; font-size: 15px; color: var(--ink); }
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 18px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; flex-wrap: wrap; margin-bottom: 22px; }
.head .sub { color: var(--muted); margin-top: 4px; }
.err { background: var(--crit-soft); border-radius: var(--r-sm); padding: 10px 13px; margin-bottom: 14px; }
.note { background: var(--sunk); border-radius: var(--r-sm); padding: 10px 13px; font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; background: var(--sunk); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button, .seg a { border: 0; background: none; padding: 6px 14px; cursor: pointer; color: var(--muted); border-radius: 9px; text-decoration: none; font-weight: 500; white-space: nowrap; }
.seg .on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(14, 22, 48, .14); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 5px 13px; text-decoration: none; color: var(--muted); white-space: nowrap; font-size: 14px; }
.chip:hover { color: var(--ink); border-color: var(--faint); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.chip.dim { opacity: .45; }
.filters { display: grid; gap: 10px; margin-bottom: 18px; }

/* ---------- állapotjelző */
.pill { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; border-radius: 20px; padding: 3px 11px 3px 9px; font-size: 13px; font-weight: 600; background: var(--off-soft); color: var(--muted); }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.pill.run { background: var(--good-soft); color: var(--good); }
.pill.defrost { background: var(--el-soft); color: var(--el); }
.pill.alarm { background: var(--crit-soft); color: var(--crit); }
.pill.alarm i { border-radius: 1px; transform: rotate(45deg); }
.pill.partial { background: var(--warn-soft); color: var(--warn); }
.pill.offline i { background: none; border: 2px solid currentColor; }
@media (prefers-reduced-motion: no-preference) {
  .pill.run i { animation: beat 2.4s ease-in-out infinite; }
  @keyframes beat { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 22%, transparent); } }
}

/* ---------- hőmérleg: a nap kártyája */
.hero { background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: #fff; border-radius: 20px; padding: 26px 30px; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px 36px; align-items: center; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -90px; top: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(closest-side, rgba(244, 114, 48, .28), transparent); pointer-events: none; }
.gauge { position: relative; z-index: 1; }
.gauge svg { display: block; width: 100%; height: auto; }
.gauge text { fill: #fff; font-family: var(--display); }
.hero-body { position: relative; z-index: 1; min-width: 0; }
.hero-body .when { font-size: 13px; opacity: .7; }
.hero-body h2 { font-size: 24px; line-height: 1.25; margin: 2px 0 18px; font-weight: 600; }
.hero-body h2 b { font-weight: 700; color: #ffb48a; }
.bal-bar { display: flex; height: 14px; gap: 3px; }
.bal-bar span { display: block; min-width: 4px; border-radius: 7px; }
.bal-bar .e { background: #5aa5f5; }
.bal-bar .f { background: linear-gradient(90deg, #f47230, #ff9d5c); flex: 1; }
.bal-bar.empty { background: rgba(255, 255, 255, .12); border-radius: 7px; }
.bal-leg { display: flex; flex-wrap: wrap; gap: 10px 34px; margin-top: 16px; }
.bal-leg div span { display: flex; align-items: center; gap: 7px; font-size: 13px; opacity: .75; }
.bal-leg i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.bal-leg b { font: 650 22px var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.bal-leg b small { font: 400 13px var(--font); opacity: .7; margin-left: 4px; }
.hero-note { font-size: 12.5px; opacity: .6; margin-top: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .anim .gauge .arc { animation: arc 1s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes arc { from { stroke-dasharray: 0 400; } }
  .anim .bal-bar .e { animation: grow .9s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes grow { from { flex-basis: 0; } }
}

/* ---------- számcsempék */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); min-width: 0; }
.tile .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--sunk); color: var(--muted); }
.tile .ico.el { background: var(--el-soft); color: var(--el); }
.tile .ico.heat { background: var(--heat-soft); color: var(--heat); }
.tile .ico.brand { background: var(--brand-soft); color: var(--brand); }
.tile span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; }
.tile b { font: 650 22px/1.2 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.tile b small { font: 400 13px var(--font); color: var(--muted); margin-left: 4px; }

/* ---------- gépkártyák */
.sec { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.ucards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.ucard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ucard.off { opacity: .8; }
.ucard-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.temps { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; background: var(--sunk); border-radius: 12px; padding: 14px 16px; }
.temps > div:last-child { text-align: right; }
.temps span { font-size: 13px; color: var(--muted); display: block; }
.temps b { font: 650 28px/1.1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.temps b small { font: 400 14px var(--font); color: var(--muted); margin-left: 2px; }
.temps .flow { text-align: center; font-size: 12px; color: var(--muted); min-width: 64px; }
.temps .flow i { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--heat), var(--el)); margin-bottom: 5px; }
.vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
.vals.more { border-top: 1px solid var(--line); padding-top: 14px; }
.val span { display: block; font-size: 13px; color: var(--muted); }
.val b { font: 650 18px/1.3 var(--display); }
.val b small { font: 400 13px var(--font); color: var(--muted); margin-left: 3px; }
.spark { border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: auto; }
.spark svg { display: block; width: 100%; height: 40px; }
.spark span { font-size: 12px; color: var(--faint); }
.alarm-line { background: var(--crit-soft); border-radius: var(--r-sm); padding: 9px 12px; font-size: 14px; }

/* ---------- telephelykártyák (áttekintés) */
.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.scard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 16px; transition: transform .14s, border-color .14s; }
.scard:hover { border-color: var(--brand); transform: translateY(-2px); }
.scard .cop { display: flex; align-items: baseline; gap: 10px; }
.scard .cop b { font: 700 40px/1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.scard .bal-bar { height: 8px; }
.scard .bal-bar .e { background: var(--el); }
.scard .bal-bar.empty { background: var(--sunk); }
.scard .foot { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line-soft); padding-top: 12px; margin-top: auto; }
.scard .foot b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; display: block; white-space: nowrap; font-size: 14px; }

/* ---------- táblázat */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r, .tbl th.r { text-align: right; }
.tbl tr.link { cursor: pointer; }
.tbl tr.link:hover td { background: var(--sunk); }
.tbl tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 650; }
.tbl .name { font-weight: 600; }
.scroll-x { overflow-x: auto; }
.low { color: var(--faint); }
.flag { display: inline-block; background: var(--warn-soft); color: var(--warn); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 600; }
.copv { display: inline-block; min-width: 46px; text-align: center; background: var(--brand-soft); color: var(--brand); border-radius: 8px; padding: 1px 8px; font-weight: 700; }

/* ---------- grafikon */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.chart text { font: 12px var(--font); fill: var(--muted); }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .cross { stroke: var(--faint); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; }
.legend i.sq { width: 10px; height: 10px; border-radius: 3px; }
.tip { position: absolute; pointer-events: none; background: #0e1630; color: #f2f4f9; border-radius: 10px; padding: 9px 12px; font-size: 13px; line-height: 1.5; white-space: nowrap; z-index: 5; box-shadow: 0 8px 24px rgba(5, 10, 30, .35); border: 1px solid rgba(255, 255, 255, .08); }
.tip i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 7px; }
.tip b { font-variant-numeric: tabular-nums; margin-left: 14px; float: right; }
.tip .t { opacity: .65; margin-bottom: 2px; }
.chart-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.empty { padding: 40px 10px; text-align: center; color: var(--muted); }
.skel { border-radius: var(--r); background: linear-gradient(90deg, var(--surface), var(--sunk), var(--surface)); background-size: 200% 100%; height: 170px; margin-bottom: 16px; }
@media (prefers-reduced-motion: no-preference) { .skel { animation: skel 1.2s linear infinite; } @keyframes skel { to { background-position: -200% 0; } } }

/* ---------- belépés: hőáramlás */
.lg { min-height: 100vh; position: relative; overflow: hidden; display: grid; place-items: center; padding: 96px 20px 40px; color: #fff;
  background: linear-gradient(90deg, #071226 0%, #0e1630 45%, #2a1410 100%); }
.lg-flow { position: absolute; inset: 0; width: 100%; height: 100%; }
.lg-mark { position: absolute; left: 44px; top: 36px; color: #fff; padding: 0; }
.lg-side { position: absolute; bottom: 56px; max-width: 260px; display: grid; gap: 4px; }
.lg-out { left: 64px; }
.lg-in { right: 64px; text-align: right; justify-items: end; }
.lg-side span { font-size: 14px; }
.lg-side b { font: 700 clamp(44px, 5.2vw, 76px)/1 var(--display); letter-spacing: -.04em; }
.lg-side p { font-size: 15px; line-height: 1.45; margin-top: 8px; }
.lg-out span { color: #a9c6f5; } .lg-out b { color: #8fc3ff; } .lg-out p { color: #c5cdea; }
.lg-in span { color: #ffc9a8; } .lg-in b { color: #ffab7a; } .lg-in p { color: #f0d6c8; }
.lg-card { position: relative; z-index: 2; width: min(420px, 100%); background: var(--surface); color: var(--ink); border-radius: 28px; padding: 42px 40px; box-shadow: 0 50px 120px rgba(0, 0, 0, .6); }
.lg-card h2 { font-size: 32px; margin-bottom: 6px; }
.lg-card input { background: var(--sunk); border-radius: 12px; padding: 12px 14px; }
.lg-card .btn.primary { width: 100%; justify-content: center; padding: 14px; margin-top: 6px; border: 0; border-radius: 12px; font-size: 16px; color: #fff; background: linear-gradient(90deg, #2f6fe0, #6a5be0 50%, #e8622a); }
@media (prefers-reduced-motion: no-preference) {
  .lg-flow path { animation: drift 9s ease-in-out infinite alternate; }
  @keyframes drift { from { transform: translateY(-7px); } to { transform: translateY(9px); } }
}
@media (max-width: 1100px) { .lg-side p { display: none; } .lg-side { bottom: 28px; } .lg-out { left: 24px; } .lg-in { right: 24px; } .lg { padding-bottom: 130px; } }
@media (max-width: 600px) { .lg-mark { left: 20px; top: 22px; } .lg-card { padding: 30px 24px; border-radius: 22px; } .lg { padding-top: 80px; } }

/* ---------- párbeszédablak */
dialog { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); padding: 26px; width: min(580px, calc(100vw - 28px)); max-height: calc(100vh - 36px); box-shadow: 0 30px 80px rgba(5, 10, 30, .4); }
dialog::backdrop { background: rgba(8, 12, 30, .55); backdrop-filter: blur(3px); }
dialog h2 { margin-bottom: 18px; font-size: 20px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.slot { border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 4px; margin-bottom: 12px; background: var(--sunk); }
.slot .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pw { font: 650 24px var(--display); letter-spacing: .08em; background: var(--sunk); border-radius: 12px; padding: 14px; text-align: center; user-select: all; }
pre.raw { background: var(--sunk); border-radius: 12px; padding: 12px; font-size: 12px; overflow: auto; max-height: 300px; white-space: pre-wrap; word-break: break-all; margin: 6px 0 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.checks label { display: inline-flex; gap: 7px; align-items: center; font-size: 14px; color: var(--ink); }
.print-only { display: none; }

/* ---------- keskeny kijelző */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 40; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 20px 0 60px rgba(5, 10, 30, .35); }
  .side.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(8, 12, 30, .5); z-index: 39; }
  .mtop { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
  .mtop .mark { padding: 0; flex: 1; font-size: 16px; }
  main { padding: 20px 16px 60px; }
  h1 { font-size: 24px; }
  .hero { grid-template-columns: 1fr; padding: 22px 20px; }
  .gauge { max-width: 210px; margin: 0 auto; }
  .hero-body h2 { font-size: 20px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 13px; gap: 10px; }
  .tile b { font-size: 19px; }
  .ucards, .scards { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
  .slot .grid2 { grid-template-columns: 1fr; }
}

/* ---------- nyomtatás: a Havi adatok oldal a riport */
@media print {
  :root, :root[data-theme="dark"], :root:not([data-theme="light"]) { color-scheme: light; --bg: #fff; --surface: #fff; --sunk: #f3f5f9; --ink: #000; --muted: #444; --faint: #666; --line: #bbb; --line-soft: #ddd;
    --el: #257de0; --heat: #f47230; --brand: #1f3fb0; --brand-soft: #fff; --warn-soft: #eee; --warn: #000; --shadow: none; --hero-a: #0e1630; --hero-b: #1c2c66; }
  @page { size: A4; margin: 13mm; }
  body { font-size: 12px; }
  .shell { display: block; }
  .side, .mtop, .demo-bar, .no-print, .tip, .scrim { display: none !important; }
  main { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; break-inside: avoid; }
  .hero { padding: 16px 20px; grid-template-columns: 150px 1fr; }
  .hero-body h2 { font-size: 16px; margin-bottom: 10px; }
  .print-only { display: block; }
  .tbl td, .tbl th { padding: 5px 8px; }
  .copv { padding: 0; min-width: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
