:root {
  --green-950: #14382f;
  --green-900: #1c493d;
  --green-800: #285c4c;
  --green-700: #39705e;
  --sage: #97aa8d;
  --sage-100: #edf1e8;
  --sage-50: #f5f7f1;
  --paper: #fbfcf8;
  --cream: #f4f5ef;
  --ink: #27342f;
  --muted: #849089;
  --line: #e6e9e2;
  --gold: #b49458;
  --rose: #b47767;
  --shadow: 0 10px 36px rgba(34, 58, 48, .07);
  --serif: "Noto Serif SC", "Songti SC", serif;
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; font-size: 14px; }
.auth-pending .app-shell { visibility: hidden; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; }

.sidebar { position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 30; display: flex; flex-direction: column; padding: 28px 22px 18px; background: #fafbf7; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 14px; padding: 0 10px 36px; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; color: #fff; border-radius: 13px; background: linear-gradient(145deg, #173c68, #0f2852); box-shadow: 0 5px 12px rgba(18, 52, 91, .22); }
.brand-mark span { font-family: var(--serif); font-size: 21px; border: 1px solid rgba(255,255,255,.65); padding: 2px 5px; border-radius: 4px; }
.brand strong { display: block; font-family: var(--serif); color: var(--green-900); font-size: 22px; letter-spacing: 4px; }
.brand small, .profile small, .class-switcher small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; letter-spacing: 1px; }
.side-label { padding: 0 10px 10px; color: #9aa39d; font-size: 11px; letter-spacing: 1.5px; }
.task-label { margin-top: 28px; }
.class-switcher { width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 14px 15px; border: 1px solid #e5e8e1; background: #fff; border-radius: 10px; cursor: pointer; }
.class-switcher b { color: var(--green-900); font-size: 14px; }
.nav-list { display: grid; gap: 6px; }
.nav-item { position: relative; width: 100%; display: flex; align-items: center; gap: 13px; padding: 13px 14px; border: 0; border-radius: 9px; background: transparent; color: #66716b; font-weight: 600; text-align: left; cursor: pointer; transition: .2s ease; }
.nav-item { text-decoration: none; }
.nav-item:hover { color: var(--green-900); background: #f2f5ef; }
.nav-item.active { color: var(--green-900); background: #e9eee5; }
.nav-item.active::before { content: ""; position: absolute; left: -22px; width: 4px; height: 26px; border-radius: 0 3px 3px 0; background: var(--green-800); }
.nav-icon { width: 22px; font-size: 19px; font-weight: 400; text-align: center; }
.nav-badge { margin-left: auto; min-width: 21px; height: 21px; display: grid; place-items: center; border-radius: 6px; color: var(--green-900); background: #dfe8db; font-size: 11px; }
.friday-dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px #f1eadc; }
.side-spacer { flex: 1; }
.side-quote { margin: 20px 11px; color: #839087; }
.side-quote > span { color: #aab5ad; font-size: 25px; }
.side-quote p { margin: 8px 0; font-family: var(--serif); font-size: 15px; line-height: 2; letter-spacing: 2px; }
.side-quote small { font-size: 10px; letter-spacing: 3px; }
.profile { display: flex; align-items: center; gap: 11px; padding: 16px 8px 0; border-top: 1px solid var(--line); }
.avatar { flex: 0 0 auto; width: 39px; height: 39px; display: grid; place-items: center; color: var(--green-900); background: #e3eadf; border-radius: 50%; font-family: var(--serif); }
.profile div:nth-child(2) { flex: 1; }
.profile button { border: 0; background: none; color: #98a29c; cursor: pointer; }

.main-content { min-height: 100vh; margin-left: 268px; padding: 26px 34px 54px; }
.mobile-header { display: none; }
.page-view { display: none; max-width: 1440px; margin: auto; animation: fade-in .25s ease; }
.page-view.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(5px); } }

.class-hero { min-height: 236px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; padding: 35px 42px; color: #fff; background: linear-gradient(115deg, #1c4a3d, #285e4d); border-radius: 12px; box-shadow: var(--shadow); }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 11px; color: #bad0c5; letter-spacing: 1.2px; }
.eyebrow span { width: 24px; height: 1px; background: currentColor; }
.eyebrow i { height: 12px; width: 1px; margin-left: 4px; background: rgba(255,255,255,.25); }
.class-hero h1 { margin: 20px 0 10px; font: 600 33px/1.25 var(--serif); letter-spacing: 6px; }
.class-hero p { color: #bad0c5; font-size: 14px; letter-spacing: 1px; }
.hero-meta { display: flex; gap: 22px; align-items: center; margin-top: 26px; color: #d5e1da; font-size: 12px; }
.hero-meta em { padding: 6px 10px; color: #d4e1d8; border: 1px solid rgba(255,255,255,.2); border-radius: 4px; font-style: normal; }
.hero-illustration { width: 330px; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: .55; }
.hero-illustration svg { width: 100%; stroke: #b4d2c2; stroke-width: 2; }
.hero-illustration small { color: #c6dbd0; letter-spacing: 6px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 24px 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.metric-item { position: relative; display: flex; gap: 16px; align-items: center; padding: 23px 27px; }
.metric-item:not(:last-child)::after { content: ""; position: absolute; right: 0; height: 58px; width: 1px; background: var(--line); }
.metric-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--green-800); background: var(--sage-100); font-size: 17px; }
.metric-item strong { display: inline-block; font: 600 25px/1 var(--serif); color: var(--green-900); }
.metric-item strong small { display: inline; margin-left: 3px; color: #a4ada7; font: 11px sans-serif; }
.metric-item p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, .85fr); gap: 22px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.today-card, .task-card { padding: 29px; }
.schedule-card, .week-card { padding: 28px; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.card-heading.compact { align-items: center; }
.kicker { margin-bottom: 8px; color: #a0a9a3; font-size: 9px; font-weight: 700; letter-spacing: 2px; }
.card h2, .page-header h1 { margin: 0; color: var(--green-950); font-family: var(--serif); }
.card h2 { font-size: 19px; }
.card-heading p, .page-header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.text-button { padding: 6px 0; white-space: nowrap; color: var(--green-700); background: none; border: 0; cursor: pointer; font-weight: 600; }
.text-button span { margin-left: 5px; }
.completion-ring-row { display: flex; gap: 28px; align-items: center; padding: 26px 0 24px; border-bottom: 1px solid var(--line); }
.completion-ring { --value: 0%; flex: 0 0 128px; width: 128px; height: 128px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green-700) var(--value), #edf0ea 0); position: relative; }
.completion-ring::before { content: ""; position: absolute; width: 99px; height: 99px; border-radius: 50%; background: #fff; }
.completion-ring div { position: relative; text-align: center; }
.completion-ring strong { display: block; color: var(--green-900); font: 600 25px/1 var(--serif); }
.completion-ring span { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; }
.progress-copy { flex: 1; }
.status-pill { display: inline-block; padding: 5px 9px; border-radius: 4px; font-size: 10px; }
.status-pill.good { color: var(--green-800); background: var(--sage-100); }
.progress-copy h3 { margin: 11px 0 5px; color: var(--ink); font-size: 16px; }
.progress-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.mini-progress { width: 100%; height: 5px; overflow: hidden; margin-top: 15px; border-radius: 3px; background: #ecf0ea; }
.mini-progress i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--green-700); transition: width .35s; }
.student-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin-top: 20px; }
.preview-item { display: flex; gap: 10px; align-items: center; padding: 10px 11px; border-radius: 7px; background: #f8f9f5; }
.preview-item .student-avatar { width: 30px; height: 30px; font-size: 11px; }
.preview-item div { min-width: 0; flex: 1; }
.preview-item b { display: block; font-size: 12px; }
.preview-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-score { color: var(--green-700); font-size: 11px; font-weight: 700; }

.date-chip { color: var(--muted); font-size: 11px; }
.schedule-list { margin-top: 23px; }
.schedule-item { display: grid; grid-template-columns: 47px 14px 1fr; min-height: 61px; gap: 6px; align-items: start; }
.schedule-item time { padding-top: 3px; color: #929c96; font-size: 10px; }
.schedule-item i { position: relative; width: 7px; height: 7px; margin-top: 5px; border: 2px solid #b3bcb6; border-radius: 50%; }
.schedule-item i::after { content: ""; position: absolute; left: 1px; top: 8px; width: 1px; height: 44px; background: #e2e6df; }
.schedule-item:last-child i::after { display: none; }
.schedule-item.active i { border-color: var(--green-700); background: var(--green-700); }
.schedule-item b { display: block; color: #49544e; font-size: 12px; }
.schedule-item small { display: block; margin-top: 5px; color: #9ba39f; font-size: 10px; }
.square-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--green-700); cursor: pointer; font-size: 20px; }
.task-tabs { display: flex; gap: 24px; margin: 22px 0 5px; border-bottom: 1px solid var(--line); }
.task-tabs button { padding: 0 1px 10px; color: #929b96; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; font-size: 11px; }
.task-tabs button.active { color: var(--green-800); border-color: var(--green-700); }
.task-row { display: flex; align-items: center; gap: 11px; padding: 15px 2px; border-bottom: 1px solid #eff1ed; }
.task-check { appearance: none; width: 17px; height: 17px; border: 1px solid #cad1cb; border-radius: 4px; cursor: pointer; }
.task-check:checked { border-color: var(--sage); background: var(--sage); box-shadow: inset 0 0 0 3px white; }
.task-row label { flex: 1; cursor: pointer; font-size: 12px; }
.task-row.done label { color: #a6ada9; text-decoration: line-through; }
.task-row span { color: #9aa39d; font-size: 10px; }
.week-card { position: relative; overflow: hidden; min-height: 280px; color: #f3f6f0; background: linear-gradient(145deg, #244d41, #1c4036); }
.week-card::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.025), 0 0 0 56px rgba(255,255,255,.02); }
.week-card h2 { color: white; font-size: 21px; }
.week-card p { position: relative; z-index: 1; color: #b7c9c0; font-size: 12px; line-height: 1.8; }
.week-ribbon { position: absolute; right: 24px; top: 0; padding: 11px 10px 16px; background: #c0a065; color: white; font-size: 10px; clip-path: polygon(0 0,100% 0,100% 80%,50% 100%,0 80%); }
.week-mini-stats { position: relative; z-index: 1; display: flex; gap: 25px; margin: 18px 0; }
.week-mini-stats strong { display: block; font: 600 18px var(--serif); color: white; }
.week-mini-stats small { color: #9eb3a8; font-size: 9px; }
.primary-button, .secondary-button { min-height: 39px; padding: 0 17px; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 12px; transition: .2s; }
.primary-button { color: #fff; border: 1px solid var(--green-800); background: var(--green-800); box-shadow: 0 4px 12px rgba(34, 83, 67, .16); }
.primary-button:hover { transform: translateY(-1px); background: var(--green-900); }
.primary-button.full { position: relative; z-index: 1; width: 100%; color: var(--green-900); border-color: #fff; background: #fff; }
.primary-button.full span { float: right; }
.secondary-button { color: var(--green-800); border: 1px solid #d8ded9; background: #fff; }
.secondary-button:hover { border-color: var(--green-700); }
.secondary-button.small { min-height: 33px; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 17px 3px 27px; }
.page-header h1 { margin-top: 12px; font-size: 29px; letter-spacing: 2px; }
.eyebrow.dark { color: var(--green-700); }
.header-actions { display: flex; gap: 10px; }
.date-strip-wrap { display: flex; align-items: stretch; padding: 8px; }
.date-strip { display: grid; grid-template-columns: repeat(7, 1fr); flex: 1; }
.date-button { min-height: 75px; display: grid; place-items: center; align-content: center; gap: 5px; border: 0; border-right: 1px solid #edf0ec; background: #fff; cursor: pointer; color: #77817b; }
.date-button:first-child { border-radius: 7px 0 0 7px; }
.date-button:last-child { border: 0; border-radius: 0 7px 7px 0; }
.date-button span { font-size: 10px; }
.date-button strong { font: 600 18px var(--serif); }
.date-button small { height: 15px; color: #a4ada8; font-size: 9px; }
.date-button.active { color: #fff; background: var(--green-800); border-radius: 7px; box-shadow: 0 5px 15px rgba(36, 86, 69, .2); }
.date-button.active small { color: #d7e2dc; }
.date-button.future { color: #b8bfbb; }
.date-arrow { width: 45px; border: 0; color: var(--green-700); background: #fff; cursor: pointer; font-size: 16px; }
.feedback-card { margin-top: 18px; padding: 24px 25px; }
.feedback-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.feedback-heading h2 { font-size: 18px; }
.feedback-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.local-label { flex: 0 0 auto; padding: 6px 9px; color: var(--green-700); background: var(--sage-100); border-radius: 5px; font-size: 9px; }
.feedback-card textarea { width: 100%; min-height: 150px; margin-top: 18px; padding: 15px 16px; resize: vertical; color: #3d4942; border: 1px solid #dde3dd; border-radius: 8px; outline: none; background: #fbfcf9; font-size: 12px; line-height: 1.8; }
.feedback-card textarea:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px #edf2ed; }
.feedback-footer { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-top: 13px; }
.feedback-footer > div:first-child { display: grid; gap: 5px; }
.feedback-tip { color: #98a19c; font-size: 9px; }
.feedback-result { color: var(--green-700); font-size: 10px; font-weight: 600; }
.feedback-actions { display: flex; gap: 9px; }
.feedback-note { max-width: 260px; text-align: left; }
.feedback-note b { display: block; overflow: hidden; color: #536058; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.feedback-note small { display: block; margin-top: 4px; color: #9aa39e; font-size: 9px; }
.progress-stat-grid, .weekly-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.progress-stat, .weekly-stat { display: flex; align-items: center; gap: 14px; min-height: 86px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: 9px; }
.progress-stat .metric-icon { width: 35px; height: 35px; }
.progress-stat strong, .weekly-stat strong { display: block; color: var(--green-900); font: 600 21px var(--serif); }
.progress-stat small, .weekly-stat small { color: var(--muted); font-size: 10px; }
.table-card { overflow: hidden; }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 23px 25px; border-bottom: 1px solid var(--line); }
.table-toolbar h2 { font-size: 18px; }
.table-toolbar p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.toolbar-actions { display: flex; gap: 10px; }
.search-box { min-width: 205px; height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 7px; color: #97a19b; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; font-size: 11px; }
.toolbar-actions select { padding: 0 30px 0 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #647069; font-size: 11px; }
.homework-table-wrap { overflow-x: auto; }
.homework-table { width: 100%; min-width: 880px; border-collapse: collapse; }
.homework-table th { padding: 14px 16px; color: #98a19c; background: #fafbf8; font-size: 10px; font-weight: 600; text-align: center; }
.homework-table th:first-child, .homework-table td:first-child { padding-left: 25px; text-align: left; }
.homework-table td { padding: 14px 16px; border-top: 1px solid #edf0ec; text-align: center; font-size: 11px; }
.student-cell { display: flex; align-items: center; gap: 10px; }
.student-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #e9eee5; color: var(--green-700); font-family: var(--serif); }
.student-cell b { display: block; font-size: 12px; }
.student-cell small { display: block; margin-top: 3px; color: #a0a9a4; font-size: 9px; }
.row-progress { min-width: 90px; }
.row-progress div { height: 4px; margin-bottom: 5px; border-radius: 3px; background: #e9ede8; }
.row-progress i { display: block; height: 100%; border-radius: 3px; background: var(--green-700); }
.row-progress span { color: var(--muted); font-size: 9px; }
.subject-status { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; transition: .18s; font-size: 11px; }
.subject-status:hover { transform: scale(1.12); }
.subject-status.not-started { color: #9da6a1; background: #eef0ed; }
.subject-status.working { color: #a57f38; background: #f3ead7; }
.subject-status.completed { color: #fff; background: var(--green-700); }
.subject-status.revise { color: #a25f50; background: #f1ded9; }
.quick-done { padding: 5px 8px; color: var(--green-700); border: 1px solid #dbe2dd; background: #fff; border-radius: 5px; cursor: pointer; font-size: 9px; }
.legend { display: flex; gap: 18px; align-items: center; padding: 16px 24px; border-top: 1px solid var(--line); color: #748078; font-size: 10px; }
.legend span { display: flex; gap: 6px; align-items: center; }
.legend small { margin-left: auto; color: #a0a8a3; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot.not-started { background: #c8ceca; }.dot.working { background: #d4aa5b; }.dot.completed { background: var(--green-700); }.dot.revise { background: var(--rose); }

.weekly-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .72fr); gap: 20px; }
.student-summary-layout { grid-template-columns: 300px minmax(0, 1fr); align-items: start; }
.weekly-student-panel { overflow: hidden; padding: 22px 0 0; }
.student-panel-heading { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 21px 17px; border-bottom: 1px solid var(--line); }
.student-panel-heading h2 { font-size: 18px; }
.student-panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }
.student-panel-heading > span { padding: 5px 8px; color: var(--green-700); background: var(--sage-100); border-radius: 5px; font-size: 9px; }
.weekly-student-list { display: grid; padding: 8px; }
.weekly-student-button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 11px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; transition: .18s; }
.weekly-student-button:hover { background: #f5f7f3; }
.weekly-student-button.active { background: #eaf0e7; }
.weekly-student-button .student-avatar { flex: 0 0 auto; width: 34px; height: 34px; }
.weekly-student-button > div { min-width: 0; flex: 1; }
.weekly-student-button b { display: block; color: #3f4c45; font-size: 12px; }
.weekly-student-button small { display: block; margin-top: 3px; color: #929c96; font-size: 9px; }
.weekly-student-button em { flex: 0 0 auto; color: var(--green-700); font-size: 10px; font-style: normal; }
.weekly-student-button .saved-mark { color: #a4854e; }
.student-panel-tip { display: flex; gap: 9px; margin-top: 5px; padding: 17px 20px; color: #758179; background: #f6f8f3; border-top: 1px solid var(--line); }
.student-panel-tip span { color: var(--gold); }
.student-panel-tip p { margin: 0; font-size: 9px; line-height: 1.7; }
.summary-editor-card { padding: 27px; }
.summary-evidence { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.summary-evidence span { padding: 6px 9px; color: #66736b; background: #f2f5f0; border: 1px solid #e5e9e3; border-radius: 5px; font-size: 9px; }
.summary-evidence span strong { color: var(--green-800); }
.ai-label { padding: 7px 10px; color: var(--green-700); background: var(--sage-100); border-radius: 5px; font-size: 10px; }
.summary-paper { margin-top: 22px; padding: 34px 42px; background: #fbfaf5; border: 1px solid #ebe8dc; border-radius: 4px; background-image: linear-gradient(rgba(62, 98, 79, .035) 1px, transparent 1px); background-size: 100% 34px; }
.paper-title { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.paper-title span { height: 1px; flex: 1; background: #dfe1d9; }
.paper-title b { color: var(--green-900); font: 600 18px var(--serif); letter-spacing: 4px; }
.summary-paper textarea { width: 100%; min-height: 390px; resize: vertical; padding: 0; color: #455049; border: 0; outline: 0; background: transparent; font-size: 13px; line-height: 2.55; letter-spacing: .35px; }
.paper-sign { color: #69756e; text-align: right; font-size: 11px; line-height: 1.8; }
.paper-sign span { color: #9aa39e; }
.editor-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; color: #97a09b; font-size: 10px; }
.weekly-aside { display: grid; gap: 16px; align-content: start; }
.insight-card { padding: 23px; }
.insight-card > div:nth-child(2) { display: inline-block; vertical-align: middle; }
.insight-card h3 { margin: 0; color: var(--green-950); font: 600 16px var(--serif); }
.insight-icon { width: 35px; height: 35px; display: inline-grid; place-items: center; margin-right: 9px; border-radius: 50%; vertical-align: middle; font-weight: 700; }
.insight-icon.rose { color: #a46758; background: #f3e5e0; }.insight-icon.gold { color: #9c7d40; background: #f5eddc; }
.insight-list { margin-top: 18px; }
.insight-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-top: 1px solid #edf0ec; }
.insight-row:first-child { border-top: 0; }
.insight-row .student-avatar { width: 31px; height: 31px; font-size: 11px; }
.insight-row div:nth-child(2) { flex: 1; }
.insight-row b { display: block; font-size: 11px; }
.insight-row small { display: block; margin-top: 3px; color: #9aa39e; font-size: 9px; }
.insight-row em { color: var(--rose); font-size: 9px; font-style: normal; }
.quote-card { padding: 27px; color: #dae5df; background: var(--green-900); border-radius: 10px; }
.quote-card span { font: 38px Georgia; opacity: .35; }
.quote-card p { margin: -10px 0 14px; font: 600 14px/2 var(--serif); letter-spacing: 1px; }
.quote-card small { color: #96ada2; font-size: 9px; letter-spacing: 2px; }

.roster-overview { display: grid; grid-template-columns: repeat(4, 1fr); padding: 18px; margin-bottom: 20px; }
.roster-overview div { text-align: center; padding: 10px; border-right: 1px solid var(--line); }
.roster-overview div:last-child { border: 0; }
.roster-overview strong { display: block; color: var(--green-900); font: 600 24px var(--serif); }
.roster-overview span { color: var(--muted); font-size: 10px; }
.student-card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.student-card { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 6px 22px rgba(32, 57, 47, .04); }
.student-card-head { display: flex; gap: 11px; align-items: center; }
.student-card-head div:nth-child(2) { flex: 1; }
.student-card-head b { display: block; font-size: 13px; }
.student-card-head small { color: var(--muted); font-size: 9px; }
.student-card-head em { color: var(--green-700); font-style: normal; font-weight: 700; font-size: 12px; }
.student-card .mini-progress { margin: 15px 0 11px; }
.student-card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.student-card-tags span { padding: 4px 7px; color: #6e7b73; background: #f1f4ef; border-radius: 4px; font-size: 9px; }

.modal { width: min(450px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 11px; box-shadow: 0 20px 80px rgba(18, 48, 39, .24); }
.modal::backdrop { background: rgba(18, 43, 35, .45); backdrop-filter: blur(3px); }
.modal form { padding: 26px; }
.modal-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.modal-heading h2 { margin: 0; color: var(--green-950); font-family: var(--serif); }
.modal-heading button { border: 0; background: transparent; color: #98a29c; cursor: pointer; font-size: 22px; }
.modal label { display: grid; gap: 8px; margin-top: 15px; color: #59645e; font-size: 11px; }
.modal input { width: 100%; padding: 11px 12px; border: 1px solid #dfe3de; border-radius: 7px; outline: 0; }
.modal input:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px #edf2ed; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 25px; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 99; padding: 11px 17px; color: #fff; background: var(--green-950); border-radius: 7px; box-shadow: 0 10px 30px rgba(18,50,40,.25); transform: translate(-50%, 18px); opacity: 0; pointer-events: none; transition: .25s; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sidebar-scrim { display: none; }

@media (max-width: 1180px) {
  .sidebar { width: 235px; padding-left: 17px; padding-right: 17px; }
  .main-content { margin-left: 235px; padding: 22px; }
  .metric-item { padding: 20px 16px; }
  .hero-illustration { width: 260px; }
  .student-card-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 920px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 20; background: rgba(17,41,34,.4); }
  .sidebar-scrim.show { display: block; }
  .main-content { margin-left: 0; padding: 0 18px 40px; }
  .mobile-header { height: 64px; display: flex; align-items: center; justify-content: space-between; }
  .mobile-header button { border: 0; background: none; color: var(--green-900); font-size: 21px; }
  .mobile-brand { color: var(--green-900); font: 600 16px var(--serif); letter-spacing: 1px; }
  .avatar.small { width: 32px; height: 32px; font-size: 11px; }
  .dashboard-grid, .weekly-layout { grid-template-columns: 1fr; }
  .weekly-student-panel { order: 0; }
  .summary-editor-card { order: 1; }
  .weekly-student-list { grid-template-columns: repeat(2, 1fr); }
  .metric-grid, .progress-stat-grid, .weekly-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-item:nth-child(2)::after { display: none; }
  .metric-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .student-card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .main-content { padding: 0 12px 30px; }
  .class-hero { min-height: 260px; padding: 29px 23px; }
  .class-hero h1 { font-size: 27px; }
  .hero-illustration { position: absolute; right: 2px; width: 180px; opacity: .14; }
  .hero-meta { flex-wrap: wrap; gap: 11px 15px; }
  .metric-grid { margin: 13px 0; }
  .metric-item { gap: 10px; padding: 17px 13px; }
  .metric-icon { width: 33px; height: 33px; }
  .metric-item strong { font-size: 20px; }
  .today-card, .task-card, .schedule-card, .week-card, .summary-editor-card { padding: 21px; }
  .completion-ring-row { align-items: flex-start; gap: 17px; }
  .completion-ring { flex-basis: 95px; width: 95px; height: 95px; }
  .completion-ring::before { width: 74px; height: 74px; }
  .completion-ring strong { font-size: 20px; }
  .student-preview { grid-template-columns: 1fr 1fr; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 14px; padding-top: 10px; }
  .page-header h1 { font-size: 25px; }
  .page-header > .primary-button { width: 100%; }
  .header-actions { width: 100%; }
  .header-actions button { flex: 1; }
  .date-strip { overflow-x: auto; grid-template-columns: repeat(7, 74px); }
  .date-arrow { display: none; }
  .progress-stat-grid, .weekly-stat-grid { gap: 8px; }
  .progress-stat, .weekly-stat { padding: 13px 12px; min-height: 72px; gap: 9px; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { flex-direction: column; }
  .search-box { min-width: 0; }
  .toolbar-actions select { height: 38px; }
  .feedback-heading, .feedback-footer { flex-direction: column; align-items: stretch; }
  .feedback-actions { width: 100%; }
  .feedback-actions button { flex: 1; }
  .legend { flex-wrap: wrap; gap: 9px 14px; }
  .legend small { width: 100%; margin: 4px 0 0; }
  .summary-paper { padding: 25px 20px; }
  .weekly-student-list { grid-template-columns: 1fr; }
  .summary-paper textarea { min-height: 470px; }
  .paper-title b { font-size: 15px; letter-spacing: 2px; }
  .roster-overview { grid-template-columns: 1fr 1fr; }
  .roster-overview div:nth-child(2) { border-right: 0; }
  .roster-overview div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .student-card-grid { grid-template-columns: 1fr; }
}
