/* Общие стили */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: #f4f7f6;
    color: #333;
}

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

/* Навигационная панель */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5em;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.navbar-menu a {
    color: #3498db;
    text-decoration: none;
    margin-left: 20px;
}

.navbar-menu a:hover {
    text-decoration: underline;
}

/* Формы */
.form-wrapper {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

form p {
    margin-bottom: 15px;
}

form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

form input[type="text"],
form input[type="password"],
form input[type="date"],
form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Важно для правильной ширины */
}

form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Кнопки */
button {
    background-color: #3498db;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
}

button:hover {
    background-color: #2980b9;
}

/* Сообщения */
#message-container {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

/* Стилизация формы выхода */
.logout-form {
    display: inline; /* Чтобы форма не переносилась на новую строку */
    margin: 0;
    padding: 0;
}

/* Стилизация кнопки выхода, чтобы она выглядела как ссылка */
.logout-button {
    background: none;
    border: none;
    padding: 0;
    color: #3498db; /* Тот же цвет, что и у ссылок в меню */
    font-family: inherit; /* Наследуем шрифт */
    font-size: inherit; /* Наследуем размер шрифта */
    cursor: pointer;
    text-decoration: none; /* Убираем стандартное подчеркивание кнопки */
}

.logout-button:hover {
    text-decoration: underline; /* Добавляем подчеркивание при наведении, как у ссылок */
}

/* bilimClassApp/static/bilimClassApp/css/style.css */
/* ... (здесь ваш существующий CSS-код) ... */


/* --- СТИЛИ ДЛЯ НОВОЙ СТРАНИЦЫ ВХОДА --- */

.login-page-body {
    background: linear-gradient(120deg, #f0f4f9, #e6ebf5);
    display: flex; justify-content: center; align-items: center; min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0;
}
.login-container {
    display: flex; max-width: 1100px; width: 100%; background-color: #fff; border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); overflow: hidden;
}
.login-left-panel, .login-right-panel { padding: 50px; flex-basis: 50%; }
.login-left-panel { background-color: #f8faff; }
.login-logo { display: flex; align-items: center; gap: 15px; margin-bottom: 40px; }
.login-logo h1 { margin: 0; font-size: 28px; color: #1a202c; }
.login-logo p { margin: 0; color: #6a737d; }
.logo-icon-wrapper {
    background-color: #4a5aef; color: #fff; font-size: 24px; width: 50px; height: 50px;
    display: flex; justify-content: center; align-items: center; border-radius: 12px;
}
.demo-accounts-card {
    background-color: #fff; border: 1px solid #e2e8f0; padding: 20px; border-radius: 12px; margin-bottom: 40px;
}
.demo-accounts-card h3 { margin-top: 0; margin-bottom: 20px; font-size: 16px; color: #4a5568; }
.account-item { padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 10px; }
.account-item span { font-weight: 600; color: #2d3748; }
.account-item p { margin: 5px 0 0; color: #718096; font-size: 14px; }
.features-list { list-style: none; padding: 0; margin: 0; }
.features-list li { margin-bottom: 15px; color: #4a5568; display: flex; align-items: center; }
.features-list .fa-check-circle { color: #4a5aef; margin-right: 10px; }
.login-right-panel { display: flex; justify-content: center; align-items: center; }
.login-form-wrapper { width: 100%; max-width: 350px; }
.login-form-wrapper h2 { font-size: 24px; color: #1a202c; margin-bottom: 5px; }
.login-form-wrapper .subtitle { color: #718096; margin-bottom: 30px; }
.input-group { position: relative; margin-bottom: 20px; }
.input-group label { font-size: 14px; color: #4a5568; font-weight: 600; margin-bottom: 8px; display: block; }

/* Этот селектор стилизует поля, которые рендерит Django */
.input-group input[type="text"], .input-group input[type="password"] {
    width: 100%; padding: 12px 12px 12px 40px; border: 1px solid #e2e8f0; border-radius: 8px;
    background-color: #f7fafc; font-size: 16px; box-sizing: border-box;
}
.input-group input:focus { outline: none; border-color: #4a5aef; box-shadow: 0 0 0 3px rgba(74, 90, 239, 0.2); }
.input-icon { position: absolute; left: 15px; top: 42px; color: #a0aec0; }

.login-btn {
    width: 100%; padding: 14px; border: none; border-radius: 8px; background-color: #1a202c;
    color: #fff; font-size: 16px; font-weight: bold; cursor: pointer; margin-top: 10px;
}
.login-btn:hover { background-color: #2d3748; }
.forgot-password { display: block; text-align: center; margin-top: 20px; font-size: 14px; color: #4a5aef; text-decoration: none; }
.error-message {
    color: #e53e3e; background-color: #fed7d7; padding: 10px; border-radius: 8px; margin-bottom: 20px; text-align: center;
}

/* bilimClassApp/static/bilimClassApp/css/style.css */

/* --- ПЕРЕМЕННЫЕ И ОБНУЛЕНИЕ --- */
:root {
    --primary-color: #4A5AEF;
    --text-color: #1a202c;
    --text-light: #718096;
    --bg-color: #F7F8FC;
    --bg-light: #F0F4F9;
    --white: #FFFFFF;
    --border-color: #E2E8F0;
    --radius: 12px;
}

/* Удаляем старые стили для body, если они остались */
body { margin: 0; padding: 0; }

/* --- ОСНОВНЫЕ СТИЛИ ДЛЯ ДАШБОРДА --- */
.dashboard-body {
    background-color: var(--bg-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-color);
}
.dashboard-container { max-width: 1200px; margin: 0 auto; padding: 20px 30px; }

/* --- ХЕДЕР --- */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; }
.header-logo { display: flex; align-items: center; gap: 15px; }
.logo-icon-wrapper-dash {
    background-color: var(--primary-color); color: var(--white); font-size: 24px;
    width: 45px; height: 45px; display: flex; justify-content: center; align-items: center; border-radius: var(--radius);
}
.header-logo h2 { margin: 0; font-size: 22px; }
.header-logo span { margin: 0; color: var(--text-light); font-size: 14px; }
.header-user-profile { display: flex; align-items: center; gap: 20px; }
.header-user-profile .fa-bell { font-size: 20px; color: var(--text-light); cursor: pointer; }
.user-avatar {
    width: 40px; height: 40px; border-radius: 50%; background-color: var(--bg-light); color: var(--primary-color);
    display: flex; justify-content: center; align-items: center; font-weight: bold;
}
.user-info p { margin: 0; font-weight: 600; }
.user-info a { text-decoration: none; color: var(--text-light); font-size: 14px; }

/* --- ОСНОВНОЙ КОНТЕНТ --- */
.welcome-section h1 { font-size: 28px; margin-bottom: 5px; }
.welcome-section p { color: var(--text-light); margin-top: 0; }
.main-tabs ul, .day-tabs ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 10px; }
.main-tabs { margin: 30px 0; border-bottom: 1px solid var(--border-color); }
.main-tabs a, .day-tabs li {
    padding: 10px 20px; text-decoration: none; color: var(--text-light); font-weight: 500;
    border-radius: 8px 8px 0 0; border-bottom: 3px solid transparent;
}
.day-tabs li { cursor: pointer; border-radius: var(--radius); transition: all 0.2s ease-in-out; }
.main-tabs .active a { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.day-tabs .active { background-color: var(--primary-color); color: var(--white); }

/* --- СЕКЦИЯ РАСПИСАНИЯ --- */
.schedule-section {
    background-color: var(--white); border-radius: var(--radius); padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.schedule-section h3 { margin: 0; }
.schedule-section p { margin: 5px 0 25px; color: var(--text-light); }
.day-tabs { margin-bottom: 25px; padding: 6px; background-color: var(--bg-light); border-radius: var(--radius); display: inline-flex; }

/* Логика показа контента табов */
.day-schedule { display: none; }
.day-schedule.active { display: block; }
.no-lessons { color: var(--text-light); text-align: center; padding: 40px 0; }

/* Карточка урока */
.lesson-card {
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid var(--border-color); border-radius: var(--radius); padding: 20px; margin-bottom: 15px;
}
.lesson-info { display: flex; align-items: center; gap: 20px; }
.lesson-number {
    width: 40px; height: 40px; background-color: var(--bg-light); color: var(--primary-color);
    display: flex; justify-content: center; align-items: center; border-radius: 50%; font-weight: bold; flex-shrink: 0;
}
.lesson-title { margin: 0 0 8px; font-weight: 600; font-size: 16px; }
.lesson-details { display: flex; gap: 15px; color: var(--text-light); font-size: 14px; }
.lesson-details i { margin-right: 5px; }
.lesson-start-time { font-weight: 600; color: var(--text-color); font-size: 14px; }

/* --- СТИЛИ ДЛЯ ДНЕВНИКА --- */

/* Логика показа/скрытия вкладок */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Сетка для карточек статистики */
.stats-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.stat-icon {
    width: 45px; height: 45px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 20px;
    flex-shrink: 0;
}
.stat-icon.green { background-color: #e7f6f0; color: #16a34a; }
.stat-icon.blue { background-color: #eef2ff; color: #4338ca; }
.stat-icon.purple { background-color: #f3e8ff; color: #86198f; }

.stat-info p { margin: 0; color: var(--text-light); font-size: 14px; }
.stat-info span { font-size: 28px; font-weight: bold; }
.stat-card small { margin-left: auto; color: var(--text-light); align-self: flex-end; }

/* Успеваемость по предметам */
.performance-section, .recent-grades-section {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    margin-bottom: 30px;
}
.performance-section h3, .recent-grades-section h3 { margin: 0; }
.performance-section p, .recent-grades-section p { margin: 5px 0 25px; color: var(--text-light); }

.subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}
.subject-item:last-child { border-bottom: none; }
.subject-info p { margin: 0; font-weight: 500; }
.subject-info small { color: var(--text-light); }
.subject-avg-grade { font-size: 18px; font-weight: bold; }

/* Последние оценки */
.recent-grades-table { width: 100%; border-collapse: collapse; }
.recent-grades-table th {
    text-align: left;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 500;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}
.recent-grades-table td { padding: 15px 0; border-bottom: 1px solid var(--border-color); }
.recent-grades-table tbody tr:last-child td { border-bottom: none; }
.recent-grades-table td .fa-calendar-alt { margin-right: 8px; color: var(--text-light); }

.grade-type-badge {
    background-color: #f1f5f9;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}
.grade-badge {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: inline-flex; justify-content: center; align-items: center;
    font-weight: bold;
    color: #4b5563; /* Средний балл */
    background-color: #f3f4f6;
}
.grade-badge.excellent { color: #15803d; background-color: #dcfce7; }
.grade-badge.poor { color: #b91c1c; background-color: #fee2e2; }
.stat-icon.red { background-color: #fee2e2; color: #b91c1c; }

.stat-info .percent-sign {
    font-size: 20px;
    font-weight: normal;
    color: var(--text-light);
    margin-left: 2px;
}

/* Убедитесь, что ваши стили для списка предметов выглядят так, и добавьте новые строки */

.subject-item {
    /* Эти стили у вас уже должны быть */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    
    /* --- ДОБАВЬТЕ ЭТО, ЧТОБЫ СДЕЛАТЬ ЕГО ИНТЕРАКТИВНЫМ --- */
    text-decoration: none;      /* Убираем подчеркивание у ссылки */
    color: inherit;             /* Наследуем цвет текста */
    cursor: pointer;            /* Показываем курсор "рука" при наведении */
    transition: background-color 0.2s ease-in-out; /* Плавный переход фона */
    margin: 0 -30px;            /* Растягиваем элемент на всю ширину блока (как было) */
    padding: 15px 30px;         /* Возвращаем внутренние отступы */
}

.subject-item:hover {
    background-color: #f8faff; /* Слегка подсвечиваем при наведении */
}

.subject-item:last-child { 
    border-bottom: none; 
}

.subject-info p { 
    margin: 0; 
    font-weight: 500; 
}
.subject-info small { 
    color: var(--text-light); 
}

/* ЗАМЕНИТЕ СТИЛЬ ДЛЯ СРЕДНЕГО БАЛЛА НА ЭТОТ, ЧТОБЫ ОН БЫЛ ЖИРНЫМ */
.subject-avg-grade {
    font-size: 20px;
    font-weight: 700; /* Жирный шрифт */
    color: var(--text-color);
}

/* --- СТИЛИ ДЛЯ МОДАЛЬНОГО ОКНА --- */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 41, 59, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 300;
    color: var(--text-light);
    cursor: pointer;
    padding: 0 10px;
    width: 10%;
}

/* Используем стили из основной таблицы, они подойдут */
.modal-body .recent-grades-table {
    margin-top: 10px;
}

/* bilimClassApp/static/bilimClassApp/css/style.css */
/* ... добавьте в конец ... */

/* --- Стили для дашборда учителя --- */
/* .controls-panel { display: flex; gap: 15px; margin-bottom: 25px; align-items: center; }
.form-control { padding: 8px 12px; border: 1px solid #ccc; border-radius: 6px; }
.btn { background-color: #3498db; color: white; border: none; padding: 10px 15px; border-radius: 6px; cursor: pointer; }
.journal-grid-wrapper { overflow-x: auto; }
.journal-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.journal-table th, .journal-table td { border: 1px solid #ddd; padding: 8px; text-align: left; }
.journal-table th { background-color: #f2f2f2; text-align: center; }
.journal-table .student-name { font-weight: bold; }
.journal-cell { text-align: center; }
.journal-cell input, .journal-cell select { width: 80px; text-align: center; border-radius: 4px; border: 1px solid #ccc; }
.journal-cell input[type="text"] { width: 120px; }
.journal-cell select { width: auto; }
.cell-saved { background-color: #d4edda !important; transition: background-color 0.2s; } */

/* bilimClassApp/static/bilimClassApp/css/style.css */

/* --- ПЕРЕМЕННЫЕ И ОБНУЛЕНИЕ --- */
:root {
    --td-primary: #4F46E5;
    --td-bg: #F8FAFC;
    --td-white: #FFFFFF;
    --td-border: #E2E8F0;
    --td-text-dark: #1E293B;
    --td-text-light: #64748B;
    --td-blue: #3B82F6;
    --td-orange: #F97316;
    --td-purple: #8B5CF6;
    --td-red: #EF4444;
    --td-radius-md: 8px;
    --td-radius-lg: 16px;
    --td-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

*, *::before, *::after { box-sizing: border-box; }
.td-body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--td-bg);
    color: var(--td-text-dark);
}

/* --- ОСНОВНАЯ СТРУКТУРА --- */
.td-container { max-width: 1400px; margin: 0 auto; padding: 20px 30px; }

/* --- ХЕДЕР --- */
.td-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.td-logo-section { display: flex; align-items: center; gap: 16px; }
.td-logo-icon {
    background-color: var(--td-primary); color: var(--td-white); font-size: 24px;
    width: 48px; height: 48px; display: flex; justify-content: center; align-items: center;
    border-radius: var(--td-radius-md);
}
.td-logo-section h1 { margin: 0; font-size: 20px; }
.td-logo-section p { margin: 0; font-size: 14px; color: var(--td-text-light); }
.td-user-section { display: flex; align-items: center; text-align: right; gap: 16px; }
.td-user-info h3 { margin: 0; font-size: 16px; font-weight: 600; }
.td-user-info p { margin: 0; font-size: 14px; color: var(--td-text-light); }
.td-user-avatar {
    width: 48px; height: 48px; border-radius: 50%; background-color: #FECDD3; color: #BE123C;
    display: flex; justify-content: center; align-items: center; font-weight: bold;
}

/* --- СЕТКА ДЛЯ КОНТЕНТА --- */
.td-main-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 25px; }

/* --- УНИВЕРСАЛЬНАЯ КАРТОЧКА --- */
.td-card {
    background-color: var(--td-white);
    border-radius: var(--td-radius-lg);
    padding: 24px;
    box-shadow: var(--td-shadow);
    margin-bottom: 25px;
}
.td-card:last-child { margin-bottom: 0; }
.td-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.td-card-header i { color: var(--td-text-light); }
.td-card-header h3 { margin: 0; font-size: 18px; font-weight: 600; }
.td-card-subtitle { margin: 0 0 20px; color: var(--td-text-light); }

/* --- ЛЕВАЯ КОЛОНКА --- */
.td-main-nav ul { display: flex; list-style: none; padding: 6px; margin: 0 0 25px; background-color: var(--td-white); border-radius: var(--td-radius-lg); box-shadow: var(--td-shadow); }
.td-main-nav a {
    display: flex; align-items: center; gap: 8px; padding: 10px 16px; text-decoration: none;
    color: var(--td-text-light); font-weight: 500; border-radius: var(--td-radius-md); transition: all 0.2s;
}
.td-main-nav .active a { background-color: var(--td-primary); color: var(--td-white); }
.td-main-nav a:not(.active):hover { color: var(--td-text-dark); }

.td-stats-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 25px; }
.td-stat-card {
    background-color: var(--td-white); padding: 20px; border-radius: var(--td-radius-lg); box-shadow: var(--td-shadow);
}
.td-stat-card i { font-size: 20px; margin-bottom: 12px; }
.td-stat-card h2 { margin: 0; font-size: 32px; }
.td-stat-card p { margin: 4px 0 0; color: var(--td-text-light); }
.td-stat-card.blue { color: var(--td-blue); }
.td-stat-card.orange { color: var(--td-orange); }
.td-stat-card.purple { color: var(--td-purple); }
.td-stat-card.red { color: var(--td-red); }

.td-lesson-item {
    display: flex; align-items: center; gap: 20px; padding: 12px;
    border-bottom: 1px solid var(--td-border);
}
.td-lesson-item:last-child { border-bottom: none; }
.td-lesson-item.current { background-color: #EFF6FF; border-radius: var(--td-radius-md); }

.td-lesson-time { text-align: right; width: 60px; }
.td-lesson-time p { margin: 0; font-weight: 600; }
.td-lesson-time span { color: var(--td-text-light); font-size: 14px; }
.td-lesson-info { flex-grow: 1; }
.td-lesson-info h4 { margin: 0 0 4px; font-size: 16px; }
.td-lesson-info p { margin: 0; color: var(--td-text-light); font-size: 14px; }
.td-lesson-status {
    padding: 4px 12px; font-size: 12px; font-weight: 500; border-radius: 999px;
    background-color: #F1F5F9; color: var(--td-text-light);
}
.td-lesson-status.current-badge { background-color: var(--td-blue); color: var(--td-white); }
.td-empty-message { text-align: center; color: var(--td-text-light); padding: 20px; }


/* --- ПРАВАЯ КОЛОНКА --- */
.td-task-item, .td-plan-item { padding: 12px 0; border-bottom: 1px solid var(--td-border); }
.td-task-item:last-child, .td-plan-item:last-child { border-bottom: none; }
.td-task-item p, .td-plan-item p { margin: 0 0 6px; font-weight: 500; }
.td-task-meta, .td-plan-item small { color: var(--td-text-light); font-size: 14px; }
.td-task-badge {
    padding: 3px 8px; font-size: 12px; font-weight: 500; border-radius: 999px; margin-right: 8px;
    color: var(--td-text-light); background-color: #F1F5F9;
}
.td-task-badge.urgent { color: var(--td-red); background-color: #FEE2E2; }

.td-plan-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.td-plan-item small { flex-basis: 100%; order: 1; }
.td-plan-status {
    width: 28px; height: 28px; display: flex; justify-content: center; align-items: center;
    border-radius: 50%; color: var(--td-white);
}
.td-plan-status.approved { background-color: #22C55E; }
.td-plan-status.pending { background-color: #A1A1AA; }
.td-plan-status.rejected { background-color: var(--td-red); }

/* bilimClassApp/static/bilimClassApp/css/style.css */

/* --- СТИЛИ ДЛЯ СТРАНИЦЫ ЖУРНАЛА --- */
.journal-section { overflow: hidden; }
.journal-section .td-empty-message { padding: 40px; text-align: center; }
.journal-controls { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.journal-header { display: flex; align-items: center; gap: 16px; }
.journal-header i { font-size: 24px; color: var(--td-primary); }
.journal-header h3 { margin: 0; }
.journal-header p { margin: 4px 0 0; color: var(--td-text-light); }
.td-form-select {
    padding: 8px 12px; border: 1px solid var(--td-border); border-radius: var(--td-radius-md);
    background-color: #fff; min-width: 200px;
}
.journal-view-tabs { display: flex; gap: 4px; padding: 4px; background-color: var(--td-bg); border-radius: var(--td-radius-md); margin-bottom: 25px; display: inline-flex; }
.journal-tab-btn {
    background: none; border: none; padding: 6px 16px; font-weight: 500;
    color: var(--td-text-light); border-radius: 6px; cursor: pointer; transition: all 0.2s;
}
.journal-tab-btn.active { background-color: var(--td-white); color: var(--td-primary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.journal-grid-container { overflow-x: auto; }
.journal-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; min-width: 900px; }
.journal-table th, .journal-table td { padding: 12px; text-align: left; vertical-align: middle; }
.journal-table th { color: var(--td-text-light); font-size: 14px; text-align: center; font-weight: 500; padding-bottom: 0; }
.journal-table td:first-child { font-weight: 600; text-align: left; }
.journal-table td b { font-weight: 700; }

.journal-grade-cell, .journal-attendance-cell {
    display: block; /* Важно для работы с margin */
    width: 60px;
    height: 40px;
    line-height: 40px;
    text-align: center; 
    font-weight: 600; 
    border-radius: var(--td-radius-md);
    margin: 0 auto;
}
.journal-grade-cell { background-color: #F3F4F6; }
.journal-grade-cell.good { background-color: #DCFCE7; color: #15803D; }
.journal-grade-cell.medium { background-color: #FEF9C3; color: #B45309; }
.journal-grade-cell.bad { background-color: #FEE2E2; color: #B91C1C; }

.journal-attendance-cell { background-color: #DCFCE7; color: #15803D; }
.journal-attendance-cell.absent { background-color: #FEE2E2; color: #B91C1C; }
.journal-attendance-cell i { font-size: 16px; }