/* ==================== SHARED COMPONENT STYLES ==================== */
/* Styles used across multiple components */

/* Modern Modals */
.modal-modern .modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.modal-modern .modal-header {
    background-image: var(--gradient-header);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
  padding: 1.5rem;
    border-bottom: none;
}

.modal-modern .modal-title {
    font-weight: 700;
    font-size: 1.25rem;
}

.modal-modern .btn-close {
    filter: brightness(0) invert(1);
}

.modal-modern .modal-body {
    padding: 2rem;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

    .modal-modern .modal-body::-webkit-scrollbar {
        width: 8px;
    }

    .modal-modern .modal-body::-webkit-scrollbar-track {
      background: #f1f1f1;
        border-radius: 10px;
    }

    .modal-modern .modal-body::-webkit-scrollbar-thumb {
 background-image: var(--gradient-primary);
        border-radius: 10px;
    }

        .modal-modern .modal-body::-webkit-scrollbar-thumb:hover {
        background: var(--global-palette1);
        }

.modal-modern .modal-footer {
    padding: 1.5rem 2rem;
 border-top: 1px solid #f0f0f0;
}

.modal-modern.modal-scrollable .modal-dialog {
    max-height: calc(100vh - 3.5rem);
}

.modal-modern.modal-scrollable .modal-content {
    max-height: calc(100vh - 3.5rem);
    display: flex;
 flex-direction: column;
}

.modal-modern.modal-scrollable .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
}

.modal-backdrop-modern {
    background-color: rgba(0, 146, 68, 0.2);
    backdrop-filter: blur(4px);
}

/* Modern Form Controls */
.form-label-modern {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control-modern {
 border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

    .form-control-modern:focus {
      border-color: var(--global-palette1);
        box-shadow: 0 0 0 0.2rem rgba(0, 146, 68, 0.15);
    }

.form-select-modern {
  border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

    .form-select-modern:focus {
        border-color: var(--global-palette1);
        box-shadow: 0 0 0 0.2rem rgba(0, 146, 68, 0.15);
    }

.form-check-modern .form-check-input {
    width: 1.25rem;
height: 1.25rem;
    border: 2px solid #e0e0e0;
    transition: all 0.2s ease;
}

    .form-check-modern .form-check-input:checked {
        background-color: var(--global-palette1);
        border-color: var(--global-palette1);
  }

.form-check-modern .form-check-label {
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Modern Badges */
.badge-modern {
    padding: 0.3rem 0.65rem;
    border-radius: 16px;
    font-weight: 500;
    font-size: 0.75rem;
    white-space: nowrap;
}

.badge-sku {
    background-color: white;
    color: var(--global-palette1);
    border: 2px solid white;
}

.badge-supplier {
    background-color: rgba(255,255,255,0.3);
    color: white;
    border: 1px solid rgba(255,255,255,0.5);
}

.badge-ean {
    background-color: rgba(255,255,255,0.4);
    color: white;
    border: 1px solid rgba(255,255,255,0.6);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.badge-ean-primary {
    background-color: var(--global-palette1);
    color: white;
    font-size: 0.95rem;
    padding: 0.4rem 0.85rem;
    display: inline-flex;
    align-items: center;
 gap: 0.3rem;
}

.badge-ean-additional {
    background-color: #17a2b8;
    color: white;
}

.badge-barcode {
    background-color: #17a2b8;
    color: white;
}

.badge-location {
    background-color: var(--global-palette1);
    color: white;
  font-size: 0.95rem;
 padding: 0.4rem 0.85rem;
}

.badge-additional-location {
    background-color: #17a2b8;
    color: white;
}

.badge-size {
    background-color: #6c757d;
    color: white;
}

.badge-role {
    background-color: #007bff;
    color: white;
}

.badge-warehouse {
    background-color: #28a745;
    color: white;
}

.badge-settings-yes {
    background-color: #17a2b8;
    color: white;
}

.badge-settings-no {
    background-color: #6c757d;
    color: white;
}

/* Modern Alerts */
.alert-modern {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

    .alert-modern.alert-success {
        background-color: #d4edda;
        color: #155724;
    }

    .alert-modern.alert-danger {
  background-color: #f8d7da;
        color: #721c24;
    }

    .alert-modern.alert-warning {
      background-color: #fff3cd;
        color: #856404;
    }

    .alert-modern.alert-info {
        background-color: #d1ecf1;
  color: #0c5460;
    }

/* Modern Buttons */
.btn-modern {
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

    .btn-modern:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

/* ============================================
   ACTION BUTTONS — segmentowana grupa „tinted" (standard domu)
   Grupa = segmenty sklejone w jeden pasek (zaokrąglone tylko końce),
   pojedyncze guziki = miękkie pastelowe tła (zielony/slate/czerwony/...).
   Aliasy .seg-actions/.seg-btn = ta sama estetyka do nowego markupu.
   ============================================ */
.btn-action-group,
.seg-actions {
    display: inline-flex;
    gap: 0;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
    vertical-align: middle;
}

.btn-action,
.seg-btn {
    min-height: 32px;
    padding: 0.42rem 0.7rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transform: none;
    background: #eef1f6;
    color: #475569;
}

    /* w grupie: bez własnego promienia (klipuje kontener) + cienki jasny podział między segmentami */
    .btn-action-group .btn-action,
    .seg-actions .seg-btn {
        border-radius: 0;
        box-shadow: inset -1px 0 0 rgba(255, 255, 255, .85);
    }

        .btn-action-group .btn-action:last-child,
        .seg-actions .seg-btn:last-child {
            box-shadow: none;
        }

    .btn-action:hover,
    .seg-btn:hover {
        transform: none;
        color: #475569;
        background: #e2e6ee;
    }

    .btn-action:focus-visible,
    .seg-btn:focus-visible {
        outline: 2px solid #2563eb;
        outline-offset: -2px;
        z-index: 1;
    }

    .btn-action i,
    .btn-action svg,
    .seg-btn i {
        font-size: 0.95rem;
    }

    .seg-btn svg {
        width: 17px;
        height: 17px;
    }

    .btn-action:disabled,
    .seg-btn:disabled {
        background: #fafbfc;
        color: #c2c8d4;
        cursor: not-allowed;
    }

/* icon-only = kwadratowy segment */
.btn-action.icon-only,
.seg-btn.icon-only {
    width: 40px;
    padding-left: 0;
    padding-right: 0;
}

/* ── Warianty kolorystyczne (miękkie tinty) ── */
/* zielony: zatwierdź / zapisz / dodaj / edycja-główna */
.seg-btn.ok,
.seg-btn.add,
.btn-action-edit,
.btn-action-success {
    background: #e9f7ef;
    color: #15803d;
}

    .seg-btn.ok:hover,
    .seg-btn.add:hover,
    .btn-action-edit:hover,
    .btn-action-success:hover {
        background: #d6f0e0;
        color: #15803d;
        transform: none;
    }

/* czerwony: usuń */
.seg-btn.del,
.btn-action-delete {
    background: #fdeceb;
    color: #b91c1c;
}

    .seg-btn.del:hover,
    .btn-action-delete:hover {
        background: #fbdad7;
        color: #b91c1c;
        transform: none;
    }

/* ── KANON KOLORÓW AKCJI (zatwierdzony 2026-06-26) ──
   edytuj=NIEBIESKI, zapisz/dodaj=zielony, usuń=czerwony, X=slate, drukuj=niebieski, donieś=czerwony.
   Guzik akcji z OŁÓWKIEM = realna edycja → niebieski (nadpisuje zielony .btn-action-edit, który
   w innych miejscach jest „zapisz"/„dodaj" z ptaszkiem/plusem). Wykrywane przez :has(). */
/* edytuj = NIEBIESKI (jawna klasa, bez :has — działa zawsze) */
.seg-btn.edit {
    background: #e8effe;
    color: #1d4ed8;
}

    .seg-btn.edit:hover {
        background: #d7e4fd;
        color: #1d4ed8;
    }

/* auto-detekcja edycji po ołówku (osobna reguła — gdyby :has nie był wspierany, reszta i tak działa) */
.btn-action:has(.bi-pencil),
.btn-action:has(.bi-pencil-square),
.btn-action:has(.bi-pencil-fill) {
    background: #e8effe;
    color: #1d4ed8;
}

    .btn-action:has(.bi-pencil):hover,
    .btn-action:has(.bi-pencil-square):hover,
    .btn-action:has(.bi-pencil-fill):hover {
        background: #d7e4fd;
        color: #1d4ed8;
    }

/* drukarka = FIOLET (własny kolor, różny od edytuj-niebieskiego) */
.btn-action-print,
.seg-btn.print {
    background: #ede9fe;
    color: #6d28d9;
}

    .btn-action-print:hover,
    .seg-btn.print:hover {
        background: #ddd6fe;
        color: #6d28d9;
    }

/* donieś / restock = POMARAŃCZ (własny kolor, różny od usuń-czerwonego) */
.btn-action-restock,
.seg-btn.restock {
    background: #ffedd5;
    color: #c2410c;
}

    .btn-action-restock:hover,
    .seg-btn.restock:hover {
        background: #fed7aa;
        color: #c2410c;
    }

.btn-action-cancel,
.seg-btn.cancel {
    background: #eef1f6;
    color: #475569;
}

    .btn-action-cancel:hover,
    .seg-btn.cancel:hover {
        background: #e2e6ee;
        color: #475569;
    }

[data-theme="dark"] .seg-btn.edit {
    background: rgba(59, 130, 246, .18);
    color: #93c5fd;
}

[data-theme="dark"] .btn-action:has(.bi-pencil),
[data-theme="dark"] .btn-action:has(.bi-pencil-square),
[data-theme="dark"] .btn-action:has(.bi-pencil-fill) {
    background: rgba(59, 130, 246, .18);
    color: #93c5fd;
}

[data-theme="dark"] .btn-action-print,
[data-theme="dark"] .seg-btn.print {
    background: rgba(139, 92, 246, .20);
    color: #c4b5fd;
}

[data-theme="dark"] .btn-action-restock,
[data-theme="dark"] .seg-btn.restock {
    background: rgba(249, 115, 22, .18);
    color: #fdba74;
}

[data-theme="dark"] .btn-action-cancel,
[data-theme="dark"] .seg-btn.cancel {
    background: rgba(148, 163, 184, .18);
    color: #cbd5e1;
}

/* ── KANON IKON (2026-06-26): JEDEN ołówek (line-art z karty-referencji) i JEDEN kosz (wypełniony)
   we WSZYSTKICH guzikach akcji. Podmieniamy glif bootstrap-icons na maskę SVG — bez ruszania markupu.
   Dzięki temu app = referencja (ten sam glif wszędzie). */
:root {
    --ab-ico-pencil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z'/%3E%3C/svg%3E");
    /* Kanon kosza = konturowy Lucide (jak w sekcji kuwet) — JEDNO źródło dla całej aplikacji. */
    --ab-ico-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cline x1='10' y1='11' x2='10' y2='17'/%3E%3Cline x1='14' y1='11' x2='14' y2='17'/%3E%3C/svg%3E");
}

/* skasuj glif fontowy bootstrap-icons w guzikach akcji (ołówek + kosz) */
.act-icon .bi-pencil::before, .act-icon .bi-pencil-square::before, .act-icon .bi-pencil-fill::before,
.btn-action .bi-pencil::before, .btn-action .bi-pencil-square::before, .btn-action .bi-pencil-fill::before,
.seg-btn .bi-pencil::before,
.act-icon .bi-trash::before, .act-icon .bi-trash3::before, .act-icon .bi-trash-fill::before, .act-icon .bi-trash3-fill::before, .act-icon .bi-trash2-fill::before,
.btn-action .bi-trash::before, .btn-action .bi-trash3::before, .btn-action .bi-trash-fill::before, .btn-action .bi-trash3-fill::before,
.seg-btn .bi-trash3-fill::before, .seg-btn .bi-trash3::before {
    content: none;
}

/* wspólny rozmiar/maska dla podmienianych ikon */
.act-icon .bi-pencil, .act-icon .bi-pencil-square, .act-icon .bi-pencil-fill,
.btn-action .bi-pencil, .btn-action .bi-pencil-square, .btn-action .bi-pencil-fill,
.seg-btn .bi-pencil,
.act-icon .bi-trash, .act-icon .bi-trash3, .act-icon .bi-trash-fill, .act-icon .bi-trash3-fill, .act-icon .bi-trash2-fill,
.btn-action .bi-trash, .btn-action .bi-trash3, .btn-action .bi-trash-fill, .btn-action .bi-trash3-fill,
.seg-btn .bi-trash3-fill, .seg-btn .bi-trash3 {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    vertical-align: -2px;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 16px 16px;
    mask-size: 16px 16px;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}

/* OŁÓWEK → line-art (Lucide), jak w karcie-referencji */
.act-icon .bi-pencil, .act-icon .bi-pencil-square, .act-icon .bi-pencil-fill,
.btn-action .bi-pencil, .btn-action .bi-pencil-square, .btn-action .bi-pencil-fill,
.seg-btn .bi-pencil {
    -webkit-mask-image: var(--ab-ico-pencil);
    mask-image: var(--ab-ico-pencil);
}

/* KOSZ → wypełniony (bi-trash3-fill), spójny wszędzie */
.act-icon .bi-trash, .act-icon .bi-trash3, .act-icon .bi-trash-fill, .act-icon .bi-trash3-fill, .act-icon .bi-trash2-fill,
.btn-action .bi-trash, .btn-action .bi-trash3, .btn-action .bi-trash-fill, .btn-action .bi-trash3-fill,
.seg-btn .bi-trash3-fill, .seg-btn .bi-trash3 {
    -webkit-mask-image: var(--ab-ico-trash);
    mask-image: var(--ab-ico-trash);
}

/* Karta produktu: kuwety (.pem-act) + dodatkowe lokalizacje (.al-act) — TEN SAM masked ołówek/kosz co reszta app. */
.pem-act .bi-pencil::before, .al-act .bi-pencil::before,
.pem-act .bi-trash3-fill::before, .al-act .bi-trash3-fill::before {
    content: none;
}
.pem-act .bi-pencil, .al-act .bi-pencil,
.pem-act .bi-trash3-fill, .al-act .bi-trash3-fill {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    vertical-align: -2px;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: 16px 16px;
    mask-size: 16px 16px;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
}
.pem-act .bi-pencil, .al-act .bi-pencil {
    -webkit-mask-image: var(--ab-ico-pencil);
    mask-image: var(--ab-ico-pencil);
}
.pem-act .bi-trash3-fill, .al-act .bi-trash3-fill {
    -webkit-mask-image: var(--ab-ico-trash);
    mask-image: var(--ab-ico-trash);
}

/* niebieski: podgląd / info */
.seg-btn.info,
.btn-action-view {
    background: #e8effe;
    color: #1d4ed8;
}

    .seg-btn.info:hover,
    .btn-action-view:hover {
        background: #d7e4fd;
        color: #1d4ed8;
        transform: none;
    }

/* bursztyn: hasło / ostrzeżenie */
.seg-btn.warn,
.btn-action-password {
    background: #fef3e2;
    color: #b45309;
}

    .seg-btn.warn:hover,
    .btn-action-password:hover {
        background: #fde6c4;
        color: #b45309;
        transform: none;
    }

/* slate: ustawienia / edycja neutralna (jawnie = domyślny) */
.seg-btn.edit,
.btn-action-settings {
    background: #eef1f6;
    color: #475569;
}

    .seg-btn.edit:hover,
    .btn-action-settings:hover {
        background: #e2e6ee;
        color: #475569;
        transform: none;
    }

/* ── Dark mode ── */
[data-theme="dark"] .btn-action-group,
[data-theme="dark"] .seg-actions {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

[data-theme="dark"] .btn-action-group .btn-action,
[data-theme="dark"] .seg-actions .seg-btn {
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .28);
}

    [data-theme="dark"] .btn-action-group .btn-action:last-child,
    [data-theme="dark"] .seg-actions .seg-btn:last-child {
        box-shadow: none;
    }

[data-theme="dark"] .btn-action,
[data-theme="dark"] .seg-btn,
[data-theme="dark"] .seg-btn.edit,
[data-theme="dark"] .btn-action-settings {
    background: rgba(148, 163, 184, .18);
    color: #cbd5e1;
}

    [data-theme="dark"] .btn-action:hover,
    [data-theme="dark"] .seg-btn:hover,
    [data-theme="dark"] .seg-btn.edit:hover,
    [data-theme="dark"] .btn-action-settings:hover {
        background: rgba(148, 163, 184, .28);
        color: #e2e8f0;
    }

[data-theme="dark"] .seg-btn.ok,
[data-theme="dark"] .seg-btn.add,
[data-theme="dark"] .btn-action-edit,
[data-theme="dark"] .btn-action-success {
    background: rgba(34, 197, 94, .16);
    color: #4ade80;
}

    [data-theme="dark"] .seg-btn.ok:hover,
    [data-theme="dark"] .seg-btn.add:hover,
    [data-theme="dark"] .btn-action-edit:hover,
    [data-theme="dark"] .btn-action-success:hover {
        background: rgba(34, 197, 94, .26);
        color: #4ade80;
    }

[data-theme="dark"] .seg-btn.del,
[data-theme="dark"] .btn-action-delete {
    background: rgba(239, 68, 68, .16);
    color: #f87171;
}

    [data-theme="dark"] .seg-btn.del:hover,
    [data-theme="dark"] .btn-action-delete:hover {
        background: rgba(239, 68, 68, .26);
        color: #f87171;
    }

[data-theme="dark"] .seg-btn.info,
[data-theme="dark"] .btn-action-view {
    background: rgba(59, 130, 246, .18);
    color: #93c5fd;
}

    [data-theme="dark"] .seg-btn.info:hover,
    [data-theme="dark"] .btn-action-view:hover {
        background: rgba(59, 130, 246, .28);
        color: #93c5fd;
    }

[data-theme="dark"] .seg-btn.warn,
[data-theme="dark"] .btn-action-password {
    background: rgba(245, 158, 11, .18);
    color: #fbbf24;
}

    [data-theme="dark"] .seg-btn.warn:hover,
    [data-theme="dark"] .btn-action-password:hover {
        background: rgba(245, 158, 11, .28);
        color: #fbbf24;
    }

[data-theme="dark"] .btn-action:disabled,
[data-theme="dark"] .seg-btn:disabled {
    background: rgba(148, 163, 184, .08);
    color: #5b6677;
}

/* Section Styles */
.section-divider {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--global-palette1), transparent);
    margin: 1.5rem 0;
}

.section-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.settings-grid {
    display: grid;
    gap: 1rem;
}

/* ============================================
   BADGE STYLES - Badge components
   ============================================ */
.badge-modern {
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
}

.badge-location {
    background-color: #0d6efd;
    color: white;
}

.badge-additional-location {
    background-color: #6c757d;
    color: white;
}

.badge-ean-primary {
    background-color: #198754;
    color: white;
}

.badge-ean-additional {
    background-color: #0dcaf0;
    color: #000;
}

.badge-size {
    background-color: #fd7e14;
    /* ciemny tekst — biały na pomarańczu miał kontrast ~2.3 (nieczytelny w obu motywach) */
    color: #1f1304;
}

.badge-warning {
    background-color: #ffc107;
    color: #000;
}

.badge-success {
    background-color: #198754;
    color: white;
}

.badge-info {
    background-color: #0dcaf0;
    color: #000;
}

/* ============================================
   TOAST NOTIFICATION STYLES
   ============================================ */
.toast-container {
    /* 10600: ponad modal-overlay (10000) — inaczej toast/alert chowa się pod otwartym modalem. */
    z-index: 10600 !important;
}

.toast {
    min-width: 300px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-header {
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.toast-body {
    white-space: pre-line;
    word-wrap: break-word;
}

.toast-success .toast-header {
    background-color: #198754;
    color: white;
}

.toast-error .toast-header {
    background-color: #dc3545;
    color: white;
}

.toast-warning .toast-header {
    background-color: #ffc107;
    color: #000;
}

.toast-info .toast-header {
    background-color: #0dcaf0;
    color: #000;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}


/* ==================== OPEN/DETAIL BUTTON (lists) ==================== */
/* Piękny przycisk wejścia w szczegóły — używany w listach (PZ, dostawy, ...) */
.btn-open-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.4rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: linear-gradient(135deg, var(--global-palette4) 0%, var(--global-palette5) 100%);
    border: none;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(2, 44, 50, 0.25), 0 1px 2px rgba(0,0,0,0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-open-detail:hover,
.btn-open-detail:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35), 0 2px 4px rgba(0,0,0,0.08);
    filter: brightness(1.05);
    outline: none;
}

.btn-open-detail:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}

.btn-open-detail i {
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.btn-open-detail:hover i {
    transform: translateX(2px);
}

/* Mobile: tylko ikona, bez tekstu */
@media (max-width: 575.98px) {
    .btn-open-detail {
        padding: 0.45rem 0.65rem;
        gap: 0;
    }
    .btn-open-detail > span {
        display: none;
    }
    .btn-open-detail i {
        font-size: 1.05rem;
    }
}

/* Szerokość kolumny "Akcja" w listach z btn-open-detail */
.th-action-open {
    width: 110px;
}
@media (max-width: 575.98px) {
    .th-action-open {
        width: 56px;
    }
}

/* ===== Sticky TOC fix for /admin/settings =====
   <main> has overflow-x:auto which creates a scroll container and breaks
   position:sticky on descendants. Override only when the page contains
   .settings-page so other pages keep horizontal overflow handling.
   !important needed because Blazor CSS isolation scopes main in
   MainLayout.razor.css with equal specificity but loads after this file. */
main:has(.settings-page) {
    overflow-x: visible !important;
    overflow-y: visible !important;
}
.page:has(.settings-page) {
    overflow: visible !important;
}