        /* Быстрая адаптация под стиль вашей админки */
        body { font-family: 'Arial', sans-serif; margin: 0; background: #f4f6f9; color: #333; display: flex; }
        
        /* Боковое меню (дубликат вашей темы) */
        .sidebar { width: 250px; background: #1e222b; height: 100vh; color: white; padding: 20px 0; box-sizing: border-box; position: fixed; }
        .sidebar h2 { text-align: center; margin-bottom: 30px; font-size: 22px; letter-spacing: 1px; color: #fff; }
        .sidebar a { display: block; color: #a3a6b1; padding: 15px 25px; text-decoration: none; font-size: 15px; transition: all 0.3s; }
        .sidebar a:hover, .sidebar a.active { background: #2c313e; color: white; font-weight: bold; }
        
        /* Основной контент */
        .main-content { margin-left: 250px; flex: 1; padding: 40px; box-sizing: border-box; min-height: 100vh; }
        .header-box { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
        .header-box h1 { margin: 0; color: #2e7d32; font-size: 28px; }
        .badge { background: #e3f2fd; color: #1e88e5; padding: 6px 14px; border-radius: 20px; font-weight: bold; font-size: 14px; }
        
        /* Стили таблицы */
        .table-container { background: white; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); overflow: hidden; }
        table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; }
        th { background: #f8f9fa; border-bottom: 2px solid #eee; padding: 15px; color: #555; font-weight: 600; }
        td { padding: 15px; border-bottom: 1px solid #eee; transition: background 0.2s; }
        tr:hover td { background: #f9f9f9; }
        code { background: #f1f3f5; padding: 3px 6px; border-radius: 4px; font-family: monospace; color: #d63384; font-size: 14px; }
        :root {
            --bg-body: #f3f4f6;
            --bg-card: #ffffff;
            --text-main: #1f2937;
            --text-label: #374151;
            --text-muted: #9ca3af;
            --border: #e5e7eb;
            --accent: #10b981;
            --accent-hover: #059669;
            --danger: #ef4444;
            --danger-hover: #dc2626;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-body);
            color: var(--text-main);
            display: flex;
            min-height: 100vh;
        }

        /* SIDEBAR */
        aside.sidebar {
            width: 240px;
            background-color: #1f2937;
            color: #f3f4f6;
            display: flex;
            flex-direction: column;
            padding: 20px;
            flex-shrink: 0;
        }
        .brand {
            font-size: 20px;
            font-weight: 700;
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 30px;
            text-align: center;
        }
        .nav-menu { list-style: none; }
        .nav-menu li a {
            display: block;
            padding: 12px 15px;
            color: #9ca3af;
            text-decoration: none;
            font-size: 14px;
            border-radius: 8px;
            margin-bottom: 6px;
            transition: all 0.2s;
        }
        .nav-menu li a:hover, .nav-menu li a.active {
            background-color: rgba(255,255,255,0.1);
            color: #fff;
        }

        /* MAIN CONTENT */
        main.main-content {
            flex-grow: 1;
            padding: 30px;
            overflow-y: auto;
        }
        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }
        .page-title {
            font-size: 28px;
            font-weight: 700;
            color: var(--text-main);
        }
        .back-link {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .back-link:hover { color: var(--text-main); }

        /* FORM WRAPPER */
        .form-wrapper {
            background: var(--bg-card);
            padding: 40px;
            border-radius: 16px;
            box-shadow: var(--shadow);
            max-width: 900px;
            margin: 0 auto;
        }

        /* GRID 2 COLS */
        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin-bottom: 30px;
        }

        .form-group { margin-bottom: 20px; }

        .form-group label {
            display: block;
            margin-bottom: 10px;
            font-weight: 600;
            color: var(--text-label);
            font-size: 14px;
        }

        input[type="text"],
        input[type="number"],
        input[type="password"],
        select,
        textarea {
            width: 100%;
            padding: 14px 16px;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-family: inherit;
            font-size: 15px;
            color: var(--text-main);
            background-color: #fff;
            transition: all 0.2s;
        }
        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
        }
        textarea { resize: vertical; min-height: 120px; }

        /* --- СТИЛИ ЗОНЫ ЗАГРУЗКИ (ДО ЗАГРУЗКИ) --- */
        .upload-zone {
            border: 2px dashed var(--border);
            border-radius: 12px;
            padding: 30px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            background: #f9fafb;
            position: relative;
        }
        .upload-zone:hover {
            border-color: var(--accent);
            background: #f0fff4;
        }
        .upload-icon {
            font-size: 32px;
            color: var(--accent);
            margin-bottom: 12px;
            display: block;
        }
        .upload-text {
            font-size: 14px;
            color: var(--text-label);
            font-weight: 500;
        }
        .file-input { display: none; }

        /* --- СТИЛИ ПОСЛЕ ЗАГРУЗКИ (ПРЕВЬЮ) --- */
        .upload-preview {
            display: none; /* Скрыто по умолчанию */
            border: 2px solid var(--accent);
            border-radius: 12px;
            padding: 15px;
            background: #f0fff4;
            align-items: center;
            gap: 15px;
        }
        .upload-preview.active {
            display: flex; /* Показываем при загрузке */
        }
        .preview-image {
            width: 80px;
            height: 80px;
            object-fit: cover;
            border-radius: 8px;
            border: 1px solid #ddd;
        }
        .preview-info {
            flex-grow: 1;
        }
        .preview-name {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
            display: block;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 200px;
        }
        .preview-size {
            font-size: 11px;
            color: var(--text-muted);
        }
        .btn-remove {
            background: none;
            border: none;
            color: var(--danger);
            cursor: pointer;
            font-size: 18px;
            padding: 0 10px;
            opacity: 0.8;
            transition: opacity 0.2s;
        }
        .btn-remove:hover { opacity: 1; }

        .upload-hint {
            margin-top: 10px;
            font-size: 12px;
            color: var(--text-muted);
            text-align: center;
        }

        /* BUTTON */
        .btn {
            width: 100%;
            padding: 16px;
            border: none;
            border-radius: 10px;
            font-family: inherit;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            text-transform: none;
        }
        .btn-primary { background-color: var(--accent); color: white; }
        .btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-1px); }

        /* MESSAGES */
        .message-box {
            margin-top: 20px;
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            font-weight: 500;
            display: none;
        }
        .message-box.show { display: block; }
        .msg-success { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
        .msg-error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

        .divider {
            border-top: 1px solid #e5e7eb;
            margin: 40px 0;
            padding-top: 20px;
            text-align: center;
        }
        .divider h3 {
            font-size: 18px;
            color: var(--text-label);
            margin: 0;
            font-weight: 600;
        }

        @media(max-width: 768px) {
            .form-grid { grid-template-columns: 1fr; }
            .sidebar { display: none; }
            .page-header { flex-direction: column; align-items: flex-start; gap: 15px; }
        }
:root {
--bg-body: #f3f4f6;
--bg-card: #ffffff;
--text-main: #1f2937;
--text-label: #374151;
--text-muted: #9ca3af;
--border: #e5e7eb;
--accent: #10b981;
--accent-hover: #059669;
--danger: #ef4444;
--warning: #f59e0b;
--info: #3b82f6;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
font-family: 'Inter', sans-serif;
background-color: var(--bg-body);
color: var(--text-main);
display: flex;
min-height: 100vh;
}

/* SIDEBAR */
aside.sidebar {
width: 240px;
background-color: #1f2937;
color: #f3f4f6;
display: flex;
flex-direction: column;
padding: 20px;
flex-shrink: 0;
}
.brand {
font-size: 20px;
font-weight: 700;
color: #fff;
text-transform: uppercase;
letter-spacing: 1px;
margin-bottom: 30px;
text-align: center;
}
.nav-menu { list-style: none; }
.nav-menu li a {
display: block;
padding: 12px 15px;
color: #9ca3af;
text-decoration: none;
font-size: 14px;
border-radius: 8px;
margin-bottom: 6px;
transition: all 0.2s;
}
.nav-menu li a:hover, .nav-menu li a.active {
background-color: rgba(255,255,255,0.1);
color: #fff;
}

/* MAIN CONTENT */
main.main-content {
flex-grow: 1;
padding: 30px;
overflow-y: auto;
}
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
}
.page-title {
font-size: 28px;
font-weight: 700;
color: var(--text-main);
}
.back-link {
color: var(--text-muted);
text-decoration: none;
font-size: 14px;
display: flex;
align-items: center;
gap: 8px;
}
.back-link:hover { color: var(--text-main); }

/* TABLE STYLES */
.table-wrapper {
background: var(--bg-card);
padding: 24px;
border-radius: 16px;
box-shadow: var(--shadow);
overflow-x: auto;
}

table {
width: 100%;
border-collapse: collapse;
min-width: 800px;
}

th, td {
padding: 18px 16px;
text-align: left;
border-bottom: 1px solid var(--border);
}

th {
background-color: #f9fafb;
color: var(--text-label);
font-weight: 600;
font-size: 13px;
text-transform: uppercase;
letter-spacing: 0.5px;
}

tr:last-child td { border-bottom: none; }
tr:hover { background-color: #f3f4f6; }

/* BADGES (СТАТУСЫ) */
.status-badge {
padding: 6px 12px;
border-radius: 20px;
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
}
.status-new { background-color: #eff6ff; color: var(--info); }
.status-work { background-color: #fef9c3; color: #b45309; }
.status-done { background-color: #d1fae5; color: #065f46; }

select.status-select {
width: 100%;
padding: 8px 12px;
border: 1px solid var(--border);
border-radius: 8px;
font-size: 13px;
cursor: pointer;
background: white;
}
select:focus { outline: none; border-color: var(--accent); }

/* BUTTONS */
.btn-sm {
padding: 6px 12px;
border: none;
border-radius: 6px;
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: opacity 0.2s;
}
.btn-view {
background: transparent;
color: var(--accent);
text-decoration: underline;
}
.btn-view:hover { opacity: 0.8; }

/* MODAL */
.modal-overlay {
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-overlay.active { display: flex; }

.modal-window {
background: white;
padding: 32px;
border-radius: 16px;
width: 90%;
max-width: 600px;
position: relative;
animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
from { transform: translateY(-20px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}

.close-modal {
position: absolute;
top: 16px; right: 16px;
font-size: 24px;
cursor: pointer;
color: var(--text-muted);
}
.close-modal:hover { color: var(--text-main); }

.order-items-list { margin-top: 20px; }
.order-item-row {
display: flex;
justify-content: space-between;
padding: 10px 0;
border-bottom: 1px dashed #eee;
}
.order-total {
margin-top: 20px;
padding-top: 15px;
border-top: 2px solid var(--border);
font-size: 18px;
font-weight: 700;
color: var(--text-main);
text-align: right;
}

@media(max-width: 768px) {
.sidebar { display: none; }
.page-header { flex-direction: column; align-items: flex-start; gap: 15px; }
}

        :root {
            --bg-body: #f3f4f6;
            --bg-card: #ffffff;
            --text-main: #1f2937;
            --text-label: #374151;
            --text-muted: #9ca3af;
            --border: #e5e7eb;
            --accent: #10b981;
            --accent-hover: #059669;
            --danger: #ef4444;
            --danger-hover: #dc2626;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }

        body {
            font-family: 'Inter', sans-serif;
            background-color: var(--bg-body);
            color: var(--text-main);
            display: flex;
            min-height: 100vh;
        }

        /* SIDEBAR */
        aside.sidebar {
            width: 240px;
            background-color: #1f2937;
            color: #f3f4f6;
            display: flex;
            flex-direction: column;
            padding: 20px;
            flex-shrink: 0;
        }
        .brand {
            font-size: 20px;
            font-weight: 700;
            color: #fff;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 30px;
            text-align: center;
        }
        .nav-menu { list-style: none; }
        .nav-menu li a {
            display: block;
            padding: 12px 15px;
            color: #9ca3af;
            text-decoration: none;
            font-size: 14px;
            border-radius: 8px;
            margin-bottom: 6px;
            transition: all 0.2s;
        }
        .nav-menu li a:hover, .nav-menu li a.active {
            background-color: rgba(255,255,255,0.1);
            color: #fff;
        }

        /* MAIN CONTENT */
        main.main-content {
            flex-grow: 1;
            padding: 30px;
            overflow-y: auto;
        }
        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }
        .page-title {
            font-size: 28px;
            font-weight: 700;
            color: var(--text-main);
        }
        .back-link {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .back-link:hover { color: var(--text-main); }

        /* FORM WRAPPER */
        .form-wrapper {
            background: var(--bg-card);
            padding: 40px;
            border-radius: 16px;
            box-shadow: var(--shadow);
            max-width: 900px;
            margin: 0 auto;
        }

        /* GRID 2 COLS */
        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 24px;
            margin-bottom: 30px;
        }

        .form-group { margin-bottom: 20px; }

        .form-group label {
            display: block;
            margin-bottom: 10px;
            font-weight: 600;
            color: var(--text-label);
            font-size: 14px;
        }

        input[type="text"],
        input[type="number"],
        input[type="password"],
        select,
        textarea {
            width: 100%;
            padding: 14px 16px;
            border: 1px solid var(--border);
            border-radius: 10px;
            font-family: inherit;
            font-size: 15px;
            color: var(--text-main);
            background-color: #fff;
            transition: all 0.2s;
        }
        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
        }
        textarea { resize: vertical; min-height: 120px; }

        /* --- СТИЛИ ЗОНЫ ЗАГРУЗКИ (ДО ЗАГРУЗКИ) --- */
        .upload-zone {
            border: 2px dashed var(--border);
            border-radius: 12px;
            padding: 30px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            background: #f9fafb;
            position: relative;
        }
        .upload-zone:hover {
            border-color: var(--accent);
            background: #f0fff4;
        }
        .upload-icon {
            font-size: 32px;
            color: var(--accent);
            margin-bottom: 12px;
            display: block;
        }
        .upload-text {
            font-size: 14px;
            color: var(--text-label);
            font-weight: 500;
        }
        .file-input { display: none; }

        /* --- СТИЛИ ПОСЛЕ ЗАГРУЗКИ (ПРЕВЬЮ) --- */
        .upload-preview {
            display: none; /* Скрыто по умолчанию */
            border: 2px solid var(--accent);
            border-radius: 12px;
            padding: 15px;
            background: #f0fff4;
            align-items: center;
            gap: 15px;
        }
        .upload-preview.active {
            display: flex; /* Показываем при загрузке */
        }
        .preview-image {
            width: 80px;
            height: 80px;
            object-fit: cover;
            border-radius: 8px;
            border: 1px solid #ddd;
        }
        .preview-info {
            flex-grow: 1;
        }
        .preview-name {
            font-size: 13px;
            font-weight: 600;
            color: var(--text-main);
            display: block;
            margin-bottom: 4px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 200px;
        }
        .preview-size {
            font-size: 11px;
            color: var(--text-muted);
        }
        .btn-remove {
            background: none;
            border: none;
            color: var(--danger);
            cursor: pointer;
            font-size: 18px;
            padding: 0 10px;
            opacity: 0.8;
            transition: opacity 0.2s;
        }
        .btn-remove:hover { opacity: 1; }

        .upload-hint {
            margin-top: 10px;
            font-size: 12px;
            color: var(--text-muted);
            text-align: center;
        }

        /* BUTTON */
        .btn {
            width: 100%;
            padding: 16px;
            border: none;
            border-radius: 10px;
            font-family: inherit;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            text-transform: none;
        }
        .btn-primary { background-color: var(--accent); color: white; }
        .btn-primary:hover { background-color: var(--accent-hover); transform: translateY(-1px); }

        /* MESSAGES */
        .message-box {
            margin-top: 20px;
            padding: 15px;
            border-radius: 8px;
            text-align: center;
            font-weight: 500;
            display: none;
        }
        .message-box.show { display: block; }
        .msg-success { background-color: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
        .msg-error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

        .divider {
            border-top: 1px solid #e5e7eb;
            margin: 40px 0;
            padding-top: 20px;
            text-align: center;
        }
        .divider h3 {
            font-size: 18px;
            color: var(--text-label);
            margin: 0;
            font-weight: 600;
        }

        @media(max-width: 768px) {
            .form-grid { grid-template-columns: 1fr; }
            .sidebar { display: none; }
            .page-header { flex-direction: column; align-items: flex-start; gap: 15px; }
        }

/* --- АДАПТИВНОСТЬ ДЛЯ ТЕЛЕФОНОВ --- */
@media (max-width: 768px) {
    body {
        flex-direction: column !important;
        display: block !important;
    }

    /* Сбрасываем жесткое боковое меню */
    .sidebar, aside, aside.sidebar {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        padding: 15px !important;
        box-sizing: border-box !important;
    }

    /* Располагаем бренд по центру */
    .sidebar .brand, aside .brand {
        text-align: center !important;
        margin-bottom: 12px !important;
        font-size: 20px !important;
    }

    /* Перестраиваем пункты меню в горизонтальный ряд */
    .sidebar .nav-menu, aside ul, .nav-menu {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 8px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Прячем полосу прокрутки меню внизу */
    .sidebar .nav-menu::-webkit-scrollbar, aside ul::-webkit-scrollbar {
        display: none !important;
    }

    .sidebar .nav-menu li, aside ul li {
        width: auto !important;
        margin: 0 !important;
        display: inline-block !important;
    }

    .sidebar .nav-menu a, aside ul a {
        padding: 8px 12px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
        display: inline-block !important;
    }

    /* ОСВОБОЖДАЕМ ГЛАВНЫЙ КОНТЕНТ ОТ СДВИГА */
    .main-content, div.main-content {
        margin-left: 0 !important; /* Намертво убираем сдвиг в 250px */
        padding: 20px 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: block !important;
    }

    /* Подгоняем поля форм под ширину экрана */
    .form-group, input, select, textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}
.status-cancelled { 
    background: #eeeeee !important; 
    color: #757575 !important; 
}
.filter-btn {
    background: white !important;
    color: #555555 !important;
    border: 1px solid #e0e0e0 !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
}

.filter-btn:hover {
    background: #f5f5f5 !important;
    color: #222222 !important;
    border-color: #ccc !important;
}

/* Стиль для кнопки, которая активна в данный момент */
.filter-btn.active-filter {
    background: #2e7d32 !important; /* Наш фирменный зеленый цвет */
    color: white !important;
    border-color: #2e7d32 !important;
    box-shadow: 0 3px 6px rgba(46,125,50,0.2) !important;
}
