/* ============================================================
   CSS Variables — paleta industrialna
   ============================================================ */
:root {
    --kolor-tlo:        #0f172a;
    --kolor-powierzchnia: #1e293b;
    --kolor-powierzchnia2: #263248;
    --kolor-ramka:      #334155;
    --kolor-tekst:      #e2e8f0;
    --kolor-tekst-sub:  #94a3b8;
    --kolor-akcent:     #2563eb;
    --kolor-akcent-jasny: #3b82f6;
    --kolor-sukces:     #16a34a;
    --kolor-blad:       #dc2626;
    --kolor-ostrzezenie:#d97706;
    --kolor-nav-mobile: #0a0f1e;

    --promien:  8px;
    --promien-lg: 12px;
    --cien:     0 4px 24px rgba(0,0,0,0.45);
    --cien-lg:  0 8px 40px rgba(0,0,0,0.6);

    --font-glowna: 'Inter', system-ui, sans-serif;
    --font-tytuly: 'Syne', system-ui, sans-serif;

    --nav-mobile-h: 64px;
    --nav-desktop-h: 56px;
}

/* ============================================================
   Reset i baza
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    background: var(--kolor-tlo);
    color: var(--kolor-tekst);
    font-family: var(--font-glowna);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-mobile-h) + 16px);
}

a { color: var(--kolor-akcent-jasny); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   Nawigacja dolna — mobile
   ============================================================ */
.nav-desktop { display: none; }

.nav-mobile {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--nav-mobile-h);
    background: var(--kolor-nav-mobile);
    border-top: 1px solid var(--kolor-ramka);
    display: flex;
    align-items: stretch;
    z-index: 100;
}

.nav-mobile__poz {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--kolor-tekst-sub);
    text-decoration: none;
    font-size: 0.7rem;
    font-family: var(--font-glowna);
    transition: color 0.15s;
    padding: 8px 4px;
}
.nav-mobile__poz:hover,
.nav-mobile__poz--aktywna {
    color: var(--kolor-akcent-jasny);
    text-decoration: none;
}
.nav-mobile__ikona {
    font-size: 1.25rem;
    line-height: 1;
}
.nav-mobile__etykieta { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* ============================================================
   Nawigacja górna — desktop
   ============================================================ */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
        padding-top: var(--nav-desktop-h);
    }
    .nav-mobile  { display: none; }
    .nav-desktop {
        display: flex;
        align-items: center;
        height: var(--nav-desktop-h);
        background: var(--kolor-nav-mobile);
        border-bottom: 1px solid var(--kolor-ramka);
        padding: 0 24px;
        gap: 24px;
        position: fixed;
        top: 0; left: 0; right: 0;
        z-index: 100;
    }
    .nav-desktop__brand {
        font-family: var(--font-tytuly);
        font-weight: 700;
        font-size: 1rem;
        color: var(--kolor-tekst);
        display: flex;
        align-items: center;
        gap: 8px;
        margin-right: 8px;
    }
    .nav-desktop__linki {
        display: flex;
        gap: 4px;
        flex: 1;
    }
    .nav-link {
        padding: 6px 14px;
        border-radius: var(--promien);
        color: var(--kolor-tekst-sub);
        font-size: 0.875rem;
        font-weight: 500;
        transition: color 0.15s, background 0.15s;
        text-decoration: none;
    }
    .nav-link:hover      { color: var(--kolor-tekst); background: var(--kolor-powierzchnia); }
    .nav-link--aktywny   { color: var(--kolor-tekst); background: var(--kolor-akcent); }
    .nav-link--aktywny:hover { background: var(--kolor-akcent-jasny); }

    .nav-desktop__user {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-left: auto;
    }
    .nav-user-imie { font-size: 0.875rem; color: var(--kolor-tekst-sub); }
}

/* ============================================================
   Layout główny
   ============================================================ */
.main-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 16px 8px;
}

@media (min-width: 768px) {
    .main-content { padding: 32px 24px; }
}

/* ============================================================
   Logo
   ============================================================ */
.logo-ikona {
    color: var(--kolor-akcent-jasny);
    font-size: 1.1em;
}
.logo-nazwa {
    font-family: var(--font-tytuly);
    font-weight: 700;
}

/* ============================================================
   Strona logowania
   ============================================================ */
.strona-logowania {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px 16px;
}
.login-wrap {
    width: 100%;
    max-width: 400px;
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg);
    padding: 36px 28px;
    box-shadow: var(--cien-lg);
}
.login-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-tytuly);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
}
.login-tytul {
    font-family: var(--font-tytuly);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 24px;
}

/* ============================================================
   Alerty
   ============================================================ */
.alert {
    border-radius: var(--promien);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
}
.alert--blad   { background: rgba(220,38,38,0.15); border: 1px solid var(--kolor-blad);    color: #fca5a5; }
.alert--sukces { background: rgba(22,163,74,0.15);  border: 1px solid var(--kolor-sukces);  color: #86efac; }

/* ============================================================
   Formularze
   ============================================================ */
.formularz { display: flex; flex-direction: column; gap: 16px; }

.pole { display: flex; flex-direction: column; gap: 6px; }
.pole label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--kolor-tekst-sub);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.opcjonalne { font-weight: 400; text-transform: none; letter-spacing: 0; }

.pole input,
.pole select,
.pole textarea {
    background: var(--kolor-tlo);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien);
    color: var(--kolor-tekst);
    font-family: var(--font-glowna);
    font-size: 1rem;
    padding: 12px 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}
.pole input:focus,
.pole select:focus,
.pole textarea:focus {
    outline: none;
    border-color: var(--kolor-akcent-jasny);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}

.pole input[type="file"] {
    padding: 10px 14px;
    cursor: pointer;
}

.pole-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Live-kalkulator km */
.km-wynik {
    background: var(--kolor-powierzchnia2);
    border: 1px solid var(--kolor-akcent);
    border-radius: var(--promien);
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--kolor-tekst-sub);
    text-align: center;
}
.km-wynik strong { color: var(--kolor-akcent-jasny); font-size: 1.2rem; }

/* Podgląd zdjęcia */
.zdjecie-podglad {
    position: relative;
    margin-top: 10px;
    border-radius: var(--promien);
    overflow: hidden;
    max-width: 260px;
    border: 1px solid var(--kolor-ramka);
}
.zdjecie-podglad img { width: 100%; display: block; }
.btn-usun-zdjecie {
    position: absolute;
    top: 6px; right: 6px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px; height: 28px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
}
.zdjecie-aktualne { margin-top: 8px; font-size: 0.85rem; color: var(--kolor-tekst-sub); }
.zdjecie-aktualne a { color: var(--kolor-akcent-jasny); }

.formularz__akcje { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }

/* ============================================================
   Przyciski
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--promien);
    font-family: var(--font-glowna);
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
    white-space: nowrap;
    padding: 12px 20px;
    font-size: 1rem;
}
.btn--full   { width: 100%; }
.btn--sm     { padding: 8px 14px;  font-size: 0.875rem; }
.btn--xs     { padding: 5px 10px;  font-size: 0.78rem; }

.btn--primary {
    background: var(--kolor-akcent);
    color: #fff;
}
.btn--primary:hover { background: var(--kolor-akcent-jasny); text-decoration: none; }

.btn--ghost {
    background: transparent;
    border-color: var(--kolor-ramka);
    color: var(--kolor-tekst-sub);
}
.btn--ghost:hover { border-color: var(--kolor-tekst-sub); color: var(--kolor-tekst); text-decoration: none; }

.btn--danger {
    background: transparent;
    border-color: var(--kolor-blad);
    color: #fca5a5;
}
.btn--danger:hover { background: rgba(220,38,38,0.12); text-decoration: none; }

.btn-powrot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--promien);
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    color: var(--kolor-tekst-sub);
    font-size: 1.1rem;
    text-decoration: none;
    flex-shrink: 0;
}
.btn-powrot:hover { color: var(--kolor-tekst); }

/* ============================================================
   Hero karta auta
   ============================================================ */
.hero-karta {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 60%, #0f172a 100%);
    border: 1px solid #2d4a6e;
    border-radius: var(--promien-lg);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--cien);
}
.hero-karta__naglowek {
    display: flex;
    align-items: center;
    gap: 14px;
}
.hero-ikona {
    font-size: 2rem;
    color: var(--kolor-akcent-jasny);
    line-height: 1;
}
.hero-karta__imie {
    font-family: var(--font-tytuly);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--kolor-tekst);
}
.hero-karta__auto {
    font-size: 0.875rem;
    color: var(--kolor-tekst-sub);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.rejestracja {
    background: var(--kolor-powierzchnia2);
    border: 1px solid var(--kolor-ramka);
    border-radius: 4px;
    padding: 1px 8px;
    font-size: 0.8rem;
    color: var(--kolor-tekst);
    font-family: monospace;
    letter-spacing: 0.06em;
}

/* ============================================================
   Sekcje
   ============================================================ */
.sekcja { margin-bottom: 28px; }
.sekcja__tytul {
    font-family: var(--font-tytuly);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--kolor-tekst-sub);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sekcja__sub {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--kolor-tekst-sub);
}
.sekcja__link {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--kolor-akcent-jasny);
}

/* ============================================================
   Karty statystyk
   ============================================================ */
.karty-stat {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.karta-stat {
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien);
    padding: 16px 12px;
    text-align: center;
    box-shadow: var(--cien);
}
.karta-stat__wartosc {
    font-family: var(--font-glowna);
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--kolor-tekst);
    line-height: 1.1;
}
.karta-stat__etykieta {
    font-size: 0.72rem;
    color: var(--kolor-tekst-sub);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================================
   Wykres słupkowy CSS
   ============================================================ */
.wykres {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 160px;
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien);
    padding: 16px 12px 40px;
    position: relative;
    box-shadow: var(--cien);
}
.wykres__kolumna {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
}
.wykres__wartosc {
    font-size: 0.6rem;
    color: var(--kolor-tekst-sub);
    text-align: center;
    min-height: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
}
.wykres__slupek-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
}
.wykres__slupek {
    width: 100%;
    background: var(--kolor-akcent);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: height 0.4s ease;
}
.wykres__etykieta {
    position: absolute;
    bottom: -26px;
    font-size: 0.62rem;
    color: var(--kolor-tekst-sub);
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
}

/* ============================================================
   Lista wyjazdów
   ============================================================ */
.lista-wyjazdow { display: flex; flex-direction: column; gap: 8px; }

.wpis {
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--cien);
}
.wpis__data {
    font-size: 0.75rem;
    color: var(--kolor-tekst-sub);
    white-space: nowrap;
    min-width: 72px;
    font-family: monospace;
}
.wpis__info { flex: 1; min-width: 0; }
.wpis__cel {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--kolor-tekst);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wpis__trasa {
    font-size: 0.78rem;
    color: var(--kolor-tekst-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wpis__km {
    font-family: var(--font-glowna);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
    color: var(--kolor-akcent-jasny);
    white-space: nowrap;
}

/* Rozszerzony wpis z akcjami — historia.php */
.wpis--pelny { flex-direction: column; align-items: stretch; gap: 8px; }
.wpis__glowna {
    display: flex;
    align-items: center;
    gap: 12px;
}
.wpis__akcje {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--kolor-ramka);
    flex-wrap: wrap;
}

/* Animacja znikania przy usuwaniu */
.wpis--usuwanie {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* ============================================================
   Historia — selektor i suma
   ============================================================ */
.selektor-miesiac {
    margin-bottom: 16px;
}
.selektor-miesiac select {
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien);
    color: var(--kolor-tekst);
    font-family: var(--font-glowna);
    font-size: 1rem;
    padding: 10px 14px;
    width: 100%;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.suma-miesiac {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--kolor-powierzchnia2);
    border: 1px solid var(--kolor-akcent);
    border-radius: var(--promien);
    padding: 12px 16px;
    margin-bottom: 16px;
}
.suma-miesiac__etykieta { font-size: 0.8rem; color: var(--kolor-tekst-sub); }
.suma-miesiac__wartosc  {
    font-family: var(--font-glowna);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 1.2rem;
    color: var(--kolor-akcent-jasny);
    flex: 1;
}
.suma-miesiac__liczba   { font-size: 0.8rem; color: var(--kolor-tekst-sub); }

.eksport-pasek {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

/* ============================================================
   Nagłówki stron wewnętrznych
   ============================================================ */
.strona-naglowek {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.strona-naglowek h1 {
    font-family: var(--font-tytuly);
    font-size: 1.3rem;
    font-weight: 800;
}
.strona-naglowek--akcje { justify-content: space-between; }

/* ============================================================
   Brak danych
   ============================================================ */
.brak-danych {
    text-align: center;
    color: var(--kolor-tekst-sub);
    padding: 32px 16px;
    font-size: 0.9rem;
}
.brak-danych a { color: var(--kolor-akcent-jasny); }

/* ============================================================
   Responsywność — tablet/desktop
   ============================================================ */
@media (min-width: 480px) {
    .karty-stat { gap: 16px; }
    .karta-stat__wartosc { font-size: 1.8rem; }
    .wykres { height: 180px; }
}

@media (min-width: 768px) {
    .main-content { padding: 32px 24px; max-width: 720px; }
    .main-content--wide { max-width: 1080px; }
    .login-wrap { padding: 48px 40px; }
    .formularz__akcje { flex-direction: row; justify-content: flex-end; }
    .formularz__akcje .btn--full { width: auto; }
    .wpis--pelny { flex-direction: row; align-items: center; }
    .wpis__glowna { flex: 1; }
    .wpis__akcje { border-top: none; padding-top: 0; }
}

/* ============================================================
   Login — rejestracja link + szeroki wrap
   ============================================================ */
.login-wrap--wide { max-width: 480px; }
.login-rejestracja {
    text-align: center;
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--kolor-tekst-sub);
}
.login-rejestracja a { color: var(--kolor-akcent-jasny); }

/* ============================================================
   Nawigacja — link na imieniu
   ============================================================ */
.nav-user-link {
    color: var(--kolor-tekst-sub);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s;
}
.nav-user-link:hover { color: var(--kolor-tekst); text-decoration: none; }

/* ============================================================
   Przycisk szary
   ============================================================ */
.btn--szary {
    background: var(--kolor-powierzchnia2);
    border-color: var(--kolor-ramka);
    color: var(--kolor-tekst-sub);
}
.btn--szary:hover { background: var(--kolor-powierzchnia); color: var(--kolor-tekst); text-decoration: none; }

/* ============================================================
   Karty statystyk — wariant 4-kolumnowy
   ============================================================ */
.karty-stat--cztery { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px) {
    .karty-stat--cztery { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   Panel admina — nagłówek
   ============================================================ */
.admin-naglowek {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.admin-naglowek h1 {
    font-family: var(--font-tytuly);
    font-size: 1.3rem;
    font-weight: 800;
}
.admin-naglowek__akcje {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================================
   Siatka pracowników
   ============================================================ */
.pracownicy-siatka {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
@media (min-width: 600px) {
    .pracownicy-siatka { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
    .pracownicy-siatka { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================================
   Karta pracownika
   ============================================================ */
.pracownik-karta {
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg);
    padding: 16px;
    box-shadow: var(--cien);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.15s;
}
.pracownik-karta:hover { border-color: var(--kolor-akcent); }
.pracownik-karta--nieaktywny { opacity: 0.6; }

.pracownik-karta__header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pracownik-karta__info { min-width: 0; }
.pracownik-karta__imie {
    font-family: var(--font-tytuly);
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pracownik-karta__email {
    font-size: 0.78rem;
    color: var(--kolor-tekst-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pracownik-karta__auto {
    font-size: 0.8rem;
    color: var(--kolor-tekst-sub);
    display: flex;
    align-items: center;
    gap: 6px;
}
.pracownik-karta__stat {
    display: flex;
    gap: 16px;
}
.pracownik-karta__stat-item { display: flex; flex-direction: column; }
.pracownik-karta__stat-val {
    font-family: var(--font-glowna);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 1rem;
    color: var(--kolor-akcent-jasny);
}
.pracownik-karta__stat-lab {
    font-size: 0.7rem;
    color: var(--kolor-tekst-sub);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pracownik-karta__logowanie {
    font-size: 0.75rem;
    color: var(--kolor-tekst-sub);
}
.pracownik-karta__akcje {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid var(--kolor-ramka);
}

/* ============================================================
   Avatar z inicjałami
   ============================================================ */
.avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--kolor-akcent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-tytuly);
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.avatar--nieaktywny { background: var(--kolor-ramka); color: var(--kolor-tekst-sub); }
.avatar--lg { width: 56px; height: 56px; font-size: 1.2rem; }

/* ============================================================
   Badge roli
   ============================================================ */
.badge-rola {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
}
.badge-rola--admin     { background: rgba(37,99,235,0.2);  color: #60a5fa;  border: 1px solid rgba(37,99,235,0.4); }
.badge-rola--pracownik { background: rgba(22,163,74,0.15); color: #86efac;  border: 1px solid rgba(22,163,74,0.3); }
.badge-rola--nieaktywny { background: rgba(71,85,105,0.3); color: #94a3b8; border: 1px solid var(--kolor-ramka); }

/* ============================================================
   Pasek limitu km
   ============================================================ */
.limit-pasek {
    height: 5px;
    background: var(--kolor-ramka);
    border-radius: 3px;
    overflow: hidden;
}
.limit-pasek__wypelnienie {
    height: 100%;
    background: var(--kolor-akcent);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.limit-pasek__wypelnienie--przekroczony { background: var(--kolor-blad); }
.limit-pasek__opis {
    font-size: 0.72rem;
    color: var(--kolor-tekst-sub);
    margin-top: 3px;
}
.limit-pasek__opis--przekroczony { color: #fca5a5; }

/* ============================================================
   Hero karta pracownika (admin_user podgląd)
   ============================================================ */
.pracownik-hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #1e293b 60%, #0f172a 100%);
    border: 1px solid #2d4a6e;
    border-radius: var(--promien-lg);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    box-shadow: var(--cien);
}
.pracownik-hero__body { min-width: 0; }
.pracownik-hero__imie {
    font-family: var(--font-tytuly);
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.pracownik-hero__meta {
    font-size: 0.85rem;
    color: var(--kolor-tekst-sub);
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============================================================
   Karta sekcji (profil, formularze)
   ============================================================ */
.karta-sekcja {
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--cien);
}
.karta-sekcja__tytul {
    font-family: var(--font-tytuly);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--kolor-tekst-sub);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--kolor-ramka);
}

/* ============================================================
   Input zablokowany (email w profilu)
   ============================================================ */
.input--zablokowany {
    background: var(--kolor-tlo) !important;
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   Checkbox "usuń zdjęcie" w edytuj.php
   ============================================================ */
.checkbox-usun {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    font-size: 0.85rem;
    color: #fca5a5;
    cursor: pointer;
}
.checkbox-usun input { cursor: pointer; }

/* ============================================================
   FAZA 3 — Baner aktywnej trasy na dashboardzie
   ============================================================ */
.baner-aktywna-trasa {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(22,163,74,0.12);
    border: 1.5px solid var(--kolor-sukces);
    border-radius: var(--promien-lg);
    padding: 14px 16px;
    margin-bottom: 16px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}
.baner-aktywna-trasa:hover { background: rgba(22,163,74,0.2); text-decoration: none; }
.baner-pulse {
    width: 12px;
    height: 12px;
    background: var(--kolor-sukces);
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.3); }
}
.baner-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.baner-info strong { font-size: 14px; color: #86efac; }
.baner-info span   { font-size: 13px; color: var(--kolor-tekst-sub); }
.baner-akcja { font-size: 13px; font-weight: 700; color: #86efac; white-space: nowrap; }

/* ============================================================
   FAZA 3 — Strona trasy (trasa.php)
   ============================================================ */
.trasa-hero {
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg);
    padding: 28px 24px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--cien);
}
.trasa-hero h2 {
    font-family: var(--font-tytuly);
    font-size: 26px;
    margin: 12px 0 6px;
}
.trasa-hero p  { color: var(--kolor-tekst-sub); font-size: 14px; }
.trasa-hero-aktywna { text-align: left; }
.trasa-status-badge {
    display: inline-block;
    background: rgba(22,163,74,0.15);
    border: 1px solid var(--kolor-sukces);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: #86efac;
    margin-bottom: 10px;
}
.trasa-cel {
    font-family: var(--font-tytuly);
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}
.trasa-opis { font-size: 13px; color: var(--kolor-tekst-sub); margin-bottom: 10px; }
.trasa-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--kolor-tekst-sub);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.trasa-meta strong { color: var(--kolor-tekst); }
.trasa-zdjecie-start {
    border-radius: var(--promien);
    overflow: hidden;
    max-height: 140px;
    position: relative;
    border: 1px solid var(--kolor-ramka);
}
.trasa-zdjecie-start img { width: 100%; height: 140px; object-fit: cover; display: block; }
.trasa-zdjecie-start span {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Kroki */
.krok-karta {
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg);
    padding: 22px;
    box-shadow: var(--cien);
    margin-bottom: 16px;
}
.krok-numer {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--kolor-akcent-jasny);
    margin-bottom: 6px;
}
.krok-karta h3 {
    font-family: var(--font-tytuly);
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--kolor-tekst);
}
.krok-opis { font-size: 13px; color: var(--kolor-tekst-sub); margin-bottom: 16px; }

/* Strefa aparatu */
.aparat-strefa {
    position: relative;
    border: 2.5px dashed var(--kolor-ramka);
    border-radius: var(--promien-lg);
    overflow: hidden;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: border-color 0.2s;
    cursor: pointer;
}
.aparat-strefa:hover { border-color: var(--kolor-akcent-jasny); }
.aparat-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
    z-index: 2;
}
.aparat-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 24px;
    text-align: center;
    color: var(--kolor-tekst-sub);
    font-size: 14px;
    pointer-events: none;
}
.aparat-ikona { font-size: 44px; line-height: 1; }
.aparat-hint  { font-size: 12px; opacity: 0.6; }
.aparat-podglad { width: 100%; position: relative; }
.aparat-podglad img { width: 100%; height: 200px; object-fit: cover; display: block; }
.btn-zmien-foto {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.65);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    z-index: 3;
}

/* OCR */
.ocr-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    color: var(--kolor-tekst-sub);
    font-size: 14px;
}
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--kolor-ramka);
    border-top-color: var(--kolor-akcent-jasny);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ocr-wynik {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1.5px solid var(--kolor-ramka);
}
.km-confirm-box { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.km-confirm-box label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--kolor-tekst-sub);
}
.km-big-input {
    width: 100%;
    padding: 16px 18px;
    font-family: var(--font-glowna);
    font-size: 32px;
    font-weight: 600;
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: 0.02em;
    border: 2px solid var(--kolor-ramka);
    border-radius: var(--promien);
    background: var(--kolor-tlo);
    color: var(--kolor-tekst);
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s;
}
.km-big-input:focus { outline: none; border-color: var(--kolor-akcent-jasny); }
.km-diff {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    padding: 6px;
    border-radius: var(--promien);
    margin-top: 8px;
}
.km-diff.pozytywny { color: #86efac; background: rgba(22,163,74,0.12); }
.km-diff.negatywny { color: #fca5a5; background: rgba(220,38,38,0.12); }
.ocr-blad {
    background: rgba(217,119,6,0.12);
    border: 1px solid var(--kolor-ostrzezenie);
    color: #fcd34d;
    padding: 10px 14px;
    border-radius: var(--promien);
    font-size: 13px;
    margin-bottom: 12px;
}

/* Przyciski Fazy 3 */
.btn-duzy { padding: 18px 24px; font-size: 17px; border-radius: var(--promien-lg); }
.btn-success {
    background: var(--kolor-sukces);
    color: white;
    border-color: var(--kolor-sukces);
}
.btn-success:hover { background: #15803d; text-decoration: none; }
.btn-tekstowy {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-glowna);
    font-size: 14px;
    color: var(--kolor-tekst-sub);
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    transition: color 0.2s;
}
.btn-tekstowy:hover { color: var(--kolor-tekst); }
.btn-tekstowy.btn-danger { color: var(--kolor-blad) !important; }
.btn-tekstowy.btn-danger:hover { color: #ef4444 !important; }

/* Autocomplete */
.autocomplete-wrapper { position: relative; }
.autocomplete-lista {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--kolor-powierzchnia2);
    border: 1.5px solid var(--kolor-ramka);
    border-radius: var(--promien);
    margin-top: 2px;
    overflow: hidden;
    box-shadow: var(--cien-lg);
}
.autocomplete-item {
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--kolor-ramka);
    color: var(--kolor-tekst);
    transition: background 0.15s;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: var(--kolor-powierzchnia); }

/* Ekran sukcesu */
.sukces-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}
.sukces-karta {
    background: var(--kolor-powierzchnia);
    border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg);
    padding: 32px 24px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: var(--cien-lg);
}
.sukces-ikona { font-size: 56px; margin-bottom: 12px; }
.sukces-karta h2 {
    font-family: var(--font-tytuly);
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--kolor-tekst);
}
.sukces-km {
    font-family: var(--font-glowna);
    font-size: 52px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--kolor-akcent-jasny);
    line-height: 1;
    margin-bottom: 6px;
}
.sukces-meta { font-size: 14px; color: var(--kolor-tekst-sub); margin-bottom: 4px; }

/* === FAZA 4B: Faktury UTA i rozliczenie paliwowe === */

.lista-faktur { display: flex; flex-direction: column; gap: 10px; }
.faktura-karta { background: var(--kolor-powierzchnia); border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien); padding: 14px 16px; display: flex;
    align-items: center; gap: 14px; box-shadow: var(--cien); flex-wrap: wrap; }
.faktura-nr { font-family: var(--font-glowna); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.faktura-meta { color: var(--kolor-tekst-sub); font-size: 12px; }
.faktura-litry { font-family: var(--font-glowna); font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums;
    color: var(--kolor-akcent); margin-left: auto; }

.badge-status { width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; }
.badge-status.przetworzona { background: #dcfce7; color: var(--kolor-sukces); }
.badge-status.oczekuje     { background: #fef9c3; color: #854d0e; }
.badge-status.blad         { background: #fee2e2; color: var(--kolor-blad); }

.pozycja-weryfikacja {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr 1.5fr 1fr 1fr 1fr;
    gap: 6px; padding: 8px; border-bottom: 1px solid var(--kolor-ramka);
    background: var(--kolor-powierzchnia);
}
.pozycja-weryfikacja.inne { background: var(--kolor-powierzchnia2); opacity: 0.85; }
.pozycja-weryfikacja .col-ilosc input {
    border: 2px solid var(--kolor-akcent) !important;
    font-weight: 700; color: var(--kolor-akcent);
}
.pozycja-weryfikacja label { font-size: 10px; text-transform: uppercase;
    color: var(--kolor-tekst-sub); margin-bottom: 2px; display: block; }
.pozycja-weryfikacja .col-ilosc label { color: var(--kolor-akcent); font-weight: 700; }
.pozycja-weryfikacja input { width: 100%; padding: 4px 6px; font-size: 12px;
    background: var(--kolor-powierzchnia2); border: 1px solid var(--kolor-ramka);
    border-radius: 4px; color: var(--kolor-tekst); }

.karty-lista { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.karta-uta-chip { background: var(--kolor-powierzchnia2); border: 1px solid var(--kolor-ramka);
    border-radius: 20px; padding: 4px 12px; font-size: 12px;
    display: flex; align-items: center; gap: 8px; }
.karta-uta-chip strong { font-family: var(--font-glowna); font-variant-numeric: tabular-nums; }

.raport-karta { background: var(--kolor-powierzchnia); border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg); padding: 18px; margin-bottom: 16px;
    box-shadow: var(--cien-lg); }
.raport-siatka { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.raport-pole { display: flex; flex-direction: column; gap: 2px; }
.raport-wartosc { font-family: var(--font-glowna); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.raport-etykieta { font-size: 11px; color: var(--kolor-tekst-sub); text-transform: uppercase; }
.raport-meta { font-size: 11px; color: var(--kolor-tekst-sub); margin-top: 2px; }

.litry-prywatne-dodatnie { color: var(--kolor-blad); background: #fef2f2;
    border-radius: var(--promien); padding: 4px 8px; display: inline-block; }
.litry-prywatne-ujemne { color: var(--kolor-sukces); background: #f0fdf4;
    border-radius: var(--promien); padding: 4px 8px; display: inline-block; }

.pasek-proporcji { height: 8px; border-radius: 4px; overflow: hidden;
    display: flex; margin-top: 12px; background: var(--kolor-ramka); }
.pasek-sluzbowe { background: var(--kolor-akcent); }
.pasek-prywatne { background: var(--kolor-blad); }

.brak-spalania-alert { background: #fef9ec; border: 1px solid #fcd34d;
    border-radius: var(--promien); padding: 12px; font-size: 13px; margin-top: 10px; }
.brak-karty-info { background: var(--kolor-powierzchnia2); border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien); padding: 10px; font-size: 13px;
    color: var(--kolor-tekst-sub); margin-top: 10px; }

.wykres-trend { display: flex; align-items: flex-end; gap: 8px; height: 100px;
    background: var(--kolor-powierzchnia); border-radius: var(--promien);
    box-shadow: var(--cien); padding: 12px; margin-top: 16px; }
.trend-slupek { display: flex; flex-direction: column; align-items: center; flex: 1; height: 100%; }
.trend-slupki { display: flex; flex-direction: column; justify-content: flex-end;
    flex: 1; width: 100%; gap: 2px; }
.slupek-sluzbowe { background: var(--kolor-akcent); border-radius: 2px 2px 0 0; }
.slupek-prywatne { background: var(--kolor-blad); border-radius: 2px 2px 0 0; }
.trend-etykieta { font-size: 10px; color: var(--kolor-tekst-sub); margin-top: 4px; }

.karta-podglad { background: var(--kolor-powierzchnia); border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg); padding: 16px; margin-bottom: 12px; }
.karta-podglad.nieprzypisana { border-color: #fcd34d; background: #fffbeb; }
.karta-podglad .karta-litry { font-family: var(--font-glowna); font-size: 24px; font-variant-numeric: tabular-nums;
    font-weight: 700; color: var(--kolor-akcent); }

/* ============================================================
   FAZA 5 — statusy wpisów, wnioski, korekty, powiadomienia
   ============================================================ */

/* ── Nawigacja: badge powiadomień ───────────────────────────── */
.nav-badge {
    position: absolute; top: -4px; right: -10px;
    background: var(--kolor-blad); color: #fff;
    font-size: 10px; font-weight: 700; line-height: 1;
    padding: 2px 5px; border-radius: 10px; min-width: 16px;
    text-align: center;
}
.nav-badge--mobile { top: 2px; right: 4px; }

/* ── Status pills ────────────────────────────────────────────── */
.status-pill {
    display: inline-block; padding: 2px 10px; border-radius: 12px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
}
.status-pill--aktywny   { background: rgba(22,163,74,0.15); color: #86efac; }
.status-pill--anulowany { background: rgba(100,116,139,0.2); color: var(--kolor-tekst-sub); }
.status-pill--zastapiony{ background: rgba(217,119,6,0.2);  color: #fbbf24; }
.status-pill--oczekuje  { background: rgba(37,99,235,0.2);  color: var(--kolor-akcent-jasny); }
.status-pill--korekta   { background: rgba(37,99,235,0.15); color: var(--kolor-akcent-jasny); }
.status-pill--zaakceptowany { background: rgba(22,163,74,0.2); color: #86efac; }
.status-pill--odrzucony { background: rgba(220,38,38,0.2);  color: #fca5a5; }

/* ── Pasek statusu wpisu w historii ─────────────────────────── */
.wpis__status-pasek {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 0 6px; border-bottom: 1px solid var(--kolor-ramka);
    margin-bottom: 8px; font-size: 12px;
}
.link-korekta {
    color: var(--kolor-tekst-sub); font-size: 11px; text-decoration: none;
}
.link-korekta:hover { color: var(--kolor-akcent-jasny); }

/* ── Wyszarzenie anulowanych/zastąpionych wpisów ─────────────── */
.wpis--anulowany  { opacity: 0.55; }
.wpis--zastąpiony { opacity: 0.55; }
.wpis__glowna--wyszarzony { color: var(--kolor-tekst-sub); }
.wpis__km--przekresl { text-decoration: line-through; color: var(--kolor-tekst-sub); }
.wpis__notatka { font-size: 11px; color: var(--kolor-tekst-sub); margin-top: 2px; font-style: italic; }
.wpis__odpowiedz {
    font-size: 11px; color: var(--kolor-tekst-sub);
    padding: 4px 8px; border-left: 2px solid var(--kolor-ramka); margin-top: 4px;
}

/* ── Karta-stat z alertem (czerwona ramka) ───────────────────── */
.karta-stat--alert {
    border-color: var(--kolor-blad);
    background: rgba(220,38,38,0.07);
}
.karta-stat--alert .karta-stat__wartosc { color: var(--kolor-blad); }

/* ── Top kierowcy (dashboard admin) ─────────────────────────── */
.top-kierowcy { display: flex; flex-direction: column; gap: 10px; }
.top-kierowcy__wiersz {
    display: grid; grid-template-columns: 20px 1fr auto auto;
    align-items: center; gap: 10px;
}
.top-kierowcy__numer { color: var(--kolor-tekst-sub); font-size: 13px; text-align: center; }
.top-kierowcy__imie  { font-size: 14px; }
.top-kierowcy__pasek-wrap {
    height: 6px; background: var(--kolor-powierzchnia2);
    border-radius: 3px; overflow: hidden; flex: 1;
}
.top-kierowcy__pasek { height: 100%; background: var(--kolor-akcent); border-radius: 3px; }
.top-kierowcy__km { font-size: 13px; font-family: var(--font-glowna);
    font-variant-numeric: tabular-nums; color: var(--kolor-tekst-sub); white-space: nowrap; }

/* ── Taby filtra (admin_wnioski) ─────────────────────────────── */
.taby-filtr { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab-btn {
    padding: 6px 16px; border-radius: 20px; font-size: 13px;
    border: 1px solid var(--kolor-ramka); color: var(--kolor-tekst-sub);
    background: transparent; text-decoration: none; display: inline-flex;
    align-items: center; gap: 6px; cursor: pointer;
}
.tab-btn:hover { border-color: var(--kolor-akcent-jasny); color: var(--kolor-tekst); }
.tab-btn--aktywny { background: var(--kolor-akcent); border-color: var(--kolor-akcent); color: #fff; }
.tab-badge {
    background: var(--kolor-blad); color: #fff;
    font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 10px;
}

/* ── Karta wniosku ───────────────────────────────────────────── */
.wnioski-lista { display: flex; flex-direction: column; gap: 12px; }
.wnioski-lista--pelna .wniosek-karta { padding: 16px; }

.wniosek-karta {
    background: var(--kolor-powierzchnia); border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg); padding: 12px;
}
.wniosek-karta--zaakceptowany { border-left: 3px solid var(--kolor-sukces); }
.wniosek-karta--odrzucony     { border-left: 3px solid var(--kolor-blad); }
.wniosek-karta--oczekuje      { border-left: 3px solid var(--kolor-akcent); }

.wniosek-karta__naglowek {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 8px;
}
.wniosek-karta__email { color: var(--kolor-tekst-sub); font-size: 12px; display: block; }
.wniosek-karta__meta  { color: var(--kolor-tekst-sub); font-size: 13px; }
.wniosek-karta__wyjazd {
    background: var(--kolor-powierzchnia2); border-radius: var(--promien);
    padding: 8px 10px; margin: 8px 0;
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.wniosek-karta__akcje { display: flex; gap: 8px; margin-top: 8px; }
.wniosek-karta__odpowiedz-form { margin-top: 10px; }
.wniosek-karta__archiwum { margin-top: 8px; font-size: 12px; color: var(--kolor-tekst-sub); }
.wniosek-karta__rozpatrzyl { font-size: 11px; color: var(--kolor-tekst-sub); margin-top: 4px; }
.wniosek-odpowiedz-archiwum {
    padding: 6px 10px; border-left: 2px solid var(--kolor-ramka);
    font-style: italic; font-size: 13px;
}

/* ── Cytat powodu ────────────────────────────────────────────── */
.wniosek-powod {
    border-left: 3px solid var(--kolor-akcent); margin: 10px 0;
    padding: 6px 12px; font-style: italic; font-size: 14px;
    color: var(--kolor-tekst-sub);
}
.wniosek-powod cite { display: block; font-size: 11px; margin-top: 4px; font-style: normal; }

/* ── Mini wniosek na dashboardzie admina ─────────────────────── */
.wniosek-karta--mini { padding: 10px 14px; }
.wniosek-karta--mini .wniosek-karta__naglowek { margin-bottom: 4px; }
.wniosek-karta--mini .wniosek-karta__meta { font-size: 12px; }
.wniosek-karta--mini .wniosek-karta__akcje { margin-top: 6px; }

/* ── Modal ───────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65);
    display: flex; align-items: center; justify-content: center;
    z-index: 200; padding: 16px;
}
.modal-karta {
    background: var(--kolor-powierzchnia); border-radius: var(--promien-lg);
    padding: 24px; width: 100%; max-width: 440px;
    box-shadow: var(--cien-lg);
}
.modal-karta--wide { max-width: 580px; }
.modal-karta h3 { margin-bottom: 8px; }
.modal-opis { color: var(--kolor-tekst-sub); font-size: 14px; margin-bottom: 12px; }
.modal-akcje { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }
.pole-textarea {
    width: 100%; padding: 10px 12px; background: var(--kolor-tlo);
    border: 1px solid var(--kolor-ramka); border-radius: var(--promien);
    color: var(--kolor-tekst); font-size: 14px; resize: vertical;
    font-family: var(--font-glowna);
}
.pole-textarea:focus { border-color: var(--kolor-akcent); outline: none; }

/* ── Inline edycja stawki/limitu ─────────────────────────────── */
.inline-edycja {
    display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px;
    align-items: flex-end; margin-top: 10px; padding: 8px;
    background: var(--kolor-powierzchnia2); border-radius: var(--promien);
}
.inline-edycja__pole label {
    display: block; font-size: 11px; color: var(--kolor-tekst-sub); margin-bottom: 4px;
}
.inline-edycja__pole input {
    width: 100%; padding: 6px 8px; background: var(--kolor-tlo);
    border: 1px solid var(--kolor-ramka); border-radius: var(--promien);
    color: var(--kolor-tekst); font-size: 13px;
}
.inline-edycja__pole input:focus { border-color: var(--kolor-akcent); outline: none; }

/* ── Powiadomienia (pracownik) ───────────────────────────────── */
.powiadomienia-lista { display: flex; flex-direction: column; gap: 12px; }
.powiadomienie-karta {
    display: flex; gap: 14px; align-items: flex-start;
    background: var(--kolor-powierzchnia); border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg); padding: 14px 16px;
}
.pow-ikona {
    width: 32px; height: 32px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 15px; font-weight: 700;
    flex-shrink: 0;
}
.pow-ikona--sukces { background: rgba(22,163,74,0.2); color: #86efac; }
.pow-ikona--blad   { background: rgba(220,38,38,0.2); color: #fca5a5; }
.pow-ikona--oczekuje { background: rgba(37,99,235,0.2); color: var(--kolor-akcent-jasny); }
.powiadomienie-karta__naglowek {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 4px;
}
.powiadomienie-karta__data { font-size: 11px; color: var(--kolor-tekst-sub); }
.powiadomienie-karta__wyjazd { font-size: 13px; color: var(--kolor-tekst-sub); margin-bottom: 6px; }
.powiadomienie-karta__tresc  { flex: 1; }
.powiadomienie-odpowiedz {
    border-left: 2px solid var(--kolor-ramka); padding-left: 10px;
    font-style: italic; font-size: 13px; color: var(--kolor-tekst-sub); margin: 0;
}

/* ── Kalkulator km ───────────────────────────────────────────── */
.miesiac-form { margin-bottom: 8px; }
.kalkulator-tabela {
    width: 100%; border-collapse: collapse;
    background: var(--kolor-powierzchnia);
    border-radius: var(--promien); overflow: hidden;
}
.kalkulator-tabela th {
    background: var(--kolor-powierzchnia2);
    padding: 10px 12px; text-align: left;
    font-size: 12px; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--kolor-tekst-sub);
    font-weight: 600;
}
.kalkulator-tabela td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--kolor-ramka);
    font-size: 14px;
}
.kalkulator-tabela tr:nth-child(even) td { background: var(--kolor-powierzchnia2); }
.kalkulator-tabela tr:last-child td { border-bottom: none; }
.kalkulator-suma td {
    font-weight: 700;
    border-top: 2px solid var(--kolor-akcent);
    background: var(--kolor-powierzchnia2);
    font-size: 14px;
    padding: 10px 12px;
}

/* ── Karta pracownika (kalkulator) ───────────────────────────── */
.km-karta {
    background: var(--kolor-powierzchnia); border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg); padding: 20px 24px; margin-top: 16px;
}
.km-karta__naglowek {
    display: flex; align-items: center; gap: 14px; margin-bottom: 20px;
}
.km-karta__avatar {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--kolor-akcent); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-tytuly); font-weight: 700; font-size: 17px;
    flex-shrink: 0;
}
.km-karta__imie { font-family: var(--font-tytuly); font-size: 18px; font-weight: 700; }
.km-karta__rej  { font-size: 13px; color: var(--kolor-tekst-sub); margin-top: 2px; }
.km-karta__liczby {
    display: flex; gap: 24px; margin-bottom: 16px; flex-wrap: wrap;
}
.km-karta__liczba { flex: 1; min-width: 120px; }
.km-karta__wartosc {
    font-family: var(--font-tytuly); font-size: 32px; font-weight: 800; line-height: 1;
}
.km-karta__etykieta { font-size: 12px; color: var(--kolor-tekst-sub); margin-top: 4px; }
.km-karta__meta { font-size: 13px; color: var(--kolor-tekst-sub); margin-bottom: 14px; }

/* ── Pasek limitu km ─────────────────────────────────────────── */
.pasek-limitu-wrap { margin-top: 4px; }
.pasek-limitu-etykiety {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--kolor-tekst-sub); margin-bottom: 6px;
}
.pasek-limitu {
    height: 8px; background: var(--kolor-ramka);
    border-radius: 4px; overflow: hidden;
}
.pasek-limitu__wypelnienie {
    height: 100%; border-radius: 4px;
    background: var(--kolor-sukces);
    transition: width 0.4s ease;
}
.pasek-limitu__wypelnienie.pasek-limitu--ostrzezenie { background: var(--kolor-ostrzezenie); }
.pasek-limitu__wypelnienie.pasek-limitu--przekr { background: var(--kolor-blad); }

/* ── Rozwijana lista wyjazdów ────────────────────────────────── */
.km-szczegoly { margin-top: 16px; }
.km-szczegoly__summary {
    cursor: pointer; padding: 10px 0;
    font-weight: 600; color: var(--kolor-tekst-sub);
    font-size: 14px; list-style: none;
}
.km-szczegoly__summary::-webkit-details-marker { display: none; }
.km-szczegoly__summary::before { content: '▶ '; font-size: 10px; }
details[open] .km-szczegoly__summary::before { content: '▼ '; }

/* ── Brak danych z ikoną ─────────────────────────────────────── */
.brak-danych-ikona {
    text-align: center; padding: 48px 20px; color: var(--kolor-tekst-sub);
}
.brak-danych-ikona__svg { margin: 0 auto 16px; color: var(--kolor-ramka); }
.brak-danych-ikona p { font-size: 15px; }

/* ── Wnioski — korekta licznika ───────────────────────────────── */
.badge--warning {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
    background: rgba(245,158,11,0.15); color: #f59e0b;
    border: 1px solid rgba(245,158,11,0.3);
}
.badge--info {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
    background: rgba(99,102,241,0.12); color: #818cf8;
    border: 1px solid rgba(99,102,241,0.25);
}
.wniosek-karta--korekta-km { border-left-color: #f59e0b; }

.wniosek-kolizja-km {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    background: rgba(245,158,11,0.07); border: 1px solid rgba(245,158,11,0.2);
    border-radius: var(--promien); padding: 10px 14px;
    font-size: 13px; margin-bottom: 10px;
}
.wniosek-kolizja-km__label { font-weight: 600; color: #f59e0b; }
.wniosek-kolizja-km__arrow { color: var(--kolor-tekst-sub); }
.wniosek-kolizja-km__diff  { color: var(--kolor-blad); font-size: 12px; }

.wniosek-karta__meta-label {
    font-size: 11px; font-weight: 600; color: var(--kolor-tekst-sub);
    text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}

/* ── Km prywatne — badge ─────────────────────────────────────── */
.badge--kmp {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
    background: rgba(168,85,247,0.12); color: #c084fc;
    border: 1px solid rgba(168,85,247,0.25);
}

/* ── Km prywatne — strona admin ──────────────────────────────── */
.kmp-ustawienia {
    display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
    background: var(--kolor-powierzchnia); border: 1px solid var(--kolor-ramka);
    border-radius: var(--promien-lg); padding: 14px 18px; margin-bottom: 24px;
}
.kmp-ustawienia__label {
    font-size: 14px; font-weight: 600; color: var(--kolor-tekst-sub);
    white-space: nowrap;
}
.kmp-ustawienia__info { font-size: 13px; margin-left: 8px; }

.kmp-okres-toggle { display: flex; gap: 6px; }
.kmp-okres-btn {
    padding: 6px 14px; border-radius: var(--promien);
    border: 1px solid var(--kolor-ramka); background: var(--kolor-powierzchnia2);
    color: var(--kolor-tekst-sub); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
}
.kmp-okres-btn:hover { border-color: var(--kolor-akcent); color: var(--kolor-tekst); }
.kmp-okres-btn--aktywny {
    background: var(--kolor-akcent); color: #fff;
    border-color: var(--kolor-akcent);
}

.sekcja-naglowek { margin-bottom: 12px; }
.sekcja-tytul {
    font-family: var(--font-tytuly); font-size: 18px; font-weight: 700;
    color: var(--kolor-tekst);
}

.kmp-tabela-wrap {
    overflow-x: auto; border-radius: var(--promien-lg);
    border: 1px solid var(--kolor-ramka);
}
.kmp-tabela {
    width: 100%; border-collapse: collapse; font-size: 14px;
    background: var(--kolor-powierzchnia);
}
.kmp-tabela th {
    padding: 10px 14px; text-align: left;
    font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
    text-transform: uppercase; color: var(--kolor-tekst-sub);
    border-bottom: 1px solid var(--kolor-ramka); white-space: nowrap;
    background: var(--kolor-powierzchnia2);
}
.kmp-tabela td {
    padding: 12px 14px; border-bottom: 1px solid var(--kolor-ramka);
    vertical-align: middle;
}
.kmp-tabela tbody tr:last-child td { border-bottom: none; }
.kmp-tabela tbody tr:hover td { background: var(--kolor-powierzchnia2); }
.kmp-col-num { text-align: right; }

.kmp-row--off td { opacity: 0.5; }
.kmp-row--przekr td:first-child { border-left: 3px solid var(--kolor-blad); }

.kmp-val { font-weight: 700; color: #c084fc; }
.kmp-luk { display: block; font-size: 11px; color: var(--kolor-tekst-sub); margin-top: 2px; }
.kmp-off { color: var(--kolor-tekst-sub); font-size: 13px; }

.kmp-pasek {
    height: 6px; background: var(--kolor-ramka);
    border-radius: 3px; overflow: hidden; min-width: 80px;
}
.kmp-pasek__fill {
    height: 100%; border-radius: 3px;
    background: #c084fc; transition: width 0.3s ease;
}
.kmp-pasek__fill--przekr { background: var(--kolor-blad); }
.kmp-pasek__opis {
    font-size: 11px; color: var(--kolor-tekst-sub); margin-top: 3px;
}
.kmp-pasek__opis--przekr { color: var(--kolor-blad); font-weight: 600; }
