/* Admin Dashboard Stylesheet */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }
        
        .container {
            width: 100%;
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0,0,0,0.2);
            overflow: hidden;
        }
        
        .header {
            background: linear-gradient(135deg, #2d3748, #4a5568);
            color: white;
            padding: 30px 40px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 3px solid #4361ee;
            flex-wrap: wrap;
        }
        
        .header-left {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .header-icon {
            font-size: 36px;
            color: #63b3ed;
            background: rgba(255,255,255,0.1);
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .header-text h1 {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 5px;
        }
        
        .header-text p {
            font-size: 14px;
            opacity: 0.9;
            color: #cbd5e0;
        }
        
        .admin-info {
            display: flex;
            align-items: center;
            gap: 15px;
            background: rgba(255,255,255,0.1);
            padding: 10px 20px;
            border-radius: 30px;
            margin-top: 10px;
        }
        
        .admin-avatar {
            width: 45px;
            height: 45px;
            background: linear-gradient(135deg, #4299e1, #3182ce);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
        }
        
        .admin-details div:first-child {
            font-weight: 600;
            font-size: 16px;
        }
        
        .admin-details div:last-child {
            font-size: 12px;
            opacity: 0.8;
        }
        
        .database-controls {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }
        
        .db-btn {
            background: #4299e1;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.3s;
        }
        
        .db-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }
        
        .db-btn.export { background: #48bb78; }
        .db-btn.import { background: #4299e1; }
        .db-btn.backup { background: #ed8936; }
        .db-btn.clear { background: #f56565; }
        
        .tabs {
            display: flex;
            gap: 5px;
            background: #f7fafc;
            padding: 15px 40px;
            border-bottom: 2px solid #e2e8f0;
            overflow-x: auto;
        }
        
        .tab {
            padding: 15px 30px;
            background: white;
            border: 2px solid #e2e8f0;
            border-radius: 10px 10px 0 0;
            cursor: pointer;
            font-weight: 600;
            color: #4a5568;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 10px;
            white-space: nowrap;
        }
        
        .tab:hover {
            background: #edf2f7;
            border-color: #cbd5e0;
        }
        
        .tab.active {
            background: white;
            border-color: #4299e1;
            border-bottom-color: white;
            color: #4299e1;
        }
        
        .tab-badge {
            background: #4299e1;
            color: white;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }
        
        .tab.active .tab-badge {
            background: #2c5282;
        }
        
        .content {
            padding: 40px;
            min-height: 600px;
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .section-title {
            font-size: 24px;
            color: #2d3748;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 3px solid #e2e8f0;
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 25px;
            margin-bottom: 40px;
        }
        
        .stat-card {
            background: white;
            border-radius: 15px;
            padding: 25px;
            border: 3px solid #e2e8f0;
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
        }
        
        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: linear-gradient(90deg, #4299e1, #38b2ac);
        }
        
        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            border-color: #4299e1;
        }
        
        .stat-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
        }
        
        .stat-icon {
            width: 60px;
            height: 60px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            color: white;
        }
        
        .stat-number {
            font-size: 42px;
            font-weight: 700;
            color: #2d3748;
        }
        
        .stat-label {
            font-size: 16px;
            color: #718096;
            margin-top: 8px;
        }
        
        .table-container {
            background: white;
            border-radius: 12px;
            border: 2px solid #e2e8f0;
            overflow: hidden;
            margin-bottom: 30px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
        }
        
        thead {
            background: linear-gradient(135deg, #f7fafc, #edf2f7);
        }
        
        th {
            padding: 20px;
            text-align: left;
            font-weight: 600;
            color: #4a5568;
            border-bottom: 2px solid #e2e8f0;
            font-size: 15px;
        }
        
        td {
            padding: 20px;
            border-bottom: 1px solid #edf2f7;
            vertical-align: middle;
            color: #4a5568;
        }
        
        tr:hover {
            background: #f7fafc;
        }
        
        .status-badge {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            display: inline-block;
        }
        
        .status-waiting {
            background: #fff3cd;
            color: #856404;
            border: 1px solid #ffeaa7;
        }
        
        .status-qr-assigned {
            background: #cce5ff;
            color: #004085;
            border: 1px solid #b8daff;
        }
        
        .status-qr-scanned {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        
        .status-completed {
            background: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }
        
        .action-buttons {
            display: flex;
            gap: 8px;
        }
        
        .btn-small {
            padding: 8px 15px;
            font-size: 13px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            font-weight: 600;
        }
        
        .btn-small i {
            font-size: 12px;
        }
        
        .search-container {
            display: flex;
            gap: 15px;
            margin-bottom: 30px;
        }
        
        .search-input {
            flex: 1;
            padding: 15px 20px;
            padding-left: 50px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 16px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: 20px center;
            background-size: 20px;
        }
        
        .search-input:focus {
            outline: none;
            border-color: #4299e1;
        }
        
        .filters {
            display: flex;
            gap: 10px;
        }
        
        .filter-btn {
            padding: 15px 25px;
            background: white;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 600;
            color: #4a5568;
            transition: all 0.3s;
        }
        
        .filter-btn:hover, .filter-btn.active {
            background: #4299e1;
            border-color: #4299e1;
            color: white;
        }
        
        .no-data {
            text-align: center;
            padding: 60px 40px;
            color: #a0aec0;
        }
        
        .no-data i {
            font-size: 60px;
            margin-bottom: 20px;
            opacity: 0.5;
        }
        
        .alert {
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 25px;
            display: none;
        }
        
        .alert-success {
            background: #d4edda;
            color: #155724;
            border: 2px solid #c3e6cb;
        }
        
        .alert-error {
            background: #f8d7da;
            color: #721c24;
            border: 2px solid #f5c6cb;
        }
        
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        
        .modal-content {
            background: white;
            border-radius: 15px;
            padding: 40px;
            width: 100%;
            max-width: 600px;
            position: relative;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }
        
        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid #e2e8f0;
        }
        
        .modal-title {
            font-size: 24px;
            font-weight: 600;
            color: #2d3748;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .modal-close {
            background: none;
            border: none;
            font-size: 28px;
            cursor: pointer;
            color: #718096;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s;
        }
        
        .modal-close:hover {
            background: #f7fafc;
        }
        
        .footer {
            text-align: center;
            padding: 30px;
            background: #f8f9fa;
            color: #6c757d;
            font-size: 14px;
            border-top: 2px solid #e9ecef;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 10px;
            font-weight: 600;
            color: #4a5568;
            font-size: 16px;
        }
        
        .form-input, .form-select {
            width: 100%;
            padding: 15px;
            border: 2px solid #cbd5e0;
            border-radius: 8px;
            font-size: 16px;
            background: white;
            color: #4a5568;
        }
        
        .form-input:focus, .form-select:focus {
            outline: none;
            border-color: #4299e1;
        }
        
        .btn {
            padding: 15px 30px;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }
        
        .btn-primary {
            background: #4299e1;
            color: white;
        }
        
        .btn-primary:hover {
            background: #3182ce;
        }
        
        .btn-success {
            background: #48bb78;
            color: white;
        }
        
        .btn-success:hover {
            background: #38a169;
        }
        
        /* QR Generator Styles */
        .qr-generator {
            background: #f7fafc;
            padding: 30px;
            border-radius: 15px;
            margin-bottom: 30px;
            border: 2px solid #e2e8f0;
        }
        
        .qr-preview-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            margin: 30px 0;
        }
        
        .qr-preview {
            width: 250px;
            height: 250px;
            border: 3px solid #e2e8f0;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: white;
            padding: 20px;
            position: relative;
        }
        
        .qr-preview img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }
        
        .qr-loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #4299e1;
            font-size: 48px;
        }
        
        .qr-placeholder {
            color: #cbd5e0;
            font-size: 48px;
        }
        
        .qr-error {
            color: #f56565;
            font-size: 14px;
            text-align: center;
            margin-top: 10px;
        }
        
        .qr-data-preview {
            background: white;
            padding: 15px;
            border-radius: 8px;
            border: 2px solid #e2e8f0;
            font-family: monospace;
            font-size: 14px;
            word-break: break-all;
            max-width: 100%;
            overflow: auto;
        }
        
        .qr-actions {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 20px;
        }
        
        /* Модальное окно авторизации */
        .login-modal {
            display: flex;
        }
        
        .login-content {
            background: white;
            border-radius: 15px;
            padding: 50px;
            width: 100%;
            max-width: 400px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }
        
        .login-icon {
            font-size: 60px;
            color: #4299e1;
            margin-bottom: 20px;
        }
        
        .login-title {
            font-size: 28px;
            color: #2d3748;
            margin-bottom: 10px;
        }
        
        .login-subtitle {
            color: #718096;
            margin-bottom: 30px;
        }
        
        .login-input {
            width: 100%;
            padding: 15px;
            margin-bottom: 20px;
            border: 2px solid #cbd5e0;
            border-radius: 8px;
            font-size: 16px;
            text-align: center;
            letter-spacing: 3px;
            font-weight: 600;
        }
        
        .login-input:focus {
            outline: none;
            border-color: #4299e1;
        }
        
        .login-btn {
            width: 100%;
            padding: 15px;
            background: #4299e1;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.3s;
        }
        
        .login-btn:hover {
            background: #3182ce;
        }
        
        .login-error {
            color: #f56565;
            margin-top: 10px;
            display: none;
        }
        
        /* Загрузка фото QR */
        .qr-upload-container {
            background: #f7fafc;
            padding: 20px;
            border-radius: 10px;
            border: 2px dashed #cbd5e0;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .qr-upload-container:hover {
            border-color: #4299e1;
            background: #edf2f7;
        }
        
        .qr-upload-container i {
            font-size: 48px;
            color: #718096;
            margin-bottom: 10px;
        }
        
        .qr-upload-input {
            display: none;
        }
        
        .qr-upload-info {
            color: #718096;
            font-size: 14px;
            margin-top: 10px;
        }
        
        .uploaded-qr-container {
            text-align: center;
            margin-top: 20px;
        }
        
        .uploaded-qr-preview {
            max-width: 200px;
            max-height: 200px;
            margin: 0 auto;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            padding: 10px;
            background: white;
        }
        
        /* Loading styles */
        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid #4299e1;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        @media (max-width: 768px) {
            .header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .tabs {
                padding: 10px 20px;
            }
            
            .tab {
                padding: 12px 20px;
                font-size: 14px;
            }
            
            .content {
                padding: 30px 20px;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            .search-container {
                flex-direction: column;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .login-content {
                padding: 30px 20px;
            }
            
            .qr-preview {
                width: 200px;
                height: 200px;
            }
            
            .qr-actions {
                flex-direction: column;
            }
        }
        /* Admin Dashboard Stylesheet */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
        }
        
        body {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
        }
        
        .container {
            width: 100%;
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0,0,0,0.2);
            overflow: hidden;
        }
        
        .header {
            background: linear-gradient(135deg, #2d3748, #4a5568);
            color: white;
            padding: 30px 40px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 3px solid #4361ee;
            flex-wrap: wrap;
        }
        
        .header-left {
            display: flex;
            align-items: center;
            gap: 20px;
        }
        
        .header-icon {
            font-size: 36px;
            color: #63b3ed;
            background: rgba(255,255,255,0.1);
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .header-text h1 {
            font-size: 28px;
            font-weight: 700;
            margin-bottom: 5px;
        }
        
        .header-text p {
            font-size: 14px;
            opacity: 0.9;
            color: #cbd5e0;
        }
        
        .admin-info {
            display: flex;
            align-items: center;
            gap: 15px;
            background: rgba(255,255,255,0.1);
            padding: 10px 20px;
            border-radius: 30px;
            margin-top: 10px;
        }
        
        .admin-avatar {
            width: 45px;
            height: 45px;
            background: linear-gradient(135deg, #4299e1, #3182ce);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 20px;
        }
        
        .admin-details div:first-child {
            font-weight: 600;
            font-size: 16px;
        }
        
        .admin-details div:last-child {
            font-size: 12px;
            opacity: 0.8;
        }
        
        .database-controls {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }
        
        .db-btn {
            background: #4299e1;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 5px;
            transition: all 0.3s;
        }
        
        .db-btn:hover {
            opacity: 0.9;
            transform: translateY(-2px);
        }
        
        .db-btn.export { background: #48bb78; }
        .db-btn.import { background: #4299e1; }
        .db-btn.backup { background: #ed8936; }
        .db-btn.clear { background: #f56565; }
        
        .tabs {
            display: flex;
            gap: 5px;
            background: #f7fafc;
            padding: 15px 40px;
            border-bottom: 2px solid #e2e8f0;
            overflow-x: auto;
        }
        
        .tab {
            padding: 15px 30px;
            background: white;
            border: 2px solid #e2e8f0;
            border-radius: 10px 10px 0 0;
            cursor: pointer;
            font-weight: 600;
            color: #4a5568;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 10px;
            white-space: nowrap;
        }
        
        .tab:hover {
            background: #edf2f7;
            border-color: #cbd5e0;
        }
        
        .tab.active {
            background: white;
            border-color: #4299e1;
            border-bottom-color: white;
            color: #4299e1;
        }
        
        .tab-badge {
            background: #4299e1;
            color: white;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
        }
        
        .tab.active .tab-badge {
            background: #2c5282;
        }
        
        .content {
            padding: 40px;
            min-height: 600px;
        }
        
        .tab-content {
            display: none;
        }
        
        .tab-content.active {
            display: block;
        }
        
        .section-title {
            font-size: 24px;
            color: #2d3748;
            margin-bottom: 25px;
            padding-bottom: 15px;
            border-bottom: 3px solid #e2e8f0;
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 25px;
            margin-bottom: 40px;
        }
        
        .stat-card {
            background: white;
            border-radius: 15px;
            padding: 25px;
            border: 3px solid #e2e8f0;
            transition: all 0.3s;
            position: relative;
            overflow: hidden;
        }
        
        .stat-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: linear-gradient(90deg, #4299e1, #38b2ac);
        }
        
        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            border-color: #4299e1;
        }
        
        .stat-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 20px;
        }
        
        .stat-icon {
            width: 60px;
            height: 60px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 28px;
            color: white;
        }
        
        .stat-number {
            font-size: 42px;
            font-weight: 700;
            color: #2d3748;
        }
        
        .stat-label {
            font-size: 16px;
            color: #718096;
            margin-top: 8px;
        }
        
        .table-container {
            background: white;
            border-radius: 12px;
            border: 2px solid #e2e8f0;
            overflow: hidden;
            margin-bottom: 30px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }
        
        table {
            width: 100%;
            border-collapse: collapse;
        }
        
        thead {
            background: linear-gradient(135deg, #f7fafc, #edf2f7);
        }
        
        th {
            padding: 20px;
            text-align: left;
            font-weight: 600;
            color: #4a5568;
            border-bottom: 2px solid #e2e8f0;
            font-size: 15px;
        }
        
        td {
            padding: 20px;
            border-bottom: 1px solid #edf2f7;
            vertical-align: middle;
            color: #4a5568;
        }
        
        tr:hover {
            background: #f7fafc;
        }
        
        .status-badge {
            padding: 8px 16px;
            border-radius: 20px;
            font-size: 13px;
            font-weight: 600;
            display: inline-block;
        }
        
        .status-waiting {
            background: #fff3cd;
            color: #856404;
            border: 1px solid #ffeaa7;
        }
        
        .status-qr-assigned {
            background: #cce5ff;
            color: #004085;
            border: 1px solid #b8daff;
        }
        
        .status-qr-scanned {
            background: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        
        .status-completed {
            background: #d1ecf1;
            color: #0c5460;
            border: 1px solid #bee5eb;
        }
        
        .action-buttons {
            display: flex;
            gap: 8px;
        }
        
        .btn-small {
            padding: 8px 15px;
            font-size: 13px;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 5px;
            font-weight: 600;
        }
        
        .btn-small i {
            font-size: 12px;
        }
        
        .search-container {
            display: flex;
            gap: 15px;
            margin-bottom: 30px;
        }
        
        .search-input {
            flex: 1;
            padding: 15px 20px;
            padding-left: 50px;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            font-size: 16px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: 20px center;
            background-size: 20px;
        }
        
        .search-input:focus {
            outline: none;
            border-color: #4299e1;
        }
        
        .filters {
            display: flex;
            gap: 10px;
        }
        
        .filter-btn {
            padding: 15px 25px;
            background: white;
            border: 2px solid #e2e8f0;
            border-radius: 10px;
            cursor: pointer;
            font-weight: 600;
            color: #4a5568;
            transition: all 0.3s;
        }
        
        .filter-btn:hover, .filter-btn.active {
            background: #4299e1;
            border-color: #4299e1;
            color: white;
        }
        
        .no-data {
            text-align: center;
            padding: 60px 40px;
            color: #a0aec0;
        }
        
        .no-data i {
            font-size: 60px;
            margin-bottom: 20px;
            opacity: 0.5;
        }
        
        .alert {
            padding: 20px;
            border-radius: 10px;
            margin-bottom: 25px;
            display: none;
        }
        
        .alert-success {
            background: #d4edda;
            color: #155724;
            border: 2px solid #c3e6cb;
        }
        
        .alert-error {
            background: #f8d7da;
            color: #721c24;
            border: 2px solid #f5c6cb;
        }
        
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }
        
        .modal-content {
            background: white;
            border-radius: 15px;
            padding: 40px;
            width: 100%;
            max-width: 600px;
            position: relative;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }
        
        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid #e2e8f0;
        }
        
        .modal-title {
            font-size: 24px;
            font-weight: 600;
            color: #2d3748;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .modal-close {
            background: none;
            border: none;
            font-size: 28px;
            cursor: pointer;
            color: #718096;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.3s;
        }
        
        .modal-close:hover {
            background: #f7fafc;
        }
        
        .footer {
            text-align: center;
            padding: 30px;
            background: #f8f9fa;
            color: #6c757d;
            font-size: 14px;
            border-top: 2px solid #e9ecef;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-label {
            display: block;
            margin-bottom: 10px;
            font-weight: 600;
            color: #4a5568;
            font-size: 16px;
        }
        
        .form-input, .form-select {
            width: 100%;
            padding: 15px;
            border: 2px solid #cbd5e0;
            border-radius: 8px;
            font-size: 16px;
            background: white;
            color: #4a5568;
        }
        
        .form-input:focus, .form-select:focus {
            outline: none;
            border-color: #4299e1;
        }
        
        .btn {
            padding: 15px 30px;
            border: none;
            border-radius: 10px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
        }
        
        .btn-primary {
            background: #4299e1;
            color: white;
        }
        
        .btn-primary:hover {
            background: #3182ce;
        }
        
        .btn-success {
            background: #48bb78;
            color: white;
        }
        
        .btn-success:hover {
            background: #38a169;
        }
        
        /* QR Generator Styles */
        .qr-generator {
            background: #f7fafc;
            padding: 30px;
            border-radius: 15px;
            margin-bottom: 30px;
            border: 2px solid #e2e8f0;
        }
        
        .qr-preview-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            margin: 30px 0;
        }
        
        .qr-preview {
            width: 250px;
            height: 250px;
            border: 3px solid #e2e8f0;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: white;
            padding: 20px;
            position: relative;
        }
        
        .qr-preview img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }
        
        .qr-loading {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #4299e1;
            font-size: 48px;
        }
        
        .qr-placeholder {
            color: #cbd5e0;
            font-size: 48px;
        }
        
        .qr-error {
            color: #f56565;
            font-size: 14px;
            text-align: center;
            margin-top: 10px;
        }
        
        .qr-data-preview {
            background: white;
            padding: 15px;
            border-radius: 8px;
            border: 2px solid #e2e8f0;
            font-family: monospace;
            font-size: 14px;
            word-break: break-all;
            max-width: 100%;
            overflow: auto;
        }
        
        .qr-actions {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 20px;
        }
        
        /* Модальное окно авторизации */
        .login-modal {
            display: flex;
        }
        
        .login-content {
            background: white;
            border-radius: 15px;
            padding: 50px;
            width: 100%;
            max-width: 400px;
            text-align: center;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        }
        
        .login-icon {
            font-size: 60px;
            color: #4299e1;
            margin-bottom: 20px;
        }
        
        .login-title {
            font-size: 28px;
            color: #2d3748;
            margin-bottom: 10px;
        }
        
        .login-subtitle {
            color: #718096;
            margin-bottom: 30px;
        }
        
        .login-input {
            width: 100%;
            padding: 15px;
            margin-bottom: 20px;
            border: 2px solid #cbd5e0;
            border-radius: 8px;
            font-size: 16px;
            text-align: center;
            letter-spacing: 3px;
            font-weight: 600;
        }
        
        .login-input:focus {
            outline: none;
            border-color: #4299e1;
        }
        
        .login-btn {
            width: 100%;
            padding: 15px;
            background: #4299e1;
            color: white;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: background 0.3s;
        }
        
        .login-btn:hover {
            background: #3182ce;
        }
        
        .login-error {
            color: #f56565;
            margin-top: 10px;
            display: none;
        }
        
        /* Загрузка фото QR */
        .qr-upload-container {
            background: #f7fafc;
            padding: 20px;
            border-radius: 10px;
            border: 2px dashed #cbd5e0;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .qr-upload-container:hover {
            border-color: #4299e1;
            background: #edf2f7;
        }
        
        .qr-upload-container i {
            font-size: 48px;
            color: #718096;
            margin-bottom: 10px;
        }
        
        .qr-upload-input {
            display: none;
        }
        
        .qr-upload-info {
            color: #718096;
            font-size: 14px;
            margin-top: 10px;
        }
        
        .uploaded-qr-container {
            text-align: center;
            margin-top: 20px;
        }
        
        .uploaded-qr-preview {
            max-width: 200px;
            max-height: 200px;
            margin: 0 auto;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            padding: 10px;
            background: white;
        }
        
        /* Loading styles */
        .loading {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid #f3f3f3;
            border-top: 3px solid #4299e1;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        @media (max-width: 768px) {
            .header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .tabs {
                padding: 10px 20px;
            }
            
            .tab {
                padding: 12px 20px;
                font-size: 14px;
            }
            
            .content {
                padding: 30px 20px;
            }
            
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            .search-container {
                flex-direction: column;
            }
            
            .action-buttons {
                flex-direction: column;
            }
            
            .login-content {
                padding: 30px 20px;
            }
            
            .qr-preview {
                width: 200px;
                height: 200px;
            }
            
            .qr-actions {
                flex-direction: column;
            }
        }
        .btn-danger {
    background: #f56565;
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.btn-small.btn-success {
    background: #48bb78;
    color: white;
}

.btn-small.btn-success:hover {
    background: #38a169;
}

.btn-small.btn-danger {
    padding: 8px 12px;
    font-weight: 700;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

tr:hover .status-waiting-admin-approval {
    box-shadow: 0 0 0 2px rgba(255,193,7,0.25);
}
/* ================= ADMIN UX FIXES ================= */

/* Центрирование action-кнопок в таблицах */
.action-buttons {
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Кнопки не прилипают друг к другу */
.btn-small {
    white-space: nowrap;
}

/* Подсветка строк при обновлении (для live-поллинга) */
tr.updated {
    animation: rowFlash 1.2s ease;
}

@keyframes rowFlash {
    0% {
        background-color: rgba(66,153,225,0.15);
    }
    100% {
        background-color: transparent;
    }
}

/* Статус ожидания решения администратора */
.status-waiting-admin-approval {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Live-индикатор в шапке */
.admin-details #lastUpdate {
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-details #lastUpdate::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Safe-area для iOS */
.container {
    padding-bottom: env(safe-area-inset-bottom);
}

/* ================= MOBILE ADMIN ================= */
@media (max-width: 600px) {

    body {
        padding: 10px;
    }

    .container {
        border-radius: 14px;
    }

    .header {
        padding: 20px;
        gap: 15px;
    }

    .header-left {
        gap: 12px;
    }

    .header-text h1 {
        font-size: 20px;
    }

    .admin-info {
        width: 100%;
        justify-content: space-between;
    }

    .tabs {
        padding: 10px;
        gap: 8px;
    }

    .tab {
        padding: 10px 14px;
        font-size: 13px;
    }

    .content {
        padding: 20px 15px;
    }

    /* Таблицы — мобильный режим */
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        border-bottom: 2px solid #e2e8f0;
        padding: 10px 0;
    }

    td {
        padding: 8px 0;
        display: flex;
        justify-content: space-between;
        gap: 10px;
        font-size: 14px;
    }

    td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #718096;
    }

    .action-buttons {
        justify-content: flex-end;
        gap: 6px;
    }

    .btn-small {
        padding: 8px 10px;
        font-size: 12px;
    }

    .qr-generator {
        padding: 20px;
    }
}
/* ================= TOAST ================= */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #2d3748;
  color: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ================= NEW SESSION HIGHLIGHT ================= */
tr.new-session {
  animation: highlightRow 3s ease;
}

@keyframes highlightRow {
  0% {
    background-color: #e6fffa;
  }
  100% {
    background-color: transparent;
  }
}
