/* === CSS Variables & Reset === */
:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --header-border: #e9ecef;
    --table-header-bg: #e5e5e5;
    /* specific from screenshot */
    --hover-bg: #f8f9fa;
    --font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    font-size: 14px;
}

/* === Header === */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 64px;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--header-border);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 18px;
}

.nav-menu {
    display: flex;
    gap: 24px;
    height: 64px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 4px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

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

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

.avatar-btn {
    background-color: #f1f3f5;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background-color 0.2s;
}

.avatar-btn:hover {
    background-color: #e9ecef;
}

/* === Main Content === */
.main-content {
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 24px 32px;
    box-sizing: border-box;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(180deg, #2f7dff 0%, #1568f7 100%);
    color: white;
    border: none;
    box-shadow: 0px 4px 10px 0px rgba(21, 104, 247, 0.15), inset 0px 1px 0px 0px rgba(255, 255, 255, 0.28);
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-outline {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    padding: 6px 12px;
}

.btn-outline:hover {
    background-color: var(--hover-bg);
    border-color: #dcdcd8;
}

.btn-icon {
    background-color: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--figma-border);
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background-color: var(--hover-bg);
}

/* === Search === */
.search-container {
    margin-bottom: 24px;
}

.search-input-wrapper {
    position: relative;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-input {
    width: 100%;
    padding: 9px 16px 9px 40px;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    background: #ffffff;
}

.search-input:focus {
    border-color: var(--figma-primary-blue);
}

/* === Table === */
.table-container {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid var(--figma-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.companies-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    text-align: left;
}

.companies-table th {
    background-color: #f7f7f5;
    padding: 12px 20px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
    border-bottom: 1px solid var(--figma-border);
}

.companies-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--figma-border);
    vertical-align: middle;
}

.companies-table tr:last-child td {
    border-bottom: none;
}

.company-cell {
    display: flex;
    align-items: center;
    gap: 14px;
}

.company-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.icon-grey {
    background-color: transparent;
    border: 1px solid #e2e8f0;
}

.icon-black {
    background-color: transparent;
}

.icon-grey-fill {
    background-color: transparent;
}

.company-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    font-size: 14px;
}

.company-inn {
    font-size: 12px;
    color: var(--text-secondary);
}

.role-text {
    color: var(--text-primary);
}

/* === Toggle Switch === */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

input:checked+.slider {
    background-color: var(--figma-primary-blue);
}

input:checked+.slider:before {
    transform: translateX(16px);
}

.toggle-label {
    font-size: 13px;
    font-weight: 400;
}

.text-muted {
    color: var(--text-secondary);
}

.text-dark {
    color: var(--text-primary);
}

.info-icon {
    color: var(--text-secondary);
    cursor: help;
}

.actions-cell {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(29, 33, 41, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-window {
    background-color: var(--card-bg);
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.active .modal-window {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--figma-border);
}

.modal-title {
    font-size: 16px;
    font-weight: 500;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--figma-primary-blue);
    box-shadow: 0 0 0 3px rgba(21, 104, 247, 0.12);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--figma-border);
    background-color: #fcfcfb;
}

/* === Figma UI Kit Components === */
:root {
    --figma-font: 'Onest', sans-serif;
    --figma-border: #e8e8e5;
    --figma-fill-subtle: #f7f7f5;
    --figma-text-dark: #242421;
    --figma-text-muted: #7a7a75;
    --figma-primary-blue: #1568f7;
    --figma-success-green: #68803f;
}

/* Figma Header */
.figma-header {
    background: #ffffff;
    border-bottom: 1px solid var(--figma-border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    gap: 12px;
}

.figma-header-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.figma-header-title {
    font-family: var(--figma-font);
    font-size: 18px;
    font-weight: 500;
    line-height: 26px;
    color: var(--figma-text-dark);
}

.figma-btn-icon-subtle {
    background: var(--figma-fill-subtle);
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.figma-btn-icon-subtle:hover {
    background: #ebebe7;
}

/* Figma Gradient Button */
.figma-btn-gradient {
    background: linear-gradient(180deg, #2f7dff 0%, #1568f7 100%);
    box-shadow: 0px 4px 10px 0px rgba(21, 104, 247, 0.15), inset 0px 1px 0px 0px rgba(255, 255, 255, 0.28);
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    height: 36px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s;
    white-space: nowrap;
    box-sizing: border-box;
}

.figma-btn-gradient:hover {
    filter: brightness(1.05);
}

.figma-btn-gradient:active {
    transform: translateY(1px);
}

/* Figma Secondary / Outline Button */
.figma-btn-secondary {
    background: #ffffff;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    color: var(--figma-text-dark);
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}

.figma-btn-secondary:hover {
    background: var(--figma-fill-subtle);
    border-color: #dcdcd8;
}

.figma-btn-padded {
    padding: 0 20px;
}

/* Figma Subheader (Точный узел 3659:111919) */
.figma-subheader {
    background: #ffffff;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    border-bottom: none;
    /* В макете 3659:111919 нет нижней границы */
}

.figma-subheader-left,
.figma-subheader-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.figma-dropdown-trigger {
    background: #ffffff;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 188px;
    /* Точная ширина из Figma 3652:95361 */
    min-width: 188px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--figma-text-dark);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    user-select: none;
}

.figma-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.figma-dropdown-trigger.active {
    border-color: #1568f7;
    box-shadow: 0 0 0 2px rgba(21, 104, 247, 0.15);
}

.figma-dropdown-trigger.active .dropdown-arrow-icon {
    transform: rotate(180deg);
}

.figma-dropdown-trigger .dropdown-arrow-icon {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.figma-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 240px;
    width: max-content;
    max-width: 320px;
    background: #ffffff;
    border: 1px solid var(--figma-border);
    border-radius: 8px;
    box-shadow: 0px 8px 24px 0px rgba(0, 0, 0, 0.14), 0px 2px 6px 0px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 6px 0;
    display: flex;
    flex-direction: column;
    animation: dropdownMenuFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes dropdownMenuFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.figma-dropdown-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--figma-border);
    margin-bottom: 4px;
}

.figma-dropdown-search input {
    border: none;
    outline: none;
    font-family: var(--figma-font);
    font-size: 13px;
    color: var(--figma-text-dark);
    width: 100%;
    background: transparent;
}

.figma-dropdown-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.figma-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    font-family: var(--figma-font);
    font-size: 14px;
    line-height: 20px;
    color: var(--figma-text-dark);
    transition: background-color 0.12s;
    user-select: none;
    gap: 12px;
}

.figma-dropdown-item:hover {
    background-color: #f7f7f5;
}

.figma-dropdown-item.selected {
    color: #1568f7;
    font-weight: 500;
    background-color: #f2f7ff;
}

.figma-dropdown-item .item-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.figma-dropdown-item .item-subtitle {
    font-size: 12px;
    color: #7a7a75;
    white-space: nowrap;
}

.figma-dropdown-item .item-check {
    flex-shrink: 0;
}

/* Дропдаун триггер внутри ячейки таблицы (Точный узел 3841:24187) */
.table-dropdown-trigger {
    background: #f7f7f5;
    border-radius: 4px;
    height: 22px;
    /* точная высота контента ячейки (37px - 2*7.5px = 22px) */
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    min-width: 100%;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: var(--figma-text-dark);
    cursor: pointer;
    border: none;
    box-sizing: border-box;
    transition: background-color 0.15s;
}

.table-dropdown-trigger:hover {
    background-color: #ededeb;
}


.figma-dropdown-trigger:hover {
    border-color: #b0b0a8;
}

.figma-search-box {
    background: #ffffff;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 36px;
    width: 340px;
    /* Точная ширина из Figma 3663:204808 */
    box-sizing: border-box;
}



.figma-search-box input {
    border: none;
    outline: none;
    font-family: var(--figma-font);
    font-size: 14px;
    color: var(--figma-text-dark);
    width: 100%;
    background: transparent;
}

.figma-search-box input::placeholder {
    color: var(--figma-text-muted);
}

/* Figma Status Stepper / Описание */
.figma-stepper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.stepper-item {
    display: inline-flex;
    align-items: center;
    position: relative;
    height: 32px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
}

.step-completed {
    background: var(--figma-success-green);
    color: #ffffff;
    padding: 5px 16px 5px 12px;
    border-radius: 4px 0 0 4px;
}

.step-completed .chevron-tail {
    position: absolute;
    right: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 10px solid var(--figma-success-green);
    z-index: 2;
}

.step-active {
    background: var(--figma-primary-blue);
    color: #ffffff;
    padding: 5px 16px 5px 16px;
    border-radius: 0;
}

.step-active .chevron-tail {
    position: absolute;
    right: -10px;
    top: 0;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 10px solid var(--figma-primary-blue);
    z-index: 2;
}

.step-inactive {
    background: var(--figma-fill-subtle);
    color: var(--figma-text-dark);
    padding: 5px 12px;
    border-radius: 4px;
}

/* Figma Footer */
.figma-footer {
    background: #ffffff;
    border-top: 1px solid var(--figma-border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    gap: 12px;
}

.figma-total-badge {
    background: var(--figma-fill-subtle);
    border-radius: 4px;
    padding: 6px 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--figma-font);
    font-size: 14px;
}

.figma-total-badge .label {
    color: var(--figma-text-muted);
}

.figma-total-badge .value {
    color: var(--figma-text-dark);
    font-weight: 500;
}

.figma-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* === Drawer (Боковая шторка справа с общим темным оверлеем) === */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(29, 33, 41, 0.6);
    /* Цельный темный фон на весь экран */
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Левая кликабельная область */
.drawer-backdrop {
    flex: 1;
    background: transparent;
    padding: 16px 16px 16px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    cursor: pointer;
    box-sizing: border-box;
}

.drawer-close-btn {
    width: 36px;
    height: 36px;
    background: #ffffff;
    border-radius: 4px !important;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.15);
    color: #242421;
    transition: transform 0.2s, background-color 0.2s;
    pointer-events: auto;
}

.drawer-close-btn svg,
.modal-close svg,
.modal-close-btn svg,
.drawer-mobile-close svg,
.figma-modal-close svg {
    width: 16px !important;
    height: 16px !important;
    transition: opacity 0.15s ease;
}

.drawer-close-btn:hover svg,
.modal-close:hover svg,
.modal-close-btn:hover svg,
.drawer-mobile-close:hover svg,
.figma-modal-close:hover svg {
    opacity: 0.45 !important;
}

.drawer-close-btn:hover {
    background: #f7f7f5;
    transform: scale(1.02);
}

/* Тело модалки: сплошной белый фон #ffffff */
.drawer-window {
    background-color: #ffffff;
    background: #ffffff;
    width: 96vw;
    max-width: 1844px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow-y: auto;
    z-index: 1001;
}

.drawer-overlay.active .drawer-window {
    transform: translateX(0);
}




/* Empty state for importing goods */
.empty-state-card {
    background: #fcfcfb;
    border: 1px solid var(--figma-border);
    border-radius: 12px;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
    margin: 16px 0;
}

.empty-state-title {
    font-family: var(--figma-font);
    font-size: 18px;
    font-weight: 500;
    line-height: 26px;
    color: var(--figma-text-dark);
}

.empty-state-desc {
    font-family: var(--figma-font);
    font-size: 14px;
    color: #4f4f4b;
    line-height: 22px;
    max-width: 320px;
}

/* Ручка для Bottom Sheet (по умолчанию скрыта на десктопе) */
.bottom-sheet-handle {
    display: none;
    width: 36px;
    height: 4px;
    background: #dcdcd8;
    border-radius: 99px;
    margin: 10px auto 4px auto;
}

.drawer-mobile-close {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--figma-text-dark);
}

/* === Адаптив для планшетов и мобильных устройств (Bottom Sheet & Мобильные стандарты) === */
@media (max-width: 1024px) {
    .header {
        padding: 0 16px;
    }

    .nav-menu {
        gap: 16px;
    }

    .main-content {
        padding: 20px 16px;
    }

    /* Превращение боковой шторки в Bottom Sheet на планшетах и мобилках */
    .drawer-overlay {
        justify-content: center;
        align-items: flex-end;
    }

    .drawer-backdrop {
        position: absolute;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        padding: 0;
    }

    .drawer-close-btn {
        display: none;
        /* Скрываем внешнюю левую кнопку */
    }

    .drawer-window {
        width: 100vw;
        max-width: 100vw;
        height: 90vh;
        /* Занимает 90% высоты снизу как стандартный Bottom Sheet */
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
    }

    .drawer-overlay.active .drawer-window {
        transform: translateY(0);
    }

    .bottom-sheet-handle {
        display: block;
    }

    .drawer-mobile-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-action-desktop {
        display: none;
    }

    .figma-header {
        padding: 8px 16px 12px 16px;
    }

    .figma-subheader {
        padding: 10px 16px;
        gap: 10px;
    }

    .figma-subheader-left,
    .figma-subheader-right {
        width: 100%;
    }

    .figma-dropdown-trigger {
        flex: 1;
        min-width: 120px;
    }

    .figma-search-box {
        flex: 1;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        height: auto;
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-left {
        width: 100%;
        justify-content: space-between;
        gap: 16px;
    }

    .nav-menu {
        overflow-x: auto;
        height: auto;
        padding-bottom: 4px;
        width: 100%;
        gap: 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .page-header .btn-primary {
        width: 100%;
    }

    .search-input-wrapper {
        max-width: 100%;
    }

    .drawer-window {
        height: 94vh;
        max-height: 94vh;
    }

    .figma-subheader-left {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .figma-subheader-right {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .figma-subheader-right button {
        width: 100%;
    }

    .empty-state-card {
        padding: 24px 16px;
        gap: 16px;
    }
}

/* === Стили таблицы заявки и плавающих действий (Точная спецификация 3663:198937) === */
.order-table-container {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border: 0.5px solid var(--figma-border);
    border-radius: 4px;
    position: relative;
    /* Тонкий скроллбар по стандартам Firefox */
    scrollbar-width: thin;
    scrollbar-color: #c9cdd4 #ffffff;
}

/* Кастомный скроллбар таблицы (Точный узел 3846:62533 / 3663:198735) */
.order-table-container::-webkit-scrollbar {
    height: 12px;
    /* Общая высота зоны скроллбара с учетом отступов */
    background: #ffffff;
    border-top: 0.5px solid var(--figma-border);
    /* border-t-[0.5px] #e8e8e5 */
}

.order-table-container::-webkit-scrollbar-track {
    background: #ffffff;
    margin: 0 12px;
    /* px-[12px] из ноды 3846:62533 */
    border-radius: 99px;
}

.order-table-container::-webkit-scrollbar-thumb {
    background-color: #c9cdd4;
    /* light/fill/color-fill-4 из Figma */
    border-radius: 99px;
    /* rounded-[99px] */
    border: 4px solid #ffffff;
    /* формирует тонкий ползунок высотой 4px с отступом py-[8px] */
    background-clip: content-box;
    min-width: 48px;
    transition: background-color 0.2s;
}

.order-table-container::-webkit-scrollbar-thumb:hover {
    background-color: #a6a6a0;
    /* затемнение при наведении */
}

.order-table-container::-webkit-scrollbar-corner {
    background: transparent;
}


.order-table {
    width: 100%;
    min-width: 100%;
    table-layout: auto;
    /* Позволяет колонкам гибко адаптироваться и заполнять 100% ширины контейнера */
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-family: var(--figma-font);
    font-size: 14px;
}


.order-table th {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    background: #fcfcfb !important;
    color: var(--figma-text-secondary);
    /* #4f4f4b из ноды 3841-23984 */
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    height: 36px !important;
    padding: 0 8.5px !important;
    border-top: 0.5px solid var(--figma-border);
    border-left: 0.5px solid var(--figma-border);
    border-right: 0.5px solid var(--figma-border);
    border-bottom: 0.5px solid var(--figma-border);
    text-align: left;
    white-space: nowrap;
    user-select: none;
    box-sizing: border-box;
    vertical-align: middle;
    box-shadow: 0 -2px 0 0 #fcfcfb;
    transition: border-bottom 0.15s ease, box-shadow 0.15s ease, background-color 0.12s ease;
}

.order-table-container.is-scrolled .order-table th,
.order-history-table-container.is-scrolled .order-history-table th {
    border-bottom: 1px solid #c4c4be !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), 0 -2px 0 0 #fcfcfb !important;
}

.order-table th.sortable {
    cursor: pointer;
    transition: background-color 0.12s;
}

.order-table th.sortable:hover {
    background-color: #f0f0ed !important;
}

/* Ручка изменения ширины ячейки (Колонки) */
.th-resizer {
    position: absolute;
    top: 0;
    right: -3px;
    width: 6px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 10;
    transition: background-color 0.15s;
}

.th-resizer:hover,
.th-resizer.resizing {
    background-color: #1568f7;
}


/* Компонент сортировки из Figma (3760:66661 / 3846:62194 Sorter) */
.table-header-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* gap-[8px] из Figma 3841-23984 */
    width: 100%;
    height: 36px;
}

.table-sorter {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 16px;
    vertical-align: middle;
    margin-left: auto;
    flex-shrink: 0;
}

.table-sorter .caret-up,
.table-sorter .caret-down {
    width: 10px;
    height: 6px;
    display: block;
    fill: #86909c;
    /* Четкий видимый цвет в нейтральном состоянии */
    transition: fill 0.15s, transform 0.15s;
}

.table-sorter .caret-up {
    margin-bottom: 2px;
}

/* Активное состояние сортировки */
th.sortable[data-sort-dir="asc"] .caret-up {
    fill: #1568f7 !important;
}

th.sortable[data-sort-dir="asc"] .caret-down {
    fill: #c9cdd4 !important;
}

th.sortable[data-sort-dir="desc"] .caret-down {
    fill: #1568f7 !important;
}

th.sortable[data-sort-dir="desc"] .caret-up {
    fill: #c9cdd4 !important;
}

.order-table,
.alt-table {
    width: 100%;
    height: auto;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-family: var(--figma-font);
}

.order-table-container,
.alt-table-scroll-container {
    height: auto;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    overflow-x: auto;
}

.order-table thead,
.order-table tbody,
.alt-table thead,
.alt-table tbody {
    height: auto;
}

.order-table thead tr,
.order-table tbody tr,
.order-table tr,
.alt-table thead tr,
.alt-table tbody tr,
.alt-table tr {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    line-height: 36px !important;
}

.order-table th,
.alt-table th,
.alt-th {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    border: 0.5px solid var(--figma-border);
    color: var(--figma-text-secondary);
    font-weight: 500;
    vertical-align: middle !important;
    background: #fcfcfb !important;
    background-color: #fcfcfb !important;
    box-sizing: border-box;
    white-space: nowrap;
    box-shadow: 0 -2px 0 0 #fcfcfb;
    line-height: 36px !important;
    font-size: 14px;
    padding: 0 8.5px !important;
    text-align: left;
}

.order-table td,
.alt-table td {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    border: 0.5px solid var(--figma-border);
    color: var(--figma-text-dark);
    vertical-align: middle !important;
    background: #ffffff;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 36px !important;
    font-size: 14px;
    padding: 0 8.5px !important;
}

.order-table td.table-checkbox-cell,
.order-table th.table-checkbox-cell,
.order-table td.sticky-col-cart,
.order-table td.sticky-col-actions,
.alt-table td.sticky-col-actions,
.alt-table th.col-actions {
    padding: 0 !important;
}

.order-table td input[type="text"],
.table-cell-input {
    height: 24px !important;
    min-height: 24px !important;
    max-height: 24px !important;
    line-height: 24px !important;
    padding: 0 8px !important;
    margin: 0 !important;
    width: 100% !important;
    background: #f7f7f5 !important;
    border: 1px solid transparent !important;
    border-radius: 4px !important;
    font-family: var(--figma-font);
    font-size: 14px;
    color: #242421;
    outline: none !important;
    box-sizing: border-box;
    display: block;
    cursor: text;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.order-table td input[type="text"]:hover,
.table-cell-input:hover {
    background: #ebebe7 !important;
    border-color: #e8e8e5 !important;
}

.order-table td input[type="text"]:focus,
.table-cell-input:focus {
    background: #ffffff !important;
    border-color: #e8e8e5 !important;
    box-shadow: none !important;
}

.table-cell-input::placeholder {
    color: #a6a6a0;
}


/* Обрезка текста внутри спанов и блоков */
.order-table td>span,
.order-table td:not(.sticky-col-actions)>div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Выпадающие триггеры и капсулы внутри ячеек (Точный компонент Figma 3846:62180 / 3846:62154) */
.table-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    height: 22px;
    padding: 0 8px;
    margin: 0;
    background: #f7f7f5;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    box-sizing: border-box;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--figma-text-dark);
    gap: 4px;
    overflow: hidden;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.table-dropdown-trigger svg {
    flex-shrink: 0;
    color: #7a7a75;
    transition: color 0.15s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-dropdown-trigger:hover {
    background: #ebebe7;
    border-color: #e8e8e5;
    color: #1568f7 !important;
}

.table-dropdown-trigger:hover span {
    color: #1568f7 !important;
}

.table-dropdown-trigger:hover svg {
    color: #1568f7 !important;
}

.table-dropdown-trigger.active,
.table-dropdown-trigger:focus-within {
    background: #ebebe7;
    border-color: #e8e8e5;
    color: #1568f7 !important;
}

.table-dropdown-trigger.active span,
.table-dropdown-trigger:focus-within span {
    color: #1568f7 !important;
}

.table-dropdown-trigger.active svg,
.table-dropdown-trigger:focus-within svg {
    color: #1568f7 !important;
    transform: rotate(180deg) !important;
}

.order-table td:focus-within,
.order-table td.cell-selected {
    box-shadow: none !important;
    background-color: #ffffff !important;
}

.table-dropdown-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    text-align: left;
}

.table-dropdown-trigger svg {
    flex-shrink: 0;
}




.order-table tr:hover td {
    background-color: #fafaf9;
}

/* Анимация плавного удаления строки (Fade-out + slide-out с подсветкой) */
.order-table tr.row-deleting td {
    background-color: #fff0f0 !important;
    color: #d94a4a !important;
    opacity: 0;
    transform: translateX(-16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.order-table tr.row-deleting {
    pointer-events: none;
}


/* Кликабельная область для чекбоксов и плюсика (строго 36x36px по центру) */
.order-table th.table-checkbox-cell {
    position: sticky !important;
    top: 0 !important;
    z-index: 20 !important;
    background: #fcfcfb !important;
    background-color: #fcfcfb !important;
    box-shadow: 0 -2px 0 0 #fcfcfb;
}

.order-table th.table-checkbox-cell,
.order-table td.table-checkbox-cell,
.table-checkbox-cell {
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 37px !important;
    text-align: center !important;
    padding: 0 !important;
    cursor: pointer;
    user-select: none;
    vertical-align: middle !important;
}

.table-checkbox-cell:hover {
    background-color: #f7f7f5 !important;
}

.table-checkbox-cell label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 auto;
    cursor: pointer;
}

.add-plus-cell-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: 0 auto;
}

.add-plus-cell-wrapper svg {
    display: block;
    margin: 0 auto;
}

/* Строка «Добавить товар» (3663:198732) */
.table-row-add-product {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    line-height: 36px !important;
    cursor: pointer;
    background: #ffffff;
    transition: background-color 0.15s ease;
}

.table-row-add-product td {
    background: #ffffff !important;
    border-bottom: 0.5px solid var(--figma-border) !important;
    border-top: 0.5px solid var(--figma-border) !important;
    transition: background-color 0.15s ease;
}

.table-row-add-product td.table-checkbox-cell {
    background: #ffffff !important;
    border-right: 0.5px solid var(--figma-border) !important;
}

.table-row-add-product td.add-product-label-cell {
    color: #1568f7;
    font-weight: 500;
    font-size: 14px;
    font-family: var(--figma-font);
    padding-left: 10px !important;
    text-align: left;
}

.table-row-add-product:hover td {
    background-color: #f7f7f5 !important;
}

.table-row-add-product:hover td.table-checkbox-cell {
    background-color: #f7f7f5 !important;
}

.table-checkbox-cell input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #1568f7;
    margin: 0;
}


/* Колонка действий в главной таблице (только кнопка Убрать) */
.order-table:not(.alt-table) td.sticky-col-actions {
    position: sticky !important;
    right: 0 !important;
    width: 85px !important;
    min-width: 85px !important;
    max-width: 85px !important;
    text-align: right;
    padding-left: 8px !important;
    padding-right: 8.5px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 0.5px solid var(--figma-border);
    box-sizing: border-box;
    overflow: visible !important;
    z-index: 10 !important;
}

.order-table:not(.alt-table) th.sticky-col-actions,
.order-table:not(.alt-table) th.col-actions {
    position: sticky !important;
    top: 0 !important;
    right: 0 !important;
    background: #fcfcfb !important;
    background-color: #fcfcfb !important;
    text-align: right;
    width: 85px !important;
    min-width: 85px !important;
    max-width: 85px !important;
    z-index: 30 !important;
    border: 0.5px solid var(--figma-border);
    box-shadow: 0 -2px 0 0 #fcfcfb;
}

.order-table td.sticky-col-actions>div {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    overflow: visible !important;
}

/* Липкая колонка «В корзину» перед колонкой действий */
.order-table:not(.alt-table) td.sticky-col-cart {
    position: sticky !important;
    right: 85px !important;
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    padding: 0 2px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 0.5px solid var(--figma-border);
    z-index: 10 !important;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
    box-shadow: none;
    transition: box-shadow 0.15s ease;
}

.order-table:not(.alt-table) th.col-cart,
.order-table:not(.alt-table) th[data-sort-key="cart"] {
    position: sticky !important;
    top: 0 !important;
    right: 85px !important;
    background: #fcfcfb !important;
    background-color: #fcfcfb !important;
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    text-align: center;
    z-index: 30 !important;
    border: 0.5px solid var(--figma-border);
    box-shadow: 0 -2px 0 0 #fcfcfb;
    transition: box-shadow 0.15s ease;
}

/* Колонка «Действия» в таблице альтернатив */
.alt-table td.sticky-col-actions {
    position: sticky !important;
    right: 0 !important;
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    text-align: right;
    padding: 0 8.5px !important;
    background: #ffffff !important;
    border: 0.5px solid var(--figma-border) !important;
    box-shadow: none !important;
    z-index: 10 !important;
}

.alt-table th.col-actions,
.alt-table th.sticky-col-actions {
    position: sticky !important;
    top: 0 !important;
    right: 0 !important;
    background: #fcfcfb !important;
    text-align: right;
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
    z-index: 30 !important;
    border: 0.5px solid var(--figma-border) !important;
    box-shadow: 0 -2px 0 0 #fcfcfb !important;
}

/* Тень появляется ТОЛЬКО для главной таблицы и истории заказов при скролле влево под правую панель */
.order-table-container.has-right-overflow .order-table:not(.alt-table) td.sticky-col-cart,
.order-history-table-container.has-right-overflow .order-history-table td.sticky-col-cart {
    border-left: 0.5px solid transparent !important;
    box-shadow: -6px 0 16px -2px rgba(0, 0, 0, 0.16), -2px 0 6px -1px rgba(0, 0, 0, 0.08) !important;
}

.order-table-container.has-right-overflow .order-table:not(.alt-table) th.col-cart,
.order-table-container.has-right-overflow .order-table:not(.alt-table) th[data-sort-key="cart"] {
    border-left: 0.5px solid transparent !important;
    box-shadow: -6px 0 16px -2px rgba(0, 0, 0, 0.16), 0 -2px 0 0 #fcfcfb !important;
}

.order-table-container.has-right-overflow.is-scrolled .order-table:not(.alt-table) th.col-cart,
.order-table-container.has-right-overflow.is-scrolled .order-table:not(.alt-table) th[data-sort-key="cart"] {
    border-left: 0.5px solid transparent !important;
    box-shadow: -6px 0 16px -2px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.08), 0 -2px 0 0 #fcfcfb !important;
}

/* Степпер добавления в корзину (кнопки прижаты к краям ячейки с отступами 2px) */
.cart-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 24px;
    box-sizing: border-box;
    padding: 0;
}

.cart-stepper-btn {
    width: 24px;
    height: 24px;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 4px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1568f7;
    padding: 0;
    margin: 0;
    transition: background 0.15s, transform 0.1s;
    flex-shrink: 0;
    outline: none;
}

.cart-stepper-btn svg {
    stroke: #1568f7 !important;
    color: #1568f7 !important;
}

.cart-stepper-btn:hover {
    background: #f7f7f5 !important;
}

.cart-stepper-btn:active {
    transform: scale(0.92);
}

.cart-stepper-val {
    flex: 1;
    text-align: center;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #242421;
    /* Основной темный цвет цифры по макету */
    user-select: none;
}

/* Кнопки действий по точной спецификации Figma 3846:62184 / 3663:199309 (белая плашка с мягкой тенью) */
.table-action-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 0.5px solid rgba(0, 0, 0, 0.04) !important;
    border-radius: 4px;
    box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.08), 0px 1px 6px 0px rgba(0, 0, 0, 0.05) !important;
    padding: 0 6px;
    height: 22px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #242421;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
    user-select: none;
    box-sizing: border-box;
    outline: none;
    white-space: nowrap;
}

.table-action-tag:hover {
    opacity: 0.9;
    box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12), 0px 1px 4px 0px rgba(0, 0, 0, 0.08) !important;
}

.table-action-tag:active {
    transform: translateY(0.5px);
    opacity: 0.8;
}

.table-action-tag.danger {
    color: #d94a4a !important;
}

.table-action-tag.danger:hover {
    opacity: 0.9;
    box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.12), 0px 1px 4px 0px rgba(0, 0, 0, 0.08) !important;
}

.table-action-tag.danger:active {
    transform: translateY(0.5px);
    opacity: 0.8;
}






/* Счетчик "В корзину" (3663:198707) */
.cart-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 4px;
}

.cart-stepper-btn {
    width: 32px;
    height: 32px;
    background: var(--figma-fill-subtle);
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--figma-text-dark);
    transition: background 0.15s;
}

.cart-stepper-btn:hover {
    background: #ebebe7;
}

.cart-stepper-val {
    flex: 1;
    text-align: center;
    font-family: var(--figma-font);
    font-size: 14px;
    color: var(--figma-text-dark);
}

/* Строка "+ Добавить товар" внизу таблицы (3663:198732) */
.table-row-add-product {
    height: 36px;
    background: #ffffff;
    cursor: pointer;
}

.table-row-add-product:hover {
    background: #f7f9ff !important;
}

.table-row-add-product td {
    color: #1568f7;
    font-weight: 500;
}


/* Анимация вращения спиннера на 360° */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.spinner-icon {
    animation: spin 1s linear infinite;
    transform-origin: center center;
}

/* Прогресс-бар загрузки */
.upload-progress-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
    margin: 40px auto;
}

.progress-bar-track {
    width: 100%;
    height: 8px;
    background: #e8e8e5;
    border-radius: 99px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #2f7dff, #1568f7);
    border-radius: 99px;
    transition: width 0.1s linear;
}

/* Плавающая плашка массовых действий (3783:195086) - закреплена поверх таблицы */
#bulkActionsContainer {
    position: absolute;
    bottom: 60px;
    /* Отступ над футером таблицы */
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
    display: none;
    justify-content: center;
}

.bulk-actions-bar {
    background: #242421;
    height: 40px;
    padding: 4px 12px;
    border-radius: 8px;
    box-shadow: 0px 4px 20px 0px rgba(0, 0, 0, 0.25), 0px 2px 6px 0px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--figma-font);
    font-size: 14px;
    color: #ffffff;
    box-sizing: border-box;
    pointer-events: auto;
}

/* Анимация появления: 240ms cubic-bezier(0.16, 1, 0.3, 1) */
.bulk-actions-bar.animate-in {
    animation: bulkBarSlideIn 240ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Анимация скрытия: 200ms cubic-bezier(0.4, 0, 0.2, 1) */
.bulk-actions-bar.animate-out {
    animation: bulkBarSlideOut 200ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes bulkBarSlideIn {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bulkBarSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
}



.bulk-actions-bar .divider {
    width: 1px;
    height: 16px;
    background: #4f4f4b;
}

.bulk-actions-bar .link-btn {
    background: none;
    border: none;
    color: #b9d2ff;
    /* primary/3 */
    cursor: pointer;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s, transform 0.1s;
    user-select: none;
}

/* Состояние Hover (3783:195118) */
.bulk-actions-bar .link-btn:hover {
    color: #e0ecff;
    /* Осветление при наведении */
    background-color: rgba(255, 255, 255, 0.08);
}

/* Состояние Pressed (3783:195121) */
.bulk-actions-bar .link-btn:active {
    color: #8cb6ff;
    /* Насыщенный синий при клике */
    background-color: rgba(255, 255, 255, 0.14);
    transform: scale(0.97);
}

/* Кнопка "Убрать из заявки" (danger) */
.bulk-actions-bar .link-btn.danger {
    color: #f8bfc0;
    /* danger/3 */
}

/* Danger Hover */
.bulk-actions-bar .link-btn.danger:hover {
    color: #ffe0e0;
    background-color: rgba(248, 191, 192, 0.12);
}

/* Danger Pressed */
.bulk-actions-bar .link-btn.danger:active {
    color: #f38b8d;
    background-color: rgba(248, 191, 192, 0.2);
    transform: scale(0.97);
}


/* Бейдж общей суммы заказа (3659:115812) с плавной анимацией цифр */
.figma-total-badge {
    background: #f7f7f5;
    border-radius: 4px;
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--figma-font);
    font-size: 14px;
    box-sizing: border-box;
    user-select: none;
}

.figma-total-badge .label {
    color: var(--figma-text-secondary);
}

.figma-total-badge .value {
    color: var(--figma-text-dark);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.figma-total-badge .value.val-updated {
    animation: numberPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes numberPop {
    0% {
        transform: translateY(-4px) scale(1.05);
        color: #1568f7;
    }

    100% {
        transform: translateY(0) scale(1);
        color: var(--figma-text-dark);
    }
}

.column-settings-popover {
    position: absolute;
    background: #ffffff;
    border: 1px solid var(--figma-border);
    border-radius: 8px;
    box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
    width: 280px;
    z-index: 1100;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: dropdownFadeIn 0.15s ease-out;
}

.column-settings-popover.active {
    display: flex;
}

.column-settings-header {
    background: #fcfcfb;
    padding: 7px 12px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: var(--figma-text-dark);
    border-bottom: 0.5px solid var(--figma-border);
}

.column-settings-list {
    display: flex;
    flex-direction: column;
    max-height: 380px;
    overflow-y: auto;
}

.column-setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7.5px 12.5px;
    border-bottom: 0.5px solid #f2f2ef;
    font-family: var(--figma-font);
    font-size: 14px;
    color: var(--figma-text-dark);
    user-select: none;
    cursor: pointer;
    transition: background-color 0.12s;
}

.column-setting-item:hover {
    background-color: #fafaf9;
}

.column-setting-item:last-child {
    border-bottom: none;
}

/* Компактный переключатель (switch) для списка колонок */
.mini-toggle {
    position: relative;
    width: 28px;
    height: 16px;
    display: inline-block;
    cursor: pointer;
}

.mini-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mini-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #c9cdd4;
    transition: 0.2s;
    border-radius: 24px;
}

.mini-toggle-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15);
    transition: 0.2s;
    border-radius: 50%;
}

.mini-toggle input:checked+.mini-toggle-slider {
    background-color: #1568f7;
}

.mini-toggle input:checked+.mini-toggle-slider:before {
    transform: translateX(12px);
}



@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.figma-dropdown-popover {
    position: absolute;
    background: #ffffff;
    border: 1px solid var(--figma-border);
    border-radius: 8px;
    box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.1);
    min-width: 140px;
    max-width: none;
    box-sizing: border-box;
    z-index: 1100;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: dropdownFadeIn 0.15s ease-out;
}


.figma-dropdown-popover.active {
    display: flex;
}

.dropdown-search-header {
    padding: 6px;
    border-bottom: 1px solid #f2f2ef;
}

.dropdown-search-input {
    width: 100%;
    height: 28px;
    background: #f7f7f5;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0 8px;
    font-family: var(--figma-font);
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.dropdown-search-input:focus {
    background: #ffffff;
    border-color: #1568f7;
}

/* Состояние "Ничего не найдено" (Точный узел 3653:107119) */
.dropdown-empty-state {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    font-family: var(--figma-font);
    font-size: 14px;
    color: #7a7a75;
    background: #ffffff;
}

.dropdown-empty-state svg {
    flex-shrink: 0;
    color: #7a7a75;
}

/* Кнопка "Добавить поставщика" внизу поповера (3653:107123) */
.dropdown-bottom-action {
    display: none;
    padding: 4px;
    background: #ffffff;
    border-top: 1px solid #f2f2ef;
}

.dropdown-btn-add-supplier {
    width: 100%;
    height: 32px;
    background: #f7f7f5;
    border: none;
    border-radius: 4px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    color: #242421;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s;
}

.dropdown-btn-add-supplier:hover {
    background: #ebebe7;
}

.dropdown-list-items {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 2px 0;
    scrollbar-width: thin;
    scrollbar-color: #c9cdd4 transparent;
}

.dropdown-list-items::-webkit-scrollbar {
    width: 6px;
}

.dropdown-list-items::-webkit-scrollbar-track {
    background: transparent;
}

.dropdown-list-items::-webkit-scrollbar-thumb {
    background: #c9cdd4;
    border-radius: 99px;
}

.dropdown-list-items::-webkit-scrollbar-thumb:hover {
    background: #a6a6a0;
}

.dropdown-list-item {
    height: 32px;
    min-height: 32px;
    padding: 0 12px;
    font-family: var(--figma-font);
    font-size: 14px;
    line-height: 32px;
    color: var(--figma-text-dark);
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.12s;
    user-select: none;
    box-sizing: border-box;
}

.dropdown-list-item:hover {
    background-color: #f7f7f5;
}

.dropdown-list-item.selected {
    background-color: #f0f5ff;
    color: #1568f7;
    font-weight: 500;
}

/* === Всплывающий Пуш / Toast Notification об успешном создании компании === */
.toast-notification {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #ffffff;
    border: 1px solid #e8e8e5;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.12), 0px 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
    font-family: var(--figma-font);
}

.toast-notification.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.toast-icon-success {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8f7ec;
    color: #2e7d32;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon-warning {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff8e1;
    color: #f57c00;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-icon-danger,
.toast-icon-error {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fdecea;
    color: #d32f2f;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


.toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #242421;
}

.toast-desc {
    font-size: 13px;
    color: #7a7a75;
}

/* Стили для таблицы альтернативных товаров (3663:202535) */
.alt-table-container {
    border: 1px solid var(--figma-border);
    border-radius: 12px;
    background: #f7f7f5;
    overflow: hidden;
    margin: 16px;
}

.alt-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--figma-font);
    font-size: 14px;
    background: #ffffff;
}

.alt-table th.alt-th {
    background: #ffffff;
    height: 36px !important;
    padding: 0 8.5px !important;
    line-height: 22px;
    vertical-align: middle;
    border: 0.5px solid var(--figma-border);
    color: var(--figma-text-secondary);
    font-weight: 500;
    white-space: nowrap !important;
    user-select: none;
    box-sizing: border-box;
}

.alt-table .table-header-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 36px;
    white-space: nowrap !important;
}

.alt-table th.alt-th.sortable {
    cursor: pointer;
    user-select: none;
}

.alt-table th.alt-th.sortable:hover {
    background-color: #fafaf9;
}

.alt-table tbody tr {
    height: 37px !important;
    border-bottom: 0.5px solid var(--figma-border);
    transition: background-color 0.15s;
}

.alt-table tbody tr:hover {
    background-color: #f7f7f5;
}

.alt-table td {
    height: 37px !important;
    padding: 0 8.5px !important;
    border: 0.5px solid var(--figma-border);
    box-sizing: border-box;
    font-size: 14px;
    line-height: 22px;
    vertical-align: middle;
}

.alt-table td.sticky-col-actions {
    position: sticky;
    right: 0;
    width: 129px;
    min-width: 129px;
    max-width: 129px;
    text-align: right;
    padding: 0 8.5px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: 0.5px solid var(--figma-border);
    box-sizing: border-box;
    overflow: visible !important;
    z-index: 20;
}

.alt-table th.col-actions {
    position: static !important;
    text-align: right;
    width: 129px;
    min-width: 129px;
    z-index: 1;
}

/* Кнопки «Выбрать» и «Выбрано» в таблице альтернатив (Figma 3663:202535 / 3846:62515) с выраженной тенью */
.alt-table .alt-btn-select {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-radius: 4px;
    border: 0.5px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0px 2px 8px 0px rgba(0, 0, 0, 0.16), 0px 1px 3px 0px rgba(0, 0, 0, 0.1) !important;
    padding: 1px 8px;
    height: 24px;
    color: #1568f7;
    font-weight: 500;
    font-family: var(--figma-font);
    font-size: 14px;
    line-height: 22px;
    cursor: pointer;
    transition: opacity 0.15s, box-shadow 0.15s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: none;
    white-space: nowrap;
}

.alt-table .alt-btn-select.selected {
    color: #7a7a75;
}

.alt-table .alt-btn-select:hover {
    opacity: 0.92;
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.22), 0px 2px 4px 0px rgba(0, 0, 0, 0.12) !important;
}

.alt-table .alt-btn-select:active {
    transform: translateY(0.5px);
    opacity: 0.8;
}

.alt-table .alt-btn-select:hover {
    opacity: 0.85;
}

.alt-table .alt-btn-select.selected {
    color: #7a7a75;
    cursor: default;
    background: #ffffff;
}

/* Кнопка с градиентом из Figma (3663:200896) */
.figma-btn-gradient {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 20px;
    background: linear-gradient(180deg, #2f7dff 0%, #1568f7 100%);
    color: #ffffff;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    border: none;
    border-radius: 4px !important;
    cursor: pointer;
    box-shadow: 0px 4px 10px 0px rgba(21, 104, 247, 0.15), inset 0px 1px 0px 0px rgba(255, 255, 255, 0.28);
    transition: filter 0.15s, transform 0.1s;
    outline: none;
}

.figma-btn-gradient:hover {
    filter: brightness(1.05);
}

.figma-btn-gradient:active {
    transform: translateY(1px);
    filter: brightness(0.95);
}

.figma-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 36px;
    padding: 0 16px;
    background: #ffffff;
    color: #242421;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--figma-border);
    border-radius: 4px !important;
    cursor: pointer;
    transition: background 0.15s;
}

.figma-btn-secondary:hover {
    background: #f7f7f5;
}

/* === Step Slider & Step 2 Layout (Figma 3763:157813) === */
.order-steps-viewport {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
    display: block;
}

.order-steps-track {
    display: flex;
    width: 200%;
    min-width: 200%;
    max-width: 200%;
    height: 100%;
    min-height: 100%;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.order-steps-track.show-step-2 {
    transform: translateX(-50%);
}

.order-step-pane {
    width: 50%;
    min-width: 50%;
    max-width: 50%;
    flex: 0 0 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
}

/* Step 2 Two-Column Layout (Exact Figma 3779:169185) */
.step2-layout {
    display: flex;
    gap: 12px;
    padding: 12px;
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    background: #ffffff;
}

.step2-suppliers-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.step2-details-column {
    width: 415px;
    min-width: 415px;
    max-width: 415px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Supplier Card (Exact Figma 3779:169187 / 3779:169289 / 3779:169389) */
.supplier-group-card {
    background: #f7f7f5;
    border-radius: 8px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
}

.supplier-card-header {
    background: #ffffff;
    border-radius: 4px;
    padding: 8px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
}

.supplier-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.supplier-collapse-trigger {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
    color: #242421;
    cursor: pointer;
    background: transparent;
    transition: background-color 0.15s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.15s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.supplier-collapse-trigger:hover {
    background-color: #f0f0ed;
    color: #1568f7;
}

.supplier-collapse-trigger:active {
    background-color: #e8e8e5;
    transform: scale(0.96);
}

.supplier-card-title {
    font-family: var(--figma-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: #242421;
    text-decoration: underline;
    text-decoration-color: currentColor;
    cursor: pointer;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.supplier-card-title:hover {
    color: #1568f7;
    text-decoration-color: #1568f7;
}

.supplier-card-separator {
    font-family: var(--figma-font);
    font-size: 13px;
    font-weight: 600;
    line-height: 22px;
    color: #dcdcd8;
}

.supplier-card-value {
    font-family: var(--figma-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: #242421;
}

.supplier-badge-container {
    display: inline-flex;
    align-items: center;
    padding-left: 8px;
}

.supplier-card-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.supplier-badge {
    border-radius: 4px;
    font-family: var(--figma-font);
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
}

.supplier-badge.subtle {
    background: #f7f7f5;
    height: 32px;
    padding: 0 12px;
    font-size: 14px;
    line-height: 22px;
    gap: 8px;
}

.supplier-badge.subtle .label {
    color: #7a7a75;
    font-weight: 400;
}

.supplier-badge.subtle .val {
    color: #242421;
    font-weight: 500;
}

.supplier-badge.warning {
    background: #fdefc7;
    color: #242421;
    height: 24px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 22px;
}

.supplier-badge.danger {
    background: #d94a4a;
    color: #ffffff;
    height: 24px;
    padding: 0 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 22px;
}

.supplier-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.supplier-action-icon-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e8e8e5;
    border-radius: 4px;
    color: #242421;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s, border-color 0.15s;
}

.supplier-action-icon-btn:hover {
    background: #f7f7f5;
}

/* Supplier Items List with Deceleration Animation (Exact Figma 3779:169216 / 3779:169320) */
.supplier-items-card {
    background: #f7f7f5;
    padding: 0 12px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    max-height: 800px;
    opacity: 1;
    transform: translateY(0);
    transform-origin: top center;
    transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}



.supplier-collapse-trigger svg {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Свернутое состояние карточки поставщика с плавным замедлением к концу */
.supplier-group-card.collapsed .supplier-items-card {
    max-height: 0 !important;
    opacity: 0;
    transform: translateY(-6px);
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    pointer-events: none;
}

.supplier-group-card.collapsed .supplier-collapse-trigger svg {
    transform: rotate(-90deg) !important;
}

.supplier-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    min-height: 60px;
    border-bottom: 1px solid #e8e8e5;
    gap: 12px;
    box-sizing: border-box;
}

.supplier-item-row:last-child {
    border-bottom: none;
}

.supplier-item-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
}

.supplier-item-thumb {
    width: 44px;
    height: 44px;
    border-radius: 4px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.supplier-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* Колонка названия товара: строго 412px (по Figma 3779:169348) */
.supplier-item-title {
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #242421;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 412px;
    min-width: 412px;
    max-width: 412px;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Колонка комментария: строго 412px (по Figma 3779:169349), начинается с X=456px */
.supplier-item-add-comment {
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    height: 28px;
    color: #1568f7;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
    width: 412px;
    min-width: 412px;
    max-width: 412px;
    text-align: left;
    transition: opacity 0.15s, background-color 0.15s;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.supplier-item-add-comment:hover {
    background-color: rgba(21, 104, 247, 0.06);
    opacity: 0.9;
}

.supplier-item-comment-input {
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    height: 28px;
    padding: 4px 8px;
    border: 1px solid #1568f7;
    border-radius: 4px;
    outline: none;
    width: 380px;
    min-width: 200px;
    max-width: 412px;
    box-sizing: border-box;
    background: #ffffff;
    color: #242421;
    box-shadow: 0 0 0 2px rgba(21, 104, 247, 0.15);
    flex-shrink: 0;
}

.supplier-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.supplier-item-price-unit {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    width: 167px;
    font-family: var(--figma-font);
    font-size: 14px;
    line-height: 22px;
    white-space: nowrap;
    padding: 0 8px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.supplier-item-price-unit .price-val {
    width: 95px;
    min-width: 95px;
    text-align: right;
    font-weight: 500;
    color: #242421;
    flex-shrink: 0;
}

.supplier-item-price-unit.empty {
    visibility: hidden;
}

.supplier-item-price-unit .unit {
    width: 52px;
    min-width: 52px;
    color: #7a7a75;
    font-weight: 400;
    white-space: nowrap;
    flex-shrink: 0;
    text-align: left;
}

.supplier-item-stepper {
    width: 132px;
    height: 32px;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    box-sizing: border-box;
    overflow: hidden;
}

.supplier-stepper-btn {
    width: 30px;
    height: 30px;
    background: transparent;
    border-radius: 0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1568F7;
    transition: background-color 0.15s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.15s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.supplier-stepper-btn:hover {
    background-color: #f7f7f5;
    color: #1052c7;
}

.supplier-stepper-btn:active {
    background-color: #ebebe8;
    transform: scale(0.94);
}

.supplier-stepper-val {
    flex: 1;
    text-align: center;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #242421;
    white-space: nowrap;
}

.supplier-item-total-price {
    width: 111px;
    text-align: center;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #242421;
    white-space: nowrap;
    padding: 0 8px;
    box-sizing: border-box;
}

.supplier-item-total-price.empty {
    visibility: hidden;
}

.supplier-item-delete-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4f4f4b;
    cursor: pointer;
    box-sizing: border-box;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.supplier-item-delete-btn:hover {
    color: #f5222d;
    border-color: #f5222d;
    background: #fff1f0;
}

/* Supplier Card Bottom (Delivery & Payment - Exact Figma 3779:169269) */
.supplier-card-bottom {
    background: #ffffff;
    border-radius: 4px;
    padding: 8px 12px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.delivery-type-toggle {
    display: inline-flex;
    align-items: center;
    background: #f7f7f5;
    padding: 4px;
    border-radius: 4px;
    gap: 4px;
    box-sizing: border-box;
}

.delivery-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #7a7a75;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
    user-select: none;
    white-space: nowrap;
}

.delivery-tab-btn svg {
    flex-shrink: 0;
    display: block;
    transition: transform 0.15s ease;
}

.delivery-tab-btn:hover {
    color: #242421;
}

.delivery-tab-btn.active {
    background: #ffffff;
    color: #1568f7;
    box-shadow: 0px 2px 12px 0px rgba(63, 63, 50, 0.04), 0px 2px 2px 0px rgba(63, 63, 50, 0.04);
}

.payment-type-group {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.payment-type-label {
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #242421;
    white-space: nowrap;
}

.payment-type-wrapper {
    position: relative;
    display: inline-block;
}

.payment-type-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    height: 36px;
    width: 220px;
    padding: 0 12px;
    background: #ffffff;
    border: 1px solid #e8e8e5;
    border-radius: 4px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #242421;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.payment-type-dropdown-trigger:hover {
    border-color: #dcdcd8;
}

.payment-type-dropdown-trigger.open {
    border-color: #1568F7;
    box-shadow: 0 0 0 2px rgba(21, 104, 247, 0.12);
}

.payment-type-dropdown-trigger svg {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    color: #7a7a75;
}

.payment-type-dropdown-trigger.open svg {
    transform: rotate(180deg);
    color: #1568F7;
}

.payment-type-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 220px;
    background: #ffffff;
    border: 1px solid #e8e8e5;
    border-radius: 4px;
    box-shadow: 0px 8px 24px 0px rgba(0, 0, 0, 0.12), 0px 2px 6px 0px rgba(0, 0, 0, 0.06);
    z-index: 1050;
    padding: 4px 0;
    display: flex;
    flex-direction: column;
    animation: dropdownMenuFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.payment-type-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    font-family: var(--figma-font);
    font-size: 14px;
    line-height: 20px;
    color: #242421;
    transition: background-color 0.12s;
    box-sizing: border-box;
}

.payment-type-item:hover {
    background-color: #f7f7f5;
}

.payment-type-item.selected {
    background-color: #eff5ff;
    color: #1568F7;
    font-weight: 500;
}

.payment-type-item .item-check {
    color: #1568F7;
    flex-shrink: 0;
}

/* Sidebar Details Cards (Exact Figma 3779:169438) */
.step2-search-card {
    background: #f7f7f5;
    border-radius: 8px;
    padding: 4px;
    box-sizing: border-box;
}

.step2-search-inner {
    height: 48px;
    background: #ffffff;
    border-radius: 4px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.step2-search-inner input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-family: var(--figma-font);
    font-size: 14px;
    color: #242421;
}

.step2-search-inner input::placeholder {
    color: #7a7a75;
}

.step2-details-card {
    background: #f7f7f5;
    border-radius: 8px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-sizing: border-box;
}

.step2-inner-card {
    background: #ffffff;
    border-radius: 4px;
    padding: 8px 12px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.step2-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid #e8e8e5;
    min-height: 32px;
    box-sizing: border-box;
}

.step2-card-title {
    font-family: var(--figma-font);
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: #242421;
}

.step2-add-contact-btn {
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #1568f7;
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: opacity 0.15s;
}

.step2-add-contact-btn:hover {
    opacity: 0.8;
}

.step2-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.step2-form-label {
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #7a7a75;
}

.step2-form-input-trigger {
    height: 36px;
    background: #ffffff;
    border: 1px solid #e8e8e5;
    border-radius: 4px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #242421;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    user-select: none;
}

.step2-form-input-trigger:hover {
    border-color: #c9cdd4;
}

.step2-form-input-trigger.active {
    border-color: #1568f7;
    box-shadow: 0 0 0 2px rgba(21, 104, 247, 0.15);
}

.step2-form-input-trigger.active .dropdown-arrow-icon {
    transform: rotate(180deg);
}

.step2-form-input-trigger .dropdown-arrow-icon {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.step2-contact-row {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 32px;
    width: 100%;
    box-sizing: border-box;
}

.step2-contact-label {
    width: 120px;
    min-width: 120px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #7a7a75;
}

.step2-contact-input {
    flex: 1;
    height: 32px;
    background: #ffffff;
    border: 1px solid #e8e8e5;
    border-radius: 4px;
    padding: 5px 12px;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    color: #242421;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.step2-contact-input:focus {
    border-color: #1568f7;
    box-shadow: 0 0 0 2px rgba(21, 104, 247, 0.15);
}

.step2-contact-input::placeholder {
    color: #a6a6a0;
    font-weight: 500;
}

/* ==========================================================================
   Страница: История заказов (Figma 3761:137303)
   ========================================================================== */

.orders-main-content {
    padding: 0 16px 24px 16px !important;
}

.orders-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 12px 0;
    background: transparent;
}

.orders-page-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.orders-page-title {
    font-family: var(--figma-font);
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: #242421;
}

.orders-gear-btn {
    width: 28px;
    height: 28px;
    background: #f7f7f5;
    border: none;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #7a7a75;
    transition: background 0.15s, color 0.15s;
}

.orders-gear-btn:hover {
    background: #ebebe7;
    color: #1568f7;
}

.orders-page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.orders-automation-btn {
    height: 36px;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    background: #ffffff;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 400;
    color: #242421;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.orders-automation-btn:hover {
    background: #f7f7f5;
    border-color: #dcdcd8;
}

.orders-create-btn {
    height: 36px;
    background: linear-gradient(180deg, #2f7dff 0%, #1568f7 100%);
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    cursor: pointer;
    box-shadow: 0px 4px 10px 0px rgba(21, 104, 247, 0.15), inset 0px 1px 0px 0px rgba(255, 255, 255, 0.28);
    transition: filter 0.15s;
}

.orders-create-btn:hover {
    filter: brightness(1.05);
}

/* Панель фильтров (Subheader) */
.orders-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 16px 0;
    gap: 16px;
}

.orders-subheader-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.orders-search-box {
    position: relative;
    width: 380px;
    height: 36px;
}

.orders-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a7a75;
    pointer-events: none;
}

.orders-search-input {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    padding: 0 12px 0 36px;
    font-family: var(--figma-font);
    font-size: 14px;
    color: #242421;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.orders-search-input:focus {
    border-color: #1568f7;
    box-shadow: 0 0 0 2px rgba(21, 104, 247, 0.15);
}

.orders-search-input::placeholder {
    color: #7a7a75;
}

.orders-filter-dropdown {
    height: 36px;
    background: #ffffff;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--figma-font);
    font-size: 14px;
    color: #242421;
    box-sizing: border-box;
    transition: background 0.15s, border-color 0.15s;
}

.orders-filter-dropdown:hover {
    background: #f7f7f5;
}

.orders-filter-dropdown svg {
    color: #7a7a75;
}

.orders-add-condition-btn {
    height: 36px;
    background: #ffffff;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-family: var(--figma-font);
    font-size: 14px;
    color: #242421;
    box-sizing: border-box;
    transition: background 0.15s;
}

.orders-add-condition-btn:hover {
    background: #f7f7f5;
}

.orders-subheader-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.orders-control-btn {
    height: 36px;
    background: #ffffff;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: var(--figma-font);
    font-size: 14px;
    color: #242421;
    box-sizing: border-box;
    transition: background 0.15s;
}

.orders-control-btn:hover {
    background: #f7f7f5;
}

.orders-control-btn svg {
    color: #7a7a75;
}

/* Карточка группы заказов (Order Group Card History) */
.order-group-card-history {
    background: #f7f7f5;
    border-radius: 8px;
    padding: 4px;
    border: 1px solid var(--figma-border);
    box-sizing: border-box;
    transition: margin-bottom 0.2s;
}

.order-history-card-header {
    height: 48px;
    background: #ffffff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px 0 8px;
    box-sizing: border-box;
}

.order-history-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-id-val {
    font-family: var(--figma-font);
    font-size: 14px;
    font-weight: 500;
    color: #242421;
}

.order-history-badges-left {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.badge-status {
    font-family: var(--figma-font);
    font-size: 13px;
    line-height: 20px;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
}

.badge-status.badge-warning {
    background: #fdefc7;
    color: #242421;
}

.badge-status.badge-neutral {
    background: #f7f7f5;
    color: #242421;
    font-weight: 400;
}

.badge-status.badge-success {
    background: #e6f7ea;
    color: #1f7a37;
}

.badge-status.badge-info {
    background: #e8f3ff;
    color: #1568f7;
}

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

.order-history-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-change-supplier {
    height: 32px;
    background: linear-gradient(180deg, #2f7dff 0%, #1568f7 100%);
    border: none;
    border-radius: 4px;
    color: #ffffff;
    font-family: var(--figma-font);
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    cursor: pointer;
    box-shadow: 0px 4px 10px 0px rgba(21, 104, 247, 0.15), inset 0px 1px 0px 0px rgba(255, 255, 255, 0.28);
    transition: filter 0.15s;
}

.btn-change-supplier:hover {
    filter: brightness(1.05);
}

.order-badge-box {
    height: 32px;
    background: #f7f7f5;
    border-radius: 4px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--figma-font);
    font-size: 13px;
    white-space: nowrap;
}

.order-badge-box .label {
    color: #7a7a75;
    font-weight: 400;
}

.order-badge-box .val {
    color: #242421;
    font-weight: 500;
}

.order-menu-dots-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: 1px solid var(--figma-border);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4f4f4b;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.order-menu-dots-btn:hover {
    background: #f7f7f5;
    color: #1568f7;
}

/* Таблица истории заказов */
.order-history-table-container {
    margin-top: 4px;
    background: #ffffff;
    border-radius: 4px;
    border: 0.5px solid var(--figma-border);
    overflow-x: auto;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.order-group-card-history.collapsed .order-history-table-container {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    border: none;
}

.order-group-card-history.collapsed .supplier-collapse-trigger svg {
    transform: rotate(-90deg);
}

.order-history-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--figma-font);
    font-size: 14px;
    color: #242421;
    text-align: left;
}

.order-history-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 36px;
    background: #fcfcfb;
    border-bottom: 0.5px solid var(--figma-border);
    border-right: 0.5px solid var(--figma-border);
    padding: 0 8.5px;
    font-weight: 400;
    color: #4f4f4b;
    white-space: nowrap;
    box-sizing: border-box;
}

.order-history-table th:last-child {
    border-right: none;
}

.order-history-table td {
    height: 37px;
    border-bottom: 0.5px solid var(--figma-border);
    border-right: 0.5px solid var(--figma-border);
    padding: 0 8.5px;
    font-size: 14px;
    line-height: 22px;
    white-space: nowrap;
    box-sizing: border-box;
}

.order-history-table td:last-child {
    border-right: none;
}

.order-history-table tr:last-child td {
    border-bottom: none;
}

.order-history-table .th-cb,
.order-history-table .td-cb {
    width: 36px;
    text-align: center;
    padding: 0;
}

.th-sort-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}

.th-sort-wrapper .sorter {
    font-size: 11px;
    color: #a6a6a0;
}

/* Статус заказа в ячейке таблицы */
.order-stage-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 240px;
    height: 24px;
    background: #f7f7f5;
    border-radius: 4px;
    padding: 0 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #1568f7;
    box-sizing: border-box;
    transition: background 0.15s;
}

.order-stage-trigger:hover {
    background: #ebebe7;
}

.order-stage-trigger svg {
    color: #1568f7;
}