:root {
  color-scheme: light;
  --ink: #172b2a;
  --ink-soft: #506361;
  --paper: #f8f4e9;
  --paper-deep: #efe8d8;
  --white: #fffefa;
  --line: #d9d2c3;
  --line-strong: #bdb5a5;
  --pine: #174f4a;
  --pine-strong: #0f3f3b;
  --pine-soft: #dceae4;
  --clay: #a64f3c;
  --clay-soft: #f2dfd7;
  --gold: #b27a2c;
  --gold-soft: #f5e8c9;
  --blue: #315b78;
  --blue-soft: #e1eaf0;
  --red: #a13d36;
  --red-soft: #f7e3e0;
  --shadow-sm: 0 2px 10px rgb(23 43 42 / 7%);
  --shadow-md: 0 18px 50px rgb(23 43 42 / 12%);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --sidebar-width: 260px;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --font-serif: "Songti SC", "STSong", "SimSun", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid #df9b45;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--pine-strong);
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: end center;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 7px;
  border: 1px solid rgb(23 79 74 / 25%);
  border-radius: 50% 50% 47% 53%;
  transform: rotate(-3deg);
}

.brand-mark span {
  width: 4px;
  border-radius: 5px 5px 0 0;
  background: var(--pine);
  transform-origin: bottom;
}

.brand-mark span:nth-child(1) {
  height: 9px;
  transform: rotate(-16deg);
}

.brand-mark span:nth-child(2) {
  height: 17px;
}

.brand-mark span:nth-child(3) {
  height: 12px;
  transform: rotate(16deg);
}

.brand-mark--light {
  border-color: rgb(255 254 250 / 45%);
}

.brand-mark--light span {
  background: var(--white);
}

.boot-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  place-items: center;
  gap: 14px;
  color: var(--ink-soft);
  background:
    linear-gradient(rgb(23 79 74 / 4%) 1px, transparent 1px) 0 0 / 100% 32px,
    var(--paper);
}

.boot-screen .brand-mark {
  animation: breathe 1.4s ease-in-out infinite;
}

.boot-screen p {
  margin: 0;
  font-size: 0.9rem;
}

@keyframes breathe {
  50% {
    transform: rotate(-3deg) translateY(-5px);
  }
}

/* Login */
.login-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 0.9fr) minmax(560px, 1.25fr);
}

.login-intro {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(32px, 5vw, 72px);
  color: var(--white);
  background: var(--pine);
}

.login-intro::before {
  position: absolute;
  right: -13%;
  bottom: 7%;
  width: min(32vw, 420px);
  aspect-ratio: 1;
  border: 1px solid rgb(255 254 250 / 16%);
  border-radius: 48% 52% 45% 55%;
  content: "";
  transform: rotate(18deg);
}

.login-intro::after {
  position: absolute;
  right: 8%;
  bottom: 16%;
  width: min(15vw, 190px);
  aspect-ratio: 1;
  border: 1px solid rgb(255 254 250 / 10%);
  border-radius: 55% 45% 58% 42%;
  content: "";
}

.school-sign {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 680;
  letter-spacing: 0.04em;
}

.intro-copy {
  position: relative;
  z-index: 1;
  max-width: 580px;
  margin: clamp(60px, 12vh, 150px) 0;
}

.intro-copy .eyebrow {
  color: #f0c882;
}

.intro-copy h1 {
  margin: 0 0 25px;
  font-family: var(--font-serif);
  font-size: clamp(2.55rem, 5.4vw, 5.4rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.intro-copy > p:last-child {
  max-width: 470px;
  margin: 0;
  color: rgb(255 254 250 / 78%);
  font-size: 1.04rem;
}

.intro-note {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 430px;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid rgb(255 254 250 / 24%);
}

.intro-note > span {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1;
}

.intro-note p {
  margin: 0;
  color: rgb(255 254 250 / 72%);
  font-size: 0.88rem;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  align-content: center;
  justify-items: center;
  gap: 30px;
  padding: clamp(30px, 6vw, 80px);
  background:
    linear-gradient(90deg, transparent 39px, rgb(166 79 60 / 11%) 40px, transparent 41px),
    linear-gradient(rgb(23 79 74 / 5%) 1px, transparent 1px) 0 0 / 100% 36px,
    var(--paper);
}

.login-card,
.demo-accounts {
  width: min(100%, 590px);
}

.login-card {
  padding: clamp(25px, 4.5vw, 46px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgb(255 254 250 / 92%);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
}

.login-heading h2 {
  margin: 0 0 7px;
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 650;
}

.login-heading > p:last-child {
  margin: 0;
  color: var(--ink-soft);
}

.login-tabs {
  display: grid;
  grid-template-columns: 1.65fr 0.65fr;
  margin: 30px 0 25px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-deep);
}

.login-tab {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 0.89rem;
  font-weight: 650;
}

.login-tab.is-active {
  color: var(--pine-strong);
  background: var(--white);
  box-shadow: 0 1px 5px rgb(23 43 42 / 10%);
}

.login-form {
  display: grid;
  gap: 17px;
}

.field {
  display: grid;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--white);
  font-weight: 450;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--pine);
  box-shadow: 0 0 0 3px rgb(23 79 74 / 13%);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8f9894;
}

.field-hint {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 450;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 68px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 44px;
  padding: 4px 6px;
  border: 0;
  color: var(--pine);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 650;
  transform: translateY(-50%);
}

.primary-button,
.secondary-button,
.quiet-button,
.danger-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 17px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 680;
  line-height: 1.2;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.primary-button {
  border: 1px solid var(--pine);
  color: var(--white);
  background: var(--pine);
}

.primary-button:hover {
  border-color: var(--pine-strong);
  background: var(--pine-strong);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  color: var(--pine-strong);
  background: var(--white);
}

.secondary-button:hover,
.quiet-button:hover {
  border-color: var(--pine);
  background: var(--pine-soft);
}

.quiet-button {
  border: 1px solid transparent;
  color: var(--pine);
  background: transparent;
}

.danger-button {
  border: 1px solid var(--red);
  color: var(--white);
  background: var(--red);
}

.login-submit {
  justify-content: space-between;
  margin-top: 5px;
  padding-inline: 18px;
}

.login-help {
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  text-align: center;
}

.inline-alert {
  margin: -8px 0 18px;
  padding: 11px 13px;
  border: 1px solid #d5aaa4;
  border-radius: var(--radius-sm);
  color: #702c27;
  background: var(--red-soft);
  font-size: 0.86rem;
}

.inline-alert::before {
  margin-right: 7px;
  content: "未完成：";
  font-weight: 750;
}

.demo-accounts {
  padding-inline: 6px;
}

.demo-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.demo-heading h3 {
  margin: 0;
  font-size: 0.93rem;
}

.demo-heading > span,
.demo-password {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.demo-account {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 13px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: left;
  background: rgb(255 254 250 / 70%);
}

.demo-account:hover {
  border-color: var(--pine);
  background: var(--white);
}

.demo-account strong,
.demo-account small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-role {
  color: var(--clay);
  font-size: 0.7rem;
  font-weight: 750;
}

.demo-account strong {
  margin-top: 4px;
  font-size: 0.88rem;
}

.demo-account small {
  color: var(--ink-soft);
  font-size: 0.68rem;
}

.fill-label {
  margin-top: 8px;
  color: var(--pine);
  font-size: 0.72rem;
  font-weight: 680;
}

.demo-password {
  margin: 10px 0 0;
  text-align: right;
}

.demo-password code {
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}

/* Shell */
.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar-width);
  min-height: 100vh;
  flex-direction: column;
  padding: 24px 18px 18px;
  color: var(--white);
  background: var(--pine-strong);
}

.sidebar::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 86px;
  height: 190px;
  border: solid rgb(255 255 255 / 7%);
  border-width: 1px 0 0 1px;
  border-radius: 90% 0 0;
  content: "";
  pointer-events: none;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 7px 25px;
  border-bottom: 1px solid rgb(255 255 255 / 14%);
}

.sidebar-brand > div:last-child {
  display: grid;
}

.sidebar-brand strong {
  font-family: var(--font-serif);
  font-size: 1.3rem;
}

.sidebar-brand span {
  color: rgb(255 254 250 / 63%);
  font-size: 0.7rem;
}

.role-nav {
  display: grid;
  gap: 6px;
  margin-top: 25px;
}

.nav-label {
  margin: 0 10px 5px;
  color: rgb(255 254 250 / 43%);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.role-nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: rgb(255 254 250 / 72%);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

.role-nav a:hover,
.role-nav a.is-active {
  color: var(--white);
  background: rgb(255 255 255 / 11%);
}

.role-nav svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sidebar-foot {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 15px;
  margin-top: auto;
  padding: 18px 7px 0;
  border-top: 1px solid rgb(255 255 255 / 14%);
}

.school-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 6px;
  border: 2px solid rgb(255 255 255 / 60%);
  border-radius: 50%;
  background: #80b99a;
}

.school-status > div {
  display: grid;
}

.school-status strong {
  font-size: 0.78rem;
}

.school-status span {
  color: rgb(255 254 250 / 55%);
  font-size: 0.7rem;
}

.text-button {
  width: fit-content;
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-size: 0.8rem;
}

.text-button--light {
  color: rgb(255 254 250 / 66%);
}

.workspace {
  min-width: 0;
  grid-column: 2;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 16px;
  padding: 11px clamp(20px, 4vw, 50px);
  border-bottom: 1px solid var(--line);
  background: rgb(248 244 233 / 92%);
  backdrop-filter: blur(14px);
}

.menu-button {
  display: none;
}

.topbar-context {
  display: grid;
}

.topbar-context span {
  color: var(--ink-soft);
  font-size: 0.73rem;
}

.topbar-context strong {
  font-family: var(--font-serif);
  font-size: 1rem;
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-left: auto;
}

.account-text {
  display: grid;
  justify-items: end;
}

.account-text strong {
  font-size: 0.84rem;
}

.account-text span {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.account-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--pine-strong);
  background: var(--gold-soft);
  font-family: var(--font-serif);
  font-weight: 700;
}

.main-content {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: clamp(25px, 4vw, 48px);
}

.page-loading,
.page-error {
  display: grid;
  min-height: 55vh;
  place-content: center;
  justify-items: center;
  gap: 13px;
  text-align: center;
}

.page-loading p,
.page-error p {
  max-width: 420px;
  margin: 0;
  color: var(--ink-soft);
}

.page-error h2 {
  margin: 0;
  font-family: var(--font-serif);
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--pine-soft);
  border-top-color: var(--pine);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Dashboard shared */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.page-head h1 {
  margin: 2px 0 4px;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.page-head p {
  margin: 0;
  color: var(--ink-soft);
}

.page-date {
  flex: 0 0 auto;
  padding-bottom: 6px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 0.9rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 24px;
}

.metric-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.metric-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--pine);
  content: "";
}

.metric-card[data-tone="clay"]::before {
  background: var(--clay);
}

.metric-card[data-tone="gold"]::before {
  background: var(--gold);
}

.metric-card[data-tone="blue"]::before {
  background: var(--blue);
}

.metric-card span {
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.metric-card strong {
  display: block;
  overflow: hidden;
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: 1.9rem;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-card small {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.85fr);
  gap: 20px;
  align-items: start;
}

.dashboard-stack {
  display: grid;
  gap: 20px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 19px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.panel-head p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.panel-body {
  padding: 18px 19px;
}

.panel-body--flush {
  padding: 0;
}

.list {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  padding: 15px 19px;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item-main {
  min-width: 0;
  flex: 1;
}

.list-item-main strong {
  display: block;
  font-size: 0.9rem;
}

.list-item-main p,
.list-item-main span {
  display: block;
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-item-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.compact-button {
  min-height: 44px;
  padding: 9px 12px;
  font-size: 0.82rem;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 680;
  line-height: 1.1;
  white-space: nowrap;
}

.badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.badge--green {
  border-color: #bad4c8;
  color: var(--pine);
  background: var(--pine-soft);
}

.badge--gold {
  border-color: #e0c994;
  color: #77531f;
  background: var(--gold-soft);
}

.badge--red {
  border-color: #e4bbb6;
  color: #873832;
  background: var(--red-soft);
}

.badge--blue {
  border-color: #bdced9;
  color: var(--blue);
  background: var(--blue-soft);
}

.empty-state {
  display: grid;
  min-height: 190px;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 25px;
  text-align: center;
}

.empty-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--pine);
  background: var(--paper);
  font-family: var(--font-serif);
  font-size: 1.2rem;
}

.empty-state strong {
  font-family: var(--font-serif);
}

.empty-state p {
  max-width: 310px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.hero-task {
  position: relative;
  overflow: hidden;
  padding: clamp(23px, 4vw, 38px);
  border-radius: var(--radius-lg);
  color: var(--white);
  background: var(--pine);
  box-shadow: var(--shadow-md);
}

.hero-task::after {
  position: absolute;
  right: -50px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 50%;
  content: "";
}

.hero-task .eyebrow {
  color: #f0c882;
}

.hero-task h2 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 5px 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.2;
}

.hero-task p {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0;
  color: rgb(255 255 255 / 73%);
}

.hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 18px 0 24px;
  color: rgb(255 255 255 / 78%);
  font-size: 0.82rem;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-actions .primary-button {
  border-color: var(--white);
  color: var(--pine-strong);
  background: var(--white);
}

.hero-actions .primary-button:hover {
  background: var(--gold-soft);
}

.hero-actions .quiet-button {
  color: var(--white);
}

.hero-actions .quiet-button:hover {
  border-color: rgb(255 255 255 / 30%);
  background: rgb(255 255 255 / 9%);
}

.progress-list {
  display: grid;
  gap: 18px;
}

.progress-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--paper-deep);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--pine);
}

.progress-row small {
  color: var(--ink-soft);
  text-align: right;
}

.note-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--clay);
  border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
  background: var(--paper);
}

.note-card blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.7;
}

.note-card footer {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 0.74rem;
}

.child-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
}

.child-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--clay);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.child-card div {
  display: grid;
}

.child-card span {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.notice-item.is-read {
  opacity: 0.69;
}

.notice-item.is-read .list-item-main strong::after {
  margin-left: 7px;
  color: var(--pine);
  content: "已读";
  font-size: 0.7rem;
  font-weight: 650;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.data-table th {
  color: var(--ink-soft);
  background: #fbfaf5;
  font-size: 0.72rem;
  font-weight: 680;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.person-cell {
  display: grid;
}

.person-cell strong {
  font-size: 0.83rem;
}

.person-cell span {
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.audit-list {
  position: relative;
  display: grid;
  gap: 16px;
}

.audit-item {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 19px;
}

.audit-item::before {
  position: absolute;
  top: 7px;
  left: 1px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--pine);
  box-shadow: 0 0 0 1px var(--pine);
  content: "";
}

.audit-item::after {
  position: absolute;
  top: 18px;
  bottom: -18px;
  left: 5px;
  width: 1px;
  background: var(--line);
  content: "";
}

.audit-item:last-child::after {
  display: none;
}

.audit-item strong {
  font-size: 0.8rem;
}

.audit-item span,
.audit-item time {
  color: var(--ink-soft);
  font-size: 0.71rem;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-row input {
  width: min(240px, 38vw);
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--white);
  font-size: 0.78rem;
}

/* Dialog and toast */
.action-dialog {
  width: min(92vw, 570px);
  max-height: min(86vh, 740px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 28px 90px rgb(13 40 38 / 30%);
}

.action-dialog::backdrop {
  background: rgb(13 40 38 / 58%);
  backdrop-filter: blur(3px);
}

.dialog-head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.dialog-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
}

.dialog-close {
  font-size: 1.6rem;
  line-height: 1;
}

.dialog-form {
  display: grid;
  gap: 17px;
  padding: 22px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 5px;
}

.form-error {
  padding: 10px 12px;
  border: 1px solid #d5aaa4;
  border-radius: var(--radius-sm);
  color: #702c27;
  background: var(--red-soft);
  font-size: 0.8rem;
}

.toast-region {
  position: fixed;
  z-index: 100;
  top: 20px;
  right: 20px;
  display: grid;
  width: min(380px, calc(100vw - 40px));
  gap: 10px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pine);
  border-radius: 10px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  animation: toast-in 180ms ease-out;
}

.toast--error {
  border-left-color: var(--red);
}

.toast strong {
  display: block;
  font-size: 0.85rem;
}

.toast span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.toast-mark {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: var(--white) !important;
  background: var(--pine);
  font-size: 0.72rem !important;
  font-weight: 800;
}

.toast--error .toast-mark {
  background: var(--red);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.noscript {
  position: fixed;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  left: 20px;
  padding: 15px;
  border: 1px solid var(--red);
  border-radius: var(--radius-sm);
  color: #702c27;
  background: var(--red-soft);
  text-align: center;
}

/* Tablet */
@media (max-width: 1080px) {
  .login-screen {
    grid-template-columns: minmax(280px, 0.75fr) minmax(500px, 1.25fr);
  }

  .intro-copy h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
  }

  .login-panel {
    padding: 35px;
  }

  .demo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-intro {
    min-height: auto;
    padding: 27px 30px 32px;
  }

  .intro-copy {
    margin: 65px 0 42px;
  }

  .intro-copy h1 {
    font-size: clamp(2.35rem, 8vw, 4rem);
  }

  .intro-note {
    display: none;
  }

  .login-panel {
    min-height: auto;
    padding: 45px 30px 65px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: min(310px, 84vw);
    transform: translateX(-105%);
    transition: transform 190ms ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    z-index: 35;
    inset: 0;
    display: block;
    background: rgb(13 40 38 / 46%);
  }

  .workspace {
    grid-column: 1;
  }

  .menu-button {
    display: inline-grid;
    align-content: center;
    gap: 4px;
  }

  .menu-button span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
  }

  .topbar {
    padding-inline: 18px;
  }

  .main-content {
    padding: 27px 20px 45px;
  }
}

/* Phone */
@media (max-width: 560px) {
  .login-intro {
    padding: 23px 21px 27px;
  }

  .intro-copy {
    margin: 50px 0 18px;
  }

  .intro-copy h1 {
    margin-bottom: 18px;
    font-size: 2.25rem;
  }

  .login-panel {
    padding: 28px 16px 50px;
    background:
      linear-gradient(rgb(23 79 74 / 5%) 1px, transparent 1px) 0 0 / 100% 36px,
      var(--paper);
  }

  .login-card {
    padding: 24px 18px;
    border-radius: 17px;
  }

  .login-tabs {
    grid-template-columns: 1.6fr 0.6fr;
  }

  .login-tab {
    padding-inline: 7px;
    font-size: 0.78rem;
  }

  .demo-heading {
    display: grid;
  }

  .demo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .demo-password {
    text-align: left;
  }

  .account-text {
    display: none;
  }

  .topbar-context span {
    display: none;
  }

  .page-head {
    display: block;
  }

  .page-date {
    margin-top: 8px;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .metric-card {
    padding: 16px;
  }

  .metric-card strong {
    font-size: 1.55rem;
  }

  .panel-head,
  .list-item {
    padding-inline: 15px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .list-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .list-item-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .hero-task {
    padding: 23px 20px;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions > * {
    width: 100%;
  }

  .progress-row {
    grid-template-columns: 56px minmax(0, 1fr) 45px;
  }

  .filter-row input {
    width: 42vw;
  }

  .table-wrap {
    overflow: visible;
    padding: 0 15px 15px;
  }

  .data-table,
  .data-table tbody {
    display: block;
    width: 100%;
  }

  .data-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .data-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px 18px;
    margin-top: 10px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
  }

  .data-table td,
  .data-table tr:last-child td {
    display: grid;
    gap: 3px;
    padding: 0;
    border: 0;
    white-space: normal;
  }

  .data-table td:first-child {
    grid-column: 1 / -1;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--line);
  }

  .data-table td::before {
    color: var(--ink-soft);
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 680;
  }

  .dialog-actions {
    display: grid;
  }

  .dialog-actions button {
    width: 100%;
  }

  .toast-region {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .sidebar,
  .topbar,
  .page-head .primary-button,
  .list-item-actions {
    display: none !important;
  }

  .app-shell,
  .workspace {
    display: block;
  }

  .main-content {
    padding: 0;
  }
}
