
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Roboto', Arial, sans-serif;
        }

        body {
            background: #e6e9ef;
            color: #1e1e1e;
        }

        .container {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            max-width: 1920px;
            margin: 0 auto;
            background: #f0f2f5;
        }

        .official-header {
            background: #d9dfe8;
            padding: 12px 25px;
            display: flex;
            align-items: center;
            border-bottom: 2px solid #a0aab7;
            color: #1e2a3a;
        }

        .state-emblem {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-right: 30px;
        }

        .double-eagle-large {
            font-size: 38px;
            line-height: 1;
            color: #4a5c6e;
        }

        .emblem-text {
            font-size: 10px;
            letter-spacing: 2px;
            color: #4a5c6e;
        }

        .agency-info h1 {
            font-size: 20px;
            font-weight: 700;
            color: #1e2a3a;
            margin-bottom: 6px;
            letter-spacing: 1px;
        }

        .department-info {
            display: flex;
            flex-direction: column;
        }

        .department-name {
            font-size: 14px;
            color: #2c3e50;
        }

        .system-id {
            font-size: 12px;
            color: #5a6b7a;
            margin-top: 4px;
        }

        .system-status-bar {
            background: #cdd3dc;
            padding: 10px 25px;
            display: flex;
            flex-wrap: wrap;
            gap: 30px;
            font-size: 13px;
            border-bottom: 1px solid #a5afbb;
            color: #1e2a3a;
        }

        .status-item i {
            margin-right: 6px;
            color: #3a5c7c;
        }

        .status-online { color: #2a7a2a; font-weight: bold; }
        .counter { color: #b85a1a; font-weight: 700; }

        .main-content {
            display: flex;
            flex: 1 0 auto;
            padding: 20px 25px;
            gap: 25px;
        }

        .sidebar {
            width: 440px;
            display: flex;
            flex-direction: column;
            gap: 25px;
            flex-shrink: 0;
        }

        .official-form {
            background: #ffffff;
            border: 1px solid #bdc3cc;
            border-radius: 6px;
            padding: 18px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.05);
        }

        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            border-bottom: 1px solid #cbd0d8;
            padding-bottom: 10px;
            margin-bottom: 16px;
        }

        .section-header h2, .section-header h3 {
            color: #1e3a5f;
            font-size: 16px;
            font-weight: 600;
        }

        .form-number {
            font-size: 12px;
            color: #5a6b7a;
            background: #eaeef2;
            padding: 4px 10px;
            border-radius: 30px;
        }

        .input-group {
            margin-bottom: 16px;
        }

        .input-group label {
            display: block;
            font-size: 13px;
            color: #2c3e50;
            margin-bottom: 5px;
            font-weight: 500;
        }

        .input-with-scanner {
            display: flex;
            gap: 8px;
        }

        input, select, textarea {
            background: #ffffff;
            border: 1px solid #b0b8c2;
            border-radius: 4px;
            padding: 10px 12px;
            color: #1e1e1e;
            font-size: 14px;
            width: 100%;
            transition: 0.2s;
        }

        input:focus, select:focus, textarea:focus {
            border-color: #4a7a9c;
            outline: none;
            box-shadow: 0 0 0 2px rgba(74,122,156,0.2);
        }

        .search-buttons {
            display: flex;
            gap: 12px;
            margin-top: 12px;
        }

        .official-btn {
            background: #1e3a5f;
            border: none;
            color: white;
            font-weight: 500;
            padding: 12px 16px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: 0.2s;
        }

        .official-btn:hover {
            background: #2c4e74;
        }

        .clear-btn {
            background: #eef2f5;
            border: 1px solid #b0b8c2;
            color: #1e2a3a;
            padding: 12px 16px;
            border-radius: 4px;
            cursor: pointer;
        }

        .clear-btn:hover {
            background: #e2e6ec;
        }

        .vehicle-info, .status-history {
            background: #ffffff;
        }

        .info-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 35px 20px;
            color: #5a6b7a;
            text-align: center;
        }

        .placeholder-icon {
            font-size: 48px;
            margin-bottom: 15px;
            color: #8a9aa8;
        }

        .vehicle-details {
            position: relative;
        }

        .detail-section {
            margin-bottom: 20px;
        }

        .detail-section h4 {
            color: #1e3a5f;
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 12px;
            border-bottom: 1px solid #eaeef2;
            padding-bottom: 6px;
        }

        .detail-grid {
            display: grid;
            grid-template-columns: 1fr 2fr;
            gap: 8px;
            font-size: 14px;
        }

        .detail-label {
            color: #4a5c6e;
            font-weight: 500;
        }

        .detail-value {
            color: #1e1e1e;
            font-weight: 400;
        }

        .status-indicator {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px;
            border-radius: 6px;
            transition: all 0.2s;
        }

        @keyframes pulse {
            0% { opacity: 1; background: #fff4e0; border-left-color: #f39c12; }
            50% { opacity: 0.8; background: #ffe8b6; border-left-color: #e67e22; }
            100% { opacity: 1; background: #fff4e0; border-left-color: #f39c12; }
        }
        
        .status-blink {
            animation: pulse 1.5s infinite;
            border-left: 6px solid;
        }

        .status-details {
            margin-top: 12px;
            background: #f8fafc;
            padding: 12px;
            border-radius: 4px;
        }

        .status-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 6px;
        }

        .main-area {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 20px;
            min-width: 0;
        }

        .map-container {
            background: #ffffff;
            border-radius: 6px;
            border: 1px solid #bdc3cc;
            height: 400px;
            position: relative;
        }

        #map {
            height: 100%;
            width: 100%;
            border-radius: 6px;
            background: #eef2f5;
            z-index: 1;
        }

        .map-overlay {
            position: absolute;
            bottom: 15px;
            left: 15px;
            background: rgba(255,255,255,0.9);
            padding: 8px 16px;
            border-radius: 30px;
            display: flex;
            gap: 20px;
            font-size: 12px;
            border: 1px solid #b0b8c2;
            color: #1e2a3a;
            z-index: 1000;
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        }

        .quick-access-panel {
            background: #ffffff;
            border: 1px solid #bdc3cc;
            border-radius: 6px;
            padding: 14px 20px;
        }

        .quick-buttons {
            display: flex;
            gap: 12px;
            margin-top: 10px;
            flex-wrap: wrap;
        }

        .quick-btn {
            background: #eef2f5;
            border: 1px solid #b0b8c2;
            color: #1e2a3a;
            padding: 10px 16px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            font-size: 13px;
            transition: 0.1s;
        }
        
        .quick-btn:hover {
            background: #e2e6ec;
        }

        .footer {
            background: #d9dfe8;
            padding: 16px 25px;
            display: flex;
            justify-content: space-between;
            border-top: 1px solid #a5afbb;
            font-size: 12px;
            color: #1e2a3a;
        }

        .customs-stats {
            background: #f8fafc;
            border: 1px solid #bdc3cc;
            border-radius: 6px;
            padding: 12px 16px;
            display: flex;
            gap: 25px;
            font-size: 13px;
        }

        .stat-item {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .stat-value {
            font-weight: 700;
            color: #1e3a5f;
        }

        .camera-icon {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: #1e3a5f;
            color: white;
            padding: 4px 12px;
            border-radius: 30px;
            font-size: 12px;
            cursor: pointer;
            margin-left: 10px;
        }

        .camera-icon i {
            color: #ffd966;
        }

        .benyakoni-tag {
            background: #eaeef2;
            color: #1e3a5f;
            padding: 4px 14px;
            border-radius: 30px;
            font-weight: 500;
            font-size: 12px;
            display: inline-block;
            margin-top: 12px;
            border: 1px solid #b0b8c2;
        }

        .loader {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(30,58,95,0.2);
            border-top-color: #1e3a5f;
            border-radius: 50%;
            animation: spin 0.8s infinite linear;
            margin-right: 8px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .mono {
            font-family: monospace;
        }
        
        .plate {
            font-weight: 600;
        }

        /* Стили для статусов */
        .status-item-status {
            padding: 8px 12px;
            margin-bottom: 8px;
            border-radius: 4px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .status-item-status i {
            width: 20px;
        }
        
        .status-badge-new {
            background-color: #e3f2fd;
            border-left: 4px solid #2196f3;
        }
        
        .status-badge-in-progress {
            background-color: #fff3e0;
            border-left: 4px solid #ff9800;
        }
        
        .status-badge-paid {
            background-color: #e8f5e8;
            border-left: 4px solid #4caf50;
        }
        
        .status-badge-docs {
            background-color: #fff8e1;
            border-left: 4px solid #ffc107;
        }
        
        .status-badge-ownership {
            background-color: #e0f2f1;
            border-left: 4px solid #009688;
        }
        
        .status-badge-util {
            background-color: #ffebee;
            border-left: 4px solid #f44336;
        }
        
        .status-badge-util-paid {
            background-color: #e8f5e8;
            border-left: 4px solid #2e7d32;
        }
        
        .status-badge-util-paid-confirmed {
            background-color: #e8f8f5;
            border-left: 4px solid #2ecc71;
        }
        
        .status-badge-deposit {
            background-color: #ffe6cc;
            border-left: 4px solid #e67e22;
        }
        
        .status-badge-default {
            background-color: #f5f5f5;
            border-left: 4px solid #9e9e9e;
        }
        
        .status-badge-deposit-paid {
            background-color: #e8f5e8;
            border-left: 4px solid #4caf50;
        }
        
        .status-badge-entry-ban {
            background-color: #ffebee;
            border-left: 4px solid #b71c1c;
            font-weight: bold;
        }
        
        .status-badge-eu-fines-paid {
            background-color: #e8f5e9;
            border-left: 4px solid #2ecc71;
        }
        
        .status-badge-vat-suspended {
            background-color: #ffebee;
            border-left: 4px solid #e74c3c;
            font-weight: 500;
        }
        
        .status-badge-vat-paid {
            background-color: #e8f5e8;
            border-left: 4px solid #27ae60;
        }
        
        .status-badge-exit-allowed {
            background-color: #e8f5e8;
            border-left: 4px solid #27ae60;
            font-weight: bold;
        }
        
        .status-actions {
            display: flex;
            gap: 5px;
            margin-left: auto;
        }
        
        .status-actions button {
            background: none;
            border: none;
            cursor: pointer;
            color: #4a5c6e;
            padding: 4px 8px;
            border-radius: 4px;
        }
        
        .status-actions button:hover {
            background: #e0e4e9;
        }
        
        .status-actions .delete-status:hover {
            color: #e74c3c;
        }
        
        .add-status-btn {
            width: 100%;
            margin-top: 10px;
            background: #eef2f5;
            border: 1px dashed #b0b8c2;
            color: #1e3a5f;
            padding: 10px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        
        .add-status-btn:hover {
            background: #e2e6ec;
        }

        /* Стили для загрузки снимка */
        .camera-upload-preview {
            margin-top: 10px;
            border: 1px solid #b0b8c2;
            border-radius: 4px;
            padding: 10px;
            background: #f8fafc;
            display: none;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }
        
        .camera-upload-preview img {
            max-width: 100%;
            max-height: 150px;
            border-radius: 4px;
            border: 1px solid #b0b8c2;
        }
        
        .camera-upload-btn {
            background: #eef2f5;
            border: 1px solid #b0b8c2;
            color: #1e3a5f;
            padding: 8px 12px;
            border-radius: 4px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            margin-top: 5px;
        }
        
        .camera-upload-btn:hover {
            background: #e2e6ec;
        }

        /* Стили для изображения в модальном окне */
        .camera-image-container {
            background: #1e2a3a;
            color: white;
            padding: 20px;
            border-radius: 4px;
            text-align: center;
            margin-bottom: 15px;
            min-height: 200px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
        
        .camera-uploaded-image {
            max-width: 100%;
            max-height: 300px;
            margin-top: 15px;
            border-radius: 4px;
            border: 2px solid #ffd966;
            display: none;
        }

        /* Стили админ-панели */
        .admin-panel {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 500px;
            max-width: calc(100vw - 60px);
            background: white;
            border: 2px solid #1e3a5f;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            z-index: 10000;
            display: none;
            flex-direction: column;
        }

        .admin-panel.visible {
            display: flex;
        }

        .admin-header {
            background: #1e3a5f;
            color: white;
            padding: 15px 20px;
            border-radius: 10px 10px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .admin-header h3 {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 16px;
            font-weight: 600;
        }

        .admin-header h3 i {
            color: #ffd966;
        }

        .admin-close {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            font-size: 18px;
            transition: 0.2s;
        }

        .admin-close:hover {
            background: rgba(255,255,255,0.3);
        }

        .admin-body {
            padding: 20px;
            max-height: 70vh;
            overflow-y: auto;
        }

        .admin-tabs {
            display: flex;
            gap: 5px;
            border-bottom: 1px solid #e0e4e9;
            margin-bottom: 20px;
        }

        .admin-tab {
            padding: 10px 16px;
            background: none;
            border: none;
            border-bottom: 3px solid transparent;
            cursor: pointer;
            font-weight: 500;
            color: #4a5c6e;
            transition: 0.1s;
        }

        .admin-tab.active {
            border-bottom-color: #1e3a5f;
            color: #1e3a5f;
            font-weight: 600;
        }

        .admin-tab-content {
            display: none;
        }

        .admin-tab-content.active {
            display: block;
        }

        .admin-form-row {
            margin-bottom: 15px;
        }

        .admin-form-row label {
            display: block;
            font-size: 13px;
            font-weight: 500;
            color: #2c3e50;
            margin-bottom: 5px;
        }

        .admin-form-row .required:after {
            content: " *";
            color: #e74c3c;
        }

        .admin-form-row small {
            display: block;
            font-size: 11px;
            color: #6a7b8a;
            margin-top: 4px;
        }

        .admin-form-row-half {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
            margin-bottom: 15px;
        }

        .admin-btn {
            background: #1e3a5f;
            border: none;
            color: white;
            padding: 12px 20px;
            border-radius: 4px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            transition: 0.2s;
            font-size: 14px;
        }

        .admin-btn:hover {
            background: #2c4e74;
        }

        .admin-btn-success {
            background: #27ae60;
        }

        .admin-btn-success:hover {
            background: #2ecc71;
        }

        .admin-btn-danger {
            background: #e74c3c;
        }

        .admin-btn-danger:hover {
            background: #c0392b;
        }

        .admin-btn-warning {
            background: #e67e22;
        }

        .admin-vehicle-list {
            max-height: 400px;
            overflow-y: auto;
            border: 1px solid #e0e4e9;
            border-radius: 6px;
        }

        .admin-vehicle-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 15px;
            border-bottom: 1px solid #eaeef2;
            transition: 0.1s;
        }

        .admin-vehicle-item:hover {
            background: #f8fafc;
        }

        .admin-vehicle-item:last-child {
            border-bottom: none;
        }

        .admin-vehicle-info {
            flex: 1;
        }

        .admin-vehicle-vin {
            font-family: monospace;
            font-weight: 600;
            font-size: 13px;
            color: #1e3a5f;
        }

        .admin-vehicle-meta {
            display: flex;
            gap: 15px;
            font-size: 12px;
            color: #5a6b7a;
            margin-top: 4px;
        }

        .admin-vehicle-actions {
            display: flex;
            gap: 8px;
        }

        .admin-vehicle-actions button {
            background: none;
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 4px;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            color: #4a5c6e;
            transition: 0.1s;
        }

        .admin-vehicle-actions button:hover {
            background: #e0e4e9;
        }

        .admin-vehicle-actions .delete-btn:hover {
            background: #fadbd8;
            color: #e74c3c;
        }

        .admin-badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 30px;
            font-size: 10px;
            font-weight: 600;
            margin-left: 8px;
            background: #eaeef2;
            color: #1e3a5f;
        }

        .admin-status-badge {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            margin-right: 6px;
        }

        .admin-footer {
            margin-top: 20px;
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            border-top: 1px solid #e0e4e9;
            padding-top: 20px;
        }

        .admin-watermark {
            position: fixed;
            bottom: 100px;
            right: 30px;
            background: rgba(30,58,95,0.9);
            color: white;
            padding: 8px 16px;
            border-radius: 30px;
            font-size: 12px;
            display: none;
            align-items: center;
            gap: 8px;
            z-index: 9999;
            backdrop-filter: blur(4px);
            border: 1px solid #ffd966;
            pointer-events: auto;
        }

        .admin-watermark.visible {
            display: flex;
        }
        
        .pts-hidden {
            display: none;
        }

        .risk-assessment {
            display: none;
        }

        /* Модальное окно входа в админку */
        .login-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.7);
            z-index: 20000;
            display: none;
            justify-content: center;
            align-items: center;
        }

        .login-modal.visible {
            display: flex;
        }

        .login-box {
            background: white;
            border-radius: 12px;
            padding: 30px;
            width: 350px;
            text-align: center;
        }

        .login-box h3 {
            color: #1e3a5f;
            margin-bottom: 20px;
        }

        .login-box input {
            margin: 15px 0;
            padding: 12px;
            width: 100%;
        }

        .login-error {
            color: #e74c3c;
            font-size: 12px;
            margin-top: 10px;
        }

        /* Модальное окно статусов */
        #status-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 20000;
            justify-content: center;
            align-items: center;
        }
                /* Скрываем надпись Leaflet */
        .leaflet-control-attribution {
            display: none !important;
        }

        /* ========== МОБИЛЬНАЯ АДАПТАЦИЯ ========== */
        @media screen and (max-width: 768px) {
            .official-header {
                flex-direction: column;
                text-align: center;
                padding: 10px;
            }

            .state-emblem {
                margin-right: 0;
                margin-bottom: 10px;
            }

            .agency-info h1 {
                font-size: 16px;
            }

            .system-status-bar {
                padding: 8px 10px;
                gap: 12px;
                font-size: 11px;
                display: grid;
                grid-template-columns: repeat(2, 1fr);
            }

            .status-item {
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .main-content {
                flex-direction: column;
                padding: 10px;
                gap: 15px;
            }

            .sidebar {
                width: 100%;
                gap: 15px;
            }

            .search-buttons {
                flex-direction: column;
            }

            .official-btn, .clear-btn {
                width: 100%;
                justify-content: center;
                padding: 15px;
            }

            .customs-stats {
                flex-direction: column;
                gap: 10px;
            }

            .stat-item {
                justify-content: space-between;
            }

            .map-container {
                height: 250px;
            }

            .map-overlay {
                flex-direction: column;
                gap: 5px;
                padding: 6px 12px;
                font-size: 10px;
                bottom: 10px;
                left: 10px;
            }

            .map-legend {
                display: none;
            }

            .main-area > div:first-child {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .quick-buttons {
                flex-direction: column;
            }

            .quick-btn {
                width: 100%;
                justify-content: center;
                padding: 15px;
                font-size: 14px;
            }

            .footer {
                flex-direction: column;
                text-align: center;
                gap: 10px;
                padding: 15px;
            }

            .detail-grid {
                grid-template-columns: 1fr 2fr;
                font-size: 13px;
            }

            .input-with-scanner {
                flex-direction: column;
            }

            .admin-panel {
                width: calc(100% - 20px);
                right: 10px;
                bottom: 10px;
                left: 10px;
                max-width: none;
            }

            .admin-tabs {
                flex-wrap: wrap;
            }

            .admin-tab {
                flex: 1;
                min-width: 80px;
                padding: 8px 5px;
                font-size: 11px;
            }

            .admin-form-row-half {
                grid-template-columns: 1fr;
                gap: 10px;
            }

            .admin-vehicle-item {
                flex-direction: column;
                align-items: flex-start;
                gap: 10px;
            }

            .admin-vehicle-actions {
                width: 100%;
                justify-content: flex-end;
            }

            .admin-footer {
                flex-direction: column;
            }

            .admin-footer button {
                width: 100%;
            }

            #status-modal > div {
                width: 95%;
                margin: 0 auto;
                padding: 15px;
            }

            .status-item-status {
                flex-wrap: wrap;
            }

            .status-actions {
                margin-left: 30px;
                width: calc(100% - 30px);
                justify-content: flex-end;
            }

            button, .quick-btn, .official-btn, .clear-btn, .admin-tab, .admin-vehicle-actions button {
                min-height: 44px;
            }

            input, select, textarea {
                font-size: 16px;
            }
        }

        @media screen and (max-width: 480px) {
            .system-status-bar {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .detail-grid {
                grid-template-columns: 1fr;
                gap: 5px;
            }

            .section-header {
                flex-direction: column;
                gap: 8px;
                align-items: flex-start;
            }

            .form-number {
                align-self: flex-start;
            }

            .camera-icon {
                margin-left: 0;
                margin-top: 5px;
            }
        }
    