/* Стили для страницы студентов */

.students-management {
    padding: 0;
}

.students-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 300px;
}

.search-container input {
    flex: 1;
    padding: 10px 40px 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.search-btn, .clear-search {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover, .clear-search:hover {
    background-color: #f5f5f5;
}

.clear-search {
    right: 40px;
    color: #999;
}

.club-filter, .group-filter {
    min-width: 150px;
}

.club-filter select, .group-filter select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
}

.students-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.students-count {
    margin-bottom: 1.5rem;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
}

.students-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.student-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    transition: box-shadow 0.2s ease;
}

.student-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.student-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.student-info {
    flex-grow: 1;
}

.student-name {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.2em;
    font-weight: 600;
}

.student-clubs {
    font-size: 0.85em;
    color: #666;
    margin-top: 0.25rem;
}

.clubs-label {
    font-weight: 500;
}

.clubs-value {
    color: #2196F3;
    font-weight: 600;
}

.student-groups {
    margin-bottom: 1rem;
    font-size: 0.9em;
    color: #666;
}

.groups-label {
    font-weight: 500;
}

.groups-value {
    color: #4CAF50;
    font-weight: 600;
}

.student-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-edit {
    background-color: #28a745;
    color: #fff;
    padding: 6px 8px;
}

.btn-edit:hover {
    background-color: #218838;
}

.btn-view {
    background-color: #17a2b8;
    color: #fff;
    padding: 6px 8px;
}

.btn-view:hover {
    background-color: #138496;
}

.btn-details {
    background-color: #ffc107;
    color: #212529;
    font-size: 12px;
    padding: 4px 8px;
}

.btn-details:hover {
    background-color: #e0a800;
}

.student-courses {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 1rem 0;
    font-size: 1em;
    color: #555;
}

.btn-toggle-courses {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.btn-toggle-courses:hover {
    background-color: #f5f5f5;
}

.btn-toggle-courses .icon-collapse {
    display: none;
}

.btn-toggle-courses.expanded .icon-expand {
    display: none;
}

.btn-toggle-courses.expanded .icon-collapse {
    display: block;
}

.courses-list {
    display: none;
    flex-direction: column;
    gap: 1rem;
}

.courses-list.expanded {
    display: flex;
}

.course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    gap: 1rem;
}

.course-info {
    flex: 1;
}

.course-title {
    margin: 0 0 0.25rem 0;
    font-size: 0.95em;
    color: #333;
}

.course-author {
    font-size: 0.8em;
    color: #666;
}

.course-progress {
    flex: 1;
    max-width: 200px;
}

.progress-info {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 0.85em;
    color: #555;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
}

.course-actions {
    flex-shrink: 0;
}

.no-courses {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 1rem;
}

.no-students {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-students svg {
    margin-bottom: 1rem;
    color: #ccc;
}

.no-students p {
    margin-bottom: 1rem;
    font-size: 1.1em;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.pagination-btn.active {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: #999;
}

/* Адаптивность */
@media (max-width: 768px) {
    .students-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container {
        min-width: auto;
    }

    .club-filter, .group-filter {
        min-width: auto;
    }

    .student-header {
        flex-direction: column;
        gap: 1rem;
    }

    .course-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .course-progress {
        max-width: none;
    }

    .pagination {
        flex-wrap: wrap;
    }
}
