@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&family=Roboto:wght@300;400;700&display=swap');
        
        :root {
            --primary: #54B0A5;
            --secondary: #3A7B8C;
            --accent: #E0F2E9;
            --dark: #1E2F40;
            --light: #F5FDFF;
        }
        
        /* СТИЛИ ДЛЯ ФОРМЫ ВХОДА */
        .login-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--dark);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        
        .login-container {
            background: rgba(58, 123, 140, 0.9);
            padding: 40px;
            border-radius: 10px;
            border: 2px solid var(--primary);
            max-width: 400px;
            width: 90%;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        }
        
        .login-logo {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .login-logo img {
            width: 80px;
            height: 80px;
            margin-bottom: 15px;
        }
        
        .login-title {
            color: var(--accent);
            margin: 0 0 10px;
            font-size: 1.8rem;
        }
        
        .login-subtitle {
            color: var(--light);
            opacity: 0.8;
            margin: 0;
        }
        
        .login-input {
            width: 100%;
            padding: 12px;
            border: 1px solid var(--secondary);
            border-radius: 6px;
            background: rgba(255,255,255,0.1);
            color: var(--light);
            margin-bottom: 15px;
            font-family: 'Montserrat', sans-serif;
            box-sizing: border-box;
        }
        
        .login-input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(84, 176, 165, 0.3);
        }
        
        .login-button {
            width: 100%;
            background: var(--primary);
            color: var(--dark);
            border: none;
            padding: 12px;
            border-radius: 6px;
            cursor: pointer;
            font-weight: 700;
            font-family: 'Montserrat', sans-serif;
            transition: all 0.3s ease;
        }
        
        .login-button:hover {
            background: #4aa095;
            transform: translateY(-2px);
        }
        
        .login-error {
            color: #e74c3c;
            text-align: center;
            margin-top: 15px;
            display: none;
            font-size: 0.9rem;
        }

        /* ВАШИ СУЩЕСТВУЮЩИЕ СТИЛИ */
        body {
            margin: 0;
            padding: 0;
            font-family: 'Montserrat', sans-serif;
            background-color: var(--dark);
            color: var(--light);
            overflow-x: hidden;
            min-height: 100vh;
            background: linear-gradient(135deg, var(--dark) 0%, #2D4B5A 100%);
        }
        
        .header-container {
            position: relative;
            width: 100%;
            padding: 20px 0;
            text-align: center;
        }
        
        .back-link {
            position: absolute;
            top: 30px;
            left: 30px;
            color: var(--primary);
            text-decoration: none;
            display: flex;
            align-items: center;
            font-weight: 400;
            z-index: 10;
        }
        
        .back-link:hover {
            text-decoration: underline;
        }
        
        .container {
            max-width: none;
            margin: 0 20px;
            padding: 20px 0 40px;
        }
        
        h1 {
            font-size: 2.5rem;
            margin: 0 0 40px;
            color: var(--primary);
            text-align: center;
            font-weight: 700;
        }
        
        h2 {
            color: var(--accent);
            border-bottom: 2px solid var(--primary);
            padding-bottom: 10px;
            margin-top: 40px;
        }
        
        /* Вкладки */
        .tabs {
            display: flex;
            margin-bottom: 20px;
            border-bottom: 1px solid var(--secondary);
            flex-wrap: wrap;
        }
        
        .tab {
            padding: 12px 24px;
            background: rgba(58, 123, 140, 0.3);
            border: none;
            color: var(--light);
            cursor: pointer;
            font-family: 'Montserrat', sans-serif;
            font-size: 1rem;
            transition: all 0.3s ease;
            border-radius: 8px 8px 0 0;
            margin-right: 5px;
            margin-bottom: 5px;
        }
        
        .tab.active {
            background: var(--primary);
            color: var(--dark);
            font-weight: 700;
        }

        .tab:hover:not(.active) {
            background: rgba(84, 176, 165, 0.3);
        }

        .send-report-button {
            background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
            color: white;
            border-radius: 8px;
            font-weight: 700;
            letter-spacing: 0.02em;
            box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
        }

        .send-report-button:hover {
            background: linear-gradient(135deg, #29b765 0%, #1f8f4c 100%);
            transform: translateY(-2px);
        }
        
        /* Контент вкладок */
        .tab-content {
            display: none;
            padding: 20px;
            background: rgba(30, 47, 64, 0.8);
            border-radius: 0 8px 8px 8px;
            border: 1px solid var(--secondary);
        }
        
        .tab-content.active {
            display: block;
        }
        
        /* Таблицы */
        .table-container {
            overflow-x: auto;
            margin-top: 20px;
            max-height: 70vh;
            overflow-y: auto;
            border: 1px solid var(--secondary);
            border-radius: 6px;
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
            background: rgba(30, 47, 64, 0.6);
        }
        
        th, td {
            padding: 12px 15px;
            text-align: left;
            border-bottom: 1px solid var(--secondary);
            border-right: 1px solid var(--secondary);
        }
        
        /* СТИЛИ ДЛЯ ЗАГОЛОВКОВ С СОРТИРОВКОЙ */
        th {
            background: var(--secondary);
            color: var(--accent);
            font-weight: 700;
            position: sticky;
            top: 0;
            z-index: 10;
            cursor: pointer;
            user-select: none;
            position: relative;
        }
        
        th:hover {
            background: var(--primary);
            color: var(--dark);
        }
        
        th.sortable::after {
            content: " ↕";
            opacity: 0.6;
        }
        
        th.sorted-asc::after {
            content: " ↑";
            opacity: 1;
        }
        
        th.sorted-desc::after {
            content: " ↓";
            opacity: 1;
        }
        
        th.sorted-default::after {
            content: " ↕";
            opacity: 0.6;
        }
        
        tr:hover {
            background: rgba(84, 176, 165, 0.1);
        }
        
        /* Кнопки */
        button {
            background: var(--primary);
            color: var(--dark);
            border: none;
            padding: 12px 24px;
            border-radius: 6px;
            cursor: pointer;
            font-family: 'Montserrat', sans-serif;
            font-size: 1rem;
            font-weight: 700;
            transition: all 0.3s ease;
            margin-right: 10px;
            margin-bottom: 10px;
        }
        
        button:hover {
            background: #4aa095;
            transform: translateY(-2px);
        }
        
        button.secondary {
            background: var(--secondary);
            color: var(--light);
        }
        
        button.secondary:hover {
            background: #336977;
        }
        
        button.danger {
            background: #e74c3c;
            color: white;
        }
        
        button.danger:hover {
            background: #c0392b;
        }
        
        button.success {
            background: #2ecc71;
            color: white;
        }
        
        button.success:hover {
            background: #27ae60;
        }
        
        .action-buttons {
            display: flex;
            gap: 5px;
            flex-wrap: wrap;
        }
        
        .action-buttons button {
            margin: 2px;
            padding: 8px 12px;
            font-size: 0.9rem;
        }

        .action-buttons button.success {
            background: #27ae60;
            color: white;
        }

        .action-buttons button.success:hover {
            background: #219653;
        }

        .action-buttons .verify-button {
            background: #7f8c8d;
            color: #ffffff;
        }

        .action-buttons .verify-button:hover {
            background: #707b7c;
        }

        .action-buttons .verify-button.verified {
            background: #27ae60;
            color: #ffffff;
        }

        .action-buttons .verify-button.verified:hover {
            background: #1f8f4d;
        }

        /* Формы ввода */
        input, select, textarea {
            width: 100%;
            padding: 8px;
            border: 1px solid var(--secondary);
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.1);
            color: var(--light);
            font-family: 'Montserrat', sans-serif;
            font-size: 0.9rem;
            box-sizing: border-box;
        }
        
        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(84, 176, 165, 0.3);
        }
        
        input[readonly] {
            background: rgba(255, 255, 255, 0.05);
            color: var(--accent);
        }
        
        /* Уведомления */
        .notification {
            padding: 15px;
            border-radius: 6px;
            margin-bottom: 20px;
            display: none;
        }
        
        .notification.success {
            background: rgba(46, 204, 113, 0.2);
            border: 1px solid #2ecc71;
            color: #2ecc71;
        }
        
        .notification.error {
            background: rgba(231, 76, 60, 0.2);
            border: 1px solid #e74c3c;
            color: #e74c3c;
        }
        
        /* Загрузка */
        .loading {
            display: none;
            text-align: center;
            padding: 20px;
            color: var(--primary);
        }
        
        /* Панель инструментов */
        .toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 20px;
            align-items: center;
        }

        .dropdown {
            position: relative;
            z-index: 20;
        }

        .dropdown-menu {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            background: rgba(58, 123, 140, 0.95);
            border: 1px solid var(--secondary);
            border-radius: 8px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
            min-width: 220px;
            z-index: 1000;
            display: none;
            overflow: hidden;
        }

        .dropdown-menu.show {
            display: block;
        }

        .dropdown-item {
            width: 100%;
            background: transparent;
            border: none;
            color: var(--light);
            padding: 10px 14px;
            text-align: left;
            cursor: pointer;
            font-family: 'Montserrat', sans-serif;
            font-size: 0.95rem;
        }

        .dropdown-item:hover {
            background: rgba(84, 176, 165, 0.2);
        }
        
        .search-box {
            flex: 1;
            min-width: 200px;
        }

        /* Стили для выпадающих списков */
        select {
            background: rgba(255, 255, 255, 0.1);
            color: var(--light);
            border: 1px solid var(--secondary);
            border-radius: 4px;
            padding: 8px;
            font-family: 'Montserrat', sans-serif;
            font-size: 0.9rem;
            appearance: none;
            -webkit-appearance: none;
            -moz-appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2354B0A5' 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 8px center;
            background-size: 16px;
            padding-right: 30px;
        }

        select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(84, 176, 165, 0.3);
        }

        /* Стили для option */
        select option {
            background: var(--dark);
            color: var(--light);
            padding: 10px;
            border: none;
        }

        select option:hover,
        select option:focus,
        select option:checked {
            background: var(--primary);
            color: var(--dark);
        }

        /* Для Firefox */
        @-moz-document url-prefix() {
            select {
                color: var(--light) !important;
                text-shadow: 0 0 0 var(--light);
            }
            
            select option {
                background: var(--dark);
                color: var(--light);
            }
            
            select option:checked {
                background: var(--primary);
                color: var(--dark);
            }
        }

        /* Для Internet Explorer */
        @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
            select {
                color: var(--light);
            }
            
            select option {
                background: var(--dark);
                color: var(--light);
            }
        }
        
        /* Волны */
        .waves {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 100px;
            background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%2354B0A5" fill-opacity="0.1" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
            background-size: cover;
            z-index: -1;
        }
        
        /* НОВЫЕ СТИЛИ ДЛЯ ЧЕКБОКСОВ И МАССОВОГО УДАЛЕНИЯ */
        .checkbox-cell {
            width: 40px;
            text-align: center;
        }
        
        .checkbox-cell input[type="checkbox"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
        }
        
        .mass-actions {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-bottom: 15px;
            padding: 10px;
            background: rgba(58, 123, 140, 0.2);
            border-radius: 6px;
            border: 1px solid var(--secondary);
        }
        
        .selected-count {
            color: var(--primary);
            font-weight: bold;
            font-size: 1.1rem;
        }
        
        /* Анимация удаления */
        .fade-out {
            opacity: 0;
            transition: opacity 0.3s ease-out;
        }
        
        /* Модальное окно для разделов */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            padding: 20px;
            overflow-y: auto;
            box-sizing: border-box;
        }

        .modal-content {
            background: var(--dark);
            padding: 30px;
            border-radius: 10px;
            border: 2px solid var(--primary);
            max-width: 500px;
            width: 90%;
            max-height: calc(100vh - 40px);
            overflow-y: auto;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        }
        
        .modal-title {
            color: var(--primary);
            margin-top: 0;
            margin-bottom: 20px;
            text-align: center;
        }
        
        .modal-actions {
            display: flex;
            gap: 10px;
            justify-content: flex-end;
            margin-top: 20px;
        }

        .modal-subtitle {
            margin: 0 0 15px 0;
            color: var(--light);
            opacity: 0.8;
            font-size: 0.95rem;
        }

        .modal-form-group {
            margin-bottom: 15px;
        }

        .modal-form-group label {
            display: block;
            margin-bottom: 6px;
            color: var(--accent);
            font-weight: 600;
        }

        .modal-form-group select,
        .modal-form-group input {
            width: 100%;
        }

        .modal-note {
            margin-top: 5px;
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.85rem;
        }

        .quantity-input-wrapper {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .quantity-input-wrapper span {
            min-width: 60px;
            text-align: right;
            color: var(--accent);
            font-weight: 600;
        }

        #reportWorksContainer {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .report-work-item {
            padding: 12px;
            border-radius: 6px;
            border: 1px solid var(--secondary);
            background: rgba(30, 47, 64, 0.6);
        }

        .report-work-item .modal-note {
            margin-bottom: 10px;
        }

        .report-work-item .remove-report-work-button {
            margin-top: 10px;
        }

        .modal-alert {
            display: none;
            padding: 12px 14px;
            border-radius: 6px;
            border: 1px solid #e74c3c;
            background: rgba(231, 76, 60, 0.15);
            color: #ffb3a7;
            font-size: 0.9rem;
            margin-bottom: 15px;
        }

        .work-materials-modal .modal-content {
            max-width: 720px;
        }

        .material-add-row {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-bottom: 15px;
        }

        .material-add-row select,
        .material-add-row input {
            flex: 1;
        }

        .material-add-row button {
            flex-shrink: 0;
        }

        .work-materials-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
        }

        .work-materials-table th,
        .work-materials-table td {
            border: 1px solid rgba(84, 176, 165, 0.4);
            padding: 8px;
            text-align: left;
        }

        .work-materials-table th {
            background: rgba(84, 176, 165, 0.15);
            color: var(--accent);
        }

        .work-materials-table tbody tr:nth-child(even) {
            background: rgba(84, 176, 165, 0.05);
        }

        .work-materials-table input {
            width: 100%;
            box-sizing: border-box;
        }

        .work-pricing-section {
            margin-top: 20px;
            padding: 16px;
            border-radius: 10px;
            border: 1px solid rgba(84, 176, 165, 0.4);
            background: rgba(84, 176, 165, 0.08);
        }

        .work-pricing-section h4 {
            margin: 0 0 12px;
            color: var(--accent);
            font-size: 1.1rem;
        }

        .work-pricing-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .work-pricing-row {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .work-pricing-row label {
            font-size: 0.9rem;
            color: rgba(255, 255, 255, 0.8);
        }

        .work-pricing-row input {
            width: 100%;
            padding: 10px 12px;
            border-radius: 8px;
            border: 1px solid rgba(84, 176, 165, 0.4);
            background: rgba(30, 47, 64, 0.6);
            color: var(--light);
            font-size: 1rem;
        }

        .work-pricing-row input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(84, 176, 165, 0.25);
        }

        .work-pricing-hint {
            margin-top: 10px;
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.65);
        }

        .foreman-sections-modal .modal-content {
            max-width: 560px;
        }

        .foreman-sections-select-row {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-bottom: 15px;
        }

        .foreman-sections-select-row select {
            flex: 1;
        }

        .foreman-sections-list {
            border: 1px solid var(--secondary);
            border-radius: 6px;
            background: rgba(30, 47, 64, 0.6);
            max-height: 220px;
            overflow-y: auto;
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .foreman-sections-list-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 10px;
            border-radius: 4px;
            border: 1px solid var(--secondary);
            background: rgba(255, 255, 255, 0.05);
            transition: all 0.3s ease;
        }

        .foreman-sections-list-item:hover {
            background: rgba(84, 176, 165, 0.1);
            transform: translateX(5px);
        }

        .foreman-sections-list-item button {
            margin: 0;
            padding: 4px 10px;
            font-size: 0.8rem;
        }

        .foreman-sections-list-empty {
            text-align: center;
            color: var(--accent);
            opacity: 0.7;
            padding: 10px 0;
        }

        /* Стили для списка разделов в модальном окне */
        .categories-list {
            border: 1px solid var(--secondary);
            border-radius: 6px;
            padding: 10px;
            background: rgba(30, 47, 64, 0.6);
            margin-bottom: 20px;
            max-height: 200px;
            overflow-y: auto;
        }
        
        .category-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px;
            margin-bottom: 5px;
            background: rgba(255,255,255,0.05);
            border-radius: 4px;
            border: 1px solid var(--secondary);
            transition: all 0.3s ease;
            gap: 10px;
        }

        .category-item:hover {
            background: rgba(84, 176, 165, 0.1);
            transform: translateX(5px);
        }

        .category-item .category-name {
            flex: 1;
            color: var(--light);
        }

        .category-item .category-actions {
            display: flex;
            gap: 8px;
        }

        .category-item.editing {
            background: rgba(84, 176, 165, 0.1);
        }

        .category-item.editing input[type="text"] {
            flex: 1;
            margin-right: 10px;
        }

        .category-item button {
            margin: 0;
            padding: 5px 10px;
            font-size: 0.8rem;
        }
        
        /* Стили для скрытого input файла */
        #importFileInput {
            display: none;
        }

        /* НОВЫЕ СТИЛИ ДЛЯ ТАБЛИЦЫ РАБОТ */
        #worksTable {
            table-layout: fixed;
            width: 100%;
        }

        /* Узкие колонки */
        #worksTable th:nth-child(1),
        #worksTable td:nth-child(1) {
            width: 40px;
        }

        #worksTable th:nth-child(2),
        #worksTable td:nth-child(2) {
            width: 60px;
        }

        #worksTable th:nth-child(3),
        #worksTable td:nth-child(3) {
            width: auto;
            min-width: 300px;
        }

        #worksTable th:nth-child(4),
        #worksTable td:nth-child(4) {
            width: 150px;
        }

        #worksTable th:nth-child(5),
        #worksTable td:nth-child(5) {
            width: 120px;
        }

        #worksTable th:nth-child(6),
        #worksTable td:nth-child(6) {
            width: 120px;
        }

        #worksTable th:nth-child(7),
        #worksTable td:nth-child(7) {
            width: 100px;
        }

        #worksTable th:nth-child(8),
        #worksTable td:nth-child(8) {
            width: 100px;
        }

        #worksTable th:nth-child(9),
        #worksTable td:nth-child(9) {
            width: 150px;
        }
        
        @media (max-width: 768px) {
            .back-link {
                top: 20px;
                left: 20px;
            }
            
            .container {
                margin: 0 15px;
                padding: 15px 0 30px;
            }
            
            h1 {
                font-size: 2rem;
                margin-bottom: 30px;
                padding-top: 10px;
            }
            
            .tabs {
                flex-wrap: wrap;
            }
            
            .tab {
                flex: 1;
                min-width: 120px;
                text-align: center;
                padding: 10px 5px;
                font-size: 0.9rem;
            }
            
            th, td {
                padding: 8px 10px;
                font-size: 0.9rem;
            }
            
            .toolbar {
                flex-direction: column;
                align-items: stretch;
            }
            
            .search-box {
                min-width: 100%;
            }

            #worksTable {
                table-layout: auto;
            }

            #worksTable th:nth-child(3),
            #worksTable td:nth-child(3) {
                min-width: 150px;
            }
        }

        @media (max-width: 480px) {
            .back-link {
                top: 15px;
                left: 15px;
                font-size: 0.9rem;
            }
            
            h1 {
                font-size: 1.8rem;
            }
            
            .tab {
                min-width: 100px;
                font-size: 0.8rem;
            }
        }