* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}


body {
    background: #f1f5f9;
    color: #1e293b;
}



/* Layout */

.layout {
    display: flex;
    min-height: 100vh;
}



/* Sidebar */

.sidebar {
    width: 260px;
    background: linear-gradient(180deg,#1e293b,#0f172a);
    color: white;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.crm-title {
    margin: 0 0 2px;
    text-align: center;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.marketplace-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.marketplace-title--ozon { color: #005bff; }
.marketplace-title--wb { color: #7c2cff; margin-top: 8px; }

.marketplace-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0 14px;
}

.marketplace-switcher__button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px;
    border: 2px solid currentColor;
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.marketplace-switcher__button--ozon { color: #005bff; }
.marketplace-switcher__button--wb { color: #7c2cff; }
.marketplace-switcher__button--ozon.is-active { background: #005bff; color: #fff; }
.marketplace-switcher__button--wb.is-active { background: #7c2cff; color: #fff; }

.marketplace-panel {
    padding: 10px;
    border: 2px solid;
}

.marketplace-panel--ozon { border-color: #005bff; }
.marketplace-panel--wb {
    border-color: #7c2cff;
}

.wb-cabinet-switcher { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 12px; }
.wb-cabinet-switcher button { display: grid; min-height: 34px; place-items: center; padding: 5px; border: 0; border-radius: 7px; background: #7c2cff; color: #fff; font-size: 11px; font-weight: 700; line-height: 1.1; text-align: center; cursor: pointer; }
.wb-cabinet-switcher button:hover { background: #6420d3; }
.wb-cabinet-switcher button:focus-visible { outline: 2px solid #c4b5fd; outline-offset: 2px; }
.marketplace-panel--wb .menu-item { margin-bottom: 8px; }
.current-cabinet--wb { border-color: rgba(124, 44, 255, .72); }
.wb-page__eyebrow { margin-bottom: 8px; color: #7c2cff; font-weight: 800; }
.marketplace-page-context { margin: 0 0 10px; font-size: 16px; font-weight: 800; }
.marketplace-page-context--ozon { color: #005bff; }
.marketplace-page-context--wb { color: #7c2cff; }

.wb-forecast__heading { margin-bottom: 24px; }
.wb-forecast__heading h1 { margin: 0 0 8px; }
.wb-forecast__note { margin: 0; color: #64748b; }
.wb-forecast .filter { display: block; }
.wb-forecast .filter > .card { width: 100%; }
.wb-forecast__action-card { padding: 12px 18px; margin-bottom: 12px; }
.wb-forecast__action-card .upload-row { min-height: 42px; }
.wb-forecast button { background: #7c2cff; }
.wb-forecast button:hover { background: #6420d3; }
.wb-forecast button:disabled { background: #c4b5fd; color: #ede9fe; cursor: not-allowed; transform: none; }
.wb-margin-button { background: #7c2cff; }
.wb-margin-button:hover { background: #6420d3; }
.wb-margin-button:focus-visible { outline-color: #7c2cff; }
.wb-forecast input[type="checkbox"] { accent-color: #7c2cff; }
.wb-forecast__settings h3, .wb-forecast__regions h3 { color: #5b21b6; }
.wb-forecast__settings { border-top: 4px solid #7c2cff; }
.wb-forecast__region { display: grid; gap: 8px; min-height: 92px; }
.wb-forecast__region strong { color: #6d28d9; font-size: 20px; }
.wb-forecast__table-card { padding: 25px; }
.wb-forecast__table { border-radius: 0; box-shadow: none; }
.wb-forecast__table-card .region-header { background: #7c2cff !important; }
.wb-forecast__table-card .region-start { border-left-color: #7c2cff !important; }
.wb-forecast__table-card .sales-table tfoot th { border-top-color: #7c2cff; }
.wb-forecast__turnover { color: #fff; font-weight: 800; }
.wb-forecast__turnover--A { background: #2563eb; }
.wb-forecast__turnover--B { background: #eab308; color: #1f2937; }
.wb-forecast__turnover--C { background: #9333ea; }
.wb-forecast__category { display: inline-grid; min-width: 26px; min-height: 26px; place-items: center; border-radius: 50%; color: #fff; font-weight: 800; }
.wb-forecast__category--A { background: #2563eb; }
.wb-forecast__category--B { background: #eab308; color: #1f2937; }
.wb-forecast__category--C { background: #9333ea; }

/* Поиск в таблицах прогнозирования */
div.dt-container { margin-top: 0; }
div.dt-container .dt-layout-row:first-child {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 18px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}
div.dt-container .dt-search {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 3px 3px 3px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 22px;
    background: #fff;
    color: transparent;
    box-shadow: 0 3px 10px rgba(15,23,42,.06);
    transition: .2s ease;
}
div.dt-container .dt-search::before {
    content: "";
    width: 13px;
    height: 13px;
    margin-right: 9px;
    border: 2px solid #6366f1;
    border-radius: 50%;
    box-sizing: border-box;
}
div.dt-container .dt-search::after {
    content: "";
    width: 7px;
    height: 2px;
    margin: 10px 8px 0 -19px;
    border-radius: 2px;
    background: #6366f1;
    transform: rotate(45deg);
}
div.dt-container .dt-search:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,.14), 0 7px 16px rgba(79,70,229,.12);
    transform: translateY(-1px);
}
div.dt-container .dt-search input.dt-input {
    width: 255px;
    height: 34px;
    margin: 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: #0f172a;
    font-size: 13px;
    outline: 0;
}
div.dt-container .dt-search input.dt-input::placeholder { color: #94a3b8; }
div.dt-container .dt-info { padding-top: 15px; color: #64748b; font-size: 13px; }

    .sidebar h2 {
        text-align: center;
        margin-bottom: 8px;
    }

    .sidebar .crm-title { margin-bottom: 2px; }



.menu-item {
    display: block;
    padding: 14px 12px;
    margin-bottom: 12px;
    background: #334155;
    color: white;
    border-radius: 12px;
    text-decoration: none;
    white-space: nowrap;
    font-size: 14px;
    transition: .25s;
}


.menu-item--compact {
    font-size: 14px;
}

.margin-report-layout { display: flex; align-items: flex-start; gap: 24px; margin-top: 20px; }
.base-price-status { margin: 18px 0 0; padding: 14px 16px; border-radius: 10px; text-align: left; border-left: 5px solid; }
.base-price-status ul { margin: 8px 0 0; padding-left: 22px; }
.base-price-status--success { color: #166534; background: #dcfce7; border-color: #16a34a; }
.base-price-status--error { color: #991b1b; background: #fee2e2; border-color: #dc2626; }
.price-edit-form { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.price-edit-form input { width: 116px; min-width: 0; }
.price-edit-form button { padding: 8px 12px; white-space: nowrap; }
.margin-report { flex: 1 1 780px; max-width: 900px; }
.margin-report__row { display: grid; grid-template-columns: minmax(360px, 1fr) 150px 130px; gap: 20px; padding: 8px 0; }
.margin-report__row span:nth-child(2), .margin-report__row span:nth-child(3) { text-align: right; }
.margin-report__row--header { font-weight: 700; border-bottom: 2px solid #334155; }
.margin-report__row--total { color: #000; font-weight: 700; border-top: 1px solid #cbd5e1; margin-top: 5px; padding-top: 10px; }
.margin-report__row--section { color: #000; font-weight: 700; }
.margin-report__row--emphasis { color: #000; font-weight: 700; }
.margin-report__row--right span:first-child { text-align: right; }
.margin-report__row--left span:first-child { text-align: left; }
.margin-report__details summary { cursor: pointer; list-style: none; }
.margin-report__details summary::-webkit-details-marker { display: none; }
.margin-report__details summary::marker { content: ""; }
.margin-report__row--detail span:first-child { text-align: left; }
.margin-report__row--detail { padding-left: 24px; color: #526b91; }
.margin-report__row--subdetail { padding-left: 48px; font-size: .94em; }

.margin-gauge { flex: 0 0 260px; margin: 355px 0 0; max-width: 260px; color: #0f172a; text-align: center; }
.margin-gauge h3 { margin: 0 0 12px; color: #0f172a; }
.margin-gauge svg { display: block; width: 100%; height: auto; }
.margin-gauge__zone { fill: none; stroke-width: 22; stroke-linecap: butt; }
.margin-gauge__zone--green { stroke: #16a34a; }
.margin-gauge__zone--yellow { stroke: #eab308; }
.margin-gauge__zone--red { stroke: #dc2626; }
.margin-gauge__needle { stroke: #0f172a; stroke-width: 4; stroke-linecap: round; }
.margin-gauge__hub { fill: #0f172a; }
.margin-gauge__limit { fill: #475569; font-size: 13px; text-anchor: middle; }
.margin-gauge__value { margin-top: -38px; color: #0f172a; font-size: 22px; font-weight: 700; }
.margin-gauge__legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 12px; margin-top: 23px; font-size: 11px; color: #475569; }
.margin-gauge__legend span { display: inline-flex; align-items: center; gap: 6px; }
.margin-gauge__marker { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.margin-gauge__marker--green { background: #16a34a; }
.margin-gauge__marker--yellow { background: #eab308; }
.margin-gauge__marker--red { background: #dc2626; }

@media(max-width:1200px) {
    .margin-report-layout { display: block; }
    .margin-gauge { margin: 22px auto 0; }
}



    .menu-item:hover {
        background: #2563eb;
        transform: translateX(5px);
    }





/* Main */


.content {
    flex: 1;
    padding: 35px;
}


h1 {
    margin-bottom: 25px;
    font-size: 32px;
    font-weight: 700;
}





/* CARD */


.card {
    background: white;
    padding: 25px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(15,23,42,.08);
    margin-bottom: 25px;
}





/* Forms */


form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}



    form label {
        font-weight: 600;
        font-size: 14px;
        color: #475569;
        display: block;
        margin-bottom: 6px;
    }



input {
    height: 42px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 16px;
    transition: .2s;
}



    input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37,99,235,.15);
    }





button {
    height: 42px;
    padding: 0 25px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s;
}



    button:hover {
        background: #1d4ed8;
        transform: translateY(-2px);
    }





hr {
    width: 100%;
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 20px 0;
}






/* Region */


.region-card {
    margin-top: 25px;
}

.region-analysis-header {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.region-analysis-header h3 {
    margin-bottom: 0;
}

.region-analysis-status {
    min-height: 20px;
    margin: 10px 0 0;
    color: #52647d;
    font-size: 14px;
}

.region-analysis-status.is-success { color: #16803a; }
.region-analysis-status.is-error { color: #b42318; }



    .region-card h3 {
        margin-bottom: 20px;
    }



.region-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* OZON: keep the regional allocation as compact cards with row wrapping. */
#sales-region-distribution .region-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 160px));
    gap: 14px;
    justify-content: start;
}
#sales-region-distribution .region-item { width: auto; }
#sales-region-distribution {
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
    box-sizing: border-box;
    overflow: hidden;
}
@media (max-width: 768px) {
    #sales-region-distribution { width: calc(100vw - 32px); max-width: calc(100vw - 32px); }
    #sales-region-distribution .region-container { grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); }
}




.region-item {
    background: #f8fafc;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    width: 160px;
    transition: .2s;
}



    .region-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,.08);
    }





.region-item input {
        width: 100%;
    }

.region-forecast-days-label { display: block; margin: 10px 0 5px; color: #475569; font-size: 12px; font-weight: 700; text-align: center; }
.region-item .region-forecast-days { width: 86px; margin: 0 auto; text-align: center; font-weight: 800; color: #1d4ed8; }

.export-category-options {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.export-category-options label {
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 600;
}

.export-category-options input[type="checkbox"] {
    width: auto;
}







/* TABLE */


.sales-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}




    .sales-table th {
        background: #0f172a;
        color: white;
        padding: 14px 10px;
        font-size: 14px;
        position: sticky;
        top: 0;
        z-index: 2;
    }




    .sales-table td {
        padding: 12px;
        text-align: center;
        border-bottom: 1px solid #e2e8f0;
        font-size: 14px;
    }

/* Редактируемый расход в день: выглядит как прежняя цветная ячейка таблицы. */
.sales-table td.turnover-cell {
    padding: 0;
    font-weight: 700;
}

.sales-table td.turnover-cell--a { background: #3b82f6; color: #fff; }
.sales-table td.turnover-cell--b { background: #facc15; color: #111827; }
.sales-table td.turnover-cell--c { background: #a855f7; color: #fff; }
.sales-table tbody tr:hover td.turnover-cell--a { background: #3b82f6 !important; color: #fff; }
.sales-table tbody tr:hover td.turnover-cell--b { background: #facc15 !important; color: #111827; }
.sales-table tbody tr:hover td.turnover-cell--c { background: #a855f7 !important; color: #fff; }

.forecast-sales-input {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 8px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent !important;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-align: center;
    appearance: textfield;
}

.forecast-sales-input:focus {
    border: 0 !important;
    box-shadow: none !important;
}

.forecast-sales-input::-webkit-outer-spin-button,
.forecast-sales-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.forecast-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.forecast-table-toolbar label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #334155; }
.forecast-table-toolbar input { width: 230px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; }
.forecast-sortable { cursor: pointer; user-select: none; }
.forecast-sortable::after { content: " ↕"; color: #94a3b8; font-size: 12px; }
.forecast-sortable.is-sort-asc::after { content: " ↑"; color: currentColor; }
.forecast-sortable.is-sort-desc::after { content: " ↓"; color: currentColor; }
.forecast-sortable[data-sort-direction="asc"]::after { content: " ↑"; color: currentColor; }
.forecast-sortable[data-sort-direction="desc"]::after { content: " ↓"; color: currentColor; }
@media (max-width: 640px) { .forecast-table-toolbar { align-items: stretch; flex-direction: column; } .forecast-table-toolbar input { width: 100%; } }





    .sales-table tbody tr {
        transition: .2s;
    }



        .sales-table tbody tr:hover {
            background: #eff6ff;
        }




            .sales-table tbody tr:hover td {
                background: #eff6ff;
            }






/* Region header */


.region-header {
    background: #2563eb !important;
}



.region-start {
    border-left: 3px solid #2563eb !important;
}







/* Footer */


.sales-table tfoot th {
    background: #e2e8f0;
    color: #0f172a;
    border-top: 3px solid #2563eb;
}






/* Category */


.category-input {
    width: 55px;
    height: 40px;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    border-radius: 10px;
}



.category-input:has(option[value="A"]:checked) {
        background: #dbeafe;
        border-color: #3b82f6;
    }



.category-input:has(option[value="B"]:checked) {
        background: #fef9c3;
        border-color: #eab308;
    }



.category-input:has(option[value="C"]:checked) {
        background: #f3e8ff;
        border-color: #a855f7;
    }





/* Error */


.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 5px solid #dc2626;
}







/* Empty */


.empty-card {
    background: white;
    padding: 40px;
    text-align: center;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    color: #64748b;
}






/* Scroll table */


.card:has(.sales-table) {
    overflow-x: auto;
}





/* Responsive */


@media(max-width:900px) {


    .layout {
        flex-direction: column;
    }


    .sidebar {
        width: 100%;
    }



    .content {
        padding: 20px;
    }



    form {
        flex-direction: column;
    }



    .filter input {
        width: 100%;
    }


}

.table-wrapper {
    overflow: auto;
    max-height: 75vh;
    border-radius: 16px;
}

.settings-card h3,
.region-card h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}



.settings-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.settings-item {
    background: #f8fafc;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    width: 140px;
    transition: .2s;
}



    .settings-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,.08);
    }



    .settings-item label {
        display: block;
        margin-bottom: 8px;
        font-size: 13px;
        font-weight: 600;
        color: #475569;
    }



.settings-item input {
        width: 100%;
    }

.filter .settings-item { width: 190px; }
.filter .settings-item:last-child { width: auto; min-width: 220px; }
.filter .settings-item button { width: 100%; white-space: nowrap; }

.sales-source-settings { min-width: 270px; margin: 0; padding: 12px 14px; border: 1px solid #dbe5f1; border-radius: 14px; background: linear-gradient(135deg, #f8fbff, #f4f8ff); }
.sales-source-settings legend { padding: 0 5px; color: #475569; font-size: 13px; font-weight: 700; }
.sales-source-settings__list { display: flex; gap: 9px; flex-wrap: wrap; }
.sales-source-toggle { display: inline-flex; align-items: center; gap: 8px; min-width: 112px; padding: 9px 10px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #475569; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.sales-source-toggle:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(15, 23, 42, .08); }
.sales-source-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.sales-source-toggle__mark { display: grid; width: 19px; height: 19px; place-items: center; border: 1px solid #94a3b8; border-radius: 6px; color: transparent; font-size: 13px; font-weight: 800; transition: all .18s ease; }
.sales-source-toggle strong, .sales-source-toggle small { display: block; }
.sales-source-toggle strong { font-size: 14px; line-height: 1.1; }
.sales-source-toggle small { margin-top: 2px; color: #64748b; font-size: 11px; line-height: 1.1; }
.sales-source-toggle--fbo:hover { border-color: #2563eb; }
.sales-source-toggle--fbs:hover { border-color: #9333ea; }
.sales-source-toggle--fbo input:checked + .sales-source-toggle__mark { border-color: #2563eb; background: #2563eb; color: #fff; }
.sales-source-toggle--fbs input:checked + .sales-source-toggle__mark { border-color: #9333ea; background: #9333ea; color: #fff; }
.sales-source-toggle:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.sales-source-toggle--fbs:has(input:checked) { border-color: #9333ea; background: #faf5ff; }
.sales-source-toggle input:focus-visible + .sales-source-toggle__mark { outline: 3px solid rgba(37, 99, 235, .25); outline-offset: 2px; }
.sales-source-validation { margin: 10px 0 0; color: #b91c1c; font-size: 12px; font-weight: 700; }

.ozon-forecast-page { max-width: 1080px; }
.ozon-forecast-page__hero { padding: 30px; color: #fff; background: linear-gradient(125deg, #005bff, #2679ff 55%, #5b9cff); }
.ozon-forecast-page__eyebrow { display: block; margin-bottom: 8px; color: #dbeafe; font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.ozon-forecast-page__hero h1 { margin: 0 0 10px; font-size: clamp(28px, 4vw, 40px); }
.ozon-forecast-page__hero p { max-width: 620px; margin: 0; color: #eff6ff; font-size: 16px; line-height: 1.5; }
.ozon-forecast-page__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.ozon-forecast-page__feature { border-top: 4px solid #2563eb; }
.ozon-forecast-page__feature--insights { border-top-color: #9333ea; }
.ozon-forecast-page__feature > span { display: inline-block; padding: 4px 9px; border-radius: 999px; color: #1d4ed8; background: #dbeafe; font-size: 12px; font-weight: 800; }
.ozon-forecast-page__feature--insights > span { color: #7e22ce; background: #f3e8ff; }
.ozon-forecast-page__feature h2 { margin: 14px 0 7px; font-size: 20px; }
.ozon-forecast-page__feature p { margin: 0; color: #64748b; line-height: 1.5; }
.ozon-forecast-page__notice { display: flex; gap: 8px; align-items: center; margin-top: 18px; color: #1e3a8a; background: #eff6ff; }
.ozon-forecast-page__notice span { color: #475569; }
@media (max-width: 650px) { .ozon-forecast-page__grid { grid-template-columns: 1fr; } .ozon-forecast-page__notice { align-items: flex-start; flex-direction: column; } }

.report-upload-progress { margin-top: 18px; max-width: 500px; color: #475569; font-size: 14px; }
.report-upload-progress__track { height: 8px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.report-upload-progress__bar { width: 0; height: 100%; border-radius: inherit; background: #2563eb; transition: width .25s ease; }
.ozon-promotion-page__intro { display: block; }
.ozon-promotion-page__form { width: 100%; }
.ozon-promotion-page__form .settings-container { margin-top: 16px; }
.ozon-promotion-page__intro h3 { margin-bottom: 6px; }
.ozon-promotion-page__intro p { margin: 0; color: #64748b; }
.ozon-promotion-page__status { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; font-size: 13px; font-weight: 700; }
.ozon-promotion-table td, .ozon-promotion-table th { white-space: nowrap; }
@media (max-width: 700px) { .ozon-promotion-page__intro { align-items: flex-start; flex-direction: column; } }

.load-sales-form {
    display: inline-flex;
    margin-left: 15px;
}



.load-sales-form button {
        height: 42px;
    }

.upload-row {
    display: flex;
    align-items: center;
    gap: 15px;
}


    .upload-row form {
        display: flex;
        align-items: center;
        gap: 10px;
    }

.excel-form {
    display: flex;
    align-items: center;
    gap: 15px;
}

.settings-card {
    margin-top: 25px;
}


.region-card {
    margin-top: 25px;
}


.upload-row {
    display: flex;
    align-items: center;
    gap: 20px;
}


.excel-form {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ozon-sales { width: 100%; max-width: none; }
.ozon-sales .card { width: 100%; max-width: none; box-sizing: border-box; margin-bottom: 20px; }
.sales-summary { display: grid; grid-template-columns: repeat(6, minmax(145px, 1fr)); gap: 14px; margin: 0 0 20px; overflow-x: auto; padding-bottom: 2px; }
.sales-summary-card { min-height: 108px; padding: 18px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; box-shadow: 0 3px 10px rgba(15, 23, 42, .05); display: flex; flex-direction: column; justify-content: space-between; gap: 10px; box-sizing: border-box; }
.sales-summary-card span { color: #64748b; font-size: .87rem; font-weight: 600; }
.sales-summary-card strong { color: #0f172a; font-size: 1.3rem; line-height: 1.2; white-space: nowrap; }
.sales-summary-card--return { border-color: #fed7aa; background: #fffaf5; }
.sales-summary-card--return strong { color: #c2410c; }
.sales-summary-card--money { border-color: #bbf7d0; background: #f6fef8; }
.sales-summary-card--money strong { color: #15803d; }
.ozon-sales fieldset { border: 0; padding: 0; margin: 0; display: flex; gap: 12px; flex-wrap: wrap; }
.ozon-sales fieldset label { white-space: nowrap; }
.chart-wrap { position: relative; width: 100%; max-width: none; height: 330px; min-height: 330px; margin: 20px 0 0; padding: 10px 6px 0; box-sizing: border-box; }
.chart-wrap canvas { display: block; }
.comparison-tables { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; margin: 22px 6px 28px; }
.comparison-table { border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; background: #fff; }
.comparison-table h4 { margin: 0; padding: 12px 14px; font-size: 15px; background: #f8fafc; }
.comparison-table-scroll { overflow-x: auto; }
.comparison-table table { width: 100%; min-width: 420px; border-collapse: collapse; font-size: 13px; }
.comparison-table th, .comparison-table td { padding: 9px 12px; border-top: 1px solid #e2e8f0; text-align: right; white-space: nowrap; }
.comparison-table th:first-child { text-align: left; }
.comparison-table thead { color: #475569; background: #fff; }
.comparison-table tbody tr:nth-child(even) { background: #f8fafc; }
@media (max-width: 900px) { .comparison-tables { grid-template-columns: 1fr; } }
@media (max-width: 1050px) { .sales-summary { grid-template-columns: repeat(3, minmax(145px, 1fr)); } }
@media (max-width: 620px) { .sales-summary { grid-template-columns: repeat(2, minmax(145px, 1fr)); } }
.sales-chart-filter { display: flex; gap: 24px; align-items: end; flex-wrap: wrap; }
.sales-toggle-group { border: 0; padding: 0; margin: 0; }
.sales-toggle-group legend { margin-bottom: 8px; color: #475569; font-weight: 700; font-size: 14px; }
.sales-toggle-list { display: flex; gap: 8px; flex-wrap: wrap; }
.sales-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.sales-toggle span { display: block; padding: 8px 15px; border: 1px solid #cbd5e1; border-radius: 999px; color: #475569; background: #fff; font-weight: 700; cursor: pointer; transition: all .18s ease; }
.sales-toggle:hover span { border-color: #2563eb; color: #2563eb; }
.sales-toggle input:checked + span { color: #fff; border-color: #2563eb; background: #2563eb; box-shadow: 0 3px 9px rgba(37,99,235,.22); }
.sales-toggle input:focus-visible + span { outline: 3px solid rgba(37,99,235,.25); outline-offset: 2px; }
.returns-chart-heading { margin: 38px 0 16px; }

.success { background: #dcfce7; color: #166534; padding: 15px; border-radius: 12px; margin-bottom: 20px; border-left: 5px solid #16a34a; }
.unit-economics-intro { padding: 22px 24px; }
.unit-economics-intro > div { margin-bottom: 20px; }
.unit-economics-intro h3 { margin-bottom: 6px; }
.unit-economics-intro p { max-width: 760px; color: #64748b; line-height: 1.45; }
.unit-economics-form { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; width: 100%; }
.unit-economics-options { display: grid; grid-template-columns: repeat(3, minmax(210px, max-content)) minmax(310px, 1fr); align-items: end; gap: 14px 24px; }
.unit-toggle { display: inline-flex; align-items: center; gap: 8px; color: #334155; font-size: 14px; font-weight: 600; cursor: pointer; }
.unit-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.unit-toggle span { width: 40px; height: 22px; border-radius: 999px; background: #cbd5e1; position: relative; transition: .2s; }
.unit-toggle span::after { content: ""; position: absolute; width: 16px; height: 16px; top: 3px; left: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(15,23,42,.3); transition: .2s; }
.unit-toggle input:checked + span { background: #2563eb; }
.unit-toggle input:checked + span::after { transform: translateX(18px); }
.unit-period { display: grid; gap: 5px; min-width: 310px; color: #475569; font-size: 13px; font-weight: 600; transition: opacity .2s; }
.unit-period > div { display: flex; align-items: center; gap: 6px; }
.unit-period input { width: 142px; height: 38px; font-size: 13px; }
.unit-period--disabled { opacity: .45; }
.unit-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 25px; }
.unit-summary__item { display: grid; gap: 8px; padding: 18px 20px; background: #fff; border-radius: 16px; box-shadow: 0 10px 25px rgba(15,23,42,.08); color: #64748b; }
.unit-summary__item strong { color: #0f172a; font-size: 24px; }
.unit-summary__item--profit { background: linear-gradient(135deg, #eff6ff, #ecfdf5); }
.unit-summary__item--profit strong { color: #047857; }
.unit-table-card { padding: 0; }
.unit-table { min-width: 1180px; }
.unit-table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid #e2e8f0; background: #fff; }
.unit-table-caption { display: flex; align-items: baseline; gap: 8px; color: #0f172a; }
.unit-table-caption span { color: #64748b; font-size: 13px; }
.unit-table-search { display: flex; align-items: center; gap: 9px; width: min(100%, 340px); height: 42px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 11px; background: #f8fafc; transition: .2s; }
.unit-table-search:focus-within { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.unit-table-search input { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 14px; }
.unit-table-search input:focus { box-shadow: none; }
.unit-table-search__icon { width: 15px; height: 15px; flex: 0 0 15px; border: 2px solid #64748b; border-radius: 50%; position: relative; }
.unit-table-search__icon::after { content: ""; position: absolute; width: 7px; height: 2px; right: -6px; bottom: -3px; border-radius: 2px; background: #64748b; transform: rotate(45deg); }
.unit-table-card .table-wrapper { position: relative; max-height: 75vh; }
.unit-table thead { position: sticky; top: 0; z-index: 5; }
.unit-table thead th { position: sticky; top: 0; z-index: 6; box-shadow: 0 2px 0 rgba(15,23,42,.18); }
.unit-table__profit { font-weight: 700; color: #047857; }
.unit-table__row--loss .unit-table__profit { color: #dc2626; }
.catalog-form, .catalog-import, .catalog-import form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.catalog-search { margin-bottom: 16px; }
.catalog-page-size { display: flex; align-items: center; margin: 14px 0; }
.catalog-page-size label { display: inline-flex; align-items: center; gap: 9px; padding: 7px 10px 7px 14px; border: 1px solid #dbe3ee; border-radius: 10px; background: #f8fafc; color: #475569; font-size: 13px; font-weight: 700; }
.catalog-page-size select { width: auto; min-width: 76px; padding: 7px 28px 7px 10px; border: 0; border-radius: 7px; background: #fff; color: #0f172a; font: inherit; cursor: pointer; }
.catalog-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 2px; }
.catalog-pagination > span { color: #94a3b8; font-weight: 700; }
.catalog-page { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid #dbe3ee; border-radius: 9px; background: #fff; color: #475569; font-size: 13px; font-weight: 800; text-decoration: none; transition: .16s ease; }
.catalog-page:hover { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; transform: translateY(-1px); }
.catalog-page.is-active { border-color: #2563eb; background: #2563eb; color: #fff; box-shadow: 0 4px 10px rgba(37,99,235,.22); }
.wb-products .catalog-page:hover { border-color: #7c2cff; background: #faf5ff; color: #6d28d9; }
.wb-products .catalog-page.is-active { border-color: #7c2cff; background: #7c2cff; color: #fff; box-shadow: 0 4px 10px rgba(124,44,255,.22); }
.catalog-search input { min-width: 260px; }
.catalog-form input { min-width: 180px; }
.role-select { display: grid; gap: 5px; min-width: 190px; color: #475569; font-size: 12px; font-weight: 600; }
.role-select select { appearance: none; width: 100%; min-height: 42px; padding: 8px 38px 8px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; color: #0f172a; font: inherit; font-size: 14px; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.role-select select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
.catalog-import { margin-top: 16px; }
.button-link { display: inline-block; padding: 10px 16px; border-radius: 8px; background: #e2e8f0; color: #0f172a; text-decoration: none; }
.button-link--export-ozon { background: #005bff; color: #fff; font-weight: 700; }
.button-link--export-ozon:hover { background: #0048cc; color: #fff; }
.button-link--export-wb { background: #7c2cff !important; color: #fff !important; font-weight: 700; }
.button-link--export-wb:hover { background: #6420d3 !important; color: #fff !important; }
.wb-report-upload-progress .report-upload-progress__bar { background: #7c2cff; }

/* Supply orders */
.requests-page { max-width: 1600px; }
.requests-page__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.requests-page h1 { margin: 3px 0 7px; letter-spacing: -.7px; }
.requests-page__eyebrow, .request-table-card__eyebrow { color: #2563eb; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.requests-page__subtitle { color: #64748b; font-size: 15px; }
.requests-refresh { display: inline-flex; align-items: center; gap: 8px; padding: 11px 15px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #334155; font-size: 14px; font-weight: 700; text-decoration: none; transition: .2s; }
.requests-refresh:hover { border-color: #2563eb; color: #2563eb; box-shadow: 0 4px 12px rgba(37,99,235,.12); }
.request-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 22px; }
.request-tab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 14px; border: 1px solid #d8e0ea; border-radius: 20px; background: #fff; color: #475569; font-size: 13px; font-weight: 650; box-shadow: none; }
.request-tab:hover { background: #f8fafc; border-color: #94a3b8; color: #1e293b; transform: none; }
.request-tab b { display: inline-grid; min-width: 22px; height: 22px; padding: 0 6px; place-items: center; border-radius: 12px; background: #eef2f7; color: #475569; font-size: 12px; }
.request-tab.is-active { border-color: #2563eb; background: #2563eb; color: #fff; box-shadow: 0 5px 12px rgba(37,99,235,.22); }
.request-tab.is-active b { background: rgba(255,255,255,.2); color: #fff; }
.request-table-card { padding: 0; overflow: hidden; }
.request-table-card__title { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px 17px; border-bottom: 1px solid #e2e8f0; }
.request-table-card__title h3 { margin-top: 3px; color: #0f172a; font-size: 19px; }
.request-search { display: flex; align-items: center; gap: 8px; width: min(100%, 290px); height: 40px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #f8fafc; transition: .2s; }
.request-search:focus-within { border-color: #2563eb; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.request-search input { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 13px; }
.request-search input:focus { box-shadow: none; }
.request-search__icon { width: 14px; height: 14px; flex: 0 0 14px; border: 2px solid #64748b; border-radius: 50%; position: relative; }
.request-search__icon::after { content: ""; position: absolute; width: 6px; height: 2px; right: -5px; bottom: -3px; border-radius: 2px; background: #64748b; transform: rotate(45deg); }
.request-table-wrapper { max-height: 68vh; }
.request-table { min-width: 1120px; }
.request-table th { padding: 14px 15px; background: #0f172a; font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }
.request-table td { padding: 13px 15px; vertical-align: middle; color: #334155; font-size: 13px; }
.request-table tbody tr { transition: background .16s; }
.request-table tbody tr:hover { background: #f8fbff; }
.request-table small { display: block; margin-top: 4px; color: #94a3b8; font-size: 11px; line-height: 1.3; }
.acceptance-result { display: block; font-size: 13px; font-weight: 700; line-height: 1.35; }
.acceptance-result--loading, .acceptance-result--waiting { color: #64748b; font-weight: 500; }
.acceptance-result--complete { color: #16803a; }
.acceptance-result--partial { color: #c75b12; }
.acceptance-result--error { color: #b91c1c; font-weight: 500; }
.acceptance-result__accepted { display: block; margin-top: 3px; color: #16803a; }
.cluster-name { display: block; cursor: pointer; }
.cluster-check { width: 17px; height: 17px; cursor: pointer; }
.supply-cluster-row:has(.cluster-check:checked) { background: #eff6ff; }
.request-number strong { color: #0f172a; font-size: 13px; }
.request-state { display: inline-flex; align-items: center; max-width: 170px; padding: 5px 9px; border-radius: 20px; background: #eef2ff; color: #4338ca; font-size: 12px; font-weight: 700; line-height: 1.2; }
.request-state--completed { background: #dcfce7; color: #15803d; }
.request-state--cancelled, .request-state--rejected_at_supply_warehouse, .request-state--report_rejected { background: #fee2e2; color: #b91c1c; }
.request-state--data_filling { background: #fef3c7; color: #a16207; }
.request-state--ready_to_supply, .request-state--in_transit { background: #dbeafe; color: #1d4ed8; }
.request-state--acceptance_at_storage_warehouse, .request-state--reports_confirmation_awaiting { background: #f3e8ff; color: #7e22ce; }
.request-empty { padding: 30px 22px; color: #64748b; }
.supply-create-card { max-width: 900px; }
.supply-step { display:flex; gap:14px; align-items:center; margin-bottom:22px; }.supply-step>span{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#2563eb;color:#fff;font-weight:800}.supply-step h3{margin-bottom:4px}.supply-step p,.supply-note{color:#64748b;font-size:14px}.supply-create-form{display:grid;gap:18px}.supply-file{display:grid;gap:5px;padding:22px;border:2px dashed #93c5fd;border-radius:14px;background:#f8fbff;cursor:pointer}.supply-file span{font-size:24px}.supply-file small{color:#64748b}.supply-file input{display:none}.supply-type{display:grid;grid-template-columns:1fr 1fr;gap:12px}.supply-type label{display:flex;gap:10px;padding:14px;border:1px solid #dbe3ee;border-radius:12px;cursor:pointer}.supply-type input{width:auto;height:auto;margin-top:4px}.supply-type small{display:block;margin-top:4px;color:#64748b}.supply-note{margin-top:18px}

.cabinet-switcher { display: flex; gap: 8px; margin: 0 0 22px; }
.cabinet-switcher button { flex: 1; padding: 8px; font-size: 13px; }
.current-cabinet { margin: 0 0 14px; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 9px; color: #fff; font-size: 14px; }
.sidebar-bottom-actions { margin-top: 16px; padding-top: 0; }
.sidebar-bottom-actions .menu-item { margin-bottom: 12px; }
.logout-form { margin: 0; }
.logout-form button { width: 100%; }
.logout-form--wb button { background: #7c2cff; }
.logout-form--wb button:hover { background: #6420d3; }
.marketplace-panel--wb .menu-item:hover,
.marketplace-panel--wb .menu-item:focus-visible { background: #7c2cff; }
.wb-products button { background: #7c2cff; }
.wb-products button:hover { background: #6420d3; }
.wb-products button:disabled { background: #c4b5fd; color: #ede9fe; cursor: not-allowed; transform: none; }
.wb-products input:focus,
.wb-forecast input:focus { border-color: #7c2cff; box-shadow: 0 0 0 3px rgba(124,44,255,.16); }
.wb-products .button-link { display: inline-flex; align-items: center; border: 0; background: #ede9fe; color: #6d28d9; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.wb-products .button-link:hover { background: #ddd6fe; color: #5b21b6; }
.wb-products .catalog-import__mock { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.wb-products .sales-table th { background: #4c1d95; }
.wb-products .sales-table tbody tr:hover td { background: #faf5ff; }
.wb-products__delete { min-width: 104px; }
.wb-products__note { margin: 14px 0 0; color: #7c2d12; font-size: 13px; }
.ai-forecast-button { position: relative; overflow: hidden; }
.ai-preset-list { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 13px; }
.ai-preset-list label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.ai-analysis-card { border-left: 4px solid #7c2cff; }
.ai-analysis-card h3 { margin-bottom: 6px; }
.ai-analysis-card__hint { margin: 0 0 14px; color: #5b6473; font-size: 13px; }
.ai-preset-help { margin: 0 0 14px; font-size: 13px; color: #3f4858; }
.ai-preset-help summary { cursor: pointer; font-weight: 700; color: #6d28d9; }
.ai-preset-help ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.ai-regional-allocation { margin: 14px 0; padding: 12px; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 8px; max-width: 520px; }
.ai-regional-allocation h4 { margin: 0 0 8px; color: #5b21b6; }
.ai-regional-allocation__row { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; border-bottom: 1px solid #e9e5ff; }
.ai-regional-allocation__row:last-child { border-bottom: 0; }
.ozon-ai-analysis-card { border-left-color: #005bff; }
.ozon-ai-analysis-card .ai-preset-help summary { color: #005bff; }
.ozon-ai-forecast-button { background: #005bff; }
.ozon-ai-forecast-button:hover { background: #0047c7; }
.ozon-ai-forecast-button.ai-is-analyzing { animation-name: ozon-ai-forecast-pulse; }
.ozon-ai-regional-allocation { background: #f1f6ff; border-color: #b8d1ff; }
.ozon-ai-regional-allocation h4 { color: #005bff; }
.ozon-ai-regional-allocation__row { border-bottom-color: #d8e6ff; }
.ai-abc-allocation { margin: 14px 0; padding: 12px; background: #f1f6ff; border: 1px solid #b8d1ff; border-radius: 8px; max-width: 520px; }
.ai-abc-allocation h4 { margin: 0 0 8px; color: #005bff; }
.ai-abc-allocation__scroll { max-height: 420px; overflow: auto; margin-top: 10px; }
.ai-abc-allocation table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ai-abc-allocation th, .ai-abc-allocation td { padding: 5px 8px; border-bottom: 1px solid #d8e6ff; text-align: center; }
.ai-abc-allocation th:first-child, .ai-abc-allocation td:first-child { text-align: left; }
.ozon-apply-abc-button { margin-top: 12px; background: #005bff; }
.ozon-apply-abc-button:hover { background: #0047c7; }
.ozon-apply-abc-button:disabled { opacity: .7; cursor: default; }
.ai-regional-allocation__head, .ai-regional-allocation__row { display: grid; grid-template-columns: minmax(180px, 1fr) 70px 36px 36px 36px; align-items: center; }
.ai-regional-allocation__head { padding: 4px 0 7px; color: #005bff; font-size: 12px; font-weight: 700; }
.ai-category-yes { color: #16803c; }
.ai-category-no { color: #a4acb8; }
.ozon-apply-regions-button { margin-top: 12px; background: #005bff; }
.ozon-apply-regions-button:hover { background: #0047c7; }
.ozon-apply-regions-button:disabled { opacity: .7; cursor: default; }
@keyframes ozon-ai-forecast-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(0,91,255,0); } 50% { box-shadow: 0 0 0 7px rgba(0,91,255,.16), 0 0 20px rgba(0,91,255,.38); } }
.ai-analysis-card .ai-forecast-button { margin-top: 14px; }
.ai-forecast-button.ai-is-analyzing { animation: ai-forecast-pulse 1.25s ease-in-out infinite; cursor: wait; }
.ai-forecast-button.ai-is-analyzing::before,
.ai-forecast-button.ai-is-analyzing::after { content: "✦"; position: absolute; color: #fff; text-shadow: 0 0 8px rgba(255,255,255,.9); pointer-events: none; animation: ai-forecast-spark 1.25s ease-in-out infinite; }
.ai-forecast-button.ai-is-analyzing::before { left: 10px; top: 4px; font-size: 12px; }
.ai-forecast-button.ai-is-analyzing::after { right: 9px; bottom: 3px; font-size: 9px; animation-delay: .42s; }
@keyframes ai-forecast-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(124,44,255,0); } 50% { box-shadow: 0 0 0 7px rgba(124,44,255,.18), 0 0 20px rgba(124,44,255,.42); } }
@keyframes ai-forecast-spark { 0%, 100% { opacity: .25; transform: scale(.65) rotate(0deg); } 50% { opacity: 1; transform: scale(1.25) rotate(50deg); } }
@media (prefers-reduced-motion: reduce) { .ai-forecast-button.ai-is-analyzing, .ai-forecast-button.ai-is-analyzing::before, .ai-forecast-button.ai-is-analyzing::after { animation: none; } }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(100%, 380px); }
.login-card form { display: grid; gap: 10px; }

@media (max-width: 768px) {
    body { overflow-x: hidden; }
    body.mobile-menu-open { overflow: hidden; }
    .layout { display: block; min-height: 100svh; }
    .mobile-menu-toggle {
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 1100;
        display: grid;
        align-content: center;
        justify-content: center;
        gap: 4px;
        width: 44px;
        height: 44px;
        min-height: 44px;
        padding: 0;
        border-radius: 12px;
        background: #0f172a;
        box-shadow: 0 8px 22px rgba(15,23,42,.25);
    }
    .mobile-menu-toggle:hover { background: #1e293b; transform: none; }
    .mobile-menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: #fff; }
    .mobile-menu-backdrop { position: fixed; inset: 0; z-index: 1040; display: none; background: rgba(15,23,42,.52); backdrop-filter: blur(2px); }
    .mobile-menu-open .mobile-menu-backdrop { display: block; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 1050;
        width: min(86vw, 330px);
        padding: 18px 16px 24px;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 14px 0 34px rgba(15,23,42,.28);
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar h2 { margin-bottom: 8px; }
    .sidebar > .marketplace-panel nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; padding: 0; }
    .menu-item { min-height: 48px; margin: 0; padding: 9px 8px; white-space: normal; font-size: 12px; line-height: 1.2; text-align: center; }
    .menu-item:hover { transform: none; }
    .cabinet-switcher { display: grid; grid-template-columns: 1fr 1fr; max-width: none; margin-bottom: 14px; gap: 7px; }
    .cabinet-switcher button, .wb-cabinet-switcher button { width: 100%; padding: 0 8px; }
    .sidebar-bottom-actions { margin-top: 14px; }
    .sidebar-bottom-actions .menu-item { display: block; margin-bottom: 8px; }
    .logout-form { display: block; }
    .logout-form button { width: 100%; }
    .content { min-width: 0; padding: 72px 12px 22px; }
    h1 { margin-bottom: 18px; font-size: 26px; }
    .marketplace-page-context { margin-left: 52px; font-size: 13px; }
    .card, .empty-card { padding: 16px; border-radius: 14px; }
    .settings-container { display: grid; grid-template-columns: 1fr; }
    .filter .settings-item, .filter .settings-item:last-child { width: 100%; min-width: 0; }
    .margin-report-layout { margin-top: 12px; }
    .margin-report { min-width: 0; }
    .margin-report__row { grid-template-columns: minmax(0, 1fr) 105px 70px; gap: 6px; padding: 7px 0; font-size: 12px; }
    .margin-report__row--right span:first-child { text-align: left; }
    .margin-report__row span:nth-child(2), .margin-report__row span:nth-child(3) { overflow-wrap: anywhere; }
    .margin-gauge { max-width: 240px; }
    .catalog-form, .catalog-import, .catalog-import form { display: grid; grid-template-columns: 1fr; width: 100%; }
    .unit-economics-form { grid-template-columns: 1fr; align-items: stretch; }
    .unit-economics-options { grid-template-columns: 1fr; }
    .unit-period input { width: 100%; }
    .unit-table-toolbar { align-items: stretch; flex-direction: column; }
    .unit-table-search { width: 100%; }
    .unit-economics-intro button { width: 100%; }
    .unit-summary { grid-template-columns: 1fr; gap: 10px; }
    .catalog-form input, .catalog-search input, .role-select { min-width: 0; width: 100%; }
    .catalog-import input, .catalog-import button, .catalog-form button, .button-link { width: 100%; text-align: center; }
    .table-wrapper { width: 100%; -webkit-overflow-scrolling: touch; }
    .sales-table { min-width: 560px; }
}

@media (min-width: 769px) {
    .mobile-menu-toggle, .mobile-menu-backdrop { display: none; }
}
