body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: linear-gradient(180deg, #f3f7ff 0%, #eef3ff 100%);
    color: #0f172a;
}

header {
    background: linear-gradient(90deg, #1b2a41 0%, #243b5c 100%);
    color: #fff;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

header h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: inherit;
    line-height: 1.15;
}

.brand-slogan {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.82);
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.header-left-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle,
.menu-close {
    background: rgba(255, 255, 255, 0.12) !important;
}

.menu-toggle {
    width: auto;
    margin: 0;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-top-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.header-student-avatar-link {
    display: inline-flex;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.5);
    line-height: 0;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-student-avatar-link:hover {
    border-color: rgba(255, 255, 255, 0.85);
}

.header-student-avatar {
    display: block;
    width: 44px;
    height: 44px;
    object-fit: cover;
}

.header-student-avatar-silhouette,
.profile-avatar-silhouette,
.header-student-avatar.profile-avatar-silhouette,
.dashboard-welcome-avatar.profile-avatar-silhouette,
.student-profile-photo.profile-avatar-silhouette,
.teacher-profile-photo.profile-avatar-silhouette,
.teacher-list-avatar.profile-avatar-silhouette,
.ai-teacher-avatar.profile-avatar-silhouette {
    object-fit: contain;
    background: #d8e8f8;
    box-sizing: border-box;
}

.header-student-avatar.profile-avatar-silhouette,
.teacher-list-avatar.profile-avatar-silhouette,
.ai-teacher-avatar.profile-avatar-silhouette {
    padding: 2px;
}

.dashboard-welcome-avatar.profile-avatar-silhouette {
    padding: 4px;
}

.student-profile-photo.profile-avatar-silhouette,
.teacher-profile-photo.profile-avatar-silhouette {
    padding: 8px;
}

.mobile-preview-toggle {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.mobile-preview-toggle:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Masaüstünde telefon çerçevesi ile mobil önizleme */
html.mobile-preview-root {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 55%, #0f172a 100%);
    min-height: 100%;
    padding: 14px 0 28px;
}

body.mobile-preview-active {
    position: relative;
    max-width: 390px;
    width: 100%;
    margin: 0 auto;
    border-radius: 28px;
    overflow-x: hidden;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.08),
        0 32px 100px rgba(0, 0, 0, 0.55);
}

body.mobile-preview-active main {
    max-width: none;
    padding: 14px 12px 22px;
    overflow-x: hidden;
}

body.mobile-preview-active header {
    padding: 12px 14px 14px;
    border-radius: 28px 28px 0 0;
}

body.mobile-preview-active header h1 {
    font-size: 17px;
    line-height: 1.25;
}

body.mobile-preview-active .site-nav-drawer a {
    font-size: 12px;
    padding: 7px 10px;
}

body.mobile-preview-active .subscription-pill {
    font-size: 11px;
    padding: 6px 10px;
}

body.mobile-preview-active .rank-summary-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
}

body.mobile-preview-active .rank-summary-cards .rank-card {
    min-width: 0;
    padding: 7px 8px;
}

body.mobile-preview-active .rank-summary-cards .rank-card-level {
    font-size: 10px;
    margin-bottom: 2px;
}

body.mobile-preview-active .rank-summary-cards .rank-card-value {
    font-size: 12px;
    word-break: break-word;
}

body.mobile-preview-active .site-assistant {
    right: 12px;
    bottom: 12px;
}

body.mobile-preview-active .assistant-panel {
    width: min(300px, calc(100vw - 34px));
}

body.mobile-preview-active .schedule-table {
    font-size: 11px;
}

.subscription-pill {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 13px;
}

.robot-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(98, 162, 255, 0.18);
    border: 1px solid rgba(98, 162, 255, 0.35);
    font-size: 18px;
}

.teacher-list-avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #dbe5f2;
    background: #f8fafc;
    vertical-align: middle;
}

.ai-teacher-avatar {
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(98, 162, 255, 0.35);
    background: #f8fafc;
    flex-shrink: 0;
}

.ai-teacher-box {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(98, 162, 255, 0.35);
    background: rgba(98, 162, 255, 0.08);
}

.ai-teacher-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.ai-speech-toggle {
    margin-left: auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(98, 162, 255, 0.45);
    background: rgba(98, 162, 255, 0.2);
    color: #0f172a;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.ai-speech-toggle:hover {
    background: rgba(98, 162, 255, 0.32);
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 23, 0.45);
    z-index: 1990;
}

body.mobile-preview-active .menu-overlay {
    position: absolute;
    border-radius: inherit;
}

body.menu-open {
    overflow: hidden;
}

.site-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    max-height: 100dvh;
    width: min(86vw, 320px);
    background: #0f172a;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 16px 0 40px rgba(2, 8, 23, 0.4);
    z-index: 2000;
    padding: 16px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    visibility: hidden;
    pointer-events: none;
}

body.mobile-preview-active .site-nav-drawer {
    /* Viewport yüksekliğinde kalsın; body içeriği uzasa da menü kaydırılabilir olsun */
    height: 100dvh;
    max-height: 100dvh;
}

.site-nav-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 4px 6px 10px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.site-nav-body::-webkit-scrollbar,
.nav-submenu-items::-webkit-scrollbar {
    width: 8px;
}

.site-nav-body::-webkit-scrollbar-track,
.nav-submenu-items::-webkit-scrollbar-track {
    background: transparent;
}

.site-nav-body::-webkit-scrollbar-thumb,
.nav-submenu-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

.site-nav-body::-webkit-scrollbar-thumb:hover,
.nav-submenu-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.55);
}

.site-nav-footer {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    background: #0f172a;
}

.site-nav-footer:empty {
    display: none;
}

.site-nav-logout {
    margin-top: 0;
}

.site-nav-drawer.open {
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

.site-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.menu-close {
    width: auto;
    margin: 0;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.site-nav-drawer a {
    color: #fff;
    margin-right: 0;
    text-decoration: none;
    font-weight: 600;
    opacity: 0.96;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.site-nav-drawer a:hover {
    opacity: 1;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(2px);
}

main {
    padding: 22px;
    max-width: 1400px;
    margin: 0 auto;
}

.panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e7edf5;
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
}

.panel h2,
.panel h3 {
    margin-top: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.dashboard-welcome .rank-summary-cards {
    margin-bottom: 0;
}

.dashboard-welcome-compact {
    padding: 16px;
}

.dashboard-welcome-compact h2 {
    font-size: 1.35rem;
    margin-bottom: 4px;
}

.rank-summary-cards-compact {
    margin: 12px 0 16px;
}

.rank-summary-cards-compact .rank-card {
    padding: 10px 12px;
}

.rank-summary-cards-compact .rank-card-value {
    font-size: 1.1rem;
}

.dashboard-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.dashboard-hub-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 14px 10px;
    border-radius: 14px;
    border: 1px solid #dbeafe;
    background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.dashboard-hub-btn:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
}

.dashboard-hub-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.dashboard-hub-label {
    font-size: 0.92rem;
    line-height: 1.25;
}

.dashboard-hub-note {
    margin: 14px 0 0;
    font-size: 0.9rem;
}

.lesson-page-head {
    padding-bottom: 12px;
}

.lesson-page-title-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 8px;
}

.course-card-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.course-card {
    display: block;
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 16px;
    padding: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.course-card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.course-card-locked {
    opacity: 0.72;
    pointer-events: none;
}

.course-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.course-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.course-card-icon-lg {
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
}

.course-card-head {
    min-width: 0;
    flex: 1;
}

.course-card-head h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    line-height: 1.25;
    color: #0f172a;
}

.course-card-desc {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #64748b;
}

.course-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin: 14px 0 12px;
    padding-top: 12px;
    border-top: 1px solid #eef2f7;
}

.course-card-stats-inline {
    border-top: none;
    padding-top: 0;
    margin-top: 10px;
}

.course-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #475569;
    font-weight: 600;
}

.course-stat-icon {
    opacity: 0.75;
}

.course-card-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid #eef2f7;
}

.course-card-progress-split {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.course-card-progress-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.course-progress-text {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1d4ed8;
}

.course-success-badge .course-progress-text {
    color: #854d0e;
}

.course-success-star {
    color: #f59e0b;
    font-size: 1rem;
    line-height: 1;
}

.course-card-lock-note {
    margin: 10px 0 0;
    font-size: 0.82rem;
    color: #94a3b8;
}

.progress-ring {
    width: 34px;
    height: 34px;
    transform: rotate(-90deg);
    flex-shrink: 0;
}

.progress-ring-sm {
    width: 28px;
    height: 28px;
}

.progress-ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 3.2;
}

.progress-ring-fill {
    fill: none;
    stroke: #2563eb;
    stroke-width: 3.2;
    stroke-linecap: round;
}

.unit-detail-head h2 {
    margin: 8px 0 12px;
}

.unit-detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
}

.unit-timeline-panel {
    padding-top: 14px;
}

.unit-tab-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
    width: 100%;
}

.unit-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 8px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    word-break: break-word;
}

button.unit-tab {
    appearance: none;
}

button.unit-tab:disabled {
    cursor: not-allowed;
    opacity: 1;
}

.unit-tab-panel-hidden {
    display: none;
}

.unit-tab-active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.unit-tab-muted {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
    opacity: 1;
}

.unit-eval-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.unit-eval-summary-card {
    border: 1px solid #dbeafe;
    background: #eff6ff;
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.unit-eval-summary-label {
    font-size: 0.78rem;
    color: #475569;
    font-weight: 600;
}

.unit-eval-summary-card strong {
    font-size: 1.35rem;
    color: #1e3a8a;
}

.unit-eval-topic-card {
    border: 1px solid #e7edf5;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
}

.unit-eval-topic-card:last-child {
    margin-bottom: 0;
}

.unit-eval-topic-head h4 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.unit-eval-topic-meta {
    margin: 0;
    font-size: 0.82rem;
}

.unit-eval-table-wrap {
    overflow-x: auto;
    margin-top: 10px;
}

.unit-eval-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}

.unit-eval-table th,
.unit-eval-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e7edf5;
    text-align: left;
    white-space: nowrap;
}

.unit-eval-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
}

.unit-eval-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.unit-eval-status-pass {
    background: #dcfce7;
    color: #166534;
}

.unit-eval-status-partial {
    background: #fef3c7;
    color: #92400e;
}

.unit-eval-empty {
    margin: 0;
    padding: 14px;
    border-radius: 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.9rem;
}

.content-manage-card {
    cursor: default;
}

.content-manage-card h3 a {
    color: inherit;
    text-decoration: none;
}

.content-manage-card h3 a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.content-manage-edit {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e7edf5;
}

.content-manage-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e7edf5;
}

.content-manage-actions .content-manage-edit {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.content-manage-actions .content-manage-edit[open] {
    flex-basis: 100%;
}

.content-manage-edit summary,
.content-manage-nav-link {
    cursor: pointer;
    font-weight: 600;
    color: #2563eb;
    font-size: 0.88rem;
    text-decoration: none;
}

.content-manage-nav-link:hover {
    text-decoration: underline;
}

.content-tests-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.92rem;
}

.content-tests-table th,
.content-tests-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e7edf5;
    text-align: left;
    vertical-align: middle;
}

.content-tests-table th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
}

.content-tests-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

.content-test-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.content-test-icon-btn svg {
    flex-shrink: 0;
    pointer-events: none;
}

.content-test-icon-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.content-test-icon-btn-save:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #2563eb;
}

.content-test-icon-btn-edit:hover {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #16a34a;
}

.content-test-icon-btn-delete:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

.content-tests-actions-stack {
    flex-direction: column;
    align-items: flex-start;
}

.content-test-edit {
    width: 100%;
    max-width: 420px;
}

.content-test-edit .form-grid {
    margin-top: 10px;
}

.content-test-inline-input,
.content-test-inline-select {
    width: 100%;
    min-width: 120px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.92rem;
    background: #fff;
}

.content-test-inline-input {
    direction: ltr;
    text-align: left;
    unicode-bidi: isolate;
}

.content-tests-inline-table td {
    vertical-align: middle;
}

.content-tests-delete-row td {
    padding-top: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid #e7edf5;
}

.content-tests-empty {
    color: #94a3b8;
    font-style: italic;
}

.content-manage-add-panel {
    margin-top: 16px;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
}

.content-manage-topic-list {
    margin-top: 12px;
}

.content-manage-topic-body {
    width: 100%;
}

.content-manage-topic-links {
    margin-top: 6px;
    font-size: 0.84rem;
}

.content-manage-topic-links a {
    color: #2563eb;
}

@media (max-width: 720px) {
    .unit-eval-summary {
        grid-template-columns: 1fr;
    }
}

.unit-section-card {
    border: 1px solid #e7edf5;
    border-radius: 14px;
    padding: 14px;
    background: #fbfdff;
}

.unit-section-head h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.lesson-timeline {
    list-style: none;
    margin: 16px 0 0;
    padding: 0 0 0 8px;
    position: relative;
}

.lesson-timeline::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: repeating-linear-gradient(
        180deg,
        #cbd5e1 0,
        #cbd5e1 6px,
        transparent 6px,
        transparent 12px
    );
}

.lesson-timeline-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    position: relative;
    padding: 0 0 18px;
}

.lesson-timeline-item:last-child {
    padding-bottom: 0;
}

.lesson-timeline-marker {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #93c5fd;
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    margin-top: 2px;
}

.lesson-timeline-completed .lesson-timeline-marker {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.lesson-timeline-in_progress .lesson-timeline-marker {
    background: #eff6ff;
}

.lesson-timeline-locked .lesson-timeline-marker {
    border-color: #cbd5e1;
    color: #94a3b8;
}

.lesson-timeline-body {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.lesson-timeline-link,
.lesson-timeline-static {
    display: block;
}

.lesson-timeline-link {
    text-decoration: none;
    color: inherit;
}

.lesson-timeline-link:hover {
    text-decoration: none;
}

.lesson-timeline-link:hover strong {
    color: #1d4ed8;
}

.lesson-timeline-body strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 2px;
}

.lesson-timeline-sub {
    display: block;
    font-size: 0.82rem;
    color: #64748b;
}

.lesson-timeline-empty {
    padding: 12px 0;
    color: #64748b;
    font-size: 0.9rem;
}

body.mobile-preview-active .course-card-head h3 {
    font-size: 0.98rem;
}

body.mobile-preview-active .course-card-desc {
    font-size: 0.82rem;
}

body.mobile-preview-active .course-card-stats {
    gap: 8px 12px;
}

body.mobile-preview-active .course-stat {
    font-size: 0.78rem;
}

.nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
}

.nav-submenu-label {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0 4px;
}

.nav-submenu-item {
    margin-left: 6px;
    font-size: 0.95rem;
}

.nav-submenu-collapsible {
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.nav-submenu-toggle {
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nav-submenu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-submenu-toggle-label {
    flex: 1;
}

.nav-submenu-chevron {
    font-size: 0.85rem;
    opacity: 0.85;
    transition: transform 0.2s ease;
}

.nav-submenu-collapsible.is-open .nav-submenu-chevron {
    transform: rotate(180deg);
}

.nav-submenu-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 10px 10px;
    max-height: min(48vh, 360px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

.nav-submenu-items[hidden] {
    display: none !important;
}

.dashboard-welcome-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 4px;
}

.dashboard-welcome-text {
    flex: 1;
    min-width: 0;
}

.dashboard-welcome-avatar-link {
    flex-shrink: 0;
    display: inline-flex;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #dbeafe;
    line-height: 0;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
}

.dashboard-welcome-avatar-link:hover {
    border-color: #93c5fd;
}

.dashboard-welcome-avatar {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: cover;
}

.dashboard-welcome-avatar-silhouette {
    object-fit: contain;
    background: #d8e8f8;
    padding: 3px;
    box-sizing: border-box;
}

.dashboard-radars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    align-items: start;
}

.mock-exam-radar .radar-label-mock {
    font-size: 8px;
}

.radar-value-mock {
    fill: rgba(5, 150, 105, 0.28);
    stroke: #059669;
}

.radar-card-mock .radar-overall-success strong {
    color: #047857;
}

.exam-readonly-fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.radar-card {
    background: #f8fbff;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    padding: 10px;
    position: relative;
}

.radar-card h3 {
    margin: 0 0 6px;
    font-size: 14px;
}

.radar-overall-success {
    position: absolute;
    top: 10px;
    right: 12px;
    text-align: right;
    line-height: 1.1;
}

.radar-overall-success-label {
    display: block;
    font-size: 10px;
    color: #64748b;
    margin-bottom: 2px;
}

.radar-overall-success strong {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: #1d4ed8;
}

.subject-radar {
    width: 100%;
    height: auto;
    display: block;
}

.radar-ring {
    fill: none;
    stroke: #bfdbfe;
    stroke-width: 1;
}

.radar-axis {
    stroke: #cbd5e1;
    stroke-width: 1;
}

.radar-value {
    fill: rgba(37, 99, 235, 0.28);
    stroke: #1d4ed8;
    stroke-width: 2;
}

.radar-label {
    fill: #334155;
    font-size: 8px;
    text-anchor: middle;
}

.radar-center-label {
    fill: #64748b;
    font-size: 8px;
    text-anchor: middle;
}

.rank-summary-cards {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 72px), 1fr));
    gap: 8px;
    width: 100%;
}

.rank-card {
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid #dbe5f0;
    line-height: 1.2;
    min-width: 0;
}

.rank-card-level {
    display: block;
    font-size: 11px;
    margin-bottom: 4px;
}

.rank-card-value {
    display: block;
    font-size: 13px;
}

.rank-card-class {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e3a8a;
}

.rank-card-school {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.rank-card-district {
    background: #fefce8;
    border-color: #fde68a;
    color: #854d0e;
}

.rank-card-city {
    background: #f5f3ff;
    border-color: #c4b5fd;
    color: #5b21b6;
}

.rank-card-country {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}

img,
svg,
canvas,
video {
    max-width: 100%;
    height: auto;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid #e7edf5;
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.06);
}

.card p {
    font-size: 26px;
    margin: 6px 0 0;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    align-items: end;
}

input,
select,
textarea,
button {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #cdd8e5;
    margin-top: 4px;
    margin-bottom: 6px;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #bfdbfe;
    border-color: #60a5fa;
}

button {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.3);
}

label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

th,
td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: left;
    font-size: 14px;
}

th {
    background: #eaf1ff;
    color: #1e293b;
}

tr:nth-child(even) td {
    background: #fafcff;
}

@media (max-width: 900px) {
    table {
        table-layout: fixed;
    }

    th,
    td {
        white-space: normal;
        word-break: break-word;
        overflow-wrap: anywhere;
        font-size: 12px;
        padding: 6px;
    }

    .rank-summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
}

@media (max-width: 520px) {
    .rank-summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .dashboard-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dashboard-hub-btn {
        min-height: 88px;
        padding: 12px 8px;
    }

    .dashboard-hub-label {
        font-size: 0.85rem;
    }
}

.site-assistant {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    pointer-events: none;
}

.site-assistant > * {
    pointer-events: auto;
}

.header-assistant-btn {
    flex-shrink: 0;
    width: auto;
    margin: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
    white-space: nowrap;
}

.header-assistant-btn:hover {
    filter: brightness(1.05);
}

.site-nav-assistant-link {
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(96, 165, 250, 0.45);
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.18);
    color: #dbeafe;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.site-nav-assistant-link:hover {
    background: rgba(37, 99, 235, 0.32);
}

.nav-submenu-items .site-nav-assistant-link {
    margin-left: 6px;
    width: calc(100% - 6px);
    font-size: 0.95rem;
    font-family: inherit;
    appearance: none;
}

.assistant-toggle {
    width: auto;
    min-width: 118px;
    margin: 0;
    padding: 12px 18px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: 2px solid #93c5fd;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.45);
    animation: assistant-pulse 2.4s ease-in-out infinite;
}

.assistant-toggle-active,
.assistant-toggle:hover {
    animation: none;
}

@keyframes assistant-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.assistant-toggle-icon {
    font-size: 16px;
}

.assistant-panel {
    width: 360px;
    max-width: calc(100vw - 30px);
    background: #fff;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #eef4ff 0%, #f8fbff 100%);
    border-bottom: 1px solid #dbe4f0;
}

.assistant-header strong {
    display: block;
    font-size: 14px;
}

.assistant-status {
    display: block;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.assistant-close {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    padding: 0;
    font-size: 22px;
    line-height: 1;
    background: #fff;
    color: #64748b;
}

.assistant-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 12px 0;
}

.assistant-quick-link {
    width: auto;
    margin: 0;
    padding: 6px 10px;
    font-size: 11px;
    border-radius: 999px;
    background: #f8fafc;
    color: #1e3a8a;
    border: 1px solid #cbd5e1;
}

.assistant-quick-link:hover {
    background: #eff6ff;
}

.assistant-messages {
    height: 280px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.assistant-bot-msg,
.assistant-user-msg {
    font-size: 13px;
    line-height: 1.45;
    padding: 9px 11px;
    border-radius: 12px;
    white-space: pre-wrap;
}

.assistant-bot-msg {
    background: #f3f7ff;
    border: 1px solid #dbe7ff;
    align-self: flex-start;
    max-width: 92%;
}

.assistant-user-msg {
    background: #2563eb;
    color: #fff;
    align-self: flex-end;
    max-width: 88%;
}

.assistant-form {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid #e5eaf3;
}

.assistant-mic {
    width: 42px;
    padding: 0;
    margin: 0;
    border-radius: 10px;
    background: #f8fafc;
    color: #1e3a8a;
}

.assistant-mic.listening {
    background: #fee2e2;
    color: #b91c1c;
}

.assistant-mic:disabled {
    opacity: 0.45;
}

.assistant-form input {
    margin: 0;
}

.assistant-form button[type="submit"] {
    width: auto;
    margin: 0;
    padding: 10px 12px;
}

.alerts {
    margin-bottom: 12px;
}

.alert {
    padding: 10px;
    border-radius: 7px;
    margin-bottom: 6px;
    font-weight: 700;
}

.alert.success {
    background: #dbfbe0;
    color: #0f5e1d;
}

.alert.error {
    background: #ffe3e3;
    color: #8f1d1d;
}

.auth-hint,
.field-hint {
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 0;
}

.field-hint {
    display: block;
}

.hero h2 {
    margin-top: 0;
}

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.btn-link {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 10px;
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.btn-link.secondary {
    background: linear-gradient(90deg, #0f766e 0%, #0d9488 100%);
}

.btn-link:hover {
    opacity: 0.92;
}

.mock-report-btn-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    user-select: none;
}

.stat-card h3 {
    margin: 0;
    font-size: 14px;
    color: #475569;
}

.stat-card p {
    margin-top: 8px;
    color: #0f172a;
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.flow-item {
    padding: 10px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-weight: 700;
}

.flow-item span {
    display: inline-flex;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    background: #1d4ed8;
    color: #fff;
    font-size: 12px;
}

.schedule-table th,
.schedule-table td {
    vertical-align: top;
    min-width: 90px;
    width: 90px;
    padding: 6px 5px;
    word-break: break-word;
}

.schedule-table th {
    font-size: 12px;
    line-height: 1.2;
}

.slot {
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 6px;
    border: 1px solid #dbe3ef;
    font-size: 11px;
}

.slot button {
    width: 100%;
    padding: 5px 4px;
    font-size: 11px;
}

.slot-free {
    background: #eefbf3;
}

.slot-booked {
    background: #fff2f2;
}

.slot-plan-disi {
    background: #e2e8f0;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

.slot-plan-disi .muted {
    color: #94a3b8;
}

.plan-disi-label {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    background: #94a3b8;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.slot-unavailable {
    background: #fff7e6;
}

.muted {
    color: #94a3b8;
}

.auth-panel {
    max-width: 560px;
    margin: 18px auto;
}

.auth-panel p {
    color: #475569;
}

.teacher-profile-panel {
    position: relative;
    padding-top: 18px;
    padding-right: 340px;
}

.teacher-profile-photo-side {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
}

.teacher-profile-photo-frame {
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.teacher-profile-photo,
.teacher-profile-photo-empty {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 1px solid #dbe5f2;
    background: #f8fafc;
    object-fit: cover;
    display: block;
}

.teacher-profile-photo-silhouette,
.student-profile-photo-silhouette {
    padding: 8px;
}

.teacher-photo-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    min-width: 88px;
    flex-shrink: 0;
}

.teacher-photo-actions form {
    margin: 0;
}

.teacher-photo-action-btn {
    display: block;
    width: 100%;
    text-align: center;
    cursor: pointer;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 6px;
    white-space: nowrap;
}

.teacher-photo-file-input,
.profile-photo-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 980px) {
    .teacher-profile-panel {
        padding-right: 20px;
    }
    .teacher-profile-photo-side {
        position: static;
        justify-content: center;
        margin: 0 auto 14px;
    }
}

.student-profile-panel {
    position: relative;
    padding-top: 18px;
    padding-right: 340px;
}

.student-profile-photo-side {
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 10px;
}

.student-profile-photo-frame {
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.student-profile-photo {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 1px solid #dbe5f2;
    background: #f8fafc;
    object-fit: cover;
    display: block;
}

.student-profile-photo-silhouette {
    object-fit: contain;
    padding: 8px;
    background: #f8fafc;
}

.student-photo-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    min-width: 88px;
    flex-shrink: 0;
}

.student-photo-actions form {
    margin: 0;
}

.student-photo-action-btn {
    display: block;
    width: 100%;
    text-align: center;
    cursor: pointer;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 6px;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .student-profile-panel {
        padding-right: 20px;
    }
    .student-profile-photo-side {
        position: static;
        justify-content: center;
        margin: 0 auto 14px;
    }
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.week-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.week-nav h3 {
    margin: 0;
    text-align: center;
    flex: 1;
}

.nav-arrow {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    background: #1d4ed8;
}

.nav-arrow:hover {
    opacity: 0.9;
}

.nav-arrow.disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.slot-filter-links {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.slot-filter-links a {
    text-decoration: none;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 999px;
    color: #334155;
    font-weight: 600;
    background: #fff;
}

.slot-filter-links a.active {
    color: #fff;
    border-color: transparent;
    background: #2563eb;
}

.subject-grade-grid {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.subject-grade-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 700;
    min-width: 26px;
}

.subject-grade-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.toggle-summary {
    cursor: pointer;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 12px;
}

details[open] .toggle-summary {
    margin-bottom: 14px;
}

.exam-question-card {
    margin-top: 14px;
    padding: 16px;
    border-radius: 14px;
    border: 1px solid #dbe3ef;
    background: #ffffff;
}

.exam-question-image-wrap {
    margin-bottom: 12px;
}

.exam-question-image {
    width: auto;
    height: auto;
    max-width: min(100%, 460px);
    max-height: 60vh;
    object-fit: contain;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    display: block;
}

@media (max-width: 640px) {
    .exam-question-image {
        max-width: 100%;
        max-height: 48vh;
    }
}

.exam-question-text {
    font-size: 20px;
    line-height: 1.55;
    margin-bottom: 14px;
}

.exam-options-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 10px;
}

.exam-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    margin: 0;
}

.exam-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.exam-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.exam-nav-item {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: #bfdbfe;
    color: #1e3a8a;
    font-weight: 700;
    cursor: pointer;
    margin: 0;
}

.exam-nav-item.answered {
    background: #2563eb;
    color: #fff;
}

.exam-nav-item.marked {
    background: #f59e0b;
    color: #fff;
}

.exam-nav-item.wrong {
    background: #dc2626;
    color: #fff;
}

.exam-nav-item.correct {
    background: #16a34a;
    color: #fff;
}

.exam-nav-item.skipped {
    background: #facc15;
    color: #1f2937;
}

.exam-nav-item.current {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

.exam-option input {
    display: none;
}

.exam-option-letter {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: #64748b;
    color: #fff;
    flex-shrink: 0;
}

.exam-option-text {
    font-size: 17px;
    line-height: 1.35;
}

.exam-option:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}

.exam-option:has(input:checked) .exam-option-letter {
    background: #2563eb;
}

.exam-question-card.result-correct {
    border-color: #16a34a;
    background: #f0fdf4;
}

.exam-question-card.result-wrong {
    border-color: #dc2626;
    background: #fff1f2;
}

.exam-question-card.result-skipped {
    border-color: #facc15;
    background: #fefce8;
}

.exam-question-card.pending-empty {
    border-color: #facc15;
    background: #fefce8;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.35);
}

.exam-option.selected-correct {
    border-color: #16a34a;
    background: #dcfce7;
}

.exam-option.selected-correct .exam-option-letter {
    background: #16a34a;
}

.exam-option.selected-wrong {
    border-color: #dc2626;
    background: #fee2e2;
}

.exam-option.selected-wrong .exam-option-letter {
    background: #dc2626;
}

.exam-mark-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
}

.exam-mark-toggle input {
    width: auto;
    margin: 0;
}

.exam-page-actions {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.exam-page-actions button {
    max-width: 180px;
}

.exam-review-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.exam-review-actions.sticky {
    position: sticky;
    top: 10px;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 12px;
    backdrop-filter: blur(4px);
}

.exam-result-summary {
    margin-bottom: 10px;
    border-left: 4px solid #2563eb;
    background: #eff6ff;
}

@media (max-width: 900px) {
    .exam-options-grid {
        grid-template-columns: 1fr;
    }

    .exam-review-actions.sticky {
        top: 6px;
        padding: 8px;
    }
}

@media (max-width: 900px) {
    main {
        padding: 14px;
    }

    header {
        padding: 14px;
    }

    .site-nav-drawer a {
        font-size: 13px;
        padding: 7px 10px;
    }

    .panel {
        padding: 14px;
    }

    .dashboard-radars-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .schedule-table th,
    .schedule-table td {
        min-width: 0;
    }
}

/* Role-based accent colors */
body.role-student header {
    background: linear-gradient(90deg, #1e3a8a 0%, #1d4ed8 100%);
}

body.role-teacher header {
    background: linear-gradient(90deg, #115e59 0%, #0f766e 100%);
}

body.role-admin header {
    background: linear-gradient(90deg, #7c2d12 0%, #b45309 100%);
}

body.role-parent header {
    background: linear-gradient(90deg, #4c1d95 0%, #7c3aed 100%);
}

body.role-parent .btn-link,
body.role-parent button[type="submit"] {
    background: linear-gradient(90deg, #6d28d9 0%, #7c3aed 100%);
}

.parent-notification-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.parent-notification-item {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.parent-notification-item.unread {
    border-color: #c4b5fd;
    background: #f5f3ff;
}

.parent-linked-students {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.parent-student-card {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #dbe4f0;
    background: #fff;
}

.parent-student-radar-panel {
    overflow-x: auto;
}

.parent-student-radar-panel .dashboard-radars-grid {
    min-width: min(100%, 640px);
}

body.role-parent .parent-student-radar-panel h3 {
    margin-top: 0;
}

body.role-student .btn-link,
body.role-student button {
    background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
}

body.role-teacher .btn-link,
body.role-teacher button {
    background: linear-gradient(90deg, #0f766e 0%, #0d9488 100%);
}

body.role-teacher .btn-link.secondary {
    background: linear-gradient(90deg, #7c3aed 0%, #6d28d9 100%);
}

body.role-admin .btn-link,
body.role-admin button {
    background: linear-gradient(90deg, #b45309 0%, #d97706 100%);
}

/* Automatic dark theme from system preference */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(180deg, #0b1220 0%, #111a2d 100%);
        color: #e5e7eb;
    }

    .panel,
    .card,
    table,
    input,
    select,
    textarea {
        background: #111827;
        color: #e5e7eb;
        border-color: #2b3648;
    }

    th {
        background: #172033;
        color: #dbeafe;
    }

    td {
        border-color: #2b3648;
    }

    tr:nth-child(even) td {
        background: #0f172a;
    }

    label,
    .auth-panel p,
    .stat-card h3 {
        color: #cbd5e1;
    }

    .flow-item {
        background: #0f172a;
        border-color: #334155;
        color: #dbeafe;
    }

    .slot {
        border-color: #334155;
    }

    .slot-free {
        background: #0c2a1f;
    }

    .slot-booked {
        background: #331515;
    }

    .muted {
        color: #94a3b8;
    }
}

.content-topics-filter {
    margin-bottom: 18px;
    align-items: end;
}

.content-topics-filter .filter-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: center;
    grid-column: 1 / -1;
}

.content-topics-filter .filter-actions button,
.content-topics-filter .filter-actions .btn-link {
    flex: 1 1 0;
    min-width: 180px;
    max-width: 320px;
    margin: 0;
    padding: 10px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(90deg, #0f766e 0%, #0d9488 100%);
    color: #fff;
    text-decoration: none;
}

.content-topics-filter .filter-actions .btn-link.secondary {
    background: linear-gradient(90deg, #0f766e 0%, #0d9488 100%);
}

/* Mevcut Konular tablosu — Excel benzeri sütun süzgeci */
.content-topics-table {
    position: relative;
}

.content-topics-table .col-filter-head {
    position: relative;
    vertical-align: bottom;
    white-space: nowrap;
}

.content-topics-table .col-filter-head-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    padding: 4px 2px;
    border-radius: 6px;
}

.content-topics-table .col-filter-head:hover .col-filter-head-inner {
    background: rgba(37, 99, 235, 0.08);
}

.content-topics-table .col-filter-icon {
    font-size: 10px;
    color: #64748b;
    line-height: 1;
    user-select: none;
}

.content-topics-table .col-filter-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 220px;
    max-width: min(320px, 85vw);
    max-height: 320px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    z-index: 50;
    text-align: left;
    font-weight: 400;
}

.content-topics-table .col-filter-panel[hidden] {
    display: none !important;
}

.content-topics-table .col-filter-search {
    width: 100%;
    margin: 0;
    padding: 8px;
    font-size: 13px;
}

.content-topics-table .col-filter-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.content-topics-table .col-filter-actions button {
    flex: 1;
    margin: 0;
    padding: 6px 8px;
    font-size: 12px;
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.content-topics-table .col-filter-actions button:hover {
    background: #e2e8f0;
}

.content-topics-table .col-filter-list {
    overflow-y: auto;
    max-height: 180px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
    background: #fafafa;
}

.content-topics-table .col-filter-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 2px;
    font-size: 13px;
    line-height: 1.35;
    border-radius: 4px;
}

.content-topics-table .col-filter-row:hover {
    background: #fff;
}

.content-topics-table .col-filter-row input {
    width: auto;
    margin: 2px 0 0;
    flex-shrink: 0;
}

.content-topics-table .col-filter-apply {
    margin: 0;
    padding: 8px;
    font-size: 13px;
}

.content-topics-table th.col-filter-head.panel-open .col-filter-head-inner {
    background: rgba(37, 99, 235, 0.12);
}

.content-col-filter-hint {
    margin: 12px 0 0;
    font-size: 13px;
}

button.linklike,
.linklike {
    background: none;
    border: none;
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    padding: 0;
    margin: 0 0 0 8px;
    display: inline;
    width: auto;
}

button.linklike:hover,
.linklike:hover {
    color: #1d4ed8;
}

.content-question-edit {
    margin-top: 14px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    padding-top: 10px;
}

.content-question-edit-forms {
    margin-top: 10px;
    gap: 12px;
}

button.danger-btn,
.danger-btn {
    background: linear-gradient(90deg, #b91c1c, #991b1b);
    color: #fff;
    border: none;
}

button.danger-btn:hover,
.danger-btn:hover {
    filter: brightness(1.06);
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topic-content-page {
    white-space: pre-line;
    max-width: 980px;
    margin: 8px 0 0;
    padding-top: 12px;
}

.topic-content-page-title {
    margin: 0 0 8px;
    line-height: 1.25;
}

.topic-page-action-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.topic-page-action-row form {
    margin: 0;
}

.topic-page-action-row button {
    width: 100%;
    margin: 0;
}

.rich-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rich-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rich-editor-label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.rich-editor-toolbar button {
    width: auto;
    margin: 0;
    padding: 8px 10px;
}

.rich-editor-toolbar input[type="color"] {
    width: 42px;
    height: 36px;
    padding: 3px;
    margin: 0;
    border-radius: 8px;
}

.rich-editor-area {
    min-height: 220px;
    border: 1px solid #cdd8e5;
    border-radius: 10px;
    padding: 10px;
    background: #fff;
    line-height: 1.5;
}

.rich-editor-area:focus {
    outline: 2px solid #bfdbfe;
    border-color: #60a5fa;
}

td.topic-lesson-cell {
    vertical-align: middle;
    text-align: center;
}

.subject-roadmap-table .col-order,
.subject-roadmap-table .col-lesson {
    width: 1%;
    white-space: nowrap;
}

.subject-roadmap-table .col-order {
    text-align: center;
}

.subject-roadmap-table .col-topic {
    width: 20%;
    white-space: normal;
    min-width: 18ch;
}

.subject-roadmap-table .col-tests {
    width: auto;
}

.subject-roadmap-table td.col-order,
.subject-roadmap-table td.col-topic {
    vertical-align: middle;
}

.subject-roadmap-table td.col-tests {
    vertical-align: top;
}

.topic-lesson-stack {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.topic-lesson-row {
    line-height: 1.35;
    white-space: nowrap;
}

.topic-video-link {
    font-size: 20px;
    text-decoration: none;
}

.topic-video-player-wrap {
    background: #0f172a;
    border-radius: 12px;
    padding: 10px;
    position: relative;
}

.topic-video-player {
    width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    background: #000;
}

.topic-video-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0.88;
}

.topic-video-close-btn:hover {
    opacity: 1;
    background: rgba(185, 28, 28, 0.92);
}

.topic-video-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.topic-video-controls button {
    width: auto;
    margin: 0;
    padding: 8px 10px;
}

.topic-video-controls input[type="range"] {
    flex: 1;
    margin: 0;
}

video::-internal-media-controls-download-button {
    display: none !important;
}

video::-webkit-media-controls-enclosure {
    overflow: hidden;
}

.topic-video-exit-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    position: sticky;
    top: 8px;
    z-index: 5;
    background: #fff;
    padding-bottom: 6px;
}

.topic-video-cell {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.topic-video-cell .inline-form {
    margin: 0;
}

.video-upload-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-upload-row input[type="file"] {
    margin: 0;
    padding: 6px;
    flex: 1;
    min-width: 120px;
}

.video-upload-row button {
    margin: 0;
    width: auto;
    min-width: 110px;
}

.video-upload-progress {
    font-size: 12px;
    color: #334155;
    min-height: 16px;
}

.confirm-modal[hidden] {
    display: none;
}

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
}

.confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.confirm-modal-card {
    position: relative;
    z-index: 1;
    width: min(92vw, 420px);
    margin: 20vh auto 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #dbe5f2;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.25);
    padding: 16px;
}

.confirm-modal-card h4 {
    margin: 0 0 8px;
}

.confirm-modal-card p {
    margin: 0 0 12px;
    color: #334155;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.confirm-modal-actions button {
    width: auto;
    margin: 0;
    min-width: 92px;
}

.section-head-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.section-head-actions h3 {
    margin: 0;
}

.section-head-btns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-head-btns button {
    width: auto;
    margin: 0;
    min-width: 88px;
}

.admin-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-users-table {
    min-width: 1680px;
}

.admin-users-table th,
.admin-users-table td {
    vertical-align: top;
}

.admin-users-table input,
.admin-users-table select,
.admin-users-table textarea {
    min-width: 88px;
    width: 100%;
    margin: 0;
}

.admin-password-input {
    min-width: 120px;
}

.admin-password-status {
    display: block;
    margin-bottom: 4px;
}

.name-split-cell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.name-split-cell input {
    margin: 0;
}

.lesson-room-container {
    width: 100%;
    min-height: 680px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d7e2ef;
}

.hero-actions button {
    width: auto;
}

.lesson-room-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: #334155;
    padding: 16px;
}

.mock-exams-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mock-exams-table {
    min-width: 1080px;
}

.mock-exams-mobile-list {
    display: none;
}

.mock-exam-mobile-card {
    background: #fff;
    border: 1px solid #dbe5f2;
    border-radius: 12px;
    padding: 12px;
    margin-top: 12px;
}

.mock-exam-mobile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.mock-exam-mobile-head h3 {
    margin: 0;
    font-size: 16px;
}

.mock-exam-mobile-status {
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1e3a8a;
    white-space: nowrap;
}

.mock-exam-mobile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    color: #475569;
    font-size: 12px;
}

.mock-exam-mobile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.mock-exam-mobile-stats div {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px;
    text-align: center;
}

.mock-exam-mobile-stats small {
    display: block;
    color: #64748b;
    font-size: 11px;
}

.mock-exam-mobile-stats strong {
    display: block;
    margin-top: 3px;
    font-size: 14px;
}

.mock-exam-mobile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.mock-exam-mobile-actions .btn-link {
    flex: 1 1 140px;
    text-align: center;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .header-top-row {
        align-items: flex-start;
    }

    .header-left-group,
    .header-top-right {
        width: 100%;
    }

    .header-top-right {
        margin-left: 0;
        justify-content: flex-start;
    }

    .subscription-pill {
        width: 100%;
        border-radius: 12px;
    }

    .mobile-preview-toggle {
        width: auto;
    }

    .site-assistant {
        right: 10px;
        bottom: 10px;
    }

    .assistant-panel {
        width: min(320px, calc(100vw - 20px));
    }

    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .schedule-table th,
    .schedule-table td {
        min-width: 130px;
    }

    .teacher-profile-photo-side,
    .teacher-profile-photo-frame,
    .student-profile-photo-side,
    .student-profile-photo-frame {
        width: min(220px, 100%);
    }

    .topic-page-action-row {
        grid-template-columns: 1fr;
    }

    .content-topics-filter .filter-actions {
        flex-wrap: wrap;
    }

    .content-topics-filter .filter-actions button,
    .content-topics-filter .filter-actions .btn-link {
        min-width: 0;
        max-width: none;
        flex: 1 1 100%;
    }

    .lesson-room-container {
        min-height: 60vh;
    }

    .mock-exams-table-wrap {
        display: none;
    }

    .mock-exams-mobile-list {
        display: block;
    }
}

/* Test gecmisi soru detayi */
.history-detail-link {
    color: #b91c1c;
    font-weight: 700;
    text-decoration: underline;
}

.history-detail-link:hover {
    color: #7f1d1d;
}

.history-learned-badge {
    display: inline-block;
    min-width: 22px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-weight: 700;
    font-size: 0.82rem;
    text-align: center;
}

.attempt-question-card {
    border-left: 4px solid #e2e8f0;
}

.attempt-question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.attempt-question-no {
    font-weight: 700;
    color: #334155;
}

.attempt-status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.attempt-status-badge.is-wrong {
    background: #fee2e2;
    color: #b91c1c;
}

.attempt-status-badge.is-skipped {
    background: #fef3c7;
    color: #92400e;
}

.attempt-question-text {
    font-size: 1rem;
    margin-bottom: 12px;
}

.attempt-options {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.attempt-option {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.attempt-option.is-correct {
    border-color: #16a34a;
    background: #f0fdf4;
}

.attempt-option.is-given-wrong {
    border-color: #dc2626;
    background: #fef2f2;
}

.attempt-option-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.attempt-option-label input[type="radio"] {
    margin-top: 4px;
}

.opt-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.opt-tag-correct {
    background: #dcfce7;
    color: #166534;
}

.opt-tag-given {
    background: #e0e7ff;
    color: #3730a3;
}

.attempt-answer-line {
    font-size: 0.92rem;
    color: #334155;
    margin-bottom: 10px;
}

.attempt-solution {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 10px 12px;
}

.attempt-solution-label {
    display: inline-block;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.solution-view-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.solution-bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    background: #f1f5f9;
    border-radius: 10px;
    margin: 10px 0;
}

.solution-manage-box {
    margin-top: 10px;
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.solution-status-line,
.solution-action-row,
.solution-video-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.solution-video-row {
    flex-direction: column;
    align-items: flex-start;
}

.availability-row {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.availability-fields {
    flex: 1;
    min-width: 280px;
    margin: 0;
}

.availability-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    width: 240px;
}

.availability-action-btn {
    width: 100%;
}

.date-picker-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.date-picker-row input[type="date"] {
    flex: 1;
}

.selected-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.date-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
}

.date-chip-remove {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: #475569;
    padding: 0;
}

.date-chip-remove:hover {
    color: #b91c1c;
}

.notif-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notif-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    background: #f8fafc;
}

.notif-item.notif-new {
    border-color: #2563eb;
    background: #eff6ff;
}

.notif-item strong {
    display: block;
    margin-bottom: 2px;
}

.teacher-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.teacher-menu-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 20px;
    background: #ffffff;
    border: 1px solid #e7edf5;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.teacher-menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px rgba(31, 41, 55, 0.14);
    border-color: #2563eb;
}

.teacher-menu-icon {
    font-size: 2rem;
    line-height: 1;
}

.teacher-menu-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1f2937;
}

.teacher-menu-desc {
    font-size: 0.9rem;
    color: #6b7280;
}

.teacher-menu-card-logout:hover {
    border-color: #dc2626;
}

.teacher-menu-card-logout .teacher-menu-title {
    color: #dc2626;
}

.showcase-panel {
    padding: 16px;
}

.showcase-carousel {
    position: relative;
}

.showcase-track {
    position: relative;
}

.showcase-slide {
    display: none;
    margin: 0;
    animation: showcaseFade 0.6s ease;
}

.showcase-slide.is-active {
    display: block;
}

.showcase-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid #e7edf5;
    box-shadow: 0 12px 28px rgba(31, 41, 55, 0.10);
}

.showcase-slide figcaption {
    margin-top: 14px;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
}

.showcase-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.showcase-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.showcase-dot.is-active {
    background: #2563eb;
    transform: scale(1.25);
}

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

.group-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.group-actions form {
    margin: 0;
}

.group-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.group-status-approved {
    background: #dcfce7;
    color: #166534;
}

.group-status-pending {
    background: #fef3c7;
    color: #92400e;
}

.homework-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.homework-card {
    border: 1px solid #e7edf5;
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
}

.homework-card.homework-done {
    border-color: #86efac;
    background: #f0fdf4;
}

.homework-card.homework-overdue {
    border-color: #fca5a5;
    background: #fef2f2;
}

.homework-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.homework-type-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.78rem;
    font-weight: 700;
}

.homework-due {
    font-size: 0.88rem;
    color: #6b7280;
}

.homework-status {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.homework-status.ok { background: #dcfce7; color: #166534; }
.homework-status.warn { background: #fef3c7; color: #92400e; }
.homework-status.late { background: #fee2e2; color: #991b1b; }

.homework-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    gap: 10px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar-sm {
    height: 9px;
    margin-top: 4px;
    min-width: 90px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #22c55e);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.coach-student-block {
    border-top: 1px solid #eef2f7;
    padding-top: 14px;
    margin-top: 14px;
}

.coach-student-block:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.pdf-import-help {
    margin-top: 16px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e7edf5;
    border-radius: 12px;
}

.pdf-import-help ul {
    margin: 8px 0 8px 18px;
    padding: 0;
}

.pdf-import-help code {
    background: #eef2f7;
    padding: 1px 6px;
    border-radius: 6px;
    font-size: 0.86rem;
}

.pdf-q-card {
    border: 1px solid #e7edf5;
    border-radius: 12px;
    padding: 14px;
    margin-top: 14px;
    background: #ffffff;
}

.pdf-q-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.pdf-q-include {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pdf-q-warn {
    background: #fef3c7;
    color: #92400e;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.pdf-q-card textarea,
.pdf-q-card input[type="text"] {
    width: 100%;
}

.pdf-q-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.pdf-opt {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-opt-letter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    min-width: 46px;
}

.pdf-import-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

@media (max-width: 640px) {
    .pdf-q-options {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---- Canli Ders (Live Lesson) ---- */
.join-live-btn {
    display: inline-block;
    background: #16a34a;
    color: #fff;
    padding: 6px 16px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}
.join-live-btn:hover { background: #15803d; }

.live-room-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.live-room-head-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.live-timer {
    font-size: 1.3rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: #0f172a;
    color: #fff;
    padding: 4px 14px;
    border-radius: 999px;
}

.live-room-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 16px;
    align-items: start;
}
.live-video-wrap {
    position: relative;
    background: #0f172a;
    border-radius: 14px;
    overflow: hidden;
    min-height: 70vh;
}
.jitsi-container {
    width: 100%;
    height: 70vh;
}
.jitsi-container iframe { border: 0; width: 100%; height: 100%; }
.live-ended-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 20;
}
.live-ended-overlay:not([hidden]) {
    display: flex;
}

.live-sidebar {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 78vh;
    overflow-y: auto;
}
.live-card {
    background: #fff;
    border: 1px solid #e7edf5;
    border-radius: 14px;
    padding: 14px;
}
.live-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.live-card-head h3 { margin: 0; font-size: 1.05rem; }

.live-action-btn {
    width: 100%;
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 9px 12px;
    border-radius: 9px;
    font-weight: 700;
    cursor: pointer;
}
.live-action-btn:hover { background: #1d4ed8; }
.live-action-btn:disabled { opacity: 0.6; cursor: default; }

.live-roster {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}
.live-roster li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
}
.live-roster .muted { margin-left: auto; font-size: 0.8rem; }
.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}
.live-dot.online { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,0.18); }
.live-dot.offline { background: #cbd5e1; }

#live-poll-question {
    width: 100%;
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}
.live-poll-q { font-weight: 700; margin: 0 0 8px; }
.live-poll-hint { font-size: 0.82rem; color: #64748b; margin: 10px 0 6px; }
.live-poll-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}
.live-count-chip {
    background: #eef2f7;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
}
.live-correct-picker { display: flex; gap: 6px; }
.live-correct-picker button {
    flex: 1;
    padding: 8px 0;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
}
.live-correct-picker button:hover { background: #dcfce7; border-color: #16a34a; }

.live-results-block { margin-top: 10px; }
.live-results-block ul { list-style: none; margin: 4px 0 0; padding: 0; }
.live-results-block li { font-size: 0.88rem; padding: 2px 0; }
.live-results-correct strong { color: #16a34a; }
.live-results-wrong strong { color: #dc2626; }
.live-results-blank strong { color: #64748b; }

.live-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.live-options button {
    padding: 18px 0;
    font-size: 1.4rem;
    font-weight: 800;
    border: 2px solid #cbd5e1;
    background: #f8fafc;
    border-radius: 12px;
    cursor: pointer;
}
.live-options button:hover { border-color: #2563eb; background: #eff6ff; }
.live-options button.is-selected { border-color: #2563eb; background: #2563eb; color: #fff; }

.live-poll-status { margin-top: 10px; font-weight: 700; color: #2563eb; }
.live-poll-result-line { margin: 6px 0 0; font-weight: 700; }
.live-poll-result-line.is-correct { color: #16a34a; }
.live-poll-result-line.is-wrong { color: #dc2626; }

@media (max-width: 900px) {
    .live-room-layout { grid-template-columns: minmax(0, 1fr); }
    .live-sidebar { max-height: none; }
    .jitsi-container, .live-video-wrap { height: 55vh; min-height: 55vh; }
}

.development-chart-panel {
    overflow: hidden;
}
.development-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.development-period-tabs {
    display: inline-flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 999px;
}
.development-period-tab {
    text-decoration: none;
    color: #475569;
    font-weight: 700;
    font-size: 0.86rem;
    padding: 6px 14px;
    border-radius: 999px;
}
.development-period-tab.is-active {
    background: #0f172a;
    color: #fff;
}
.development-chart-wrap {
    width: 100%;
    overflow-x: auto;
}
.development-chart-svg {
    width: 100%;
    min-width: 480px;
    height: auto;
    display: block;
}
.development-grid-line {
    stroke: #e2e8f0;
    stroke-width: 1;
}
.development-axis-label {
    fill: #64748b;
    font-size: 11px;
}
.development-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin-top: 10px;
}
.development-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
}
.development-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}
.development-subject-bars {
    margin-top: 16px;
    display: grid;
    gap: 8px;
}
.development-bar-row {
    display: grid;
    grid-template-columns: minmax(90px, 140px) 1fr 56px;
    align-items: center;
    gap: 10px;
}
.development-bar-label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
}
.development-bar-track {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}
.development-bar-fill {
    height: 100%;
    border-radius: 999px;
    min-width: 0;
}
.development-bar-pct {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    text-align: right;
}
@media (max-width: 640px) {
    .development-bar-row {
        grid-template-columns: minmax(70px, 100px) 1fr 48px;
        gap: 6px;
    }
}

.private-teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.private-subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.private-subject-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.private-subject-card:hover,
.private-subject-card.is-selected {
    border-color: #93c5fd;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}
.private-subject-card.is-selected {
    background: #eff6ff;
}
.private-teacher-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.private-teacher-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}
.private-teacher-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}
.private-teacher-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: #e2e8f0;
}
.private-teacher-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.private-teacher-cta {
    margin-top: auto;
    font-size: 0.88rem;
    font-weight: 600;
    color: #2563eb;
}
.private-slot-btn {
    width: 100%;
    margin-top: 4px;
    padding: 5px 4px;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    font-size: 11px;
    cursor: pointer;
}
.private-slot-btn:hover,
.private-slot-btn.is-selected {
    background: #1d4ed8;
}
.slot.slot-selected {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}

.private-date-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.private-date-label {
    font-weight: 600;
    color: #334155;
}
.private-date-picker {
    position: relative;
    max-width: 340px;
}
.private-date-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
}
.private-date-trigger:hover,
.private-date-picker.is-open .private-date-trigger {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.private-date-trigger-icon {
    opacity: 0.75;
}
.private-calendar {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 300px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}
.private-calendar[hidden] {
    display: none !important;
}
.private-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.private-calendar-nav .nav-arrow:disabled {
    opacity: 0.35;
    pointer-events: none;
}
.private-calendar-weekdays,
.private-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.private-calendar-weekdays span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    padding: 4px 0;
}
.private-calendar-weekdays .is-weekend {
    color: #b45309;
    background: #fff7ed;
    border-radius: 6px;
}
.private-cal-day {
    aspect-ratio: 1;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f8fafc;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: default;
    padding: 0;
}
.private-cal-day.is-empty {
    background: transparent;
    border-color: transparent;
}
.private-cal-day.is-weekend {
    background: #fff7ed;
    color: #c2410c;
}
.private-cal-day.is-disabled {
    opacity: 0.45;
}
.private-cal-day.is-available {
    background: #ecfdf5;
    border-color: #86efac;
    color: #166534;
    cursor: pointer;
}
.private-cal-day.is-available.is-weekend {
    background: #ffedd5;
    border-color: #fdba74;
    color: #9a3412;
}
.private-cal-day.is-available:hover {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}
.private-cal-day.is-selected {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #fff !important;
}
.private-calendar-hint {
    margin: 10px 0 0;
    font-size: 0.8rem;
}

