/* Добавьте в существующий CSS */
.payment-info {
    background: linear-gradient(135deg, #481347 0%, #001b35 100%);
    border-left: 4px solid #007bff;
}

.payment-info .info-row {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.payment-info .info-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.payment-info .info-row strong {
    color: #495057;
    min-width: 120px;
    display: inline-block;
}

.payment-status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}

.status-0 { background: #fff3cd; color: #856404; }
.status-1 { background: #d4edda; color: #155724; }
.status-2 { background: #f8d7da; color: #721c24; }









/* Стили для массовых действий - ОПТИМИЗИРОВАННАЯ ВЕРСИЯ */
.mass-actions-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #232339 100%);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #3a3a4c;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

/* Блок с выбором всех */
.select-all-container {
    padding: 8px 12px;
    background: rgba(138, 43, 226, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-height: 44px;
    flex: 1 1 auto;
    order: 1;
}

.select-all-container label {
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #e1d5f7;
    user-select: none;
    white-space: nowrap;
}

.select-all-container input[type="checkbox"] {
    accent-color: #8a2be2;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Счётчик выбранных */
#selected-counter {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    color: #a5a6b8;
    font-size: 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    order: 2;
    flex: 0 1 auto;
    min-width: 120px;
}

/* Кнопки действий */
.mass-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    order: 3;
    flex: 1 1 100%;
    margin-top: 8px;
}

.mass-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    min-height: 44px;
    text-align: center;
    flex: 1 1 auto;
    min-width: 140px;
}

/* Цвета кнопок */
.mass-action-btn.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
    color: white;
}

.mass-action-btn.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #212529;
}

.mass-action-btn.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #bd2130 100%);
    color: white;
}

.mass-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.mass-action-btn:not(:disabled):active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* МОБИЛЬНЫЕ УСТРОЙСТВА (до 768px) */
@media (max-width: 767px) {
    .mass-actions-container {
        gap: 8px;
        padding: 10px;
    }
    
    .select-all-container {
        min-height: 48px;
        flex: 1 1 100%;
        order: 1;
        justify-content: center;
        padding: 10px;
    }
    
    .select-all-container label {
        font-size: 15px;
    }
    
    .select-all-container input[type="checkbox"] {
        width: 24px;
        height: 24px;
        min-width: 24px;
        min-height: 24px;
    }
    
    #selected-counter {
        min-height: 48px;
        flex: 1 1 100%;
        order: 2;
        min-width: auto;
        padding: 12px;
        font-size: 15px;
    }
    
    .mass-buttons {
        flex-direction: column;
        gap: 10px;
        order: 3;
        margin-top: 0;
    }
    
    .mass-action-btn {
        width: 100%;
        min-height: 50px;
        font-size: 15px;
        padding: 12px 16px;
    }
    
    .mass-action-btn i {
        font-size: 16px;
    }
}

/* ПЛАНШЕТЫ (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .mass-actions-container {
        flex-wrap: nowrap;
        align-items: stretch;
    }
    
    .select-all-container {
        flex: 0 0 auto;
        width: auto;
    }
    
    #selected-counter {
        flex: 0 0 auto;
        width: auto;
        min-width: 140px;
    }
    
    .mass-buttons {
        flex: 1;
        flex-wrap: nowrap;
        margin-top: 0;
        justify-content: flex-end;
    }
    
    .mass-action-btn {
        flex: 0 0 auto;
        min-width: 150px;
    }
}

/* ДЕСКТОП (1024px и выше) */
@media (min-width: 1024px) {
    .mass-actions-container {
        flex-wrap: nowrap;
        align-items: center;
        padding: 12px 20px;
    }
    
    .select-all-container {
        flex: 0 0 auto;
        width: auto;
    }
    
    #selected-counter {
        flex: 0 0 auto;
        width: auto;
        min-width: 160px;
    }
    
    .mass-buttons {
        flex: 1;
        flex-wrap: nowrap;
        justify-content: flex-end;
        margin-top: 0;
        gap: 10px;
    }
    
    .mass-action-btn {
        flex: 0 0 auto;
        min-width: 180px;
    }
}

/* Ховеры только для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .mass-action-btn:not(:disabled):hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        filter: brightness(1.1);
    }
}

/* ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ (до 360px) */
@media (max-width: 360px) {
    .mass-actions-container {
        padding: 8px;
        gap: 6px;
    }
    
    .select-all-container {
        padding: 8px 10px;
    }
    
    .select-all-container label {
        font-size: 14px;
    }
    
    #selected-counter {
        font-size: 14px;
        padding: 10px;
    }
    
    .mass-action-btn {
        padding: 10px 12px;
        font-size: 14px;
        min-height: 44px;
    }
}

/* ЛАНДШАФТНАЯ ОРИЕНТАЦИЯ на мобильных */
@media (max-width: 767px) and (orientation: landscape) {
    .mass-actions-container {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .select-all-container {
        flex: 1;
        min-width: 200px;
    }
    
    #selected-counter {
        flex: 1;
        min-width: 200px;
    }
    
    .mass-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .mass-action-btn {
        flex: 1;
        min-width: calc(50% - 4px);
    }
}

/* Стили для чекбоксов в таблице */
.product-select {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    cursor: pointer;
    accent-color: #28a745;
    vertical-align: middle;
    -webkit-tap-highlight-color: transparent;
}

.product-select:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/* Подсветка выбранных строк */
tr.selected-row {
    background-color: rgba(40, 167, 69, 0.1) !important;
    position: relative;
}

/* Поддержка темной темы системной */
@media (prefers-color-scheme: dark) {
    .mass-actions-container {
        background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
        border-color: #30363d;
    }
    
    .select-all-container {
        background: rgba(88, 166, 255, 0.1);
        border-color: rgba(88, 166, 255, 0.3);
    }
    
    .select-all-container input[type="checkbox"] {
        accent-color: #58a6ff;
    }
    
    #selected-counter {
        background: rgba(255, 255, 255, 0.08);
        color: #c9d1d9;
    }
}

/* Отключаем анимации при prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .mass-action-btn,
    .product-select {
        transition: none;
    }
}
             
             
             
             
             
.preorder-timer {
    padding: 8px;
    border-radius: 6px;
    background: #26292c;
    text-align: center;
    transition: all 0.3s ease;
}

.preorder-timer.warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.preorder-timer.danger {
    background: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

.preorder-timer.expired {
    background: #030202;
    color: white;
    border-color: #c82333;
}







/* Добавить в существующие стили */
.user-details-modal .modal-content {
    padding: 0;
}

.user-main-info {
    display: flex;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.user-avatar .avatar-large {
    width: 80px;
    height: 80px;
    font-size: 32px;
    margin-right: 20px;
    background: rgba(255, 255, 255, 0.2);
}

.user-details h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.user-id {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.user-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
}

.user-status.banned {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.5);
}

.user-status.active {
    background: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.5);
}

.user-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    font-size: 13px;
}

.user-meta div {
    opacity: 0.9;
}

/* Табы */
.tabs-container {
    padding: 20px;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid #eaeaea;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #333;
    background: #f8f9fa;
}

.tab-btn.active {
    color: #007bff;
    border-bottom-color: #007bff;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.user-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.user-data-table th {
    background: #f8f9fa;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.user-data-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #eaeaea;
}



.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.modal-footer {
    padding: 20px 25px;

    border-top: 1px solid #eaeaea;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-radius: 0 0 10px 10px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .user-main-info {
        flex-direction: column;
        text-align: center;
    }
    
    .user-avatar .avatar-large {
        margin: 0 auto 15px;
    }
    
    .user-meta {
        grid-template-columns: 1fr;
    }
    
    .tabs-header {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: left;
        padding: 10px;
    }
    
    .user-data-table {
        display: block;
        overflow-x: auto;
    }
}             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
             
/* ====== BASE ====== */
.schedule-calendar {
    background: linear-gradient(145deg, #1a0f2e, #22123d);
    padding: 14px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    margin: 16px 0;
    color: #e6ddff;
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* 🔴 ВАЖНО */
}

/* ====== MONTH NAME ====== */
.month-name {
    text-align: center;
    font-size: 1.25em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #f1eaff;
}

/* ====== TABLE WRAP ====== */
.schedule-calendar table {
    width: 100%;
    table-layout: fixed; /* 🔴 ВАЖНО */
    border-collapse: collapse;
}

/* ====== HEADER & CELLS ====== */
.schedule-calendar th,
.schedule-calendar td {
    text-align: center;
    padding: 6px 0;
    border-radius: 12px;
    transition: all 0.25s ease;
    font-size: clamp(0.75rem, 2.5vw, 0.9rem);
}

/* ====== HEADER ====== */
.schedule-calendar th {
    background: rgba(255, 255, 255, 0.08);
    font-weight: 500;
    color: #cdbfff;
}

/* ====== CELLS ====== */
.schedule-calendar td {
    background: rgba(255, 255, 255, 0.05);
    height: clamp(34px, 9vw, 42px);
    cursor: pointer;
}

.schedule-calendar td:hover {
    background: rgba(138, 99, 255, 0.25);
    transform: scale(1.05);
}

/* ====== SELECTED ====== */
.schedule-calendar td.selected {
    background: linear-gradient(135deg, #7f5bff, #a27bff);
    color: #fff;
    box-shadow: 0 6px 14px rgba(127, 91, 255, 0.45);
}

/* ====== TODAY ====== */
.schedule-calendar td.today {
    border: 2px solid #8f6bff;
    background: rgba(143, 107, 255, 0.15);
}

/* ====== PAST ====== */
.schedule-calendar td.past {
    background: rgba(255, 255, 255, 0.03);
    color: #6f6594;
    cursor: not-allowed;
}

.schedule-calendar td.past:hover {
    transform: none;
}

/* ====== NAVIGATION ====== */
.month-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.month-navigation button {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: #e6ddff;
    font-size: 1.2em;
    padding: 6px 12px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.month-navigation button:hover {
    background: rgba(127, 91, 255, 0.35);
    transform: scale(1.1);
}

/* ====== CONTROLS ====== */
.calendar-controls {
    display: flex;
    gap: 8px;
    margin: 12px 0;
}

.calendar-controls button {
    flex: 1;
    padding: 8px;
    border: none;
    background: rgba(255, 255, 255, 0.07);
    color: #e6ddff;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.25s ease;
}

.calendar-controls button:hover {
    background: rgba(127, 91, 255, 0.4);
}

/* ====== SELECTED INFO ====== */
.selected-dates-info {
    background: rgba(255, 255, 255, 0.06);
    padding: 12px;
    border-radius: 16px;
    margin-top: 14px;
    border-left: 4px solid #8f6bff;
}

/* ====== LIST ====== */
.selected-dates-list {
    max-height: 140px;
    overflow-y: auto;
    margin-top: 8px;
}

.selected-date-item {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.07);
    margin-bottom: 6px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
}

.selected-date-item .remove-btn {
    color: #ff7a9a;
    cursor: pointer;
    font-size: 0.8em;
}

/* ====== ACTIONS ====== */
.calendar-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    justify-content: flex-end;
}

/* ====== SMALL SCREENS ====== */
@media (max-width: 360px) {
    .schedule-calendar {
        padding: 10px;
    }

    .month-name {
        font-size: 1.1em;
    }
}


            </style>
    <style>
/* Добавьте в CSS */
.schedule-container {
    max-height: 500px;
    overflow-y: auto;
}

.month-schedule {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.month-schedule h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 16px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-item {
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    background: white;
    border: 1px solid #dee2e6;
}

.day-item.worked {
    background: #d4edda;
    border-color: #c3e6cb;
}

.day-item.not-worked {
    background: #f8d7da;
    border-color: #f5c6cb;
}

.day-number {
    font-weight: bold;
    display: block;
}

.day-status {
    font-size: 12px;
    display: block;
    margin-top: 2px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    background: #6c757d;
    color: white;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

/* Улучшенное отображение статусов */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}











    
    .toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-input {
    display: none;
}

.toggle-label {
    display: inline-block;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-label .toggle-handle {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.toggle-input:checked + .toggle-label {
    background: #28a745;
}

.toggle-input:checked + .toggle-label .toggle-handle {
    transform: translateX(24px);
}

.toggle-text {
    font-size: 14px;
    color: #60cb50;
}
    
/* Стили для горизонтальной прокрутки таблиц */
.table-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Для мобильных устройств */
    margin-bottom: 20px;
    position: relative;
    border-radius: 8px;
    border: 1px solid #2a2a3c;
}

.scrollable-table {
    min-width: 100%;
    width: auto;
    white-space: nowrap;
    background: #1a1a2e;
}

/* Стиль для полосы прокрутки */
.table-scroll-wrapper::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
    background: #2a2a3c;
    border-radius: 4px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #8a2be2 0%, #4b0082 100%);
    border-radius: 4px;
    border: 2px solid #2a2a3c;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9a3cf3 0%, #5b10a3 100%);
}

.table-scroll-wrapper::-webkit-scrollbar-corner {
    background: #1a1a2e;
}

/* Фиксированная первая колонка */
.fixed-column {
    position: sticky;
    left: 0;
    background: #232339;
    z-index: 2;
    box-shadow: 3px 0 8px -3px rgba(0, 0, 0, 0.3);
    border-right: 1px solid #3a3a4c;
}

.products-statistics-table .fixed-column,
.couriers-statistics-table .fixed-column {
    min-width: 160px;
    max-width: 220px;
    background: #232339;
}

/* Стили для заголовков в прокручиваемой таблице */
.scrollable-table th {
    min-width: 130px;
    position: sticky;
    top: 0;
    z-index: 3;
    background: linear-gradient(135deg, #2a2a3c 0%, #1a1a2e 100%);
    border-bottom: 2px solid #8a2be2;
    color: #d1c4e9;
    font-weight: 600;
    padding: 14px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

/* Стили для ячеек курьеров */
.couriers-statistics-table td:not(.fixed-column) {
    min-width: 160px;
    max-width: 200px;
    background: #232339;
}

/* Подсказка о горизонтальной прокрутке */
.scroll-hint {
    text-align: center;
    color: #b19cd9;
    font-size: 12px;
    margin-top: 8px;
    padding: 8px;
    background: rgba(138, 43, 226, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(138, 43, 226, 0.3);
    display: none;
    backdrop-filter: blur(5px);
}

@media (max-width: 768px) {
    .scroll-hint {
        display: block;
    }
    
    .table-scroll-wrapper {
        border: 1px solid #3a3a4c;
        border-radius: 8px;
        padding-bottom: 5px;
    }
}

/* Улучшенные стили для таблицы курьеров */
.couriers-statistics-table {
    border-collapse: separate;
    border-spacing: 0;
}

.couriers-statistics-table th:not(.fixed-column) {
    border-left: 1px solid #3a3a4c;
}

.couriers-statistics-table td:not(.fixed-column) {
    border-left: 1px solid #3a3a4c;
    border-bottom: 1px solid #2a2a3c;
}

/* Эффект при прокрутке */
.table-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(26, 26, 46, 0.9));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 0 8px 8px 0;
}

.table-scroll-wrapper.scrolled::after {
    opacity: 1;
}

/* Секции статистики */
.statistics-section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #1a1a2e 0%, #232339 100%);
    border-radius: 12px;
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); */
    /* border: 1px solid #3a3a4c; */
    /* position: relative; */
    overflow: hidden;
}

.statistics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8a2be2 0%, #4b0082 50%, #8a2be2 100%);
}

.section-title {
    margin-top: 0;
    margin-bottom: 25px;
    color: #e1d5f7;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid rgba(138, 43, 226, 0.3);
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #8a2be2 0%, #4b0082 100%);
    border-radius: 4px;
}

/* Таблицы */
.products-statistics-table,
.couriers-statistics-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.products-statistics-table th,
.couriers-statistics-table th {
    background: linear-gradient(135deg, #2a2a3c 0%, #1f1f2e 100%);
    padding: 16px 14px;
    text-align: left;
    font-weight: 600;
    color: #d1c4e9;
    border-bottom: 2px solid #8a2be2;
    font-size: 14px;
}

.products-statistics-table td,
.couriers-statistics-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #2a2a3c;
    color: #c5c6d0;
    font-size: 13px;
}

.products-statistics-table tr {
    background: #232339;
    transition: all 0.2s ease;
}

.products-statistics-table tr:hover {
    background: rgba(138, 43, 226, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(138, 43, 226, 0.2);
}

.couriers-statistics-table tr {
    background: #232339;
    transition: all 0.2s ease;
}

.couriers-statistics-table tr:hover {
    background: rgba(138, 43, 226, 0.1);
    transform: translateY(-1px);
}

.product-info-cell {
    min-width: 220px;
    background: #1f1f2e;
}

.product-category {
    font-weight: 600;
    color: #e1d5f7;
    font-size: 14px;
}

.product-weight,
.product-location {
    font-size: 12px;
    color: #a5a6b8;
    margin-top: 4px;
}

.courier-data-cell {
    text-align: center;
    min-width: 140px;
    background: #1f1f2e;
    transition: all 0.2s ease;
}

.courier-data-cell:hover {
    background: rgba(138, 43, 226, 0.15);
}

.courier-quantity {
    font-weight: 600;
    color: #e1d5f7;
    font-size: 14px;
}

.courier-amount {
    font-size: 13px;
    color: #00e676;
    font-weight: 500;
    margin-top: 4px;
}

.no-data {
    color: #777788;
    font-style: italic;
    font-size: 12px;
}

.total-row {
    background: linear-gradient(135deg, #2a2a3c 0%, #232339 100%);
    font-weight: 600;
    border-top: 2px solid #8a2be2;
}

.total-cell {
    text-align: center;
    padding: 16px 12px !important;
    background: rgba(138, 43, 226, 0.1);
}

.total-quantity {
    color: #64b5f6;
    font-size: 15px;
    font-weight: 600;
}

.total-amount {
    color: #00e676;
    font-size: 15px;
    font-weight: 600;
    margin-top: 4px;
}

/* Общая статистика */
.general-stats-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #232339 100%);
    padding: 25px;
    border-radius: 12px;
    margin-top: 25px;
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3); */
    /* border: 1px solid #3a3a4c; */
    /* position: relative; */
    overflow: hidden;
}

.general-stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4b0082 0%, #8a2be2 50%, #4b0082 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #232339 0%, #2a2a3c 100%);
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #8a2be2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
    border-left: 4px solid #00e676;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-title {
    font-size: 13px;
    color: #a5a6b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #e1d5f7;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-subtitle {
    font-size: 13px;
    color: #00e676;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-subtitle::before {
    content: '↑';
    color: #00e676;
}

/* Стили для данных в таблицах */
.products-statistics-table td:nth-child(4), /* Цена */
.products-statistics-table td:nth-child(5), /* Пр. вчера */
.products-statistics-table td:nth-child(6), /* Пр. сегодня */
.products-statistics-table td:nth-child(7), /* В резерве */
.products-statistics-table td:nth-child(8), /* Доступно */
.products-statistics-table td:nth-child(9), /* Доб. сегодня */
.products-statistics-table td:nth-child(10) { /* Доб. вчера */
    font-weight: 500;
    text-align: center;
}

.products-statistics-table td:nth-child(4) { /* Цена */
    color: #ffd54f;
    font-weight: 600;
}

.products-statistics-table td:nth-child(5), /* Пр. вчера */
.products-statistics-table td:nth-child(6) { /* Пр. сегодня */
    color: #64b5f6;
}

.products-statistics-table td:nth-child(7) { /* В резерве */
    color: #ff8a65;
}

.products-statistics-table td:nth-child(8) { /* Доступно */
    color: #81c784;
}

.products-statistics-table td:nth-child(9), /* Доб. сегодня */
.products-statistics-table td:nth-child(10) { /* Доб. вчера */
    color: #ba68c8;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .statistics-section,
    .general-stats-section {
        padding: 20px 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .products-statistics-table th,
    .couriers-statistics-table th {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .products-statistics-table td,
    .couriers-statistics-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.statistics-section,
.general-stats-section {
    animation: fadeIn 0.5s ease-out;
}

.stat-card {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

/* Эффект свечения для важных элементов */
.glow-effect {
    position: relative;
}

.glow-effect::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8a2be2, #4b0082, #8a2be2);
    border-radius: 10px;
    z-index: -1;
    filter: blur(5px);
    opacity: 0.5;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        opacity: 0.5;
        filter: blur(5px);
    }
    to {
        opacity: 0.8;
        filter: blur(8px);
    }
}

/* Улучшенные тени для глубины */
.table-scroll-wrapper,
.statistics-section,
.general-stats-section,
.stat-card {
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Контейнер для разделителя */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #8a2be2, transparent);
    margin: 30px 0;
    opacity: 0.5;
}



 /* Стили для страницы настроек */
.settings-page-container {
    padding: 15px;
}

.settings-page-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eaeaea;
}

.settings-page-header h2 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.settings-page-header p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.settings-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.settings-page-actions .btn {
    flex: 1;
    min-width: 140px;
    padding: 10px 12px;
    font-size: 13px;
}

/* Статистические карточки */
.settings-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.settings-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.settings-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
}

.settings-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.stat-card-icon {
    font-size: 28px;
    opacity: 0.9;
    min-width: 40px;
    text-align: center;
    padding-top: 3px;
}

.stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-card-content h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.3;
}

.stat-label {
    opacity: 0.9;
    flex-shrink: 0;
    margin-right: 10px;
}

.stat-value {
    font-weight: 600;
    opacity: 1;
    text-align: right;
    word-break: break-word;
    flex-shrink: 1;
}

/* Секции настроек */
.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.settings-section {
    background: white;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.settings-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.settings-section.full-width {
    grid-column: 1 / -1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px;
    background: linear-gradient(to right, #f8f9fa, #eef1f5);
    border-bottom: 1px solid #e0e0e0;
    min-height: 60px;
}

.section-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.3;
}

.section-header h3 i {
    font-size: 16px;
    width: 20px;
}

.section-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.section-content {
    padding: 18px;
}

.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5f5;
    min-height: 48px;
}

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

.setting-row:has(.setting-value) {
    align-items: flex-start;
}

.setting-label {
    color: #555;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    flex-shrink: 0;
    margin-right: 15px;
    max-width: 50%;
}

.setting-value {
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
    max-width: 50%;
    word-break: break-word;
    line-height: 1.4;
}

/* Предпросмотр правил */
.rules-preview {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 18px;
    max-height: 280px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.6;
    -webkit-overflow-scrolling: touch;
}

.rules-preview::-webkit-scrollbar {
    width: 6px;
}

.rules-preview::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.rules-preview::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.rules-preview h4 {
    color: #2c3e50;
    margin-top: 18px;
    margin-bottom: 12px;
    font-size: 15px;
    font-weight: 600;
}

.rules-preview h4:first-child {
    margin-top: 0;
}

.rules-preview p {
    margin-bottom: 12px;
    color: #555;
}

.rules-preview ul, .rules-preview ol {
    padding-left: 22px;
    margin-bottom: 15px;
    color: #555;
}

.rules-preview li {
    margin-bottom: 6px;
}

/* Стили для статусов */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    min-width: 70px;
    text-align: center;
}

.status-active {
    background: linear-gradient(to right, #d4ffd4, #c3f0c3);
    color: #0a6b0a;
    border: 1px solid #a0d8a0;
}

.status-inactive {
    background: linear-gradient(to right, #ffe0e0, #ffd1d1);
    color: #b30909;
    border: 1px solid #ffb3b3;
}

/* Кнопки */
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
}

.btn-outline {
    background: transparent;
    border: 1px solid #007bff;
    color: #007bff;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
    transform: translateY(-1px);
}

/* Иконки для разных разделов */
.fa-key { color: #6610f2; }
.fa-telegram { color: #0088cc; }
.fa-paint-brush { color: #20c997; }
.fa-ban { color: #dc3545; }
.fa-wallet { color: #fd7e14; }
.fa-lock { color: #6f42c1; }
.fa-file-contract { color: #28a745; }

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.settings-section {
    animation: fadeIn 0.3s ease-out;
}

.settings-stat-card {
    animation: fadeIn 0.4s ease-out;
}

/* Состояние загрузки */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Кнопка копирования */
.copy-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    margin-left: 8px;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #007bff;
    color: white;
    transform: scale(1.1);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Адаптация для планшетов (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .settings-page-container {
        padding: 20px;
    }
    
    .settings-stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .setting-row {
        flex-direction: row;
        align-items: center;
    }
    
    .setting-label {
        max-width: 40%;
    }
    
    .setting-value {
        max-width: 60%;
    }
}

/* Адаптация для мобильных устройств (до 767px) */
@media (max-width: 767px) {
    .settings-page-container {
        padding: 12px;
    }
    
    .settings-page-header h2 {
        font-size: 20px;
    }
    
    .settings-page-actions {
        flex-direction: column;
    }
    
    .settings-page-actions .btn {
        width: 100%;
        min-width: 0;
    }
    
    .settings-stats-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .settings-stat-card {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .stat-card-icon {
        font-size: 24px;
        min-width: auto;
        text-align: left;
        padding-top: 0;
    }
    
    .stat-card-content h3 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .stat-item {
        margin-bottom: 8px;
    }
    
    .settings-sections {
        gap: 12px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
        min-height: auto;
    }
    
    .section-header h3 {
        font-size: 14px;
    }
    
    .section-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .section-content {
        padding: 16px;
    }
    
    .setting-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 12px 0;
        min-height: auto;
    }
    
    .setting-label {
        max-width: 100%;
        margin-right: 0;
        font-size: 13px;
    }
    
    .setting-value {
        max-width: 100%;
        text-align: left;
        font-size: 13px;
        padding-left: 0;
        word-break: break-all;
    }
    
    .rules-preview {
        padding: 15px;
        max-height: 250px;
        font-size: 12px;
    }
    
    .rules-preview h4 {
        font-size: 14px;
    }
    
    .status-badge {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 65px;
        align-self: flex-start;
    }
    
    /* Улучшенная поддержка touch на мобильных */
    .btn, .copy-btn, .setting-row {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        min-height: 44px;
    }
    
    .btn-sm {
        min-height: 36px;
    }
    
    /* Улучшенная прокрутка на iOS */
    .settings-section {
        -webkit-overflow-scrolling: touch;
    }
}

/* Для очень маленьких экранов (до 360px) */
@media (max-width: 360px) {
    .settings-page-container {
        padding: 10px;
    }
    
    .settings-page-header h2 {
        font-size: 18px;
    }
    
    .settings-page-header p {
        font-size: 13px;
    }
    
    .settings-stat-card {
        padding: 14px;
    }
    
    .stat-card-content h3 {
        font-size: 14px;
    }
    
    .stat-item {
        font-size: 12px;
    }
    
    .section-header {
        padding: 12px 14px;
    }
    
    .section-content {
        padding: 14px;
    }
    
    .setting-label, .setting-value {
        font-size: 12px;
    }
    
    .rules-preview {
        padding: 12px;
        font-size: 11px;
    }
}

/* Поддержка темной темы (опционально) */
@media (prefers-color-scheme: dark) {
    .settings-page-header h2 {
        color: #e0e0e0;
    }
    
    .settings-page-header p {
        color: #aaa;
    }
    
    .settings-section {
        background: #2d2d2d;
        border-color: #404040;
    }
    
    .section-header {
        background: linear-gradient(to right, #3a3a3a, #444);
        border-color: #505050;
    }
    
    .section-header h3 {
        color: #e0e0e0;
    }
    
    .setting-label {
        color: #bbb;
    }
    
    .setting-value {
        color: #e0e0e0;
    }
    
    .rules-preview {
        background: #2a2a2a;
        border-color: #404040;
        color: #ccc;
    }
    
    .rules-preview h4 {
        color: #e0e0e0;
    }
    
    .rules-preview p {
        color: #bbb;
    }
    
    .status-active {
        background: linear-gradient(to right, #1a3c1a, #0d2e0d);
        color: #8bc38b;
        border-color: #2a5a2a;
    }
    
    .status-inactive {
        background: linear-gradient(to right, #3c1a1a, #2e0d0d);
        color: #d88;
        border-color: #5a2a2a;
    }
    
    .btn-outline {
        border-color: #4d94ff;
        color: #4d94ff;
    }
    
    .btn-outline:hover {
        background: #4d94ff;
        color: #1a1a1a;
    }
}

/* Поддержка landscape режима на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .settings-stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .rules-preview {
        max-height: 180px;
    }
}

/* Улучшения для accessibility */
@media (prefers-reduced-motion: reduce) {
    .settings-stat-card,
    .settings-section,
    .btn-outline,
    .copy-btn {
        transition: none;
        animation: none;
    }
    
    .settings-stat-card:hover {
        transform: none;
    }
}

/* Высокий контраст для доступности */
@media (prefers-contrast: high) {
    .settings-stat-card {
        border: 2px solid #000;
    }
    
    .settings-section {
        border: 2px solid #000;
    }
    
    .status-active {
        border: 2px solid #000;
    }
    
    .status-inactive {
        border: 2px solid #000;
    }
}