/* Wyglad wg portowa5.com: kolory i czcionki. Czcionki z wlasnego serwera (OFL). */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.f837d382a885.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-ext-400-normal.9159859e7aa8.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.42b95430773b.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-ext-500-normal.656e8d21838c.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.75fb76ec3559.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-ext-600-normal.8f9364515dfc.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.3714175d15f3.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-ext-700-normal.39b692b06219.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter Tight"; font-weight: 600; font-display: swap; src: url("../fonts/inter-tight-latin-600-normal.3fe302c6be52.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Tight"; font-weight: 600; font-display: swap; src: url("../fonts/inter-tight-latin-ext-600-normal.ceaf1b3efd7a.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-weight: 500; font-display: swap; src: url("../fonts/playfair-display-latin-500-normal.c9fd9226ff27.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-weight: 500; font-display: swap; src: url("../fonts/playfair-display-latin-ext-500-normal.88753804751b.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-weight: 600; font-display: swap; src: url("../fonts/playfair-display-latin-600-normal.53169c2447b2.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-weight: 600; font-display: swap; src: url("../fonts/playfair-display-latin-ext-600-normal.878f7290c4d8.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --cream: #f5f2eb;
  --paper: #ebe6dc;
  --card: #ffffff;
  --ink: #202820;
  --muted: #5f625a;
  --line: #d7d1c5;
  --sage: #dfe2d6;
  --sand: #c9b98f;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, Arial, sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --err-bg: #f3dcd6; --err-fg: #7a2a1c;
  --ok-bg: #dfe2d6;  --ok-fg: #2f3b2a;
  --radius: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 400 1rem/1.55 var(--sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 2rem; margin: 0 0 .6rem; }
h2 { font-size: 1.3rem; margin: 0 0 .4rem; }
a { color: var(--ink); }
.muted { color: var(--muted); }
.ico svg { width: 1.15em; height: 1.15em; display: block; stroke-width: 1.75; }

/* Gorny pasek */
.top { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: .7rem 1.25rem; background: var(--ink); color: var(--cream); }
.brand { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; text-decoration: none; color: var(--cream); }
.brand span { font-family: var(--sans); font-size: .8rem; font-weight: 400; color: #b9bcae; margin-left: .45rem; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--sand); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; letter-spacing: .02em; }
.usermenu-panel { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 14rem; background: var(--card); color: var(--ink); border-radius: var(--radius); padding: .4rem; box-shadow: 0 10px 30px rgba(32,40,32,.18); }
.usermenu-who { padding: .5rem .7rem .6rem; border-bottom: 1px solid var(--paper); margin-bottom: .3rem; font-weight: 500; }
.usermenu-who small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.usermenu-panel a, .usermenu-panel button { display: flex; gap: .55rem; align-items: center; width: 100%; padding: .55rem .7rem; border: 0; background: none; font: inherit; color: inherit; text-decoration: none; border-radius: 10px; cursor: pointer; }
.usermenu-panel a:hover, .usermenu-panel button:hover { background: var(--cream); }

main { max-width: 60rem; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.eyebrow { margin: 0 0 .15rem; font-size: .85rem; color: var(--muted); }
.eyebrow::first-letter { text-transform: uppercase; }

/* Mieszkania i liczby */
.pills { display: flex; gap: .4rem; flex-wrap: wrap; margin: .2rem 0 1rem; }
.pill { padding: .3rem .85rem; border-radius: 99px; background: var(--paper); text-decoration: none; font-size: .9rem; font-weight: 500; }
.pill-on { background: var(--ink); color: var(--cream); }
.stats { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin-bottom: 1.25rem; }
.stat { background: var(--card); border-radius: var(--radius); padding: .75rem .9rem; }
.stat span { display: block; font-size: .78rem; color: var(--muted); }
.stat strong { display: block; font-size: 1.25rem; font-weight: 500; }
.stat small { display: block; font-size: .78rem; color: var(--muted); }

/* Kafle */
.tiles { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.tile { display: flex; gap: .8rem; align-items: center; background: var(--card); border-radius: var(--radius); padding: .95rem 1rem; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
a.tile:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(32,40,32,.08); }
.tile-ico { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--sage); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.tile-quiet .tile-ico { background: var(--paper); }
.tile-body { flex: 1; min-width: 0; }
.tile-body strong { display: block; font-weight: 500; }
.tile-body small { display: block; color: var(--muted); font-size: .85rem; }
.count { flex: none; min-width: 1.5rem; padding: .05rem .5rem; border-radius: 99px; background: var(--ink); color: var(--cream); font-size: .8rem; text-align: center; }

/* Panele, formularze, komunikaty */
.panel { background: var(--card); border-radius: var(--radius); padding: 1.2rem 1.3rem; }
.narrow { max-width: 24rem; margin: 2rem auto; }
label { display: block; font-weight: 500; margin-bottom: .25rem; }
input[type=email], input[type=text], input[type=password], input[type=tel], select, textarea {
  width: 100%; padding: .7rem .8rem; font: inherit; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: 10px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; background: #fff; }
.btn { display: inline-block; width: 100%; padding: .8rem 1rem; font: 500 1rem var(--sans); color: var(--cream); background: var(--ink); border: 0; border-radius: 10px; cursor: pointer; }
.btn:hover { opacity: .9; }
.btn-auto { width: auto; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.msg { padding: .75rem .95rem; border-radius: 10px; margin-bottom: 1rem; }
.msg-error { background: var(--err-bg); color: var(--err-fg); }
.msg-success, .msg-info { background: var(--ok-bg); color: var(--ok-fg); }
.field { margin-bottom: 1rem; }
.field small { display: block; margin-top: .25rem; font-size: .85rem; }
.field-check { display: flex; gap: .55rem; align-items: flex-start; }
.field-check label { font-weight: 400; margin: 0; }
.field-check input { margin-top: .3rem; width: 1.05rem; height: 1.05rem; accent-color: var(--ink); }
.error { color: var(--err-fg); }
.small { font-size: .9rem; margin-top: 1rem; }
.stack { display: grid; gap: 1rem; margin-top: 1rem; }
.doc-group { margin-top: 1rem; }
.doc-list { list-style: none; margin: .4rem 0 0; padding: 0; }
.doc-list li { padding: .75rem 0; border-top: 1px solid var(--paper); }
.doc-list li:first-child { border-top: 0; }
.doc-list a { font-weight: 500; }
.doc-list p { margin: .25rem 0 0; font-size: .92rem; }
.small-inline { font-size: .85rem; margin-left: .4rem; }
.contact-links { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; margin-top: .25rem; }
.contact-links a { font-weight: 400; }
.badge { display: inline-block; font-size: .78rem; padding: .05rem .45rem; margin-left: .4rem; border-radius: 99px; background: var(--paper); color: var(--muted); }

/* Dolny pasek nawigacji – tylko telefon */
.bottomnav { display: none; }
@media (max-width: 40rem) {
  .brand span { display: none; }
  h1 { font-size: 1.65rem; }
  main { padding: 1.25rem 1rem 6rem; }
  .tiles { grid-template-columns: 1fr; gap: .5rem; }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; justify-content: space-around; background: var(--card); border-top: 1px solid var(--line); padding: .4rem 0 calc(.4rem + env(safe-area-inset-bottom)); }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .7rem; color: var(--muted); text-decoration: none; padding: .2rem .8rem; }
  .bottomnav .ico { font-size: 1.35rem; }
  .bottomnav a[aria-current] { color: var(--ink); font-weight: 500; }
}

/* Dzwonek i ogloszenia */
.top-actions { display: flex; gap: .6rem; align-items: center; }
.bell-btn { position: relative; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--cream); font-size: 1.2rem; }
.bell-btn:hover { background: rgba(255,255,255,.1); }
.bell-count { position: absolute; top: -.1rem; right: -.2rem; min-width: 1.1rem; height: 1.1rem; padding: 0 .3rem; border-radius: 99px; background: var(--sand); color: var(--ink); font-size: .7rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.bell-panel { min-width: 19rem; max-width: 92vw; }
.bell-item span small { display: block; color: var(--muted); font-size: .75rem; }
.bell-new { font-weight: 500; }
.bell-new::before { content: ""; display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: var(--sand); margin-right: .45rem; flex: none; }
.bell-empty { padding: .4rem .7rem; margin: 0; }
.bell-all { border-top: 1px solid var(--paper); margin-top: .3rem; color: var(--muted) !important; font-size: .85rem; }
.announce { display: flex; gap: .7rem; align-items: flex-start; background: var(--sand); color: var(--ink); border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: 1rem; }
.announce .ico { font-size: 1.3rem; margin-top: .1rem; }
.announce p { margin: .2rem 0 0; font-size: .92rem; }

/* Ogrzewanie */
.stat-warn { background: var(--err-bg); color: var(--err-fg); }
.row { display: flex; justify-content: space-between; gap: 1rem; }
.row strong { font-weight: 500; white-space: nowrap; }
.ha-cards { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); margin-bottom: 1.25rem; }
.ha-card { background: var(--card); border-radius: var(--radius); padding: .8rem .9rem; display: flex; flex-direction: column; }
.ha-card > strong { font-size: 1.3rem; font-weight: 500; margin-top: .55rem; }
.ha-head { display: flex; align-items: center; gap: .55rem; font-size: .82rem; color: var(--muted); }
.ha-ico { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; background: #eceae4; color: #6f7268; }
.tone-dhw { background: #fde8d7; color: #e5701f; }
.tone-on { background: #ffe1d6; color: #ff5722; }
.tone-off { background: #eceae4; color: #8a8d82; }
.tone-power { background: #fff1d1; color: #e0a100; }
.tone-outdoor, .tone-winter { background: #dceefc; color: #2196f3; }
.tone-summer { background: #fff1d1; color: #f2a900; }
.tone-pressure { background: #e3e7fb; color: #3f51b5; }
.tone-ok { background: #def2e2; color: #2e9e4a; }
.tone-err, .ha-warn .ha-ico { background: #fbdcd6; color: #db4437; }
.ha-warn { box-shadow: inset 0 0 0 1.5px #e9a99e; }
.gauge { width: 100%; max-width: 10rem; align-self: center; margin-top: .5rem; display: block; overflow: visible; }
.gauge-bg, .gauge-seg { fill: none; stroke-width: 13; }
.gauge-bg { stroke: #eceae4; }
.gauge-seg.tone-power { stroke: #e0a100; background: none; }
.seg-ok { stroke: #5a9e52; } .seg-warn { stroke: #f2a93b; } .seg-err { stroke: #d2513f; }
.needle { fill: #e8e6e1; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; }
.ha-card > .gauge-num { text-align: center; margin-top: -1.5rem; font-size: 1.35rem; }
.circ { display: flex; align-items: center; gap: .75rem; }
.circ-body { flex: 1; min-width: 0; }
.bar { display: block; height: 5px; border-radius: 3px; background: #eceae4; margin-top: .4rem; overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 3px; background: #e5701f; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; margin-top: .4rem; touch-action: pan-y; }
.chart .grid { stroke: #ebe7de; stroke-width: 1; }
.chart .grid-v { stroke-dasharray: 3 4; }
.chart .series { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { stroke: none; opacity: .14; }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--sans); }
.chart .band { opacity: .16; } .band-ok { fill: #5a9e52; } .band-warn { fill: #f2a93b; } .band-err { fill: #d2513f; }
.chart.c-pressure .area { opacity: 0; }
.chart .cursor { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .dot { stroke: #fff; stroke-width: 2; }
.c-dhw .series { stroke: #e5701f; } .c-dhw .area, .c-dhw .dot { fill: #e5701f; }
.c-outdoor .series { stroke: #2196f3; } .c-outdoor .area, .c-outdoor .dot { fill: #2196f3; }
.c-pressure .series { stroke: #3f51b5; } .c-pressure .area, .c-pressure .dot { fill: #3f51b5; }
.tip { position: absolute; top: 0; background: var(--ink); color: var(--cream); font-size: .78rem; padding: .3rem .55rem; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.section-title { margin-top: 1.75rem; }
.tech { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.tech .doc-list li { font-size: .9rem; padding: .45rem 0; }
