:root {
  --ink: #172420;
  --muted: #68736f;
  --paper: #f6f7ef;
  --surface: #ffffff;
  --surface-soft: #eef1e6;
  --line: #dfe4d8;
  --green: #245b49;
  --green-2: #377862;
  --mint: #d9eadc;
  --orange: #e8813a;
  --orange-soft: #fff0df;
  --yellow: #f6d775;
  --blue: #4d79ad;
  --blue-soft: #e6eff8;
  --red: #b9483f;
  --red-soft: #fbe9e5;
  --purple: #7a67a7;
  --shadow: 0 18px 48px rgba(30, 53, 43, 0.09);
  --shadow-small: 0 8px 24px rgba(30, 53, 43, 0.07);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --sidebar: 248px;
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 6%, rgba(246, 215, 117, 0.22), transparent 24rem),
    var(--paper);
}

button, input, textarea, select { font: inherit; }
button, select, input[type="file"] { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(77, 121, 173, 0.35);
  outline-offset: 2px;
}

button { color: inherit; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.9; }
.icon-lg { width: 25px; height: 25px; }
.icon-xl { width: 34px; height: 34px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 27px 18px 22px;
  background: #173f34;
  color: #f9fbf5;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center;
}
.brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand strong { display: block; font-size: 19px; letter-spacing: .04em; }
.brand small { color: #b9cec5; font-size: 11px; letter-spacing: .12em; }
.sidebar-nav { display: grid; gap: 7px; }
.nav-button {
  width: 100%; min-height: 47px; display: flex; align-items: center; gap: 12px;
  border: 0; border-radius: 13px; padding: 0 14px; color: #cbdad4; background: transparent;
  text-align: left; transition: .18s ease;
}
.nav-button:hover { background: rgba(255,255,255,.08); color: white; }
.nav-button.active { background: #f4f0d9; color: #173f34; font-weight: 700; }
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); }
.child-mini { display: flex; gap: 10px; align-items: center; padding: 0 7px 14px; }
.avatar {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange-soft); color: #9b531f; font-weight: 800;
}
.avatar.green { background: var(--mint); color: var(--green); }
.avatar.dark { background: #d8ebe5; color: var(--green); }
.child-mini strong, .child-mini small { display: block; }
.child-mini small { margin-top: 2px; color: #a9c0b7; font-size: 12px; }
.child-switch {
  width: 100%; border: 1px solid rgba(255,255,255,.18); border-radius: 12px;
  padding: 9px 12px; color: white; background: rgba(255,255,255,.08);
}
.child-switch option { color: var(--ink); background: white; }
.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.sidebar-action { min-height: 36px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.06); color: #dce9e4; font-size: 12px; }
.sidebar-action:hover { background: rgba(255,255,255,.12); color: white; }

.main { grid-column: 2; min-width: 0; }
.topbar {
  height: 78px; padding: 0 clamp(22px, 4vw, 56px); display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid rgba(36, 91, 73, .1);
  background: rgba(246,247,239,.84); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 15;
}
.topbar-title { font-weight: 750; font-size: 18px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.date-chip { color: var(--muted); font-size: 14px; }
.content { max-width: 1420px; margin: 0 auto; padding: 34px clamp(22px, 4vw, 56px) 60px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.heading-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.eyebrow { color: var(--orange); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(28px, 4vw, 42px); line-height: 1.14; letter-spacing: -.04em; }
h2 { margin-bottom: 16px; font-size: 21px; letter-spacing: -.02em; }
h3 { margin-bottom: 8px; font-size: 17px; }
.subtitle, .muted { color: var(--muted); }
.subtitle { margin: 0; font-size: 15px; }

.button {
  min-height: 44px; padding: 0 17px; border: 0; border-radius: 13px; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; font-weight: 700; transition: .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--green); color: white; box-shadow: 0 8px 18px rgba(36,91,73,.18); }
.button.secondary { background: var(--surface-soft); color: var(--green); }
.button.ghost { background: transparent; border: 1px solid var(--line); }
.button.warm { background: var(--orange); color: white; }
.button.danger { background: var(--red-soft); color: var(--red); }
.button.icon-only { width: 44px; padding: 0; }
.button:disabled { opacity: .46; cursor: not-allowed; transform: none; }
.mobile-account { display: none; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(250px, .72fr); gap: 20px; margin-bottom: 30px; }
.hero-card {
  min-height: 224px; padding: clamp(24px, 4vw, 38px); border-radius: var(--radius-xl);
  background: var(--green); color: white; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.hero-card::after {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  right: -78px; top: -96px; border: 42px solid rgba(246,215,117,.24);
}
.hero-card::before {
  content: ""; position: absolute; width: 150px; height: 150px; right: 76px; bottom: -108px;
  border-radius: 50%; background: rgba(217,234,220,.14);
}
.hero-card h1 { max-width: 620px; position: relative; z-index: 1; }
.hero-card p { max-width: 560px; color: #c9ddd5; line-height: 1.75; position: relative; z-index: 1; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; position: relative; z-index: 1; margin-top: 24px; }
.hero-actions .button { background: white; color: var(--green); }
.hero-actions .button.secondary { background: rgba(255,255,255,.12); color: white; border: 1px solid rgba(255,255,255,.16); }

.progress-card {
  border-radius: var(--radius-xl); background: #f0e8cc; padding: 26px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; box-shadow: var(--shadow-small);
}
.progress-ring {
  --progress: 0; width: 126px; aspect-ratio: 1; border-radius: 50%; position: relative;
  display: grid; place-items: center; background: conic-gradient(var(--orange) calc(var(--progress) * 1%), rgba(255,255,255,.7) 0);
}
.progress-ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: #f0e8cc; }
.progress-value { position: relative; text-align: center; }
.progress-value strong { display: block; font-size: 31px; }
.progress-value small { color: var(--muted); }
.progress-card > strong { margin-top: 18px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 30px 0 15px; }
.section-head h2 { margin: 0; }
.section-count { min-width: 27px; height: 27px; padding: 0 8px; border-radius: 20px; display: grid; place-items: center; background: var(--mint); color: var(--green); font-size: 12px; font-weight: 800; }
.task-list { display: grid; gap: 13px; }
.task-card {
  border: 1px solid transparent; border-radius: var(--radius-lg); background: var(--surface); padding: 20px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 17px;
  box-shadow: var(--shadow-small); transition: .2s ease;
}
.task-card:hover { transform: translateY(-2px); border-color: #cbd9cc; box-shadow: var(--shadow); }
.subject-mark { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; font-weight: 850; font-size: 17px; }
.subject-语文 { background: #fce6db; color: #a34f32; }
.subject-数学 { background: #dfeee6; color: #27634f; }
.subject-英语 { background: #e4ebf8; color: #46689c; }
.subject-科学 { background: #ede7f7; color: #6f5b99; }
.subject-综合 { background: #f3ebcf; color: #806b22; }
.task-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 7px; }
.task-title-row h3 { margin: 0; }
.task-meta { display: flex; flex-wrap: wrap; gap: 11px; color: var(--muted); font-size: 13px; }
.task-meta span { display: inline-flex; align-items: center; gap: 5px; }
.pill { padding: 4px 8px; border-radius: 99px; background: var(--surface-soft); color: var(--green); font-size: 11px; font-weight: 750; }
.pill.warn { background: var(--orange-soft); color: #a25b26; }
.pill.error { background: var(--red-soft); color: var(--red); }
.task-action { display: flex; align-items: center; gap: 10px; }
.mini-progress { width: 58px; height: 5px; overflow: hidden; border-radius: 10px; background: var(--line); }
.mini-progress i { display: block; height: 100%; border-radius: inherit; background: var(--orange); }

.empty-state { background: var(--surface); border: 1px dashed #cbd3c5; border-radius: var(--radius-lg); padding: 36px; text-align: center; color: var(--muted); }
.empty-state .icon { width: 34px; height: 34px; color: var(--green); margin-bottom: 10px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 28px; }
.stat-card { background: white; border-radius: var(--radius-lg); padding: 21px; box-shadow: var(--shadow-small); }
.stat-top { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; }
.stat-icon { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-soft); color: var(--green); }
.stat-number { display: block; margin-top: 13px; font-size: 30px; letter-spacing: -.04em; }
.stat-foot { margin: 5px 0 0; color: var(--muted); font-size: 12px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .65fr); gap: 20px; }
.panel { background: white; border-radius: var(--radius-xl); padding: 25px; box-shadow: var(--shadow-small); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 20px; }
.panel-head h2, .panel-head p { margin: 0; }
.panel-head p { color: var(--muted); font-size: 13px; margin-top: 5px; }
.activity-list { display: grid; gap: 18px; }
.activity { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; }
.activity-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-soft); color: var(--green); }
.activity strong, .activity small { display: block; }
.activity small { color: var(--muted); margin-top: 4px; line-height: 1.5; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 750; }
.field small { color: var(--muted); }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); border-radius: 13px; background: #fbfcf8; color: var(--ink);
  padding: 11px 13px; transition: .16s ease;
}
.input, .select { min-height: 44px; }
.textarea { min-height: 138px; resize: vertical; line-height: 1.65; }
.input:hover, .textarea:hover, .select:hover { border-color: #aebcaf; }
.dropzone {
  border: 1.5px dashed #b9c8b8; border-radius: 17px; padding: 24px; background: #f8faf4;
  text-align: center; position: relative;
}
.dropzone input { position: absolute; inset: 0; opacity: 0; width: 100%; }
.dropzone strong, .dropzone small { display: block; }
.dropzone .icon { color: var(--green); width: 30px; height: 30px; margin-bottom: 8px; }
.dropzone small { color: var(--muted); margin-top: 5px; }
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.file-chip { padding: 7px 10px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-size: 12px; }
.file-chip button { margin-left: 7px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.field-note { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.success-dot { background: #e4f1e8; color: var(--green); }
.job-progress { padding: 15px; border-radius: 14px; background: #f4f2e8; border: 1px solid var(--line); }
.job-progress > div:first-child { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.job-progress p { margin: 9px 0 0; color: var(--red); font-size: 13px; }
.job-progress-track { height: 8px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: #dddaca; }
.job-progress-track i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s ease; }
.import-actions { display: flex; flex-direction: row; justify-content: flex-end; align-items: center; }

.review-list { display: grid; gap: 14px; }
.review-card { background: white; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.review-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.review-card h3 { margin: 5px 0 8px; }
.review-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.source-quote { border-left: 3px solid var(--yellow); margin: 17px 0; padding: 9px 0 9px 13px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.review-actions { display: flex; justify-content: flex-end; gap: 9px; }
.confidence { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--mint); color: var(--green); font-size: 11px; font-weight: 800; }
.confidence.low { background: var(--orange-soft); color: #a25b26; }

.library-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.resource-card { min-height: 186px; background: white; border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-small); display: flex; flex-direction: column; }
.resource-icon { width: 45px; height: 45px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); margin-bottom: 22px; }
.video-preview { position: relative; display: block; width: calc(100% + 40px); aspect-ratio: 16 / 9; margin: -20px -20px 18px; padding: 0; overflow: hidden; border: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; background: #101713; color: white; cursor: pointer; }
.video-preview video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; transition: transform .25s ease; }
.video-preview-overlay { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 16px; background: linear-gradient(180deg, rgba(5, 12, 10, .05), rgba(5, 12, 10, .45)); pointer-events: none; }
.video-preview-play { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--green); box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.video-preview-overlay small { padding: 4px 9px; border-radius: 999px; background: rgba(5, 12, 10, .55); font-weight: 700; }
.video-preview:hover video { transform: scale(1.025); }
.video-preview:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.resource-audio-preview { display: block; width: 100%; margin: 0 0 18px; }
.resource-card h3 { margin-bottom: 7px; }
.resource-card p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.resource-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.class-card-links { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 18px; }
.class-card-links span { padding: 5px 8px; border-radius: 999px; background: var(--surface-soft); color: var(--green); font-size: 11px; }
.class-link-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.class-link-grid div { background: white; border-radius: 14px; padding: 14px; text-align: center; }
.class-link-grid strong, .class-link-grid span { display: block; }
.class-link-grid strong { color: var(--green); font-size: 24px; }
.class-link-grid span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.class-association-note { padding: 14px; border-radius: 14px; background: white; }
.class-association-note span, .class-association-note small { display: block; }
.class-association-note .button { justify-self: start; margin-top: 10px; }
.organization-strip, .student-list { display: grid; gap: 12px; }
.organization-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.organization-item, .student-row { display: flex; align-items: center; gap: 14px; background: white; border-radius: var(--radius-lg); padding: 16px 18px; box-shadow: var(--shadow-small); }
.organization-item > div, .student-row > div { min-width: 0; flex: 1; }
.organization-item h3 { margin: 3px 0; }
.organization-item small, .student-row small { display: block; color: var(--muted); margin-top: 4px; }
.student-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.student-row .avatar { flex: 0 0 auto; }
.avatar.disabled { background: #eceee9; color: #8a938f; }
.modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.taxonomy { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 20px; }
.taxonomy span { padding: 7px 11px; border-radius: 99px; background: var(--surface-soft); color: var(--green); font-size: 12px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(12,27,22,.54); backdrop-filter: blur(5px); z-index: 80; padding: 24px; display: grid; place-items: center; }
.modal {
  width: min(760px, 100%); max-height: calc(100vh - 48px); overflow: auto; border-radius: 26px;
  background: var(--paper); box-shadow: 0 30px 90px rgba(0,0,0,.25);
}
.modal.wide { width: min(1050px, 100%); }
.modal-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; background: rgba(246,247,239,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.modal-head h2 { margin: 0; }
.modal-body { padding: 25px; }
.task-detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: 22px; }
.detail-summary { display: flex; gap: 9px; flex-wrap: wrap; }
.detail-block { background: white; border-radius: var(--radius-lg); padding: 20px; margin-top: 14px; }
.detail-block h3 { display: flex; align-items: center; gap: 8px; }
.material-list { display: flex; flex-wrap: wrap; gap: 8px; }
.material { padding: 9px 12px; border-radius: 11px; background: var(--orange-soft); color: #8e511f; font-size: 13px; }
.steps { display: grid; gap: 10px; }
.step-button {
  width: 100%; min-height: 54px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 13px;
  display: flex; align-items: center; gap: 12px; text-align: left; background: white;
}
.step-check { width: 27px; height: 27px; flex: 0 0 auto; border: 2px solid #acbbae; border-radius: 9px; display: grid; place-items: center; color: transparent; }
.step-button.done { color: var(--muted); text-decoration: line-through; background: #f6f8f3; }
.step-button.done .step-check { color: white; border-color: var(--green); background: var(--green); }
.hint-box { padding: 16px; border-radius: 14px; background: var(--blue-soft); color: #385d88; line-height: 1.65; }
.detail-footer { position: sticky; bottom: 0; padding: 17px 24px calc(17px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: rgba(246,247,239,.95); border-top: 1px solid var(--line); }
.detail-footer .button.primary { flex: 1; }
.upload-evidence { position: relative; overflow: hidden; }
.upload-evidence input { position: absolute; inset: 0; opacity: 0; }

.review-layout { display: grid; grid-template-columns: .88fr 1.12fr; gap: 16px; }
.source-pane { padding: 18px; border-radius: var(--radius-lg); background: #ede9db; align-self: start; position: sticky; top: 80px; }
.source-pane p { white-space: pre-wrap; line-height: 1.75; font-size: 14px; }
.evidence-list { display: grid; gap: 7px; margin: 12px 0; }
.evidence-list small { display: grid; gap: 3px; padding: 9px; border-radius: 10px; background: rgba(255,255,255,.58); line-height: 1.45; }
.analysis-grid, .language-list { display: grid; gap: 12px; }
.analysis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analysis-card, .language-card { padding: 18px; border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-small); }
.analysis-card h3 { margin: 10px 0 7px; }
.analysis-card > p { color: var(--muted); line-height: 1.65; white-space: pre-wrap; }
.language-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.language-pair > div { padding: 14px; border-radius: 14px; background: var(--surface-soft); }
.language-pair small { color: var(--orange); font-weight: 800; letter-spacing: .08em; }
.language-pair p { margin: 7px 0 0; line-height: 1.7; white-space: pre-wrap; }
.transcript-text { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--surface-soft); line-height: 1.75; white-space: pre-wrap; }
.media-player { display: block; width: 100%; max-height: 62vh; border-radius: var(--radius-lg); background: #101713; }
.audio-player { display: block; width: 100%; margin-top: 10px; }
.media-modal summary { cursor: pointer; font-weight: 750; }
.resource-open { min-height: 34px; padding: 6px 10px; text-decoration: none; }
.edit-pane { background: white; padding: 20px; border-radius: var(--radius-lg); }
.missing-alert { display: flex; gap: 9px; padding: 12px; border-radius: 12px; background: var(--red-soft); color: var(--red); margin-bottom: 15px; font-size: 13px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 120; padding: 11px 16px; border-radius: 12px; background: #172420; color: white; box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, 12px); transition: .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-nav { display: none; }
.mobile-child-switch { display: none; }

.auth-page { min-height: 100vh; padding: clamp(20px, 6vw, 72px); display: grid; place-items: center; background: radial-gradient(circle at 20% 15%, rgba(246,215,117,.34), transparent 25rem), radial-gradient(circle at 85% 80%, rgba(77,121,173,.16), transparent 30rem), #eef2e7; }
.auth-card { width: min(960px, 100%); min-height: 590px; display: grid; grid-template-columns: 1.05fr .95fr; grid-template-areas: "brand form" "copy form"; gap: 24px 54px; padding: clamp(30px, 6vw, 68px); border-radius: 34px; background: rgba(255,255,255,.9); box-shadow: 0 30px 90px rgba(30,53,43,.14); backdrop-filter: blur(14px); }
.auth-brand { grid-area: brand; display: flex; align-items: center; align-self: start; gap: 14px; }
.auth-brand img { width: 72px; height: 72px; object-fit: contain; }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand strong { font-size: 24px; }
.auth-brand small { margin-top: 4px; color: var(--muted); letter-spacing: .13em; }
.auth-copy { grid-area: copy; align-self: center; }
.auth-copy h1 { margin-top: 10px; }
.auth-copy p { color: var(--muted); line-height: 1.8; }
.auth-form { grid-area: form; align-self: center; display: grid; gap: 17px; padding: 30px; border-radius: 24px; background: var(--paper); border: 1px solid var(--line); }
.auth-submit { width: 100%; }
.remember-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.auth-error { padding: 11px 13px; border-radius: 11px; color: var(--red); background: var(--red-soft); font-size: 13px; }
.auth-help { color: var(--muted); text-align: center; }
.auth-loading { min-height: 240px; grid-template-columns: 1fr; grid-template-areas: none; place-items: center; text-align: center; }
.auth-loading img { width: 92px; height: 92px; }
.password-card { grid-template-columns: .9fr 1.1fr; }
.account-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.account-toolbar .input { width: min(340px, 100%); }
.account-toolbar .select { width: min(220px, 100%); }
.account-list { display: grid; gap: 12px; }
.account-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow-small); }
.account-card-main { display: flex; align-items: center; gap: 15px; min-width: 0; }
.account-card-main h3 { margin: 8px 0 4px; }
.account-card-main p { margin: 0; line-height: 1.6; }
.account-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.student-checks { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; max-height: 220px; overflow: auto; }
.student-checks label { padding: 10px; border-radius: 11px; background: var(--surface-soft); }
.credential-value { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.credential-value code { flex: 1; padding: 15px; border-radius: 12px; background: #172420; color: white; font-size: 18px; letter-spacing: .08em; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  :root { --sidebar: 210px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .library-grid { grid-template-columns: repeat(2, 1fr); }
  .organization-strip { grid-template-columns: repeat(2, 1fr); }
  .workspace-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .auth-page { padding: 16px; align-items: start; }
  .auth-card, .password-card { width: calc(100vw - 32px); min-width: 0; min-height: auto; grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "copy" "form"; gap: 22px; padding: 24px 22px 28px; border-radius: 24px; overflow: hidden; }
  .auth-brand, .auth-copy, .auth-form { min-width: 0; }
  .auth-form .input { min-width: 0; width: 100%; }
  .auth-brand img { width: 58px; height: 58px; }
  .auth-brand strong { font-size: 21px; }
  .auth-copy h1 { font-size: 30px; }
  .auth-copy p { font-size: 14px; }
  .auth-form { padding: 20px; }
  .account-toolbar { align-items: stretch; flex-direction: column; }
  .account-toolbar .input, .account-toolbar .select { width: 100%; }
  .account-card { align-items: stretch; flex-direction: column; }
  .account-card-actions { justify-content: stretch; }
  .account-card-actions .button { flex: 1; }
  .student-checks { grid-template-columns: 1fr; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { grid-column: auto; }
  .topbar { height: 64px; padding: 0 16px; }
  .date-chip { display: none; }
  .mobile-child-switch { display: block; max-width: 112px; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 10px; padding: 7px 8px; }
  .mobile-account { display: inline-flex; min-height: 38px; padding: 0 11px; }
  .content { padding: 24px 16px calc(92px + env(safe-area-inset-bottom)); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { min-height: 220px; }
  .progress-card { flex-direction: row; justify-content: flex-start; gap: 22px; }
  .progress-ring { width: 94px; }
  .progress-value strong { font-size: 25px; }
  .progress-card > strong { margin: 0; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .heading-actions { width: 100%; justify-content: flex-start; }
  .task-card { grid-template-columns: auto minmax(0, 1fr); padding: 16px; }
  .task-action { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 13px; }
  .stats-grid, .library-grid, .form-grid { grid-template-columns: 1fr; }
  .organization-strip, .student-list { grid-template-columns: 1fr; }
  .analysis-grid, .language-pair { grid-template-columns: 1fr; }
  .class-link-grid { grid-template-columns: repeat(2, 1fr); }
  .field.full { grid-column: auto; }
  .review-layout { grid-template-columns: 1fr; }
  .credential-value { align-items: stretch; flex-direction: column; }
  .source-pane { position: static; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal, .modal.wide { width: 100%; max-height: 94vh; border-radius: 24px 24px 0 0; }
  .modal-body { padding: 18px 16px; }
  .modal-head { padding: 17px 16px; }
  .detail-footer { padding-left: 16px; padding-right: 16px; }
  .mobile-nav {
    position: fixed; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; inset: auto 10px calc(10px + env(safe-area-inset-bottom)) 10px;
    z-index: 45; background: #173f34; color: white; border-radius: 18px; padding: 7px; box-shadow: 0 16px 40px rgba(23,63,52,.28);
  }
  .mobile-nav .nav-button { min-height: 52px; justify-content: center; flex-direction: column; gap: 2px; padding: 3px; font-size: 10px; }
  .mobile-nav .nav-button.active { background: #f4f0d9; color: var(--green); }
  .mobile-nav .icon { width: 19px; height: 19px; }
}

@media (max-width: 430px) {
  h1 { font-size: 29px; }
  .hero-card { padding: 24px 21px; }
  .hero-actions .button { width: 100%; }
  .subject-mark { width: 46px; height: 46px; border-radius: 14px; }
  .task-meta span:nth-child(n+3) { display: none; }
  .review-card-top { flex-direction: column; }
  .review-actions { flex-wrap: wrap; }
  .review-actions .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
