        /* ===== ВСЕ СТИЛИ (ПОЛНЫЙ КОМПЛЕКТ) ===== */
        * { margin:0; padding:0; box-sizing:border-box; font-family:'Segoe UI',system-ui,sans-serif; }
        body { background:#f4f7fc; color:#1a2a3a; min-height:100vh; display:flex; flex-direction:column; }
        .hidden { display:none !important; }
        #loginPage, #registerPage {
            max-width:420px; width:100%; padding:30px; background:white; border-radius:24px;
            box-shadow:0 20px 60px rgba(0,0,0,0.1); margin:20px auto;
        }
        #loginPage .auth-logo, #registerPage .auth-logo {
            display:block; margin:0 auto 10px; height:80px; width:auto;
        }
        #loginPage .auth-sub, #registerPage .auth-sub {
            text-align:center; color:#6a7a8a; font-size:16px; margin-bottom:20px;
        }
        .form-group { margin-bottom:16px; }
        .form-group label { display:block; font-weight:600; font-size:14px; margin-bottom:4px; color:#2a3a4a; }
        .form-group input, .form-group select {
            width:100%; padding:12px 16px; border:2px solid #e0e4ea; border-radius:12px;
            font-size:15px; transition:0.2s; outline:none;
        }
        .form-group input:focus, .form-group select:focus { border-color:#1a3a5c; }
        .remember-row { display:flex; align-items:center; gap:9px; margin:-2px 0 16px; color:#44566c; font-size:14px; cursor:pointer; }
        .remember-row input { width:18px; height:18px; accent-color:#1a3a5c; cursor:pointer; }
        .btn-primary {
            width:100%; padding:14px; background:#1a3a5c; color:white; border:none;
            border-radius:12px; font-size:16px; font-weight:700; cursor:pointer; transition:0.2s;
        }
        .btn-primary:hover { background:#0f2a44; transform:translateY(-2px); box-shadow:0 8px 24px rgba(26,58,92,0.3); }
        .switch-link { text-align:center; margin-top:16px; color:#6a7a8a; }
        .switch-link a { color:#1a3a5c; font-weight:600; cursor:pointer; text-decoration:none; }

        #appPage {
            flex:1; display:flex; flex-direction:column; max-width:none; width:100%; margin:0;
            padding:16px 24px 92px; background:#f4f7fc; min-height:100vh;
        }
        .app-header {
            display:flex; justify-content:space-between; align-items:center;
            background:white; padding:10px 18px; border-radius:14px;
            box-shadow:0 2px 8px rgba(20,42,70,0.05); margin-bottom:14px;
            flex-wrap:wrap; gap:8px;
        }
        .app-header .brand {
            display: flex;
            align-items: center;
            gap: 14px;
            flex-wrap: wrap;
        }
        .logo-img {
            height: 75px;
            width: auto;
            max-height: 90px;
            object-fit: contain;
        }
        .company-name {
            font-size: 22px;
            font-weight: 700;
            color: #1a3a5c;
            white-space: nowrap;
            line-height: 1.2;
        }
        @media (max-width: 600px) {
            .logo-img { height: 45px; }
            .company-name { font-size: 14px; white-space: normal; }
            .app-header .brand { gap: 8px; }
            #loginPage .auth-logo, #registerPage .auth-logo { height:60px; }
        }
        .user-info { display:flex; align-items:center; gap:10px; }
        .avatar {
            width:40px; height:40px; border-radius:50%; background:#1a3a5c;
            color:white; display:flex; align-items:center; justify-content:center;
            font-weight:700; font-size:16px; text-transform:uppercase;
        }
        .user-meta { line-height:1.2; }
        .user-meta .name { font-weight:700; font-size:14px; }
        .user-meta .role { font-size:11px; color:#6a7a8a; background:#eef2f6; padding:2px 10px; border-radius:20px; }
        .badge-admin { background:#e67e22; color:white; padding:2px 8px; border-radius:20px; font-size:10px; font-weight:700; }
        .badge-safety { background:#2e86de; color:white; padding:2px 8px; border-radius:20px; font-size:10px; font-weight:700; }
        .logout-btn { background:none; border:none; color:#e74c3c; font-weight:600; cursor:pointer; font-size:13px; }

        .page { display:none; flex-direction:column; flex:1; }
        .page.active { display:flex; }

        #page-home .card { background:white; border-radius:20px; padding:20px; box-shadow:0 4px 12px rgba(0,0,0,0.04); margin-bottom:20px; }
        .card-title { font-size:18px; font-weight:700; margin-bottom:14px; display:flex; justify-content:space-between; align-items:center; }
        .btn-add { background:#1a3a5c; color:white; border:none; padding:8px 18px; border-radius:30px; font-weight:600; cursor:pointer; transition:0.2s; font-size:14px; }
        .btn-add:hover { background:#0f2a44; }
        .btn-edit { background:#2e86de; color:white; border:none; padding:4px 14px; border-radius:20px; cursor:pointer; font-weight:600; font-size:13px; }
        .btn-delete { background:#e74c3c; color:white; border:none; padding:4px 14px; border-radius:20px; cursor:pointer; font-weight:600; font-size:13px; }
        .btn-sm { font-size:12px; padding:4px 12px; }
        .item-list { display:flex; flex-direction:column; gap:12px; }
        .rental-lessor-group { border:1px solid #dfe7ef; border-radius:14px; background:#fff; overflow:hidden; }
        .rental-lessor-group > summary { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:15px 18px; cursor:pointer; font-weight:700; color:#123a5b; }
        .rental-lessor-group > summary:hover { background:#f7f9fc; }
        .rental-lessor-count { flex:none; color:#66788a; font-size:13px; font-weight:600; }
        .rental-lessor-machines { padding:0 14px 14px; }
        .rental-lessor-machines .item-card { margin-top:8px; }
        .item-card {
            padding:10px 14px; background:#f8fafc; border-radius:10px;
            border-left:4px solid #1a3a5c; transition:0.2s;
        }
        .item-card:hover { background:#f0f4f8; }
        .item-card .title { font-weight:700; font-size:15px; }
        .item-card .meta { font-size:12px; color:#6a7a8a; margin-top:4px; }
        .item-card .description { margin-top:6px; font-size:14px; color:#2a3a4a; }
        .compact-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
        .compact-toolbar input, .compact-toolbar select { padding:8px 11px; border:1px solid #d6dee8; border-radius:8px; font-size:13px; outline:none; }
        .compact-toolbar input { flex:1 1 240px; }
        .item-card .actions { margin-top:10px; display:flex; gap:6px; flex-wrap:wrap; }
        .empty-state { text-align:center; padding:30px 20px; color:#8a9aaa; font-size:15px; }
        .loading { text-align:center; padding:20px; color:#6a7a8a; }

        .calendar-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; margin-top:10px; }
        .calendar-grid .day {
            padding:8px 4px; text-align:center; border-radius:12px; background:#f8fafc; font-size:14px;
            cursor:pointer; transition:0.2s;
        }
        .calendar-grid .day:hover { background:#e0e8f0; }
        .calendar-grid .day.other-month { color:#b0b8c0; }
        .calendar-grid .day.today { background:#1a3a5c; color:white; font-weight:700; }
        .calendar-grid .day.has-event { border-bottom:3px solid #e67e22; }
        .calendar-nav { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
        .calendar-nav button { background:none; border:none; font-size:20px; cursor:pointer; padding:0 12px; }

        .dept-grid {
            display:grid; grid-template-columns:repeat(auto-fill, minmax(150px,1fr)); gap:16px;
            margin-top:10px;
        }
        .dept-card {
            background:white; border-radius:20px; padding:24px 16px; text-align:center;
            box-shadow:0 4px 12px rgba(0,0,0,0.04); cursor:pointer; transition:0.2s;
            border:2px solid transparent;
        }
        .dept-card:hover { border-color:#1a3a5c; transform:translateY(-4px); }
        .dept-card .icon { font-size:36px; display:block; margin-bottom:8px; }
        .dept-card .name { font-weight:700; font-size:16px; }
        .dept-card .desc { font-size:12px; color:#6a7a8a; margin-top:4px; }

        .folder-grid {
            display:grid;
            grid-template-columns:repeat(auto-fill, minmax(170px, 1fr));
            gap:12px;
            margin-top:10px;
        }
        .folder-card {
            background:white;
            border-radius:12px;
            padding:18px 14px;
            text-align:center;
            box-shadow:0 2px 8px rgba(20,42,70,0.05);
            cursor:pointer;
            transition:0.2s;
            border:2px solid transparent;
        }
        .folder-card:hover {
            border-color:#1a3a5c;
            transform:translateY(-4px);
        }
        .folder-card .folder-icon {
            font-size:30px;
            display:block;
            margin-bottom:8px;
        }
        .folder-card .folder-name {
            font-weight:600;
            font-size:16px;
            color:#1a2a3a;
        }
        .folder-card .folder-desc {
            font-size:12px;
            color:#6a7a8a;
            margin-top:4px;
        }

        .subsection-grid {
            display:grid;
            grid-template-columns:repeat(auto-fill, minmax(130px,1fr));
            gap:16px;
            margin-top:10px;
        }
        .subsection-card {
            background:white;
            border-radius:20px;
            padding:20px 12px;
            text-align:center;
            box-shadow:0 4px 12px rgba(0,0,0,0.04);
            cursor:pointer;
            transition:0.2s;
            border:2px solid transparent;
        }
        .subsection-card:hover { border-color:#1a3a5c; transform:translateY(-4px); }
        .subsection-card .icon { font-size:28px; display:block; margin-bottom:6px; }
        .subsection-card .name { font-weight:600; font-size:15px; }

        .subsection-content {
            flex:1;
            background:white;
            border-radius:14px;
            padding:16px;
            box-shadow:0 2px 8px rgba(20,42,70,0.05);
        }
        .subsection-header {
            display:flex;
            align-items:center;
            gap:12px;
            margin-bottom:20px;
            padding-bottom:12px;
            border-bottom:2px solid #eef2f6;
        }
        .subsection-header .back-btn {
            background:none;
            border:none;
            font-size:24px;
            cursor:pointer;
            color:#1a3a5c;
        }
        .subsection-header .title { font-size:20px; font-weight:700; flex:1; }

        .drivers-toolbar {
            display:flex;
            flex-wrap:wrap;
            gap:12px;
            margin-bottom:16px;
            align-items:center;
        }
        .drivers-toolbar input, .drivers-toolbar select {
            padding:8px 14px;
            border:2px solid #e0e4ea;
            border-radius:30px;
            font-size:13px;
            outline:none;
        }
        .drivers-toolbar input:focus, .drivers-toolbar select:focus {
            border-color:#1a3a5c;
        }
        .drivers-toolbar input {
            flex:1 1 200px;
        }

        .directory-search { margin-bottom:16px; }
        .directory-search input {
            width:100%; max-width:300px; padding:10px 16px; border:2px solid #e0e4ea;
            border-radius:30px; outline:none; font-size:14px;
        }
        .directory-search input:focus { border-color:#1a3a5c; }

        .profile-field { display:flex; padding:8px 0; border-bottom:1px solid #eef2f6; }
        .profile-field .label { font-weight:600; width:120px; flex-shrink:0; }
        .profile-field .value { color:#2a3a4a; }

        .admin-user {
            display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center;
            padding:12px 16px; background:#f8fafc; border-radius:12px; margin-bottom:8px;
            gap:8px;
        }
        .admin-user .info { display:flex; flex-wrap:wrap; gap:12px; align-items:center; font-size:14px; }
        .admin-user .actions { display:flex; gap:6px; flex-wrap:wrap; }

        .check-filters {
            display:flex; flex-wrap:wrap; gap:10px; margin-bottom:16px; align-items:center;
        }
        .check-filters input, .check-filters select {
            padding:8px 14px; border:2px solid #e0e4ea; border-radius:30px; font-size:13px; outline:none;
            flex:1 1 180px;
        }
        .check-filters input:focus, .check-filters select:focus { border-color:#1a3a5c; }

        /* ===== СТИЛИ ТАБЛИЦЫ ===== */
        .check-table {
            width:100%;
            border-collapse:collapse;
            font-size:14px;
        }
        .check-table th {
            background:#eef2f6;
            font-weight:600;
            text-align:left;
            padding:8px;
            border:1px solid #dde1e6;
        }
        .check-table td {
            padding:8px;
            border:1px solid #dde1e6;
            vertical-align:middle;
        }
        .check-table .empty-state {
            text-align:center;
            padding:20px;
        }
        .ql-container {
            min-height:150px;
            border-radius:0 0 12px 12px;
        }
        .ql-toolbar {
            border-radius:12px 12px 0 0;
            background:#f8fafc;
        }
        #quillEditor {
            border-radius:12px;
            background:white;
        }
        .check-table td img {
            max-width:100px;
            max-height:100px;
            cursor:pointer;
            border-radius:8px;
            transition:transform 0.2s;
            margin:2px;
            border:1px solid #e0e4ea;
        }
        .check-table td img:hover {
            transform:scale(1.05);
            box-shadow:0 4px 12px rgba(0,0,0,0.15);
        }

        .image-viewer-modal .modal {
            max-width:800px;
            text-align:center;
            overflow:hidden;
        }
        .image-viewer-modal .modal .image-wrapper {
            overflow:auto;
            max-height:70vh;
            text-align:center;
            cursor:grab;
            margin:10px 0;
        }
        .image-viewer-modal .modal .image-wrapper img {
            max-width:100%;
            max-height:70vh;
            border-radius:12px;
            transition:transform 0.1s ease;
            transform-origin:center center;
        }
        .image-viewer-modal .modal .image-controls {
            display:flex;
            justify-content:center;
            gap:12px;
            margin-top:10px;
            flex-wrap:wrap;
        }
        .image-viewer-modal .modal .image-controls button {
            background:#1a3a5c;
            color:white;
            border:none;
            padding:8px 18px;
            border-radius:30px;
            font-weight:600;
            cursor:pointer;
            transition:0.2s;
            font-size:14px;
        }
        .image-viewer-modal .modal .image-controls button:hover {
            background:#0f2a44;
        }
        .image-viewer-modal .modal .image-controls .btn-download {
            background:#27ae60;
        }
        .image-viewer-modal .modal .image-controls .btn-download:hover {
            background:#1e8449;
        }
        .image-viewer-modal .modal .image-controls .btn-reset {
            background:#6a7a8a;
        }
        .image-viewer-modal .modal .image-controls .btn-reset:hover {
            background:#4a5a6a;
        }

        /* ===== ФИКСИРОВАННАЯ ТАБЛИЦА С ПЕРЕНОСОМ ===== */
        .check-table {
            table-layout: fixed !important;
            width: 100% !important;
            min-width: 100%;
        }
        .check-table th,
        .check-table td {
            word-break: break-word !important;
            white-space: normal !important;
            overflow-wrap: break-word !important;
            padding: 4px 6px !important;
            box-sizing: border-box;
            vertical-align: middle;
        }
        .check-table th:nth-child(1),
        .check-table td:nth-child(1) { width: 4% !important; }
        .check-table th:nth-child(2),
        .check-table td:nth-child(2) { width: 8% !important; }
        .check-table th:nth-child(3),
        .check-table td:nth-child(3) { width: 8% !important; }
        .check-table th:nth-child(4),
        .check-table td:nth-child(4) { width: 12% !important; }
        .check-table th:nth-child(5),
        .check-table td:nth-child(5) { width: 10% !important; }
        .check-table th:nth-child(6),
        .check-table td:nth-child(6) { width: 8% !important; }
        .check-table th:nth-child(7),
        .check-table td:nth-child(7) { width: 12% !important; }
        .check-table th:nth-child(8),
        .check-table td:nth-child(8) { width: 12% !important; }
        .check-table th:nth-child(9),
        .check-table td:nth-child(9) { width: 5% !important; }
        .check-table th:nth-child(10),
        .check-table td:nth-child(10) { width: 8% !important; }
        .check-table th:nth-child(11),
        .check-table td:nth-child(11) { width: 8% !important; }
        .check-table th:nth-child(12),
        .check-table td:nth-child(12) { width: 5% !important; }

        .check-table.income-table { table-layout:auto !important; min-width:1400px; }
        .check-table.income-table th, .check-table.income-table td { width:auto !important; }
        .check-cards img { max-width:100%; max-height:180px; cursor:pointer; }

        .table-sticky-wrapper {
            max-height:500px;
            overflow:auto;
            -webkit-overflow-scrolling:touch;
            border-radius:12px;
            border:1px solid #eef2f6;
            background:#fff;
        }
        .table-sticky-wrapper .check-table th {
            position:sticky;
            top:0;
            background:#f4f7fc;
            z-index:10;
        }

        .form-group input.error, .form-group select.error, .form-group textarea.error {
            border-color:#e74c3c;
        }
        .form-group .error-message {
            display:block;
            margin-top:4px;
            color:#e74c3c;
            font-size:12px;
        }

        /* ===== КАРТОЧКИ ДЛЯ МОБИЛЬНЫХ ===== */
        .check-cards {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        .check-card {
            background: #f8fafc;
            border-radius: 16px;
            padding: 14px 16px;
            border-left: 4px solid #1a3a5c;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
        }
        .check-card .field {
            display: flex;
            justify-content: space-between;
            padding: 4px 0;
            border-bottom: 1px solid #eef2f6;
            font-size: 13px;
        }
        .check-card .field:last-child {
            border-bottom: none;
        }
        .check-card .field .label {
            font-weight: 600;
            color: #2a3a4a;
            flex-shrink: 0;
            margin-right: 12px;
        }
        .check-card .field .value {
            color: #1a2a3a;
            text-align: right;
            word-break: break-word;
        }
        .check-card .field .value .check-status-badge {
            display: inline-block;
            padding: 2px 12px;
            border-radius: 30px;
            font-size: 12px;
            font-weight: 700;
        }
        .check-card .actions {
            margin-top: 10px;
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
            justify-content: flex-end;
        }
        .check-card .actions button {
            font-size: 12px;
            padding: 4px 12px;
        }
        .check-card .verified-icon {
            font-size: 16px;
        }
        @media (min-width: 768px) {
            .check-cards {
                display: none;
            }
        }
        @media (max-width: 767px) {
            .check-table-wrapper {
                display: none;
            }
        }

        .check-item {
            padding:14px 18px; background:#f8fafc; border-radius:16px; border-bottom:1px solid #eef2f6;
            margin-bottom:8px;
        }
        .check-header {
            display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-weight:600; font-size:14px;
        }
        .check-number { color:#1a3a5c; }
        .check-dept { color:#2a3a4a; }
        .check-date { color:#6a7a8a; font-weight:400; }
        .check-problem { margin:4px 0; font-size:14px; }
        .check-comment { font-size:12px; color:#6a7a8a; margin-top:4px; background:#eef2f6; padding:4px 12px; border-radius:12px; display:inline-block; }
        .check-status-badge { display:inline-block; padding:2px 12px; border-radius:30px; font-size:12px; font-weight:700; }
        .check-status-open { background:#f8d7da; color:#721c24; }
        .check-status-progress { background:#fff3cd; color:#856404; }
        .check-status-done { background:#d4edda; color:#155724; }
        .check-status-cancel { background:#e8e8e8; color:#6a7a8a; }
        .check-actions { margin-top:8px; display:flex; gap:6px; }

        .tech-summary {
            display:flex; flex-wrap:wrap; gap:12px; margin-bottom:16px;
        }
        .tech-summary .stat {
            background:#f8fafc; padding:8px 18px; border-radius:30px; font-weight:600; font-size:13px;
        }
        .tech-card {
            padding:14px 18px; background:#f8fafc; border-radius:16px; border-left:4px solid #1a3a5c;
            margin-bottom:8px;
        }
        .tech-status { font-weight:700; font-size:13px; }
        .tech-status-line { color:#27ae60; }
        .tech-status-repair { color:#e74c3c; }
        .tech-status-wait { color:#f39c12; }
        .tech-status-conserv { color:#8e44ad; }
        .tech-details { display:flex; flex-wrap:wrap; gap:10px; font-size:13px; margin-top:4px; }
        .tech-actions { margin-top:8px; display:flex; gap:6px; }

        .modal-overlay {
            position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5);
            display:none; justify-content:center; align-items:center; z-index:1000; padding:20px;
        }
        .modal-overlay.show { display:flex; }
        .modal {
            background:white; max-width:600px; width:100%; border-radius:24px; padding:24px;
            max-height:90vh; overflow-y:auto; animation:modalFade 0.3s;
        }
        @keyframes modalFade { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }
        .modal-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; }
        .modal-header h2 { font-size:20px; }
        .modal-close { background:none; border:none; font-size:28px; cursor:pointer; color:#6a7a8a; }
        .modal .form-group textarea { width:100%; padding:12px; border:2px solid #e0e4ea; border-radius:12px; resize:vertical; }
        .modal .form-row { display:flex; gap:12px; flex-wrap:wrap; }
        .modal .form-row .form-group { flex:1 1 180px; }

        .toast-container {
            position:fixed; bottom:100px; right:20px; z-index:2000;
            display:flex; flex-direction:column; gap:10px; max-width:90%;
        }
        .toast {
            background:#1a2a3a; color:white; padding:12px 20px; border-radius:30px;
            box-shadow:0 8px 24px rgba(0,0,0,0.2); font-weight:500; animation:slideIn 0.3s;
        }
        .toast.success { background:#27ae60; }
        .toast.error { background:#e74c3c; }
        @keyframes slideIn { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:translateX(0); } }

        .bottom-nav {
            position:fixed; left:0; right:0; bottom:0; width:100%; height:auto;
            background:#ffffff; display:flex; flex-direction:row; align-items:stretch;
            justify-content:space-around; gap:4px; padding:8px 8px calc(8px + env(safe-area-inset-bottom));
            box-shadow:0 -4px 18px rgba(15,42,68,0.12); z-index:500;
            border-top:1px solid #eef2f6; margin:0;
        }
        .bottom-nav .nav-item {
            display:flex; flex:1 1 0; flex-direction:column; align-items:center; justify-content:center;
            gap:4px; background:none; border:none; font-size:11px; color:#6a7a8a; cursor:pointer;
            transition:0.2s; padding:8px 4px; border-radius:12px; text-align:center;
            position:relative; min-width:0;
        }
         .bottom-nav .nav-item .icon { font-size:22px; width:auto; line-height:1; }
         .bottom-nav .nav-item .label { margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
         .bottom-nav .nav-item:hover { background:#f0f4f8; }
         .bottom-nav .nav-item.active { color:#1a3a5c; font-weight:700; background:#e8f0f7; }
         .bottom-nav .nav-item.active .icon { transform:none; }
        .bottom-nav .nav-item .badge {
            position:absolute; top:2px; right:calc(50% - 22px); background:#e74c3c; color:white;
            border-radius:50%; width:18px; height:18px; font-size:10px; line-height:18px; text-align:center;
            display:none;
        }
        .bottom-nav .nav-item .badge.show { display:block; }
        .flex-1 { flex:1; }
        .mt-16 { margin-top:16px; }

        @media (max-width:600px) {
             #appPage { padding:12px 12px 70px 12px; }
            .app-header .brand { font-size:18px; }
            .app-header { padding:10px 16px; }
            .dept-grid { grid-template-columns:repeat(auto-fill, minmax(120px,1fr)); }
            .folder-grid { grid-template-columns:repeat(auto-fill, minmax(120px,1fr)); }
            .subsection-grid { grid-template-columns:repeat(auto-fill, minmax(110px,1fr)); }
            .modal { padding:16px; }
            .profile-field .label { width:80px; font-size:13px; }
            .check-filters input, .check-filters select { flex:1 1 100%; }
            .drivers-toolbar input, .drivers-toolbar select { flex:1 1 100%; }
            .check-table th, .check-table td { font-size:12px; padding:6px; }
            .image-viewer-modal .modal .image-wrapper img { max-height:50vh; }
        }
         @media (max-width:767px) {
             body { overflow-x:hidden; }
             #appPage { width:100%; max-width:none; min-height:100dvh; padding:8px 8px 76px; }
             .app-header { margin-bottom:10px; padding:8px 10px; border-radius:12px; gap:8px; }
             .app-header .brand { min-width:0; flex:1 1 100%; flex-wrap:nowrap; }
             .logo-img { width:42px; height:42px; flex:0 0 42px; }
             .company-name { min-width:0; overflow:hidden; text-overflow:ellipsis; font-size:12px; line-height:1.25; }
             .user-info { width:100%; justify-content:flex-end; gap:6px; }
             .user-info .avatar { width:32px; height:32px; font-size:13px; }
             .user-meta .name { max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
             .user-meta .role { font-size:9px; padding:2px 6px; }
             .logout-btn { font-size:11px; padding:6px 2px; }
             .lang-switcher { font-size:11px; padding:5px 7px; }
             .page { min-width:0; }
             .card, #page-home .card, .subsection-content { padding:12px; border-radius:12px; margin-bottom:10px; }
             .card-title { font-size:16px; margin-bottom:10px; gap:8px; }
             .folder-grid, .dept-grid, .subsection-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); gap:8px; }
             .folder-card, .dept-card, .subsection-card { min-width:0; padding:14px 8px; border-radius:12px; }
             .folder-card .folder-icon { font-size:30px; }
             .folder-card .folder-name, .dept-card .name { font-size:13px; line-height:1.25; overflow-wrap:anywhere; }
             .folder-card .folder-desc, .dept-card .desc { font-size:10px; }
             .subsection-card .icon { font-size:24px; }
             .subsection-card .name { font-size:12px; }
             .subsection-header { gap:7px; margin-bottom:12px; padding-bottom:9px; }
             .subsection-header .title { font-size:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
             .subsection-header .back-btn { font-size:22px; padding:0 4px; }
             .compact-toolbar, .drivers-toolbar, .check-filters { display:grid; grid-template-columns:1fr; gap:7px; margin-bottom:10px; }
             .compact-toolbar input, .compact-toolbar select, .drivers-toolbar input, .drivers-toolbar select, .check-filters input, .check-filters select { width:100%; min-height:40px; font-size:14px; }
             .compact-toolbar button, .drivers-toolbar button, .check-filters button { min-height:40px; width:100%; }
             .tech-summary { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:6px; margin-bottom:10px; }
             .tech-summary .stat { padding:7px 8px; font-size:11px; text-align:center; }
             .item-list { gap:8px; }
             .item-card, .tech-card, .check-card { padding:10px; border-radius:10px; }
             .item-card .title { font-size:14px; }
             .item-card .meta, .item-card .description, .tech-details { font-size:12px; line-height:1.4; }
             .item-card .actions, .tech-actions, .check-card .actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
             .item-card .actions button, .tech-actions button, .check-card .actions button { min-height:38px; padding:7px 6px; font-size:11px; }
             .item-card .actions select, .tech-actions select { min-height:38px; min-width:0; grid-column:1 / -1; font-size:13px; }
             .check-table-wrapper { overflow-x:auto; -webkit-overflow-scrolling:touch; }
             .check-table { min-width:760px; }
             .check-table th, .check-table td { font-size:11px; padding:6px 5px !important; }
             .modal-overlay { padding:8px; align-items:flex-end; }
             .modal { max-height:92dvh; padding:14px; border-radius:16px 16px 0 0; }
             .modal-header h2 { font-size:17px; }
             .modal .form-row { display:block; }
             .modal .form-group input, .modal .form-group select, .modal .form-group textarea { min-height:42px; font-size:16px; }
             .modal .btn-primary { min-height:44px; }
             .toast-container { left:8px; right:8px; bottom:72px; max-width:none; }
             .toast { font-size:13px; padding:10px 14px; }
         }

        .lang-switcher {
            background: #eef2f6;
            border: none;
            border-radius: 30px;
            padding: 4px 12px;
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            color: #1a3a5c;
            transition: 0.2s;
            white-space: nowrap;
        }
        .lang-switcher:hover {
            background: #d0d8e0;
        }

        /* ===== ПРОФИЛЬ (НОВЫЙ ДИЗАЙН) ===== */
        .profile-card {
            max-width: 400px;
            margin: 0 auto;
            background: white;
            border-radius: 24px;
            padding: 30px 20px 20px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.08);
            text-align: center;
        }
        .profile-avatar {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            background: #1a3a5c;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 40px;
            font-weight: 700;
            margin: 0 auto 16px;
            text-transform: uppercase;
        }
        .profile-name {
            font-size: 22px;
            font-weight: 700;
            color: #1a2a3a;
            margin-bottom: 4px;
        }
        .profile-role {
            font-size: 14px;
            color: #6a7a8a;
            background: #eef2f6;
            padding: 4px 16px;
            border-radius: 30px;
            display: inline-block;
            margin-bottom: 12px;
        }
        .profile-details {
            text-align: left;
            margin: 16px 0;
            padding: 0 4px;
        }
        .profile-details .row {
            display: flex;
            align-items: center;
            padding: 8px 0;
            border-bottom: 1px solid #eef2f6;
            font-size: 14px;
        }
        .profile-details .row:last-child {
            border-bottom: none;
        }
        .profile-details .row .icon {
            width: 28px;
            color: #6a7a8a;
            font-size: 18px;
        }
        .profile-details .row .label {
            color: #6a7a8a;
            width: 80px;
            flex-shrink: 0;
        }
        .profile-details .row .value {
            color: #1a2a3a;
            font-weight: 500;
            word-break: break-word;
        }
        .profile-menu {
            margin-top: 24px;
            text-align: left;
            border-top: 1px solid #eef2f6;
            padding-top: 16px;
        }
        .profile-menu .menu-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 8px;
            border-radius: 12px;
            cursor: pointer;
            transition: background 0.2s;
            color: #1a2a3a;
            text-decoration: none;
        }
        .profile-menu .menu-item:hover {
            background: #f4f7fc;
        }
        .profile-menu .menu-item .icon {
            font-size: 20px;
            width: 28px;
            color: #6a7a8a;
        }
        .profile-menu .menu-item .arrow {
            margin-left: auto;
            color: #b0b8c0;
        }
        .profile-menu .menu-item.logout {
            color: #e74c3c;
        }
        .profile-menu .menu-item.logout .icon {
            color: #e74c3c;
        }
        .audit-list { max-height: 520px; overflow: auto; }
        .audit-item { padding: 12px 0; border-bottom: 1px solid #e0e4ea; overflow-wrap: anywhere; }
        .audit-item time { display: block; color: #6a7a8a; font-size: 13px; margin-top: 4px; }
        .audit-item details { margin-top: 6px; }
        .audit-item pre { margin-top: 6px; padding: 10px; white-space: pre-wrap; background: #f4f7fc; border-radius: 8px; }
