/* === Globalne fonty i typografia === */

html {
    font-size: 16px;
    font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    position: relative;
    min-height: 100%;
}

@media (max-width: 767.98px) {
    html {
        font-size: 15px;
    }
}

body {
    font-family: inherit;
    font-size: clamp(0.98rem, 0.95rem + 0.2vw, 1.05rem);
    line-height: 1.5;
    font-weight: 300;
    font-style: normal;
    margin: 0;
}

/* Nagłówki */

h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: normal !important;
    font-family: inherit;
    margin-top: 0;
}

/* Linki */

a {
    font-weight: 700;
    font-style: normal;
    text-decoration: none !important;
}

/* Body text */

p {
    font-size: inherit;
    font-weight: 300;
    font-style: normal;
}

/* H1–H4 z clamp, ale bez !important, żeby nie zabijać lokalnych stylów (np. Bootstrap) */

h1 {
    font-size: clamp(1.875rem, 1.6109rem + 0.8451vw, 2.625rem);
    font-style: normal;
    line-height: 1.3;
    text-transform: uppercase;
    font-weight: 900;
}

h2 {
    font-size: clamp(1.5rem, 1.412rem + 0.2817vw, 1.75rem);
    font-style: normal;
    line-height: 1.3;
    text-transform: uppercase;
    font-weight: 900;
}

h3 {
    font-size: clamp(1.25rem, 1.162rem + 0.2817vw, 1.5rem);
    line-height: 1.3;
    font-weight: 900;
    font-style: normal;
}

h4 {
    font-size: clamp(1.125rem, 1.081rem + 0.1408vw, 1.25rem);
    line-height: 1.5;
    font-weight: 900;
    font-style: normal;
}

.breadcrumbs {
       margin: 0px 0 24px;
}

.breadcrumb-link {
    color: #A83F1F;
    font-weight: 700;
}

.breadcrumb-link:hover {
    color: #111;
}

.layout-main {
    width: 95vw;
    max-width: 1296px;
    margin: auto;
}

/* Uniwersalny layout dla H1 na podstronach użytkownika */
.page-h1 {
    text-align: center;
    margin: 28px 0 20px; /* odstęp od H1 do HR */
}


div.CstCategories.category {
    width: 100%;
}

div.CstCategories.category h3 {
    text-align: center;
    margin-bottom: 3%;
    font-weight: 400 !important;
    font-size: 2vw;
}

div.CstCategories.category.grid {
    max-width: 100%;
}

div.CstNew h3 {
    text-align: center;
    margin-bottom: 3%;
    font-weight: 200 !important;
    font-size: 1.5vw;
}

.category.grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, 32%);
    grid-template-rows: repeat(2, 40%);
    grid-gap: 5vw 2%;
}

.category.grid a {
    text-align: center;
    text-decoration: none !important;
    font-weight: 200 !important;
    color: #000;
    font-size: 1.2vw;
    padding-top: 3%;
}

.grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(5, 19%);
    grid-gap: 5vw 1.25%;
}

.grid-item {
    border: none;
    padding: 0;
    transition: opacity 0.5s;
}

div.grid-item {
    text-decoration: none !important;
    font-weight: 200 !important;
    color: #000;
    font-size: 1vw;
    padding-top: 3%;
}

div.CstNew h3,
div.CstPromoted h3,
div.CstSeen h3 {
    text-align: center;
    margin-bottom: 3%;
    font-weight: 400 !important;
    font-size: 2vw;
}

div.CstNew,
div.CstPromoted,
div.CstSeen {
    margin-bottom: 3%;
}

.Price {
    color: #A83F1F;
    font-size: 0.8vw;
    display: inline-block;
    font-weight: 500 !important;
}

.oldPrice {
    text-decoration: line-through !important;
    font-size: 0.8vw !important;
    display: inline-block !important;
    color: #000 !important;
}

.grid-item a {
    text-decoration: none !important;
}

.grid-item img {
    border-radius: 10px !important;
    margin-bottom: 3%;
}

.grid-item:hover {
    opacity: 70%;
    transition: opacity 0.5s;
}

img {
    width: 100%;
}

/* === BUTTONY – poprawione rozmiary, responsywne === */

.btn-orange,
.btn-orange-2 {
    background-color: #A83F1F;
    color: #fff;
    font-weight: 100;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    padding: clamp(0.55rem, 0.45rem + 0.3vw, 0.7rem)
        clamp(1.3rem, 1.1rem + 0.5vw, 2rem);
    border: none;
    border-radius: 10px;
    transition: background-color 0.5s;
}

.btn-orange:hover {
    background-color: #f2f2f2;
    color: #A83F1F;
}

.btn-orange-2:hover {
    background-color: #000;
    color: #fff;
}

/* =============================
   NOWY PRZYCISK: btn-danger-modern
   (styl identyczny do btn-orange)
   ============================= */

.btn-danger-modern {
    background-color: #c81212;
    color: #fff;
    font-weight: 100;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    padding: clamp(0.55rem, 0.45rem + 0.3vw, 0.7rem)
        clamp(1.3rem, 1.1rem + 0.5vw, 2rem);
    border: none;
    border-radius: 10px;
    transition: background-color 0.5s;
}

.btn-danger-modern:hover {
    background-color: #b91c1c; /* ciemniejszy czerwony */
}

.btn-danger-modern:active {
    background-color: #991b1b; /* jeszcze ciemniejszy */
    transform: scale(0.97);
}

.btn-danger-modern:focus {
    outline: none;
}

.btn-white {
    background-color: #fff;
    color: #A83F1F;
    font-weight: 100;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    padding: clamp(0.55rem, 0.45rem + 0.3vw, 0.7rem)
        clamp(1.3rem, 1.1rem + 0.5vw, 2rem);
    border: none;
    border-radius: 10px;
    transition: background-color 0.5s;
}

.btn-white:hover {
    background-color: #000;
    color: #fff;
}

.btn-black,
.register-btn-black {
    background-color: #000;
    color: #fff;
    font-weight: 100;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    padding: clamp(0.55rem, 0.45rem + 0.3vw, 0.7rem)
        clamp(1.3rem, 1.1rem + 0.5vw, 2rem);
    border: none;
    border-radius: 10px;
    transition: background-color 0.5s;
}

.btn-black:hover,
.register-btn-black:hover {
    background-color: #A83F1F;
    color: #fff;
}

.register-btn-black {
    width: 100%;
}

.colorLabel {
    color: #A83F1F;
    font-weight: 700;
}

#MainBannerCarousel {
    .carousl,
    .carousel-innr,
    .carousel-inner > .carousel-item {
        overflow: hidden;
    }

    .carousel-inner > .carousel-item.active,
    .carousel-inner > .carousel-item-next {
        display: flex;
        flex-wrap: nowrap;
    }

    .carousel-inner:before {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 72%;
        left: 0;
        content: "";
        display: block;
        background-color: #fff;
        z-index: 2;
    }

    .carousel-inner:after {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        left: 72%;
        content: "";
        display: block;
        background-color: #fff;
        z-index: 2;
    }

    .carousel-control-prev {
        z-index: 2000;
        left: 22%;
    }

    .carousel-control-next {
        z-index: 2000;
        right: 22%;
    }



    @media (max-width: 767px) {
        .carousel-inner .carousel-item > div {
            display: none;
        }

        .carousel-inner .carousel-item > div:first-child {
            display: block;
        }
    }

    .carousel-inner .carousel-item.active,
    .carousel-inner .carousel-item-next,
    .carousel-inner .carousel-item-prev {
        display: flex;
    }

    @media (min-width: 768px) {
        .carousel-inner .carousel-item-end.active,
        .carousel-inner .carousel-item-next {
            transform: translateX(25%);
        }

        .carousel-inner .carousel-item-start.active,
        .carousel-inner .carousel-item-prev {
            transform: translateX(-25%);
        }
    }

    .carousel-inner .carousel-item-end,
    .carousel-inner .carousel-item-start {
        transform: translateX(0);
    }
}

.promo-text {
    margin: 1vw 0;
}

.PromoTextHeader {
    font-weight: 400;
    font-size: 2vw;
    margin-bottom: 2%;
}

.PromoTextValue {
    font-weight: 200;
    font-size: 1vw;
    line-height: 1.5em;
    margin-bottom: 5%;
}



.version {
    display: none;
}

.dropdown-menu {
    max-height: 280px;
    overflow-y: auto;
}

#carouselExampleControls,
#CstNew,
#CstPromoted,
#CstSeen,
#PromotedCategories {
    .carousel-inner {
        padding: 0;
    }

    .card {
        margin: 0 0.5em;
        box-shadow: 0px 8px 24px -22px rgba(66, 68, 90, 0);
        transition: box-shadow 0.2s;
        border: none;
        border-radius: 16px;
    }

    .card:hover {
        background-color: #f2f2f2;
        box-shadow: 0px 8px 24px -22px rgba(66, 68, 90, 1);
        transition: box-shadow, background-color 0.2s;

    }

    h5.card-title {
        color: #000;
        font-size: 0.8vw;
        font-weight: 400;
        text-align: center;
    }

    .carousel-control-prev,
    .carousel-control-next {
        background-color: #A83F20;
        width: 3vh;
        height: 3vh;
        border-radius: 50%;
        padding: 5px;
        top: 50%;
        transform: translateY(-50%);
    }

    @media (min-width: 768px) {
        .carousel-item {
            margin-right: 0;
            flex: 0 0 17%;
            display: block;
        }

        .carousel-inner {
            display: flex;
        }
    }

    .card .img-wrapper {
        max-width: 100%;
        height: 13em;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .card img {
        max-height: 100%;
        max-width: 202px;
        margin: auto;
    }

    @media (max-width: 767px) {
        .card .img-wrapper {
            height: 17em;
        }
    }
}

.checked {
    color: orange;
}

/* Wspólna wysokość tytułów */
#carouselExampleControls h5.card-title,
#CstNew h5.card-title,
#CstPromoted h5.card-title,
#CstSeen h5.card-title,
#PromotedCategories h5.card-title {
    min-height: 38px;       /* ok. 2 linie */
    max-height: 48px;
    display: flex;          /* FLEX zamiast webkit-box */
    justify-content: center;/* horyzontalnie */
    align-items: center;    /* PIONOWO! */
    text-align: center;
    padding: 0 6px;
}

/* Sam tekst tytułu ze skróceniem */
#carouselExampleControls h5.card-title span,
#CstNew h5.card-title span,
#CstPromoted h5.card-title span,
#CstSeen h5.card-title span,
#PromotedCategories h5.card-title span {
    display: -webkit-box;
    -webkit-line-clamp: 2;         /* 2 linie */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* === SprzedajInstrument: Ujednolicenie AddOrEdit === */

form#AddOrEdit input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
form#AddOrEdit select,
form#AddOrEdit textarea {
    background-color: #f2f2f2 !important;
    box-shadow: inset 0 0 0 1000px #f2f2f2 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 14px 16px !important;
    font-size: 16px !important;
    color: #111 !important;
    outline: none !important;
    width: 100%;
}

form#AddOrEdit input#Title {
    padding: 18px 22px !important;
    font-size: 18px !important;
}

form#AddOrEdit input::placeholder,
form#AddOrEdit textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

form#AddOrEdit input:focus,
form#AddOrEdit select:focus,
form#AddOrEdit textarea:focus {
    box-shadow:
        inset 0 0 0 1000px #f2f2f2,
        0 0 0 3px rgba(168, 63, 31, 0.12) !important;
    border-color: #A83F1F !important;
}

form#AddOrEdit input:-webkit-autofill,
form#AddOrEdit input:-webkit-autofill:focus {
    -webkit-text-fill-color: #111 !important;
    caret-color: #111 !important;
    -webkit-box-shadow: 0 0 0 1000px #f2f2f2 inset !important;
    box-shadow: inset 0 0 0 1000px #f2f2f2 !important;
}

form#AddOrEdit .bi.bi-image.fs-2 {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 72px !important;
    height: 72px !important;
    font-size: 32px !important;
    border-radius: 14px !important;
    background: #f2f2f2 !important;
    border: 1px dashed #e5e7eb !important;
    color: #A83F1F !important;
    cursor: pointer;
    margin: 6px 0 12px !important;
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background-color 0.2s,
        transform 0.05s;
}

form#AddOrEdit .bi.bi-image.fs-2:hover {
    border-color: #A83F1F !important;
    box-shadow: 0 8px 24px -18px rgba(17, 24, 39, 0.25);
    transform: translateY(-1px);
}

form#AddOrEdit .btn-orange {
    border: 1px solid #A83F1F !important;
}

form#AddOrEdit .btn-orange:hover {
    border-color: #A83F1F !important;
}

#AddOrEdit hr {
    width: 70% !important;
    margin: 12px auto !important;
    border: none !important;
    border-top: 2px solid #f2f2f2 !important;
    background-color: transparent !important;
    opacity: 1 !important;
}


/* PARAMETRY */

#AddOrEdit #CategoriesParameters {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 12px 24px;
}

#AddOrEdit #CategoriesParameters label {
    display: block !important;
    margin-bottom: 6px !important;
    font-weight: 500 !important;
}

#AddOrEdit #CategoriesParameters select,
#AddOrEdit #CategoriesParameters input,
#AddOrEdit #CategoriesParameters textarea {
    width: 100% !important;
    background-color: #f2f2f2 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    padding: 14px 16px !important;
    font-size: 16px !important;
    color: #111 !important;
    box-shadow: inset 0 0 0 1000px #f2f2f2 !important;
    outline: none !important;
}

#AddOrEdit #CategoriesParameters select:focus,
#AddOrEdit #CategoriesParameters input:focus,
#AddOrEdit #CategoriesParameters textarea:focus {
    box-shadow:
        inset 0 0 0 1000px #f2f2f2,
        0 0 0 3px rgba(168, 63, 31, 0.12) !important;
    border-color: #A83F1F !important;
    background-color: #f2f2f2 !important;
}

/* GALERIA */

.gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 16px;
}

.image-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
    background: #f2f2f2;
    overflow: hidden;
    cursor: grab;
    transition:
        border-color 0.2s,
        box-shadow 0.2s,
        background-color 0.2s;
}

.image-box:hover {
    border-color: #A83F1F;
    box-shadow: 0 8px 24px -18px rgba(17, 24, 39, 0.25);
    background: #fff;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #A83F1F;
    color: #fff;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    font-weight: 700;
}

/* LICZNIKI ZNAKÓW */

#AddOrEdit #charCountTitle,
#AddOrEdit #charCountDescription {
    display: block !important;
    text-align: right !important;
    font-size: 12px !important;
    color: #6b7280 !important;
    margin-top: 6px !important;
}

/* LOKALIZACJA */

#AddOrEdit .loc-input-wrap {
    position: relative;
}

#AddOrEdit .loc-input-wrap input {
    padding-right: 44px !important;
}

#AddOrEdit .geo-btn {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    user-select: none;
    z-index: 2;
}

#AddOrEdit .geo-btn svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: #A83F1F;
}

/* DO NEGOCJACJI */

#AddOrEdit .price-input-wrap {
    margin-bottom: 6px;
}

#AddOrEdit .neg-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 6px;
    text-align: right;
}

#AddOrEdit .neg-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    color: #444;
    white-space: nowrap;
}

/* ===============================
   CHECKBOX – DO NEGOCJACJI (FIX)
   =============================== */

#AddOrEdit .neg-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

#AddOrEdit .neg-text {
    line-height: 1;
}

/* CUSTOM CHECKBOX */
.si-check {
    appearance: none;
    -webkit-appearance: none;
    position: relative;

    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;

    border-radius: 50%;
    border: 2px solid #d1d5db; /* szare kółko */
    background: #fff;

    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;

    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
}

/* KROPKA W ŚRODKU – STAN ZAZNACZONY */
.si-check::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #A83F1F;
    transform: scale(0);
    transition: transform 0.15s ease;
}

/* CHECKED */
.si-check:checked {
    border-color: #A83F1F;
}

.si-check:checked::after {
    transform: scale(1);
}

/* ===============================
   FINAL FIX – SI-CHECK + BOOTSTRAP
   =============================== */

/* 1. usuń bootstrapowy SVG checkbox */
.form-check-input.si-check {
    background-image: none !important;
    margin-left: 0;
    background-color: #fff;
    box-shadow: none;
    border-radius: 100px;
}

/* 2. checked – zero bootstrapa */
.form-check-input.si-check:checked {
    background-color: #fff;
    box-shadow: none;
}

/* 3. focus tylko na checkbox */
.form-check-input.si-check:focus {
    box-shadow: 0 0 0 2px rgba(168, 63, 31, 0.15);
}

/* 4. usuń highlight linii */
.form-check.si-check-row:focus-within {
    background: transparent;
}

.form-check.si-check-row label::selection {
    background: transparent;
}

.form-check.si-check-row {
    -webkit-tap-highlight-color: transparent;
    padding-left: 0;
}

.form-check-label {
    padding-left: 5px;
    padding-top: 3px;
}

/* FOCUS – dostępność */
.si-check:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.25);
}

/* Galeria zdjęć w formularzu ogłoszenia */
#AddOrEdit .gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0;
}

/* Kafelek obrazu – bazowo ok. 280 x 235, responsywny */
#AddOrEdit .image-box {
    position: relative;
    flex: 0 1 calc(25% - 16px);     /* ~3 w rzędzie na dużych ekranach */
    max-width: 280px;                   /* docelowa szerokość */
    aspect-ratio: 280 / 235;            /* docelowe proporcje */
    border-radius: 14px;
    overflow: hidden;
    background: var(--si-surface-2, #f3f4f6);
    box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.35);
    cursor: grab;
    transition: transform 0.15s ease;
}

#AddOrEdit .image-box:hover {
    transform: translateY(-2px);
}

/* Obrazek w kafelku */
#AddOrEdit .image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tablet: 2 w rzędzie */
@media (max-width: 992px) {
    #AddOrEdit .image-box {
        flex: 0 1 calc(50% - 16px);
        max-width: 280px;
    }
}

/* Telefon: 1 w rzędzie, pełna szerokość */
@media (max-width: 576px) {
    #AddOrEdit .image-box {
        flex: 0 1 100%;
        max-width: 100%;
    }
}

/* Overlay – bez zmian */
#AddOrEdit .main-label,
#AddOrEdit .set-main-btn,
#AddOrEdit .set-del-btn {
    position: absolute;
    left: 10px;
    right: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    color: #ffffff;
    user-select: none;
}

/* Zdjęcie główne */
#AddOrEdit .main-label {
    top: 10px;
    background: var(--si-accent, #A83F1F);
    font-weight: 600;
}

/* Ustaw jako główne */
#AddOrEdit .set-main-btn {
    top: 10px;
    background: rgba(0, 0, 0, .7);
    cursor: pointer;
}
#AddOrEdit .set-main-btn:hover {
    background: rgba(0, 0, 0, .85);
}

/* Usuń zdjęcie */
#AddOrEdit .set-del-btn {
    background: rgba(0, 0, 0, .7);
    cursor: pointer;
    /* UWAGA: bottom ustawia JS, więc tutaj go nie nadpisuję */
}
#AddOrEdit .set-del-btn:hover {
    background: rgba(185, 28, 28, .95);
}

/* =========================
   MODAL – DRZEWO KATEGORII
   ========================= */

#categoryTree {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px;
}

/* reset list */
#categoryTree ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* pojedynczy node */
.tree-node {
    margin: 4px 0;
}

/* przyciski kategorii */
.tree-node > button {
    width: 100%;
    text-align: left;
    background: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #111;
}

/* hover */
.tree-node > button:hover {
    background: #f7f7f7;
}

/* AKTYWNA / WYBRANA */
.tree-node > button.active {
    background: #A83F1F;
    border-color: #A83F1F;
    color: #fff;
    font-weight: 600;
}

/* children – zagnieżdżenie */
.tree-node .children {
    margin-left: 16px;
    margin-top: 6px;
    padding-left: 8px;
    border-left: 2px solid #e5e7eb;
}

/* gdy gałąź otwarta */
.tree-node .children.open {
    border-left-color: #A83F1F;
}

/* span (niedostępne kategorie) */
.tree-node > span {
    display: block;
    padding: 8px 14px;
    color: #9ca3af;
    font-size: 0.9rem;
}

 .tree-node > button.active-node {
        background: #ffe6d8;
        color: #a83f20;
        font-weight: 600;
    }

/* ======================= DODANE: GLOBALNY TYTUŁ UŻYTKOWNIKA ======================= */

.Users-title {
    text-align: center;
    margin: 28px 0 10px;
    padding-bottom: 2%;
}

/* ======================= WYŁĄCZNIE STRONA OGŁOSZEŃ (USER + MODERATOR) ======================= */

.offers-page > hr,
#ConversationsTitle + hr {
    width: 70%;
    margin: 12px auto 10px;
    border: none;
    border-top: 2px solid #f2f2f2;
    background-color: transparent;
    opacity: 1;
}

/* Pasek filtrów – 25% / 50% / 25% + responsywność */

.offers-page .offers-head {
    display: grid !important;
    grid-template-columns: 1fr 2fr 1fr !important;
    grid-template-rows: auto auto !important;
    justify-content: center !important;
    align-items: end !important;
    column-gap: 8px !important;
    row-gap: 4px !important;
    margin: 8px 0 14px !important;
}

.offers-page .status-label {
    grid-column: 1/2 !important;
    grid-row: 1 !important;
    font-size: 0.85rem !important;
    color: #6b6b6b !important;
    font-weight: 400 !important;
}

.offers-page .status-cell {
    grid-column: 1/2 !important;
    grid-row: 2 !important;
}

.offers-page .search-cell {
    grid-column: 2/3 !important;
    grid-row: 2 !important;
}

.offers-page .sort-cell {
    grid-column: 3/4 !important;
    grid-row: 2 !important;
}

/* Pola kontrolne – szare tło jak w AddOrEdit + TA SAMA wysokość dla inputu i selectów */

.offers-page .control {
    background: #f2f2f2;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 1rem;
    color: #111;
    outline: none;
    width: 100%;
    height: 52px;
    min-height: 52px;
    line-height: 1.2;
}

.offers-page .control:focus {
    box-shadow:
        inset 0 0 0 1000px #f2f2f2,
        0 0 0 3px rgba(168, 63, 31, 0.12);
    border-color: #A83F1F;
}

/* select w pasku filtrów */

.offers-page .select-wrap {
    position: relative;
}

.offers-page .si-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 52px 12px 16px;
    font-size: 1rem;
    color: #111;
    line-height: 1.2;
    width: 100%;
    height: 52px;
    min-height: 52px;
}

.offers-page .select-wrap::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    opacity: 0.65;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2388898f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-size: 18px 18px;
}

/* ikonka lupki w polu szukaj */

.offers-page .search-wrap {
    position: relative;
}

.offers-page .search-wrap .icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    opacity: 0.55;
    pointer-events: none;
}

/* Lista ogłoszeń */

.offers-page #items {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.offers-page .offer-card {
    border: 1px solid #e6e6e6;
    border-radius: 18px;
    padding: 20px;
    background: #fff;
}

/* layout wiersza oferty */

.offers-page .offer-row {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 24px;
    align-items: stretch;
}

.offers-page .item-thumb {
    width: 100%;
    max-width: 260px;
}

.offers-page .item-thumb img {
    width: 100%;
    height: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.offers-page .item-right {
    min-width: 0;
}

/* siatka wewnątrz prawej kolumny */

.offers-page .item-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto 1fr auto;
    column-gap: 16px;
    row-gap: 6px;
    min-height: 140px;
}

/* Tytuł – responsywne ~22px na desktopie */

.offers-page .item-title h5 {
    margin: 0;
    font-size: clamp(1.1rem, 0.9rem + 0.5vw, 1.375rem);
    font-weight: 800;
    line-height: 1.2;
    color: #111;
}

/* Akcje + meta + cena */

.offers-page .item-actions {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    margin: 4px 0 2px;
}

.offers-page .item-actions a,
.offers-page .item-actions input[type="submit"] {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #111;
    font-weight: 700;
    font-size: 1rem;
}

.offers-page .item-actions input[type="submit"] {
    text-decoration: underline;
}

.offers-page .item-meta {
    grid-column: 1;
    grid-row: 4;
    color: #6b6b6b;
    font-size: 0.95rem;
    align-self: end;
}

/* Link do sprzedawcy na karcie oferty */
.item-meta a {
    color: #A83F1F;
    font-weight: 700;
    text-decoration: none;
}

.item-meta a:hover {
    text-decoration: underline;
}

.offers-page .price {
    grid-column: 2;
    grid-row: 4;
    font-weight: 800;
    font-size: clamp(1.4rem, 1.1rem + 0.8vw, 2.1rem);
    color: #A83F1F;
    white-space: nowrap;
    align-self: end;
    justify-self: end;
}

/* Paginacja */

.offers-page .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 6px;
    flex-wrap: wrap;
}

.offers-page #page-counter {
    color: #6b6b6b;
}

.offers-page #pagination button,
.offers-page #pagination input[type="button"] {
    border: 1px solid #e6e6e6;
    background: #f5f5f5;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
}

.offers-page #pagination .active {
    background: #222;
    color: #fff;
    font-weight: 700;
}

.offers-page #prev-page[disabled],
.offers-page #next-page[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.offers-page .page-counter-below {
    width: 100%;
    text-align: center;
    color: #6b6b6b;
    margin-top: 6px;
}

/* Stary przycisk z oryginału chowamy tutaj */

.offers-page input[onclick="redirectcstURL()"] {
    display: none;
}

/* BREAKPOINTY DLA PASKA FILTRÓW I KARTY OGŁOSZENIA */

/* tablet poziomy */

@media (max-width: 900px) {
    .offers-page .offers-head {
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto auto !important;
    }

    .offers-page .status-label {
        grid-column: 1/3 !important;
        grid-row: 1 !important;
    }

    .offers-page .status-cell {
        grid-column: 1/3 !important;
        grid-row: 2 !important;
    }

    .offers-page .search-cell {
        grid-column: 1/2 !important;
        grid-row: 3 !important;
    }

    .offers-page .sort-cell {
        grid-column: 2/3 !important;
        grid-row: 3 !important;
    }
}

/* mobile – pasek filtrów pod sobą, a karta: obraz -> tytuł -> akcje -> meta/cena */

@media (max-width: 640px) {
    .offers-page .offers-head {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto auto auto !important;
    }

    .offers-page .status-label {
        grid-column: 1/2 !important;
        grid-row: 1 !important;
    }

    .offers-page .status-cell {
        grid-column: 1/2 !important;
        grid-row: 2 !important;
    }

    .offers-page .search-cell {
        grid-column: 1/2 !important;
        grid-row: 3 !important;
    }

    .offers-page .sort-cell {
        grid-column: 1/2 !important;
        grid-row: 4 !important;
    }

    .offers-page .offer-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 12px;
    }

    .offers-page .item-thumb {
        max-width: 100%;
    }

    .offers-page .item-thumb img {
        width: 100%;
        height: auto;
        max-height: none;
        border-radius: 16px;
    }

    .offers-page .item-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 12px;
        row-gap: 6px;
    }

    .offers-page .item-title {
        grid-column: 1/3;
        grid-row: 1;
    }

    .offers-page .item-actions {
        grid-column: 1/3;
        grid-row: 2;
    }

    .offers-page .item-meta {
        grid-column: 1/2;
        grid-row: 3;
    }

    .offers-page .price {
        grid-column: 2/3;
        grid-row: 3;
        justify-self: end;
        align-self: end;
    }
}
/* =========================================
   CATEGORY & SEARCH – kontenery, baner, header
   ========================================= */

#CategoryPage,
#SearchPage {
    max-width: 1296px;
    margin: 0 auto;
}

/* Nagłówek nad kategorią / wyszukiwaniem */
.category-header {
    max-width: 1296px;
    margin: 16px auto 4px;
    padding: 0 12px;
}

.category-header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-description {
    margin: 4px 0 0;
    max-width: 720px;
    text-align: center;
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
    color: #6b7280;
}

/* Subkategorie (tylko na Category, ale styl wspólny) */
.category-subcategories {
    max-width: 1296px;
    margin: 8px auto 12px;
}

/* Banner promowania – na samej górze pod nawigacją */
.category-banner-promo {
    max-width: 1296px;
    margin: 8px auto 12px;
}

/* === Wyszukiwarka kategorii – kompaktowe filtry (2 rzędy) === */

.category-search-bar {
    margin-top: 24px;
    margin-bottom: 16px;
    padding: 0;
}

/* Karta filtrów - biała, border + cień */
.category-search-bar #mainForm {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    padding: 16px 18px 12px;
    box-shadow: 0 18px 45px -28px rgba(15, 23, 42, 0.25);
    margin-bottom: 2%;
}

/* Nagłówek sekcji wyszukiwarki */
.category-search-bar h2 {
    font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.6rem);
    font-weight: 700;
    margin-bottom: 12px;
}

/* Etykiety i pola */
.category-search-bar .form-label {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #4b5563;
}

/* Pola jak w AddOrEdit */
.category-search-bar .form-control,
.category-search-bar .form-select {
    background-color: #f2f2f2;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 0.98rem;
    color: #111111;
    outline: none;
    width: 100%;
}

/* Placeholder – mniej widoczny */
.category-search-bar input::placeholder,
.category-search-bar textarea::placeholder {
    color: #9ca3af;
    opacity: 1;
    font-size: 0.9rem;
}

/* Focus jak w AddOrEdit */
.category-search-bar .form-control:focus,
.category-search-bar .form-select:focus {
    box-shadow:
        inset 0 0 0 1000px #f2f2f2,
        0 0 0 3px rgba(168, 63, 31, 0.12);
    border-color: #A83F1F;
}

/* Cena od–do – te same parametry, tylko trzymają layout */
.category-search-bar .price-range-group .form-control {
    border-radius: 16px;
}

/* === Dropdowny wielokrotnego wyboru (Stan / Forma dostawy) === */

.category-search-bar .filter-multi {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Przyciski otwierające modale – jak inputy AddOrEdit */
.category-search-bar .filter-multi-toggle {
    width: 100%;
    text-align: left;
    background-color: #f2f2f2;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px 42px 14px 16px;
    font-size: 0.98rem;
    font-weight: 400;
    color: #111111;
    position: relative;
}

.category-search-bar .filter-multi-toggle:focus {
    box-shadow:
        inset 0 0 0 1000px #f2f2f2,
        0 0 0 3px rgba(168, 63, 31, 0.12);
    border-color: #A83F1F;
    outline: none;
}

/* Strzałka jak w selectach */
.category-search-bar .filter-multi-toggle::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2388898f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}

/* Gdybyś znów użył dropdown-menu zamiast modali */
.category-search-bar .filter-multi-menu {
    min-width: 100%;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 14px 32px -20px rgba(15, 23, 42, 0.35);
}

.category-search-bar .filter-multi-menu .form-check {
    margin-bottom: 6px;
}

.category-search-bar .filter-multi-menu .form-check-label {
    font-size: 0.9rem;
}

/* === Rząd przycisków pod filtrami === */

.search-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.search-actions-left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-actions-left form {
    margin: 0;
}

.search-actions-right {
    display: flex;
    justify-content: flex-end;
}

/* btn-black / btn-danger-modern / btn-orange już masz w CSS globalnym,
   więc tutaj tylko kontrolujemy szerokość przycisku „Szukaj” */
.search-actions-right .btn {
    min-width: 160px;
}

/* === Modale (popupy) – spójne z resztą strony === */

.category-search-bar .modal-dialog {
    max-width: 480px;
}

.category-search-bar .modal-content {
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 26px 55px -30px rgba(15, 23, 42, 0.65);
}

.category-search-bar .modal-header {
    border-bottom: 1px solid #f3f4f6;
    padding: 12px 18px;
}

.category-search-bar .modal-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111111;
}

.category-search-bar .modal-body {
    padding: 12px 18px 10px;
    font-size: 0.95rem;
}

.category-search-bar .modal-body .form-control {
    background-color: #f2f2f2;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 0.96rem;
    color: #111111;
}

.category-search-bar .modal-body .form-control:focus {
    box-shadow:
        inset 0 0 0 1000px #f2f2f2,
        0 0 0 3px rgba(168, 63, 31, 0.12);
    border-color: #A83F1F;
}

.category-search-bar .modal-body .form-check-label {
    font-size: 0.9rem;
    color: #374151;
}

.category-search-bar .modal-footer {
    border-top: 1px solid #f3f4f6;
    padding: 10px 18px 12px;
    gap: 8px;
}

/* Responsywność – na mobile wszystko w jednej kolumnie */

@media (max-width: 767.98px) {
    .category-search-bar #mainForm {
        padding: 12px 10px 8px;
        box-shadow: 0 12px 30px -22px rgba(15, 23, 42, 0.55);
    }

    .search-actions-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-actions-right {
        justify-content: stretch;
    }

    .search-actions-right .btn {
        width: 100%;
    }

    .category-search-bar .modal-dialog {
        margin: 0.5rem auto;
    }
}

/* =========================================
   CATEGORY PAGE – layout filtrów i wyników
   ========================================= */

.category-layout {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(0, 4fr);
    gap: 24px;
    align-items: flex-start;
}

/* Lewa kolumna – FILTRY */
.category-filters {
    background: #ffffff;
    border-radius: 18px;
    border: none;
    padding: 16px 16px 18px;
    box-shadow: 0 14px 32px -20px rgba(15, 23, 42, 0.25);
}

.category-filters-title {
    margin: 0 0 10px;
    font-size: 1rem;
    font-weight: 800;
}

/* Prawa kolumna – wyniki */
.category-results {
    min-width: 0;
}

/* Head nad wynikami: licznik + sort */
.category-results-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 0;
    margin-bottom: 12px;
}

.category-results-count {
    font-size: 0.95rem;
    color: #6b7280;
}

/* Sortowanie – wspólne dla Category i Search */
.category-results-sort {
    min-width: 0;
}

.category-results-sort-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* Nasza etykieta "Sortuj wg:" */
.category-sort-label {
    font-size: 0.9rem;
    color: #6b7280;
}

/* Ukrywamy label z partiala, żeby nie było duplikatu */
.category-results-sort label {
    display: none !important;
}

/* Select sortowania – jak pozostałe pola wyboru */
.category-results-sort select {
    background-color: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 10px 14px;
    font-size: 0.95rem;
    color: #111;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
    outline: none;
    max-width: 240px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 40px;
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2388898f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}

.category-results-sort select:focus {
    border-color: #A83F1F;
    box-shadow:
        inset 0 0 0 1000px #f2f2f2,
        0 0 0 3px rgba(168, 63, 31, 0.12);
}

/* =========================================
   PAGINACJA – wspólna dla Category i Search
   ========================================= */

.category-pagination {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Główny kontener z przyciskami i limitem (d-flex z partiala) */
.category-pagination > .d-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

/* Formularze paginacji / limitu – bez dodatkowych marginesów */
.category-pagination form {
    margin: 0;
}

/* Przyciski "Poprzednia" / "Następna" */
.category-pagination .btn {
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 6px 14px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #111111;
    box-shadow: 0 6px 18px -12px rgba(15, 23, 42, 0.35);
    transition: all 0.15s ease;
}

.category-pagination .btn:hover:not(:disabled) {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
}

.category-pagination .btn:disabled {
    opacity: 0.5;
    cursor: default;
    box-shadow: none;
}

/* Formularz zmiany limitu – w jednej linii z podpisem "Na stronę:" */
.category-pagination form[action*="ChangeLimit"] {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Podpis przy selekcie limitu */
.category-pagination form[action*="ChangeLimit"]::before {
    content: "Na stronę:";
    font-size: 0.9rem;
    color: #6b7280;
}

/* Select limitu – mały "pill" */
.category-pagination form[action*="ChangeLimit"] select {
    background-color: #f2f2f2;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    padding: 6px 10px;
    font-size: 0.9rem;
    width: auto;
    min-width: 72px;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 26px;
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2388898f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}

/* Licznik pozycji */
.category-pagination-count {
    text-align: right;
    font-size: 0.9rem;
    color: #6b7280;
}

/* =========================================
   LISTA OFERT – wspólna dla obu stron
   ========================================= */

.offers-page .offer-card.item {
    display: block;
    text-decoration: none;
    color: inherit;
}

.offers-page .offer-card.item:hover {
    text-decoration: none;
}

/* PROMOWANE OFERTY – obwódka, tło, labelka */

.offers-page .offer-card.promoted,
.offers-page .promoted .offer-card {
    border: 2px solid #A83F1F;
    background: #f3f4f6;
}

.offers-page .offer-card.promoted .item-thumb,
.offers-page .promoted .item-thumb {
    position: relative;
}

.offers-page .offer-card.promoted .item-thumb::after,
.offers-page .promoted .item-thumb::after {
    content: "Promowane";
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .75);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* =========================================
   POLA FILTRÓW – Category
   ========================================= */

#CategoryPage .category-filters select,
#CategoryPage .category-filters input:not([type="checkbox"]):not([type="radio"]),
#CategoryPage .category-filters textarea {
    background-color: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 0.95rem;
    color: #111;
    width: 100%;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
    outline: none;
}

#CategoryPage .category-filters select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 40px;
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2388898f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
}

#CategoryPage .category-filters select:focus,
#CategoryPage .category-filters input:focus,
#CategoryPage .category-filters textarea:focus {
    border-color: #A83F1F;
    box-shadow:
        inset 0 0 0 1000px #f2f2f2,
        0 0 0 3px rgba(168, 63, 31, 0.12);
}

/* PODKATEGORIE – karty bez pomarańczowej ramki */
#PromotedCategories .card {
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px -22px rgba(66, 68, 90, 0.12);
}

/* =========================================
   RESPONSYWNOŚĆ
   ========================================= */

@media (max-width: 900px) {
    .category-layout {
        grid-template-columns: 1fr;
    }

    .category-filters {
        order: 1;
    }

    .category-results {
        order: 2;
    }

    .category-results-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-results-sort-inner {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .category-search-bar #mainForm > .col-md-4,
    .category-search-bar #mainForm > .col-md-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .category-search-bar .search-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-search-bar .search-actions-right .btn-primary {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .category-header,
    .category-subcategories,
    .category-banner-promo,
    .category-search-bar {
        padding: 0 8px;
    }

    #CategoryPage,
    #SearchPage {
        padding: 0 8px 32px;
    }

    .category-filters {
        padding: 14px 12px 16px;
        border-radius: 16px;
    }

    .category-pagination > .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-pagination-count {
        text-align: left;
    }
}

/* ====== DODANE GLOBALNIE (bezpieczne): drobne utility ====== */

.btn {
    cursor: pointer;
}

.btn-outline {
    background: #fff;
    color: #111;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 12px 18px;
    font-weight: 700;
}

.btn-outline:hover {
    background: #f5f5f5;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f1f1;
    color: #333;
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 14px;
}

/* === GLOBALNE MINIATURKI OFERT === */

/* Kontener miniatur – zawsze na pełną szerokość */

.item-thumb {
    width: 100% !important;
    max-width: 100% !important;
}

/* Obrazek miniatury – spójny wygląd wszędzie */

.item-thumb img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 16px !important;
    display: block;
}

/* Większa wysokość na dużych ekranach (ładniejsze proporcje) */

@media (min-width: 992px) {
    .item-thumb img {
        height: 230px !important;
    }
}

/* ========================================= */
/* NAVBAR – wersja desktop + mobile          */
/* ========================================= */

/* ===== Desktop ===== */

/* kontenery dwóch sekcji – jedna pod drugą, tylko w obrębie #navbarContainer */

#navbarContainer .navbar-main {
    display: block;
    width: 100%;
}

#navbarContainer .navbar-user-desktop,
#navbarContainer .navbar-admin-desktop {
    width: 100%;
    margin-bottom: 12px;
    display: block;
}

/* w każdym rzędzie po kilka równych guzików */

#navbarContainer .navbar-user-row,
#navbarContainer .navbar-admin-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
}

#navbarContainer .navbar-user-row > li,
#navbarContainer .navbar-admin-row > li {
    flex: 1 1 0;
}

/* guziki – menu użytkownika */

#navbarContainer .btn-user-tab {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background-color: #f2f2f2;
    border-radius: 10px;
    text-align: center;
    color: #111;
    font-size: 15px;
    font-weight: 400;
    box-shadow: 0 8px 24px -16px rgba(17, 24, 39, 0.18);
    border: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

#navbarContainer .btn-user-tab:hover,
#navbarContainer .btn-user-tab:focus {
    background-color: #A83F1F;
    color: #ffffff;
    text-decoration: none;
}

/* Wyloguj – pomarańczowy jak btn-orange */

#navbarContainer .btn-orange.btn-user-tab {
    background-color: #A83F1F !important;
    color: #fff !important;
}

#navbarContainer .btn-orange.btn-user-tab:hover,
#navbarContainer .btn-orange.btn-user-tab:focus {
    background-color: #7b2f17 !important;
    color: #fff !important;
}

/* żeby logout miał dokładnie taką samą szerokość jak reszta */

#navbarContainer .logout-form {
    width: 100%;
    margin: 0;
}

#navbarContainer .logout-form button {
    width: 100%;
    display: block;
}

/* czarne guziki admina */

#navbarContainer .admin-btn {
    display: block;
    width: 100%;
    text-align: center;
}

/* dolny rząd admina – 3/4 szerokości kontenera */

#navbarContainer .navbar-admin-desktop .admin-buttons-container {
    width: 100%;
    max-width: 100%;
}

/* ===== MOBILE ===== */

#navbarContainer .navbar-mobile {
    display: none;
    width: 100%;
    margin-top: 10px;
    flex-direction: column;
    gap: 10px;
}

/* guziki rozwijające – MENU UŻYTKOWNIKA / MENU ADMIN */

#navbarContainer .mobile-toggle {
    width: 100%;
    display: block;
    border-radius: 10px;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

/* listy rozwijane */

#navbarContainer .mobile-collapsed {
    display: none;
}

#navbarContainer .mobile-menu {
    list-style: none;
    padding: 0;
    margin: 6px 0 12px 0;
    width: 100%;
}

#navbarContainer .mobile-menu li {
    margin-bottom: 6px;
}

#navbarContainer .mobile-menu a,
#navbarContainer .mobile-menu button {
    display: block;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background-color: #f2f2f2;
    color: #111;
    text-align: center;
    border: none;
}

/* ===== Responsive breakpoints ===== */

@media (max-width: 900px) {
    #navbarContainer .navbar-user-desktop,
    #navbarContainer .navbar-admin-desktop {
        display: none;
    }

    #navbarContainer .navbar-mobile {
        display: flex;
    }
}

/* ================================================
   MY ACCOUNT – PROFIL UŻYTKOWNIKA
   Styl layoutu strony profilu SprzedajInstrument.pl
   ================================================ */

#MyAccount.myaccount-wrapper {
    max-width: 1296px;
    margin: 0 auto;
}

/* Nagłówek strony */

.myaccount-header {
    margin-bottom: 24px;
    text-align: center;
}

.myaccount-title {
    color: var(--si-text, #111111);
    margin-bottom: 8px; /* globalne h1 robi resztę */
}

.myaccount-subtitle {
    margin: 0 auto;
    max-width: 600px;
    font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
    color: var(--si-muted, #6b7280);
}

/* ===== Karty profilu ===== */

#MyAccount .myaccount-card {
    width: 100%;
    border: none;
    border-radius: var(--si-radius-lg, 16px);
    background: var(--si-surface, #ffffff);
}

#MyAccount .myaccount-card .card-body {
    padding: 20px 20px 22px;
}

/* ===== Pola formularza – jak w AddOrEdit ===== */

#MyAccount .myaccount-field-label,
#MyAccount .form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--si-muted, #6b7280);
}

#MyAccount .myaccount-input,
#MyAccount .myaccount-file-input,
#MyAccount .form-control.myaccount-input {
    background-color: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: var(--si-radius-md, 12px);
    padding: 14px 16px;
    color: #111;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
}

#MyAccount .myaccount-input:focus,
#MyAccount .myaccount-file-input:focus {
    border-color: #A83F1F;
    box-shadow: 0 0 0 3px rgba(168,63,31,.12);
    outline: none;
}

#MyAccount .myaccount-textarea {
    min-height: 120px;
    resize: vertical; /* pozwala rozciągnąć myszką */
    overflow-y: auto;
}

/* ===== Przycisk zapisu ===== */

#MyAccount .myaccount-save-btn {
    display: block;
    width: 100%;
}

/* ===== Avatar ===== */

#MyAccount .myaccount-avatar-card {
    display: flex;
    flex-direction: column;
}

#MyAccount .myaccount-avatar-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

#MyAccount .myaccount-avatar-img {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--si-line, #e5e7eb);
}

#MyAccount .myaccount-file-input {
    border-radius: var(--si-radius-md, 12px);
}

#MyAccount .myaccount-file-hint {
    margin-top: 6px;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--si-muted, #6b7280);
}

/* ===== Checkboxy ===== 

#MyAccount .form-check-input {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #A83F1F;
    border-radius: 4px;
}

#MyAccount .form-check-label {
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--si-text, #111111);
}

/* ===== Responsywność ===== */

@media (max-width: 991.98px) {
    #MyAccount.myaccount-wrapper {
        padding-top: 16px;
    }

    #MyAccount .myaccount-card .card-body {
        padding: 16px 16px 18px;
    }

    #MyAccount .myaccount-avatar-img {
        width: 220px;
        height: 220px;
    }
}


/* === Uniwersalna linia sekcji – pod tytułem / między blokami === */

.si-hr {
    width: 70%;
    margin: 16px auto 24px; /* odstęp NAD i POD */
    border: none;
    border-top: 2px solid #f2f2f2;
    opacity: 1;
    background: transparent;
}

/* === Globalne tytuły stron + linia pod nimi === */

/* Wszystkie H1 używane jako tytuły sekcji stron */
.page-h1,
.Users-title,
.myaccount-title {
    margin-top: 28px;
    margin-bottom: 12px;
    text-align: center;
    padding-bottom: 0;
}

/* Uniwersalna linia pod tytułem */
.si-hr {
    width: 70%;
    margin: 12px auto 24px; /* 12px NAD linią, 24px POD */
    border: none;
    border-top: 2px solid #f2f2f2;
    opacity: 1;
    background: transparent;
}

.myaccount-subtitle {
    margin-top: 16px !important; /* odstęp od HR */
    margin-bottom: 0;
    max-width: 600px;
    font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
    color: var(--si-muted, #6b7280);
}

#LogoutPage {
    margin: 0 auto;
    padding: 24px 12px 40px;
    text-align: center;
}

/* Logout — zgodna z myaccount-card */
#LogoutPage {
    margin: 0 auto;
    padding: 24px 12px 40px;
    text-align: center;
}

/* Karta — zgodna z myaccount-card */
.logout-card {
    background: #fff;
    padding: 24px 20px;
    margin-top: 20px;
}

.logout-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.logout-text {
    font-size: 1rem;
    color: #111;
    margin: 0;
}

/* Link "zalogować się" */
.logout-link {
    color: #A83F1F;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.logout-link:hover {
    opacity: 0.75;
}

/* Przycisk */
.logout-btn {
    margin-top: 6px;
    width: 100%;
    padding: 14px 18px;
    font-size: 1.05rem;
}

/* ================================================
   AUTH PAGES – LOGOWANIE / REJESTRACJA / ETC.
   ================================================ */





/* Pola formularza – spójne z resztą */
#LoginPage .auth-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--si-muted, #6b7280);
}

#LoginPage .auth-input {
    background-color: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    color: #111;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
    font-weight: 300;
}

#LoginPage .auth-input:focus {
    border-color: #A83F1F;
    box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.12);
    outline: none;
}

/* Hasło – toggle pokaz/ukryj */
#LoginPage .auth-password-wrap {
    position: relative;
}

#LoginPage .showPasswordToggleButton {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #A83F1F;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

/* Zapamiętaj mnie */
#LoginPage .auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

#LoginPage .auth-remember-check {
    width: 18px;
    height: 18px;
    accent-color: #A83F1F;
}

/* Bootstrap daje ujemny margines – zerujemy go na tej stronie */
#LoginPage .auth-remember .form-check-input {
    margin-left: 0;
}

#LoginPage .auth-remember-label {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--si-text, #111111);
    margin-left: 5%;
    margin-top: 1%;
}

/* Przycisk logowania */
#LoginPage .auth-submit-btn {
    width: 100%;
    padding: 14px 18px;
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.1rem);
}

/* Linki pod formularzem */
#LoginPage .auth-links {
    margin-top: 10px;
}

#LoginPage .auth-links p {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

#LoginPage .auth-links a {
    font-size: 0.9rem;
    font-weight: 300;
}

/* "Nie masz konta?" + CTA rejestracji */
#LoginPage .auth-no-account-title {
    margin: 10px 0 6px;
    font-size: 1rem;
    font-weight: 700;
}

#LoginPage .auth-register-wrap {
    margin-bottom: 6px;
}

/* Rejestracja – jak btn-black, na pełną szerokość */
#LoginPage .auth-register-btn.register-btn-black {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px 18px;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
}

/* Prawa kolumna – opis */
#LoginPage .auth-side {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 8px 4px;
}

#LoginPage .auth-side-title {
    font-size: clamp(1.2rem, 1.1rem + 0.3vw, 1.4rem);
    font-weight: 800;
    margin-bottom: 8px;
}

#LoginPage .auth-side-text {
    font-size: clamp(0.95rem, 0.9rem + 0.15vw, 1rem);
    color: var(--si-muted, #6b7280);
    font-weight: 300;
}

/* Responsywność */
@media (max-width: 767.98px) {
    #LoginPage.auth-wrapper {
        padding-top: 16px;
    }

    #LoginPage .auth-card {
        padding: 16px 16px 18px;
    }

    #LoginPage .auth-side {
        margin-top: 4px;
        text-align: center;
    }
}

/* ============================================
   AUTH – LOGOWANIE & REJESTRACJA – UNIFIKACJA
   ============================================ */

/* Pola formularza – bez wewnętrznych wcięć */
#LoginPage .auth-field,
#registerForm .auth-field {
    margin-bottom: 1rem;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Labelki – ten sam font / rozmiar w LOGIN i REGISTER, wyrównane z polami */
#LoginPage .auth-field > label,
#RegisterPage .auth-field > label {
    display: block;
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-size: clamp(0.95rem, 0.92rem + 0.15vw, 1rem) !important;
    font-weight: 500 !important;
    color: var(--si-muted, #6b7280) !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Inputy – ten sam wygląd i wysokość w Login i Register */
#LoginPage .auth-field .form-control,
#registerForm .auth-field .form-control {
    background-color: #f2f2f2 !important;
    border-radius: 16px !important;
    border: 1px solid #e5e7eb !important;
    padding: 14px 16px !important;
    font-size: 1rem !important;
    color: #111111 !important;
    box-shadow: none !important;
}

#LoginPage .auth-field .form-control:focus,
#registerForm .auth-field .form-control:focus {
    border-color: #A83F1F !important;
    box-shadow: 0 0 0 3px rgba(168,63,31,.12) !important;
    outline: none !important;
}

/* Placeholdery – delikatne, mniej widoczne */
#LoginPage .auth-field .form-control::placeholder,
#registerForm .auth-field .form-control::placeholder {
    color: #9ca3af !important;
    opacity: 0.7 !important;
}

/* Tytuł w prawej kolumnie – identyczny w login i register */
#LoginPage .auth-side-title,
#RegisterPage .auth-side-title {
    margin: 0 0 0.75rem;
    font-family: inherit !important;
    font-weight: 900 !important;
    font-size: clamp(1.25rem, 1.162rem + 0.2817vw, 1.5rem) !important;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--si-text, #111111);
}

/* === LOGIN + REGISTER – wspólne zachowanie === */

/* Szerokości / margines pod HR – zero custom marginesu na formach */
#LoginPage form#account,
#RegisterPage form#registerForm {
    margin-top: 0 !important;
}

/* Zapamiętaj mnie – checkbox + label w jednym rzędzie, nic się nie nakłada */
#LoginPage .auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

#LoginPage .auth-remember-check {
    margin: 0 !important;
}

#LoginPage .auth-remember-label {
    margin: 0 !important;
    font-size: clamp(0.9rem, 0.88rem + 0.1vw, 0.95rem);
    font-weight: 500;
    color: var(--si-text, #111111);
}

/* "Nie masz konta?" – ta sama typografia co tytuły po prawej kolumnie */
.auth-no-account-title {
    margin: 14px 0 8px;
    font-size: clamp(1rem, 0.95rem + 0.2vw, 1.15rem);
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    color: var(--si-text, #111111);
}

/* --- LOGIN: pamiętaj mnie --- */

#LoginPage .auth-remember {
    margin-bottom: 16px;
}

#LoginPage .remember-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px !important;

    /* To wyłącza wszelkie dziwne marginesy Bootstrapa */
    width: fit-content;
}

/* Checkbox – wymuszamy normalne zachowanie */
#LoginPage .auth-remember-check {
    margin: 0 !important;
    padding: 0 !important;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #A83F1F;
}

/* Tekst obok checkboxa */
#LoginPage .auth-remember-label {
    margin: 0 !important;
    padding: 0 !important;
    font-size: clamp(0.9rem, 0.88rem + 0.1vw, 0.95rem);
    font-weight: 500;
    color: #111;
    line-height: 1.2;
}

/* === OSTATECZNE WYRÓWNANIE "ZAPAMIĘTAJ MNIE" NA STRONIE LOGOWANIA === */

#LoginPage .auth-remember {
    margin-bottom: 16px;
}

#LoginPage .remember-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#LoginPage .auth-remember-check {
    margin: 0 !important;
    padding: 0 !important;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: #A83F1F;
    float: none !important;
    display: inline-block !important;
}

#LoginPage .remember-inner .remember-text {
    margin: 0;
    padding: 0;
    font-size: clamp(0.9rem, 0.88rem + 0.1vw, 0.95rem);
    font-weight: 500;
    color: #111;
    line-height: 1.2;
}

/* ===========================================
   OBSERWOWANE – zakładki + karty jak oferty
   =========================================== */

/* Zakładki na pełną szerokość, równe przyciski */
.observed-tabs {
    display: flex;
    border-bottom: 2px solid #f2f2f2;
    margin-top: 8px;
}

.observed-tabs .nav-item {
    flex: 1 1 0;
}

.observed-tabs .nav-link {
    width: 100%;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 14px;
    border-radius: 14px 14px 0 0;
    border: 1px solid transparent;
    color: #111111;
    background-color: #f2f2f2;
    margin: 0 4px -2px;
}

.observed-tabs .nav-link.active {
    background-color: #ffffff;
    border-color: #f2f2f2 #f2f2f2 #ffffff;
    color: #111111;
}

/* Treść zakładek – lekki odstęp od tabsów */
.observed-tab-content {
    padding-top: 8px;
}

/* Dodatkowe info "Dodano do obserwowanych" w karcie oferty */
.observed-added {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Akcja "Usuń z obserwowanych" w stylu linka w sekcji akcji */
.observed-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.observed-delete-form {
    margin: 0;
}

.observed-delete-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #b91c1c;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.observed-delete-btn:hover {
    opacity: 0.85;
}

/* Tabela zapisanych wyszukań – delikatne dopasowanie */
.observed-search-table-wrap {
    margin-top: 8px;
}

.observed-search-table th,
.observed-search-table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

#ObservedPage .si-hr {
    margin-bottom: 32px !important; /* było 24px */
}

/* ===========================================
   OBSERWOWANE – estetyczna tabela wyszukań
   =========================================== */

.observed-search-table-wrap {
    margin-top: 20px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px -16px rgba(17, 24, 39, 0.15);
    background: #fff;
}

/* Tabela */
.observed-search-table {
    margin: 0;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

/* Nagłówki */
.observed-search-table thead th {
    background: #f2f2f2;
    padding: 14px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    text-transform: none;
    border-bottom: 2px solid #e5e7eb;
}

/* Wiersze */
.observed-search-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.observed-search-table tbody tr:hover {
    background: #f1f1f1;
}

/* Komórki */
.observed-search-table td {
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #111;
    vertical-align: middle;
}

/* Link “link” */
.observed-search-table td a {
    color: #A83F1F;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.observed-search-table td a:hover {
    opacity: 0.7;
}

/* Guzik Usuń */
.observed-search-table button.btn-danger {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
}

/* Mobile – przewijanie, ale elegancko */
@media (max-width: 600px) {
    .observed-search-table-wrap {
        border-radius: 12px;
        overflow-x: auto;
    }

    .observed-search-table {
        min-width: 580px;
    }
}

/* =========================================
   OBSERWOWANE – LINKI (TABELA)
   ========================================= */

/* Nagłówki sortowania */
.observed-search-table th a {
    color: #A83F1F;
    font-weight: 700;
    text-decoration: none;
}

.observed-search-table th a:hover {
    text-decoration: underline;
}

/* Link w kolumnie "Link" */
.observed-search-table td a {
    color: #A83F1F;
    font-weight: 700;
    text-decoration: none;
}

.observed-search-table td a:hover {
    text-decoration: underline;
}

/* ===========================================
   ROLES MANAGER – layout, search, akcje
   =========================================== */

#RolesManagerPage {
    max-width: 1296px;
    margin: 0 auto;
}

/* Pasek wyszukiwania – wyrównany do prawej */
.roles-search-wrap {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.roles-search-inner {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 420px;
}

/* Input jak inne pola (AddOrEdit / Offers) */
.roles-search-input {
    flex: 1;
    background-color: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 1rem;
    color: #111;
    height: 52px;
    min-height: 52px;
    line-height: 1.2;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
    outline: none;
}

.roles-search-input:focus {
    border-color: #A83F1F;
    box-shadow:
        inset 0 0 0 1000px #f2f2f2,
        0 0 0 3px rgba(168, 63, 31, 0.12);
}

/* Przycisk Szukaj – dopasowany wysokością do inputa */
.roles-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    height: 52px;
    min-height: 52px;
    font-size: 0.95rem;
}

/* Kolumna z akcjami w tabeli */
.roles-actions-cell {
    white-space: nowrap;
}

/* Spójne buttony akcji (Zarządzaj / Usuń) – ta sama wysokość, normalny weight */
.roles-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 400 !important;
    margin-right: 6px;
}

/* ===========================================
   ROLES ASSIGN – karta zarządzania rolami
   =========================================== */

#RolesAssignPage {
    width: 100%;
    margin: 0 auto;
    padding: 24px 12px 40px;
}

/* Tytuł + linia pod nim */

#RolesAssignPage .page-h1 {
    margin-top: 28px;
    margin-bottom: 12px;
    text-align: center;
}

#RolesAssignPage .si-hr {
    width: 70%;
    margin: 12px auto 24px;
    border: none;
    border-top: 2px solid #f2f2f2;
    opacity: 1;
    background: transparent;
}

/* Podtytuł */

.roles-assign-subtitle {
    text-align: center;
    margin-bottom: 22px;
}

.roles-assign-subtitle p {
    margin: 0;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    color: #6b7280;
}

/* Karta */

.roles-card {
    background: #ffffff;
}

/* Lista checkboxów – 2 kolumny */

.roles-assign-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 24px;
    margin-top: 4px;
}

@media (max-width: 600px) {
    .roles-assign-list {
        grid-template-columns: 1fr;
    }
}

/* Pojedyncza rola – BEZ klas Bootstrapa */

.roles-assign-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

/* Checkbox – czysty, bez marginesów Bootstrapa */

.roles-assign-check {
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    accent-color: #A83F1F;
    border-radius: 4px;
}

/* Tekst obok checkboxa */

.roles-assign-label {
    margin: 0;
    font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
    font-weight: 400;
    color: #111111;
    line-height: 1.2;
    cursor: pointer;
}

/* Stopka z przyciskami */

.roles-card-footer {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

/* Przyciski – wygląd spójny z resztą serwisu */

.roles-submit-btn,
.roles-cancel-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    min-width: 160px;
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
    font-weight: 600;
    border-radius: 12px;
    border: none;
    text-decoration: none;
}

/* Pomarańczowy – jak reszta btn-orange */

.roles-submit-btn.btn-orange {
    background-color: #A83F1F;
    color: #ffffff;
}

.roles-submit-btn.btn-orange:hover {
    background-color: #7b2f17;
}

/* Biały – jak globalny btn-white */

.roles-cancel-btn.btn-white {
    background-color: #ffffff;
    color: #111111;
    border: 1px solid #e5e7eb;
}

.roles-cancel-btn.btn-white:hover {
    background-color: #f5f5f5;
}

/* ===========================================
   DICTIONARIES PAGE – lista słowników
   =========================================== */

#DictionariesPage {
    max-width: 1296px;
    margin: 0 auto;
}

/* Nagłówek strony korzysta z .page-h1 + .si-hr globalnie */

/* Górny pasek: przycisk + wyszukiwarka */

.dictionaries-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.dictionaries-head-left,
.dictionaries-head-right {
    display: flex;
    align-items: center;
}

/* Wyszukiwarka */

.dictionaries-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dictionaries-search-input {
    background: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 10px 14px;
    min-height: 44px;
    font-size: 0.95rem;
    color: #111111;
    outline: none;
    width: 260px;
    max-width: 100%;
}

.dictionaries-search-input:focus {
    border-color: #A83F1F;
    box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.12);
}

.dictionaries-search-btn {
    padding: 10px 16px;
    min-height: 44px;
}

/* Przyciski */

.dictionaries-create-btn {
    padding: 10px 18px;
    min-height: 44px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
}

.dictionaries-manage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    min-width: 150px;
    font-size: 0.9rem;
    border-radius: 10px;
}

/* Tabela – reuse observed-search-table */

.dictionaries-table {
    table-layout: fixed; /* wymusza stały układ */
    width: 100%; /* pełna szerokość */
}

.dictionaries-table-wrap {
    margin-top: 20px;
}

/* Kolumny nagłówka */

.dictionaries-table thead th {
    white-space: nowrap;
}

.dictionaries-table .dict-col-name {
    text-align: left;
}

.dictionaries-table .dict-col-active,
.dictionaries-table .dict-col-sort,
.dictionaries-table .dict-col-actions {
    text-align: center;
}

/* Komórki */

.dictionaries-table .dict-col-name {
    width: 400px;
    white-space: normal;
    word-wrap: break-word; /* lub overflow-wrap: anywhere; */
}
.dictionaries-table .dict-col-res {
    width: 120px;
    white-space: normal;
    word-wrap: break-word; /* lub overflow-wrap: anywhere; */
}
.dictionaries-table .dict-col-active {
    width: 120px;
}

.dictionaries-table .dict-col-sort {
    width: 120px;
}

/* Ikony statusu */

.dict-status-icon {
    font-size: 1.3rem;
    vertical-align: middle;
}

.dict-status-icon--active {
    color: #16a34a;
}

.dict-status-icon--inactive {
    color: #dc2626;
}

/* Ikonka sortowania w nagłówkach */

.sort-icon {
    margin-left: 4px;
    font-size: 11px;
    opacity: 0.7;
}

/* Mobile */

@media (max-width: 768px) {
    .dictionaries-head {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .dictionaries-head-left,
    .dictionaries-head-right {
        width: 100%;
        justify-content: flex-start;
    }

    .dictionaries-search-wrap {
        width: 100%;
    }

    .dictionaries-search-input {
        width: 100%;
    }

    .dictionaries-create-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .dictionaries-manage-btn {
        min-width: 130px;
    }
}

/* ===========================================
   DICTIONARY ADD/EDIT – edycja słownika
   =========================================== */

#DictionaryEditPage {
    max-width: 1250px;
    margin: 0 auto;
}

#DictionaryEditPage .page-h1 {
    margin-top: 28px;
    margin-bottom: 12px;
    text-align: center;
}

#DictionaryEditPage .si-hr {
    width: 70%;
    margin: 12px auto 24px;
    border: none;
    border-top: 2px solid #f2f2f2;
    opacity: 1;
    background: transparent;
}

.dictionary-subtitle {
    text-align: center;
    margin-bottom: 18px;
}

.dictionary-subtitle p {
    margin: 0;
    font-size: 0.95rem;
    color: #6b7280;
}


/* Siatka pól głównych */

.dictionary-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
}

.dictionary-field-full {
    grid-column: 1 / -1;
}

.dictionary-field-inline {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
}

.dictionary-inline-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Etykiety i inputy */

.dictionary-label {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
}

.dictionary-input {
    background-color: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 1rem;
    color: #111;
    width: 100%;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
    outline: none;
}

.dictionary-input:focus {
    border-color: #A83F1F;
    box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.12);
    background-color: #f2f2f2;
}

.dictionary-input-small {
    max-width: 220px;
}

/* Checkbox „Aktywny” */

.dictionary-inline-checkbox {
    align-self: flex-end;
}

.dictionary-check-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    cursor: pointer;
    font-size: 0.95rem;
    color: #111;
}

.dictionary-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #A83F1F;
    cursor: pointer;
}

/* Nagłówek sekcji elementów */

.dictionary-elements-header {
    margin-top: 24px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dictionary-elements-title {
    margin: 0;
    font-size: clamp(1.1rem, 1.05rem + 0.2vw, 1.3rem);
    font-weight: 800;
}

/* Lista elementów */

.dictionary-items-container {
    margin-top: 8px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fafafa;
    padding: 10px 10px 6px;
}

/* Wiersz nagłówka */

.dictionary-items-header-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr auto;
    gap: 10px;
    padding: 4px 4px 8px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
}

.dictionary-items-header-actions {
    text-align: right;
}

/* Wiersz elementu */

.dictionary-item-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 6px 4px;
    border-bottom: 1px solid #f2f2f2;
}

.dictionary-item-input {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 0.95rem;
    color: #111;
    width: 100%;
    box-shadow: none;
}

.dictionary-item-input:focus {
    border-color: #A83F1F;
    box-shadow: 0 0 0 2px rgba(168, 63, 31, 0.12);
}

.dictionary-item-input-small {
    max-width: 120px;
}

.dictionary-item-check-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #111;
}

.dictionary-item-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: #A83F1F;
    cursor: pointer;
}

/* Przycisk Usuń */

.dictionary-item-remove-btn {
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Przycisk dodania elementu */

.dictionary-add-item-btn {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Stopka karty */

.dictionary-card-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.dictionary-save-btn,
.dictionary-new-btn {
    min-width: 150px;
    text-align: center;
}

/* Responsywność */

@media (max-width: 768px) {
    .dictionary-form-grid {
        grid-template-columns: 1fr;
    }

    .dictionary-field-inline {
        grid-template-columns: 1fr;
    }

    .dictionary-inline-checkbox {
        align-self: flex-start;
    }

    .dictionary-items-header-row {
        display: none; /* na mobile opieramy się na placeholderach i kolejności pól */
    }

    .dictionary-item-row {
        grid-template-columns: 1fr;
        row-gap: 6px;
    }

    .dictionary-item-input-small {
        max-width: 100%;
    }

    .dictionary-card {
        padding: 18px 14px 18px;
    }
}

/* ===========================================
   ADMIN – Kategorie (Index)
   =========================================== */

#CategoriesIndexPage {
    max-width: 1296px;
    margin: 0 auto;
}

#CategoriesIndexPage .page-h1 {
    margin-top: 28px;
    margin-bottom: 12px;
    text-align: center;
}

#CategoriesIndexPage .si-hr {
    width: 70%;
    margin: 12px auto 24px;
    border: none;
    border-top: 2px solid #f2f2f2;
    opacity: 1;
    background: transparent;
}

/* Pasek narzędzi nad tabelą */
#CategoriesIndexPage .admin-tools-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

#CategoriesIndexPage .admin-search-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 260px;
}

/* Input szukajki – spójny z resztą pól */
#CategoriesIndexPage .admin-input {
    height: 48px;
    border-radius: 10px;
    background: #f2f2f2;
    border: none;
    font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
    padding: 0 14px;
}

#CategoriesIndexPage .admin-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.12);
}

/* Guziki w pasku narzędzi */
#CategoriesIndexPage .admin-search-btn,
#CategoriesIndexPage .admin-add-btn {
    height: 48px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Na węższych ekranach: pionowo */
@media (max-width: 640px) {
    #CategoriesIndexPage .admin-tools-bar {
        flex-direction: column;
        align-items: stretch;
    }

    #CategoriesIndexPage .admin-search-group {
        width: 100%;
    }

    #CategoriesIndexPage .admin-add-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Tabela kategorii */

#CategoriesIndexPage .admin-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 24px -16px rgba(17, 24, 39, 0.15);
}

#CategoriesIndexPage .admin-table thead th {
    background: #f2f2f2;
    padding: 12px 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}

#CategoriesIndexPage .admin-table tbody tr:nth-child(even) {
    background: #fafafa;
}

#CategoriesIndexPage .admin-table tbody tr:hover {
    background: #f1f1f1;
}

#CategoriesIndexPage .admin-table td {
    padding: 10px 4px;
    font-size: 0.9rem;
    vertical-align: middle;
    color: #111;
}

#CategoriesIndexPage .admin-table-center {
    text-align: center;
}

/* Kolumna akcji */
#CategoriesIndexPage .admin-table-actions-col {
    width: 180px;
    text-align: center;
}

/* Ikonki aktywności */
#CategoriesIndexPage .admin-icon {
    font-size: 1.3rem;
    vertical-align: middle;
}

#CategoriesIndexPage .admin-icon-on {
    color: #16a34a;
}

#CategoriesIndexPage .admin-icon-off {
    color: #dc2626;
}

/* Przyciski w tabeli */
#CategoriesIndexPage .admin-table-btn {
    padding: 8px 14px;
    font-size: 0.85rem;
    border-radius: 999px;
}

/* Ikonka sortowania */
#CategoriesIndexPage .sort-icon {
    font-size: 12px;
    margin-left: 4px;
    opacity: 0.7;
}

/* ===========================================
   ADMIN – Słowniki (Index) – pasek jak w Kategoriach
   =========================================== */

#DictionariesPage {
    max-width: 1205px;
    margin: 0 auto;
}

#DictionariesPage .page-h1 {
    margin-top: 28px;
    margin-bottom: 12px;
    text-align: center;
}

#DictionariesPage .si-hr {
    width: 70%;
    margin: 12px auto 24px;
    border: none;
    border-top: 2px solid #f2f2f2;
    opacity: 1;
    background: transparent;
}

/* Pasek narzędzi – identyczny układ jak na kategoriach */
#DictionariesPage .admin-tools-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

#DictionariesPage .admin-search-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 260px;
}

/* Input – ten sam vibe co reszta pól */
#DictionariesPage .admin-input {
    height: 48px;
    border-radius: 10px;
    background: #f2f2f2;
    border: none;
    font-size: clamp(0.95rem, 0.9rem + 0.3vw, 1.05rem);
    padding: 0 14px;
}

#DictionariesPage .admin-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.12);
}

/* Przyciski: Szukaj + Utwórz słownik */
#DictionariesPage .admin-search-btn,
#DictionariesPage .admin-add-btn {
    height: 48px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mobile – tak samo jak w kategoriach */
@media (max-width: 640px) {
    #DictionariesPage .admin-tools-bar {
        flex-direction: column;
        align-items: stretch;
    }

    #DictionariesPage .admin-search-group {
        width: 100%;
    }

    #DictionariesPage .admin-add-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Sort ikonka (jeśli jeszcze nie jest globalnie ogarnięta) */
#DictionariesPage .sort-icon {
    font-size: 12px;
    margin-left: 4px;
    opacity: 0.7;
}

    /* ===========================================
       CATEGORY ADD/EDIT – layout jak edycja słownika
       =========================================== */

    #CategoryAddEditPage {
        max-width: 1250px;
        margin: 0 auto;
    }

    .category-edit-subtitle {
        text-align: center;
        margin-bottom: 20px;
    }

    .category-edit-subtitle p {
        margin: 0;
        font-size: 0.95rem;
        color: #6b7280;
    }

    .category-section {
        padding-bottom: 18px;
        margin-bottom: 18px;
        border-bottom: 1px solid #f3f4f6;
    }

    .category-section:last-of-type {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .category-section-header h2 {
        margin: 0 0 4px;
        font-size: clamp(1.15rem, 1.05rem + 0.25vw, 1.35rem);
        font-weight: 800;
    }

    .category-section-desc {
        margin: 0;
        font-size: 0.9rem;
        color: #6b7280;
    }

    /* Główna siatka pól */
    .category-main-grid {
        margin-top: 14px;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 24px;
    }

    .category-field {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .category-field-full {
        grid-column: 1 / -1;
    }

    .category-label {
        font-size: 0.9rem;
        font-weight: 500;
        color: #6b7280;
    }

    .category-input {
        background-color: #f2f2f2;
        border-radius: 16px;
        border: 1px solid #e5e7eb;
        padding: 12px 14px;
        font-size: 0.98rem;
        color: #111;
        width: 100%;
    }

    .category-input:focus {
        outline: none;
        border-color: #A83F1F;
        box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.12);
    }

    .category-select {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-position: right 12px center;
        background-repeat: no-repeat;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2388898f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
        padding-right: 40px;
        cursor: pointer;
    }

    .category-checkbox-wrap {
        align-self: flex-start;
    }

    .category-checkbox-row {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        margin-top: 4px;
    }

    .category-check {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: #A83F1F;
        cursor: pointer;
    }

    .category-check-label {
        font-size: 0.95rem;
        font-weight: 500;
        color: #111;
        cursor: pointer;
    }

    /* Zdjęcie kategorii */
    .category-image-grid {
        margin-top: 16px;
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
        gap: 16px 24px;
        align-items: flex-start;
    }

    .category-image-thumb {
        max-width: 100%;
        border-radius: 16px;
        border: 1px solid #e5e7eb;
        object-fit: cover;
        display: block;
    }

    .category-file-input {
        background-color: #f2f2f2;
        border-radius: 16px;
        border: 1px solid #e5e7eb;
        padding: 10px 12px;
    }

    .category-help {
        margin: 6px 0 0;
        font-size: 0.85rem;
        color: #6b7280;
    }

    /* Elementy kategorii */
    .category-elements-header {
        margin-top: 14px;
        margin-bottom: 10px;
        display: flex;
        justify-content: flex-start;
    }

    .category-add-element-btn {
        padding: 10px 18px;
        font-size: 0.95rem;
        border-radius: 999px;
    }

    .category-elements-list {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }

    .category-element-card {
        border-radius: 14px;
        border: 1px solid #e5e7eb;
        background: #f9fafb;
        padding: 14px 14px 12px;
    }

    .category-element-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 20px;
        align-items: flex-start;
    }

    .category-element-field {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .category-element-input {
        background-color: #ffffff;
        border-radius: 12px;
        border: 1px solid #d1d5db;
        padding: 10px 12px;
        font-size: 0.9rem;
        color: #111;
        width: 100%;
    }

    .category-element-input:focus {
        outline: none;
        border-color: #A83F1F;
        box-shadow: 0 0 0 2px rgba(168, 63, 31, 0.12);
    }

    .category-element-label {
        font-size: 0.85rem;
        font-weight: 500;
        color: #6b7280;
    }

    .category-element-sort {
        max-width: 190px;
    }

    .category-element-dicts {
        cursor: pointer;
    }

    .category-element-dicts:hover {
        border-color: #A83F1F;
    }

    .category-element-actions {
        margin-top: 10px;
        display: flex;
        justify-content: flex-end;
    }

    .category-element-remove-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
        border-radius: 999px;
    }

    .category-element-remove-btn:hover {
        background: #f3f4f6;
    }

    .category-element-toggle-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding-top: 4px;
    }

    .category-toggle-row {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .category-toggle-label {
        font-size: 0.85rem;
        color: #111;
    }

    /* Modal słowników */
    .category-modal {
        display: none;
        position: fixed;
        z-index: 2000;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.45);
        align-items: center;
        justify-content: center;
        padding: 16px;
    }

    .category-modal-content {
        background-color: #ffffff;
        border-radius: 16px;
        padding: 18px 18px 14px;
        max-width: 420px;
        width: 100%;
        box-shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.45);
    }

    .category-modal-content h3 {
        margin: 0 0 10px;
        font-size: 1.05rem;
        font-weight: 800;
    }

    .category-modal-checkboxes {
        max-height: 260px;
        overflow-y: auto;
        margin-bottom: 10px;
        padding-right: 4px;
    }

    .category-modal-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
    }

    .category-modal-check {
        width: 16px;
        height: 16px;
        accent-color: #A83F1F;
    }

    .category-modal-label {
        font-size: 0.9rem;
        color: #111;
    }

    .category-modal-actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        margin-top: 4px;
    }

    .category-modal-btn {
        padding: 8px 14px;
        font-size: 0.9rem;
        border-radius: 999px;
    }

    /* Stopka karty */
    .category-card-footer {
        margin-top: 20px;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        flex-wrap: wrap;
    }

    .category-submit-btn,
    .category-new-btn {
        min-width: 180px;
        text-align: center;
        padding: 12px 18px;
        font-size: 0.95rem;
        border-radius: 999px;
    }

    /* Responsywność */
    @media (max-width: 768px) {
        .category-main-grid {
            grid-template-columns: 1fr;
        }

        .category-image-grid {
            grid-template-columns: 1fr;
        }

        .category-element-grid {
            grid-template-columns: 1fr;
        }

        .category-element-sort {
            max-width: 100%;
        }

        .category-card {
            padding: 18px 14px 20px;
        }
    }

        /* ===== Layout strony raportu kategorii ===== */

    #CategoriesReportPage {
        max-width: 1250px;
        margin: 0 auto;
        padding: 24px 12px 40px;
    }

    #CategoriesReportPage .page-h1 {
        text-align: center;
        margin: 0 0 8px;
    }

    #CategoriesReportPage .si-hr {
        width: 70%;
        margin: 12px auto 24px;
        border: none;
        border-top: 2px solid #f2f2f2;
        opacity: 1;
        background: transparent;
    }

    /* ===== Górny pasek: szukajka + „Utwórz kategorię” ===== */

    .categories-report-toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        margin-bottom: 18px;
        flex-wrap: wrap;
    }

    .categories-report-search {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1 1 260px;
    }

    .categories-report-search-input {
        min-width: 0;
    }

    .categories-report-search-btn {
        white-space: nowrap;
    }

    .categories-report-actions {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .categories-report-add-btn {
        white-space: nowrap;
    }

    @media (max-width: 640px) {
        .categories-report-toolbar {
            flex-direction: column;
            align-items: stretch;
        }

        .categories-report-search {
            width: 100%;
        }

        .categories-report-search-btn,
        .categories-report-add-btn {
            width: auto;
        }
    }

    /* ===== Tabela raportu ===== */

    .categories-report-table thead th {
        vertical-align: middle;
        font-weight: 600;
        font-size: 0.95rem;
        white-space: nowrap;
    }

    .categories-report-table tbody td {
        vertical-align: middle;
        font-size: 0.95rem;
    }

    .categories-report-table .col-name {
        width: 220px;
    }

    .categories-report-table .col-parent {
        width: 220px;
    }

    .categories-report-table .col-active {
        width: 90px;
    }

    .categories-report-table .col-icon {
        width: 140px;
    }

    .categories-report-table .col-actions {
        width: 160px;
    }

    .categories-report-table .btn-outline-dark {
        font-size: 0.85rem;
        padding: 6px 12px;
        border-radius: 999px;
    }

    @media (max-width: 768px) {
        .categories-report-table thead th,
        .categories-report-table tbody td {
            font-size: 0.85rem;
        }
    }

    /* ===== Tabela raportu ===== */

.categories-report-table thead th {
    vertical-align: middle;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.categories-report-table tbody td {
    vertical-align: middle;
    font-size: 0.95rem;

    /* Łamanie tekstu gdy zabraknie miejsca */
    white-space: normal;
    word-break: break-word;
}

/* Usuwamy sztywne szerokości kolumn */
.categories-report-table .col-name,
.categories-report-table .col-parent {
    width: auto !important;
}

/* Zostawiamy tylko kolumny ikon i akcji jako stałe */
.categories-report-table .col-active {
    width: 70px;
}

.categories-report-table .col-icon {
    width: 90px;
}

.categories-report-table .col-actions {
    width: 130px;
}

.categories-report-table .btn-outline-dark {
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 999px;
}

/* Mobile poprawia scaling */
@media (max-width: 768px) {
    .categories-report-table thead th,
    .categories-report-table tbody td {
        font-size: 0.85rem;
    }
}



/* =========================================
   Ustawienia konta – zakładki horyzontalne
   ========================================= */

/* Wrapper całego modułu ustawień */
.si-account-layout {
    max-width: 1296px;
    margin: 0px auto 56px;
    padding: 0;
}

/* Pasek zakładek (ul) – na całą szerokość, w jednej linii */
.si-account-tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap; /* na mniejszych ekranach mogą spaść niżej */
}

/* Każdy element zakładki – równa szerokość */
.si-account-tab-item {
    flex: 1 1 0;
    min-width: 140px;
}

/* Przycisk zakładki – jak btn-white, pełna szerokość */
.si-account-tab-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px 20px;
    border-radius: 16px;
    background: #ffffff;
    color: #111111;
    border: 1px solid #e5e7eb;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 8px 24px -16px rgba(17, 24, 39, .18);
    transition:
        background 0.18s ease,
        transform 0.12s ease,
        box-shadow 0.18s ease;
}

.si-account-tab-btn:hover {
    background: #f2f2f2;
    color: #A83F1F;
    transform: translateY(-1px);
}

/* Aktywna zakładka – jak btn-black */
.si-account-tab-btn.active {
    background: #111111;
    color: #ffffff;
    border-color: #111111;
    box-shadow: 0 14px 32px -18px rgba(0, 0, 0, .45);
}

/* Mobile */
@media (max-width: 575.98px) {
    .si-account-tab-btn {
        font-size: 0.9rem;
        padding: 12px 16px;
    }
}

/* ============================================
   Linki w stylu SprzedajInstrument.pl (pomarańczowe)
   ============================================ */
.si-link {
    color: #A83F1F;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease, text-decoration 0.15s ease;
}

.si-link:hover {
    color: #872f16;
    text-decoration: underline;
}

/* ============================================
   Box informacyjny – spójny z resztą layoutu
   ============================================ */
.si-info-box {
    background: #f8fafc;
    border-left: 4px solid #A83F1F;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #111;
    box-shadow: 0 4px 14px -8px rgba(17, 24, 39, 0.15);
}

.si-info-box a {
    color: #A83F1F;
    font-weight: 600;
}

.si-info-box a:hover {
    text-decoration: underline;
}

/* Naturalny, standardowy rozmiar QR */
#qrCode canvas,
#qrCode img {
    width: 220px !important;
    height: 220px !important;
}

/* Wyrównanie na środku */
#qrCode {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Linki pomarańczowe */
.text-orange,
a.text-orange {
    color: #A83F1F !important;
}

a.text-orange:hover {
    color: #7a2f18 !important;
}

/* zaokrąglenie rogów obrazków */
.si-rounded {
    border-radius: 16px;
}
/* =========================================
   INDEX / STRONA GŁÓWNA
   ========================================= */

#IndexPage {
    max-width: 1296px;
    margin: 0 auto;
}

.index-section {
    margin-bottom: 40px;
}

@media (max-width: 767.98px) {
    #IndexPage {
        padding: 16px 12px 32px;
    }

    .index-section {
        margin-bottom: 32px;
    }
}

/* Ukryj wewnętrzne h3 z komponentów – zostają H1 z IndexPage */
#IndexPage .CstCategories > h3,
#IndexPage .CstNew > h3,
#IndexPage .CstPromoted > h3,
#IndexPage .CstSeen > h3 {
    display: none;
}

/* ============================
   KATEGORIE – 6 w rzędzie
   ============================ */

#IndexPage .CstCategories.category.grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px 2px;
}

/* Link jako pełny kafelek */
#IndexPage .CstCategories.category.grid > a {
    display: block;
    height: 100%;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    color: #111111;
}

/* Wnętrze kafelka kategorii – równe wysokości */
#IndexPage .CstCategories.category.grid .grid-item {
    height: 100%;
    border-radius: 16px;
    background: #ffffff;
    padding: 10px 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    box-shadow: 0 6px 18px -14px rgba(15, 23, 42, 0.18);
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.12s ease;
}

/* Obrazek kategorii */
#IndexPage .CstCategories.category.grid .grid-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin: 0 auto;
}

/* Tytuł kategorii */
#IndexPage .CstCategories.category.grid .grid-item strong {
    display: block;
    margin-top: 2px;
    font-size: 1rem;
    line-height: 1.25;
}

/* Hover – delikatna zmiana tła i cień, bez skakania */
#IndexPage .CstCategories.category.grid > a:hover .grid-item {
    background-color: #f2f2f2;
    box-shadow: 0 8px 22px -16px rgba(15, 23, 42, 0.25);
    transform: translateY(-1px);
}

/* ============================
   RESPONSYWNOŚĆ – KATEGORIE
   ============================ */

@media (max-width: 991.98px) {
    #IndexPage .CstCategories.category.grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 18px;
    }

    #IndexPage .CstCategories.category.grid .grid-item img {
        max-width: 130px;
    }
}

@media (max-width: 575.98px) {
    #IndexPage .CstCategories.category.grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #IndexPage .CstCategories.category.grid .grid-item {
        padding: 10px 6px 12px;
    }

    #IndexPage .CstCategories.category.grid .grid-item img {
        max-width: 110px;
    }

    #IndexPage .CstCategories.category.grid .grid-item strong {
        font-size: 1.15rem;
        font-weight: 600;
    }
}

/* ============================
   BANNER PROMOWANY POD KATEGORIAMI
   ============================ */

.index-section-promo-banner {
    margin-top: 8px;
    padding-top: 0;
}

/* wyzerowanie ewentualnych negatywnych marginesów z komponentu bannera */
.index-section-promo-banner > * {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
}

@media (max-width: 575.98px) {
    .index-section-promo-banner {
        margin-top: 32px;
    }
}

/* ============================
   NAJNOWSZE / PROMOWANE / OSTATNIO
   ============================ */

#IndexPage .CstNew.grid,
#IndexPage .CstPromoted.grid,
#IndexPage .CstSeen.grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px 12px;
}

/* Link jako kontener karty */
#IndexPage .CstNew.grid > a,
#IndexPage .CstPromoted.grid > a,
#IndexPage .CstSeen.grid > a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    position: relative;
    overflow: visible;
    background: transparent;
}

/* Zabicie ewentualnych overlayów z globalnych styli */
#IndexPage .CstNew.grid > a::before,
#IndexPage .CstPromoted.grid > a::before,
#IndexPage .CstSeen.grid > a::before {
    content: none !important;
}

/* Limity elementów */
#IndexPage .CstNew.grid > a:nth-child(n+16) { display: none; }
#IndexPage .CstPromoted.grid > a:nth-child(n+11) { display: none; }
#IndexPage .CstSeen.grid > a:nth-child(n+6) { display: none; }

/* ============================
   KARTA PRODUKTU
   ============================ */

#IndexPage .CstNew .grid-item,
#IndexPage .CstPromoted .grid-item,
#IndexPage .CstSeen .grid-item {
    position: relative;
    height: 100%;
    border-radius: 16px;
    background: #ffffff;
    padding: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    text-align: left;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Upewniamy się, że treść jest ponad tłem */
#IndexPage .CstNew .grid-item *,
#IndexPage .CstPromoted .grid-item *,
#IndexPage .CstSeen .grid-item * {
    position: relative;
    z-index: 1;
}

/* Hover – zmiana tylko tła i cienia (płynnie), nic nie zasłania treści */
#IndexPage .CstNew a:hover .grid-item,
#IndexPage .CstPromoted a:hover .grid-item,
#IndexPage .CstSeen a:hover .grid-item {
    background-color: #f2f2f2;
    box-shadow: 0 10px 28px -20px rgba(15, 23, 42, 0.30);
}

/* Miniatury w kwadracie */
#IndexPage .CstNew .grid-item img,
#IndexPage .CstPromoted .grid-item img,
#IndexPage .CstSeen .grid-item img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    background-color: #f2f2f2;
}

/* Tytuły ofert */
#IndexPage .CstNew .grid-item strong,
#IndexPage .CstPromoted .grid-item strong,
#IndexPage .CstSeen .grid-item strong {
    margin-top: 4px;
    font-size: clamp(0.9rem, 0.85rem + 0.25vw, 1.05rem);
    font-weight: 700;
}

/* Ceny */
#IndexPage .CstNew .grid-item .prices,
#IndexPage .CstPromoted .grid-item .prices,
#IndexPage .CstSeen .grid-item .prices {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    margin-top: 4px;
    font-weight: 800;
}

#IndexPage .CstNew .grid-item .Price,
#IndexPage .CstPromoted .grid-item .Price,
#IndexPage .CstSeen .grid-item .Price {
    color: #A83F1F;
    font-weight: 800;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.1rem);
}

#IndexPage .CstNew .grid-item .oldPrice,
#IndexPage .CstPromoted .grid-item .oldPrice,
#IndexPage .CstSeen .grid-item .oldPrice {
    font-size: 0.9rem;
}

/* ============================
   RESPONSYWNOŚĆ – OFERTY
   ============================ */

@media (max-width: 991.98px) {
    #IndexPage .CstNew.grid,
    #IndexPage .CstPromoted.grid,
    #IndexPage .CstSeen.grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575.98px) {
    #IndexPage .CstNew.grid,
    #IndexPage .CstPromoted.grid,
    #IndexPage .CstSeen.grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================
   BANNER GREY
   ============================ */

.banner-grey {
    margin: 32px auto;
    max-width: 1296px;
    width: 100%;
    border-radius: 20px;
    background-image: url("/images/banners/banner-szary.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 24px 32px;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 24px;
}

.banner-grey-left,
.banner-grey-right {
    flex: 1 1 0;
    font-family: "Montserrat", sans-serif;
    color: #ffffff;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.banner-grey-left {
    border-right: 1px dotted rgba(255, 255, 255, 0.7);
    padding-right: 16px;
}

.banner-grey-right {
    padding-left: 16px;
}

.banner-grey-title {
    font-weight: 800;
    margin-bottom: 10px;
    max-width: 18rem;
    margin-left: auto;
    margin-right: auto;
    font-size: clamp(1rem, 0.95rem + 0.45vw, 1.3rem);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.banner-grey .btn-orange,
.banner-grey .btn-white {
    margin-top: 4px;
}

@media (max-width: 767.98px) {
    .banner-grey {
        padding: 18px 16px;
        flex-direction: column;
    }

    .banner-grey-left {
        border-right: none;
        border-bottom: 1px dotted rgba(255, 255, 255, 0.7);
        padding-bottom: 12px;
        margin-bottom: 8px;
    }

    .banner-grey-right {
        padding-left: 0;
        padding-top: 4px;
    }
}

/* ============================
   DOLNY BANNER – banner-dual
   ============================ */

.banner-dual {
    margin: 40px auto 32px;
    max-width: 1296px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding: 24px 28px;
    border-radius: 20px;
    background: #f2f2f2;
}

.banner-dual-left,
.banner-dual-right {
    flex: 1 1 0;
    min-width: 0;
}

.banner-dual-left img {
    width: 100%;
    border-radius: 16px;
    display: block;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* prawa strona bannera */

.banner-dual-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    align-items: flex-start;
    font-family: "Montserrat", sans-serif;
}

/* Tytuł jak H2 – wielkie litery */
.banner-dual-title {
    font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.6rem);
    font-weight: 900;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.banner-dual-desc {
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    color: #4b5563;
    max-width: 32rem;
}

.banner-dual .btn-black {
    align-self: flex-start;
    margin-top: 4px;
}

@media (max-width: 767.98px) {
    .banner-dual {
        flex-direction: column;
        padding: 20px 18px;
    }

    .banner-dual .btn-black {
        width: 100%;
    }
}

/* 2. Oddzielenie bannera promowanego od kategorii */
.index-section-categories {
    margin-bottom: 24px !important;
}

.index-section-promo-banner {
    margin-top: 0 !important;
    padding-top: 0 !important;
}


/* === Strona Pomoc / FAQ === */

#HelpPage .help-section {
    padding: 24px 0 40px;
}

/* Pojedynczy element pomocy */
#HelpPage .help-item {
    margin-bottom: 16px;
}

/* Pasek pytania – kafelek jak na innych stronach */
#HelpPage .help-trigger {
    width: 100%;
    border: 1px solid var(--si-line, #e5e7eb);
    border-radius: var(--si-radius-lg, 18px);
    background-color: #f2f2f2; /* prośba: szare tło przycisku */
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: clamp(0.98rem, 0.95rem + 0.1vw, 1.06rem);
    color: var(--si-text, #111111);
    text-align: left;
    cursor: pointer;
    box-shadow: 0 18px 45px -28px rgba(15, 23, 42, 0.45);
    transition:
        background-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.08s ease,
        border-color 0.15s ease;
}

#HelpPage .help-title {
    text-decoration: underline;
    text-underline-offset: 3px;
}

#HelpPage .help-arrow {
    margin-left: 12px;
    font-size: 1.15rem;
    transition: transform 0.15s ease, color 0.15s ease;
}

/* Hover / focus */
#HelpPage .help-trigger:hover,
#HelpPage .help-trigger:focus {
    background-color: #f7f7f7;
    box-shadow: 0 22px 52px -30px rgba(15, 23, 42, 0.55);
    outline: none;
}

/* Stan rozwinięty – kolor akcentu jak na innych stronach */
#HelpPage .help-trigger[aria-expanded="true"] {
    background-color: #f2f2f2;
    border-color: var(--si-accent, #A83F1F);
    box-shadow: 0 22px 52px -30px rgba(15, 23, 42, 0.65);
}

#HelpPage .help-trigger[aria-expanded="true"] .help-title {
    color: var(--si-accent, #A83F1F);
}

#HelpPage .help-trigger[aria-expanded="true"] .help-arrow {
    color: var(--si-accent, #A83F1F);
    transform: translateX(3px);
}

/* Treść odpowiedzi pod kafelkiem */
#HelpPage .help-body {
    background-color: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--si-line, #e5e7eb);
    padding: 12px 20px 16px;
    margin-top: 6px;
    font-size: 0.95rem;
    color: var(--si-muted, #4b5563);
    box-shadow: 0 18px 45px -30px rgba(15, 23, 42, 0.25);
}

#HelpPage .help-body p {
    margin-bottom: 10px;
}

#HelpPage .help-body ol,
#HelpPage .help-body ul {
    padding-left: 1.25rem;
    margin-bottom: 6px;
}

#HelpPage .help-body li {
    margin-bottom: 4px;
}

/* Mobile – trochę ciaśniej */
@media (max-width: 767.98px) {
    #HelpPage .help-section {
        padding-top: 18px;
    }

    #HelpPage .help-trigger {
        padding-inline: 14px;
    }

    #HelpPage .help-body {
        padding-inline: 14px;
    }
}