.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.admin-container h1 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #333;
}

.admin-info-card,
.users-list-card,
.payments-list-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.admin-info-card h2,
.users-list-card h2,
.payments-list-card h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 10px;
}

#adminInfo {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.info-label {
    font-weight: 500;
    color: #666;
}

.info-value {
    color: #333;
    font-weight: 600;
}

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

.user-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4a90e2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.user-item:hover {
    background: #e3f2fd;
}

.user-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.user-email {
    color: #666;
    font-size: 14px;
    margin-top: 4px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-reg-date {
    color: #999;
    font-size: 12px;
}

.no-users,
.no-payments {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

.payments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4a90e2;
    transition: background 0.2s;
}

.payment-item:hover {
    background: #e9ecef;
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.payment-user {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.payment-status {
    font-weight: 500;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,0.05);
}

.payment-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.payment-info div {
    line-height: 1.5;
}

.payment-screenshot {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

.payment-screenshot a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
}

.payment-screenshot a:hover {
    text-decoration: underline;
}

.payment-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
}

.btn-approve,
.btn-reject {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-approve {
    background: #4caf50;
    color: white;
}

.btn-approve:hover {
    background: #45a049;
}

.btn-reject {
    background: #f44336;
    color: white;
}

.btn-reject:hover {
    background: #da190b;
}

/* Главная страница админки */
.admin-main-page {
    text-align: center;
    padding: 60px 20px;
}

.admin-welcome {
    margin-top: 30px;
    font-size: 18px;
    color: #666;
}

/* Страницы админки */
.admin-page {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Пункты меню админки в сайдбаре */
.admin-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.admin-menu-item:hover {
    background: #f8f9fa;
}

.admin-menu-item.active {
    background: #4a90e2;
    color: white;
}

.admin-menu-item.active .admin-menu-link {
    color: white;
    font-weight: 600;
}

.admin-menu-link {
    display: block;
    color: #333;
    text-decoration: none;
    font-size: 15px;
}

/* Модальное окно управления доступом */
.access-control-courses {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.course-access-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.course-access-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4a90e2;
}

.course-access-title {
    font-size: 18px;
    font-weight: 600;
    color: #4a90e2;
    margin: 0;
}

.toggle-all-btn {
    padding: 6px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-all-btn:hover {
    background: #e0e0e0;
    border-color: #4a90e2;
    color: #4a90e2;
}

.modal-content-access {
    padding: 0 !important;
}

.modal-header-sticky {
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modal-header-top {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.modal-header-sticky h2 {
    margin: 0;
    font-size: 20px;
    flex: 1;
}

.modal-actions-sticky {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-toggle-all-courses {
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle-all-courses:hover {
    background: #e0e0e0;
    border-color: #4a90e2;
    color: #4a90e2;
}

#accessControlContentWrapper {
    padding: 20px 30px 30px 30px;
}

#accessControlContent {
    padding-bottom: 20px;
    position: relative;
    z-index: 1;
}

.modal-content-access .close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    z-index: 101;
    background: white;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-content-access .close:hover {
    color: #333;
    background: #f0f0f0;
}

@media (max-width: 768px) {
    .modal-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .modal-header-sticky h2 {
        font-size: 18px;
    }
    
    .modal-actions-sticky {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .btn-toggle-all-courses {
        order: -1;
        width: 100%;
        margin-bottom: 10px;
    }
    
    #accessControlContentWrapper {
        padding: 15px 20px 20px 20px;
    }
}

.lessons-access-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lesson-access-item {
    padding: 8px 0;
}

.lesson-access-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.lesson-access-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4a90e2;
}

.lesson-access-checkbox:hover {
    color: #4a90e2;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-primary,
.btn-secondary {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background: #357abd;
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

/* Страница управления доступом участника */
.user-access-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    max-height: calc(100vh - 100px);
    overflow: hidden;
}

.user-access-header-sticky {
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.user-access-header-top {
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.user-access-header-sticky h1 {
    margin: 0;
    font-size: 24px;
    flex: 1;
}

.user-access-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.user-access-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px 30px 30px;
}

@media (max-width: 768px) {
    .admin-container {
        padding: 10px;
    }
    
    .admin-info-card,
    .users-list-card,
    .payments-list-card {
        padding: 20px;
    }
    
    .payment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .modal-content {
        max-width: 95%;
        padding: 20px;
    }
    
    .access-control-courses {
        gap: 15px;
    }
    
    .course-access-section {
        padding: 12px;
    }
    
    .user-access-header-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .user-access-header-sticky h1 {
        font-size: 20px;
    }
    
    .user-access-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
    
    .btn-toggle-all-courses {
        order: -1;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .user-access-content {
        padding: 15px 20px 20px 20px;
    }
}
