/* === 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;
}

h5 {
    font-weight: 900;
    font-style: normal;
}

h6 {
    font-weight: 900;
    font-style: normal;
}

.breadcrumbs {
       margin: 0px 0 24px;
}

.offer-breadcrumb {
    font-size: .85rem;
    color: #595f6a;
    margin: 10px 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breadcrumb-link {
    color: #A83F1F;
    font-weight: 700;
}

.breadcrumb-link:hover {
    color: #111;
}

.si-layout {
    width: 100%;
    margin: 0;
    padding: 0;
}

.layout-main {
    width: 95vw;
    max-width: 1296px;
    margin: auto;
}

/* Wariant pełnoszerokościowy – Account, Wiadomości, Moje oferty itp. */
.layout-main--full {
    width: 100%;
    overflow-x: hidden; /* zapobiega overflow Bootstrap row z ujemnymi marginesami */
    padding: 0 16px;    /* kompensuje guttery Bootstrap row (12px) + daje oddech wizualny */
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .layout-main--full {
        padding: 0;      /* na desktopie bez paddingu – Bootstrap grid daje własny oddech */
    }
}


/* 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%;
    margin-bottom: 3%;
}

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%;
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 4vw 4%;
    }
}

.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: clamp(0.75rem, 1vw, 1.1rem);
    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%;
}

/* Ceny globalne (np. konwersacje) */
.Price,
.Purchase.Price,
.oldPrice {
    color: #A83F1F;
    font-size: 0.8vw;
    display: inline-block;
    font-weight: 900 !important;
}

.oldPrice {
    text-decoration: line-through !important;
    color: #000 !important;
}

/* Ceny w kartach ofert (strona główna, karuzele) */
.prices {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
    line-height: 1;
}

.prices .oldPrice {
    font-size: 0.75em !important;
    font-weight: 500 !important;
    color: #999 !important;
    text-decoration: line-through !important;
    white-space: nowrap;
    display: inline !important;
}

.prices .Price {
    font-size: 1em !important;
    font-weight: 900 !important;
    color: #A83F1F !important;
    white-space: nowrap;
    display: inline !important;
}

.grid-item a {
    text-decoration: none !important;
}

.grid-item img {
    border-radius: 12px !important;
    margin-bottom: 3%;
}

.grid-item:hover {
    opacity: 70%;
    transition: opacity 0.5s;
}

img {
    width: 100%;
}

/* Ukryj avatar użytkownika w headerze na mobile */
@media (max-width: 575.98px) {
    .header-login .navbar-nav .nav-item img {
        display: none;
    }
}

/* === BUTTONY – poprawione rozmiary, responsywne === */

.btn-orange,
.btn-orange-2 {
    background-color: #A83F1F;
    color: #fff;
    font-weight: 300;
    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: 12px;
    transition: background-color 0.5s;
}

.btn-orange:hover {
    background-color: #8f351a;
    color: #fff;
}

.btn-orange:focus-visible,
.btn-orange-2:focus-visible {
    outline: 3px solid #A83F1F;
    outline-offset: 3px;
    background-color: #8f351a;
}

.btn-orange-2:hover {
    background-color: #8f351a;
    color: #fff;
}

/* =============================
   NOWY PRZYCISK: btn-danger-modern
   (styl identyczny do btn-orange)
   ============================= */

.btn-danger-modern {
    background-color: #c81212;
    color: #fff;
    font-weight: 300;
    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: 12px;
    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-green-modern {
    background-color: #1f8b4c;
    color: #fff;
    font-weight: 300;
    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: 12px;
    transition: background-color 0.5s;
}

.btn-green-modern:hover {
    background-color: #18703d;
    color: #fff;
}

.btn-green-modern:active {
    background-color: #125a31;
    transform: scale(0.97);
}

.btn-green-modern:focus {
    outline: none;
}

.btn-white {
    background-color: #fff;
    color: #A83F1F;
    font-weight: 300;
    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: 12px;
    transition: background-color 0.5s;
}

.btn-white:hover {
    background-color: #e6e6e6;
    color: #111;
}

.btn-white:focus-visible {
    outline: 3px solid #A83F1F;
    outline-offset: 3px;
}

/* ===============================
   SWEETALERT2 – spójne ze stroną
   =============================== */

.swal2-popup {
    font-family: inherit;
    border-radius: 16px;
    padding: 20px 22px 18px;
    box-shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.45);
}

.swal2-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #111;
}

.swal2-html-container {
    font-size: 0.95rem;
    color: #595f6a;
}

.swal2-actions {
    gap: 8px;
}

.swal2-styled {
    border-radius: 12px !important;
    padding: 10px 18px !important;
    font-weight: 300 !important;
    box-shadow: none !important;
}

.swal2-confirm {
    background-color: #A83F1F !important;
    color: #fff !important;
}

.swal2-confirm:focus {
    box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.2) !important;
}

.swal2-cancel {
    background-color: #000 !important;
    color: #fff !important;
}

.swal2-timer-progress-bar {
    background: #A83F1F !important;
}

.swal2-loader {
    border-color: #000000 rgba(0, 0, 0, 0) #000000 rgba(0, 0, 0, 0) !important;
}

.btn-black,
.register-btn-black {
    background-color: #000;
    color: #fff;
    font-weight: 300;
    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: 12px;
    transition: background-color 0.5s;
}

.btn-black:hover,
.register-btn-black:hover {
    background-color: #222;
    color: #fff;
}

.btn-black:focus-visible,
.register-btn-black:focus-visible {
    outline: 3px solid #000;
    outline-offset: 3px;
    background-color: #222;
}

.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-weight: 400;
        text-align: center;
    }

    .carousel-control-prev,
    .carousel-control-next {
        background-color: #A83F1F;
        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: 50px;       /* ok. 2 linie */
    max-height: 50px;
    display: flex;          /* FLEX zamiast webkit-box */
    justify-content: center;/* horyzontalnie */
    align-items: center;    /* PIONOWO! */
    text-align: center;
    padding: 0 6px;
    font-size: clamp(0.95rem, 0.92rem + 0.25vw, 1.05rem);
    line-height: 1.25;
}

/* 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: 16px !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 .addoredit-intro {
    max-width: 860px;
    margin: 0 auto 20px;
    text-align: center;
    color: #595f6a;
    font-size: 1rem;
    line-height: 1.7;
}

#AddOrEdit .addoredit-card {
    max-width: none;
    padding: 0;
    border: none !important;
    border-radius: 0;
    box-shadow: none;
    background: transparent !important;
}

#AddOrEdit .addoredit-setup-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 40px;
    align-items: start;
    margin: 20px 0 24px;
}

#AddOrEdit .addoredit-setup-panel {
    min-width: 0;
}

#AddOrEdit .addoredit-media-panel {
    padding-left: 40px;
    border-left: 1px solid rgba(17, 24, 39, 0.08);
}

#AddOrEdit .addoredit-panel-copy {
    margin-bottom: 18px;
}

#AddOrEdit .addoredit-panel-title {
    margin: 0 0 10px;
    font-size: clamp(1.2rem, 1.05rem + 0.45vw, 1.55rem);
    font-weight: 800;
    line-height: 1.15;
    color: #111827;
}

#AddOrEdit .addoredit-section-title {
    display: block;
    margin: 0 0 12px;
    font-size: clamp(1.2rem, 1.05rem + 0.45vw, 1.55rem);
    font-weight: 800;
    line-height: 1.15;
    color: #111827;
}

#AddOrEdit .addoredit-setup-panel .addoredit-helper {
    margin: 0;
    max-width: 46ch;
}

#AddOrEdit .addoredit-panel-button,
#AddOrEdit .addoredit-photo-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 22px;
}

#AddOrEdit .addoredit-photo-trigger {
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-weight: 700;
    text-decoration: none;
}

#AddOrEdit .addoredit-photo-trigger .bi {
    font-size: 1.1rem;
    line-height: 1;
}

#AddOrEdit .addoredit-photo-trigger:hover {
    text-decoration: none;
}

#AddOrEdit .addoredit-selected-category {
    margin-top: 14px;
    color: #111827;
    line-height: 1.5;
}

#AddOrEdit label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #111827;
}

#AddOrEdit .addoredit-helper {
    margin: 10px 0 18px;
    color: #595f6a;
    font-size: 0.94rem;
    line-height: 1.6;
}

#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 .category-param {
    position: relative;
}

#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 {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    min-height: 52px !important;
    padding-right: 52px !important;
    line-height: 1.2 !important;
    cursor: pointer !important;
    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>") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    background-size: 18px 18px !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;
}

#AddOrEdit .addoredit-media-panel .gallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

#AddOrEdit .addoredit-media-panel .image-box {
    width: 100%;
    height: auto;
    min-height: 140px;
}

/* 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: #595f6a !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;
}

#AddOrEdit .addoredit-submit-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 28px !important;
    padding-top: 10px;
}

/* DO NEGOCJACJI */

#AddOrEdit .price-input-wrap {
    margin-bottom: 6px;
}

#PriceInput::-webkit-outer-spin-button,
#PriceInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
#PriceInput {
    -moz-appearance: textfield;
}

#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: 16px;
    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: 992px) {
    #AddOrEdit .addoredit-setup-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    #AddOrEdit .addoredit-media-panel {
        padding-left: 0;
        padding-top: 28px;
        border-left: none;
        border-top: 1px solid rgba(17, 24, 39, 0.08);
    }

    #AddOrEdit .addoredit-media-panel .gallery {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    #AddOrEdit .addoredit-media-panel .gallery {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
}

@media (max-width: 576px) {
    #AddOrEdit .addoredit-setup-grid {
        gap: 26px;
    }

    #AddOrEdit .addoredit-card {
        padding: 0;
        border-radius: 0;
    }

    #AddOrEdit .addoredit-submit-bar {
        justify-content: stretch;
    }

    #AddOrEdit .addoredit-submit-bar .btn-orange {
        width: 100%;
    }

    #AddOrEdit .addoredit-panel-button,
    #AddOrEdit .addoredit-photo-trigger {
        width: 100%;
    }

    #AddOrEdit .addoredit-media-panel .gallery {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
    }

    #AddOrEdit .addoredit-media-panel .image-box {
        min-height: 120px;
    }
}

/* 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: #A83F1F;
        font-weight: 600;
    }

/* ======================= DODANE: GLOBALNY TYTUŁ UŻYTKOWNIKA ======================= */

.Users-title {
    text-align: center;
    margin: 28px 0 10px;
    padding-bottom: 2%;
}


/* =========================================
   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: #595f6a;
}

/* 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: 16px;
    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 FILTERS – Layout filtrów i wyników
   ========================================= */

/* ===============================
   KARTA FILTRÓW
   =============================== */

.category-filters-inner {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 45px -28px rgba(15, 23, 42, 0.25);
    margin-bottom: 20px;
    padding: 16px 18px 14px;
    box-sizing: border-box;
}

/* ===============================
   NAGŁÓWEK
   =============================== */

.category-filters-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Przycisk zwijania */
.filters-toggle {
    background: none;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #A83F1F;
    cursor: pointer;
    padding: 4px 6px;
}

/* ===============================
   GRID PARAMETRÓW – JEDYNY GRID
   =============================== */

#CategoryPage #CategoriesParameters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}

/* Nagłówek "Parametry" ma iść na całą szerokość */
#CategoryPage #CategoriesParameters > h3 {
    grid-column: 1 / -1;
    margin: 0 0 8px;
}

/* Wrapper potrzebny dla JS, ale NIE dla layoutu */
.category-parameters-list {
    display: contents;
}

/* ===============================
   POJEDYNCZY PARAMETR
   =============================== */

.category-param {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

/* Label */
.category-param label {
    font-size: 0.9rem;
    margin-bottom: 4px;
    color: #4b5563;
}

/* Select */
.category-param select {
    width: 100%;
}

/* ===============================
   ZWIJANIE
   =============================== */


.category-filters.is-collapsed #CategoriesParameters {
    display: none;
}

/* ===============================
   RESPONSYWNOŚĆ
   =============================== */

@media (max-width: 992px) {
    #CategoryPage #CategoriesParameters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    #CategoryPage #CategoriesParameters {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   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: #595f6a;
}

/* Sortowanie */
.category-results-sort {
    min-width: 0;
}

.category-results-sort-inner {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.category-results-sort form {
    margin: 0;
    display: flex;
    align-items: center;
}

.category-results-sort .mt-3 {
    margin-top: 0 !important;
}

.category-sort-label {
    font-size: 0.9rem;
    color: #595f6a;
}

/* Ukrywamy label z partiala */
.category-results-sort label {
    display: none !important;
}

/* Select sortowania */
.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;
}

.category-pagination > .d-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.category-pagination form {
    margin: 0;
}

/* Przyciski */
.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;
}

/* Limit */
.category-pagination form[action*="ChangeLimit"] {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-pagination form[action*="ChangeLimit"]::before {
    content: "Na stronę:";
    font-size: 0.9rem;
    color: #595f6a;
}

.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: #595f6a;
}

/* =========================================
   PAGINACJA – linki
   ========================================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 6px;
    flex-wrap: wrap;
}

.pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #e6e6e6;
    background: #f5f5f5;
    color: #111;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.pagination a:hover {
    background: #eaeaea;
    text-decoration: none;
}

.pagination a.active {
    background: #222;
    color: #fff;
    font-weight: 700;
    border-color: #222;
}

.pagination a:first-child,
.pagination a:last-child {
    font-weight: 700;
}

@media (max-width: 640px) {
    .pagination {
        gap: 8px;
    }

    .pagination a {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
    }
}
/* ======================= 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;
}

/* ========================
   STATYSTYKI MODERATORA
   ======================== */

.mod-stats {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.mod-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 14px 10px;
    border-radius: 16px;
    background: #f2f2f2;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.mod-stat-card:hover {
    background: #e8e8e8;
    border-color: #d0d0d0;
}

.mod-stat-card.active {
    background: #fff;
    border-color: #A83F1F;
}

.mod-stat-label {
    color: #595f6a;
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.2;
}

.mod-stat-value {
    color: #111;
    font-size: clamp(1.3rem, 1rem + 0.8vw, 1.8rem);
    font-weight: 800;
    line-height: 1;
}

.mod-stat-card.active .mod-stat-value {
    color: #A83F1F;
}

@media (max-width: 900px) {
    .mod-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 576px) {
    .mod-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 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: 16px;
    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 auto;
    column-gap: 16px;
    row-gap: 10px;
    min-height: 140px;
    align-items: start;
}

/* Tytuł – responsywne ~22px na desktopie */

.offers-page .item-title {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.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 / -1;
    grid-row: 2;
    display: flex;
    gap: 18px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}

.offers-page .item-actions .btn-edit:not(.btn-black) {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #111;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
}

.offers-page .item-actions .btn-edit:not(.btn-black):hover {
    text-decoration: underline;
}

.offers-page .item-actions .btn-edit.btn-black,
.offers-page .item-actions .btn-orange,
.offers-page .item-actions .btn-danger-modern,
.offers-page .item-actions .btn-green-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    text-align: center;
}

.offers-page .item-actions .btn-edit.btn-black:hover,
.offers-page .item-actions .btn-orange:hover,
.offers-page .item-actions .btn-danger-modern:hover,
.offers-page .item-actions .btn-green-modern:hover {
    text-decoration: none;
}

.offers-page .item-actions input.btn-orange,
.offers-page .item-actions input.btn-danger-modern,
.offers-page .item-actions input.btn-green-modern {
    -webkit-appearance: none;
    appearance: none;
}

.offers-page .item-meta {
    grid-column: 1 / -1;
    grid-row: 3;
    color: #6b6b6b;
    font-size: 0.95rem;
    align-self: start;
    margin: 0;
}

/* Link do sprzedawcy na karcie oferty */
.item-meta a {
    color: #A83F1F;
    font-weight: 700;
    text-decoration: none;
}

/* ========================
   META MODERATORA
   ======================== */

.mod-offer-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0;
}

.mod-offer-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #6b6b6b;
    line-height: 1.4;
}

.mod-offer-meta-label {
    color: #6b6b6b;
    white-space: nowrap;
}

.mod-offer-seller-link {
    color: #A83F1F;
    font-weight: 600;
    text-decoration: none;
}

.mod-offer-seller-link:hover {
    text-decoration: underline;
}

/* ========================
   BADGE STATUSU OFERTY
   ======================== */

.item-meta-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
}

.offers-page .item-meta {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.offer-status-label {
    font-size: 0.85rem;
    color: #6b6b6b;
    white-space: nowrap;
}
.offer-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    vertical-align: middle;
}
/* Zarejestrowana */
.offer-status-10 { background: #dbeafe; color: #1d4ed8; }
/* Do weryfikacji */
.offer-status-20 { background: #fef3c7; color: #b45309; }
/* Opublikowana */
.offer-status-30 { background: #dcfce7; color: #15803d; }
/* Zarezerwowana */
.offer-status-40 { background: #ffedd5; color: #A83F1F; }
/* Sprzedana */
.offer-status-50 { background: #ede9fe; color: #6d28d9; }
/* Opłacona */
.offer-status-60 { background: #ede9fe; color: #6d28d9; }
/* Wysłana */
.offer-status-70 { background: #e0f2fe; color: #0369a1; }
/* Otrzymana */
.offer-status-90 { background: #e0f2fe; color: #0369a1; }
/* Zakończona */
.offer-status-100 { background: #f3f4f6; color: #4b5563; }
/* Usunięta */
.offer-status-0 { background: #fee2e2; color: #b91c1c; }

.item-meta a:hover {
    text-decoration: underline;
}

.offers-page .price {
    grid-column: 2;
    grid-row: 1;
    font-weight: 800;
    font-size: clamp(1.4rem, 1.1rem + 0.8vw, 2.1rem);
    color: #A83F1F;
    white-space: nowrap;
    align-self: start;
    justify-self: end;
    margin: 0;
}

/* Paginacja */

.offers-page .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 6px;
    flex-wrap: wrap;
}

.offers-page #pagination {
    width: min(100%, 920px);
    margin-inline: auto;
    row-gap: 14px;
}

.offers-page #page-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    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;
    min-height: 56px;
    min-width: 56px;
    padding: 0 22px;
    border-radius: 16px;
    cursor: pointer;
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    line-height: 1;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.offers-page #page-buttons button {
    padding: 0;
}

.offers-page #pagination button:hover:not(.active),
.offers-page #pagination input[type="button"]:hover:not(:disabled) {
    background: #ececec;
    border-color: #d9d9d9;
}

.offers-page #pagination .active {
    background: #222;
    color: #fff;
    font-weight: 700;
    border-color: #222;
}

.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;
}

/* ======================= USER / RATING ======================= */

.rating-page .page-h1 {
    text-align: center;
}

.rating-page .observed-tabs {
    justify-content: center;
    gap: 12px;
    border-bottom: none;
}

.rating-page .observed-tabs .nav-link {
    border-radius: 999px;
    background: #f2f2f2;
    border: 1px solid #e5e7eb;
    padding: 10px 18px;
    font-weight: 600;
    color: #111;
}

.rating-page .observed-tabs .nav-link.active {
    background: #111;
    color: #fff;
    border-color: #111;
    box-shadow: 0 10px 22px -14px rgba(0, 0, 0, 0.45);
}

.rating-filters {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    justify-content: flex-end;
}

.rating-filters-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rating-filters .form-select {
    background: #f2f2f2;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 10px 14px;
    font-size: 0.95rem;
    min-width: 180px;
    color: #111;
}

.rating-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rating-card {
    background: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 12px 26px -22px rgba(15, 23, 42, 0.4);
}

.rating-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.rating-score-label {
    font-weight: 700;
    color: #111;
}

.rating-type {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #595f6a;
    text-transform: uppercase;
}

.rating-comment {
    margin: 8px 0 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    color: #111;
}

.rating-details {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 8px;
}

.rating-details li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px 12px;
}

.rating-details li > span {
    font-weight: 600;
    color: #595f6a;
}

.rating-meta {
    margin-top: 12px;
    display: grid;
    gap: 4px;
    color: #595f6a;
    font-size: 0.9rem;
}

.rating-meta a {
    color: #111;
    font-weight: 600;
    text-decoration: none;
}

.rating-meta a:hover {
    text-decoration: underline;
}

.rating-stars {
    position: relative;
    display: inline-block;
    line-height: 1;
    font-size: 16px;
}

.rating-stars .stars-bg {
    color: #c9c9c9;
}

.rating-stars .stars-fg {
    color: #f5a623;
    position: absolute;
    inset: 0 0 0 0;
    width: 0;
    overflow: hidden;
    white-space: nowrap;
    pointer-events: none;
}

.rating-stars .fa {
    margin-right: 2px;
}

@media (max-width: 768px) {
    .rating-filters {
        justify-content: flex-start;
    }

    .rating-filters-form {
        width: 100%;
    }

    .rating-filters .form-select {
        width: 100%;
        min-width: 0;
    }

    .rating-card {
        padding: 14px;
    }

    .rating-details li {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ======================= MODERATOR / PROMOTED ======================= */

/* Miniatura w tabeli */
.promoted-thumb {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.promoted-muted {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Kolumna nazwy */
.promoted-name-cell {
    font-weight: 600;
}

/* Data w tabeli */
.sysmsg-date-text {
    font-size: 0.82rem;
    color: #374151;
    white-space: nowrap;
}

/* Status aktywne / zakończone */
.promoted-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.promoted-status.is-active {
    background: #dcfce7;
    color: #15803d;
}

.promoted-status.is-ended {
    background: #f3f4f6;
    color: #595f6a;
}

/* Podgląd obrazka w formularzu */
.promoted-preview {
    display: block;
    width: 100%;
    max-width: 240px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    margin: 8px 0 12px;
    background: #fff;
}

/* Input pliku */
.promoted-file-input {
    padding: 8px 14px !important;
    cursor: pointer;
}

.promoted-file-hint {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* Tabela – minimalna szerokość na mobile */
@media (max-width: 600px) {
    .promoted-table {
        min-width: 700px;
    }
}

/* 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;
        grid-template-rows: auto auto auto auto;
        column-gap: 0;
        row-gap: 8px;
    }

    .offers-page .item-title {
        grid-column: 1;
        grid-row: 1;
    }

    .offers-page .price {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
        align-self: start;
    }

    .offers-page .item-actions {
        grid-column: 1;
        grid-row: 3;
    }

    .offers-page .item-meta {
        grid-column: 1;
        grid-row: 4;
    }
}

/* ===== OGŁOSZENIA NIEAKTYWNE ===== */

/* status 100 – zakończone */
.offers-page .offer-card[data-status="100"] {
    background: #f8f8f8;
    border-color: #e3e3e3;
}

.offers-page .offer-card[data-status="100"] .item-thumb img {
    filter: grayscale(100%);
    opacity: 0.55;
}

.offers-page .offer-card[data-status="100"] .item-title h5,
.offers-page .offer-card[data-status="100"] .item-meta {
    color: #7b7b7b;
}

.offers-page .offer-card[data-status="100"] .price {
    color: #9a684f;
}

/* USER / Purchased – korzysta z layoutu Offers */
.purchase-page .myaccount-subtitle {
    text-align: center;
}

/* ======================= RATING MODAL ======================= */

.rating-modal .modal-dialog {
    max-width: 720px;
}

.rating-modal .modal-content {
    border: none;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(17, 24, 39, 0.22);
}

.rating-modal .modal-header {
    padding: 26px 28px 12px;
    border-bottom: none;
    align-items: flex-start;
}

.rating-modal .rating-modal-heading {
    display: grid;
    gap: 6px;
}

.rating-modal .rating-modal-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    background: #f4e5de;
    color: #a83f1f;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.rating-modal .modal-title {
    margin: 0;
    font-size: clamp(1.35rem, 1.2rem + 0.5vw, 1.8rem);
    font-weight: 800;
    line-height: 1.1;
    color: #111;
}

.rating-modal .btn-close {
    opacity: 0.5;
    margin: 2px 0 0 auto;
    box-shadow: none;
}

.rating-modal .btn-close:hover {
    opacity: 1;
}

.rating-modal .modal-body {
    padding: 8px 28px 26px;
}

.rating-modal .rating-modal-intro {
    background: linear-gradient(180deg, #faf6f3 0%, #f7f7f7 100%);
    border: 1px solid #efe5df;
    border-radius: 20px;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.rating-modal .text-muted {
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.65;
    color: #5f6471 !important;
}

.rating-modal .rating-modal-hint {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #111;
}

.rating-modal .rating-criterion-card,
.rating-modal .rating-comment-card {
    background: #f2f2f2;
    border-radius: 16px;
    padding: 16px 18px;
}

.rating-modal .mb-3 {
    margin-bottom: 12px !important;
}

.rating-modal .form-label {
    display: block;
    margin: 0 0 10px !important;
    color: #111;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.5;
}

.rating-modal .rating-comment,
.rating-modal textarea.form-control {
    min-height: 128px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 0.96rem;
    background: #fff;
    resize: vertical;
    box-shadow: none;
}

.rating-modal .rating-comment:focus,
.rating-modal textarea.form-control:focus {
    border-color: #a83f1f;
    box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.12);
}

.rating-modal .star-rating {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.rating-modal .star-rating i {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #d5d8df;
    font-size: 1.35rem;
    cursor: pointer;
    transition: transform 0.18s ease, color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.rating-modal .star-rating i:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 10px 18px -14px rgba(17, 24, 39, 0.45);
}

.rating-modal .star-rating i.selected {
    background: #fff4e8;
    color: #e27a35;
}

.rating-modal .rating-modal-note {
    background: #111;
    color: #fff;
    border-radius: 16px;
    padding: 14px 16px;
}

.rating-modal .rating-modal-note label {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    font-weight: 500;
}

.rating-modal .modal-footer {
    border-top: none;
    padding: 0 28px 28px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

@media (max-width: 767.98px) {
    .rating-modal .modal-header {
        padding: 22px 18px 10px;
    }

    .rating-modal .modal-body {
        padding: 8px 18px 20px;
    }

    .rating-modal .modal-footer {
        padding: 0 18px 20px;
        flex-direction: column-reverse;
    }

    .rating-modal .modal-footer .btn-black,
    .rating-modal .modal-footer .btn-orange {
        width: 100%;
    }

    .rating-modal .star-rating {
        gap: 8px;
        justify-content: space-between;
    }

    .rating-modal .star-rating i {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}
/* =========================================
   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;
    min-width: 0;
}

#CategoryPage .category-filters select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 20px;
    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);
}

#PromotedCategories {
    --subcategory-gap: 8px;
    --subcategory-arrow-size: 44px;
    position: relative;
    overflow: visible;
}

#PromotedCategories .carousel-inner {
    display: flex;
    gap: var(--subcategory-gap);
    overflow-x: auto;
    overflow-y: visible;
    padding: 2px 0;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#PromotedCategories .carousel-inner::-webkit-scrollbar {
    display: none;
}

#PromotedCategories .carousel-item {
    flex: 0 0 calc((100% - (var(--subcategory-gap) * 5)) / 6);
    display: block;
    margin-right: 0;
    scroll-snap-align: start;
}

#PromotedCategories .carousel-item a {
    display: block;
    text-decoration: none;
}

#PromotedCategories .card {
    width: 100%;
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
}

#PromotedCategories .card img {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

#PromotedCategories .card-body {
    padding: 10px 8px 12px;
}

#PromotedCategories h5.card-title {
    min-height: 42px;
    max-height: 42px;
    padding: 0 2px;
    font-size: clamp(0.82rem, 0.78rem + 0.14vw, 0.9rem);
    line-height: 1.15;
}

#PromotedCategories .carousel-control-prev,
#PromotedCategories .carousel-control-next {
    position: absolute;
    top: 50%;
    width: var(--subcategory-arrow-size);
    height: var(--subcategory-arrow-size);
    min-width: var(--subcategory-arrow-size);
    min-height: var(--subcategory-arrow-size);
    padding: 0;
    border-radius: 50%;
    background-color: #A83F1F;
    box-shadow: 0 12px 28px -18px rgba(17, 24, 39, 0.55);
    transform: translateY(-50%);
    z-index: 3;
}

#PromotedCategories .carousel-control-prev {
    left: calc(var(--subcategory-arrow-size) * -0.5);
}

#PromotedCategories .carousel-control-next {
    right: calc(var(--subcategory-arrow-size) * -0.5);
}

#PromotedCategories .carousel-control-prev-icon,
#PromotedCategories .carousel-control-next-icon {
    width: 16px;
    height: 16px;
    background-size: 16px 16px;
}

#PromotedCategories .carousel-control-prev[hidden],
#PromotedCategories .carousel-control-next[hidden] {
    display: none !important;
}

.category-empty-state {
    margin-top: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 24px 22px;
    background: linear-gradient(180deg, #fafafa 0%, #f2f2f2 100%);
    text-align: center;
}

.category-empty-title {
    margin: 0 0 12px;
    font-size: clamp(1rem, 0.94rem + 0.25vw, 1.15rem);
    font-weight: 700;
    line-height: 1.5;
    color: #111;
}

.category-empty-link {
    color: #A83F1F;
    font-weight: 700;
    text-decoration: none;
}

.category-empty-link:hover {
    color: #111;
    text-decoration: underline;
}

/* =========================================
   RESPONSYWNOŚĆ
   ========================================= */

@media (max-width: 768px) {
    .category-layout {
        grid-template-columns: 1fr;
    }

    .category-filters {
        order: 1;
        box-sizing: border-box;
    }

    .category-results {
        order: 2;
    }

    .category-results-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-results-sort-inner {
        justify-content: flex-start;
    }

    #PromotedCategories .carousel-item {
        flex-basis: calc((100% - (var(--subcategory-gap) * 3)) / 4);
    }

    #PromotedCategories .carousel-control-prev {
        left: -14px;
    }

    #PromotedCategories .carousel-control-next {
        right: -14px;
    }
}

@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;
    }

    #PromotedCategories .carousel-inner {
        scroll-padding-left: 0;
    }

    #PromotedCategories .carousel-item {
        flex-basis: min(62vw, 210px);
    }

    #PromotedCategories .carousel-control-prev,
    #PromotedCategories .carousel-control-next {
        display: none !important;
    }

    .category-pagination > .d-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-pagination-count {
        text-align: left;
    }

    .category-empty-state {
        padding: 20px 16px;
    }
}

/* ====== DODANE GLOBALNIE (bezpieczne): drobne utility ====== */

.btn {
    cursor: pointer;
}

.btn-outline {
    background: #fff;
    color: #111;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 300;
}

.btn-outline:hover {
    background: #e6e6e6;
    color: #111;
    border-color: #d4d4d8;
}

.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 – desktop + mobile accordion       */
/* ========================================= */

/* ===== DESKTOP ===== */

/* Bootstrap container override – pełna szerokość viewportu */
#navbarContainer .container {
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
}

#navbarContainer .navbar-main {
    display: block;
    width: 100%;
    max-width: 1296px; /* wyrównany do headera */
    margin-left: auto;
    margin-right: auto;
}

#navbarContainer .navbar-user-desktop,
#navbarContainer .navbar-admin-desktop {
    width: 100%;
    margin-bottom: 12px;
    display: block;
}

#navbarContainer .navbar-user-row,
#navbarContainer .navbar-admin-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
}

/* Admin row: zawijanie gdy przyciski nie mieszczą się (overflow-x: auto niszczy dropdown) */
#navbarContainer .navbar-admin-row {
    flex-wrap: wrap;
    row-gap: 6px;
}

#navbarContainer .navbar-user-row > li,
#navbarContainer .navbar-admin-row > li {
    flex: 1 1 0;
}

#navbarContainer .btn-user-tab {
    display: block;
    width: 100%;
    padding: 10px 14px;
    background-color: #f2f2f2;
    border-radius: 12px;
    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;
}

#navbarContainer .btn-user-tab:hover {
    background-color: #e3e3e3;
    color: #111;
}

/* ── NIEPRZECZYTANE WIADOMOŚCI – stan przycisku ── */
@keyframes si-unread-pulse {
    0%, 100% {
        box-shadow:
            0 8px 24px -16px rgba(17, 24, 39, 0.18),
            0 0 0 1.5px #A83F1F,
            0 0 0 2px rgba(168, 63, 31, 0.35);
    }
    50% {
        box-shadow:
            0 8px 24px -16px rgba(17, 24, 39, 0.18),
            0 0 0 1.5px #A83F1F,
            0 0 0 6px rgba(168, 63, 31, 0);
    }
}

#navbarContainer .btn-user-tab:has(#unreadIcons[style*="inline"]) {
    background-color: #F9F0EE;
    color: #A83F1F;
    position: relative;
    animation: si-unread-pulse 1.8s ease-in-out infinite;
}

#navbarContainer .btn-user-tab:has(#unreadIcons[style*="inline"]):hover {
    background-color: #f0e0d8;
    color: #A83F1F;
}

/* dymek */
#navbarContainer .btn-user-tab:has(#unreadIcons[style*="inline"])::after {
    content: "Masz nową wiadomość!";
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #A83F1F;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 8px;
    pointer-events: none;
    z-index: 200;
}

/* strzałka dymka */
#navbarContainer .btn-user-tab:has(#unreadIcons[style*="inline"])::before {
    content: "";
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #A83F1F;
    pointer-events: none;
    z-index: 200;
}

#navbarContainer .admin-btn {
    display: block;
    width: 100%;
    text-align: center;
}

/* ukryte globalnie (desktop) */
#navbarContainer .mobile-accordion-header {
    display: none;
}

/* ========================================= */
/* MOBILE – ACCORDION                        */
/* ========================================= */

@media (max-width: 900px) {

    #navbarContainer .navbar-main {
        max-width: 100%;
        margin: auto;
    }

    /* ================================ */
    /* NAGŁÓWKI ACCORDIONÓW             */
    /* ================================ */

    #navbarContainer .mobile-accordion-header {
        display: block;
        padding: 12px 16px;
        border-radius: 12px;
        font-weight: 600;
        text-align: center;
        cursor: pointer;
        position: relative;
        margin-bottom: 6px;
        color: #ffffff;
    }

    /* strzałka */
    #navbarContainer .mobile-accordion-header::after {
        content: "▾";
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0.85;
        transition: transform 0.2s ease;
    }

    /* MOJE KONTO – jak btn-orange */
    #navbarContainer .navbar-user-desktop > .mobile-accordion-header {
        background-color: #A83F1F;
    }

    /* PANEL ADMINISTRACYJNY – jak btn-black */
    #navbarContainer .navbar-admin-desktop > .mobile-accordion-header {
        background-color: #111111;
    }

    /* obrót strzałki w stanie otwartym */
    #navbarContainer [data-mobile-accordion].is-open
    .mobile-accordion-header::after {
        transform: translateY(-50%) rotate(180deg);
    }

    /* ================================ */
    /* ACCORDION – ZWIJANIE SEKCJI      */
    /* ================================ */

    /* DOMYŚLNIE ZWINIĘTE */
    #navbarContainer [data-mobile-accordion] > ul,
    #navbarContainer [data-mobile-accordion] .admin-buttons-container {
        display: none !important;
    }

    /* STAN OTWARTY */
    #navbarContainer [data-mobile-accordion].is-open > ul,
    #navbarContainer [data-mobile-accordion].is-open .admin-buttons-container {
        display: block !important;
    }

    /* ================================ */
    /* WYGLĄD ELEMENTÓW W ŚRODKU        */
    /* ================================ */

    #navbarContainer [data-mobile-accordion] ul {
        padding: 0;
        margin: 0;
    }

    #navbarContainer [data-mobile-accordion] li {
        margin-bottom: 6px;
    }

    #navbarContainer .btn-user-tab,
    #navbarContainer .admin-btn {
        background-color: #f2f2f2;
        color: #111;
        border-radius: 12px;
        box-shadow: none;
    }

    /* WYLOGUJ – zachowuje kolor akcji */
    #navbarContainer .nav-logout-btn {
        background-color: #A83F1F !important;
        color: #ffffff !important;
    }

    /* ================================ */
    /* DROPDOWNY: OGŁOSZENIA / KONTO    */
    /* ================================ */

    /* dropdowny ZAWSZE zwinięte */
    #navbarContainer .dropdown-menu {
        display: none;
        position: static;
        box-shadow: none;
        margin-top: 6px;
        padding: 8px;
        border-radius: 12px;
        background-color: #ffffff;
    }

    /* pokazuj dropdown tylko gdy kliknięty */
    #navbarContainer .dropdown.is-open > .dropdown-menu {
        display: block !important;
    }

    #navbarContainer .dropdown-menu .dropdown-item {
        padding: 8px 10px;
        border-radius: 8px;
    }

    #navbarContainer .dropdown-divider {
        margin: 8px 0;
    }

    /* ================================ */
    /* PANEL ADMINA – PRZYCISKI PIONOWO */
    /* ================================ */

    #navbarContainer .navbar-admin-row {
        flex-direction: column !important;
        gap: 6px;
    }

    #navbarContainer .navbar-admin-row > li {
        flex: 0 0 auto !important;
        width: 100%;
    }

    #navbarContainer .navbar-admin-row .admin-btn {
        width: 100%;
    }

    /* ukryj dymek "Masz nową wiadomość" na mobile – zakłóca layout accordionu */
    #navbarContainer .btn-user-tab:has(#unreadIcons[style*="inline"])::after,
    #navbarContainer .btn-user-tab:has(#unreadIcons[style*="inline"])::before {
        display: none;
    }
}

/* ================================================
   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, #595f6a);
}

/* ===== 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, #595f6a);
}

#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, #595f6a);
}

/* ===== Sekcje my account ===== */

.myaccount-section {
    margin-bottom: 20px;
}

.myaccount-section-title {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #111;
}

.myaccount-section-desc {
    margin: 0 0 12px;
    font-size: 0.95rem;
    color: var(--si-muted, #595f6a);
}

/* External Logins – wyróżniona sekcja dodawania */
.external-logins-add {
    background: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px 16px;
    text-align: center;
}

.external-logins-add .myaccount-section-header {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: nowrap;
}

.external-logins-add .myaccount-section-title {
    margin: 0;
}

.external-logins-add .myaccount-section-desc {
    margin: 0;
}

/* ===== External Logins ===== */

.external-logins-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.external-login-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.external-login-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.external-login-name {
    font-weight: 700;
    color: #111;
}

.external-login-note {
    font-size: 0.85rem;
    color: #595f6a;
}

.external-login-actions form {
    margin: 0;
}

.external-logins-providers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.external-login-btn {
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 300;
}

@media (max-width: 640px) {
    .external-login-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .external-logins-providers {
        flex-direction: column;
    }

    .external-login-btn {
        width: 100%;
        text-align: center;
    }

    .external-logins-add .myaccount-section-header {
        flex-wrap: wrap;
        text-align: center;
    }
}

/* ===== 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;
    }
}


/* === 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, #595f6a);
}

/* 2FA – wycentrowanie modułu aplikacji uwierzytelniającej */
#MyAccount .twofa-app-section {
    text-align: center;
}

#MyAccount .twofa-app-section .category-section-desc {
    max-width: 680px;
    margin: 0 auto 12px;
}

#MyAccount .twofa-app-actions {
    justify-content: 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;
    /* reset button styles */
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.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.
   ================================================ */

/* External login (Google) – klasyczny przycisk pełnej szerokości */
#LoginPage .external-login-form,
#RegisterPage .external-login-form {
    margin-top: 14px;
}

#LoginPage .auth-google-btn,
#RegisterPage .auth-google-btn,
#MyAccount .auth-google-btn {
    width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 12px;
    background: #ffffff;
    color: #3c4043;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}

#LoginPage .auth-google-btn:hover,
#RegisterPage .auth-google-btn:hover,
#MyAccount .auth-google-btn:hover {
    background: #f8f9fa;
    border-color: #c4c7c5;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15);
}

#LoginPage .auth-google-btn:focus-visible,
#RegisterPage .auth-google-btn:focus-visible,
#MyAccount .auth-google-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.25);
}

#LoginPage .auth-google-icon,
#RegisterPage .auth-google-icon,
#MyAccount .auth-google-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxOCIgaGVpZ2h0PSIxOCIgdmlld0JveD0iMCAwIDQ4IDQ4Ij48cGF0aCBmaWxsPSIjRUE0MzM1IiBkPSJNMjQgOS41YzMuNTQgMCA2LjcgMS4yMiA5LjE5IDMuMjJsNi44NS02Ljg1QzM1LjczIDIuMiAzMC4yIDAgMjQgMCAxNC42IDAgNi40IDUuMzggMi41IDEzLjIybDcuOTggNi4xOUMxMi41NCAxMi42MiAxNy44NCA5LjUgMjQgOS41eiIvPjxwYXRoIGZpbGw9IiM0Mjg1RjQiIGQ9Ik00Ni4xIDI0LjVjMC0xLjU2LS4xNC0zLjA3LS40LTQuNUgyNHY5aDEyLjVjLS41NCAyLjktMi4xOCA1LjM2LTQuNjYgNy4wMmw3LjU1IDUuODZDNDMuOSAzNy4zNiA0Ni4xIDMxLjM2IDQ2LjEgMjQuNXoiLz48cGF0aCBmaWxsPSIjRkJCQzA1IiBkPSJNMTAuNDggMjguNTljLS40OC0xLjQ0LS43Ni0yLjk4LS43Ni00LjU5cy4yOC0zLjE1Ljc2LTQuNTlMMi41IDEzLjIyQy44OCAxNi40NCAwIDIwLjA3IDAgMjRzLjg4IDcuNTYgMi41IDEwLjc4bDcuOTgtNi4xOXoiLz48cGF0aCBmaWxsPSIjMzRBODUzIiBkPSJNMjQgNDhjNi4yIDAgMTEuNzMtMi4wNSAxNS42NS01LjU3bC03LjU1LTUuODZjLTIuMSAxLjQxLTQuNzggMi4yNC04LjEgMi4yNC02LjE2IDAtMTEuNDYtMy4xMi0xMy41Mi03LjY5bC03Ljk4IDYuMTlDNi40IDQyLjYyIDE0LjYgNDggMjQgNDh6Ii8+PC9zdmc+");
}





/* 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, #595f6a);
}

#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;
}

/* 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, #595f6a);
    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, #595f6a) !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;
}

/* "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: "Zapamiętaj mnie" – układ i typografia === */

#LoginPage .auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

#LoginPage .remember-inner {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#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 – spójny layout zakładek i kart
   =========================================== */

#ObservedPage .page-h1 {
    text-align: center;
}

#ObservedPage .si-hr {
    margin-bottom: 24px !important;
}

#ObservedPage .observed-intro {
    max-width: 760px;
    margin: 0 auto 28px;
    color: #595f6a;
    line-height: 1.7;
}

#ObservedPage .observed-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

#ObservedPage .observed-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border-radius: 20px;
    background: #f2f2f2;
    border: 1px solid #ececec;
}

#ObservedPage .observed-summary-label {
    color: #595f6a;
    font-size: 0.95rem;
    font-weight: 500;
}

#ObservedPage .observed-summary-value {
    color: #111;
    font-size: clamp(1.5rem, 1.2rem + 0.8vw, 2rem);
    font-weight: 800;
    line-height: 1;
}

.observed-tabs {
    display: flex;
    gap: 12px;
    border: none;
    margin: 0 0 20px;
}

.observed-tabs .nav-item {
    flex: 1 1 0;
}

.observed-tabs .nav-link {
    width: 100%;
    min-height: 58px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 24px -16px rgba(17, 24, 39, 0.18);
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.observed-tabs .nav-link:hover {
    background: #e6e6e6;
    color: #111;
    transform: translateY(-1px);
}

.observed-tabs .nav-link.active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.observed-tab-content {
    padding-top: 0;
}

#ObservedPage .observed-panel {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 40px -30px rgba(17, 24, 39, 0.24);
}

#ObservedPage .observed-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 290px);
    gap: 18px;
    align-items: end;
    margin-bottom: 22px;
}

#ObservedPage .observed-toolbar-copy h2 {
    margin: 0 0 6px;
    color: #111;
    font-size: clamp(1.2rem, 1.05rem + 0.4vw, 1.5rem);
    font-weight: 800;
}

#ObservedPage .observed-toolbar-copy p {
    margin: 0;
    color: #595f6a;
    line-height: 1.65;
}

#ObservedPage .observed-toolbar-form {
    display: grid;
    gap: 8px;
}

#ObservedPage .observed-toolbar-form label {
    margin: 0;
    color: #595f6a;
    font-size: 0.86rem;
    font-weight: 500;
}

#ObservedPage .observed-sort-select {
    width: 100%;
}

#ObservedPage .observed-items-container {
    margin-top: 4px;
}

#ObservedPage #items {
    gap: 18px;
}

#ObservedPage .observed-item-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#ObservedPage .observed-offer-card {
    border-radius: 22px;
    padding: 18px;
    box-shadow: 0 16px 34px -28px rgba(17, 24, 39, 0.2);
}

#ObservedPage .observed-offer-card .offer-row {
    align-items: center;
}

#ObservedPage .observed-offer-card .item-thumb img {
    aspect-ratio: 4 / 3;
    max-height: none;
    background: #f7f7f7;
}

#ObservedPage .observed-actions {
    grid-column: 1;
    grid-row: 2;
    gap: 12px;
    justify-content: flex-start;
}

#ObservedPage .observed-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f4e5de;
    color: #A83F1F;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#ObservedPage .observed-price-block {
    grid-column: 2;
    grid-row: 1 / span 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    align-self: start;
    justify-content: flex-start;
    gap: 12px;
}

#ObservedPage .observed-price-block .price {
    grid-column: auto;
    grid-row: auto;
    justify-self: auto;
    align-self: auto;
    margin-top: 0;
    line-height: 1.15;
}

#ObservedPage .observed-delete-form {
    margin: 0;
}

#ObservedPage .observed-delete-btn {
    min-height: 42px;
    text-decoration: none;
    border: 1px solid #e5e7eb;
}

#ObservedPage .observed-delete-btn:hover {
    text-decoration: none;
}

#ObservedPage .item-meta {
    grid-column: 1;
    grid-row: 3;
    line-height: 1.7;
}

#ObservedPage .observed-added {
    display: inline-flex;
    margin-top: 6px;
    color: #595f6a;
    font-size: 0.88rem;
}

#ObservedPage .observed-search-grid {
    display: grid;
    gap: 18px;
}

#ObservedPage .observed-search-card {
    border: 1px solid #e6e6e6;
    border-radius: 22px;
    padding: 22px;
    background: #fff;
    box-shadow: 0 16px 34px -28px rgba(17, 24, 39, 0.2);
}

#ObservedPage .observed-search-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

#ObservedPage .observed-search-card-title {
    margin: 0 0 6px;
    color: #111;
    font-size: clamp(1.05rem, 0.95rem + 0.3vw, 1.25rem);
    font-weight: 800;
}

#ObservedPage .observed-search-card-date {
    margin: 0;
    color: #595f6a;
    font-size: 0.9rem;
}

#ObservedPage .observed-search-type {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f2f2f2;
    color: #111;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

#ObservedPage .observed-search-details {
    padding: 16px 18px;
    border-radius: 16px;
    background: #f2f2f2;
    color: #111;
    line-height: 1.7;
}

#ObservedPage .observed-search-details > *:last-child {
    margin-bottom: 0;
}

#ObservedPage .observed-search-details ul,
#ObservedPage .observed-search-details ol {
    margin: 0;
    padding-left: 18px;
}

#ObservedPage .observed-search-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

#ObservedPage .observed-search-actions form {
    margin: 0;
}

#ObservedPage .observed-search-actions .btn-orange,
#ObservedPage .observed-search-actions .btn-white,
#ObservedPage .observed-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

#ObservedPage .observed-empty-state {
    padding: 34px 24px;
    border-radius: 22px;
    background: #f7f7f7;
    text-align: center;
}

#ObservedPage .observed-empty-state h3 {
    margin: 0 0 8px;
    color: #111;
    font-size: 1.2rem;
    font-weight: 800;
}

#ObservedPage .observed-empty-state p {
    margin: 0;
    color: #595f6a;
    line-height: 1.7;
}

#ObservedPage .observed-pagination {
    margin-top: 24px;
}

@media (max-width: 992px) {
    #ObservedPage .observed-toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #ObservedPage .observed-summary {
        grid-template-columns: 1fr;
    }

    .observed-tabs {
        flex-direction: column;
    }

    #ObservedPage .observed-panel {
        padding: 18px;
        border-radius: 20px;
    }

    #ObservedPage .observed-offer-card,
    #ObservedPage .observed-search-card {
        padding: 18px;
        border-radius: 20px;
    }

    #ObservedPage .observed-search-card-head {
        flex-direction: column;
    }

    #ObservedPage .observed-search-type {
        white-space: normal;
    }
}

@media (max-width: 640px) {
    #ObservedPage .observed-actions {
        align-items: stretch;
    }

    #ObservedPage .observed-badge {
        width: fit-content;
    }

    #ObservedPage .observed-price-block {
        grid-column: 1;
        grid-row: auto;
        align-items: stretch;
    }

    #ObservedPage .observed-delete-form,
    #ObservedPage .observed-search-actions form,
    #ObservedPage .observed-search-actions .btn-orange {
        width: 100%;
    }

    #ObservedPage .observed-delete-btn,
    #ObservedPage .observed-search-actions .btn-orange,
    #ObservedPage .observed-search-actions .btn-white {
        width: 100%;
    }

    #ObservedPage .observed-search-actions {
        align-items: stretch;
    }
}

/* ===========================================
   ROLES MANAGER – layout, search, akcje
   =========================================== */

#RolesManagerPage {
    max-width: 1296px;
    margin: 0 auto;
}

/* ===========================================
   ROLES MANAGER – lista użytkowników
   =========================================== */

.roles-page {
    margin: 0 auto;
    padding-bottom: 48px;
}

.roles-stats {
    grid-template-columns: repeat(3, 1fr) !important;
    margin-bottom: 24px;
}

.roles-stats .mod-stat-card {
    cursor: default;
}

.roles-stats .mod-stat-card:hover {
    background: #f2f2f2;
    border-color: transparent;
}

.roles-page .page-h1 {
    text-align: center;
}

/* Toolbar */

.roles-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.roles-search-wrap {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.roles-search-inner {
    display: flex;
    gap: 8px;
    width: 100%;
    max-width: 460px;
}

.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;
    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);
}

.roles-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
    height: 52px;
    min-height: 52px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Tabela */

.roles-table-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
}

.roles-table {
    width: 100%;
    border-collapse: collapse;
}

.roles-table thead {
    background: #1f2937;
}

.roles-table thead th {
    padding: 14px 18px;
    color: #f9fafb;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    border: none;
}

.roles-table thead th a {
    color: #f9fafb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.roles-table thead th a:hover {
    color: #F9F0EE;
}

.roles-sort-inactive {
    opacity: 0.35;
}

.roles-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.12s ease;
}

.roles-table tbody tr:last-child {
    border-bottom: none;
}

.roles-table tbody tr:hover {
    background: #fafafa;
}

.roles-table tbody td {
    padding: 14px 18px;
    font-size: 0.93rem;
    color: #111;
    vertical-align: middle;
    border: none;
}

.roles-email-cell {
    color: #595f6a;
    font-size: 0.88rem !important;
}

/* Role badges */

.roles-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: #F9F0EE;
    color: #A83F1F;
    font-size: 0.72rem;
    font-weight: 700;
    margin: 2px 2px 2px 0;
}

/* Kolory ról */
.roles-badge--admin {
    background: #1e1e2e;
    color: #ffffff;
}
.roles-badge--moderator {
    background: #1e3a5f;
    color: #93c5fd;
}
.roles-badge--shop {
    background: #14532d;
    color: #86efac;
}
.roles-badge--user {
    background: #F9F0EE;
    color: #A83F1F;
}

/* Akcje */

.roles-actions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    white-space: nowrap;
    width: 1%;          /* shrink to content */
}

.roles-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    font-size: 0.82rem;
    font-weight: 400 !important;
    text-decoration: none;
    white-space: nowrap;
}

.roles-actions-cell .btn-orange,
.roles-actions-cell .btn-danger-modern {
    color: #fff;
    text-decoration: none;
}

.roles-actions-cell .btn-orange:hover,
.roles-actions-cell .btn-danger-modern:hover {
    color: #fff;
}

/* Paginacja */

.roles-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 20px 0 6px;
    flex-wrap: wrap;
    list-style: none;
    padding-left: 0;
}

.roles-pagination .page-item {
    margin: 0;
}

.roles-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f5f5f5;
    color: #111;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.roles-pagination .page-link:hover {
    background: #ebebeb;
    text-decoration: none;
}

.roles-pagination .page-item.active .page-link {
    background: #A83F1F;
    color: #fff;
    border-color: #A83F1F;
}

/* ===========================================
   ROLES ASSIGN – karta zarządzania rolami
   =========================================== */

#RolesAssignPage {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 12px 40px;
}

.roles-assign-subtitle {
    text-align: center;
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.roles-assign-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: #1f2937;
    color: #f9fafb;
    font-size: 0.95rem;
    font-weight: 700;
}

.roles-assign-user-badge i {
    font-size: 1.1rem;
}

.roles-assign-subtitle p {
    margin: 0;
    font-size: 0.88rem;
    color: #9ca3af;
}

/* Karta */

.roles-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 8px 28px -16px rgba(15, 23, 42, 0.1);
}

/* Lista ról */

.roles-assign-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 4px;
}

/* Pojedyncza rola jako klikalna karta */

.roles-assign-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    margin: 0;
}

.roles-assign-item:has(.roles-assign-check:checked) {
    border-color: #A83F1F;
    background: #F9F0EE;
}

.roles-assign-item:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.roles-assign-item:has(.roles-assign-check:checked):hover {
    background: #F9F0EE;
}

.roles-assign-check {
    width: 17px;
    height: 17px;
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #A83F1F;
}

.roles-assign-label {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #111;
    cursor: pointer;
}

/* Stopka */

.roles-card-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* Mobile */

@media (max-width: 768px) {
    .roles-search-inner {
        flex-direction: column;
        max-width: none;
    }

    .roles-search-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .roles-table-wrap {
        overflow-x: auto;
    }

    .roles-table {
        min-width: 680px;
    }

    .roles-assign-list {
        grid-template-columns: 1fr;
    }

    .roles-card {
        padding: 20px 18px;
    }
}

/* ===========================================
   SYSTEM MESSAGES (Admin)
   =========================================== */

/* Toolbar – przycisk "Dodaj" */
.sysmsg-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-bottom: 0;
}

/* Tabela – rozszerzona szerokość kolumny tytułu */
.sysmsg-table {
    table-layout: auto;
}

.sysmsg-title-cell {
    font-weight: 600;
    min-width: 160px;
}

.sysmsg-section-cell {
    font-size: 0.8rem;
    color: #595f6a;
    font-family: monospace;
}

.sysmsg-dates-cell {
    min-width: 150px;
}

/* Daty */
.sysmsg-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #374151;
    white-space: nowrap;
}

.sysmsg-date i {
    opacity: 0.5;
    font-size: 0.72rem;
}

.sysmsg-date--end {
    margin-top: 4px;
    color: #9ca3af;
}

/* Typ / Tryb – odznaki */
.sysmsg-badge {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.sysmsg-badge--type {
    background: #F9F0EE;
    color: #A83F1F;
}

.sysmsg-badge--mode {
    background: #f0f4ff;
    color: #1e3a8a;
}

/* Aktywne – odznaki */
.sysmsg-active {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.sysmsg-active--yes {
    background: #dcfce7;
    color: #15803d;
}

.sysmsg-active--no {
    background: #fee2e2;
    color: #b91c1c;
}

/* Pusty stan tabeli */
.sysmsg-empty {
    text-align: center;
    padding: 48px 16px !important;
    color: #9ca3af;
    font-size: 0.95rem;
}

.sysmsg-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.4;
}

/* ---- FORMULARZ EDYCJI ---- */

.sysmsg-edit-card {
    max-width: 100%;
}

/* Siatka pól formularza */
.sysmsg-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
}

.sysmsg-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sysmsg-form-group--full {
    grid-column: 1 / -1;
}

/* Etykieta pola */
.sysmsg-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
}

/* Input / Textarea / Select */
.sysmsg-input,
.sysmsg-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 0.92rem;
    color: #111827;
    background: #f9fafb;
    outline: none;
    transition: border-color 0.15s ease, background 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

.sysmsg-input:focus,
.sysmsg-select:focus {
    border-color: #A83F1F;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.08);
}

.sysmsg-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Select – strzałka */
.sysmsg-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%236b7280' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* Checkbox – aktywne */
.sysmsg-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px 16px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    transition: border-color 0.15s ease, background 0.15s ease;
    user-select: none;
}

.sysmsg-checkbox-label:has(.sysmsg-checkbox:checked) {
    border-color: #A83F1F;
    background: #F9F0EE;
}

.sysmsg-checkbox {
    width: 17px;
    height: 17px;
    accent-color: #A83F1F;
    cursor: pointer;
    flex-shrink: 0;
}

.sysmsg-checkbox-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: #374151;
}

.sysmsg-validation {
    font-size: 0.78rem;
    margin-top: 2px;
}

/* Responsywność */
@media (max-width: 767.98px) {
    .sysmsg-form-grid {
        grid-template-columns: 1fr;
    }

    .sysmsg-form-group--full {
        grid-column: 1;
    }

    .sysmsg-edit-card {
        max-width: 100%;
    }

    .sysmsg-dates-cell {
        min-width: 120px;
    }
}

/* ===========================================
   DICTIONARIES – tabela i kolumny (Admin)
   =========================================== */

/* Przycisk akcji w tabeli */
.dictionaries-manage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    min-width: 150px;
    font-size: 0.9rem;
    border-radius: 12px;
    text-decoration: none;
    color: #fff;
    font-weight: 300;
}

.dictionaries-page .dictionaries-manage-btn {
    color: #fff;
    font-weight: 300;
    text-decoration: none;
}

.dictionaries-page .dictionaries-manage-btn:hover {
    color: #fff;
}

.dictionaries-manage-btn:hover {
    color: #fff;
    text-decoration: none;
}

/* Tabela słowników – kolumny */

.dictionaries-table {
    table-layout: fixed;
    width: 100%;
}

/* Raport słowników – więcej kolumn, pozwalamy na scroll */
#DictionariesReportPage .roles-table-wrap {
    overflow-x: auto;
}

#DictionariesReportPage .roles-table {
    table-layout: auto;
    min-width: 820px;
}

#DictionariesReportPage .roles-table th,
#DictionariesReportPage .roles-table td {
    white-space: nowrap;
}

#DictionariesReportPage .roles-table .dict-col-name,
#DictionariesReportPage .roles-table .dict-col-desc {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 120px;
}

/* Kolumny nagłówka */

.dictionaries-table thead th {
    white-space: nowrap;
}

.dictionaries-table .dict-col-name,
.dictionaries-table td.dict-col-name {
    width: 22%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.dictionaries-table .dict-col-res,
.dictionaries-table td.dict-col-res {
    width: 14%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.dictionaries-table .dict-col-active,
.dictionaries-table td.dict-col-active {
    width: 90px;
    white-space: nowrap;
}

.dictionaries-table .dict-col-sort,
.dictionaries-table td.dict-col-sort {
    width: 80px;
    text-align: center;
}

.dictionaries-table .dict-col-desc,
.dictionaries-table td.dict-col-desc {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.dictionaries-table .dict-col-actions,
.dictionaries-table td.dict-col-actions {
    width: 140px;
    white-space: nowrap;
}

.dictionaries-table .dict-col-note,
.dictionaries-table td.dict-col-note {
    width: 40px;
}

.dictionaries-table .dict-col-mini,
.dictionaries-table td.dict-col-mini {
    width: 50px;
    text-align: center;
}

/* 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-manage-btn {
        min-width: 130px;
    }
}

@media (max-width: 600px) {
    .dictionaries-table {
        min-width: 720px;
    }
}

/* ===========================================
   DICTIONARY ADD/EDIT – edycja słownika
   =========================================== */

#DictionaryEditPage {
    max-width: 1296px;
    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: #595f6a;
}


/* 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: #595f6a;
}

.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: #595f6a;
}

.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: 12px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Przycisk dodania elementu */

.dictionary-add-item-btn {
    padding: 8px 16px;
    border-radius: 12px;
    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: 12px;
    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: 12px;
    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;
    color: #fff;
    font-weight: 300;
    text-decoration: none;
}

#CategoriesIndexPage .admin-table-btn:hover {
    color: #fff;
    text-decoration: none;
}

/* 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: 1296px;
    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: 12px;
    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: 12px;
    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: 1296px;
        margin: 0 auto;
    }

    .category-edit-subtitle {
        text-align: center;
        margin-bottom: 20px;
    }

    .category-edit-subtitle p {
        margin: 0;
        font-size: 0.95rem;
        color: #595f6a;
    }

    .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: #595f6a;
    }

    /* 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: #595f6a;
    }

    .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: #595f6a;
    }

    /* 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: 16px;
        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: #595f6a;
    }

    .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: 1296px;
        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;
        }
    }

.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 */
    justify-content: center;
}

/* Każdy element zakładki – równa szerokość */
.si-account-tab-item {
    flex: 1 1 0;
    min-width: 120px;
}

/* Przycisk zakładki – jak btn-white, pełna szerokość */
.si-account-tab-btn {
    display: flex;
    width: 100%;
    min-height: 48px;
    text-align: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: #ffffff;
    color: #111111;
    border: 1px solid #e5e7eb;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.2;
    align-items: center;
    justify-content: center;
    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: #e6e6e6;
    color: #111;
    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,
.si-rounded img {
    border-radius: 16px;
}



/* === 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: 16px;
    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;
    }
}

/* FAQ accordion – niezależne od Bootstrap */
#HelpPage .help-collapse {
    display: none;
}
#HelpPage .help-collapse.si-open {
    display: block;
}

/* ===============================
   MODAL – FORMULARZ KONTAKTOWY
   =============================== */

/* Modal content */
#multiStepModal .modal-content {
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 24px 60px -30px rgba(15, 23, 42, 0.35);
}

/* Header */
#multiStepModal .modal-header {
    border-bottom: none;
    padding: 20px 24px 8px;
}

#multiStepModal .modal-title {
    font-size: clamp(1.125rem, 1.05rem + 0.2vw, 1.25rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.3;
}

/* Body */
#multiStepModal .modal-body {
    padding: 16px 24px 8px;
}

/* KROKI */
#multiStepModal h6 {
    font-size: clamp(1rem, 0.95rem + 0.15vw, 1.1rem);
    font-weight: 700;
    margin-bottom: 12px;
}

/* LABEL */
#multiStepModal label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #595f6a;
    margin-bottom: 4px;
}

/* INPUT / SELECT / TEXTAREA */
#multiStepModal .form-control,
#multiStepModal .form-select {
    background-color: #f2f2f2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 0.95rem;
    box-shadow: inset 0 0 0 1000px #f2f2f2;
}

#multiStepModal .form-control:focus,
#multiStepModal .form-select:focus {
    border-color: #A83F1F;
    box-shadow:
        inset 0 0 0 1000px #f2f2f2,
        0 0 0 3px rgba(168, 63, 31, 0.12);
    outline: none;
}

/* PROGRESS BAR */
#multiStepModal .progress {
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
}

#multiStepModal .progress-bar {
    background: linear-gradient(90deg, #A83F1F, #E7683B);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* FOOTER */
#multiStepModal .modal-footer {
    border-top: none;
    padding: 16px 24px 24px;
    display: flex;
    gap: 10px;
}

/* BUTTONS – spójne z layoutem */
#multiStepModal .btn {
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Wstecz */
#multiStepModal .btn-secondary {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #111;
}


/* FB share – wygląda jak nasz button */
.offer-page .fb-share-wrapper {
    display: inline-flex;
    align-items: center;
}

.offer-page .fb-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: clamp(0.55rem, 0.45rem + 0.3vw, 0.7rem)
        clamp(1.3rem, 1.1rem + 0.5vw, 2rem);
    border-radius: 12px;
    background: #1877F2;
    color: #ffffff;
    border: 1px solid #1877F2;
    font-weight: 300;
    font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.05rem);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.offer-page .fb-share-btn:hover {
    background: #166fe5;
    border-color: #166fe5;
    color: #ffffff;
}

.offer-page .fb-share-btn .fa {
    font-size: 1rem;
}


/* === BETA POPUP === */

.beta-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;
}

.beta-popup {
    background: #fff;
    max-width: 460px;
    width: calc(100% - 32px);
    padding: 32px 28px;
    border-radius: 20px;
    text-align: center;

    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
    animation: betaPopupFadeIn 0.35s ease;
}

.beta-popup-logo {
    max-width: 180px;
    margin: 0 auto 20px;
    display: block;
}


.beta-popup p {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 14px;
    color: #333;
}


/* =========================
   MODAL: ZGŁOŚ PRZEDMIOT
   ========================= */

.si-report-progress {
    height: 4px;
    border-radius: 2px;
    background-color: #e5e7eb;
}

.si-report-progress .progress-bar {
    background-color: #A83F1F;
    border-radius: 2px;
    transition: width 0.4s ease, background-color 0.4s ease;
}

.si-step-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.si-report-modal .form-control,
.si-report-modal .form-select {
    background-color: #f3f4f6;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    color: #111;
    transition: border-color 0.2s, background-color 0.2s;
}

.si-report-modal .form-control:focus,
.si-report-modal .form-select:focus {
    background-color: #ececec;
    border-color: #A83F1F;
    box-shadow: 0 0 0 3px rgba(168, 63, 31, 0.12);
    outline: none;
}

.si-rodo-clause {
    font-size: 0.72rem;
    color: #9ca3af;
    line-height: 1.6;
    margin-top: 1rem;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.75rem;
}

    .si-rodo-clause a {
        color: #9ca3af;
        text-decoration: underline;
    }

    .si-rodo-clause a:hover {
        color: #595f6a;
    }

/* =========================================================
   PUSTY STAN (empty state)
   ========================================================= */

.si-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 56px 24px;
    color: #9ca3af;
    gap: 10px;
}

.si-empty-state i {
    font-size: 2.8rem;
    color: #d1d5db;
    margin-bottom: 4px;
}

.si-empty-state h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #374151;
    margin: 0;
}

.si-empty-state p {
    font-size: 0.88rem;
    margin: 0;
    max-width: 300px;
    line-height: 1.5;
}

/* =========================================================
   PODPOWIEDŹ WYSZUKIWARKI (3 znaki)
   ========================================================= */

.si-search-hint {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 0.72rem;
    color: #9ca3af;
    padding-left: 2px;
    transition: max-height 0.2s ease, opacity 0.2s ease, margin-top 0.2s ease;
    margin-top: 0;
}

.si-search-hint.visible {
    max-height: 2em;
    opacity: 1;
    margin-top: 4px;
}

/* =========================================================
   ANIMACJA PRZEJŚĆ MIĘDZY KROKAMI FORMULARZA
   ========================================================= */

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateY(7px); }
    to   { opacity: 1; transform: translateY(0); }
}

.step-enter {
    animation: stepFadeIn 0.22s ease both;
}

/* =========================================================
   BŁĘDY INLINE W FORMULARZACH
   ========================================================= */

.si-form-inline-error {
    display: none;
    color: #dc2626;
    font-size: 0.78rem;
    margin-top: 5px;
}

.si-form-inline-error.visible {
    display: block;
}

/* =========================================================
   DYMEK STATUSÓW OFERTY – znak zapytania w kółeczku
   ========================================================= */

.si-status-help-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    margin-left: 5px;
    position: relative;
    top: -1px;
}

.si-status-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1px solid #9ca3af;
    background: transparent;
    color: #9ca3af;
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
    cursor: default;
    user-select: none;
    flex-shrink: 0;
}

.si-status-help-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    left: auto;
    transform: none;
    background: #1f2937;
    color: #f9fafb;
    border-radius: 12px;
    padding: 10px 14px;
    width: 300px;
    max-width: calc(100vw - 24px);
    z-index: 200;
    font-size: 0.7rem;
    line-height: 1.55;
    pointer-events: none;
    box-shadow: 0 8px 24px -8px rgba(0,0,0,0.35);
    white-space: normal;
}

/* strzałka w dół */
.si-status-help-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    right: 4px;
    left: auto;
    transform: none;
    border: 5px solid transparent;
    border-top-color: #1f2937;
}

.si-status-help-tooltip strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #d1d5db;
}

.si-status-help-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.si-status-help-list span {
    display: block;
}

.si-status-help-list b {
    color: #fff;
    font-weight: 600;
}

.si-status-help-wrap:hover .si-status-help-tooltip {
    display: inline-block;
}

/* animacja */

@keyframes betaPopupFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* ===========================================
   ADMIN – WSPÓLNE NOWE KLASY (Dict/Cat/Reports)
   =========================================== */

/* Flaga numeryczna (TK / TKE / G w raportach) */
.dict-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.dict-flag--ok {
    background: #dcfce7;
    color: #15803d;
}

.dict-flag--warn {
    background: #fee2e2;
    color: #b91c1c;
}

/* Minimalna szerokość kolumny mini (TK/TKE) */
.dict-col-mini {
    width: 48px;
}

/* AdminRules – karty reguł */
.admin-rules-card {
    margin-bottom: 20px;
}

.admin-rules-lang-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 14px;
}

.admin-rules-lang-header i {
    color: #A83F1F;
    font-size: 1.1rem;
}

.admin-rules-section {
    margin-bottom: 14px;
}

.admin-rules-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #595f6a;
    margin-bottom: 6px;
}

.admin-rules-value {
    font-size: 0.88rem;
    color: #374151;
    line-height: 1.6;
}

.admin-rules-map {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-rules-map-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.8rem;
}

.admin-rules-map-item code {
    background: none;
    padding: 0;
    color: #A83F1F;
    font-size: 0.8rem;
}

.admin-rules-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-rules-cat {
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.85rem;
}

.admin-rules-cat-name {
    display: block;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
}

.admin-rules-cat-roots {
    color: #595f6a;
    font-size: 0.8rem;
}

/* Jobs – layout dwukolumnowy */
.jobs-layout {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 24px;
    align-items: start;
}

.jobs-filter-card {
    margin-bottom: 0;
}

.jobs-trigger-code {
    background: #f3f4f6;
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.78rem;
    color: #374151;
}

/* Detail list */
.jobs-detail-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    font-size: 0.85rem;
    margin-top: 12px;
}

.jobs-detail-list dt {
    font-weight: 700;
    color: #595f6a;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    padding-top: 3px;
}

.jobs-detail-list dd {
    color: #1f2937;
    margin: 0;
    word-break: break-all;
}

/* Report cards */
.report-card {
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .jobs-layout {
        grid-template-columns: 1fr;
    }
}

/* -------------------------------------------------------
   CATEGORIES – szerokości kolumn tabeli
   ------------------------------------------------------- */

#CategoriesIndexPage .roles-table,
#CategoriesReportPage .roles-table {
    table-layout: fixed;
}

/* Index: Kategoria | Nadrzędna | Aktywna | Sort | Akcje */
#CategoriesIndexPage .roles-table th:nth-child(1),
#CategoriesIndexPage .roles-table td:nth-child(1) {
    width: 30%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

#CategoriesIndexPage .roles-table th:nth-child(2),
#CategoriesIndexPage .roles-table td:nth-child(2) {
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

#CategoriesIndexPage .roles-table th:nth-child(3),
#CategoriesIndexPage .roles-table td:nth-child(3),
#CategoriesIndexPage .roles-table th:nth-child(4),
#CategoriesIndexPage .roles-table td:nth-child(4) {
    width: 90px;
    white-space: nowrap;
}

/* Report – tabela z 11 kolumnami: poziome przewijanie zamiast ściskania */
#CategoriesReportPage .roles-table-wrap {
    overflow-x: auto;
}

#CategoriesReportPage .roles-table {
    table-layout: auto;
    min-width: 860px;
}

#CategoriesReportPage .roles-table th,
#CategoriesReportPage .roles-table td {
    white-space: nowrap;
}

/* Kolumny z nazwami mogą się łamać */
#CategoriesReportPage .roles-table th:nth-child(1),
#CategoriesReportPage .roles-table td:nth-child(1),
#CategoriesReportPage .roles-table th:nth-child(2),
#CategoriesReportPage .roles-table td:nth-child(2) {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 120px;
}

/* -------------------------------------------------------
   JOBS – małe tabelki key/value w panelu szczegółów
   ------------------------------------------------------- */

.jobs-col-detail .roles-table-wrap {
    overflow-x: auto;
}

.jobs-col-detail .roles-table {
    table-layout: fixed;
    width: 100%;
}

.jobs-col-detail .roles-table th:nth-child(1),
.jobs-col-detail .roles-table td:nth-child(1) {
    width: 42%;
    overflow-wrap: anywhere;
    word-break: break-all;
    white-space: normal;
    font-size: 0.8rem;
    color: #595f6a;
    font-weight: 700;
}

.jobs-col-detail .roles-table th:nth-child(2),
.jobs-col-detail .roles-table td:nth-child(2) {
    width: 58%;
    overflow-wrap: anywhere;
    word-break: break-all;
    white-space: normal;
}

/* =============================================
   STRONY PRAWNE – Regulamin / Prywatność / Cookies
   ============================================= */

.si-page-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.si-page-title {
    text-align: center;
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.si-subtitle {
    text-align: center;
    color: #595f6a;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.si-hr-accent {
    border: none;
    border-top: 2px solid #A83F1F;
    max-width: 80px;
    margin: 0 auto 40px;
    opacity: 1;
}

/* Spis treści */
.si-toc {
    background: #f2f2f2;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 48px;
}
.si-toc h2 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #595f6a;
    margin: 0 0 12px;
}
.si-toc ol { margin: 0; padding-left: 20px; }
.si-toc li { margin-bottom: 4px; font-size: 0.9rem; }
.si-toc a { font-weight: 600; color: #A83F1F; text-decoration: none; }
.si-toc a:hover { text-decoration: underline; }

/* Sekcje */
.si-section { margin-bottom: 48px; scroll-margin-top: 80px; }
.si-section-title {
    font-size: 1.05rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
}
.si-section-title .section-num {
    background: #A83F1F;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    border-radius: 6px;
    padding: 3px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.si-section p { font-size: 0.95rem; font-weight: 300; line-height: 1.7; margin-bottom: 12px; }
.si-section ul, .si-section ol { font-size: 0.95rem; font-weight: 300; line-height: 1.7; padding-left: 20px; margin-bottom: 12px; }
.si-section li { margin-bottom: 6px; }
.si-section strong { font-weight: 700; }
.si-section a { color: #A83F1F; font-weight: 600; }
.si-section a:hover { text-decoration: underline; }

/* Boxy info/ostrzeżenie na stronach prawnych */
.si-warn-box {
    background: #fff8f0;
    border-left: 4px solid #A83F1F;
    border-radius: 0 12px 12px 0;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}
.legal-page .si-info-box {
    background: #f0fdf4;
    border-left: 4px solid #1f8b4c;
    border-radius: 0 12px 12px 0;
    padding: 14px 18px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    box-shadow: none;
    color: #111;
}
.legal-page .si-info-box a { color: #1f8b4c; font-weight: 600; }

/* Lista zakazanych przedmiotów */
.si-forbidden-list {
    background: #fff5f3;
    border: 1px solid #ffd5cc;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
}
.si-forbidden-list li { color: #7a2510; }

/* Tabela prawna */
.si-legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: 20px;
}
.si-legal-table th {
    background: #000;
    color: #fff;
    font-weight: 700;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.si-legal-table td { padding: 9px 12px; border-bottom: 1px solid #e5e7eb; vertical-align: top; }
.si-legal-table tr:nth-child(even) td { background: #fafafa; }

/* Prawa użytkownika (Privacy) */
.si-rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.si-right-card {
    background: #f2f2f2;
    border-radius: 12px;
    padding: 16px 18px;
}
.si-right-card h3 { font-size: 0.88rem; font-weight: 700; color: #A83F1F; text-transform: uppercase; margin: 0 0 6px; }
.si-right-card p { font-size: 0.85rem; margin: 0; color: #333; }

/* Rodzaje cookies (Cookies) */
.si-cookie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 16px 0 24px;
}
.si-cookie-card {
    border-radius: 16px;
    padding: 18px 20px;
    border: 1px solid #e5e7eb;
}
.si-cookie-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.si-cookie-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-required { background: #000; color: #fff; }
.badge-functional { background: #1f8b4c; color: #fff; }
.badge-analytics { background: #1a6bbf; color: #fff; }
.badge-marketing { background: #A83F1F; color: #fff; }
.si-cookie-card h3 { font-size: 0.92rem; font-weight: 700; margin: 0; color: #000; }
.si-cookie-card p { font-size: 0.85rem; color: #444; margin: 0; }

/* Przeglądarki (Cookies §6) */
.si-browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin: 12px 0 20px;
}
.si-browser-item { background: #f2f2f2; border-radius: 12px; padding: 12px 14px; font-size: 0.85rem; }
.si-browser-item strong { display: block; font-weight: 700; margin-bottom: 4px; }
.si-browser-item a { font-size: 0.82rem; color: #A83F1F; }

@media (max-width: 767px) {
    .si-page-wrap { padding: 24px 16px 40px; }
    .si-cookie-grid { grid-template-columns: 1fr; }
    .si-browser-grid { grid-template-columns: 1fr 1fr; }
    .si-rights-grid { grid-template-columns: 1fr; }
    .si-legal-table { font-size: 0.8rem; }
}
