/* =====================================================
   MOTYW – zmienne kolorów (jasny / ciemny)
   Wszystkie kolory w panel.css, settings.css i checklist.css
   pochodzą stąd. Motyw ustawia atrybut data-theme na <html>.
   ===================================================== */

:root{
    --bg:#f3f5f9;
    --surface:#ffffff;
    --field:#f6f8fb;
    --line:#e4e8ef;

    --text:#0f172a;
    --muted:#5b6678;

    --accent:#2563eb;
    --accent-hover:#1d4ed8;
    --accent-text:#2457d6;
    --accent-soft:#e3ebff;

    --nav:#141c2b;
    --thead:#141c2b;

    --ok:#157347;
    --ok-bg:#e8f5ee;
    --ok-line:#bfe3cd;

    --bad:#c53030;
    --bad-bg:#fdecec;
    --bad-line:#f5c2c2;

    --warn:#92400e;
    --warn-bg:#fff4dc;
    --warn-line:#f2d9a0;

    --neutral-btn:#6b7280;
    --neutral-btn-hover:#4b5563;
    --switch-off:#cbd5e1;

    color-scheme:light;
}

:root[data-theme="dark"]{
    --bg:#161d29;
    --surface:#1d2736;
    --field:#151c28;
    --line:#2e3a4e;

    --text:#e8ecf3;
    --muted:#98a3b6;

    --accent:#3a5fb8;
    --accent-hover:#4770cc;
    --accent-text:#8bb0ff;
    --accent-soft:#22345a;

    --nav:#090c12;
    --thead:#263246;

    --ok:#5fd19a;
    --ok-bg:#12261c;
    --ok-line:#1f4a35;

    --bad:#ff8a8a;
    --bad-bg:#2e1819;
    --bad-line:#5a2a2c;

    --warn:#f2c261;
    --warn-bg:#2d2412;
    --warn-line:#5a4720;

    --neutral-btn:#3a4557;
    --neutral-btn-hover:#4a566b;
    --switch-off:#3a4557;

    color-scheme:dark;
}

body{
    color:var(--text);
}

input,
select,
textarea{
    color:var(--text);
}

/* przełącznik motywu w nagłówku */
.theme-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:36px;
    height:36px;
    border-radius:8px;
    border:1px solid rgba(255,255,255,.18);
    background:transparent;
    color:#fff;
    cursor:pointer;
    font-size:16px;
}

.theme-toggle:hover{
    background:rgba(255,255,255,.08);
}

:root[data-theme="dark"] .theme-moon{display:none;}
:root:not([data-theme="dark"]) .theme-sun{display:none;}


/* Logo Kontrolka: drugie „o" to tag NFC (pierścień z zieloną kontrolką w środku) */
.kl-logo{letter-spacing:-.035em;white-space:nowrap}
.kl-o{display:inline-block;position:relative;width:.6em;height:.6em;border-radius:50%;background:currentColor;margin:0 .04em 0 .02em}
.kl-o::after{content:"";position:absolute;left:50%;top:50%;width:.22em;height:.22em;margin:-.11em 0 0 -.11em;border-radius:50%;background:var(--kl-dot,#1FA971)}
:root[data-theme="dark"] .kl-o{--kl-dot:#3DDC97}
.header .kl-o,.appbar .kl-o{--kl-dot:#3DDC97}
