﻿        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
        body { padding: 20px; overflow-x: hidden; }
        .container { max-width: 1400px; margin: 0 auto; }
        .header {
            background: white; padding: 30px; border-radius: 15px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1); margin-bottom: 30px;
            display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px;
        }
        h1 { color: #333; font-size: 24px; }
        .btn {
            padding: 10px 20px;
            font-size: 14px;
            font-weight: 600;
            text-decoration: none;
            display: inline-flex;
            justify-content: center;
            gap: 6px;
        }
        .btn.logout { background: #e53e3e; }
        .btn.delete { background: #dc3545; padding: 6px 12px; font-size: 13px; }
        .btn.delete:hover { background: #c82333; }
        #excelBtn {
            background: #264e70;
            color: #fff;
            border-color: #264e70;
            box-shadow: 0 2px 6px rgba(38, 78, 112, 0.24);
        }
        #excelBtn:hover {
            background: #1f425f;
        }
        .btn.home-btn {
            background: #2f6f55;
            color: #fff;
            border-color: #2f6f55;
            box-shadow: 0 2px 6px rgba(47, 111, 85, 0.24);
        }
        .btn.home-btn:hover { background: #255943; }
        .btn.draw-btn {
            background: #c6492c;
            color: #fff;
            border-color: #c6492c;
            box-shadow: 0 2px 6px rgba(198, 73, 44, 0.26);
        }
        .btn.draw-btn:hover { background: #a53c22; }
        .btn.archive-btn { background: #b45309; }
        .btn.archive-btn:hover { background: #92400e; }
        .btn.archive-view-btn { background: #0f766e; }
        .btn.archive-view-btn:hover { background: #115e59; }
        .btn.groups-btn { background: #0f766e; }
        .btn.groups-btn:hover { background: #115e59; }

        .stats {
            display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px; margin-bottom: 30px;
        }
        .stat-card {
            background: white; padding: 25px; border-radius: 15px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.08); text-align: center;
        }
        .stat-card h3 { color: #666; font-size: 16px; margin-bottom: 10px; }
        .stat-card .number { color: #667eea; font-size: 36px; font-weight: bold; }

        /* Стили для графиков */
        .charts-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }
        .chart-card {
            background: white;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.08);
        }
        .chart-card h3 {
            color: #333;
            font-size: 18px;
            margin-bottom: 15px;
            text-align: center;
        }
        .chart-card canvas {
            width: 100% !important;
            height: auto !important;
            max-height: 250px;
        }

        .table-container {
            background: white; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);
            overflow-x: auto; padding: 20px;
        }
        table { width: 100%; border-collapse: collapse; min-width: 1240px; }
        th {
            background: #667eea; color: white; padding: 10px 6px; font-weight: 600; font-size: 12px;
            text-align: left; position: sticky; top: 0;
            cursor: pointer;
            user-select: none;
        }
        th:hover {
            background: #5a6fd8;
        }
        th .sort-icon {
            margin-left: 5px;
            font-size: 12px;
            display: inline-block;
        }
        td { padding: 8px 6px; border-bottom: 1px solid #e0e0e0; color: #333; font-size: 13px; }
        tr:hover { background: #f8f9fa; }
        .action-cell { white-space: nowrap; }
        .timestamp { color: #666; font-size: 13px; white-space: nowrap; }

        /* Обновлённые ширины колонок с учётом нового столбца "Оплачено" */
        th:nth-child(1) { width: 30px; } /* чекбокс */
        th:nth-child(2) { width: 40px; } /* № */
        th:nth-child(3) { width: 140px; } /* Участник */
        th:nth-child(4) { width: 70px; } /* Вес */
        th:nth-child(5) { width: 70px; } /* Год */
        th:nth-child(6) { width: 90px; } /* Уровень */
        th:nth-child(7) { width: 80px; } /* Пояски */
        th:nth-child(8) { width: 80px; } /* Оплачено (новый) */
        th:nth-child(9) { width: 130px; } /* Клуб */
        th:nth-child(10) { width: 130px; } /* Сопровождающие */
        th:nth-child(11) { width: 130px; } /* Тренер */
        th:nth-child(12) { width: 130px; } /* Контакты тренера */
        th:nth-child(13) { width: 130px; } /* Время */
        th:nth-child(14) { width: 70px; } /* Действия */

        .editable-input {
            width: 100%;
            padding: 4px;
            border: 1px solid #ccc;
            border-radius: 4px;
            font-size: 13px;
            box-sizing: border-box;
        }
        .editable-input:focus { 
            outline: none; 
            border-color: #667eea;
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        }
        
        .club-input {
            width: 100%;
        }
        
        .weight-input, .year-input {
            width: 60px;
        }

        .level-select, .belts-select {
            width: 100%;
            padding: 4px;
            border: 1px solid #ddd;
            border-radius: 4px;
            background: white;
            cursor: pointer;
            font-size: 13px;
        }
        .level-select:hover, .belts-select:hover { border-color: #667eea; }
        .level-select:focus, .belts-select:focus { 
            outline: none; 
            border-color: #667eea;
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        }

        .users-section {
            background: white; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.1);
            padding: 20px; margin-top: 30px;
        }
        .users-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
        .user-row {
            display: flex; align-items: center; padding: 10px; border-bottom: 1px solid #eee; gap: 15px;
        }
        .user-row:hover { background: #f8f9fa; }
        .user-clubs { display: flex; gap: 5px; flex-wrap: wrap; }
        .club-tag { background: #e9ecef; padding: 2px 8px; border-radius: 12px; font-size: 12px; }

        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        .modal-content {
            display: block;
            background: white;
            padding: 30px;
            border-radius: 15px;
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            z-index: 1001;
        }
        .modal-content h3 { margin-bottom: 20px; }
        .modal-content .form-group { margin-bottom: 15px; }
        .modal-content label { display: block; margin-bottom: 5px; font-weight: 500; }
        .modal-content input, .modal-content select, .modal-content textarea { 
            width: 100%; 
            padding: 10px; 
            border: 1px solid #ddd; 
            border-radius: 5px;
            font-family: inherit;
        }
        .modal-content textarea {
            min-height: 80px;
            resize: vertical;
        }

        .clubs-container { max-height: 200px; overflow-y: auto; border: 1px solid #ddd; border-radius: 5px; padding: 10px; margin-top: 5px; }
        .club-checkbox-item { display: flex; align-items: center; padding: 5px 0; }
        .club-checkbox-item input[type="checkbox"] { width: auto; margin-right: 10px; }

        .modal-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

        .login-form {
            max-width: 400px; margin: 100px auto; background: white; padding: 40px;
            border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
        }
        .login-form h2 { margin-bottom: 30px; text-align: center; }
        .form-group { margin-bottom: 20px; }
        .form-group input { width: 100%; padding: 15px; border: 2px solid #e0e0e0; border-radius: 10px; font-size: 16px; }
        .form-group input:focus { outline: none; border-color: #667eea; }
        .remember-me { display: flex; align-items: center; margin-bottom: 20px; }
        .remember-me input { width: auto; margin-right: 10px; }

        .required-star { color: #e53e3e; margin-left: 3px; }
        #addApplicationModal .form-group small { display: block; color: #999; margin-top: 5px; }
        .bulk-delete-btn { background: #e53e3e; margin-left: 10px; }
        
        .save-indicator {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: #28a745;
            color: white;
            padding: 10px 20px;
            border-radius: 5px;
            display: none;
            animation: fadeInOut 2s ease;
        }
        
        @keyframes fadeInOut {
            0% { opacity: 0; transform: translateY(20px); }
            10% { opacity: 1; transform: translateY(0); }
            90% { opacity: 1; transform: translateY(0); }
            100% { opacity: 0; transform: translateY(-20px); }
        }

        .archive-table {
            width: 100%;
            border-collapse: collapse;
            min-width: 820px;
            border-radius: 12px;
            overflow: hidden;
        }
        .archive-table th, .archive-table td {
            border-bottom: 1px solid var(--line-soft);
            padding: 10px 8px;
            text-align: left;
        }
        .archive-table th {
            background: #efe4d5;
            color: #3f2f1f;
            font-weight: 600;
            position: static;
            font-size: 12px;
        }
        .archive-table td strong {
            color: var(--indigo);
        }
        .archive-table tr:hover {
            background: #f7f1e8;
        }
        .archive-detail-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 10px;
            margin: 12px 0 16px;
        }
        .archive-detail-card {
            background: #fffdf9;
            border: 1px solid var(--line-soft);
            border-radius: 10px;
            padding: 12px;
        }
        .archive-detail-card h4 {
            margin-bottom: 4px;
            font-size: 13px;
            color: var(--muted);
        }
        .archive-detail-card p {
            margin: 0;
            font-weight: 700;
            color: var(--indigo);
        }

        .archive-head {
            display:flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
            padding: 10px 12px;
            border: 1px solid var(--line-soft);
            border-radius: 10px;
            background: linear-gradient(135deg, #fffdf9 0%, #f3ede4 100%);
        }

        #archiveSearchInput {
            background: #fffdf9;
            border: 1px solid var(--line);
            border-radius: 10px;
            padding: 10px 12px;
            font-size: 14px;
        }

        #archiveSearchInput:focus {
            outline: none;
            border-color: var(--terracotta);
            box-shadow: 0 0 0 2px rgba(198, 73, 44, 0.12);
        }

        .archive-actions {
            display:flex;
            gap:6px;
            flex-wrap:wrap;
        }

        /* Медиа-запросы для мобильных */
        @media (max-width: 768px) {
            body { padding: 10px; }
            .header { padding: 15px; }
            .header h1 { font-size: 22px; }
            .btn { padding: 8px 12px; font-size: 13px; }
            .stat-card { padding: 15px; }
            .stat-card .number { font-size: 28px; }
            .chart-card { padding: 10px; }
            .table-container { padding: 10px; }
            th, td { padding: 8px 5px; font-size: 12px; }
            .editable-input, .level-select, .belts-select { padding: 2px; font-size: 12px; }
            .row-checkbox { width: 20px; height: 20px; }
            #selectAllCheckbox { width: 20px; height: 20px; }
        }

        @media (max-width: 480px) {
            .header { flex-direction: column; align-items: stretch; }
            .header div { justify-content: center; }
            .stats { grid-template-columns: 1fr 1fr; }
            .charts-row { grid-template-columns: 1fr; }
            th, td { padding: 5px 3px; font-size: 11px; }
            .btn { padding: 8px 10px; font-size: 12px; }
        }

    

