* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: #f4f6f9;
    color: #1a2330;
}

/* ---------- Topbar (AS-Soft style) ---------- */
.topbar-as-wrap {
    background: #f4f6f9;
    padding: 16px 20px 0;
    position: sticky;
    top: 0;
    z-index: 200;
}
.topbar-as {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.08);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    /* Nagłówek MUSI zostać w jednej linii (użytkownik, przebudowa layoutu §14) - zamiast
       flex-wrap:wrap (dawniej łamał się na dwa wiersze przy braku miejsca), kafelki poniżej się
       kurczą/kompaktują (.ctx-pill flex-shrink, ellipsis) zamiast schodzić do drugiego wiersza. */
    flex-wrap: nowrap;
    min-width: 0;
}
.topbar-as-left { display: flex; align-items: center; gap: 12px; flex-wrap: nowrap; min-width: 0; flex: 1 1 auto; overflow: hidden; }
.topbar-as-right { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; flex: 0 0 auto; }

.topbar-as-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding-right: 14px;
    border-right: 1px solid #e2e7ed;
    margin-right: 2px;
    /* Logo się nie kurczy - kafelki (.ctx-pill) mają flex-shrink i ellipsis właśnie po to, żeby to
       one oddawały miejsce jako pierwsze, zanim dojdzie do marki AS-Soft. */
    flex-shrink: 0;
}
.topbar-as-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}
.topbar-as-brand { display: flex; flex-direction: column; line-height: 1.15; }
.topbar-as-brand-name { font-weight: 800; font-size: 15px; color: #16212f; }
.topbar-as-brand-sub { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: #2563eb; }

.ctx-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e7ed;
    border-bottom: 3px solid #2563eb;
    border-radius: 12px;
    padding: 7px 14px 6px;
    text-decoration: none;
    color: inherit;
    /* min-width obniżony z 140px (kafelek mógł wtedy wymusić zawinięcie nagłówka do drugiego
       wiersza, gdy brakowało miejsca) - .ctx-pill-value/.ctx-pill-label mają już ellipsis, więc
       poniżej tego minimum kafelek po prostu skraca tekst zamiast łamać cały topbar-as. */
    min-width: 64px;
    max-width: 220px;
    flex-shrink: 1;
    transition: background 0.12s ease;
}
a.ctx-pill:hover { background: #eff4ff; }
.ctx-pill-kasa, .ctx-pill-gotowka { border-bottom-color: #16a34a; }

.ctx-pill-select {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #16212f;
    cursor: pointer;
    max-width: 160px;
}
.ctx-pill-select:focus { outline: none; }

.ctx-pill-gotowka {
    background: #f0fdf4;
    padding: 10px 20px 9px;
    /* Kwota stanu gotówki NIGDY nie może się przyciąć ellipsis (to nie jest tekst drugorzędny jak
       nazwa Centrali/Oddziału) - w nowrap topbarze (§14) to inne, mniej krytyczne kafelki (TO
       STANOWISKO, Centrala, Oddział, Moduł) mają się kurczyć/skracać pierwsze. 280px (nie 220,
       odziedziczone z .ctx-pill) - żeby zmieściła się nawet siedmiocyfrowa kwota przy 24px foncie,
       bez opierania się na max-width:220px z .ctx-pill (tu jawnie wyłączone). */
    min-width: 280px;
    max-width: none;
    flex-shrink: 0;
}
.ctx-pill-gotowka .ctx-pill-icon { width: 40px; height: 40px; font-size: 19px; }
.ctx-pill-gotowka .ctx-pill-label { font-size: 11px; }
.ctx-pill-gotowka .ctx-pill-value-green { font-size: 24px; white-space: nowrap; }

.ctx-pill-przelacz { background: #fffbeb; border-bottom-color: #d97706; padding: 10px 20px 9px; min-width: 0; white-space: nowrap; }
.ctx-pill-przelacz .ctx-pill-icon { width: 40px; height: 40px; font-size: 19px; background: #fef3c7; }
.ctx-pill-przelacz .ctx-pill-label { font-size: 11px; }
.ctx-pill-przelacz .ctx-pill-value { font-size: 16px; white-space: nowrap; }
a.ctx-pill-przelacz:hover { background: #fef3c7; }

/* Przełącznik "Moduł Kantor/Złoto" w topbarze - segmentowa pigułka z gradientowym
   podświetleniem aktywnej opcji (patrz Shared/MainLayout.razor). */
.modul-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: #eef1f6;
    border: 1px solid #e2e7ed;
    border-radius: 999px;
}
.modul-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.1s ease;
}
.modul-switch-btn:hover { color: #1f2d3d; }
.modul-switch-btn:active { transform: scale(0.97); }
.modul-switch-btn.is-active {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.35);
}
.modul-switch-btn.is-active:hover { color: #fff; }

.ctx-pill-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 15px;
    flex-shrink: 0;
    background: #dbeafe;
}
.ctx-pill-kasa .ctx-pill-icon, .ctx-pill-gotowka .ctx-pill-icon { background: #dcfce7; }
/* min-width:0 - bez tego flex item domyslnie nie kurczy sie ponizej szerokosci wlasnej tresci,
   wiec text-overflow:ellipsis nizej (.ctx-pill-value/.ctx-pill-label) nigdy by sie nie uaktywnil
   dla dlugiej nazwy centrali/oddzialu - zgloszenie uzytkownika: dlugie nazwy rozpychaly caly
   naglowek i lamaly go na dwa wiersze przy rozdzielczosci referencyjnej 1920x1080. */
.ctx-pill-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow: hidden; }
.ctx-pill-label {
    font-size: 10px; font-weight: 700; letter-spacing: 0.05em; color: #94a3b8;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ctx-pill-value {
    font-size: 14px; font-weight: 700; color: #16212f;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ctx-pill-value-green { color: #16a34a; font-size: 16px; }
.ctx-pill-sub { font-size: 11px; color: #64748b; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.ctx-pill-sub span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.status-dot-online { background: #16a34a; }
.status-dot-offline { background: #dc2626; }

.topbar-clock-light { font-size: 12px; color: #64748b; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Licznik sesji DEMO (KOMPLETNY MECHANIZM BEZPIECZEŃSTWA PUBLICZNEGO DEMO) - subtelny, nie duży
   modal; zmienia kolor na ostrzegawczy w ostatnich minutach zamiast osobnego komunikatu/toastu. */
.topbar-demo-czas { font-size: 12px; color: #16a34a; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.topbar-demo-czas.is-koncowka { color: #dc2626; }

.topbar-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #475569;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.12s ease;
}
.topbar-icon-btn:hover { background: #e2e8f0; }

.topbar-as-user { display: flex; align-items: center; gap: 8px; padding-left: 10px; border-left: 1px solid #e2e7ed; }
.topbar-as-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.topbar-as-user-body { display: flex; flex-direction: column; gap: 2px; }
.topbar-login { font-size: 12px; color: #475569; }
.topbar-badge {
    background: #2563eb;
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 1px 7px;
    border-radius: 999px;
    width: fit-content;
}

/* HIERARCHIA RESPONSYWNEGO UPRASZCZANIA NAGŁÓWKA (użytkownik, §2) - gdy brakuje miejsca, w TEJ
   kolejności, nigdy przez zawijanie do drugiego wiersza (§1):
     1. usuń ikony Z WNĘTRZA kafelków (CENTRALA/ODDZIAŁ/KASA/GOTÓWKA/MODUŁ) - dekoracyjne, nazwa/
        dane/status zostają w pełni czytelne (§3/§4)
     2. zmniejsz padding i odstępy między kafelkami
     3. skróć tekst drugorzędny (ukryj podpis Aktywna/Online/kas(y), krótsza etykieta Gotówki)
     4. dopiero na końcu, delikatnie, font-size
   Ikony SYSTEMOWE (zegar-kalendarz/ustawienia/dzwonek/avatar/Wyloguj) to osobne kontrolki - nie są
   tu ruszane wcale (§5), tylko rozmiarowo kompaktowane razem z resztą paska w kroku 2. */
@media (max-width: 1780px) {
    .ctx-pill-icon { display: none; }
}

/* Ekran kasowy 1366x768 (patrz też dash-sidebar/handel-panel niżej) - na tej szerokości pigułki
   topbara (Centrala/Oddział/Kasa/Gotówka/Moduł, już bez ikon - krok 1 wyżej) + prawa strona
   (zegar/user) nadal nie mieszczą się w jednym wierszu w pełnych rozmiarach. Krok 2: mniejszy
   padding/odstępy/fonty pigułek, bez dalszego chowania treści. Próg podniesiony z 1440 do 1700px
   (użytkownik, test przy 1600px). */
@media (max-width: 1700px) {
    .topbar-as-wrap { padding: 10px 20px 0; }
    .topbar-as { padding: 8px 14px; gap: 10px; }
    .topbar-as-left { gap: 8px; }
    .topbar-as-right { gap: 6px; }
    .topbar-as-logo { gap: 6px; padding-right: 8px; margin-right: 0; }
    .topbar-as-mark { width: 30px; height: 30px; font-size: 11px; }
    .topbar-as-brand-name { font-size: 12.5px; }
    .topbar-as-brand-sub { font-size: 9px; }
    .modul-switch-btn { padding: 5px 9px; font-size: 11px; }
    .ctx-pill { min-width: 0; gap: 6px; padding: 5px 8px 4px; }
    .ctx-pill-label { font-size: 9px; }
    .ctx-pill-value { font-size: 12px; }
    .ctx-pill-sub { font-size: 10px; }
    .ctx-pill-select { font-size: 12px; max-width: 100px; }
    /* min-width nie na 0 - żeby węższy font (17px) nadal miał gdzie zmieścić całą kwotę bez ellipsis. */
    .ctx-pill-gotowka { min-width: 195px; padding: 5px 10px 4px; }
    .ctx-pill-gotowka .ctx-pill-value-green { font-size: 17px; }
    .ctx-pill-przelacz { padding: 5px 10px 4px; }
    .ctx-pill-przelacz .ctx-pill-value { font-size: 12.5px; }
    .topbar-clock-light { font-size: 11px; }
    .topbar-icon-btn { width: 28px; height: 28px; font-size: 12px; }
    .topbar-as-user { gap: 5px; padding-left: 7px; }
    .topbar-as-avatar { width: 26px; height: 26px; font-size: 11px; }
    .topbar-as-user .btn { padding: 6px 12px; font-size: 12px; }
}

/* Etykieta "STAN GOTÓWKI (PLN)" -> "GOTÓWKA PLN" na wąskich ekranach (użytkownik, §17) - kafelek
   zostaje kompaktowy, informacja się nie zmienia, tylko krótsza etykieta. */
.ctx-pill-label-short { display: none; }

/* Poniżej 1366px kompresja z bloku wyżej już nie zawsze wystarcza (długie nazwy Centrali/Oddziału +
   5 kafelków + prawa strona topbara) - nagłówek NIE MOŻE zejść do drugiego wiersza (§14), więc tu
   dokręcamy dalej: zwężamy jeszcze bardziej, zamiast pozwolić .topbar-as złamać się na dwie linie.
   Świadomie BEZ chowania .ctx-pill-sub (status ONLINE/OFFLINE, Aktywna/Zablokowana) - §12: status
   ma pozostać widoczny nawet przy braku miejsca, tylko ikona dekoracyjna znika (krok 1 wyżej). */
@media (max-width: 1366px) {
    .topbar-as { gap: 6px; }
    .topbar-as-left { gap: 5px; }
    .ctx-pill { min-width: 0; padding: 5px 7px 4px; max-width: 150px; }
    .ctx-pill-sub { font-size: 9px; }
    .ctx-pill-label-full { display: none; }
    .ctx-pill-label-short { display: block; }
    /* max-width:none tu jawnie powtórzony - inaczej .ctx-pill (max-width:150px, wyżej w tym samym
       bloku) wygrywa przez kolejność w źródle mimo równej specyficzności selektora i kwota by się
       jednak przycięła. min-width też jawnie (>0), żeby nie spaść do min-width:0 z reguły .ctx-pill
       powyżej - kwota nie może się przycinać, patrz flex-shrink:0 przy bazowej regule. */
    .ctx-pill-gotowka { padding: 5px 12px 4px; min-width: 145px; max-width: none; }
    .ctx-pill-gotowka .ctx-pill-value-green { font-size: 15px; }
    .ctx-pill-przelacz .ctx-pill-value { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-as-brand-sub { display: none; }
}

.content { padding: 10px 20px 60px; }

.kantor-page { max-width: 1100px; margin: 0 auto; }
.kantor-page h2 { color: #16212f; font-size: 22px; margin: 0 0 4px; }
.kantor-page h3 { color: #16212f; font-size: 15px; margin: 0 0 12px; }

/* ---------- Centrala pill ---------- */
.pill-badge-wrap { display: flex; justify-content: center; margin: 8px 0 28px; }
.pill-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 220px;
    height: 130px;
    border: 2px solid #2563eb;
    border-radius: 50%;
    background: white;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease, transform 0.08s ease;
}
.pill-badge:hover { background: #eff4ff; transform: translateY(-1px); }
.pill-badge-icon { width: 26px; height: 26px; color: #2563eb; }
.pill-badge-title { font-size: 14px; font-weight: 700; color: #16212f; letter-spacing: 0.02em; }
.pill-badge-sub { font-size: 12px; color: #64748b; }

/* ---------- Punkt (oddział) cards ---------- */
.punkt-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 28px; }
.punkt-card {
    background: white;
    border: 1px solid #e2e7ed;
    border-radius: 14px;
    padding: 20px;
    flex: 1 1 260px;
    min-width: 240px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
}
.punkt-card.card-blocked { opacity: 0.6; }
.punkt-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.punkt-card-title { font-size: 15px; font-weight: 700; color: #16212f; text-transform: uppercase; letter-spacing: 0.03em; text-decoration: none; }
.punkt-card-title:hover { color: #2563eb; }
.punkt-card-meta { font-size: 12px; color: #64748b; }
.punkt-card-kasa {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #eef2ff;
    color: #1e293b;
    border-radius: 8px;
    padding: 8px 10px 8px 14px;
    margin-bottom: 8px;
    font-size: 14px;
}
.punkt-card-kasa:last-child { margin-bottom: 0; }
.punkt-card-kasa.kasa-blocked { background: #fee2e2; color: #7f1d1d; }
.punkt-card-kasa-actions { display: flex; gap: 6px; flex-shrink: 0; }
.punkt-card-kasa-name { font-size: 18px; font-weight: 700; }
.punkt-card-empty { font-size: 13px; color: #94a3b8; }
.punkt-card-footer { display: flex; gap: 8px; margin-top: 14px; }

/* ---------- Selectors ---------- */
.selector-bar {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.selector label { display: block; font-size: 12px; color: #64748b; margin-bottom: 4px; font-weight: 600; }
.selector select {
    padding: 8px 12px;
    font-size: 14px;
    min-width: 200px;
    border: 1px solid #d3dae2;
    border-radius: 6px;
    background: white;
}
.selector select:focus { border-color: #2563eb; outline: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.12s ease, transform 0.05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: #2563eb; color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #e7ecf2; color: #1f2d3d; margin-left: auto; }
.btn-secondary:hover { background: #d9e0e9; }

.pracownik-akcje { display: flex; gap: 8px; flex-wrap: wrap; }
.pracownik-akcje .btn { min-width: 140px; margin-left: 0; }
.btn-green { background: #16a34a; color: white; }
.btn-green:hover { background: #15803d; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-wroc { background: #dc2626; color: white; font-size: 15px; padding: 10px 22px; }
.btn-wroc:hover { background: #b91c1c; }
.btn-lg { font-size: 15px; padding: 10px 22px; }
.btn-xs { font-size: 12px; padding: 6px 10px; }

/* ---------- Section header ---------- */
.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.section-header h3 { margin: 0; }
.btn-add {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.12s ease, transform 0.05s ease;
}
.btn-add:hover { background: #1d4ed8; }
.btn-add:active { transform: translateY(1px); }

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #e7ecf2;
    color: #1f2d3d;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0;
    transition: background 0.12s ease, transform 0.05s ease;
}
.btn-icon:hover { background: #d9e0e9; }
.btn-icon:active { transform: translateY(1px); }

/* ---------- Panels ---------- */
.advanced-panel {
    background: white;
    border: 1px solid #e2e7ed;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
}
.advanced-panel h3 { font-size: 14px; margin: 0 0 12px; color: #1f2d3d; }

/* Karty Kasa/Układ/Moduły (Pages/MojeStanowiskoStrona.razor) - .advanced-panel istniejące, tylko w
   siatce 2 kolumny zamiast pełnej szerokości jedna pod drugą; karta "Moduły" zajmuje cały wiersz. */
.stanowisko-karty { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.stanowisko-karta { margin-bottom: 0; }
.stanowisko-karta-szeroka { grid-column: 1 / -1; }
.stanowisko-modul-wiersz { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 6px; }
@media (max-width: 760px) {
    .stanowisko-karty { grid-template-columns: 1fr; }
}

/* Switch ON/OFF (moduły stanowiska) - sam wzorzec co .as-theme-switch (Pages/Login.razor,
   przełącznik jasny/ciemny motyw), tylko nazwany pod ogólne "włącz/wyłącz" zamiast "motyw". */
.stanowisko-switch {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    border: none;
    background: #cbd5e1;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.stanowisko-switch.is-on { background: #16a34a; }
.stanowisko-switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.15s ease;
}
.stanowisko-switch.is-on .stanowisko-switch-knob { transform: translateX(20px); }
.advanced-subheading { font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; margin: 18px 0 10px; }
.advanced-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: end;
}
.advanced-grid label { font-size: 12px; color: #64748b; font-weight: 600; }
.advanced-grid input {
    display: block;
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border: 1px solid #d3dae2;
    border-radius: 6px;
}
.advanced-grid input:focus { border-color: #2563eb; outline: none; }
.advanced-grid select {
    display: block;
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border: 1px solid #d3dae2;
    border-radius: 6px;
    background: white;
}
.advanced-grid select:focus { border-color: #2563eb; outline: none; }
.advanced-grid input[readonly] { background: #f4f6f9; color: #475569; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: #64748b; margin-bottom: 4px; font-weight: 600; }
.field input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d3dae2;
    border-radius: 6px;
    font-size: 14px;
}
.field input:focus { border-color: #2563eb; outline: none; }
.field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d3dae2;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}
.field select:focus { border-color: #2563eb; outline: none; }

.info-zbiorowka {
    color: #475569;
    font-size: 13px;
    margin-bottom: 12px;
    background: #eef2f7;
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
}

/* Próg GIIF w lewym menu (Shared/DashSidebar.razor, nad ikonami wydruków/opcji - patrz
   ToolbarPanelBoczny w Pages/KursyWalut.razor) - wąska kolumna menu (208px), więc tekst zawija
   się na kilka linii zamiast jednego wyśrodkowanego wiersza jak dawniej w panelu Handlu. */
.giif-prog-baner-sidebar {
    color: #92400e;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 10px;
    padding: 8px 10px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    text-align: center;
}
.giif-prog-baner-sidebar strong { display: block; font-size: 13px; color: #92400e; }

/* ZADANIE: OBSŁUGA DATY HISTORYCZNEJ - baner "TRYB HISTORYCZNY" w panelu Handlu (Pages/
   KursyWalut.razor), tuż nad przyciskami Kupno/Sprzedaż/Zasilenie/Odprowadzenie. Ta sama paleta
   ostrzegawcza co .giif-prog-baner-sidebar - musi zostać widoczny przez CAŁY czas trwania trybu
   historycznego (§7/§8), więc nie jest to jednorazowy toast. */
.tryb-historyczny-baner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #7f1d1d;
    font-size: 13px;
    font-weight: 600;
    margin: 10px 0;
    padding: 10px 14px;
    background: #fca5a5;
    border: 1px solid #dc2626;
    border-radius: 8px;
}

.kasy-config { display: flex; gap: 20px; margin-bottom: 16px; flex-wrap: wrap; }

.kursy-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    background: white;
    border: 1px solid #e2e7ed;
    border-radius: 14px;
    padding: 8px;
    margin-top: 4px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
    width: fit-content;
}
.kursy-toolbar .btn-icon { width: 40px; height: 40px; border-radius: 10px; background: #f1f5f9; }
.kursy-toolbar .btn-icon:hover { background: #e2e8f0; }

/* PRZEBUDOWA LAYOUTU (Kursy Walut/Historia jako zakładki w lewej kolumnie, Handel stabilny po
   prawej): .handel-layout to CSS Grid o DWÓCH kolumnach - .kursy-lewa-kolumna (tabela kursów ALBO
   historia, zależnie od aktywnej zakładki) i .handel-panel.
   Tabela kursów ma być tak wysoka jak panel Handlu (użytkownik) - CSS SAMO tego nie potrafi:
   align-items:stretch (domyślne w grid) rozciąga KRÓTSZĄ kolumnę do wysokości DŁUŻSZEJ, ale
   wysokość "auto" wiersza siatki i tak liczy się z NATURALNEJ (nieprzyciętej) wysokości obu kolumn
   - czyli to tabela (dłuższa) narzucałaby wysokość Handlowi, odwrotnie niż potrzeba. Dlatego
   align-items:start (Handel zachowuje własną, naturalną wysokość) + JS (xkantorSynchronizujWysokoscTabeli
   w wwwroot/js/site.js, ResizeObserver na #handel-gora) ustawia realną wysokość panelu Handlu
   wprost jako .kursy-table-scroll { height }, co daje wewnętrzny scrollbar tabeli. */
.handel-layout { display: grid; grid-template-columns: 44fr 56fr; gap: 20px; align-items: start; }
/* Jedna kolumna (na pełną szerokość) - widok zbiorczy BEZ Handlu obok, oraz zakładka Historia,
   która ma zajmować całą szerokość z ukrytym Handlem (użytkownik, patrz AktywujZakladkeHistoriaAsync
   i warunek renderowania .handel-panel w Pages/KursyWalut.razor: "!PokazHistorie"). */
.handel-layout-jedna-kolumna { grid-template-columns: 1fr; }
/* Wariant B (Stanowisko.UkladGlownegoEkranu=HandelTabela) - Handel po lewej, Tabela po prawej.
   CSS order (bez duplikowania znaczników obu kolumn - patrz Pages/KursyWalut.razor) + odwrócone
   proporcje szerokości śladów siatki, żeby każda kolumna zachowała SWOJĄ szerokość niezależnie od
   tego, w którym śladzie siatki wyląduje. */
.handel-layout-odwrocony { grid-template-columns: 56fr 44fr; }
.handel-layout-odwrocony .kursy-lewa-kolumna { order: 2; }
.handel-layout-odwrocony .handel-panel { order: 1; }
.kursy-lewa-kolumna { display: flex; flex-direction: column; min-width: 0; }
.kursy-lewa-kolumna .kursy-table { width: 100%; }
/* Wysokość ustawiana z JS (patrz komentarz przy .handel-layout) - min-height jako rozsądny spadek,
   zanim JS zdąży ją nadpisać (pierwszy render) albo gdy WybranaKasaId==0 (Handel nieobecny, JS się
   wtedy nie odpala - patrz warunek w OnAfterRenderAsync). */
.kursy-table-scroll { min-height: 300px; overflow-y: auto; overflow-x: auto; }
/* Tabela Historii ma 16 kolumn - za dużo na samą lewą kolumnę, nawet gdy ta zakładka zajmuje całą
   szerokość .handel-layout (użytkownik: Historia jest jedną kolumną, ale wciąż węższą niż dawna
   pełna szerokość strony poza .kantor-page). Scroll poziomy TEGO kontenera, nie całej strony. */
.historia-table-scroll { overflow-x: auto; }
/* Kolumna "Data" w Historii pokazuje tylko "dd.MM" (użytkownik: zwęzić, żeby "Kto"/kasjer -
   ostatnia z 16 kolumn - zmieścił się bez poziomego scrolla tego kontenera). */
.historia-table-scroll .kursy-table th:nth-child(2),
.historia-table-scroll .kursy-table td:nth-child(2) {
    width: 56px;
    min-width: 56px;
    white-space: nowrap;
}
.handel-layout .kursy-table th { background: #f8fafc; color: #64748b; border-bottom: 1px solid #e2e7ed; }
.handel-layout .kursy-table td.symbol { color: #16212f; }
.handel-panel { margin-bottom: 0; min-width: 0; padding-top: 10px; }

/* Zakładki "Kursy Walut" / "Historia" (lewa kolumna) - odpowiednik starego Define Tab/Page. */
.kursy-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e2e7ed; margin-bottom: 14px; }
.kursy-tab-btn {
    border: none;
    background: transparent;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
    transition: color 0.12s ease, background 0.12s ease;
}
.kursy-tab-btn:hover { color: #1f2d3d; background: #f8fafc; }
.kursy-tab-btn.is-active { color: #2563eb; border-bottom-color: #2563eb; }

/* Skrót "Handel - Kasa X" / "Historia" w lewym menu (Shared/DashSidebar.razor) skacze tu przez
   zwykłą kotwicę #id - scroll-margin-top zostawia miejsce na sticky nagłówek (.topbar-as-wrap,
   ~95px), inaczej przeglądarka wylądowałaby z nagłówkiem "Handel - Kasa X" schowanym POD nim. */
#handel-gora, #handel-historia-podreczna { scroll-margin-top: 100px; }
.handel-panel h3 {
    text-transform: uppercase;
    color: #2563eb;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
}
.handel-panel .advanced-grid { grid-template-columns: 1fr; gap: 10px; }
.handel-panel .btn { margin-right: 8px; }

.handel-header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.handel-header-row h3 { margin: 0; }
.voice-control-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #eef2f7;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}
.voice-control-mic { display: flex; color: #2563eb; flex-shrink: 0; }
.voice-control-info { display: flex; color: #94a3b8; margin-left: 2px; flex-shrink: 0; cursor: default; }

/* Wszystkie 4 przyciski (Kupno/Sprzedaz/Zasilenie/Odprowadzenie) w JEDNEJ linii (uzytkownik) -
   4 rowne kolumny zamiast dawnych 2x2, wezsze/mniejsze (padding/ikona/czcionka), zeby 4 kolumny
   sie zmiescily bez zawijania tekstu w waskim panelu Handlu. */
.typ-transakcji-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.typ-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 8px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    min-width: 0;
}
.typ-btn:hover { transform: translateY(-1px); }
.typ-btn:active { transform: translateY(0); }
.typ-btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.22);
}
.typ-btn-icon svg { width: 13px; height: 13px; }
.typ-btn-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; overflow: hidden; }
.typ-btn-title { font-size: 12px; font-weight: 800; letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.typ-btn-sub { font-size: 9px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Zasilenie/Odprowadzenie - bez ikony (uzytkownik), caly przycisk na tekst wysrodkowany. "ODPROWADZENIE"
   (13 znakow) NIE MOZE sie ucinac - bez white-space:nowrap/ellipsis tutaj, wolno mu zawinac sie do
   dwoch linii zamiast obcinac tekst (to jedyny sposob zmiescic to slowo w waskiej 1/4 kolumnie bez
   pomniejszania czcionki ponizej czytelnosci). */
.typ-btn-bez-ikony { justify-content: center; text-align: center; }
.typ-btn-bez-ikony .typ-btn-text { align-items: center; }
.typ-btn-bez-ikony .typ-btn-title { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.15; }
.typ-btn-bez-ikony .typ-btn-sub { white-space: normal; overflow: visible; text-overflow: clip; }

.typ-btn-kupno {
    background: linear-gradient(135deg, #22a35a, #157a3d);
    color: #fff;
    box-shadow: 0 3px 10px rgba(21, 122, 61, 0.28);
}
.typ-btn-kupno:hover { box-shadow: 0 6px 16px rgba(21, 122, 61, 0.38); }
.typ-btn-kupno .typ-btn-sub { color: #dcfce7; }

.typ-btn-sprzedaz {
    background: linear-gradient(135deg, #ef4444, #c92424);
    color: #fff;
    box-shadow: 0 3px 10px rgba(201, 36, 36, 0.28);
}
.typ-btn-sprzedaz:hover { box-shadow: 0 6px 16px rgba(201, 36, 36, 0.38); }
.typ-btn-sprzedaz .typ-btn-sub { color: #fee2e2; }

.typ-btn-zasilenie {
    background: #f0fdf4;
    border-color: #bbf0cd;
    color: #15803d;
}
.typ-btn-zasilenie:hover { background: #dcfce7; border-color: #86efac; }
.typ-btn-zasilenie .typ-btn-icon { background: rgba(21, 128, 61, 0.1); color: #15803d; }
.typ-btn-zasilenie .typ-btn-sub { color: #2f8a57; }

.typ-btn-odprowadzenie {
    background: #fef2f2;
    border-color: #fbd0d0;
    color: #b91c1c;
}
.typ-btn-odprowadzenie:hover { background: #fee2e2; border-color: #fca5a5; }
.typ-btn-odprowadzenie .typ-btn-icon { background: rgba(185, 28, 28, 0.1); color: #b91c1c; }
.typ-btn-odprowadzenie .typ-btn-sub { color: #c14545; }

.typ-btn.aktywny { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.45), 0 6px 16px rgba(37, 99, 235, 0.18); }

.waluta-picker { position: relative; margin-top: 4px; }
.waluta-picker-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d3dae2;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.waluta-picker-toggle:hover { border-color: #94a3b8; }
.waluta-picker-toggle-text { flex: 1; min-width: 0; }
.waluta-picker-arrow { color: #94a3b8; font-size: 11px; flex-shrink: 0; }
.waluta-picker-backdrop { position: fixed; inset: 0; z-index: 40; background: transparent; border: none; padding: 0; }
.waluta-picker-lista {
    position: absolute;
    z-index: 50;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: white;
    border: 1px solid #d3dae2;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.15);
    padding: 4px;
}
.waluta-picker-opcja {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font: inherit;
}
.waluta-picker-opcja:hover { background: #f1f5f9; }
.waluta-picker-opcja.aktywna { background: #dbeafe; }
.handel-panel .waluta-picker-toggle,
.handel-panel .waluta-picker-opcja { font-size: 18px; }
.waluta-picker-toggle .flaga-img,
.waluta-picker-opcja .flaga-img { border-radius: 3px; width: 28px !important; height: 21px !important; object-fit: cover; flex-shrink: 0; }

.propozycja-zasilenia {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fef3c7;
    border: 1px solid #fde68a;
}
.propozycja-zasilenia p { margin: 0 0 10px; color: #92400e; font-weight: 600; }
.propozycja-zasilenia-przyciski { display: flex; gap: 10px; }

@keyframes handel-ilosc-puls {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.45); }
    50% { box-shadow: 0 0 0 7px rgba(37, 99, 235, 0); }
}
#handel-ilosc:focus {
    animation: handel-ilosc-puls 1.1s ease-in-out 2;
    border-color: #2563eb;
    outline: none;
}

.typ-transakcji-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid transparent;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}
.typ-transakcji-badge .typ-btn-icon { flex-shrink: 0; }

.data-realizacji-field { font-size: 13px !important; font-weight: 700 !important; color: #0f172a !important; }
.data-realizacji-field input[type="date"] {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    padding: 12px 14px !important;
    border-radius: 10px !important;
}
.handel-row > .data-realizacji-narrow { flex: 0 0 170px; }
.handel-row > .handel-sposob-platnosci { flex: 1 1 auto; font-size: 13px !important; font-weight: 700 !important; color: #0f172a !important; }
.kasa-toggle { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.kasa-toggle input[type="checkbox"] { width: 16px; height: 16px; margin: 2px 0 0 0; flex-shrink: 0; }
.kasa-toggle span { line-height: 1.3; }

/* Grupuje kilka powiazanych checkboxow (np. Tryb RAW + Podglad + Drukuj godzine) w jednej
   linii zamiast kazdego na osobnym pelnym wierszu grida - Pages/MojeStanowiskoStrona.razor. */
.checkbox-row { display: flex; flex-wrap: wrap; gap: 6px 28px; align-items: center; }

/* Pole (waskie, np. liczba/port) + jego komentarz OBOK w tej samej linii, zamiast komentarza
   zawijanego pod spodem na cala szerokosc - Pages/MojeStanowiskoStrona.razor. */
.field-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.field-row .field { margin-bottom: 0; }
.field-row .hint { flex: 1 1 240px; padding-top: 22px; margin: 0; }

.handel-panel .advanced-grid label,
.handel-panel .advanced-grid input,
.handel-panel .advanced-grid select { font-size: 18px; }

.handel-panel .handel-row { display: flex; gap: 14px; align-items: flex-end; }
.handel-panel .handel-row > label { flex: 1 1 0; min-width: 0; }
.handel-panel .input-sm input { max-width: 140px; }
.handel-panel .side-info {
    font-size: 18px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    padding-bottom: 8px;
}
.handel-panel .side-info strong { color: #1f2d3d; font-size: 18px; }
.handel-panel .lbl-bold { font-weight: 800; font-size: 18px; color: #0f172a; }

.handel-buttons-spacer { height: 4.5rem; }
.handel-buttons-row { display: flex; justify-content: center; gap: 10px; }
.handel-buttons-row .btn { margin-right: 0; }
.handel-buttons-footer { height: 3rem; }

.kasa-wskaznik { text-align: center; padding: 14px; border-radius: 12px; margin-top: 2px; margin-bottom: 16px; }
.kasa-wskaznik.wplata { background: #fdecec; }
.kasa-wskaznik.wyplata { background: #e7f8ec; }
.kasa-label { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }
.kasa-wskaznik.wplata .kasa-label { color: #b91c1c; }
.kasa-wskaznik.wyplata .kasa-label { color: #15803d; }
.kasa-kwota { font-size: 30px; font-weight: 800; color: #16212f; margin-top: 4px; }

/* Ekran kasowy 1366x768 - panel HANDEL (patrz komentarz przy topbarze wyżej). Poza kompresją
   topbara, sam panel miał dwa czysto dekoracyjne "dosypywacze" wysokości bez treści
   (.handel-buttons-spacer 4.5rem + .handel-buttons-footer 3rem = 120px pustego miejsca) oraz
   sporo marginesów/fontów 18px dobranych z myślą o dużych ekranach - to one, obok
   dwuwierszowego topbara, były głównym powodem, dla którego przycisk "Zapisz i Drukuj" wypadał
   poza widoczny obszar 768px. Duże przyciski KUPNO/SPRZEDAŻ/ZASILENIE/ODPROWADZENIE (typ-btn)
   celowo zostają w rozmiarze zbliżonym do oryginału - to one mają zostać "duże i czytelne". */
@media (max-width: 1440px) {
    .handel-panel { padding-top: 6px; padding-bottom: 10px; }
    .handel-header-row { margin-bottom: 8px; }
    .typ-transakcji-buttons { grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 6px; }
    .typ-btn { padding: 8px 12px; }
    .typ-btn-icon { width: 26px; height: 26px; }
    .typ-btn-icon svg { width: 17px; height: 17px; }
    .typ-btn-title { font-size: 14px; }
    .typ-btn-sub { font-size: 11px; }
    .typ-transakcji-badge { padding: 7px 12px; margin-bottom: 8px; font-size: 14px; }
    .kasa-wskaznik { padding: 7px; margin-bottom: 8px; }
    .kasa-kwota { font-size: 20px; margin-top: 2px; }
    .handel-panel .advanced-grid { gap: 6px; }
    .handel-panel .advanced-grid label,
    .handel-panel .advanced-grid input,
    .handel-panel .advanced-grid select,
    .handel-panel .side-info,
    .handel-panel .side-info strong,
    .handel-panel .lbl-bold { font-size: 14px; }
    .handel-panel .side-info { padding-bottom: 4px; }
    .data-realizacji-field input[type="date"] { padding: 7px 10px !important; font-size: 13px; }
    .handel-buttons-spacer { height: 0; }
    .handel-buttons-footer { height: 0; }
}

.typ-transakcji-label { font-size: 13px; font-weight: 800; color: #0f172a; }
.typ-transakcji-select { width: 100%; font-size: 18px; font-weight: 700; padding: 10px 12px; }

.advanced-grid input[type="number"] { text-align: right; }
.cell-input { text-align: right; }

/* ---------- Tables ---------- */
.kursy-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(16,24,40,0.06);
}
.kursy-table th {
    background: #16212f;
    color: white;
    text-align: left;
    padding: 11px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.kursy-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #eef1f4;
    font-size: 14px;
}
.kursy-table tbody tr:last-child td { border-bottom: none; }
.kursy-table tbody tr:hover { background: #f8fafc; }
.kursy-table td.symbol { font-weight: 700; color: #1e40af; white-space: nowrap; }
.kursy-table td.symbol .flaga-img { vertical-align: middle; margin-right: 6px; border-radius: 2px; width: 20px; height: 15px; object-fit: cover; }
.handel-layout .kursy-table td.symbol { font-size: 17px; }
/* Boxy Kupno/Sprzedaż w tabeli obok Handlu zmniejszone (użytkownik), ale wciąż mieszczą max kurs
   9999,999999 (12 znaków w trybie edycji, InvariantCulture "9999.999999") bez obcinania - stąd
   104px, nie mniej. Razem z węższymi Kupno/Sprzedaż i mniejszym paddingiem komórek (niżej) tabela
   mieści też Ilość i Kurs Śr. bez poziomego scrolla przy typowej szerokości prawej kolumny. */
.handel-layout .cell-input { width: 100%; max-width: 104px; border-radius: 8px; padding: 6px 7px; font-size: 13px; }
/* Zawężone do .kursy-table-scroll (tabela Kupno/Sprzedaż obok Handlu), NIE całego .handel-layout -
   inaczej ta sama reguła (2./3. kolumna) łapała też kolumnę "Data" w tabeli Historii
   (.historia-table-scroll), wymuszając jej szerokość na 104px mimo osobnej reguły niżej. */
.kursy-table-scroll .kursy-table th:nth-child(2), .kursy-table-scroll .kursy-table td:nth-child(2),
.kursy-table-scroll .kursy-table th:nth-child(3), .kursy-table-scroll .kursy-table td:nth-child(3) {
    min-width: 104px;
}
.handel-layout .kursy-table th, .handel-layout .kursy-table td { padding-left: 8px; padding-right: 8px; }
.handel-layout .kursy-table td.kurs-sr { font-size: 13px; }
.symbol-opis { line-height: 1.3; }
.symbol-linia { font-weight: 700; color: #1e40af; white-space: nowrap; }
.symbol-linia .flaga-img { vertical-align: middle; margin-right: 6px; border-radius: 2px; width: 20px; height: 15px; object-fit: cover; }
.handel-layout .symbol-linia { font-size: 17px; }
.handel-layout .symbol-linia .flaga-img { margin-right: 8px; border-radius: 3px; width: 28px !important; height: 21px !important; }
.opis-linia { font-size: 12px; color: #64748b; margin-top: 2px; }
.handel-layout .kursy-table td.symbol .flaga-img { margin-right: 8px; border-radius: 3px; width: 28px !important; height: 21px !important; }
.kursy-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
/* BID/ASK Forex NAD KUPNO/SPRZEDAŻ (XKantor Forex Cloud) - świadomie w tej samej komórce co
   wyliczone Kupno/Sprzedaż (użytkownik: "zawsze nad kupno i sprzedaz"), NIE osobna kolumna (był
   taki wariant, cofnięty - rozjeżdżał tabelę i oddalał surowy kurs od wyniku, który z niego
   wynika). Większy/ciemniejszy niż dawny 11px szary dopisek - kasjer "musi wzrokowo widzieć" bez
   najeżdżania myszką po tooltip. Nazwa źródła (AS-Soft FxRate/SxRate) - tylko w title (usunięta
   jako widoczny dopisek, użytkownik). Widoczność całego bloku sterowana per-Oddział
   (Data/Models/Oddzial.cs, ForexPokazBid/ForexPokazAsk - Ustawienia -> Forex). */
.fx-bid-ask { font-size: 13px; font-weight: 600; color: #1f2d3d; font-variant-numeric: tabular-nums; line-height: 1.3; }
/* Gdy tylko JEDNA z PokazBid/PokazAsk jest włączona, komórka Kupno i komórka Sprzedaż muszą mimo
   to zostać tej samej wysokości - inaczej pole liczbowe Kupno i Sprzedaż w tym samym wierszu
   przestają być w jednej linii (użytkownik). "visibility:hidden", NIE "display:none" - element
   nadal zajmuje miejsce w layoucie, tylko nie jest widoczny/nie łapie hover na tooltip. */
.fx-bid-ask.fx-ukryty { visibility: hidden; }

/* Kierunek zmiany BID/ASK wzgledem poprzedniego odswiezenia (Pages/KursyWalut.razor,
   OdswiezFxAsync) - kolor "mignie" na jeden cykl odswiezania, potem wraca do neutralnego, jesli
   wartosc sie ustabilizuje. */
.fx-bid-ask.fx-rosnie { color: #16a34a; font-weight: 600; }
.fx-bid-ask.fx-spada { color: #dc2626; font-weight: 600; }

/* Suwak Wlacz/Wylacz (Ustawienia -> Forex, wylacznik glowny) - zwykly checkbox wizualnie jak
   iOS-owy toggle, zeby wyroznic sie od zwyklych checkboxow konfiguracji per-waluta ponizej. */
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch .toggle-slider {
    position: absolute; inset: 0; cursor: pointer;
    background-color: #cbd5e1; border-radius: 999px; transition: background-color .15s;
}
.toggle-switch .toggle-slider::before {
    content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
    background-color: #fff; border-radius: 50%; transition: transform .15s;
}
.toggle-switch input:checked + .toggle-slider { background-color: #16a34a; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-switch input:disabled + .toggle-slider { opacity: .5; cursor: not-allowed; }

/* Tabela roboczej serii (Pages/KursyWalut.razor, Dodaj/Seria) - kolumny stałej szerokości,
   inaczej "Ilość" (krótkie liczby) rozciąga się nieproporcjonalnie kosztem "Wartość PLN". */
.seria-robocza-table { table-layout: fixed; }
.seria-robocza-table th:nth-child(1), .seria-robocza-table td:nth-child(1) { width: 12%; }
.seria-robocza-table th:nth-child(2), .seria-robocza-table td:nth-child(2) { width: 18%; }
.seria-robocza-table th:nth-child(3), .seria-robocza-table td:nth-child(3) { width: 22%; }
.seria-robocza-table th:nth-child(4), .seria-robocza-table td:nth-child(4) { width: 24%; }
.seria-robocza-table th:nth-child(5), .seria-robocza-table td:nth-child(5) { width: 24%; }
.kursy-table td.kurs-sr { color: #b91c1c; font-weight: 600; }

.kursy-table tr.wiersz-wybieralny { cursor: pointer; }
.kursy-table tr.wiersz-przeciagany { opacity: 0.4; }
.kursy-table .uchwyt-przeciagania { cursor: grab; color: #94a3b8; margin-right: 4px; user-select: none; }
.kursy-table tr.wiersz-wybrany { background: #dbeafe; }
.kursy-table tr.wiersz-wybrany:hover { background: #bfdbfe; }
.kursy-table tr.wiersz-kupno { background: #dcfce7; cursor: pointer; }
.kursy-table tr.wiersz-kupno:hover { background: #bbf7d0; }
.kursy-table tr.wiersz-sprzedaz { background: #fee2e2; cursor: pointer; }
.kursy-table tr.wiersz-sprzedaz:hover { background: #fecaca; }

/* Historia podręczna (Pages/KursyWalut.razor) - pierwsza pozycja wyróżniona lekko żółtym tłem i
   pogrubieniem TYLKO gdy naprawdę zapisana w ciągu ostatnich 5 minut (DataAudytu), niezależnie od
   koloru Kupno/Sprzedaż - stąd !important. Starsza transakcja na szczycie (np. po przejściu do
   historii innego dnia) nie dostaje żółtego tła - zgłoszenie użytkownika: mylące sugerowało "przed
   chwilą zapisane", choć mogła być sprzed dni. */
.kursy-table tr.wiersz-najnowszy { background: #fef9c3 !important; font-weight: 700; }
.kursy-table tr.wiersz-najnowszy:hover { background: #fef08a !important; }
.kursy-table td.opis-klikalny { cursor: pointer; }
.kursy-table td.opis-klikalny:hover { text-decoration: underline; color: #2563eb; }

.cell-input {
    width: 130px;
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-variant-numeric: tabular-nums;
}
.cell-input:focus { border-color: #2563eb; outline: none; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.nazwa-kasy-input { width: 100%; min-width: 160px; text-align: left; }
.symbol-input { font-weight: 700; }
.naglowek-waluty { font-size: 20px; display: flex; align-items: center; gap: 10px; }
.flaga-duza { width: 32px !important; height: 24px !important; object-fit: cover; }

.cell-select {
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: white;
    font-size: 14px;
}
.cell-select:focus { border-color: #2563eb; outline: none; }

.error { color: #b91c1c; font-weight: 600; font-size: 13px; }
.info { color: #15803d; font-weight: 600; font-size: 13px; }
.hint { color: #64748b; font-size: 13px; }

/* ---------- Tablica kursów (pełny ekran) ---------- */
/* Zmienne stylu tablicy - domyślne wartości odtwarzają dotychczasowy, jedyny wygląd 1:1.
   TablicaStrona.razor nadpisuje je inline (style="--tablica-bg:...") tylko gdy operator
   ustawił własne kolory w Ustawieniach kasy - w przeciwnym razie zostaje ta paleta. */
.tablica-viewport {
    --tablica-bg: #0b1220;
    --tablica-fg: #f8fafc;
    --tablica-accent: #94a3b8;
    --tablica-scale: 1;
    position: fixed;
    inset: 0;
    background: var(--tablica-bg);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tablica-ekran {
    width: 1920px;
    background: var(--tablica-bg);
    color: var(--tablica-fg);
    padding: 24px 40px;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    box-sizing: border-box;
    transform-origin: center center;
    font-size: calc(1em * var(--tablica-scale));
}
.tablica-brak { font-size: 28px; text-align: center; margin-top: 40px; }

/* Tablica systemowa - pasek akcentowy u góry + naprzemienne wiersze, żeby odróżniała się
   wizualnie od (bardziej neutralnej) Tablicy użytkownika. */
.tablica-akcent-pasek {
    height: 6px;
    margin: -24px -40px 22px -40px;
    background: linear-gradient(90deg, #2563eb 0%, #2563eb 33%, #dc2626 33%, #dc2626 66%, #f59e0b 66%, #f59e0b 100%);
}
.tablica-tabela-systemowa tbody tr:nth-child(even) {
    background: color-mix(in srgb, var(--tablica-fg) 4%, transparent);
}

.tablica-wlasny-naglowek, .tablica-wlasna-stopka {
    white-space: pre-line;
    text-align: center;
    color: var(--tablica-fg);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
}
.tablica-wlasny-naglowek { margin-bottom: 18px; }
.tablica-wlasna-stopka { margin-top: 22px; padding-top: 18px; border-top: 2px solid #1e293b; }

.tablica-naglowek {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #1e293b;
    flex-wrap: wrap;
}
.tablica-zegar { font-size: 24px; color: var(--tablica-accent); font-variant-numeric: tabular-nums; }
.tablica-strona { font-size: 18px; color: var(--tablica-accent); background: color-mix(in srgb, var(--tablica-fg) 10%, transparent); padding: 4px 12px; border-radius: 999px; }
.tablica-tabela { width: 100%; border-collapse: collapse; }
.tablica-tabela th {
    text-align: right;
    font-size: 22px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tablica-accent);
    padding: 10px 20px;
    border-bottom: 2px solid #1e293b;
}
.tablica-tabela th.tablica-kol-waluta { text-align: left; }
.tablica-tabela td {
    padding: 14px 20px;
    font-size: 40px;
    font-weight: 800;
    text-align: right;
    border-bottom: 1px solid #1e293b;
    font-variant-numeric: tabular-nums;
}
.tablica-tabela td.tablica-kol-waluta { text-align: left; color: var(--tablica-fg); }
.tablica-tabela td.tablica-kol-waluta .flaga-img { margin-right: 14px; vertical-align: middle; border-radius: 3px; width: 32px; height: 24px; object-fit: cover; }
.tablica-tabela td.tablica-kupno { color: #86efac; }
.tablica-tabela td.tablica-sprzedaz { color: #fca5a5; }
.tablica-tabela th.tablica-kol-opis, .tablica-tabela th.tablica-kol-jm { text-align: left; }
.tablica-tabela td.tablica-kol-opis { text-align: left; font-size: 20px; font-weight: 600; color: #cbd5e1; }
.tablica-tabela td.tablica-kol-jm { text-align: center; font-size: 20px; font-weight: 600; color: var(--tablica-accent); }

/* Szablon "Karty" - jedna waluta na kartę (kupno/sprzedaż dużą czcionką), wzorowany na starym
   xKantor/migracje/tablica/indexsmall.htm - do wąskich/pionowych ekranów. */
.tablica-karty {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}
.tablica-karta {
    background: color-mix(in srgb, var(--tablica-fg) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--tablica-fg) 15%, transparent);
    border-radius: 12px;
    padding: 18px 22px;
}
.tablica-karta-naglowek { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; color: var(--tablica-fg); }
.tablica-karta-naglowek .flaga-img { border-radius: 3px; width: 32px; height: 24px; object-fit: cover; }
.tablica-karta-jm { font-size: 16px; color: var(--tablica-accent); margin: 4px 0 10px; }
.tablica-karta-kursy { display: flex; justify-content: space-between; gap: 16px; }
.tablica-karta-kurs { flex: 1; text-align: center; }
.tablica-karta-kurs-etykieta { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; color: var(--tablica-accent); }
.tablica-karta-kurs-wartosc { font-size: 38px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tablica-karta-kurs-wartosc.tablica-kupno { color: #86efac; }
.tablica-karta-kurs-wartosc.tablica-sprzedaz { color: #fca5a5; }

/* ---------- Modal transakcji ---------- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-box {
    background: white;
    border-radius: 12px;
    padding: 26px 28px;
    width: 440px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.modal-box-szeroki { width: 780px; }

/* ---------- Modal RESZTY (sprzedaż gotówkowa, PRZED zapisem) ----------
   Celowo BEZ .modal-backdrop / przyciemnienia tła - kasjer ma cały czas widzieć
   nagłówek/kasę/tabelę kursów/panel Handlu za tym panelem (świadomy wymóg UX). */
.modal-reszty-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e7ed;
    box-shadow: 0 12px 40px rgba(0,0,0,0.28);
    padding: 20px 22px;
    width: 320px;
    max-width: calc(100vw - 48px);
}
.modal-reszty-panel h3 { margin: 0 0 12px; font-size: 18px; letter-spacing: 0.03em; color: #0f172a; }
.modal-reszty-label { display: block; font-size: 13px; color: #64748b; margin-bottom: 14px; }
.modal-reszty-label input {
    display: block;
    width: 100%;
    margin-top: 4px;
    font-size: 26px;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1.5px solid #cbd5e1;
    text-align: right;
}
.modal-reszty-label input:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,0.15); outline: none; }
.modal-reszty-wiersz { display: flex; justify-content: space-between; font-size: 14px; color: #334155; margin-bottom: 8px; }
.modal-reszty-glowna {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #15803d;
}
.modal-reszty-glowna strong { font-size: 24px; }
.modal-reszty-glowna.modal-reszty-brakuje { color: #b91c1c; }

/* Info "Dokument .../ Szczegóły" pod przyciskami Handlu, gdy StanHandlu == Zapisana */
.handel-zapisana-info {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
}
.btn-link {
    background: none;
    border: none;
    padding: 0;
    color: #7c3aed;
    text-decoration: underline;
    cursor: pointer;
    font-size: 14px;
}

/* ---------- Toast (potwierdzenie zapisu/druku, samoznikający) ---------- */
.xkantor-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    z-index: 1100;
    background: #0f172a;
    color: white;
    padding: 12px 22px;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    font-size: 15px;
    font-weight: 600;
}
.xkantor-toast.xkantor-toast-blad { background: #b91c1c; }

@media (max-width: 1440px) {
    .modal-reszty-panel { top: 300px; right: 12px; width: 280px; padding: 14px 16px; }
    .modal-reszty-panel h3 { font-size: 15px; margin-bottom: 8px; }
    .modal-reszty-label input { font-size: 20px; }
    .modal-reszty-glowna strong { font-size: 19px; }
}

/* Formularz Kontrahenta (Pages/KontrahenciStrona.razor) - sekcje-karty + karty osób
   reprezentujących, w stylu spójnym z resztą aplikacji (gradient niebiesko-fioletowy jak
   .modul-switch-btn.is-active). */
.kontrahent-modal { width: 975px; }

/* Modal WYMIANA (kalkulator waluta->waluta, Pages/KursyWalut.razor) - prosty, kompaktowy układ,
   dobrze mieszczący się przy 1366x768 (mniejszy niż standardowy .modal-box). */
.wymiana-box { width: 380px; }
.wymiana-etykieta { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.04em; color: #64748b; margin-top: 14px; }
.wymiana-wiersz { display: flex; gap: 10px; margin-top: 6px; }
.wymiana-waluta { flex: 0 0 90px; font-weight: 700; }
.wymiana-kwota { flex: 1 1 auto; min-width: 0; font-size: 22px; font-weight: 700; text-align: right; padding: 8px 10px; border-radius: 8px; border: 1.5px solid #cbd5e1; }
.wymiana-kwota:focus { border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,0.15); outline: none; }
.wymiana-strzalka { text-align: center; font-size: 22px; color: #94a3b8; margin: 6px 0; }
.wymiana-kurs { margin-top: 16px; padding: 10px 12px; background: #f8fafc; border-radius: 8px; font-size: 13px; color: #334155; text-align: center; line-height: 1.6; }
.kontrahent-modal input:not([type=checkbox]),
.kontrahent-modal select {
    border-radius: 10px;
    border: 1.5px solid #e2e7ed;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.kontrahent-modal input:not([type=checkbox]):focus,
.kontrahent-modal select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
    outline: none;
}

.form-section-2026 {
    background: #f8fafc;
    border: 1px solid #e2e7ed;
    border-radius: 14px;
    padding: 18px 20px;
    margin-top: 16px;
}
.form-section-2026-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #334155;
    margin: 0 0 14px;
}

.rep-card {
    background: #fff;
    border: 1px solid #e2e7ed;
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 12px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.rep-card:hover { box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08); border-color: #c7d2fe; }
.rep-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rep-card-title { font-weight: 700; font-size: 12.5px; color: #1f2d3d; text-transform: uppercase; letter-spacing: 0.03em; }
.rep-card-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: #fef2f2;
    color: #dc2626;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.rep-card-remove:hover { background: #fecaca; }

.rep-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 11px;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    background: transparent;
    color: #475569;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.rep-add-btn:hover { border-color: #7c3aed; color: #7c3aed; background: #faf5ff; }

.btn-gradient {
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
    transition: filter 0.15s ease;
}
.btn-gradient:hover { filter: brightness(1.08); }
.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 4px 8px;
}
.modal-close:hover { color: #1f2d3d; }
.modal-box h3 { margin: 0 0 16px; font-size: 18px; color: #16212f; }
.modal-info { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.modal-info > div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; border-bottom: 1px solid #eef1f4; padding-bottom: 6px; }
.modal-info > div span { color: #64748b; }
.modal-info > div strong { color: #1f2d3d; text-align: right; }

/* Podgląd transakcji zapisanej - siatka pól w stylu formatki Handlu (.advanced-grid), z
   input[readonly] (patrz reguła wyżej) zamiast edytowalnych pól - patrz modal "Transakcja
   zapisana" w Pages/KursyWalut.razor.
   Bez tej reguły przełączenie Podgląd <-> Edycja "skacze" rozmiarem - input/select/input[type=date]
   mają różną domyślną wysokość i font w przeglądarce, więc rząd .advanced-grid wychodził inaczej
   wysoki w zależności od tego, jaki typ pola akurat renderował dany tryb (zgłoszenie użytkownika:
   "ma być identyczny rozmiar okna, czcionek"). */
.modal-box .advanced-grid input,
.modal-box .advanced-grid select {
    height: 38px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 14px;
}

/* Szczegóły transakcji (podgląd zapisanego dokumentu) - Typ/Waluta/Ilość/Kurs/Wartość PLN jako
   pięć równych kart w jednej linii, zamiast wierszy .advanced-grid, żeby "Wartość PLN" dało się
   delikatnie wyróżnić wizualnie bez wyłamywania się z reszty siatki. */
.tx-cards-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}
.tx-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 60px;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-sizing: border-box;
}
.tx-card-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; }
.tx-card-value { font-size: 15px; font-weight: 700; color: #1f2d3d; word-break: break-word; }
.tx-card-wartosc { background: #eff6ff; border-color: #bfdbfe; }
.tx-card-wartosc .tx-card-value { color: #1d4ed8; font-size: 16px; }

/* .tx-card-value / .tx-client-value renderowane jako prawdziwy input/select (jedna formatka dla
   podglądu i edycji, patrz komentarz w Pages/KursyWalut.razor) - zdejmujemy domyślny "chrome"
   przeglądarki (ramka/tło/appearance), żeby wyglądały tak samo jak statyczna wartość karty;
   font-size/font-weight/color zostają z reguł .tx-card-value wyżej (dopasowanie po tej samej
   klasie, nie przez dziedziczenie, więc działa identycznie dla <span>/<input>/<select>). */
input.tx-card-value,
select.tx-card-value,
input.tx-client-value,
select.tx-client-value {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    cursor: default;
}
input.tx-card-value:disabled,
input.tx-card-value[readonly],
select.tx-card-value:disabled,
input.tx-client-value[readonly],
select.tx-client-value:disabled {
    opacity: 1;
    -webkit-text-fill-color: currentColor;
}
input.tx-card-value:not([readonly]):not(:disabled),
input.tx-client-value:not([readonly]) { cursor: text; }
select.tx-card-value:not(:disabled),
select.tx-client-value:not(:disabled) { cursor: pointer; }
input.tx-card-value[type="number"] { text-align: right; }
input.tx-card-value:not([readonly]):not(:disabled):focus,
select.tx-card-value:not(:disabled):focus,
input.tx-client-value:not([readonly]):focus,
select.tx-client-value:not(:disabled):focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Karta "Typ" - ta sama paleta co przyciski Kupno/Sprzedaż/Zasilenie/Odprowadzenie w formatce
   Handlu (.typ-btn-*), patrz KlasaTypuTransakcji w Pages/KursyWalut.razor. */
.tx-typ-kupno { background: linear-gradient(135deg, #22a35a, #157a3d); border-color: #157a3d; }
.tx-typ-kupno .tx-card-label { color: #dcfce7; }
.tx-typ-kupno .tx-card-value { color: #fff; }
.tx-typ-sprzedaz { background: linear-gradient(135deg, #ef4444, #c92424); border-color: #c92424; }
.tx-typ-sprzedaz .tx-card-label { color: #fee2e2; }
.tx-typ-sprzedaz .tx-card-value { color: #fff; }
.tx-typ-zasilenie { background: #f0fdf4; border-color: #bbf0cd; }
.tx-typ-zasilenie .tx-card-label { color: #2f8a57; }
.tx-typ-zasilenie .tx-card-value { color: #15803d; }
.tx-typ-odprowadzenie { background: #fef2f2; border-color: #fbd0d0; }
.tx-typ-odprowadzenie .tx-card-label { color: #c14545; }
.tx-typ-odprowadzenie .tx-card-value { color: #b91c1c; }

.tx-client-section {
    margin: 14px 0;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.tx-client-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: #64748b; }
.tx-client-value { font-size: 15px; font-weight: 700; color: #1f2d3d; }

.tx-footer-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

/* Kasa/Numer dokumentu/Data zawarcia/Data realizacji w jednej linii (4 równe kolumny) zamiast
   domyślnych 3 z .advanced-grid - węższe pola, żeby wszystkie cztery zmieściły się w szerokości
   modala bez zawijania. Na mobile wraca do 1 kolumny przez istniejącą regułę .modal-box .advanced-grid. */
.tx-doc-row { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.modal-box .tx-doc-row input { font-size: 13px; padding: 8px; }

@media (max-width: 700px) {
    .tx-cards-row { grid-template-columns: repeat(2, 1fr); }
    .tx-footer-row { grid-template-columns: 1fr; }
    .tx-card-label { font-size: 12px; }
    .tx-card-value, .tx-client-value { font-size: 17px; }
}
@media (max-width: 700px) {
    .modal-box .advanced-grid { grid-template-columns: 1fr; gap: 10px; }
    .modal-box .advanced-grid label,
    .modal-box .advanced-grid input,
    .modal-box .advanced-grid select { font-size: 18px; }
    .modal-box .advanced-grid input,
    .modal-box .advanced-grid select { padding: 10px 12px; border-radius: 10px; }
}
.modal-reszta { background: #f4f6f9; border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; }
.modal-reszta label { display: block; font-size: 12px; color: #64748b; font-weight: 600; margin-bottom: 4px; }
.modal-reszta input { width: 100%; padding: 8px 10px; border: 1px solid #d3dae2; border-radius: 6px; font-size: 16px; }
.reszta-wynik { margin-top: 10px; font-size: 18px; font-weight: 800; color: #16212f; }
.modal-buttons { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }

/* ---------- Hierarchia: Centrala -> Oddział -> Kasa (gradacja zieleni) ---------- */
.breadcrumb-hierarchy { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.breadcrumb-sep { color: #94a3b8; font-size: 18px; font-weight: 700; }

.hierarchy-level {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.12s ease;
}
.hierarchy-label, .hierarchy-input {
    font-size: 20px;
    font-weight: 700;
    font-family: inherit;
    color: inherit;
}
.hierarchy-input {
    background: transparent;
    border: 1px solid transparent;
    padding: 2px 6px;
    border-radius: 6px;
    min-width: 160px;
}

.level-centrala { background: #15803d; color: #ffffff; }
a.level-centrala:hover { background: #166534; }
.level-centrala .hierarchy-input:hover { border-color: rgba(255,255,255,0.5); }
.level-centrala .hierarchy-input:focus { outline: none; border-color: #ffffff; background: rgba(255,255,255,0.15); }

.level-oddzial { background: #86efac; color: #052e16; }
.level-oddzial.row-blocked { background: #fecaca; color: #7f1d1d; }
.level-oddzial .hierarchy-input:hover { border-color: rgba(5,46,22,0.35); }
.level-oddzial .hierarchy-input:focus { outline: none; border-color: #052e16; background: rgba(255,255,255,0.4); }

.level-kasa { background: #dcfce7; color: #052e16; }

.hierarchy-select {
    font-size: 20px;
    font-weight: 700;
    font-family: inherit;
    color: inherit;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 2px 6px;
    cursor: pointer;
}
.hierarchy-select:hover { border-color: rgba(5,46,22,0.35); }
.hierarchy-select:focus { outline: none; border-color: #052e16; background: rgba(255,255,255,0.4); }


.side-info-right { text-align: right; }

.hierarchy-list { margin-left: 28px; display: flex; flex-direction: column; gap: 10px; }
.hierarchy-row { gap: 16px; flex-wrap: wrap; }
.hierarchy-meta { font-size: 13px; font-weight: 600; opacity: 0.85; }

.kursy-table tbody tr.level-kasa { background: #dcfce7; }
.kursy-table tbody tr.level-kasa:hover { background: #bbf7d0; }

.row-blocked { background: #fdf2f2; color: #8a8a8a; }
.row-blocked td.symbol { color: #b45309; }
.kursy-table tbody tr.level-kasa.row-blocked { background: #fdf2f2; color: #8a8a8a; }

.status-aktywna { color: #15803d; font-weight: 800; }
.status-zablokowana { color: #b91c1c; font-weight: 700; }
.status-aktywna .status-dot { margin-right: 4px; }

/* ---------- Oddział - tabs, raporty, statystyki ---------- */
.oddzial-tabs {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.oddzial-tab {
    display: inline-flex;
    align-items: center;
    padding: 12px 22px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border-radius: 10px;
}
.tab-centrala { background: #15803d; color: white; }
a.tab-centrala:hover { background: #166534; }
.tab-oddzial { background: #86efac; color: #052e16; }
.tab-zbiorowka { background: transparent; color: #64748b; font-weight: 600; }
.tab-sep { margin: 0 6px; color: #94a3b8; }
.oddzial-tabs-actions { display: flex; gap: 10px; margin-left: auto; }
.btn-tab-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.05s ease;
}
.btn-tab-action:hover { background: #1d4ed8; }
.btn-tab-action:active { transform: translateY(1px); }
.btn-tab-action-outline { background: white; color: #2563eb; border: 1px solid #2563eb; }
.btn-tab-action-outline:hover { background: #eff4ff; }

.raporty-card {
    background: white;
    border: 1px solid #e2e7ed;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
}
.raporty-header { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: #64748b; margin-bottom: 12px; }
.raporty-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.raport-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 96px;
    background: #f8fafc;
    border: 1px solid #e2e7ed;
    border-radius: 10px;
    padding: 12px 6px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    cursor: pointer;
    transition: background 0.12s ease;
}
.raport-btn span { font-size: 20px; }
.raport-btn:hover { background: #eff4ff; border-color: #bfdbfe; }
.raporty-wiecej { display: flex; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #eef1f4; }

.stat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.stat-tile {
    background: white;
    border: 1px solid #e2e7ed;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
    text-align: center;
}
.stat-tile-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; color: #94a3b8; margin-bottom: 6px; }
.stat-tile-value { font-size: 22px; font-weight: 800; color: #16212f; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-tile-value-blue { color: #2563eb; }
.stat-tile-value-sm { font-size: 18px; }

/* ---------- Todo / Pomysły ---------- */
.todo-wiersz { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.todo-wiersz .kasa-toggle { flex: 1; }
.todo-wiersz.todo-wykonane .kasa-toggle span { text-decoration: line-through; color: #94a3b8; }
.todo-meta { font-size: 12px; color: #94a3b8; white-space: nowrap; }
.btn-usun { background: none; border: none; color: #94a3b8; font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.btn-usun:hover { color: #dc2626; }

/* ---------- Historia operacji: filtr + paginacja ---------- */
.historia-pasek { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.historia-wynik { font-size: 13px; color: #64748b; font-weight: 600; }
.historia-filtr { margin-bottom: 12px; }
.historia-paginacja { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.historia-zakres { font-size: 13px; color: #64748b; }
.historia-strony { display: flex; align-items: center; gap: 4px; }
.historia-strony .btn { padding: 6px 12px; min-width: 36px; }
.historia-strony-kropki { padding: 0 4px; color: #94a3b8; }

/* ---------- Czas pracy ---------- */
.czas-taby { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.czas-tab { padding: 10px 18px; border-radius: 10px; border: 1px solid #e2e7ed; background: white; font-weight: 700; font-size: 14px; color: #64748b; cursor: pointer; }
.czas-tab:hover { background: #f8fafc; }
.czas-tab-aktywna { background: #15803d; border-color: #15803d; color: white; }
.tydzien-pasek { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.tydzien-nawigacja { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tydzien-etykieta { font-weight: 700; color: #16212f; margin-left: 4px; text-transform: capitalize; }
.grafik-scroll { overflow-x: auto; margin-top: 10px; }
.grafik-tabela { min-width: 720px; }
.grafik-tabela th.grafik-dzis { color: #2563eb; }
.grafik-data-mala { font-size: 11px; font-weight: 400; color: #94a3b8; }
.grafik-brak-obsady { font-size: 12px; }
.grafik-komorka { cursor: pointer; text-align: center; font-weight: 600; white-space: nowrap; }
.grafik-komorka:hover { background: #f1f5f9; }
.grafik-przeciagana { opacity: 0.4; }
.grafik-praca { background: #eff6ff; color: #1e40af; }
.grafik-urlop { background: #fef3c7; color: #92400e; }
.grafik-l4 { background: #fee2e2; color: #b91c1c; }
.grafik-wolne { background: #f1f5f9; color: #64748b; }
.grafik-inna { background: #f3e8ff; color: #6b21a8; }
.grafik-niezgodnosc { margin-left: 4px; }

.oddzial-kasy-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rola-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1e40af;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 2px 9px;
    border-radius: 999px;
}

/* ---------- Ekran logowania (AS-Soft) ---------- */
.as-login-page {
    --as-bg: #f4f6f9;
    --as-card-bg: #ffffff;
    --as-header-bg: #ffffff;
    --as-text: #16212f;
    --as-text-muted: #64748b;
    --as-text-faint: #94a3b8;
    --as-border: #e2e7ed;
    --as-blue: #2563eb;
    --as-blue-dark: #1d4ed8;
    --as-blue-soft: #eff4ff;
    --as-red: #dc2626;
    --as-yellow: #f59e0b;
    --as-input-bg: #ffffff;
    --as-shadow-card: 0 12px 40px rgba(16,24,40,0.12);
    min-height: 100vh;
    background: var(--as-bg);
    color: var(--as-text);
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
}
html[data-motyw="dark"] .as-login-page {
    --as-bg: #0a0e1a;
    --as-card-bg: #111827;
    --as-header-bg: #111827;
    --as-text: #f1f5f9;
    --as-text-muted: #94a3b8;
    --as-text-faint: #64748b;
    --as-border: #232c3d;
    --as-blue: #3b82f6;
    --as-blue-dark: #60a5fa;
    --as-blue-soft: rgba(59, 130, 246, 0.14);
    --as-red: #f87171;
    --as-yellow: #fbbf24;
    --as-input-bg: #0b1220;
    --as-shadow-card: 0 20px 60px rgba(0,0,0,0.55);
}

.as-login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 32px;
    background: var(--as-header-bg);
    border-bottom: 1px solid var(--as-border);
}
.as-login-header-left { display: flex; align-items: center; gap: 10px; }
.as-login-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--as-blue), var(--as-blue-dark));
    color: white;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}
.as-login-brand { font-weight: 800; font-size: 15px; color: var(--as-text); }
.as-login-product {
    font-size: 12px;
    font-weight: 600;
    color: var(--as-text-muted);
    padding-left: 10px;
    margin-left: 2px;
    border-left: 1px solid var(--as-border);
}
.as-login-header-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.as-header-sep { width: 1px; height: 20px; background: var(--as-border); }
.as-header-clock, .as-header-date { font-size: 13px; color: var(--as-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.as-theme-toggle { display: flex; align-items: center; gap: 8px; }
.as-theme-label { font-size: 12px; font-weight: 600; color: var(--as-text-faint); transition: color 0.15s ease; }
.as-theme-label.is-active { color: var(--as-text); }
.as-theme-switch {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 999px;
    border: none;
    background: var(--as-border);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background 0.15s ease;
}
.as-theme-switch.is-dark { background: var(--as-blue); }
.as-theme-switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.15s ease;
}
.as-theme-switch.is-dark .as-theme-switch-knob { transform: translateX(18px); }

.as-login-body {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 48px;
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 48px 32px;
}
.as-login-left { flex: 0 0 55%; max-width: 55%; }
.as-login-right { flex: 1; display: flex; justify-content: center; }

.as-login-title { font-size: 30px; font-weight: 800; line-height: 1.28; margin: 0 0 12px; color: var(--as-text); }
.as-login-title-accent { color: var(--as-blue); }
.as-login-subtitle { font-size: 14px; color: var(--as-text-muted); margin: 0 0 28px; }

.as-login-features { list-style: none; margin: 0 0 36px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.as-login-feature { display: flex; align-items: flex-start; gap: 12px; }
.as-login-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--as-blue-soft);
    color: var(--as-blue);
    flex-shrink: 0;
}
.as-login-feature-icon svg { width: 20px; height: 20px; }
.as-login-feature-body { display: flex; flex-direction: column; }
.as-login-feature-title { font-size: 13.5px; font-weight: 700; color: var(--as-text); }
.as-login-feature-desc { font-size: 12.5px; color: var(--as-text-muted); }

.as-diagram { display: flex; flex-direction: column; align-items: center; color: var(--as-blue); }
.as-diagram-cloud { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 2px; }
.as-diagram-icon-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1.6px solid var(--as-blue);
    color: var(--as-blue);
    flex-shrink: 0;
}
.as-diagram-icon-ring svg { width: 24px; height: 24px; }
.as-diagram-icon-ring-sm { width: 38px; height: 38px; }
.as-diagram-icon-ring-sm svg { width: 20px; height: 20px; }
.as-diagram-label { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; color: var(--as-blue); white-space: nowrap; }
.as-diagram-stem { width: 0; height: 22px; border-left: 2px dashed var(--as-blue); }
.as-diagram-fork { position: relative; display: flex; justify-content: center; gap: 56px; }
.as-diagram-fork::before {
    content: "";
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    border-top: 2px dashed var(--as-blue);
}
.as-diagram-branch { display: flex; flex-direction: column; align-items: center; }
.as-diagram-branch-stem { width: 0; height: 18px; border-left: 2px dashed var(--as-blue); }
.as-diagram-node { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.as-diagram-node-label { font-size: 10.5px; font-weight: 800; letter-spacing: 0.03em; color: var(--as-text); white-space: nowrap; }

.as-login-card {
    width: 100%;
    max-width: 400px;
    background: var(--as-card-bg);
    border-radius: 16px;
    box-shadow: var(--as-shadow-card);
    overflow: hidden;
}
.as-login-card-bar { height: 6px; background: linear-gradient(90deg, var(--as-blue) 0 34%, var(--as-red) 34% 67%, var(--as-yellow) 67% 100%); }
.as-login-card-body { padding: 32px 32px 28px; }
.as-login-greeting { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: var(--as-text); }
.as-login-greeting-sub { margin: 0 0 24px; font-size: 13.5px; color: var(--as-text-muted); }
.as-login-greeting-sub strong { color: var(--as-blue); }

.as-field { margin-bottom: 16px; }
.as-field label { display: block; font-size: 12px; font-weight: 700; color: var(--as-text-muted); margin-bottom: 6px; }
.as-field-input {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--as-border);
    background: var(--as-input-bg);
    border-radius: 8px;
    padding: 0 12px;
    transition: border-color 0.12s ease;
}
.as-field-input:focus-within { border-color: var(--as-blue); }
.as-field-input svg { width: 17px; height: 17px; color: var(--as-text-faint); flex-shrink: 0; }
.as-field-input input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--as-text);
    padding: 10px 0;
    font-size: 14px;
    outline: none;
}
.as-field-eye { border: none; background: transparent; padding: 2px; cursor: pointer; color: var(--as-text-faint); display: flex; }
.as-field-eye:hover { color: var(--as-text-muted); }
.as-field-eye svg { width: 17px; height: 17px; }

.as-login-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: 12.5px; gap: 12px; }
.as-login-remember { display: flex; align-items: center; gap: 6px; color: var(--as-text-muted); cursor: pointer; white-space: nowrap; }
.as-login-remember input { accent-color: var(--as-blue); }
.as-login-forgot { color: var(--as-blue); text-decoration: none; font-weight: 600; background: none; border: none; cursor: pointer; padding: 0; font-size: 12.5px; }
.as-login-forgot:hover { text-decoration: underline; }
.as-login-forgot-hint { font-size: 12px; color: var(--as-text-muted); margin: -10px 0 16px; }

.as-btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: none;
    border-radius: 9px;
    background: var(--as-blue);
    color: white;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.12s ease, transform 0.05s ease;
}
.as-btn-primary:hover { background: var(--as-blue-dark); }
.as-btn-primary:active { transform: translateY(1px); }
.as-btn-primary:disabled { opacity: 0.65; cursor: default; }
.as-btn-primary svg { width: 16px; height: 16px; }

.as-login-sep { display: flex; align-items: center; gap: 10px; margin: 18px 0; font-size: 11.5px; color: var(--as-text-faint); }
.as-login-sep::before, .as-login-sep::after { content: ""; flex: 1; height: 1px; background: var(--as-border); }

.as-btn-outline {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    border: 1.5px solid var(--as-border);
    border-radius: 9px;
    background: transparent;
    color: var(--as-text);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.as-btn-outline:hover { border-color: var(--as-blue); background: var(--as-blue-soft); }
.as-btn-outline svg { width: 16px; height: 16px; }

.as-login-footer { text-align: center; font-size: 12px; color: var(--as-text-faint); padding: 18px 20px; }

@media (max-width: 980px) {
    .as-login-body { flex-direction: column; padding: 32px 20px; gap: 32px; }
    .as-login-left { max-width: 100%; flex-basis: auto; order: 2; }
    .as-login-right { order: 1; width: 100%; }
    .as-login-title { font-size: 24px; }
    .as-diagram { display: none; }
}
@media (max-width: 560px) {
    .as-login-header { padding: 14px 16px; }
    .as-login-header-right { gap: 10px; }
    .as-login-product { display: none; }
    .as-login-card-body { padding: 26px 22px 22px; }
}

/* ---------- Dashboard (strona /centrale po zalogowaniu) ---------- */
.dash-shell { display: flex; align-items: flex-start; gap: 16px; max-width: 1320px; margin: 0 auto; padding: 4px 20px 40px; }
.dash-sidebar {
    flex: 0 0 180px;
    background: white;
    border: 1px solid #e2e7ed;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
    padding: 8px;
    position: sticky;
    /* Nagłówek (.topbar-as-wrap) jest teraz też sticky (top:0) - offset niżej, żeby sidebar nie
       chował się pod nim po przewinięciu (wysokość nagłówka ~95px + mały odstęp). */
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 100;
}
.dash-sidebar-extra {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e7ed;
}
.dash-sidebar-extra .btn-icon { width: 38px; height: 46px; border-radius: 8px; background: #f1f5f9; font-size: 22px; flex: 0 0 auto; }
.dash-sidebar-extra .btn-icon:hover { background: #e2e8f0; }
.dash-sidebar-extra a.btn-icon { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.dash-sidebar-zwiniete {
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 6px;
}
.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #334155;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    text-align: left;
    cursor: pointer;
    width: 100%;
}
.dash-nav-item:hover { background: #f1f5f9; }
.dash-nav-item.is-active { background: #2563eb; color: white; }
.dash-nav-item.is-active svg { color: white; }
.dash-nav-item.is-soon { color: #94a3b8; cursor: default; }
.dash-nav-item.is-soon:hover { background: transparent; }
.dash-nav-item svg { width: 15px; height: 15px; color: #64748b; flex-shrink: 0; }
.dash-nav-item.is-active svg { color: white; }
/* Sekcja "OPERACJE" (Przesunięcia / Powrót do handlu) - delikatny separator + mały, dyskretny
   nagłówek, żeby wyglądało jak naturalna, wydzielona część istniejącego menu (nie nowy styl). */
.dash-nav-separator {
    margin: 8px 4px 2px;
    padding-top: 8px;
    border-top: 1px solid #e2e7ed;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #94a3b8;
    text-transform: uppercase;
}
.dash-nav-soon {
    margin-left: auto;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.03em;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 2px 6px;
    flex-shrink: 0;
}

.dash-main { flex: 1; min-width: 0; }

.dash-greeting-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.dash-greeting { margin: 0; font-size: 22px; font-weight: 800; color: #16212f; }
.dash-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 999px;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.dash-status-pill.is-warn { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.dash-status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

.stat-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    margin-bottom: 10px;
}
.stat-tile-icon svg { width: 18px; height: 18px; }
.stat-tile-icon-blue { background: #eff4ff; color: #2563eb; }
.stat-tile-icon-purple { background: #f3e8ff; color: #7c3aed; }
.stat-tile-icon-green { background: #f0fdf4; color: #16a34a; }
.stat-tile-icon-amber { background: #fffbeb; color: #b45309; }
.stat-tile-delta { font-size: 11.5px; font-weight: 700; margin-top: 4px; }
.stat-tile-delta-up { color: #16a34a; }
.stat-tile-delta-down { color: #dc2626; }

.dash-body-grid { display: flex; align-items: flex-start; gap: 18px; margin-top: 4px; }
.dash-col-left { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.dash-col-right { flex: 0 0 300px; display: flex; flex-direction: column; gap: 18px; }

.dash-charts-grid { display: flex; gap: 18px; flex-wrap: wrap; }
.dash-chart-card {
    flex: 1;
    min-width: 260px;
    background: white;
    border: 1px solid #e2e7ed;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
}
.dash-chart-title { font-size: 12.5px; font-weight: 800; color: #334155; margin-bottom: 12px; }
.dash-linechart { width: 100%; height: 120px; overflow: visible; }
.dash-linechart-area { fill: rgba(37,99,235,0.10); stroke: none; }
.dash-linechart-line { fill: none; stroke: #2563eb; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dash-linechart-dot { fill: #2563eb; }
.dash-linechart-labels { display: flex; justify-content: space-between; font-size: 10px; color: #94a3b8; margin-top: 6px; }

.dash-donut-row { display: flex; align-items: center; gap: 18px; }
.dash-donut-svg { width: 108px; height: 108px; flex-shrink: 0; }
.dash-donut-total { font-size: 13px; font-weight: 800; fill: #16212f; }
.dash-donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; flex: 1; min-width: 0; }
.dash-donut-legend li { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #334155; }
.dash-donut-swatch { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.dash-donut-legend .val { margin-left: auto; font-weight: 700; color: #64748b; white-space: nowrap; }
.dash-chart-empty { font-size: 12.5px; color: #94a3b8; padding: 20px 0; text-align: center; }

.dash-table-card {
    background: white;
    border: 1px solid #e2e7ed;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
}

.dash-panel {
    background: white;
    border: 1px solid #e2e7ed;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
}
.dash-panel-title { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 800; color: #334155; margin-bottom: 12px; }
.dash-alert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dash-alert-item { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; }
.dash-alert-icon { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #fffbeb; color: #b45309; }
.dash-alert-icon.is-blocked { background: #fee2e2; color: #b91c1c; }
.dash-alert-icon svg { width: 14px; height: 14px; }
.dash-alert-text-title { display: block; font-weight: 700; color: #16212f; }
.dash-alert-text-sub { display: block; color: #94a3b8; font-size: 11px; }

.dash-quick-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    border: 1px solid #e2e7ed;
    background: #f8fafc;
    text-decoration: none;
    color: #16212f;
    margin-bottom: 8px;
}
.dash-quick-action:last-child { margin-bottom: 0; }
.dash-quick-action:hover { background: #eff4ff; border-color: #bfdbfe; }
.dash-quick-action-icon { width: 30px; height: 30px; border-radius: 8px; background: #eff4ff; color: #2563eb; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dash-quick-action-icon svg { width: 15px; height: 15px; }
.dash-quick-action-title { display: block; font-size: 12.5px; font-weight: 700; }
.dash-quick-action-sub { display: block; font-size: 11px; color: #94a3b8; }

.dash-centrale-section { margin-top: 22px; }

/* ---------- Centrale: karty (widok SuperAdmina) ---------- */
.centrale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
    margin-top: 16px;
    align-items: start;
}
.centrala-card {
    background: white;
    border: 1px solid #e2e7ed;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(16,24,40,0.05);
    transition: box-shadow 0.15s ease;
}
.centrala-card:hover { box-shadow: 0 6px 20px rgba(16,24,40,0.08); }
.centrala-card.is-blocked { background: #fafafa; }
.centrala-card.is-expanded { grid-column: 1 / -1; }
.centrala-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.centrala-card-name { font-size: 17px; font-weight: 800; color: #16212f; }
.centrala-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.centrala-card-badge.is-active { background: #dcfce7; color: #15803d; }
.centrala-card-badge.is-blocked { background: #fee2e2; color: #b91c1c; }
.centrala-card-meta { font-size: 13px; color: #64748b; margin-bottom: 16px; }
.centrala-card-actions { display: flex; gap: 10px; }
.centrala-card-actions .btn { flex: 1; margin-left: 0; }

.centrala-konfiguracja {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #eef1f4;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.centrala-konfiguracja h4 {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 8px;
}
.centrala-danger-zone { padding-top: 16px; border-top: 1px dashed #fca5a5; }
.centrala-danger-zone h4 { color: #b91c1c; }

@media (max-width: 1080px) {
    .dash-body-grid { flex-direction: column; }
    .dash-col-right { flex-basis: auto; width: 100%; }
}
@media (max-width: 860px) {
    .dash-shell { flex-direction: column; }
    .dash-sidebar { flex-direction: row; flex-wrap: wrap; width: 100%; position: static; }
    .dash-nav-item { width: auto; }
}

/* Zakładki - Pages/UstawieniaStrona.razor */
.settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-top: 14px;
}
.settings-tab-btn {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.settings-tab-btn:hover { background: #f1f5f9; }
.settings-tab-btn.is-active { background: #2563eb; border-color: #2563eb; color: white; }

/* Karta statusu wybranej drukarki - Pages/MojeStanowiskoStrona.razor */
.drukarka-status-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
}
.drukarka-status-badge svg { width: 26px; height: 26px; color: #2563eb; flex-shrink: 0; }
.drukarka-status-badge-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.drukarka-status-badge-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; font-weight: 700; }
.drukarka-status-badge-value { font-size: 18px; font-weight: 700; color: #1e3a8a; overflow-wrap: anywhere; }
.drukarka-status-badge-value.jest-puste { color: #94a3b8; font-weight: 600; font-size: 15px; }
.drukarka-status-badge-tags { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.drukarka-status-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    background: white;
    border: 1px solid #dbeafe;
    color: #2563eb;
    white-space: nowrap;
}
.drukarka-status-tag.tag-raw { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.drukarka-status-tag.tag-brak { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* Agent xKantor - patrz Shared/AgentPanel.razor */
.agent-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
    z-index: 950;
}
.agent-fab:hover { background: #1d4ed8; }
.agent-panel {
    position: fixed;
    right: 24px;
    bottom: 90px;
    width: 360px;
    max-width: calc(100vw - 32px);
    height: 480px;
    max-height: calc(100vh - 140px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(16,24,40,0.22);
    display: flex;
    flex-direction: column;
    z-index: 951;
    overflow: hidden;
}
.agent-panel-header {
    background: #2563eb;
    color: white;
    padding: 12px 14px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.agent-panel-close { background: none; border: none; color: white; font-size: 18px; cursor: pointer; }
.agent-panel-body { flex: 1; overflow-y: auto; padding: 12px 14px; }
.agent-podpowiedzi { display: flex; flex-direction: column; gap: 6px; }
.agent-podpowiedzi button {
    text-align: left;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
}
.agent-podpowiedzi button:hover { background: #e2e8f0; }
.agent-msg { margin-bottom: 10px; font-size: 13px; line-height: 1.4; padding: 8px 10px; border-radius: 8px; max-width: 90%; }
.agent-msg-user { background: #2563eb; color: white; margin-left: auto; }
.agent-msg-bot { background: #f1f5f9; color: #1f2d3d; }
.agent-propozycja { margin-top: 8px; display: flex; gap: 8px; }
.agent-panel-input { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid #e2e8f0; }
.agent-panel-input input { flex: 1; padding: 8px 10px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 13px; }
.agent-panel-input button { padding: 8px 14px; border-radius: 6px; border: none; background: #2563eb; color: white; font-weight: 600; cursor: pointer; }
.agent-panel-input button:disabled { opacity: 0.5; cursor: default; }

/* Dyskretny status połączenia SignalR (patrz Pages/_Host.cshtml, wwwroot/js/polaczenie.js) -
   Blazor Server sam przełącza klasy components-reconnect-{show,hide,failed,rejected} na
   #components-reconnect-modal przy rozłączeniu/wznowieniu obwodu. Domyślnie ukryty (praca
   online) - pojawia się tylko podczas próby wznowienia/błędu, nie przeszkadza kasjerowi. */
#components-reconnect-modal {
    position: fixed;
    bottom: 14px;
    right: 14px;
    z-index: 9999;
    display: none;
    align-items: center;
    gap: 8px;
    background: #1f2937;
    color: #f9fafb;
    padding: 8px 12px;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    font-size: 12.5px;
}
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}
#components-reconnect-modal .polaczenie-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    flex-shrink: 0;
    animation: polaczenie-puls 1s infinite ease-in-out;
}
#components-reconnect-modal.components-reconnect-failed .polaczenie-dot,
#components-reconnect-modal.components-reconnect-rejected .polaczenie-dot {
    background: #dc2626;
    animation: none;
}
#components-reconnect-modal .polaczenie-przycisk {
    display: none;
    border: none;
    background: #374151;
    color: #f9fafb;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
}
#components-reconnect-modal.components-reconnect-failed .polaczenie-przycisk {
    display: inline-block;
}
#components-reconnect-modal .polaczenie-przycisk:disabled { opacity: 0.6; cursor: default; }
@keyframes polaczenie-puls {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}
