﻿html, body { margin: 0; padding: 0; }
:root {
    --color-primary: #009aa6;
    --color-secondary: #00828a;
    --color-bg-dark: #1d252d;
    --color-bg-light: #f7f9fa;
    --color-white: #ffffff;
    --color-text-main: #333d47;
    --color-text-muted: #707a84;
    --color-accent-orange: #ff5c00;
    --color-accent-blue: #0066cc;
}

/* Fonty lokalne */
@font-face {
    font-family: 'HisenseAlfabet';
    src: url('Fonty/HisenseAlfabet-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'HisenseAlfabet';
    src: url('Fonty/HisenseAlfabet-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'HisenseAlfabet';
    src: url('Fonty/HisenseAlfabet-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('Fonty/Poppins-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('Fonty/Poppins-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('Fonty/Poppins-Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('Fonty/Poppins-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('Fonty/Poppins-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'HisenseAlfabet', 'Poppins', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--color-text-main);
    background-color: var(--color-white);
    line-height: 1.6;
}

/* 2. Header i logo */
.top-header {
    background-color: var(--color-bg-dark);
    padding: 15px 5%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    border-bottom: 3px solid var(--color-primary);
    height: 80px;
}
.logo {
    color: var(--color-white);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}
.logo svg { width: 160px; height: auto; }
.logo span { color: var(--color-primary); }
.tag-tech {
    font-size: 11px; background: #333d47; color: #b0bac4;
    padding: 2px 8px; border-radius: 3px; vertical-align: middle; margin-left: 10px;
}
nav a { color: var(--color-white); text-decoration: none; margin-left: 20px; font-size: 15px; font-weight: 500; transition: color 0.3s; }
nav a:hover { color: var(--color-primary); }

/* 3. Hero */
.hero {
    background: linear-gradient(135deg, var(--color-bg-dark) 50%, #2c3845 100%);
    color: var(--color-white);
    padding: 40px 5% 20px;
    text-align: center;
}
.hero h1 { font-size: 28px; margin-bottom: 10px; font-weight: 600; }
.hero p { font-size: 14px; color: #b0bac4; max-width: 700px; margin: 0 auto; }

/* 4. Sekcja Suwaka Ciśnień */
.slider-section { background-color: #eef2f5; padding: 40px 5%; }
.slider-container {
    max-width: 500px; margin: 0 auto; background: var(--color-white);
    padding: 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); text-align: center;
}
.slider-ui { width: 100%; margin: 20px 0; accent-color: var(--color-primary); cursor: pointer; }
.temp-display { font-size: 24px; font-weight: 600; color: var(--color-text-main); }
.results-grid { display: grid; grid-template-columns: 1fr; gap: 15px; margin-top: 15px; }
.res-box { padding: 12px; border-radius: 6px; color: var(--color-white); }
.res-box.r32 { background-color: var(--color-accent-blue); }
.res-box.r290 { background-color: var(--color-accent-orange); }
.res-box h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; opacity: 0.9; font-weight: 600; }
.res-box .press-val { font-size: 20px; font-weight: 700; }

/* 5. Podział na Czynniki Chłodnicze */
.refrigerants { padding: 40px 5%; background-color: var(--color-white); }
.section-title { font-size: 22px; margin-bottom: 30px; text-align: center; position: relative; padding-bottom: 8px; font-weight: 600; }
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 40px; height: 2px; background-color: var(--color-primary); }
.grid-tech { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 100%; margin: 0 auto; padding: 0 10px; }
.tech-card { background-color: var(--color-bg-light); border-radius: 8px; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.tech-card.r32 { border-top: 4px solid var(--color-accent-blue); }
.tech-card.r290 { border-top: 4px solid var(--color-accent-orange); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 4px; font-weight: 600; font-size: 12px; color: var(--color-white); margin-bottom: 12px; }
.badge.r32 { background-color: var(--color-accent-blue); }
.badge.r290 { background-color: var(--color-accent-orange); }
.tech-table { width: 100%; border-collapse: collapse; margin-top: 15px; background: var(--color-white); font-size: 12px; }
.tech-table th, .tech-table td { padding: 8px; text-align: left; border-bottom: 1px solid #e2e8f0; }
.tech-table th { background-color: #e2e8f0; font-weight: 600; }

/* 6. Sekcja Dokumentacji */
.docs-section { background-color: var(--color-bg-light); padding: 40px 5%; }
.docs-list { max-width: 100%; margin: 0 auto; background: var(--color-white); border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.doc-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #f0f4f8; }
.doc-item:last-child { border-bottom: none; }
.doc-info h4 { font-size: 14px; color: var(--color-text-main); margin-bottom: 3px; font-weight: 600; }
.doc-info span { font-size: 10px; color: var(--color-text-muted); }
.btn-download { background-color: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); padding: 4px 12px; border-radius: 4px; text-decoration: none; font-weight: 600; font-size: 11px; transition: all 0.3s; }
.btn-download:hover { background-color: var(--color-primary); color: var(--color-white); }

/* 7. Sprawdzanie gwarancji */
.warranty-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}
.warranty-form .input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.warranty-form label {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-main);
}
.warranty-form input {
    padding: 10px 14px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.warranty-form input:focus { border-color: var(--color-primary); }
.warranty-form.warranty-form-wide { max-width: 480px; }
.warranty-form textarea {
    padding: 10px 14px;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s;
}
.warranty-form textarea:focus { border-color: var(--color-primary); }
.warranty-form .field-hint { font-size: 11px; color: var(--color-text-muted); }
.warranty-form .field-error { font-size: 12px; color: #c0392b; display: none; }
.warranty-form .input-group.has-error input,
.warranty-form .input-group.has-error textarea { border-color: #c0392b; }
.warranty-form .input-group.has-error .field-error { display: block; }
.warranty-form .checkbox-row { display: flex; align-items: center; gap: 8px; flex-direction: row; }
.warranty-form .checkbox-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--color-primary); cursor: pointer; }
.warranty-form .checkbox-row label { font-size: 13px; font-weight: 600; color: var(--color-text-main); cursor: pointer; }
.warranty-form .idu-section { display: flex; flex-direction: column; gap: 15px; padding: 12px; background: var(--color-bg-light); border-radius: 6px; }
.warranty-form .idu-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); }
.warranty-form .ahz-note { font-size: 12px; color: var(--color-text-muted); font-style: italic; }
.btn-check {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    align-self: flex-start;
}
.btn-check:hover { background-color: var(--color-secondary); }
.btn-check:disabled { background-color: var(--color-text-muted); cursor: default; }
.result-box {
    padding: 14px 16px;
    border-radius: 6px;
    font-size: 14px;
    min-height: 46px;
    display: flex;
    align-items: center;
    word-break: break-word;
}
.result-box.loading { background-color: #eef2f5; color: var(--color-text-muted); }
.result-box.error { background-color: #fde2e2; color: #942424; }
.result-box.success { background-color: #e2f0d9; color: #2d5a27; }
.result-box.success dl { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.result-box.success dt { font-weight: 700; }
.result-box.success dd { margin: 0; }
.result-box.success dt.subtitle { margin-top: 8px; border-top: 1px solid #c3d4c0; padding-top: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

/* 7. Stopka FIXED */
footer {
    position: fixed;
    bottom: 0; left: 260px; right: 0;
    background-color: var(--color-bg-dark);
    color: var(--color-text-muted);
    text-align: center;
    padding: 8px 5%;
    font-size: 11px;
    border-top: 1px solid #2c3845;
    z-index: 999;
}
footer a { color: var(--color-primary); text-decoration: underline; font-weight: 600; }
footer a:hover { color: var(--color-white); }

/* Layout - RESPONSIVE */
.page-wrapper {
    display: block;
    margin-top: 80px;
    padding-bottom: 50px;
}

.sidebar {
    position: fixed;
    top: 80px; left: 0; bottom: 0;
    width: 260px;
    background-color: var(--color-bg-dark);
    color: var(--color-white);
    padding: 1rem;
    border-right: 3px solid var(--color-primary);
    display: flex; flex-direction: column;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s;
}
.sidebar-nav ul { list-style: none; padding: 0; margin: 0; flex-grow: 1; }
.sidebar-nav li { margin-bottom: 1rem; }
.sidebar-nav a {
    display: flex; align-items: center; padding: 0.6rem 1rem;
    border-radius: 6px; color: var(--color-white); text-decoration: none;
    font-weight: 500; transition: all 0.2s ease; gap: 0.6rem;
}
.sidebar-nav a:hover { background-color: rgba(255,255,255,0.1); transform: translateX(4px); }
.sidebar-nav .active a { background-color: var(--color-primary); color: var(--color-white); }
.sidebar-nav .logout { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-nav .logout a { color: var(--color-accent-orange); font-weight: 600; }
.sidebar-nav .logout a:hover { background-color: rgba(255,92,0,0.1); color: var(--color-accent-orange); }
.sidebar-nav svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Narzędzia subsection */
.sidebar-nav .section-header {
    display: flex; align-items: center; padding: 0.6rem 1rem;
    color: var(--color-white); font-weight: 600; font-size: 14px;
    gap: 0.6rem; cursor: default;
}
.sidebar-nav .section-toggle {
    width: 100%; background: none; border: none; text-align: left;
    font-family: inherit; cursor: pointer;
}
.sidebar-nav .section-toggle:hover { background-color: rgba(255,255,255,0.1); }
.nav-section.open > .section-toggle { background-color: var(--color-primary); color: var(--color-white); }
.sidebar-nav .section-toggle .chev {
    margin-left: auto; width: 16px; height: 16px; flex-shrink: 0;
    transition: transform 0.2s;
}
.nav-section .chev { transform: rotate(-90deg); }
.nav-section.open > .section-toggle .chev { transform: rotate(0deg); }
.sidebar-nav .subsection { list-style: none; padding: 0; margin: 0; display: none; }
.nav-section.open > .subsection { display: block; }
.sidebar-nav .subsection li { margin-bottom: 0.2rem; }
.sidebar-nav .subsection a {
    display: block; padding: 0.4rem 1rem 0.4rem 2.5rem;
    font-size: 13px; color: var(--color-text-muted); text-decoration: none;
    border-radius: 4px; transition: all 0.2s;
}
.sidebar-nav .subsection a:hover { background-color: rgba(255,255,255,0.05); color: var(--color-white); }
.sidebar-nav .subsection small { font-size: 10px; color: var(--color-accent-orange); margin-left: 0.5rem; }
.sidebar-nav .subsection .section-toggle {
    padding: 0.4rem 1rem 0.4rem 2.5rem;
    font-size: 13px; color: var(--color-text-muted); font-weight: 500;
}
.sidebar-nav .subsection .section-toggle:hover { background-color: rgba(255,255,255,0.05); color: var(--color-white); }
.sidebar-nav .subsection .nav-section.open > .section-toggle {
    background-color: rgba(255,255,255,0.1); color: var(--color-white);
}
.sidebar-nav .subsection .section-toggle .chev { width: 12px; height: 12px; }
.sidebar-nav .subsection .subsection a { padding-left: 3.5rem; }
.sidebar-nav .subsection .subsection small { margin-left: 0.3rem; }

.main-content {
    margin-left: 260px;
    padding: 1rem 1.5%;
    padding-bottom: 60px;
    background-color: var(--color-white);
    overflow-y: auto;
}
@media (max-width: 1024px) {
    .sidebar { width: 220px; }
    .main-content { margin-left: 220px; }
    footer { left: 220px; }
}
@media (max-width: 768px) {
    .sidebar {
        position: static; width: 100%; height: auto;
        border-right: none; border-bottom: 3px solid var(--color-primary);
        margin-bottom: 1rem;
    }
    .main-content { margin-left: 0; padding: 1rem; }
    .top-header { flex-direction: column; gap: 1rem; text-align: center; height: auto; }
    footer { left: 0; }
}

/* ===== Pomiary i sekcje pomp ciepła ===== */
.model-picker { padding: 20px 0; }
.model-card { display: block; text-decoration: none; color: inherit; }
.model-card h3 { margin: 8px 0 4px; font-size: 18px; font-weight: 600; }
.model-card p { color: var(--color-text-muted); font-size: 13px; line-height: 1.5; }
.model-card.r32 { border-top: 4px solid var(--color-accent-blue); }
.model-card.r290 { border-top: 4px solid var(--color-accent-orange); }
.model-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,0.12); }

.dash-card { display: block; text-decoration: none; color: inherit; transition: transform 0.15s, box-shadow 0.15s; }
.dash-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.dash-card .dash-icon { font-size: 26px; color: var(--color-primary); display: block; margin-bottom: 6px; }
.dash-card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.dash-card p { margin: 0; color: var(--color-text-muted); font-size: 12px; line-height: 1.5; }

.back-row { margin-bottom: 14px; }
.page-title { display: inline-block; margin-left: 10px; font-size: 22px; font-weight: 600; }
.section-body { margin-top: 14px; }

/* Kody błędów (details) */
.alarm-list { display: flex; flex-direction: column; gap: 8px; }
.alarm-item { background: var(--color-bg-light); border-radius: 6px; padding: 10px 14px; border-left: 4px solid var(--color-primary); }
.alarm-item summary { cursor: pointer; display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.alarm-code { background: var(--color-primary); color: #fff; border-radius: 4px; padding: 2px 8px; font-weight: 700; font-size: 13px; min-width: 34px; text-align: center; }
.alarm-desc { flex: 1; font-size: 14px; }
.alarm-body { margin-top: 10px; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.alarm-body h5 { margin: 8px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); }
.alarm-causes, .alarm-solution { font-size: 13px; line-height: 1.6; }

/* Bloki ODU / Hi-Cube */
.block-section { font-size: 17px; font-weight: 600; margin: 22px 0 10px; border-bottom: 2px solid var(--color-primary); padding-bottom: 6px; }
.block-info { background: #eef2f5; border-left: 4px solid var(--color-primary); padding: 10px 14px; border-radius: 4px; font-size: 13px; margin: 10px 0; }
.block-legend { background: #fff4e8; border-left: 4px solid var(--color-accent-orange); padding: 10px 14px; border-radius: 4px; font-size: 13px; margin: 10px 0; }
.block-step { display: flex; gap: 12px; margin: 12px 0; }
.step-no { background: var(--color-primary); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.step-body { font-size: 13px; line-height: 1.6; }
.func-item { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; font-size: 13px; }
.func-item.highlight { background: #fff8e1; }
.func-no { color: var(--color-text-muted); min-width: 22px; text-align: right; }
.func-code { background: var(--color-accent-blue); color: #fff; border-radius: 3px; padding: 1px 7px; font-weight: 700; font-family: monospace; }
.func-name { flex: 1; }
.func-detail { margin: 6px 0; background: var(--color-bg-light); border-radius: 6px; padding: 8px 12px; }
.func-detail summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.func-detail div { font-size: 13px; margin-top: 8px; line-height: 1.6; }
.pw-card { background: var(--color-bg-light); border: 1px solid #e2e8f0; border-radius: 6px; padding: 12px; margin: 10px 0; }
.pw-role { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-primary); }
.pw-keys { display: flex; gap: 6px; margin: 8px 0; }
.pw-key { background: var(--color-primary); color: #fff; width: 30px; height: 30px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.pw-desc { font-size: 13px; color: var(--color-text-muted); }
.menu-header { font-size: 15px; font-weight: 700; margin: 18px 0 8px; color: var(--color-primary); }
.menu-item { display: flex; gap: 12px; padding: 7px 10px; border-bottom: 1px solid #eef2f5; font-size: 13px; }
.menu-item.level-1 { font-weight: 600; }
.menu-item.level-2 { padding-left: 24px; }
.menu-item.level-3 { padding-left: 40px; }
.menu-code { background: var(--color-accent-blue); color: #fff; border-radius: 3px; padding: 1px 7px; font-weight: 700; font-family: monospace; align-self: flex-start; }
.menu-body strong { display: block; }
.menu-body div { color: var(--color-text-muted); font-size: 12px; }
.disp-code { display: flex; gap: 12px; align-items: center; padding: 6px 10px; border-radius: 4px; margin: 4px 0; font-size: 13px; }
.disp-value { background: var(--color-text-muted); color: #fff; border-radius: 3px; padding: 2px 8px; font-weight: 700; font-family: monospace; }
.disp-brand .disp-value { background: var(--color-primary); }
.disp-red .disp-value { background: #c0392b; }
.disp-green .disp-value { background: #2d5a27; }
.disp-grey .disp-value { background: var(--color-text-muted); }

/* Kody zatrzymań */
.stop-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .stop-grid { grid-template-columns: 1fr 1fr; } }
.stop-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--color-text-muted); }
.stop-row { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border-bottom: 1px solid #eef2f5; font-size: 13px; }
.stop-code { background: var(--color-accent-blue); color: #fff; border-radius: 3px; padding: 1px 8px; font-weight: 700; font-family: monospace; min-width: 30px; text-align: center; }
.stop-state { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 3px; text-transform: uppercase; }
.stop-state-ok { background: #e2f0d9; color: #2d5a27; }
.stop-state-warning { background: #fff3cd; color: #856404; }
.stop-state-error { background: #fde2e2; color: #942424; }
.stop-desc { flex: 1; }

/* WP1 */
.wp1-table { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.wp1-row { display: grid; grid-template-columns: 60px 1fr; gap: 8px; background: var(--color-bg-light); padding: 8px 12px; border-radius: 6px; font-size: 13px; }
@media (min-width: 768px) { .wp1-row { grid-template-columns: 60px 1.4fr 1.4fr 70px; } }
.wp1-signal { font-weight: 700; font-family: monospace; color: var(--color-primary); }
.wp1-state { font-size: 10px; font-weight: 700; text-transform: uppercase; align-self: start; padding: 1px 6px; border-radius: 3px; }
.wp1-state-ok { background: #e2f0d9; color: #2d5a27; }
.wp1-state-warning { background: #fff3cd; color: #856404; }
.wp1-state-error { background: #fde2e2; color: #942424; }

/* Pomiary elementów */
.measure-table { margin-top: 8px; }
.matrix-wrap { overflow-x: auto; margin-top: 8px; }
.matrix-table { margin-top: 0; }
.matrix-table th, .matrix-table td { text-align: center; white-space: nowrap; }
.matrix-table thead th, .matrix-table tbody th { background: transparent; }
.matrix-table thead th:first-child { border-bottom: 2px solid var(--color-primary); }
.matrix-table tbody th { font-weight: 600; text-align: left; }
.matrix-table td.matrix-diag { color: var(--color-text-muted); background: var(--color-bg-light); }
.matrix-table td.matrix-inf { color: #c3ccd2; font-weight: 400; }
.wire-chip {
    display: inline-block; padding: 3px 10px;
    border-radius: 4px; font-weight: 700; font-size: 12px; white-space: nowrap;
}

/* Przełączniki DIP */
.dip-section { margin: 14px 0; }
.dip-name { font-size: 15px; font-weight: 700; color: var(--color-primary); margin-bottom: 6px; }
.dip-row { display: flex; gap: 12px; align-items: center; padding: 6px 10px; border-bottom: 1px solid #eef2f5; font-size: 13px; }
.dip-no { background: var(--color-accent-blue); color: #fff; border-radius: 3px; padding: 1px 8px; font-weight: 700; min-width: 30px; text-align: center; }
.dip-desc { flex: 1; }

/* ===== Narzędzia (do pomp) ===== */
.badge.pump { background-color: var(--color-primary); }
.badge.klima { background-color: var(--color-accent-blue); }
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 14px; }
@media (min-width: 768px) { .tool-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.tool-card { background-color: var(--color-bg-light); border-radius: 8px; padding: 20px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); text-decoration: none; display: block; color: inherit; transition: all 0.15s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
.tool-card h3 { margin: 8px 0 6px; font-size: 16px; font-weight: 600; }
.tool-card p { color: var(--color-text-muted); font-size: 13px; line-height: 1.5; margin-bottom: 8px; }
.tool-note { background: #e8f5f6; border-left: 4px solid var(--color-primary); padding: 10px 14px; border-radius: 4px; font-size: 13px; margin: 12px 0; }
.tool-box { background: var(--color-white); border-radius: 8px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); max-width: 620px; margin: 0 auto; }
.toggle-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; align-items: center; }
.toggle-btn { padding: 8px 16px; border: 2px solid var(--color-text-muted); background: var(--color-white); color: var(--color-text-muted); border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit; }
.toggle-btn.active { background-color: var(--color-primary); border-color: var(--color-primary); color: var(--color-white); }
.tool-field { margin: 14px 0; }
.tool-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.tool-field .value-field { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tool-field input[type="text"], .tool-field input[type="number"] { width: 110px; padding: 8px 10px; border: 1px solid #d0d7de; border-radius: 6px; font-size: 15px; font-family: inherit; }
.tool-field input[type="text"]:focus, .tool-field input[type="number"]:focus { border-color: var(--color-primary); outline: none; }
.tool-field select {
    width: 100%; padding: 10px 14px 10px 14px; margin-top: 0;
    border: 1px solid #d0d7de; border-radius: 6px;
    font: inherit; font-size: 15px; color: var(--color-text-main); background: var(--color-white);
    box-sizing: border-box; cursor: pointer;
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23707a84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tool-field select:hover { border-color: #b7c1c9; }
.tool-field select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 154, 166, 0.15);
}
.slider-ui { width: 100%; accent-color: var(--color-primary); cursor: pointer; }
.slider-limits { display: flex; justify-content: space-between; font-size: 11px; color: var(--color-text-muted); }
.tool-result { padding: 14px 16px; border-radius: 6px; font-size: 14px; margin-top: 14px; white-space: pre-line; }
.tool-result.error { background-color: #fde2e2; color: #942424; }
.tool-result.warning { background-color: #fff3cd; color: #856404; }
.tool-result.success { background-color: #e2f0d9; color: #2d5a27; }
.tool-result .big { font-size: 20px; font-weight: 700; }
.tool-result .muted { color: #5a6b57; font-size: 13px; }

/* Klimatyzacje – Hisense kody błędów */
.ac-codes { background: var(--color-bg-light); padding: 40px 20px; }
.ac-codes .panel { background: var(--color-white); border: 1px solid #dce5e9; border-radius: 12px; padding: 24px; margin: 20px 0; }
.ac-codes .controls { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.ac-codes label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--color-text-main); }
.ac-codes input, .ac-codes select {
    width: 100%; padding: 12px 14px; margin-top: 8px;
    border: 1px solid #d0d7de; border-radius: 8px;
    font: inherit; font-size: 15px; line-height: 1.4; color: var(--color-text-main); background: var(--color-white);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.ac-codes input:hover:not(:disabled), .ac-codes select:hover:not(:disabled) { border-color: #b7c1c9; }
.ac-codes input:focus, .ac-codes select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 154, 166, 0.15);
}
.ac-codes input::placeholder { color: var(--color-text-muted); }
.ac-codes select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23707a84' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 15px;
}
.ac-codes select::-ms-expand { display: none; }
.ac-codes select:disabled {
    background-color: var(--color-bg-light);
    color: var(--color-text-muted);
    cursor: not-allowed;
    border-color: #e2e8f0;
    opacity: 0.75;
}
.ac-codes .autocomplete { position: relative; }
.ac-codes .autocomplete-list {
    position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px;
    background: var(--color-white); border: 1px solid #d0d7de; border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    list-style: none; padding: 6px; max-height: 280px; overflow-y: auto;
    z-index: 20;
}
.ac-codes .autocomplete-item {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; line-height: 1.3;
}
.ac-codes .autocomplete-item:hover, .ac-codes .autocomplete-item.active { background-color: var(--color-bg-light); }
.ac-codes .autocomplete-item mark { background: rgba(0, 154, 166, 0.18); color: var(--color-secondary); border-radius: 3px; padding: 0 1px; }
.ac-codes .autocomplete-type { font-size: 11px; color: var(--color-text-muted); white-space: nowrap; flex-shrink: 0; }
.ac-codes .autocomplete-empty { padding: 9px 10px; font-size: 13px; color: var(--color-text-muted); }
.ac-codes #diodeFilters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 20px; }
.ac-codes #diodeFilters label { display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.ac-codes button#reset {
    padding: 10px 16px; background: var(--color-primary); color: var(--color-white); border: 0;
    border-radius: 6px; font: inherit; font-size: 16px; cursor: pointer;
    margin-top: 14px; transition: background 0.2s;
}
.ac-codes button#reset:hover { background: var(--color-secondary); }
.ac-codes #status { white-space: pre-line; color: var(--color-text-muted); margin-top: 12px; line-height: 1.5; }
.ac-codes #results { margin-top: 20px; }
.ac-codes article { background: var(--color-white); border: 1px solid #dce5e9; border-radius: 12px; padding: 24px; margin: 20px 0; }
.ac-codes h2 { color: var(--color-primary); margin: 0 0 8px; }
.ac-codes .muted { color: var(--color-text-muted); font-size: 14px; }
.ac-codes .description { white-space: pre-wrap; line-height: 1.6; margin: 12px 0; }
.ac-codes dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.ac-codes dl div { padding: 10px; background: var(--color-bg-light); border-radius: 6px; }
.ac-codes dt { font-size: 13px; color: var(--color-text-muted); font-weight: 600; }
.ac-codes dd { margin: 5px 0 0; color: var(--color-text-main); }
.ac-codes .intro { color: var(--color-text-muted); margin-bottom: 16px; }
.ac-codes .hero { background: transparent; padding: 0; margin-bottom: 24px; }
.ac-codes .hero h1 { color: var(--color-text-main); margin-bottom: 8px; }
.ac-codes .hero .muted { color: var(--color-text-muted); }

@media (max-width: 650px) {
    .ac-codes { padding: 12px; }
    .ac-codes .panel, .ac-codes article { padding: 18px; }
    .ac-codes .controls, .ac-codes dl { grid-template-columns: 1fr; }
    .ac-codes #diodeFilters { grid-template-columns: 1fr; }
}
@media print {
    .ac-codes { background: var(--color-white); padding: 0; }
    .ac-codes .controls, .ac-codes button, .ac-codes .intro { display: none; }
    .ac-codes article { break-inside: avoid; border-color: #ccc; }
}

/* FAQ */
.faq-page { padding: 12px 0 0; }
.faq-page .hero { background: transparent; padding: 0; margin-bottom: 28px; text-align: left; }
.faq-page .hero h1 { color: var(--color-text-main); margin-bottom: 8px; }
.faq-page .hero .muted { color: var(--color-text-muted); font-size: 14px; max-width: none; margin: 0; }
.faq-panel { background: var(--color-white); border: 1px solid #dce5e9; border-radius: 12px; padding: 28px; margin-bottom: 20px; }
.faq-search-wrap { position: relative; margin-bottom: 18px; }
.faq-search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--color-text-muted); pointer-events: none; }
.faq-search {
    width: 100%; box-sizing: border-box; padding: 16px 18px 16px 52px; font-size: 17px;
    border: 2px solid #dce5e9; border-radius: 10px; font-family: inherit;
    background: var(--color-bg-light); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.faq-search::placeholder { color: var(--color-text-muted); }
.faq-search:focus { outline: none; border-color: var(--color-primary); background: var(--color-white); box-shadow: 0 0 0 4px rgba(0, 154, 166, 0.12); }
.faq-search-wrap:focus-within .faq-search-icon { color: var(--color-primary); }
.faq-count { color: var(--color-text-muted); font-size: 13px; margin: 12px 0 0; }
.faq-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.faq-item { background: var(--color-bg-light); border-radius: 8px; padding: 4px 16px; border-left: 4px solid var(--color-primary); }
.faq-item summary { cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 12px 0; font-weight: 600; font-size: 14px; color: var(--color-text-main); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { margin-left: auto; flex-shrink: 0; transition: transform 0.2s; color: var(--color-text-muted); }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-cat { background: var(--color-accent-orange); color: #fff; border-radius: 4px; padding: 2px 8px; font-weight: 700; font-size: 11px; letter-spacing: 0.3px; flex-shrink: 0; }
.faq-item .faq-cat.ac { background: var(--color-accent-blue); }
.faq-body { padding: 0 0 16px; border-top: 1px solid #e2e8f0; }
.faq-body .faq-opis { font-size: 14px; line-height: 1.6; margin-top: 12px; }
.faq-body h5 { margin: 12px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--color-text-muted); }
.faq-body ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.faq-body li { margin-bottom: 4px; }
.faq-empty { color: var(--color-text-muted); font-size: 14px; padding: 20px 0; text-align: center; }
@media (max-width: 650px) {
    .faq-panel { padding: 16px; }
}
