@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    --page: #f6f8fb;
    --surface: #ffffff;
    --surface-2: #fafbfe;
    --text: #111827;
    --muted: #687588;
    --muted-2: #98a3b3;
    --line: #e7ebf1;
    --accent: #f4b321;
    --accent-dark: #c88400;
    --success: #209c60;
    --danger: #d83b3b;
    --info: #227cc6;
    --heat: #d26a1e;
    --cool: #2496d2;
    --pump-sand: #c49438;
    --pump-orange: #f07800;
    --pump-error: #dc2626;
    --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05), 0 10px 30px rgba(15, 23, 42, 0.06);
    --shadow-2: 0 18px 55px rgba(15, 23, 42, 0.12);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background: var(--page);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.45;
}

body[data-theme="dark"] {
    --page: #0f141b;
    --surface: #151b24;
    --surface-2: #101720;
    --text: #edf2f7;
    --muted: #a8b3c2;
    --muted-2: #788699;
    --line: #263241;
    --pump-sand: #dcb36c;
    --pump-orange: #ff9800;
    --pump-error: #ef4444;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 34px rgba(0, 0, 0, 0.28);
    --shadow-2: 0 18px 55px rgba(0, 0, 0, 0.38);
}

body[data-theme="dark"],
body[data-theme="dark"] * {
    color-scheme: dark;
}

button,
input,
select {
    font: inherit;
}

button,
input[type="submit"] {
    cursor: pointer;
}

.appShell {
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto;
    padding: 18px 0 48px;
}

.appHeader {
    position: sticky;
    top: 12px;
    z-index: 50;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 14px;
    align-items: center;
    min-height: 72px;
    padding: 12px 14px;
    margin-bottom: 18px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.logo {
    width: auto;
    height: 38px;
    flex: 0 0 auto;
}

.brand .logo-dark {
    display: none;
}

body[data-theme="dark"] .brand .logo-dark {
    display: block;
}

body[data-theme="dark"] .brand .logo-light {
    display: none;
}

.headerContext {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.systemStatus,
.fwVersionChip,
.installationChip,
.statusBadge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 11px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.installationChip {
    cursor: pointer;
}

.installationChip:hover {
    border-color: var(--accent);
}

.systemStatus {
    color: var(--success);
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.systemStatus .uptimeWord {
    text-transform: uppercase;
}

.systemStatus .uptimeTime {
    color: inherit;
    font-weight: 700;
}

body.is-data-stale .systemStatus,
body.is-data-stale .systemStatus .uptimeTime {
    color: var(--danger);
}

body.is-data-stale .statusDot {
    background: var(--danger);
    animation: none;
    box-shadow: 0 0 0 5px rgba(216, 59, 59, 0.12);
}

.fwVersionChip {
    font-size: 0.82rem;
    color: var(--muted);
}

.fwVersionChip .fwLabelMobile {
    display: none;
}

.fwVersionChip strong {
    color: var(--text);
    font-weight: 700;
}

.statusDot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 5px rgba(32, 156, 96, 0.12);
    animation: onlinePulse 1.8s ease-out infinite;
}

@keyframes onlinePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(32, 156, 96, 0.36);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(32, 156, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(32, 156, 96, 0);
    }
}

.statusBadge svg,
.menuButton svg,
.closeButton svg,
.themeToggle svg,
.cycleCard svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.loggedUser {
    color: var(--text);
    font-weight: 800;
}

.menuButton,
.closeButton,
.themeToggle {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.closeButton::before,
.closeButton::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 99px;
}

.closeButton {
    position: relative;
}

.closeButton::before {
    transform: rotate(45deg);
}

.closeButton::after {
    transform: rotate(-45deg);
}

.sideMenu,
.sidePodMenu {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    width: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 20px;
    background: var(--surface);
    box-shadow: -18px 0 55px rgba(15, 23, 42, 0.16);
    transition: width 0.28s ease;
}

.sidePodMenu {
    top: 2vh;
    top: 2dvh;
    right: 16px;
    height: 96vh;
    height: 96dvh;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.sidePodMenu .settingsHeader,
.sidePodMenu .settings {
    width: 100%;
}

.settingsHeader {
    width: 330px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 0 20px 16px;
    border-bottom: 1px solid var(--line);
}

.settname {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
}

.settingsHeader small {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.settings {
    width: 330px;
    display: grid;
    gap: 12px;
    padding: 16px 20px 24px;
}

.settings label,
.settings p {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.settingsItem,
.tempsetBtn {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
    font-weight: 700;
}

input[type="submit"].settingsItem,
.tempsetBtn {
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
    border-color: rgba(244, 179, 33, 0.34);
}

.settingsItemUsersImg {
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.imagepv {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.settingsGroup,
.temperatura,
.controlSettings,
.controlGroup {
    display: grid;
    gap: 10px;
}

.settingsGroup {
    padding: 12px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.settingsGroupTitle {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.settingsGroup .settingsItem {
    background: var(--surface);
}

.settingsGroup input[type="submit"].settingsItem {
    justify-content: center;
    color: var(--text);
    background: var(--surface);
    border-color: var(--line);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.settingsGroup .sterowanie {
    background: color-mix(in srgb, var(--info) 14%, var(--surface));
    border-color: color-mix(in srgb, var(--info) 34%, var(--line));
}

.settingsGroup .grzanie {
    background: color-mix(in srgb, var(--heat) 16%, var(--surface));
    border-color: color-mix(in srgb, var(--heat) 36%, var(--line));
}

.settingsGroup .debugowanie {
    background: var(--surface);
}

.settingsGroup input[type="submit"].settingsItem:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}


/* Przycisk przelaczania kanalu testowego OTA (tylko dla id=1) */
.settingsGroup input[type="submit"].testBtn {
    transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}

.settingsGroup input[type="submit"].testBtn.off {
    background: #28a745 !important;
    color: #ffffff !important;
    border-color: #218838 !important;
}

.settingsGroup input[type="submit"].testBtn.off:hover {
    background: #218838 !important;
}

.settingsGroup input[type="submit"].testBtn.on {
    background: #990d18 !important;
    color: #ffffff !important;
    border-color: #7d0b14 !important;
}

.settingsGroup input[type="submit"].testBtn.on:hover {
    background: #7d0b14 !important;
}

.settingsGroup input[type="submit"].settingsItem.is-active-setting {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 14%, var(--surface));
    border-color: color-mix(in srgb, var(--success) 38%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 12%, transparent);
}

.temperatura .sterBtn,
.temperatura .grzBtn,
.temperatura .degBtn,
.temperatura .testBtn {
    display: block;
}
.temperatura .testBtn[style*="display: none"],
.temperatura .testBtn[style*="display:none"] {
    display: none !important;
}

.settingsItem:disabled,
.tempsetBtn:disabled,
.stepBtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.boilerHoursGrid.is-readonly .hourCell {
    opacity: 0.65;
    pointer-events: none;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.dashboard {
    display: grid;
    gap: 18px;
}

.dashboard > .heatKpiGrid {
    order: 1;
}

.dashboard > .heatOverview {
    order: 2;
}

.dashboard > .cycleStrip {
    order: 3;
}

.dashboard > .heatAnalytics {
    order: 4;
}

.dashboard > .heatCharts {
    order: 5;
}

.dashboard > .debugSection {
    order: 6;
}

.kpiCard,
.analyticsPanel,
.statusPanel,
.energyCard,
.chartDane,
.heatDiagram,
.cycleCard > div {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
    color: var(--accent-dark);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mutedBadge {
    color: var(--muted);
}

.kpiGrid,
.analyticsGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.heatKpiGrid.has-buffer {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.heatAnalytics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.heatApp.no-cop .heatAnalytics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpiCard {
    min-width: 0;
    margin: 0;
    padding: 18px;
}

.kpiCard legend {
    padding: 0 8px;
    color: var(--accent-dark);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.kpiLabel,
.panelTitle small,
.diagramTitle small,
.cycleCard small {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.eDane,
.val {
    font-weight: 850;
}

.kpiCard .eDane,
.kpiCard .val {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-top: 10px;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1;
}

.outdoorTempCard .eDane {
    color: var(--info);
}

.homeTempCard .eDane {
    color: var(--success);
}

.tempCard {
    transition: background 0.25s ease, border-color 0.25s ease;
}

.boilerTempCard .eDane {
    color: #b94718;
}

.boilerTempCard.temp-cold {
    background: linear-gradient(135deg, color-mix(in srgb, #dff2ff 72%, var(--surface)), var(--surface));
    border-color: color-mix(in srgb, #2496d2 30%, var(--line));
}

.boilerTempCard.temp-cold .eDane {
    color: #227cc6;
}

.boilerTempCard.temp-warm {
    background: linear-gradient(135deg, color-mix(in srgb, #fff4c7 72%, var(--surface)), color-mix(in srgb, #ffd08a 34%, var(--surface)));
    border-color: color-mix(in srgb, #f4b321 38%, var(--line));
}

.boilerTempCard.temp-warm .eDane {
    color: #c88400;
}

.boilerTempCard.temp-hot {
    background: linear-gradient(135deg, color-mix(in srgb, #ffe0b2 64%, var(--surface)), color-mix(in srgb, #ffd2c6 42%, var(--surface)));
    border-color: color-mix(in srgb, #d26a1e 38%, var(--line));
}

.boilerTempCard.temp-hot .eDane {
    color: #d26a1e;
}

.bufferTempCard {
    background: linear-gradient(135deg, color-mix(in srgb, var(--info) 16%, var(--surface)), var(--surface));
    border-color: color-mix(in srgb, var(--info) 36%, var(--line));
}

.bufferTempCard .eDane {
    color: var(--info);
}

body[data-theme="dark"] .boilerTempCard.temp-cold {
    background: linear-gradient(135deg, color-mix(in srgb, #0d3f62 38%, var(--surface)), var(--surface));
}

body[data-theme="dark"] .boilerTempCard.temp-warm {
    background: linear-gradient(135deg, color-mix(in srgb, #6d4b05 32%, var(--surface)), color-mix(in srgb, #8a4b08 24%, var(--surface)));
}

body[data-theme="dark"] .boilerTempCard.temp-hot {
    background: linear-gradient(135deg, color-mix(in srgb, #7a320d 32%, var(--surface)), color-mix(in srgb, #8d1f1f 22%, var(--surface)));
}

.tempCard.temp-cold {
    background: linear-gradient(135deg, color-mix(in srgb, #dff2ff 72%, var(--surface)), var(--surface));
    border-color: color-mix(in srgb, #2496d2 30%, var(--line));
}

.tempCard.temp-cold .eDane {
    color: #227cc6;
}

.tempCard.temp-warm {
    background: linear-gradient(135deg, color-mix(in srgb, #e4f8dd 70%, var(--surface)), color-mix(in srgb, #b8e986 28%, var(--surface)));
    border-color: color-mix(in srgb, #22a85f 36%, var(--line));
}

.tempCard.temp-warm .eDane {
    color: var(--success);
}

.tempCard.temp-hot {
    background: linear-gradient(135deg, color-mix(in srgb, #ffe0b2 64%, var(--surface)), color-mix(in srgb, #ffd2c6 42%, var(--surface)));
    border-color: color-mix(in srgb, #d26a1e 38%, var(--line));
}

.tempCard.temp-hot .eDane {
    color: #d26a1e;
}

body[data-theme="dark"] .tempCard.temp-cold {
    background: linear-gradient(135deg, color-mix(in srgb, #0d3f62 38%, var(--surface)), var(--surface));
}

body[data-theme="dark"] .tempCard.temp-warm {
    background: linear-gradient(135deg, color-mix(in srgb, #0f5132 36%, var(--surface)), color-mix(in srgb, #1f7a45 20%, var(--surface)));
}

body[data-theme="dark"] .tempCard.temp-hot {
    background: linear-gradient(135deg, color-mix(in srgb, #7a320d 32%, var(--surface)), color-mix(in srgb, #8d1f1f 22%, var(--surface)));
}

.boilerTempCard.temp-cold {
    background: linear-gradient(135deg, color-mix(in srgb, #dff2ff 72%, var(--surface)), var(--surface));
    border-color: color-mix(in srgb, #2496d2 30%, var(--line));
}

.boilerTempCard.temp-cold .eDane {
    color: #227cc6;
}

.boilerTempCard.temp-warm {
    background: linear-gradient(135deg, color-mix(in srgb, #fff4c7 72%, var(--surface)), color-mix(in srgb, #ffd08a 34%, var(--surface)));
    border-color: color-mix(in srgb, #f4b321 38%, var(--line));
}

.boilerTempCard.temp-warm .eDane {
    color: #c88400;
}

.boilerTempCard.temp-hot {
    background: linear-gradient(135deg, color-mix(in srgb, #ffe0b2 64%, var(--surface)), color-mix(in srgb, #ffd2c6 42%, var(--surface)));
    border-color: color-mix(in srgb, #d26a1e 38%, var(--line));
}

.boilerTempCard.temp-hot .eDane {
    color: #d26a1e;
}

body[data-theme="dark"] .boilerTempCard.temp-cold {
    background: linear-gradient(135deg, color-mix(in srgb, #0d3f62 38%, var(--surface)), var(--surface));
}

body[data-theme="dark"] .boilerTempCard.temp-warm {
    background: linear-gradient(135deg, color-mix(in srgb, #6d4b05 32%, var(--surface)), color-mix(in srgb, #8a4b08 24%, var(--surface)));
}

body[data-theme="dark"] .boilerTempCard.temp-hot {
    background: linear-gradient(135deg, color-mix(in srgb, #7a320d 32%, var(--surface)), color-mix(in srgb, #8d1f1f 22%, var(--surface)));
}

.unit,
.metricUnit {
    margin-left: 0.22rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.heatOverview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    align-items: stretch;
}

.heatDiagram {
    min-height: 0;
    display: grid;
    gap: 18px;
    overflow: hidden;
    padding: 18px;
    background: var(--surface);
}

body[data-theme="dark"] .heatDiagram {
    background: var(--surface);
}

.diagramTitle {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.diagramTitle span {
    font-size: 0.92rem;
    font-weight: 900;
}

.pumpCore {
    width: 100%;
    min-height: 278px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 6px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
}

.pumpFanIcon {
    width: 136px;
    height: 136px;
    display: grid;
    place-items: center;
    color: var(--accent-dark);
    animation: pumpFanSpin 3.8s linear infinite paused;
    will-change: transform;
}

.heatFlowMap.is-pump-active .pumpFanIcon {
    animation-play-state: running;
}

.pumpFanIcon svg {
    width: 100%;
    height: 100%;
    color: currentColor;
    transform-origin: 50% 50%;
    transform-box: fill-box;
}

.bufferIconSvg {
    fill: none;
    stroke: currentColor;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pumpCore span {
    font-weight: 900;
}

.pumpCore strong {
    display: inline-flex;
    align-items: baseline;
    gap: 0.28rem;
    color: var(--text);
    font-size: 1rem;
}

.pumpCore strong .unit {
    margin-left: 0;
}

.pumpCore.is-off .pumpFanIcon {
    color: var(--muted);
    animation: none;
    transform: none;
    will-change: auto;
}

.pumpCore.is-off .pumpFanIcon svg {
    transform: none;
}

.pumpCore.is-buffer .pumpFanIcon {
    color: var(--accent-dark);
    animation: none;
    transform: none;
    will-change: auto;
}

.pumpCore.is-buffer .pumpFanIcon svg {
    transform: none;
}

.pumpCore.is-on .pumpFanIcon {
    color: var(--pump-sand, #dcb36c);
    filter: drop-shadow(0 0 10px rgba(220, 179, 108, 0.35));
    animation: pumpFanSpin 2.6s linear infinite;
    animation-play-state: running;
}

.pumpCore.is-on .pumpCoreValue {
    color: var(--pump-sand, #dcb36c);
}

.pumpCore.is-turbo .pumpFanIcon {
    color: var(--pump-orange, #ff9800);
    filter: drop-shadow(0 0 12px rgba(255, 152, 0, 0.45));
    animation: pumpFanSpin 1.4s linear infinite;
    animation-play-state: running;
}

.pumpCore.is-turbo .pumpCoreValue {
    color: var(--pump-orange, #ff9800);
}

.pumpCore.is-error .pumpFanIcon {
    color: var(--pump-error, #ef4444);
    filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.5));
    animation: pumpErrorPulse 1.8s ease-in-out infinite;
    transform: none;
    will-change: auto;
}

.pumpCore.is-error .pumpFanIcon svg {
    transform: none;
}

.pumpCore.is-error .pumpCoreLabel,
.pumpCore.is-error .pumpCoreValue {
    color: var(--pump-error, #ef4444);
}

@keyframes pumpErrorPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(239, 68, 68, 0));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.45));
    }
}

.diagramNode {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 16px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
}

.diagramNode svg {
    width: 28px;
    height: 28px;
    color: var(--info);
}

.diagramNode > span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.diagramNode strong {
    display: inline-flex;
    align-items: baseline;
    gap: 0.28rem;
    color: var(--text);
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 900;
    line-height: 1;
}

.diagramNode strong .unit {
    margin-left: 0;
    font-size: clamp(0.78rem, 1.1vw, 0.95rem);
    opacity: 0.86;
}

.diagramNode strong span:not(.unit) {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.heatFlowMap {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.pumpWide {
    min-height: 344px;
    display: flex;
    flex-direction: column;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: none;
    padding: 12px;
    gap: 8px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.pumpWide:has(.pumpCore.is-on),
.pumpWide.is-on {
    border-color: rgba(220, 179, 108, 0.5);
    box-shadow: 0 0 18px rgba(220, 179, 108, 0.22);
}

.pumpWide:has(.pumpCore.is-turbo),
.pumpWide.is-turbo {
    border-color: rgba(255, 152, 0, 0.55);
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.25);
}

.pumpWide:has(.pumpCore.is-error),
.pumpWide.is-error {
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.24);
}

.pumpWide .panelTitle {
    justify-content: center;
    margin-bottom: 0;
}

.pumpWideBody {
    flex: 1;
    display: flex;
    align-items: stretch;
    gap: 12px;
    min-height: 0;
}

.sideIcons {
    flex: 1.25 1 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    min-width: 0;
}

.sideIcons .statusIcon {
    flex: 1 1 0;
    width: 100%;
    min-height: 64px;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.pumpWideBody .sideIcons .statusIcon {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.sideIcons .statusIcon svg {
    width: 72px;
    height: 72px;
}

.sideIcons .statusIcon small {
    font-size: 0.78rem;
}

.pumpWide .pumpCore {
    flex: 1.2 1 0;
    width: auto;
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.modePanel,
.instantPowerPanel,
.powerChartPanel {
    min-height: 278px;
}

.modePanel {
    align-content: center;
}

.modePanel .panelTitle {
    justify-content: center;
    margin-bottom: 12px;
}

.modePanel .functionGrid > div {
    min-height: 224px;
    height: 100%;
    align-content: center;
    padding: 8px;
    background: transparent;
    border: 0;
}

.instantPowerPanel {
    align-content: center;
}

.powerChartPanel {
    align-content: stretch;
    padding: 12px;
}

.powerChartPanel .panelTitle {
    margin-bottom: 8px;
}

.powerChartPanelDay {
    height: 230px;
    min-height: 0;
    padding: 8px;
}

.modePanel .activeFunctions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
    justify-content: stretch;
    align-content: stretch;
    place-items: stretch;
    max-width: 100%;
    min-height: 204px;
    height: 100%;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    border: 0;
}

.modePanel .activeFunctions.is-on {
    color: inherit;
    background: transparent;
    border: 0;
    box-shadow: none;
    animation: none;
}

.modePanel .statusIcon {
    width: 100%;
    height: 100%;
    min-height: 94px;
    padding: 10px 8px;
}

.modePanel .statusIcon svg {
    width: 52px;
    height: 52px;
}

.modePanel .statusIcon small {
    font-size: 0.74rem;
}

.modePanel .statusIcon.is-co {
    grid-row: 2;
}

.instantPowerPanel .daneW {
    height: 100%;
    align-content: stretch;
}

.instantPowerPanel .daneW > div {
    align-content: center;
    min-height: 122px;
}

.receiverStack {
    display: grid;
    gap: 12px;
}

.diagramLink {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 8px;
    min-width: 0;
}

.diagramLink small {
    display: none;
}

.linkLine {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--info) 30%, var(--line));
}

.linkLine::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 46%;
    border-radius: inherit;
    background: linear-gradient(90deg, transparent, color-mix(in srgb, currentColor 58%, transparent), transparent);
    opacity: 0.65;
    animation: pipeFlow 2.6s linear infinite paused;
}

.sourceLine {
    color: var(--info);
}

.supplyLine {
    color: var(--heat);
    background: color-mix(in srgb, var(--heat) 52%, var(--line));
}

.returnLine {
    color: var(--cool);
    background: color-mix(in srgb, var(--cool) 48%, var(--line));
}

.heatFlowMap.is-source-active .sourceLine::after,
.heatFlowMap.is-co-active .supplyLine::after,
.heatFlowMap.is-cwu-active .returnLine::after {
    animation-play-state: running;
}

body.is-data-stale .heatDiagram,
body.is-data-stale .statusPanel,
body.is-data-stale .analyticsPanel,
body.is-data-stale .cycleCard > div,
body.is-data-stale .kpiCard {
    opacity: 0.56;
}

body.is-data-stale .pumpFanIcon,
body.is-data-stale .linkLine::after,
body.is-data-stale .functionState.is-on {
    animation-play-state: paused;
}

@keyframes pipeFlow {
    from {
        transform: translateX(-120%);
    }
    to {
        transform: translateX(240%);
    }
}

@keyframes pumpFanSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

body[data-theme="dark"] .diagramTitle,
body[data-theme="dark"] .diagramNode {
    background: transparent;
}

body[data-theme="dark"] .diagramNode,
body[data-theme="dark"] .pumpCore {
    background: var(--surface-2);
}

.statusStack,
.analyticsPanel,
.statusPanel {
    display: grid;
    align-content: start;
    gap: 16px;
}

.statusStack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.statusPanel,
.analyticsPanel,
.chartDane {
    padding: 18px;
}

.panelTitle {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.panelTitle span {
    font-weight: 850;
}

.heatAnalytics .panelTitle span,
.energyPanel .panelTitle span {
    color: var(--accent-dark);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chartDane .eyebrow,
.debugSection .eyebrow,
.heatAnalytics .panelTitle span,
.energyPanel .panelTitle span {
    color: var(--accent-dark);
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panelTitle small {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.functionGrid,
.miniStats,
.daneW {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.functionGrid {
    grid-template-columns: minmax(0, 1fr);
}

.daneW {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.functionGrid > div,
.miniStats > div,
.daneW > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 12px;
    color: var(--muted);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.84rem;
    font-weight: 800;
}

.daneW > div > span,
.functionGrid > div > span,
.miniStats > div > span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.functionGrid strong,
.miniStats strong,
.daneW strong {
    display: inline-flex;
    align-items: baseline;
    gap: 0.32rem;
    color: var(--text);
    font-size: 1.2rem;
}

.functionState {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 78px;
    padding: 8px 10px;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.88rem !important;
    line-height: 1;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.functionState svg {
    width: 17px;
    height: 17px;
}

.activeFunctions {
    align-items: stretch;
}

.activeFunctions {
    display: grid;
    grid-template-columns: repeat(4, minmax(64px, 92px));
    justify-content: start;
    width: 100%;
    gap: 8px;
}

.statusIcon {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 64px;
    padding: 6px;
    color: var(--text);
    background: color-mix(in srgb, var(--surface) 82%, var(--success));
    border: 1px solid color-mix(in srgb, var(--success) 24%, var(--line));
    border-radius: var(--radius);
}

.statusIcon svg {
    width: 30px;
    height: 30px;
    color: var(--success);
    stroke-width: 2.2;
}

.statusIcon small {
    max-width: 100%;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 850;
    line-height: 1.05;
    text-align: center;
    overflow-wrap: anywhere;
}

.statusIcon.is-on {
    background: color-mix(in srgb, var(--pump-sand, #dcb36c) 16%, var(--surface));
    border-color: color-mix(in srgb, var(--pump-sand, #dcb36c) 36%, var(--line));
}

.statusIcon.is-on svg {
    color: var(--pump-sand, #dcb36c);
}

.statusIcon.is-turbo {
    background: color-mix(in srgb, var(--pump-orange, #ff9800) 16%, var(--surface));
    border-color: color-mix(in srgb, var(--pump-orange, #ff9800) 36%, var(--line));
}

.statusIcon.is-turbo svg {
    color: var(--pump-orange, #ff9800);
}

.statusIcon.is-error {
    background: color-mix(in srgb, var(--pump-error, #ef4444) 16%, var(--surface));
    border-color: color-mix(in srgb, var(--pump-error, #ef4444) 36%, var(--line));
}

.statusIcon.is-error svg {
    color: var(--pump-error, #ef4444);
}

.statusIcon.is-cwu-piec {
    background: color-mix(in srgb, var(--surface) 82%, var(--heat));
    border-color: color-mix(in srgb, var(--heat) 30%, var(--line));
}

.statusIcon.is-cwu-piec svg {
    color: var(--heat);
}

.statusIcon.is-off {
    background: var(--surface);
    border-color: var(--line);
}

.statusIcon.is-off svg {
    color: var(--muted);
}

.functionState.is-on {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 10%, var(--surface));
    border-color: color-mix(in srgb, var(--success) 28%, var(--line));
    animation: stateBreath 2.4s ease-in-out infinite;
}

@keyframes stateBreath {
    0%, 100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 0%, transparent);
    }
    50% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 12%, transparent);
    }
}

.cycleStrip {
    width: 100%;
}

.energyPanel {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.cycleCard {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.energyCard,
.cycleCard > div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 14px;
    align-items: start;
    min-width: 0;
    padding: 22px;
}

.energyCard > svg,
.cycleCard > div > svg {
    grid-row: 1 / span 3;
    width: 42px;
    height: 42px;
    padding: 10px;
    color: var(--accent-dark);
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
    border: 1px solid rgba(244, 179, 33, 0.28);
    border-radius: var(--radius);
}

.energyCard > span,
.cycleCard span {
    font-weight: 850;
}

.energyCard small,
.cycleCard small {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.metricValue {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    width: fit-content;
    line-height: 1;
    white-space: nowrap;
}

.metricNumber {
    color: var(--text) !important;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    font-weight: 900;
}

.metricUnit {
    color: var(--muted) !important;
    font-size: clamp(0.72rem, 0.95vw, 0.88rem) !important;
    line-height: 1;
    font-weight: 800;
}

.sectionHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.sectionHeader h2 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2rem);
    line-height: 1.1;
}

.charts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.chartPanel {
    width: 100%;
    height: 300px;
    min-height: 0;
    padding: 14px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
}

.chartPanelDay {
    height: 680px;
}

.chartPanel canvas {
    width: 100% !important;
    height: 100% !important;
    max-height: none;
}

.debugSection {
    margin-top: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel);
    padding: 18px;
}

.debugSection.is-empty {
    display: none;
}

.cdebug {
    margin-top: 12px;
    min-height: 120px;
    max-height: 360px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    padding: 14px;
    color: var(--text);
    white-space: pre-wrap;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.82rem;
    line-height: 1.45;
}

.tzewAJAX,
.tdomAJAX,
.tbojAJAX,
.tgzAJAX,
.tgpAJAX,
.twzAJAX,
.twpAJAX {
    color: inherit;
}

.coptAJAX,
.copdAJAX,
.coplAJAX {
    color: inherit;
}

.p_aktualna_pobieranaAJAX,
.pob_el_dzisAJAX,
.pob_el_sezAJAX {
    color: inherit;
}

.p_cieplnaAJAX,
.prod_ciepl_dzisAJAX,
.prod_ciepl_sezAJAX {
    color: inherit;
}

@media (max-width: 980px) {
    .heatOverview,
    .analyticsGrid,
    .statusStack,
    .kpiGrid,
    .cycleCard {
        grid-template-columns: 1fr;
    }

    .heatKpiGrid.has-buffer {
        grid-template-columns: 1fr;
    }

    .heatDiagram {
        min-height: 0;
    }

    .heatFlowMap {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pumpWide {
        min-height: 0;
    }

    .pumpWideBody {
        flex-direction: row;
        gap: 6px;
    }

    .pumpWide .pumpCore {
        flex: 1.3 1 0;
        min-width: 0;
    }

    .sideIcons {
        flex: 1 1 0;
        flex-direction: column;
        flex-wrap: nowrap;
        min-height: 0;
        min-width: 0;
    }

    .sideIcons .statusIcon {
        min-width: 0;
        min-height: 0;
    }

    .sideIcons .statusIcon svg {
        width: 30px;
        height: 30px;
    }

    .sideIcons .statusIcon small {
        font-size: 0.62rem;
    }

    .diagramLink {
        min-height: 34px;
    }

    .linkLine {
        width: 8px;
        height: 34px;
    }

    .diagramNode {
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 8px 12px;
        padding: 16px;
    }

    .diagramNode svg {
        width: 26px;
        height: 26px;
    }

    .diagramNode > span {
        min-width: 0;
    }

    .diagramNode strong {
        justify-self: end;
        font-size: clamp(1.55rem, 6vw, 2rem);
    }

    .diagramNode strong .unit {
        font-size: 0.78rem;
    }

    .receiverStack {
        gap: 10px;
    }

    .modePanel .activeFunctions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(2, 1fr);
        gap: 10px;
        width: 100%;
        max-width: none;
        min-height: 188px;
        height: 100%;
        justify-content: stretch;
        align-content: stretch;
        place-items: stretch;
    }

    .modePanel .activeFunctions .statusIcon {
        width: 100%;
        height: 100%;
        min-width: 0;
        justify-self: stretch;
    }

    .dualLink {
        grid-template-columns: 1fr 1fr;
    }

    .dualLink small {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .appShell {
        width: min(100% - 18px, 1240px);
        padding-top: 10px;
    }

    .appHeader {
        grid-template-columns: 1fr auto auto;
        gap: 8px;
        min-height: 0;
        padding: 10px;
    }

    .headerContext {
        grid-column: 1 / -1;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 6px;
        order: 3;
        font-size: 0.78rem;
    }

    .systemStatus,
    .fwVersionChip,
    .installationChip {
        min-height: 32px;
        padding: 0 8px;
        gap: 6px;
        font-size: 0.78rem;
    }

    /* Widok pionowy (mobile):
       1. ONLINE godzina - ukryte slowo online/offline, sama godzina (zielona on / czerwona off)
       2. esp32 ver: data - ukryta etykieta 'esp32 ver:' i godzina, sama data
       3. instalacja - ukryta etykieta 'Instalacja', sam uzytkownik
    */
    .systemStatus .uptimeWord {
        display: none;
    }

    .fwVersionChip .fwLabelDesktop,
    .fwVersionChip .fwTime {
        display: none;
    }

    .fwVersionChip .fwLabelMobile {
        display: inline;
    }

    .installationChip .logged {
        display: none;
    }

    .sideMenu,
    .sidePodMenu {
        max-width: 100vw;
    }

    .sidePodMenu {
        top: 0;
        right: 0;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
    }

    .settings,
    .settingsHeader {
        width: min(350px, 100vw);
    }

    .functionGrid,
    .miniStats,
    .daneW {
        grid-template-columns: 1fr;
    }

    .heatKpiGrid,
    .heatKpiGrid.has-buffer {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
    }

    .heatKpiGrid.no-buffer {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .kpiCard {
        padding: 8px 6px;
    }

    .kpiCard legend {
        padding: 0 4px;
        font-size: 0.56rem;
        letter-spacing: 0.02em;
    }

    .kpiLabel {
        display: none;
    }

    .kpiCard .eDane {
        gap: 0.12rem;
        margin-top: 2px;
        font-size: clamp(1.1rem, 7vw, 1.65rem);
    }

    .kpiCard .unit {
        margin-left: 0;
        font-size: 0.58rem;
    }

    .heatDiagram {
        padding: 10px;
    }

    .diagramTitle {
        margin-bottom: 4px;
    }

    .modePanel {
        min-height: 0;
        margin-top: -4px;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
    }

    .modePanel .panelTitle {
        display: none;
    }

    .modePanel .functionGrid > div {
        min-height: 0;
        padding: 0;
        background: transparent;
        border: 0;
    }

    .modePanel .functionGrid {
        width: 100%;
    }

    .modePanel .activeFunctions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-template-rows: repeat(2, 1fr);
        gap: 8px;
        max-width: none;
        width: 100%;
        min-height: 150px;
        height: 100%;
        box-sizing: border-box;
        margin: 0;
        padding: 0;
        background: transparent;
        border: 0;
        border-radius: var(--radius);
        animation: none;
    }

    .modePanel .activeFunctions .statusIcon {
        min-width: 0;
        width: 100%;
        height: 100%;
        justify-self: stretch;
    }

    .modePanel .statusIcon {
        min-height: 72px;
        padding: 5px;
        background: transparent;
    }

    .pumpCore {
        min-height: 132px;
    }

    .pumpFanIcon {
        width: 82px;
        height: 82px;
    }

    .modePanel .statusIcon svg {
        width: 34px;
        height: 34px;
    }

    .heatAnalytics {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 8px;
    }

    .heatAnalytics .analyticsPanel {
        grid-column: 1 / -1;
        padding: 10px;
    }

    .heatAnalytics .panelTitle {
        align-items: center;
        gap: 8px;
    }

    .heatAnalytics .panelTitle span {
        font-size: 0.78rem;
    }

    .heatAnalytics .panelTitle small {
        font-size: 0.68rem;
    }

    .chartDane .eyebrow,
    .debugSection .eyebrow,
    .heatAnalytics .panelTitle span,
    .energyPanel .panelTitle span {
        font-size: 0.78rem;
        font-weight: 900;
        line-height: 1.1;
        letter-spacing: 0.04em;
    }

    .heatAnalytics .daneW {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .heatAnalytics .miniStats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .heatAnalytics .daneW > div,
    .heatAnalytics .miniStats > div {
        padding: 9px;
    }

    .heatAnalytics .daneW > div > span,
    .heatAnalytics .miniStats > div > span {
        font-size: 0.64rem;
    }

    .heatAnalytics .daneW strong,
    .heatAnalytics .miniStats strong {
        font-size: clamp(1.6rem, 8vw, 2.25rem);
        line-height: 0.95;
    }

    .cycleCard {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .cycleCard > div {
        grid-template-columns: 1fr;
        justify-items: start;
        align-content: center;
        gap: 8px;
        padding: 10px;
    }

    .cycleCard > div > svg {
        display: none;
    }

    .cycleCard span {
        font-size: 0.72rem;
        line-height: 1.1;
    }

    .cycleCard small {
        display: none;
    }

    .metricNumber {
        font-size: clamp(1.6rem, 8vw, 2.25rem);
        line-height: 0.95;
    }

    .cycleCard .metricValue {
        font-size: clamp(1.6rem, 8vw, 2.25rem);
        line-height: 0.95;
    }

    .cycleCard .metricNumber {
        font-size: inherit;
    }

    .metricUnit {
        font-size: 0.74rem !important;
    }

}

@media (max-width: 520px) {
    .pumpCore {
        min-height: 116px;
        padding: 18px;
    }

    .pumpFanIcon {
        width: 76px;
        height: 76px;
    }

    .diagramNode {
        padding: 14px 16px;
    }

    .cycleCard > div,
    .analyticsPanel,
    .statusPanel,
    .chartDane,
    .kpiCard {
        padding: 14px;
    }

    .chartPanel,
    .chartPanelDay {
        height: 300px;
    }

    .cycleCard > div {
        min-height: 94px;
        padding: 10px;
    }

    .heatAnalytics .analyticsPanel,
    .kpiCard {
        padding: 10px;
    }

    .kpiCard {
        padding: 8px 6px;
    }

    .pumpCore {
        min-height: 132px;
        padding: 14px;
    }

    .modePanel {
        padding: 0;
    }

    .chartPanelDay {
        height: 420px;
    }
}

.boilerHoursGrid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
}

.hourCell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 34px;
    padding: 4px 2px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hourCell input {
    accent-color: var(--accent);
    cursor: pointer;
}

.hourCell.is-on {
    color: var(--text);
    background: color-mix(in srgb, var(--accent) 22%, var(--surface));
    border-color: rgba(244, 179, 33, 0.5);
}

.bojlerGodzinyOpis {
    margin: 0;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.controlSettings input[type="range"].stepper-source {
    display: none;
}

.stepper {
    display: grid;
    grid-template-columns: 64px 1fr 64px;
    gap: 8px;
    align-items: stretch;
}

.stepBtn {
    min-height: 52px;
    padding: 0;
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
}

.stepBtn:hover {
    border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
}

.stepBtn:active {
    transform: scale(0.96);
    background: color-mix(in srgb, var(--accent) 18%, var(--surface));
}

.stepVal {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 8px;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    white-space: nowrap;
}

.sidePodMenu .settings p {
    color: var(--accent-dark);
}

@media (min-width: 761px) {
    .brand .logo {
        height: 64px;
    }
}

@media (orientation: portrait) and (max-width: 980px) {
    .systemStatus .uptimeWord {
        display: none;
    }

    .fwVersionChip .fwLabelDesktop,
    .fwVersionChip .fwTime {
        display: none;
    }

    .fwVersionChip .fwLabelMobile {
        display: inline;
    }

    .installationChip .logged {
        display: none;
    }
}