:root {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --border: #334155;
    --success: #10b981;
    --danger: #ef4444;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger-bg: rgba(239, 68, 68, 0.12);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    padding-bottom: 3rem;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}
header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-container {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
}
nav { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 0.4rem;
    background: rgba(255,255,255,0.04);
    white-space: nowrap;
}
nav a:hover { color: var(--accent); background: rgba(255,255,255,0.08); }
.lang-btn {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 0.3rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 0.4rem;
    cursor: pointer;
    margin: 0;
}
.lang-btn:hover { background: var(--accent); color: #000; }
main {
    max-width: 960px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}
h1 { font-size: 1.75rem; margin-bottom: 0.75rem; line-height: 1.3; }
h2 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; color: var(--accent); }
p { margin-bottom: 1rem; color: var(--muted); }
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.15s ease, border-color 0.15s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}
.card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; color: var(--text); line-height: 1.35; }
.card .card-val {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent);
    margin-bottom: 0.5rem;
    width: fit-content;
}
.param-box {
    background: var(--card);
    border: 2px solid var(--accent);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 1.25rem 0;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.25rem;
    text-align: center;
}
.param-item .label { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.25rem; }
.param-item .val { font-size: 1.9rem; font-weight: 800; color: var(--accent); line-height: 1.2; }
.alert-box {
    background: var(--warning-bg);
    border-left: 4px solid var(--accent);
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1.25rem 0;
    color: var(--text);
    font-size: 0.95rem;
}
.alert-danger {
    background: var(--danger-bg);
    border-left: 4px solid var(--danger);
}
.timer-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
    margin: 1.5rem 0;
}
.timer-display {
    font-size: 3rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    margin: 0.5rem 0;
    color: var(--success);
}
.wakelock-status {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0.5rem;
}
button, .btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0.65rem 1.1rem;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: 0.5rem;
    cursor: pointer;
    margin: 0.2rem;
    display: inline-block;
    text-decoration: none;
}
button:hover, .btn:hover { background: var(--accent-hover); }
.btn-secondary { background: #334155; color: var(--text); }
.btn-secondary:hover { background: #475569; }
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.filter-btn {
    background: var(--card);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 2rem;
    cursor: pointer;
    margin: 0;
}
.filter-btn.active, .filter-btn:hover {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text);
}
input, select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}
.info-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1.15rem;
    margin-bottom: 0.85rem;
}
.info-box h3 { font-size: 1.05rem; margin-bottom: 0.4rem; color: var(--text); }
.info-box p, .info-box ul { margin-bottom: 0; font-size: 0.95rem; color: var(--muted); }
.info-box ul { padding-left: 1.25rem; }
.info-box li { margin-bottom: 0.35rem; }
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.no-results {
    display: none;
    padding: 1.5rem;
    text-align: center;
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: 0.5rem;
    color: var(--muted);
    margin-top: 1rem;
}

/* --- STYLE DLA INTERAKTYWNYCH CHECKLIST --- */
.checklist-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.25rem 0;
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 68px;
    z-index: 90;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.progress-wrap {
    width: 100%;
    background: var(--bg);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.4rem;
}
.progress-bar {
    height: 100%;
    background: var(--success);
    width: 0%;
    transition: width 0.2s ease;
}
.checklist-group { margin-bottom: 1.5rem; }
.group-title {
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}
.item-list { list-style: none; padding: 0; }
.item-row {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.65rem 1rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s ease;
}
.item-row:hover { border-color: var(--accent); }
.item-row input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}
.item-row.checked span {
    text-decoration: line-through;
    opacity: 0.45;
}
.add-custom-box {
    display: flex;
    gap: 0.5rem;
    margin: 1.25rem 0;
}
.add-custom-box input { margin-bottom: 0; }

footer {
    max-width: 960px;
    margin: 3rem auto 0;
    padding: 1.5rem 1rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--muted);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.footer-grid h4 { color: var(--text); margin-bottom: 0.5rem; font-size: 0.95rem; }

@media print {
    body { background: #fff !important; color: #000 !important; font-size: 10.5pt; padding: 0; line-height: 1.35; }
    header, footer, .checklist-action-bar, .add-custom-box, .breadcrumbs, .btn, button, .alert-box { display: none !important; }
    main { max-width: 100%; margin: 0; padding: 0; }
    h1 { font-size: 15pt; margin-bottom: 0.25rem; color: #000 !important; }
    h2, .group-title { color: #000 !important; border-bottom: 1px solid #999; font-size: 11.5pt; margin: 0.75rem 0 0.25rem; }
    p { color: #333 !important; margin-bottom: 0.4rem; font-size: 9.5pt; }
    .item-row {
        background: transparent !important;
        border: none !important;
        border-bottom: 1px dotted #ccc !important;
        border-radius: 0;
        padding: 0.22rem 0;
        margin: 0;
        color: #000 !important;
        page-break-inside: avoid;
    }
    .item-row.checked span { text-decoration: none; opacity: 1; }
}
