
/* /assets/css/style.css */
/* ------------------------------ */
/* /assets/css/style.css */
/* ------------------------------ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: #f5f7fa;
    display: flex;
    min-height: 100vh;
}

body.modal-open {
    overflow: hidden;
}

.hidden {
    display: none !important;
    visibility: hidden !important;
}

.width-100 {
    width: 100%;
}

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

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

.fw-bold {
    font-weight: bold !important;
}

.fw-600 {
    font-weight: 600;
}

.fw-normal {
    font-weight: normal;
}

.flex {
    display: flex;
}

.display-block {
    display: block;
}

.flex-shrink {
    flex-shrink: 0 !important;
}

.flex_center_align {
    align-items: center;
    justify-content: center;
}

.fd-column {
    display: flex;
    flex-direction: column;
}

.justify-content-start {
    justify-content: flex-start !important;
}

.justify-content-end {
    justify-content: flex-end;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-space-between {
    justify-content: space-between;
}

.align-items-c {
    align-items: center !important;
}

.align-items-s {
    align-items: flex-start !important;
}

.align-items-e {
    align-items: flex-end;
}

.align-items-stretch {
    align-items: stretch !important;
}

.flex-start {
    /* странный класс, но много где используется, лучше использовать .align-items-s и .width-100 */
    align-items: flex-start !important;
    width: 100%;
}

.flex-wrap-w {
    flex-wrap: wrap;
}

.flex-none {
    flex: none !important;
}

/* margin */
.m-0 {
    margin: 0 !important;
}

.m-t-0 {
    margin-top: 0 !important;
}

.m-b-0 {
    margin-bottom: 0 !important;
}

.m-r-0 {
    margin-right: 0px !important;
}

.m-l-0 {
    margin-left: 0px !important;
}

.m-5 {
    margin: 5px;
}

.m-l-5 {
    margin-left: 5px;
}

.m-r-5 {
    margin-right: 5px;
}

.m-t-5 {
    margin-top: 5px !important;
}

.m-b-5 {
    margin-bottom: 5px !important;
}

.m-10 {
    margin: 10px;
}

.m-r-10 {
    margin-right: 10px !important;
}

.m-l-10 {
    margin-left: 10px !important;
}

.m-t-10 {
    margin-top: 10px;
}

.m-b-10 {
    margin-bottom: 10px !important;
}

.m-15 {
    margin: 15px;
}

.m-r-15 {
    margin-right: 15px !important;
}

.m-l-15 {
    margin-left: 15px !important;
}

.m-t-15 {
    margin-top: 15px;
}

.m-b-15 {
    margin-bottom: 15px !important;
}

/* padding */
.p-0 {
    padding: 0 !important;
}

.p-b-0 {
    padding-bottom: 0px !important;
}

.p-t-0 {
    padding-top: 0px !important;
}

.p-l-0 {
    padding-left: 0px !important;
}

.p-r-0 {
    padding-right: 0px !important;
}

.p-5 {
    padding: 5px !important;
}

.p-l-5 {
    padding-left: 5px !important;
}

.p-r-5 {
    padding-right: 5px !important;
}

.p-t-5 {
    padding-top: 5px;
}

.p-b-5 {
    padding-bottom: 5px;
}

.p-10 {
    padding: 10px;
}

.p-l-10 {
    padding-left: 10px !important;
}

.p-r-10 {
    padding-right: 10px;
}

.p-t-10 {
    padding-top: 10px;
}

.p-b-10 {
    padding-bottom: 10px;
}

.p-15 {
    padding: 15px;
}

.p-l-15 {
    padding-left: 15px !important;
}

.p-r-15 {
    padding-right: 15px !important;
}

.p-t-15 {
    padding-top: 15px;
}

.p-b-15 {
    padding-bottom: 15px;
}

fieldset {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    position: relative;
    margin-top: 20px;
}

fieldset legend {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    position: absolute;
    top: -13px;
    left: 10px;
}



/* /assets/css/layout.css */
/* Боковое меню */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4fd7 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 18px;
    margin-bottom: 5px;
}

.sidebar-header .user-info {
    font-size: 14px;
    opacity: 0.8;
}

.menu-item {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 25px;
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.2);
    border-left: 4px solid white;
}

.menu-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Основной контент */
.main-content {
    /*!* width: 100%; *!*/
    margin-left: 260px;
    /*flex: 1;*/
    /*display: flex;*/
    /*flex-direction: column;*/
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 1200px;
    padding-right: 15px;
    position: relative;
    overflow: auto;
}
.top-bar{
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid #e1e5e9;
}
.top-bar>div {
    background: white;
    padding: 15px 30px;

    display: flex;
    justify-content: space-between;
    align-items: center;

}

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

.top-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4fd7 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: white;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}



.btn-search-client {
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2563eb;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-search-client:hover {
    background: #1d4fd7;
    color: white;
}

.content-area {
    padding: 30px 10px;
    flex: 1;
    overflow-y: auto;
}

/* Карточки статистики */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e1e5e9;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4fd7 100%);
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stat-change {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    background: #e8f5e8;
    color: #4CAF50;
}

/* Информация о смене */
.shift-info {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shift-details h3 {
    margin-bottom: 5px;
}

.shift-details p {
    opacity: 0.9;
    font-size: 14px;
}

.shift-status {
    font-size: 32px;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.quick-action {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e1e5e9;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.quick-action:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.quick-action-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.quick-action-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.quick-action-desc {
    font-size: 12px;
    color: #666;
}


/* /assets/css/tables-forms.css */
/* Таблицы */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid #e1e5e9;
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    padding-top: 3px;
}

.card-footer {
    padding: 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #f5f7fa;
}

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

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-received {
    background: linear-gradient(135deg, #d6d3f0 0%, #e4d5f5 100%);
    color: #5c3c94;
    /* тёмно-фиолетовый текст для контраста */
}

.badge-finished,
.badge-delivered {
    background: #e8f5e8;
    color: #4CAF50;
}
.badge-in_work{
    color: #02a7d4;
    background: #e8f4fc;
}

.badge-canceled {
    background-color: #f2f2f2;
    /* светло-серый фон */
    color: #777777;
    /* серая надпись */
}

.badge-error {
    background-color: #ffe5e5;
    /* светло-красный фон */
    color: #b30000;
    /* красный текст */
}

.badge-pending {
    background: #fff3e0;
    color: #FF9800;
}

/* Формы */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.order-summary-form {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.order-summary-form>div {
    width: 33%;
}
/*
.form-group {
    margin-bottom: 10px;
}
*/

.form-label {
    font-size: 12px;
    color: #6b7280;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.form-control,
.input-field {
    width: 100%;
    padding: 18px 15px;
    border: 1px solid #86868b;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus,
.input-field:focus {
    border-color: #2563eb;
    outline: none;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}


/* /assets/css/modals.css */
/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.3s ease-out;
}

/*.default-table{*/
/*    table-layout: fixed;*/
/*    width: 100%;*/
/* }*/
.table__wrapper {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.table__wrapper .table {
    width: 100%;
    min-width: max-content;
    white-space: nowrap;
    border-collapse: collapse;
}



.table .photos-preview {
    display: flex;
    gap: 6px;
    max-width: 40px;
    max-height: 40px;
    margin-top: 5px;
}

.table .photos-preview img {
    width: 100%;
    border-radius: 7px;
}

.table .photo-thumb {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
}



.table .total-status-cell {
    width: 170px;
}

.table .comment-cell {
    width: 250px;
}

.table .total-status-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

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

.table .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.table .attributes_ids {
    word-break: break-all;
    white-space: normal;
    max-width: 250px;
    /* опционально — ограничивает ширину ячейки */
}

.table .id {
    width: 50px !important;
}



.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    height: 98%;
    max-height: 98%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: auto;
}



.modal-header {
    padding: 10px 20px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.modal-title-and-icon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modal-close {
    width: 35px;
    height: 35px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 10px 20px;
    max-height: 90%;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    /*height: 62px;*/
    padding: 12px 20px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    background: #f8f9fa;
    flex-shrink: 0;

    @media (max-width: 600px) {
        padding: 20px
    }
}

.modal-footer-buttons {
    margin-left: auto;
    display: flex;
    gap: 6px;
}


/* /assets/css/order-wizard.css */
/* Прогресс-индикатор шагов */
.step-progress {
    padding: 20px 10px 20px 10px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #e1e5e9;
    box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

.step-subtitle {
    margin: 0;
    padding: 10px 0px;
    box-sizing: border-box;
}

.step-counter {
    margin: 0;
    padding-bottom: 10px;
    box-sizing: border-box;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 60%;
    right: -40%;
    height: 2px;
    background: #e1e5e9;
    z-index: 1;
}

.step-item.completed:not(:last-child)::after {
    background: #4CAF50;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e1e5e9;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
}

.step-item.active .step-number {
    background: #2563eb;
    color: white;
}

.step-item.completed .step-number {
    background: #4CAF50;
    color: white;
}

.step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

.step-item.active .step-label {
    color: #2563eb;
    font-weight: 600;
}

.step-item.completed .step-label {
    color: #4CAF50;
}

/* Стили для шагов заказа */
.order-step-content {
    animation: stepSlideIn 0.4s ease-out;
}

@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

/* Поиск по товарам */
.category-bar {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-direction: column;
    margin-bottom: 10px;
}

.search-container {
    width: 100%;
    flex-shrink: 0;
}

.product-search-bar {
    position: relative;
}

.search-bar {
    position: relative;
}

.search-input-with-clear {
    width: 100%;
    padding: 8px 35px 8px 10px;
    /* место под "×" и иконку */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.clear-btn {
    top: 8px;
    position: absolute;
    right: 35px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #888;
    display: none;
    /* по умолчанию скрыта */
}

.search-btn {
    top: 6px;
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #555;
}

.input-modal {
    width: 100%;
    padding: 8px 35px 8px 10px;
    /* место под "×" и иконку */
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* Категории товаров */
.category-tabs {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    overflow-x: auto;
    padding-bottom: 10px;
    max-width: 100%;
    width: 100%;
}

.category-tab {
    padding: 8px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
}

.category-tab:hover {
    border-color: #2563eb;
}

.category-tab.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Карточки товаров */
.product-grid {
    display: grid;
    grid-template-columns:1fr;
    gap: 12px;
    max-height: 90%;
    padding-right: 5px;
}

.product-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.product-card.selected {
    border-color: #4CAF50;
    background: #f8fff8;
}

.product-card-right-container {
    display: table-column;
    align-items: flex-start;
}

.product-card-right-container-block {
    display: flex;
    align-items: center;
}

.product-image {
    font-size: 32px;
    width: 50px;
    text-align: center;
    flex-shrink: 0;
    display: none /*Самый простой вариант - убрать исп картинки пока тут временно , в место текст цену - выводить инпут..*/;
}

.product-info {
    flex: 1;
}

.product-name {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.product-details {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
    display: flex;
    justify-content: flex-end;
}

.product-price {
    font-weight: bold;
    color: #4CAF50;
    font-size: 16px;
    padding-right: 10px;
    width: 100px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}

.product-badge {
    padding-bottom: 4px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.quantity-input {
    width: 75px !important;
    text-align: center;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    padding: 5px;
}

.notification-card-error {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #ff0b0b;
    border-radius: 10px;
    background: #ffefef;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-card-success {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    background: #f8fff8;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Выбор клиента */
.customer-type {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.type-btn {
    flex: 0 0 auto;
    border-radius: 30px;
    padding: 8px 16px;
    border: 2px solid #e1e5e9;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
}

.type-btn:hover {
    border-color: #2563eb;
}

.type-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.customer-type-tabs {
    padding-bottom: 10px;
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    overflow-x: auto;
}

.client-search-bar {
    /*display: flex;*/
    /*gap: 10px;*/
    /*margin-bottom: 20px;*/
    position: relative;
}

.client-not-found {
    display: flex;
    justify-content: center;
}

.product-not-found {
    display: flex;
    justify-content: center;
}

.search-input {
    flex: 1;
    border-radius: 30px;
}

.search-input-circle {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 30px;
}

.search-input:focus {
    border-color: #2563eb;
    outline: none;
}

.filter-btn {
    border-radius: 8px;
    transition: all 0.3s ease;
}



.customer-list {
    max-height: 90%;
    overflow-y: auto;
}

.customer-info {
    display: flex;
    gap: 25px;
    align-items: center;
}

.customer-item {
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.customer-item:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.customer-item.selected {
    border-color: #4CAF50;
    background: #f8fff8;
}

.customer-name {
    font-weight: 600;
    color: #333;
    width: 75px;
}

.customer-contacts {
    font-size: 14px;
    color: #666;
    width: 100px;
}

.customer-last-order {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.secondary-button {
    width: 100%;
    padding: 12px;
    border: 2px dashed #2563eb;
    border-radius: 8px;
    background: white;
    color: #2563eb;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.secondary-button:hover {
    background: #f0f4ff;
}

/* Итоговая информация */
.order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    margin-top: 20px;
}

.order-total-info {
    display: flex;
    margin: 0;
    padding: 5px 0px;

    @media (max-width: 600px) {
        padding: 0px;
    }
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: #333;
}

.summary-item {
    margin-bottom: 15px;
}

.summary-total {
    font-weight: bold;
    font-size: 18px;
    color: #333;
    border-top: 1px solid #e1e5e9;
    padding-top: 10px;
    margin-top: 10px;
}

#modalContainer {
    z-index: 1000;
}

#modalProductSelect {
    z-index: 1200;
}

#modalContainer .modal {
    display: flex;
}
.modal-content:not(.shift-modal) input:not([type="checkbox"]) {
    height: 40px;
    /*margin-bottom: 10px;*/
}

.shift-modal textarea,
.shift-modal input:not([type="checkbox"]) {
    width: 100%;
    font-size: 14px;
}

.shift-modal .checkbox-input {
    width: 4%;
}

.modal-dialog {
    max-height: 90%;
    display: flex;
    flex-direction: column;
}


/* /assets/css/notifications-login-responsive.css */
/* Уведомления */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 2000;
    animation: slideInRight 0.3s ease-out;

    @media (max-width: 600px) {
        top: 0px;
    }
}

.notification-message {
    color: #333;
}

.notification-icon {
    color: #333;
}

.notification-error {
    color: #f44336;
}

.notification.success {
    background: #4CAF50;
}

.notification.error {
    background: #f44336;
}



/* Авторизация */
.request_entity-login .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    display: block !important;
}

.request_entity-login .content-area {
    padding: 0 !important;
}

.request_entity-login .input-field {
    width: 100%;
    padding: 14px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
}

.request_entity-login .input-field:focus {
    border-color: #2563eb;
    outline: none;
}

.request_entity-login .big-button {
    background: linear-gradient(135deg, #2563eb 0%, #1d4fd7 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

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

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .modal-content {
        width: 98%;
        max-width: none;
        margin: 10px;
        height: 100%;
        max-height: 800px;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 15px;
    }

    .top-bar {
        padding: 15px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

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

    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    .step-progress {
        padding: 20px 10px 20px 10px;
        border-bottom: 1px solid #e1e5e9;
    }

    .step-subtitle {
        margin: 0;
        padding: 10px 0px;
        box-sizing: border-box;
    }

    .customer-type {
        flex-direction: column;
    }

    .modal-footer {
        flex-direction: column;
        gap: 12px;
    }

    .modal-footer .btn {
        /*width: 100%;*/
        justify-content: center;
    }
}


/* /assets/css/catalog.css */
/* Catalog */
.filter-tabs-group-wrapper {
    display: inline-block;
    background-color: #e3e3e3;
    border-radius: 999px;
    border: 1px solid #2563eb;
    overflow: visible;
}

.filter-tabs-group {
    display: inline-flex;
    border-radius: 999px;
    overflow: visible;
    white-space: normal;
    scrollbar-width: none;
    -ms-overflow-style: auto;
}

.filter-tabs-group::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}

.filter-tab {
    flex-shrink: 0;
    /* ← это ключевой момент для скролла */
    padding: 9px 10px;
    border: none;
    border-right: 1px solid #2563eb;
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
    text-align: center;
    cursor: pointer;
    outline: none;
    background-color: white;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.filter-tab:first-child {
    border-top-left-radius: 999px;
    border-bottom-left-radius: 999px;
}

.filter-tab:last-child {
    border-top-right-radius: 999px;
    border-bottom-right-radius: 999px;
    border-right: none;
}

/* При наведении */
.filter-tab:hover {
    background-color: #f3f4f6;
}

/* Активная кнопка */
.filter-tab.active {
    background-color: #eef0ff;
    color: #2563eb;
}

/* При клике */
.filter-tab:active {
    transform: none;
}

.dropdown-filter-wrapper {
    position: relative;
}

.dropdown-filter {
    width: 160px;
    height: 37px;
    max-height: 37px;
    padding: 6px 12px;
    border: 1px solid #2563eb;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color: black;
}

.dropdown-filter:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.dropdown-filter:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.date-input-wrapper {
    position: relative;
}

.date-input {
    height: 37px;
    max-height: 37px;
    padding: 6px 12px;
    border: 1px solid #2563eb;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    color: black;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* При наведении */
.date-input:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

/* При фокусе (клик или Tab) */
.date-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.reset-style-btn {
    display: inline-block;
    vertical-align: top;
    margin: 0;
    padding: 0;
    text-align: left;
    background: none;
    height: 50px;
    border: 0px solid #000;
}

.table-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 2px;
    margin-bottom: 10px;
}

.img-catalog {
    max-width: 40px;
    max-height: 40px;
    margin-top: 5px;
}

.img-product-order {
    width: 50px;
    max-width: 50px;
}

/* Loader */
.loading-spinner {
    position: absolute;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.3);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px #ddd solid;
    border-top: 4px #2e93e6 solid;
    border-radius: 50%;
    animation: sp-anime 0.8s infinite linear;
}

@keyframes sp-anime {
    100% {
        transform: rotate(360deg);
    }
}

/* Admin Menu */
.admin-block-title {
    color: white;
    padding: 10px 20px;
    border: none;
    display: flex;
    align-items: center;
    border-radius: 4px;
    width: 100%;
    background: transparent;
}

.admin-block-menu-item {
    padding: 2px 20px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-block-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 25px;
}

.admin-block-menu-item.active {
    background: rgba(255, 255, 255, 0.2);
    border-left: 4px solid white;
}


/* /assets/css/reports.css */






.metric-box {
    flex: 1;
}







.stats-col {
    flex: 1;
}



.stats-table th,
.stats-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.stock-summary div {
    margin-bottom: 10px;
}

/* ===== СОВРЕМЕННЫЕ СТИЛИ ДЛЯ БЛОКА ОТЧЕТОВ ===== */
#reportsPage {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    color: #1f2937;
    line-height: 1.6;
}

#reportsPage .card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 23px;
    margin: 0;
    transition: box-shadow 0.2s ease;
}

#reportsPage .card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* ===== ФИЛЬТРЫ ===== */
.stats-filters {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
    padding: 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
    align-items: center;
}

.stats-filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    letter-spacing: -0.01em;
    min-width: 140px;
}

.stats-filters input[type="date"],
.stats-filters select {
    padding: 7px 7px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    background: #ffffff;
    transition: all 0.2s ease;
    font-weight: 500;
}

.stats-filters select {
    width: 180px;
}

.stats-filters input[type="date"]:focus,
.stats-filters select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: #ffffff;
}

.stats-filters input[type="date"]:hover,
.stats-filters select:hover {
    border-color: #9ca3af;
}

/* ===== МЕТРИКИ ===== */
.stats-metrics-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.metric-box {
    background: #ffffff;
    padding: 28px 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.metric-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.metric-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 12px 12px 0 0;
}

.metric-box:nth-child(2)::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.metric-box:nth-child(3)::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.metric-box:nth-child(4)::before {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

.metric-title {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
    font-feature-settings: 'tnum';
}

/* ===== ОСНОВНАЯ СЕТКА СТАТИСТИКИ ===== */
.stats-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
}

.stats-col h4 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    letter-spacing: -0.02em;
}

/* ===== ТАБЛИЦЫ ===== */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stats-table th {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 16px 20px;
    font-weight: 700;
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}

.stats-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.stats-table tbody tr {
    transition: background-color 0.15s ease;
}

.stats-table tbody tr:hover {
    background: #f9fafb;
}

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

/* ===== БЛОК ОСТАТКОВ НА СКЛАДЕ ===== */
.stock-summary {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 28px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
}

.stock-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 12px 12px 0 0;
}

.stock-summary div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    font-size: 15px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 500;
}

.stock-summary div:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.stock-summary strong {
    font-weight: 700;
    color: #111827;
    font-feature-settings: 'tnum';
}

.stock-summary div:first-child strong {
    color: #059669;
}

.stock-summary div:last-child strong {
    color: #6366f1;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ DESKTOP ===== */
@media (max-width: 1200px) {
    .stats-metrics-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stats-row {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .stats-filters {
        gap: 24px;
    }
}

@media (max-width: 900px) {
    #reportsPage .card {
        padding: 24px;
    }

    .stats-metrics-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stats-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .stats-filters label {
        min-width: auto;
    }
}


/* /assets/css/modal-fields-responsive.css */
/*             Modals elements                  */
input,
.select2-selection,
textarea {
    border: 1px solid #86868b;
    color: #1d1d1f;
    background-color: #fff;
    font-size: 17px;
    line-height: 1.23536;
    /*font-weight: 400;*/
    border-radius: 12px;
    padding: 18px 16px 0;
    width: 100%;
    /*font-weight: 700;*/
}

.input-small input {
    padding: 12px 8px 0;
    height: 40px;
}

.input-small .input__placeholder {
    left: 8px;
}

.input-small input:focus~.input__placeholder,
.input-small.has-value .input__placeholder {
    font-size: 11px;
    top: 11px;
    white-space: nowrap;
    max-width: calc(100% - 22px);
}



textarea {
    padding-top: 23px;
}

div.update_variations_group_cont input {
    height: 40px;
    padding-top: 7px;
}

div.update_variations_group_cont .input__placeholder {
    top: 9px;
}

.editor-container textarea {
    display: none;
}

.input,
.select,
.textarea {
    position: relative;
}

input:disabled,
textarea:disabled {
    cursor: not-allowed;
    pointer-events: all !important;
    background-color: #eee;
}

.select .select2 {
    width: 100% !important;
}

.input__placeholder,
.select2-selection__placeholder,
.textarea__placeholder {
    color: #6e6e73;
    pointer-events: none;
    position: absolute;
    left: 16px;
    font-size: 17px;
    z-index: 1;
    transition-timing-function: ease-in;
    transition-duration: .125s;
    transform: translateY(-50%);
    background-color: transparent;
    /*font-weight: 400;*/
    max-width: calc(100% - 32px);
    text-overflow: ellipsis;
}

.textarea__placeholder {
    top: 27px;
}

.input__placeholder,
.select2-selection__placeholder {
    top: 20px;
}

.select2-selection__placeholder {
    width: calc(100% - 34px);
    line-height: 1.5;
    z-index: 102;
}

.select2-selection__placeholder.select2-selection__placeholder--selected,
.select2-container--open .select2-selection__placeholder,
.has-value .textarea__placeholder,
.has-value .input__placeholder,
input:focus~.input__placeholder,
textarea:focus~.textarea__placeholder {
    font-size: 12px;
    top: 15px;
}

/*!* 2.  Поднятый плейсхолдер, когда в поле уже есть текст *!*/
/* input:not(:placeholder-shown) ~ .input__placeholder,*/
/* textarea:not(:placeholder-shown) ~ .textarea__placeholder {*/
/*     font-size: 12px;*/
/*     top: 22px;*/
/* }*/
legend {
    padding: 3px 6px;
}

.product-card-fieldset {
    padding: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .content-area {
        padding: 20px;
    }

    .top-bar {
        padding: 16px 20px;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

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

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-16px);
        opacity: 0;
    }

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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


/* /assets/css/cards.css */
/*           СТИЛИ ДЛЯ МОДАЛКИ РЕДАКТИРОВАНИЯ ЗАКАЗА            */
/*.modal-body {*/
/*    padding: 24px;*/
/*    max-height: calc(95vh - 140px);*/
/*    overflow-y: auto;*/
/*}*/
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.section-full {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    grid-column: 1 / -1;
    /* Растягивает элемент на всю ширину сетки */
}

.section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
    width: 100%;
}

.section-title i {
    color: #2563eb;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    height: 40px;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input:disabled {
    background: #f9fafb;
    color: #6b7280;
    cursor: not-allowed;
}

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

.payment-summary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}
/*
.payment-item:last-child {
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 16px;
}
*/

.delivery-options {
    display: flex;
    gap: 8px;
}

.delivery-option {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.delivery-option:hover {
    border-color: #2563eb;
}

.delivery-option.active {
    border-color: #2563eb;
    background: #f0f4ff;
    color: #2563eb;
}

.products-section {
    grid-column: 1 / -1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.products-table th,
.products-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.products-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.add-product-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
}

.add-product-btn:hover {
    background: #4338ca;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-draft {
    background: #fef3c7;
    color: #92400e;
}

.status-active {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-cancelled {
    background: #fee2e2;
    color: #dc2626;
}

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

.info-card {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.info-card-label {
    font-size: 12px;
    color: #6b7280;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-card-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.info-order-refund-main-label {
    margin-bottom: 5px;
}

.info-order-refund-label {
    color: #6b7280;
    margin-bottom: 5px;
}
.checkbox_input {
    display: flex;
    align-items: center;
}

.checkbox_input input {
    display: none;
}

.checkbox_input .checkbox__check_mark {
    border: 1px solid #c0dbe8;
    border-radius: 2px;
    background-color: #fff;
    margin-right: 5px;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-size: contain;
    background-position: 50%;
}

.checkbox_input input:checked+.checkbox__check_mark {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' fill='%235c6268' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M480 128c0 8.188-3.125 16.38-9.375 22.62l-256 256C208.4 412.9 200.2 416 192 416s-16.38-3.125-22.62-9.375l-128-128C35.13 272.4 32 264.2 32 256c0-18.28 14.95-32 32-32c8.188 0 16.38 3.125 22.62 9.375L192 338.8l233.4-233.4C431.6 99.13 439.8 96 448 96C465.1 96 480 109.7 480 128z'/%3E%3C/svg%3E");
}

.checkbox_input.disabled {
    cursor: no-drop;
    opacity: 0.7;
}


.gallery__button {
    width: 100px;
    height: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-img {
    width: 75px;
    height: 75px;
}

/* базовый контейнер, как у вас */
.row-aic {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 1) обычное поведение, когда в строке есть ещё картинки / чекбоксы */
.row-aic>.input.file-input {
    flex: 0 0 auto;
    /* ширина по содержимому */
}

/* 2) строка содержит ТОЛЬКО div.input.file-input  → растягиваем */
.row-aic>.input.file-input:only-child {
    flex: 1 1 100%;
    /* занимает всю строку */
}

/* чтобы сам <input type="file"> заполнил div */
.row-aic>.input.file-input:only-child input[type="file"] {
    width: 100%;
    padding: 5px !important;
}

.total-amount {
    font-size: 18px;
    font-weight: bold;
    color: #059669;
}

.files-section {
    grid-column: 1 / -1;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.file-upload-areas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.file-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.file-upload-area i {
    font-size: 32px;
    color: #94a3b8;
    margin-bottom: 8px;
}

/* Стили для затемнения и прелоадера */
.modal-loading {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.modal-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.button-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.section-full-row {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
}

.three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
.four-columns{
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}
.two-columns,.row-2-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.first-col-wide{
    grid-template-columns: 2.05fr 1fr;
}
.recived-supplier-block{
    display: none;
}

.fist-col-large-grid{
    grid-template-columns: 1fr 2fr;
}
.second-col-large{
    grid-template-columns: 2fr 1fr;
}
.modal-content{
    max-width: 1200px;
}
.mt-24{
    margin-top: 24px;
}
.payment-item{
    flex-direction: column;
}

/*
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}
*/

.order-summ-block{
    display: block;
    float: right;
    margin-top: auto;
    margin-bottom: auto;
    margin-left: auto;
    margin-right: 0;
}
.filter-row-in-choose{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.product-card-right-container .select-warehouse{
    display: flex;
    flex-direction: column;
}
.product-attributes{
    display: flex;
    gap: 6px;
}
.product-attributes-in-card{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.product-attributes .attr_row{
    display: flex;
}
.product-attributes .attr_value{
    text-wrap: auto;
}
.product-source-price{
    font-size: 12px;
    color: #888888;
}
.input-source-price{
    width: 120px;
}
#modalProductSelect .modal-content{
    width: 800px;
}


/* /assets/css/search.css */
.search-filter-group {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.search-wrapper {
    position: relative;
}

.search-input {
    padding: 8px 40px 8px 16px;
    width: 240px;
    border: none;
    outline: none;
    font-size: 14px;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    border-left: 1px solid #d1d5db;
    background: white;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-btn:hover {
    background: #f9fafb;
}
#modal-filters .modal-content{
    max-width: 400px;
    height: auto;
}
.filter-item{
    display: flex;
    justify-content: space-between;
    padding: 5px 0px;
}
.filter-item #in-stock{
    width: 40px;
}
.filter-item .checkbox{
    width: 40px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  font-size: 13px;
  color: #1e40af;
  cursor: pointer;
}
.filter-chip-close {
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #3b82f6;
  font-size: 16px;
  line-height: 1;
}
.filters-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-item .date-input{
    width: 160px;
}
.top-bar .active-filters{
    justify-content: start;
}
.actions-wrapper{
    margin-top: 5px;
    display: flex;
    justify-content: space-between;
}
.supplier-request-file-input{
    border: 1px solid #86868b;
    color: #1d1d1f;
    background-color: #fff;
    border-radius: 12px;
    padding: 5px;
    width: 100%;
    font-weight: 400;
    display: flex;
    justify-content: space-between;
}
.supplier-request-file-input a{
    color: #1d1d1f;
}
.supplier-request-file-input .file-delete{
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.supplier-request-file-input input{
    border: none;
}
.attr_name{
    color: #6c6c6c;
}


/* /assets/css/autocomplete.css */
/* Контейнер автокомплита */
.autocomplete-dropdown {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  border-top: 0;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  display: none;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

/* Элементы списка */
.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-item:hover,
.autocomplete-item.selected {
  background-color: #f0f0f0;
}

/* Скроллбар */
.autocomplete-dropdown::-webkit-scrollbar {
  width: 8px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.product-in-order{
    margin-bottom: 10px;
}
.gap-12{
    gap: 12px;
    display: grid;
}
.product-in-order .prod-name{
    font-weight: 600;
}
.table.orders-table td{
    max-width: 500px;
    text-wrap: auto;
}
.small-input-padding .form-input{
    padding: 10px 6px;
}
.small-input-padding input[type="number"]{
    padding-right: 3px;
}
.small-input-padding input[type="date"]{
    font-size: 12px;
    padding: 10px 0px;
}

.current-shift-info{
    display:grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

.mt-4 {
    margin-top: 1.5rem; /* 24px */
}

.mb-3 {
    margin-bottom: 1rem; /* 16px */
}
.card-body{
    padding: 0px 20px;
}

#historyForm select{
    height: unset;
    max-height: 70px;
    padding: 18px 15px;
}


.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.badge-light { background-color: #f8f9fa; color: #333; }
.cursor-pointer {cursor: pointer;}


/* /assets/css/theme.css */
/* Тема U0 (16.11): токены Converter поверх старых стилей. Только внешний вид: классы и id, на которые опирается JS, не меняются.
   Подключается последним в бандле (System/Template.php). */
:root {
    --c-bg: #f3f4f6; --c-surface: #fff; --c-surface-2: #f8f9fb; --c-hover: #f1f3f6;
    --c-border: #d9dde5; --c-border-strong: #b8c0cc;
    --c-text: #1c2230; --c-text-2: #3f485a; --c-muted: #596579;
    --c-primary: #2563eb; --c-primary-hover: #1d4fd7; --c-primary-soft: #eaf1fe; --c-primary-text: #1e40af;
    --c-success: #15803d; --c-success-soft: #e9f7ee; --c-danger: #dc2626; --c-danger-soft: #fdeeee;
    --c-warning: #b45309; --c-warning-soft: #fdf4e3; --c-focus: 0 0 0 3px rgba(37, 99, 235, .18);
    --c-overlay: rgba(16, 24, 40, .45);
    --radius-sm: 6px; --radius: 8px; --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06); --shadow: 0 6px 20px rgba(16, 24, 40, .10); --shadow-lg: 0 20px 56px rgba(16, 24, 40, .22);
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}
body, body.bg-light { background: var(--c-bg); color: var(--c-text); font-family: var(--font); font-size: 14px; }
button, input, select, textarea { font-family: inherit; }
a { color: var(--c-primary); }

/* ---------- Сайдбар ---------- */
.sidebar { background: var(--c-surface); color: var(--c-text); border-right: 1px solid var(--c-border); box-shadow: none; display: flex; flex-direction: column; }
.sidebar-header { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--c-border); }
.sidebar-header h2, .sidebar-header .store-name { font-size: 14px; font-weight: 700; margin: 0 0 2px; color: var(--c-text); line-height: 1.3; }
.sidebar-header .user-info { opacity: 1; font-size: 12px; color: var(--c-muted); }
.sidebar-nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav > br { display: none; }
.menu-item, .admin-block-menu-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; border-radius: var(--radius);
    color: var(--c-text-2); text-decoration: none; transition: background .15s, color .15s; font-size: 14px;
}
.menu-item:hover, .admin-block-menu-item:hover { background: var(--c-hover); color: var(--c-text); padding-left: 10px; }
.menu-item.active, .admin-block-menu-item.active { background: var(--c-primary-soft); color: var(--c-primary-text); font-weight: 600; border-left: 0; }
.admin-block-title {
    font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted);
    padding: 16px 10px 6px; margin: 0; background: none; border: 0;
}
.admin-block-title .icon { display: none; }
.sidebar-footer { margin-top: auto; border-top: 1px solid var(--c-border); padding: 8px; }
.sidebar > br { display: none; }
.logout-item { color: var(--c-muted); }

/* Иконки меню: эмодзи и «- » заменены на Font Awesome по data-page */
.menu-icon { font-size: 0; width: 18px; flex: none; text-align: center; color: var(--c-muted); }
.menu-item.active .menu-icon, .admin-block-menu-item.active .menu-icon { color: var(--c-primary); }
.menu-icon::before { font: var(--fa-font-solid, 900 15px/1 "Font Awesome 6 Free"); font-size: 15px; content: "\f111"; display: inline-block; }
.admin-block-menu-item .menu-icon::before { content: "\f105"; }
[data-page="home"] .menu-icon::before { content: "\f015"; }
[data-page="new-order"] .menu-icon::before { content: "\2b"; }
[data-page="orders"] .menu-icon::before { content: "\f46d"; }
[data-page="catalog"] .menu-icon::before { content: "\f4b8"; }
[data-page="clients"] .menu-icon::before { content: "\f0c0"; }
[data-page="shifts"] .menu-icon::before { content: "\f017"; }
[data-page="supplier-requests"] .menu-icon::before { content: "\f0d1"; }
[data-page="refunds"] .menu-icon::before { content: "\f0e2"; }
[data-page="write_offs"] .menu-icon::before { content: "\f1f8"; }
[data-page="stock_transfers"] .menu-icon::before { content: "\f362"; }
[data-page="contractors"] .menu-icon::before { content: "\f2b5"; }
[data-page="categories"] .menu-icon::before { content: "\f0e8"; }
[data-page="attributes"] .menu-icon::before { content: "\f02c"; }
[data-page="overhead_expenses"] .menu-icon::before { content: "\f53a"; }
[data-page="reports"] .menu-icon::before { content: "\f080"; }
[data-page="warehouses"] .menu-icon::before { content: "\f494"; }
[data-page="services"] .menu-icon::before { content: "\f0ad"; }
[data-page="users"] .menu-icon::before, [data-page="team_users"] .menu-icon::before { content: "\f007"; }
[data-page="debug-log-viewer"] .menu-icon::before { content: "\f188"; }
[data-page="translations"] .menu-icon::before { content: "\f1ab"; }
[data-page="import"] .menu-icon::before { content: "\f56f"; }
.menu-item[data-page="new-order"] { color: var(--c-primary); font-weight: 600; }
.menu-item[data-page="new-order"] .menu-icon { color: var(--c-primary); }
.logout-item .menu-icon::before { content: "\f2f5"; }

/* ---------- Шапка страницы ---------- */
.top-bar { box-shadow: none; border-bottom: 1px solid var(--c-border); background: var(--c-surface); }
.top-bar > div { background: var(--c-surface); padding: 12px 24px; gap: 12px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 650; color: var(--c-text); margin: 0; }
.search-filter-group { border: 1px solid var(--c-border-strong); border-radius: var(--radius); background: var(--c-surface); }
.search-filter-group:focus-within { border-color: var(--c-primary); box-shadow: var(--c-focus); }
.search-input { height: 38px; background: transparent; color: var(--c-text); }
.search-btn { background: none; border: 0; cursor: pointer; font-size: 0; padding: 0 10px; color: var(--c-muted); }
.search-btn::before { font: 900 14px/1 "Font Awesome 6 Free"; content: "\f002"; }
.search-filter-group .search-bar { position: relative; }
.search-filter-group .search-bar .search-btn { position: absolute; top: 50%; right: 6px; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; transform: translateY(-50%); line-height: 1; }
.search-filter-group .search-bar .search-btn::before { display: block; line-height: 1; }
.filter-btn { border-left: 1px solid var(--c-border); color: var(--c-text-2); height: 38px; }
.search-filter-group > .filter-btn { background: #f5f7fb; }
.filter-btn:hover { background: var(--c-hover); }
.search-filter-group > .filter-btn:hover { background: #eaf1fe; color: var(--c-primary-text); }
.filter-chip { background: var(--c-primary-soft); border-color: #c9dafc; color: var(--c-primary-text); border-radius: 999px; }
.filter-chip-close { color: var(--c-primary); }

/* ---------- Кнопки ---------- */
.btn { border-radius: var(--radius); font-weight: 600; padding: 9px 16px; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; line-height: 1.2; }
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: none; border: 1px solid var(--c-primary); }
.btn-primary:hover:not(:disabled) { background: var(--c-primary-hover); border-color: var(--c-primary-hover); transform: none; box-shadow: none; }
.btn-secondary { background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border-strong); }
.btn-secondary:hover { background: var(--c-hover); color: var(--c-text); }
.btn-success { background: var(--c-success); color: #fff; box-shadow: none; border: 1px solid var(--c-success); }
.btn-success:hover:not(:disabled) { background: #15803d; transform: none; box-shadow: none; }
.btn-danger { background: var(--c-surface); color: var(--c-danger); border: 1px solid #f3b4b4; }
.btn-danger:hover { background: var(--c-danger-soft); }
.btn:focus-visible { outline: none; box-shadow: var(--c-focus); }
.btn-icon { padding: 6px 8px; min-width: 34px; justify-content: center; }
.btn-search-client { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ---------- Поля ---------- */
.form-control, .form-input, .input-field, .form-select, .dropdown-filter, .date-input, .input-modal,
.modal-content input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .modal-content select, .modal-content textarea {
    border: 1px solid var(--c-border-strong); border-radius: var(--radius); background-color: var(--c-surface); color: var(--c-text); font-size: 14px;
}
.form-control:focus, .form-input:focus, .input-field:focus, .form-select:focus, .dropdown-filter:focus, .date-input:focus,
.modal-content input:focus, .modal-content select:focus, .modal-content textarea:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--c-focus); }
.form-label, .modal-content label { color: var(--c-text-2); font-weight: 500; font-size: 13px; }
input[type="checkbox"] { accent-color: var(--c-primary); }

/* ---------- Карточки и таблицы ---------- */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-header { border-bottom: 1px solid var(--c-border); }
.card-title { font-size: 15px; font-weight: 650; color: var(--c-text); }
.table { border-collapse: collapse; background: var(--c-surface); }
.table th { background: var(--c-surface-2); color: var(--c-muted); font-size: 12px; font-weight: 600; text-transform: none; border-bottom: 1px solid var(--c-border); }
.table td { border-bottom: 1px solid var(--c-border); color: var(--c-text); vertical-align: top; }
.table tbody tr:hover { background: var(--c-surface-2); }
.table thead tr[style] { background: var(--c-surface-2) !important; }

/* Статусы */
.badge { border-radius: 999px; font-size: 12px; font-weight: 600; padding: 2px 9px; border: 1px solid transparent; white-space: nowrap; }
.badge-pending { background: var(--c-warning-soft); color: var(--c-warning); border-color: #f3dcae; }
.badge-in_work { background: var(--c-primary-soft); color: var(--c-primary-text); border-color: #c9dafc; }
.badge-on_warehouse { background: #f1ecfd; color: #5b21b6; border-color: #ddd0fa; }
.badge-finished, .badge-delivered { background: var(--c-success-soft); color: #15803d; border-color: #bfe5cc; }
.badge-canceled, .badge-error { background: var(--c-danger-soft); color: #b91c1c; border-color: #f6c5c5; }

/* ---------- Модальные окна ---------- */
.modal, .modal-overlay { background: var(--c-overlay); backdrop-filter: none; }
.modal-content { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.modal-header { background: var(--c-surface); border-bottom: 1px solid var(--c-border); padding: 14px 20px; }
.modal-title { font-size: 17px; font-weight: 650; color: var(--c-text); }
.modal-close { color: var(--c-muted); width: 32px; height: 32px; border-radius: var(--radius); }
.modal-close:hover { background: var(--c-hover); color: var(--c-text); }
.modal-body { padding: 16px 20px; }
.modal-footer { background: var(--c-surface); border-top: 1px solid var(--c-border); }
/* Короткие окна (касса, смена) — по содержимому, а не на весь экран */
div.modal-content.shift-modal { height: auto; max-height: 92vh; max-width: 520px; width: calc(100% - 32px); }
div.modal-content.shift-modal .modal-body { max-height: none; overflow-y: auto; }
/* Формы-карточки (заявка, перемещение, возврат, смена) — широкие, колонки не вылезают за окно */
form.modal-content.shift-modal { width: calc(100% - 32px); max-width: 1200px; height: auto; max-height: 94vh; }
form.modal-content.shift-modal .modal-body { overflow-x: hidden; }
#refund_form.modal-content.shift-modal:not(:has(.content-grid)) { max-width: 760px; }
.content-grid > *, .two-columns > *, .three-columns > *, .four-columns > * { min-width: 0; }
.content-grid .form-input, .content-grid select, .content-grid input:not([type="checkbox"]):not([type="radio"]) { width: 100%; max-width: 100%; box-sizing: border-box; }
@media (max-width: 900px) { .content-grid, .fist-col-large-grid, .second-col-large, .first-col-wide { grid-template-columns: minmax(0, 1fr); } }
div.modal-content.shift-modal.shift-history-modal { max-width: 1000px; min-height: 0; }
.shift-history-modal .four-columns { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; gap: 12px; align-items: end; }
.shift-history-modal .four-columns .form-group { margin: 0; }
.shift-history-modal .four-columns br { display: none; }
.shift-history-modal .four-columns .form-group > .form-label { display: block; margin: 0 0 4px; line-height: 18px; }
.shift-history-modal .four-columns select, .shift-history-modal .four-columns input { box-sizing: border-box; height: 40px !important; min-height: 40px !important; width: 100%; padding-top: 0; padding-bottom: 0; }
.shift-history-modal .four-columns .btn { height: 40px; }
.shift-history-modal #historyForm + br { display: none; }
#historyResult { margin-top: 14px; }
@media (max-width: 700px) { .shift-history-modal .four-columns { grid-template-columns: 1fr 1fr; } }
/* Фильтры — окно по центру */
#modal-filters .modal-content { width: min(480px, calc(100vw - 32px)); max-width: 480px; height: auto; margin: 12vh auto 0; }
#modal-filters .filter-item { align-items: center; gap: 12px; padding: 6px 0; }
#modal-filters .filter-group--date-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
#modal-filters .filter-group--date-range .filter-item { min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 4px; }
#modal-filters .filter-group--date-range .filter-item label { flex: none; }
#modal-filters .filter-item label { flex: 0 0 130px; margin: 0; }
#modal-filters .filter-item select, #modal-filters .filter-item .date-input { flex: 1; width: auto; min-width: 0; height: 36px; }
#modal-filters .filter-item .checkbox { width: 18px; height: 18px; flex: none; margin-left: auto; }

/* ---------- Главная ---------- */
.shift-info { background: var(--c-surface); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 16px 20px; }
.shift-info.shift-open { background: var(--c-success-soft); border-color: #bfe5cc; color: #14532d; }
.shift-info.shift-closed { background: var(--c-danger-soft); border-color: #f6c5c5; color: #7f1d1d; }
.shift-status { font-size: 0; }
.shift-status::before { font: 900 22px/1 "Font Awesome 6 Free"; }
.shift-open .shift-status::before { content: "\f058"; color: var(--c-success); }
.shift-closed .shift-status::before { content: "\f057"; color: var(--c-danger); }
.quick-actions { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.quick-action {
    display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
    padding: 14px 16px; border: 1px solid var(--c-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); background: var(--c-surface);
}
.quick-action:hover { transform: none; border-color: #c9dafc; box-shadow: var(--shadow); }
.quick-action-icon { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: var(--radius); background: var(--c-primary-soft); color: var(--c-primary); display: grid; place-items: center; font-size: 0; margin: 0; }
.quick-action-icon::before { font: 900 17px/1 "Font Awesome 6 Free"; content: "\f0e7"; }
.quick-action-title { margin: 0; font-size: 14px; color: var(--c-text); }
.quick-action-desc { color: var(--c-muted); }
.quick-action[onclick*="'orders',0"] .quick-action-icon::before { content: "\2b"; }
.quick-action[onclick*="supplier_requests"] .quick-action-icon::before { content: "\f0d1"; }
.quick-action[onclick*="addCash"] .quick-action-icon { background: var(--c-success-soft); color: var(--c-success); }
.quick-action[onclick*="addCash"] .quick-action-icon::before { content: "\f067"; }
.quick-action[onclick*="removeCash"] .quick-action-icon { background: var(--c-danger-soft); color: var(--c-danger); }
.quick-action[onclick*="removeCash"] .quick-action-icon::before { content: "\f068"; }
.quick-action[onclick*="showShift"] .quick-action-icon::before { content: "\f017"; }
.quick-action[onclick*="showShift('show')"] .quick-action-icon::before { content: "\f06e"; }
.quick-action[onclick*="openShiftHistoryModal"] .quick-action-icon::before { content: "\f1da"; }
.shift-info .quick-action { min-width: 150px; }

/* ---------- Архив заказов (OrdersTemplates.js) ---------- */
.order-head { white-space: normal; }
.order-head strong, .order-date { white-space: nowrap; }
.order-head strong { font-size: 15px; }
.order-date { display: block; color: var(--c-muted); font-size: 12px; margin-top: 2px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.order-actions .btn { padding: 5px 9px; font-size: 12px; font-weight: 600; gap: 5px; }
.order-actions .btn i { font-size: 11px; }
.order-pay { min-width: 190px; font-size: 13px; }
.order-pay-bar { height: 6px; border-radius: 999px; background: var(--c-hover); overflow: hidden; margin: 2px 0 6px; }
.order-pay-bar span { display: block; height: 100%; background: var(--c-success); border-radius: 999px; }
.order-pay-sum { color: var(--c-text-2); margin-bottom: 4px; }
.order-pay-line { color: var(--c-text-2); line-height: 1.5; }
.order-pay-line small { color: var(--c-muted); }
.order-pay-debt { color: var(--c-danger); font-weight: 600; margin-top: 2px; }
.order-pay-ok { color: var(--c-success); font-weight: 600; margin-top: 2px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--c-muted); }

/* ---------- Отчёт «Движение средств» (today_cash_movements.php: классы в духе Bootstrap без самого Bootstrap) ---------- */
#historyResult .card { box-shadow: none; }
#historyResult .card-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 14px 16px; background: var(--c-surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
#historyResult .card-header h5 { margin: 0; font-size: 15px; font-weight: 650; }
#historyResult .card-header > small { color: var(--c-muted); }
#historyResult .three-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 4px 0 0; }
#historyResult .three-columns .card { border-radius: var(--radius); padding: 10px 14px; }
#historyResult .three-columns .card-body { text-align: left; padding: 0; }
#historyResult .three-columns h5 { margin: 2px 0 0; font-size: 20px; font-variant-numeric: tabular-nums; }
#historyResult .bg-success-subtle { background: var(--c-success-soft); border-color: #bfe5cc; }
#historyResult .bg-danger-subtle { background: var(--c-danger-soft); border-color: #f6c5c5; }
#historyResult .card-body { padding: 14px 16px; }
#historyResult .alert { text-align: center; padding: 28px 12px; color: var(--c-text-2); }
#historyResult .alert h5 { margin: 0 0 4px; font-size: 15px; }
#historyResult .alert p { margin: 0; }
#historyResult h5.mt-4 { font-size: 14px; margin: 16px 0 8px; }
#historyResult .table { width: 100%; }
#historyResult .table td, #historyResult .table th { padding: 8px 10px; }
.text-success { color: #15803d !important; }
.text-danger { color: var(--c-danger); }
.text-muted, .small.text-muted { color: var(--c-muted); }
.text-end { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Карточка заказа: блок оплаты без насыщенной зелёной заливки ---------- */
.payment-summary { background: var(--c-surface-2); color: var(--c-text); border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.payment-summary label, .payment-summary .form-label { color: var(--c-text-2); }

/* ---------- Кнопки-иконки в строках таблиц: значки FA вместо эмодзи (onclick не трогаем) ---------- */
.actions-cell .btn-icon, .order-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.actions-cell .btn-icon { font-size: 0; height: 32px; min-width: 32px; padding: 0 9px; color: var(--c-text-2); }
.actions-cell .btn-icon::before { font: 900 13px/1 "Font Awesome 6 Free"; content: "\f303"; }
.actions-cell .btn-icon[title="Просмотр"]::before { content: "\f06e"; }
.actions-cell .btn-icon > i { display: none; }
.actions-cell .btn-icon[title="Продать"] { background: var(--c-primary-soft, #eff4ff); border-color: #c7d7fe; color: var(--c-primary); }
.actions-cell .btn-icon[title="Продать"]::before { content: "\f07a"; }
.actions-cell .btn-icon[title="Продать"]::after { content: "Продать"; font-size: 13px; font-weight: 600; line-height: 1; }
.actions-cell .btn-icon:hover { color: var(--c-primary); border-color: var(--c-primary); }
.actions-cell .actions-wrapper { gap: 6px; flex-wrap: nowrap; }
.card-footer { align-items: center; min-height: 48px; }
.card-footer .total-count { flex: 1 1 auto; }
.card-footer .table-pagination { flex: 0 0 auto; align-items: center; }
.payment-field-error { display: block; margin-top: 4px; color: var(--c-danger, #dc2626); font-size: 12px; line-height: 1.3; }
.payment-summary [aria-invalid="true"] { border-color: var(--c-danger, #dc2626) !important; box-shadow: 0 0 0 2px rgba(220, 38, 38, .12); }
@media (max-width: 700px) {
    #modal-filters .filter-group--date-range .filter-item label { flex-basis: 110px; }
    .card-footer { gap: 8px; flex-wrap: wrap; }
    .card-footer .table-pagination { margin-left: auto; }
}

/* ---------- Карточка заказа: оплата строками «сумма · дата · способ» ---------- */
@media (min-width: 901px) {
  .payment-summary > .three-columns { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 1fr); column-gap: 16px; row-gap: 10px; align-items: end; }
  .payment-summary > .three-columns > .column { display: contents; }
  .payment-summary > .three-columns > .column > .payment-item { margin: 0; grid-column: 1; }
  .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(2) { grid-row: 1; }
  .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(3) { grid-row: 2; }
  .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(4) { grid-row: 3; }
  .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(5) { grid-row: 4; }
  .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(6) { grid-row: 5; }
  .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(1) { grid-column: 3; grid-row: 4; }
  .payment-summary > .three-columns > .column:nth-child(2) > .payment-item { grid-column: 2; }
  .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(1) { grid-row: 1; }
  .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(2) { grid-row: 2; }
  .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(3) { grid-row: 3; }
  .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(4) { grid-row: 4; }
  .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(5) { grid-row: 5; }
  .payment-summary > .three-columns > .column:nth-child(3) > .payment-item { grid-column: 3; align-self: start; }
  .payment-summary > .three-columns > .column:nth-child(3) > .payment-item:nth-child(1) { grid-row: 1 / span 2; }
  .payment-summary > .three-columns > .column:nth-child(3) > .payment-item:nth-child(2) { grid-row: 3 / span 2; }
}
.payment-summary .payment-item { display: block; }
.payment-summary .payment-item .flex-shrink { display: block; font-size: 13px; color: var(--c-text-2); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.payment-summary .two-columns.small-input-padding { grid-template-columns: minmax(80px, 1fr) minmax(130px, 1fr); gap: 8px; }
.payment-summary input[type="date"] { min-width: 0; padding-left: 8px; padding-right: 4px; }

/* ---------- Окно выбора товара ---------- */
#modalProductSelect .category-bar { gap: 10px; }
#modalProductSelect .category-bar { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
#modalProductSelect .search-container { max-width: 420px; }
#modalProductSelect .product-search-bar { display: flex; align-items: center; position: relative; }
#modalProductSelect .product-search-bar .search-input { flex: 1; height: 38px; padding-right: 64px; border-radius: var(--radius); }
#modalProductSelect .product-search-bar .search-btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; font-size: 0; background: none; border: 0; width: 28px; height: 28px; padding: 0; line-height: 1; color: var(--c-muted); }
#modalProductSelect .product-search-bar .search-btn::before { font: 900 14px/1 "Font Awesome 6 Free"; content: "\f002"; }
#modalProductSelect .product-search-bar .clear-btn { right: 36px; top: 50%; transform: translateY(-50%); }
#modalProductSelect .filter-row-in-choose { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0; }
#modalProductSelect .select-warehouse-choose-prod { display: flex; align-items: center; gap: 10px; min-width: 0; }
#modalProductSelect .select-warehouse-choose-prod .filter-item { display: flex; align-items: center; gap: 10px; margin: 0; }
#modalProductSelect .select-warehouse-choose-prod .filter-item label { white-space: nowrap; }
#modalProductSelect .select-warehouse-choose-prod .dropdown-filter { width: auto; min-width: 180px; height: 40px; }
#modalProductSelect .product-card { align-items: center; min-width: 0; }
#modalProductSelect .product-info { min-width: 0; }
#modalProductSelect .product-name { overflow-wrap: anywhere; }
#modalProductSelect .product-card-right-container { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 4px; }
#modalProductSelect .product-card-right-container-block { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
#modalProductSelect .product-price { width: auto; min-width: 92px; padding: 0; white-space: nowrap; }
#modalProductSelect .product-actions { align-items: flex-end; }
#modalProductSelect .product-details { margin-top: 2px; }
#modalProductSelect .category-tab .tab-icon { display: none; }

/* ---------- Главная продавца: смена и быстрые действия ---------- */
.quick-actions { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.current-shift-info > .shift-info:not(.shift-open):not(.shift-closed) { display: flex; gap: 10px; align-items: stretch; padding: 10px; }
.current-shift-info > .shift-info:not(.shift-open):not(.shift-closed) .quick-action { display: flex; flex: 1; flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; min-height: 0; }
.current-shift-info > .shift-info:not(.shift-open):not(.shift-closed) .quick-action-icon { margin: 0; flex: none; }
.current-shift-info > .shift-info:not(.shift-open):not(.shift-closed) .quick-action-desc { font-size: 14px; font-weight: 600; color: var(--c-text); text-align: left; }
.main-content td[style*="e6ffe6"] { background: var(--c-success-soft) !important; color: #14532d; }

/* ---------- U3: рамка карточек (Tpl/cards/*) ---------- */
/* Ширина: короткие карточки (клиент, поставщик, салон…) больше не сжимаются до ширины одного поля */
form.modal-content:not(.shift-modal) { min-width: min(680px, calc(100vw - 32px)); }

/* Заголовок: «Товар #871», дата создания — серой строкой ниже, удалённая запись — красной меткой */
.modal-title .card-sub { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--c-muted); }
.modal-title .card-deleted { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; vertical-align: middle;
    background: var(--c-danger-soft); color: #b91c1c; border: 1px solid #f6c5c5; }
.modal-title-and-icon { display: flex; align-items: center; gap: 10px; }
.modal-title-and-icon > i { color: var(--c-primary); }

/* Подвал: «Удалить» и «Возврат» слева, справа «Отмена/Очистить» (второстепенные) и «Сохранить» (основная) */
.modal-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 20px; }
.modal-footer > * { order: 1; }
.modal-footer > div { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
.modal-footer > #delete_button { order: -2; margin-right: auto; }
.modal-footer > #refunds_button { order: -1; margin-right: auto; }
.modal-footer:has(> #refunds_button) > #delete_button { margin-right: 0; }
.modal-footer > button[type="reset"] { order: -2; margin-right: auto; }
.modal-footer .btn { height: 38px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px; }
.modal-footer .btn-success { background: var(--c-primary); border-color: var(--c-primary); }
.modal-footer .btn-success:hover:not(:disabled) { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
.modal-footer button[type="reset"], .modal-footer .btn[onclick*="closeUniversalModal"], .modal-footer .btn-outline {
    background: var(--c-surface); color: var(--c-text-2); border: 1px solid var(--c-border-strong); }
.modal-footer button[type="reset"]:hover, .modal-footer .btn[onclick*="closeUniversalModal"]:hover, .modal-footer .btn-outline:hover { background: var(--c-hover); color: var(--c-text); }
.modal-footer button[type="reset"] { border-color: transparent; }
.modal-footer #refunds_button { color: var(--c-text-2); border-color: var(--c-border-strong); }
.modal-footer #refunds_button:hover { background: var(--c-hover); color: var(--c-text); }

/* Поля: подпись над полем, у input и select одна высота 40 px (раньше 40 / 48 / 56) */
.modal-content .input:has(> .input__placeholder), .modal-content .textarea:has(> .textarea__placeholder) { display: flex; flex-direction: column; gap: 4px; }
.modal-content .input__placeholder, .modal-content .textarea__placeholder {
    position: static; order: -1; transform: none; max-width: 100%; font-size: 13px; font-weight: 500; color: var(--c-text-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: none; }
.modal-content .has-value .input__placeholder, .modal-content .has-value .textarea__placeholder,
.modal-content input:focus ~ .input__placeholder, .modal-content textarea:focus ~ .textarea__placeholder { font-size: 13px; top: auto; }
.modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), .modal-body select {
    height: 40px; padding: 0 12px; font-size: 14px; line-height: 1.3; border-radius: var(--radius); }
.modal-body textarea { padding: 8px 12px; font-size: 14px; line-height: 1.45; border-radius: var(--radius); }
.modal-body input:disabled, .modal-body textarea:disabled, .modal-body select:disabled { background: var(--c-surface-2); color: var(--c-muted); }
.modal-body .form-label, .modal-body label.form-label { font-size: 13px; font-weight: 500; color: var(--c-text-2); margin-bottom: 4px; }
.modal-body .input:has(> .input__placeholder), .modal-body .textarea:has(> .textarea__placeholder), .modal-body .form-group { margin-bottom: 12px; }

/* Разделы карточки (fieldset): заголовок внутри рамки, а не поверх неё */
.modal-body fieldset { position: relative; margin: 0 0 14px; padding: 12px 14px 14px; border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); }
.modal-body fieldset > legend { position: static; float: left; width: 100%; margin: 0 0 10px; padding: 0; font-size: 14px; font-weight: 650; color: var(--c-text); }
.modal-body fieldset > legend + * { clear: both; }

/* Фото товара: плитки с превью вместо пяти голых «Выберите файл» */
.photo-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; clear: both; }
.photo-tile { position: relative; display: flex; flex-direction: column; border: 1px dashed var(--c-border-strong); border-radius: var(--radius); background: var(--c-surface-2); overflow: hidden; }
.photo-tile.has-img, .photo-tile.is-picked { border-style: solid; border-color: var(--c-border); background: var(--c-surface); }
.photo-tile__img { display: block; aspect-ratio: 1; background: var(--c-surface-2); }
.photo-tile .gallery__button { width: auto; height: auto; }
.photo-tile.is-picked > a.photo-tile__img { display: none; }
.photo-tile__img img, .photo-tile .preview-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-tile__pick { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 6px; margin: 0;
    font-size: 12px; font-weight: 600; color: var(--c-primary); cursor: pointer; text-align: center; }
.photo-tile:not(.has-img):not(.is-picked) .photo-tile__pick { aspect-ratio: 1; flex-direction: column; color: var(--c-muted); }
.photo-tile:not(.has-img):not(.is-picked) .photo-tile__pick::before { font: 900 20px/1 "Font Awesome 6 Free"; content: "\f03e"; }
.photo-tile__pick:hover { color: var(--c-primary-hover); background: var(--c-primary-soft); }
.photo-tile__pick input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: 0; }
.photo-tile__pick input[type="file"]:focus-visible + span { outline: 2px solid var(--c-primary); outline-offset: 2px; }
.photo-tile__del { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 4px 6px 6px; font-size: 12px; color: var(--c-danger); cursor: pointer; }
.photo-tile__del input { width: 14px; height: 14px; accent-color: var(--c-danger); margin: 0; }
.photo-tile:has(.photo-tile__del input:checked) .photo-tile__img { opacity: .35; }
.photo-tile__num { position: absolute; top: 4px; left: 4px; z-index: 1; min-width: 18px; padding: 0 5px; border-radius: 999px; background: rgba(16, 24, 40, .55); color: #fff; font-size: 11px; line-height: 18px; text-align: center; pointer-events: none; }

/* ---------- U4: формы заказа и заявки поставщику ---------- */
/* «Завести новый товар» свёрнут в кнопку; поля и обработчики внутри прежние */
.quick-product { margin: 12px 0 0; border: 1px dashed var(--c-border-strong); border-radius: var(--radius-lg); background: var(--c-surface); }
.quick-product > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; list-style: none; cursor: pointer; font-weight: 600; color: var(--c-primary); user-select: none; }
.quick-product > summary::-webkit-details-marker { display: none; }
.quick-product > summary:hover { background: var(--c-primary-soft); border-radius: var(--radius-lg); }
.quick-product[open] { border-style: solid; border-color: var(--c-border); }
.quick-product[open] > summary { border-bottom: 1px solid var(--c-border); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.quick-product[open] > summary .fa-plus { transform: rotate(45deg); }
.quick-product > summary .fa-plus { transition: transform .15s; }
.modal-body .quick-product > fieldset { margin: 0; border: 0; border-radius: 0; background: none; padding: 4px 14px 14px; }
.quick-product .modal-body { padding: 0; }
.quick-product .add-product-btn { margin-top: 0; }

/* «...» вместо подсказки не несёт смысла — не показываем */
input[placeholder="..."]::placeholder, textarea[placeholder="..."]::placeholder { color: transparent; }

/* Сумма под товарами */
.order-summ-block { display: flex !important; align-items: baseline; gap: 8px; justify-content: flex-end; color: var(--c-text-2); }
.order-summ-block .product-price { font-size: 20px; font-weight: 700; color: var(--c-text); font-variant-numeric: tabular-nums; }
.order-summ-block .product-price small { font-size: inherit; }

/* Итог и долг в нижней панели — видны при любой прокрутке */
.modal-footer > .footer-total { order: -1; margin-right: auto; display: flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--c-text-2); }
.modal-footer > .footer-total b { font-size: 17px; color: var(--c-text); font-variant-numeric: tabular-nums; }
.modal-footer > .footer-total .footer-total__debt { padding: 2px 8px; border-radius: 999px; background: var(--c-danger-soft); color: var(--c-danger); }
.modal-footer > .footer-total .footer-total__debt b { font-size: 14px; color: inherit; }
.modal-footer > .footer-total .footer-total__debt[hidden] { display: none; }
.modal-footer:has(> .footer-total) > #delete_button,
.modal-footer:has(> .footer-total) > #refunds_button { margin-right: 0; }
.modal-footer:has(> .footer-total) > #refunds_button { margin-right: 8px; }
@media (max-width: 640px) { .modal-footer > .footer-total { width: 100%; order: -3; } }

/* Поле выбора файла: кнопка в стиле системы вместо серой системной */
.modal-body :not(.photo-tile__pick) > input[type="file"] { height: auto; padding: 6px; border: 1px dashed var(--c-border-strong); border-radius: var(--radius); background: var(--c-surface-2); font-size: 13px; color: var(--c-text-2); }
.modal-body :not(.photo-tile__pick) > input[type="file"]::file-selector-button { margin-right: 10px; padding: 6px 12px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); background: var(--c-surface); color: var(--c-text); font: inherit; font-weight: 600; cursor: pointer; }
.modal-body :not(.photo-tile__pick) > input[type="file"]::file-selector-button:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* ---------- U5: смена и главная ---------- */
.ta-r { text-align: right !important; }
.table__wrapper, .table-scroll { overflow-x: auto; }

/* Касса на главной: колонка «Остаток сейчас» выделена */
.cash-balances td.cash-now { background: var(--c-success-soft); font-weight: 700; color: #14532d; }
.cash-balances td { font-size: 15px; color: #202838; }
.cash-balances td.cash-in, .cash-balances td.cash-out { font-weight: 600; }
.cash-balances td.cash-now { font-size: 16px; }
.cash-balances th { font-size: 13px; color: var(--c-text-2); border-bottom-color: var(--c-border-strong); }
.cash-balances th.cash-now { color: var(--c-text); }
.cash-balances td.cash-now.muted { color: var(--c-muted); font-weight: 600; }
.cash-balances td.cash-now.text-danger { color: var(--c-danger); }

/* Ссылка на документ — компактный бейдж, а не синяя ссылка браузера */
a.document-source-link { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--c-primary-soft); color: var(--c-primary-text) !important; font-size: 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
a.document-source-link:hover { background: var(--c-primary); color: #fff !important; }

/* Просмотр смены */
.shift-view { display: flex; flex-direction: column; gap: 14px; }
.shift-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.shift-kpi { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); }
.shift-kpi > span { font-size: 12px; color: var(--c-muted); }
.shift-kpi > b { font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.shift-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 16px; margin: 0; padding: 12px 14px; border-radius: var(--radius-lg); background: var(--c-surface-2); }
.shift-facts dt { font-size: 12px; font-weight: 500; color: var(--c-muted); }
.shift-facts dd { margin: 2px 0 0; color: var(--c-text); }
.shift-subtitle { display: flex; align-items: baseline; gap: 8px; margin: 4px 0 0; font-size: 15px; font-weight: 650; }
.shift-subtitle .muted { font-size: 13px; font-weight: 500; }
.shift-table { width: 100%; }
.shift-table th, .shift-table td { padding: 8px 10px; }
.shift-table td { font-size: 14px; font-weight: 500; color: #202838; }
.shift-table td.num, .shift-table td.text-success, .shift-table td.text-danger { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.shift-table th { font-size: 13px; color: var(--c-text-2); border-bottom-color: var(--c-border-strong); }

/* ---------- U6: телефон и планшет ---------- */
form.modal-content.shift-modal:has(.shift-view) { min-width: min(900px, calc(100vw - 32px)); }

/* Меню на узких экранах: кнопка ☰ и затемнение (раньше меню было скрыто без способа открыть) */
.mobile-menu-btn, .mobile-menu-backdrop { display: none; }
@media (max-width: 1024px) {
    .mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; position: fixed; top: 12px; left: 12px; z-index: 102; width: 40px; height: 40px; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); color: var(--c-text); box-shadow: var(--shadow-sm); font-size: 18px; cursor: pointer; }
    body.menu-open .sidebar { transform: translateX(0); box-shadow: var(--shadow-lg); }
    body.menu-open .mobile-menu-backdrop { display: block; position: fixed; inset: 0; z-index: 99; background: var(--c-overlay); }
    body.menu-open .mobile-menu-btn { left: 272px; }
    .top-bar { padding-left: 64px !important; }
}

/* Телефон: карточка на весь экран, кнопки компактно в два ряда */
@media (max-width: 640px) {
    #modalContainer .modal { padding: 0 !important; align-items: stretch; }
    #modalContainer .modal-dialog { margin: 0 !important; width: 100% !important; max-width: none !important; height: 100% !important; max-height: none !important; transform: none !important; }
    #modalContainer .modal-content { width: 100% !important; min-width: 0 !important; max-width: none !important; height: 100% !important; max-height: none !important; margin: 0 !important; border-radius: 0 !important; }
    #modalContainer .modal-body { padding: 12px !important; }
    #modalContainer .modal-header { padding: 12px 14px; }
    .modal-footer { flex-direction: row !important; flex-wrap: wrap; justify-content: flex-end; gap: 6px !important; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)) !important; }
    .modal-footer .btn { height: 36px; padding: 0 12px; font-size: 13px; }
    .modal-footer > div { flex-wrap: nowrap !important; gap: 6px !important; margin-left: auto; }
    .modal-footer > .footer-total { width: 100%; order: -3; margin: 0; }
    .modal-footer > .footer-total b { font-size: 15px; }
    .modal-footer .fa-print + * , .modal-footer .btn-outline:has(.fa-print) { font-size: 0; gap: 0; }
    .modal-footer .btn-outline:has(.fa-print) .fa-print { font-size: 14px; }
}

/* Главная на телефоне: статус смены и кнопки смены — друг под другом */
@media (max-width: 640px) {
    .current-shift-info { display: flex !important; flex-direction: column; gap: 10px; }
    .current-shift-info > .shift-info { width: 100%; min-width: 0; }
    .current-shift-info > .shift-info:not(.shift-open):not(.shift-closed) .quick-action { min-width: 0; }
}

/* Пустые блоки поиска и действий в шапке (на главной) не рисуют рамку-точку */
.top-bar .search-filter-group:not(:has(*)), .top-bar .top-actions:not(:has(*)) { display: none; }

/* ---------- U7 (16.11): приёмы из макета ---------- */

/* Переключатели вместо квадратных флажков (Forms checkbox: .checkbox_input > input + .checkbox__check_mark) */
.checkbox_input { gap: 10px; cursor: pointer; line-height: 1.35; }
.checkbox_input .checkbox__check_mark { position: relative; width: 34px; height: 20px; margin: 0; border: 0; border-radius: 999px; background-image: none !important; background-color: var(--c-border-strong); transition: background-color .15s; }
.checkbox_input .checkbox__check_mark::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .25); transition: transform .15s; }
.checkbox_input input:checked + .checkbox__check_mark { background-color: var(--c-primary); }
.checkbox_input input:checked + .checkbox__check_mark::after { transform: translateX(14px); }
.checkbox_input .tit { color: var(--c-text-2); font-size: 13px; }
.checkbox_input.disabled .checkbox__check_mark { opacity: .6; }

/* Оплата: плитки «Сумма / Оплачено / Долг» */
.pay-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.pay-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 10px 14px; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); }
.pay-tile small { font-size: 12px; color: var(--c-muted); }
.pay-tile b { font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pay-tile.is-debt { background: var(--c-danger-soft); border-color: #f2c4c4; }
.pay-tile.is-debt b { color: var(--c-danger); }
.pay-tile.is-ok { background: var(--c-success-soft); border-color: #bfe5cb; }
.pay-tile.is-ok b { color: var(--c-success); }
.pay-tile.is-over { background: var(--c-warning-soft); border-color: #f3d9a4; }
.pay-tile.is-over b { color: var(--c-warning); }
.pay-bar { height: 6px; margin-top: 6px; border-radius: 999px; background: var(--c-border); overflow: hidden; }
.pay-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--c-success); transition: width .2s; }
@media (max-width: 640px) {
    .pay-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pay-tiles > :first-child { grid-column: 1 / -1; }
}

/* Оплата: пустые слоты (Предоплата 2, Доплаты, Оплата доставки) убраны под кнопки «+» */
.payment-summary .payment-item.pay-slot-empty { display: none !important; }
.pay-add { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; padding-top: 12px; border-top: 1px dashed var(--c-border-strong); }
.pay-add > span { margin-right: 4px; font-size: 13px; color: var(--c-muted); }
.pay-add button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--c-border-strong); border-radius: var(--radius); background: var(--c-surface); color: var(--c-primary); font-size: 13px; font-weight: 600; cursor: pointer; }
.pay-add button:hover { border-color: var(--c-primary); background: var(--c-primary-soft); }
@media (min-width: 901px) {
    .payment-summary > .three-columns { row-gap: 0; }
    .payment-summary > .three-columns > .column > .payment-item { margin-bottom: 10px; }
}

/* Товар в заказе: подписи цен и количество кнопками − / + */
.price-cap { display: block; margin: 0 0 2px; font-size: 11px; font-weight: 500; color: var(--c-muted); }
.products-table .product-price br { display: none; }
.products-table .product-price .price-cap ~ .price-cap { margin-top: 6px; }
#modalContainer .quantity-control { display: inline-flex; align-items: stretch; gap: 0; border: 1px solid var(--c-border-strong); border-radius: var(--radius); background: var(--c-surface); overflow: hidden; }
#modalContainer .quantity-control .quantity-btn { width: 32px; height: auto; min-height: 34px; border: 0; border-radius: 0; background: var(--c-surface-2); color: var(--c-text-2); font-size: 16px; font-weight: 600; }
#modalContainer .quantity-control .quantity-btn:hover { background: var(--c-primary-soft); color: var(--c-primary); }
#modalContainer .quantity-control .quantity-input { width: 46px !important; min-width: 0; height: 34px !important; margin: 0 !important; padding: 0 4px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; text-align: center; -moz-appearance: textfield; }
#modalContainer .quantity-control .quantity-input::-webkit-inner-spin-button, #modalContainer .quantity-control .quantity-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#modalContainer .quantity-control:focus-within { border-color: var(--c-primary); box-shadow: var(--c-focus); }

/* Главная: статус смены — точка и время открытия вместо ✅/❌ */
.current-shift-info .shift-status { display: none; }
.current-shift-info .shift-details { display: flex; align-items: center; gap: 14px; }
.current-shift-info .shift-details h3 { margin: 0; }
.shift-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c-success); box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); }
.shift-closed .shift-dot { background: var(--c-danger); box-shadow: 0 0 0 4px rgba(220, 38, 38, .15); }
.shift-open .shift-dot { animation: shift-pulse 2.4s ease-in-out infinite; }
@keyframes shift-pulse { 50% { box-shadow: 0 0 0 8px rgba(22, 163, 74, .06); } }
.shift-sub { margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--c-text-2); }

/* Главная: цифры дня плитками */
.home-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 16px; }
.home-kpis[hidden] { display: none; }
.home-kpi { min-width: 0; padding: 14px 16px; border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); box-shadow: var(--shadow-sm); }
.home-kpi small { display: block; font-size: 12px; color: var(--c-muted); }
.home-kpi b { display: block; margin: 4px 0 2px; font-size: 22px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-kpi span { font-size: 12px; color: var(--c-muted); }
.home-kpi.is-debt b { color: var(--c-danger); }
@media (max-width: 900px) { .home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 380px) { .home-kpi b { font-size: 18px; } }

/* Главная: касса — приход зелёным с «+», расход красным с «−», пустые кассы одной строкой */
.cash-balances td.cash-in { color: var(--c-success); }
.cash-balances td.cash-out { color: var(--c-danger); }
.cash-balances tr.cash-idle td { padding-top: 8px; padding-bottom: 8px; font-size: 13px; color: var(--c-muted); background: var(--c-surface-2); }

/* Главная: заказы смены — строка открывает заказ, долг под суммой, статус цветом */
#current_shift_orders_table .order-no { font-weight: 700; }
#current_shift_orders_table .order-debt { display: block; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--c-danger); }
#current_shift_orders_table .total-status-wrapper { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
#current_shift_orders_table th, #current_shift_orders_table td { padding: 10px; }
#current_shift_orders_table .comment-cell { min-width: 0 !important; width: auto !important; max-width: 200px; }
.status-badge { text-transform: none; letter-spacing: 0; display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--c-primary-soft); color: var(--c-primary-text); }
.status-badge.is-done { background: var(--c-success-soft); color: var(--c-success); }
.status-badge.is-hold { background: var(--c-warning-soft); color: var(--c-warning); }
.status-badge.is-cancel { background: var(--c-danger-soft); color: var(--c-danger); }
.table td.table-empty { padding: 28px 16px !important; text-align: center; color: var(--c-muted); }
.table-empty i { display: block; margin-bottom: 6px; font-size: 22px; color: var(--c-border-strong); }

/* Витрина: остаток бейджами, закупка серым с наценкой */
.stock-line { display: flex; align-items: center; gap: 6px; margin: 2px 0; white-space: nowrap; }
.stock-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--c-success-soft); color: var(--c-success); }
.stock-badge.is-neg { background: var(--c-danger-soft); color: var(--c-danger); }
.stock-badge.is-zero { background: var(--c-surface-2); color: var(--c-muted); border: 1px solid var(--c-border); }
.stock-wh { font-size: 12px; color: var(--c-text-2); }
.p-name { font-weight: 600; color: var(--c-text); }
.p-cat { font-size: 12px; color: var(--c-muted); }
.p-sub { font-size: 12px; color: var(--c-muted); }
.content-area .actions-cell { white-space: nowrap; }
.actions-cell .btn-icon[title="Продать"] { width: auto; }

/* Меню: свернуть до значков (компьютер), состояние помнится в браузере */
.sidebar-collapse-btn { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; color: var(--c-muted); }
.sidebar-collapse-btn .menu-icon::before { content: "\f100"; }
@media (max-width: 1024px) { .sidebar-collapse-btn { display: none !important; } }
@media (min-width: 1025px) {
    body.sidebar-collapsed .sidebar { width: 64px; overflow-x: hidden; }
    body.sidebar-collapsed .main-content { margin-left: 64px; }
    body.sidebar-collapsed .sidebar-header { padding: 14px 8px; text-align: center; }
    body.sidebar-collapsed .sidebar-header .store-name, body.sidebar-collapsed .sidebar-header .user-info { display: none; }
    body.sidebar-collapsed .sidebar-header::before { content: "\f54e"; font: 900 16px/1 "Font Awesome 6 Free"; color: var(--c-primary); }
    body.sidebar-collapsed .menu-text { display: none; }
    body.sidebar-collapsed .menu-item, body.sidebar-collapsed .admin-block-menu-item { justify-content: center; padding: 9px 0; }
    body.sidebar-collapsed .menu-item:hover, body.sidebar-collapsed .admin-block-menu-item:hover { padding-left: 0; }
    body.sidebar-collapsed .admin-block-title { height: 1px; margin: 8px 6px; padding: 0; overflow: hidden; font-size: 0; background: var(--c-border); }
    body.sidebar-collapsed .sidebar-collapse-btn .menu-icon::before { content: "\f101"; }
}

/* Окно выбора товара: поиск первым, категории в одну строку с прокруткой, остаток бейджем */
#modalProductSelect .category-bar { gap: 10px; }
#modalProductSelect .search-container { order: -1; }
#modalProductSelect .category-tabs { flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
#modalProductSelect .category-tabs::-webkit-scrollbar { display: none; }
#modalProductSelect .category-tab { flex: none; white-space: nowrap; }
#modalProductSelect .category-tab .tab-icon { display: none; }
#modalProductSelect .product-source-price { font-size: 12px; font-weight: 500; color: var(--c-muted); }
#modalProductSelect .product-source-price::before { content: "закуп. "; font-weight: 400; }
#modalProductSelect .product-details { display: inline-flex; align-self: flex-end; align-items: center; height: 22px; margin-top: 6px; padding: 0 8px; border-radius: 999px; background: var(--c-success-soft); color: var(--c-success); font-weight: 600; white-space: nowrap; }
#modalProductSelect .product-details br { display: none; }

/* Телефон: строки таблиц — карточки «подпись: значение» (подписи берутся из шапки таблицы, ui.labelTables) */
@media (max-width: 640px) {
    .content-area table.table.is-cards { display: block; width: 100%; min-width: 0 !important; border: 0; background: none; }
    .content-area table.table.is-cards > thead { display: none; }
    .content-area table.table.is-cards > tbody { display: flex; flex-direction: column; gap: 10px; }
    .content-area table.table.is-cards > tbody > tr { display: block; padding: 10px 12px; border: 1px solid var(--c-border); border-radius: var(--radius-lg); background: var(--c-surface); box-shadow: var(--shadow-sm); }
    .content-area table.table.is-cards > tbody > tr > td { display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 5px 0 !important; border: 0 !important; background: none !important; text-align: left !important; white-space: normal; min-width: 0; }
    .content-area table.table.is-cards > tbody > tr > td::before { content: attr(data-label); font-size: 12px; color: var(--c-muted); }
    .content-area table.table.is-cards > tbody > tr > td { row-gap: 2px; width: auto !important; max-width: none !important; }
    .content-area table.table.is-cards > tbody > tr > td > * { grid-column: 2; min-width: 0; }
    .content-area table.table.is-cards > tbody > tr > td:not([data-label]) > *, .content-area table.table.is-cards > tbody > tr > td[data-label=""] > * { grid-column: 1; }
    .content-area table.table.is-cards .product-attributes { flex-wrap: wrap; white-space: normal; }
    .content-area table.table.is-cards > tbody > tr > td:not([data-label]), .content-area table.table.is-cards > tbody > tr > td[data-label=""] { grid-template-columns: minmax(0, 1fr); }
    .content-area table.table.is-cards > tbody > tr > td:not([data-label])::before, .content-area table.table.is-cards > tbody > tr > td[data-label=""]::before { display: none; }
    .content-area table.table.is-cards > tbody > tr > td.actions-cell { display: flex; justify-content: flex-end; width: auto; margin-top: 6px; padding-top: 10px !important; border-top: 1px solid var(--c-border) !important; }
    .content-area table.table.is-cards > tbody > tr > td.actions-cell::before { display: none; }
    .content-area table.table.is-cards > tbody > tr > td.actions-cell > * { grid-column: auto; }
    .content-area table.table.is-cards > tbody > tr > td.cash-now { padding: 6px 8px !important; border-radius: var(--radius-sm); background: var(--c-success-soft) !important; }
    .content-area table.table.is-cards img { max-width: 64px; height: auto; }
    .content-area .table__wrapper:has(> table.is-cards) { overflow: visible; }
    .content-area .card:has(> .table__wrapper > table.is-cards), .content-area .card:has(> table.is-cards) { background: none; border: 0; box-shadow: none; }
}
.actions-cell .btn-icon[title="Печать"]::before { content: "\f02f"; }
.badge-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; margin-left: 6px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--c-border); background: var(--c-surface-2); font-size: 12px; font-weight: 600; color: var(--c-text-2); vertical-align: 2px; }

/* Телефон: первая ячейка карточки — заголовок (без подписи), быстрые действия — плитки в две колонки */
@media (max-width: 640px) {
    .content-area table.table.is-cards > tbody > tr > td:first-child { grid-template-columns: minmax(0, 1fr); margin-bottom: 4px; padding-bottom: 8px !important; border-bottom: 1px solid var(--c-border) !important; font-weight: 600; }
    .content-area table.table.is-cards > tbody > tr > td:first-child::before { display: none; }
    .content-area table.table.is-cards > tbody > tr > td:first-child > * { grid-column: 1; }
    .content-area table.table.is-cards > tbody > tr > td.table-empty { margin: 0; padding: 20px 0 !important; border: 0 !important; font-weight: 400; }
    .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
    .quick-actions .quick-action { padding: 12px; }
    .quick-actions .quick-action-desc { display: none; }
    .quick-actions .quick-action-title { font-size: 13px; line-height: 1.3; }
}

/* Оплата на планшете и телефоне: платёж = «сумма и дата» + «способ» рядом (≤900) или друг под другом (≤640), скидка/долг/комментарий ниже */
@media (max-width: 900px) {
    .payment-summary > .three-columns { display: grid !important; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: 10px; row-gap: 0; align-items: end; }
    .payment-summary > .three-columns > .column { display: contents; }
    .payment-summary > .three-columns > .column > * { margin: 0 0 10px; min-width: 0; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item { grid-column: 1; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(2) { grid-row: 1; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(3) { grid-row: 2; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(4) { grid-row: 3; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(5) { grid-row: 4; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(6) { grid-row: 5; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item { grid-column: 2; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(1) { grid-row: 1; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(2) { grid-row: 2; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(3) { grid-row: 3; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(4) { grid-row: 4; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(5) { grid-row: 5; }
    .payment-summary > .three-columns > .column:nth-child(3) > * { grid-column: 1 / -1; }
    .payment-summary > .three-columns > .column:nth-child(3) > :nth-child(1) { grid-row: 11; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .payment-summary > .three-columns > .column:nth-child(3) > :nth-child(2) { grid-row: 12; }
    .payment-summary .two-columns.small-input-padding { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
}
@media (max-width: 640px) {
    .payment-summary > .three-columns { grid-template-columns: minmax(0, 1fr); }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item { grid-column: 1; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(2) { grid-row: 1; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(1) { grid-row: 2; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(3) { grid-row: 3; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(2) { grid-row: 4; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(4) { grid-row: 5; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(3) { grid-row: 6; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(5) { grid-row: 7; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(4) { grid-row: 8; }
    .payment-summary > .three-columns > .column:nth-child(1) > .payment-item:nth-child(6) { grid-row: 9; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item:nth-child(5) { grid-row: 10; }
    .payment-summary > .three-columns > .column:nth-child(2) > .payment-item { margin-top: -4px; padding-bottom: 10px; border-bottom: 1px dashed var(--c-border); }
}

/* Планшет: нижняя панель карточки — как на телефоне (итог сверху, кнопки в ряд), а не столбик по центру */
@media (max-width: 1024px) {
    .modal-footer { flex-direction: row !important; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px !important; }
    .modal-footer > div { flex-wrap: nowrap !important; gap: 8px !important; margin-left: auto; }
    .modal-footer > .footer-total { width: 100%; order: -3; margin: 0; }
    .modal-footer > .btn, .modal-footer > div > .btn { width: auto !important; }
}

/* ---------- U7b (16.11): замечания владельца ---------- */
/* Страница целиком не уезжает вбок: широкие таблицы прокручиваются внутри своей карточки */
html, body { overflow-x: clip; }
.main-content { min-width: 0; }

/* «Выход» — значок в шапке меню (раньше в самом низу) */
.sidebar-header { position: relative; padding-right: 48px; }
.sidebar-logout { position: absolute; top: 12px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius); color: var(--c-muted); text-decoration: none; }
.sidebar-logout:hover { background: var(--c-danger-soft); color: var(--c-danger); }
@media (max-width: 1024px) { .sidebar-footer { display: none; } }
@media (min-width: 1025px) {
    body.sidebar-collapsed .sidebar-header { padding: 12px 8px; }
    body.sidebar-collapsed .sidebar-header::before { display: none; }
    body.sidebar-collapsed .sidebar-logout { display: none; }
}

/* В фильтрах периода поля даты сохраняют общую высоту остальных контролов. */
#modal-filters .filter-group--date-range .filter-item input.date-input {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 40px !important;
    height: 40px !important;
    max-height: none;
    padding: 6px 10px;
    line-height: normal;
}

/* Кнопки в строке — вместе (старое правило разносило их по краям) */
.content-area .actions-wrapper { justify-content: flex-start; }
.content-area table.table > tbody > tr:hover > td { background-color: var(--c-hover); }
.content-area table.table > tbody > tr:hover > td.cash-now { background-color: var(--c-success-soft); }
/* Выделение строки кликом (как в Converter); открыть — номер записи или двойной клик */
.content-area table.table > tbody > tr.is-selected > td { background-color: var(--c-primary-soft) !important; }
.content-area table.table > tbody > tr.is-selected > td:first-child { box-shadow: inset 3px 0 0 var(--c-primary); }
.row-link { color: var(--c-primary) !important; cursor: pointer; font-weight: 700; }
.row-link:hover { text-decoration: underline; }
/* Одиночная кнопка «Редактировать» под номером (заявки и др.) — компактная, рядом с номером */
.content-area tbody td:first-child > .actions-wrapper:not(.order-actions) { display: inline-flex; margin: 0 0 0 6px; vertical-align: middle; }
.content-area tbody td:first-child > .actions-wrapper:not(.order-actions) .btn-icon { width: 28px; min-width: 28px; height: 28px; font-size: 0; }
.content-area tbody td:first-child > .actions-wrapper:not(.order-actions) .btn-icon::before { font: 900 12px/1 "Font Awesome 6 Free"; content: "\f303"; }
.content-area tbody td:first-child > br + .actions-wrapper:not(.order-actions) { display: flex; margin: 6px 0 0; }

/* Архив заказов: уже по ширине — комментарий не шире 180 px */
.orders-table td.comment-cell, .orders-table .comment-cell { min-width: 0 !important; width: auto !important; max-width: 180px; }
.stock-line { white-space: normal; }
.stock-line .stock-badge { flex: none; }

/* ---------- U7c (16.11): рабочая область как в Converter (компьютер) ----------
   Страница сама не прокручивается: шапка сверху и подвал списка снизу стоят на месте,
   таблица занимает всё оставшееся место и прокручивается внутри, её заголовок прилипает. */
@media (min-width: 1025px) {
    html:has(body > .sidebar), body:has(> .sidebar) { height: 100%; overflow: hidden; }
    body:has(> .sidebar) > .main-content { height: 100vh; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
    body:has(> .sidebar) > .main-content > .top-bar { flex: none; }
    body:has(> .sidebar) > .main-content > .content-area { flex: 1 1 auto; min-height: 0; overflow: auto; }
    /* Страницы-списки (карточка с подвалом страниц): карточка во всю высоту, прокручивается только таблица; главная прокручивается целиком */
    .content-area:has(> div > .card > .card-footer) { display: flex; flex-direction: column; overflow: hidden; }
    .content-area:has(> div > .card > .card-footer) > br { display: none; }
    .content-area > div:has(> .card > .card-footer) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
    .content-area > div > .card:has(> .card-footer) { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin-bottom: 0; overflow: hidden; }
    .content-area > div > .card > .card-header, .content-area > div > .card > .card-footer { flex: none; }
    .content-area > div > .card:has(> .card-footer) > .table__wrapper { flex: 1 1 auto; min-height: 0; overflow: auto; }
    .content-area > div > .card:has(> .card-footer) > .table__wrapper > .table > thead th { position: sticky; top: 0; z-index: 2; background: var(--c-surface-2); box-shadow: inset 0 -1px 0 var(--c-border); }
}

/* Таблицы сжимаются под ширину окна вместо прокрутки вбок (старое правило: min-width: max-content + nowrap) */
.content-area .table__wrapper .table { min-width: 0; white-space: normal; }
.content-area .table .num, .content-area .table .order-date, .content-area .table .stock-badge, .content-area .table .badge, .content-area .table .status-badge, .content-area .table .actions-cell, .content-area .table .btn { white-space: nowrap; }
.content-area .table > thead th { white-space: normal; }

/* Архив заказов: колонки товаров, оплат и статуса ужимаются (с 1440 px архив помещается без прокрутки вбок) */
.orders-table .order-pay { min-width: 140px; }
.orders-table .product-attributes { flex-wrap: wrap; white-space: normal; }
.orders-table .product-in-order, .orders-table .product-in-order * { min-width: 0; white-space: normal; }
.orders-table .order-actions .btn { padding: 4px 8px; }
.orders-table td.total-status-cell { width: auto !important; min-width: 0 !important; }

/* ---------- U7d (16.11): меньше пустых полей, кнопки строки — у номера, главная компактнее ---------- */
@media (min-width: 1025px) {
    body:has(> .sidebar) > .main-content { padding-right: 0; }
    /* Шапка: заголовок слева, поиск всегда по центру, кнопки справа (даже если кнопок нет) */
    .top-bar > div:first-child { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; padding-top: 10px; padding-bottom: 10px; }
    .top-bar > div:first-child > .page-title { grid-column: 1; }
    .top-bar > div:first-child > .search-filter-group { grid-column: 2; }
    .top-bar > div:first-child > .top-actions { grid-column: 3; justify-self: end; }
    .top-bar .active-filters { padding-top: 0; padding-bottom: 10px; }
    .content-area { padding: 14px 16px; }
    .content-area > div > .card > .card-footer { padding: 8px 16px; }
}

/* Колонка «Действия» из одних значков перенесена к номеру записи (format.js) */
.col-merged { display: none !important; }
.content-area tbody td:first-child > .actions-wrapper:not(.order-actions) .btn-icon[title="Просмотр"]::before { content: "\f06e"; }
.content-area tbody td:first-child > .actions-wrapper:not(.order-actions) .btn-icon[title="Печать"]::before { content: "\f02f"; }

/* Архив: возврат и накладная — значки рядом с номером; открыть — номер или двойной клик */
.order-head .order-actions { display: inline-flex; flex-wrap: nowrap; gap: 4px; margin: 0 0 0 6px; vertical-align: middle; }
.order-actions .btn[hidden] { display: none; }
.orders-table .order-actions .btn { width: 28px; height: 28px; padding: 0; justify-content: center; color: var(--c-text-2); }
.orders-table .order-actions .btn:hover { color: var(--c-primary); border-color: var(--c-primary); }
.order-actions .btn i { font-size: 12px; }
.client-contact { margin-top: 2px; color: var(--c-muted); font-size: 12px; white-space: nowrap; }

/* Возврат: сумма с ₴ рядом с полем */
.refund-summary .summary-item { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.refund-summary .summary-item > span:first-child { flex-basis: 100%; }
.refund-summary #refund-amount { max-width: 220px; }
.refund-summary #refund-amount, .payment-summary input[type="number"], .refund-summary input[type="number"] { box-sizing: border-box; padding: 7px 10px; text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.payment-summary input[type="number"]::-webkit-inner-spin-button, .payment-summary input[type="number"]::-webkit-outer-spin-button,
.refund-summary input[type="number"]::-webkit-inner-spin-button, .refund-summary input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.modal-content input[type="number"]:not(.quantity-input) { box-sizing: border-box; padding: 7px 10px; text-align: right; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.modal-content input[type="number"]:not(.quantity-input)::-webkit-inner-spin-button,
.modal-content input[type="number"]:not(.quantity-input)::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sum-suffix { font-weight: 600; color: var(--c-text-2); }
.modal-content input[type="number"]:not(.quantity-input) { font-size: 15px; font-weight: 600; color: #202838; font-variant-numeric: tabular-nums; }
.modal-content input[type="number"]:not(.quantity-input):focus { color: #111827; }
.products-table .product-price { font-size: 15px; font-weight: 600; color: #202838; font-variant-numeric: tabular-nums; }
.products-table .price-cap { color: var(--c-text-2); font-size: 12px; }
.shift-history-modal #historyResult .table td { font-size: 14px; color: #202838; }
.shift-history-modal #historyResult .table td.text-success, .shift-history-modal #historyResult .table td.text-danger,
.shift-history-modal #historyResult .table td.text-end { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.shift-history-modal #historyResult .table thead th { font-size: 13px; color: var(--c-text-2); border-bottom-color: var(--c-border-strong); }

/* Данные кассы и заказов: чуть крупнее и выразительнее */
#current_shift_orders_table tbody td:nth-child(4),
#current_shift_orders_table tbody td:nth-child(5) {
    color: #202838;
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
#catalogPage .table tbody td:nth-child(3),
#catalogPage .table tbody td:nth-child(4) {
    color: #202838;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}
#catalogPage .table tbody td:nth-child(3) { font-weight: 600; }
#catalogPage .table tbody td:nth-child(4) b { font-weight: 700; }
.orders-table tbody td:nth-child(7) { color: #202838; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.products-table .product-sale-price,
.products-table .product-source-price { font-size: 15px !important; font-weight: 600; color: #202838; font-variant-numeric: tabular-nums; }
.products-table .price-cap { color: #4b5565; font-size: 13px; }
.shift-history-modal .four-columns select.dropdown-filter { color: #202838; font-size: 15px; font-weight: 500; }
.shift-history-modal #historyResult .table td.num { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Главная: заметнее остатки и стартовые суммы смены */
.today-shifts-table tbody td:nth-child(3),
.today-shifts-table tbody td:nth-child(5) {
    color: #202838;
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Сайдбар: спокойная тёмная slate-палитра с голубым акцентом */
.sidebar { background: #172033; color: #e8edf5; border-right-color: #29364c; }
.sidebar-header { background: #131b2b; border-bottom-color: #29364c; }
.sidebar-header h2, .sidebar-header .store-name { color: #f1f5fb; }
.sidebar-header .user-info { color: #a8b5c9; }
.sidebar-nav { background: #172033; }
.menu-item, .admin-block-menu-item { color: #c3cddd; }
.menu-item:hover, .admin-block-menu-item:hover { background: #222f45; color: #fff; }
.menu-item.active, .admin-block-menu-item.active {
    background: #263b59;
    color: #f4f8ff;
    border-left: 3px solid #60a5fa;
    padding-left: 7px;
}
.admin-block-title { color: #91a1b8; }
.menu-icon { color: #91a1b8; }
.menu-item.active .menu-icon, .admin-block-menu-item.active .menu-icon { color: #93c5fd; }
.menu-item[data-page="new-order"], .menu-item[data-page="new-order"] .menu-icon { color: #7dd3fc; }
.sidebar-footer { border-top-color: #29364c; }
.sidebar-collapse-btn { color: #a8b5c9; }
.sidebar-logout { color: #a8b5c9; }
.sidebar-logout:hover { background: #3c2631; color: #fda4af; }
body.sidebar-collapsed .sidebar-header::before { color: #93c5fd; }
body.sidebar-collapsed .admin-block-title { background: #39475d; }

@media (max-width: 640px) {
    #modalProductSelect .filter-row-in-choose { align-items: flex-start; flex-direction: column; }
    #modalProductSelect .select-warehouse-choose-prod { width: 100%; justify-content: space-between; }
    #modalProductSelect .select-warehouse-choose-prod .dropdown-filter { min-width: 0; flex: 1; }
    #modalProductSelect .product-card { flex-wrap: wrap; }
    #modalProductSelect .product-info { flex: 1 1 calc(100% - 64px); }
    #modalProductSelect .product-card-right-container { flex: 1 1 100%; flex-direction: row; justify-content: space-between; align-items: center; }
    #modalProductSelect .product-card-right-container-block { flex: 1; justify-content: flex-end; }
}

/* Заказ: поля оплаты в одну линию */
#modalContainer .payment-summary .three-columns .payment-item { margin-top: 0 !important; margin-bottom: 0 !important; }
#modalContainer .payment-summary .three-columns .payment-item .form-group { margin-bottom: 0 !important; }

/* Главная: статус смены в верхней панели; смена и касса — плашки с двумя кнопками */
.shift-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--c-border); border-radius: 999px; font-size: 13px; white-space: nowrap; }
.shift-pill.shift-open { background: var(--c-success-soft); border-color: #bfe5cc; color: #14532d; }
.shift-pill.shift-closed { background: var(--c-danger-soft); border-color: #f6c5c5; color: #7f1d1d; }
.shift-pill .shift-dot { width: 8px; height: 8px; }
.shift-pill .shift-sub { margin: 0; font-size: 12px; }
#homePage > .shift-pill { margin-bottom: 12px; }
.quick-action.qa-group { cursor: default; }
.qa-group .qa-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.qa-group .qa-buttons .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 11px; font-size: 13px; font-weight: 650; border-color: var(--c-border-strong); }
.qa-group .qa-buttons .btn i { font-size: 11px; }
.qa-group .qa-in { color: var(--c-success); }
.qa-group .qa-out { color: var(--c-danger); }
.qa-group[data-kind="cash"] .qa-in { background: var(--c-success-soft); border-color: #a8d9b8; }
.qa-group[data-kind="cash"] .qa-out { background: var(--c-danger-soft); border-color: #f0b6b6; }
.qa-group[data-kind="shift"] .quick-action-icon::before { content: "\f017"; }
.qa-group[data-kind="cash"] .quick-action-icon { background: var(--c-success-soft); color: var(--c-success); }
.qa-group[data-kind="cash"] .quick-action-icon::before { content: "\f555"; }
@media (max-width: 640px) {
    .shift-pill .shift-sub { display: none; }
}

