/* ===== МОДАЛКА ЗАКАЗА — современный стиль ===== */
.order-modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    overflow: hidden;
}

.order-modal-dialog {
    max-width: min(1160px, calc(100vw - 2rem));
}

.order-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.order-modal-title {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
}

.order-modal-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #ede9fe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: .95rem;
    flex-shrink: 0;
}

.order-modal-body {
    padding: 1.1rem 1.5rem;
    max-height: 72vh;
    overflow-y: auto;
}

.order-modal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 1rem;
    align-items: start;
    min-height: 0;
}

.order-modal-main {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    min-width: 0;
    max-height: 72vh;
    overflow-y: auto;
    padding-right: 0.15rem;
}

.order-modal-footer {
    display: flex;
    align-items: center;
    padding: .9rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

.order-modal-footer > div:last-child {
    display: flex;
    gap: .55rem;
    margin-left: auto;
}

.order-footer-btn {
    min-height: 38px;
    padding: .52rem .9rem;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 700;
    box-shadow: none;
}

#order-save-btn.order-footer-btn {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.18);
}

#order-save-btn.order-footer-btn:hover {
    box-shadow: 0 12px 28px rgba(21, 128, 61, 0.24);
}

.order-modal-section {
    display: flex;
    flex-direction: column;
    gap: .55rem;
}

.order-history-sidebar {
    min-width: 0;
}

.order-history-card {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 16px;
    border: 1px solid #e7ecf3;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    max-height: 72vh;
}

.order-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.order-history-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}

.order-history-subtitle {
    margin-top: 0.2rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #64748b;
}

.order-history-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 0.76rem;
    font-weight: 700;
    flex-shrink: 0;
}

.order-history-empty {
    padding: 0.95rem 1rem;
    border-radius: 12px;
    border: 1px dashed #d8e0eb;
    background: #fff;
    color: #64748b;
    font-size: 0.82rem;
    line-height: 1.45;
}

.order-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.order-history-item {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.85rem 0.9rem;
    border-radius: 13px;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.order-history-item.is-current {
    border-color: #c7d2fe;
    box-shadow: inset 0 0 0 1px #c7d2fe;
    background: #f8faff;
}

.order-history-item-top,
.order-history-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.order-history-item-date {
    font-size: 0.76rem;
    color: #64748b;
    white-space: nowrap;
}

.order-history-item-total {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0f172a;
}

.order-history-item-products {
    font-size: 0.82rem;
    line-height: 1.45;
    color: #334155;
}

.order-history-item-comment {
    font-size: 0.76rem;
    line-height: 1.45;
    color: #64748b;
}

.order-history-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.24rem 0.52rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
}

.order-section-label {
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.order-fields-row {
    display: flex;
    gap: .85rem;
    flex-wrap: wrap;
}

.order-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    flex: 1;
    min-width: 130px;
}

.order-field-address {
    min-width: 220px;
}

.order-field-grow {
    flex: 2;
}

.order-auto-hint {
    font-weight: 400;
    color: #94a3b8;
    font-size: .75rem;
    text-transform: none;
    letter-spacing: 0;
}

.order-manager-section {
    padding: .9rem 1rem;
    border: 1px solid #e7ecf3;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.order-manager-help {
    font-size: .8rem;
    line-height: 1.45;
    color: #64748b;
}

.order-manager-selection {
    margin-top: .1rem;
    border-radius: 12px;
    border-color: #dbe4ee;
    background: #fff;
    max-height: 170px;
}

#orderModal .order-manager-selection .manager-item {
    min-height: 46px;
    padding: .42rem .5rem;
    margin: .12rem 0;
}

#orderModal .order-manager-selection .manager-item-avatar {
    width: 28px;
    height: 28px;
    font-size: .68rem;
}

#orderModal .order-manager-selection .manager-item-title {
    font-size: .81rem;
}

#orderModal .order-manager-selection .manager-item-hint {
    font-size: .69rem;
}

.order-product-inputs {
    display: flex;
    gap: .7rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.order-product-name-wrap {
    flex: 1 1 280px;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.order-product-submit-wrap {
    flex: 0 0 auto;
    min-width: 0;
}

.order-submit-spacer {
    visibility: hidden;
    pointer-events: none;
}

.order-product-submit-btn {
    min-width: 118px;
    height: 46px;
    padding: 0 .95rem;
    justify-content: center;
    white-space: nowrap;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.16);
}

.order-product-submit-btn:hover {
    box-shadow: 0 12px 28px rgba(29, 78, 216, 0.22);
}

.order-status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.osp-pill {
    display: inline-flex;
    align-items: center;
    padding: .42rem .78rem;
    border-radius: 10px;
    border: 1.5px solid #e0e3ea;
    background: none;
    font-size: .78rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
    touch-action: manipulation;
}

.osp-pill:hover {
    border-color: #c4b5fd;
    background: #faf9ff;
    color: #5b21b6;
}

.osp-pill.osp-active {
    background: var(--osp-bg, #ede9fe);
    border-color: var(--osp-border, #c4b5fd);
    color: var(--osp-color, #5b21b6);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}

.order-history-item-address {
    color: #334155;
    font-weight: 500;
    margin-bottom: 0.15rem;
}

.order-history-item-note {
    color: #64748b;
    font-style: italic;
}

.order-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 8px;
    border: 1.5px solid #fca5a5;
    background: none;
    color: #b91c1c;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
}

.order-delete-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
}

.order-products-list {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    margin-top: .3rem;
}

.opl-empty {
    padding: .85rem 1rem;
    font-size: .8rem;
    color: #94a3b8;
    font-style: italic;
    text-align: center;
}

.opl-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
}

.opl-row:last-of-type {
    border-bottom: none;
}

.opl-row:hover {
    background: #f8fafc;
}

.opl-name {
    flex: 1;
    font-weight: 500;
    font-size: .875rem;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opl-meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    color: #64748b;
    white-space: nowrap;
}

.opl-sep {
    color: #cbd5e1;
}

.opl-total {
    font-weight: 700;
    color: #1e293b;
}

.opl-actions {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.opl-actions .wh-action-btn {
    opacity: 1;
    color: #cbd5e1;
}

.opl-actions .wh-action-btn:hover {
    opacity: 1;
}

.opl-row:hover .opl-actions .wh-edit-btn {
    color: #94a3b8;
}

.opl-row:hover .opl-actions .wh-del-btn {
    color: #94a3b8;
}

.opl-wh-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .22rem .55rem;
    border-radius: 6px;
    border: 1.5px solid #e0e3ea;
    background: none;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    color: #94a3b8;
    transition: all .15s;
    white-space: nowrap;
}

.opl-wh-btn:hover {
    border-color: #c4b5fd;
    background: #ede9fe;
    color: #5b21b6;
}

.opl-wh-btn.opl-wh-active {
    border-color: #6366f1;
    background: #ede9fe;
    color: #4f46e5;
    opacity: 1 !important;
}

.opl-row .opl-wh-active {
    opacity: 1;
}

.opl-row.opl-editing {
    background: #f8fafc;
}

.opl-edit-fields {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .4rem;
    min-width: 0;
}

.opl-edit-fields .opl-edit-name {
    flex: 1;
    min-width: 0;
}

.opl-edit-fields .opl-edit-price,
.opl-edit-fields .opl-edit-qty {
    width: 72px;
}

.opl-edit-fields input {
    height: 30px;
    padding: .2rem .45rem;
    font-size: .8rem;
    border: 1px solid #c7d2dc;
    border-radius: 6px;
    outline: none;
    background: #fff;
}

.opl-edit-fields input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,.15);
}

.opl-confirm-btn {
    color: #22c55e !important;
    border-color: #bbf7d0 !important;
}

.opl-confirm-btn:hover {
    background: #f0fdf4 !important;
    color: #16a34a !important;
    border-color: #86efac !important;
}

.opl-cancel-btn {
    color: #94a3b8 !important;
}

.opl-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 1rem;
    background: #f8fafc;
    font-size: .8rem;
    color: #64748b;
    font-weight: 600;
    border-top: 1px solid #e2e8f0;
}

.opl-footer-total {
    font-weight: 700;
    color: #1e293b;
}

.wh-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wh-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.wh-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.wh-table thead th {
    padding: .7rem 1rem;
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.wh-row td {
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.wh-row:last-child td {
    border-bottom: none;
}

.wh-row:hover td {
    background: #f8fafc;
}

.wh-td-title {
    padding: .7rem 1rem;
}

.wh-td-sku {
    padding: .75rem 1rem;
    white-space: nowrap;
}

.wh-td-desc {
    padding: .7rem 1rem;
    max-width: 220px;
}

.wh-desc-text {
    font-size: .8rem;
    color: #64748b;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wh-td-qty {
    padding: .7rem 1rem;
    text-align: center;
}

.wh-td-price {
    padding: .7rem 1rem;
    white-space: nowrap;
}

.wh-td-actions {
    padding: .7rem .75rem;
    white-space: nowrap;
    width: 72px;
}

.wh-item-title {
    display: block;
    font-weight: 500;
    color: #1e293b;
}

.wh-item-desc {
    display: block;
    font-size: .75rem;
    color: #94a3b8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.wh-source-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    font-weight: 600;
    padding: .25rem .6rem;
    border-radius: 20px;
    white-space: nowrap;
}

.wh-src-stock {
    background: #d1fae5;
    color: #065f46;
}

.wh-src-orders {
    background: #dbeafe;
    color: #1d4ed8;
}

.wh-src-both {
    background: #ede9fe;
    color: #5b21b6;
}

.wh-qty-ctrl {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid #e0e3ea;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.wh-qty-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6366f1;
    transition: background .15s, color .15s;
    padding: 0;
    font-size: .9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.wh-qty-btn:hover {
    background: #ede9fe;
    color: #5b21b6;
}

.wh-qty-btn:active {
    background: #ddd6fe;
}

.wh-qty-divider {
    width: 1px;
    background: #e0e3ea;
    align-self: stretch;
}

.wh-qty-val {
    display: inline-block;
    min-width: 2.2rem;
    text-align: center;
    font-weight: 700;
    font-size: .82rem;
    color: #1e293b;
    padding: 0 .25rem;
    line-height: 30px;
}

.wh-qty-ok {
    color: #065f46;
}

.wh-qty-zero {
    color: #b45309;
}

.wh-qty-detail {
    font-size: .7rem;
    color: #94a3b8;
    margin-top: .2rem;
    text-align: center;
}

.wh-price {
    font-weight: 600;
    color: #1e293b;
}

.wh-cur {
    font-size: .75rem;
    color: #94a3b8;
    margin-left: .25rem;
}

.wh-price-none {
    color: #cbd5e1;
}

.wh-sku {
    font-size: .78rem;
    font-weight: 600;
    color: #64748b;
    font-family: ui-monospace, monospace;
    letter-spacing: .02em;
}

.wh-sku-none {
    color: #e2e8f0;
    font-size: .8rem;
}

.wh-actions {
    display: flex;
    gap: .3rem;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity .15s;
}

.wh-row:hover .wh-actions {
    opacity: 1;
}

.wh-action-btn {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .8rem;
    color: #64748b;
    transition: background .13s, color .13s, border-color .13s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.wh-edit-btn:hover {
    background: #f1f5f9;
    color: #374151;
    border-color: #cbd5e1;
}

.wh-del-btn:hover {
    background: #fef2f2;
    color: #ef4444;
    border-color: #fca5a5;
}

.wh-lock {
    color: #e2e8f0;
}

.wh-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #94a3b8;
    font-size: .9rem;
}

.wh-edit-row .wh-edit-cell {
    padding: 0;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.wh-edit-form {
    padding: 1rem 1.25rem;
}

.wh-edit-grid {
    display: flex;
    gap: .85rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.wh-edit-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    flex: 1;
    min-width: 120px;
}

.wh-edit-actions {
    display: flex;
    gap: .6rem;
    justify-content: flex-end;
    margin-top: .85rem;
}

.wh-modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
    overflow: hidden;
}

.wh-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.wh-modal-title {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
}

.wh-modal-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ede9fe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 1rem;
}

.wh-modal-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wh-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f1f5f9;
    background: #fafafa;
}

.wh-field-group {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.wh-label {
    font-size: .8rem;
    font-weight: 600;
    color: #475569;
}

.wh-hint {
    font-size: .75rem;
    color: #94a3b8;
}

.wh-price-wrap {
    position: relative;
}

.wh-price-wrap .settings-input {
    padding-right: 3rem;
}

.wh-currency {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .78rem;
    font-weight: 600;
    color: #94a3b8;
    pointer-events: none;
}

.editable-price {
    cursor: pointer;
    transition: all 0.2s ease;
}

.editable-price:hover {
    background-color: #e3f2fd !important;
    color: #1976d2;
}

.editable-price i {
    transition: opacity 0.2s ease;
}

.editable-price:hover i {
    opacity: 1 !important;
}

.product-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.suggestion-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.15s ease-in-out;
}

.suggestion-item:hover,
.suggestion-item.selected {
    background-color: #f8f9fa;
}

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

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.suggestion-title {
    font-weight: 500;
    color: #212529;
    flex: 1;
}

.suggestion-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.suggestion-price {
    font-size: 0.875rem;
    color: #28a745;
    font-weight: 600;
}

.suggestion-brand {
    font-size: 0.75rem;
    color: #6c757d;
}

.suggestion-sku {
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
}

.suggestion-source {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.suggestion-source.warehouse {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.suggestion-source.supplier {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.suggestion-source.orders {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.products-tags {
    min-height: 40px;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
}

.products-tags:empty::before {
    content: "Товары не добавлены";
    color: #6c757d;
    font-style: italic;
    font-size: 0.85rem;
}

.product-tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #185c36, #1a7a42);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 0.25rem;
    max-width: 100%;
    animation: fadeIn 0.3s ease-in-out;
    box-shadow: 0 1px 4px rgba(26, 122, 66, 0.25);
}

.product-tag .product-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.product-tag .product-name {
    font-weight: 600;
    line-height: 1;
}

.product-tag .product-details {
    font-size: 0.6rem;
    opacity: 0.9;
    line-height: 1;
}

.product-tag .remove-product {
    background: none;
    border: none;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.product-tag .remove-product:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.col-md-3 .product-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.col-md-3 .product-tag .product-details {
    font-size: 0.55rem;
}

.col-md-3 .product-tag .remove-product {
    width: 14px;
    height: 14px;
    font-size: 0.7rem;
}

.product-form-row {
    position: relative;
}

.product-form-row .col-6 {
    position: relative;
}

.product-form-row .product-suggestions {
    left: 15px;
    right: 15px;
    top: calc(100% + 5px);
}

.product-delete-btn {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.product-delete-btn:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: white !important;
}

.modal-body .row.g-2 {
    align-items: end;
    margin-bottom: 0;
}

.modal-body .row.g-2 .col-md-6,
.modal-body .row.g-2 .col-md-3 {
    margin-bottom: 0;
}

.modal-body .row.g-2 .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.modal-body .row.g-2 .form-control {
    height: 38px;
    font-size: 0.875rem;
}

.modal-body #product-name,
.modal-body #price,
.modal-body #quantity {
    height: 38px !important;
    line-height: 1.5;
}

.modal-body .d-grid.mt-2 {
    margin-top: 0.75rem !important;
}

.modal-body .position-relative .row.g-2 {
    --bs-gutter-x: 0.5rem;
}

.products-tags .product-tag {
    display: inline-block;
    margin: 0.125rem;
}

@media (max-width: 1023.98px) {
    .product-form-row .col-6,
    .product-form-row .col-3 {
        margin-bottom: 0.5rem;
    }

    .product-form-row .row.g-2 {
        margin-bottom: 0.5rem;
    }
}

/* ── Warehouse stat bar ─────────────────────────────────── */

/* Stat bar layout: total | [cats zone] | revenue */
.stat-bar.wh-stat-bar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0;
    padding: 6px 1rem;
    min-height: unset;
}

/* "Все товары" — стандартный stat-bar-item, кликабельный */
.wh-stat-total {
    flex-shrink: 0;
    cursor: pointer;
}

/* "Сумма склада" — прижата вправо */
.wh-stat-revenue {
    flex-shrink: 0;
    margin-left: auto;
}

/* Category tiles zone — flex row that wraps internally */
.wh-cats-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
    padding: 0 4px;
}

/* Each category tile: icon + count on top, label below */
.wh-cat-filter {
    flex: 0 0 auto;
    width: 120px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    user-select: none;
}

.wh-cat-filter:hover {
    background: #f4f5f8;
}

.wh-cat-filter.active {
    border-color: var(--stat-accent, #6366f1);
    background: color-mix(in srgb, var(--stat-accent, #6366f1) 8%, #ffffff);
}

.wh-cat-filter.active .stat-bar-value {
    color: var(--stat-accent, #6366f1);
}

.wh-cat-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wh-cat-filter .stat-bar-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 0;
}

.wh-cat-filter .stat-bar-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1;
}

.wh-cat-filter .stat-bar-label {
    font-size: 0.65rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
