:root {
  --ink: #1f2937;
  --muted: #7b8493;
  --line: #e6e9ee;
  --paper: #ffffff;
  --canvas: #f3f5f8;
  --navy: #182335;
  --blue: #2f6fed;
  --red: #e05252;
  --green: #38a873;
  --amber: #d9a13b;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f6f7f9;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 1180px; background: #f6f7f9; }
button { font: inherit; cursor: pointer; border: 0; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar { width: 238px; flex: 0 0 238px; background: var(--navy); color: #dfe6f0; padding: 26px 15px 18px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px 29px; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: #e85b5b; color: white; font-weight: 800; font-size: 15px; border-radius: 9px; box-shadow: 0 7px 16px #08101e66; }
.brand-name { color: #fff; font-weight: 730; letter-spacing: -.02em; }
.brand-subtitle { margin-top: 2px; color: #8591a6; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.primary-nav { display: grid; gap: 5px; }
.nav-item, .classroom-link { width: 100%; color: #aeb9ca; background: transparent; display: flex; align-items: center; gap: 12px; border-radius: 7px; padding: 11px 12px; text-align: left; }
.nav-item { font-size: 13px; }
.nav-item:hover, .nav-item.active { background: #2b3a51; color: #fff; }
.nav-icon { width: 16px; color: #8190a5; text-align: center; font-size: 17px; }
.nav-item.active .nav-icon { color: #ef7878; }
.sidebar-section { margin-top: 36px; }
.section-label { color: #738097; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; padding: 0 12px 12px; }
.classroom-link { margin-bottom: 4px; gap: 9px; }
.classroom-link.active { background: #26344a; color: #fff; }
.classroom-dot { width: 7px; height: 7px; border-radius: 50%; background: #66748a; align-self: flex-start; margin-top: 5px; }
.classroom-dot.live { background: #e66868; box-shadow: 0 0 0 4px #e6686820; }
.classroom-copy { display: grid; gap: 3px; flex: 1; min-width: 0; }
.classroom-copy strong { color: #e7ebf1; font-size: 12px; font-weight: 650; }
.classroom-copy small { color: #8794a9; font-size: 10px; }
.classroom-count { color: #f07777; font-size: 10px; font-weight: 700; }
.sidebar-footer { margin-top: auto; }
.system-chip { color: #8f9caf; font-size: 10px; padding: 9px 11px; border: 1px solid #354259; border-radius: 6px; display: flex; align-items: center; gap: 7px; margin-bottom: 15px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px #38a8731d; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 11px 9px; border-top: 1px solid #2e3c50; color: white; }
.user-chip strong, .user-chip small { display: block; }
.user-chip strong { font-size: 12px; }
.user-chip small { margin-top: 3px; color: #8491a4; font-size: 10px; }
.more { margin-left: auto; color: #8d99aa; letter-spacing: 2px; font-size: 13px; }
.avatar { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.teacher-avatar { background: #dd6b63; }
.student-avatar { background: #5685dc; }
.student-avatar.alt { background: #8b71ca; }
.parent-avatar { background: #5caa87; }

.main-content { flex: 1; min-width: 0; }
.topbar { height: 96px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 36px; border-bottom: 1px solid var(--line); }
.eyebrow, .panel-kicker { color: #939baa; font-size: 10px; text-transform: uppercase; letter-spacing: .11em; font-weight: 700; }
h1 { margin: 7px 0 0; font-size: 22px; line-height: 1; letter-spacing: -.035em; font-weight: 760; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.role-switcher { display: flex; align-items: center; gap: 4px; padding: 4px; background: #f1f3f6; border-radius: 6px; }
.role-label { padding: 0 8px; color: #8a93a0; font-size: 10px; }
.role-button { padding: 7px 10px; color: #7c8591; background: transparent; font-size: 11px; border-radius: 4px; }
.role-button.active { color: #263246; background: white; box-shadow: 0 1px 4px #1d2a3a18; font-weight: 700; }
.icon-button { width: 32px; height: 32px; color: #667283; background: transparent; position: relative; border-radius: 6px; font-size: 18px; }
.icon-button:hover { background: #f1f3f6; color: #273346; }
.icon-button.small { width: 28px; height: 28px; font-size: 15px; }
.notification-dot { position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; background: #e05252; border-radius: 50%; border: 1px solid #fff; }
.profile-button { display: flex; align-items: center; gap: 8px; color: #4e596b; background: transparent; font-size: 12px; }
.chevron { color: #a1a9b5; font-size: 15px; }
.session-strip { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 36px; border-bottom: 1px solid var(--line); background: #fbfbfc; }
.session-meta, .session-actions { display: flex; align-items: center; gap: 11px; }
.session-meta { color: #8a93a1; font-size: 11px; }
.session-meta strong { color: #5c6676; font-weight: 700; }
.meta-separator { color: #bdc3ca; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; color: #c45050; font-weight: 800; font-size: 10px; letter-spacing: .08em; }
.mode-pill { color: #657083; background: #eef1f5; border-radius: 4px; padding: 4px 6px; font-size: 9px; }
.primary-button, .secondary-button, .danger-button { border-radius: 5px; padding: 8px 12px; font-size: 11px; }
.primary-button { color: white; background: #2f6fed; border: 1px solid #2f6fed; box-shadow: 0 3px 8px #2f6fed24; }
.primary-button:hover { background: #255fd2; }
.secondary-button { color: #566274; background: white; border: 1px solid #dfe3e9; }
.secondary-button:hover { border-color: #b9c1cb; background: #f8fafc; }
.danger-button { color: #b84b4b; background: #fff3f3; border: 1px solid #f2d4d4; }
.danger-button:hover { background: #ffeaea; }
.workspace-grid { display: grid; grid-template-columns: 220px minmax(550px, 1fr) 270px; min-height: calc(100vh - 154px); }
.lesson-panel, .right-rail { background: #fff; }
.lesson-panel { padding: 25px 17px 22px 25px; border-right: 1px solid var(--line); }
.panel-heading, .rail-heading, .board-toolbar, .board-footer { display: flex; align-items: center; justify-content: space-between; }
h2 { margin: 6px 0 0; font-size: 14px; letter-spacing: -.02em; }
.document-card { margin-top: 21px; position: relative; padding: 9px; border: 1px solid #e3e6eb; border-radius: 6px; }
.document-preview { height: 108px; padding: 12px; background: #f1f3f6; border-radius: 4px; position: relative; overflow: hidden; }
.doc-badge { display: inline-flex; padding: 3px 5px; background: #ea6262; color: white; font-size: 8px; letter-spacing: .06em; border-radius: 3px; font-weight: 800; }
.doc-lines { margin-top: 16px; display: grid; gap: 6px; }
.line { height: 4px; background: #c4cad3; display: block; border-radius: 4px; }
.line.wide { width: 90%; }.line.medium { width: 63%; }.line.short { width: 43%; }
.document-formula { position: absolute; right: 11px; bottom: 18px; font-family: Georgia, serif; font-weight: 700; color: #4d6fbd; font-size: 14px; transform: rotate(-5deg); }
.document-info { padding: 11px 2px 3px; display: grid; gap: 4px; }
.document-info strong { font-size: 11px; }.document-info span { color: #929aa7; font-size: 10px; }
.ready-badge { font-size: 9px; color: #33885e; background: #eaf7ef; padding: 4px 6px; border-radius: 3px; font-weight: 750; letter-spacing: .02em; }
.document-card .ready-badge { position: absolute; right: 11px; bottom: 14px; }
.page-list { margin-top: 20px; display: grid; gap: 7px; max-height: 270px; overflow: auto; padding-right: 3px; }
.page-thumb { border: 1px solid #e3e6eb; border-radius: 4px; display: flex; align-items: center; gap: 9px; padding: 7px; background: #fff; text-align: left; }
.page-thumb:hover { border-color: #aeb8c8; }.page-thumb.active { border-color: #e05252; box-shadow: 0 0 0 1px #e05252; }
.thumb-page { width: 31px; height: 39px; border: 1px solid #d8dce3; background: #f5f6f8; display: grid; place-items: center; color: #9099a7; font-size: 10px; font-weight: 700; }
.page-thumb.active .thumb-page { color: #e05252; background: #fff6f6; border-color: #f2c9c9; }
.thumb-copy { display: grid; gap: 3px; }.thumb-copy strong { font-size: 10px; }.thumb-copy span { color: #9da4af; font-size: 9px; }
.panel-note { margin: 18px 2px 0; display: flex; gap: 7px; color: #9ba3af; font-size: 9px; line-height: 1.45; }
.note-icon { border: 1px solid #c8ced7; border-radius: 50%; width: 14px; height: 14px; display: grid; place-items: center; flex: 0 0 auto; font-size: 9px; }

.board-panel { background: var(--canvas); min-width: 0; display: flex; flex-direction: column; }
.board-toolbar { height: 57px; padding: 0 20px; background: #fff; border-bottom: 1px solid var(--line); }
.board-title { font-size: 11px; color: #667181; display: flex; align-items: center; gap: 8px; }.board-title strong { color: #2a3546; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #e05252; box-shadow: 0 0 0 4px #e0525215; }
.board-controls { display: flex; align-items: center; gap: 6px; }.tool-button { width: 29px; height: 29px; border-radius: 5px; color: #8c96a5; background: transparent; font-size: 16px; }.tool-button:hover, .tool-button.active { color: #2d3a50; background: #edf1f5; }.toolbar-divider { height: 20px; width: 1px; background: #e5e8ed; margin: 0 4px; }
.color-button { width: 17px; height: 17px; border-radius: 50%; background: var(--swatch); border: 2px solid #fff; box-shadow: 0 0 0 1px #dfe3e9; }.color-button.active { box-shadow: 0 0 0 2px #6a7483; }
.board-stage { flex: 1; position: relative; overflow: auto; display: grid; place-items: center; padding: 28px 40px; min-height: 500px; }
.paper { width: min(100%, 650px); aspect-ratio: 1.414 / 1; background: var(--paper); box-shadow: 0 11px 32px #26354b1b; position: relative; overflow: hidden; }
.paper-header { display: flex; justify-content: space-between; padding: 18px 27px 0; color: #b2b7c0; font-size: 8px; letter-spacing: .04em; }.paper-content { padding: 26px 50px 30px; }.paper-kicker { color: #e05252; text-transform: uppercase; font-weight: 800; font-size: 9px; letter-spacing: .1em; }.paper h3 { margin: 8px 0 11px; font-family: Georgia, serif; font-size: clamp(16px, 2vw, 23px); letter-spacing: -.04em; }.paper p { color: #636e7d; font-family: Georgia, serif; font-size: clamp(11px, 1.2vw, 14px); margin: 0 0 14px; }.equation-row { display: flex; gap: 25px; color: #3d5b98; font-family: Georgia, serif; font-size: 13px; font-weight: 700; border-left: 2px solid #dfe5f0; padding-left: 12px; }.geometry-figure { margin: 16px 0 9px; }.geometry-figure svg { width: 100%; display: block; }.triangle { fill: none; stroke-width: 2.1; }.blue-triangle { stroke: #527ac7; }.red-triangle { stroke: #df6a67; }.geometry-figure text { font-family: Georgia, serif; font-size: 13px; fill: #626e7d; }.angle-mark, .tick { fill: none; stroke-width: 1.7; }.blue-mark { stroke: #527ac7; }.red-mark { stroke: #df6a67; }.proof-box { display: grid; gap: 6px; background: #f8f9fb; border: 1px solid #e9ebef; border-left: 3px solid #e2ab4d; padding: 10px 12px; color: #687484; font-family: Georgia, serif; font-size: 11px; }.proof-label { color: #c18f34; font-weight: 800; font-family: Inter, sans-serif; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
#inkCanvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.cursor-badge { position: absolute; right: 25px; bottom: 20px; display: flex; align-items: center; gap: 7px; padding: 6px 8px 6px 6px; border-radius: 5px; background: #fff; box-shadow: 0 4px 14px #2737501c; color: #687282; font-size: 9px; }.cursor-badge .avatar { width: 19px; height: 19px; font-size: 8px; }
.board-footer { min-height: 51px; padding: 0 20px; background: #fff; border-top: 1px solid var(--line); }.page-nav { width: 28px; height: 28px; border-radius: 5px; color: #657083; background: transparent; font-size: 18px; }.page-nav:hover { background: #f0f2f5; }.page-progress { display: flex; gap: 4px; align-items: baseline; margin: 0 10px; color: #b0b6bf; font-size: 10px; }.page-progress strong { color: #445165; font-size: 12px; }.sync-status { color: #7e8999; display: flex; align-items: center; gap: 7px; font-size: 10px; margin-left: 14px; }.footer-divider { height: 19px; width: 1px; background: #e5e8ed; margin-left: 17px; }.footer-spacer { flex: 1; }.compact { padding: 6px 9px; font-size: 10px; }

.right-rail { border-left: 1px solid var(--line); }.rail-section { padding: 24px 20px; border-bottom: 1px solid var(--line); }.rail-heading h2 { margin: 0; font-size: 13px; }.rail-heading h2 span { color: #a2a9b3; font-weight: 500; margin-left: 3px; }.text-button { color: #557fd0; background: transparent; font-size: 10px; }.participant-list { margin-top: 17px; display: grid; gap: 14px; }.participant-row { display: flex; align-items: center; gap: 8px; }.participant-row .avatar { width: 28px; height: 28px; }.person { display: grid; gap: 3px; flex: 1; min-width: 0; }.person strong { font-size: 10px; }.person span { color: #989fab; font-size: 9px; }.mic { color: #b0b6c0; font-size: 9px; }.mic.live { color: #44a579; }.view-only { color: #5e9b7b; background: #edf8f1; border-radius: 3px; padding: 3px 4px; font-size: 8px; font-weight: 800; }.view-all-button { display: flex; justify-content: space-between; width: 100%; margin-top: 17px; padding: 9px 0 0; color: #557fd0; background: transparent; border-top: 1px solid #eef0f3; font-size: 10px; }.activity-live { color: #48a579; display: flex; gap: 6px; align-items: center; font-size: 9px; }.activity-list { margin-top: 18px; display: grid; gap: 15px; }.activity-item { display: flex; gap: 9px; align-items: flex-start; }.activity-icon { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-size: 10px; }.activity-icon.answer { color: #3e9b70; background: #eaf7ef; }.activity-icon.hand { color: #c48a2d; background: #fff5dd; }.activity-icon.page { color: #5479c6; background: #edf2ff; }.activity-item div { display: grid; gap: 3px; }.activity-item strong { font-size: 10px; }.activity-item span { color: #999fab; font-size: 9px; }.integration-section { padding-bottom: 20px; }.integration-row { display: flex; align-items: center; gap: 9px; margin-top: 14px; }.integration-icon { width: 23px; height: 23px; display: grid; place-items: center; color: #587dcc; background: #eff3ff; border-radius: 5px; font-size: 13px; }.integration-row div { display: grid; gap: 3px; flex: 1; }.integration-row strong { font-size: 10px; }.integration-row span:not(.integration-icon):not(.check) { color: #989fab; font-size: 9px; }.check { color: #43a478; font-size: 14px; font-weight: 800; }.check.amber { color: #d49d38; }.integration-button { width: 100%; margin-top: 19px; display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; color: #557fd0; border: 1px solid #dce5fb; background: #f7f9ff; border-radius: 5px; font-size: 10px; }.integration-button:hover { background: #eef3ff; }
.toast { position: fixed; right: 28px; bottom: 24px; padding: 11px 14px; background: #263246; color: #fff; border-radius: 5px; font-size: 11px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; box-shadow: 0 8px 24px #1c273a30; }.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 1280px) { .workspace-grid { grid-template-columns: 205px minmax(500px, 1fr) 245px; }.lesson-panel { padding-left: 18px; }.paper-content { padding-left: 38px; padding-right: 38px; } }
