/* SCREENS */
.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

/* LOGIN */
#login-screen { align-items: center; justify-content: center; padding: 2rem; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 400px; }
.login-logo { font-family: 'DM Serif Display', serif; font-size: 26px; color: var(--accent); margin-bottom: 0.25rem; }
.login-sub { font-size: 13px; color: var(--text3); margin-bottom: 2rem; }
.error-msg { background: var(--danger-bg); color: var(--danger); font-size: 13px; padding: 10px 14px; border-radius: var(--radius); margin-bottom: 1rem; display: none; }

/* APP SHELL */
#app-screen { flex-direction: column; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 1.5rem; height: 56px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 100; }
.topbar-logo { font-family: 'DM Serif Display', serif; font-size: 20px; color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-user { font-size: 13px; color: var(--text2); }
.topbar-user strong { color: var(--text); }
.btn-logout { font-size: 13px; color: var(--text3); background: none; border: 1px solid var(--border); border-radius: 6px; padding: 5px 12px; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.15s; }
.btn-logout:hover { color: var(--text); border-color: var(--text3); }

.app-body { display: flex; flex: 1; }
.sidebar { width: 220px; min-width: 220px; background: var(--surface); border-right: 1px solid var(--border); padding: 1.5rem 0; display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 1.25rem; font-size: 14px; color: var(--text2); cursor: pointer; border-left: 3px solid transparent; transition: all 0.15s; }
.nav-item:hover { background: var(--bg); color: var(--text); }
.nav-item.active { color: var(--accent); background: var(--accent-light); border-left-color: var(--accent); font-weight: 500; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text3); padding: 10px 1.25rem 4px; font-weight: 500; margin-top: 0.5rem; }

.main { flex: 1; padding: 2rem 2.5rem; overflow-y: auto; }
.page { display: none; }
.page.active { display: block; }
#page-lesson.active, #page-module.active { width: 100%; max-width: 100%; }
#page-lesson .lesson-body, #page-module .lesson-body { max-width: 100%; }

/* TYPOGRAPHY */
.page-title { font-family: 'DM Serif Display', serif; font-size: 26px; margin-bottom: 0.25rem; }
.page-sub { font-size: 14px; color: var(--text2); margin-bottom: 2rem; }
