/* =====================================================
   terminy-gwarantowane - style.css  v2
   ===================================================== */

:root {
    --primary:        #2563EB;
    --primary-dark:   #1D4ED8;
    --primary-light:  #EFF6FF;
    --primary-mid:    #BFDBFE;
    --accent:         #6366F1;
    --success:        #059669;
    --success-light:  #D1FAE5;
    --warning:        #D97706;
    --warning-light:  #FEF3C7;
    --promo:          #E11D48;
    --promo-light:    #FFE4E6;

    /* Kolorystyka z logo: granat #041B3C + pomarancz #FF8A00 */
    --logo-navy:      #041B3C;
    --logo-orange:    #FF8A00;
    --logo-orange-600:#E67A00;
    --logo-orange-700:#C96A00;
    --logo-orange-050:#FFF3E4;

    --bg:             #F1F5F9;
    --bg-white:       #FFFFFF;
    --border:         #E2E8F0;
    --border-mid:     #CBD5E1;

    --text:           #0F172A;
    --text-sec:       #475569;
    --text-muted:     #94A3B8;

    --sidebar-w:      268px;
    --nav-h:          64px;
    --radius:         10px;
    --radius-lg:      14px;
    --shadow-xs:      0 1px 2px rgba(0,0,0,.06);
    --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --shadow:         0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.05);
    --shadow-lg:      0 10px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);
}

/* ===== BASE ===== */

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ===== NAVBAR ===== */

.navbar {
    height: var(--nav-h);
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%) !important;
    box-shadow: 0 2px 16px rgba(0,0,0,.3);
    border-bottom: 1px solid rgba(255,255,255,.05);
    padding: 0 16px;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -.02em;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
}
.navbar-brand .brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99,102,241,.4);
}
.navbar-brand .brand-logo {
    width: 52px; height: 52px;
    border-radius: 11px;
    object-fit: contain;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(13,21,38,.35);
}
.navbar-brand .brand-text { line-height: 1; }
.navbar-brand .brand-text span { color: var(--logo-orange); }

.nav-link {
    color: rgba(255,255,255,.92) !important;
    font-weight: 600; font-size: 1rem;
    padding: 8px 16px !important;
    border-radius: 7px;
    transition: background .15s, color .15s;
    display: flex; align-items: center; gap: 6px;
}
.nav-link:hover  { color: #fff !important; background: rgba(255,255,255,.09); }
.nav-link.active { color: #fff !important; background: rgba(255,255,255,.13); font-weight: 600; }
/* Od 1400 px menu jest rozwiniete w jednym rzedzie, a po dodaniu pozycji
   KREATOR (TGP-170) przestalo sie miescic az do ok. 1500 px ("Dla oferenta"
   wychodzilo poza ekran). W tym przedziale ciasniejsze odstepy w linkach;
   szerzej wszystko zostaje jak bylo. */
@media (min-width: 1400px) and (max-width: 1599.98px) {
    .navbar .nav-link { padding: 8px 10px !important; }
}

.nav-cta {
    display: inline-flex; align-items: center; gap: 7px;
    font-weight: 700; font-size: .95rem;
    color: #fff !important;
    padding: 9px 18px;
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    box-shadow: 0 3px 12px rgba(99,102,241,.35);
    transition: transform .12s ease, box-shadow .15s ease, filter .15s ease;
}
.nav-cta:hover  { color: #fff !important; filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 5px 18px rgba(99,102,241,.45); }
.nav-cta.active { filter: brightness(1.07); }

.navbar-toggler { border-color: rgba(255,255,255,.2); }
.navbar-toggler-icon { filter: invert(1); }

/* Rozwiniete menu mobilne - .navbar ma stala wysokosc (--nav-h), wiec bez
   wlasnego tla rozwinieta lista lądowała poza ciemnym paskiem, na przezroczystym
   tle strony (bialy tekst na bialym tle).
   Breakpoint xxl (1400px) zamiast lg (992px) - przy mniejszych szerokosciach
   siedem pozycji menu (+ dropdowny) nie miesci sie w jednym rzedzie i wychodzi
   poza pasek nawigacji zamiast zwinac sie do hamburgera. */
@media (max-width: 1399.98px) {
    .navbar { height: auto; }
    .navbar-collapse {
        background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
        margin: 0 -16px;
        padding: 6px 16px 16px;
        box-shadow: 0 12px 24px -8px rgba(0,0,0,.4);
    }
}

/* Przyciemnienie reszty strony pod rozwinietym menu mobilnym, zeby menu
   wyraznie odcinalo sie od tla i bylo widac ze to osobna warstwa nad strona.
   Uwaga: .navbar ma sticky-top (z-index:1020) i wlasny kontekst stackowania,
   wiec backdrop MUSI miec z-index nizszy niz 1020 - inaczej renderuje sie NAD
   calym navbarem (rowniez nad linkami w rozwinietym menu) i przechwytuje kliki
   zamiast nich, zanim link zdazy zadzialac. */
.mobile-nav-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(6,10,20,.55);
    z-index: 1015;
}
.mobile-nav-backdrop.show { display: block; }

/* Dropdown "Dla firm" */
.nav-link.dropdown-toggle::after { margin-left: 4px; }

.tg-firm-dropdown {
    background: linear-gradient(160deg, #0F172A 0%, #1a2e4a 100%);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    padding: 6px 0;
    min-width: 200px;
}
.tg-firm-dropdown .dropdown-item {
    color: rgba(255,255,255,.88);
    font-weight: 600;
    font-size: .95rem;
    padding: 9px 16px;
    border-radius: 7px;
    margin: 1px 6px;
    width: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .13s;
}
.tg-firm-dropdown .dropdown-item:hover,
.tg-firm-dropdown .dropdown-item:focus {
    background: rgba(255,255,255,.09);
    color: #fff;
}
.tg-firm-dropdown .dropdown-item.active {
    background: rgba(255,255,255,.13);
    color: #fff;
}
.tg-dropdown-label {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
    padding: 6px 22px 2px;
}
.tg-dropdown-divider {
    border-color: rgba(255,255,255,.1);
    margin: 4px 0;
}
.tg-firm-dropdown .tg-dropdown-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff !important;
    border-radius: 8px;
    margin: 4px 6px 2px;
}
.tg-firm-dropdown .tg-dropdown-cta:hover {
    filter: brightness(1.08);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

/* ===== LAYOUT ===== */

.search-layout {
    display: flex;
    min-height: calc(100vh - var(--nav-h) - 130px);
}

.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--bg-white);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    position: sticky;
    top: var(--nav-h);
    max-height: calc(100vh - var(--nav-h));
    flex-shrink: 0;
}

.sidebar-header {
    padding: 14px 14px 10px;
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-icon {
    background: none; border: none;
    color: var(--text-muted); padding: 2px 4px;
    cursor: pointer; line-height: 1;
}
.sidebar-overlay { display: none; }

.main-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ===== DRZEWO KATEGORII ===== */

.cat-nav { padding: 6px 0 12px; }
.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-item  { margin: 0; }

.cat-group { margin-top: 20px; }
.cat-group-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 14px 3px;
    font-size: .65rem; font-weight: 800; letter-spacing: .1em;
    text-transform: uppercase; color: var(--brand);
    border-top: 1px solid var(--line);
    margin-top: 4px;
}
.cat-group-header--toggle {
    cursor: pointer; user-select: none;
    border-radius: 0 7px 7px 0;
    transition: background .12s;
}
.cat-group-header--toggle:hover { color: var(--primary); background: var(--primary-light); }
.cat-group-icon { font-size: .7rem; opacity: .7; }
.cat-group-name { color: inherit; text-decoration: none; }
.cat-group-name:hover { color: var(--primary); text-decoration: underline; }
.cat-group-name.active { color: var(--primary); }
.cat-group-body { padding-top: 6px; }

.cat-row {
    display: flex; align-items: center;
    padding: 3px 8px 3px 0;
    margin: 1px 6px 1px 0;
    border-radius: 0 7px 7px 0;
    transition: background .12s;
}
.cat-row:hover { background: var(--primary-light); }
.cat-row--selected {
    background: var(--primary-light) !important;
    border-left: 3px solid var(--primary);
}
.cat-row--bullet::before {
    content: '•';
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; min-width: 20px; height: 20px; flex-shrink: 0;
    color: var(--text-muted); font-size: .9rem;
}

.level-1 { padding-left: 10px; }
.level-2 { padding-left: 26px; }
.level-3 { padding-left: 42px; }
.level-4 { padding-left: 58px; }
.level-5 { padding-left: 74px; }
.cat-row--selected.level-1 { padding-left: 7px; }
.cat-row--selected.level-2 { padding-left: 23px; }
.cat-row--selected.level-3 { padding-left: 39px; }

/* Kategorie zagniezdzone pod grupa (Biznes, IT itp.) - wyrazne wciecie
   wzgledem naglowka grupy, zeby hierarchia grupa > kategoria byla widoczna
   nie tylko przez styl czcionki, ale i przez wciecie. */
.cat-group-body .level-1 { padding-left: 28px; }
.cat-group-body .level-2 { padding-left: 44px; }
.cat-group-body .level-3 { padding-left: 60px; }
.cat-group-body .level-4 { padding-left: 76px; }
.cat-group-body .level-5 { padding-left: 92px; }
.cat-group-body .cat-row--selected.level-1 { padding-left: 25px; }
.cat-group-body .cat-row--selected.level-2 { padding-left: 41px; }
.cat-group-body .cat-row--selected.level-3 { padding-left: 57px; }

.cat-toggle {
    background: none; border: none;
    padding: 0 3px; width: 20px; min-width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-muted); font-size: .6rem;
    border-radius: 4px; flex-shrink: 0; transition: background .1s, color .1s;
}
.cat-toggle:hover { background: var(--border); color: var(--text); }
.cat-toggle-placeholder { width: 20px; min-width: 20px; flex-shrink: 0; display: inline-block; }

.cat-link {
    font-size: .8rem; color: var(--text-sec);
    text-decoration: none; flex: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding: 3px 6px 3px 3px; font-weight: 450;
    transition: color .12s;
}
.cat-link:hover { color: var(--primary); }
.cat-link.active { color: var(--primary); font-weight: 700; }

.cat-count {
    font-size: .68rem; color: var(--text-muted);
    background: var(--bg); border-radius: 20px;
    padding: 1px 6px; margin-left: 3px;
    flex-shrink: 0; font-weight: 600;
}
.cat-link.active + .cat-count,
.cat-link.active .cat-count { background: var(--primary-mid); color: var(--primary-dark); }

/* ===== FILTRY (+30% rozmiar) ===== */

.filters-panel {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 18px 23px 16px;
}

.filter-search-row { margin-bottom: 16px; }
.filter-search-wrap { position: relative; max-width: 728px; }
.filter-search-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%); color: var(--text-muted);
    pointer-events: none; font-size: 1.05rem;
}
.filter-search-input {
    padding-left: 44px !important;
    border-radius: 11px !important;
    border-color: var(--border) !important;
    font-size: 1rem; height: 49px;
    transition: border-color .15s, box-shadow .15s;
}
.filter-search-input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px 23px;
    margin-bottom: 16px;
}
.filter-group--wide { grid-column: span 2; }

.filter-label {
    font-size: .84rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--text-muted); margin-bottom: 8px;
    display: flex; align-items: center; gap: 7px;
}

.toggle-all-btn {
    background: none; border: none; padding: 0;
    font-size: .78rem; color: var(--primary); cursor: pointer;
    font-weight: 500; text-transform: none; letter-spacing: 0; opacity: .85;
}
.toggle-all-btn:hover { opacity: 1; text-decoration: underline; }

.filter-checks { display: flex; flex-wrap: wrap; gap: 5px 16px; }
.filter-checks--scroll {
    max-height: 102px; overflow-y: auto;
    flex-direction: column; flex-wrap: nowrap; scrollbar-width: thin;
}

.fcheck {
    display: flex; align-items: center; gap: 8px;
    font-size: .95rem; cursor: pointer; white-space: nowrap;
    color: var(--text-sec); transition: color .1s;
}
.fcheck:hover { color: var(--text); }
.fcheck input { cursor: pointer; accent-color: var(--primary); width: 15px; height: 15px; }

.date-range { display: flex; align-items: center; gap: 8px; }
.date-sep { color: var(--text-muted); font-size: .95rem; }
.date-range .form-control { height: 42px; font-size: .9rem; }

.filter-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-actions .btn { font-size: .875rem; padding: 8px 18px; }
.results-info { font-size: .875rem; color: var(--text-muted); margin-left: 4px; }

.reset-btn { transition: all .15s; }
.reset-btn--active {
    background: #FFF7ED !important;
    border-color: #F97316 !important;
    color: #C2410C !important;
}
.reset-btn--active:hover { background: #FFEDD5 !important; }

/* ===== STATS BAR ===== */

.stats-bar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 9px 18px;
    display: flex; align-items: center;
    gap: 20px; font-size: .78rem;
    color: var(--text-muted); flex-wrap: wrap;
}
.stats-bar .stat { display: flex; align-items: center; gap: 5px; }
.stats-bar .stat strong { color: var(--text); font-weight: 700; }
.stats-bar .stat i { color: var(--primary); font-size: .85rem; }

/* ===== KARTY TERMINÓW ===== */

.results-section { flex: 1; padding: 10px 0 4px; }

.term-card {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin: 6px 12px;
    transition: box-shadow .15s, border-color .15s;
}
.term-card:hover { box-shadow: var(--shadow); border-color: var(--primary-mid); }
.term-card.is-promo { border-left: 3px solid var(--promo); }

.term-company-col {
    display: flex; flex-direction: column;
    align-items: center; gap: 5px;
    min-width: 76px; max-width: 76px; text-align: center; flex-shrink: 0;
}
.term-logo { width: 68px; height: 40px; object-fit: contain; border-radius: 6px; }
.term-logo-ph {
    width: 68px; height: 40px; background: var(--bg);
    border-radius: 6px; border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1.2rem;
}
.term-company-name {
    font-size: .67rem; color: var(--text-muted);
    line-height: 1.2; word-break: break-word; font-weight: 500;
}

.term-body { flex: 1; min-width: 0; }
.term-title {
    font-size: .925rem; font-weight: 700;
    color: var(--text); line-height: 1.35; margin-bottom: 7px;
    transition: color .12s;
}
.term-card:hover .term-title { color: var(--primary); }

.term-badges { display: flex; flex-wrap: wrap; gap: 5px; }

.tbadge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .71rem; padding: 3px 9px;
    border-radius: 999px; white-space: nowrap; font-weight: 600;
}
.tbadge-format   { background: #EDE9FE; color: #5B21B6; }
.tbadge-date     { background: var(--warning-light); color: #92400E; }
.tbadge-online   { background: var(--success-light); color: #065F46; }
.tbadge-place    { background: #E0F2FE; color: #075985; }
.tbadge-promo    { background: var(--promo-light); color: var(--promo); }
.tbadge-noplaces { background: #FEE2E2; color: #991B1B; font-weight: 600; }
.tbadge-groupsize { background: #E0E7FF; color: #3730A3; }
.tbadge-trainer  { background: #F1F5F9; color: #334155; }

.term-actions { flex-shrink: 0; display: flex; gap: 6px; align-items: center; }

/* ============ SZACUNKOWA CENA PO DOFINANSOWANIU (TGP-166) ============ */

/* Tresc jest zdaniem, nie sama kwota, wiec musi sie moc zlamac na dwie
   linie - stad brak nowrap na calosci i wyrownanie znacznika do pierwszej
   linii tekstu, a nie do srodka bloku. */
.price-funded {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 5px;
    margin-top: 3px;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.35;
    color: #065F46;
    text-align: right;
}
.price-funded-tag {
    background: #D1FAE5;
    color: #065F46;
    border-radius: .35rem;
    padding: 1px 5px;
    font-size: .66rem;
    letter-spacing: .02em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Karta szkolenia i tabela terminow maja tresc wyrownana do lewej -
   inaczej niz kolumna ceny na karcie terminu, ktora jest do prawej. */
.training-card .price-funded,
.terms-table .price-funded { justify-content: flex-start; text-align: left; }

/* Stopka karty szkolenia to flex, a szacunek jest teraz zdaniem, nie sama
   kwota - bez tego lewa kolumna sciskala przycisk "Szczegoly" tak, ze
   strzalka spadala do drugiej linii. */
.training-card .card-footer > a { flex-shrink: 0; white-space: nowrap; }

/* Notka doklejona do kolumny ceny na karcie terminu dziedziczy jej
   wyrownanie do prawej; w tabeli terminow i w katalogu zostaje do lewej. */
.term-price-col .funding-note { justify-content: flex-end; text-align: right; margin-top: 6px; }

/* Przypis w stopce tabeli terminow to nie jest wiersz z danymi - bez ramki
   i bez gornego odstepu, zeby przylegal do ostatniego terminu. */
.terms-table tfoot td { border-bottom: 0; padding-top: 0; }
.terms-table tfoot .funding-note { margin-top: 4px; }

.funding-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0 0;
    font-size: .78rem;
    color: var(--text-muted);
}

/* ==================== PASEK POROWNYWARKI (TGP-169) ==================== */

body.has-compare-bar { padding-bottom: 76px; }

.compare-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1040;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px -8px rgba(15, 23, 42, .18);
    padding: 10px 16px;
}
.compare-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
}
.compare-bar-items {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    flex: 1 1 auto;
    min-width: 0;
}
.compare-bar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-050);
    color: var(--brand-700);
    border-radius: .6rem;
    padding: 4px 6px 4px 10px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.compare-bar-item-remove {
    border: none;
    background: none;
    color: inherit;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 3px;
}
.compare-bar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Komunikat o limicie 4 terminow. Zastapil natywny alert() przegladarki,
   ktory wygladal obco i zatrzymywal strone. Siedzi nad paskiem, wiec nie
   rozpycha go w gore i niczego nie zaslania. */
.compare-bar-warning {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 100%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
    border-radius: .7rem;
    padding: 10px 14px;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: 0 6px 18px -6px rgba(15, 23, 42, .25);
}
.compare-bar-warning i { font-size: 1rem; flex-shrink: 0; }

/* Klasa dokladana przy kazdym pokazaniu - dzieki temu komunikat "mrugnie"
   takze wtedy, gdy juz wisi, i widac, ze klikniecie zostalo zauwazone. */
.compare-bar-warning--in { animation: compareWarningIn .22s ease-out; }

@keyframes compareWarningIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .compare-bar-warning--in { animation: none; }
}
.compare-bar-count { font-weight: 700; font-size: .82rem; color: var(--muted); white-space: nowrap; }

@media (max-width: 575.98px) {
    .compare-bar-inner { flex-wrap: wrap; gap: 8px; }
    .compare-bar-items { order: 2; width: 100%; }
    .compare-bar-actions { order: 1; width: 100%; justify-content: space-between; }
}

.term-price-col { text-align: right; min-width: 120px; flex-shrink: 0; }
.price-regular  { font-size: 1.1rem; font-weight: 800; color: var(--text); display: block; letter-spacing: -.02em; }
.price-original { font-size: .76rem; color: var(--text-muted); text-decoration: line-through; display: block; }
.price-promo    { font-size: 1.1rem; font-weight: 800; color: var(--promo); cursor: help; display: block; letter-spacing: -.02em; }
.price-label    { font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-top: 2px; }
.price-na       { font-size: .8rem; color: var(--text-muted); font-style: italic; }

/* ===== PAGINACJA ===== */

.pagination-wrap { padding: 16px 12px; }
.pagination .page-link {
    border-color: var(--border); color: var(--text-sec);
    border-radius: 7px !important; margin: 0 2px;
    font-size: .825rem; font-weight: 500; transition: all .12s;
}
.pagination .page-link:hover {
    background: var(--primary-light); border-color: var(--primary-mid); color: var(--primary);
}
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

.empty-state { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 14px; display: block; }

/* ===== SZKOLENIA / FIRMY ===== */

.page-header-section {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 28px 0 0;
}
.page-header-section h1 {
    font-size: 1.5rem; font-weight: 800;
    letter-spacing: -.03em; color: var(--text); margin-bottom: 3px;
}
.page-header-section .subtitle { font-size: .875rem; color: var(--text-muted); }

.training-card, .company-card {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    transition: box-shadow .18s, transform .18s, border-color .18s !important;
    background: var(--bg-white) !important;
}
.training-card:hover, .company-card:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-2px);
    border-color: var(--primary-mid) !important;
}
.training-card .card-body { padding: 18px 18px 12px; }
.training-card .card-title { font-size: .9rem; font-weight: 700; color: var(--text); line-height: 1.4; }
.training-card .card-footer { padding: 10px 18px 14px; border-top: 1px solid var(--border); }
.training-card .card-text { font-size: .8rem; color: var(--text-sec); line-height: 1.5; }

.company-card { padding: 24px 16px !important; }
.company-card h6 { font-size: .875rem; font-weight: 700; color: var(--text); }
.company-card .text-muted { font-size: .78rem; }

/* ===== SZCZEGÓŁY ===== */

.detail-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
    color: #fff; padding: 32px 0 28px;
}
.detail-hero .company-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.12); padding: 4px 12px;
    border-radius: 999px; font-size: .78rem; font-weight: 600;
    color: rgba(255,255,255,.85); margin-bottom: 10px;
}
.detail-hero h1 {
    font-size: 1.6rem; font-weight: 800;
    letter-spacing: -.03em; line-height: 1.25; margin-bottom: 14px;
}
.detail-hero .badge { font-size: .72rem; padding: 4px 10px; border-radius: 7px; }

.detail-content { background: var(--bg); padding: 28px 0; }

/* Strona szczegolow szkolenia jest szersza niz reszta portalu, bo musi
   pomiescic siedmiokolumnowa tabele terminow bez poziomego przewijania.
   Klasa .detail--wide siedzi i na hero, i na tresci, wiec krawedzie sie nie
   rozjezdzaja; strona firmy uzywa tych samych .detail-* i celowo jej nie
   dotyka. min() pilnuje, zeby kontener nigdy nie przerosl okna - inaczej
   przewijanie tylko przeniosloby sie z tabeli na cala strone. */
@media (min-width: 1200px) {
    .detail--wide .container { max-width: min(1360px, calc(100vw - 32px)); }
}

/* Panel boczny dostaje stala szerokosc, a cala reszte bierze kolumna z
   terminami. Przy sztywnym podziale 8/4 tabela oddawala bokowi jedna trzecia
   strony niezaleznie od tego, ile ten bok naprawde potrzebowal.
   min-width:0 jest konieczne: bez niego minimalna szerokosc elementu flex to
   jego min-content, wiec tabela rozpychalaby kolumne zamiast sie zmiescic. */
@media (min-width: 992px) {
    .detail-content .detail-main {
        flex: 1 1 0; width: auto; max-width: none; min-width: 0;
    }
    .detail-content .detail-side {
        flex: 0 0 300px; width: 300px; max-width: 300px;
    }
}

/* Sekcje tresci na stronie szczegolow szkolenia */
.detail-section {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 20px;
    box-shadow: var(--shadow-xs);
}
.detail-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 1.05rem; font-weight: 800; color: var(--text);
    letter-spacing: -.02em; margin: 0 0 14px;
}
.detail-section-title i { color: var(--primary); font-size: 1rem; }
.detail-lead { font-size: .95rem; color: var(--text-sec); font-weight: 600; line-height: 1.6; margin: 0 0 10px; }
.detail-prose { font-size: .9rem; color: var(--text-sec); line-height: 1.7; }
.detail-prose p { margin: 0 0 10px; }
.detail-prose p:last-child { margin-bottom: 0; }
.detail-program { white-space: normal; }

/* Sidebar - karty informacyjne + prowadzacy */
.detail-aside { position: sticky; top: calc(var(--nav-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.info-card {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px 18px; box-shadow: var(--shadow-xs);
}
.info-card-title {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    font-weight: 700; color: var(--text-muted); margin: 0 0 12px;
    display: flex; align-items: center;
}
.info-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: .84rem;
}
.info-row:first-of-type { border-top: none; }
.info-row > i { color: var(--primary); font-size: .95rem; width: 18px; text-align: center; }
.info-row-label { color: var(--text-muted); }
.info-row-val { margin-left: auto; font-weight: 700; color: var(--text); text-align: right; }

.trainer-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.trainer-photo {
    width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 2px solid var(--border);
}
.trainer-photo--ph {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff; font-weight: 800; font-size: 1.3rem; border: none;
}
.trainer-name { font-weight: 800; font-size: .95rem; color: var(--text); line-height: 1.2; }
.trainer-title { font-size: .8rem; color: var(--primary); font-weight: 600; margin-top: 2px; }
.trainer-bio { font-size: .84rem; color: var(--text-sec); line-height: 1.6; margin: 0; }

.terms-table th {
    font-size: .7rem; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-muted);
    font-weight: 700; border: none; background: var(--bg);
    padding: 10px 10px;
}
.terms-table td {
    padding: 12px 10px; vertical-align: middle;
    border-color: var(--border); font-size: .875rem;
}
.terms-table tbody tr:hover { background: var(--primary-light); }
/* Bez overflow:hidden. Zaokraglenie rogow robia teraz skrajne komorki
   (patrz nizej), a przycinanie na <table> obcinalo zakladke "Brak miejsc"
   wypuszczana poza lewa krawedz wiersza. To byl trzeci kontener tnacy w tym
   lancuchu, obok .terms-card i .table-responsive. */
.terms-table { border-radius: var(--radius); }

/* Jeden rozmiar plakietek w calym wierszu. Wczesniej kazda kolumna miala
   wlasny font-size wpisany inline (.78 / .82), wiec plakietki nie trzymaly
   wspolnej linii ani wysokosci. */
.terms-table .tbadge { font-size: .78rem; }

/* Cena nie ma sie lamac na "2000,00" + "zl" w waskiej kolumnie. */
.terms-table .terms-price { font-weight: 700; font-size: .9rem; white-space: nowrap; }

/* Kolumna akcji: jeden rzad, bez zawijania. Bez tego przyciski i plakietka
   "Brak miejsc" schodzily sobie pod spod w przypadkowej kolejnosci.
   Celujemy w klase, nie w td:last-child, bo ostatnia komorka wiersza to tez
   rozwijany harmonogram (colspan=7). */
.terms-table th:last-child { text-align: right; }
.terms-table .terms-actions-cell { text-align: right; white-space: nowrap; }
.terms-actions { display: inline-flex; align-items: center; gap: 6px; }

/* Wszystkie trzy przyciski akcji na jedno kopyto: rowny kwadrat, ten sam
   promien i wysrodkowana ikona. Wczesniej kazdy mial wlasna szerokosc
   wynikajaca z paddingu bootstrapa, wiec rzad byl nierowny.
   Kolorow (btn-primary / btn-outline-*) celowo nie ruszam - koszykiem steruje
   JS, ktory moze na nim przelaczac klasy. */
.terms-actions .btn {
    width: 32px; height: 32px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; font-size: .95rem; line-height: 1;
}
.terms-actions .btn > i { line-height: 1; }
.terms-actions .btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ===== Termin bez wolnych miejsc =====
   Caly wiersz na rozowo, gruby pasek na lewej krawedzi, a napis wsuniety
   w lewy margines wiersza. Napis jest pozycjonowany absolutnie, wiec nie
   wchodzi w siatke kolumn i nie ma wlasnego naglowka. */
.terms-table tbody tr.term-row--sold-out > td { background: var(--promo-light); }
.terms-table tbody tr.term-row--sold-out:hover > td { background: #FFD5DA; }
.terms-table tbody tr.term-row--sold-out > td:first-child {
    box-shadow: inset 4px 0 0 var(--promo);
}

/* Karta z tabela terminow. Przycinanie bylo wpisane inline w szablonie -
   siedzi tu, bo szeroki uklad musi je umiec zdjac (patrz .term-flag nizej). */
.terms-card { border-radius: var(--radius-lg); overflow: hidden; }

/* Zaokraglenie rogow bierze na siebie sama tabela, a nie karta. Dzieki temu
   po zdjeciu overflow:hidden z karty szare tlo naglowka i rozowe tlo wiersza
   nie wystaja kwadratowymi rogami poza jej promien. */
.terms-table thead th:first-child { border-top-left-radius:  var(--radius-lg); }
.terms-table thead th:last-child  { border-top-right-radius: var(--radius-lg); }
.terms-table tbody tr:last-child > td:first-child { border-bottom-left-radius:  var(--radius-lg); }
.terms-table tbody tr:last-child > td:last-child  { border-bottom-right-radius: var(--radius-lg); }

/* "Brak miejsc" jako zakladka wiszaca poza karta, na wysokosci swojego
   wiersza. Domyslnie (waskie okno) jest zwyklym napisem w komorce akcji:
   tam tabela musi sie przewijac poziomo, a element wystajacy poza kontener
   przewijania i tak zostalby przyciety. */
.term-flag {
    display: block;
    width: max-content;
    margin: 0 0 5px 0;
    background: var(--promo);
    color: #fff;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Zakladka "Brak miejsc" wisi na zewnatrz karty, po lewej stronie czerwonego
   paska wiersza. Zeby bylo gdzie ja powiesic, kontener oddaje od 1400px po
   ~120px marginesu z KAZDEJ strony. Marginesy sa symetryczne, wiec karta z
   terminami zostaje rowna z reszta tresci strony - poprzednia wersja zabierala
   104px tylko z prawej i robila z tabeli wciety prostokat.
   Ponizej 1400px nie ma z czego wykroic tego pasa, wiec zostaje wariant
   zapasowy: napis nad plakietka z data, w srodku komorki. */
@media (min-width: 1400px) {
    .detail--wide .container { max-width: min(1360px, calc(100vw - 240px)); }

    .terms-card--flagged,
    .terms-card--flagged > .table-responsive { overflow: visible; }

    .terms-card--flagged tbody tr.term-row--sold-out > td:first-child {
        position: relative;
        /* pasek schodzi z krawedzi wiersza na zewnetrzna krawedz obwoluty
           (nizej), zeby nie przecinal powstalego ksztaltu kreska w poprzek */
        box-shadow: none;
    }

    /* Obwoluta: panel w tym samym jasnorozowym co tlo wiersza i tej samej
       wysokosci, dosuniety do jego lewej krawedzi. Wiersz zdaje sie wychodzic
       poza karte i niesc plakietke na sobie, wiec zwiazek z terminem widac od
       razu, a plakietka nie styka sie z niczym na ostro.
       Szerokosci sa stale, bo napis jest staly: 110px obwoluty = 8px luzu,
       94px plakietki, 8px luzu. */
    .terms-card--flagged tbody tr.term-row--sold-out > td:first-child::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        right: 100%;
        width: 110px;
        background: var(--promo-light);
        box-shadow: inset 4px 0 0 var(--promo);
        border-radius: 10px 0 0 10px;
    }

    .terms-card--flagged .term-flag {
        position: absolute;
        right: 100%;
        top: 50%;
        transform: translateY(-50%);
        width: 94px;
        margin: 0 8px 0 0;
        padding: 4px 0;
        text-align: center;
        border-radius: 999px;
        z-index: 2;
    }
}

/* ===== Potwierdzenie zapisu na termin (TGP-119) =====
   Ekran mial wszystko w jednej szarej linijce: tytul, firme i date sklejone
   mysnikami, a liste uczestnikow w ramce wygladajacej jak pole formularza.
   Ponizej daje temu hierarchie: etykieta, tresc, wyrazny podzial na sekcje. */

.signup-check {
    display: inline-flex; align-items: center; justify-content: center;
    width: 56px; height: 56px; border-radius: 999px;
    background: var(--success-light); color: var(--success);
    font-size: 1.75rem; line-height: 1;
}

/* Etykieta sekcji - to ona niesie strukture, ktorej brakowalo */
.signup-label {
    display: flex; align-items: center; gap: 8px;
    font-size: .68rem; text-transform: uppercase; letter-spacing: .09em;
    font-weight: 700; color: var(--text-muted); margin-bottom: 6px;
}
.signup-count {
    background: var(--primary-light); color: var(--primary);
    border-radius: 999px; padding: 1px 8px; font-size: .72rem; letter-spacing: 0;
}

/* Harmonogram: daty w kolumnie, godziny dociagniete do prawej */
.signup-days { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.signup-days li {
    display: flex; align-items: baseline; gap: 10px;
    padding: 6px 0; border-top: 1px solid var(--border);
}
.signup-days li:first-child { border-top: 0; }
.signup-day-date { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 88px; }
.signup-day-hours { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text-sec); }

/* Uczestnicy: wiersze z inicjalem zamiast ramki udajacej input */
.signup-people { list-style: none; padding: 0; margin: 0; }
.signup-people li {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-top: 1px solid var(--border);
}
.signup-people li:first-child { border-top: 0; }
.signup-initial {
    flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 999px;
    background: var(--primary-light); color: var(--primary);
    font-weight: 700; font-size: .9rem;
}
.signup-person { display: flex; flex-direction: column; min-width: 0; }
.signup-person-name { font-weight: 600; font-size: .93rem; }
.signup-person-mail { font-size: .8rem; color: var(--text-muted); word-break: break-all; }

.company-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
    padding: 36px 0; color: #fff;
}
.company-hero .logo-wrap {
    width: 90px; height: 60px; background: var(--bg-white);
    border-radius: var(--radius); display: flex; align-items: center;
    justify-content: center; padding: 8px; margin-bottom: 14px;
}
.company-hero h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.company-hero .company-hero-desc {
    color: rgba(255,255,255,.82); font-size: .95rem; line-height: 1.6;
    max-width: 680px; margin: 14px 0 0;
}
.company-hero .company-hero-contact {
    margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
}
.company-hero .company-contact-item {
    display: inline-flex; align-items: center; gap: 7px;
    color: rgba(255,255,255,.85); font-size: .9rem; text-decoration: none;
}
.company-hero a.company-contact-item:hover { color: #fff; text-decoration: underline; }
.company-hero .company-contact-item i { color: var(--accent); }

.company-hero .hero-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.company-hero .btn-hero {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.22);
    color: #fff !important; font-size: .825rem; font-weight: 600;
    border-radius: 8px; padding: 7px 16px;
    transition: background .15s; display: inline-flex; align-items: center; gap: 6px;
}
.company-hero .btn-hero:hover {
    background: rgba(255,255,255,.22) !important;
    border-color: rgba(255,255,255,.38) !important;
    transform: translateY(-1px);
}

/* ===== BUTTONS ===== */

.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    font-weight: 600; border-radius: 8px; transition: all .15s;
}
.btn-primary:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    box-shadow: 0 4px 12px rgba(37,99,235,.28); transform: translateY(-1px);
}
.btn-outline-primary {
    border-color: var(--primary) !important; color: var(--primary) !important;
    font-weight: 600; border-radius: 8px; transition: all .15s;
}
.btn-outline-primary:hover {
    background: var(--primary) !important; color: #fff !important;
    box-shadow: 0 4px 12px rgba(37,99,235,.2); transform: translateY(-1px);
}
.btn-outline-secondary { border-radius: 8px; font-weight: 500; }
.btn-sm { font-size: .8rem; padding: 5px 12px; }

/* ===== BADGES ===== */

.badge { font-weight: 600; border-radius: 6px; }
.badge.bg-secondary { background: #EDE9FE !important; color: #5B21B6 !important; }
.badge.bg-success   { background: var(--success-light) !important; color: #065F46 !important; }
.badge.bg-info      { background: #E0F2FE !important; color: #075985 !important; }
.badge.bg-light     { border: 1px solid var(--border) !important; }

/* ===== FOOTER ===== */

.site-footer {
    background: #0F172A; color: rgba(255,255,255,.55);
    padding: 44px 0 20px; font-size: .825rem;
}
.footer-brand {
    font-size: 1rem; font-weight: 800; color: #fff;
    letter-spacing: -.02em; display: flex; align-items: center; gap: 9px;
    margin-bottom: 9px;
}
.footer-brand .brand-icon {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 7px; display: flex; align-items: center;
    justify-content: center; font-size: .85rem;
}
.footer-brand .footer-logo {
    width: 30px; height: 30px;
    border-radius: 7px; object-fit: contain; flex-shrink: 0;
}
.footer-desc { font-size: .78rem; color: rgba(255,255,255,.4); line-height: 1.65; }
.site-footer h6, .site-footer .footer-tytul {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .09em; color: rgba(255,255,255,.38); margin-bottom: 14px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul li a { color: rgba(255,255,255,.55); transition: color .12s; }
.site-footer ul li a:hover { color: #fff; }
.footer-bottom {
    margin-top: 36px; padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 8px;
}
.footer-bottom .copy { font-size: .76rem; color: rgba(255,255,255,.3); }
.footer-dokumenty { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .76rem; }
.footer-dokumenty a { color: rgba(255,255,255,.55); text-decoration: none; }
.footer-dokumenty a:hover, .footer-dokumenty a:focus-visible { color: #fff; text-decoration: underline; }
/* Polityka prywatnosci i regulamin (templates/portal/dokument_prawny.html) - tresc z edytora w panelu. */
.dokument-prawny h2 { font-size: 1.15rem; font-weight: 700; margin: 1.6rem 0 .6rem; }
.dokument-prawny h3 { font-size: 1rem; font-weight: 700; margin: 1.2rem 0 .5rem; }
.dokument-prawny > :first-child { margin-top: 0; }
.dokument-prawny li { margin-bottom: .35rem; }
.dokument-prawny > :last-child { margin-bottom: 0; }
.info-o-danych { font-size: .8rem; color: var(--bs-secondary-color, #6c757d); margin-top: .75rem; }

.card { border-radius: var(--radius-lg) !important; }

/* ===== MOBILE ===== */

/* ===== tbadge dodatkowe ===== */
.tbadge-warning { background: var(--warning-light); color: #92400E; }
.tbadge-danger  { background: #FEE2E2; color: #991B1B; }

/* ===== SEKCJA ANKIET - firma_szczegoly ===== */

.survey-stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    text-align: center;
    height: 100%;
}
.survey-stat-card--warning { border-color: #FDE68A; background: #FFFBEB; }
.survey-stat-card--critical { border-color: #FECACA; background: #FFF1F2; }

.survey-stat-value {
    font-size: 2rem; font-weight: 800; color: var(--text);
    line-height: 1; letter-spacing: -.04em;
}
.survey-stat-value span { font-size: 1rem; font-weight: 600; color: var(--text-muted); }
.survey-stat-label {
    font-size: .75rem; color: var(--text-muted);
    font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
    margin-top: 6px;
}
.survey-stars { color: #F59E0B; font-size: .85rem; margin-top: 8px; }
.survey-stars .bi-star { color: var(--border-mid); }

/* ===== KOMENTARZE ===== */

.comment-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    height: 100%;
}
.comment-meta {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 6px; margin-bottom: 10px;
}
.comment-date {
    font-size: .72rem; color: var(--text-muted);
    margin-left: auto;
}
.comment-text {
    font-size: .85rem; color: var(--text-sec);
    line-height: 1.6; margin: 0;
}

/* ===== ANKIETA (formularz) ===== */

.survey-question {
    font-size: .925rem; font-weight: 700; color: var(--text);
    margin-bottom: 10px;
}
.survey-radio-label {
    display: flex; align-items: center; gap: 8px;
    font-size: .875rem; color: var(--text-sec);
    cursor: pointer; padding: 6px 0;
    transition: color .1s;
}
.survey-radio-label:hover { color: var(--text); }
.survey-radio-label input { accent-color: var(--primary); width: 16px; height: 16px; }
.survey-rating-row { display: flex; gap: 8px; flex-wrap: wrap; }
.survey-star-label {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; cursor: pointer; padding: 8px 14px;
    border: 2px solid var(--border); border-radius: var(--radius);
    font-size: .8rem; font-weight: 600; color: var(--text-sec);
    transition: border-color .15s, background .15s;
}
.survey-star-label:hover { border-color: var(--primary); background: var(--primary-light); }
.survey-star-label input { display: none; }
.survey-star-label:has(input:checked) {
    border-color: var(--primary); background: var(--primary-light); color: var(--primary);
}
.survey-radio-label--lg {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: border-color .15s, background .15s;
}
.survey-radio-label--lg:hover { border-color: var(--primary); background: var(--primary-light); }
.survey-radio-label--lg:has(input:checked) {
    border-color: var(--primary); background: var(--primary-light); color: var(--primary);
}

/* ===== LANDING PAGE ===== */

.landing-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 60%, #1E3A5F 100%);
    padding: 72px 0 80px; overflow: hidden; position: relative;
}
.landing-hero::after {
    content: ''; position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,.15) 0%, transparent 70%);
    top: -100px; right: -100px; pointer-events: none;
}
.landing-hero-content { position: relative; z-index: 1; }
.landing-hero-split { display: flex; align-items: center; gap: 44px; }
.landing-hero-logo {
    width: clamp(160px, 19vw, 240px); height: auto; border-radius: 24px;
    flex-shrink: 0; margin: 0;
    box-shadow: 0 20px 48px -16px rgba(0,0,0,.62);
}
.landing-hero-text { flex: 0 1 600px; min-width: 0; }
@media (max-width: 767px) {
    .landing-hero-split { flex-direction: column; align-items: flex-start; gap: 24px; }
    .landing-hero-logo { width: 128px; }
    /* W kolumnie "flex: 0 1 600px" dzialalo jak minimalna wysokosc 600 px - przy
       krotszym tekscie zostawala pusta przestrzen pod wyszukiwarka. */
    .landing-hero-text { flex-basis: auto; }
}
/* Na telefonie bez duzego logo nad naglowkiem (jest w pasku u gory) - wyszukiwarka
   i najblizsze terminy mieszcza sie na pierwszym ekranie. */
@media (max-width: 576px) {
    .landing-hero-logo { display: none; }
    .landing-hero { padding: 40px 0 32px; }
}
.landing-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
    color: rgba(255,255,255,.85); padding: 5px 14px;
    border-radius: 999px; font-size: .78rem; font-weight: 600;
    margin-bottom: 20px;
}
.landing-headline {
    font-size: 3rem; font-weight: 900; color: #fff;
    letter-spacing: -.04em; line-height: 1.1; margin-bottom: 20px;
}
.landing-headline-accent { color: var(--logo-orange); }
.landing-subline {
    font-size: 1.1rem; color: rgba(255,255,255,.65);
    max-width: 560px; line-height: 1.6; margin-bottom: 32px;
}
/* Wyroznienie kluczowego przekazu (sam wyglad, tekst bez zmian) - wersja stonowana */
.landing-subline .subline-guarantee {
    color: #fff; font-weight: 800;
    background-image: linear-gradient(transparent 60%, rgba(96,165,250,.40) 60%);
    background-repeat: no-repeat;
}
/* "zweryfikowanych firm" - inny kolor (zielen = zaufanie/hub wielu firm) */
.landing-subline .subline-companies {
    color: #fff; font-weight: 800;
    background-image: linear-gradient(transparent 60%, rgba(52,211,153,.42) 60%);
    background-repeat: no-repeat;
}

/* Chmurki po prawej stronie hero */
.landing-hero .container { position: relative; }
.hero-clouds {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    display: flex; flex-direction: column; align-items: flex-end; gap: 20px;
    z-index: 2; max-width: 260px;
}
.hero-cloud {
    display: inline-flex; align-items: center; gap: 11px;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.16);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    color: #fff; font-weight: 700; font-size: .98rem; line-height: 1.25;
    padding: 14px 20px; border-radius: 18px;
    box-shadow: 0 14px 34px -14px rgba(0,0,0,.55);
    max-width: 300px;
    animation: cloudFloat 5.5s ease-in-out infinite;
    pointer-events: auto; text-decoration: none; cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.hero-cloud:hover {
    background: rgba(255,255,255,.16);
    box-shadow: 0 18px 40px -14px rgba(0,0,0,.6);
    color: #fff;
}
.hero-cloud i { font-size: 1.35rem; flex-shrink: 0; }
.hero-cloud--guarantee { border-color: rgba(96,165,250,.5); }
.hero-cloud--guarantee i { color: #60A5FA; }
.hero-cloud--verified { margin-right: 34px; animation-delay: -2.75s; border-color: rgba(52,211,153,.5); }
.hero-cloud--verified i { color: #34D399; }
@keyframes cloudFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) {
    .hero-cloud { animation: none; }
}
@media (max-width: 1199px) {
    .hero-clouds { display: none; }
}
/* Pod naglowkiem jest wyszukiwarka i najblizsze terminy, wiec srodek kontenera
   wypadal na wysokosci wyszukiwarki i dolny dymek ja zaslanial - dymki stoja
   na wysokosci naglowka, gdzie po prawej jest wolne miejsce. */
.landing-hero .hero-clouds { top: 60px; transform: none; }
.landing-cta-group { display: flex; gap: 12px; flex-wrap: wrap; }

/* Strona glowna: wyszukiwarka, popularne kategorie i najblizsze terminy w hero */
.landing-hero .landing-subline { margin-bottom: 24px; }
.landing-search {
    display: flex; gap: 8px; background: #fff; border-radius: 14px; padding: 6px;
    max-width: 620px; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.landing-search input {
    flex: 1; min-width: 0; border: 0; font-size: 1rem; padding: 10px 12px;
    outline: none; color: #0F172A; background: transparent;
}
.landing-search button {
    border: 0; background: var(--logo-orange); color: #fff; font-weight: 800;
    border-radius: 10px; padding: 10px 18px; display: inline-flex; gap: 6px; align-items: center;
    transition: background .18s;
}
.landing-search button:hover { background: var(--logo-orange-600); }
.landing-search:focus-within { box-shadow: 0 0 0 3px rgba(255,138,0,.45), 0 10px 30px rgba(0,0,0,.25); }
.landing-popular { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.landing-popular span { color: #9FB0CF; font-size: .85rem; }
.landing-popular a {
    color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
    padding: 4px 12px; font-size: .85rem; text-decoration: none; transition: background .18s;
}
.landing-popular a:hover { background: rgba(255,255,255,.12); color: #fff; }
.landing-all-link { display: inline-block; margin-top: 14px; color: #FFB35C; font-weight: 700; text-decoration: none; }
.landing-all-link:hover { color: #FFC67F; }
.landing-nearest { position: relative; z-index: 1; max-width: 1000px; margin: 28px auto 0; }
.landing-nearest-head {
    display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px;
}
.landing-nearest-head h2 { color: #fff; font-size: 1rem; font-weight: 800; margin: 0; }
.landing-nearest-head a { color: #FFB35C; font-size: .85rem; font-weight: 700; text-decoration: none; }
.landing-nearest-list { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 8px; }
.landing-nearest-card {
    background: rgba(255,255,255,.96); border-radius: 12px; padding: 12px 14px;
    display: grid; grid-template-columns: 44px 1fr; gap: 10px; color: #0F172A; text-decoration: none;
    transition: transform .18s, box-shadow .18s;
}
.landing-nearest-card:hover { color: #0F172A; transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); }
.landing-nearest-date { text-align: center; line-height: 1.05; }
.landing-nearest-date small { display: block; font-size: .6rem; text-transform: uppercase; color: #5B6780; font-weight: 700; }
.landing-nearest-date b { display: block; font-size: 1.2rem; color: #1E3A8A; font-weight: 800; }
.landing-nearest-body { min-width: 0; }
.landing-nearest-body h3 { font-size: .9rem; font-weight: 800; margin: 0; line-height: 1.25; }
.landing-nearest-body p { margin: 2px 0 0; font-size: .76rem; color: #5B6780; }
.landing-nearest-body strong { font-size: .9rem; }
@media (max-width: 768px) { .landing-nearest-list { grid-template-columns: 1fr; } }
@media (max-width: 576px) {
    .landing-search button span { display: none; }
    .landing-nearest { margin-top: 18px; }
}

.btn-landing-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--logo-orange); color: #fff !important;
    font-weight: 700; font-size: 1rem; padding: 13px 28px;
    border-radius: 10px; transition: all .18s;
    border: 2px solid var(--logo-orange);
}
.btn-landing-primary:hover {
    background: var(--logo-orange-600); border-color: var(--logo-orange-600);
    transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,138,0,.38);
}
.btn-landing-secondary {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.1); color: #fff !important;
    border: 2px solid rgba(255,255,255,.22);
    font-weight: 600; font-size: 1rem; padding: 13px 28px;
    border-radius: 10px; transition: all .18s;
}
.btn-landing-secondary:hover {
    background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.38);
    transform: translateY(-2px);
}

.landing-stats {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 36px 0;
}
.landing-stats-grid {
    display: flex; justify-content: center; gap: 48px; flex-wrap: wrap;
}
.landing-stat { text-align: center; }
.landing-stat-number {
    font-size: 2.8rem; font-weight: 900; color: var(--logo-orange);
    letter-spacing: -.05em; line-height: 1;
}
.landing-stat-label {
    font-size: .825rem; color: var(--text-muted);
    font-weight: 600; margin-top: 6px;
}

.landing-how {
    background: var(--bg); padding: 64px 0;
}
.landing-section-header {
    text-align: center; margin-bottom: 40px;
}
.landing-section-header h2 {
    font-size: 1.8rem; font-weight: 800; color: var(--text);
    letter-spacing: -.03em; margin-bottom: 8px;
}
.landing-section-header p {
    font-size: .95rem; color: var(--text-muted); margin: 0;
}

.landing-step {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px;
    height: 100%; transition: box-shadow .18s, transform .18s;
}
.landing-step:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.landing-step-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 16px;
}
.landing-step h3 {
    font-size: 1.05rem; font-weight: 700; color: var(--text);
    margin-bottom: 10px;
}
.landing-step p {
    font-size: .85rem; color: var(--text-sec); line-height: 1.6; margin: 0;
}

.landing-companies {
    background: var(--bg-white); padding: 64px 0;
    border-top: 1px solid var(--border);
}
.landing-company-card {
    display: flex; flex-direction: column; align-items: center;
    gap: 8px; padding: 18px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    text-decoration: none; background: var(--bg-white);
    transition: box-shadow .15s, border-color .15s;
    text-align: center; height: 100%;
}
.landing-company-card:hover {
    box-shadow: var(--shadow); border-color: var(--primary-mid);
}
.landing-company-name {
    font-size: .8rem; font-weight: 700; color: var(--text);
    line-height: 1.3;
}
.landing-company-count {
    font-size: .72rem; color: var(--text-muted);
}

.landing-bottom-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 64px 0; text-align: center; color: #fff;
}
.landing-bottom-cta h2 {
    font-size: 2rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 12px;
}
.landing-bottom-cta p {
    font-size: 1rem; color: rgba(255,255,255,.8); margin-bottom: 28px;
}

@media (max-width: 767.98px) {
    .landing-headline { font-size: 2rem; }
    .landing-stats-grid { gap: 28px; }
    .landing-stat-number { font-size: 2rem; }
}

@media (max-width: 991.98px) {
    .sidebar {
        position: fixed; top: 0; left: 0;
        height: 100%; z-index: 1050; max-height: 100vh;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: 4px 0 28px rgba(0,0,0,.22);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay {
        display: block; position: fixed; inset: 0;
        background: rgba(0,0,0,.45); z-index: 1040;
        opacity: 0; pointer-events: none; transition: opacity .25s;
    }
    .sidebar-overlay.active { opacity: 1; pointer-events: auto; }
    .filter-group--wide { grid-column: span 1; }
}

@media (max-width: 767.98px) {
    .term-card { flex-wrap: wrap; gap: 10px; }
    .term-price-col { text-align: left; width: 100%; min-width: 0; }
    .term-actions { order: -1; width: 100%; }
    .detail-hero h1, .company-hero h1 { font-size: 1.25rem; }
}

@media (max-width: 575.98px) {
    .filter-grid { grid-template-columns: 1fr; }
    .filter-group--wide { grid-column: span 1; }
    .filter-search-input { font-size: .9rem; height: 44px; }
    .fcheck { font-size: .875rem; }
    .survey-rating-row { gap: 6px; }
    .survey-star-label { padding: 6px 10px; font-size: .75rem; }
}

/* =====================================================================
   ██  TERMINY GWARANTOWANE - PREMIUM LAYER v3  ██
   Kierunek: "bilet gwarantowany" - data jako bohater, pieczęć zaufania,
   typografia Fraunces × Manrope, atmosfera i choreografia.
   Zmiany globalne są konserwatywne; wszystko specyficzne dla widoku
   /terminy/ jest zakresowane pod .terminy-page.
   ===================================================================== */

:root {
    --font-body:    'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-display: 'Fraunces', 'Playfair Display', Georgia, 'Times New Roman', serif;

    --ink-900: #0A1020;
    --ink-800: #0E1730;
    --ink-700: #172345;

    --brand:     #2B54E4;
    --brand-600: #1E43D6;
    --brand-700: #1B39B8;
    --brand-050: #EEF3FF;
    --brand-100: #DCE7FF;
    --brand-200: #BCD0FF;

    --emerald:     #0E9F6E;
    --emerald-050: #E7F8F1;
    --emerald-100: #C6F0DE;
    --emerald-700: #0A7350;

    --rose:     #E11D48;
    --rose-050: #FFF1F4;
    --rose-100: #FFDDE5;

    --paper:     #EDF1F8;
    --card:      #FFFFFF;
    --line:      #E6EBF3;
    --line-soft: #EEF2F8;

    --ink:   #0D1526;
    --muted: #56657F;
    --faint: #8593AC;

    --ring:          0 0 0 4px rgba(43,84,228,.15);
    --shadow-card:   0 1px 2px rgba(13,21,38,.04), 0 8px 22px -10px rgba(13,21,38,.13);
    --shadow-hover:  0 2px 6px rgba(13,21,38,.05), 0 26px 50px -18px rgba(27,58,182,.30);
    --shadow-soft:   0 1px 2px rgba(13,21,38,.05), 0 4px 14px -6px rgba(13,21,38,.10);
}

/* ---- Globalne, bezpieczne ulepszenia ---- */

body { font-family: var(--font-body); letter-spacing: -.005em; }

::selection { background: rgba(43,84,228,.20); color: var(--ink-900); }

html { scroll-behavior: smooth; }

/* Wordmark w foncie display */
.navbar-brand .brand-text {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -.01em;
    font-size: 1.5rem;
}
.navbar-brand .brand-icon { position: relative; }
.navbar-brand .brand-icon::after {
    content: ''; position: absolute; top: -2px; right: -2px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--emerald); border: 2px solid #0F172A;
}

/* Przyciski - subtelny gradient i głębia (spójne w całym serwisie) */
.btn-primary {
    background: linear-gradient(180deg, #3360EC 0%, var(--brand) 55%, var(--brand-600) 100%) !important;
    border: none !important;
    box-shadow: 0 1px 1px rgba(13,21,38,.12), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover {
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-600) 100%) !important;
    box-shadow: 0 8px 20px -6px rgba(43,84,228,.55) !important;
    transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

/* ==================== PAGE CANVAS ==================== */

.terminy-page {
    background:
        radial-gradient(760px 460px at 6% -8%, rgba(43,84,228,.08), transparent 62%),
        radial-gradient(820px 520px at 104% 4%, rgba(14,159,110,.07), transparent 60%),
        var(--paper);
}
.terminy-page .main-content { position: relative; }

/* ==================== SIDEBAR ==================== */

.terminy-page .sidebar {
    background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFF 100%);
    border-right: 1px solid var(--line);
}
.terminy-page .sidebar-header {
    font-size: .66rem; letter-spacing: .12em; color: var(--faint);
    padding: 16px 16px 12px;
}
.terminy-page .sidebar-header i { color: var(--brand); }

.terminy-page .cat-row {
    border-radius: 0 9px 9px 0;
    margin: 1px 8px 1px 0;
    position: relative;
}
.terminy-page .cat-row:hover { background: var(--brand-050); }
.terminy-page .cat-group-header--toggle:hover { color: var(--brand); background: var(--brand-050); }
.terminy-page .cat-row--selected {
    background: linear-gradient(90deg, var(--brand-050), rgba(238,243,255,0)) !important;
    border-left: 3px solid var(--brand);
    box-shadow: none;
}
.terminy-page .cat-link { color: var(--muted); font-weight: 500; font-size: .82rem; }
.terminy-page .cat-link:hover { color: var(--brand); }
.terminy-page .cat-link.active { color: var(--brand-700); font-weight: 700; }
.terminy-page .cat-all-icon { font-size: .72rem; opacity: .6; margin-right: 2px; }

.terminy-page .cat-count {
    background: var(--line-soft); color: var(--muted);
    font-weight: 700; font-size: .66rem; border-radius: 999px;
    padding: 1px 7px;
}
.terminy-page .cat-row--selected .cat-count,
.terminy-page .cat-link.active + .cat-count {
    background: var(--brand-100); color: var(--brand-700);
}
.terminy-page .cat-toggle { color: var(--faint); }
.terminy-page .cat-toggle:hover { background: var(--brand-100); color: var(--brand-700); }

/* ==================== HERO ==================== */

.tg-hero {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 28px; flex-wrap: wrap;
    padding: 30px 26px 6px;
}
.tg-hero-main { min-width: 0; }
.tg-eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-weight: 700; font-size: .72rem; letter-spacing: .15em;
    text-transform: uppercase; color: var(--brand-700);
}
.tg-eyebrow-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 0 4px var(--emerald-050);
    animation: tgPulse 2.6s ease-in-out infinite;
}
@keyframes tgPulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--emerald-050); }
    50%      { box-shadow: 0 0 0 6px rgba(14,159,110,.10); }
}
.tg-hero-title {
    font-family: var(--font-display);
    font-optical-sizing: auto;
    font-weight: 600; font-size: 2.15rem; line-height: 1.08;
    letter-spacing: -.025em; color: var(--ink-900);
    margin: 13px 0 9px;
}
.tg-hero-title em { font-style: italic; color: var(--brand); }
.tg-hero-sub {
    font-size: .95rem; line-height: 1.55; color: var(--muted);
    max-width: 54ch; margin: 0; font-weight: 500;
}

.tg-hero-stats { display: flex; gap: 11px; flex-shrink: 0; flex-wrap: wrap; padding: 0 16px 4px; }
.tg-stat {
    background: var(--card); border: 1px solid var(--line);
    border-radius: 15px; padding: 13px 20px 11px; text-align: center;
    min-width: 92px; box-shadow: var(--shadow-soft);
}
.tg-stat--accent { background: linear-gradient(180deg, var(--emerald-050), #fff); border-color: var(--emerald-100); }
.tg-stat-num {
    display: block; font-family: var(--font-display); font-optical-sizing: auto;
    font-weight: 600; font-size: 1.75rem; line-height: 1;
    letter-spacing: -.02em; color: var(--ink-900);
}
.tg-stat--accent .tg-stat-num { color: var(--emerald-700); }
.tg-stat-lab {
    display: block; margin-top: 5px;
    font-weight: 700; font-size: .62rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--faint);
}

/* ==================== FILTRY (panel) ==================== */

.terminy-page .filters-panel {
    background: var(--card); border: 1px solid var(--line);
    border-radius: 18px; margin: 16px; padding: 18px 20px 16px;
    box-shadow: var(--shadow-card);
}
.filters-head {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 14px; margin-bottom: 15px;
    border-bottom: 1px solid var(--line-soft);
}
.filters-head-title {
    display: flex; align-items: center; gap: 9px;
    font-weight: 700; font-size: .95rem; color: var(--ink);
    letter-spacing: -.01em;
}
.filters-head-title i { color: var(--brand); }
.reset-btn--head { font-size: .78rem !important; padding: 4px 12px !important; }
/* Zwijanie panelu "Zawez wyniki" (partials/filtry_zwijanie.html): zwiniety panel to
   sam naglowek - bez wyszukiwania, filtrow i przyciskow na dole. */
.filters-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.filters-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem !important; padding: 4px 12px !important; }
.filters-panel--zwiniety .filters-head { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }
.filters-panel--zwiniety .filter-search-row,
.filters-panel--zwiniety .filter-body,
.filters-panel--zwiniety .filter-actions { display: none !important; }
@media (max-width: 576px) {
    .filters-head { flex-wrap: wrap; gap: 10px; }
    .filters-head-title { white-space: nowrap; }
    .filters-head-actions { width: 100%; flex-wrap: nowrap; justify-content: flex-start; }
}

.terminy-page .filter-search-input {
    height: 52px; border-radius: 13px !important;
    background: #FBFCFE; border-color: var(--line) !important;
    font-size: 1rem; font-weight: 500;
}
.terminy-page .filter-search-input:focus {
    background: #fff; border-color: var(--brand) !important;
    box-shadow: var(--ring) !important;
}
.terminy-page .filter-search-icon { color: var(--brand); opacity: .7; }

/* ---- Układ: wyrównane wiersze [etykieta 116px] [kontrolka] ---- */

.terminy-page .filter-body { display: flex; flex-direction: column; }
.terminy-page .filter-row--pair { display: grid; grid-template-columns: 1fr; gap: 0 44px; }

.terminy-page .filter-group {
    display: grid; grid-template-columns: 116px 1fr; align-items: center;
    gap: 4px 16px; padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.terminy-page .filter-group--block { align-items: start; }
.terminy-page .filter-group--block .filter-label { align-self: start; padding-top: 7px; }
.terminy-page .filter-body > .filter-group:last-child { border-bottom: none; }

.terminy-page .filter-label {
    margin: 0; font-size: .72rem; letter-spacing: .05em; color: var(--muted);
    display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px;
}
.terminy-page .filter-label > i:first-child { color: var(--brand); opacity: .85; font-size: .82rem; }
.terminy-page .toggle-all-btn {
    flex-basis: 100%; text-align: left; color: var(--brand);
    font-size: .68rem; text-transform: none; letter-spacing: 0; opacity: .82; margin-top: 1px;
}
.terminy-page .toggle-all-btn:hover { opacity: 1; }

.terminy-page .filter-control { min-width: 0; }

/* Chip = etykieta z własnym checkboxem (Format, Tryb, Promocje, Firma) */
.terminy-page .filter-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.terminy-page .fcheck {
    align-items: center; gap: 7px;
    border: 1px solid var(--line); background: #FBFCFE;
    padding: 7px 13px 7px 10px; border-radius: 999px;
    font-size: .84rem; font-weight: 600; color: var(--muted);
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
/* Dluga nazwa (np. firmy) lamie sie w obrebie panelu filtrow zamiast rozpychac strone
   na telefonie; krotkie etykiety wygladaja jak wczesniej. Kwadracik i ikona sie nie sciskaja. */
.terminy-page .fcheck { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.terminy-page .fcheck > .fcheck-box, .terminy-page .fcheck > i { flex-shrink: 0; }
.terminy-page .fcheck:hover { border-color: var(--brand-200); color: var(--ink); background: #fff; }
.terminy-page .fcheck:has(input:checked) {
    border-color: var(--brand-200); background: var(--brand-050); color: var(--brand-700);
    box-shadow: 0 1px 3px rgba(43,84,228,.12);
}
.terminy-page .fcheck--promo:has(input:checked) {
    border-color: var(--rose-100) !important; background: var(--rose-050) !important; color: var(--rose) !important;
}

/* Rozne kolory zaznaczonych kafelkow per grupa (po name inputu) */
.terminy-page .fcheck:has(input[name="formats"]:checked) {
    border-color: #C4B5FD; background: #F1ECFE; color: #6D28D9;
    box-shadow: 0 1px 3px rgba(109,40,217,.12);
}
.terminy-page .fcheck:has(input[name="formats"]:checked) input:checked + .fcheck-box {
    background: #6D28D9; border-color: #6D28D9;
}
.terminy-page .fcheck:has(input[name="online"]:checked) {
    border-color: #9BE7C7; background: #E7F8F1; color: #0A7350;
    box-shadow: 0 1px 3px rgba(10,159,110,.12);
}
.terminy-page .fcheck:has(input[name="online"]:checked) input:checked + .fcheck-box {
    background: #0A9F6E; border-color: #0A9F6E;
}
.terminy-page .fcheck:has(input[name="companies"]:checked) {
    border-color: #F5C877; background: #FEF4E4; color: #9A5B00;
    box-shadow: 0 1px 3px rgba(217,119,6,.12);
}
.terminy-page .fcheck:has(input[name="companies"]:checked) input:checked + .fcheck-box {
    background: #D97706; border-color: #D97706;
}

/* Własny checkbox (kwadracik) */
.terminy-page .fcheck input {
    position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none;
}
.terminy-page .fcheck-box {
    width: 16px; height: 16px; border-radius: 5px; flex-shrink: 0;
    border: 1.5px solid var(--border-mid); background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, border-color .15s; position: relative;
}
.terminy-page .fcheck-box::after {
    content: '\F26E'; font-family: 'bootstrap-icons';
    font-size: .66rem; color: #fff; opacity: 0; transform: scale(.5);
    transition: opacity .12s, transform .12s;
}
.terminy-page .fcheck input:checked + .fcheck-box { background: var(--brand); border-color: var(--brand); }
.terminy-page .fcheck--promo input:checked + .fcheck-box { background: var(--rose); border-color: var(--rose); }
.terminy-page .fcheck input:checked + .fcheck-box::after { opacity: 1; transform: scale(1); }
.terminy-page .fcheck input:focus-visible + .fcheck-box { box-shadow: var(--ring); }

/* Lista firm - chipy zawijane w boksie (rośnie w wysokość; bez poziomego scrolla) */
.terminy-page .filter-checks--scroll {
    flex-flow: row wrap; align-content: flex-start;
    max-height: none; overflow: visible;
    padding: 10px; gap: 8px;
    border: 1px solid var(--line); border-radius: 12px; background: #FBFCFE;
}

/* Zakresy dat / ceny */
.terminy-page .date-range { gap: 9px; }
.terminy-page .date-range .form-control {
    height: 42px; border-radius: 10px; border-color: var(--line);
    background: #FBFCFE; font-weight: 500; max-width: 158px;
}
.terminy-page .date-range--price .form-control { max-width: 94px; text-align: center; }
.terminy-page .date-range .form-control:focus { background: #fff; border-color: var(--brand); box-shadow: var(--ring); }
.terminy-page .date-sep { color: var(--faint); }
.terminy-page .input-suffix { font-size: .82rem; font-weight: 700; color: var(--faint); }

.terminy-page .filter-actions {
    padding-top: 16px; margin-top: 6px; border-top: 1px solid var(--line-soft); gap: 12px;
    display: flex; align-items: center; flex-wrap: wrap;
}
.terminy-page .filter-actions .btn-primary { padding: 9px 22px; font-weight: 700; border-radius: 10px; }
.terminy-page .results-info { color: var(--muted); margin-left: auto; }
.terminy-page .results-info strong { color: var(--brand-700); }

.reset-btn--active {
    background: #FFF7ED !important; border-color: #FDBA74 !important; color: #C2410C !important;
}

/* Parowanie kompaktowych filtrów na szerokich ekranach */
@media (min-width: 1280px) {
    .terminy-page .filter-row--pair { grid-template-columns: 1fr 1fr; }
    .terminy-page .filter-row--pair .filter-group:nth-child(odd) { position: relative; }
}
/* Wąskie ekrany - etykieta nad kontrolką */
@media (max-width: 640px) {
    .terminy-page .filter-group { grid-template-columns: 1fr; gap: 8px; align-items: start; }
    .terminy-page .filter-label { align-self: start; }
    .terminy-page .filter-group--block .filter-label { padding-top: 0; }
    .terminy-page .toggle-all-btn { flex-basis: auto; margin-left: auto; }
}

/* ==================== KARTY TERMINÓW ==================== */

.terminy-page .results-section { padding: 6px 0 8px; }
.terminy-page .results-list { padding: 4px 0; }

.terminy-page .term-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center; gap: 20px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    margin: 12px 16px;
    padding: 15px 20px 15px 15px;
    position: relative;
    box-shadow: var(--shadow-card);
    transition: transform .30s cubic-bezier(.2,.7,.2,1), box-shadow .30s, border-color .30s;
    animation: tgCardIn .5s both cubic-bezier(.2,.7,.2,1);
    animation-delay: calc(var(--i, 0) * 42ms);
}
@keyframes tgCardIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.terminy-page .term-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-200);
}
.terminy-page .term-card.is-promo { border-left: 3px solid var(--rose); }
.terminy-page .term-card.is-promo:hover { border-color: var(--rose-100); border-left-color: var(--rose); }

/* Perforacja biletu (notch) - środek na linii przerywanej medalionu */
.terminy-page .term-card::before,
.terminy-page .term-card::after {
    content: ''; position: absolute; left: 104px;
    width: 15px; height: 15px; border-radius: 50%;
    background: var(--paper); border: 1px solid var(--line);
    z-index: 2;
}
.terminy-page .term-card::before { top: -8px; }
.terminy-page .term-card::after  { bottom: -8px; }

/* Medalion daty */
.terminy-page .term-date {
    width: 86px; flex-shrink: 0; align-self: stretch;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1px; padding: 12px 6px;
    border-radius: 14px;
    background: linear-gradient(162deg, #F4F7FF 0%, #E4ECFF 100%);
    border: 1px solid var(--brand-100);
    position: relative;
    transition: transform .30s cubic-bezier(.2,.7,.2,1);
}
.terminy-page .term-card:hover .term-date { transform: scale(1.035); }
.terminy-page .term-date::after {
    content: ''; position: absolute; right: -11px; top: 10px; bottom: 10px;
    border-right: 2px dashed var(--line);
}
.terminy-page .term-date-od {
    font-weight: 700; font-size: .58rem; letter-spacing: .12em;
    text-transform: uppercase; color: var(--faint); opacity: .7;
}
.terminy-page .term-date-wday {
    font-weight: 700; font-size: .6rem; letter-spacing: .16em;
    text-transform: uppercase; color: var(--brand); opacity: .85;
}
.terminy-page .term-date-day {
    font-family: var(--font-display); font-optical-sizing: auto;
    font-weight: 600; font-size: 2.3rem; line-height: .92;
    letter-spacing: -.02em; color: var(--ink-800);
}
.terminy-page .term-date-mon {
    font-weight: 800; font-size: .74rem; letter-spacing: .16em;
    text-transform: uppercase; color: var(--brand-700);
}
.terminy-page .term-date-year {
    font-weight: 600; font-size: .64rem; letter-spacing: .08em; color: var(--faint);
}
.terminy-page .term-date-multi {
    margin-top: 4px; font-weight: 700; font-size: .58rem; letter-spacing: .04em;
    color: var(--brand-700); background: rgba(43,84,228,.10);
    padding: 1px 6px; border-radius: 999px; display: inline-flex; align-items: center; gap: 2px;
}
.terminy-page .term-date-mode {
    margin-top: 5px; font-weight: 700; font-size: .58rem; letter-spacing: .04em;
    padding: 2px 6px; border-radius: 999px; display: inline-flex; align-items: center; gap: 2px;
    white-space: nowrap; max-width: 74px; overflow: hidden; text-overflow: ellipsis;
}
.terminy-page .term-date-mode--online {
    color: #065F46; background: #D1FAE5;
}
.terminy-page .term-date-mode--place {
    color: #075985; background: #E0F2FE;
}
.terminy-page .term-card.is-promo .term-date {
    background: linear-gradient(162deg, #FFF4F7 0%, #FFE1E9 100%);
    border-color: var(--rose-100);
}
.terminy-page .term-card.is-promo .term-date-wday,
.terminy-page .term-card.is-promo .term-date-mon { color: #BE123C; }
.terminy-page .term-card.is-promo .term-date-day { color: #9F1239; }
.terminy-page .term-card.is-promo .term-date-multi { color: #BE123C; background: rgba(225,29,72,.10); }

/* Kontener obu dat (start + koniec) */
.terminy-page .term-dates {
    display: flex; align-items: stretch; gap: 8px;
}

/* Medalion daty końcowej - identyczny układ, niebieskie kolory */
.terminy-page .term-date--end {
    background: #2563EB;
    border-color: #2563EB;
}
.terminy-page .term-date--end .term-date-wday,
.terminy-page .term-date--end .term-date-mon { color: #0F172A; opacity: 1; }
.terminy-page .term-date--end .term-date-day { color: #0F172A; }
.terminy-page .term-date--end .term-date-year { color: #0F172A; opacity: .65; }

/* Dla wielodniowych: kreska przerywana tylko za datą końcową */
.terminy-page .term-card.has-end-date .term-date:not(.term-date--end)::after { display: none; }

/* Notch (dziurkacz biletu) przesuniéty dla kart z dwiema datami:
   15px padding + 86px data1 + 8px gap + 86px data2 + 3px = 198px */
.terminy-page .term-card.has-end-date::before,
.terminy-page .term-card.has-end-date::after { left: 198px; }

/* Tbadge daty końcowej - na stronie szczegółów.
   Ta sama miękka plakietka co data startu, tak jak na liście /terminy/
   (tam .tbadge-date i .tbadge-end są identyczne). Wcześniej była to pełna
   plama #2563EB z granatowym tekstem: kontrast poniżej progu czytelności
   i jedyny tak mocny akcent w całym wierszu. Datę końcową odróżnia ikona
   bi-calendar-check i nagłówek kolumny. */
.tbadge-end-date { background: var(--warning-light); color: #92400E; }
.terminy-page .tbadge-end { background: #2563EB; color: #0F172A; }

/* Ciało karty */
.terminy-page .term-body { min-width: 0; }
.terminy-page .term-company {
    display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
    margin-bottom: 8px;
}
.terminy-page .term-ava {
    width: 23px; height: 23px; border-radius: 7px; flex-shrink: 0;
    display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 600; font-size: .78rem; color: #fff;
    background: linear-gradient(140deg,
        hsl(calc(var(--seed, 1) * 47deg) 60% 56%),
        hsl(calc(var(--seed, 1) * 47deg + 34deg) 66% 44%));
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}
.terminy-page .term-ava-img { height: 23px; width: auto; max-width: 66px; object-fit: contain; border-radius: 5px; }
.terminy-page .term-company-link {
    font-weight: 600; font-size: .76rem; color: var(--muted); text-decoration: none;
}
.terminy-page .term-company-link:hover { color: var(--brand); }
.terminy-page .term-guarantee {
    display: inline-flex; align-items: center; gap: 4px;
    font-weight: 700; font-size: .63rem; letter-spacing: .04em; text-transform: uppercase;
    color: var(--emerald-700); background: var(--emerald-050);
    border: 1px solid var(--emerald-100); padding: 2px 9px 2px 7px; border-radius: 999px;
}
.terminy-page .term-guarantee i { font-size: .72rem; }

.terminy-page .term-title {
    font-weight: 700; font-size: 1.04rem; line-height: 1.32;
    letter-spacing: -.015em; margin: 0 0 10px;
}
.terminy-page .term-title a {
    color: var(--ink); text-decoration: none;
    background-image: linear-gradient(var(--brand), var(--brand));
    background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
    transition: background-size .3s cubic-bezier(.2,.7,.2,1), color .2s;
    padding-bottom: 1px;
}
.terminy-page .term-card:hover .term-title a { color: var(--brand-700); }
.terminy-page .term-title a:hover { background-size: 100% 2px; }

.terminy-page .term-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.terminy-page .tbadge {
    font-weight: 600; font-size: .72rem; padding: 4px 10px; border-radius: 8px; gap: 5px;
}
.terminy-page .tbadge-format    { background: #EEEAFE; color: #5B21B6; }
.terminy-page .tbadge-date      { background: #FEF3E2; color: #9A5B00; }
.terminy-page .tbadge-online    { background: var(--emerald-050); color: var(--emerald-700); }
.terminy-page .tbadge-place     { background: #E3F1FD; color: #0B5A9E; }
.terminy-page .tbadge-promo     { background: var(--rose-050); color: var(--rose); }
.terminy-page .tbadge-end       { background: #FEF3E2; color: #9A5B00; }
.terminy-page .tbadge-duration  { background: #EEF1F6; color: #475569; }
.terminy-page .tbadge-noplaces  { background: #FEE2E2; color: #991B1B; font-weight: 600; }
.terminy-page .tbadge-groupsize { background: #E0E7FF; color: #3730A3; }
.terminy-page .tbadge-trainer   { background: #F1F5F9; color: #334155; }

/* Ścieżka kategorii pod tytułem terminu */
.terminy-page .term-cats {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 5px; margin: 4px 0 8px; font-size: .72rem;
}
.terminy-page .term-cat-path {
    display: inline-flex; align-items: center; gap: 3px; color: var(--text-muted);
}
.terminy-page .term-cat-path .bi { font-size: .68rem; opacity: .55; }
.terminy-page .term-cat-link {
    color: var(--text-muted); text-decoration: none;
    transition: color .15s;
}
.terminy-page .term-cat-link:hover { color: var(--brand); text-decoration: underline; }
.terminy-page .term-cat-link--leaf { color: var(--brand-700); font-weight: 600; }
.terminy-page .term-cat-link--group { color: var(--text-muted); font-size: .8em; opacity: .75; }
.terminy-page .term-cat-sep { color: var(--line); }
.terminy-page .term-cat-sep--or { color: var(--text-muted); font-weight: 700; margin: 0 2px; }

/* Prawa kolumna: cena + akcje */
.terminy-page .term-side {
    display: flex; flex-direction: column; align-items: flex-end; justify-content: center;
    gap: 12px; min-width: 156px; flex-shrink: 0;
}
.terminy-page .term-price-col { text-align: right; }
.terminy-page .price-regular,
.terminy-page .price-promo {
    font-weight: 800; font-size: 1.4rem; line-height: 1;
    letter-spacing: -.035em; font-variant-numeric: tabular-nums;
}
.terminy-page .price-regular { color: var(--ink); }
.terminy-page .price-promo   { color: var(--rose); cursor: help; }
.terminy-page .price-promo i { font-size: .78rem; vertical-align: .1em; }
.terminy-page .price-original {
    font-weight: 600; font-size: .78rem; color: var(--faint);
    text-decoration: line-through; display: block; margin-bottom: 1px;
}
.terminy-page .price-label {
    font-weight: 700; font-size: .58rem; letter-spacing: .11em; text-transform: uppercase;
    color: var(--faint); margin-top: 3px;
}
.terminy-page .price-na { font-weight: 600; font-size: .9rem; color: var(--muted); font-style: normal; }

.terminy-page .term-actions { display: flex; gap: 8px; align-items: center; }
.terminy-page .term-actions .enroll-btn {
    order: 2; border-radius: 10px; font-weight: 700; padding: 8px 16px;
}
.terminy-page .term-detail-btn {
    order: 1;
    padding: 8px 16px; border-radius: 10px; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--logo-orange-700); border-color: var(--logo-orange-700);
    color: #fff; font-weight: 600;
    transition: all .18s;
}
.terminy-page .term-detail-btn:hover {
    background: var(--logo-orange-600); border-color: var(--logo-orange-600); color: #fff;
}
.terminy-page .term-actions .btn-outline-success {
    background: #065F46; border-color: #065F46; color: #fff;
}
.terminy-page .term-actions .btn-outline-success:hover {
    background: #04503A; border-color: #04503A; color: #fff;
}

/* ==================== PAGINACJA ==================== */

.terminy-page .pagination-wrap { padding: 22px 12px 8px; }
.terminy-page .pagination .page-link {
    border: 1px solid var(--line); color: var(--muted);
    border-radius: 10px !important; margin: 0 3px; min-width: 38px;
    height: 38px; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; background: #fff;
}
.terminy-page .pagination .page-link:hover {
    background: var(--brand-050); border-color: var(--brand-200); color: var(--brand-700);
}
.terminy-page .pagination .page-item.active .page-link {
    background: var(--brand); border-color: var(--brand); color: #fff;
    box-shadow: 0 6px 14px -5px rgba(43,84,228,.6);
}

/* ==================== EMPTY STATE ==================== */

.terminy-page .empty-state { padding: 72px 24px; }
.terminy-page .empty-state-icon {
    width: 76px; height: 76px; border-radius: 22px; margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(160deg, #fff, var(--brand-050));
    border: 1px solid var(--brand-100); color: var(--brand);
    font-size: 2.1rem; box-shadow: var(--shadow-soft);
}
.terminy-page .empty-state-title {
    font-weight: 700; font-size: 1.05rem; color: var(--ink); margin: 0 0 4px;
}
.terminy-page .empty-state-sub { font-size: .88rem; color: var(--muted); margin: 0 0 18px; }
/* neutralizacja starej reguły .empty-state i dla ikony w przycisku */
.terminy-page .empty-state .btn i {
    font-size: 1em; margin: 0; display: inline-block;
}

/* ==================== RESPONSYWNOŚĆ ==================== */

@media (max-width: 991.98px) {
    .tg-hero-title { font-size: 1.75rem; }
    .tg-hero-stats { width: 100%; }
}

/* Ponizej 1400 px prawa kolumna (cena + 5 przyciskow) zgniatala tytul i plakietki,
   a przy wezszym oknie wychodzila poza karte. Cena zostaje w prawym gornym rogu
   obok tytulu, a przyciski schodza do osobnego wiersza pod trescia i zawijaja
   sie, gdy brakuje miejsca. */
@media (max-width: 1399.98px) {
    .terminy-page .term-card { grid-template-columns: auto minmax(0, 1fr) auto; }
    .terminy-page .term-side { display: contents; }
    .terminy-page .term-price-col {
        grid-column: 3; grid-row: 1; align-self: start; text-align: right; min-width: 0;
        /* Dopiski o dofinansowaniu zawijaja sie, zamiast zgniatac tytul obok. */
        max-width: 230px;
    }
    .terminy-page .term-actions {
        grid-column: 1 / -1; grid-row: 2; min-width: 0;
        display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
        border-top: 1px dashed var(--line); padding-top: 12px;
    }
}

@media (max-width: 767.98px) {
    .terminy-page .term-card {
        grid-template-columns: auto 1fr;
        gap: 14px; padding: 14px;
    }
    .terminy-page .term-card::before,
    .terminy-page .term-card::after { display: none; }
    .terminy-page .term-date::after { display: none; }
    .terminy-page .term-side {
        grid-column: 1 / -1; flex-direction: row;
        align-items: center; justify-content: space-between;
        min-width: 0; border-top: 1px dashed var(--line); padding-top: 12px;
    }
    /* reset kolidujących, starych reguł mobilnych (.term-actions/.term-price-col) */
    .terminy-page .term-price-col { text-align: left; width: auto; min-width: 0; }
    .terminy-page .term-actions   { order: 0; width: auto; }
    /* Uklad z bloku "ponizej 1400 px": cena w prawym gornym rogu, przyciski pod trescia. */
    .terminy-page .term-card      { grid-template-columns: auto minmax(0, 1fr) auto; }
    .terminy-page .term-price-col { text-align: right; }
    .tg-hero { padding: 20px 16px 4px; }
    .tg-hero-title { font-size: 1.5rem; }
    .tg-hero-stats { gap: 8px; }
    .tg-stat { min-width: 0; flex: 1; padding: 10px 12px; }
}

@media (max-width: 575.98px) {
    /* Telefon: obok tytulu nie ma miejsca na cene, wiec schodzi pod tresc nad przyciski. */
    .terminy-page .term-card { grid-template-columns: auto minmax(0, 1fr); }
    .terminy-page .term-price-col {
        grid-column: 1 / -1; grid-row: 2; text-align: left; max-width: none;
        border-top: 1px dashed var(--line); padding-top: 12px;
    }
    .terminy-page .term-price-col .funding-note,
    .terminy-page .term-price-col .price-funded { justify-content: flex-start; text-align: left; }
    /* Przyciski w rownej siatce 2 kolumn zamiast nierownego zawijania;
       "Zapisz sie" jako glowna akcja na cala szerokosc pod spodem. */
    .terminy-page .term-actions {
        grid-row: 3; border-top: 0; padding-top: 0;
        display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    }
    .terminy-page .term-actions > * {
        width: 100%; margin: 0; justify-content: center; text-align: center;
        white-space: nowrap; font-size: .85rem; padding: 8px 10px;
    }
    .terminy-page .term-actions .enroll-btn { grid-column: 1 / -1; }
    .terminy-page .term-date { width: 72px; }
    .terminy-page .term-date--end { width: 72px; }
    .terminy-page .term-date-day { font-size: 1.9rem; }
    .terminy-page .filters-panel { margin: 12px; }
    .terminy-page .term-card { margin: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .terminy-page .term-card,
    .tg-eyebrow-dot { animation: none !important; }
    html { scroll-behavior: auto; }
    .terminy-page .term-card,
    .terminy-page .term-date,
    .terminy-page .term-detail-btn,
    .btn-primary { transition: none !important; }
}

/* ===== BREADCRUMBS kategorii (duze, SEO) ===== */
.terminy-page .tg-breadcrumbs { padding: 24px 34px 2px; }
.terminy-page .tg-breadcrumbs ol {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; align-items: center;
    font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.25;
}
.terminy-page .tg-breadcrumbs li { display: inline-flex; align-items: center; }
.terminy-page .tg-breadcrumbs li:not(:first-child)::before {
    content: "\203A"; margin: 0 12px; color: var(--faint, #94A3B8); font-weight: 600;
}
.terminy-page .tg-breadcrumbs a {
    color: var(--muted, #64748B); text-decoration: none; transition: color .12s;
}
.terminy-page .tg-breadcrumbs a:hover {
    color: var(--brand, #2B54E4); text-decoration: underline; text-underline-offset: 4px;
}
.terminy-page .tg-breadcrumbs [aria-current="page"] span { color: var(--ink, #0F172A); }

@media (max-width: 860px) {
    .terminy-page .tg-breadcrumbs { padding: 16px 18px 2px; }
    .terminy-page .tg-breadcrumbs ol { font-size: 1.12rem; }
    .terminy-page .tg-breadcrumbs li:not(:first-child)::before { margin: 0 8px; }
}

/* ===== Przycisk czyszczenia pola wyszukiwania ===== */
.terminy-page .filter-search-wrap { position: relative; }
.terminy-page .filter-search-input { padding-right: 46px !important; }
.terminy-page .filter-search-clear {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; padding: 0; border: none; background: transparent;
    color: var(--faint, #94A3B8); border-radius: 8px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .8rem; transition: background .12s, color .12s;
}
.terminy-page .filter-search-clear:hover { background: #EEF1F6; color: var(--ink, #0F172A); }
.terminy-page .filter-search-clear[hidden] { display: none; }

/* ==================== STRONA FIRM (/firmy/) ==================== */

.firmy-page {
    background:
        radial-gradient(760px 460px at 6% -8%, rgba(43,84,228,.07), transparent 62%),
        radial-gradient(820px 520px at 104% 4%, rgba(14,159,110,.06), transparent 60%),
        var(--paper, #F7F8FB);
    min-height: calc(100vh - var(--nav-h) - 60px);
}

/* ---- Hero ---- */
.firmy-hero {
    background:
        radial-gradient(900px 380px at 88% -40%, rgba(43,84,228,.55), transparent 60%),
        linear-gradient(135deg, #0F172A 0%, #1B2C50 52%, #23386B 100%);
    color: #fff;
    padding: 40px 20px 46px;
    position: relative;
    overflow: hidden;
}
.firmy-hero::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 40px;
    background: linear-gradient(180deg, transparent, var(--paper, #F7F8FB));
    opacity: .0;
}
.firmy-hero-inner { max-width: 1080px; margin: 0 auto; }
.firmy-hero-title {
    font-family: var(--font-display); font-optical-sizing: auto;
    font-weight: 600; font-size: 2.05rem; letter-spacing: -.025em;
    margin: 0; line-height: 1.1; display: flex; align-items: center; gap: 12px;
}
.firmy-hero-title i { color: #7DA0FF; font-size: 1.7rem; }
.firmy-hero-sub { margin: 8px 0 0; color: rgba(255,255,255,.72); font-size: 1rem; font-weight: 500; }
.firmy-hero-sub strong { color: #fff; font-weight: 700; }

/* ---- Search ---- */
.firmy-search {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch;
    margin-top: 22px; max-width: 620px;
}
.firmy-search-wrap { position: relative; flex: 1 1 260px; min-width: 0; }
.firmy-search-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,.6); font-size: 1rem; pointer-events: none;
}
.firmy-search-input {
    width: 100%; height: 48px; padding: 0 16px 0 44px;
    border-radius: 12px; border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.10); color: #fff; font-size: .95rem; font-weight: 500;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.firmy-search-input::placeholder { color: rgba(255,255,255,.55); }
.firmy-search-input:focus {
    outline: none; background: rgba(255,255,255,.16);
    border-color: rgba(125,160,255,.8); box-shadow: 0 0 0 4px rgba(125,160,255,.18);
}
.firmy-search-btn {
    height: 48px; border-radius: 12px; padding: 0 26px; font-weight: 700;
    border: none; flex-shrink: 0;
}
.firmy-reset-btn {
    height: 48px; border-radius: 12px; padding: 0 20px; flex-shrink: 0;
    display: inline-flex; align-items: center;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff;
}
.firmy-reset-btn:hover { background: rgba(255,255,255,.16); color: #fff; }

/* ---- Grid ---- */
.firmy-grid-wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 44px; }
.firmy-grid {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
}

/* ---- Karta firmy ---- */
.firm-card {
    position: relative;
    background: var(--card, #fff);
    border: 1px solid var(--line, #E6E9F0);
    border-radius: 18px;
    padding: 22px 20px 18px;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    box-shadow: var(--shadow-card, 0 1px 2px rgba(16,24,40,.05), 0 6px 16px -8px rgba(16,24,40,.12));
    transition: transform .28s cubic-bezier(.2,.7,.2,1), box-shadow .28s, border-color .28s;
    animation: firmCardIn .5s both cubic-bezier(.2,.7,.2,1);
    animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes firmCardIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.firm-card:hover {
    transform: translateY(-4px);
    border-color: var(--brand-200, #B9C6F6);
    box-shadow: 0 18px 40px -14px rgba(31,54,133,.28);
}
.firm-card-cover {
    position: absolute; inset: 0; z-index: 1; border-radius: 18px;
}

/* Avatar / monogram */
.firm-card-head { margin-bottom: 14px; }
.firm-ava-wrap {
    width: 76px; height: 76px; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--line-soft, #EEF1F6);
    box-shadow: 0 4px 14px -6px rgba(16,24,40,.18);
    overflow: hidden;
}
.firm-ava-img { max-width: 60px; max-height: 46px; object-fit: contain; }
.firm-ava {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 700; font-size: 2rem; color: #fff;
    letter-spacing: -.02em;
    background: linear-gradient(140deg,
        hsl(calc(var(--seed, 1) * 47deg) 62% 58%),
        hsl(calc(var(--seed, 1) * 47deg + 32deg) 68% 44%));
}

.firm-name {
    font-size: 1rem; font-weight: 700; color: var(--ink, #0F172A);
    letter-spacing: -.01em; line-height: 1.3; margin: 0 0 12px;
    min-height: 2.6em; display: flex; align-items: center; justify-content: center;
}

.firm-desc {
    font-size: .82rem; line-height: 1.5; color: var(--text-sec, #475569);
    margin: 0 0 14px; max-width: 34ch;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
    overflow: hidden; text-overflow: ellipsis;
}

/* Statystyki */
.firm-stats {
    display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-bottom: 16px;
    margin-top: auto;
}
.firm-stat {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: .78rem; font-weight: 700; color: var(--muted, #64748B);
    background: var(--brand-050, #EEF3FF); border: 1px solid var(--brand-100, #DCE6FF);
    padding: 4px 11px; border-radius: 999px;
}
.firm-stat i { color: var(--brand, #2B54E4); font-size: .8rem; }
.firm-stat--terms {
    background: var(--emerald-050, #E9F8F1); border-color: var(--emerald-100, #C6EFDD);
    color: var(--emerald-700, #0A7350);
}
.firm-stat--terms i { color: var(--emerald, #0E9F6E); }

/* CTA */
.firm-cta {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .82rem; font-weight: 700; color: var(--brand-700, #1E3FBF);
}
.firm-cta i { transition: transform .2s; }
.firm-card:hover .firm-cta i { transform: translateX(4px); }

.firmy-pagination { margin-top: 34px; }

@media (max-width: 560px) {
    .firmy-hero { padding: 30px 16px 34px; }
    .firmy-hero-title { font-size: 1.6rem; }
    .firmy-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .firm-card { padding: 18px 14px 14px; border-radius: 15px; }
    .firm-ava-wrap { width: 62px; height: 62px; border-radius: 16px; }
    .firm-name { font-size: .9rem; min-height: 0; margin-bottom: 10px; }
}

/* ===== Formularz zapisu na termin (TGP-119) =====
   Ekran wygladal jak arkusz kalkulacyjny: naglowki kolumn nad pustymi
   kratkami i jeden rytm dla wszystkiego. Teraz kazde pole niesie wlasna
   etykiete, a uczestnik jest wierszem z numerem, nie rekordem w tabeli. */

.signup-page .form-control { border-color: var(--border-mid); }
.signup-page .form-control:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light);
}
.signup-page .form-floating > label { color: var(--text-muted); }

.tbadge-price { background: #EEF1F6; color: #475569; }

.signup-guarantee {
    display: flex; align-items: flex-start; gap: 8px;
    background: var(--success-light); color: #065F46;
    border-radius: var(--radius); padding: 9px 12px;
    font-size: .84rem; font-weight: 500;
}
.signup-guarantee i { margin-top: 2px; }

.signup-errors {
    display: flex; gap: 10px;
    background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B;
    border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px;
    font-size: .9rem;
}
.signup-errors ul { margin: 4px 0 0; padding-left: 18px; }

.signup-hint { font-size: .8rem; color: var(--text-muted); margin: 6px 0 0; }
.signup-notes { height: 110px; }

/* Zgloszenie siebie: dane z konta jako fakt, nie zablokowany input */
.signup-you {
    display: flex; align-items: center; gap: 12px;
    background: var(--bg); border-radius: var(--radius); padding: 12px 14px;
}
.signup-you-note {
    margin-left: auto; font-size: .72rem; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted); white-space: nowrap;
}

/* Lista uczestnikow - karta na osobe zamiast wiersza tabeli */
.participant-list { display: flex; flex-direction: column; gap: 12px; }
.participant-card {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--bg-white); padding: 14px;
    transition: border-color .15s, box-shadow .15s;
}
.participant-card:focus-within {
    border-color: var(--primary-mid); box-shadow: 0 0 0 3px var(--primary-light);
}
.participant-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.participant-title {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    font-weight: 700; color: var(--text-muted);
}
.participant-head .participant-remove { margin-left: auto; }
.participant-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; border-radius: 999px;
    background: var(--primary-light); color: var(--primary);
    font-size: .78rem; font-weight: 700;
}
.participant-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.participant-remove {
    width: 32px; height: 32px; border-radius: 8px;
    border: 1px solid var(--border); background: var(--bg-white);
    color: var(--text-muted); line-height: 1; cursor: pointer;
    transition: color .15s, border-color .15s, background .15s;
}
.participant-remove:hover:not(:disabled) {
    color: #B91C1C; border-color: #FCA5A5; background: #FEF2F2;
}
.participant-remove:disabled { opacity: .35; cursor: not-allowed; }

.btn-add-participant {
    width: 100%; margin-top: 10px; padding: 10px;
    border: 1px dashed var(--border-mid); border-radius: var(--radius);
    background: transparent; color: var(--primary);
    font-weight: 600; font-size: .88rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer; transition: background .15s, border-color .15s;
}
.btn-add-participant:hover:not(:disabled) {
    background: var(--primary-light); border-color: var(--primary-mid);
}
.btn-add-participant:disabled { opacity: .5; cursor: not-allowed; }

/* Zgoda na regulamin i pasek akcji */
.signup-terms {
    display: flex; align-items: flex-start; gap: 10px;
    background: var(--bg); border-radius: var(--radius);
    padding: 12px 14px; margin: 20px 0 18px;
    font-size: .88rem; cursor: pointer;
}
.signup-terms .form-check-input { margin-top: 2px; flex: none; }

.signup-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.signup-actions-note { font-size: .78rem; color: var(--text-muted); margin: 10px 0 0; }

@media (max-width: 575.98px) {
    .participant-fields { grid-template-columns: 1fr; }
    .signup-you { flex-wrap: wrap; }
    .signup-you-note { margin-left: 0; }
}

/* Ekran wejsciowy do zapisu: termin bez miejsc albo juz rozpoczety */
.signup-stop {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; border-radius: 999px;
    background: #FEE2E2; color: #B91C1C; font-size: 1.5rem; line-height: 1;
}

/* --------------------------------------------------
   ULUBIONE FIRMY / OBSERWOWANE SZKOLENIA (TGP-164)
   Domyslnie overlay w rogu karty. Modyfikator .tg-fav-btn--inline
   przelacza na zwykly przycisk w linii tekstu (strony szczegolow, listy w
   panelu uczestnika).
-------------------------------------------------- */
.tg-fav-btn {
    position: absolute; top: 12px; right: 12px; z-index: 2;
    width: 36px; height: 36px; border-radius: 999px; border: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.92); color: #64748B;
    box-shadow: 0 1px 3px rgba(16,24,40,.15);
    font-size: 1rem; cursor: pointer;
    transition: transform .15s ease, color .15s ease, background .15s ease;
}
.tg-fav-btn:hover { transform: scale(1.08); color: var(--promo, #E11D48); }
.tg-fav-btn:disabled { opacity: .6; cursor: wait; }
.tg-fav-btn.is-active { color: var(--promo, #E11D48); }
.tg-fav-btn.tg-watch-btn:hover { color: var(--primary, #2563EB); }
.tg-fav-btn.tg-watch-btn.is-active { color: var(--primary, #2563EB); }

.tg-fav-btn--inline {
    position: static; width: auto; height: auto; padding: 8px 14px;
    border-radius: 10px; background: #F1F5F9; box-shadow: none;
    display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600;
}
.tg-fav-btn--inline::after { content: attr(data-label-off); }
.tg-fav-btn--inline.is-active::after { content: attr(data-label-on); }
.tg-fav-btn--inline:hover { background: #E2E8F0; transform: none; }

/* Ladowanie wynikow listy po filtrze / zmianie strony (skrypt w main.js). */
[data-lista-wynikow] { transition: opacity .15s ease; }
[data-lista-wynikow].tg-ladowanie { opacity: .45; pointer-events: none; }
.tg-ladowanie-info {
    position: fixed; top: calc(var(--nav-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 1035;
    display: inline-flex; align-items: center; white-space: nowrap;
    background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 999px;
    box-shadow: 0 8px 24px -8px rgba(15, 23, 42, .25); padding: 8px 16px; font-size: .88rem; font-weight: 700;
}
.tg-ladowanie-info .spinner-border { color: var(--primary); }
@media (prefers-reduced-motion: reduce) { [data-lista-wynikow] { transition: none; } }

/* Pasek zapisu na stronie szkolenia (telefon). Na komputerze zapis jest w tabeli
   terminow, ktora miesci sie w calosci, wiec pasek jest tylko ponizej 768 px. */
.zapis-pasek { display: none; }
#terminy { scroll-margin-top: calc(var(--nav-h) + 12px); }
@media (max-width: 767.98px) {
    .zapis-pasek {
        display: flex; align-items: center; gap: 12px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
        background: #fff; border-top: 1px solid var(--border);
        box-shadow: 0 -8px 24px -8px rgba(15, 23, 42, .22);
        padding: 10px max(14px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    }
    body:has(.zapis-pasek) { padding-bottom: 104px; }
    .zapis-pasek-info { flex: 1; min-width: 0; line-height: 1.25; }
    .zapis-pasek-gw { font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #15803D; }
    .zapis-pasek-kiedy { font-size: .82rem; font-weight: 700; color: #334155; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .zapis-pasek-cena { font-size: 1rem; font-weight: 800; color: var(--text, #0F172A); }
    .zapis-pasek-cena small { font-size: .7rem; font-weight: 600; color: #64748B; margin-left: 3px; }
    .zapis-pasek-cena s { font-size: .76rem; font-weight: 600; color: #94A3B8; margin-left: 6px; }
    .zapis-pasek-cena--zapytanie { font-size: .86rem; font-style: italic; font-weight: 600; color: #64748B; }
    .zapis-pasek-inne { display: inline-block; font-size: .74rem; font-weight: 700; color: var(--primary); text-decoration: none; padding: 2px 0; }
    .zapis-pasek-btn { flex: none; font-weight: 800; padding: 11px 16px; border-radius: 10px; }
}

/* Ukryte napisy dla czytnikow ekranu (.visually-hidden ma position:absolute) w
   przewijanej tabeli liczyly sie do szerokosci calej strony i na telefonie
   strona robila sie szersza niz ekran. Wzgledem tego kontenera zostaja w nim. */
.table-responsive { position: relative; }

/* "Obserwuj technologie" (lista terminow z kategoria, strony docelowe) to zwykly
   przycisk Bootstrapa, a klase .tg-fav-btn ma tylko dla skryptu przelaczania.
   Bez tego dostawal wyglad kolka 36 px przypietego do prawego gornego rogu
   strony i napis wystawal poza ekran na kazdej szerokosci. */
.btn.tg-fav-btn {
    position: static; width: auto; height: auto;
    border: var(--bs-btn-border-width) solid var(--bs-btn-border-color);
    border-radius: var(--bs-btn-border-radius);
    background: var(--bs-btn-bg); color: var(--bs-btn-color);
    box-shadow: none; font-size: var(--bs-btn-font-size);
}
.btn.tg-fav-btn:hover { transform: none; background: var(--bs-btn-hover-bg); color: var(--bs-btn-hover-color); }
.btn.tg-fav-btn.is-active { background: var(--bs-btn-active-bg); color: var(--bs-btn-active-color); }

/* Przycisk menu (hamburger) i nazwa portalu na waskim ekranie.
   Przycisk mial border-0 i sama cienka ikonke - na granatowym pasku byl prawie niewidoczny.
   Na telefonie (375-420 px) logo z nazwa bylo szersze niz ekran i wypychalo przycisk poza
   ekran, wiec menu nie dalo sie otworzyc. Nazwa moze sie teraz zwezic (i w ostatecznosci
   przyciac wielokropkiem), a przycisk zawsze zostaje widoczny przy prawej krawedzi. */
.navbar-toggler {
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 8px;
    padding: 6px 9px;
    background: rgba(255,255,255,.06);
    flex-shrink: 0;
}
.navbar-toggler:hover { background: rgba(255,255,255,.12); }
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(255,138,0,.45); }
.navbar-brand { min-width: 0; flex-shrink: 1; }
@media (max-width: 1399.98px) {
    /* Logo z nazwa bierze tylko miejsce obok przycisku (bez tego przycisk spadal do drugiej linii). */
    .navbar-brand { flex: 1 1 0; margin-right: 10px; }
}
.navbar-brand .brand-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 575.98px) {
    .navbar { padding: 0 8px; }
    .navbar-toggler { padding: 5px 8px; }
    .navbar-brand { gap: 7px; }
    .navbar-brand .brand-logo { width: 38px; height: 38px; border-radius: 9px; }
    .navbar-brand .brand-text { font-size: .98rem; }
}
@media (max-width: 359.98px) {
    .navbar-brand .brand-text { font-size: .86rem; }
}

/* Linki wewnetrzne do stron technologii (lista SEO, punkt 11) */
.badge-technologia { text-decoration: none; transition: background .12s, color .12s; }
.badge-technologia:hover, .badge-technologia:focus-visible { background: rgba(255,255,255,.22) !important; color: #fff !important; }
.powiazane-strony { margin: 30px 0 6px; padding: 18px 20px; background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.powiazane-tytul { font-size: 1.02rem; font-weight: 800; margin: 0 0 10px; }
.powiazane-strony .d-flex + .powiazane-tytul { margin-top: 18px; }
.powiazane-liczba { color: var(--text-muted); font-weight: 500; }
.btn:hover .powiazane-liczba { color: inherit; }
.powiazane-wszystkie { margin-top: 16px; }
.landing-technologia-nazwa { font-weight: 800; font-size: 1rem; color: var(--text); }
.landing-technologia-liczba { font-size: .78rem; color: var(--text-muted); }
