/* Основные стили для всех страниц LMS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
}

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

/* Шапка */
.header {
    background: #2563eb;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner, .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.logo-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Контейнер входа */
.login-container {
    max-width: 400px;
    margin: 80px auto;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 24px;
}

.role-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 8px;
}

.role-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s;
}

.role-btn.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

/* Формы */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Список учеников для учителя */
.student-select {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.student-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 5px;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.student-option:hover {
    background: #f1f2f6;
}

.student-option.selected {
    background: #2563eb;
    color: white;
}

.student-option input[type="radio"] {
    margin: 0;
}

.student-option label {
    margin: 0;
    cursor: pointer;
}

.student-option label small {
    font-size: 12px;
    opacity: 0.8;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

/* Карточки */
.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 25px;
}

.card h2 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 3px solid #2563eb;
    padding-bottom: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Задания ученика */
.assignments-list {
    display: grid;
    gap: 20px;
}

.assignment-item {
    border-left: 4px solid #2563eb;
    padding: 20px;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
}

.assignment-item.completed {
    border-left-color: #27ae60;
    background: #f0fff4;
}

.assignment-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 18px;
}

.assignment-meta {
    display: flex;
    gap: 15px;
    color: #666;
    margin-bottom: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.assignment-subject {
    background: #2563eb;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.assignment-date {
    font-size: 14px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.completed {
    background: #d1f7c4;
    color: #27ae60;
}

.status-badge.pending {
    background: #ffeaa7;
    color: #d35400;
}

.assignment-description {
    margin: 10px 0;
    color: #555;
    line-height: 1.5;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 12px;
    font-size: 14px;
    transition: background 0.3s;
}

.file-link:hover {
    background: #1d4ed8;
}

.complete-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 12px;
    font-size: 14px;
    transition: background 0.3s;
}

.complete-btn:hover {
    background: #219653;
}

/* Результаты тестов */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.result-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e6ed;
    transition: transform 0.3s, box-shadow 0.3s;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-score {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 5px;
}

.secondary-score {
    font-size: 18px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.result-subject {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.result-name {
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.result-date {
    font-size: 11px;
    color: #95a5a6;
}

/* Вкладки учителя */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 12px 25px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.tab-btn:hover {
    background: #f1f2f6;
}

.tab-btn.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Сообщения */
.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    display: none;
}

.message.success {
    background: #d1f7c4;
    color: #27ae60;
    border: 1px solid #a3e9a3;
}

.message.error {
    background: #ffeaea;
    color: #e74c3c;
    border: 1px solid #ffcccc;
}

.error-message {
    color: #e74c3c;
    margin-top: 15px;
    padding: 10px;
    background: #ffeaea;
    border-radius: 6px;
    display: none;
    font-size: 14px;
}

.info-box {
    margin-top: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.info-box strong {
    color: #2c3e50;
}

/* Пустые состояния */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Анимации */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .login-container {
        margin: 40px auto;
        padding: 30px 20px;
    }
    
    .logo-name {
        font-size: 18px;
    }
    
    .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .tab-btn {
        min-width: 100%;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .assignment-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .tabs {
        flex-direction: column;
    }
}

/* ... остальные стили остаются без изменений ... */

/* Стили для выбора всех учеников */
.student-option.select-all {
    background: #e6f7ff;
    border: 2px solid #91d5ff;
    margin-bottom: 15px;
}

.student-option.select-all:hover {
    background: #d1eaff;
}

.student-option.select-all.selected {
    background: #1890ff;
    color: white;
}

.student-option.select-all label {
    font-size: 14px;
    color: #1890ff;
}

.student-option.select-all.selected label {
    color: white;
}

/* Класс заголовок */
.class-header {
    font-weight: bold;
    color: #2563eb;
    margin: 0 0 15px 0;
    padding: 10px;
    background: #f0f7ff;
    border-radius: 5px;
    text-align: center;
}