*
 
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    max-width: 100%;
}

html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #0f172a;
    color: white;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    margin-bottom: 40px;
}

.logo-icon {
    background: #2563eb;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
}

.logo-text span {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
}

.nav-item {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    color: #cbd5e1;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: 0.2s;
}

.nav-item i {
    width: 24px;
    font-size: 1.2rem;
}

.nav-item:hover {
    background: #1e293b;
    color: white;
}

.nav-item.active {
    background: #2563eb;
    color: white;
}

/* Dropdown menu */
.nav-item.has-dropdown {
    position: relative;
}

.nav-item .arrow {
    margin-left: auto;
    transition: transform 0.3s;
}

.nav-item.open .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    margin-left: 46px;
    margin-top: 4px;
    margin-bottom: 8px;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    width: 100%;
    padding: 12px 18px;
    border-radius: 10px;
    color: #cbd5e1;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: 0.2s;
}

.dropdown-item i {
    width: 20px;
    font-size: 1rem;
}

.dropdown-item:hover {
    background: #1e293b;
    color: white;
}

.dropdown-item.active {
    background: #2563eb;
    color: white;
}

.dropdown-item.voronezh i {
    color: #eb2525;
}

.dropdown-item.partsezda i {
    color: #8b5cf6;
}

.branch-badge {
    margin-left: auto;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
}

/* Main content */
.main {
    flex: 1;
    margin-left: 280px;
    padding: 24px 32px;
}

.top-bar {
    background: white;
    padding: 20px 28px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.title h1 {
    font-size: 24px;
    color: #0f172a;
}

.title p {
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

.btn {
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Stats cards */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 22px;
    border-radius: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eef2f6;
}

.stat-info h3 {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-info .value {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: #eef2ff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 24px;
}

/* Forms */
.form-container {
    background: white;
    padding: 32px;
    border-radius: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 15px;
    background: #f8fafc;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 24px;
    padding: 24px;
    margin-top: 24px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px 12px;
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 2px solid #eef2f6;
}

td {
    padding: 16px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.badge {
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Kanban board */
.board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.column {
    background: #f8fafc;
    border-radius: 24px;
    padding: 18px;
    border: 1px solid #eef2f6;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    font-weight: 600;
}

.task-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #eef2f6;
    cursor: pointer;
    transition: 0.2s;
}

.task-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

/* Stock grid */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: white;
    border-radius: 24px;
    padding: 22px;
}

.progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 20px;
    margin: 12px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 20px;
}

.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;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 32px;
    width: 90%;
    max-width: 500px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #22c55e;
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateX(400px);
    transition: 0.3s;
    z-index: 2000;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #ef4444;
}

/* Scheduler styles */
.scheduler-container {
    background: white;
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.02);
}

.branch-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
}

.branch-header.voronezh {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.branch-header.partsezda {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

.branch-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.branch-info h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.branch-info p {
    opacity: 0.9;
    font-size: 14px;
}

.date-selector {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.date-selector input[type="date"] {
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 16px;
    min-width: 200px;
}

.master-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.master-chip {
    padding: 10px 20px;
    border-radius: 40px;
    background: #f1f5f9;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.master-chip:hover {
    background: #e2e8f0;
}

.master-chip.selected {
    background: #2563eb;
    color: white;
    border-color: #1d4ed8;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.time-slot {
    padding: 14px 8px;
    text-align: center;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border: 2px solid transparent;
}

.time-slot.free {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.time-slot.free:hover {
    background: #bbf7d0;
    transform: scale(1.02);
}

.time-slot.busy {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
    opacity: 0.7;
    cursor: not-allowed;
}

.time-slot.selected {
    background: #2563eb;
    color: white;
    border-color: #1e3a8a;
}

.legend {
    display: flex;
    gap: 24px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 8px;
}

.legend-color.free {
    background: #dcfce7;
    border: 2px solid #86efac;
}

.legend-color.busy {
    background: #fee2e2;
    border: 2px solid #fecaca;
}

.quick-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.time-slot-info {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
}

.slot-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Shift calendar styles */
.shift-calendar {
    background: white;
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    color: #64748b;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
}

.calendar-cell {
    min-height: 120px;
    background: #f8fafc;
    border-radius: 16px;
    padding: 12px;
    border: 2px solid transparent;
    transition: 0.2s;
}

.calendar-cell.today {
    border-color: #2563eb;
}

.calendar-cell.weekend {
    background: #fee2e2;
}

.calendar-cell .day-number {
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

.shift-item {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-left: 3px solid #2563eb;
}

.shift-item.morning {
    border-left-color: #2563eb;
}

.shift-item.evening {
    border-left-color: #8b5cf6;
}

.add-shift-btn {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    background: none;
    color: #64748b;
    cursor: pointer;
    margin-top: 8px;
    font-size: 12px;
}

.add-shift-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.master-shift-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.shift-stat-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.shift-stat-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 20px;
}

.shift-stat-info h4 {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.shift-stat-info .shift-count {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 24px 8px;
    }
    
    .logo-text,
    .nav-item span:not(.branch-badge),
    .dropdown-item span:not(.branch-badge) {
        display: none;
    }
    
    .nav-item i,
    .dropdown-item i {
        margin: 0 auto;
    }
    
    .main {
        margin-left: 80px;
    }
    
    .dropdown-menu {
        margin-left: 10px;
    }

    /* Client actions styles */
    .btn-icon {
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        margin: 0 5px;
        transition: transform 0.2s;
    }

    .btn-icon:hover {
        transform: scale(1.1);
    }

    .btn-icon i {
        font-size: 18px;
    }

    .edit-input {
        width: 100%;
        padding: 8px;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        font-size: 14px;
        transition: border-color 0.2s;
    }

    .edit-input:focus {
        outline: none;
        border-color: #2563eb;
    }

    #clientsTable td {
        vertical-align: middle;
        padding: 12px 8px;
    }

    #clientsTable .action-buttons,
    #clientsTable .edit-buttons {
        display: flex;
        gap: 5px;
        justify-content: flex-start;
    }

    #clientsTable tr {
        transition: opacity 0.3s;
    }

    /* Search input styles */
    #clientSearch {
        padding: 10px 18px;
        border-radius: 40px;
        border: 2px solid #e2e8f0;
        font-size: 14px;
        width: 250px;
        transition: border-color 0.2s;
    }

    #clientSearch:focus {
        outline: none;
        border-color: #2563eb;
    }

  
    /* Стили для отмененных заказов */
    .btn-danger {
        background: #ef4444;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 8px;
        font-weight: 500;
        cursor: pointer;
        transition: 0.2s;
    }

    .btn-danger:hover {
        background: #dc2626;
    }

    .task-card.cancelled {
        opacity: 0.7;
        background: #fef2f2;
        border-left: 4px solid #ef4444;
        position: relative;
    }

    .task-card.cancelled::before {
        content: '❌';
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 16px;
        opacity: 0.5;
    }

    /* Счетчик отмененных */
    #cancelledCount {
        background: #ef4444;
        color: white;
    }

    #filterCancelledCount {
        background: #ef4444;
        color: white;
    }
    /* Стили для drag & drop */
    .task-card[draggable="true"] {
        cursor: grab;
        user-select: none;
    }

    .task-card[draggable="true"]:active {
        cursor: grabbing;
    }

    .task-card.dragging {
        opacity: 0.5;
        transform: scale(0.95);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

    .column.drag-over {
        background: #e0f2fe;
        border: 2px dashed #2563eb;
    }

    .column.drag-over .tasks-container {
        min-height: 200px;
    }

    /* Анимация при перетаскивании */
    @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.02); }
        100% { transform: scale(1); }
    }

    .task-card[draggable="true"]:hover {
        animation: pulse 0.5s ease infinite;
    }

    /* Подсказка для перетаскивания */
    .drag-hint {
        font-size: 11px;
        color: #94a3b8;
        text-align: center;
        margin-top: 8px;
        padding-top: 6px;
        border-top: 1px dashed #e2e8f0;
    }

    /* Запрещаем перетаскивание для отмененных заказов */
    .task-card[data-status="cancelled"][draggable="true"] {
        cursor: not-allowed;
        opacity: 0.7;
    }

    .task-card[data-status="cancelled"][draggable="true"]:hover {
        animation: none;
    }
    /* Стили для множественного выбора */
    .time-slot.selected {
        background: #2563eb !important;
        color: white !important;
        border-color: #1d4ed8 !important;
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        position: relative;
    }

    .time-slot.selected::after {
        content: '✓';
        position: absolute;
        top: 2px;
        right: 5px;
        font-size: 12px;
        font-weight: bold;
    }

    .time-slot.selected.free {
        background: #2563eb !important;
        color: white !important;
    }

    .time-slot.selected.free span {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    /* Индикатор режима множественного выбора */
    .multi-select-active {
        background: #e0f2fe;
        border: 2px solid #2563eb;
        animation: pulse 1s infinite;
    }

    @keyframes pulse {
        0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
        70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
        100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
    }

    /* Подсказка для множественного выбора */
    .multi-select-hint {
        background: #e0f2fe;
        border-radius: 8px;
        padding: 8px;
        margin-top: 10px;
        text-align: center;
        color: #0369a1;
        font-size: 13px;
        border-left: 3px solid #2563eb;
    }

    /* Счетчик выбранных слотов */
    .selected-count-badge {
        background: #2563eb;
        color: white;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
    }

    /* Информация о выбранных слотах */
    .slots-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    /* Стили для карточек филиалов на рабочем столе */
    .branch-slot-card {
        transition: all 0.2s;
        position: relative;
        overflow: hidden;
    }

    .branch-slot-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }

    .branch-slot-card::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0 30px 30px 0;
        border-color: transparent rgba(37, 99, 235, 0.1) transparent transparent;
        opacity: 0;
        transition: opacity 0.2s;
    }

    .branch-slot-card:hover::after {
        opacity: 1;
    }

    /* Цветовые индикаторы для количества слотов */
    .branch-slot-card[data-status="critical"] {
        border-left-color: #ef4444 !important;
    }

    .branch-slot-card[data-status="low"] {
        border-left-color: #f59e0b !important;
    }

    .branch-slot-card[data-status="medium"] {
        border-left-color: #10b981 !important;
    }

    .branch-slot-card[data-status="high"] {
        border-left-color: #2563eb !important;
    }

    /* Анимация для счетчиков */
    @keyframes countPulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }

    .slot-count.update {
        animation: countPulse 0.3s ease;
    }

    /* Стили для статуса "нет смен" */
    .branch-slot-card.no-masters {
        background: #fef2f2;
    }

    .branch-slot-card.no-masters .slot-status {
        color: #ef4444 !important;
    }

    .branch-slot-card.no-masters .slot-count {
        color: #ef4444 !important;
    }

    /* Дополнительные стили для карточек */
    .branch-slot-card .btn-secondary {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        transition: all 0.2s;
    }

    .branch-slot-card .btn-secondary:hover {
        background: #2563eb;
        color: white;
        border-color: #2563eb;
    }

    .branch-slot-card .btn-secondary:hover i {
        color: white;
    }

    /* Стили для эмодзи */
    .master-chip {
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .master-chip.selected {
        background: #2563eb;
        color: white;
    }

    .time-slot {
        font-family: 'Inter', sans-serif;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .branch-slot-card .btn-secondary {
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    /* Убираем лишние иконки Font Awesome там где используем эмодзи */
    .btn-icon i.fas {
        display: none;
    }

    .btn-icon {
        font-size: 18px;
        padding: 5px;
        background: none;
        border: none;
        cursor: pointer;
        transition: transform 0.2s;
    }

    .btn-icon:hover {
        transform: scale(1.1);
    }

    /* Стили для кнопок с эмодзи */
    .btn-primary, .btn-secondary {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    /* Стили для ячеек таблицы */
    td span[style*="cursor: pointer"] {
        font-size: 18px;
        margin: 0 5px;
    }

    /* Анимация для счетчиков */
    @keyframes countPulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }

    .slot-count.update {
        animation: countPulse 0.3s ease;
    }

    /* Стили для карточек филиалов */
    .branch-slot-card {
        transition: all 0.2s;
    }

    .branch-slot-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }

    .branch-slot-card.no-masters {
        background: #fef2f2;
    }

    .branch-slot-card.no-masters .slot-status {
        color: #ef4444 !important;
    }

    /* Улучшенные стили для календаря смен */
    .calendar-cell {
        min-height: 130px;
        background: #f8fafc;
        border-radius: 16px;
        padding: 10px;
        border: 2px solid transparent;
        transition: 0.2s;
        display: flex;
        flex-direction: column;
    }

    .calendar-cell.empty {
        background: transparent;
        border: 2px dashed #e2e8f0;
        opacity: 0.5;
    }

    .calendar-cell.today {
        border-color: #2563eb;
        background: #eff6ff;
    }

    .calendar-cell.weekend {
        background: #fef2f2;
    }

    .calendar-cell .day-number {
        font-weight: 600;
        margin-bottom: 6px;
        color: #334155;
        font-size: 13px;
        text-align: center;
        background: rgba(0,0,0,0.02);
        padding: 2px;
        border-radius: 12px;
    }

    .calendar-cell .shifts-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 6px;
    }

    .calendar-cell .no-shifts {
        text-align: center;
        color: #cbd5e1;
        font-size: 12px;
        padding: 8px;
        font-style: italic;
    }

    .shift-item {
        font-size: 11px;
        padding: 6px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: white;
        border-left: 4px solid #2563eb;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        cursor: pointer;
        transition: all 0.2s;
    }

    .shift-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    }

    .shift-item .shift-content {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
    }

    .shift-item .shift-master {
        font-weight: 600;
        font-size: 11px;
        color: #0f172a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70px;
    }

    .shift-item .shift-branch {
        font-size: 9px;
        color: #64748b;
        background: #f1f5f9;
        padding: 2px 4px;
        border-radius: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70px;
        display: inline-block;
    }

    .shift-item .shift-icons {
        font-size: 12px;
        min-width: 18px;
        text-align: center;
        margin-left: 4px;
    }

    .add-shift-btn {
        width: 100%;
        padding: 4px;
        border-radius: 8px;
        border: 1px dashed #cbd5e1;
        background: none;
        color: #64748b;
        cursor: pointer;
        margin-top: 4px;
        font-size: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        transition: all 0.2s;
    }

    .add-shift-btn:hover {
        border-color: #2563eb;
        color: #2563eb;
        background: #f0f9ff;
    }

    .add-shift-btn i {
        font-size: 9px;
    }

    /* Статистика смен */
    .master-shift-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
        margin-bottom: 24px;
    }

    .shift-stat-card {
        background: #f8fafc;
        border-radius: 20px;
        padding: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        transition: all 0.2s;
    }

    .shift-stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    }

    .shift-stat-icon {
        width: 48px;
        height: 48px;
        background: white;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #2563eb;
        font-size: 24px;
    }

    .shift-stat-info h4 {
        font-size: 13px;
        color: #64748b;
        font-weight: 500;
        margin-bottom: 4px;
    }

    .shift-stat-info .shift-count {
        font-size: 24px;
        font-weight: 700;
        color: #0f172a;
        line-height: 1;
    }

    /* Легенда */
    .shift-legend {
        display: flex;
        gap: 24px;
        margin-top: 20px;
        padding: 16px;
        background: #f8fafc;
        border-radius: 16px;
        flex-wrap: wrap;
    }

    .legend-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
    }

    .legend-color {
        width: 20px;
        height: 20px;
        border-radius: 6px;
    }

    .legend-color.morning {
        background: #2563eb;
    }

    .legend-color.evening {
        background: #8b5cf6;
    }

    .legend-color.full {
        background: #cb2111;
    }

    /* Форма добавления смены */
    #shiftsPage .form-container {
        margin-top: 24px;
    }

    #shiftsPage .form-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
        align-items: end;
    }

    #shiftsPage .form-group {
        margin-bottom: 0;
    }

    #shiftsPage select,
    #shiftsPage input {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid #e2e8f0;
        border-radius: 14px;
        font-size: 14px;
        background: #f8fafc;
        transition: all 0.2s;
    }

    #shiftsPage select:focus,
    #shiftsPage input:focus {
        outline: none;
        border-color: #2563eb;
        background: white;
    }

    #shiftsPage .btn-primary {
        padding: 12px 24px;
        border-radius: 40px;
        font-weight: 600;
        font-size: 14px;
        background: #2563eb;
        color: white;
        border: none;
        cursor: pointer;
        transition: all 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    #shiftsPage .btn-primary:hover {
        background: #1d4ed8;
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
    }

    /* Стили для автоподстановки моделей */
    .autocomplete-suggestions {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        margin-top: 4px;
        max-height: 300px;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .autocomplete-item {
        padding: 12px 16px;
        cursor: pointer;
        border-bottom: 1px solid #f1f5f9;
        transition: background-color 0.2s;
    }

    .autocomplete-item:last-child {
        border-bottom: none;
    }

    .autocomplete-item:hover {
        background-color: #f8fafc;
    }

    .autocomplete-item.selected {
        background-color: #eef2ff;
        border-left: 3px solid #2563eb;
    }

    /* Анимация появления */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .autocomplete-suggestions {
        animation: slideDown 0.2s ease-out;
    }

    /* Скроллбар для списка */
    .autocomplete-suggestions::-webkit-scrollbar {
        width: 8px;
    }

    .autocomplete-suggestions::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 4px;
    }

    .autocomplete-suggestions::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

    .autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

    /* Стили для калькулятора услуг */
    .service-card {
        transition: all 0.2s;
        cursor: pointer;
    }

    .service-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    }

    .service-card input[type="checkbox"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
    }

    .service-card input[type="radio"] {
        width: 16px;
        height: 16px;
        cursor: pointer;
    }

    #priceCalculatorBlock {
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Стили для суммы */
    #totalPrice {
        transition: all 0.3s;
    }

    #totalPrice.update {
        animation: pricePulse 0.3s ease;
    }

    @keyframes pricePulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }

    /* Стили для сетки услуг */
    .services-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }

    /* Компактные стили для страницы прайсов */
    #pricesPage .table-container {
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    }

    #pricesTable {
        width: 100%;
        border-collapse: collapse;
        font-size: 15px;
    }

    #pricesTable th {
        background: #f8fafc;
        padding: 12px 10px;
        font-weight: 600;
        color: #334155;
        border-bottom: 1px solid #e2e8f0;
        white-space: nowrap;
    }

    #pricesTable td {
        padding: 10px;
        border-bottom: 1px solid #f1f5f9;
        color: #0f172a;
    }

    #pricesTable tbody tr:hover td {
        background: #f8fafc;
    }

    #pricesTable td:not(:first-child):not(:nth-child(2)) {
        font-family: 'Courier New', monospace;
        font-weight: 500;
        color: #2563eb;
    }

    /* Компактные карточки статистики */
    #pricesPage .stat-card-compact {
        background: white;
        border-radius: 12px;
        padding: 12px 20px;
        display: flex;
        align-items: center;
        gap: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        border: 1px solid #f1f5f9;
    }

    #pricesPage .stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

    /* Убираем лишние отступы */
    #pricesPage h2 {
        margin: 0;
        font-size: 22px;
    }

    #pricesPage input, 
    #pricesPage select,
    #pricesPage button {
        font-size: 13px;
    }

    /* Упрощаем скроллбар */
    #pricesPage .table-container::-webkit-scrollbar {
        height: 6px;
    }

    #pricesPage .table-container::-webkit-scrollbar-track {
        background: #f1f5f9;
    }

    #pricesPage .table-container::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }
}

/* ==================== СТИЛИ ДЛЯ ПРАЙСОВ ==================== */

/* Контейнер таблицы */
#pricesPage .table-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    margin-top: 20px;
    background: white;
}

/* Сама таблица */
#pricesTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

/* Заголовки */
#pricesTable th {
    background: #f8fafc;
    padding: 14px 12px;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
    font-size: 14px !important;
}

#pricesTable th:first-child,
#pricesTable th:nth-child(2) {
    text-align: left;
    padding-left: 15px;
}

/* Ячейки */
#pricesTable td {
    padding: 12px 10px !important;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a ;
    font-size: 14px !important;
}

#pricesTable td:first-child,
#pricesTable td:nth-child(2) {
    text-align: left;
    padding-left: 15px;
}

#pricesTable td:nth-child(3),
#pricesTable td:nth-child(4),
#pricesTable td:nth-child(5),
#pricesTable td:nth-child(6),
#pricesTable td:nth-child(7),
#pricesTable td:nth-child(8),
#pricesTable td:nth-child(9) {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: 700 !important; /* Жирнее */
    color: #2563eb;
    font-size: 15px; 
}

/* ===== ПРОСТОЕ ВЫДЕЛЕНИЕ СТРОК ===== */

/* Эффект при наведении */
#pricesTable tbody tr {
    cursor: pointer;
}

#pricesTable tbody tr:hover {
    background: #f1f5f9;
}

/* ВЫДЕЛЕННАЯ СТРОКА */
#pricesTable tbody tr.price-selected-row {
    background: #2563eb !important;
    color: white !important;
    border-left: 4px solid #1e40af !important;
}

/* Ячейки выделенной строки */
#pricesTable tbody tr.price-selected-row td {
    background: transparent !important;
    color: white !important;
}

#pricesTable tbody tr.price-selected-row td strong {
    color: white !important;
}

#pricesTable tbody tr.price-selected-row td:nth-child(3),
#pricesTable tbody tr.price-selected-row td:nth-child(4),
#pricesTable tbody tr.price-selected-row td:nth-child(5),
#pricesTable tbody tr.price-selected-row td:nth-child(6),
#pricesTable tbody tr.price-selected-row td:nth-child(7),
#pricesTable tbody tr.price-selected-row td:nth-child(8),
#pricesTable tbody tr.price-selected-row td:nth-child(9) {
    color: white !important;
    font-weight: 800 !important; /* Ещё жирнее для выделенной строки */
}

/* Четные строки */
#pricesTable tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

#pricesTable tbody tr.price-selected-row:nth-child(even) {
    background: #2563eb !important;
}

/* Скроллбар */
#pricesPage .table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

#pricesPage .table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#pricesPage .table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#pricesPage .table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}   

/* Улучшение для таблиц с записями */
#upcomingAppointments td,
#bookingsList td,
#dateBookingsList td {
    vertical-align: middle;
    white-space: nowrap;
}

#upcomingAppointments td:nth-child(5),
#bookingsList td:nth-child(5),
#dateBookingsList td:nth-child(5) {
    white-space: nowrap;
}

#upcomingAppointments .badge,
#bookingsList .badge,
#dateBookingsList .badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
}
/* ==================== УЛУЧШЕННЫЙ РАБОЧИЙ СТОЛ ==================== */

/* Статистика */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    border-color: #e2e8f0;
}

.stat-info h3 {
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.stat-info .value {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #eef2ff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 28px;
}

/* Карточки филиалов */
.branch-stat-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 16px rgba(0,0,0,0.02);
    transition: all 0.2s;
}

.branch-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.05);
    border-color: #e2e8f0;
}

.branch-stat-card .btn-secondary {
    transition: all 0.2s;
    font-weight: 600;
}

/* Таблица ближайших записей */
#upcomingAppointments {
    width: 100%;
    border-collapse: collapse;
}

#upcomingAppointments th {
    background: #f8fafc;
    padding: 16px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

#upcomingAppointments td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

#upcomingAppointments tbody tr {
    transition: all 0.2s;
}

#upcomingAppointments tbody tr:hover {
    background: #f8fafc;
}

/* Статусы заказов */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.status-new {
    background: #dbeafe;
    color: #2563eb;
}

.status-working {
    background: #fef3c7;
    color: #b45309;
}

.status-ready {
    background: #d1fae5;
    color: #047857;
}

.status-completed {
    background: #f3f4f6;
    color: #4b5563;
}

/* Филиалы */
.branch-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.branch-voronezh {
    background: #e0e7ff;
    color: #2563eb;
}

.branch-partsezda {
    background: #ede9fe;
    color: #8b5cf6;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    #upcomingAppointments {
        font-size: 13px;
    }
    
    #upcomingAppointments th,
    #upcomingAppointments td {
        padding: 12px 8px;
    }
}

/* Простые стили для калькулятора услуг */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s;
}

.service-card:hover {
    border-color: #2563eb;
}

.service-card input[type="radio"],
.service-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.service-card label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    white-space: nowrap;
}

.service-card label span:last-child {
    margin-left: auto;
    color: #2563eb;
    font-size: 12px;
}

/* Стили для калькулятора услуг */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.service-card {
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.service-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.service-card input[type="radio"],
.service-card input[type="checkbox"] {
    accent-color: #2563eb;
}

.service-card label {
    transition: all 0.2s;
    cursor: pointer;
}

.service-card label:hover {
    background: #eef2ff !important;
}

/* Вертикальное расположение для задних дверей */
.service-card .vertical-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-card .vertical-layout label {
    width: 100%;
}

/* Горизонтальное расположение для остальных */
.service-card .horizontal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Цена в виде бейджа */
.price-badge {
    background: #eef2ff;
    color: #2563eb;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Общая стоимость */
.total-price-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.total-price-label {
    font-size: 16px;
    color: #475569;
    margin-right: 15px;
}

.total-price-value {
    font-size: 24px;
    font-weight: 800;
    color: #2563eb;
    background: white;
    padding: 8px 25px;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ==================== МОБИЛЬНАЯ ВЕРСИЯ ==================== */

/* На мобильных устройствах */
@media (max-width: 1024px) {
    /* Полностью скрываем левое боковое меню */
    .sidebar {
        display: none !important;
    }
    
    /* Основной контент занимает всю ширину */
    .main {
        margin-left: 0 !important;
        padding: 20px 16px 100px;
        width: 100%;
    }
    
    /* Верхняя панель */
    .top-bar {
        padding: 16px 20px;
        margin-bottom: 20px;
    }
    
    .title h1 {
        font-size: 20px;
    }
    
    .title p {
        font-size: 13px;
    }
    
    /* Кнопка открытия меню - справа внизу */
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        bottom: 90px;
        right: 20px;
        width: 56px;
        height: 56px;
        background: #2563eb;
        border-radius: 28px;
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
        z-index: 90;
        border: none;
        color: white;
        font-size: 22px;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
    }

    .mobile-menu-toggle:hover {
        transform: scale(1.1);
        background: #1d4ed8;
    }

    /* Нижнее меню - 5 кнопок */
    .mobile-bottom-menu {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 10px 12px 20px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
        z-index: 95;
        border-radius: 30px 30px 0 0;
        justify-content: space-around;
        align-items: center;
        backdrop-filter: blur(10px);
        background: rgba(255,255,255,0.98);
        transform: translateY(0);
        transition: transform 0.3s ease;
        will-change: transform;
    }

    .mobile-bottom-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        padding: 8px 0;
        border-radius: 12px;
        color: #64748b;
        font-size: 11px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        flex: 1;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-bottom-item i {
        font-size: 20px;
    }

    .mobile-bottom-item.active {
        color: #2563eb;
    }

    .mobile-bottom-item.active i {
        color: #2563eb;
    }

    .mobile-bottom-item:active {
        background: #f1f5f9;
    }

    /* Полноэкранное меню */
    .mobile-full-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #0f172a;
        z-index: 200;
        overflow-y: auto;
        padding: 24px 20px 40px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        will-change: transform;
    }

    .mobile-full-menu.show {
        transform: translateX(0);
        display: block;
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid #1e293b;
    }

    .mobile-menu-logo {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-menu-logo .logo-icon {
        width: 40px;
        height: 40px;
        background: #2563eb;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 20px;
    }

    .mobile-menu-logo .logo-text {
        color: white;
        font-weight: 700;
        font-size: 18px;
    }

    .mobile-menu-close {
        width: 44px;
        height: 44px;
        background: #1e293b;
        border: none;
        border-radius: 12px;
        color: white;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }

    .mobile-menu-close:hover {
        background: #334155;
    }

    .mobile-menu-items {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 24px;
    }

    .mobile-menu-item {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px 20px;
        background: #1e293b;
        border: none;
        border-radius: 16px;
        color: #cbd5e1;
        font-size: 16px;
        font-weight: 500;
        text-align: left;
        cursor: pointer;
        transition: all 0.2s;
        width: 100%;
    }

    .mobile-menu-item i {
        width: 24px;
        font-size: 18px;
        color: #64748b;
    }

    .mobile-menu-item:hover,
    .mobile-menu-item.active {
        background: #2563eb;
        color: white;
    }

    .mobile-menu-item:hover i,
    .mobile-menu-item.active i {
        color: white;
    }

    .mobile-menu-section {
        margin-bottom: 24px;
    }

    .mobile-menu-section-title {
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 12px;
        padding-left: 16px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-menu-subitems {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .mobile-menu-subitem {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 14px 20px;
        background: #1e293b;
        border: none;
        border-radius: 14px;
        color: #cbd5e1;
        font-size: 15px;
        cursor: pointer;
        transition: all 0.2s;
        width: 100%;
    }

    .mobile-menu-subitem i {
        width: 20px;
        font-size: 16px;
        color: #64748b;
    }

    .mobile-menu-subitem:hover {
        background: #334155;
        color: white;
    }

    .mobile-menu-badge {
        margin-left: auto;
        background: #334155;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 11px;
        color: white;
        min-width: 30px;
        text-align: center;
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 150;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* ========== УЛУЧШЕННЫЙ КАЛЕНДАРЬ ДЛЯ МОБИЛЬНЫХ ========== */
    .shift-calendar {
        padding: 16px !important;
        margin-bottom: 16px !important;
        background: white;
        border-radius: 24px;
    }

    .calendar-header {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px !important;
    }

    .calendar-header h2 {
        font-size: 20px !important;
        margin: 0;
    }

    .calendar-header > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .calendar-header .btn {
        padding: 10px 16px !important;
        font-size: 14px !important;
        min-width: 40px;
        justify-content: center;
    }

    #currentMonthDisplay {
        font-size: 16px !important;
        font-weight: 600;
    }

    /* Статистика смен */
    .master-shift-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    .shift-stat-card {
        padding: 12px !important;
        gap: 10px !important;
        background: #f8fafc;
        border-radius: 16px;
    }

    .shift-stat-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
        background: white;
        border-radius: 12px;
    }

    .shift-stat-info h4 {
        font-size: 12px !important;
        margin-bottom: 4px !important;
        color: #64748b;
    }

    .shift-stat-info .shift-count {
        font-size: 20px !important;
        font-weight: 700;
        color: #0f172a;
    }

    /* Дни недели */
    .calendar-weekday {
        padding: 10px 4px !important;
        font-size: 12px !important;
        font-weight: 600;
        background: #f1f5f9;
        border-radius: 10px;
        text-align: center;
        color: #334155;
    }

    /* Сетка календаря */
    .calendar-grid {
        gap: 6px !important;
        margin-bottom: 16px !important;
    }

    /* Ячейки календаря */
    .calendar-cell {
        min-height: 90px !important;
        padding: 8px !important;
        background: #f8fafc;
        border-radius: 12px;
        position: relative;
        display: flex;
        flex-direction: column;
    }

    .calendar-cell .day-number {
        font-size: 12px !important;
        font-weight: 700;
        margin-bottom: 6px;
        color: #0f172a;
        background: rgba(255,255,255,0.8);
        padding: 2px 6px;
        border-radius: 12px;
        display: inline-block;
        align-self: flex-start;
    }

    .calendar-cell.today {
        border: 2px solid #2563eb;
        background: #eff6ff;
    }

    .calendar-cell.today .day-number {
        background: #2563eb;
        color: white;
    }

    .calendar-cell.weekend {
        background: #fff5f5;
    }

    /* Контейнер для смен */
    .calendar-cell .shifts-container {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 6px;
        flex: 1;
        max-height: 60px;
        overflow-y: auto;
    }

    /* Элемент смены */
    .shift-item {
        padding: 4px 6px !important;
        font-size: 10px !important;
        border-left-width: 4px !important;
        border-radius: 6px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
    }

    .shift-item .shift-content {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
        min-width: 0;
    }

    .shift-item .shift-master {
        font-size: 10px !important;
        font-weight: 700;
        color: #0f172a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .shift-item .shift-branch {
        display: block !important;
        font-size: 8px !important;
        color: #64748b;
        background: #f1f5f9;
        padding: 2px 4px;
        border-radius: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .shift-item .shift-icons {
        font-size: 10px !important;
        margin-left: 4px;
        min-width: 16px;
        text-align: center;
    }

    /* Кнопка добавления смены */
    .add-shift-btn {
        width: 100%;
        padding: 6px !important;
        font-size: 9px !important;
        border: 1px dashed #94a3b8;
        border-radius: 8px;
        background: white;
        color: #475569;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        margin-top: 4px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .add-shift-btn:hover {
        border-color: #2563eb;
        color: #2563eb;
        background: #f0f9ff;
    }

    .add-shift-btn i {
        font-size: 8px !important;
    }

    /* Индикатор "нет смен" */
    .calendar-cell .no-shifts {
        font-size: 9px !important;
        padding: 6px 4px !important;
        color: #94a3b8;
        font-style: italic;
        text-align: center;
        background: white;
        border-radius: 6px;
        margin-bottom: 4px;
    }

    /* Легенда */
    .shift-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 16px !important;
        padding: 16px !important;
        background: #f8fafc;
        border-radius: 16px;
        margin-top: 20px;
    }

    .legend-item {
        display: flex;
        align-items: center;
        gap: 8px !important;
        font-size: 12px !important;
        color: #334155;
    }

    .legend-color {
        width: 16px !important;
        height: 16px !important;
        border-radius: 4px !important;
    }

    .legend-color.morning {
        background: #2563eb;
    }

    .legend-color.evening {
        background: #8b5cf6;
    }

    .legend-color.full {
        background: #cb2111;
    }

    /* ========== ФОРМА ДОБАВЛЕНИЯ СМЕНЫ ========== */
    #shiftsPage .form-container {
        margin-top: 20px;
        padding: 20px !important;
        background: white;
        border-radius: 24px;
    }

    #shiftsPage .form-container h3 {
        font-size: 18px !important;
        margin-bottom: 20px !important;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    #shiftsPage .form-row {
        display: flex !important;
        flex-direction: column;
        gap: 16px !important;
        margin-bottom: 0;
    }

    #shiftsPage .form-group {
        width: 100%;
        margin-bottom: 0;
    }

    #shiftsPage .form-group label {
        font-size: 13px !important;
        margin-bottom: 6px !important;
        display: block;
        font-weight: 600;
        color: #334155;
    }

    #shiftsPage select,
    #shiftsPage input {
        width: 100%;
        padding: 14px 16px !important;
        font-size: 15px !important;
        border: 2px solid #e2e8f0;
        border-radius: 16px !important;
        background: #f8fafc;
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
        background-size: 16px;
        padding-right: 44px !important;
    }

    #shiftsPage select:focus,
    #shiftsPage input:focus {
        outline: none;
        border-color: #2563eb;
        background: white;
    }

    #shiftsPage .btn-primary {
        width: 100%;
        padding: 16px !important;
        font-size: 16px !important;
        font-weight: 600;
        background: #2563eb;
        color: white;
        border: none;
        border-radius: 40px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 8px;
        cursor: pointer;
        transition: all 0.2s;
    }

    #shiftsPage .btn-primary:hover {
        background: #1d4ed8;
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
    }

    #shiftsPage .btn-primary i {
        font-size: 16px;
    }

    /* ========== УЛУЧШЕННЫЕ ТАБЛИЦЫ ДЛЯ МОБИЛЬНЫХ ========== */
    .table-container {
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 16px 0;
        padding: 0;
        border-radius: 20px;
        background: white;
        box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    }

    .table-container::after {
        content: '← →';
        position: sticky;
        bottom: 12px;
        right: 12px;
        float: right;
        background: #2563eb;
        color: white;
        padding: 6px 14px;
        border-radius: 30px;
        font-size: 12px;
        font-weight: 600;
        opacity: 0.9;
        pointer-events: none;
        margin: 12px;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        z-index: 20;
    }

    .table-container table {
        min-width: auto !important;
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
    }

    .table-container table th:first-child,
    .table-container table td:first-child {
        position: static !important;
        left: auto !important;
        box-shadow: none !important;;
    }

    .table-container table th:nth-child(2),
    .table-container table td:nth-child(2) {
        position: static !important;
        left: auto !important;
        box-shadow: none !important;
    }

    .table-container table th {
        background: #f8fafc;
        padding: 14px 12px;
        font-size: 12px;
        font-weight: 600;
        color: #334155;
        white-space: nowrap;
        border-bottom: 2px solid #e2e8f0;
    }

    .table-container table td {
        padding: 14px 12px;
        white-space: normal;  /* ← поменяли nowrap на normal */
        word-break: break-word;
        border-bottom: 1px solid #f1f5f9;
    }

    #pricesTable {
        min-width: 1200px !important;
    }

    #clientsTable {
        min-width: 1000px !important;
    }

    #upcomingAppointments,
    #bookingsList,
    #dateBookingsList {
        min-width: 900px !important;
    }

    #transactionsTable {
        min-width: 800px !important;
    }

    #purchasesTable {
        min-width: 1000px !important;
    }

    /* Адаптация остального контента */
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-info h3 {
        font-size: 12px;
    }
    
    .stat-info .value {
        font-size: 24px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .board {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .column {
        width: 100%;
    }
    
    .stock-grid {
        grid-template-columns: 1fr;
    }
    
    .date-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .master-selector {
        flex-wrap: wrap;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(3, 1fr);
        max-height: 300px;
    }
    
    #branchSlotsContainer {
        grid-template-columns: 1fr;
    }
}

/* На компьютере показываем левое меню и скрываем мобильные элементы */
@media (min-width: 1025px) {
    .sidebar {
        display: block;
        width: 280px;
        background: #0f172a;
        color: white;
        padding: 24px 16px;
        position: fixed;
        height: 100vh;
        overflow-y: auto;
    }
    
    .main {
        margin-left: 280px;
        padding: 24px 32px;
    }
    
    .mobile-menu-toggle,
    .mobile-bottom-menu,
    .mobile-full-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .table-container::after {
        display: none;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .calendar-header > div {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .calendar-header .btn {
        flex: 1;
    }
    
    .master-shift-stats {
        grid-template-columns: 1fr !important;
    }
    
    .calendar-cell {
        min-height: 100px !important;
    }
    
    .shift-item {
        padding: 6px 8px !important;
    }
    
    .shift-item .shift-master {
        font-size: 11px !important;
    }
    
    .shift-item .shift-branch {
        font-size: 9px !important;
    }
}

/* Исправление для iPhone с "чёлкой" */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-menu {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .main {
        padding-bottom: max(100px, calc(env(safe-area-inset-bottom) + 80px));
    }
}

/* Анимации */
@keyframes slideUp {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mobile-full-menu.show {
    animation: slideUp 0.3s ease-out;
}

.mobile-menu-overlay.active {
    animation: fadeIn 0.3s ease-out;
}

/* Стили для прокрутки */
.mobile-full-menu::-webkit-scrollbar {
    width: 4px;
}

.mobile-full-menu::-webkit-scrollbar-track {
    background: #1e293b;
}

.mobile-full-menu::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 2px;
}

.table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Стили для пользовательского меню */
.user-menu {
    position: relative;
}

#userMenu {
    animation: fadeIn 0.2s ease-out;
}

#userMenu button:hover {
    background: #f8fafc;
}

#userMenu hr {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 8px 0;
}

/* Адаптация для мобильных */
@media (max-width: 1024px) {
    .user-menu {
        margin-left: auto;
    }
    
    #userNameDisplay,
    #userRoleDisplay,
    #userMenuArrow {
        display: none;
    }
    
    .user-menu > button {
        padding: 4px !important;
        background: transparent !important;
    }
    
    .user-menu > button div:not(#userAvatar) {
        display: none;
    }
    
    #userAvatar {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
    }
}

/* Анимация для меню */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для кнопки переключения режима */
#togglePriceModeBtn {
    transition: all 0.2s;
}

#togglePriceModeBtn i {
    margin-right: 4px;
}

#togglePriceModeBtn.btn-warning {
    background: #ffc107;
    color: #000;
    border-color: #ffc107;
}

#togglePriceModeBtn.btn-warning:hover {
    background: #e0a800;
}

/* Стили для ручного режима */
#manualPriceMode {
    animation: slideDown 0.3s ease-out;
}

#manualTotalPrice {
    font-size: 18px;
    font-weight: 600;
}

#manualTotalPrice:focus {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== УЛУЧШЕННАЯ КАРТОЧКА КЛИЕНТА ==================== */

/* Модальное окно для карточки клиента */
.modal.active .modal-content {
    max-width: 1200px !important; /* Увеличиваем ширину */
    width: 95%;
    padding: 30px;
}

/* Контент внутри модального окна */
#modalMessage {
    max-height: 80vh !important;
    overflow-y: auto !important;
    padding-right: 15px;
}

/* Улучшаем внешний вид секций */
#modalMessage > div {
    margin-bottom: 25px;
}

#modalMessage h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Основная информация - сетка */
#modalMessage .grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* История визитов - таблица */
#modalMessage table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 700px; /* Чтобы таблица не сжималась */
}

#modalMessage th {
    background: #f8fafc;
    padding: 12px 10px;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

#modalMessage td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}

#modalMessage td:first-child {
    font-weight: 600;
    color: #0f172a;
}

/* Контейнер для таблицы с горизонтальной прокруткой */
#modalMessage .table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* Статистика - карточки */
#modalMessage .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

#modalMessage .stat-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

#modalMessage .stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 5px;
}

#modalMessage .stat-card .stat-label {
    font-size: 13px;
    color: #64748b;
}

/* Информация о клиенте */
#modalMessage .client-info {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

#modalMessage .client-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#modalMessage .client-info-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#modalMessage .client-info-value {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

/* Комментарий клиента */
#modalMessage .client-comment {
    background: #fff7ed;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #f97316;
    margin-top: 15px;
}

/* Скроллбар для модального окна */
#modalMessage::-webkit-scrollbar {
    width: 8px;
}

#modalMessage::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#modalMessage::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#modalMessage::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .modal.active .modal-content {
        max-width: 95% !important;
        padding: 20px;
    }
    
    #modalMessage .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    #modalMessage .client-info {
        grid-template-columns: 1fr;
    }
    
    #modalMessage table {
        min-width: 600px;
        font-size: 13px;
    }
}

/* ==================== ФИКС ДЛЯ ЗАГОЛОВКОВ ПРАЙСОВ ==================== */

/* Запрещаем перенос текста в заголовках таблицы прайсов */
#pricesTable th {
    white-space: nowrap !important;
    min-width: 100px;
}

/* Для мобильной версии - делаем заголовки компактнее */
@media (max-width: 768px) {
    #pricesTable th {
        min-width: 80px;
        font-size: 12px !important;
        padding: 12px 8px !important;
    }
    
    #pricesTable td {
        padding: 12px 8px !important;
        font-size: 13px !important;
    }
}

/* Для очень маленьких экранов - уменьшаем отступы */
@media (max-width: 480px) {
    #pricesTable th {
        min-width: 70px;
        font-size: 11px !important;
        padding: 10px 6px !important;
    }
    
    #pricesTable td {
        padding: 10px 6px !important;
        font-size: 12px !important;
    }
}

/* Стили для калькулятора услуг - компактная версия */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.service-card {
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.service-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.service-card label {
    cursor: pointer;
    transition: all 0.2s;
}

.service-card label:hover {
    background: #eef2ff !important;
}

/* Для мобильной версии */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .service-card {
        padding: 10px !important;
    }
    
    .service-card > div:first-child {
        margin-bottom: 8px !important;
        padding-bottom: 6px !important;
    }
    
    .service-card .service-name {
        font-size: 13px !important;
    }
    
    .service-card .price-badge {
        font-size: 11px !important;
        padding: 2px 6px !important;
    }
    
    .service-card label {
        padding: 6px 8px !important;
    }
    
    .service-card label span {
        font-size: 10px !important;
    }
    
    .service-card label span:last-child {
        font-size: 11px !important;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: #f1f5f9;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #0f172a;
    color: white;
    padding: 24px 16px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    margin-bottom: 40px;
}

.logo-icon {
    background: #2563eb;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-text {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
}

.logo-text span {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
}

.nav-item {
    width: 100%;
    padding: 14px 18px;
    border-radius: 12px;
    color: #cbd5e1;
    background: none;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: 0.2s;
}

.nav-item i {
    width: 24px;
    font-size: 1.2rem;
}

.nav-item:hover {
    background: #1e293b;
    color: white;
}

.nav-item.active {
    background: #2563eb;
    color: white;
}

/* Dropdown menu */
.nav-item.has-dropdown {
    position: relative;
}

.nav-item .arrow {
    margin-left: auto;
    transition: transform 0.3s;
}

.nav-item.open .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    margin-left: 46px;
    margin-top: 4px;
    margin-bottom: 8px;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    width: 100%;
    padding: 12px 18px;
    border-radius: 10px;
    color: #cbd5e1;
    background: none;
    border: none;
    text-align: left;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: 0.2s;
}

.dropdown-item i {
    width: 20px;
    font-size: 1rem;
}

.dropdown-item:hover {
    background: #1e293b;
    color: white;
}

.dropdown-item.active {
    background: #2563eb;
    color: white;
}

.dropdown-item.voronezh i {
    color: #eb2525;
}

.dropdown-item.partsezda i {
    color: #8b5cf6;
}

.branch-badge {
    margin-left: auto;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,0.1);
}

/* Main content */
.main {
    flex: 1;
    margin-left: 280px;
    padding: 24px 32px;
}

.top-bar {
    background: white;
    padding: 20px 28px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.title h1 {
    font-size: 24px;
    color: #0f172a;
}

.title p {
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

.btn {
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* Stats cards */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 22px;
    border-radius: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eef2f6;
}

.stat-info h3 {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-info .value {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: #eef2ff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 24px;
}

/* Forms */
.form-container {
    background: white;
    padding: 32px;
    border-radius: 28px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #334155;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 15px;
    background: #f8fafc;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    background: white;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 24px;
    padding: 24px;
    margin-top: 24px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px 12px;
    color: #64748b;
    font-weight: 500;
    font-size: 14px;
    border-bottom: 2px solid #eef2f6;
}

td {
    padding: 16px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.badge {
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Kanban board */
.board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.column {
    background: #f8fafc;
    border-radius: 24px;
    padding: 18px;
    border: 1px solid #eef2f6;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    font-weight: 600;
}

.task-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #eef2f6;
    cursor: pointer;
    transition: 0.2s;
}

.task-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

/* Stock grid */
.stock-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: white;
    border-radius: 24px;
    padding: 22px;
}

.progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 20px;
    margin: 12px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 20px;
}

.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;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 32px;
    width: 90%;
    max-width: 500px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #22c55e;
    color: white;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    transform: translateX(400px);
    transition: 0.3s;
    z-index: 2000;
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: #ef4444;
}

/* Scheduler styles */
.scheduler-container {
    background: white;
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.02);
}

.branch-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
}

.branch-header.voronezh {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.branch-header.partsezda {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

.branch-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.branch-info h2 {
    font-size: 24px;
    margin-bottom: 4px;
}

.branch-info p {
    opacity: 0.9;
    font-size: 14px;
}

.date-selector {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.date-selector input[type="date"] {
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 20px;
    font-size: 16px;
    min-width: 200px;
}

.master-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.master-chip {
    padding: 10px 20px;
    border-radius: 40px;
    background: #f1f5f9;
    border: 2px solid transparent;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.master-chip:hover {
    background: #e2e8f0;
}

.master-chip.selected {
    background: #2563eb;
    color: white;
    border-color: #1d4ed8;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.time-slot {
    padding: 14px 8px;
    text-align: center;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    border: 2px solid transparent;
}

.time-slot.free {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.time-slot.free:hover {
    background: #bbf7d0;
    transform: scale(1.02);
}

.time-slot.busy {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
    opacity: 0.7;
    cursor: not-allowed;
}

.time-slot.selected {
    background: #2563eb;
    color: white;
    border-color: #1e3a8a;
}

.legend {
    display: flex;
    gap: 24px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 8px;
}

.legend-color.free {
    background: #dcfce7;
    border: 2px solid #86efac;
}

.legend-color.busy {
    background: #fee2e2;
    border: 2px solid #fecaca;
}

.quick-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.time-slot-info {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
}

.slot-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* Shift calendar styles */
.shift-calendar {
    background: white;
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 600;
    color: #64748b;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
}

.calendar-cell {
    min-height: 120px;
    background: #f8fafc;
    border-radius: 16px;
    padding: 12px;
    border: 2px solid transparent;
    transition: 0.2s;
}

.calendar-cell.today {
    border-color: #2563eb;
}

.calendar-cell.weekend {
    background: #fee2e2;
}

.calendar-cell .day-number {
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
}

.shift-item {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-left: 3px solid #2563eb;
}

.shift-item.morning {
    border-left-color: #2563eb;
}

.shift-item.evening {
    border-left-color: #8b5cf6;
}

.add-shift-btn {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    background: none;
    color: #64748b;
    cursor: pointer;
    margin-top: 8px;
    font-size: 12px;
}

.add-shift-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.master-shift-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.shift-stat-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.shift-stat-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 20px;
}

.shift-stat-info h4 {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.shift-stat-info .shift-count {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 24px 8px;
    }
    
    .logo-text,
    .nav-item span:not(.branch-badge),
    .dropdown-item span:not(.branch-badge) {
        display: none;
    }
    
    .nav-item i,
    .dropdown-item i {
        margin: 0 auto;
    }
    
    .main {
        margin-left: 80px;
    }
    
    .dropdown-menu {
        margin-left: 10px;
    }

    /* Client actions styles */
    .btn-icon {
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        margin: 0 5px;
        transition: transform 0.2s;
    }

    .btn-icon:hover {
        transform: scale(1.1);
    }

    .btn-icon i {
        font-size: 18px;
    }

    .edit-input {
        width: 100%;
        padding: 8px;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        font-size: 14px;
        transition: border-color 0.2s;
    }

    .edit-input:focus {
        outline: none;
        border-color: #2563eb;
    }

    #clientsTable td {
        vertical-align: middle;
        padding: 12px 8px;
    }

    #clientsTable .action-buttons,
    #clientsTable .edit-buttons {
        display: flex;
        gap: 5px;
        justify-content: flex-start;
    }

    #clientsTable tr {
        transition: opacity 0.3s;
    }

    /* Search input styles */
    #clientSearch {
        padding: 10px 18px;
        border-radius: 40px;
        border: 2px solid #e2e8f0;
        font-size: 14px;
        width: 250px;
        transition: border-color 0.2s;
    }

    #clientSearch:focus {
        outline: none;
        border-color: #2563eb;
    }

  
    /* Стили для отмененных заказов */
    .btn-danger {
        background: #ef4444;
        color: white;
        border: none;
        padding: 8px 16px;
        border-radius: 8px;
        font-weight: 500;
        cursor: pointer;
        transition: 0.2s;
    }

    .btn-danger:hover {
        background: #dc2626;
    }

    .task-card.cancelled {
        opacity: 0.7;
        background: #fef2f2;
        border-left: 4px solid #ef4444;
        position: relative;
    }

    .task-card.cancelled::before {
        content: '❌';
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 16px;
        opacity: 0.5;
    }

    /* Счетчик отмененных */
    #cancelledCount {
        background: #ef4444;
        color: white;
    }

    #filterCancelledCount {
        background: #ef4444;
        color: white;
    }
    /* Стили для drag & drop */
    .task-card[draggable="true"] {
        cursor: grab;
        user-select: none;
    }

    .task-card[draggable="true"]:active {
        cursor: grabbing;
    }

    .task-card.dragging {
        opacity: 0.5;
        transform: scale(0.95);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

    .column.drag-over {
        background: #e0f2fe;
        border: 2px dashed #2563eb;
    }

    .column.drag-over .tasks-container {
        min-height: 200px;
    }

    /* Анимация при перетаскивании */
    @keyframes pulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.02); }
        100% { transform: scale(1); }
    }

    .task-card[draggable="true"]:hover {
        animation: pulse 0.5s ease infinite;
    }

    /* Подсказка для перетаскивания */
    .drag-hint {
        font-size: 11px;
        color: #94a3b8;
        text-align: center;
        margin-top: 8px;
        padding-top: 6px;
        border-top: 1px dashed #e2e8f0;
    }

    /* Запрещаем перетаскивание для отмененных заказов */
    .task-card[data-status="cancelled"][draggable="true"] {
        cursor: not-allowed;
        opacity: 0.7;
    }

    .task-card[data-status="cancelled"][draggable="true"]:hover {
        animation: none;
    }
    /* Стили для множественного выбора */
    .time-slot.selected {
        background: #2563eb !important;
        color: white !important;
        border-color: #1d4ed8 !important;
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        position: relative;
    }

    .time-slot.selected::after {
        content: '✓';
        position: absolute;
        top: 2px;
        right: 5px;
        font-size: 12px;
        font-weight: bold;
    }

    .time-slot.selected.free {
        background: #2563eb !important;
        color: white !important;
    }

    .time-slot.selected.free span {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    /* Индикатор режима множественного выбора */
    .multi-select-active {
        background: #e0f2fe;
        border: 2px solid #2563eb;
        animation: pulse 1s infinite;
    }

    @keyframes pulse {
        0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
        70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
        100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
    }

    /* Подсказка для множественного выбора */
    .multi-select-hint {
        background: #e0f2fe;
        border-radius: 8px;
        padding: 8px;
        margin-top: 10px;
        text-align: center;
        color: #0369a1;
        font-size: 13px;
        border-left: 3px solid #2563eb;
    }

    /* Счетчик выбранных слотов */
    .selected-count-badge {
        background: #2563eb;
        color: white;
        padding: 4px 12px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
    }

    /* Информация о выбранных слотах */
    .slots-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    /* Стили для карточек филиалов на рабочем столе */
    .branch-slot-card {
        transition: all 0.2s;
        position: relative;
        overflow: hidden;
    }

    .branch-slot-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }

    .branch-slot-card::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0 30px 30px 0;
        border-color: transparent rgba(37, 99, 235, 0.1) transparent transparent;
        opacity: 0;
        transition: opacity 0.2s;
    }

    .branch-slot-card:hover::after {
        opacity: 1;
    }

    /* Цветовые индикаторы для количества слотов */
    .branch-slot-card[data-status="critical"] {
        border-left-color: #ef4444 !important;
    }

    .branch-slot-card[data-status="low"] {
        border-left-color: #f59e0b !important;
    }

    .branch-slot-card[data-status="medium"] {
        border-left-color: #10b981 !important;
    }

    .branch-slot-card[data-status="high"] {
        border-left-color: #2563eb !important;
    }

    /* Анимация для счетчиков */
    @keyframes countPulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }

    .slot-count.update {
        animation: countPulse 0.3s ease;
    }

    /* Стили для статуса "нет смен" */
    .branch-slot-card.no-masters {
        background: #fef2f2;
    }

    .branch-slot-card.no-masters .slot-status {
        color: #ef4444 !important;
    }

    .branch-slot-card.no-masters .slot-count {
        color: #ef4444 !important;
    }

    /* Дополнительные стили для карточек */
    .branch-slot-card .btn-secondary {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        transition: all 0.2s;
    }

    .branch-slot-card .btn-secondary:hover {
        background: #2563eb;
        color: white;
        border-color: #2563eb;
    }

    .branch-slot-card .btn-secondary:hover i {
        color: white;
    }

    /* Стили для эмодзи */
    .master-chip {
        font-size: 14px;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .master-chip.selected {
        background: #2563eb;
        color: white;
    }

    .time-slot {
        font-family: 'Inter', sans-serif;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .branch-slot-card .btn-secondary {
        font-size: 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    /* Убираем лишние иконки Font Awesome там где используем эмодзи */
    .btn-icon i.fas {
        display: none;
    }

    .btn-icon {
        font-size: 18px;
        padding: 5px;
        background: none;
        border: none;
        cursor: pointer;
        transition: transform 0.2s;
    }

    .btn-icon:hover {
        transform: scale(1.1);
    }

    /* Стили для кнопок с эмодзи */
    .btn-primary, .btn-secondary {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    /* Стили для ячеек таблицы */
    td span[style*="cursor: pointer"] {
        font-size: 18px;
        margin: 0 5px;
    }

    /* Анимация для счетчиков */
    @keyframes countPulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }

    .slot-count.update {
        animation: countPulse 0.3s ease;
    }

    /* Стили для карточек филиалов */
    .branch-slot-card {
        transition: all 0.2s;
    }

    .branch-slot-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }

    .branch-slot-card.no-masters {
        background: #fef2f2;
    }

    .branch-slot-card.no-masters .slot-status {
        color: #ef4444 !important;
    }

    /* Улучшенные стили для календаря смен */
    .calendar-cell {
        min-height: 130px;
        background: #f8fafc;
        border-radius: 16px;
        padding: 10px;
        border: 2px solid transparent;
        transition: 0.2s;
        display: flex;
        flex-direction: column;
    }

    .calendar-cell.empty {
        background: transparent;
        border: 2px dashed #e2e8f0;
        opacity: 0.5;
    }

    .calendar-cell.today {
        border-color: #2563eb;
        background: #eff6ff;
    }

    .calendar-cell.weekend {
        background: #fef2f2;
    }

    .calendar-cell .day-number {
        font-weight: 600;
        margin-bottom: 6px;
        color: #334155;
        font-size: 13px;
        text-align: center;
        background: rgba(0,0,0,0.02);
        padding: 2px;
        border-radius: 12px;
    }

    .calendar-cell .shifts-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-bottom: 6px;
    }

    .calendar-cell .no-shifts {
        text-align: center;
        color: #cbd5e1;
        font-size: 12px;
        padding: 8px;
        font-style: italic;
    }

    .shift-item {
        font-size: 11px;
        padding: 6px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: white;
        border-left: 4px solid #2563eb;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        cursor: pointer;
        transition: all 0.2s;
    }

    .shift-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    }

    .shift-item .shift-content {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
    }

    .shift-item .shift-master {
        font-weight: 600;
        font-size: 11px;
        color: #0f172a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70px;
    }

    .shift-item .shift-branch {
        font-size: 9px;
        color: #64748b;
        background: #f1f5f9;
        padding: 2px 4px;
        border-radius: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 70px;
        display: inline-block;
    }

    .shift-item .shift-icons {
        font-size: 12px;
        min-width: 18px;
        text-align: center;
        margin-left: 4px;
    }

    .add-shift-btn {
        width: 100%;
        padding: 4px;
        border-radius: 8px;
        border: 1px dashed #cbd5e1;
        background: none;
        color: #64748b;
        cursor: pointer;
        margin-top: 4px;
        font-size: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        transition: all 0.2s;
    }

    .add-shift-btn:hover {
        border-color: #2563eb;
        color: #2563eb;
        background: #f0f9ff;
    }

    .add-shift-btn i {
        font-size: 9px;
    }

    /* Статистика смен */
    .master-shift-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
        margin-bottom: 24px;
    }

    .shift-stat-card {
        background: #f8fafc;
        border-radius: 20px;
        padding: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        transition: all 0.2s;
    }

    .shift-stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    }

    .shift-stat-icon {
        width: 48px;
        height: 48px;
        background: white;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #2563eb;
        font-size: 24px;
    }

    .shift-stat-info h4 {
        font-size: 13px;
        color: #64748b;
        font-weight: 500;
        margin-bottom: 4px;
    }

    .shift-stat-info .shift-count {
        font-size: 24px;
        font-weight: 700;
        color: #0f172a;
        line-height: 1;
    }

    /* Легенда */
    .shift-legend {
        display: flex;
        gap: 24px;
        margin-top: 20px;
        padding: 16px;
        background: #f8fafc;
        border-radius: 16px;
        flex-wrap: wrap;
    }

    .legend-item {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
    }

    .legend-color {
        width: 20px;
        height: 20px;
        border-radius: 6px;
    }

    .legend-color.morning {
        background: #2563eb;
    }

    .legend-color.evening {
        background: #8b5cf6;
    }

    .legend-color.full {
        background: #cb2111;
    }

    /* Форма добавления смены */
    #shiftsPage .form-container {
        margin-top: 24px;
    }

    #shiftsPage .form-row {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
        align-items: end;
    }

    #shiftsPage .form-group {
        margin-bottom: 0;
    }

    #shiftsPage select,
    #shiftsPage input {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid #e2e8f0;
        border-radius: 14px;
        font-size: 14px;
        background: #f8fafc;
        transition: all 0.2s;
    }

    #shiftsPage select:focus,
    #shiftsPage input:focus {
        outline: none;
        border-color: #2563eb;
        background: white;
    }

    #shiftsPage .btn-primary {
        padding: 12px 24px;
        border-radius: 40px;
        font-weight: 600;
        font-size: 14px;
        background: #2563eb;
        color: white;
        border: none;
        cursor: pointer;
        transition: all 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }

    #shiftsPage .btn-primary:hover {
        background: #1d4ed8;
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
    }

    /* Стили для автоподстановки моделей */
    .autocomplete-suggestions {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 2px solid #e2e8f0;
        border-radius: 12px;
        margin-top: 4px;
        max-height: 300px;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

    .autocomplete-item {
        padding: 12px 16px;
        cursor: pointer;
        border-bottom: 1px solid #f1f5f9;
        transition: background-color 0.2s;
    }

    .autocomplete-item:last-child {
        border-bottom: none;
    }

    .autocomplete-item:hover {
        background-color: #f8fafc;
    }

    .autocomplete-item.selected {
        background-color: #eef2ff;
        border-left: 3px solid #2563eb;
    }

    /* Анимация появления */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .autocomplete-suggestions {
        animation: slideDown 0.2s ease-out;
    }

    /* Скроллбар для списка */
    .autocomplete-suggestions::-webkit-scrollbar {
        width: 8px;
    }

    .autocomplete-suggestions::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 4px;
    }

    .autocomplete-suggestions::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

    .autocomplete-suggestions::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

    /* Стили для калькулятора услуг */
    .service-card {
        transition: all 0.2s;
        cursor: pointer;
    }

    .service-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    }

    .service-card input[type="checkbox"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
    }

    .service-card input[type="radio"] {
        width: 16px;
        height: 16px;
        cursor: pointer;
    }

    #priceCalculatorBlock {
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Стили для суммы */
    #totalPrice {
        transition: all 0.3s;
    }

    #totalPrice.update {
        animation: pricePulse 0.3s ease;
    }

    @keyframes pricePulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.1); }
        100% { transform: scale(1); }
    }

    /* Стили для сетки услуг */
    .services-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 16px;
    }

    /* Компактные стили для страницы прайсов */
    #pricesPage .table-container {
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    }

    #pricesTable {
        width: 100%;
        border-collapse: collapse;
        font-size: 15px;
    }

    #pricesTable th {
        background: #f8fafc;
        padding: 12px 10px;
        font-weight: 600;
        color: #334155;
        border-bottom: 1px solid #e2e8f0;
        white-space: nowrap;
    }

    #pricesTable td {
        padding: 10px;
        border-bottom: 1px solid #f1f5f9;
        color: #0f172a;
    }

    #pricesTable tbody tr:hover td {
        background: #f8fafc;
    }

    #pricesTable td:not(:first-child):not(:nth-child(2)) {
        font-family: 'Courier New', monospace;
        font-weight: 500;
        color: #2563eb;
    }

    /* Компактные карточки статистики */
    #pricesPage .stat-card-compact {
        background: white;
        border-radius: 12px;
        padding: 12px 20px;
        display: flex;
        align-items: center;
        gap: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        border: 1px solid #f1f5f9;
    }

    #pricesPage .stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
    }

    /* Убираем лишние отступы */
    #pricesPage h2 {
        margin: 0;
        font-size: 22px;
    }

    #pricesPage input, 
    #pricesPage select,
    #pricesPage button {
        font-size: 13px;
    }

    /* Упрощаем скроллбар */
    #pricesPage .table-container::-webkit-scrollbar {
        height: 6px;
    }

    #pricesPage .table-container::-webkit-scrollbar-track {
        background: #f1f5f9;
    }

    #pricesPage .table-container::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }
}

/* ==================== СТИЛИ ДЛЯ ПРАЙСОВ ==================== */

/* Контейнер таблицы */
#pricesPage .table-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    margin-top: 20px;
    background: white;
}

/* Сама таблица */
#pricesTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

/* Заголовки */
#pricesTable th {
    background: #f8fafc;
    padding: 14px 12px;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
    text-align: center;
    font-size: 14px !important;
}

#pricesTable th:first-child,
#pricesTable th:nth-child(2) {
    text-align: left;
    padding-left: 15px;
}

/* Ячейки */
#pricesTable td {
    padding: 12px 10px !important;
    border-bottom: 1px solid #f1f5f9;
    color: #0f172a ;
    font-size: 14px !important;
}

#pricesTable td:first-child,
#pricesTable td:nth-child(2) {
    text-align: left;
    padding-left: 15px;
}

#pricesTable td:nth-child(3),
#pricesTable td:nth-child(4),
#pricesTable td:nth-child(5),
#pricesTable td:nth-child(6),
#pricesTable td:nth-child(7),
#pricesTable td:nth-child(8),
#pricesTable td:nth-child(9) {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: 700 !important; /* Жирнее */
    color: #2563eb;
    font-size: 15px; 
}

/* ===== ПРОСТОЕ ВЫДЕЛЕНИЕ СТРОК ===== */

/* Эффект при наведении */
#pricesTable tbody tr {
    cursor: pointer;
}

#pricesTable tbody tr:hover {
    background: #f1f5f9;
}

/* ВЫДЕЛЕННАЯ СТРОКА */
#pricesTable tbody tr.price-selected-row {
    background: #2563eb !important;
    color: white !important;
    border-left: 4px solid #1e40af !important;
}

/* Ячейки выделенной строки */
#pricesTable tbody tr.price-selected-row td {
    background: transparent !important;
    color: white !important;
}

#pricesTable tbody tr.price-selected-row td strong {
    color: white !important;
}

#pricesTable tbody tr.price-selected-row td:nth-child(3),
#pricesTable tbody tr.price-selected-row td:nth-child(4),
#pricesTable tbody tr.price-selected-row td:nth-child(5),
#pricesTable tbody tr.price-selected-row td:nth-child(6),
#pricesTable tbody tr.price-selected-row td:nth-child(7),
#pricesTable tbody tr.price-selected-row td:nth-child(8),
#pricesTable tbody tr.price-selected-row td:nth-child(9) {
    color: white !important;
    font-weight: 800 !important; /* Ещё жирнее для выделенной строки */
}

/* Четные строки */
#pricesTable tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

#pricesTable tbody tr.price-selected-row:nth-child(even) {
    background: #2563eb !important;
}

/* Скроллбар */
#pricesPage .table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

#pricesPage .table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#pricesPage .table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#pricesPage .table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}   

/* Улучшение для таблиц с записями */
#upcomingAppointments td,
#bookingsList td,
#dateBookingsList td {
    vertical-align: middle;
    white-space: nowrap;
}

#upcomingAppointments td:nth-child(5),
#bookingsList td:nth-child(5),
#dateBookingsList td:nth-child(5) {
    white-space: nowrap;
}

#upcomingAppointments .badge,
#bookingsList .badge,
#dateBookingsList .badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
}
/* ==================== УЛУЧШЕННЫЙ РАБОЧИЙ СТОЛ ==================== */

/* Статистика */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.02);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #f1f5f9;
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.05);
    border-color: #e2e8f0;
}

.stat-info h3 {
    color: #64748b;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.stat-info .value {
    font-size: 36px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: #eef2ff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 28px;
}

/* Карточки филиалов */
.branch-stat-card {
    background: white;
    border-radius: 24px;
    padding: 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 16px rgba(0,0,0,0.02);
    transition: all 0.2s;
}

.branch-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.05);
    border-color: #e2e8f0;
}

.branch-stat-card .btn-secondary {
    transition: all 0.2s;
    font-weight: 600;
}

/* Таблица ближайших записей */
#upcomingAppointments {
    width: 100%;
    border-collapse: collapse;
}

#upcomingAppointments th {
    background: #f8fafc;
    padding: 16px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

#upcomingAppointments td {
    padding: 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

#upcomingAppointments tbody tr {
    transition: all 0.2s;
}

#upcomingAppointments tbody tr:hover {
    background: #f8fafc;
}

/* Статусы заказов */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.status-new {
    background: #dbeafe;
    color: #2563eb;
}

.status-working {
    background: #fef3c7;
    color: #b45309;
}

.status-ready {
    background: #d1fae5;
    color: #047857;
}

.status-completed {
    background: #f3f4f6;
    color: #4b5563;
}

/* Филиалы */
.branch-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.branch-voronezh {
    background: #e0e7ff;
    color: #2563eb;
}

.branch-partsezda {
    background: #ede9fe;
    color: #8b5cf6;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: 1fr;
    }
    
    #upcomingAppointments {
        font-size: 13px;
    }
    
    #upcomingAppointments th,
    #upcomingAppointments td {
        padding: 12px 8px;
    }
}

/* Простые стили для калькулятора услуг */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.service-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s;
}

.service-card:hover {
    border-color: #2563eb;
}

.service-card input[type="radio"],
.service-card input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.service-card label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    white-space: nowrap;
}

.service-card label span:last-child {
    margin-left: auto;
    color: #2563eb;
    font-size: 12px;
}

/* Стили для калькулятора услуг */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.service-card {
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.service-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.service-card input[type="radio"],
.service-card input[type="checkbox"] {
    accent-color: #2563eb;
}

.service-card label {
    transition: all 0.2s;
    cursor: pointer;
}

.service-card label:hover {
    background: #eef2ff !important;
}

/* Вертикальное расположение для задних дверей */
.service-card .vertical-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-card .vertical-layout label {
    width: 100%;
}

/* Горизонтальное расположение для остальных */
.service-card .horizontal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

/* Цена в виде бейджа */
.price-badge {
    background: #eef2ff;
    color: #2563eb;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Общая стоимость */
.total-price-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.total-price-label {
    font-size: 16px;
    color: #475569;
    margin-right: 15px;
}

.total-price-value {
    font-size: 24px;
    font-weight: 800;
    color: #2563eb;
    background: white;
    padding: 8px 25px;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* ==================== МОБИЛЬНАЯ ВЕРСИЯ ==================== */

/* На мобильных устройствах */
@media (max-width: 1024px) {
    /* Полностью скрываем левое боковое меню */
    .sidebar {
        display: none !important;
    }
    
    /* Основной контент занимает всю ширину */
    .main {
        margin-left: 0 !important;
        padding: 20px 16px 100px;
        width: 100%;
    }
    
    /* Верхняя панель */
    .top-bar {
        padding: 16px 20px;
        margin-bottom: 20px;
    }
    
    .title h1 {
        font-size: 20px;
    }
    
    .title p {
        font-size: 13px;
    }
    
    /* Кнопка открытия меню - справа внизу */
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        bottom: 90px;
        right: 20px;
        width: 56px;
        height: 56px;
        background: #2563eb;
        border-radius: 28px;
        box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
        z-index: 90;
        border: none;
        color: white;
        font-size: 22px;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.3s;
    }

    .mobile-menu-toggle:hover {
        transform: scale(1.1);
        background: #1d4ed8;
    }

    /* Нижнее меню - 5 кнопок */
    .mobile-bottom-menu {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 10px 12px 20px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
        z-index: 95;
        border-radius: 30px 30px 0 0;
        justify-content: space-around;
        align-items: center;
        backdrop-filter: blur(10px);
        background: rgba(255,255,255,0.98);
        transform: translateY(0);
        transition: transform 0.3s ease;
        will-change: transform;
    }

    .mobile-bottom-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        background: none;
        border: none;
        padding: 8px 0;
        border-radius: 12px;
        color: #64748b;
        font-size: 11px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        flex: 1;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-bottom-item i {
        font-size: 20px;
    }

    .mobile-bottom-item.active {
        color: #2563eb;
    }

    .mobile-bottom-item.active i {
        color: #2563eb;
    }

    .mobile-bottom-item:active {
        background: #f1f5f9;
    }

    /* Полноэкранное меню */
    .mobile-full-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #0f172a;
        z-index: 200;
        overflow-y: auto;
        padding: 24px 20px 40px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        will-change: transform;
    }

    .mobile-full-menu.show {
        transform: translateX(0);
        display: block;
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 1px solid #1e293b;
    }

    .mobile-menu-logo {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .mobile-menu-logo .logo-icon {
        width: 40px;
        height: 40px;
        background: #2563eb;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 20px;
    }

    .mobile-menu-logo .logo-text {
        color: white;
        font-weight: 700;
        font-size: 18px;
    }

    .mobile-menu-close {
        width: 44px;
        height: 44px;
        background: #1e293b;
        border: none;
        border-radius: 12px;
        color: white;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }

    .mobile-menu-close:hover {
        background: #334155;
    }

    .mobile-menu-items {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 24px;
    }

    .mobile-menu-item {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px 20px;
        background: #1e293b;
        border: none;
        border-radius: 16px;
        color: #cbd5e1;
        font-size: 16px;
        font-weight: 500;
        text-align: left;
        cursor: pointer;
        transition: all 0.2s;
        width: 100%;
    }

    .mobile-menu-item i {
        width: 24px;
        font-size: 18px;
        color: #64748b;
    }

    .mobile-menu-item:hover,
    .mobile-menu-item.active {
        background: #2563eb;
        color: white;
    }

    .mobile-menu-item:hover i,
    .mobile-menu-item.active i {
        color: white;
    }

    .mobile-menu-section {
        margin-bottom: 24px;
    }

    .mobile-menu-section-title {
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 12px;
        padding-left: 16px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-menu-subitems {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .mobile-menu-subitem {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 14px 20px;
        background: #1e293b;
        border: none;
        border-radius: 14px;
        color: #cbd5e1;
        font-size: 15px;
        cursor: pointer;
        transition: all 0.2s;
        width: 100%;
    }

    .mobile-menu-subitem i {
        width: 20px;
        font-size: 16px;
        color: #64748b;
    }

    .mobile-menu-subitem:hover {
        background: #334155;
        color: white;
    }

    .mobile-menu-badge {
        margin-left: auto;
        background: #334155;
        padding: 4px 10px;
        border-radius: 20px;
        font-size: 11px;
        color: white;
        min-width: 30px;
        text-align: center;
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 150;
        opacity: 0;
        transition: opacity 0.3s;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    /* ========== УЛУЧШЕННЫЙ КАЛЕНДАРЬ ДЛЯ МОБИЛЬНЫХ ========== */
    .shift-calendar {
        padding: 16px !important;
        margin-bottom: 16px !important;
        background: white;
        border-radius: 24px;
    }

    .calendar-header {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px !important;
    }

    .calendar-header h2 {
        font-size: 20px !important;
        margin: 0;
    }

    .calendar-header > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .calendar-header .btn {
        padding: 10px 16px !important;
        font-size: 14px !important;
        min-width: 40px;
        justify-content: center;
    }

    #currentMonthDisplay {
        font-size: 16px !important;
        font-weight: 600;
    }

    /* Статистика смен */
    .master-shift-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    .shift-stat-card {
        padding: 12px !important;
        gap: 10px !important;
        background: #f8fafc;
        border-radius: 16px;
    }

    .shift-stat-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
        background: white;
        border-radius: 12px;
    }

    .shift-stat-info h4 {
        font-size: 12px !important;
        margin-bottom: 4px !important;
        color: #64748b;
    }

    .shift-stat-info .shift-count {
        font-size: 20px !important;
        font-weight: 700;
        color: #0f172a;
    }

    /* Дни недели */
    .calendar-weekday {
        padding: 10px 4px !important;
        font-size: 12px !important;
        font-weight: 600;
        background: #f1f5f9;
        border-radius: 10px;
        text-align: center;
        color: #334155;
    }

    /* Сетка календаря */
    .calendar-grid {
        gap: 6px !important;
        margin-bottom: 16px !important;
    }

    /* Ячейки календаря */
    .calendar-cell {
        min-height: 90px !important;
        padding: 8px !important;
        background: #f8fafc;
        border-radius: 12px;
        position: relative;
        display: flex;
        flex-direction: column;
    }

    .calendar-cell .day-number {
        font-size: 12px !important;
        font-weight: 700;
        margin-bottom: 6px;
        color: #0f172a;
        background: rgba(255,255,255,0.8);
        padding: 2px 6px;
        border-radius: 12px;
        display: inline-block;
        align-self: flex-start;
    }

    .calendar-cell.today {
        border: 2px solid #2563eb;
        background: #eff6ff;
    }

    .calendar-cell.today .day-number {
        background: #2563eb;
        color: white;
    }

    .calendar-cell.weekend {
        background: #fff5f5;
    }

    /* Контейнер для смен */
    .calendar-cell .shifts-container {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin-bottom: 6px;
        flex: 1;
        max-height: 60px;
        overflow-y: auto;
    }

    /* Элемент смены */
    .shift-item {
        padding: 4px 6px !important;
        font-size: 10px !important;
        border-left-width: 4px !important;
        border-radius: 6px;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.02);
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
    }

    .shift-item .shift-content {
        display: flex;
        flex-direction: column;
        gap: 2px;
        flex: 1;
        min-width: 0;
    }

    .shift-item .shift-master {
        font-size: 10px !important;
        font-weight: 700;
        color: #0f172a;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .shift-item .shift-branch {
        display: block !important;
        font-size: 8px !important;
        color: #64748b;
        background: #f1f5f9;
        padding: 2px 4px;
        border-radius: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .shift-item .shift-icons {
        font-size: 10px !important;
        margin-left: 4px;
        min-width: 16px;
        text-align: center;
    }

    /* Кнопка добавления смены */
    .add-shift-btn {
        width: 100%;
        padding: 6px !important;
        font-size: 9px !important;
        border: 1px dashed #94a3b8;
        border-radius: 8px;
        background: white;
        color: #475569;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        margin-top: 4px;
        cursor: pointer;
        transition: all 0.2s;
    }

    .add-shift-btn:hover {
        border-color: #2563eb;
        color: #2563eb;
        background: #f0f9ff;
    }

    .add-shift-btn i {
        font-size: 8px !important;
    }

    /* Индикатор "нет смен" */
    .calendar-cell .no-shifts {
        font-size: 9px !important;
        padding: 6px 4px !important;
        color: #94a3b8;
        font-style: italic;
        text-align: center;
        background: white;
        border-radius: 6px;
        margin-bottom: 4px;
    }

    /* Легенда */
    .shift-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 16px !important;
        padding: 16px !important;
        background: #f8fafc;
        border-radius: 16px;
        margin-top: 20px;
    }

    .legend-item {
        display: flex;
        align-items: center;
        gap: 8px !important;
        font-size: 12px !important;
        color: #334155;
    }

    .legend-color {
        width: 16px !important;
        height: 16px !important;
        border-radius: 4px !important;
    }

    .legend-color.morning {
        background: #2563eb;
    }

    .legend-color.evening {
        background: #8b5cf6;
    }

    .legend-color.full {
        background: #cb2111;
    }

    /* ========== ФОРМА ДОБАВЛЕНИЯ СМЕНЫ ========== */
    #shiftsPage .form-container {
        margin-top: 20px;
        padding: 20px !important;
        background: white;
        border-radius: 24px;
    }

    #shiftsPage .form-container h3 {
        font-size: 18px !important;
        margin-bottom: 20px !important;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    #shiftsPage .form-row {
        display: flex !important;
        flex-direction: column;
        gap: 16px !important;
        margin-bottom: 0;
    }

    #shiftsPage .form-group {
        width: 100%;
        margin-bottom: 0;
    }

    #shiftsPage .form-group label {
        font-size: 13px !important;
        margin-bottom: 6px !important;
        display: block;
        font-weight: 600;
        color: #334155;
    }

    #shiftsPage select,
    #shiftsPage input {
        width: 100%;
        padding: 14px 16px !important;
        font-size: 15px !important;
        border: 2px solid #e2e8f0;
        border-radius: 16px !important;
        background: #f8fafc;
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
        background-size: 16px;
        padding-right: 44px !important;
    }

    #shiftsPage select:focus,
    #shiftsPage input:focus {
        outline: none;
        border-color: #2563eb;
        background: white;
    }

    #shiftsPage .btn-primary {
        width: 100%;
        padding: 16px !important;
        font-size: 16px !important;
        font-weight: 600;
        background: #2563eb;
        color: white;
        border: none;
        border-radius: 40px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 8px;
        cursor: pointer;
        transition: all 0.2s;
    }

    #shiftsPage .btn-primary:hover {
        background: #1d4ed8;
        transform: translateY(-2px);
        box-shadow: 0 8px 16px rgba(37, 99, 235, 0.2);
    }

    #shiftsPage .btn-primary i {
        font-size: 16px;
    }

    /* ========== УЛУЧШЕННЫЕ ТАБЛИЦЫ ДЛЯ МОБИЛЬНЫХ ========== */
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 16px 0;
        padding: 0;
        border-radius: 20px;
        background: white;
        box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    }

    .table-container table {
        min-width: 800px !important;
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
    }

    .table-container table th {
        background: #f8fafc;
        padding: 14px 12px;
        font-size: 12px;
        font-weight: 600;
        color: #334155;
        white-space: nowrap;
        border-bottom: 2px solid #e2e8f0;
    }

    .table-container table td {
        padding: 14px 12px;
        white-space: nowrap;
        border-bottom: 1px solid #f1f5f9;
    }

    #pricesTable {
        min-width: 1200px !important;
    }

    #clientsTable {
        min-width: 1000px !important;
    }

    #upcomingAppointments,
    #bookingsList,
    #dateBookingsList {
        min-width: 900px !important;
    }

    #transactionsTable {
        min-width: 800px !important;
    }

    #purchasesTable {
        min-width: 1000px !important;
    }

    /* Адаптация остального контента */
    .stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-info h3 {
        font-size: 12px;
    }
    
    .stat-info .value {
        font-size: 24px;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .board {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .column {
        width: 100%;
    }
    
    .stock-grid {
        grid-template-columns: 1fr;
    }
    
    .date-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .master-selector {
        flex-wrap: wrap;
    }
    
    .time-slots-grid {
        grid-template-columns: repeat(3, 1fr);
        max-height: 300px;
    }
    
    #branchSlotsContainer {
        grid-template-columns: 1fr;
    }
}

/* На компьютере показываем левое меню и скрываем мобильные элементы */
@media (min-width: 1025px) {
    .sidebar {
        display: block;
        width: 280px;
        background: #0f172a;
        color: white;
        padding: 24px 16px;
        position: fixed;
        height: 100vh;
        overflow-y: auto;
    }
    
    .main {
        margin-left: 280px;
        padding: 24px 32px;
    }
    
    .mobile-menu-toggle,
    .mobile-bottom-menu,
    .mobile-full-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .table-container::after {
        display: none;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .calendar-header > div {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .calendar-header .btn {
        flex: 1;
    }
    
    .master-shift-stats {
        grid-template-columns: 1fr !important;
    }
    
    .calendar-cell {
        min-height: 100px !important;
    }
    
    .shift-item {
        padding: 6px 8px !important;
    }
    
    .shift-item .shift-master {
        font-size: 11px !important;
    }
    
    .shift-item .shift-branch {
        font-size: 9px !important;
    }
}

/* Исправление для iPhone с "чёлкой" */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-bottom-menu {
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .main {
        padding-bottom: max(100px, calc(env(safe-area-inset-bottom) + 80px));
    }
}

/* Анимации */
@keyframes slideUp {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.mobile-full-menu.show {
    animation: slideUp 0.3s ease-out;
}

.mobile-menu-overlay.active {
    animation: fadeIn 0.3s ease-out;
}

/* Стили для прокрутки */
.mobile-full-menu::-webkit-scrollbar {
    width: 4px;
}

.mobile-full-menu::-webkit-scrollbar-track {
    background: #1e293b;
}

.mobile-full-menu::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 2px;
}

.table-container::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Стили для пользовательского меню */
.user-menu {
    position: relative;
}

#userMenu {
    animation: fadeIn 0.2s ease-out;
}

#userMenu button:hover {
    background: #f8fafc;
}

#userMenu hr {
    border: none;
    border-top: 1px solid #f1f5f9;
    margin: 8px 0;
}

/* Адаптация для мобильных */
@media (max-width: 1024px) {
    .user-menu {
        margin-left: auto;
    }
    
    #userNameDisplay,
    #userRoleDisplay,
    #userMenuArrow {
        display: none;
    }
    
    .user-menu > button {
        padding: 4px !important;
        background: transparent !important;
    }
    
    .user-menu > button div:not(#userAvatar) {
        display: none;
    }
    
    #userAvatar {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
    }
}

/* Анимация для меню */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для кнопки переключения режима */
#togglePriceModeBtn {
    transition: all 0.2s;
}

#togglePriceModeBtn i {
    margin-right: 4px;
}

#togglePriceModeBtn.btn-warning {
    background: #ffc107;
    color: #000;
    border-color: #ffc107;
}

#togglePriceModeBtn.btn-warning:hover {
    background: #e0a800;
}

/* Стили для ручного режима */
#manualPriceMode {
    animation: slideDown 0.3s ease-out;
}

#manualTotalPrice {
    font-size: 18px;
    font-weight: 600;
}

#manualTotalPrice:focus {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== УЛУЧШЕННАЯ КАРТОЧКА КЛИЕНТА ==================== */

/* Модальное окно для карточки клиента */
.modal.active .modal-content {
    max-width: 1200px !important; /* Увеличиваем ширину */
    width: 95%;
    padding: 30px;
}

/* Контент внутри модального окна */
#modalMessage {
    max-height: 80vh !important;
    overflow-y: auto !important;
    padding-right: 15px;
}

/* Улучшаем внешний вид секций */
#modalMessage > div {
    margin-bottom: 25px;
}

#modalMessage h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #0f172a;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* Основная информация - сетка */
#modalMessage .grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* История визитов - таблица */
#modalMessage table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 700px; /* Чтобы таблица не сжималась */
}

#modalMessage th {
    background: #f8fafc;
    padding: 12px 10px;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

#modalMessage td {
    padding: 12px 10px;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
}

#modalMessage td:first-child {
    font-weight: 600;
    color: #0f172a;
}

/* Контейнер для таблицы с горизонтальной прокруткой */
#modalMessage .table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* Статистика - карточки */
#modalMessage .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

#modalMessage .stat-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

#modalMessage .stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #2563eb;
    margin-bottom: 5px;
}

#modalMessage .stat-card .stat-label {
    font-size: 13px;
    color: #64748b;
}

/* Информация о клиенте */
#modalMessage .client-info {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

#modalMessage .client-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#modalMessage .client-info-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#modalMessage .client-info-value {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

/* Комментарий клиента */
#modalMessage .client-comment {
    background: #fff7ed;
    padding: 15px;
    border-radius: 12px;
    border-left: 4px solid #f97316;
    margin-top: 15px;
}

/* Скроллбар для модального окна */
#modalMessage::-webkit-scrollbar {
    width: 8px;
}

#modalMessage::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#modalMessage::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#modalMessage::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .modal.active .modal-content {
        max-width: 95% !important;
        padding: 20px;
    }
    
    #modalMessage .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    #modalMessage .client-info {
        grid-template-columns: 1fr;
    }
    
    #modalMessage table {
        min-width: 600px;
        font-size: 13px;
    }
}

/* ==================== ФИКС ДЛЯ ЗАГОЛОВКОВ ПРАЙСОВ ==================== */

/* Запрещаем перенос текста в заголовках таблицы прайсов */
#pricesTable th {
    white-space: nowrap !important;
    min-width: 100px;
}

/* Для мобильной версии - делаем заголовки компактнее */
@media (max-width: 768px) {
    #pricesTable th {
        min-width: 80px;
        font-size: 12px !important;
        padding: 12px 8px !important;
    }
    
    #pricesTable td {
        padding: 12px 8px !important;
        font-size: 13px !important;
    }
}

/* Для очень маленьких экранов - уменьшаем отступы */
@media (max-width: 480px) {
    #pricesTable th {
        min-width: 70px;
        font-size: 11px !important;
        padding: 10px 6px !important;
    }
    
    #pricesTable td {
        padding: 10px 6px !important;
        font-size: 12px !important;
    }
}

/* Стили для калькулятора услуг - компактная версия */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.service-card {
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.service-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.service-card label {
    cursor: pointer;
    transition: all 0.2s;
}

.service-card label:hover {
    background: #eef2ff !important;
}

/* Для мобильной версии */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .service-card {
        padding: 10px !important;
    }
    
    .service-card > div:first-child {
        margin-bottom: 8px !important;
        padding-bottom: 6px !important;
    }
    
    .service-card .service-name {
        font-size: 13px !important;
    }
    
    .service-card .price-badge {
        font-size: 11px !important;
        padding: 2px 6px !important;
    }
    
    .service-card label {
        padding: 6px 8px !important;
    }
    
    .service-card label span {
        font-size: 10px !important;
    }
    
    .service-card label span:last-child {
        font-size: 11px !important;
    }

    /* ==================== МОБИЛЬНАЯ ВЕРСИЯ - ПОЛНОСТЬЮ УБИРАЕМ СКРОЛЛ ==================== */

    @media (max-width: 1024px) {
        /* Полностью отключаем скролл у всех контейнеров */
        .table-container {
            overflow-x: visible !important;
            overflow-y: visible !important;
            padding: 0 !important;
            margin: 0 !important;
            background: transparent !important;
            box-shadow: none !important;
            border-radius: 0 !important;
        }
        
        /* Убираем псевдоэлемент со стрелками */
        .table-container::after {
            display: none !important;
            content: none !important;
        }
        
        /* Убираем минимальную ширину у всех таблиц */
        #upcomingAppointments,
        #bookingsList,
        #dateBookingsList,
        #clientsTable,
        #transactionsTable,
        #purchasesTable,
        #pricesTable {
            min-width: auto !important;
            width: 100% !important;
            display: block !important;
        }
        
        /* Скрываем заголовки таблиц */
        #upcomingAppointments thead,
        #bookingsList thead,
        #dateBookingsList thead {
            display: none !important;
        }
        
        /* Превращаем строки в блочные карточки */
        #upcomingAppointments tbody tr,
        #bookingsList tbody tr,
        #dateBookingsList tbody tr {
            display: block !important;
            margin: 0 !important;
            padding: 0 !important;
            width: 100% !important;
        }
        
        #upcomingAppointments td,
        #bookingsList td,
        #dateBookingsList td {
            display: block !important;
            padding: 0 !important;
            background: transparent !important;
            width: 100% !important;
        }
        
        /* Карточки записей занимают всю ширину */
        #upcomingAppointments td > div,
        #bookingsList td > div,
        #dateBookingsList td > div {
            margin: 0 0 8px 0 !important;
            border-radius: 12px !important;
            width: 100% !important;
            box-sizing: border-box !important;
            background: white !important;
        }
        
        /* Основной контент */
        .main {
            margin-left: 0 !important;
            padding: 8px 0 100px !important;
            width: 100% !important;
            overflow-x: hidden !important;
        }
        
        /* Верхняя панель */
        .top-bar {
            margin: 0 0 12px 0 !important;
            border-radius: 0 !important;
            width: 100% !important;
            padding: 10px 12px !important;
        }
        
        .title h1 {
            font-size: 16px !important;
        }
        
        .title p {
            display: none !important;
        }
        
        /* Статистика */
        .stats {
            padding: 0 8px !important;
            margin: 0 0 12px 0 !important;
            width: 100% !important;
            gap: 8px !important;
            display: grid !important;
            grid-template-columns: repeat(2, 1fr) !important;
        }
        
        .stat-card {
            padding: 10px !important;
            width: 100% !important;
            box-sizing: border-box !important;
            margin: 0 !important;
        }
        
        .stat-info .value {
            font-size: 18px !important;
        }
        
        .stat-info h3 {
            font-size: 10px !important;
            margin-bottom: 4px !important;
        }
        
        .stat-icon {
            width: 36px !important;
            height: 36px !important;
            font-size: 14px !important;
        }
        
        /* Заголовки секций */
        h3 {
            font-size: 15px !important;
            margin: 0 0 10px 0 !important;
            padding: 0 12px !important;
        }
        
        /* Карточки филиалов */
        #branchSlotsContainer {
            padding: 0 8px !important;
            width: 100% !important;
            gap: 10px !important;
            margin-bottom: 12px !important;
            display: grid !important;
            grid-template-columns: 1fr !important;
        }
        
        .branch-stat-card {
            padding: 12px !important;
            width: 100% !important;
            box-sizing: border-box !important;
            margin: 0 !important;
        }
        
        .branch-stat-card h4 {
            font-size: 14px !important;
        }
        
        .branch-slot-stats {
            padding: 8px !important;
        }
        
        /* Убираем скролл у всех элементов */
        body, html {
            overflow-x: hidden !important;
            width: 100% !important;
        }
        
        .app {
            overflow-x: hidden !important;
            width: 100% !important;
        }
    }

    /* Для очень маленьких экранов */
    @media (max-width: 480px) {
        .main {
            padding: 6px 0 100px !important;
        }
        
        .stats {
            padding: 0 6px !important;
            gap: 6px !important;
        }
        
        .stat-card {
            padding: 8px !important;
        }
        
        .stat-info .value {
            font-size: 16px !important;
        }
        
        .stat-info h3 {
            font-size: 9px !important;
        }
        
        .stat-icon {
            width: 32px !important;
            height: 32px !important;
            font-size: 12px !important;
        }
        
        .branch-stat-card {
            padding: 10px !important;
        }
        
        .branch-stat-card h4 {
            font-size: 13px !important;
        }
        
        h3 {
            font-size: 14px !important;
            padding: 0 10px !important;
        }
        
        .top-bar {
            padding: 8px 10px !important;
        }
        
        .title h1 {
            font-size: 14px !important;
        }
        
        #branchSlotsContainer {
            padding: 0 6px !important;
            gap: 8px !important;
        }
    }
}

/* Стили для кнопки создания записи в блоке ближайших записей */
.table-container .btn-primary {
    transition: all 0.2s;
}

.table-container .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Для мобильной версии */
@media (max-width: 768px) {
    .table-container > div:first-child {
        flex-direction: column;
        gap: 12px;
        align-items: stretch !important;
    }
    
    .table-container > div:first-child h3 {
        text-align: center;
    }
    
    .table-container .btn-primary {
        justify-content: center;
        width: 100%;
    }
}

/* Мобильная версия ленты заказов */
@media (max-width: 1024px) {
    /* Компактные бейджи */
    .kanban-filter .badge {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }
    
    /* Убираем лишние отступы */
    .kanban-filter {
        margin: 0 0 12px 0 !important;
    }
    
    /* Делаем кнопку филиала более компактной */
    #kanbanBranchDropdownBtn {
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
    
    #kanbanBranchDropdownBtn span {
        font-size: 12px;
    }
    
    /* Поле даты */
    #kanbanDateFilter {
        font-size: 12px !important;
        padding: 8px 8px 8px 28px !important;
    }
    
    /* Кнопка "Сегодня" */
    .kanban-filter .btn-secondary[onclick*="setToday"] {
        padding: 8px 12px !important;
        font-size: 12px !important;
    }
    
    /* Выпадающее меню филиалов */
    #kanbanBranchDropdown .dropdown-item {
        padding: 12px 14px !important;
        font-size: 13px !important;
    }
    
    #kanbanBranchDropdown .dropdown-item i {
        font-size: 12px !important;
    }
    
    /* Статистика вверху */
    .kanban-filter > div:first-child {
        margin-bottom: 8px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .kanban-filter {
        padding: 10px !important;
        gap: 8px !important;
    }
    
    .kanban-filter > div:first-child h3 {
        font-size: 14px !important;
    }
    
    .kanban-filter .badge {
        font-size: 9px !important;
        padding: 2px 5px !important;
    }
    
    #kanbanBranchDropdownBtn {
        padding: 7px 8px !important;
        font-size: 11px !important;
    }
    
    #kanbanDateFilter {
        padding: 7px 7px 7px 26px !important;
        font-size: 11px !important;
    }
    
    .kanban-filter .btn-secondary[onclick*="setToday"] {
        padding: 7px 10px !important;
        font-size: 11px !important;
    }
}
