:root {
    /* === Brand colors === */
    --brand-primary: var(--brand-primary);
    --brand-primary-dark: var(--brand-primary-dark);
    --brand-primary-light: var(--brand-primary-light);
    --brand-accent: var(--brand-accent);

    /* === Text colors === */
    --text-dark: var(--text-dark);
    --text-mid: var(--text-mid);
    --text-muted: var(--text-muted);
    --text-soft: var(--text-soft);

    /* === Status colors === */
    --success: var(--success);
    --warning: var(--warning);
    --danger: var(--danger);
    --danger-deep: var(--danger-deep);

    /* === Surface / background === */
    --page-bg: var(--page-bg);
    --surface-subtle: var(--surface-subtle);

    /* === Borders === */
    --border-light: var(--border-light);
    --border-subtle: var(--border-subtle);
}

html, body {
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--page-bg);
    color: var(--text-dark);
}

a, .btn-link {
    color: var(--brand-primary);
}

.btn-primary {
    color: #fff;
    background-color: var(--btn-primary-bg, var(--brand-primary));
    border-color: var(--btn-primary-bg, var(--brand-primary));
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    color: #fff;
    background-color: var(--btn-primary-bg, var(--brand-primary));
    border-color: var(--btn-primary-bg, var(--brand-primary));
    filter: brightness(0.92);
}

.btn-primary:disabled,
.btn-primary.disabled {
    color: #fff;
    background-color: var(--btn-primary-disabled-bg, #9ca3af);
    border-color: var(--btn-primary-disabled-bg, #9ca3af);
    opacity: 1;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.hero-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(148, 163, 184, 0.08));
}

.stat-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.stat-value-sm {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0.25rem;
}

/* === Admin tiles (dashboard) === */
.admin-tile {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-left: 4px solid transparent;
}

.admin-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1) !important;
}

.admin-tile-new { border-left-color: var(--brand-primary); }
.admin-tile-quote { border-left-color: var(--warning); }
.admin-tile-pending { border-left-color: var(--success); }

.admin-tile-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
}

.admin-tile-value {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-dark);
}

/* === Promo tiles (customer dashboard) === */
.promo-tile {
    display: block;
    color: inherit;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}

.promo-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
    color: inherit;
    text-decoration: none;
}

.promo-tile-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--surface-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.promo-tile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-tile-placeholder {
    color: #cbd5e1;
    font-size: 2rem;
}

.promo-tile-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.35rem;
}

.promo-tile-title {
    padding: 0.5rem 0.6rem 0.25rem;
    font-size: 0.82rem;
    line-height: 1.3;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.promo-tile-price {
    padding: 0 0.6rem 0.6rem;
    font-size: 0.9rem;
}

.promo-tile-price-old {
    text-decoration: line-through;
    color: var(--text-soft);
    font-size: 0.8rem;
    margin-right: 0.4rem;
}

.promo-tile-price-new {
    font-weight: 700;
    color: var(--danger);
}

.catalog-image,
.detail-image {
    object-fit: cover;
    background: var(--surface-subtle);
}

.catalog-image {
    height: 220px;
}

.catalog-row {
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.catalog-row-in-cart {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.06), rgba(37, 99, 235, 0.01));
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.catalog-row-image,
.catalog-row-placeholder {
    width: 100px;
    height: 100px;
    object-fit: cover;
    background: var(--surface-subtle);
}

.catalog-row-placeholder {
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    padding: 0.5rem;
}

.catalog-qty-input {
    width: 92px;
}

.catalog-table {
    --bs-table-bg: transparent;
}

.catalog-table-head th {
    background: var(--table-header-bg, #64707d);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.catalog-table-row {
    transition: background-color 0.15s ease;
}

.catalog-table-row-in-cart {
    background: rgba(255, 193, 7, 0.16);
}

.catalog-table-row-draft {
    background: rgba(14, 165, 233, 0.06);
}

.catalog-thumb-col,
.catalog-thumb-cell {
    width: 72px;
}

.catalog-table-image,
.catalog-table-placeholder {
    width: 52px;
    height: 52px;
    object-fit: cover;
    background: var(--surface-subtle);
}

.catalog-table-placeholder {
    display: grid;
    place-items: center;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.catalog-table-qty {
    width: 56px;
    min-width: 56px;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}

.catalog-name-col {
    min-width: 470px;
}

.catalog-details-col {
    width: 140px;
    max-width: 140px;
    white-space: nowrap;
}

.catalog-stock-col {
    width: 70px;
}

.catalog-price-col {
    width: 110px;
    white-space: nowrap;
}

.catalog-price-value {
    font-size: 1.05rem;
    font-weight: 700;
}

.catalog-price-vat {
    font-size: 0.7rem;
    line-height: 1.1;
    white-space: nowrap;
}

.catalog-stock-badge-sm {
    min-width: 1.5rem;
    height: 1.5rem;
    font-size: 0.72rem;
    padding: 0 0.4rem;
}

.catalog-qty-stepper {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.catalog-qty-stepper .btn {
    width: 30px;
    min-width: 30px;
    height: 30px;
    padding: 0;
    line-height: 1;
}

.catalog-inline-cart-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    border: 0;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.catalog-inline-cart-badge:hover {
    transform: scale(1.04);
}

.catalog-inline-cart-badge-active {
    background: rgba(255, 193, 7, 0.18);
    color: #8a5a00;
}

.catalog-inline-cart-badge-active .catalog-inline-cart-icon {
    background: rgba(255, 193, 7, 0.32);
}

.catalog-inline-cart-badge-empty {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-soft);
}

.catalog-inline-cart-badge-empty .catalog-inline-cart-icon {
    background: rgba(148, 163, 184, 0.18);
}

.catalog-inline-cart-icon {
    width: 18px;
    height: 18px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
}

.catalog-stock-badge {
    display: inline-flex;
    min-width: 1.9rem;
    height: 1.9rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.catalog-stock-ok {
    color: #15803d;
    background: rgba(34, 197, 94, 0.12);
}

.catalog-stock-empty {
    color: var(--danger-deep);
    background: rgba(248, 113, 113, 0.14);
}

.shop-category-tree {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.shop-category-tree::-webkit-scrollbar {
    width: 6px;
}

.shop-category-tree::-webkit-scrollbar-track {
    background: transparent;
}

.shop-category-tree::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

.shop-category-tree::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.55);
}

.shop-category-node {
    display: flex;
    flex-direction: column;
}

.sidebar-menu {
    color: var(--border-subtle);
}

.sidebar-brand {
    padding: 0.35rem 0.2rem 0.5rem;
    letter-spacing: 0.01em;
}

.sidebar-brand-logo {
    padding: 0.2rem 0.2rem 0.5rem;
}

.sidebar-brand-logo img {
    max-height: 56px;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.sidebar-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 0 0 0.9rem;
    opacity: 1;
}

.sidebar-section-title {
    margin-bottom: 0.5rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.8);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 44px;
    color: rgba(226, 232, 240, 0.92);
    border-radius: 0.75rem;
    padding: 0.72rem 0.9rem;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transform: translateX(1px);
}

.sidebar-link.active {
    background: var(--sidebar-active-bg, linear-gradient(180deg, var(--brand-primary-light), var(--brand-primary)));
    color: #fff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
    font-weight: 600;
}

.sidebar-link-icon {
    width: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(191, 219, 254, 0.95);
    flex: 0 0 auto;
}

.sidebar-link.active .sidebar-link-icon {
    color: #fff;
}

.sidebar-link-label {
    flex: 1 1 auto;
    min-width: 0;
}

.sidebar-link-arrow {
    color: rgba(203, 213, 225, 0.88);
    font-size: 1.15rem;
    line-height: 1;
    flex: 0 0 auto;
}

.sidebar-link.active .sidebar-link-arrow {
    color: #fff;
}

.sidebar-group-toggle {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.sidebar-submenu {
    margin-top: 0.1rem;
    margin-bottom: 0.25rem;
    border-left: 2px solid rgba(148, 163, 184, 0.25);
    padding-left: 0.6rem;
}

.sidebar-sublink {
    min-height: 36px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: rgba(203, 213, 225, 0.85);
}

.sidebar-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.sidebar-logout-btn {
    background: rgba(255, 255, 255, 0.04);
    color: var(--border-subtle);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.sidebar-logout-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
    border-color: rgba(148, 163, 184, 0.34);
}

.shop-category-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    min-height: 40px;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    padding-right: 0.75rem;
    border-radius: 0.65rem;
    transition: background-color 0.15s ease, color 0.15s ease;
    font-size: 0.95rem;
}

.shop-category-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.shop-category-link.active {
    background: rgba(59, 130, 246, 0.18);
    color: #fff;
    font-weight: 600;
}

.shop-category-link-root {
    color: var(--border-subtle);
    font-weight: 500;
}

.shop-category-link-child {
    color: rgba(203, 213, 225, 0.92);
    position: relative;
    min-height: 34px;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    gap: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.92rem;
}

/* Subtelna pionowa kreska prowadząca przy subkategoriach — wskazuje hierarchię bez wrappera. */
.shop-category-link-child::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(148, 163, 184, 0.22);
    pointer-events: none;
}

.shop-category-child-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.85);
    flex: 0 0 auto;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.55);
    position: relative;
    z-index: 1;
}

.shop-category-label {
    flex: 1 1 auto;
}

.shop-category-link .sidebar-link-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.shop-category-link.expanded .sidebar-link-arrow {
    transform: rotate(90deg);
}

/* === Product detail: main image === */
.detail-main-image-wrap {
    position: relative;
    background: var(--surface-subtle);
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: zoom-in;
    border: 1px solid var(--border-subtle);
}

.detail-main-image {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.detail-zoom-hint {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.detail-main-image-wrap:hover .detail-zoom-hint {
    opacity: 1;
}

/* === Product detail: thumbnails === */
.detail-thumbs-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.detail-thumb-item {
    flex: 0 0 72px;
    height: 72px;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s;
    background: var(--surface-subtle);
}

.detail-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-thumb-item:hover {
    border-color: var(--text-soft);
}

.detail-thumb-active {
    border-color: var(--brand-primary) !important;
}

/* === Product detail: info grid === */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem 1.25rem;
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.detail-info-item .detail-info-label {
    min-width: 0;
}

.detail-buy-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(59, 130, 246, 0.01));
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
}

/* Strona produktu — CSS Grid: lewa kolumna (galeria/atrybuty/opis) + prawa kolumna sticky karta zakupu.
   Mobile: flex column z order — galeria 1, karta 2, atrybuty 3, opis 4. */
.product-page-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-page-grid > .product-area-gallery { order: 1; }
.product-page-grid > .product-area-buy     { order: 2; }
.product-page-grid > .product-area-specs   { order: 3; }
.product-page-grid > .product-area-desc    { order: 4; }

@media (min-width: 992px) {
    .product-page-grid {
        display: grid;
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        grid-template-areas:
            "gallery buy"
            "specs   buy"
            "desc    buy";
        gap: 1.5rem;
    }

    /* Galeria/atrybuty/opis: align-self start — kazda sekcja zachowuje swoja naturalna wysokosc.
       Karta zakupu (.product-area-buy): align-self stretch + grid-area buy spans 3 rows
       → wysokosc = suma row tracks (~cala dlugosc lewej strony). Sticky child ma duzo miejsca do scroll'a. */
    .product-page-grid > .product-area-gallery { grid-area: gallery; align-self: start; order: 0; }
    .product-page-grid > .product-area-specs   { grid-area: specs;   align-self: start; order: 0; }
    .product-page-grid > .product-area-desc    { grid-area: desc;    align-self: start; order: 0; }
    .product-page-grid > .product-area-buy     { grid-area: buy;     align-self: stretch; order: 0; }
}

.product-buy-sticky {
    position: sticky;
    /* Offset = wysokosc topbara (~3.5rem) + margines zeby karta nie zlewala sie z topbarem. */
    top: calc(3.5rem + 1.25rem);
}

/* Mobile: sticky wylaczone — karta idzie zwykle pod galerie. */
@media (max-width: 991.98px) {
    .product-buy-sticky {
        position: static;
    }
}

/* Wiersz koszyka z przekroczonym stanem — czerwone tlo + lewa kreska sygnalizujaca problem.
   Stosowane w tabeli desktop (tr.cart-line-error) i kartach mobile (.cart-mobile-card.cart-line-error). */
.cart-line-error {
    background-color: rgba(220, 38, 38, 0.06) !important;
    box-shadow: inset 3px 0 0 #dc2626;
}

tr.cart-line-error > td {
    background-color: transparent;
}

.cart-mobile-card.cart-line-error {
    border-radius: 0.5rem;
}

/* === Galeria: thumbs po lewej (desktop) / pod zdjeciem (mobile) === */
.detail-gallery-wrap {
    display: flex;
    flex-direction: column;  /* mobile: zdjecie u gory, thumbs pod */
    gap: 0.75rem;
}

.detail-gallery-wrap .detail-thumbs {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .detail-gallery-wrap {
        flex-direction: row;  /* desktop: thumbs po lewej, zdjecie po prawej */
        align-items: flex-start;
    }
    .detail-gallery-wrap .detail-thumbs {
        order: -1;  /* przed glownym zdjeciem */
        flex: 0 0 84px;
        flex-direction: column;
        max-height: 520px;
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 0;
        padding-right: 0.25rem;
    }
    .detail-gallery-wrap .detail-main-image-wrap {
        flex: 1 1 auto;
        min-width: 0;
    }
}

.product-detail-rows {
    display: flex;
    flex-direction: column;
}

.product-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 0.95rem;
}

.product-detail-row:last-child {
    border-bottom: none;
}

.product-detail-row > span:last-child {
    text-align: right;
    overflow-wrap: anywhere;
}

.product-stock-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #16a34a;
    margin-right: 0.4rem;
    vertical-align: middle;
}

.product-stock-dot-red {
    background: #dc2626;
}

/* (duplikat media query wyzej) */

.detail-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-info-value {
    font-weight: 600;
}

.detail-placeholder-box {
    min-height: 420px;
    display: grid;
    place-items: center;
    background: var(--border-subtle);
    color: #475569;
    font-weight: 600;
    border-radius: 0.75rem;
}

/* === Lightbox === */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    cursor: default;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.5rem;
}

.lightbox-close:hover {
    color: var(--text-soft);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    line-height: 1;
    transition: background 0.2s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: -4rem;
}

.lightbox-next {
    right: -4rem;
}

.lightbox-counter {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

@media (max-width: 768px) {
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
}

/* === Legacy (keep for admin) === */
.catalog-placeholder,
.detail-placeholder {
    min-height: 220px;
    display: grid;
    place-items: center;
    background: var(--border-subtle);
    color: #475569;
    font-weight: 600;
}

.detail-placeholder {
    min-height: 420px;
}

.dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 1rem;
    background: var(--surface-subtle);
}

.product-thumb {
    object-fit: cover;
    height: 120px;
}

.cart-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    background: var(--surface-subtle);
}

.table > :not(caption) > * > * {
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}

/* ── Product description headings (from Sellasist HTML) ── */

.card-body h1,
.card-body h2,
.card-body h3 {
    padding-top: 1rem;
    padding-bottom: 0.4rem;
}

.card-body h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.card-body h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.card-body h3 {
    font-size: 1rem;
    font-weight: 600;
}

/* ── Order status dot ─────────────────────────────────── */

.order-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ── Image Lightbox ───────────────────────────────────── */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    animation: lightbox-fade-in 0.15s ease;
}

.lightbox-content {
    position: relative;
    max-width: 80vw;
    max-height: 80vh;
    cursor: default;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    font-size: 1.25rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: #f1f5f9;
}

@keyframes lightbox-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.catalog-product-link {
    color: var(--text-dark);
    transition: color 0.15s ease;
}

.catalog-product-link:hover {
    color: var(--brand-primary);
}

.catalog-table-image[role="button"] {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.catalog-table-image[role="button"]:hover {
    transform: scale(1.08);
}

/* ── OrderDetails mobile meta cells ────────────────── */

.order-line-meta-cell {
    min-width: 68px;
    line-height: 1.25;
}

/* ── Cart mobile cards (< lg) ────────────────── */

.cart-mobile-list {
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 8px;
}

.cart-mobile-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-mobile-top {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.cart-mobile-img {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-subtle);
    border: 1px solid var(--border-light);
    cursor: pointer;
}

.cart-mobile-img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.5rem;
    cursor: default;
}

.cart-mobile-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-mobile-title {
    font-weight: 600;
    color: var(--text-mid);
    font-size: 0.9rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-mobile-sku {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.cart-mobile-price {
    font-weight: 600;
    color: var(--brand-primary-dark);
    font-size: 0.9rem;
    margin-top: 2px;
}

.cart-mobile-vat {
    color: var(--text-soft);
    font-size: 0.7rem;
    font-weight: 400;
    margin-left: 4px;
}

.cart-mobile-remove {
    align-self: flex-start;
    font-size: 1.1rem;
    line-height: 1;
}

.cart-mobile-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}

.cart-mobile-line-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.cart-mobile-line-value {
    font-weight: 700;
    color: var(--text-mid);
    font-size: 1rem;
}

/* Wrapper tabeli koszyka - na mobile transparent (zgodnie z katalogiem) */
@media (max-width: 991.98px) {
    .cart-wrapper {
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    .cart-mobile-list {
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 8px;
    }
}

/* ── Bottom Nav (mobile, < lg) ────────────────── */
/* Uwaga: style tutaj (nie w BottomNavBar.razor.css) bo CSS isolation */
/* nie lapie <a> renderowanego przez <NavLink> (komponent-dziecko). */

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    display: flex;
    align-items: stretch;
    background: #fff;
    border-top: 1px solid var(--border-light);
    box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
    z-index: 1030;
    padding: 10px 8px 8px;
    gap: 4px;
}

.bottom-nav .bottom-nav-item {
    flex: 1;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none !important;
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    border-radius: 14px;
    transition: background 0.15s ease, color 0.15s ease;
    padding: 6px 4px;
}

.bottom-nav .bottom-nav-item i {
    font-size: 22px;
    line-height: 1;
}

.bottom-nav .bottom-nav-item:hover {
    color: var(--text-mid);
}

.bottom-nav .bottom-nav-item.active {
    background: var(--brand-primary-dark);
    color: #fff;
}

.bottom-nav .bottom-nav-item.active:hover {
    color: #fff;
}

.bottom-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.bottom-nav-badge {
    position: absolute;
    top: -8px;
    right: -14px;
    background: #ffc107;
    color: var(--text-mid);
    font-size: 10px;
    font-weight: 700;
    border-radius: 999px;
    padding: 0 6px;
    min-width: 20px;
    height: 20px;
    line-height: 16px;
    text-align: center;
    border: 2px solid #fff;
    box-sizing: content-box;
}

.bottom-nav-label {
    line-height: 1;
}

/* ── Mobilna lista produktow (kartki 1-per-row, < lg) ────────────────── */

.catalog-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (max-width: 991.98px) {
    /* Karty produktow wychodza na pelna szerokosc viewportu (bez padding .content) */
    .catalog-mobile-list {
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 8px 8px;
    }

    /* Zewnetrzna karta wrappera - przezroczyste tlo na mobile (globalne szare tlo widoczne) */
    .products-catalog-wrapper {
        background: transparent !important;
        box-shadow: none !important;
        border: 0 !important;
    }
}

.catalog-row-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    position: relative;
    overflow: hidden;
}

.catalog-row-card.is-in-cart::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--brand-primary-dark);
}

.catalog-row-top {
    display: flex;
    gap: 10px;
}

.catalog-row-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
}

.catalog-row-left-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.catalog-row-right-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* Stock badge z ikona magazynu (wariant pill) */
.catalog-stock-badge-icon {
    min-width: auto;
    padding: 0 10px;
    gap: 4px;
    height: 1.9rem;
}

.catalog-stock-badge-icon i {
    font-size: 0.8rem;
    line-height: 1;
}

.catalog-row-image {
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    background: var(--surface-subtle);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 1.75rem;
}

.catalog-row-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-row-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.catalog-row-sku,
.catalog-row-producer {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.catalog-row-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-mid);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 2px;
}

.catalog-row-price {
    color: var(--brand-primary-dark);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 4px;
}

.catalog-row-price .price-unit {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.75rem;
}

.catalog-row-price .price-old {
    text-decoration: line-through;
    color: var(--text-soft);
    font-weight: 400;
    font-size: 0.7rem;
    margin-right: 4px;
}

.catalog-row-stock-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.catalog-row-stock-ok {
    background: #dbeafe;
    color: var(--brand-primary-dark);
}

.catalog-row-stock-low {
    background: #fecaca;
    color: #991b1b;
}

.catalog-row-stock-empty {
    background: #f1f5f9;
    color: var(--text-muted);
}

.catalog-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

/* Soft stepper — lagodny, zaokraglony, bez ostrych krawedzi (uzywany na mobilnej liscie kart) */

.catalog-qty-stepper.catalog-qty-stepper-soft {
    display: inline-flex;
    align-items: center;
    background: #f1f5f9;
    border: 0;
    border-radius: 10px;
    padding: 2px;
    gap: 0;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.catalog-qty-stepper.catalog-qty-stepper-soft button {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    color: #475569;
    font-size: 1.1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.catalog-qty-stepper.catalog-qty-stepper-soft button:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-mid);
}

.catalog-qty-stepper.catalog-qty-stepper-soft button:disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}

.catalog-qty-stepper.catalog-qty-stepper-soft input {
    width: 44px;
    height: 32px;
    border: 0;
    background: transparent;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-mid);
    padding: 0;
    outline: none;
    /* Chrome/Firefox — ukryj spinnery */
    -moz-appearance: textfield;
    appearance: textfield;
}

.catalog-qty-stepper.catalog-qty-stepper-soft input::-webkit-outer-spin-button,
.catalog-qty-stepper.catalog-qty-stepper-soft input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.catalog-row-add-btn {
    margin-left: auto;
    white-space: nowrap;
}

/* ── Mobilna siatka produktow (≤ lg) ────────────────── */

.catalog-mobile-card {
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.catalog-mobile-card:hover {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.catalog-mobile-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--surface-subtle);
}

.catalog-mobile-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 2rem;
}

.catalog-mobile-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
    line-height: 1.2;
    font-size: 0.8rem;
}

/* ── Sticky filter bar (Products page) ────────────────── */

.products-filter-bar {
    position: sticky;
    top: 62px;
    z-index: 9;
}

/* ── Mini Cart ────────────────────────────────────────── */

.mini-cart {
    position: relative;
}

.mini-cart summary {
    list-style: none;
}

.mini-cart summary::-webkit-details-marker {
    display: none;
}

.mini-cart::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.mini-cart-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(360px, 90vw);
    z-index: 30;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.mini-cart:hover .mini-cart-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mini-cart-trigger {
    min-height: 42px;
    cursor: pointer;
}

.mini-cart-line .text-truncate {
    display: block;
    max-width: 100%;
}

.mini-cart-line-meta {
    font-size: 0.78rem;
}

/* ── User Dropdown ─────────────────────────────────────── */

.user-dropdown {
    position: relative;
}

.user-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 12px;
}

.user-dropdown-trigger {
    min-height: 42px;
    cursor: default;
}

.user-dropdown-avatar {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(108, 117, 125, 0.12);
    color: #6c757d;
    flex: 0 0 auto;
}

.user-dropdown-avatar-icon {
    font-size: 1.5rem;
    color: var(--brand-primary-dark);
    line-height: 1;
}

.user-dropdown-chevron {
    color: var(--text-soft);
    transition: transform 0.15s ease;
}

.user-dropdown-chevron-icon {
    color: var(--text-soft);
    font-size: 0.75rem;
    line-height: 1;
    transition: transform 0.15s ease;
}

.user-dropdown.is-open .user-dropdown-chevron,
.user-dropdown.is-open .user-dropdown-chevron-icon {
    transform: rotate(180deg);
}

.user-dropdown-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 29;
}

.user-dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 230px;
    z-index: 30;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.user-dropdown.is-open .user-dropdown-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.5rem;
    color: var(--text-mid);
    text-decoration: none;
    font-size: 0.88rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
    width: 100%;
}

.user-dropdown-item:hover {
    background: #f1f5f9;
    color: var(--text-mid);
    text-decoration: none;
}

.user-dropdown-item-danger:hover {
    background: rgba(239, 68, 68, 0.07);
    color: var(--danger-deep);
}

.user-dropdown-item-icon {
    width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex: 0 0 auto;
}

.user-dropdown-item-danger .user-dropdown-item-icon {
    color: var(--danger-deep);
}

.sidebar-back-link {
    color: rgba(203, 213, 225, 0.85) !important;
    padding: 0.45rem 0.5rem !important;
    border-radius: 0.5rem;
    transition: background 0.12s ease, color 0.12s ease;
}

.sidebar-back-link:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #fff !important;
}

.sidebar-back-link .user-dropdown-item-icon {
    color: rgba(203, 213, 225, 0.75);
}

/* ── Mini Cart ─────────────────────────────────────────── */

.mini-cart-icon {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--brand-primary);
}

/* ── Toast notifications ─────────────────────────────── */

.toast-container-b2b {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
    pointer-events: none;
}

.toast-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: toast-in 0.3s ease forwards;
}

.toast-item.toast-removing {
    animation: toast-out 0.3s ease forwards;
}

.toast-success {
    background: #065f46;
    color: #fff;
}

.toast-error {
    background: #991b1b;
    color: #fff;
}

.toast-icon {
    flex-shrink: 0;
    display: flex;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(12px); }
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 2rem 1rem;
}

.login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 880px;
}

@media (max-width: 768px) {
    .login-grid { grid-template-columns: 1fr; }
    /* Mobile: Zaloguj na gorze, Rejestracja na dole */
    .login-card-login { order: 1; }
    .login-card-register { order: 2; }
}

.login-card {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
}

.login-card-register {
    background: #fff;
    justify-content: center;
}

.login-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.login-card-text {
    color: #475569;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.login-forgot-link {
    color: #475569;
    font-size: 0.875rem;
    text-decoration: none;
}

.login-forgot-link:hover {
    color: var(--text-dark);
    text-decoration: underline;
}

/* === Landing page B2B === */
.b2b-landing {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding: 0;
}

.b2b-hero {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand-primary-dark) 0%, var(--brand-primary) 50%, var(--brand-primary-light) 100%);
    color: #fff;
    padding: 4rem 2rem;
    box-shadow: 0 20px 40px -15px rgba(30, 58, 138, 0.35);
}

.b2b-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 15%, rgba(255,255,255,0.18), transparent 40%),
        radial-gradient(circle at 15% 85%, rgba(255,255,255,0.12), transparent 45%);
    pointer-events: none;
}

.b2b-hero-inner {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.b2b-hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.b2b-hero-title {
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    color: #fff;
}

.b2b-hero-accent {
    color: var(--brand-accent);
    display: block;
}

.b2b-hero-lead {
    font-size: 1.15rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.b2b-hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.b2b-hero-actions .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.b2b-hero-actions .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

.b2b-hero-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.b2b-hero-stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    color: var(--brand-accent);
}

.b2b-hero-stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.25rem;
}

.b2b-features {
    padding: 0 0.5rem;
}

.b2b-feature-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    height: 100%;
    border: 1px solid var(--border-subtle);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.b2b-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(37, 99, 235, 0.25);
    border-color: #bfdbfe;
}

.b2b-feature-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.b2b-feature-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.b2b-feature-icon i {
    line-height: 1;
}

.b2b-feature-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
}

.b2b-feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0;
}

.b2b-cta {
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--text-mid) 100%);
    border-radius: 1.25rem;
    padding: 2.5rem;
    color: #fff;
    box-shadow: 0 12px 30px -12px rgba(15, 23, 42, 0.3);
}

.b2b-cta-inner {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.b2b-cta-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.b2b-cta-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    max-width: 560px;
}

.b2b-steps {
    padding: 1rem 0.5rem 2rem;
}

.b2b-step {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    text-align: center;
    height: 100%;
    border: 1px solid var(--border-subtle);
    position: relative;
}

.b2b-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 6px 12px -4px rgba(37, 99, 235, 0.4);
}

.b2b-step-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.b2b-step-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0;
}

@media (max-width: 575.98px) {
    .b2b-hero { padding: 2rem 1.25rem; }
    .b2b-hero-title { font-size: 1.5rem; line-height: 1.2; }
    .b2b-hero-lead { font-size: 0.95rem; }
    .b2b-hero-actions .btn { flex: 1 1 auto; min-width: 120px; }
    .b2b-hero-stats { gap: 1rem; }
    .b2b-cta { padding: 1.75rem; }
    .b2b-cta-inner { flex-direction: column; align-items: flex-start; }
}

/* === SearchableDropdown === */
.searchable-dropdown {
    position: relative;
}

.searchable-dropdown-toggle {
    cursor: pointer;
}

.searchable-dropdown-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 1040;
}

.searchable-dropdown-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
    z-index: 1050;
}

.searchable-dropdown-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.searchable-dropdown-list .dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.35rem 0.75rem;
    border: 0;
    background: transparent;
    cursor: pointer;
    white-space: normal;
}

.searchable-dropdown-list .dropdown-item:hover {
    background: #f1f5f9;
}

.searchable-dropdown-list .dropdown-item.active {
    background: var(--brand-primary);
    color: #fff;
}

/* === Mapping tables (bez overflow-clip, padding bocznego treści) === */
.mapping-table {
    overflow: visible;
}

.mapping-table th,
.mapping-table td {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.mapping-table tbody tr td {
    overflow: visible;
}
