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

body {
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
    background-color: #f1f5f9;
    color: #0f172a;
}

/* Страница входа */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 32px;
    padding: 2rem;
    box-shadow: 0 20px 35px rgba(0,0,0,0.2);
}

.logo-large {
    font-size: 2rem;
    font-weight: bold;
    color: #2563eb;
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}

.auth-tab.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.input-group {
    margin: 1rem 0;
}

.input-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    color: #334155;
}

.input-group input, .input-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    font-size: 1rem;
}

.btn-login, .btn-primary, .btn-danger, .btn-edit {
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.btn-login {
    width: 100%;
    background: #2563eb;
    color: white;
    font-size: 1rem;
    margin-top: 0.5rem;
}

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

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-edit {
    background: #10b981;
    color: white;
}

.demo-accounts {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    text-align: center;
    color: #475569;
}

/* Главное меню */
.main-menu {
    background: white;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.menu-logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2563eb;
}

.menu-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.menu-links a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    padding: 0.4rem 0;
}

.menu-links a.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Карточки тем */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.theme-card {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.theme-card:hover {
    transform: translateY(-3px);
}

.theme-card h3 {
    margin-bottom: 0.5rem;
    color: #1e40af;
}

.theme-card p {
    color: #475569;
    margin-bottom: 1rem;
}

.theme-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Стили для просмотра темы */
.topic-header {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #2563eb;
    text-decoration: none;
}

.section-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.item-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.item-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.item-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}

.badge-lecture { background: #dbeafe; color: #1e40af; }
.badge-practice { background: #dcfce7; color: #16a34a; }
.badge-test { background: #fee2e2; color: #dc2626; }

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.item-content {
    margin-top: 0.5rem;
    color: #475569;
}

/* Формы редактирования */
.edit-form {
    background: #f8fafc;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
}

/* Тест */
.test-question {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.test-options label {
    display: block;
    margin: 0.3rem 0;
}

/* Результаты */
.student-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.results-table th, .results-table td {
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    text-align: left;
}

.results-table th {
    background: #f1f5f9;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1.2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2563eb;
}
.stat-label {
    color: #64748b;
    font-size: 0.85rem;
}
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.search-bar input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    font-size: 1rem;
}
.search-bar select {
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    background: white;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
}
.page-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}
.page-btn:hover:not(.active) {
    background: #eef2ff;
}
.export-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
}
.filter-badge {
    background: #eef2ff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
}
.filter-badge.active {
    background: #2563eb;
    color: white;
}
.results-table th {
    cursor: pointer;
    user-select: none;
}
.results-table th:hover {
    background: #e2e8f0;
}
.results-table th.sorted-asc::after {
    content: " ▲";
}
.results-table th.sorted-desc::after {
    content: " ▼";
}
.search-bar {
            margin-bottom: 1.5rem;
}
.search-bar input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    font-size: 1rem;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 30px;
    cursor: pointer;
}
.page-btn.active {
    background: #2563eb;
    color: white;
}
.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        gap: 1.5rem;
}
.search-bar {
    margin: 1rem 0;
}
.search-bar input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 30px;
    cursor: pointer;
}
.page-btn.active {
    background: #2563eb;
    color: white;
}
.themes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.topic-layout {
    display: flex;
    gap: 1.5rem;
    min-height: calc(100vh - 70px);
}
/* Левая навигационная панель */
.topic-sidebar {
    width: 300px;
    background: white;
    border-radius: 20px;
    padding: 1rem;
    position: sticky;
    top: 1rem;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.nav-section {
    margin-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}
.nav-section-header {
    padding: 0.7rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1e293b;
    border-radius: 12px;
}
.nav-section-header:hover {
    background: #f1f5f9;
}
.nav-section-content {
    display: none;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}
.nav-section-content.open {
    display: block;
}
.nav-item {
    display: block;
    padding: 0.5rem 0.7rem;
    cursor: pointer;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #475569;
    transition: all 0.2s;
}
.nav-item:hover {
    background: #eef2ff;
    color: #2563eb;
}
.nav-item.active {
    background: #2563eb;
    color: white;
}
.nav-badge {
    font-size: 0.7rem;
    background: #e2e8f0;
    padding: 0.1rem 0.4rem;
    border-radius: 20px;
    margin-left: 0.5rem;
}
/* Основной контент */
.topic-main {
    flex: 1;
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.content-block {
    display: none;
}
.content-block.active {
    display: block;
}
.arrow {
    transition: transform 0.2s;
}
.arrow.rotated {
    transform: rotate(90deg);
}
.section-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
}
.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: #2563eb;
    text-decoration: none;
}
@media (max-width: 768px) {
    .topic-layout { flex-direction: column; }
    .topic-sidebar { width: 100%; position: static; }
}
.search-bar {
    margin: 1rem 0;
}
.search-bar input {
    width: 100%;
    max-width: 400px;
    padding: 0.6rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.page-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 30px;
    cursor: pointer;
}
.page-btn.active {
    background: #2563eb;
    color: white;
}
.theme-card {
    background: white;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.theme-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}
.theme-header:hover {
    background: #eef2ff;
}
.theme-title {
    font-size: 1.1rem;
    font-weight: 600;
}
.theme-actions-header {
    display: flex;
    gap: 0.5rem;
}
.theme-body {
    display: none;
    padding: 1rem;
}
.theme-body.open {
    display: block;
}
.section-card {
    background: #f8fafc;
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
}
.section-header {
    background: #eef2ff;
    padding: 0.7rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}
.section-body {
    display: none;
    padding: 1rem;
}
.section-body.open {
    display: block;
}
.item-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: white;
}
.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.item-actions {
    display: flex;
    gap: 0.5rem;
}
.edit-form {
    background: #f8fafc;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.arrow {
    transition: transform 0.2s;
}
.arrow.rotated {
    transform: rotate(90deg);
}
.btn-primary, .btn-edit, .btn-danger {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
}
.btn-primary { background: #2563eb; color: white; }
.btn-edit { background: #10b981; color: white; }
.btn-danger { background: #ef4444; color: white; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2563eb;
}
.stat-label {
    color: #64748b;
    font-size: 0.8rem;
}
.search-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.search-bar input, .search-bar select {
    padding: 0.6rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    background: white;
}
.search-bar input {
    flex: 1;
    min-width: 200px;
}
.export-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    cursor: pointer;
}
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.page-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #cbd5e1;
    background: white;
    border-radius: 30px;
    cursor: pointer;
}
.page-btn.active {
    background: #2563eb;
    color: white;
}
.student-card {
    background: white;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.student-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}
.student-header:hover {
    background: #eef2ff;
}
.student-name {
    font-size: 1.1rem;
    font-weight: 600;
}
.student-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: #64748b;
}
.student-body {
    display: none;
    padding: 1rem;
}
.student-body.open {
    display: block;
}
.theme-block {
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}
.theme-header {
    background: #f1f5f9;
    padding: 0.8rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}
.theme-header:hover {
    background: #e2e8f0;
}
.theme-body {
    display: none;
    padding: 0.8rem;
}
.theme-body.open {
    display: block;
}
.result-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.result-name {
    flex: 1;
}
.result-status {
    font-weight: 500;
}
.result-status.completed { color: #16a34a; }
.result-status.not-completed { color: #dc2626; }
.sub-section {
    margin-left: 1rem;
    margin-top: 0.5rem;
}
.sub-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.3rem;
}
.arrow {
    transition: transform 0.2s;
}
.arrow.rotated {
    transform: rotate(90deg);
}
.results-table {
    width: 100%;
}
/* Стили для редактора */
.edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.themes-editor {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.theme-editor-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.theme-editor-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.drag-handle {
    cursor: grab;
    font-size: 1.5rem;
    color: #94a3b8;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle-small {
    cursor: grab;
    font-size: 1.2rem;
    color: #94a3b8;
    padding: 0 0.5rem;
    user-select: none;
}

.theme-editor-info {
    flex: 1;
}

.theme-editor-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.theme-editor-info p {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
}

.theme-editor-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon-btn.edit:hover {
    background: #dbeafe;
    color: #2563eb;
}

.icon-btn.delete:hover {
    background: #fee2e2;
    color: #ef4444;
}

.icon-btn.expand:hover {
    background: #e2e8f0;
}

.theme-editor-content {
    padding: 1.5rem;
}

.content-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    color: #64748b;
    border-radius: 8px 8px 0 0;
}

.tab-btn.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}

.tab-pane {
    display: none;
}

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

.items-list {
    min-height: 100px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.list-item:hover {
    background: #f1f5f9;
}

.list-item-info {
    flex: 1;
}

.list-item-title {
    font-weight: 500;
    font-size: 0.9rem;
}

.list-item-preview {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.list-item-actions {
    display: flex;
    gap: 0.3rem;
}

.icon-btn-small {
    background: none;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
}

.icon-btn-small.edit:hover {
    background: #dbeafe;
}

.icon-btn-small.delete:hover {
    background: #fee2e2;
}

.btn-add {
    background: none;
    border: 1px dashed #cbd5e1;
    color: #2563eb;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.btn-add:hover {
    background: #eef2ff;
    border-color: #2563eb;
}

.empty-list {
    text-align: center;
    color: #94a3b8;
    padding: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 24px;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Модальные окна */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background: white;
    border-radius: 24px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.btn-secondary {
    background: #e2e8f0;
    color: #1e293b;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    cursor: pointer;
}

.question-editor {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.options-editor {
    margin-top: 0.5rem;
}

.option-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.correct-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* Уведомления */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1e293b;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

.toast.success {
    background: #10b981;
}

.toast.error {
    background: #ef4444;
}
/* Фильтры на странице результатов */
.filters-bar {
    background: white;
    border-radius: 20px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
}

.filter-group select, .filter-group input {
    padding: 0.5rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    background: white;
    min-width: 150px;
}

/* Стили для карточек результатов */
.student-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.student-stats {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #f1f5f9;
}

.stat-badge.completed {
    background: #dcfce7;
    color: #16a34a;
}

.stat-badge.pending {
    background: #fee2e2;
    color: #dc2626;
}

.results-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.theme-results-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1rem;
}

.theme-results-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e40af;
}

.items-results {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.items-group {
    flex: 1;
    min-width: 200px;
}

.items-group ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.3rem;
}

.items-group li {
    padding: 0.2rem 0;
    font-size: 0.85rem;
}

.status-completed {
    color: #16a34a;
}

.status-pending {
    color: #dc2626;
}

.empty-results {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

/* Панель форматирования текста */
.text-formatting-toolbar {
    background: #f1f5f9;
    padding: 0.5rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    border: 1px solid #cbd5e1;
    border-bottom: none;
}

.text-formatting-toolbar button {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.text-formatting-toolbar button:hover {
    background: #e2e8f0;
}

.text-formatting-toolbar .separator {
    width: 1px;
    background: #cbd5e1;
    margin: 0 0.3rem;
}

.rich-editor {
    min-height: 300px;
    border: 1px solid #cbd5e1;
    border-radius: 0 0 12px 12px;
    padding: 0.75rem;
    overflow-y: auto;
    background: white;
}

.rich-editor:focus {
    outline: none;
    border-color: #2563eb;
}
/* ========== СТРАНИЦА РЕЗУЛЬТАТОВ ========== */
.results-page {
    max-width: 1400px;
}

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h1 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.results-header .subtitle {
    color: #64748b;
    font-size: 0.9rem;
}

/* Панель фильтров */
.filters-panel {
    background: white;
    border-radius: 60px;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.filters-panel .filter-group {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 40px;
    padding: 0.3rem 1rem;
    gap: 0.5rem;
}

.filters-panel .filter-icon {
    font-size: 1.1rem;
}

.filters-panel input, .filters-panel select {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    outline: none;
}

.reset-btn {
    background: #e2e8f0;
    border: none;
    padding: 0 1.2rem;
    border-radius: 40px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.reset-btn:hover {
    background: #cbd5e1;
}

/* Общая статистика */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
}

.stat-card.highlight .stat-label {
    color: rgba(255,255,255,0.8);
}

.stat-icon {
    font-size: 2rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.2rem;
}

.stat-card.highlight .stat-value {
    color: white;
}

.progress-bar-mini {
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.progress-bar-mini .progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
}

/* Карточки учеников */
.students-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.student-result-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.2s;
}

.student-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    background: white;
    transition: background 0.2s;
}

.student-card-header:hover {
    background: #f8fafc;
}

.student-avatar .avatar-icon span {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
}

.student-info {
    flex: 2;
}

.student-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.student-progress {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    max-width: 250px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #10b981);
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #2563eb;
}

.student-stats-badges {
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
}

.completed-badge {
    background: #dcfce7;
    color: #16a34a;
}

.pending-badge {
    background: #fee2e2;
    color: #dc2626;
}

.toggle-icon {
    font-size: 1.2rem;
    color: #94a3b8;
    transition: transform 0.2s;
}

.student-card-body {
    border-top: 1px solid #eef2ff;
    padding: 1.5rem;
    background: #f8fafc;
}

/* Результаты по темам */
.themes-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.theme-result-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.theme-result-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    background: white;
    transition: background 0.2s;
}

.theme-result-header:hover {
    background: #f1f5f9;
}

.theme-icon {
    font-size: 1.3rem;
}

.theme-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.theme-title {
    font-weight: 500;
    color: #1e293b;
}

.theme-mini-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}

.mini-progress-bar {
    width: 80px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.mini-progress-fill {
    height: 100%;
    background: #10b981;
    border-radius: 2px;
}

.theme-percent {
    font-size: 0.7rem;
    font-weight: 500;
    color: #64748b;
}

.theme-toggle-icon {
    font-size: 0.8rem;
    color: #94a3b8;
}

.theme-result-body {
    padding: 1rem 1.2rem;
    border-top: 1px solid #eef2ff;
    background: #fafcff;
}

.items-columns {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.items-column {
    flex: 1;
    min-width: 200px;
}

.column-title {
    font-weight: 600;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-list-status {
    list-style: none;
    padding-left: 0;
}

.items-list-status li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    border-bottom: 1px dashed #eef2ff;
}

.items-list-status li:last-child {
    border-bottom: none;
}

.status-icon {
    font-size: 0.9rem;
}

.status-success {
    color: #16a34a;
}

.status-pending {
    color: #dc2626;
}

.empty-results-message {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.empty-state-card {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state-card h3 {
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.empty-state-card p {
    color: #64748b;
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.student-result-card {
    animation: fadeIn 0.3s ease-out;
}

/* Адаптивность */
@media (max-width: 768px) {
    .filters-panel {
        flex-direction: column;
        border-radius: 20px;
    }
    
    .filters-panel .filter-group {
        border-radius: 40px;
    }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .student-card-header {
        flex-wrap: wrap;
    }
    
    .student-stats-badges {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }
    
    .toggle-icon {
        order: 2;
    }
    
    .items-columns {
        flex-direction: column;
        gap: 1rem;
    }
}
/* ========== ПАНЕЛЬ УЧИТЕЛЯ ========== */
.teacher-panel {
    max-width: 1400px;
}

.teacher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.teacher-header h1 {
    font-size: 1.8rem;
    color: #1e293b;
}

.teacher-header .subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.teacher-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.teacher-tabs .tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    color: #64748b;
    border-radius: 8px 8px 0 0;
}

.teacher-tabs .tab-btn.active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
}

/* Список учеников */
.students-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.student-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    border-radius: 20px;
    padding: 1rem 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.student-card:hover {
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.student-avatar-large .avatar-large {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
}

.student-card-info {
    flex: 1;
}

.student-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
}

.student-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.2rem;
}

.student-card-actions {
    display: flex;
    gap: 0.5rem;
}

.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
}

.search-icon {
    font-size: 1.1rem;
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
    padding: 0.3rem 0;
}

.modal-small {
    max-width: 450px;
}

.warning-text {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fee2e2;
    border-radius: 12px;
}

.info-message {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f0fdf4;
    border-radius: 16px;
    font-size: 0.85rem;
    color: #16a34a;
    text-align: center;
}