:root {
    --color-black: #111111;
    --color-dark: #1c1c1c;
    --color-gold: #c9a227;
    --color-gold-light: #e0c46b;
    --color-white: #ffffff;
    --color-light: #f5f3f0;
    --color-gray: #6b6b6b;
    --color-border: #ddd6c8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--color-light);
    color: var(--color-black);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

.container {
    width: 95%;

    margin: 0 auto;
}

    

.site-header {
    background-color: var(--color-black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-container {
    min-height: 80px;
    z-index: 3;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 95%;
}

.category-admin-wrapper {
    padding: 0;
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

.category-admin-list {
    min-width: 0;
}

.logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 1px;
}

.logo span {
    color: var(--color-gold);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav a {
    color: var(--color-white);
    font-weight: 500;
    transition: 0.3s;
}

.category-admin-row {
    display: grid;
    grid-template-columns: minmax(200px, 1.6fr) minmax(150px, 0.9fr) 80px 110px 80px 140px;
    gap: 14px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-white);
    transition: box-shadow 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}

.main-nav a:hover {
    color: var(--color-gold);
}

.main-nav a.nav-btn {
    padding: 10px 18px;
    border: 1px solid var(--color-gold);
    border-radius: 6px;
}

.nav-btn {
    padding: 10px 18px;
    border: 1px solid var(--color-gold);
    border-radius: 6px;
}

.hero {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    background: linear-gradient(to right, #f5f3f0, #ffffff);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.hero-text {
    max-width: 760px;
}

.hero-top {
    color: var(--color-gold);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 18px;
    font-size: 14px;
}

.hero h1 {
    font-size: 64px;
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero-description {
    font-size: 21px;
    color: var(--color-gray);
    margin-bottom: 32px;
    max-width: 680px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-gold,
.btn-outline {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: 700;
    transition: 0.3s;
}

.btn-gold {
    background-color: var(--color-gold);
    color: var(--color-white);
    border: 1px solid var(--color-gold);
}

.btn-gold:hover {
    background-color: var(--color-black);
    border-color: var(--color-black);
}

.btn-outline {
    border: 1px solid var(--color-black);
    color: var(--color-black);
    background-color: transparent;
}

.btn-outline:hover {
    background-color: var(--color-black);
    color: var(--color-white);
}

.home-intro {
    padding: 80px 0;
    background-color: var(--color-white);
}

.home-intro h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.home-intro p {
    max-width: 800px;
    font-size: 18px;
    color: var(--color-gray);
}

.site-footer {
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 24px 0;
    margin-top: 60px;
}

.footer-container {
    text-align: center;
}

@media (max-width: 900px) {
    .header-container {
        flex-direction: column;
        justify-content: center;
        padding: 20px 0;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-description {
        font-size: 18px;
    }
}

.login-page {
    padding: 80px 0;
}

.login-box {
    max-width: 500px;
    margin: 0 auto;
    background: var(--color-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-border);
}

.login-box h1 {
    margin-bottom: 10px;
    font-size: 36px;
}

.login-box p {
    color: var(--color-gray);
    margin-bottom: 24px;
}

/* Orders / Templates layout */
.orders-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 18px;
}

.orders-sidebar {
    flex: 0 0 220px;
}

.orders-sidebar-box {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.03);
}

.orders-side-link {
    display: block;
    padding: 10px 12px;
    color: var(--color-dark);
    border-radius: 6px;
    margin-bottom: 6px;
    font-weight: 600;
}

.orders-side-link.active {
    background: var(--color-gold-light);
    color: var(--color-black);
}

.orders-content {
    flex: 1;
}

/* Recurring templates */
.recurring-template-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 18px;
}

.recurring-template-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.recurring-create,
.recurring-add-item,
.recurring-skip {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.templates-create {
    margin-bottom: 12px;
}

.recurring-add-item label {
    font-weight: 700;
    font-size: 13px;
    color: var(--color-gray);
}

.recurring-add-item select,
.recurring-add-item input[type="number"],
.recurring-create input[type="text"],
.recurring-skip input[type="date"],
.recurring-skip input[type="text"] {
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
}

.recurring-create .btn,
.recurring-add-item .btn,
.recurring-skip .btn {
    background: var(--color-gold);
    color: var(--color-white);
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

.recurring-items-list {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.recurring-weekday {
    background: #fafaf6;
    border: 1px solid var(--color-border);
    padding: 12px;
    border-radius: 10px;
}

.recurring-weekday ul {
    margin-top: 8px;
    list-style: none;
    padding-left: 0;
}

.recurring-weekday li {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.04);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-thumb {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: #f4f2ee;
}

.product-thumb-sm {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: #f4f2ee;
}

.status-badge {
    background: #e9fbe9;
    color: #1a7a1a;
    padding: 6px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
}

.btn {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--color-gold);
    color: var(--color-white);
    border: none;
    cursor: pointer;
    font-weight: 700;
}

.btn-secondary {
    background: #e6c761;
    color: #111;
    border: 1px solid #d4b84a;
}

.templates-content h3 {
    margin-bottom: 12px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.preview-card {
    background: #fff;
    border: 1px solid var(--color-border);
    padding: 12px;
    border-radius: 10px;
    min-height: 90px;
}

@media (max-width:700px) {
    .recurring-add-item {
        flex-direction: column;
        align-items: stretch;
    }

    .orders-layout {
        flex-direction: column;
    }

    .orders-sidebar {
        width: 100%;
    }
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 16px;
}

.login-form input:focus {
    outline: none;
    border-color: var(--color-gold);
}

/* Public cake-gallery homepage */
.luxury-kicker {
    margin: 0 0 10px;
    color: #b7833e;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.tt-hero {
    min-height: min(760px, calc(100vh - 80px));
    display: flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.96) 0%, rgba(0, 0, 0, 0.78) 42%, rgba(0, 0, 0, 0.22) 100%),
        var(--tt-hero-image),
        #070605;
    background-size: cover;
    background-position: center right;
    color: #fff;
}

.tt-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 34%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
    pointer-events: none;
}

.tt-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: inherit;
    padding-top: 58px;
    padding-bottom: 58px;
}

.tt-hero-copy {
    max-width: 620px;
}

.tt-hero h1,
.tt-section-header h2,
.tt-about-copy h2,
.gallery-hero h1,
.gallery-section-header h2 {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0;
}

.tt-hero h1 {
    margin: 0 0 18px;
    font-size: clamp(48px, 7vw, 86px);
    line-height: 0.95;
}

.tt-hero-copy > p:not(.luxury-kicker) {
    max-width: 470px;
    margin: 0 0 34px;
    color: rgba(255, 255, 255, 0.82);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 3vw, 34px);
    line-height: 1.35;
}

.tt-hero .hero-actions {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.tt-hero .btn-gold,
.tt-hero .btn-outline {
    min-height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 0 30px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.tt-hero .btn-gold {
    border: 1px solid #f4b357;
    background: linear-gradient(180deg, #ffc36a, #eda142);
    color: #17110a;
    box-shadow: 0 14px 30px rgba(237, 161, 66, 0.28);
}

.tt-hero .btn-gold::after {
    content: "->";
    font-size: 18px;
    line-height: 1;
}

.tt-hero .btn-outline {
    color: #fff;
    border-color: rgba(255, 188, 96, 0.85);
    background: rgba(0, 0, 0, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 188, 96, 0.12);
}

.tt-hero .btn-outline::before {
    content: "";
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23f4b357' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12S4 16 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
}

.tt-hero .btn-outline:hover {
    color: #111;
    background: #fff;
    border-color: #fff;
}

.tt-section {
    padding: 56px 0;
    background: #fbfaf8;
}

.tt-section-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 28px;
}

.tt-section-header h2 {
    margin: 0 0 8px;
    font-size: clamp(34px, 4vw, 56px);
    line-height: 1.05;
}

.tt-section-header p {
    margin: 0;
    color: #5f5b55;
    font-size: 17px;
}

.tt-inline-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #7d4c19;
    font-weight: 800;
}

.tt-inline-link::after {
    content: "->";
}

.tt-gallery-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.tt-gallery-preview-card {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 8px;
    color: #fff;
    background: #15100c;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.tt-gallery-preview-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.tt-gallery-preview-card::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.78));
}

.tt-gallery-preview-card:hover img {
    transform: scale(1.04);
}

.tt-gallery-preview-card > div:last-child {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding: 22px;
}

.tt-gallery-preview-card strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 25px;
    font-weight: 500;
}

.tt-gallery-preview-card span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
    line-height: 1.45;
}

.tt-gallery-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 70% 30%, rgba(214, 130, 116, 0.38), transparent 34%),
        linear-gradient(135deg, #18110d, #5a321f);
}

.tt-gallery-placeholder span {
    color: rgba(255, 255, 255, 0.18);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 82px;
}

.tt-news-preview {
    padding-top: 34px;
}

.tt-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.tt-news-card {
    min-height: 320px;
    display: grid;
    grid-template-rows: 1fr 150px;
    overflow: hidden;
    border: 1px solid rgba(221, 214, 200, 0.8);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(34, 25, 15, 0.08);
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tt-news-card:hover,
.tt-news-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(210, 167, 36, 0.45);
    box-shadow: 0 18px 42px rgba(34, 25, 15, 0.14);
}

.tt-news-card-body {
    padding: 26px;
    min-width: 0;
}

.tt-news-card time {
    display: block;
    margin-bottom: 16px;
    color: #77716b;
    font-size: 14px;
}

.tt-news-card h3 {
    margin: 0 0 14px;
    font-size: 24px;
    line-height: 1.25;
}

.tt-news-excerpt {
    color: #4f4a44;
    line-height: 1.5;
}

.tt-news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tt-empty-news {
    background: #fff;
}

.tt-about-band {
    padding-top: 28px;
}

.tt-about-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    overflow: hidden;
    border-radius: 8px;
    background: #f3eae0;
    box-shadow: 0 18px 42px rgba(34, 25, 15, 0.08);
}

.tt-about-copy {
    padding: clamp(28px, 5vw, 56px);
}

.tt-about-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.05;
}

.tt-about-copy h2 em {
    color: #b7833e;
    font-style: italic;
}

.tt-about-copy p {
    max-width: 440px;
    margin: 0 0 24px;
    color: #4f4a44;
}

.tt-about-image {
    min-height: 330px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.14), transparent),
        var(--tt-about-image),
        #22160f;
    background-size: cover;
    background-position: center;
}

.tt-social-strip {
    padding: 0 0 52px;
    background: #fbfaf8;
}

.tt-social-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
    padding: 20px 42px;
    border-radius: 8px;
    background: #f1e5d6;
}

.tt-social-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #2f6fda;
    color: #fff;
    font-size: 40px;
    font-weight: 900;
    font-family: Arial, sans-serif;
}

.tt-social-inner strong,
.tt-social-inner span {
    display: block;
}

.tt-social-inner strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
}

.tt-social-inner span {
    color: #4f4a44;
}

.tt-footer {
    padding: 34px 0 18px;
    background:
        linear-gradient(120deg, #090807, #18120d),
        #111;
    color: rgba(255, 255, 255, 0.78);
}

.tt-footer-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(160px, 1fr));
    gap: 32px;
    align-items: start;
}

.tt-footer-logo {
    display: inline-block;
    margin-bottom: 10px;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
}

.tt-footer-logo span {
    color: var(--color-gold);
}

.tt-footer h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 15px;
}

.tt-footer p,
.tt-footer a {
    display: block;
    margin: 0 0 7px;
    color: rgba(255, 255, 255, 0.72);
}

.tt-footer a:hover {
    color: #f2bf64;
}

.tt-footer-socials {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.tt-footer-socials a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    color: #fff;
    font-weight: 900;
}

.tt-footer-bottom {
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

.gallery-hero {
    min-height: 430px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.42)),
        var(--gallery-hero-image),
        #090705;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.gallery-hero-inner {
    padding-top: 64px;
    padding-bottom: 64px;
}

.gallery-hero h1 {
    max-width: 760px;
    margin: 0 0 16px;
    font-size: clamp(44px, 6vw, 76px);
    line-height: 1;
}

.gallery-hero p:not(.luxury-kicker) {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 21px;
}

.gallery-page-content {
    padding-top: 48px;
    padding-bottom: 70px;
}

.gallery-section-header {
    margin-bottom: 22px;
}

.gallery-section-header h2 {
    margin: 0 0 8px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.05;
}

.gallery-section-header p {
    max-width: 720px;
    color: #5f5b55;
}

.gallery-category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.gallery-category-tabs a {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 10px 15px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
    color: #241b15;
    font-weight: 800;
}

.gallery-category-tabs a.active,
.gallery-category-tabs a:hover {
    border-color: #c79046;
    background: #fff6e8;
    color: #7d4c19;
}

.gallery-category-tabs span {
    color: #847b72;
    font-size: 13px;
}

.cake-gallery-grid {
    columns: 4 260px;
    column-gap: 20px;
}

.cake-gallery-card {
    position: relative;
    display: inline-block;
    width: 100%;
    margin: 0 0 20px;
    overflow: hidden;
    border-radius: 8px;
    background: #15100c;
    box-shadow: 0 14px 34px rgba(34, 25, 15, 0.12);
}

.cake-gallery-image-button {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.cake-gallery-image-button img {
    display: block;
    width: 100%;
    height: auto;
}

.cake-gallery-card-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 44px 18px 18px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.82));
    color: #fff;
}

.cake-gallery-card-caption span,
.cake-gallery-card-caption strong {
    display: block;
}

.cake-gallery-card-caption span {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.cake-gallery-card-caption strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 500;
}

.cake-gallery-card-caption p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    line-height: 1.4;
}

.gallery-empty-state {
    padding: 46px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

/* Admin cake gallery */
.cake-gallery-admin-page {
    --admin-gallery-compact-gap: 10px;
}

.cake-gallery-admin-page.dashboard-page {
    padding-top: 24px;
}

.cake-gallery-admin-page .dashboard-header {
    margin-bottom: 14px;
}

.cake-gallery-admin-page .dashboard-header h1 {
    font-size: clamp(28px, 3vw, 40px);
}

.cake-gallery-admin-page .dashboard-description {
    max-width: 760px;
    font-size: 14px;
}

.cake-gallery-admin-page .btn-gold,
.cake-gallery-admin-page .btn-outline,
.cake-gallery-admin-page .btn-table-action {
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.2;
}

.cake-gallery-admin-page .dashboard-kicker {
    margin-bottom: 5px;
    font-size: 12px;
    letter-spacing: 0.16em;
}

.admin-gallery-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.admin-gallery-sidebar {
    position: sticky;
    top: 96px;
}

.admin-gallery-content {
    display: flex;
    flex-direction: column;
    gap: var(--admin-gallery-compact-gap);
}

.admin-gallery-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.admin-gallery-stats > div,
.admin-gallery-panel {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(34, 25, 15, 0.06);
}

.admin-gallery-stats > div {
    padding: 9px 12px;
}

.admin-gallery-stats span {
    display: block;
    color: var(--color-gray);
    font-size: 12px;
    font-weight: 800;
}

.admin-gallery-stats strong {
    display: block;
    margin-top: 2px;
    font-size: 20px;
}

.admin-gallery-panel {
    padding: 12px;
}

.admin-gallery-hero-grid {
    display: grid;
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.admin-gallery-hero-preview {
    min-height: 130px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #eee8de;
}

.admin-gallery-hero-preview img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 130px;
    object-fit: cover;
}

.admin-gallery-hero-preview .admin-gallery-empty-cover {
    width: 100%;
    height: 100%;
    min-height: 130px;
}

.admin-gallery-hero-form {
    display: grid;
    gap: 8px;
    align-content: start;
}

.admin-gallery-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.admin-gallery-panel-header h2 {
    margin: 0;
    font-size: 20px;
}

.admin-gallery-panel-header > span {
    color: var(--color-gray);
    font-size: 12px;
    font-weight: 800;
}

.admin-gallery-upload-form,
.admin-gallery-category-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: end;
}

.admin-gallery-wide-field,
.admin-gallery-upload-files {
    grid-column: 1 / -1;
}

.admin-gallery-upload-form button,
.admin-gallery-category-form button {
    justify-self: start;
}

.admin-gallery-checkbox {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 30px;
    font-size: 13px;
    font-weight: 800;
}

.admin-gallery-grid-two {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    gap: var(--admin-gallery-compact-gap);
}

.admin-gallery-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-gallery-category-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr) 84px;
    gap: 8px;
    align-items: start;
    padding: 9px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fbfaf8;
}

.admin-gallery-category-row img,
.admin-gallery-empty-cover {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
}

.admin-gallery-category-row > img,
.admin-gallery-category-row > .admin-gallery-empty-cover {
    grid-row: 1 / span 3;
}

.admin-gallery-category-row .product-edit-field,
.admin-gallery-category-row .product-edit-field input,
.admin-gallery-category-row .product-edit-field select {
    min-width: 0;
    width: 100%;
}

.admin-gallery-category-cover-upload {
    grid-column: 2 / 4;
}

.admin-gallery-category-order {
    grid-column: 4;
    grid-row: 1;
}

.admin-gallery-category-row .admin-gallery-checkbox {
    grid-column: 4;
    grid-row: 2;
    align-self: center;
    margin-top: 4px;
    white-space: nowrap;
}

.admin-gallery-category-row input[type="file"] {
    max-width: 100%;
    font-size: 12px;
}

.admin-gallery-category-row label,
.admin-gallery-image-form label,
.admin-gallery-upload-form label,
.admin-gallery-category-form label,
.admin-gallery-hero-form label {
    font-size: 12px;
}

.admin-gallery-empty-cover {
    display: grid;
    place-items: center;
    padding: 8px;
    background: #eee8de;
    color: var(--color-gray);
    font-size: 12px;
    text-align: center;
}

.admin-gallery-row-meta {
    display: flex;
    grid-column: 2 / 4;
    gap: 8px;
    align-items: center;
    color: var(--color-gray);
    font-size: 12px;
    font-weight: 800;
}

.admin-gallery-actions {
    display: flex;
    grid-column: 4;
    grid-row: 3;
    gap: 5px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.admin-gallery-image-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
}

.admin-gallery-filter-bar {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) 140px;
    gap: 8px;
    align-items: end;
    margin-bottom: 10px;
    padding: 9px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fbfaf8;
}

.admin-gallery-filter-bar .product-edit-field {
    gap: 3px;
}

.admin-gallery-filter-bar input,
.admin-gallery-filter-bar select {
    min-height: 34px;
    border-radius: 8px;
    padding: 7px 9px;
    font-size: 13px;
}

.admin-gallery-filter-empty {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    color: var(--color-gray);
    font-weight: 800;
}

.admin-gallery-image-card {
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fbfaf8;
}

.admin-gallery-image-card > img {
    display: block;
    width: 100%;
    height: 138px;
    object-fit: cover;
}

.admin-gallery-image-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 9px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-gray);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.admin-gallery-image-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-gallery-image-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 66px;
    gap: 7px;
    padding: 9px;
    align-items: end;
}

.admin-gallery-image-form .product-edit-field {
    min-width: 0;
    gap: 3px;
}

.admin-gallery-image-form .product-edit-field select,
.admin-gallery-image-form .product-edit-field input[type="number"] {
    min-height: 34px;
    border-radius: 8px;
    padding: 7px 9px;
    font-size: 13px;
}

.admin-gallery-image-form .admin-gallery-checkbox,
.admin-gallery-image-form .admin-gallery-actions {
    grid-column: 1 / -1;
    grid-row: auto;
}

.admin-gallery-image-form .admin-gallery-actions {
    justify-content: space-between;
}

.admin-gallery-image-form textarea,
.admin-gallery-category-form textarea,
.admin-gallery-upload-form textarea {
    width: 100%;
    min-height: 84px;
    resize: vertical;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    color: var(--color-black);
    background: #fff;
}

@media (max-width: 1100px) {
    .tt-gallery-card-grid,
    .tt-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-gallery-layout,
    .admin-gallery-hero-grid,
    .admin-gallery-grid-two {
        grid-template-columns: 1fr;
    }

    .admin-gallery-sidebar {
        position: static;
    }

    .admin-gallery-category-row {
        grid-template-columns: 82px 1fr;
    }

    .admin-gallery-category-row > img,
    .admin-gallery-category-row > .admin-gallery-empty-cover,
    .admin-gallery-category-order,
    .admin-gallery-category-cover-upload,
    .admin-gallery-category-row .admin-gallery-checkbox,
    .admin-gallery-category-row .admin-gallery-actions,
    .admin-gallery-category-row .admin-gallery-row-meta,
    .admin-gallery-category-row .product-edit-field {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .admin-gallery-category-row .admin-gallery-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .tt-hero {
        min-height: 640px;
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.46)),
            var(--tt-hero-image),
            #070605;
        background-size: cover;
        background-position: center;
    }

    .tt-section-header,
    .admin-gallery-panel-header,
    .tt-social-inner {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .tt-gallery-card-grid,
    .tt-news-grid,
    .tt-about-grid,
    .tt-footer-grid,
    .admin-gallery-stats,
    .admin-gallery-filter-bar,
    .admin-gallery-upload-form,
    .admin-gallery-category-form {
        grid-template-columns: 1fr;
    }

    .tt-gallery-preview-card {
        min-height: 280px;
    }

    .tt-social-inner {
        display: grid;
        padding: 20px;
    }

    .cake-gallery-grid {
        columns: 1;
    }

    .gallery-hero {
        min-height: 360px;
    }

    .news-detail-page {
        padding: 20px 0;
    }

    .news-detail-page .home-post-card {
        padding: 14px;
    }

    .news-detail-page .home-post-gallery img {
        max-height: 68vh;
    }
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 92px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-black);
    border-radius: 7px;
    padding: 7px 10px;
    cursor: pointer;
    font-weight: 700;
    line-height: 1;
}

.password-toggle:hover,
.password-toggle:focus {
    border-color: var(--color-gold);
    color: #8a6710;
    outline: none;
}

.remember-device-toggle {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--color-gray);
    font-weight: 700;
}

.remember-device-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-gold);
    flex: 0 0 auto;
}

.login-helper-link {
    margin-top: 18px;
    text-align: center;
}

.login-helper-link a {
    color: var(--color-black);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid var(--color-gold);
}

.login-helper-link a:hover {
    color: var(--color-gold);
}

.home-feed-page {
    padding: 70px 0;
    background: var(--color-light);
}

.home-feed-header {
    max-width: 760px;
    margin-bottom: 34px;
}

.home-feed-header h1 {
    margin: 0 0 16px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
}

.home-feed-header p {
    color: var(--color-gray);
    font-size: 20px;
    line-height: 1.55;
}

.home-post-feed {
    max-width: 860px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.home-post-card,
.home-empty-feed,
.post-composer-card,
.post-admin-list-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.home-post-card {
    position: relative;
    padding: 26px;
}

.home-post-click-card {
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-post-click-card:hover {
    transform: translateY(-2px);
    border-color: rgba(210, 167, 36, 0.4);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
}

.home-post-card-overlay {
    position: absolute;
    z-index: 2;
    inset: 0;
    border-radius: inherit;
}

.home-post-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--color-gray);
    font-size: 14px;
    margin-bottom: 14px;
}

.home-post-meta span {
    color: var(--color-black);
    font-weight: 800;
}

.home-post-card h2 {
    margin: 0 0 14px;
    font-size: 30px;
}

.news-detail-card h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.05;
}

.home-post-body {
    color: #222;
    line-height: 1.65;
    font-size: 17px;
}

.home-post-body > *:first-child {
    margin-top: 0;
}

.home-post-body > *:last-child {
    margin-bottom: 0;
}

.home-post-body blockquote {
    margin: 18px 0;
    padding: 12px 18px;
    border-left: 4px solid var(--color-gold);
    background: #faf8f2;
}

.home-post-gallery {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.home-post-gallery.count-1 {
    grid-template-columns: 1fr;
}

.home-post-gallery.count-2,
.home-post-gallery.count-3,
.home-post-gallery.count-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-post-gallery img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

.home-post-click-card .home-post-gallery img {
    cursor: pointer;
}

.home-post-read-more {
    display: inline-flex;
    margin-top: 18px;
    color: #7d4c19;
    font-weight: 900;
}

.home-post-read-more::after {
    content: "->";
    margin-left: 8px;
}

.news-back-link {
    margin-bottom: 14px;
}

.news-detail-page {
    padding: 34px 0;
}

.news-detail-page .home-post-card {
    max-width: 720px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 10px;
}

.news-detail-card .home-post-meta {
    margin-bottom: 10px;
    font-size: 13px;
}

.news-detail-card h1 {
    margin-bottom: 12px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.12;
}

.news-detail-card .home-post-body {
    font-size: 16px;
    line-height: 1.5;
}

.news-detail-page .home-post-gallery {
    display: grid;
    gap: 10px;
    justify-items: center;
    margin-top: 14px;
}

.news-detail-page .home-post-gallery img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(620px, 72vh);
    object-fit: contain;
    border-radius: 10px;
    background: #fbfaf8;
}

.news-detail-page .home-post-gallery img + img {
    margin-top: 0;
}

@media (max-width: 760px) {
    .news-detail-page {
        padding: 20px 0;
    }

    .news-detail-page .home-post-card {
        padding: 14px;
    }

    .news-detail-page .home-post-gallery img {
        max-height: 68vh;
    }
}

.home-empty-feed {
    max-width: 760px;
    padding: 34px;
}

.home-empty-feed h2 {
    margin: 0 0 8px;
}

.home-empty-feed p {
    margin: 0;
    color: var(--color-gray);
}

.home-pagination {
    max-width: 860px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 28px;
}

.home-pagination a {
    display: inline-flex;
    min-width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: #fff;
    color: var(--color-black);
    text-decoration: none;
    font-weight: 800;
}

.home-pagination a.active,
.home-pagination a:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
}

.home-hero {
    padding: 76px 0 54px;
    background:
        linear-gradient(110deg, rgba(17, 17, 17, 0.92), rgba(17, 17, 17, 0.78)),
        #111;
    color: var(--color-white);
}

.home-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 48px;
    align-items: center;
}

.home-hero-copy {
    max-width: 760px;
}

.home-hero-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(46px, 6vw, 82px);
    line-height: 1.03;
}

.home-hero-copy p:not(.dashboard-kicker) {
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 21px;
    line-height: 1.55;
}

.home-hero .btn-outline {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.5);
}

.home-hero .btn-outline:hover {
    background: var(--color-white);
    color: var(--color-black);
}

.home-hero-media {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28);
}

.home-hero-media img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
}

.home-title-section {
    padding: 56px 0;
    background: #fff;
}

.home-title-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1fr);
    gap: 42px;
    align-items: start;
}

.home-title-grid h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
}

.home-title-grid > p {
    color: #333;
    font-size: 19px;
    line-height: 1.7;
}

.home-quick-links {
    padding: 34px 0 74px;
}

.home-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.home-quick-card {
    display: block;
    min-height: 190px;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-white);
    color: var(--color-black);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.home-quick-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-gold);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.08);
}

.home-quick-card span {
    display: block;
    color: var(--color-gold);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.3px;
    font-size: 12px;
}

.home-quick-card strong {
    display: block;
    margin: 14px 0 10px;
    font-size: 24px;
}

.home-quick-card p {
    margin: 0;
    color: var(--color-gray);
}

.contact-page {
    padding: 70px 0;
}

.contact-hero {
    min-height: 360px;
    display: flex;
    align-items: flex-end;
    padding: 44px;
    border-radius: 18px;
    background:
        linear-gradient(90deg, rgba(17, 17, 17, 0.88), rgba(17, 17, 17, 0.44)),
        url("/storage/products/product_93_1777273486_0.jpg") center / cover;
    color: var(--color-white);
    margin-bottom: 24px;
}

.contact-hero > div {
    max-width: 720px;
}

.contact-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.08;
}

.contact-hero p:not(.dashboard-kicker) {
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 20px;
}

.contact-hero .btn-outline {
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.55);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.contact-card,
.contact-map-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.contact-card {
    padding: 28px;
}

.contact-card h2,
.contact-map-heading h2 {
    margin: 0 0 20px;
    font-size: 28px;
}

.contact-info-list,
.contact-hours {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-info-list span,
.contact-hours span {
    display: block;
    color: var(--color-gray);
    font-size: 14px;
    font-weight: 700;
}

.contact-info-list strong,
.contact-hours strong {
    display: block;
    color: var(--color-black);
    font-size: 18px;
}

.contact-info-list a {
    color: var(--color-black);
    border-bottom: 1px solid var(--color-gold);
}

.contact-hours div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

.contact-hours div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.contact-map-card {
    overflow: hidden;
}

.contact-map-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 26px 28px;
    border-bottom: 1px solid var(--color-border);
}

.contact-map-wrap iframe {
    display: block;
    width: 100%;
    height: 480px;
}

.admin-posts-layout {
    display: grid;
    grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.post-composer-card,
.post-admin-list-card {
    padding: 24px;
}

.post-composer-card {
    position: sticky;
    top: 105px;
}

.post-composer-header,
.post-admin-list-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.post-composer-header h2,
.post-admin-list-header h2 {
    margin: 0;
    font-size: 24px;
}

.post-composer-header span,
.post-admin-list-header span {
    color: var(--color-gray);
    line-height: 1.5;
}

.post-composer-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.post-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #faf8f2;
}

.post-editor-toolbar button {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
    font-weight: 800;
    cursor: pointer;
}

.post-editor-toolbar button:hover {
    border-color: var(--color-gold);
}

.post-editor {
    min-height: 190px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 16px;
    background: #fff;
    line-height: 1.6;
}

.post-editor:empty::before {
    content: "Napisz treść posta...";
    color: var(--color-gray);
}

.post-composer-bottom {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 14px;
}

.post-admin-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.post-admin-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
}

.post-admin-content h3 {
    margin: 12px 0 8px;
}

.post-admin-excerpt {
    max-height: 110px;
    overflow: hidden;
    color: #333;
    line-height: 1.5;
}

.post-admin-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.post-admin-thumbs img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}

.post-admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    color: var(--color-gray);
    font-size: 13px;
}

.post-admin-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.post-admin-actions form,
.post-admin-actions button {
    width: 100%;
}

.alert-error {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #fff1f1;
    color: #a12626;
    border: 1px solid #e7b4b4;
}

.alert-success {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #edf8f0;
    color: #1f7a35;
    border: 1px solid #b8dfc3;
}

.header-user {
    color: var(--color-white);
    font-weight: 600;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.header-user a {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.header-user a:hover {
    border-bottom-color: var(--color-gold);
    color: var(--color-gold);
}

.impersonation-banner {
    background: #2b2110;
    border-top: 1px solid rgba(213, 173, 34, 0.35);
    border-bottom: 1px solid rgba(213, 173, 34, 0.35);
    color: #fff;
}

.impersonation-banner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

.impersonation-banner strong {
    display: block;
    font-size: 15px;
}

.impersonation-banner span {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.impersonation-return-btn {
    border: 1px solid var(--color-gold);
    background: var(--color-gold);
    color: #111;
    border-radius: 6px;
    padding: 10px 16px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.impersonation-return-btn:hover {
    background: #fff;
    border-color: #fff;
}

.dashboard-page {
    padding: 70px 0;
}

.dashboard-kicker {
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 13px;
}

.dashboard-header h1 {
    font-size: 48px;
    margin-bottom: 16px;
}

.dashboard-description {
    color: var(--color-gray);
    max-width: 760px;
    font-size: 18px;
    margin-bottom: 40px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.dashboard-card {
    display: block;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 28px;
    color: var(--color-black);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    transition: 0.25s;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-gold);
}

.dashboard-card h2 {
    margin-bottom: 12px;
    font-size: 24px;
}

.dashboard-card p {
    color: var(--color-gray);
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: right;
}

.header-company {
    color: var(--color-white);
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.switch-company-btn {
    background: transparent;
    color: var(--color-gold);
    border: 1px solid var(--color-gold);
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
}

.company-switcher {
    display: none;
    position: absolute;
    top: 130px;
    right: 20px;
    z-index: 150;
}

.company-switcher.active {
    display: block;
}

.company-switcher-box {
    width: 360px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 16px;
}

.logout-btn {
    margin-left: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--color-white);
    border-radius: 6px;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.04);
}

.company-switcher-box input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 12px;
}

.company-search-results {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.company-result-item {
    text-align: left;
    width: 100%;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.company-result-item:hover {
    border-color: var(--color-gold);
    background: #fffdf7;
}

.company-result-name {
    font-weight: 700;
}

.company-result-meta {
    color: var(--color-gray);
    font-size: 13px;
}

.company-result-empty {
    color: var(--color-gray);
    padding: 10px 4px;
}

.users-table-wrapper {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: var(--color-black);
    color: var(--color-white);
}

.users-table th,
.users-table td {
    text-align: left;
    padding: 16px 18px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.users-table tbody tr:hover {
    background: #faf8f2;
}

.empty-cell {
    text-align: center;
    color: var(--color-gray);
    padding: 28px !important;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.status-badge.active {
    background: #edf8f0;
    color: #1f7a35;
}

.status-badge.inactive {
    background: #fff1f1;
    color: #a12626;
}

.status-badge.warning {
    background: #fff7df;
    color: #8a6200;
}

.status-badge.neutral {
    background: #eef4ff;
    color: #285c9d;
}

.status-badge.danger {
    background: #fff1f1;
    color: #a12626;
}

.hidden-form {
    display: none;
}

.tt-swal-popup {
    border-radius: 18px;
    padding: 24px;
}

.swal-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
    text-align: left;
}

.swal-form-grid-single {
    grid-template-columns: 1fr;
}

.swal-field {
    display: flex;
    flex-direction: column;
}

.swal-field-full {
    grid-column: 1 / -1;
}

.swal-field label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #222;
}

.swal-field-hint {
    margin-top: 6px;
    color: var(--color-gray);
    font-size: 12px;
    line-height: 1.35;
}

.swal-static-value {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #faf8f2;
    font-weight: 700;
}

.tt-input,
.tt-select {
    width: 100% !important;
    margin: 0 !important;
    height: 46px;
    border: 1px solid var(--color-border) !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    box-shadow: none !important;
}

.tt-input:focus,
.tt-select:focus {
    border-color: var(--color-gold) !important;
}

.swal-inline-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff1f1;
    color: #a12626;
    border: 1px solid #e7b4b4;
    text-align: left;
}

@media (max-width: 700px) {
    .swal-form-grid {
        grid-template-columns: 1fr;
    }
}

.btn-table-action {
    border: 1px solid var(--color-black);
    background: transparent;
    color: var(--color-black);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
}

.btn-table-action:hover {
    background: var(--color-black);
    color: var(--color-white);
}

.user-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-table-action-soft {
    border-color: var(--color-gold);
    color: #8a6710;
}

.btn-table-action-soft:hover {
    background: var(--color-gold);
    color: var(--color-white);
}

.btn-table-action-danger {
    border-color: #b42318;
    color: #b42318;
}

.btn-table-action-danger:hover {
    background: #b42318;
    color: var(--color-white);
}

.btn-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
    transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn-table-action .btn-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.btn-table-action:hover .btn-icon {
    transform: translateY(-2px);
    opacity: 0.95;
}

.btn-table-action:active .btn-icon {
    transform: translateY(0) scale(0.98);
}

.btn-icon-only {
    padding: 8px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(17, 17, 17, 0.06);
}

.btn-icon-only svg {
    display: block;
    width: 18px;
    height: 18px;
}

.btn-icon-only:hover {
    background: rgba(17, 17, 17, 0.06);
}

.btn-icon-only.btn-danger {
    border-color: rgba(180, 35, 24, 0.12);
    color: #b42318;
}

.btn-icon-only.btn-danger:hover {
    background: #b42318;
    color: #fff;
}

.btn-icon-only {
    gap: 8px;
    padding: 8px 10px;

}

.btn-icon-only .btn-label {
    display: none;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    color: inherit;
}

@media (min-width: 1000px) {
    .btn-icon-only {
        width: auto;
        height: 36px;
    }

    .btn-icon-only .btn-label {
        display: inline-block;
    }
}


.product-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid var(--color-border);
}

.product-thumb-large {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid var(--color-border);
}

.product-edit-row td {
    background: #faf8f2;
    padding: 0 !important;
}

.product-inline-edit-form {
    padding: 24px;
}

.product-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.product-edit-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-active-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    font-weight: 700;
    cursor: pointer;
}

.product-active-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--color-gold);
}

.product-edit-field-full {
    grid-column: 1 / -1;
}

.product-edit-field textarea,
.product-edit-field input[type="file"],
.product-edit-field select {
    width: 100%;
}

.product-edit-field textarea {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 14px 16px;
    resize: vertical;
    min-height: 130px;
    font-size: 15px;
}

.product-edit-field input[type="text"],
.product-edit-field input[type="number"] {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
}

.product-edit-field small {
    color: var(--color-gray);
    font-size: 13px;
}

.product-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.current-image-box {
    align-items: flex-start;
}

.products-search-card {
    margin-bottom: 24px;
}

.products-search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.products-admin-filter-card {
    padding: 18px;
}

.products-admin-filter-form {
    display: block;
}

.products-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.35fr) minmax(140px, 0.8fr) minmax(230px, 1.15fr) minmax(120px, 0.65fr) minmax(120px, 0.65fr) minmax(140px, 0.75fr);
    gap: 14px;
    align-items: end;
}

.products-filter-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.products-filter-field label {
    font-size: 13px;
    font-weight: 800;
    color: var(--color-black);
}

.products-filter-field input,
.products-filter-field select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    padding: 11px 12px;
    font-size: 15px;
    background: #fff;
}

.products-filter-field input:focus,
.products-filter-field select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 6px 18px rgba(201, 162, 39, 0.08);
}

.products-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}

.products-filter-actions span {
    color: var(--color-gray);
    font-weight: 700;
}

.products-filter-actions > div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-products-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.admin-products-content {
    min-width: 0;
}

.admin-products-table-wrapper {
    overflow-x: auto;
}

.admin-products-table {
    min-width: 1120px;
}

.category-management-grid {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.category-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.category-stat-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.category-stat-card span {
    display: block;
    color: var(--color-gray);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 26px;
    line-height: 1;
    font-weight: 800;
    color: var(--color-black);
}

.category-create-card {
    background: var(--color-white);
    border: 1px solid rgba(17, 17, 17, 0.04);
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(17, 17, 17, 0.05);
    position: sticky;
    top: 95px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    z-index: 5;
}

.category-card-heading {
    margin-bottom: 20px;
}

.category-card-heading .dashboard-kicker,
.category-admin-header .dashboard-kicker {
    margin-bottom: 8px;
}

.category-card-heading h2,
.category-admin-header h2 {
    margin: 0;
    font-size: 24px;
}

.category-card-heading span,
.category-admin-header span {
    display: block;
    margin-top: 8px;
    color: var(--color-gray);
    line-height: 1.5;
}

.category-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.category-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.category-admin-wrapper {
    padding: 0;
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

.category-admin-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 24px 26px;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
}

.category-admin-list-head {
    display: grid;
    grid-template-columns: 1fr 1fr 140px;
    grid-template-areas: "title parent actions" "order status products";
    gap: 14px;
    padding: 14px 20px 14px 20px;
    padding-right: 160px;
    background: #f8f6ef;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-gray);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    align-items: center;
}

.category-admin-list {
    display: flex;
    flex-direction: column;
}

.category-admin-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-areas: "title parent actions" "order status products";
    gap: 12px;
    align-items: center;
    padding: 14px 20px;

    border-bottom: 1px solid var(--color-border);
    background: var(--color-white);
    transition: box-shadow 0.12s ease, transform 0.12s ease, border-color 0.12s ease;
}

.category-admin-row:last-child {
    border-bottom: 0;
}

.category-admin-row-child {
    background: #fbfaf7;
    box-shadow: inset 4px 0 0 rgba(21, 94, 145, 0.06);
}

.category-admin-row:hover {
    box-shadow: 0 8px 20px rgba(17, 17, 17, 0.04);
    border-color: rgba(17, 17, 17, 0.06);
    transform: translateY(-3px);
}

.category-admin-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.category-admin-title {
    grid-area: title;
}

.category-admin-parent {
    grid-area: parent;
}

.category-admin-order {
    grid-area: order;
}

.category-admin-status {
    grid-area: status;
}

.category-admin-products {
    grid-area: products;
}

.category-admin-actions {
    grid-area: actions;
}

.category-admin-title input,
.category-admin-order input {
    border: 1px solid var(--color-border);
    border-radius: 9px;
    padding: 11px 12px;
    font-size: 15px;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.category-admin-title input:focus,
.category-admin-order input:focus,
.category-admin-parent .table-select:focus,
.products-search-form input:focus,
.products-filters-form input:focus,
.product-edit-field input:focus,
.product-edit-field textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 6px 18px rgba(201, 162, 39, 0.08);
}

.category-admin-title input {
    width: 100%;
    font-weight: 700;
}

.category-admin-title small,
.category-admin-products span {
    color: var(--color-gray);
    font-size: 13px;
}

.category-type-badge {
    width: fit-content;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.category-type-badge.parent {
    background: #faf4d7;
    color: #7a5b00;
}

.category-type-badge.child {
    background: #eef6ff;
    color: #155e91;
}

.category-admin-parent .table-select {
    min-width: 140px;
}

.category-admin-actions {

    align-self: center;
    position: sticky;
    right: 12px;
    z-index: 6;
    display: flex;
    gap: 8px;
    align-items: center;
    background: transparent;
    padding-left: 6px;
}

.category-admin-order input {
    width: 100%;
}

.category-admin-products {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.category-admin-products strong {
    font-size: 20px;
}

.product-active-toggle.compact {
    min-height: 36px;
    font-size: 15px;
}

.category-admin-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.category-admin-actions .btn-table-action {
    white-space: nowrap;
    border: 1px solid rgba(17, 17, 17, 0.08);
    padding: 8px 12px;
    border-radius: 8px;
    background: transparent;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.category-admin-actions .btn-table-action:hover {
    background: rgba(17, 17, 17, 0.06);
    color: var(--color-black);
}

.btn-danger {
    border-color: #b42318;
    color: #b42318;
}

.btn-danger:hover {
    background: #b42318;
    color: #fff;
}

.admin-alerts-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.admin-alerts-content {
    min-width: 0;
}

.alerts-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.alert-stat-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
}

.alert-stat-card.attention {
    border-color: #e7b4b4;
    background: #fff8f8;
}

.alert-stat-card span {
    display: block;
    color: var(--color-gray);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.alert-stat-card strong {
    display: block;
    margin-top: 8px;
    font-size: 26px;
    line-height: 1.15;
}

.admin-statistics-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.admin-statistics-content {
    min-width: 0;
}

.statistics-filter-card {
    display: grid;
    grid-template-columns: 190px 150px 160px 160px minmax(260px, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 22px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.statistics-filter-card .return-form-field {
    margin: 0;
}

.statistics-filter-card [hidden] {
    display: none !important;
}

.statistics-filter-card .btn-gold {
    min-height: 48px;
    padding: 12px 22px;
}

.statistics-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.statistics-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.statistics-chart-card,
.statistics-table-card,
.statistics-company-card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 12px 34px rgba(17, 17, 17, 0.04);
}

.statistics-chart-card h3,
.statistics-table-card h3,
.statistics-company-card h3 {
    margin: 0 0 14px;
}

.statistics-chart {
    display: block;
    max-width: 100%;
}

.statistics-table-card {
    margin-bottom: 22px;
}

.statistics-table-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.statistics-table-heading h3 {
    margin-bottom: 4px;
}

.statistics-table-heading span,
.statistics-muted {
    display: block;
    color: var(--color-gray);
    font-size: 13px;
}

.statistics-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.statistics-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.statistics-table.compact {
    min-width: 620px;
}

.statistics-table th,
.statistics-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(221, 214, 200, 0.85);
    text-align: left;
    vertical-align: top;
}

.statistics-table th {
    color: var(--color-gray);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.statistics-table tbody tr:hover {
    background: #fbfaf6;
}

.admin-wz-filter-card {
    grid-template-columns: 145px 145px 210px 210px minmax(220px, 1fr) auto;
}

.admin-wz-table td strong,
.admin-wz-table td span {
    display: block;
}

.admin-wz-items-details {
    margin-top: 8px;
}

.admin-wz-items-details summary {
    color: #7a5b00;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
}

.admin-wz-items-details pre {
    margin: 8px 0 0;
    max-width: 320px;
    max-height: 160px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #faf8f2;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px;
    color: var(--color-black);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.45;
}

.statistics-company-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.statistics-company-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.statistics-company-header h3 {
    margin: 4px 0 6px;
}

.statistics-company-header span {
    color: var(--color-gray);
}

.statistics-company-header strong {
    font-size: 30px;
    line-height: 1;
    color: #b98500;
    white-space: nowrap;
}

.audit-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.audit-content {
    min-width: 0;
}

.audit-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.audit-summary-list {
    display: grid;
    gap: 12px;
}

.audit-summary-list span {
    color: var(--color-gray);
    font-weight: 700;
}

.audit-summary-list strong {
    display: block;
    margin-top: 3px;
    color: var(--color-black);
    font-size: 18px;
}

.audit-filter-card {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) 150px 150px minmax(150px, 0.8fr) minmax(180px, 1fr) 110px auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 22px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
}

.audit-filter-card .return-form-field {
    margin: 0;
}

.audit-filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    align-items: center;
}

.audit-table-card {
    background: #fff;
}

.audit-table-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-bottom: 1px solid var(--color-border);
}

.audit-table-heading h2 {
    margin: 0;
}

.audit-table-heading .dashboard-kicker {
    margin-bottom: 6px;
}

.audit-table-heading span {
    color: var(--color-gray);
    font-weight: 700;
}

.audit-table {
    min-width: 980px;
}

.audit-action-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #f3f0e8;
    color: var(--color-black);
    font-weight: 800;
    font-size: 13px;
}

.audit-action-badge.action-created,
.audit-action-badge.action-approved,
.audit-action-badge.action-generated,
.audit-action-badge.action-assigned {
    background: #e7f6ed;
    color: #137333;
}

.audit-action-badge.action-updated,
.audit-action-badge.action-status_changed,
.audit-action-badge.action-copied {
    background: #fff6d7;
    color: #8a6500;
}

.audit-action-badge.action-deleted,
.audit-action-badge.action-rejected,
.audit-action-badge.action-cancelled {
    background: #fde8e7;
    color: #b42318;
}

.audit-details summary {
    cursor: pointer;
    color: var(--color-gold-dark);
    font-weight: 800;
}

.audit-details label {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 800;
    color: var(--color-gray);
    text-transform: uppercase;
}

.audit-details pre {
    max-width: 360px;
    max-height: 220px;
    overflow: auto;
    margin: 6px 0 0;
    padding: 10px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.delivery-calendar-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(280px, 420px);
    gap: 18px;
    margin-bottom: 18px;
}

.delivery-calendar-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.delivery-calendar-form {
    margin: 0;
}

.delivery-calendar-exceptions-card,
.delivery-calendar-preview-card {
    margin-bottom: 18px;
}

.delivery-calendar-exception-list,
.delivery-calendar-day-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.delivery-calendar-exception-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(221, 214, 200, 0.9);
    border-radius: 10px;
    background: #fffdf8;
}

.delivery-calendar-exception-edit {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 170px minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.delivery-calendar-exception-edit select,
.delivery-calendar-exception-edit input,
.delivery-calendar-form select,
.delivery-calendar-form input {
    min-height: 46px;
}

.delivery-calendar-note {
    display: block;
    margin-top: 4px;
    color: var(--color-gray);
    font-size: 13px;
}

.delivery-calendar-day {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid rgba(221, 214, 200, 0.9);
    border-radius: 10px;
    background: #fff;
}

.delivery-calendar-day > div:first-child span {
    display: block;
    margin-top: 3px;
    color: var(--color-gray);
    font-size: 13px;
}

.delivery-calendar-day > div:last-child {
    text-align: right;
}

.delivery-calendar-status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}

.delivery-calendar-day.is-delivery .delivery-calendar-status {
    background: #edf8f0;
    color: #1f7a35;
}

.delivery-calendar-day.is-off .delivery-calendar-status {
    background: #fff2f2;
    color: #b42318;
}

.delivery-calendar-day small {
    display: block;
    margin-top: 5px;
    color: var(--color-gray);
}

.alert-management-grid {
    display: grid;
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.alert-create-card,
.alerts-board {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.alert-create-card {
    padding: 24px;
    position: sticky;
    top: 105px;
}

.alert-card-heading,
.alert-monitor-header,
.alerts-board-header {
    margin-bottom: 20px;
}

.alert-card-heading h2,
.alert-monitor-header h2,
.alerts-board-header h2 {
    margin: 0;
    font-size: 22px;
}

.alert-card-heading span,
.alert-monitor-header span,
.alerts-board-header span {
    display: block;
    margin-top: 8px;
    color: var(--color-gray);
    line-height: 1.5;
}

.alert-monitor-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.alert-company-picker {
    position: relative;
}

.alert-company-search-input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 15px;
}

.alert-company-results {
    display: none;
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 300px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.alert-company-results.active {
    display: block;
}

.alert-company-result-item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
}

.alert-company-result-item:hover {
    background: #faf8f2;
}

.alert-company-result-item span,
.alert-company-result-item small {
    display: block;
}

.alert-company-result-item span {
    font-weight: 800;
}

.alert-company-result-item small,
.alert-company-result-empty {
    color: var(--color-gray);
}

.alert-company-result-empty {
    padding: 12px 14px;
}

.alert-weekdays-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.alert-weekdays-grid.compact {
    grid-template-columns: repeat(7, minmax(42px, 1fr));
}

.alert-weekday-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: 9px;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
}

.alert-weekday-chip input {
    accent-color: var(--color-gold);
}

.alert-monitor-wrapper {
    padding: 0;
    overflow: hidden;
}

.alert-monitor-header,
.alerts-board-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 24px 26px;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
}

.alert-monitor-list,
.alert-card-list {
    display: flex;
    flex-direction: column;
}

.alert-monitor-row {
    display: grid;

    gap: 16px;
    align-items: center;
    padding: 18px 26px;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
}

.alert-monitor-row:last-child {
    border-bottom: 0;
}

.alert-monitor-company {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.alert-monitor-company span {
    color: var(--color-gray);
    font-size: 13px;
}

.alert-monitor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.alerts-board {
    overflow: hidden;
}

.alert-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 18px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--color-border);
    background: #fff;
}

.alert-card:last-child {
    border-bottom: 0;
}

.alert-card.critical {
    border-left: 5px solid #b42318;
}

.alert-card.warning {
    border-left: 5px solid var(--color-gold);
}

.alert-type-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 9px;
    background: #fff1f1;
    color: #a12626;
    font-size: 12px;
    font-weight: 800;
}

.alert-card h3 {
    margin: 10px 0 8px;
    font-size: 22px;
}

.alert-card p {
    margin: 0;
    color: #333;
}

.alert-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    color: var(--color-gray);
    font-size: 14px;
}

.alert-card-status {
    align-self: center;
    text-align: right;
}

.alert-card-status strong,
.alert-card-status span {
    display: block;
}

.alert-card-status span {
    color: var(--color-gray);
    margin-top: 6px;
}

.alert-empty-state {
    padding: 34px 26px;
    text-align: center;
}

.alert-empty-state h3 {
    margin: 0 0 8px;
}

.alert-empty-state p {
    margin: 0;
    color: var(--color-gray);
}

.category-admin-id {
    align-self: center;
    color: var(--color-gray);
    font-weight: 700;
}

@media (max-width: 1200px) {

    /* two-row layout for category rows to improve readability on medium screens */
    .category-admin-list-head {
        grid-template-columns: 1fr 1fr 140px;
        grid-template-areas: "title parent actions" "order status products";
        padding-right: 120px;
    }

    .category-admin-row {
        grid-template-columns: 1fr 1fr 140px;
        grid-template-areas: "title parent actions" "order status products";
        padding-right: 12px;
        gap: 12px;
    }

    .category-admin-actions {
        grid-area: actions;
        position: sticky;
        right: 12px;
        z-index: 6;
        align-self: center;
        justify-self: end;
        background: transparent;
        padding-left: 6px;
    }
}

@media (max-width: 1100px) {

    .admin-products-layout,
    .category-management-grid,
    .admin-alerts-layout,
    .admin-statistics-layout,
    .audit-layout,
    .alert-management-grid,
    .admin-posts-layout {
        grid-template-columns: 1fr;
    }

    .admin-products-sidebar .products-sidebar-box,
    .admin-alerts-sidebar .products-sidebar-box,
    .category-create-card,
    .alert-create-card,
    .post-composer-card {
        position: static;
    }

    .category-overview,
    .alerts-overview,
    .statistics-overview-grid,
    .statistics-chart-grid,
    .statistics-filter-card,
    .products-filter-grid,
    .audit-filter-card,
    .delivery-calendar-grid,
    .delivery-calendar-summary {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .delivery-calendar-exception-row,
    .delivery-calendar-exception-edit {
        grid-template-columns: 1fr;
    }

    .category-admin-list-head {
        display: none;
    }

    .category-admin-row {
        grid-template-columns: 1fr 1fr;
        align-items: end;
    }

    .category-admin-actions {
        align-self: auto;
        justify-content: flex-start;
    }

    .alert-monitor-row,
    .alert-card,
    .post-admin-item {
        grid-template-columns: 1fr;
    }

    .alert-monitor-actions,
    .alert-card-status,
    .post-admin-actions {
        justify-content: flex-start;
        text-align: left;
    }

    .post-admin-actions {
        flex-direction: row;
    }

    .home-hero-grid,
    .home-title-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .home-hero-media {
        max-width: 420px;
    }

    .home-quick-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {

    .category-overview,
    .alerts-overview,
    .statistics-overview-grid,
    .statistics-chart-grid,
    .statistics-filter-card,
    .products-filter-grid,
    .audit-filter-card,
    .delivery-calendar-grid,
    .delivery-calendar-summary,
    .category-form-row {
        grid-template-columns: 1fr;
    }

    .statistics-company-header,
    .statistics-table-heading,
    .audit-table-heading,
    .delivery-calendar-day,
    .products-filter-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .audit-filter-actions {
        justify-content: flex-start;
    }

    .products-filter-actions > div {
        width: 100%;
        justify-content: flex-start;
    }

    .delivery-calendar-day > div:last-child {
        text-align: left;
    }

    .category-admin-header,
    .alert-monitor-header,
    .alerts-board-header {
        flex-direction: column;
        padding: 20px;
    }

    .category-admin-row {
        grid-template-columns: 1fr;
        padding: 18px 20px;
    }

    .category-admin-actions {
        flex-wrap: wrap;
    }

    .alert-weekdays-grid,
    .alert-weekdays-grid.compact,
    .post-composer-bottom {
        grid-template-columns: 1fr 1fr;
    }

    .alert-monitor-row,
    .alert-card,
    .post-admin-item {
        padding: 18px 20px;
    }

    .alert-monitor-actions {
        flex-wrap: wrap;
    }

    .home-post-card {
        padding: 20px;
    }

    .home-post-gallery.count-2,
    .home-post-gallery.count-3,
    .home-post-gallery.count-4,
    .post-composer-bottom {
        grid-template-columns: 1fr;
    }

    .post-admin-actions {
        flex-direction: column;
    }

    .home-hero {
        padding: 52px 0 34px;
    }

    .home-hero-grid {
        gap: 28px;
    }

    .home-hero-media {
        padding: 12px;
    }

    .contact-hero {
        padding: 28px;
        min-height: 320px;
    }

    .contact-map-heading {
        flex-direction: column;
        padding: 22px;
    }

    .contact-card {
        padding: 22px;
    }

    .contact-hours div {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.products-search-form input {
    flex: 1;
    min-width: 260px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 16px;
}

.table-select {
    width: 100%;
    min-width: 220px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
}

.product-category-form {
    margin: 0;
}

.product-images-manager {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.product-image-card {
    width: 170px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-image-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.default-image-badge {
    display: inline-block;
    background: #edf8f0;
    color: #1f7a35;
    border: 1px solid #b8dfc3;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.btn-delete-image {
    border-color: #b42318;
    color: #b42318;
}

.btn-delete-image:hover {
    background: #b42318;
    color: #fff;
}

.no-product-images {
    color: var(--color-gray);
    padding: 8px 0;
}

.products-filters-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.products-filters-form input,
.products-filters-form select {
    flex: 1;
    min-width: 220px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 16px;
}

.product-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.product-card-image-wrap {
    height: 240px;
    background: #f7f5ef;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.product-card-no-image {
    color: var(--color-gray);
    font-weight: 600;
}

.product-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.product-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
}

.product-card-category {
    background: #faf4d7;
    color: #7a5b00;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
}

.product-card-code {
    color: var(--color-gray);
}

.product-card-description {
    color: #333;
    line-height: 1.5;
    min-height: 72px;
}

.product-card-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--color-gray);
    font-size: 14px;
}

.product-card-price-box {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.product-card-price-note {
    font-size: 13px;
    color: var(--color-gray);
    margin-bottom: 6px;
}

.product-card-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-black);
}

.product-card-price-gross {
    margin-top: 5px;
    color: #5f5f5f;
    font-size: 15px;
    font-weight: 700;
}

.product-card-price-gross span {
    display: inline-block;
    margin-left: 8px;
    color: var(--color-gray);
    font-size: 13px;
    font-weight: 600;
}

.product-login-link {
    text-align: center;
}

.swal-gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

.swal-gallery-btn {
    border: 1px solid var(--color-black);
    background: transparent;
    color: var(--color-black);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 600;
}

.swal-gallery-btn:hover {
    background: var(--color-black);
    color: var(--color-white);
}

.products-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}

.products-sidebar-box {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 110px;
}

.products-sidebar-box h3 {
    margin: 0 0 16px;
    font-size: 20px;
}

.products-category-link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-black);
    font-weight: 600;
    transition: 0.2s ease;
}

.products-category-link:hover {
    background: #f7f5ef;
}

.products-category-link.child {
    margin-left: 12px;
    padding-left: 22px;
    font-size: 15px;
    color: #4d4d4d;
}

.products-category-link.active {
    background: #faf4d7;
    color: #7a5b00;
}

.products-content {
    min-width: 0;
}

.products-search-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.products-search-form input {
    flex: 1;
    min-width: 220px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 16px;
}

@media (max-width: 1000px) {
    .products-layout {
        grid-template-columns: 1fr;
    }

    .products-sidebar-box {
        position: static;
    }
}

.product-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.cart-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.cart-tool-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-tool-card h3 {
    margin-bottom: 0;
}

.cart-tool-card .ts-wrapper,
.cart-tool-card select,
.cart-tool-card input[type="number"] {
    width: 100%;
}

.cart-copy-preview {
    min-height: 64px;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fbfaf7;
}

.cart-copy-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.cart-copy-preview-title {
    margin: 0 0 10px;
    color: var(--color-black);
    font-weight: 800;
}

.cart-copy-preview-list li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(214, 205, 190, 0.7);
}

.cart-copy-preview-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.cart-copy-preview-list span {
    color: var(--color-gray);
    font-weight: 700;
    white-space: nowrap;
}

.cart-copy-mode {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cart-copy-mode label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.cart-item-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
}

.cart-item-no-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7f5ef;
    border-radius: 12px;
    color: var(--color-gray);
    font-weight: 600;
}

.cart-item-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.cart-item-top h3 {
    margin: 0;
}

.cart-qty-row {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 180px;
}

.cart-qty-input {
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.cart-line-total {
    margin-top: 14px;
    font-size: 18px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    margin-top: 12px;
}

.cart-summary-row-muted {
    color: var(--color-gray);
    font-size: 16px;
}

.cart-checkout-form {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-checkout-btn {
    width: 100%;
    text-align: center;
}

@media (max-width: 1000px) {
    .cart-tools-grid {
        grid-template-columns: 1fr;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-item-card {
        grid-template-columns: 1fr;
    }
}

.cart-price-breakdown {
    margin-top: 16px;
    border-top: 1px solid var(--color-border);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-price-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.cart-price-stack {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    text-align: right;
}

.cart-price-stack span:last-child {
    color: var(--color-gray);
    font-size: 13px;
    font-weight: 700;
}

.order-history-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.material-groups-layout .ts-wrapper {
    width: 100%;
}

.material-groups-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.material-group-create-card {
    margin-bottom: 22px;
}

.material-groups-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.material-group-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dedicated-product-card {
    border: 1px solid #ded6c8;
    border-radius: 8px;
    background: #fff;
    padding: 24px;
    box-shadow: 0 10px 26px rgba(17, 17, 17, 0.06);
}

.material-group-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 16px;
}

.material-group-card-header h2 {
    margin: 4px 0 6px;
    font-size: 26px;
}

.material-group-card-header span,
.material-group-preview li {
    color: var(--color-gray);
}

.material-group-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.material-group-preview ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.material-group-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dino-integration-layout .admin-products-content {
    min-width: 0;
}

.dino-import-card {
    margin-bottom: 20px;
}

.dino-import-form {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.dino-import-form input[type="file"] {
    flex: 1;
    min-width: 260px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    padding: 13px 14px;
}

.dino-filter-card {
    margin-bottom: 20px;
}

.dino-filters {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(240px, 1fr) auto auto;
    align-items: end;
    gap: 14px;
}

.dino-mapping-list {
    gap: 16px;
}

.dino-mapping-card {
    border: 1px solid #ded6c8;
    border-radius: 8px;
    background: #fff;
    padding: 22px;
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.05);
}

.dino-mapping-card.is-unmapped {
    border-color: #d8ad22;
    background: #fffdf5;
}

.dino-mapping-card.is-duplicate {
    border-color: #e0a800;
    background: #fff8e1;
}

.dino-mapping-card.is-mapped {
    border-color: #cfe6d5;
}

.dino-mapping-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}

.dino-mapping-header h2 {
    margin: 4px 0 6px;
    font-size: 24px;
    line-height: 1.2;
}

.dino-mapping-header span,
.dino-mapping-meta {
    color: var(--color-gray);
}

.dino-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    white-space: nowrap;
}

.dino-status-badge.mapped {
    background: #ecf8ef;
    color: #08752b;
}

.dino-status-badge.unmapped {
    background: #fff4cd;
    color: #8a6400;
}

.dino-status-badge.duplicate {
    background: #ffe6a3;
    color: #7a4c00;
}

.dino-mapping-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.dino-mapping-meta span {
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #faf9f7;
    padding: 7px 10px;
}

.dino-mapping-form {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-top: 16px;
}

.dino-mapping-form .ts-wrapper {
    width: 100%;
}

.dino-missing-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.dino-import-error {
    margin-top: 14px;
    color: #9f1b1b;
    font-weight: 700;
}

.dino-split-filters {
    display: grid;
    grid-template-columns: minmax(320px, 1.6fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr) minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
    align-items: end;
    gap: 14px;
}

.dino-split-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.dino-split-list {
    gap: 18px;
}

.dino-split-card {
    position: relative;
    overflow: hidden;
}

.dino-split-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: #d8ad22;
}

.dino-split-card.is-mapped::before {
    background: #2f9a4b;
}

.dino-split-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.dino-split-summary span {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #faf9f7;
    padding: 12px 14px;
    color: var(--color-gray);
}

.dino-split-summary strong {
    display: block;
    margin-top: 3px;
    color: var(--color-black);
    font-size: 20px;
}

.dino-split-form {
    margin-top: 18px;
    border-top: 1px solid var(--color-border);
    padding-top: 18px;
}

.dino-split-form.is-over-limit .btn-gold {
    opacity: 0.55;
    cursor: not-allowed;
}

.dino-split-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dino-split-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(120px, 180px);
    gap: 12px;
    align-items: center;
}

.dino-split-row input,
.dino-split-row select {
    width: 100%;
}

.dino-split-row .ts-wrapper {
    width: 100%;
}

.dino-split-live-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    color: var(--color-gray);
    font-size: 14px;
    font-weight: 800;
}

.dino-split-live-summary span {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fbfaf8;
}

.dino-split-limit-message {
    margin: 12px 0 0;
    padding: 10px 12px;
    border: 1px solid #e0a800;
    border-radius: 8px;
    background: #fff8e1;
    color: #795000;
    font-weight: 800;
}

@media (max-width: 900px) {
    .material-groups-stats,
    .material-group-preview {
        grid-template-columns: 1fr;
    }

    .material-group-card-header {
        flex-direction: column;
    }

    .dino-filters,
    .dino-mapping-form,
    .dino-split-filters,
    .dino-split-summary,
    .dino-split-row {
        grid-template-columns: 1fr;
    }

    .dino-mapping-header {
        flex-direction: column;
    }
}

.cart-price-row-return {
    color: #1f7a35;
}

.cart-price-row-total {
    font-size: 18px;
    font-weight: 700;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card-meta,
.order-meta-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.order-card-meta {
    justify-content: flex-end;
}

.order-meta-row {
    color: var(--color-gray);
    font-size: 14px;
    margin-bottom: 14px;
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-item-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 150px 150px auto;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 10px;
    background: #fafafa;
}

.order-item-main,
.order-item-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-item-main span,
.order-item-price span {
    color: var(--color-gray);
    font-size: 14px;
}

.order-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-item-qty-input {
    width: 96px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

@media (max-width: 900px) {
    .order-item-row {
        grid-template-columns: 1fr;
    }
}


.returns-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 28px;
    align-items: start;
}

.returns-sidebar-box {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 110px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.returns-sidebar-link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--color-black);
    font-weight: 600;
}

.returns-sidebar-link:hover {
    background: #f7f5ef;
}

.returns-sidebar-link.active {
    background: #faf4d7;
    color: #7a5b00;
}

.returns-admin-note {
    display: inline-flex;
    max-width: 820px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #ead78a;
    border-radius: 10px;
    background: #fff8dc;
    color: #6f5500;
    font-weight: 600;
}

.returns-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.return-card {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 18px;
    background: #fff;
}

.return-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 14px;
}

.return-card-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.return-card-date {
    color: var(--color-muted);
    font-size: 14px;
}

.return-card-meta {
    display: grid;
    gap: 6px;
}

.return-card-meta p {
    margin: 0;
}

.return-status {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #f5f5f5;
}

.status-pending {
    background: #fff3cd;
    color: #8a6d3b;
}

.status-approved,
.status-partially_used {
    background: #edf8f0;
    color: #1f7a35;
}

.status-used {
    background: #e8f0ff;
    color: #1d4ed8;
}

.status-rejected,
.status-cancelled {
    background: #fdecec;
    color: #b42318;
}

.return-items-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.return-item-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fafafa;
}

.return-item-row-managed {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(420px, 1.6fr);
    align-items: center;
    justify-content: stretch;
}

.return-item-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.return-item-main span {
    color: var(--color-muted);
    font-size: 14px;
}

.return-item-meta {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--color-muted);
}

.return-item-edit-form {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(110px, 1fr) auto auto;
    align-items: end;
    gap: 10px;
}

.return-item-edit-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-muted);
}

.return-item-edit-form input {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 15px;
    color: var(--color-black);
}

.return-item-remaining {
    align-self: center;
    white-space: nowrap;
    color: var(--color-muted);
    font-size: 14px;
}

.return-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.return-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.return-form-field-full {
    grid-column: 1 / -1;
}

.return-form-field input,
.return-form-field select,
.return-form-field textarea {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
}

.return-form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 1000px) {
    .returns-layout {
        grid-template-columns: 1fr;
    }

    .returns-sidebar-box {
        position: static;
    }

    .return-form-grid {
        grid-template-columns: 1fr;
    }

    .return-item-row {
        flex-direction: column;
    }

    .return-card-header,
    .return-card-actions,
    .return-item-meta {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .return-item-row-managed {
        grid-template-columns: 1fr;
    }

    .return-item-edit-form {
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .return-item-remaining {
        white-space: normal;
    }
}

@media (max-width: 620px) {
    .return-card-header {
        flex-direction: column;
    }

    .return-item-edit-form {
        grid-template-columns: 1fr;
    }
}

.admin-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.admin-dashboard-summary {
    min-width: 150px;
    padding: 18px 20px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.admin-dashboard-summary span {
    display: block;
    color: var(--color-gray);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.admin-dashboard-summary strong {
    display: block;
    margin-top: 6px;
    color: var(--color-black);
    font-size: 34px;
    line-height: 1;
}

.admin-dashboard-sections {
    display: flex;
    flex-direction: column;
    gap: 38px;
}

.admin-dashboard-section {
    padding-top: 26px;
    border-top: 1px solid var(--color-border);
}

.admin-dashboard-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.admin-dashboard-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.admin-dashboard-section-header h2 {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.15;
}

.admin-dashboard-section-header p {
    margin: 0;
    color: var(--color-gray);
    line-height: 1.45;
}

.admin-dashboard-section-header > span {
    flex: 0 0 auto;
    color: #7a5b00;
    background: #faf4d7;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 800;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.admin-dashboard-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 170px;
    text-decoration: none;
    color: inherit;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.08);
    border-color: var(--color-gold);
}

.admin-dashboard-card-body h3 {
    margin: 0 0 12px;
    font-size: 20px;
}

.admin-dashboard-card-body p {
    margin: 0;
    color: var(--color-gray);
    line-height: 1.55;
}

.admin-dashboard-card-footer {
    margin-top: 18px;
    font-weight: 700;
    color: #7a5b00;
}

@media (max-width: 760px) {
    .admin-dashboard-header,
    .admin-dashboard-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-dashboard-summary {
        min-width: 0;
    }

    .admin-dashboard-section-header > span {
        width: fit-content;
    }
}

.impersonation-driver-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.impersonation-driver-card,
.impersonation-empty-card {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 18px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.impersonation-driver-card {
    flex-direction: column;
    min-height: 210px;
}

.impersonation-empty-card {
    grid-column: 1 / -1;
    flex-direction: column;
}

.impersonation-driver-card h2,
.impersonation-empty-card h2 {
    margin: 8px 0;
    font-size: 24px;
}

.impersonation-driver-card p,
.impersonation-empty-card p {
    margin: 0;
    color: var(--color-gray);
}

.impersonation-driver-id {
    color: #7a5b00;
    font-weight: 800;
    font-size: 13px;
}

.impersonation-driver-card form {
    margin-top: auto;
}

.impersonation-driver-card button {
    width: 100%;
}

.account-layout {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.account-summary-card,
.account-form-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.account-summary-card {
    padding: 24px;
    position: sticky;
    top: 110px;
}

.account-summary-label {
    color: #7a5b00;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.account-summary-card h2 {
    margin: 10px 0 20px;
    font-size: 26px;
}

.account-summary-card dl {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
}

.account-summary-card dt {
    margin: 0 0 4px;
    color: var(--color-gray);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.account-summary-card dd {
    margin: 0;
    color: var(--color-black);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.account-form-card {
    padding: 26px;
}

.account-form-card input[readonly] {
    background: #f7f5ef;
    color: var(--color-gray);
    cursor: not-allowed;
}

.account-password-section {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

@media (max-width: 720px) {
    .impersonation-banner-inner {
        align-items: stretch;
        flex-direction: column;
    }

    .impersonation-return-btn {
        width: 100%;
    }

    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-summary-card {
        position: static;
    }
}

/* Admin routes layout */
.admin-routes-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
    align-items: start;
}

.admin-routes-sidebar .form-card {
    padding: 14px;
}

.unassigned-wz-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow: auto;
}

.unassigned-wz-item {
    padding: 8px 6px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--color-border);
}

@media (max-width: 1000px) {
    .admin-routes-layout {
        grid-template-columns: 1fr;
    }
}

.route-company-assignment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 12px;
    background: #fff;
}

.route-company-assignment-row {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 12px;
    align-items: center;
    padding: 10px 8px;
    border-radius: 10px;
    background: #fafafa;
}

.route-company-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.route-stop-order-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.route-card-actions {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.route-edit-panel {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.route-sortable-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.route-sortable-item {
    display: grid;
    grid-template-columns: 30px 1fr 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
}

.drag-handle {
    cursor: grab;
    font-size: 18px;
    color: var(--color-gray);
}

.route-sortable-meta {
    color: var(--color-gray);
    font-size: 14px;
}

.btn-remove-company {
    border: 1px solid #b42318;
    background: transparent;
    color: #b42318;
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-remove-company:hover {
    background: #b42318;
    color: #fff;
}

.route-edit-panel {
    margin-top: 20px;
    padding: 22px;
    border-top: 1px solid var(--color-border);
    background: #faf8f2;
    border-radius: 14px;
}

.route-sortable-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.route-sortable-item {
    display: grid;
    grid-template-columns: 34px 50px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.route-sortable-item:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.drag-handle {
    cursor: grab;
    font-size: 18px;
    color: var(--color-gray);
    user-select: none;
}

.route-company-order {
    font-weight: 700;
    color: #7a5b00;
}

.route-company-name {
    font-weight: 600;
}

.route-company-info,
.route-company-display-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.route-company-subiekt {
    color: var(--color-gray);
    font-size: 13px;
    font-weight: 500;
}

.route-sortable-ghost {
    opacity: 0.45;
    background: #fff8dc;
}

.route-sortable-chosen {
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.route-sortable-drag {
    transform: rotate(1deg);
}

.ts-option-disabled {
    color: #9ca3af;
    opacity: 0.75;
}

.ts-option-note {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #b42318;
}

.driver-wz-documents {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.driver-wz-document {
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.driver-wz-document-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    background: #f7f5ef;
    border-bottom: 1px solid var(--color-border);
}

.driver-wz-items {
    display: flex;
    flex-direction: column;
}

.driver-wz-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f0ece2;
}

.driver-wz-item:last-child {
    border-bottom: none;
}

.driver-wz-item-image img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--color-border);
}

.driver-wz-item-no-image {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    background: #f3f3f3;
    color: var(--color-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-align: center;
    padding: 6px;
}

.driver-wz-item-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.driver-wz-item-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--color-gray);
    font-size: 14px;
}

.driver-route-date-form {
    margin: 0;
}

.driver-company-switch-btn {
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    color: var(--color-black);
}

.driver-company-switch-btn:hover {
    color: #7a5b00;
}

.driver-company-switch-btn.active {
    color: #d4af37;
    font-weight: 800;
}

.driver-company-switch-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
    line-height: 1.2;
}

.driver-company-code {
    color: var(--color-gray);
    font-size: 13px;
    font-weight: 600;
}

.driver-company-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.driver-return-header-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.driver-return-decision-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.driver-return-decision-btn {
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.driver-return-decision-btn:disabled {
    cursor: wait;
    opacity: 0.65;
}

.driver-delivery-admin-layout .ts-wrapper {
    width: 100%;
}

.driver-delivery-product-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.driver-delivery-admin-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 460px) auto;
    gap: 18px;
    align-items: center;
}

.driver-delivery-product-main h3 {
    margin: 4px 0 6px;
    font-size: 22px;
}

.driver-delivery-product-main p {
    margin: 0;
    color: var(--color-gray);
}

.driver-delivery-admin-form {
    display: grid;
    grid-template-columns: 130px 150px auto;
    gap: 12px;
    align-items: end;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-weight: 700;
}

.driver-delivery-admin-actions {
    display: flex;
    align-items: end;
}

.driver-recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.driver-recommendation-card {
    position: relative;
}

.driver-recommendation-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.driver-recommendation-card-header h3 {
    margin: 3px 0 6px;
}

.driver-recommendation-card-header span:not(.return-status),
.driver-recommendation-preview span,
.driver-recommendation-card small {
    color: var(--color-gray);
}

.driver-recommendation-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.driver-recommendation-preview span {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    background: #f7f5ef;
    font-size: 13px;
}

.driver-recommendation-actions,
.driver-recommendation-delete {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

.driver-recommendations-layout .ts-wrapper {
    width: 100%;
}

.driver-route-company-list {
    gap: 18px;
}

.driver-company-tabs {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0 14px;
    margin-bottom: 18px;
    background: var(--color-light);
}

.driver-company-tab {
    min-width: 190px;
    max-width: 280px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    color: var(--color-black);
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 0 0 auto;
}

.driver-company-tab span {
    font-weight: 800;
    line-height: 1.2;
}

.driver-company-tab small {
    color: var(--color-gray);
    font-size: 12px;
}

.driver-company-tab strong {
    color: #1f7a35;
    font-size: 12px;
}

.driver-company-tab.is-active {
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.driver-company-tab.is-confirmed {
    border-color: rgba(30, 126, 52, 0.35);
    background: #fbfffc;
}

.driver-company-tab.has-order-saved {
    border-color: rgba(31, 122, 53, 0.65);
    background: #f1fbf3;
    box-shadow: inset 0 0 0 1px rgba(31, 122, 53, 0.12);
}

.driver-company-tab.has-order-saved strong {
    align-self: flex-start;
    margin-top: 3px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e4f6e8;
    color: #146c2e;
}

.driver-route-company-list.is-tabbed .driver-company-card:not(.is-active-tab) {
    display: none;
}

.driver-company-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.driver-company-card.driver-company-confirmed {
    border-color: rgba(30, 126, 52, 0.35);
    background: #fbfffc;
}

.driver-company-card-header {
    align-items: flex-start;
}

.driver-company-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.driver-company-toggle {
    width: 42px;
    height: 42px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #fff;
    color: var(--color-black);
    cursor: pointer;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
}

.driver-company-toggle-icon {
    display: block;
    transition: transform 0.2s ease;
}

.driver-company-toggle[aria-expanded="false"] .driver-company-toggle-icon {
    transform: rotate(-90deg);
}

.driver-company-body.is-collapsed {
    display: none;
}

.driver-confirmed-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: center;
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgba(30, 126, 52, 0.22);
    border-radius: 10px;
    background: #effaf1;
    color: #1e6b31;
}

.driver-order-submitted-summary {
    justify-content: space-between;
    border-color: rgba(31, 122, 53, 0.45);
    background: #eaf8ee;
    box-shadow: 0 8px 22px rgba(31, 122, 53, 0.08);
}

.driver-order-submitted-summary strong {
    display: block;
    font-size: 17px;
    margin-bottom: 3px;
}

.driver-order-submitted-summary form {
    margin-left: auto;
}

.driver-delivery-finalization {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: #fffdf7;
}

.driver-delivery-finalization-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.driver-delivery-finalization-header h4,
.driver-extra-products-header h5 {
    margin: 0;
}

.driver-delivery-source-label {
    display: inline-flex;
    margin-top: 4px;
    color: var(--color-gray);
    font-size: 13px;
    font-weight: 600;
}

.driver-delivery-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.driver-delivery-empty {
    padding: 14px;
    border: 1px dashed var(--color-border);
    border-radius: 10px;
    color: var(--color-gray);
    background: #fff;
}

.driver-delivery-product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(17, 17, 17, 0.08);
    border-radius: 10px;
    background: #fff;
}

.driver-delivery-product-info {
    min-width: 0;
}

.driver-delivery-product-info strong {
    display: block;
    margin-bottom: 4px;
    font-size: 17px;
}

.driver-delivery-product-info span {
    color: var(--color-gray);
    font-size: 14px;
}

.driver-delivery-qty-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.driver-delivery-qty-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 700;
}

.driver-delivery-qty-grid input,
.driver-extra-product-row input,
.driver-extra-product-row select,
.driver-delivery-submit-panel input[type="date"] {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 16px;
    background: #fff;
}

.driver-extra-products-block {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.driver-extra-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.driver-extra-products-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.driver-recommendations-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.driver-recommendation-driver-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(212, 175, 55, 0.34);
    border-radius: 12px;
    background: #fff9e7;
}

.driver-recommendation-driver-media img,
.driver-recommendation-driver-no-image {
    width: 86px;
    height: 86px;
    border-radius: 10px;
    object-fit: cover;
}

.driver-recommendation-driver-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1ece1;
    color: var(--color-gray);
    font-size: 12px;
    text-align: center;
    padding: 8px;
}

.driver-recommendation-driver-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.driver-recommendation-driver-body strong {
    font-size: 17px;
}

.driver-recommendation-driver-body span,
.driver-recommendation-driver-body small {
    color: var(--color-gray);
    line-height: 1.35;
}

.driver-recommendation-driver-body p {
    margin: 4px 0;
    line-height: 1.4;
}

.driver-recommendation-add-btn {
    align-self: flex-start;
    margin-top: 8px;
    background: #fff;
}

.driver-extra-product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px 140px auto;
    gap: 10px;
    align-items: center;
}

.driver-extra-product-row .ts-wrapper {
    width: 100%;
    min-width: 0;
}

.driver-delivery-submit-panel {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.driver-delivery-submit-panel .return-form-field {
    max-width: 360px;
    margin: 0;
}

.driver-delivery-submit-panel small {
    display: block;
    margin-top: 6px;
    color: var(--color-gray);
    line-height: 1.35;
}

.driver-delivery-confirm-btn:disabled {
    cursor: wait;
    opacity: 0.7;
}

@media (max-width: 980px) {
    .driver-delivery-admin-product,
    .driver-delivery-admin-form,
    .driver-delivery-product-row,
    .driver-extra-product-row,
    .driver-delivery-submit-panel {
        grid-template-columns: 1fr;
    }

    .driver-delivery-submit-panel {
        display: grid;
        align-items: stretch;
    }

    .driver-delivery-submit-panel .return-form-field {
        max-width: none;
    }

    .driver-delivery-confirm-btn,
    .driver-extra-product-add,
    .driver-extra-product-remove {
        width: 100%;
    }

    .driver-recommendation-card-header {
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .driver-company-card-header,
    .driver-company-header-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .driver-company-title-wrap {
        align-items: flex-start;
    }

    .driver-company-switch-btn {
        text-align: left;
        line-height: 1.25;
    }

    .driver-delivery-finalization {
        padding: 14px;
    }

    .driver-recommendations-list,
    .driver-recommendation-driver-card {
        grid-template-columns: 1fr;
    }

    .driver-recommendation-driver-media img,
    .driver-recommendation-driver-no-image {
        width: 100%;
        height: 150px;
    }

    .driver-recommendation-add-btn {
        width: 100%;
    }

    .driver-delivery-qty-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .driver-delivery-qty-grid {
        grid-template-columns: 1fr;
    }
}

/* Product quantity stepper styles */
.product-add-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.product-weight-note {
    margin: 8px 0 0;
    color: #7a5b00;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.product-weight-note-inline {
    flex-basis: 100%;
    margin-top: 6px;
}

.driver-delivery-product-row > .product-weight-note,
.driver-extra-product-row > .product-weight-note {
    grid-column: 1 / -1;
}

.product-weight-note[hidden] {
    display: none;
}

.qty-stepper {
    display: inline-flex;
    align-items: center;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
    height: 40px;
}

.qty-stepper .qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--color-gold);
    font-size: 20px;
    cursor: pointer;
}

.qty-stepper .product-qty-input {
    width: 74px;
    padding: 8px 6px;
    border: none;
    text-align: center;
    font-size: 15px;
    outline: none;
    background: transparent;
}

/* remove native spinner for better appearance */
.qty-stepper input[type=number]::-webkit-outer-spin-button,
.qty-stepper input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-stepper input[type=number] {
    -moz-appearance: textfield;
}

.product-card-return-note .muted {
    color: var(--color-gray);
    font-size: 13px;
}

/* ================================
   Professional Orders Templates UI
   ================================ */

.orders-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: flex-start;
    margin-top: 28px;
}

.orders-sidebar {
    flex: unset;
    width: 100%;
}

.orders-sidebar-box {
    position: sticky;
    top: 110px;
    background: #ffffff;
    border: 1px solid rgba(221, 214, 200, 0.9);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 14px 34px rgba(17, 17, 17, 0.06);
}

.orders-side-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--color-dark);
    border-radius: 12px;
    margin-bottom: 8px;
    font-weight: 700;
    transition: 0.18s ease;
}

.orders-side-link:hover {
    background: #f7f2e2;
    color: #7a5b00;
}

.orders-side-link.active {
    background: linear-gradient(135deg, #ecd471, #d1aa23);
    color: #111111;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.orders-content {
    min-width: 0;
}

.recurring-template-card {
    background: #ffffff;
    border: 1px solid rgba(221, 214, 200, 0.95);
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 18px 46px rgba(17, 17, 17, 0.07);
    margin-bottom: 24px;
    overflow: hidden;
}

.recurring-template-card>h3,
.templates-content>h3 {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.recurring-template-card>p,
.templates-content>p {
    color: var(--color-gray);
    font-size: 16px;
    max-width: 860px;
    margin-bottom: 22px;
}

.templates-create,
.recurring-create {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    background: #faf8f2;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    margin: 20px 0;
}

.recurring-create input[type="text"],
.templates-create input[type="text"] {
    min-width: 280px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
}

.recurring-create input[type="text"]:focus,
.templates-create input[type="text"]:focus,
.recurring-add-item input:focus,
.recurring-add-item select:focus,
.recurring-weekday input:focus,
.recurring-weekday select:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.14);
}

.recurring-items-list {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, minmax(360px, 1fr));
    gap: 20px;
}

.recurring-weekday {
    background: #fffdf8;
    border: 1px solid rgba(221, 214, 200, 0.95);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(17, 17, 17, 0.045);
    min-width: 0;
}

.recurring-weekday h4,
.recurring-weekday h3 {
    font-size: 20px;
    margin: 0 0 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recurring-weekday h4::after,
.recurring-weekday h3::after {
    content: "szablon dnia";
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a5b00;
    background: #faf0c7;
    padding: 5px 8px;
    border-radius: 999px;
    font-weight: 800;
}

/* Lista produktów w dniu */
.recurring-weekday ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recurring-weekday li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(221, 214, 200, 0.85);
    border-radius: 16px;
    background: #ffffff;
    font-size: 14px;
}

.recurring-weekday li strong,
.recurring-weekday li b {
    display: block;
    font-size: 16px;
    line-height: 1.25;
    margin-bottom: 4px;
}

.recurring-weekday li small,
.recurring-weekday li span {
    color: var(--color-gray);
}

/* Formularz edycji ilości w pozycji */
.recurring-weekday li form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.recurring-weekday li input[type="number"] {
    width: 88px;
    height: 42px;
    padding: 0 10px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
}

.recurring-weekday li button,
.recurring-weekday .btn,
.recurring-weekday button[type="submit"] {
    min-height: 40px;
    border-radius: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* Usuń */
.recurring-weekday button[style*="red"],
.recurring-weekday .btn-delete,
.recurring-weekday button.btn-danger {
    border: 1px solid #dc2626 !important;
    background: #fff !important;
    color: #b42318 !important;
}

.recurring-weekday button[style*="red"]:hover,
.recurring-weekday .btn-delete:hover,
.recurring-weekday button.btn-danger:hover {
    background: #b42318 !important;
    color: #fff !important;
}

/* Formularz dodawania produktu */
.recurring-add-item {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 12px;
    align-items: end;
    padding: 16px;
    background: #faf8f2;
    border: 1px dashed rgba(201, 162, 39, 0.55);
    border-radius: 18px;
    margin-top: 16px;
}

.recurring-add-item label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 800;
    color: #6b5b31;
}

.recurring-add-item select,
.recurring-add-item input[type="number"],
.recurring-add-item input[type="text"],
.recurring-add-item .ts-control {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    font-size: 14px;
    background: #fff;
}

.recurring-add-item .btn,
.recurring-add-item button[type="submit"] {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    background: var(--color-gold);
    color: #fff;
    border: none;
    font-weight: 800;
}

.recurring-add-item .btn:hover,
.recurring-add-item button[type="submit"]:hover {
    background: #111111;
}

/* Kopiowanie dni */
.recurring-copy-box,
.recurring-weekday .copy-box {
    margin-top: 14px;
    padding: 14px;
    background: #fff;
    border: 1px solid rgba(221, 214, 200, 0.9);
    border-radius: 16px;
}

.recurring-weekday label {
    cursor: pointer;
}

.recurring-weekday input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-gold);
    vertical-align: middle;
}

.recurring-weekday .copy-days,
.recurring-weekday .copy-targets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin: 8px 0 12px;
}

.recurring-weekday .copy-days label,
.recurring-weekday .copy-targets label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #faf8f2;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 700;
}

/* Przyciski ogólne w module */
.recurring-template-card .btn,
.recurring-template-card button[type="submit"],
.recurring-template-card button[type="button"] {
    transition: 0.18s ease;
}

.recurring-template-card .btn:hover,
.recurring-template-card button[type="submit"]:hover,
.recurring-template-card button[type="button"]:hover {
    transform: translateY(-1px);
}

/* Tom Select w szablonach */
.recurring-template-card .ts-wrapper {
    width: 100%;
}

.recurring-template-card .ts-control {
    padding: 9px 12px;
    border-radius: 12px;
    border-color: var(--color-border);
    box-shadow: none;
}

.recurring-template-card .ts-dropdown {
    border-radius: 14px;
    border-color: var(--color-border);
    box-shadow: 0 18px 38px rgba(17, 17, 17, 0.12);
    overflow: hidden;
}

/* Responsywność */
@media (max-width: 1200px) {
    .recurring-items-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .orders-layout {
        grid-template-columns: 1fr;
    }

    .orders-sidebar-box {
        position: static;
    }

    .orders-sidebar-box {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .orders-side-link {
        justify-content: center;
        text-align: center;
        margin-bottom: 0;
    }
}

@media (max-width: 700px) {
    .recurring-template-card {
        padding: 18px;
        border-radius: 18px;
    }

    .orders-sidebar-box {
        grid-template-columns: 1fr;
    }

    .recurring-add-item {
        grid-template-columns: 1fr;
    }

    .recurring-weekday li {
        grid-template-columns: 1fr;
    }

    .recurring-weekday li form {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* =========================================
   Orders / Templates - better professional UI
   ========================================= */

/* 1 dzień = 1 pełny wiersz */
.recurring-items-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 22px;
}

.recurring-weekday {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.05);
}

.recurring-weekday h4 {
    margin: 0 0 18px;
    font-size: 34px;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.recurring-weekday h4::after {
    content: "SZABLON DNIA";
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #8b6a00;
    background: #f8e8a8;
    padding: 10px 16px;
    border-radius: 999px;
}

.recurring-weekday ul {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.template-product-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border: 1px solid var(--color-border);
    border-radius: 18px;
    background: #fbfbfb;
}

.template-product-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1;
}

.template-product-media {
    flex: 0 0 84px;
}

.template-product-thumb {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--color-border);
    background: #f2f2f2;
    display: block;
}

.template-product-thumb-placeholder {
    width: 84px;
    height: 84px;
    border-radius: 16px;
    border: 1px dashed var(--color-border);
    background: #f7f7f7;
    color: #8c8c8c;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
}

.template-product-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.template-product-info strong {
    font-size: 18px;
    line-height: 1.25;
    color: var(--color-dark);
}

.template-product-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.template-inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.template-inline-form .order-item-qty-input {
    width: 110px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    padding: 10px 14px;
    font-size: 16px;
    background: #fff;
}

.template-unit {
    font-size: 16px;
    white-space: nowrap;
}

.template-remove-form {
    display: flex;
    align-items: center;
}

/* formularz dodawania produktu */
.recurring-add-item {
    display: grid;
    grid-template-columns: 180px 1fr 140px auto;
    gap: 14px;
    align-items: end;
    padding: 18px 20px;
    border: 1px dashed #e2c966;
    border-radius: 18px;
    background: #fffdf6;
    margin-top: 12px;
}

.recurring-add-item label {
    font-size: 14px;
    font-weight: 700;
    color: #7a7a7a;
    margin-bottom: 6px;
}

.recurring-add-item select,
.recurring-add-item input[type="number"],
.recurring-add-item .ts-control {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid var(--color-border);
    background: #fff;
    padding: 10px 14px;
}

.recurring-add-item button.btn {
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 16px;
    white-space: nowrap;
}

/* kopiowanie dni */
.recurring-skip {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--color-border);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.recurring-skip .btn {
    min-height: 46px;
    border-radius: 14px;
}

/* plan zamówień - zdjęcie w tabeli */
.order-product-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.order-product-media {
    flex: 0 0 64px;
}

.order-product-thumb {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid var(--color-border);
    background: #f2f2f2;
    display: block;
}

.order-product-thumb-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    border: 1px dashed var(--color-border);
    background: #f7f7f7;
    color: #8c8c8c;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6px;
}

.order-product-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.order-product-info strong {
    font-size: 18px;
    line-height: 1.25;
}

/* historia zamówień */
.order-item-main-with-image {
    display: flex;
    align-items: center;
    gap: 14px;
}

.order-item-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.3fr) 150px 150px auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fafafa;
    border: 1px solid #f0ede5;
}

/* plan table lepiej oddycha */
.order-plan-table td {
    vertical-align: middle;
}

.order-plan-table th,
.order-plan-table td {
    padding: 18px 14px;
}

/* responsywność */
@media (max-width: 1100px) {
    .recurring-add-item {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 820px) {
    .template-product-card {
        flex-direction: column;
        align-items: stretch;
    }

    .template-product-actions {
        justify-content: flex-start;
    }

    .recurring-add-item {
        grid-template-columns: 1fr;
    }

    .order-product-cell {
        min-width: 0;
    }

    .order-item-row {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   FIX: plan zamówień po dodaniu zdjęć
   ========================================= */

.order-plan-card {
    overflow: visible;
}

.order-plan-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 14px;
    border: 1px solid #eee5d2;
}

.order-plan-table {
    width: 100%;
    min-width: 1080px;
    table-layout: fixed;
    border-collapse: collapse;
}

.order-plan-table th,
.order-plan-table td {
    padding: 16px 12px;
    vertical-align: middle;
    font-size: 15px;
}

.order-plan-table th {
    font-size: 15px;
    line-height: 1.25;
    white-space: normal;
}

/* szerokości kolumn */
.order-plan-table th:nth-child(1),
.order-plan-table td:nth-child(1) {
    width: 270px;
}

.order-plan-table th:nth-child(2),
.order-plan-table td:nth-child(2),
.order-plan-table th:nth-child(3),
.order-plan-table td:nth-child(3),
.order-plan-table th:nth-child(4),
.order-plan-table td:nth-child(4) {
    width: 105px;
}

.order-plan-table th:nth-child(5),
.order-plan-table td:nth-child(5) {
    width: 150px;
}

.order-plan-table th:nth-child(6),
.order-plan-table td:nth-child(6) {
    width: 120px;
}

.order-plan-table th:nth-child(7),
.order-plan-table td:nth-child(7) {
    width: 135px;
}

.order-plan-table th:nth-child(8),
.order-plan-table td:nth-child(8) {
    width: 150px;
}

/* produkt w tabeli */
.order-product-cell {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.order-product-media {
    width: 56px;
    min-width: 56px;
}

.order-product-thumb,
.order-product-thumb-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 12px;
}

.order-product-thumb {
    object-fit: cover;
    border: 1px solid var(--color-border);
    background: #f4f2ee;
}

.order-product-thumb-placeholder {
    border: 1px dashed #ded4bd;
    background: #fffaf0;
    color: #8a8170;
    font-size: 10px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5px;
}

.order-product-info {
    min-width: 0;
}

.order-product-info strong {
    display: block;
    font-size: 16px;
    line-height: 1.25;
    word-break: break-word;
}

.order-product-info .company-result-meta {
    display: block;
    font-size: 13px;
}

/* źródło i akcje nie mogą uciekać */
.order-plan-table td:nth-child(7) {
    font-size: 14px;
    line-height: 1.35;
}

.order-plan-table td:nth-child(8) {
    white-space: normal;
}

.driver-return-decision-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.driver-return-decision-actions form {
    width: 100%;
}

.driver-return-decision-actions .order-item-qty-input {
    width: 100%;
    max-width: 110px;
    height: 42px;
    padding: 8px 10px;
}

.driver-return-decision-actions .btn-table-action {
    width: 100%;
    max-width: 110px;
    min-height: 38px;
    text-align: center;
}

/* zwroty w tabeli */
.order-plan-table .status-badge {
    display: inline-flex;
    max-width: 120px;
    white-space: normal;
    line-height: 1.25;
}

.order-plan-table .cart-price-row-return {
    display: inline-block;
    margin-top: 5px;
}

/* podsumowanie pod tabelą */
.order-plan-card .cart-price-breakdown {
    margin-top: 18px;
    border-top: 1px solid #eadfc9;
    padding-top: 16px;
}

/* na mniejszych ekranach tabela ma scroll, ale nie ucina karty */
@media (max-width: 1200px) {
    .order-plan-table {
        min-width: 1050px;
    }
}

@media (max-width: 900px) {
    .order-plan-table-wrap {
        margin-left: -6px;
        margin-right: -6px;
        width: calc(100% + 12px);
    }
}
