@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --danger: #ef4444;
    --ok: #10b981;
    --warning: #f59e0b;
    --accent: #06b6d4;
    --shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.08), 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    /* Student and Public theme vars */
    --bg: #090d16;
    --surface: #121824;
    --surface-2: #1e293b;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: #1e293b;
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), 0 1px 3px 0 rgba(0, 0, 0, 0.3);

    /* Admin/Teacher theme vars (app.blade.php) */
    --ink: #f8fafc;
    --panel: #121824;
    --surface: #090d16;
    --surface-2: #1e293b;
}

/* Premium Dark Mode Form and Input Overrides */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--muted) !important;
}

[data-theme="dark"] select option {
    background-color: var(--surface) !important;
    color: var(--text) !important;
}

[data-theme="dark"] header {
    background: rgba(18, 24, 36, 0.94) !important;
}

/* Premium Dark Mode Auth Overrides */
[data-theme="dark"] body.auth-page {
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08) 0%, rgba(6, 182, 212, 0.04) 50%, #090d16 100%) !important;
}
[data-theme="dark"] .auth-card, 
[data-theme="dark"] .signup-card {
    background: #121824 !important;
    border-color: #1e293b !important;
}
[data-theme="dark"] .auth-shell .auth-brand {
    color: #f8fafc !important;
}
[data-theme="dark"] .auth-card-header h1, 
[data-theme="dark"] .signup-step h1 {
    color: #f8fafc !important;
}
[data-theme="dark"] .auth-card-header p, 
[data-theme="dark"] .signup-step-copy {
    color: #94a3b8 !important;
}
[data-theme="dark"] .auth-shell label {
    color: #cbd5e1 !important;
}
[data-theme="dark"] .auth-shell select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
}

/* Premium Dark Mode Dashboard Layout Overrides */
[data-theme="dark"] body.app-page {
    background: #090d16 !important;
    color: var(--ink) !important;
}

[data-theme="dark"] .app-topbar {
    background: rgba(18, 24, 36, 0.85) !important;
    border-bottom: 1px solid var(--line) !important;
}

[data-theme="dark"] .active-crumb {
    color: var(--ink) !important;
}

[data-theme="dark"] .button.secondary {
    background: var(--surface-2) !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .button.danger {
    background: #450a0a !important;
    color: #fca5a5 !important;
    border-color: #7f1d1d !important;
}

[data-theme="dark"] table {
    border-color: var(--line) !important;
}

[data-theme="dark"] th {
    background: var(--surface-2) !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] td {
    background: var(--panel) !important;
    color: var(--ink) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .alert {
    background: #064e3b !important;
    border-color: #047857 !important;
    color: #a7f3d0 !important;
}

[data-theme="dark"] .errors {
    background: #7f1d1d !important;
    border-color: #b91c1c !important;
    color: #fca5a5 !important;
}

/* 100% Dark Mode Absolute Coverage Overrides */
[data-theme="dark"] .card,
[data-theme="dark"] .panel,
[data-theme="dark"] .guide-form-card,
[data-theme="dark"] .class-group-card,
[data-theme="dark"] .class-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .welcome-card,
[data-theme="dark"] .landing-card,
[data-theme="dark"] .submodule-node,
[data-theme="dark"] .lesson-node,
[data-theme="dark"] .hero {
    background: var(--surface) !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
    box-shadow: var(--shadow) !important;
}

[data-theme="dark"] .study-modal,
[data-theme="dark"] .submodule-modal,
[data-theme="dark"] .lesson-modal,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .study-modal-overlay {
    background: var(--surface) !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
}

[data-theme="dark"] .switch-card,
[data-theme="dark"] .class-card-badge,
[data-theme="dark"] .study-font-tools,
[data-theme="dark"] .sidebar-toggle-btn,
[data-theme="dark"] .study-back-button {
    background: var(--surface-2) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
}

[data-theme="dark"] .portal-section,
[data-theme="dark"] .hero-section,
[data-theme="dark"] .welcome-section,
[data-theme="dark"] footer {
    background: #090d16 !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
}

/* Rich Text Editor Quill - Dark Theme styles */
[data-theme="dark"] .ql-toolbar,
[data-theme="dark"] .ql-container,
[data-theme="dark"] .ql-editor,
[data-theme="dark"] #quill-editor {
    background-color: var(--surface) !important;
    color: var(--text) !important;
    border-color: var(--line) !important;
}
[data-theme="dark"] .ql-stroke {
    stroke: var(--text) !important;
}
[data-theme="dark"] .ql-fill {
    fill: var(--text) !important;
}
[data-theme="dark"] .ql-picker {
    color: var(--text) !important;
}
[data-theme="dark"] .ql-picker-options {
    background-color: var(--surface-2) !important;
    border-color: var(--line) !important;
}

/* Explicit custom view classes override */
[data-theme="dark"] .analytics-kpi-card,
[data-theme="dark"] .analytics-section-card,
[data-theme="dark"] .analytic-list-item,
[data-theme="dark"] .audit-filters-bar,
[data-theme="dark"] .audit-event-card,
[data-theme="dark"] .audit-preview-grid,
[data-theme="dark"] .catalog-item-card,
[data-theme="dark"] .creation-card,
[data-theme="dark"] .admin-welcome-hero,
[data-theme="dark"] .admin-stat-card,
[data-theme="dark"] .checklist-panel,
[data-theme="dark"] .checklist-row,
[data-theme="dark"] .quicklink-card,
[data-theme="dark"] .deploy-kpi-card,
[data-theme="dark"] .deploy-phase-card,
[data-theme="dark"] .deploy-step-marker,
[data-theme="dark"] .check-line-item,
[data-theme="dark"] .smoke-check-tile,
[data-theme="dark"] .exam-form-card,
[data-theme="dark"] .question-edit-card,
[data-theme="dark"] .exams-filter-bar,
[data-theme="dark"] .exam-item-card,
[data-theme="dark"] .exam-detail-topbar,
[data-theme="dark"] .exam-section-card,
[data-theme="dark"] .question-card-item,
[data-theme="dark"] .option-indicator-row,
[data-theme="dark"] .drawer-panel,
[data-theme="dark"] .ai-preview-card,
[data-theme="dark"] .package-card,
[data-theme="dark"] .import-json-area,
[data-theme="dark"] .fc-form-card,
[data-theme="dark"] .fc-kpi-card,
[data-theme="dark"] .proposal-card-item,
[data-theme="dark"] .fc-card-item,
[data-theme="dark"] .fc-card-face-box,
[data-theme="dark"] .qa-kpi-card,
[data-theme="dark"] .smoke-tile,
[data-theme="dark"] .flow-item-card,
[data-theme="dark"] .reports-kpi-card,
[data-theme="dark"] .reports-filter-bar,
[data-theme="dark"] .report-ticket-card,
[data-theme="dark"] .ticket-question-box,
[data-theme="dark"] .ticket-comment-box,
[data-theme="dark"] .ticket-action-form,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .codearea-input,
[data-theme="dark"] .lesson-edit-card,
[data-theme="dark"] .study-module-card,
[data-theme="dark"] .submodule-node,
[data-theme="dark"] .lesson-row-item,
[data-theme="dark"] .study-modal,
[data-theme="dark"] .preview-column,
[data-theme="dark"] .system-kpi-card,
[data-theme="dark"] .checks-panel,
[data-theme="dark"] .check-item-row,
[data-theme="dark"] .user-profile-card,
[data-theme="dark"] .admin-filter-bar,
[data-theme="dark"] .profile-hero-card,
[data-theme="dark"] .profile-section-card,
[data-theme="dark"] .attempt-list-item,
[data-theme="dark"] .gb-kpi-card,
[data-theme="dark"] .gradebook-filter-bar,
[data-theme="dark"] .matrix-table-container,
[data-theme="dark"] .sticky-col,
[data-theme="dark"] .class-card-premium,
[data-theme="dark"] .class-card-code,
[data-theme="dark"] .stat-card-premium,
[data-theme="dark"] .premium-panel,
[data-theme="dark"] .premium-mini-form,
[data-theme="dark"] .teacher-action-card,
[data-theme="dark"] .teacher-panel,
[data-theme="dark"] .guide-form-card,
[data-theme="dark"] .class-group-card,
[data-theme="dark"] .guide-row-item,
[data-theme="dark"] .timeline-node,
[data-theme="dark"] .completed,
[data-theme="dark"] .study-reader-shell,
[data-theme="dark"] .study-reader-topbar,
[data-theme="dark"] .study-reader-sidebar,
[data-theme="dark"] .study-reader-ad-sidebar,
[data-theme="dark"] .study-reader-summary,
[data-theme="dark"] .empty-state {
    background: var(--surface) !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
    box-shadow: var(--shadow) !important;
}

/* High-specificity Attribute Selector Overrides for Inline Backgrounds (matches background & background-color) */
[data-theme="dark"] *[style*="background"][style*="#fff"],
[data-theme="dark"] *[style*="background"][style*="white"],
[data-theme="dark"] *[style*="background"][style*="#f8fafc"],
[data-theme="dark"] *[style*="background"][style*="#f1f5f9"],
[data-theme="dark"] *[style*="background"][style*="255, 255, 255"],
[data-theme="dark"] *[style*="background"][style*="255,255,255"],
[data-theme="dark"] *[style*="background"][style*="248, 250, 252"],
[data-theme="dark"] *[style*="background"][style*="241, 245, 249"] {
    background-color: var(--surface) !important;
    background: var(--surface) !important;
    border-color: var(--line) !important;
    color: var(--text) !important;
}

/* General text color force for dark mode readability */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] p,
[data-theme="dark"] span:not(.pill),
[data-theme="dark"] strong,
[data-theme="dark"] small,
[data-theme="dark"] label,
[data-theme="dark"] a:not(.button) {
    color: var(--text) !important;
}

/* High-specificity Attribute Selector Overrides for Inline Text Colors */
[data-theme="dark"] *[style*="color: #0f172a"],
[data-theme="dark"] *[style*="color:#0f172a"],
[data-theme="dark"] *[style*="color: #1e293b"],
[data-theme="dark"] *[style*="color:#1e293b"],
[data-theme="dark"] *[style*="color: #334155"],
[data-theme="dark"] *[style*="color:#334155"],
[data-theme="dark"] *[style*="color: #475569"],
[data-theme="dark"] *[style*="color:#475569"] {
    color: var(--text) !important;
}

/* Sidebar Menu category readability fix */
[data-theme="dark"] .menu-category {
    color: var(--muted) !important;
}

/* Text Muted overrides */
[data-theme="dark"] .muted,
[data-theme="dark"] .text-muted,
[data-theme="dark"] p.muted,
[data-theme="dark"] *[style*="color: #64748b"],
[data-theme="dark"] *[style*="color:#64748b"],
[data-theme="dark"] *[style*="color: #94a3b8"],
[data-theme="dark"] *[style*="color:#94a3b8"] {
    color: var(--muted) !important;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text);
    margin-top: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 8px;
    font-size: 13px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
}

.nav a:hover {
    color: var(--primary);
}

.nav-user {
    color: var(--text);
    font-weight: 600;
}

.page {
    width: min(1120px, calc(100% - 32px));
    margin: 28px auto 56px;
}

.hero {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 24px;
    align-items: stretch;
}

.panel,
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow);
    transition: var(--transition, all 0.2s ease);
}

.panel {
    padding: 28px;
}

.card {
    padding: 20px;
}

.stack {
    display: grid;
    gap: 16px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

h1,
h2,
h3 {
    margin: 0 0 12px;
    line-height: 1.15;
}

h1 {
    font-size: 34px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 18px;
}

p {
    margin: 0 0 12px;
}

.muted {
    color: var(--muted);
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metric strong {
    font-size: 32px;
}

.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 4px 10px;
    color: #0f172a;
    background: var(--surface-2);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.badge.ok {
    color: #065f46;
    background: #d1fae5;
}

.badge.warn {
    color: #92400e;
    background: #fef3c7;
}

.badge.off {
    color: #991b1b;
    background: #fee2e2;
}

form {
    display: grid;
    gap: 14px;
}

.field {
    display: grid;
    gap: 6px;
}

label {
    font-size: 13px;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius, 8px);
    font: inherit;
    transition: var(--transition, all 0.2s ease);
}

textarea {
    min-height: 96px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(79, 70, 229, 0.15);
    box-shadow: 0 0 0 1px var(--primary);
}

.check-row,
.option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.check-row input,
.option-row input[type="radio"] {
    width: auto;
    min-height: auto;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.button,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    color: #fff;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius, 8px);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition, all 0.2s ease);
}

.button:hover,
button:hover {
    background: var(--primary-dark);
}

.button.secondary {
    color: var(--text);
    background: #fff;
    border-color: var(--line);
}

.button.secondary:hover {
    color: var(--primary);
    background: var(--surface-2);
}

.button.ghost {
    min-height: 34px;
    padding: 7px 10px;
    color: var(--text);
    background: #fff;
    border-color: var(--line);
}

.button.danger {
    background: var(--danger);
    border-color: var(--danger);
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    color: #075985;
    font-weight: 700;
}

.alert.error {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fecaca;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    color: var(--muted);
    background: var(--surface-2);
    font-size: 13px;
}

tr:last-child td {
    border-bottom: 0;
}

.exam-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
}

.timer {
    position: sticky;
    top: 86px;
}

.timer strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
}

.question {
    display: grid;
    gap: 12px;
}

.options {
    display: grid;
    gap: 10px;
}

.option-card {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.option-card input {
    width: auto;
    min-height: auto;
    margin-top: 4px;
}

.empty {
    padding: 28px;
    color: var(--muted);
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #fff;
}

.landing-page {
    background:
        radial-gradient(circle at 55% 92%, rgba(45, 143, 227, 0.18), transparent 20%),
        radial-gradient(circle at 86% 30%, rgba(33, 191, 166, 0.12), transparent 25%),
        #fff;
}

.public-topbar {
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: 28px;
    min-height: 76px;
    padding: 0 max(32px, calc((100vw - 1424px) / 2));
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.public-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 28px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.public-logo {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 50%;
    font-weight: 800;
}

.public-nav,
.public-actions,
.landing-buttons,
.trust-row {
    display: flex;
    align-items: center;
}

.public-nav {
    justify-content: center;
    gap: 34px;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
}

.public-nav a:hover {
    color: var(--primary);
}

.public-actions {
    justify-content: flex-end;
    gap: 14px;
}

.landing-wrap {
    width: min(1424px, calc(100% - 48px));
    margin: 0 auto;
}

.landing-hero {
    display: grid;
    grid-template-columns: minmax(360px, 0.84fr) minmax(540px, 1.16fr);
    gap: 48px;
    align-items: center;
    min-height: calc(100vh - 76px);
    padding: 64px 0 44px;
}

.landing-copy {
    display: grid;
    gap: 24px;
}

.pill {
    display: inline-flex;
    width: fit-content;
    min-height: 36px;
    align-items: center;
    padding: 7px 16px;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.landing-copy h1 {
    max-width: 640px;
    margin: 0;
    color: var(--text);
    font-size: 60px;
    font-weight: 800;
    line-height: 1.22;
}

.landing-copy h1 span {
    color: var(--primary);
}

.landing-copy p {
    max-width: 560px;
    color: var(--muted);
    font-size: 21px;
    line-height: 1.35;
}

.landing-buttons {
    flex-wrap: wrap;
    gap: 16px;
}

.trust-row {
    flex-wrap: wrap;
    gap: 0;
    color: #4b5563;
    font-size: 15px;
}

.trust-row span {
    display: grid;
    width: 38px;
    height: 38px;
    margin-right: -8px;
    place-items: center;
    color: #111827;
    background: #e5e7eb;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
}

.trust-row strong {
    margin-left: 18px;
    font-weight: 600;
}

.landing-media {
    position: relative;
    min-height: 540px;
}

.hero-img {
    position: absolute;
    display: block;
    width: min(44%, 330px);
    height: 450px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 28px 70px rgba(17, 24, 39, 0.16);
}

.main-img {
    left: 12%;
    top: 36px;
}

.side-img {
    right: 0;
    top: 66px;
}

.progress-card,
.study-card {
    position: absolute;
    z-index: 2;
    display: grid;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(12px);
}

.progress-card {
    left: 4%;
    top: 52px;
    width: 140px;
    padding: 16px;
}

.progress-dot {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 50%;
    font-weight: 800;
}

.progress-track {
    height: 8px;
    overflow: hidden;
    background: #dbe2ea;
    border-radius: 999px;
}

.progress-track span {
    display: block;
    width: 78%;
    height: 100%;
    background: var(--primary);
    border-radius: inherit;
}

.progress-card small,
.study-card small,
.study-card span {
    color: #5b6675;
}

.study-card {
    right: 2%;
    bottom: 42px;
    width: 150px;
    padding: 16px 18px;
}

.study-card strong {
    font-size: 26px;
    line-height: 1;
}

.landing-band {
    display: grid;
    gap: 24px;
    padding: 40px 0 70px;
}

.anchor-offset {
    display: block;
    height: 0;
    position: relative;
    top: -86px;
    visibility: hidden;
}

.career-showcase {
    align-items: center;
    display: grid;
    justify-items: center;
}

.career-device {
    background: #ffffff;
    border: 1px solid #dce8f3;
    border-radius: 22px;
    box-shadow: 0 30px 80px rgba(15, 45, 82, 0.16);
    display: grid;
    gap: 18px;
    max-width: 560px;
    padding: 28px;
    position: relative;
    width: min(86%, 560px);
    z-index: 1;
}

.career-device::before {
    background: #f3f8fd;
    border: 1px solid #e2edf7;
    border-radius: 18px;
    content: "";
    inset: 14px;
    position: absolute;
    z-index: -1;
}

.career-device-head,
.career-device-footer {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.career-device-head span,
.career-device-footer small,
.career-focus-card span,
.career-mini-grid span,
.landing-section-head span,
.resources-cta span {
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.career-device-head strong {
    color: #0e2a4d;
    font-size: 20px;
}

.career-focus-card {
    background: linear-gradient(135deg, #0e2a4d 0%, #245f9b 100%);
    border-radius: 16px;
    color: #fff;
    display: grid;
    gap: 12px;
    padding: 24px;
}

.career-focus-card span {
    color: #9bd5ff;
}

.career-focus-card strong {
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.1;
}

.career-mini-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.career-mini-grid article {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(15, 45, 82, 0.06);
    display: grid;
    gap: 8px;
    min-height: 92px;
    padding: 16px;
}

.career-mini-grid strong {
    color: #0e2a4d;
    font-size: 18px;
}

.career-device-footer {
    border-top: 1px solid #e6eef6;
    padding-top: 16px;
}

.career-device-footer a {
    color: var(--primary);
    font-weight: 800;
}

.career-floating-card,
.career-progress-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(220, 232, 243, 0.95);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(15, 45, 82, 0.14);
    display: grid;
    gap: 8px;
    position: absolute;
    z-index: 2;
}

.career-floating-card {
    bottom: 48px;
    right: 2%;
    padding: 18px;
    width: 158px;
}

.career-floating-card strong {
    color: #0e2a4d;
    font-size: 30px;
    line-height: 1;
}

.career-floating-card small,
.career-floating-card span,
.career-progress-card small {
    color: #66758a;
}

.career-progress-card {
    left: 4%;
    padding: 16px;
    top: 62px;
    width: 156px;
}

.landing-section-head {
    display: grid;
    gap: 10px;
    max-width: 760px;
}

.landing-section-head h2,
.resources-cta h2 {
    color: #0e2a4d;
    font-size: clamp(32px, 4vw, 46px);
    letter-spacing: 0;
    line-height: 1.08;
    margin: 0;
}

.landing-section-head p,
.resources-cta p {
    color: #5c6c80;
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
}

.career-section,
.tools-section,
.resources-cta {
    display: grid;
    gap: 28px;
    padding: 72px 0;
}

.career-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.career-card {
    background: #fff;
    border: 1px solid #dfe9f3;
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(15, 45, 82, 0.08);
    display: grid;
    gap: 12px;
    min-height: 178px;
    padding: 20px;
}

.career-card > span {
    align-items: center;
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    width: 52px;
}

.career-card h3 {
    color: #0e2a4d;
    font-size: 20px;
    margin: 0;
}

.career-card p {
    color: #617186;
    line-height: 1.35;
    margin: 0;
}

.tone-blue > span { background: #2d8fe3; }
.tone-green > span { background: #1da36f; }
.tone-violet > span { background: #8b6bdc; }
.tone-amber > span { background: #c88718; }
.tone-navy > span { background: #0e2a4d; }
.tone-teal > span { background: #21a7a6; }

.how-section {
    background: #f5f9fd;
    border: 1px solid #e1ebf5;
    border-radius: 22px;
    margin: 20px 0;
    padding: 42px;
}

.how-grid,
.tools-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.how-grid article,
.tools-grid article {
    background: #fff;
    border: 1px solid #deebf6;
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(15, 45, 82, 0.07);
    display: grid;
    gap: 12px;
    padding: 22px;
}

.how-grid article > span {
    align-items: center;
    background: #e7f3fd;
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.how-grid h3,
.tools-grid h3 {
    color: #0e2a4d;
    font-size: 20px;
    margin: 0;
}

.how-grid p,
.tools-grid p {
    color: #5d6d81;
    line-height: 1.5;
    margin: 0;
}

.tools-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.resources-cta {
    align-items: center;
    background: #0e2a4d;
    border-radius: 22px;
    color: #fff;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 26px 0 76px;
    padding: 42px;
}

.resources-cta h2,
.resources-cta p {
    color: #fff;
}

.resources-cta span {
    color: #9bd5ff;
}

.teacher-landing-cta {
    gap: 32px;
}

.teacher-landing-benefits {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 22px;
}

.teacher-landing-benefits article {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    display: grid;
    gap: 6px;
    padding: 14px;
}

.teacher-landing-benefits strong {
    color: #fff;
    font-size: 14px;
}

.teacher-landing-benefits small {
    color: #d8ebff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.auth-page {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, rgba(79, 70, 229, 0.08), transparent 45%), var(--bg);
}

.auth-shell {
    display: grid;
    justify-items: center;
    align-content: start;
    min-height: 100vh;
    padding: clamp(24px, 5vh, 44px) 24px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: clamp(34px, 7vh, 68px);
    color: var(--text);
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 800;
    line-height: 1;
    font-family: 'Outfit', sans-serif;
}

.auth-logo {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 50%;
    font-size: 34px;
    font-weight: 800;
}

.auth-card {
    width: min(560px, 100%);
    padding: clamp(28px, 4vw, 46px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius, 12px);
    box-shadow: var(--shadow);
}

.auth-card-header {
    margin-bottom: 30px;
    text-align: center;
}

.auth-card h1 {
    margin-bottom: 8px;
    color: var(--text);
    text-align: center;
    font-size: 22px;
    font-weight: 800;
}

.auth-card-header p {
    max-width: 360px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.auth-card form {
    gap: 19px;
}

.auth-field {
    display: grid;
    gap: 9px;
}

.auth-field label {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.auth-field input {
    min-height: 44px;
    padding: 11px 13px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius, 8px);
    transition: var(--transition);
}

.auth-field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    outline: none;
    background: var(--surface);
}

.auth-field input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 8px;
}

.auth-actions button {
    min-width: 116px;
    min-height: 44px;
    color: #fff;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius, 8px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.auth-actions button:hover {
    color: #fff;
    transform: translateY(-1px);
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.auth-actions a,
.auth-register a {
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.auth-actions a:hover,
.auth-register a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.auth-register {
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}

.signup-page {
    min-height: 100vh;
    background: #eef5fb;
}

.signup-brand {
    position: fixed;
    top: 28px;
    left: 28px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #172033;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.signup-logo {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 50%;
    font-size: 24px;
    font-weight: 800;
}

.signup-shell {
    display: grid;
    justify-items: center;
    min-height: 100vh;
    padding: 144px 20px 46px;
}

.signup-progress {
    display: grid;
    grid-template-columns: repeat(5, 54px);
    justify-content: center;
    gap: 0;
    width: min(420px, 100%);
    margin: 0 0 72px;
    padding: 0;
    list-style: none;
}

.signup-progress li {
    position: relative;
    display: grid;
    place-items: center;
}

.signup-progress li::before {
    content: "";
    position: absolute;
    left: -50%;
    right: 50%;
    top: 50%;
    height: 2px;
    background: #cfd7e2;
    transform: translateY(-50%);
}

.signup-progress li:first-child::before {
    display: none;
}

.signup-progress span {
    position: relative;
    z-index: 1;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    background: #fff;
    border: 2px solid #ccd4df;
    border-radius: 50%;
}

.signup-progress span::after {
    content: "";
    width: 8px;
    height: 8px;
    background: transparent;
    border-radius: 50%;
}

.signup-progress .is-active span {
    border-color: var(--primary);
}

.signup-progress .is-active span::after {
    background: var(--primary);
}

.signup-progress .is-done::before,
.signup-progress .is-active::before {
    background: var(--primary);
}

.signup-progress .is-done span {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.signup-progress .is-done span::after {
    content: "✓";
    width: auto;
    height: auto;
    color: #fff;
    background: transparent;
    font-size: 15px;
    font-weight: 800;
}

.signup-card {
    width: min(540px, 100%);
    min-height: 318px;
    padding: 46px 32px 30px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.13);
}

.signup-card h1 {
    margin-bottom: 34px;
    color: #0d4f83;
    text-align: center;
    font-size: 21px;
    font-weight: 800;
}

.signup-step {
    display: none;
}

.signup-step.is-active {
    display: grid;
    gap: 18px;
}

.signup-note {
    margin: 4px 0 0;
    color: #001b44;
    font-size: 17px;
    line-height: 1.55;
}

.signup-field-grid {
    display: grid;
    gap: 13px;
}

.label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.label-row small,
.field-hint {
    color: #929bae;
    font-size: 11px;
    font-style: italic;
    font-weight: 500;
}

.field-hint {
    margin-top: -4px;
}

.email-status {
    min-height: 15px;
}

.email-status.is-error {
    color: #dc2626;
}

.email-status.is-ok {
    color: #047857;
}

.signup-card select {
    min-height: 44px;
    color: #29384c;
    border-color: #c8d2de;
    border-radius: 7px;
}

.signup-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
}

.signup-actions button {
    min-width: 116px;
}

.signup-summary {
    display: grid;
    gap: 6px;
    padding: 18px;
    background: #f3f8fc;
    border: 1px solid #d9e7f5;
    border-radius: 8px;
    text-align: center;
}

.signup-summary span {
    color: #5c6979;
}

.signup-summary strong {
    color: #0d4f83;
    font-size: 18px;
}

.account-type-picker {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 16px 0;
}

.account-type-picker label {
    cursor: pointer;
    display: block;
    min-width: 0;
    position: relative;
}

.account-type-picker input {
    opacity: 0;
    position: absolute;
}

.account-type-picker span {
    background: #f7fbff;
    border: 1px solid #d7e6f4;
    border-radius: 12px;
    display: grid;
    gap: 5px;
    min-height: 118px;
    padding: 16px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.account-type-picker strong {
    color: #102a46;
    font-size: 16px;
}

.account-type-picker small {
    color: #607187;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.account-type-picker input:checked + span {
    background: #eef7ff;
    border-color: #2e8fe6;
    box-shadow: 0 0 0 3px rgba(46, 143, 230, .12);
}

.signup-footer,
.signup-site {
    margin: 16px 0 0;
    color: #5d6879;
    font-size: 13px;
    text-align: center;
}

.signup-footer a,
.signup-site a {
    color: #1f83e0;
    font-weight: 500;
}

.signup-site {
    margin-top: 22px;
}

/* Registration redesign */
.signup-page {
    background:
        radial-gradient(circle at 50% -18%, rgba(45, 143, 227, 0.18), transparent 36%),
        linear-gradient(180deg, #f6fbff 0%, #eef5fb 52%, #eaf2f9 100%);
}

.signup-brand {
    position: absolute;
    top: 28px;
    left: max(24px, calc((100vw - 1180px) / 2));
    color: #11243d;
    font-size: clamp(24px, 2.2vw, 30px);
}

.signup-logo {
    width: 42px;
    height: 42px;
    box-shadow: 0 10px 22px rgba(45, 143, 227, 0.22);
}

.signup-shell {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 118px 24px 42px;
}

.signup-progress {
    grid-template-columns: repeat(5, minmax(76px, 1fr));
    width: min(560px, 100%);
    margin-bottom: 44px;
}

.signup-progress li {
    min-width: 0;
}

.signup-progress li::before {
    left: -50%;
    right: 50%;
    height: 3px;
    background: #d5dee9;
}

.signup-progress span {
    width: 34px;
    height: 34px;
    border-color: #c8d2de;
    box-shadow: 0 0 0 6px #eef5fb;
}

.signup-progress em {
    position: absolute;
    top: 46px;
    width: max-content;
    max-width: 82px;
    color: #6a7789;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    text-align: center;
}

.signup-progress .is-active em,
.signup-progress .is-done em {
    color: #145c94;
}

.signup-card {
    width: min(620px, 100%);
    min-height: 390px;
    padding: clamp(28px, 4vw, 46px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius, 14px);
    box-shadow: var(--shadow);
}

.signup-card h1 {
    margin-bottom: 8px;
    font-size: clamp(20px, 2vw, 24px);
    color: var(--text);
}

.signup-step.is-active {
    gap: 17px;
    animation: signupFade 0.18s ease-out;
}

.signup-step-copy {
    max-width: 430px;
    margin: 0 auto 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}

.signup-note {
    padding: 16px 18px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius, 10px);
    font-size: 15px;
}

.signup-field-grid {
    gap: 15px;
}

.signup-card .auth-field label,
.signup-card .label-row label {
    color: #45566c;
    font-weight: 700;
}

.signup-card .auth-field input,
.signup-card select {
    min-height: 46px;
    background: #fbfdff;
    border-color: #c9d4e2;
}

.signup-card .auth-field input:hover,
.signup-card select:hover {
    border-color: #aebdcd;
}

.signup-card .auth-field input:focus,
.signup-card select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 143, 227, 0.13);
    outline: none;
}

.field-hint {
    margin-top: -2px;
}

.signup-actions {
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #edf2f7;
}

.signup-actions button {
    min-width: 132px;
    min-height: 46px;
}

.signup-actions [data-register-next] {
    margin-left: auto;
    box-shadow: 0 12px 22px rgba(45, 143, 227, 0.18);
}

.signup-footer {
    margin-top: 20px;
}

.signup-site {
    margin-top: 14px;
}

@keyframes signupFade {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 820px) {
    .topbar,
    .nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar {
        padding: 14px 16px;
    }

    .hero,
    .split,
    .exam-shell,
    .landing-hero,
    .public-topbar {
        grid-template-columns: 1fr;
    }

    .public-topbar {
        gap: 14px;
        padding: 16px;
    }

    .public-nav,
    .public-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .landing-wrap {
        width: min(100% - 32px, 720px);
    }

    .landing-hero {
        min-height: auto;
        padding: 34px 0;
    }

    .landing-copy h1 {
        font-size: 38px;
    }

    .landing-copy p {
        font-size: 18px;
    }

    .landing-media {
        min-height: 720px;
    }

    .hero-img {
        width: 76%;
        height: 310px;
    }

    .main-img {
        left: 0;
        top: 70px;
    }

    .side-img {
        right: 0;
        top: 390px;
    }

    .progress-card {
        left: 8px;
        top: 10px;
    }

    .study-card {
        right: 8px;
        bottom: 0;
    }

    .auth-shell {
        min-height: 100dvh;
        padding: 24px 16px;
    }

    .auth-brand {
        margin-bottom: 30px;
    }

    .auth-logo {
        width: 48px;
        height: 48px;
    }

    .auth-card {
        padding: 28px 20px 24px;
    }

    .auth-card-header {
        margin-bottom: 24px;
    }

    .auth-actions {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .auth-actions button {
        width: 100%;
    }

    .auth-actions a {
        text-align: center;
    }

    .social-corner {
        right: 12px;
        bottom: 12px;
        grid-auto-flow: column;
        max-width: calc(100vw - 24px);
        overflow-x: auto;
    }

    .social-corner a {
        width: 38px;
        height: 38px;
        font-size: 11px;
    }

    .signup-brand {
        position: static;
        justify-self: start;
        margin: 18px 0 0 18px;
        font-size: 24px;
    }

    .signup-shell {
        min-height: auto;
        padding: 46px 16px 38px;
    }

    .signup-progress {
        grid-template-columns: repeat(5, minmax(38px, 52px));
        margin-bottom: 38px;
    }

    .signup-card {
        padding: 32px 20px 24px;
    }

    .signup-card h1 {
        margin-bottom: 24px;
        font-size: 19px;
    }

    .signup-note {
        font-size: 15px;
    }

    .signup-actions {
        flex-direction: column;
    }

    .signup-actions button {
        width: 100%;
    }

    .timer {
        position: static;
        order: -1;
    }

    h1 {
        font-size: 28px;
    }
}

@media (max-width: 820px) {
    .signup-brand {
        position: static;
        margin: 18px 18px 0;
        font-size: 24px;
    }

    .signup-logo {
        width: 38px;
        height: 38px;
    }

    .signup-shell {
        width: 100%;
        padding: 34px 16px 34px;
    }

    .signup-progress {
        grid-template-columns: repeat(5, minmax(44px, 1fr));
        width: 100%;
        margin-bottom: 42px;
    }

    .signup-progress span {
        width: 30px;
        height: 30px;
        box-shadow: 0 0 0 5px #eef5fb;
    }

    .signup-progress em {
        top: 42px;
        max-width: 58px;
        font-size: 10px;
    }

    .signup-card {
        min-height: auto;
        padding: 26px 18px 20px;
        border-radius: 12px;
    }

    .signup-card h1 {
        margin-bottom: 7px;
        font-size: 21px;
    }

    .signup-step-copy {
        margin-bottom: 8px;
        font-size: 13px;
    }

    .signup-note {
        padding: 13px 14px;
        font-size: 14px;
    }

    .signup-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 22px;
        padding-top: 16px;
    }

    .signup-actions button {
        width: 100%;
    }

    .signup-actions [data-register-next] {
        margin-left: 0;
        order: 1;
    }

    .signup-actions [data-register-back] {
        order: 2;
    }

    .account-type-picker {
        grid-template-columns: 1fr;
    }

    .account-type-picker span {
        min-height: auto;
    }
}

@media (max-width: 430px) {
    .signup-progress em {
        display: none;
    }

    .signup-progress {
        margin-bottom: 28px;
    }

    .signup-card {
        padding: 24px 16px 18px;
    }

    .label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }
}

.student-app {
    min-height: 100vh;
    color: #061f43;
    background: #fff;
}

.student-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    width: 100%;
    min-height: 76px;
    padding: 12px 24px;
    color: #fff;
    background: #102f56;
    box-shadow: 0 12px 28px rgba(6, 20, 46, 0.16);
}

.student-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
}

.student-logo {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    background: #2d8fe3;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
}

.student-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: center;
    margin-top: 0;
}

.student-menu a,
.student-sidebar-footer a,
.student-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 8px 10px;
    color: #f3f8ff;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.student-menu a:hover,
.student-sidebar-footer a:hover,
.student-menu a.is-active {
    background: #214b82;
}

.student-menu span,
.student-sidebar-footer span,
.student-user span {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    color: #d7ebff;
    border: 1px solid rgba(215, 235, 255, 0.82);
    border-radius: 4px;
    font-size: 10px;
    font-weight: 900;
}

.student-sidebar-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
    margin-top: 0;
}

.student-sidebar-footer small {
    display: none;
    margin: 0 0 6px 2px;
    color: #9ec5ec;
    font-size: 11px;
    font-weight: 800;
}

.student-user {
    max-width: 190px;
    margin-top: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.student-user.is-active {
    background: #214b82;
}

.student-user span {
    border-radius: 50%;
}

.student-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0 72px;
}

.student-hero {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) 350px;
    gap: 64px;
    align-items: center;
}

.student-intro h1,
.student-section h2 {
    margin: 0 0 24px;
    color: #062653;
    font-size: 38px;
    font-weight: 900;
    line-height: 1.08;
}

.student-intro p,
.student-intro li,
.student-section p {
    color: #001f49;
    font-size: 15px;
    line-height: 1.48;
}

.student-intro ol {
    display: grid;
    gap: 8px;
    margin: 16px 0;
    padding-left: 22px;
}

.student-action-list {
    display: grid;
    gap: 24px;
}

.student-action {
    display: grid;
    min-height: 62px;
    place-items: center;
    color: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(15, 23, 42, 0.24);
    font-size: 13px;
    font-weight: 900;
}

.student-action.blue {
    background: #2f91dd;
}

.student-action.cyan {
    background: #6cc4ee;
}

.student-action.violet {
    background: #9479df;
}

.student-rule {
    width: min(868px, 100%);
    height: 1px;
    margin: 78px auto 92px;
    background: #d8dfe8;
}

.student-section h2 {
    margin-bottom: 10px;
    font-size: 30px;
}

.student-notice,
.student-result,
.student-empty {
    width: 100%;
    margin-top: 30px;
    padding: 16px 18px;
    color: #034987;
    background: #d3eaff;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.11);
    font-size: 13px;
    font-weight: 800;
}

.student-result {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.student-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.student-stats article {
    display: grid;
    gap: 5px;
    padding: 18px;
    background: #f7fbff;
    border: 1px solid #ddebf7;
    border-radius: 8px;
}

.student-stats strong {
    color: #062653;
    font-size: 28px;
}

.student-stats span {
    color: #607086;
    font-size: 13px;
    font-weight: 700;
}

.analytics-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.analytics-header > div > span,
.analytics-latest span,
.analytics-overview article > span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.analytics-header h2 {
    margin-bottom: 10px;
}

.analytics-latest {
    display: grid;
    min-width: 230px;
    padding: 18px;
    background: #f7fbff;
    border: 1px solid #dceaf8;
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.analytics-latest strong {
    color: #062653;
    font-size: 30px;
    line-height: 1;
}

.analytics-latest small {
    margin-top: 6px;
    color: #607086;
    font-weight: 700;
}

.analytics-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 26px;
}

.analytics-overview article,
.analytics-panel {
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.analytics-overview article {
    display: grid;
    align-content: start;
    gap: 6px;
    min-height: 150px;
    padding: 18px;
}

.analytics-overview strong {
    color: #062653;
    font-size: 24px;
    line-height: 1.12;
}

.analytics-score-card strong {
    font-size: 34px;
}

.analytics-overview small {
    color: #607086;
    font-size: 13px;
    font-weight: 700;
}

.analytics-meter {
    height: 9px;
    overflow: hidden;
    background: #dce7f3;
    border-radius: 999px;
}

.analytics-meter span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #21bfa6);
    border-radius: inherit;
}

.analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    margin-top: 18px;
}

.analytics-panel {
    padding: 22px;
}

.analytics-panel h3 {
    color: #062653;
    font-size: 21px;
    font-weight: 900;
}

.analytics-panel p {
    color: #607086;
    font-size: 14px;
}

.analytics-category-list {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.analytics-category-list article {
    display: grid;
    gap: 9px;
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e1ecf6;
    border-radius: 8px;
}

.analytics-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.analytics-category-row strong {
    color: #062653;
}

.analytics-category-row span {
    color: var(--primary);
    font-weight: 900;
}

.analytics-category-list p {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
}

.analytics-advice {
    display: grid;
    align-content: start;
    gap: 12px;
}

.analytics-advice strong {
    color: #062653;
}

.statistics-main {
    padding-top: 66px;
}

.statistics-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.statistics-hero span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.statistics-hero h1 {
    margin: 0 0 10px;
    color: #062653;
    font-size: 42px;
    font-weight: 900;
}

.statistics-hero p {
    max-width: 720px;
    color: #42526b;
    font-size: 15px;
}

.statistics-kpis {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.statistics-kpis article,
.statistics-panel {
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.statistics-kpis article {
    display: grid;
    align-content: start;
    gap: 7px;
    min-height: 154px;
    padding: 18px;
}

.statistics-kpis span,
.statistics-last-box span,
.statistics-missed-list span {
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.statistics-kpis strong {
    color: #062653;
    font-size: 24px;
    line-height: 1.12;
}

.statistics-primary-kpi strong {
    font-size: 38px;
}

.statistics-kpis small {
    color: #607086;
    font-size: 13px;
    font-weight: 700;
}

.statistics-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
}

.statistics-lower {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    margin-top: 18px;
}

.statistics-panel {
    padding: 22px;
}

.statistics-panel h2 {
    margin-bottom: 8px;
    color: #062653;
    font-size: 24px;
    font-weight: 900;
}

.statistics-panel p {
    color: #607086;
    font-size: 14px;
}

.statistics-plan {
    display: grid;
    gap: 14px;
}

.statistics-plan strong {
    color: #062653;
}

.statistics-plan-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.statistics-last-box {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    padding: 16px;
    background: #f7fbff;
    border: 1px solid #dceaf8;
    border-radius: 8px;
}

.statistics-last-box strong {
    color: #062653;
    font-size: 30px;
}

.statistics-last-box small {
    color: #607086;
    font-weight: 700;
}

.statistics-trend {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.statistics-trend article {
    display: grid;
    gap: 8px;
    padding: 14px;
    background: #f8fbff;
    border: 1px solid #e1ecf6;
    border-radius: 8px;
}

.statistics-trend article > div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.statistics-trend strong {
    color: #062653;
    font-size: 22px;
}

.statistics-trend span,
.statistics-trend small {
    color: #607086;
    font-size: 13px;
    font-weight: 700;
}

.statistics-missed-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.statistics-missed-list article {
    display: grid;
    gap: 8px;
    padding: 14px;
    background: #fff8f8;
    border: 1px solid #f2dddd;
    border-radius: 8px;
}

.statistics-missed-list span {
    color: #b42318;
}

.statistics-missed-list p {
    margin: 0;
    color: #344154;
    font-weight: 700;
}

.resources-main {
    padding-top: 66px;
}

.resources-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 28px;
    align-items: end;
    margin-bottom: 24px;
}

.resources-hero > div > span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 10px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.resources-hero h1 {
    margin: 0 0 10px;
    color: #062653;
    font-size: 42px;
    font-weight: 900;
}

.resources-hero p {
    max-width: 720px;
    color: #42526b;
    font-size: 15px;
}

.resources-search-card {
    display: grid;
    gap: 4px;
    padding: 20px;
    background: #f7fbff;
    border: 1px solid #dceaf8;
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
}

.resources-search-card strong {
    color: #062653;
    font-size: 36px;
    line-height: 1;
}

.resources-search-card span {
    color: #66758a;
    font-size: 13px;
    font-weight: 800;
}

.resources-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dbe4ee;
}

.resources-filters a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 13px;
    color: #24405f;
    background: #fff;
    border: 1px solid #d8e3ef;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.resources-filters a.is-active,
.resources-filters a:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.resources-featured {
    margin-bottom: 34px;
}

.resources-featured h2,
.resources-library h2 {
    color: #062653;
    font-size: 28px;
    font-weight: 900;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.resources-grid.featured {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.resource-card {
    display: grid;
    gap: 14px;
    align-content: space-between;
    min-height: 260px;
    padding: 20px;
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.resource-card.is-featured {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    border-color: #cae3f8;
}

.resource-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.resource-card-top span {
    width: fit-content;
    padding: 6px 10px;
    color: #075985;
    background: #dff1ff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.resource-card-top small,
.resource-card > small {
    color: #66758a;
    font-weight: 800;
}

.resource-card h3 {
    color: #062653;
    font-size: 19px;
    line-height: 1.18;
}

.resource-card p {
    color: #5f6d80;
}

.resource-admin-list {
    display: grid;
    gap: 14px;
    max-height: 760px;
    overflow: auto;
    padding-right: 4px;
}

.student-section-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.student-exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 26px;
}

.student-exam-card {
    display: grid;
    gap: 16px;
    align-content: space-between;
    min-height: 230px;
    padding: 20px;
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.student-exam-card h3 {
    color: #062653;
}

.student-exam-card p {
    color: #5f6d80;
}

.student-exam-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #6a7789;
    font-size: 13px;
}

.student-exam-meta strong {
    color: #0d4f83;
}

.student-score {
    padding: 12px;
    background: #f3f8fd;
    border-radius: 7px;
    font-weight: 800;
}

.student-progress-line {
    height: 9px;
    overflow: hidden;
    background: #dce7f3;
    border-radius: 999px;
}

.student-progress-line span {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: inherit;
}

.student-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.student-card-actions form {
    display: inline-flex;
}

.student-card-actions .button {
    min-height: 38px;
}

.profile-main {
    padding-top: 72px;
}

.profile-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1fr);
    gap: 34px;
    align-items: start;
}

.profile-summary {
    display: grid;
    gap: 14px;
    padding-top: 16px;
}

.profile-summary > span {
    width: fit-content;
    padding: 7px 11px;
    color: #075985;
    background: #dff1ff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.profile-summary h1 {
    margin: 0;
    color: #062653;
    font-size: 40px;
    font-weight: 900;
    line-height: 1.08;
}

.profile-summary p {
    max-width: 440px;
    color: #42526b;
    font-size: 15px;
}

.profile-identity {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    padding: 18px;
    background: #f7fbff;
    border: 1px solid #dceaf8;
    border-radius: 8px;
}

.profile-identity strong {
    color: #062653;
    font-size: 18px;
}

.profile-identity small {
    color: #66758a;
    font-weight: 700;
}

.profile-card {
    padding: clamp(24px, 4vw, 34px);
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.profile-card h2 {
    margin-bottom: 22px;
    color: #062653;
    font-size: 24px;
    font-weight: 900;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.manage-flashcards-main {
    padding-top: 66px;
}

.manage-flashcards-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 34px;
    align-items: end;
    margin-bottom: 28px;
}

.manage-flashcards-header > div > span {
    width: fit-content;
    padding: 7px 11px;
    color: #075985;
    background: #dff1ff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.manage-flashcards-header h1 {
    margin: 12px 0 10px;
    color: #062653;
    font-size: 40px;
    font-weight: 900;
    line-height: 1.08;
}

.manage-flashcards-header p {
    max-width: 690px;
    color: #42526b;
    font-size: 15px;
}

.manage-flashcards-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.manage-flashcards-stats article {
    display: grid;
    gap: 4px;
    padding: 18px;
    background: #f7fbff;
    border: 1px solid #dceaf8;
    border-radius: 8px;
}

.manage-flashcards-stats strong {
    color: #062653;
    font-size: 30px;
    line-height: 1;
}

.manage-flashcards-stats span {
    color: #66758a;
    font-size: 13px;
    font-weight: 800;
}

.manage-flashcards-layout {
    display: grid;
    grid-template-columns: minmax(340px, 0.8fr) minmax(420px, 1.2fr);
    gap: 24px;
    align-items: start;
}

.manage-flashcards-form,
.manage-flashcards-list {
    padding: clamp(22px, 3vw, 30px);
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.manage-flashcards-form h2,
.manage-flashcards-list h2 {
    color: #062653;
    font-size: 24px;
    font-weight: 900;
}

.manage-flashcards-grid {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.manage-flashcard-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    background: #f8fbff;
    border: 1px solid #dfeaf5;
    border-radius: 8px;
}

.manage-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.manage-card-badges span {
    width: fit-content;
    padding: 5px 9px;
    color: #075985;
    background: #dff1ff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.manage-card-badges .is-shared {
    color: #047857;
    background: #d1fae5;
}

.manage-card-badges .is-private {
    color: #92400e;
    background: #fef3c7;
}

.manage-flashcard-card h3 {
    margin-bottom: 8px;
    color: #062653;
}

.manage-flashcard-card p {
    color: #5f6d80;
}

.flashcards-main {
    padding-top: 72px;
}

.flashcards-setup-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) 464px;
    gap: 92px;
    align-items: start;
    padding-top: 18px;
}

.flashcards-setup-copy h1 {
    margin: 0 0 8px;
    color: #062653;
    font-size: 40px;
    font-weight: 900;
    line-height: 1.08;
}

.flashcards-setup-copy h2 {
    margin: 18px 0 16px;
    color: #001f49;
    font-size: 15px;
    font-weight: 900;
}

.flashcards-setup-copy p {
    max-width: 820px;
    color: #001f49;
    font-size: 15px;
    line-height: 1.5;
}

.flashcards-options-panel {
    padding-top: 48px;
}

.flashcards-options-panel h2 {
    margin: 0 0 20px;
    color: #001f49;
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.flashcards-options-panel form {
    gap: 17px;
}

.flashcards-options-panel button {
    width: fit-content;
    min-height: 38px;
    padding: 8px 15px;
    font-size: 13px;
}

.flashcards-options-panel button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.flashcards-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 32px;
    align-items: end;
    margin-bottom: 28px;
}

.flashcards-hero h1 {
    margin: 8px 0 14px;
    color: #062653;
    font-size: 44px;
    font-weight: 900;
}

.flashcards-hero p {
    max-width: 680px;
    color: #42526b;
    font-size: 16px;
}

.flashcards-summary {
    display: grid;
    gap: 2px;
    padding: 20px;
    background: #f7fbff;
    border: 1px solid #dceaf8;
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.flashcards-summary strong {
    color: #062653;
    font-size: 36px;
    line-height: 1;
}

.flashcards-summary span {
    color: #66758a;
    font-size: 13px;
    font-weight: 800;
}

.flashcard-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dbe4ee;
}

.flashcard-filter-bar a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 13px;
    color: #24405f;
    background: #fff;
    border: 1px solid #d8e3ef;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.flashcard-filter-bar a.is-active,
.flashcard-filter-bar a:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.flashcard-filter-bar span {
    color: inherit;
    opacity: 0.72;
}

.flashcard-study-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.flashcards-session-actions {
    margin: -8px 0 24px;
}

.study-flashcard {
    display: grid;
    gap: 18px;
    align-content: start;
    min-height: 330px;
    padding: 22px;
    background: #fff;
    border: 1px solid #dfe7ef;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.study-flashcard.is-open {
    border-color: rgba(45, 143, 227, 0.42);
    box-shadow: 0 18px 34px rgba(15, 75, 130, 0.13);
}

.study-flashcard-top {
    display: grid;
    gap: 8px;
}

.study-flashcard-top span,
.study-flashcard-back span {
    width: fit-content;
    padding: 5px 9px;
    color: #075985;
    background: #dff1ff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.study-flashcard-top strong {
    color: #062653;
    font-size: 19px;
    line-height: 1.18;
}

.study-flashcard-front {
    min-height: 92px;
    padding: 16px;
    background: #f8fbff;
    border: 1px solid #e4edf7;
    border-radius: 8px;
}

.study-flashcard-front p,
.study-flashcard-back p {
    margin: 0;
    color: #1f3048;
}

.study-flashcard-back {
    display: grid;
    gap: 10px;
    padding: 16px;
    background: #eefbf7;
    border: 1px solid #c7efe2;
    border-radius: 8px;
}

.study-flashcard-back[hidden] {
    display: none;
}

.flashcard-admin-list {
    display: grid;
    gap: 14px;
    max-height: 720px;
    overflow: auto;
    padding-right: 4px;
}

.flashcard-session-page {
    min-height: 100vh;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(26, 74, 123, 0.96), rgba(18, 54, 98, 0.98)),
        #183f72;
}

.flashcard-session-main {
    min-height: 100vh;
}

.flashcard-session {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: clamp(22px, 4vw, 34px) clamp(16px, 3vw, 28px) clamp(38px, 6vw, 72px);
}

.flashcard-session-brand {
    position: absolute;
    top: clamp(18px, 3vw, 28px);
    left: clamp(16px, 3vw, 30px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #f5f9ff;
    font-size: 26px;
    font-weight: 800;
}

.flashcard-session-brand .student-logo {
    width: 34px;
    height: 34px;
}

.flashcard-session-exit {
    position: absolute;
    top: clamp(16px, 2.6vw, 24px);
    right: clamp(14px, 2.6vw, 24px);
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #dceeff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    font-size: 21px;
    font-weight: 900;
}

.flashcard-session-exit:hover {
    background: rgba(255, 255, 255, 0.14);
}

.flashcard-session-stage {
    display: grid;
    justify-items: center;
    align-content: start;
    width: min(560px, 100%);
    margin: 0 auto;
    padding-top: clamp(42px, 8vh, 72px);
}

.flashcard-session-counter {
    justify-self: end;
    margin: 0 4px 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.flashcard-session-counter strong {
    font-size: 18px;
}

.flashcard-session-progress {
    width: 100%;
    height: 7px;
    overflow: hidden;
    margin: 0 0 18px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.flashcard-session-progress span {
    display: block;
    width: 8%;
    height: 100%;
    background: #39a8f2;
    border-radius: inherit;
    transition: width 0.24s ease;
}

.flashcard-session-card {
    width: min(520px, 100%);
    min-height: clamp(260px, 38vw, 330px);
    perspective: 1200px;
}

.flashcard-session-card[hidden] {
    display: none;
}

.flashcard-inner {
    position: relative;
    min-height: clamp(260px, 38vw, 330px);
    transform-style: preserve-3d;
    transition: transform 0.62s cubic-bezier(0.2, 0.75, 0.2, 1);
}

.flashcard-session-card.is-reversed .flashcard-inner {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 24px;
    min-height: clamp(260px, 38vw, 330px);
    align-items: center;
    padding: clamp(24px, 4vw, 42px);
    color: #071f49;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid rgba(218, 231, 244, 0.9);
    border-radius: 10px;
    box-shadow: 0 24px 54px rgba(5, 18, 42, 0.22);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.flashcard-back {
    transform: rotateY(180deg);
}

.flashcard-face span {
    width: fit-content;
    padding: 6px 10px;
    color: #0d4f83;
    background: #e3f2ff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.flashcard-face p {
    margin: 0;
    color: #071f49;
    font-size: 18px;
    line-height: 1.42;
}

.flashcard-front p {
    align-self: center;
    text-align: center;
}

.flashcard-back p {
    align-self: start;
    font-size: 16px;
}

.flashcard-session-controls {
    display: grid;
    justify-items: center;
    gap: 14px;
    margin-top: 28px;
}

.flashcard-session-controls button {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(6, 20, 46, 0.2);
}

.flashcard-session-controls > button {
    background: #2d8fe3;
    border-color: #2d8fe3;
}

.flashcard-grade-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.flashcard-grade-actions[hidden] {
    display: none;
}

.flashcard-grade-actions button:first-child {
    background: #2d8fe3;
    border-color: #2d8fe3;
}

.flashcard-grade-actions button:last-child {
    background: #aab4c1;
    border-color: #aab4c1;
}

.flashcard-session-result {
    display: grid;
    justify-items: center;
    gap: 14px;
    width: min(440px, 100%);
    margin-top: 8px;
    padding: 34px;
    color: #071f49;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 24px 54px rgba(5, 18, 42, 0.22);
    text-align: center;
}

.flashcard-session-result[hidden] {
    display: none;
}

.flashcard-session-result h1 {
    margin: 0;
    color: #062653;
    font-size: 26px;
}

.flashcard-session-result p {
    color: #40516a;
}

.flashcard-session-empty {
    display: grid;
    justify-items: center;
    gap: 16px;
    width: min(520px, calc(100% - 32px));
    margin: 180px auto 0;
    padding: 34px;
    color: #071f49;
    background: #fff;
    border-radius: 8px;
    text-align: center;
}

.exam-mode-main {
    padding-top: 86px;
}

.exam-mode-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1.2fr) 420px;
    gap: 48px;
    align-items: start;
}

.exam-continue-panel {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(340px, 1.2fr);
    gap: 24px;
    margin-bottom: 42px;
    padding: 28px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius, 14px);
    box-shadow: var(--shadow);
}

.exam-continue-panel > div > span {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exam-continue-panel h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 26px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.exam-continue-panel p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.exam-continue-list {
    display: grid;
    gap: 14px;
}

.exam-continue-list article {
    display: grid;
    gap: 12px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius, 10px);
}

.exam-continue-list strong {
    display: block;
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
}

.exam-continue-list small {
    color: var(--muted);
    font-weight: 600;
}

.exam-eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 6px 14px;
    color: var(--primary);
    background: rgba(79, 70, 229, 0.08);
    border: 1px solid rgba(79, 70, 229, 0.15);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exam-mode-copy h1 {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 42px;
    font-weight: 900;
    line-height: 1.15;
    font-family: 'Outfit', sans-serif;
}

.exam-mode-copy p,
.exam-mode-copy li {
    color: var(--text);
    font-size: 16px;
    line-height: 1.65;
}

.exam-mode-copy p {
    max-width: 720px;
    margin-bottom: 18px;
    color: var(--muted);
}

.exam-mode-copy ul {
    display: grid;
    gap: 12px;
    margin: 22px 0;
    padding: 24px 24px 24px 44px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius, 12px);
}

.exam-create-panel {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius, 14px);
    box-shadow: var(--shadow);
}

.exam-create-head {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.exam-create-head span {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exam-create-panel h2 {
    margin: 0 0 6px;
    color: var(--text);
    font-size: 24px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
}

.exam-create-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.exam-create-panel form {
    display: grid;
    gap: 18px;
}

.exam-option-field {
    display: grid;
    gap: 9px;
}

.exam-option-field label {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.exam-option-field select {
    min-height: 44px;
    padding: 10px 12px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius, 8px);
    font-size: 14px;
    transition: var(--transition);
}

.exam-option-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    outline: none;
    background: var(--surface);
}

.exam-tip {
    max-width: 720px;
    padding: 18px 20px;
    color: var(--text);
    background: var(--surface-2);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius, 8px);
    font-size: 15px;
    line-height: 1.6;
}

.exam-categories {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius, 12px);
    display: grid;
    gap: 14px;
    padding: 16px;
    transition: var(--transition);
}

.exam-categories[hidden] {
    display: none;
}

.exam-categories p {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.exam-filter-grid {
    display: grid;
    gap: 14px;
}

.exam-categories .exam-option-field {
    margin: 0;
}

.exam-categories select {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius, 8px);
    color: var(--text);
    font: inherit;
    min-height: 46px;
    padding: 10px 12px;
    width: 100%;
    transition: var(--transition);
}

.exam-categories select:disabled {
    background: var(--surface-2);
    color: var(--muted);
    opacity: 0.6;
}

.exam-categories label {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius, 8px);
    color: var(--text);
    cursor: pointer;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    gap: 9px;
    padding: 8px 12px;
    transition: var(--transition);
}

.exam-categories .exam-option-field > label {
    background: transparent;
    border: 0;
    color: var(--text);
    cursor: default;
    display: block;
    font-size: 14px;
    font-weight: 700;
    padding: 0;
}

.exam-categories input {
    width: 14px;
    min-height: auto;
}

.exam-categories small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.exam-categories input:disabled + span {
    color: var(--muted);
    opacity: 0.6;
}

.exam-topic-picker {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
    margin-top: 0;
    padding-top: 14px;
}

.exam-topic-picker[hidden],
.exam-topic-group[hidden] {
    display: none;
}

.exam-topic-group {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius, 10px);
    display: grid;
    gap: 7px;
    padding: 12px;
}

.exam-topic-group > strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.exam-topic-group label {
    background: var(--surface-2);
    border-color: var(--line);
}

.exam-create-panel button {
    width: 100%;
    min-height: 46px;
    padding: 10px 16px;
    border-radius: var(--radius, 8px);
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.exam-create-panel button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    box-shadow: none;
}

.practice-page {
    min-height: 100vh;
    color: #fff;
    background: #1b477d;
}

.practice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 76px;
}

.practice-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 26px;
    font-weight: 800;
}

.practice-logo {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #fff;
    background: #2d8fe3;
    border-radius: 50%;
    font-size: 24px;
}

.practice-status {
    display: flex;
    align-self: flex-end;
    align-items: center;
    gap: 12px;
}

.practice-status strong {
    font-size: 18px;
    font-weight: 900;
}

.practice-timer,
.practice-no-timer {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
}

.practice-timer.is-urgent {
    color: #fff;
    background: #dc2626;
    border-color: #fecaca;
}

.practice-shell {
    width: min(974px, calc(100% - 40px));
    margin: 0 auto;
}

.practice-question {
    display: none;
}

.practice-question.is-active {
    display: block;
}

.practice-prompt {
    position: relative;
    min-height: 100px;
    padding: 28px 58px 24px 26px;
    color: #061f43;
    background: #fff;
    border-radius: 5px;
}

.practice-prompt span {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 5px 9px;
    color: #0b4f86;
    background: #dcefff;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.practice-prompt p {
    color: #061f43;
    font-size: 14px;
}

.practice-source {
    background: #f4f8fc;
    border: 1px solid #dce8f3;
    border-radius: 8px;
    color: #52667d;
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 16px;
    padding: 10px 12px;
}

.practice-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 22px;
}

.practice-option {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 84px;
    padding: 20px 48px;
    color: var(--text);
    background: var(--surface);
    border: 3px solid var(--primary);
    border-radius: var(--radius, 8px);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition, all 0.2s ease);
}

.practice-option:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.practice-option input {
    width: 15px;
    min-height: auto;
    accent-color: var(--primary);
}

.practice-option.is-correct {
    border-color: var(--ok);
    background: rgba(16, 185, 129, 0.08);
}

.practice-option.is-wrong {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.08);
}

.practice-question.is-answered .practice-option {
    cursor: default;
}

.practice-question.is-answered .practice-option:hover {
    transform: none;
}

.practice-feedback {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding: 18px 20px;
    color: var(--text);
    background: var(--surface-2);
    border-left: 6px solid var(--primary);
    border-radius: var(--radius, 8px);
    font-size: 15px;
    box-shadow: var(--shadow);
}

.practice-feedback[hidden] {
    display: none;
}

.practice-feedback.is-correct {
    border-left-color: #16a34a;
}

.practice-feedback.is-wrong {
    border-left-color: #dc2626;
}

.practice-feedback strong {
    font-size: 18px;
}

.practice-feedback span {
    color: #123967;
    font-weight: 800;
}

.practice-feedback p {
    margin: 0;
    color: #4b5c72;
}

.question-report-box {
    margin-top: 14px;
    color: #e8f4ff;
}

.question-report-box summary {
    width: fit-content;
    cursor: pointer;
    color: #dceeff;
    font-size: 13px;
    font-weight: 800;
}

.question-report-box summary:hover {
    color: #fff;
}

.question-report-box > div {
    display: grid;
    gap: 12px;
    margin-top: 12px;
    padding: 16px;
    color: #102a46;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(220, 234, 248, 0.72);
    border-radius: 10px;
}

.question-report-box label {
    display: grid;
    gap: 6px;
    color: #53657a;
    font-size: 12px;
    font-weight: 900;
}

.question-report-box select,
.question-report-box textarea {
    width: 100%;
    min-height: 42px;
    color: #102a46;
    background: #fff;
    border: 1px solid #cbd9e8;
    border-radius: 8px;
    font: inherit;
    padding: 10px 12px;
}

.question-report-box textarea {
    resize: vertical;
}

.question-report-box button {
    justify-self: start;
    min-height: 38px;
}

.question-report-box small {
    color: #53657a;
    font-weight: 800;
}

.question-report-box small.is-ok {
    color: #15803d;
}

.question-report-box small.is-error {
    color: #b91c1c;
}

.practice-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.practice-actions .button.secondary {
    border-color: rgba(255, 255, 255, 0.42);
}

.practice-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.result-card {
    width: min(620px, 100%);
    margin: 0 auto;
    padding: 42px;
    color: #062653;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    text-align: center;
}

.result-card > span {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 6px 12px;
    color: #0b4f86;
    background: #dcefff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.result-card h1 {
    margin-bottom: 28px;
    color: #062653;
    font-size: 26px;
}

.result-score {
    display: grid;
    gap: 6px;
    justify-items: center;
    margin-bottom: 22px;
}

.result-score strong {
    display: grid;
    width: 116px;
    height: 116px;
    place-items: center;
    color: #fff;
    background: var(--primary);
    border-radius: 50%;
    font-size: 46px;
    box-shadow: 0 16px 30px rgba(45, 143, 227, 0.28);
}

.result-score p,
.result-percent {
    margin: 0;
    color: #4b5c72;
    font-weight: 800;
}

.result-meter {
    height: 10px;
    overflow: hidden;
    margin: 22px 0 10px;
    background: #dce7f3;
    border-radius: 999px;
}

.result-meter span {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: inherit;
}

@media (max-width: 980px) {
    .student-sidebar {
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: stretch;
        padding: 14px 16px;
    }

    .student-brand {
        justify-content: center;
    }

    .student-menu {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 0;
    }

    .student-sidebar-footer {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-top: 0;
    }

    .student-sidebar-footer small {
        display: none;
    }

    .student-menu a,
    .student-sidebar-footer a,
    .student-user {
        justify-content: center;
        min-width: 0;
    }

    .student-user {
        max-width: none;
    }

    .student-main {
        width: min(100% - 32px, 860px);
        margin: 0 auto;
        padding: 42px 0 56px;
    }

    .profile-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .manage-flashcards-header,
    .manage-flashcards-layout {
        grid-template-columns: 1fr;
    }

    .student-hero {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .analytics-header {
        align-items: stretch;
        flex-direction: column;
    }

    .analytics-overview,
    .analytics-grid,
    .statistics-kpis,
    .statistics-layout,
    .statistics-lower {
        grid-template-columns: 1fr;
    }

    .statistics-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .resources-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .exam-mode-main {
        padding-top: 42px;
    }

    .exam-mode-layout {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .flashcards-setup-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .flashcards-options-panel {
        padding-top: 0;
    }

    .exam-continue-panel {
        grid-template-columns: 1fr;
    }

    .exam-create-panel {
        padding: 22px;
        background: #f8fbff;
        border: 1px solid #dfeaf5;
        border-radius: 8px;
    }

    .practice-header {
        padding-bottom: 44px;
    }

    .practice-options {
        grid-template-columns: 1fr;
    }

    .student-action-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .flashcards-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .flashcard-session-stage {
        margin-top: 0;
        padding-top: 72px;
    }

    .student-rule {
        margin: 46px auto;
    }
}

.student-area-label {
    color: #48627d;
    font-size: 14px;
    margin: -6px 0 18px;
}

.student-area-label strong {
    color: #0a2b57;
}

.inline-form {
    align-items: center;
    display: flex;
    gap: 10px;
}

.inline-form select {
    min-width: 150px;
}

.inline-form button {
    white-space: nowrap;
}

@media (max-width: 620px) {
    .student-menu,
    .student-sidebar-footer,
    .student-action-list,
    .student-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-sidebar {
        padding: 12px;
    }

    .student-brand {
        font-size: 22px;
    }

    .student-menu a,
    .student-sidebar-footer a,
    .student-user {
        gap: 7px;
        min-height: 38px;
        padding: 8px 7px;
        font-size: 11px;
        text-align: center;
        white-space: normal;
    }

    .student-menu span,
    .student-sidebar-footer span,
    .student-user span {
        width: 17px;
        height: 17px;
        font-size: 9px;
    }

    .student-user {
        grid-column: 1 / -1;
    }

    .student-intro h1 {
        font-size: 32px;
    }

    .student-section h2 {
        font-size: 26px;
    }

    .analytics-overview article {
        min-height: 0;
    }

    .profile-summary h1 {
        font-size: 34px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .manage-flashcards-header h1 {
        font-size: 34px;
    }

    .statistics-hero h1 {
        font-size: 34px;
    }

    .resources-hero h1 {
        font-size: 34px;
    }

    .resources-grid.featured {
        grid-template-columns: 1fr;
    }

    .manage-flashcards-stats {
        grid-template-columns: 1fr;
    }

    .exam-mode-copy h1 {
        font-size: 32px;
    }

    .flashcards-hero h1 {
        font-size: 34px;
    }

    .flashcards-setup-copy h1 {
        font-size: 34px;
    }

    .flashcard-session {
        padding: 76px 16px 34px;
    }

    .flashcard-session-brand {
        top: 18px;
        left: 16px;
        font-size: 22px;
    }

    .flashcard-session-stage {
        margin-top: 0;
        padding-top: 28px;
    }

    .flashcard-session-card,
    .flashcard-inner,
    .flashcard-face {
        min-height: 250px;
    }

    .flashcard-face {
        gap: 18px;
        padding: 22px;
    }

    .flashcard-face p {
        font-size: 16px;
    }

    .flashcard-back p {
        font-size: 15px;
    }

    .flashcard-session-controls {
        width: 100%;
        margin-top: 22px;
    }

    .flashcard-session-controls button {
        width: 100%;
        max-width: 260px;
    }

    .flashcard-grade-actions {
        width: 100%;
    }

    .flashcard-grade-actions button {
        flex: 1 1 120px;
    }

    .exam-mode-copy ul {
        padding: 16px 18px 16px 34px;
    }

    .exam-create-panel {
        border-radius: 12px;
    }

    .student-result {
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .practice-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 22px;
        padding: 22px 0 32px;
    }

    .practice-status {
        align-self: flex-end;
    }

    .practice-shell {
        width: min(100% - 24px, 520px);
    }

    .practice-prompt {
        padding: 22px 18px;
    }

    .practice-option {
        min-height: 74px;
        padding: 18px;
    }

    .practice-actions {
        flex-direction: column;
    }

    .practice-actions a,
    .practice-actions button {
        width: 100%;
    }

    .question-report-box > div {
        padding: 14px;
    }

    .result-card {
        padding: 30px 20px;
    }
}

/* Polished registration flow */
.signup-page {
    background:
        radial-gradient(circle at 50% -140px, rgba(45, 143, 227, 0.22), transparent 42%),
        linear-gradient(180deg, #f8fbff 0%, #eef5fb 48%, #e9f2f9 100%);
}

.signup-brand {
    color: #102642;
}

.signup-shell {
    align-content: start;
    gap: 0;
    width: min(100%, 1160px);
    padding-top: 116px;
}

.signup-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(82px, 1fr));
    width: min(650px, 100%);
    margin: 0 0 48px;
    padding: 0;
}

.signup-progress li {
    align-items: center;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

.signup-progress li::before {
    background: #d6e2ee;
    border-radius: 999px;
    content: "";
    height: 4px;
    left: -50%;
    position: absolute;
    right: 50%;
    top: 18px;
    transform: none;
    z-index: 0;
}

.signup-progress li:first-child::before {
    display: none;
}

.signup-progress span {
    align-items: center;
    background: #fff;
    border: 2px solid #c8d6e6;
    border-radius: 999px;
    box-shadow: 0 0 0 7px #eef5fb;
    color: #65758b;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    line-height: 1;
    position: relative;
    width: 36px;
    z-index: 1;
}

.signup-progress span::after {
    display: none;
}

.signup-progress em {
    color: #66758a;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    margin-top: 10px;
    max-width: 90px;
    min-height: 16px;
    overflow: hidden;
    position: static;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.signup-progress .is-active::before,
.signup-progress .is-done::before {
    background: linear-gradient(90deg, var(--primary), #58b5f7);
}

.signup-progress .is-active span {
    border-color: var(--primary);
    box-shadow: 0 0 0 7px rgba(45, 143, 227, 0.13), 0 10px 20px rgba(45, 143, 227, 0.18);
    color: var(--primary);
}

.signup-progress .is-done span {
    background: var(--primary);
    border-color: var(--primary);
    color: transparent;
    font-size: 0;
}

.signup-progress .is-done span::before {
    color: #fff;
    content: "\2713";
    font-size: 15px;
    font-weight: 900;
}

.signup-progress .is-active em,
.signup-progress .is-done em {
    color: #0d4f83;
}

.signup-card {
    border: 1px solid rgba(212, 225, 238, 0.95);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(15, 45, 82, 0.14);
    min-height: 0;
    padding: clamp(28px, 4vw, 48px);
    width: min(680px, 100%);
}

.signup-card h1 {
    color: #0d4f83;
    font-size: clamp(22px, 2.1vw, 26px);
    margin: 0 0 8px;
}

.signup-step-copy {
    color: #5f7187;
    font-size: 14px;
    line-height: 1.5;
}

.signup-note {
    background: #f5f9fd;
    border: 1px solid #dce9f6;
    border-radius: 12px;
    color: #183a62;
    font-size: 15px;
}

.signup-card .auth-field input,
.signup-card select {
    border-radius: 10px;
    min-height: 48px;
}

.signup-actions {
    border-top: 1px solid #edf3f8;
    margin-top: 30px;
    padding-top: 20px;
}

.signup-actions button {
    border-radius: 10px;
    min-height: 46px;
}

@media (max-width: 760px) {
    .signup-brand {
        margin: 18px 16px 0;
    }

    .signup-shell {
        padding: 32px 14px 32px;
    }

    .signup-progress {
        grid-template-columns: repeat(5, minmax(42px, 1fr));
        margin-bottom: 34px;
    }

    .signup-progress li::before {
        height: 3px;
        top: 16px;
    }

    .signup-progress span {
        box-shadow: 0 0 0 5px #eef5fb;
        font-size: 12px;
        height: 32px;
        width: 32px;
    }

    .signup-progress em {
        font-size: 10px;
        margin-top: 8px;
        max-width: 58px;
    }

    .signup-card {
        border-radius: 14px;
        padding: 24px 16px 18px;
    }

    .signup-actions {
        display: grid;
        gap: 10px;
        grid-template-columns: 1fr;
    }

    .signup-actions [data-register-next],
    .signup-actions [data-register-back] {
        margin-left: 0;
        width: 100%;
    }

    .signup-actions [data-register-next] {
        order: 1;
    }

    .signup-actions [data-register-back] {
        order: 2;
    }
}

@media (max-width: 420px) {
    .signup-progress em {
        display: none;
    }

    .signup-progress {
        margin-bottom: 24px;
    }

    .signup-progress span {
        height: 30px;
        width: 30px;
    }
}

/* Multi-career landing responsive refinements */
@media (max-width: 1180px) {
    .career-grid,
    .tools-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .career-showcase.landing-media {
        min-height: 520px;
    }

    .career-device {
        width: 100%;
    }

    .career-progress-card {
        left: 12px;
        top: 0;
    }

    .career-floating-card {
        bottom: 10px;
        right: 12px;
    }

    .career-grid,
    .how-grid,
    .tools-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .career-section,
    .tools-section {
        padding: 46px 0;
    }

    .how-section,
    .resources-cta {
        border-radius: 16px;
        padding: 26px 18px;
    }

    .resources-cta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .career-showcase.landing-media {
        min-height: auto;
        padding: 22px 0 96px;
    }

    .career-device {
        padding: 20px;
    }

    .career-device-head,
    .career-device-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .career-mini-grid,
    .career-grid,
    .how-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .career-progress-card {
        display: none;
    }

    .career-floating-card {
        bottom: 0;
        left: 18px;
        right: auto;
        width: 150px;
    }

    .landing-section-head h2,
    .resources-cta h2 {
        font-size: 30px;
    }
}

/* Professional admin redesign */
.admin-app {
    background: #f4f7fb;
    color: #102033;
}

.admin-app .topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #dde8f3;
    box-shadow: 0 10px 30px rgba(15, 45, 82, 0.06);
    display: grid;
    gap: 22px;
    grid-template-columns: max-content minmax(0, 1fr);
    min-height: 72px;
    overflow: visible;
    padding: 0 max(18px, calc((100vw - 1320px) / 2));
    position: sticky;
    top: 0;
    z-index: 200;
}

.admin-app .brand {
    color: #102a46;
    font-size: 19px;
    min-width: 0;
    white-space: nowrap;
}

.admin-app .brand-mark {
    background: #0e2a4d;
    border-radius: 12px;
}

.admin-app .nav {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    min-width: 0;
    flex-wrap: wrap;
    overflow: visible;
    padding: 10px 2px;
    white-space: nowrap;
}

.admin-app .nav::-webkit-scrollbar {
    display: none;
}

.admin-app .nav::-webkit-scrollbar-thumb {
    display: none;
}

.admin-nav-menu {
    flex: 0 0 auto;
    position: relative;
}

.admin-nav-menu[open] {
    z-index: 260;
}

.admin-nav-menu summary {
    background: #f6f9fc;
    border: 1px solid #dce8f3;
    border-radius: 12px;
    color: #53657a;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    list-style: none;
    min-height: 38px;
    padding: 9px 13px;
    user-select: none;
}

.admin-nav-menu summary::-webkit-details-marker {
    display: none;
}

.admin-nav-menu summary::after {
    content: "v";
    font-size: 10px;
    margin-left: 7px;
}

.admin-nav-menu[open] summary,
.admin-nav-menu summary:hover {
    background: #eaf4fc;
    border-color: #c8deef;
    color: #0e2a4d;
}

.admin-nav-menu div {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(15, 45, 82, .14);
    display: grid;
    gap: 4px;
    min-width: 190px;
    padding: 8px;
    position: absolute;
    left: 0;
    right: auto;
    top: calc(100% + 10px);
    z-index: 300;
}

.admin-nav-menu div a {
    border-radius: 10px;
    color: #53657a;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 12px;
}

.admin-nav-menu div a:hover {
    background: #eef5fb;
    color: #0e2a4d;
}

.admin-app .nav a:not(.button) {
    background: #f6f9fc;
    border: 1px solid #dce8f3;
    border-radius: 12px;
    color: #53657a;
    font-size: 13px;
    font-weight: 800;
    flex: 0 0 auto;
    min-height: 38px;
    padding: 9px 13px;
}

.admin-app .nav a:not(.button):hover {
    background: #eaf4fc;
    border-color: #c8deef;
    color: #0e2a4d;
}

.admin-app .nav-user {
    color: #5b6c82;
    flex: 0 0 auto;
    font-size: 13px;
    margin-left: 2px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-app .nav .button {
    flex: 0 0 auto;
}

.admin-app .page {
    margin: 0 auto;
    padding: 34px 24px 70px;
    width: min(1320px, 100%);
}

.admin-content,
.admin-dashboard {
    display: grid;
    gap: 24px;
}

.admin-hero,
.admin-page-head {
    align-items: center;
    background: #0e2a4d;
    border-radius: 20px;
    color: #fff;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 34px;
}

.admin-hero span,
.admin-page-head span,
.admin-card-head span {
    color: #70c4ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-hero h1,
.admin-page-head h1 {
    color: #fff;
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.05;
    margin: 6px 0 10px;
}

.admin-hero p,
.admin-page-head p {
    color: #d7e6f6;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    max-width: 780px;
}

.admin-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.admin-head-actions form {
    margin: 0;
}

.admin-metrics {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.admin-metrics article,
.admin-quick-grid a,
.admin-form-card,
.admin-list-panel,
.admin-question-builder {
    background: #fff;
    border: 1px solid #dce7f2;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 45, 82, 0.07);
}

.admin-metrics article {
    display: grid;
    gap: 6px;
    min-height: 128px;
    padding: 20px;
}

.admin-metrics span,
.admin-metrics small,
.admin-list-meta span,
.admin-list-main p,
.admin-card-head p {
    color: #607187;
}

.admin-metrics strong {
    color: #0e2a4d;
    font-size: 36px;
    line-height: 1;
}

.admin-quick-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-quick-grid a {
    color: #102033;
    display: grid;
    gap: 10px;
    min-height: 164px;
    padding: 22px;
}

.admin-quick-grid a span {
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-quick-grid a strong {
    color: #0e2a4d;
    font-size: 20px;
    line-height: 1.2;
}

.admin-quick-grid a small {
    color: #64758a;
    line-height: 1.45;
}

.admin-two-column,
.admin-editor-grid {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(340px, 0.78fr) minmax(0, 1.22fr);
}

.admin-category-layout {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-area-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.area-switch-panel {
    align-items: end;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    margin-bottom: 18px;
}

.area-switch-form {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-area-tabs a {
    background: #f3f8fd;
    border: 1px solid #d7e5f2;
    border-radius: 14px;
    color: #344b65;
    display: grid;
    flex: 0 0 auto;
    gap: 3px;
    min-width: 148px;
    padding: 12px 14px;
    text-decoration: none;
}

.admin-area-tabs a strong {
    color: #0e2a4d;
    font-size: 14px;
}

.admin-area-tabs a span {
    color: #62758c;
    font-size: 12px;
    font-weight: 800;
}

.admin-area-tabs a.is-active,
.admin-area-tabs a:hover {
    background: #0e2a4d;
    border-color: #0e2a4d;
    color: #fff;
}

.admin-area-tabs a.is-active strong,
.admin-area-tabs a.is-active span,
.admin-area-tabs a:hover strong,
.admin-area-tabs a:hover span {
    color: #fff;
}

.admin-area-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-area-summary article {
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    display: grid;
    gap: 4px;
    padding: 16px;
}

.admin-area-summary span {
    color: #61748c;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-area-summary strong {
    color: #0e2a4d;
    font-size: 28px;
    line-height: 1;
}

.bulk-admin-form {
    display: grid;
    gap: 14px;
}

.bulk-toolbar {
    align-items: center;
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

.bulk-toolbar > div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.bulk-action-group label {
    align-items: center;
    color: #53657a;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    gap: 8px;
    text-transform: uppercase;
}

.bulk-toolbar select {
    min-height: 40px;
    min-width: 190px;
    width: auto;
}

.bulk-check {
    align-items: center;
    color: #40536b;
    display: inline-flex;
    font-weight: 900;
    gap: 8px;
    white-space: nowrap;
}

.bulk-check input,
.admin-table-wrap input[type="checkbox"] {
    appearance: auto;
    border-radius: 4px;
    height: 16px;
    min-height: 16px;
    padding: 0;
    width: 16px;
}

.merge-exam-list {
    border: 1px solid #dce8f3;
    border-radius: 16px;
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow: auto;
    padding: 12px;
}

.merge-exam-option {
    align-items: center;
    background: #fbfdff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 12px;
}

.merge-exam-option:hover {
    background: #f4f9fd;
    border-color: #bfd7eb;
}

.merge-exam-option input {
    min-height: auto;
    width: auto;
}

.merge-exam-option span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.merge-exam-option strong {
    color: #0e2a4d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.merge-exam-option small {
    color: #60758f;
    font-weight: 800;
}

.admin-form-card,
.admin-list-panel,
.admin-question-builder {
    padding: 24px;
}

.admin-settings-card {
    position: sticky;
    top: 96px;
}

.admin-card-head {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-card-head.compact {
    margin-bottom: 8px;
}

.admin-card-head h2 {
    color: #0e2a4d;
    font-size: 25px;
    line-height: 1.15;
    margin: 0;
}

.admin-card-head p {
    line-height: 1.45;
    margin: 0;
}

.admin-form-card form,
.admin-question-builder form {
    display: grid;
    gap: 16px;
}

.admin-app .field label {
    color: #40536b;
    font-weight: 800;
}

.admin-app input,
.admin-app textarea,
.admin-app select {
    background: #fbfdff;
    border-color: #c9d6e3;
    border-radius: 10px;
}

.admin-app input:focus,
.admin-app textarea:focus,
.admin-app select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 143, 227, 0.12);
    outline: none;
}

.admin-form-row {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 160px;
}

.category-list-panel {
    overflow: hidden;
}

.category-list-panel .admin-card-head {
    border-bottom: 1px solid #e1ebf5;
    margin-bottom: 0;
    padding-bottom: 18px;
}

.category-action-bar {
    align-items: center;
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    margin: 18px 0 14px;
    padding: 12px;
}

.category-actions {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.category-move-control {
    display: grid;
    gap: 5px;
    min-width: 220px;
}

.category-move-control label {
    color: #61748c;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.category-move-control select {
    min-height: 38px;
}

.category-select-all {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 999px;
    min-height: 38px;
    padding: 8px 12px;
}

.category-admin-table {
    border: 0;
    border-radius: 14px;
}

.category-admin-table th,
.category-admin-table td {
    padding: 14px 16px;
    vertical-align: middle;
}

.category-admin-table th {
    color: #526781;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.category-admin-table tbody tr:hover {
    background: #f8fbfe;
}

.category-admin-table .select-column,
.category-admin-table td:first-child {
    text-align: center;
    width: 56px;
}

.admin-app .bulk-check input,
.admin-app .admin-table-wrap input[type="checkbox"],
.admin-app .category-action-bar input[type="checkbox"],
.admin-app .category-admin-table input[type="checkbox"] {
    appearance: auto;
    background: #fff;
    border: 1px solid #9fb1c5;
    border-radius: 4px;
    box-shadow: none;
    height: 16px;
    min-height: 16px;
    padding: 0;
    width: 16px;
}

.admin-toggle-list {
    display: grid;
    gap: 12px;
}

.admin-toggle-list label {
    align-items: center;
    background: #f7fbff;
    border: 1px solid #ddeaf5;
    border-radius: 12px;
    display: grid;
    gap: 14px;
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 58px;
    padding: 12px 14px;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.admin-toggle-list label:hover {
    background: #f1f8ff;
    border-color: #bdd8f0;
}

.admin-toggle-list input[type="checkbox"] {
    appearance: none;
    background: #cbd6e2;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    height: 28px;
    margin: 0;
    position: relative;
    transition: background 0.18s ease;
    width: 52px;
}

.admin-toggle-list input[type="checkbox"]::before {
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 3px 8px rgba(15, 45, 82, 0.18);
    content: "";
    height: 22px;
    left: 3px;
    position: absolute;
    top: 3px;
    transition: transform 0.18s ease;
    width: 22px;
}

.admin-toggle-list input[type="checkbox"]:checked {
    background: var(--primary);
}

.admin-toggle-list input[type="checkbox"]:checked::before {
    transform: translateX(24px);
}

.admin-toggle-list input[type="checkbox"]:focus-visible {
    box-shadow: 0 0 0 4px rgba(45, 143, 227, 0.18);
    outline: none;
}

.admin-toggle-list span {
    color: #21344d;
    font-weight: 800;
    line-height: 1.35;
}

.admin-settings-card button[type="submit"] {
    min-height: 48px;
    width: 100%;
}

.admin-form-actions,
.admin-list-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-list-actions form {
    margin: 0;
}

.admin-exam-list,
.admin-flashcard-list,
.admin-resource-list,
.admin-question-list {
    display: grid;
    gap: 12px;
}

.admin-list-item {
    align-items: center;
    background: #fbfdff;
    border: 1px solid #dfeaf4;
    border-radius: 14px;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 18px;
}

.admin-list-main {
    display: grid;
    gap: 8px;
}

.admin-list-main h3 {
    color: #102a46;
    font-size: 20px;
    margin: 0;
}

.admin-list-main p {
    line-height: 1.45;
    margin: 0;
}

.admin-list-meta {
    display: grid;
    gap: 8px;
    min-width: 132px;
}

.admin-list-meta span {
    background: #eef5fb;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 10px;
    text-align: center;
}

.admin-options-builder {
    background: #f5f9fd;
    border: 1px solid #dce9f5;
    border-radius: 14px;
    display: grid;
    gap: 10px;
    padding: 16px;
}

.admin-option-input {
    align-items: center;
    background: #fff;
    border: 1px solid #d6e3ef;
    border-radius: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 34px minmax(0, 1fr);
    padding: 10px;
}

.admin-option-input > span {
    align-items: center;
    background: #e8f3fd;
    border-radius: 10px;
    color: var(--primary);
    display: inline-flex;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.admin-question-card {
    background: #fbfdff;
    border: 1px solid #dfeaf4;
    border-radius: 14px;
    overflow: hidden;
}

.admin-question-card summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 14px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    list-style: none;
    padding: 16px;
}

.admin-question-card summary::-webkit-details-marker {
    display: none;
}

.admin-question-card summary > span {
    align-items: center;
    background: #0e2a4d;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.admin-question-card summary strong {
    color: #102a46;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-question-card summary em {
    background: #eef5fb;
    border-radius: 999px;
    color: #586b82;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    padding: 7px 10px;
}

.admin-question-body {
    border-top: 1px solid #e2edf6;
    display: grid;
    gap: 14px;
    padding: 18px;
}

.admin-answer-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-answer-list div {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    padding: 14px;
}

.admin-answer-list div.is-correct {
    border-color: #75c49b;
    box-shadow: inset 4px 0 0 #22a663;
}

.admin-answer-list span {
    color: #607187;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-answer-list p {
    margin: 0;
}

.admin-table-wrap {
    overflow-x: auto;
}

.admin-toolbar {
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    margin-bottom: 18px;
    padding: 14px;
}

.admin-filter-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: 190px 150px minmax(220px, 1fr) auto auto;
}

.admin-filter-form .field {
    margin: 0;
}

.flashcards-admin-filter {
    grid-template-columns: 190px 150px minmax(260px, 1fr) auto;
}

.flashcards-filter-actions {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    min-width: 190px;
}

.flashcards-filter-actions .button,
.flashcards-filter-actions button {
    flex: 0 0 auto;
    min-height: 40px;
    min-width: 88px;
    padding: 9px 14px;
    width: auto;
}

.flashcards-admin-panel .admin-toolbar {
    padding: 16px;
}

.flashcards-admin-table {
    min-width: 920px;
}

.flashcards-admin-table th:last-child,
.flashcards-admin-table td:last-child {
    width: 230px;
}

.flashcards-admin-table td {
    padding: 12px;
}

.flashcards-admin-table td:first-child small {
    max-width: 280px;
}

.flashcard-admin-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    min-width: 210px;
}

.flashcard-admin-actions form {
    margin: 0;
}

.flashcard-admin-actions .button,
.flashcard-admin-actions button {
    flex: 0 0 auto;
    min-height: 34px;
    min-width: 76px;
    padding: 7px 11px;
    width: auto;
}

.account-actions {
    align-items: flex-start;
    display: grid;
    gap: 8px;
    min-width: 190px;
}

.account-actions form {
    margin: 0;
}

.account-actions .button,
.account-actions button {
    min-height: 34px;
    padding: 7px 11px;
    width: 100%;
}

.account-password-panel {
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 10px;
    padding: 8px;
}

.account-password-panel summary {
    color: #0e2a4d;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
}

.account-password-panel form {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.account-password-panel input {
    min-height: 34px;
}

.badge.warn {
    background: #fef3c7;
    color: #92400e;
}

.admin-class-list {
    display: grid;
    gap: 12px;
}

.admin-class-card {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    overflow: hidden;
}

.admin-class-card summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 8px;
    grid-template-columns: 110px minmax(0, 1fr) minmax(220px, auto);
    list-style: none;
    padding: 16px;
}

.admin-class-card summary::-webkit-details-marker {
    display: none;
}

.admin-class-card summary span {
    background: #eef7ff;
    border-radius: 999px;
    color: #17416e;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 9px;
    text-align: center;
}

.admin-class-card summary strong {
    color: #0e2a4d;
}

.admin-class-card summary small {
    color: #61748c;
    font-weight: 800;
    text-align: right;
}

.admin-class-detail {
    border-top: 1px solid #e1ebf5;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px;
}

.admin-class-detail section {
    background: #f8fbfe;
    border: 1px solid #e1ebf5;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.admin-class-detail h3,
.admin-class-detail p {
    margin: 0;
}

.admin-class-detail article {
    align-items: center;
    background: #fff;
    border: 1px solid #e5edf5;
    border-radius: 10px;
    display: grid;
    gap: 4px;
    padding: 10px;
}

.admin-search-field input {
    min-width: 0;
}

.admin-compact-table {
    min-width: 880px;
}

.admin-compact-table th,
.admin-compact-table td {
    vertical-align: middle;
}

.admin-compact-table td strong {
    color: #102a46;
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.admin-compact-table td small {
    color: #607187;
    display: block;
    font-size: 12px;
    line-height: 1.35;
    max-width: 380px;
}

.admin-row-actions {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
}

.admin-row-actions form {
    margin: 0;
}

.admin-row-actions .button,
.admin-row-actions button {
    font-size: 12px;
    min-height: 32px;
    padding: 7px 10px;
    white-space: nowrap;
}

.admin-inline-edit {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(220px, 1fr) 90px 110px auto;
}

.admin-inline-edit.contact-inline-edit {
    grid-template-columns: 140px minmax(150px, .8fr) minmax(180px, 1fr) minmax(180px, 1fr) 80px 95px auto;
}

.admin-inline-edit input,
.admin-inline-edit select {
    min-height: 38px;
}

.admin-inline-edit label {
    align-items: center;
    color: #52667d;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    white-space: nowrap;
}

.admin-inline-edit label input {
    min-height: auto;
    width: auto;
}

.admin-inline-delete {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 0;
}

.admin-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-filter-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    color: #53657a;
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.admin-filter-tabs a.is-active,
.admin-filter-tabs a:hover {
    color: #fff;
    background: #2d8fe3;
    border-color: #2d8fe3;
}

.question-report-list {
    display: grid;
    gap: 16px;
}

.question-report-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.36fr);
    gap: 18px;
    padding: 20px;
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(15, 45, 82, 0.08);
}

.question-report-main {
    display: grid;
    gap: 12px;
}

.question-report-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.question-report-meta strong {
    color: #102a46;
    font-size: 13px;
    font-weight: 900;
}

.question-report-meta small {
    color: #607187;
    font-size: 12px;
    font-weight: 700;
}

.question-report-card h2 {
    color: #102a46;
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.28;
    margin: 0;
}

.question-report-card p {
    margin: 0;
    color: #53657a;
}

.question-report-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.question-report-context span {
    padding: 7px 10px;
    color: #31506f;
    background: #f2f7fc;
    border: 1px solid #dce8f3;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.question-report-actions {
    display: grid;
    gap: 12px;
    align-content: start;
    padding: 14px;
    background: #f7fbff;
    border: 1px solid #e0ebf6;
    border-radius: 12px;
}

.question-report-actions label {
    display: grid;
    gap: 6px;
    color: #53657a;
    font-size: 12px;
    font-weight: 900;
}

.question-report-actions select,
.question-report-actions textarea {
    width: 100%;
    border: 1px solid #cbd9e8;
    border-radius: 8px;
    padding: 10px 12px;
}

.question-report-actions textarea {
    resize: vertical;
}

.question-report-actions div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.landing-editor-page {
    gap: 22px;
}

.landing-editor-form {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: 230px minmax(0, 1fr);
}

.landing-editor-nav {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(15, 45, 82, 0.08);
    display: grid;
    gap: 6px;
    padding: 12px;
    position: sticky;
    top: 94px;
}

.landing-editor-nav a {
    align-items: center;
    border-radius: 10px;
    color: #52677f;
    display: flex;
    font-size: 13px;
    font-weight: 900;
    min-height: 38px;
    padding: 9px 11px;
}

.landing-editor-nav a:hover {
    background: #eef6fd;
    color: #0e2a4d;
}

.landing-editor-nav button {
    margin-top: 8px;
    min-height: 44px;
    width: 100%;
}

.landing-editor-sections {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.landing-editor-section {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 16px;
    box-shadow: 0 16px 34px rgba(15, 45, 82, 0.07);
    display: grid;
    gap: 18px;
    padding: 24px;
    scroll-margin-top: 96px;
}

.landing-editor-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr;
}

.landing-editor-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-editor-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-menu-editor,
.landing-repeat-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-repeat-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-menu-editor article,
.landing-repeat-grid article {
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.landing-menu-editor article > strong,
.landing-repeat-grid article > strong {
    color: #0e2a4d;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.landing-editor-section .field {
    margin: 0;
}

.landing-editor-section textarea {
    min-height: 92px;
    resize: vertical;
}

.landing-editor-savebar {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #dce8f3;
    border-radius: 16px;
    bottom: 18px;
    box-shadow: 0 18px 42px rgba(15, 45, 82, 0.14);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 12px;
    position: sticky;
    z-index: 80;
}

.social-corner {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 500;
    display: grid;
    gap: 8px;
}

.social-corner a {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: #0e2a4d;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(15, 45, 82, 0.22);
    font-size: 12px;
    font-weight: 900;
    transition: transform 0.16s ease, background 0.16s ease;
}

.social-corner a:hover {
    background: #2d8fe3;
    transform: translateY(-2px);
}

.university-admin-layout {
    display: grid;
    gap: 22px;
}

.university-add-card {
    padding-bottom: 22px;
}

.university-add-form {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(280px, 1fr) 120px minmax(220px, .55fr) auto;
}

.university-add-form .field,
.university-add-form .admin-toggle-list {
    margin: 0;
}

.university-add-form .admin-toggle-list label {
    min-height: 46px;
    padding: 9px 12px;
}

.university-add-form button {
    min-height: 46px;
    white-space: nowrap;
}

.university-list-panel {
    overflow: hidden;
}

.university-list-head {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.university-mini-stats {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 112px);
}

.university-mini-stats article {
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    display: grid;
    gap: 4px;
    padding: 14px;
    text-align: center;
}

.university-mini-stats strong {
    color: #0e2a4d;
    font-size: 26px;
    line-height: 1;
}

.university-mini-stats span {
    color: #607187;
    font-size: 12px;
    font-weight: 900;
}

.university-table {
    min-width: 760px;
}

.university-table th {
    white-space: nowrap;
}

.university-table td {
    padding: 10px 12px;
}

.university-table input {
    min-height: 38px;
}

.university-table td:first-child input {
    min-width: 280px;
    width: 100%;
}

.university-order-input {
    max-width: 92px;
}

.university-status-toggle {
    align-items: center;
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 999px;
    color: #52667d;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    gap: 8px;
    min-height: 36px;
    padding: 6px 12px;
    white-space: nowrap;
}

.university-status-toggle input {
    min-height: auto;
    width: auto;
}

.university-status-toggle.is-active {
    background: #eaf7ef;
    border-color: #bfe8ce;
    color: #137047;
}

.university-actions,
.university-actions .admin-inline-delete {
    flex-wrap: nowrap;
    margin: 0;
}

.pdf-import-layout {
    margin-bottom: 24px;
}

.pdf-upload-status {
    background: #f8fbff;
    border: 1px solid #d6e5f5;
    border-radius: 14px;
    display: grid;
    gap: 9px;
    margin-top: 10px;
    padding: 12px;
}

.pdf-upload-status[hidden] {
    display: none;
}

.pdf-upload-status-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.pdf-upload-status-head strong {
    color: #10253f;
    font-size: .92rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pdf-upload-status-head span {
    color: #5f7289;
    flex: 0 0 auto;
    font-size: .82rem;
    font-weight: 800;
}

.pdf-upload-meter {
    background: #e5eef8;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.pdf-upload-meter span {
    background: #2d8fe5;
    border-radius: inherit;
    display: block;
    height: 100%;
    transform-origin: left;
    width: 100%;
}

.pdf-upload-status.is-ready .pdf-upload-meter span {
    transform: scaleX(1);
}

.pdf-upload-status.is-uploading .pdf-upload-meter span {
    animation: pdf-upload-pulse 1.1s ease-in-out infinite;
}

.pdf-upload-status.is-error {
    background: #fff5f5;
    border-color: #fecaca;
}

.pdf-upload-status.is-error .pdf-upload-meter {
    background: #fee2e2;
}

.pdf-upload-status.is-error .pdf-upload-meter span {
    background: #dc2626;
}

.pdf-upload-status small {
    color: #52677f;
    margin: 0;
}

.pdf-upload-status.is-error small {
    color: #991b1b;
}

@keyframes pdf-upload-pulse {
    0% {
        transform: translateX(-100%) scaleX(.35);
    }

    50% {
        transform: translateX(0) scaleX(.75);
    }

    100% {
        transform: translateX(120%) scaleX(.35);
    }
}

.pdf-preview-panel {
    margin-top: 22px;
}

.pdf-preview-form {
    display: grid;
    gap: 18px;
}

.pdf-preview-list {
    display: grid;
    gap: 16px;
}

.pdf-question-card {
    background: #fbfdff;
    border: 1px solid #dce8f3;
    border-radius: 16px;
    display: grid;
    gap: 14px;
    padding: 18px;
}

.pdf-question-card.is-skipped {
    background: #f8fafc;
    border-style: dashed;
    opacity: .68;
}

.pdf-question-card header {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: 42px minmax(180px, 1fr) 130px auto;
}

.pdf-question-card header > span {
    align-items: center;
    background: #0e2a4d;
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    font-weight: 900;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.pdf-question-card .field {
    margin: 0;
}

.pdf-question-card textarea {
    min-height: 86px;
    resize: vertical;
}

.pdf-options-grid,
.pdf-feedback-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdf-feedback-grid textarea {
    min-height: 112px;
}

.pdf-correct-field select {
    min-height: 42px;
}

.pdf-skip-question {
    align-items: center;
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 12px;
    color: #47617d;
    display: inline-flex;
    font-size: .86rem;
    font-weight: 800;
    gap: 8px;
    min-height: 42px;
    padding: 9px 12px;
    white-space: nowrap;
}

.pdf-skip-question input {
    min-height: auto;
    width: auto;
}

.pdf-preview-actions {
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    bottom: 14px;
    justify-content: flex-end;
    padding: 14px;
    position: sticky;
    z-index: 2;
}

@media (max-width: 860px) {
    .pdf-question-card header,
    .pdf-options-grid,
    .pdf-feedback-grid {
        grid-template-columns: 1fr;
    }

    .pdf-question-card header > span {
        height: 38px;
        width: 38px;
    }

    .pdf-skip-question {
        justify-content: center;
        white-space: normal;
    }

    .pdf-preview-actions {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }
}

.admin-app button:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.contact-main {
    display: grid;
    gap: 24px;
}

.contact-hero {
    background: #0e2a4d;
    border-radius: 18px;
    color: #fff;
    padding: clamp(26px, 4vw, 42px);
}

.contact-hero span {
    color: #70c4ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.contact-hero h1 {
    color: #fff;
    font-size: clamp(34px, 5vw, 54px);
    margin: 10px 0;
}

.contact-hero p {
    color: #d7e6f6;
    line-height: 1.55;
    margin: 0;
    max-width: 760px;
}

.contact-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-card {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(15, 45, 82, .08);
    display: grid;
    gap: 12px;
    padding: 22px;
}

.contact-card span {
    color: #2387d8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.contact-card h2 {
    color: #102a46;
    font-size: 20px;
    line-height: 1.25;
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-area-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px 0 18px;
}

.admin-area-filter a {
    background: #eef5fb;
    border: 1px solid #d8e6f3;
    border-radius: 999px;
    color: #52667d;
    font-size: 12px;
    font-weight: 900;
    padding: 8px 12px;
}

.admin-area-filter a span {
    color: inherit;
    font-size: 11px;
    font-weight: 900;
    margin-left: 4px;
}

.admin-area-filter a.is-active,
.admin-area-filter a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.admin-app table {
    background: #fff;
}

@media (max-width: 1120px) {
    .admin-app .topbar {
        align-items: start;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px 18px;
    }

    .admin-app .brand {
        max-width: 100%;
    }

    .admin-app .nav {
        flex-wrap: wrap;
        justify-content: flex-start;
        margin: 0 -4px;
        max-width: 100%;
        overflow: visible;
        padding: 0 4px;
        width: 100%;
    }

    .admin-nav-menu div {
        left: 0;
        right: auto;
    }

    .admin-metrics,
    .admin-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-two-column,
    .admin-editor-grid {
        grid-template-columns: 1fr;
    }

    .admin-category-layout,
    .area-switch-panel,
    .admin-area-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-settings-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .admin-app .topbar {
        grid-template-columns: 1fr;
        padding: 14px 16px;
        position: static;
    }

    .admin-app .nav {
        flex-wrap: wrap;
        justify-content: flex-start;
        overflow: visible;
        padding-bottom: 0;
    }

    .admin-app .page {
        padding: 22px 14px 48px;
    }

    .admin-hero,
    .admin-page-head {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .question-report-card {
        grid-template-columns: 1fr;
    }

    .landing-editor-form {
        grid-template-columns: 1fr;
    }

    .landing-editor-nav {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        position: static;
    }

    .landing-editor-nav button {
        grid-column: 1 / -1;
    }

    .landing-editor-grid.two,
    .landing-editor-grid.three,
    .landing-menu-editor,
    .landing-repeat-grid,
    .landing-repeat-grid.three {
        grid-template-columns: 1fr;
    }

    .landing-editor-section {
        padding: 18px;
    }

    .landing-editor-savebar {
        align-items: stretch;
        flex-direction: column;
    }

    .landing-editor-savebar .button,
    .landing-editor-savebar button {
        width: 100%;
    }

    .question-report-actions div {
        align-items: stretch;
        flex-direction: column;
    }

    .question-report-actions .button,
    .question-report-actions button {
        width: 100%;
    }

    .admin-head-actions {
        justify-content: flex-start;
    }

    .admin-category-layout,
    .area-switch-panel,
    .admin-area-summary,
    .admin-metrics,
    .admin-quick-grid {
        grid-template-columns: 1fr;
    }

    .area-switch-form {
        grid-template-columns: 1fr;
    }

    .category-action-bar {
        align-items: stretch;
        display: grid;
    }

    .category-actions {
        display: grid;
        justify-content: stretch;
    }

    .category-move-control {
        min-width: 0;
    }

    .category-actions .button,
    .category-actions button {
        width: 100%;
    }

    .bulk-toolbar {
        align-items: stretch;
        display: grid;
    }

    .bulk-toolbar > div {
        justify-content: stretch;
    }

    .bulk-toolbar select,
    .bulk-toolbar button {
        width: 100%;
    }

    .bulk-action-group label {
        align-items: stretch;
        display: grid;
        width: 100%;
    }

    .admin-list-item {
        grid-template-columns: 1fr;
    }

    .admin-class-card summary,
    .admin-class-detail {
        grid-template-columns: 1fr;
    }

    .admin-class-card summary small {
        text-align: left;
    }

    .admin-list-meta {
        align-items: start;
        display: flex;
        flex-wrap: wrap;
        min-width: 0;
    }

    .admin-form-row,
    .admin-answer-list {
        grid-template-columns: 1fr;
    }

    .admin-question-card summary {
        align-items: start;
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .admin-question-card summary em {
        grid-column: 2;
        justify-self: start;
    }

    .admin-question-card summary strong {
        white-space: normal;
    }
}

/* Compact exam list inside admin/exams.php */
.admin-exam-list {
    gap: 8px;
}

.admin-exam-list .admin-list-item {
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    padding: 12px 14px;
}

.admin-exam-list .admin-list-main {
    align-items: center;
    display: grid;
    gap: 4px 10px;
    grid-template-columns: auto minmax(0, 1fr);
}

.admin-exam-list .admin-list-main .badge {
    font-size: 11px;
    grid-row: 1 / span 2;
    padding: 6px 9px;
}

.admin-exam-list .admin-list-main h3 {
    font-size: 16px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-exam-list .admin-list-main p {
    font-size: 13px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-exam-list .admin-list-meta {
    align-items: center;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
}

.admin-exam-list .admin-list-meta span {
    font-size: 11px;
    padding: 6px 9px;
    white-space: nowrap;
}

.admin-exam-list .admin-list-actions {
    flex-wrap: nowrap;
    gap: 6px;
}

.admin-exam-list .admin-list-actions .button {
    font-size: 13px;
    min-height: 34px;
    padding: 8px 12px;
}

@media (max-width: 900px) {
    .admin-exam-list .admin-list-item {
        grid-template-columns: 1fr;
    }

    .admin-exam-list .admin-list-actions,
    .admin-exam-list .admin-list-meta {
        flex-wrap: wrap;
    }
}

.class-guide-module-card {
    align-items: flex-start;
}

.class-guide-student-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-top: 14px;
    overflow: hidden;
    background: #ffffff;
}

.class-guide-student-group summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 800;
    color: var(--text);
    background: #f7fbff;
}

.class-guide-student-group summary small {
    color: var(--muted);
    font-weight: 700;
}

.class-guide-student-lesson {
    border-top: 1px solid var(--line);
    padding: 18px 16px;
}

.class-guide-student-lesson > strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 1rem;
}

.class-guide-student-lesson > p {
    margin: 0 0 12px;
    color: var(--muted);
}

.class-guide-student-lesson .study-reader-content {
    max-width: none;
    padding: 0;
    background: transparent;
    color: var(--text);
}

.study-inline-math {
    background: #f3f8ff;
    border: 1px solid #d9e9f8;
    border-radius: 6px;
    color: #0e2a4d;
    display: inline-block;
    font-family: "Cambria Math", "Times New Roman", serif;
    font-weight: 700;
    line-height: 1.35;
    padding: 0 5px;
    vertical-align: baseline;
}

.study-inline-math sub,
.study-inline-math sup {
    font-size: .72em;
    line-height: 0;
}

.study-inline-math sub {
    vertical-align: sub;
}

.study-inline-math sup {
    vertical-align: super;
}

.study-display-math {
    background: rgba(243, 248, 255, .08);
    border: 1px solid rgba(217, 233, 248, .22);
    border-radius: 12px;
    color: #f7fbff;
    display: block;
    font-family: "Cambria Math", "Times New Roman", serif;
    font-size: calc(24px * var(--study-font-scale));
    font-style: italic;
    font-weight: 800;
    line-height: 1.45;
    margin: 26px auto;
    max-width: min(760px, 100%);
    padding: 18px 22px;
    text-align: center;
}

.study-display-math sub,
.study-display-math sup {
    font-size: .68em;
    line-height: 0;
}

.study-display-math sub {
    vertical-align: sub;
}

.study-display-math sup {
    vertical-align: super;
}

.study-frac {
    align-items: center;
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 4px;
    vertical-align: middle;
}

.study-frac-num {
    border-bottom: 2px solid currentColor;
    display: block;
    padding: 0 8px 3px;
}

.study-frac-den {
    display: block;
    padding: 2px 8px 0;
}

.teacher-class-context {
    background: linear-gradient(135deg, #f1f8ff, #ffffff);
    border: 1px solid #d7e8f8;
    border-radius: 14px;
    color: var(--text);
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
    padding: 14px 16px;
}

.teacher-class-context span {
    color: var(--primary);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.teacher-class-context strong {
    font-size: 1.1rem;
}

.teacher-class-context small {
    color: var(--muted);
    font-weight: 700;
}

.teacher-date-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.teacher-date-grid input[type="datetime-local"] {
    min-width: 0;
    width: 100%;
}

/* Final navigation system: desktop fixed, mobile drawer */
@media (min-width: 901px) {
    .admin-app .topbar.admin-sidebar,
    .teacher-app .topbar.teacher-sidebar,
    .student-sidebar {
        height: 100vh !important;
        left: 0 !important;
        max-width: none !important;
        overflow: visible !important;
        position: fixed !important;
        top: 0 !important;
        transform: none !important;
        z-index: 700 !important;
    }

    .admin-app .topbar.admin-sidebar {
        width: var(--admin-sidebar-width) !important;
    }

    .teacher-app .topbar.teacher-sidebar {
        width: var(--teacher-sidebar-width) !important;
    }

    .student-sidebar {
        width: var(--student-sidebar-width) !important;
    }

    .admin-sidebar-toggle,
    .teacher-sidebar-toggle,
    .student-sidebar-toggle {
        display: none !important;
    }

    .admin-app.admin-sidebar-collapsed .topbar.admin-sidebar .brand span:last-child,
    .admin-app.admin-sidebar-collapsed .topbar.admin-sidebar .nav,
    .admin-app.admin-sidebar-collapsed .topbar.admin-sidebar .nav-user,
    .admin-app.admin-sidebar-collapsed .topbar.admin-sidebar .button.ghost,
    .teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar .brand span:last-child,
    .teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar .nav,
    .teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar .nav-user,
    .teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar .button.ghost,
    .student-app.student-sidebar-collapsed .student-brand span:last-child,
    .student-app.student-sidebar-collapsed .student-menu,
    .student-app.student-sidebar-collapsed .student-sidebar-footer {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .admin-app .page,
    .admin-app.admin-sidebar-collapsed .page {
        margin-left: var(--admin-sidebar-width) !important;
        margin-right: auto !important;
        padding-left: 28px !important;
        padding-right: 28px !important;
        width: min(1240px, calc(100% - var(--admin-sidebar-width) - 56px)) !important;
    }

    .teacher-app .page,
    .teacher-app.teacher-sidebar-collapsed .page {
        margin-left: var(--teacher-sidebar-width) !important;
        margin-right: auto !important;
        padding-left: 28px !important;
        padding-right: 28px !important;
        width: min(1240px, calc(100% - var(--teacher-sidebar-width) - 56px)) !important;
    }

    .student-main,
    .student-app.student-sidebar-collapsed .student-main {
        margin-left: calc(var(--student-sidebar-width) + 24px) !important;
        margin-right: auto !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: min(1240px, calc(100% - var(--student-sidebar-width) - 56px)) !important;
    }

    .admin-app:not(.admin-sidebar-collapsed) .page,
    .teacher-app:not(.teacher-sidebar-collapsed) .page,
    .student-app:not(.student-sidebar-collapsed) .student-main {
        pointer-events: auto !important;
    }
}

/* Mobile menu stability: the button stays top-left in both states */
@media (max-width: 900px) {
    .admin-app .topbar.admin-sidebar,
    .teacher-app .topbar.teacher-sidebar,
    .student-sidebar {
        padding-top: 74px !important;
    }

    .admin-sidebar-toggle,
    .teacher-sidebar-toggle,
    .student-sidebar-toggle,
    .admin-app.admin-sidebar-collapsed .admin-sidebar-toggle,
    .teacher-app.teacher-sidebar-collapsed .teacher-sidebar-toggle,
    .student-app.student-sidebar-collapsed .student-sidebar-toggle {
        background: #2d8fe3 !important;
        border-color: #2d8fe3 !important;
        border-radius: 12px !important;
        color: #fff !important;
        font-size: 22px !important;
        left: 14px !important;
        right: auto !important;
        top: 14px !important;
        transform: none !important;
    }

    .admin-sidebar-toggle span,
    .teacher-sidebar-toggle span,
    .student-sidebar-toggle span,
    .admin-app.admin-sidebar-collapsed .admin-sidebar-toggle span,
    .teacher-app.teacher-sidebar-collapsed .teacher-sidebar-toggle span,
    .student-app.student-sidebar-collapsed .student-sidebar-toggle span {
        transform: none !important;
    }
}

@media (max-width: 900px) {
    .admin-app,
    .teacher-app,
    .student-app {
        --admin-sidebar-width: min(300px, calc(100vw - 48px));
        --teacher-sidebar-width: min(300px, calc(100vw - 48px));
        --student-sidebar-width: min(300px, calc(100vw - 48px));
    }

    .admin-app .topbar.admin-sidebar,
    .teacher-app .topbar.teacher-sidebar,
    .student-sidebar {
        height: 100dvh !important;
        left: 0 !important;
        max-width: calc(100vw - 48px) !important;
        overflow: visible !important;
        position: fixed !important;
        top: 0 !important;
        transform: translateX(0) !important;
        width: min(300px, calc(100vw - 48px)) !important;
        z-index: 1000 !important;
    }

    .admin-app.admin-sidebar-collapsed .topbar.admin-sidebar,
    .teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar,
    .student-app.student-sidebar-collapsed .student-sidebar {
        transform: translateX(calc(-100% - 12px)) !important;
    }

    .admin-sidebar-toggle,
    .teacher-sidebar-toggle,
    .student-sidebar-toggle {
        display: grid !important;
        height: 42px !important;
        left: calc(min(300px, calc(100vw - 48px)) - 21px) !important;
        position: fixed !important;
        right: auto !important;
        top: 18px !important;
        width: 42px !important;
        z-index: 1120 !important;
    }

    .admin-app.admin-sidebar-collapsed .admin-sidebar-toggle,
    .teacher-app.teacher-sidebar-collapsed .teacher-sidebar-toggle,
    .student-app.student-sidebar-collapsed .student-sidebar-toggle {
        left: 14px !important;
        right: auto !important;
    }

    .admin-app .page,
    .admin-app.admin-sidebar-collapsed .page,
    .teacher-app .page,
    .teacher-app.teacher-sidebar-collapsed .page,
    .student-main,
    .student-app.student-sidebar-collapsed .student-main {
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        width: min(100% - 24px, 760px) !important;
    }

    .admin-app:not(.admin-sidebar-collapsed) .page,
    .teacher-app:not(.teacher-sidebar-collapsed) .page,
    .student-app:not(.student-sidebar-collapsed) .student-main {
        pointer-events: auto !important;
    }
}

.admin-section-switch {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(14, 42, 77, .07);
    display: inline-flex;
    gap: 6px;
    margin: 0 0 18px;
    padding: 6px;
}

.admin-section-switch a {
    border-radius: 10px;
    color: #52667d;
    font-size: 13px;
    font-weight: 900;
    padding: 10px 14px;
}

.admin-section-switch a.is-active,
.admin-section-switch a:hover {
    background: #eaf4ff;
    color: #0d63b0;
}

.admin-create-layout {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 1fr) 340px;
}

.admin-create-card {
    max-width: none;
}

.admin-create-card textarea {
    resize: vertical;
}

.admin-step-card {
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(14, 42, 77, .08);
    display: grid;
    gap: 14px;
    padding: 24px;
    position: sticky;
    top: 96px;
}

.admin-step-card span {
    color: #2387d8;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.admin-step-card h2 {
    color: #0e2a4d;
    font-size: 24px;
    margin: 0;
}

.admin-step-card ol {
    color: #52667d;
    display: grid;
    gap: 12px;
    line-height: 1.45;
    margin: 0;
    padding-left: 20px;
}

.admin-step-card li::marker {
    color: #2387d8;
    font-weight: 900;
}

.admin-area-picker {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.admin-area-picker a {
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 12px;
    display: grid;
    gap: 4px;
    padding: 13px;
}

.admin-area-picker a strong {
    color: #102a46;
    font-size: 14px;
}

.admin-area-picker a span {
    color: #607187;
    font-size: 12px;
    font-weight: 800;
}

.admin-area-picker a.is-active,
.admin-area-picker a:hover {
    background: #eaf4ff;
    border-color: #9cccf5;
}

.admin-question-edit-form {
    display: grid;
    gap: 14px;
}

.admin-delete-form {
    border-top: 1px solid #e2edf6;
    margin: 2px 0 0;
    padding-top: 14px;
}

.field small {
    color: #607187;
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 6px;
}

@media (max-width: 980px) {
    .admin-create-layout {
        grid-template-columns: 1fr;
    }

    .admin-step-card {
        position: static;
    }

    .admin-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .flashcards-admin-filter {
        grid-template-columns: 1fr;
    }

    .flashcards-filter-actions {
        justify-content: stretch;
    }

    .flashcards-filter-actions .button,
    .flashcards-filter-actions button {
        flex: 1 1 0;
    }

    .admin-inline-edit,
    .admin-inline-edit.contact-inline-edit,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .university-add-form,
    .university-list-head,
    .pdf-question-card header,
    .pdf-options-grid,
    .pdf-feedback-grid {
        grid-template-columns: 1fr;
    }

    .university-mini-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .admin-section-switch {
        display: grid;
        width: 100%;
    }

    .admin-area-picker {
        grid-template-columns: 1fr;
    }

    .admin-filter-form {
        grid-template-columns: 1fr;
    }

    .flashcards-filter-actions {
        flex-direction: column;
    }

    .flashcards-filter-actions .button,
    .flashcards-filter-actions button {
        width: 100%;
    }
}

/* Student experience refresh */
.student-app {
    background: #f5f8fc;
    color: #10243e;
}

.student-app a,
.student-app button,
.student-app input,
.student-app select,
.student-app textarea {
    letter-spacing: 0;
}

.student-sidebar {
    align-items: center;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #dbe5f0;
    box-shadow: 0 12px 28px rgba(15, 35, 65, .08);
    color: #10243e;
    gap: 16px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 70px;
    padding: 10px 24px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.student-brand {
    color: #10243e;
    font-size: 21px;
    min-width: max-content;
}

.student-logo {
    background: #237dcc;
    border-radius: 8px;
    color: #fff;
    font-size: 18px;
    height: 34px;
    width: 34px;
}

.student-menu {
    justify-content: center;
    min-width: 0;
}

.student-menu a,
.student-sidebar-footer a,
.student-user {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #4d5f76;
    font-size: 13px;
    min-height: 38px;
    padding: 8px 11px;
}

.student-menu a:hover,
.student-sidebar-footer a:hover,
.student-menu a.is-active,
.student-sidebar-footer a.is-active,
.student-user.is-active {
    background: #eaf4ff;
    border-color: #c9e4fb;
    color: #0d63b0;
}

.student-menu span,
.student-sidebar-footer span,
.student-user span {
    background: #f0f6fd;
    border: 1px solid #cfe0f2;
    border-radius: 6px;
    color: #237dcc;
}

.student-sidebar-footer {
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.student-user {
    max-width: 165px;
}

.student-user span {
    display: none;
}

.student-main {
    padding: 34px 0 64px;
    width: min(1240px, calc(100% - 36px));
}

.student-dashboard-main,
.exam-mode-main,
.flashcards-main,
.manage-flashcards-main,
.statistics-main,
.resources-main,
.profile-main,
.contact-main {
    padding-top: 34px;
}

.student-dashboard-head {
    align-items: end;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 18px;
}

.student-dashboard-head span,
.student-overview-grid span,
.student-quick-card span,
.student-section-head span,
.exam-eyebrow,
.flashcards-setup-copy > span,
.statistics-hero span,
.resources-hero > div > span,
.profile-summary > span,
.contact-hero span,
.manage-flashcards-header span {
    letter-spacing: 0;
}

.student-dashboard-head span,
.student-overview-grid span {
    color: #237dcc;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.student-dashboard-head h1,
.student-intro h1,
.student-section h2,
.exam-mode-copy h1,
.flashcards-setup-copy h1,
.statistics-hero h1,
.resources-hero h1,
.profile-summary h1,
.contact-hero h1,
.manage-flashcards-header h1 {
    color: #0e2a4d;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.06;
    margin: 0 0 10px;
}

.student-dashboard-head p,
.student-section p,
.exam-mode-copy p,
.exam-mode-copy li,
.flashcards-setup-copy p,
.statistics-hero p,
.resources-hero p,
.profile-summary p,
.contact-hero p,
.manage-flashcards-header p {
    color: #53667f;
    font-size: 15px;
    line-height: 1.55;
}

.student-dashboard-head p {
    max-width: 720px;
}

.student-dashboard-actions,
.student-card-actions,
.profile-actions,
.statistics-plan-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.student-overview-grid,
.student-quick-grid,
.analytics-overview,
.statistics-kpis {
    display: grid;
    gap: 14px;
}

.student-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 16px;
}

.student-overview-grid article,
.student-quick-card,
.student-exam-card,
.analytics-overview article,
.analytics-panel,
.statistics-kpis article,
.statistics-panel,
.resources-search-card,
.resource-card,
.profile-card,
.manage-flashcards-form,
.manage-flashcards-list,
.manage-flashcard-card,
.exam-create-panel,
.exam-continue-panel,
.flashcards-options-panel,
.contact-card {
    background: #fff;
    border: 1px solid #dce6f1;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(20, 45, 80, .07);
}

.student-overview-grid article {
    display: grid;
    gap: 4px;
    min-height: 128px;
    padding: 18px;
}

.student-overview-grid strong {
    color: #0e2a4d;
    font-size: 28px;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.student-overview-grid small,
.student-quick-card small {
    color: #65758b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.student-quick-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 28px;
}

.student-quick-card {
    align-items: start;
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 18px;
}

.student-quick-card span {
    background: #eaf4ff;
    border-radius: 8px;
    color: #237dcc;
    display: grid;
    font-size: 14px;
    font-weight: 900;
    height: 34px;
    place-items: center;
    width: 34px;
}

.student-quick-card strong {
    color: #0e2a4d;
    font-size: 18px;
}

.student-quick-card:hover {
    border-color: #a7d4f7;
    transform: translateY(-1px);
}

.student-hero {
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 310px;
}

.student-action-list {
    gap: 12px;
}

.student-action {
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(45, 99, 170, .16);
    min-height: 56px;
}

.student-rule {
    background: #dfe8f2;
    margin: 32px 0;
    width: 100%;
}

.student-section {
    display: grid;
    gap: 14px;
}

.student-section h2 {
    font-size: clamp(24px, 3vw, 32px);
    margin: 0;
}

.student-section-head {
    align-items: end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.student-empty,
.student-notice,
.student-result {
    background: #eaf4ff;
    border: 1px solid #cfe5f8;
    box-shadow: none;
    color: #0d4f84;
    margin-top: 6px;
}

.student-exam-grid,
.manage-flashcards-grid,
.resources-grid {
    gap: 14px;
}

.student-exam-card {
    gap: 14px;
    min-height: auto;
    padding: 18px;
}

.student-exam-card h3,
.manage-flashcard-card h3,
.resource-card h3 {
    color: #0e2a4d;
    line-height: 1.2;
    margin-bottom: 6px;
}

.student-exam-card p,
.manage-flashcard-card p,
.resource-card p {
    color: #5b6f86;
}

.student-exam-meta span,
.student-exam-meta strong,
.manage-card-badges span,
.resource-card-top span,
.resource-card-top small {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 10px;
}

.student-progress-line {
    background: #e2edf7;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
}

.student-progress-line span {
    background: linear-gradient(90deg, #237dcc, #2fbda0);
    display: block;
    height: 100%;
}

.analytics-header,
.statistics-hero,
.resources-hero,
.manage-flashcards-header {
    align-items: end;
    gap: 20px;
}

.analytics-overview,
.statistics-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 18px;
}

.analytics-overview article,
.statistics-kpis article {
    min-height: 132px;
    padding: 18px;
}

.analytics-grid,
.statistics-layout {
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
}

.analytics-panel,
.statistics-panel {
    padding: 20px;
}

.exam-mode-layout,
.flashcards-setup-layout {
    gap: 34px;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
}

.exam-create-panel,
.flashcards-options-panel {
    padding: 22px;
    position: sticky;
    top: 92px;
}

.flashcards-options-panel {
    align-self: start;
}

.flashcards-options-panel h2,
.exam-create-head h2 {
    color: #0e2a4d;
}

.exam-mode-copy ul {
    background: #fff;
    border-radius: 8px;
}

.exam-tip {
    background: #edf7ff;
    border-radius: 8px;
}

.exam-continue-panel {
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    margin-bottom: 26px;
}

.exam-continue-list article {
    border-radius: 8px;
}

.flashcards-setup-copy {
    max-width: 820px;
}

.flashcards-setup-copy h2 {
    color: #0e2a4d;
    font-size: 18px;
    margin-top: 24px;
}

.flashcards-options-panel button,
.exam-start-button {
    width: 100%;
}

.manage-flashcards-layout,
.profile-layout,
.statistics-lower {
    gap: 18px;
}

.profile-layout {
    grid-template-columns: minmax(260px, .72fr) minmax(0, 1fr);
}

.profile-card,
.manage-flashcards-form,
.manage-flashcards-list {
    padding: 22px;
}

.profile-grid {
    gap: 14px;
}

.resources-hero {
    margin-bottom: 18px;
}

.resources-filters,
.flashcard-filter-bar {
    border-bottom: 0;
    margin-bottom: 22px;
    padding-bottom: 0;
}

.resources-filters a,
.flashcard-filter-bar a {
    border-radius: 8px;
}

.contact-hero {
    background: #102f56;
    border-radius: 8px;
    padding: clamp(24px, 4vw, 42px);
}

.contact-grid {
    gap: 14px;
}

.contact-card {
    padding: 18px;
}

.button,
button,
.exam-start-button {
    border-radius: 8px;
}

@media (max-width: 1120px) {
    .student-sidebar {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .student-brand {
        justify-self: start;
    }

    .student-menu {
        justify-content: start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .student-sidebar-footer {
        justify-content: start;
    }

    .student-overview-grid,
    .analytics-overview,
    .statistics-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exam-mode-layout,
    .flashcards-setup-layout,
    .exam-continue-panel,
    .statistics-layout,
    .statistics-lower,
    .analytics-grid,
    .resources-hero,
    .manage-flashcards-header,
    .manage-flashcards-layout,
    .profile-layout {
        grid-template-columns: 1fr;
    }

    .exam-create-panel,
    .flashcards-options-panel {
        position: static;
    }
}

@media (max-width: 720px) {
    .student-sidebar {
        padding: 12px;
    }

    .student-main {
        padding: 24px 0 48px;
        width: min(100% - 24px, 720px);
    }

    .student-dashboard-head,
    .student-section-head,
    .analytics-header,
    .statistics-hero {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

    .student-dashboard-actions,
    .student-card-actions,
    .profile-actions,
    .statistics-plan-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .student-dashboard-actions .button,
    .student-card-actions .button,
    .student-card-actions button,
    .profile-actions .button,
    .profile-actions button,
    .statistics-plan-actions .button {
        width: 100%;
    }

    .student-overview-grid,
    .student-quick-grid,
    .analytics-overview,
    .statistics-kpis,
    .contact-grid,
    .resources-grid.featured {
        grid-template-columns: 1fr;
    }

    .student-menu a,
    .student-sidebar-footer a,
    .student-user {
        font-size: 12px;
    }

    .student-sidebar-footer {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .student-sidebar-footer a,
    .student-user {
        justify-content: center;
        max-width: none;
        min-width: 0;
    }

    .student-rule {
        margin: 24px 0;
    }
}

@media (max-width: 460px) {
    .student-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
    }

    .student-menu a,
    .student-sidebar-footer a,
    .student-user {
        justify-content: center;
        white-space: normal;
    }

    .student-sidebar-footer {
        grid-template-columns: 1fr;
    }
}

/* Admin students */

.teacher-page,
.classes-main {
    display: grid;
    gap: 28px;
}

.teacher-hero,
.classes-hero {
    align-items: center;
    background: linear-gradient(135deg, #0f2d52, #173f72);
    border-radius: 18px;
    color: #fff;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    padding: 34px;
}

.teacher-hero span,
.classes-hero span {
    color: #70c1ff;
    display: inline-block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.teacher-hero h1,
.classes-hero h1 {
    color: #fff;
    font-size: 40px;
    line-height: 1.05;
    margin: 0 0 10px;
}

.teacher-hero p,
.classes-hero p {
    color: #dcecff;
    line-height: 1.6;
    margin: 0;
    max-width: 760px;
}

.teacher-hero-card {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 14px;
    min-width: 150px;
    padding: 18px;
    text-align: center;
}

.teacher-hero-card strong {
    display: block;
    font-size: 38px;
    line-height: 1;
}

.teacher-grid,
.classes-layout,
.teacher-detail-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
    align-items: start;
}

.teacher-class-list,
.teacher-exam-list,
.teacher-resource-list,
.class-material-list,
.teacher-student-list {
    display: grid;
    gap: 14px;
}

.teacher-class-card,
.teacher-exam-card,
.teacher-resource-list article,
.class-material-list article,
.teacher-student-list article,
.class-exam-grid article,
.class-tabs a {
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(20, 45, 80, .08);
}

.teacher-class-card {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.teacher-class-card h2,
.class-content h2 {
    color: #09294d;
    margin: 0 0 8px;
}

.teacher-class-card p,
.class-title-row p,
.class-exam-grid p,
.class-material-list p,
.teacher-resource-list p {
    color: #52657c;
    line-height: 1.5;
    margin: 0;
}

.teacher-code {
    background: #e8f3ff;
    border: 1px solid #c9e3fb;
    border-radius: 999px;
    color: #0d63b0;
    display: inline-block;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 12px;
    padding: 6px 10px;
}

.teacher-class-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.teacher-class-stats span {
    background: #f4f8fd;
    border: 1px solid #dbe7f3;
    border-radius: 999px;
    color: #4d6178;
    font-size: 13px;
    padding: 7px 10px;
}

.teacher-flow {
    display: grid;
    gap: 12px;
}

.teacher-flow article {
    align-items: center;
    background: #f6faff;
    border: 1px solid #dbe7f3;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    padding: 14px;
}

.teacher-flow strong {
    background: #2e8fe6;
    border-radius: 10px;
    color: #fff;
    display: grid;
    height: 32px;
    place-items: center;
    width: 32px;
}

.teacher-resource-list article,
.class-material-list article {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 16px;
}

.teacher-resource-list article > span,
.class-material-list article > span,
.class-exam-grid article > span,
.teacher-exam-card summary > span {
    background: #eef7ff;
    border-radius: 999px;
    color: #0d63b0;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 10px;
}

.teacher-student-list article {
    display: grid;
    gap: 4px;
    padding: 14px;
}

.teacher-student-list span {
    color: #60748c;
    font-size: 13px;
}

.teacher-exam-card {
    overflow: hidden;
}

.teacher-exam-card summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    list-style: none;
    padding: 18px;
}

.teacher-exam-card summary::-webkit-details-marker {
    display: none;
}

.teacher-exam-card summary strong {
    color: #09294d;
}

.teacher-exam-card summary small {
    color: #60748c;
}

.teacher-question-form {
    border-top: 1px solid #e3edf7;
    display: grid;
    gap: 14px;
    padding: 18px;
}

.teacher-options-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-options-grid label {
    background: #f8fbff;
    border: 1px solid #dbe7f3;
    border-radius: 10px;
    display: grid;
    gap: 8px;
    padding: 12px;
}

.teacher-options-grid span {
    color: #52657c;
    font-size: 12px;
    font-weight: 800;
}

.teacher-options-grid small {
    align-items: center;
    color: #53657a;
    display: flex;
    gap: 6px;
    font-weight: 800;
}

.class-join-card {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    display: grid;
    gap: 10px;
    min-width: min(420px, 100%);
    padding: 16px;
}

.class-join-card label {
    color: #eaf5ff;
    font-size: 12px;
    font-weight: 900;
}

.class-join-card div {
    display: flex;
    gap: 8px;
}

.class-join-card input {
    border: 0;
    border-radius: 10px;
    min-width: 0;
    padding: 12px 14px;
    width: 100%;
}

.class-join-card button {
    background: #2e8fe6;
    border: 0;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
    padding: 0 18px;
}

.class-tabs {
    display: grid;
    gap: 10px;
}

.class-tabs a {
    color: #10243e;
    display: grid;
    gap: 6px;
    padding: 16px;
    text-decoration: none;
}

.class-tabs a.is-active {
    border-color: #8ac8fb;
    box-shadow: 0 0 0 3px rgba(46, 143, 230, .12);
}

.class-tabs span {
    color: #60748c;
    font-size: 12px;
}

.class-content,
.class-section {
    display: grid;
    gap: 18px;
}

.class-title-row {
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 16px;
    padding: 24px;
}

.class-title-row span {
    color: #2e8fe6;
    display: inline-block;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 8px;
}

.class-section {
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 16px;
    padding: 20px;
}

.class-exam-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.class-exam-grid article {
    display: grid;
    gap: 12px;
    padding: 18px;
}

.class-exam-grid h3,
.class-material-list h3,
.teacher-resource-list h3 {
    color: #09294d;
    margin: 0;
}

.teacher-tabs {
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(20, 45, 80, .06);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    padding: 10px;
}

.teacher-tabs a {
    border: 1px solid transparent;
    border-radius: 12px;
    color: #173557;
    display: grid;
    gap: 4px;
    min-height: 72px;
    padding: 14px 16px;
    text-decoration: none;
}

.teacher-tabs a:hover,
.teacher-tabs a.is-active {
    background: #eef7ff;
    border-color: #bfe1fb;
}

.teacher-tabs strong {
    color: #09294d;
    font-size: 15px;
    line-height: 1.2;
}

.teacher-tabs span {
    color: #60748c;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
}

.teacher-guide-panel,
.teacher-single-panel,
.teacher-help-card {
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(20, 45, 80, .07);
}

.teacher-guide-panel {
    display: grid;
    gap: 18px;
    padding: 24px;
}

.teacher-single-panel {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(320px, 520px) minmax(260px, 1fr);
    padding: 22px;
}

.teacher-single-panel .admin-form-card {
    box-shadow: none;
}

.teacher-help-card {
    align-self: start;
    background: #f6faff;
    display: grid;
    gap: 8px;
    padding: 22px;
}

.teacher-help-card span,
.teacher-class-overview article span {
    color: #2e8fe6;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.teacher-help-card h3 {
    color: #09294d;
    margin: 0;
}

.teacher-help-card p {
    color: #52657c;
    line-height: 1.55;
    margin: 0;
}

.teacher-tab-layout {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
    align-items: start;
}

.teacher-tab-layout > .admin-form-card {
    position: sticky;
    top: 24px;
}

.teacher-class-list-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.teacher-directory-panel {
    background: #fff;
    border: 1px solid #dbe7f3;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(20, 45, 80, .07);
    display: grid;
    gap: 18px;
    padding: 22px;
}

.teacher-directory-head {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.teacher-directory-head span,
.teacher-class-search span {
    color: #2e8fe6;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.teacher-directory-head h2 {
    color: #09294d;
    font-size: 28px;
    line-height: 1.1;
    margin: 4px 0 6px;
}

.teacher-directory-head p {
    color: #52657c;
    line-height: 1.5;
    margin: 0;
}

.teacher-directory-metrics {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.teacher-directory-metrics article {
    background: #f6faff;
    border: 1px solid #dbe7f3;
    border-radius: 12px;
    display: grid;
    gap: 4px;
    padding: 14px;
}

.teacher-directory-metrics strong {
    color: #09294d;
    font-size: 26px;
    line-height: 1;
}

.teacher-directory-metrics span {
    color: #60748c;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.teacher-class-search {
    align-items: end;
    background: #f6faff;
    border: 1px solid #dbe7f3;
    border-radius: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    padding: 14px;
}

.teacher-class-search label {
    display: grid;
    gap: 6px;
}

.teacher-class-search input {
    background: #fff;
    border: 1px solid #cddbec;
    border-radius: 10px;
    color: #10243e;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

.teacher-class-search button,
.teacher-class-search .button {
    min-height: 44px;
}

.teacher-class-table-wrap {
    border: 1px solid #dbe7f3;
    border-radius: 12px;
    overflow-x: auto;
}

.teacher-class-table {
    border-collapse: collapse;
    min-width: 920px;
    width: 100%;
}

.teacher-class-table th {
    background: #edf5fc;
    color: #49617c;
    font-size: 12px;
    font-weight: 900;
    padding: 13px 14px;
    text-align: left;
    text-transform: uppercase;
}

.teacher-class-table td {
    border-top: 1px solid #e3edf7;
    color: #173557;
    padding: 14px;
    vertical-align: middle;
}

.teacher-class-table td:first-child {
    min-width: 260px;
}

.teacher-class-table td strong {
    color: #09294d;
    display: block;
    font-size: 15px;
    line-height: 1.25;
}

.teacher-class-table td small {
    color: #60748c;
    display: block;
    font-size: 12px;
    line-height: 1.35;
    margin-top: 5px;
}

.teacher-code-button {
    background: #e8f3ff;
    border: 1px solid #c9e3fb;
    border-radius: 999px;
    color: #0d63b0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 900;
    min-height: 34px;
    padding: 7px 10px;
}

.teacher-code-button:hover,
.teacher-code-button.is-copied {
    background: #2e8fe6;
    border-color: #2e8fe6;
    color: #fff;
}

.teacher-class-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.teacher-class-actions .button {
    min-height: 36px;
    padding: 8px 12px;
}

.teacher-class-overview {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.teacher-class-overview article {
    background: #f6faff;
    border: 1px solid #dbe7f3;
    border-radius: 14px;
    display: grid;
    gap: 8px;
    min-height: 160px;
    padding: 18px;
}

.teacher-class-overview article strong {
    color: #09294d;
    font-size: 32px;
    line-height: 1;
    overflow-wrap: anywhere;
}

.teacher-class-overview article p {
    color: #52657c;
    line-height: 1.45;
    margin: 0;
}

.teacher-student-list-grid {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.teacher-student-list small {
    color: #7a8da3;
    font-size: 12px;
    font-weight: 700;
}

.teacher-exam-list {
    max-height: 980px;
    overflow: auto;
    padding-right: 4px;
}

@media (max-width: 920px) {
    .teacher-hero,
    .classes-hero,
    .teacher-grid,
    .classes-layout,
    .teacher-detail-grid,
    .teacher-single-panel,
    .teacher-tab-layout,
    .teacher-class-overview {
        grid-template-columns: 1fr;
    }

    .teacher-hero,
    .classes-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .teacher-options-grid,
    .teacher-resource-list article,
    .class-material-list article,
    .teacher-exam-card summary,
    .teacher-directory-head,
    .teacher-class-search {
        grid-template-columns: 1fr;
    }

    .teacher-directory-head {
        align-items: stretch;
        display: grid;
    }

    .teacher-directory-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .teacher-tab-layout > .admin-form-card {
        position: static;
    }
}

@media (max-width: 560px) {
    .teacher-hero,
    .classes-hero {
        border-radius: 14px;
        padding: 22px;
    }

    .teacher-hero h1,
    .classes-hero h1 {
        font-size: 32px;
    }

    .class-join-card div {
        flex-direction: column;
    }

    .class-join-card button {
        min-height: 44px;
    }

    .teacher-tabs {
        grid-template-columns: 1fr;
    }

    .teacher-tabs a {
        min-height: auto;
    }

    .teacher-guide-panel,
    .teacher-single-panel {
        padding: 16px;
    }

    .teacher-directory-panel {
        padding: 14px;
    }

    .teacher-directory-metrics {
        grid-template-columns: 1fr;
    }

    .teacher-class-table,
    .teacher-class-table thead,
    .teacher-class-table tbody,
    .teacher-class-table tr,
    .teacher-class-table th,
    .teacher-class-table td {
        display: block;
        min-width: 0;
    }

    .teacher-class-table {
        min-width: 0;
    }

    .teacher-class-table thead {
        display: none;
    }

    .teacher-class-table tr {
        background: #fff;
        border-top: 1px solid #e3edf7;
        display: grid;
        gap: 10px;
        padding: 14px;
    }

    .teacher-class-table tr:first-child {
        border-top: 0;
    }

    .teacher-class-table td {
        border: 0;
        padding: 0;
    }

    .teacher-class-table td:not(:first-child):not(:last-child) {
        align-items: center;
        display: flex;
        justify-content: space-between;
    }

    .teacher-class-table td:nth-child(3)::before {
        content: "Estudiantes";
        color: #60748c;
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .teacher-class-table td:nth-child(4)::before {
        content: "Examenes";
        color: #60748c;
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .teacher-class-table td:nth-child(5)::before {
        content: "Materiales";
        color: #60748c;
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .teacher-class-table td:nth-child(6)::before {
        content: "Creada";
        color: #60748c;
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .teacher-class-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}
.admin-students-page {
    display: grid;
    gap: 22px;
}

.admin-student-metrics {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-student-metrics article,
.admin-student-insights {
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(14, 42, 77, .07);
}

.admin-student-metrics article {
    display: grid;
    gap: 5px;
    padding: 18px;
}

.admin-student-metrics span {
    color: #2387d8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.admin-student-metrics strong {
    color: #0e2a4d;
    font-size: 32px;
    line-height: 1;
}

.admin-student-metrics small {
    color: #607187;
    font-weight: 800;
}

.admin-student-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(320px, .62fr) minmax(0, 1fr);
}

.admin-student-create {
    max-width: none;
}

.admin-student-insights {
    padding: 22px;
}

.student-area-list {
    display: grid;
    gap: 12px;
}

.student-area-list article {
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 12px;
    display: grid;
    gap: 9px;
    padding: 14px;
}

.student-area-list article > div:first-child {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.student-area-list strong {
    color: #102a46;
}

.student-area-list span {
    color: #607187;
    font-size: 12px;
    font-weight: 900;
}

.admin-students-table {
    min-width: 1080px;
}

.admin-students-table td {
    vertical-align: top;
}

.admin-students-table td strong,
.admin-students-table td small {
    display: block;
}

.admin-students-table td small {
    color: #607187;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    margin-top: 3px;
}

.admin-students-table a {
    color: #0d63b0;
    font-weight: 800;
}

.manage-exams-layout {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: 360px minmax(0, 1fr);
}

.student-private-exam-list,
.student-share-panel,
.student-question-builder,
.student-created-questions {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.student-private-exam-list a,
.student-share-panel,
.student-question-builder,
.student-created-questions {
    background: #f7fbff;
    border: 1px solid #dce8f3;
    border-radius: 8px;
    padding: 14px;
}

.student-private-exam-list a {
    display: grid;
    gap: 4px;
}

.student-private-exam-list a.is-active,
.student-private-exam-list a:hover {
    background: #eaf4ff;
    border-color: #a9d5f8;
}

.student-private-exam-list strong,
.student-share-panel h3,
.student-question-builder h3,
.student-created-questions h3 {
    color: #0e2a4d;
}

.student-private-exam-list span,
.student-share-panel p {
    color: #607187;
    font-size: 13px;
    font-weight: 800;
}

.student-share-list {
    display: grid;
    gap: 10px;
}

.student-share-list article {
    align-items: center;
    background: #fff;
    border: 1px solid #dce8f3;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

.student-share-list span {
    color: #607187;
    display: block;
    font-size: 13px;
    font-weight: 800;
}

.student-submitted-exam small {
    color: #607187;
    font-size: 12px;
    font-weight: 800;
}

.student-exam-reject {
    display: flex;
    flex: 1 1 240px;
    gap: 8px;
}

.student-exam-reject input {
    min-width: 160px;
}

@media (max-width: 980px) {
    .admin-student-metrics,
    .admin-student-layout {
        grid-template-columns: 1fr 1fr;
    }

    .admin-student-layout {
        grid-template-columns: 1fr;
    }

    .manage-exams-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .admin-student-metrics {
        grid-template-columns: 1fr;
    }

    .student-area-list article > div:first-child {
        align-items: start;
        flex-direction: column;
    }

    .student-share-list article,
    .student-exam-reject {
        align-items: stretch;
        flex-direction: column;
    }
}

.student-more-menu {
    display: none;
}

@media (max-width: 760px) {
    .student-menu {
        display: grid !important;
        gap: 8px;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        overflow: visible !important;
        padding-bottom: 0 !important;
    }

    .student-menu .student-mobile-secondary {
        display: none !important;
    }

    .student-more-menu {
        display: block;
        grid-column: 1 / -1;
        min-width: 0;
        position: relative;
    }

    .student-more-menu summary {
        align-items: center;
        background: transparent;
        border: 1px solid transparent;
        border-radius: 8px;
        color: #4d5f76;
        cursor: pointer;
        display: flex;
        font-size: 12px;
        font-weight: 800;
        gap: 7px;
        justify-content: center;
        list-style: none;
        min-height: 38px;
        padding: 8px 7px;
        white-space: normal;
        width: min(112px, 100%);
    }

    .student-more-menu summary::-webkit-details-marker {
        display: none;
    }

    .student-more-menu summary span {
        align-items: center;
        background: #f0f6fd;
        border: 1px solid #cfe0f2;
        border-radius: 6px;
        color: #237dcc;
        display: grid;
        flex: 0 0 auto;
        font-size: 9px;
        font-weight: 900;
        height: 17px;
        justify-content: center;
        place-items: center;
        width: 17px;
    }

    .student-more-menu[open] summary,
    .student-more-menu.is-active summary {
        background: #eaf4ff;
        border-color: #c9e4fb;
        color: #0d63b0;
    }

    .student-more-panel {
        background: #fff;
        border: 1px solid #d6e5f5;
        border-radius: 12px;
        box-shadow: 0 18px 42px rgba(16, 42, 70, .16);
        display: grid;
        gap: 6px;
        margin-top: 8px;
        min-width: 0;
        padding: 8px;
        position: static;
        width: min(100%, 360px);
        z-index: 60;
    }

    .student-more-panel a,
    .student-menu .student-more-panel a.student-mobile-secondary {
        align-items: center;
        border-radius: 8px;
        color: #43566d;
        display: flex !important;
        font-size: 13px;
        font-weight: 800;
        gap: 9px;
        justify-content: flex-start;
        min-height: 40px;
        padding: 9px 10px;
        text-decoration: none;
        white-space: nowrap;
    }

    .student-more-panel a:hover,
    .student-more-panel a.is-active {
        background: #eef6ff;
        color: #0d63b0;
    }

    .student-more-panel span {
        background: #f0f6fd;
        border: 1px solid #cfe0f2;
        border-radius: 6px;
        color: #237dcc;
        display: grid;
        flex: 0 0 auto;
        font-size: 9px;
        font-weight: 900;
        height: 18px;
        place-items: center;
        width: 18px;
    }

    .student-sidebar-footer {
        display: none !important;
    }
}

@media (max-width: 430px) {
    .student-menu {
        grid-template-columns: repeat(5, minmax(54px, 1fr)) !important;
    }

    .student-menu > a,
    .student-more-menu summary {
        font-size: 11px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .student-menu > a span,
    .student-more-menu summary span {
        display: none !important;
    }
}

.ad-slot {
    align-items: center;
    background: linear-gradient(180deg, #fbfdff, #f5f9fd);
    border: 1px solid #dce8f4;
    border-radius: 10px;
    color: #5f7188;
    display: flex;
    justify-content: center;
    margin: 24px auto;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-align: center;
    width: 100%;
}

.ad-slot::before {
    background: #f5f9fd;
    border: 1px solid #dce8f4;
    border-radius: 999px;
    color: #8a9bb0;
    content: "Publicidad";
    font-size: 10px;
    font-weight: 900;
    left: 10px;
    letter-spacing: .04em;
    line-height: 1;
    padding: 4px 7px;
    position: absolute;
    text-transform: uppercase;
    top: 8px;
    z-index: 1;
}

.ad-format-leaderboard {
    aspect-ratio: 728 / 90;
    max-height: 90px;
    max-width: 728px;
    min-height: 90px;
}

.ad-format-rectangle {
    aspect-ratio: 300 / 250;
    max-height: 250px;
    max-width: 300px;
    min-height: 250px;
}

.ad-slot:empty {
    display: none;
}

.landing-wrap > .ad-slot {
    margin-bottom: 42px;
    margin-top: 12px;
}

.exam-create-panel .ad-slot,
.flashcards-options-panel .ad-slot {
    margin: 20px auto 0;
}

.practice-shell > .ad-slot {
    background: rgba(255, 255, 255, .94);
    margin-top: 22px;
}

.practice-shell .ad-slot-exam_bottom {
    margin-bottom: 4px;
    margin-top: 30px;
}

.flashcard-session-result .ad-slot {
    margin: 6px 0;
}

.ad-slot iframe,
.ad-slot ins,
.ad-slot > div {
    display: block;
    max-width: 100%;
}

.ad-format-leaderboard iframe,
.ad-format-leaderboard ins {
    max-height: 90px;
}

.ad-format-rectangle iframe,
.ad-format-rectangle ins {
    max-height: 250px;
}

.ad-admin-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.ad-admin-card {
    background: #fff;
    border: 1px solid #dce7f2;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 45, 82, .07);
    display: grid;
    gap: 16px;
    padding: 22px;
}

.ad-admin-card textarea {
    font-family: Consolas, "Courier New", monospace;
    min-height: 170px;
    resize: vertical;
}

.ad-toggle-row {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 14px 0;
}

.ad-toggle-row label {
    align-items: center;
    background: #f4f8fc;
    border: 1px solid #d7e5f3;
    border-radius: 8px;
    color: #1d3858;
    display: flex;
    font-weight: 900;
    gap: 8px;
    min-height: 46px;
    padding: 10px 12px;
}

.ad-toggle-row input {
    accent-color: #2d8fe3;
    height: 18px;
    width: 18px;
}

@media (max-width: 720px) {
    .ad-slot {
        margin: 20px auto;
    }

    .ad-format-leaderboard {
        aspect-ratio: 320 / 80;
        max-height: 90px;
        min-height: 70px;
        width: min(100%, 360px);
    }

    .ad-format-rectangle {
        width: min(100%, 300px);
    }

    .ad-hide-mobile {
        display: none !important;
    }

    .ad-admin-grid {
        grid-template-columns: 1fr;
    }

    .ad-toggle-row {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 721px) {
    .ad-hide-desktop {
        display: none !important;
    }
}

.study-admin-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.study-admin-grid .study-lesson-form {
    grid-column: 1 / -1;
}

.admin-toggle-list.compact {
    align-content: end;
    margin-top: 23px;
}

.study-admin-list {
    display: grid;
    gap: 16px;
}

.rich-editor-shell {
    background: #f7fbff;
    border: 1px solid #d8e5f2;
    border-radius: 14px;
    overflow: hidden;
}

.rich-editor-toolbar {
    align-items: center;
    background: #eef5fb;
    border-bottom: 1px solid #d8e5f2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px;
}

.rich-editor-toolbar button,
.rich-editor-toolbar select,
.rich-color-control {
    background: #fff;
    border: 1px solid #c9d8e8;
    border-radius: 8px;
    color: #173a5e;
    font-size: 12px;
    font-weight: 900;
    min-height: 34px;
    padding: 7px 10px;
    width: auto;
}

.rich-editor-toolbar button,
.rich-editor-toolbar select,
.rich-color-control input {
    cursor: pointer;
}

.rich-editor-toolbar select {
    max-width: 142px;
}

.rich-color-control {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.rich-color-control input {
    border: 0;
    height: 22px;
    padding: 0;
    width: 28px;
}

.rich-editor-toolbar button:hover,
.rich-editor-toolbar button:focus,
.rich-editor-toolbar select:hover,
.rich-editor-toolbar select:focus,
.rich-color-control:hover,
.rich-color-control:focus-within {
    background: #e4f2ff;
    border-color: #9cc8ed;
    outline: none;
}

.rich-editor {
    background: #fff;
    color: #10253f;
    line-height: 1.7;
    min-height: 320px;
    overflow-y: auto;
    padding: 18px;
}

.rich-editor:focus {
    box-shadow: inset 0 0 0 3px rgba(45, 143, 229, .15);
    outline: none;
}

.rich-editor.has-error {
    box-shadow: inset 0 0 0 3px rgba(220, 38, 38, .18);
}

.rich-editor h2,
.rich-editor h3,
.rich-editor h4 {
    color: #0e2a4d;
    line-height: 1.25;
    margin: 18px 0 10px;
}

.rich-editor p {
    margin: 0 0 12px;
}

.rich-editor ul,
.rich-editor ol {
    margin: 0 0 14px 22px;
    padding: 0;
}

.rich-editor pre {
    background: #f7fbff;
    border: 1px solid #d8e8f8;
    border-radius: 14px;
    color: #102b4d;
    font-family: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
    font-size: .9rem;
    font-weight: 800;
    line-height: 1.45;
    margin: 14px 0;
    overflow-x: auto;
    padding: 18px;
    tab-size: 4;
    white-space: pre;
}

.rich-editor table {
    border-collapse: collapse;
    margin: 12px 0;
    table-layout: auto;
    width: 100%;
}

.rich-editor td,
.rich-editor th {
    border: 1px solid #d8e5f2;
    color: inherit;
    padding: 8px;
    vertical-align: top;
}

.rich-editor th {
    background: #eaf4ff;
    font-weight: 900;
}

.rich-editor table p,
.rich-editor td p,
.rich-editor th p {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

.rich-editor blockquote {
    border-left: 4px solid #2d8fe5;
    color: #34506d;
    margin: 14px 0;
    padding: 8px 0 8px 14px;
}

.rich-editor a {
    color: #1f7fd1;
    font-weight: 800;
}

.rich-editor font[size="2"] {
    font-size: .92rem;
}

.rich-editor font[size="4"] {
    font-size: 1.18rem;
}

.rich-editor font[size="5"] {
    font-size: 1.35rem;
}

.study-content-manager {
    display: grid;
    gap: 16px;
}

.study-admin-toolbar {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(260px, 1fr) auto;
}

.study-admin-search {
    display: grid;
    gap: 6px;
}

.study-admin-search span {
    color: #48617f;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.study-admin-search input {
    background: #f8fbff;
    border: 1px solid #cfe0f2;
    border-radius: 12px;
    color: #0e2a4d;
    min-height: 46px;
    padding: 0 14px;
}

.study-admin-search input:focus {
    border-color: #2d8fe5;
    box-shadow: 0 0 0 4px rgba(45, 143, 229, .14);
    outline: none;
}

.study-admin-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.study-admin-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.study-admin-summary span {
    background: #eef7ff;
    border: 1px solid #cfe6fb;
    border-radius: 999px;
    color: #37526f;
    font-size: 13px;
    font-weight: 800;
    padding: 8px 12px;
}

.study-admin-summary strong {
    color: #0e2a4d;
}

.study-admin-module,
.study-admin-submodule {
    background: #fff;
    border: 1px solid #dce7f2;
    border-radius: 14px;
    overflow: hidden;
}

.study-admin-module[hidden],
.study-admin-submodule[hidden],
.study-admin-lesson[hidden] {
    display: none;
}

.study-admin-module > summary,
.study-admin-submodule > summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    list-style: none;
    padding: 16px 18px;
}

.study-admin-module > summary::-webkit-details-marker,
.study-admin-submodule > summary::-webkit-details-marker {
    display: none;
}

.study-admin-module > summary::before,
.study-admin-submodule > summary::before {
    align-items: center;
    background: #edf6ff;
    border: 1px solid #cfe4f8;
    border-radius: 10px;
    color: #1f7fd1;
    content: ">";
    display: inline-flex;
    font-size: 13px;
    font-weight: 900;
    height: 30px;
    justify-content: center;
    transform: rotate(0deg);
    transition: transform .18s ease;
    width: 30px;
}

.study-admin-module > summary,
.study-admin-submodule > summary {
    grid-template-columns: 30px minmax(0, 1fr) auto;
}

.study-admin-module[open] > summary::before,
.study-admin-submodule[open] > summary::before {
    transform: rotate(90deg);
}

.study-admin-module > summary:hover,
.study-admin-submodule > summary:hover {
    background: #f7fbff;
}

.study-admin-module h3,
.study-admin-submodule strong,
.study-admin-lesson strong {
    color: #0e2a4d;
}

.study-admin-module h3 {
    margin: 2px 0 0;
}

.study-admin-module p {
    color: #607187;
    margin: 6px 0 0;
}

.study-admin-module summary span,
.study-admin-submodule small,
.study-admin-submodule summary > span,
.study-admin-lesson small {
    color: #2d8fe3;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.study-admin-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.study-admin-counts span,
.study-admin-submodule summary > span {
    background: #eef7ff;
    border-radius: 999px;
    padding: 7px 10px;
}

.study-admin-module-actions,
.study-admin-submodule > .admin-list-actions {
    align-items: center;
    background: #fbfdff;
    border-top: 1px solid #e3edf7;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 18px;
}

.study-admin-module-actions form,
.study-admin-submodule > .admin-list-actions form,
.study-admin-lesson-actions form {
    margin: 0;
}

.study-admin-sublist {
    background: #f5f9fd;
    border-top: 1px solid #e3edf7;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.study-admin-submodule {
    border-radius: 12px;
}

.study-admin-lessons {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.study-admin-lesson {
    align-items: center;
    background: #fff;
    border: 1px solid #e2ebf5;
    border-radius: 10px;
    color: #233a58;
    display: grid;
    gap: 12px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    padding: 10px 12px;
}

.study-admin-lesson > span {
    align-items: center;
    background: #edf6ff;
    border-radius: 9px;
    color: #1f7fd1;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.study-admin-lesson-actions,
.study-admin-lesson-actions form {
    align-items: center;
    display: flex;
    gap: 10px;
}

.study-admin-lesson-actions button,
.study-admin-lesson-actions a {
    background: transparent;
    border: 0;
    color: #1f73c9;
    font-size: 13px;
    font-weight: 900;
    padding: 0;
}

.study-admin-lesson-actions button {
    color: #dc2626;
}

.study-guide-app {
    background: #07111f;
}

.study-guide-main {
    background:
        radial-gradient(circle at 78% 0%, rgba(20, 184, 166, .12), transparent 32%),
        linear-gradient(180deg, #080d1c 0%, #081523 100%);
    color: #e8f2ff;
    min-height: 100vh;
    padding-top: 58px;
}

.study-hero {
    display: grid;
    gap: 22px;
    margin-bottom: 30px;
}

.study-hero > div > span,
.study-section-head p,
.study-module-card small {
    color: #9cc3ff;
}

.study-hero > div > span {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.study-hero h1 {
    color: #fff;
    font-size: 42px;
    line-height: 1.05;
    margin: 8px 0 6px;
}

.study-hero p {
    color: #c9d8ea;
    margin: 0;
}

.study-stats-row {
    background: rgba(20, 32, 54, .9);
    border: 1px solid rgba(135, 165, 205, .22);
    border-radius: 16px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 16px;
}

.study-stats-row article {
    align-items: center;
    display: grid;
    gap: 2px 10px;
    grid-template-columns: 34px auto;
}

.study-stats-row article span {
    align-items: center;
    background: rgba(45, 143, 227, .15);
    border-radius: 10px;
    color: #60d8d0;
    display: grid;
    font-weight: 900;
    height: 34px;
    place-items: center;
    width: 34px;
}

.study-stats-row strong {
    color: #fff;
    font-size: 18px;
}

.study-stats-row small {
    color: #a8bbd3;
    grid-column: 2;
}

.study-search {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 34px;
}

.study-search input {
    background: rgba(20, 32, 54, .92);
    border: 1px solid rgba(135, 165, 205, .24);
    border-radius: 14px;
    color: #e8f2ff;
    min-height: 48px;
    padding: 0 16px;
}

.study-search input::placeholder {
    color: #9fb1c8;
}

.study-search button {
    border-radius: 12px;
}

.study-clear-search {
    background: rgba(45, 143, 229, .12);
    border: 1px solid rgba(45, 143, 229, .28);
    border-radius: 999px;
    color: #a9d6ff;
    font-size: 13px;
    font-weight: 900;
    margin-left: auto;
    padding: 9px 14px;
    text-decoration: none;
}

.study-clear-search:hover,
.study-clear-search:focus {
    background: rgba(45, 143, 229, .2);
    color: #fff;
}

.study-search-results {
    display: grid;
    gap: 12px;
}

.study-search-result-card {
    align-items: start;
    background: rgba(20, 32, 54, .92);
    border: 1px solid rgba(135, 165, 205, .24);
    border-radius: 16px;
    color: #dbeafe;
    display: grid;
    gap: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 16px;
    text-decoration: none;
    transition: border-color .18s ease, transform .18s ease, background .18s ease;
}

.study-search-result-card:hover,
.study-search-result-card:focus {
    background: rgba(24, 39, 66, .98);
    border-color: rgba(80, 176, 236, .58);
    transform: translateY(-1px);
}

.study-result-type {
    background: rgba(45, 143, 229, .16);
    border: 1px solid rgba(45, 143, 229, .28);
    border-radius: 999px;
    color: #a9d6ff;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    padding: 6px 9px;
    text-transform: uppercase;
}

.study-search-result-card strong {
    color: #fff;
    display: block;
    font-size: 18px;
    margin-bottom: 3px;
}

.study-search-result-card small {
    color: #8fb1d2;
    display: block;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 8px;
}

.study-search-result-card p {
    color: #c9d9ea;
    line-height: 1.55;
    margin: 0;
}

.study-search-result-card em {
    color: #9cc3ff;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
}

.study-section-head {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.study-section-head > span {
    align-items: center;
    background: rgba(148, 163, 184, .12);
    border-radius: 50%;
    color: #9cc3ff;
    display: grid;
    height: 34px;
    place-items: center;
    width: 34px;
}

.study-section-head h2 {
    color: #fff;
    font-size: 24px;
    margin: 0;
}

.study-section-head p {
    margin: 2px 0 0;
}

.study-module-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.study-module-card {
    background: rgba(20, 32, 54, .92);
    border: 1px solid rgba(135, 165, 205, .24);
    border-radius: 14px;
    color: #dbeafe;
    display: grid;
    gap: 14px;
    min-height: 176px;
    padding: 18px;
    text-decoration: none;
}

.study-module-card:hover,
.study-submodule-card:hover {
    border-color: rgba(125, 211, 252, .7);
    transform: translateY(-1px);
}

.study-card-icon {
    align-items: center;
    background: #1a2a4a;
    border-radius: 12px;
    color: #67e8f9;
    display: grid;
    height: 44px;
    place-items: center;
    width: 44px;
}

.study-module-card h3 {
    color: #fff;
    font-size: 18px;
    margin: 2px 0 8px;
}

.study-module-card p {
    color: #b8c7dc;
    line-height: 1.45;
    margin: 0;
}

.study-module-card footer {
    align-items: center;
    border-top: 1px solid rgba(135, 165, 205, .18);
    color: #9fb1c8;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    justify-content: space-between;
    padding-top: 10px;
}

.study-module-detail {
    background: rgba(20, 32, 54, .92);
    border: 1px solid rgba(135, 165, 205, .24);
    border-radius: 16px;
    color: #e8f2ff;
    padding: 24px;
}

.study-module-detail > header {
    align-items: end;
    border-bottom: 1px solid rgba(135, 165, 205, .22);
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 22px;
    padding-bottom: 18px;
}

.study-module-detail a {
    color: #9cc3ff;
    font-weight: 900;
}

.study-module-detail h1 {
    color: #fff;
    margin: 8px 0;
}

.study-module-detail p {
    color: #bdd0e6;
    margin: 0;
}

.study-module-detail strong {
    background: rgba(45, 143, 227, .16);
    border-radius: 999px;
    color: #bde3ff;
    padding: 9px 13px;
}

.study-submodule-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.study-submodule-card {
    align-items: center;
    background: rgba(12, 22, 40, .75);
    border: 1px solid rgba(135, 165, 205, .22);
    border-radius: 14px;
    color: #e8f2ff;
    display: grid;
    gap: 16px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    min-height: 86px;
    padding: 16px;
    text-decoration: none;
}

.study-submodule-card > span {
    align-items: center;
    background: #1e2f52;
    border-radius: 12px;
    color: #9aaeff;
    display: grid;
    height: 44px;
    place-items: center;
    width: 44px;
}

.study-submodule-card h3 {
    color: #fff;
    margin: 0 0 4px;
}

.study-submodule-card p {
    color: #b8c7dc;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.study-submodule-card small {
    color: #8fb8ff;
    font-weight: 900;
}

.study-reader-shell {
    --study-font-scale: 1;
    background:
        radial-gradient(circle at 80% 0%, rgba(20, 184, 166, .08), transparent 34%),
        #0b1526;
    border: 1px solid rgba(135, 165, 205, .2);
    border-radius: 18px;
    color: #e8f2ff;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-rows: 68px minmax(0, 1fr);
    height: calc(100vh - 32px);
    margin: 16px;
    overflow: hidden;
}

.study-reader-topbar {
    align-items: center;
    border-bottom: 1px solid rgba(135, 165, 205, .18);
    display: grid;
    gap: 12px;
    grid-column: 1 / -1;
    grid-template-columns: 38px minmax(220px, 450px) minmax(0, 1fr);
    padding: 10px 18px;
}

.study-back-button,
.study-reader-tools button {
    align-items: center;
    background: rgba(15, 25, 44, .82);
    border: 1px solid rgba(135, 165, 205, .24);
    border-radius: 10px;
    color: #dceafe;
    display: grid;
    min-height: 38px;
    place-items: center;
    text-decoration: none;
}

.study-lesson-picker select {
    background: rgba(15, 25, 44, .82);
    border: 1px solid rgba(135, 165, 205, .24);
    border-radius: 12px;
    color: #e8f2ff;
    height: 40px;
    padding: 0 12px;
    width: 100%;
}

.study-reader-tools {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.study-reader-tools strong {
    color: #b8c7dc;
    font-size: 12px;
}

.study-font-tools {
    align-items: center;
    background: rgba(15, 25, 44, .82);
    border: 1px solid rgba(135, 165, 205, .24);
    border-radius: 12px;
    display: flex;
    overflow: hidden;
}

.study-font-tools button {
    border: 0;
    border-radius: 0;
    min-height: 36px;
    width: 34px;
}

.study-font-tools span {
    color: #e8f2ff;
    font-weight: 900;
    padding: 0 10px;
}

.study-focus-toggle {
    padding: 0 14px;
}

.study-reader-sidebar {
    border-right: 1px solid rgba(135, 165, 205, .18);
    overflow: auto;
    padding: 22px;
}

.study-reader-sidebar h2 {
    color: #fff;
    font-size: 16px;
    margin: 0 0 4px;
}

.study-reader-sidebar > div > span {
    color: #9fb1c8;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.study-reader-sidebar nav {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.study-reader-sidebar nav a {
    align-items: start;
    border-radius: 10px;
    color: #e5efff;
    display: grid;
    font-size: 13px;
    font-weight: 900;
    gap: 10px;
    grid-template-columns: 24px minmax(0, 1fr);
    line-height: 1.35;
    padding: 10px;
    text-decoration: none;
}

.study-reader-sidebar nav a.is-active,
.study-reader-sidebar nav a:hover {
    background: rgba(79, 105, 172, .28);
    color: #9fb6ff;
}

.study-reader-sidebar nav span {
    align-items: center;
    background: rgba(45, 143, 227, .16);
    border-radius: 7px;
    color: #9cc3ff;
    display: grid;
    font-size: 12px;
    height: 24px;
    place-items: center;
}

.study-reader-content {
    overflow: auto;
    padding: 44px min(7vw, 82px);
}

.study-reader-content > span {
    color: #9cc3ff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.study-reader-content h1 {
    border-bottom: 1px solid rgba(135, 165, 205, .18);
    color: #fff;
    font-size: 30px;
    margin: 12px 0 26px;
    padding-bottom: 18px;
}

.study-reader-summary {
    color: #bdd0e6;
    font-size: 16px;
}

.study-reader-body {
    max-width: 960px;
    overflow-x: auto;
}

.study-reader-body h2,
.study-reader-body h3 {
    color: #fff;
    margin: 34px 0 14px;
}

.study-reader-body h2 {
    font-size: 30px;
    text-transform: uppercase;
}

.study-reader-body h3 {
    border-bottom: 1px solid rgba(135, 165, 205, .16);
    font-size: 22px;
    padding-bottom: 10px;
}

.study-reader-body p {
    color: #edf5ff;
    font-size: calc(16px * var(--study-font-scale));
    line-height: 1.72;
    margin: 0 0 20px;
}

.study-reader-body ul,
.study-reader-body ol {
    color: #edf5ff;
    font-size: calc(16px * var(--study-font-scale));
    line-height: 1.72;
    margin: 0 0 22px;
    padding-left: 28px;
}

.study-reader-body li {
    margin: 8px 0;
}

.study-reader-body li > ul,
.study-reader-body li > ol {
    font-size: 1em;
    margin: 6px 0 10px;
}

.study-reader-body pre {
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(217, 233, 248, .18);
    border-radius: 18px;
    color: #f7fbff;
    font-family: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
    font-size: calc(14px * var(--study-font-scale));
    font-weight: 800;
    line-height: 1.45;
    margin: 24px 0 30px;
    max-width: 100%;
    overflow-x: auto;
    padding: 24px;
    tab-size: 4;
    white-space: pre;
}

.study-reader-body code {
    font-family: "Cascadia Mono", "Consolas", "SFMono-Regular", monospace;
}

.study-reader-body strong,
.study-reader-body b {
    color: #f7fbff;
}

.study-reader-body table {
    background: transparent;
    border: 0;
    border-collapse: collapse;
    border-radius: 0;
    color: inherit;
    display: table;
    font-size: calc(15px * var(--study-font-scale));
    margin: 18px 0 26px;
    min-width: 560px;
    overflow: visible;
    table-layout: auto;
    width: 100%;
}

.study-reader-body th,
.study-reader-body td {
    border: 1px solid rgba(220, 232, 246, .85);
    color: inherit;
    line-height: 1.45;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.study-reader-body th {
    background: rgba(45, 143, 229, .16);
    color: #eff8ff;
    font-weight: 900;
}

.study-reader-body table p,
.study-reader-body td p,
.study-reader-body th p {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

.study-reader-body table strong,
.study-reader-body table b {
    color: inherit;
}

.study-reader-actions {
    display: flex;
    gap: 12px;
    margin-top: 34px;
}

.study-reader-shell.is-focus-mode {
    grid-template-columns: minmax(0, 1fr);
}

.study-reader-shell.is-focus-mode .study-reader-sidebar {
    display: none;
}

.study-reader-shell.is-focus-mode .study-reader-content {
    grid-column: 1 / -1;
    margin: 0 auto;
    max-width: 940px;
    padding-left: clamp(22px, 6vw, 76px);
    padding-right: clamp(22px, 6vw, 76px);
    width: 100%;
}

@media (max-width: 980px) {
    .study-admin-grid,
    .study-stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .study-admin-toolbar {
        grid-template-columns: 1fr;
    }

    .study-admin-toolbar-actions {
        justify-content: flex-start;
    }

    .study-reader-shell {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto minmax(0, 1fr);
        height: auto;
        min-height: calc(100vh - 20px);
        margin: 10px;
    }

    .study-reader-topbar {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .study-reader-tools {
        grid-column: 1 / -1;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .study-reader-sidebar {
        border-bottom: 1px solid rgba(135, 165, 205, .18);
        border-right: 0;
        max-height: 260px;
    }
}

@media (max-width: 640px) {
    .study-guide-main {
        padding-top: 96px;
    }

    .study-hero h1 {
        font-size: 34px;
    }

    .study-stats-row,
    .study-search,
    .study-search-result-card,
    .study-submodule-grid,
    .study-admin-grid {
        grid-template-columns: 1fr;
    }

    .study-admin-module > summary,
    .study-admin-submodule > summary {
        align-items: start;
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .study-admin-counts,
    .study-admin-submodule summary > span {
        grid-column: 2;
        justify-content: flex-start;
    }

    .study-admin-module-actions,
    .study-admin-submodule > .admin-list-actions,
    .study-admin-lesson-actions {
        justify-content: flex-start;
    }

    .study-admin-lesson {
        align-items: start;
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .study-admin-lesson-actions {
        grid-column: 2;
    }

    .study-section-head {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .study-clear-search {
        margin-left: 46px;
    }

    .study-search-result-card em {
        white-space: normal;
    }

    .study-module-detail {
        padding: 18px;
    }

    .study-module-detail > header {
        align-items: start;
        flex-direction: column;
    }

    .study-submodule-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .study-submodule-card > strong {
        display: none;
    }

    .study-reader-content {
        padding: 28px 18px;
    }

    .study-reader-body h2 {
        font-size: 24px;
    }

    .study-display-math {
        font-size: calc(18px * var(--study-font-scale));
        overflow-x: auto;
        padding: 14px 16px;
        white-space: nowrap;
    }
}

/* Study guide light theme */
.study-guide-app {
    background: #f4f8fc;
}

.study-guide-main {
    background: #f4f8fc;
    color: #102033;
}

.study-hero,
.study-module-detail {
    background: #fff;
    border: 1px solid #dce6f1;
    border-radius: 14px;
    box-shadow: 0 14px 36px rgba(8, 35, 70, .07);
    padding: 24px;
}

.study-hero h1,
.study-section-head h2,
.study-module-card h3,
.study-module-detail h1,
.study-submodule-card h3,
.study-reader-content h1,
.study-reader-body h2,
.study-reader-body h3,
.study-reader-sidebar h2,
.study-reader-body strong,
.study-reader-body b,
.study-reader-body th {
    color: #062653;
}

.study-hero p,
.study-module-detail p,
.study-module-card p,
.study-submodule-card p,
.study-reader-summary,
.study-reader-body p,
.study-reader-body ul,
.study-reader-body ol {
    color: #405875;
}

.study-hero > div > span,
.study-section-head p,
.study-module-card small,
.study-reader-content > span,
.study-module-detail a {
    color: var(--primary);
}

.study-stats-row,
.study-search input,
.study-module-card,
.study-submodule-card,
.study-reader-shell,
.study-reader-topbar,
.study-reader-sidebar,
.study-reader-content {
    background: #fff;
    border-color: #dce6f1;
}

.study-stats-row {
    box-shadow: inset 0 0 0 1px rgba(45, 143, 227, .03);
}

.study-stats-row strong {
    color: #062653;
}

.study-stats-row small,
.study-reader-tools strong,
.study-reader-sidebar > div > span {
    color: #657891;
}

.study-stats-row article span,
.study-section-head > span,
.study-card-icon,
.study-submodule-card > span,
.study-reader-sidebar nav span {
    background: #eaf4ff;
    color: var(--primary);
}

.study-search input {
    color: #102033;
}

.study-search input::placeholder {
    color: #71839a;
}

.study-clear-search {
    background: #eaf4ff;
    border-color: #cbe3f8;
    color: var(--primary);
}

.study-search-result-card {
    background: #fff;
    border-color: #dce6f1;
    box-shadow: 0 10px 26px rgba(8, 35, 70, .05);
    color: #102033;
}

.study-search-result-card:hover,
.study-search-result-card:focus {
    background: #fafdff;
    border-color: #a9d2f3;
}

.study-result-type {
    background: #eaf4ff;
    border-color: #cbe3f8;
    color: var(--primary);
}

.study-search-result-card strong {
    color: #062653;
}

.study-search-result-card small,
.study-search-result-card p {
    color: #405875;
}

.study-search-result-card em {
    color: var(--primary);
}

.study-module-card,
.study-submodule-card {
    color: #102033;
    box-shadow: 0 10px 26px rgba(8, 35, 70, .06);
}

.study-module-card:hover,
.study-submodule-card:hover {
    border-color: rgba(45, 143, 227, .55);
    box-shadow: 0 16px 34px rgba(8, 35, 70, .1);
}

.study-module-card footer {
    border-top-color: #e3edf7;
    color: #526880;
}

.study-module-detail > header,
.study-reader-content h1,
.study-reader-body h3 {
    border-color: #dce6f1;
}

.study-module-detail strong {
    background: #eaf4ff;
    color: var(--primary);
}

.study-card-progress {
    background: #e8f0f8;
    border-radius: 999px;
    height: 7px;
    overflow: hidden;
}

.study-card-progress span {
    background: linear-gradient(90deg, var(--primary), #21b7c7);
    display: block;
    height: 100%;
}

.study-reader-shell {
    background: #f4f8fc;
    color: #102033;
}

.study-reader-topbar {
    border-bottom-color: #dce6f1;
}

.study-back-button,
.study-reader-tools button,
.study-lesson-picker select,
.study-font-tools {
    background: #fff;
    border-color: #cfdeed;
    color: #102033;
}

.study-font-tools span {
    color: #102033;
}

.study-reader-sidebar {
    border-right-color: #dce6f1;
}

.study-reader-sidebar nav a {
    color: #1d3554;
}

.study-reader-sidebar nav a.is-active,
.study-reader-sidebar nav a:hover {
    background: #eef6ff;
    color: var(--primary);
}

.study-reader-sidebar nav a.is-complete span {
    background: #dff8ec;
    color: #137a43;
    font-size: 10px;
}

.study-reader-content {
    box-shadow: inset 1px 0 0 #edf3f9;
}

.study-reader-body {
    max-width: 900px;
}

.study-reader-body .study-display-math {
    background: #f5faff;
    border-color: #d8e8f8;
    color: #082a52;
}

.study-reader-body pre {
    background: #f7fbff;
    border-color: #d8e8f8;
    color: #102b4d;
}

.study-reader-actions {
    align-items: center;
    flex-wrap: wrap;
}

.study-complete-form {
    margin: 0;
}

.study-top-complete-form {
    margin: 0;
}

.study-complete-chip {
    background: var(--primary) !important;
    border: 1px solid var(--primary) !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 900;
    min-height: 38px;
    padding: 0 14px;
    white-space: nowrap;
}

.study-complete-chip.is-done {
    background: #eaf7ef !important;
    border-color: #bfe8cd !important;
    color: #17643a !important;
}

.study-reader-shell.is-focus-mode {
    grid-template-columns: minmax(0, 1fr);
}

.study-reader-shell.is-focus-mode .study-reader-content {
    grid-column: 1 / -1;
    justify-self: center;
    max-width: 960px;
    width: min(100%, 960px);
}

.study-flash-message {
    background: #eaf7ef;
    border: 1px solid #bfe8cd;
    border-radius: 10px;
    color: #17643a;
    font-weight: 800;
    margin: 16px 0;
    padding: 12px 14px;
}

.study-flash-message.error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}

@media (max-width: 980px) {
    .study-reader-sidebar {
        border-bottom-color: #dce6f1;
    }
}

@media (max-width: 640px) {
    .study-hero,
    .study-module-detail {
        padding: 18px;
    }

    .study-reader-shell {
        border-radius: 12px;
    }
}

/* Final polish: admin navigation and student profile */
.admin-app .topbar {
    align-items: center;
    gap: 18px;
}

.admin-app .brand {
    align-items: center;
    display: inline-flex;
    gap: 12px;
}

.admin-app .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
}

.admin-app .nav-user {
    color: #53657a;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 900;
    padding: 0 4px;
}

.admin-app .button.ghost {
    flex: 0 0 auto;
}

.profile-main {
    padding-top: 34px;
}

.profile-layout {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.profile-summary {
    background: #fff;
    border: 1px solid #dce6f1;
    border-radius: 10px;
    box-shadow: 0 14px 32px rgba(20, 45, 80, .07);
    display: grid;
    gap: 14px;
    padding: 24px;
    position: sticky;
    top: 94px;
}

.profile-summary > span {
    background: #eaf4ff;
    border-radius: 999px;
    color: #237dcc;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    padding: 7px 11px;
    text-transform: uppercase;
    width: fit-content;
}

.profile-summary h1 {
    color: #0e2a4d;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.08;
    margin: 0;
    overflow-wrap: anywhere;
}

.profile-summary p {
    color: #53667f;
    font-size: 15px;
    line-height: 1.55;
    margin: 0;
}

.profile-identity {
    background: #f7fbff;
    border: 1px solid #dceaf8;
    border-radius: 10px;
    display: grid;
    gap: 5px;
    margin-top: 4px;
    padding: 16px;
}

.profile-identity strong {
    color: #0e2a4d;
    font-size: 17px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.profile-identity small {
    color: #66758a;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.profile-card {
    border-radius: 10px;
    padding: clamp(22px, 3vw, 32px);
}

.profile-card h2 {
    color: #0e2a4d;
    font-size: 26px;
    line-height: 1.2;
    margin: 0 0 22px;
}

.profile-card form {
    display: grid;
    gap: 18px;
}

.profile-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
}

.profile-grid .auth-field {
    display: grid;
    gap: 7px;
}

.profile-grid .auth-field label {
    color: #28405f;
    font-size: 14px;
    font-weight: 900;
}

.profile-grid .auth-field input,
.profile-grid .auth-field select {
    background: #fff;
    border: 1px solid #cbd9e8;
    border-radius: 8px;
    color: #102033;
    font-size: 15px;
    min-height: 46px;
    padding: 0 14px;
    width: 100%;
}

.profile-grid .auth-field input:focus,
.profile-grid .auth-field select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 143, 227, .13);
    outline: 0;
}

.profile-grid .field-hint {
    color: #73849a;
    font-size: 12px;
    line-height: 1.35;
}

.profile-actions {
    align-items: center;
    border-top: 1px solid #e3edf7;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    padding-top: 18px;
}

.profile-actions button,
.profile-actions .button {
    min-height: 44px;
}

@media (min-width: 1121px) {
    .admin-app .topbar {
        grid-template-columns: max-content minmax(0, 1fr);
    }

    .admin-app .nav {
        justify-content: flex-end;
    }
}

@media (max-width: 1120px) {
    .admin-app .topbar {
        align-items: start;
        gap: 12px;
        grid-template-columns: 1fr;
        padding: 12px 14px;
        position: sticky;
    }

    .admin-app .brand {
        font-size: 18px;
    }

    .admin-app .nav {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        justify-content: flex-start;
        margin: 0;
        overflow-x: auto;
        overflow-y: visible;
        padding: 2px 2px 8px;
        width: 100%;
    }

    .admin-app .nav a:not(.button),
    .admin-nav-menu summary {
        border-radius: 10px;
        font-size: 13px;
        min-height: 40px;
        padding: 10px 13px;
    }

    .admin-nav-menu {
        position: static;
    }

    .admin-nav-menu div {
        left: 14px;
        max-height: min(360px, 70vh);
        min-width: min(260px, calc(100vw - 28px));
        overflow: auto;
        position: fixed;
        right: 14px;
        top: 118px;
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }

    .profile-summary {
        position: static;
    }
}

@media (max-width: 720px) {
    .admin-app .topbar {
        padding: 14px 12px 10px;
    }

    .admin-app .brand {
        font-size: 18px;
        width: 100%;
    }

    .admin-app .brand-mark {
        flex: 0 0 auto;
    }

    .admin-app .nav {
        align-items: center;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 10px;
    }

    .admin-nav-menu div {
        top: 130px;
    }

    .admin-app .nav-user {
        background: transparent;
        padding: 0 8px;
    }

    .profile-main {
        padding-top: 22px;
    }

    .profile-summary,
    .profile-card {
        border-radius: 10px;
        padding: 18px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-actions .button,
    .profile-actions button {
        justify-content: center;
        width: 100%;
    }
}

/* Admin vertical sidebar */
.admin-app {
    --admin-sidebar-width: 286px;
    --admin-sidebar-rail: 64px;
}

.admin-app .topbar.admin-sidebar {
    align-items: stretch;
    background: #fff;
    border-bottom: 0;
    border-right: 1px solid #dce8f3;
    box-shadow: 14px 0 36px rgba(15, 45, 82, .08);
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100vh;
    left: 0;
    min-height: 0;
    overflow: visible;
    padding: 18px 14px;
    position: fixed;
    top: 0;
    transform: translateX(0);
    transition: transform .2s ease;
    width: var(--admin-sidebar-width);
    z-index: 700;
}

.admin-app .topbar.admin-sidebar .brand {
    color: #102a46;
    flex: 0 0 auto;
    font-size: 19px;
    min-width: 0;
    padding-right: 46px;
}

.admin-app .topbar.admin-sidebar .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-sidebar-toggle {
    align-items: center;
    background: #eaf4ff;
    border: 1px solid #c8deef;
    border-radius: 999px;
    color: #0e2a4d;
    cursor: pointer;
    display: grid;
    font-size: 24px;
    font-weight: 900;
    height: 38px;
    place-items: center;
    position: absolute;
    right: -19px;
    top: 24px;
    width: 38px;
    z-index: 740;
}

.admin-sidebar-toggle span {
    display: block;
    line-height: 1;
    transition: transform .2s ease;
}

.admin-app .topbar.admin-sidebar .nav {
    align-items: stretch;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
    margin: 0;
    min-height: 0;
    overflow-x: visible;
    overflow-y: auto;
    padding: 6px 2px 4px;
    white-space: normal;
    width: 100%;
}

.admin-app .topbar.admin-sidebar .nav > a:not(.button),
.admin-app .topbar.admin-sidebar .admin-nav-menu summary {
    align-items: center;
    background: #f6f9fc;
    border: 1px solid #dce8f3;
    border-radius: 10px;
    color: #40536b;
    display: flex;
    font-size: 14px;
    font-weight: 900;
    justify-content: space-between;
    min-height: 42px;
    padding: 10px 12px;
    text-decoration: none;
    width: 100%;
}

.admin-app .topbar.admin-sidebar .nav > a:not(.button):hover,
.admin-app .topbar.admin-sidebar .admin-nav-menu[open] summary,
.admin-app .topbar.admin-sidebar .admin-nav-menu summary:hover {
    background: #eaf4ff;
    border-color: #c8deef;
    color: #0e2a4d;
}

.admin-app .topbar.admin-sidebar .admin-nav-menu {
    flex: 0 0 auto;
    position: static;
    width: 100%;
}

.admin-app .topbar.admin-sidebar .admin-nav-menu summary::after {
    content: "v";
    font-size: 10px;
    margin-left: auto;
}

.admin-app .topbar.admin-sidebar .admin-nav-menu[open] summary::after {
    transform: rotate(180deg);
}

.admin-app .topbar.admin-sidebar .admin-nav-menu div {
    background: #f8fbff;
    border: 1px solid #dce8f3;
    border-radius: 10px;
    box-shadow: none;
    display: grid;
    gap: 4px;
    left: auto;
    margin: 6px 0 2px;
    max-height: none;
    min-width: 0;
    overflow: visible;
    padding: 7px;
    position: static;
    right: auto;
    top: auto;
    width: 100%;
}

.admin-app .topbar.admin-sidebar .admin-nav-menu div a {
    border-radius: 8px;
    color: #53657a;
    font-size: 13px;
    font-weight: 850;
    padding: 9px 10px;
    text-decoration: none;
}

.admin-app .topbar.admin-sidebar .admin-nav-menu div a:hover {
    background: #eef6ff;
    color: #0e2a4d;
}

.admin-app .topbar.admin-sidebar .nav-user {
    color: #53657a;
    font-size: 13px;
    font-weight: 900;
    margin-top: auto;
    overflow: hidden;
    padding: 12px 10px 2px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-app .topbar.admin-sidebar .button.ghost {
    justify-content: center;
    min-height: 42px;
    width: 100%;
}

.admin-app .page {
    margin-left: var(--admin-sidebar-width);
    transition: margin-left .2s ease;
}

.admin-app.admin-sidebar-collapsed .topbar.admin-sidebar {
    transform: translateX(calc((var(--admin-sidebar-width) - var(--admin-sidebar-rail)) * -1));
}

.admin-app.admin-sidebar-collapsed .topbar.admin-sidebar .brand span:last-child,
.admin-app.admin-sidebar-collapsed .topbar.admin-sidebar .nav,
.admin-app.admin-sidebar-collapsed .topbar.admin-sidebar .nav-user,
.admin-app.admin-sidebar-collapsed .topbar.admin-sidebar .button.ghost {
    opacity: 0;
    pointer-events: none;
}

.admin-app.admin-sidebar-collapsed .admin-sidebar-toggle span {
    transform: rotate(180deg);
}

.admin-app.admin-sidebar-collapsed .page {
    margin-left: var(--admin-sidebar-rail);
}

@media (max-width: 900px) {
    .admin-app {
        --admin-sidebar-width: min(286px, calc(100vw - 36px));
    }

    .admin-app .page {
        margin-left: var(--admin-sidebar-rail);
        padding-left: 18px;
        padding-right: 14px;
    }

    .admin-app:not(.admin-sidebar-collapsed) .page {
        margin-left: var(--admin-sidebar-rail);
    }
}

/* Student and teacher vertical sidebars */
.student-app {
    --student-sidebar-width: 276px;
    --student-sidebar-rail: 64px;
}

.teacher-app {
    --teacher-sidebar-width: 276px;
    --teacher-sidebar-rail: 64px;
    background: #f4f7fb;
}

.student-sidebar,
.teacher-app .topbar.teacher-sidebar {
    align-items: stretch;
    background: #fff;
    border-bottom: 0;
    border-right: 1px solid #dce8f3;
    box-shadow: 14px 0 36px rgba(15, 45, 82, .08);
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100vh;
    left: 0;
    min-height: 0;
    overflow: visible;
    padding: 18px 14px;
    position: fixed;
    top: 0;
    transform: translateX(0);
    transition: transform .2s ease;
    width: var(--student-sidebar-width);
    z-index: 680;
}

.teacher-app .topbar.teacher-sidebar {
    width: var(--teacher-sidebar-width);
}

.student-brand,
.teacher-app .topbar.teacher-sidebar .brand {
    align-items: center;
    color: #102a46;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 19px;
    gap: 12px;
    min-width: 0;
    padding-right: 46px;
}

.student-brand span:last-child,
.teacher-app .topbar.teacher-sidebar .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-logo,
.teacher-app .brand-mark {
    flex: 0 0 auto;
}

.student-sidebar-toggle,
.teacher-sidebar-toggle {
    align-items: center;
    background: #eaf4ff;
    border: 1px solid #c8deef;
    border-radius: 999px;
    color: #0e2a4d;
    cursor: pointer;
    display: grid;
    font-size: 24px;
    font-weight: 900;
    height: 38px;
    place-items: center;
    position: absolute;
    right: -19px;
    top: 24px;
    width: 38px;
    z-index: 720;
}

.student-sidebar-toggle {
    left: calc(var(--student-sidebar-width) - 19px);
    position: fixed;
    right: auto;
    z-index: 980;
}

.student-sidebar-toggle span,
.teacher-sidebar-toggle span {
    display: block;
    line-height: 1;
    transition: transform .2s ease;
}

.student-menu,
.teacher-app .topbar.teacher-sidebar .nav {
    align-items: stretch;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-start;
    margin: 0;
    min-height: 0;
    overflow-x: visible;
    overflow-y: auto;
    padding: 6px 2px 4px;
    white-space: normal;
    width: 100%;
}

.student-menu a,
.student-sidebar-footer a,
.teacher-app .topbar.teacher-sidebar .nav > a:not(.button) {
    align-items: center;
    background: #f6f9fc;
    border: 1px solid #dce8f3;
    border-radius: 10px;
    color: #40536b;
    display: flex !important;
    font-size: 14px;
    font-weight: 900;
    gap: 10px;
    justify-content: flex-start;
    min-height: 42px;
    padding: 10px 12px;
    text-decoration: none;
    width: 100%;
}

.student-menu a:hover,
.student-sidebar-footer a:hover,
.student-menu a.is-active,
.student-sidebar-footer a.is-active,
.student-user.is-active,
.teacher-app .topbar.teacher-sidebar .nav > a:not(.button):hover {
    background: #eaf4ff;
    border-color: #c8deef;
    color: #0e2a4d;
}

.student-menu span,
.student-sidebar-footer span {
    background: #eaf4ff;
    border-color: #cfe0f2;
    flex: 0 0 auto;
}

.student-sidebar-footer {
    align-items: stretch;
    display: grid !important;
    gap: 8px;
    margin-top: auto;
    min-width: 0;
}

.student-sidebar-footer small {
    color: #7b8da4;
    display: block !important;
    font-size: 11px;
    font-weight: 900;
    padding: 0 10px;
    text-transform: uppercase;
}

.student-user {
    max-width: none;
}

.teacher-app .topbar.teacher-sidebar .nav-user {
    color: #53657a;
    font-size: 13px;
    font-weight: 900;
    margin-top: auto;
    overflow: hidden;
    padding: 12px 10px 2px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.teacher-app .topbar.teacher-sidebar .button.ghost {
    justify-content: center;
    min-height: 42px;
    width: 100%;
}

.student-more-menu {
    display: none !important;
}

.student-menu .student-mobile-secondary {
    display: flex !important;
}

.student-main {
    margin-left: calc(var(--student-sidebar-width) + 24px);
    margin-right: auto;
    transition: margin-left .2s ease, width .2s ease;
    width: min(1240px, calc(100% - var(--student-sidebar-width) - 56px));
}

.teacher-app .page {
    margin-left: var(--teacher-sidebar-width);
    transition: margin-left .2s ease;
}

.student-app.student-sidebar-collapsed .student-sidebar {
    transform: translateX(calc((var(--student-sidebar-width) - var(--student-sidebar-rail)) * -1));
}

.teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar {
    transform: translateX(calc((var(--teacher-sidebar-width) - var(--teacher-sidebar-rail)) * -1));
}

.student-app.student-sidebar-collapsed .student-brand span:last-child,
.student-app.student-sidebar-collapsed .student-menu,
.student-app.student-sidebar-collapsed .student-sidebar-footer,
.teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar .brand span:last-child,
.teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar .nav,
.teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar .nav-user,
.teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar .button.ghost {
    opacity: 0;
    pointer-events: none;
}

.student-app.student-sidebar-collapsed .student-sidebar-toggle span,
.teacher-app.teacher-sidebar-collapsed .teacher-sidebar-toggle span {
    transform: rotate(180deg);
}

.student-app.student-sidebar-collapsed .student-sidebar-toggle {
    left: calc(var(--student-sidebar-rail) - 19px);
}

.student-app.student-sidebar-collapsed .student-main {
    margin-left: calc(var(--student-sidebar-rail) + 20px);
    width: min(1240px, calc(100% - var(--student-sidebar-rail) - 48px));
}

.teacher-app.teacher-sidebar-collapsed .page {
    margin-left: var(--teacher-sidebar-rail);
}

@media (max-width: 900px) {
    .student-app {
        --student-sidebar-width: min(276px, calc(100vw - 36px));
    }

    .teacher-app {
        --teacher-sidebar-width: min(276px, calc(100vw - 36px));
    }

    .student-main,
    .student-app.student-sidebar-collapsed .student-main {
        margin-left: calc(var(--student-sidebar-rail) + 14px);
        width: calc(100% - var(--student-sidebar-rail) - 28px);
    }

    .teacher-app .page,
    .teacher-app.teacher-sidebar-collapsed .page {
        margin-left: var(--teacher-sidebar-rail);
        padding-left: 18px;
        padding-right: 14px;
    }
}

@media (max-width: 520px) {
    .student-sidebar,
    .teacher-app .topbar.teacher-sidebar {
        padding: 16px 12px;
    }

    .student-main,
    .student-app.student-sidebar-collapsed .student-main {
        margin-left: calc(var(--student-sidebar-rail) + 10px);
        width: calc(100% - var(--student-sidebar-rail) - 20px);
    }
}

/* Mobile overlay mode: no reserved rail space */
@media (max-width: 760px) {
    .student-sidebar,
    .teacher-app .topbar.teacher-sidebar {
        box-shadow: 18px 0 38px rgba(15, 45, 82, .16);
        z-index: 900;
    }

    .student-app.student-sidebar-collapsed .student-sidebar {
        transform: translateX(calc(var(--student-sidebar-width) * -1));
    }

    .teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar {
        transform: translateX(calc(var(--teacher-sidebar-width) * -1));
    }

    .student-app.student-sidebar-collapsed .student-sidebar-toggle {
        left: 14px;
        position: fixed;
        right: auto;
        transform: none;
    }

    .teacher-app.teacher-sidebar-collapsed .teacher-sidebar-toggle {
        left: 14px;
        position: fixed;
        right: auto;
        transform: none;
    }

    .student-sidebar-toggle,
    .teacher-sidebar-toggle {
        box-shadow: 0 12px 26px rgba(15, 45, 82, .22);
        top: 18px;
    }

    .student-main,
    .student-app.student-sidebar-collapsed .student-main {
        margin-left: auto;
        margin-right: auto;
        width: min(100% - 24px, 720px);
    }

    .teacher-app .page,
    .teacher-app.teacher-sidebar-collapsed .page {
        margin-left: 0;
        padding-left: 14px;
        padding-right: 14px;
    }

    .student-app:not(.student-sidebar-collapsed) .student-main,
    .teacher-app:not(.teacher-sidebar-collapsed) .page {
        pointer-events: none;
    }
}

/* Student sidebar footer alignment */
.student-sidebar .student-sidebar-footer {
    align-items: stretch;
    display: grid !important;
    gap: 8px;
    grid-template-columns: 1fr !important;
    margin-top: auto;
    width: 100%;
}

.student-sidebar .student-sidebar-footer a,
.student-sidebar .student-sidebar-footer .student-user {
    align-items: center;
    display: flex !important;
    justify-content: flex-start !important;
    max-width: none;
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
}

.student-sidebar .student-sidebar-footer small {
    text-align: left;
    width: 100%;
}

.student-sidebar .student-user span {
    align-items: center;
    background: #eaf4ff;
    border: 1px solid #cfe0f2;
    border-radius: 6px;
    color: #237dcc;
    display: grid !important;
    flex: 0 0 auto;
    font-size: 9px;
    font-weight: 900;
    height: 18px;
    place-items: center;
    width: 18px;
}

.student-sidebar .student-user span::before {
    content: "U";
}

/* Scalable student flashcard manager */
.manage-flashcards-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.manage-flashcards-layout {
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.student-flashcard-toolbar {
    align-items: end;
    background: #f6faff;
    border: 1px solid #dce8f5;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(220px, 1.4fr) minmax(160px, .9fr) minmax(130px, .7fr) minmax(130px, .7fr) auto;
    margin: 18px 0;
    padding: 14px;
}

.student-flashcard-toolbar .auth-field {
    margin: 0;
}

.student-flashcard-toolbar-actions {
    display: flex;
    gap: 10px;
}

.student-flashcard-toolbar-actions button,
.student-flashcard-toolbar-actions .button {
    min-height: 42px;
    white-space: nowrap;
}

.student-flashcards-table-wrap {
    border: 1px solid #dce8f5;
    border-radius: 8px;
    overflow: hidden;
}

.student-flashcards-table {
    border-collapse: collapse;
    width: 100%;
}

.student-flashcards-table th {
    background: #edf5fc;
    color: #49617c;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
    padding: 13px 14px;
    text-align: left;
    text-transform: uppercase;
}

.student-flashcards-table td {
    border-top: 1px solid #e2ebf5;
    color: #173557;
    padding: 14px;
    vertical-align: middle;
}

.student-flashcards-table td:first-child {
    min-width: 280px;
}

.student-flashcards-table td strong {
    color: #062653;
    display: block;
    font-size: 15px;
    line-height: 1.25;
}

.student-flashcards-table td small {
    color: #65758b;
    display: block;
    font-size: 13px;
    line-height: 1.35;
    margin-top: 5px;
}

.student-status-pill {
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    justify-content: center;
    line-height: 1;
    min-width: 76px;
    padding: 7px 10px;
}

.student-status-pill.is-active,
.student-status-pill.is-shared {
    background: #d8f8e8;
    color: #047857;
}

.student-status-pill.is-paused {
    background: #e8eef6;
    color: #526176;
}

.student-status-pill.is-private {
    background: #fff1d6;
    color: #9a5b00;
}

.student-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.student-table-actions form {
    display: inline-flex;
}

.student-table-actions .button,
.student-table-actions button {
    min-height: 36px;
    padding: 8px 12px;
}

.student-pagination {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 16px;
}

.student-pagination span {
    color: #5f6f83;
    font-size: 13px;
    font-weight: 800;
}

.student-pagination .is-disabled {
    opacity: .45;
    pointer-events: none;
}

@media (max-width: 1180px) {
    .student-flashcard-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .student-flashcard-toolbar-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .manage-flashcards-stats {
        grid-template-columns: 1fr;
    }

    .student-flashcard-toolbar {
        grid-template-columns: 1fr;
    }

    .student-flashcard-toolbar-actions,
    .student-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .student-flashcard-toolbar-actions button,
    .student-flashcard-toolbar-actions .button,
    .student-pagination .button {
        width: 100%;
    }

    .student-flashcards-table,
    .student-flashcards-table thead,
    .student-flashcards-table tbody,
    .student-flashcards-table tr,
    .student-flashcards-table th,
    .student-flashcards-table td {
        display: block;
    }

    .student-flashcards-table thead {
        display: none;
    }

    .student-flashcards-table tr {
        background: #fff;
        border-top: 1px solid #e2ebf5;
        padding: 14px;
    }

    .student-flashcards-table tr:first-child {
        border-top: 0;
    }

    .student-flashcards-table td {
        align-items: flex-start;
        border: 0;
        display: grid;
        gap: 6px;
        grid-template-columns: 96px minmax(0, 1fr);
        padding: 8px 0;
    }

.student-flashcards-table td::before {
        color: #6b7a8f;
        content: attr(data-label);
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .student-flashcards-table td:first-child {
        min-width: 0;
    }

    .student-table-actions {
        justify-content: flex-start;
    }
}

/* Final polish: student flashcard manager and teacher workspace */
.manage-flashcards-layout {
    align-items: start;
    grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
}

.manage-flashcards-list {
    min-width: 0;
    overflow: hidden;
}

.student-flashcard-toolbar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-flashcard-toolbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.student-flashcards-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.student-flashcards-table {
    min-width: 880px;
}

.student-flashcards-table th:last-child,
.student-flashcards-table td:last-child {
    min-width: 180px;
}

.student-table-actions {
    justify-content: flex-start;
}

.teacher-exam-settings-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.teacher-exam-settings-grid .field {
    margin: 0;
}

.teacher-status-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 12px;
    font-style: normal;
    font-weight: 900;
    justify-content: center;
    padding: 7px 10px;
}

.teacher-status-pill.is-open {
    background: #d8f8e8;
    color: #047857;
}

.teacher-status-pill.is-closed {
    background: #fee2e2;
    color: #b91c1c;
}

.teacher-status-pill.is-pending {
    background: #eaf4ff;
    color: #237dcc;
}

.teacher-exam-meta {
    background: #f6faff;
    border: 1px solid #dce8f5;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    margin: 12px 0;
    padding: 12px;
}

.teacher-exam-meta span,
.teacher-exam-meta p {
    color: #49617c;
    font-size: 13px;
    margin: 0;
}

.teacher-guide-list {
    display: grid;
    gap: 12px;
}

.teacher-guide-list article {
    align-items: start;
    background: #f8fbff;
    border: 1px solid #dce8f5;
    border-radius: 8px;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px;
}

.teacher-guide-list h3,
.teacher-guide-list p {
    margin: 0;
}

.teacher-guide-list h3 {
    color: #062653;
    font-size: 17px;
}

.teacher-guide-list p {
    color: #49617c;
    line-height: 1.5;
    margin-top: 6px;
}

.teacher-guide-list span,
.teacher-guide-list small {
    color: #237dcc;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.teacher-grades-table-wrap {
    border: 1px solid #dce8f5;
    border-radius: 8px;
    overflow-x: auto;
}

.teacher-grades-table {
    border-collapse: collapse;
    min-width: 820px;
    width: 100%;
}

.teacher-grades-table th {
    background: #edf5fc;
    color: #49617c;
    font-size: 12px;
    font-weight: 900;
    padding: 13px 14px;
    text-align: left;
    text-transform: uppercase;
}

.teacher-grades-table td {
    border-top: 1px solid #e2ebf5;
    color: #173557;
    padding: 14px;
}

.teacher-grades-table td strong {
    color: #062653;
}

.teacher-grades-table td span {
    color: #237dcc;
    font-weight: 900;
    margin-left: 6px;
}

.admin-card-head-row {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.teacher-filter-row {
    align-items: end;
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.teacher-filter-row label {
    display: grid;
    flex: 1;
    gap: 6px;
}

.teacher-filter-row span {
    color: #49617c;
    font-size: 13px;
    font-weight: 800;
}

.teacher-profile-layout {
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
}

.teacher-profile-summary {
    display: grid;
    gap: 16px;
}

.teacher-profile-summary > span {
    background: #dff2ff;
    border-radius: 999px;
    color: #237dcc;
    font-size: 12px;
    font-weight: 900;
    justify-self: start;
    padding: 8px 12px;
    text-transform: uppercase;
}

.teacher-profile-summary h1 {
    color: #062653;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1;
    margin: 0;
}

.teacher-profile-summary p,
.teacher-profile-summary article span {
    color: #49617c;
    line-height: 1.6;
}

.teacher-profile-summary article {
    background: #f8fbff;
    border: 1px solid #dce8f5;
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 18px;
}

.teacher-profile-summary article strong {
    color: #062653;
}

@media (max-width: 1100px) {
    .manage-flashcards-layout,
    .teacher-profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .student-flashcard-toolbar,
    .teacher-exam-settings-grid {
        grid-template-columns: 1fr;
    }

    .student-flashcard-toolbar-actions,
    .teacher-filter-row,
    .admin-card-head-row {
        align-items: stretch;
        flex-direction: column;
    }

    .teacher-guide-list article {
        display: grid;
    }
}

/* Navigation split: desktop and mobile are intentionally separate */
@media (min-width: 901px) {
    .admin-app .topbar.admin-sidebar {
        transform: translateX(0);
        width: var(--admin-sidebar-width);
    }

    .admin-app .page {
        margin-left: var(--admin-sidebar-width);
        width: min(1180px, calc(100% - var(--admin-sidebar-width) - 48px));
    }

    .admin-app.admin-sidebar-collapsed .topbar.admin-sidebar {
        transform: translateX(calc((var(--admin-sidebar-width) - var(--admin-sidebar-rail)) * -1));
    }

    .admin-app.admin-sidebar-collapsed .page {
        margin-left: var(--admin-sidebar-rail);
        width: min(1240px, calc(100% - var(--admin-sidebar-rail) - 48px));
    }

    .student-sidebar,
    .teacher-app .topbar.teacher-sidebar {
        transform: translateX(0);
    }

    .student-main {
        margin-left: calc(var(--student-sidebar-width) + 24px);
        margin-right: auto;
        width: min(1240px, calc(100% - var(--student-sidebar-width) - 56px));
    }

    .teacher-app .page {
        margin-left: var(--teacher-sidebar-width);
        width: min(1180px, calc(100% - var(--teacher-sidebar-width) - 48px));
    }

    .student-sidebar-toggle {
        left: calc(var(--student-sidebar-width) - 19px);
        right: auto;
    }

    .teacher-sidebar-toggle,
    .admin-sidebar-toggle {
        left: auto;
        right: -19px;
    }

    .student-app.student-sidebar-collapsed .student-sidebar {
        transform: translateX(calc((var(--student-sidebar-width) - var(--student-sidebar-rail)) * -1));
    }

    .teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar {
        transform: translateX(calc((var(--teacher-sidebar-width) - var(--teacher-sidebar-rail)) * -1));
    }

    .student-app.student-sidebar-collapsed .student-sidebar-toggle {
        left: calc(var(--student-sidebar-rail) - 19px);
    }

    .student-app.student-sidebar-collapsed .student-main {
        margin-left: calc(var(--student-sidebar-rail) + 20px);
        width: min(1240px, calc(100% - var(--student-sidebar-rail) - 48px));
    }

    .teacher-app.teacher-sidebar-collapsed .page {
        margin-left: var(--teacher-sidebar-rail);
        width: min(1240px, calc(100% - var(--teacher-sidebar-rail) - 48px));
    }

    .student-app:not(.student-sidebar-collapsed) .student-main,
    .teacher-app:not(.teacher-sidebar-collapsed) .page {
        pointer-events: auto;
    }
}

@media (max-width: 900px) {
    .admin-app,
    .student-app,
    .teacher-app {
        --admin-sidebar-width: min(286px, calc(100vw - 44px));
        --student-sidebar-width: min(286px, calc(100vw - 44px));
        --teacher-sidebar-width: min(286px, calc(100vw - 44px));
    }

    .admin-app .topbar.admin-sidebar,
    .student-sidebar,
    .teacher-app .topbar.teacher-sidebar {
        box-shadow: 18px 0 38px rgba(15, 45, 82, .18);
        max-width: calc(100vw - 44px);
        transform: translateX(0);
        z-index: 980;
    }

    .admin-app.admin-sidebar-collapsed .topbar.admin-sidebar,
    .student-app.student-sidebar-collapsed .student-sidebar,
    .teacher-app.teacher-sidebar-collapsed .topbar.teacher-sidebar {
        transform: translateX(-100%);
    }

    .admin-app .page,
    .admin-app.admin-sidebar-collapsed .page,
    .student-main,
    .student-app.student-sidebar-collapsed .student-main,
    .teacher-app .page,
    .teacher-app.teacher-sidebar-collapsed .page {
        margin-left: auto;
        margin-right: auto;
        padding-left: 14px;
        padding-right: 14px;
        width: min(100% - 24px, 760px);
    }

    .admin-sidebar-toggle,
    .student-sidebar-toggle,
    .teacher-sidebar-toggle {
        box-shadow: 0 12px 26px rgba(15, 45, 82, .22);
        position: fixed;
        top: 18px;
        z-index: 1100;
    }

    .admin-sidebar-toggle,
    .teacher-sidebar-toggle {
        left: calc(var(--admin-sidebar-width) - 19px);
        right: auto;
    }

    .teacher-sidebar-toggle {
        left: calc(var(--teacher-sidebar-width) - 19px);
    }

    .student-sidebar-toggle {
        left: calc(var(--student-sidebar-width) - 19px);
        right: auto;
    }

    .admin-app.admin-sidebar-collapsed .admin-sidebar-toggle,
    .student-app.student-sidebar-collapsed .student-sidebar-toggle,
    .teacher-app.teacher-sidebar-collapsed .teacher-sidebar-toggle {
        left: 14px;
        right: auto;
    }

    .student-app:not(.student-sidebar-collapsed) .student-main,
    .teacher-app:not(.teacher-sidebar-collapsed) .page,
    .admin-app:not(.admin-sidebar-collapsed) .page {
        pointer-events: auto;
    }
}

/* --- SEGMENTED TABS FOR MANAGING FLASHCARDS --- */
.flashcards-tabs {
    display: inline-flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.flashcard-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.flashcard-tab-btn:hover {
    color: #0f172a;
}

.flashcard-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.flashcard-tab-btn span {
    font-size: 16px;
}

.manage-flashcards-layout {
    display: block !important;
}

.flashcard-tab-pane,
.statistics-tab-pane {
    display: none;
}

.flashcard-tab-pane.active,
.statistics-tab-pane.active {
    display: block;
    animation: flashcardFadeIn 0.25s ease-out;
}

.manage-flashcards-form {
    max-width: 680px;
    margin: 0 auto;
}

@keyframes flashcardFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- PREMIUM STYLES FOR STUDY GUIDE, RESOURCES, LEITNER FLASHCARDS, AND FAQ CONTACT --- */

/* 1. Global typography overrides for student section */
body.student-app,
.study-reader-shell,
.study-reader-sidebar,
.study-reader-content,
.resources-main,
.manage-flashcards-main,
.contact-main {
    font-family: 'Inter', sans-serif !important;
}

.study-hero h1,
.study-section-head h2,
.study-module-card h3,
.study-module-detail h1,
.study-submodule-card h3,
.study-reader-content h1,
.study-reader-body h2,
.study-reader-body h3,
.study-reader-sidebar h2,
.resources-hero h1,
.resources-featured h2,
.resources-library h2,
.resource-card h3,
.manage-flashcards-header h1,
.manage-flashcards-form h2,
.manage-flashcards-list h2,
.leitner-boxes-section h2,
.leitner-box-card h3,
.contact-hero h1,
.faq-section h2,
.contact-channels-section h2,
.contact-feedback-form-card h3 {
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: -0.02em;
}

/* 2. Study Guide responsive / sticky improvements */
.study-reader-sidebar {
    position: sticky;
    top: 68px;
    height: calc(100vh - 100px);
    overflow-y: auto;
}
.study-reader-content {
    min-height: calc(100vh - 100px);
}

/* 3. Resources Section refinements */
.resources-search-wrapper {
    margin-bottom: 24px;
    width: 100%;
    max-width: 600px;
}
.resources-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cfdeed;
    border-radius: 12px;
    padding: 2px 14px;
    box-shadow: 0 4px 12px rgba(8, 35, 70, 0.03);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.resources-search-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
}
.resources-search-input-group .search-icon {
    font-size: 16px;
    color: #64748b;
    margin-right: 8px;
}
.resources-search-input-group input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    padding: 10px 0;
    color: #0f172a;
    background: transparent;
}
.resources-search-input-group button {
    background: transparent;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
}
.resources-search-input-group button:hover {
    color: #64748b;
}

/* Media resource type badges */
.resource-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase;
}
.resource-badge-pdf {
    color: #b91c1c !important;
    background: #fee2e2 !important;
}
.resource-badge-video {
    color: #0f766e !important;
    background: #ccfbf1 !important;
}
.resource-badge-url {
    color: #1d4ed8 !important;
    background: #dbeafe !important;
}

.resource-category-badge {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
}
.resource-source {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}









/* 4. Leitner Boxes Styling */
.leitner-boxes-section {
    margin-bottom: 34px;
}
.leitner-boxes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.leitner-box-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 4px solid #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(8, 35, 70, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
}
.leitner-box-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(8, 35, 70, 0.08);
}
.leitner-box-icon {
    font-size: 24px;
    margin-bottom: 10px;
}
.leitner-box-card h3 {
    font-size: 15px;
    color: #0f172a;
    margin: 0 0 12px 0;
    font-weight: 700;
}
.leitner-box-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}
.leitner-box-stats div {
    display: flex;
    flex-direction: column;
}
.leitner-box-stats strong {
    font-size: 16px;
    color: #0f172a;
    font-weight: 800;
}
.leitner-box-stats span {
    font-size: 11px;
    color: #64748b;
}
.leitner-box-card.border-danger { border-top-color: #ef4444; }
.leitner-box-card.border-warning { border-top-color: #f59e0b; }
.leitner-box-card.border-info { border-top-color: #06b6d4; }
.leitner-box-card.border-primary { border-top-color: #3b82f6; }
.leitner-box-card.border-success { border-top-color: #10b981; }

.due-pill {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 8px;
}
.due-pill.is-due {
    background: #fee2e2;
}
.due-pill.is-due strong {
    color: #b91c1c;
}
.due-pill.is-due span {
    color: #b91c1c;
}








/* 5. Contact page FAQ accordion & split layout */
.contact-page-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
    margin-top: 24px;
}
@media (max-width: 900px) {
    .contact-page-layout {
        grid-template-columns: 1fr;
    }
}
.faq-section h2,
.contact-channels-section h2 {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 16px 0;
}


.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.faq-item.is-open {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.05);
}
.faq-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    padding: 18px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    text-align: left;
    cursor: pointer;
    outline: none;
}
.faq-trigger:hover {
    color: var(--primary);
}
.faq-icon {
    font-size: 18px;
    font-weight: bold;
    color: #64748b;
    transition: transform 0.2s;
}
.faq-content {
    padding: 0 20px 18px 20px;
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
}
.faq-content p {
    margin: 0;
}





/* Quick feedback form card styles */
.contact-feedback-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 6px 18px rgba(8, 35, 70, 0.04);
}
.contact-feedback-form-card h3 {
    font-size: 18px;
    color: #0f172a;
    margin: 0 0 18px 0;
    font-weight: 800;
}
.contact-feedback-form-card form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.contact-feedback-form-card input,
.contact-feedback-form-card textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    background: #ffffff;
    color: #0f172a;
}
.contact-feedback-form-card input:focus,
.contact-feedback-form-card textarea:focus {
    border-color: var(--primary);
    outline: none;
}
.contact-feedback-form-card button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.15s;
}
.contact-feedback-form-card button[type="submit"]:hover {
    background: var(--primary-dark);
}

/* --- PREMIUM REDESIGN FOR ADMINISTRATOR PANEL --- */

/* Sidebar Navigation */
.admin-app .topbar.admin-sidebar {
    background: var(--surface) !important;
    border-right: 1px solid var(--line) !important;
    box-shadow: 4px 0 24px rgba(79, 70, 229, 0.03) !important;
}

.admin-app .topbar.admin-sidebar .brand {
    color: var(--text) !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

.admin-app .topbar.admin-sidebar .brand .brand-mark {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
}

.admin-app .topbar.admin-sidebar .nav > a:not(.button),
.admin-app .topbar.admin-sidebar .admin-nav-menu summary {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius, 8px) !important;
    color: var(--text) !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    transition: var(--transition, all 0.2s ease) !important;
}

.admin-app .topbar.admin-sidebar .nav > a:not(.button):hover,
.admin-app .topbar.admin-sidebar .admin-nav-menu[open] summary,
.admin-app .topbar.admin-sidebar .admin-nav-menu summary:hover {
    background: rgba(79, 70, 229, 0.05) !important;
    border-color: rgba(79, 70, 229, 0.2) !important;
    color: var(--primary) !important;
}

.admin-app .topbar.admin-sidebar .admin-nav-menu div {
    background: var(--bg) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius, 8px) !important;
    box-shadow: none !important;
    padding: 6px !important;
}

.admin-app .topbar.admin-sidebar .admin-nav-menu div a {
    color: var(--muted) !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    transition: var(--transition, all 0.2s ease) !important;
}

.admin-app .topbar.admin-sidebar .admin-nav-menu div a:hover {
    background: rgba(79, 70, 229, 0.04) !important;
    color: var(--primary) !important;
}

.admin-app .topbar.admin-sidebar .admin-nav-menu summary::after {
    content: "▾" !important;
    font-size: 11px !important;
    color: var(--muted) !important;
    margin-left: auto !important;
    transition: transform 0.2s ease !important;
}

.admin-app .topbar.admin-sidebar .admin-nav-menu[open] summary::after {
    transform: rotate(180deg) !important;
    color: var(--primary) !important;
}

.admin-sidebar-toggle {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    box-shadow: var(--shadow) !important;
    color: var(--muted) !important;
    transition: var(--transition, all 0.2s ease) !important;
}

.admin-sidebar-toggle:hover {
    background: var(--surface-2) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Page Hero and Headers */
.admin-hero,
.admin-page-head {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 24px !important;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(49, 46, 129, 0.08) !important;
    color: #ffffff !important;
    padding: 34px !important;
}

.admin-hero > div,
.admin-page-head > div:not(.admin-head-actions) {
    flex: 1 !important;
    min-width: 290px !important;
}

.admin-head-actions {
    flex-shrink: 0 !important;
}

.admin-hero h1,
.admin-page-head h1 {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    color: #ffffff !important;
}

.admin-hero p,
.admin-page-head p {
    color: rgba(226, 232, 240, 0.8) !important;
}

.admin-hero span,
.admin-page-head span,
.admin-card-head span {
    color: #a5b4fc !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
}

/* Quick Actions Grid */
.admin-quick-grid a {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow) !important;
    color: var(--text) !important;
    transition: var(--transition, all 0.2s ease) !important;
}

.admin-quick-grid a:hover {
    transform: translateY(-3px) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 12px 25px -5px rgba(79, 70, 229, 0.1), var(--shadow) !important;
}

.admin-quick-grid a strong {
    color: var(--text) !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700 !important;
}

.admin-quick-grid a small {
    color: var(--muted) !important;
}

.admin-quick-grid a span {
    color: var(--primary) !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
}

/* Metrics Cards */
.admin-metrics article,
.admin-student-metrics article,
.admin-form-card,
.admin-list-panel,
.admin-question-builder {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow) !important;
    transition: var(--transition, all 0.2s ease) !important;
}

.admin-metrics article:hover,
.admin-student-metrics article:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 25px -5px rgba(79, 70, 229, 0.1), var(--shadow) !important;
}

.admin-metrics strong,
.admin-student-metrics strong {
    font-family: 'Outfit', sans-serif !important;
    color: var(--primary) !important;
    font-weight: 800 !important;
}

.admin-metrics span,
.admin-metrics small,
.admin-student-metrics span,
.admin-student-metrics small {
    color: var(--muted) !important;
}

/* Data Tables */
.admin-panel,
.admin-list-panel {
    background: var(--surface) !important;
    border: 1px solid var(--line) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow) !important;
    padding: 24px !important;
}

.admin-panel h2 {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    color: var(--text) !important;
    margin-bottom: 18px !important;
}

table {
    border-collapse: collapse !important;
    width: 100% !important;
    background: var(--surface) !important;
}

th {
    background: var(--surface-2) !important;
    color: var(--muted) !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 12px 16px !important;
    border-bottom: 1px solid var(--line) !important;
}

td {
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--line) !important;
    color: var(--text) !important;
    font-size: 14px !important;
}

tr:hover td {
    background-color: rgba(79, 70, 229, 0.015) !important;
}

/* Progress Overlay and Modal for Asynchronous AI Import */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: progressFadeIn 0.3s ease;
}

.progress-modal {
    background-color: var(--surface);
    border: 1px solid var(--line);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 480px;
    width: 90%;
    text-align: center;
}

.progress-modal h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--title);
}

.progress-modal p {
    margin: 0 0 24px 0;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

.progress-bar-track {
    width: 100%;
    background-color: var(--background);
    border: 1px solid var(--line);
    height: 12px;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 24px;
}

.progress-bar-fill {
    background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width 0.3s ease;
}

.progress-steps-list {
    max-height: 150px;
    overflow-y: auto;
    border-top: 1px solid var(--line);
    padding-top: 16px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-step-item {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
}

.progress-step-item.success {
    color: #10b981;
}

.progress-step-item.error {
    color: #ef4444;
}

.progress-step-item.active {
    color: #4f46e5;
    font-weight: 600;
}

.progress-step-item.pending {
    opacity: 0.5;
}

@keyframes progressFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* KPI Circular Progress */
.kpi-circular-progress {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 10px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-circular-progress svg {
    width: 80px;
    height: 80px;
    transform: rotate(-90deg);
}

.kpi-circular-progress circle {
    fill: transparent;
}

.kpi-track {
    stroke: #e2e8f0;
    stroke-width: 6;
}

.kpi-bar {
    stroke: var(--primary, #3b82f6);
    stroke-width: 6;
    stroke-dasharray: 213.628;
    stroke-dashoffset: calc(213.628 - (213.628 * var(--percent)) / 100);
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.kpi-value {
    position: absolute;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

/* Student Quick Card alignment fixes */
.student-quick-card strong,
.student-quick-card small {
    display: block !important;
}

.student-quick-card strong {
    margin-bottom: 4px;
}

/* Dashboard Stat Card alignment fixes */
.dashboard-stat-card span,
.dashboard-stat-card strong,
.dashboard-stat-card small {
    display: block !important;
}

.dashboard-stat-card span {
    margin-bottom: 6px !important;
}

.dashboard-stat-card strong {
    margin-bottom: 6px !important;
}

/* Segmented Control (Pills/Tabs) */
.segmented-control {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
    border: 1px solid #e2e8f0;
}

.segmented-item {
    flex: 1;
    cursor: pointer;
    text-align: center;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

.segmented-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.segmented-item span {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
    text-align: center;
}

.segmented-item input[type="radio"]:checked + span {
    background: #ffffff;
    color: var(--primary, #3b82f6);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.segmented-item:hover input[type="radio"]:not(:checked) + span {
    background: rgba(255, 255, 255, 0.4);
    color: #0f172a;
}

/* Mode Cards Selector */
.mode-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 6px;
}

.mode-card-item {
    cursor: pointer;
    position: relative;
    margin: 0 !important;
    padding: 0 !important;
}

.mode-card-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    height: 100%;
}

.mode-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.mode-card-content strong {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
    display: block;
}

.mode-card-content p {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
    margin: 0;
}

/* Selected State */
.mode-card-item input[type="radio"]:checked + .mode-card-content {
    border-color: var(--primary, #3b82f6);
    background: rgba(59, 130, 246, 0.04);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.mode-card-item input[type="radio"]:checked + .mode-card-content strong {
    color: var(--primary, #3b82f6);
}

.mode-card-item:hover input[type="radio"]:not(:checked) + .mode-card-content {
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* Centered Exam Setup Layout */
.exam-setup-container {
    max-width: 620px;
    margin: 40px auto;
    padding: 0 16px;
}

.exam-setup-header {
    text-align: center;
    margin-bottom: 28px;
}

.exam-setup-header h1 {
    color: #0e2a4d;
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 900;
    line-height: 1.1;
    margin: 8px 0 12px;
    font-family: 'Outfit', sans-serif;
}

.exam-setup-header p {
    color: #53667f;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

.exam-setup-container .exam-create-panel {
    position: static !important;
    background: #ffffff;
    border: 1px solid #dce6f1;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(20, 45, 80, 0.08);
    padding: 34px !important;
}

@media (max-width: 576px) {
    .exam-setup-container {
        margin: 20px auto;
    }
    .exam-setup-container .exam-create-panel,
    .exam-setup-container .flashcards-options-panel {
        padding: 20px !important;
    }
}

.exam-setup-container .flashcards-options-panel {
    position: static !important;
    background: #ffffff;
    border: 1px solid #dce6f1;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(20, 45, 80, 0.08);
    padding: 34px !important;
}

.exam-setup-container .flashcards-options-panel form {
    display: grid;
    gap: 18px;
}

/* Rediseño Moderno de Exámenes (Take Exam Page) */
.practice-shell {
    max-width: 740px !important;
    margin: 40px auto !important;
    padding: 0 16px !important;
}

.practice-question {
    background: #ffffff !important;
    border: 1px solid #dce6f1 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(20, 45, 80, 0.05) !important;
    padding: 34px !important;
    margin-bottom: 24px !important;
}

.practice-prompt {
    background: transparent !important;
    padding: 0 !important;
    min-height: auto !important;
    border-radius: 0 !important;
    border: none !important;
}

.practice-prompt span {
    display: inline-flex !important;
    color: #4f46e5 !important;
    background: rgba(79, 70, 229, 0.08) !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    padding: 6px 12px !important;
    margin-bottom: 16px !important;
}

.practice-prompt p {
    color: #0f172a !important;
    font-size: 20px !important;
    font-weight: 800 !important;
    line-height: 1.45 !important;
    margin: 0 0 24px 0 !important;
    font-family: 'Outfit', sans-serif !important;
}

.practice-options {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    margin-top: 24px !important;
    counter-reset: option-index;
}

@media (max-width: 768px) {
    .practice-options {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

.practice-option {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-height: 60px !important;
    padding: 16px 20px !important;
    background: #ffffff !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    color: #334155 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    transform: none !important;
    counter-increment: option-index;
}

.practice-option input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
    pointer-events: none !important;
}

.practice-option::before {
    content: counter(option-index, upper-alpha) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    margin-right: 4px !important;
    flex-shrink: 0 !important;
    transition: all 0.2s ease !important;
}

.practice-option:hover:not(.is-correct):not(.is-wrong) {
    border-color: var(--primary, #3b82f6) !important;
    background: rgba(59, 130, 246, 0.02) !important;
    color: #0f172a !important;
}

.practice-option:hover:not(.is-correct):not(.is-wrong)::before {
    background: var(--primary, #3b82f6) !important;
    border-color: var(--primary, #3b82f6) !important;
    color: #ffffff !important;
}

.practice-option.is-correct {
    border-color: #10b981 !important;
    background: #ecfdf5 !important;
    color: #065f46 !important;
}

.practice-option.is-correct::before {
    content: "✓" !important;
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

.practice-option.is-wrong {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.practice-option.is-wrong::before {
    content: "✗" !important;
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.practice-question.is-answered .practice-option {
    pointer-events: none !important;
}

.practice-feedback {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 28px !important;
    padding: 20px 24px !important;
    border-radius: 12px !important;
    border-left: 6px solid !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03) !important;
    font-size: 14px !important;
}

.practice-feedback.is-correct {
    border-left-color: #10b981 !important;
    background: #ecfdf5 !important;
    color: #065f46 !important;
}

.practice-feedback.is-wrong {
    border-left-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.practice-feedback strong {
    font-size: 18px !important;
    font-weight: 800 !important;
}

.practice-feedback span {
    font-weight: 700 !important;
    color: inherit !important;
    opacity: 0.9 !important;
}

.practice-feedback p {
    color: inherit !important;
    opacity: 0.85 !important;
    line-height: 1.5 !important;
    margin-top: 4px !important;
}

.practice-actions {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 16px !important;
    margin-top: 24px !important;
}

.practice-actions a.button.secondary {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 12px 24px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
}

.practice-actions a.button.secondary:hover {
    background: #e2e8f0 !important;
}

.practice-actions button[data-practice-next] {
    background: var(--primary, #3b82f6) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 34px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2) !important;
}

.practice-actions button[data-practice-next]:disabled {
    background: #cbd5e1 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
}

.question-report-box {
    margin-top: 24px !important;
    border-top: 1px solid #e2e8f0 !important;
    padding-top: 16px !important;
}

.question-report-box summary {
    color: #64748b !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.question-report-box summary:hover {
    color: #475569 !important;
}

.question-report-box > div {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-top: 12px !important;
}

@media (max-width: 576px) {
    .practice-question {
        padding: 20px !important;
    }
}

/* Rediseño de Exámenes con Estética Premium Vercel/Linear (Light Ice/Indigo Theme) */
.practice-page {
    background: radial-gradient(circle at 50% 50%, #f8fafc 0%, #f1f5f9 100%) !important;
    color: #1e293b !important;
}

.practice-header {
    border-bottom: 1px solid #e2e8f0 !important;
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    padding: 16px 24px !important;
    width: 100% !important;
    margin: 0 !important;
}

.practice-brand {
    color: #0f172a !important;
    font-weight: 800 !important;
}

.practice-logo {
    background: #4f46e5 !important;
    color: #ffffff !important;
}

.practice-status strong {
    color: #0f172a !important;
}

.practice-timer,
.practice-no-timer {
    color: #475569 !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
}

.practice-timer.is-urgent {
    color: #ffffff !important;
    background: #ef4444 !important;
    border-color: #fca5a5 !important;
}

.practice-shell {
    max-width: 800px !important;
    margin: 40px auto !important;
    padding: 0 20px !important;
}

.practice-question {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.02), 0 8px 10px -6px rgba(0, 0, 0, 0.02) !important;
    padding: 40px !important;
}

.practice-prompt span {
    display: inline-flex !important;
    color: #4f46e5 !important;
    background: #f5f3ff !important;
    border: 1px solid #ddd6fe !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    padding: 5px 10px !important;
}

.practice-prompt p {
    color: #0f172a !important;
    font-size: 21px !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
    margin: 16px 0 32px 0 !important;
    font-family: 'Outfit', sans-serif !important;
}

.practice-option {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    min-height: 64px !important;
    padding: 18px 24px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 12px !important;
    color: #334155 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.practice-option input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
}

.practice-option::before {
    content: counter(option-index, upper-alpha) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    transition: all 0.2s ease !important;
}

.practice-option:hover:not(.is-correct):not(.is-wrong) {
    border-color: #4f46e5 !important;
    background: #f5f3ff !important;
    color: #4f46e5 !important;
}

.practice-option:hover:not(.is-correct):not(.is-wrong)::before {
    background: #4f46e5 !important;
    border-color: #4f46e5 !important;
    color: #ffffff !important;
}

.practice-option.is-correct {
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
    color: #15803d !important;
}

.practice-option.is-correct::before {
    content: "✓" !important;
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

.practice-option.is-wrong {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

.practice-option.is-wrong::before {
    content: "✗" !important;
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

.practice-feedback {
    border-radius: 12px !important;
    border-left: 6px solid !important;
    padding: 24px !important;
    margin-top: 32px !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.01) !important;
}

.practice-feedback.is-correct {
    background: #f0fdf4 !important;
    border-left-color: #10b981 !important;
    color: #15803d !important;
}

.practice-feedback.is-wrong {
    background: #fef2f2 !important;
    border-left-color: #ef4444 !important;
    color: #b91c1c !important;
}

.practice-actions button[data-practice-next] {
    background: #4f46e5 !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25) !important;
}

.practice-actions button[data-practice-next]:disabled {
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

/* Dashboard Continue Banner (Examen en curso / Recomendación) */
.dashboard-continue-banner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(99, 130, 246, 0.05);
    margin-bottom: 28px;
    transition: all 0.2s ease;
}

.dashboard-continue-banner .banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #ffffff;
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.1);
    flex-shrink: 0;
}

.dashboard-continue-banner .banner-body {
    flex: 1;
}

.dashboard-continue-banner .banner-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    color: #4f46e5;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.dashboard-continue-banner h2 {
    margin: 0 0 4px 0 !important;
    color: #0f172a;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    font-family: 'Outfit', sans-serif;
}

.dashboard-continue-banner p {
    margin: 0 !important;
    color: #475569;
    font-size: 14px;
    line-height: 1.45;
}

.dashboard-continue-banner .banner-actions {
    flex-shrink: 0;
}

.dashboard-continue-banner .banner-actions a {
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
}

/* Advice Mode Override (Recomendado) */
.dashboard-continue-banner.advice-mode {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #fcd34d;
    box-shadow: 0 4px 20px rgba(217, 119, 6, 0.05);
}

.dashboard-continue-banner.advice-mode .banner-icon {
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.1);
}

.dashboard-continue-banner.advice-mode .banner-tag.advice {
    color: #b45309;
}

@media (max-width: 768px) {
    .dashboard-continue-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }
    
    .dashboard-continue-banner .banner-actions {
        width: 100%;
    }
    
    .dashboard-continue-banner .banner-actions a {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
    }
}



/* ====== PROFILE AVATAR PREFERENCE SELECTOR ====== */
.profile-avatar-selector {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.profile-avatar-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border: 2px solid var(--line, #e2e8f0);
    border-radius: 16px;
    background: var(--surface, #fff);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-align: center;
}

.profile-avatar-option:hover {
    border-color: var(--primary, #4f46e5);
    background: #f8f7ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -5px rgba(79, 70, 229, 0.15);
}

.profile-avatar-option.is-selected,
.profile-avatar-option:has(input:checked) {
    border-color: var(--primary, #4f46e5);
    background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15), 0 8px 25px -5px rgba(79, 70, 229, 0.18);
}

.profile-avatar-option.is-selected::after,
.profile-avatar-option:has(input:checked)::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 12px;
    width: 22px;
    height: 22px;
    background: var(--primary, #4f46e5);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.profile-avatar-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-avatar-option-preview {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2, #f1f5f9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.profile-avatar-option-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-avatar-option-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text, #0f172a);
    line-height: 1.3;
}

.profile-avatar-option-hint {
    font-size: 12px;
    color: var(--muted, #64748b);
    line-height: 1.4;
}

@media (max-width: 480px) {
    .profile-avatar-selector {
        flex-direction: column;
    }
}

/* ====== PROFILE TAB PANES (show/hide) ====== */
.profile-tab-pane {
    display: none;
}

.profile-tab-pane.active {
    display: block;
    animation: profilePaneFadeIn 0.3s ease;
}

@keyframes profilePaneFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ====== ACHIEVEMENTS / LOGROS GRID ====== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.achievement-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 20px 22px;
    border-radius: 16px;
    background: var(--surface, #fff);
    border: 2px solid var(--line, #e2e8f0);
    text-align: center;
    transition: all 0.25s ease;
}

.achievement-card.unlocked {
    border-color: rgba(79, 70, 229, 0.2);
    background: linear-gradient(145deg, #faf8ff 0%, #eef2ff 100%);
}

.achievement-card.unlocked:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px -6px rgba(79, 70, 229, 0.18);
    border-color: var(--primary, #4f46e5);
}

.achievement-card.locked {
    opacity: 0.55;
    filter: grayscale(0.6);
    border-style: dashed;
}

.achievement-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
}

.achievement-card.unlocked .achievement-badge {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

.achievement-card.locked .achievement-badge {
    background: var(--surface-2, #f1f5f9);
}

.achievement-card h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text, #0f172a);
}

.achievement-card p {
    margin: 0;
    font-size: 12.5px;
    color: var(--muted, #64748b);
    line-height: 1.4;
}

.achievement-card .status-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.achievement-card .status-badge.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.achievement-card .status-badge.locked {
    background: var(--surface-2, #f1f5f9);
    color: var(--muted, #94a3b8);
}

@media (max-width: 540px) {
    .achievements-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== CENTERED PROFILE LAYOUT (no left sidebar) ====== */
.profile-layout--centered {
    display: block !important;
    max-width: 720px;
    margin: 0 auto;
}

.profile-layout--centered .profile-card {
    background: var(--surface, #fff);
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 16px;
    box-shadow: 0 8px 30px -8px rgba(15, 23, 42, 0.07);
    padding: clamp(24px, 4vw, 36px);
}

.profile-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line, #e2e8f0);
}

.profile-card-header-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2, #f1f5f9);
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.15);
    flex-shrink: 0;
}

.profile-card-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text, #0f172a);
    line-height: 1.25;
}

.profile-card-header p {
    margin: 2px 0 0;
    font-size: 14px;
    color: var(--muted, #64748b);
    line-height: 1.3;
}

/* Number input spinner fix */
.profile-grid .auth-field input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.profile-grid .auth-field input[type="number"]::-webkit-inner-spin-button,
.profile-grid .auth-field input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@media (max-width: 720px) {
    .profile-layout--centered {
        max-width: 100%;
    }
}

/* ====== PRACTICE QUESTION CARD META & COUNTER ====== */
.practice-meta {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 20px !important;
}

.practice-source {
    display: inline-flex !important;
    color: #4f46e5 !important;
    background: #f5f3ff !important;
    border: 1px solid #ddd6fe !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    padding: 5px 10px !important;
}

.practice-counter {
    display: inline-flex !important;
    color: #475569 !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    padding: 5px 10px !important;
}

/* ====== TOAST NOTIFICATION SYSTEM ====== */
#toast-container {
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    max-width: 360px !important;
    width: calc(100% - 48px) !important;
    pointer-events: none !important;
}

.toast-notification {
    pointer-events: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03) !important;
    transform: translateY(20px) !important;
    opacity: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.toast-notification.show {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

.toast-notification.success {
    border-left: 4px solid #10b981 !important;
}

.toast-notification.error {
    border-left: 4px solid #ef4444 !important;
}

.toast-content {
    flex: 1 !important;
    margin-right: 12px !important;
}

.toast-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-bottom: 2px !important;
    text-align: left !important;
}

.toast-message {
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
    text-align: left !important;
}

.toast-close {
    background: none !important;
    border: none !important;
    font-size: 20px !important;
    line-height: 1 !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 4px !important;
    transition: color 0.2s !important;
}

.toast-close:hover {
    color: #64748b !important;
}

/* Mobile Optimization for taking exams/practice */
@media (max-width: 576px) {
    .practice-page {
        padding: 0 !important;
    }

    .practice-header {
        padding: 12px 16px !important;
    }

    .practice-brand {
        font-size: 16px !important;
    }

    .practice-logo {
        width: 24px !important;
        height: 24px !important;
        font-size: 14px !important;
    }

    .practice-shell {
        margin: 12px auto !important;
        padding: 0 10px !important;
    }

    .practice-question {
        padding: 20px 16px !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
        margin-bottom: 16px !important;
    }

    .practice-meta {
        flex-direction: column-reverse !important;
        align-items: stretch !important;
        gap: 10px !important;
        margin-bottom: 16px !important;
    }

    .practice-source {
        display: inline-flex !important;
        justify-content: center !important;
        text-align: center !important;
        font-size: 10px !important;
        padding: 6px 10px !important;
        white-space: normal !important;
        line-height: 1.4 !important;
    }

    .practice-counter {
        display: inline-flex !important;
        justify-content: center !important;
        align-self: center !important;
        font-size: 11px !important;
        padding: 4px 10px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    .practice-prompt p {
        font-size: 17px !important;
        margin: 12px 0 20px 0 !important;
        line-height: 1.45 !important;
    }

    .practice-option {
        padding: 12px 16px !important;
        min-height: 52px !important;
        font-size: 14px !important;
        border-radius: 10px !important;
        gap: 10px !important;
    }

    .practice-option::before {
        width: 24px !important;
        height: 24px !important;
        font-size: 11px !important;
        margin-right: 0 !important;
    }
}



