/* =========================================================
   班级作业窗 · 设计系统
   ========================================================= */

:root {
  --paper: #f5f1e7;
  --paper-deep: #ebe4d5;
  --surface: #fffdf8;
  --surface-soft: #faf7ef;
  --ink: #17332b;
  --ink-2: #29473e;
  --ink-soft: #53665f;
  --muted: #84928c;
  --line: rgba(23, 51, 43, 0.13);
  --line-soft: rgba(23, 51, 43, 0.075);
  --jade: #2f6b57;
  --jade-deep: #174a3b;
  --jade-dark: #0f382d;
  --jade-soft: #dfeae3;
  --jade-pale: #edf4ef;
  --coral: #d5674f;
  --coral-deep: #b94d38;
  --coral-soft: #f7e3dc;
  --amber: #bf8d2e;
  --amber-soft: #f6ebd2;
  --gray-status: #e7e6df;
  --shadow-sm: 0 2px 10px rgba(18, 48, 39, 0.045);
  --shadow-md: 0 18px 50px -24px rgba(18, 48, 39, 0.28);
  --shadow-lg: 0 36px 90px -38px rgba(15, 56, 45, 0.38);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --font-sans: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 8% -6%, rgba(255, 253, 248, 0.95), transparent 62%),
    radial-gradient(900px 600px at 94% 14%, rgba(222, 234, 225, 0.72), transparent 58%),
    var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(23, 51, 43, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 51, 43, 0.028) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

::selection {
  color: var(--surface);
  background: var(--jade);
}

img,
svg {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.hidden,
[hidden] {
  display: none !important;
}

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

.icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

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

.muted {
  color: var(--muted);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--jade);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
}

/* -----------------------------
   Buttons & forms
   ----------------------------- */

.btn {
  --btn-bg: var(--jade);
  --btn-fg: #fffdf8;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    background 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -12px rgba(23, 74, 59, 0.56);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--jade) 0%, var(--jade-deep) 100%);
  box-shadow: 0 12px 24px -14px rgba(23, 74, 59, 0.75);
}

.btn-dark {
  background: var(--ink);
}

.btn-secondary {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-border: var(--line);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: rgba(47, 107, 87, 0.35);
  background: #fff;
}

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink-soft);
  --btn-border: transparent;
  min-height: 38px;
  padding: 0 12px;
}

.btn-ghost:hover {
  background: rgba(23, 51, 43, 0.055);
  box-shadow: none;
}

.btn-danger {
  --btn-bg: var(--coral-soft);
  --btn-fg: var(--coral-deep);
  --btn-border: rgba(185, 77, 56, 0.14);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: var(--jade);
  font-size: 13px;
  font-weight: 700;
  padding: 0;
}

.btn-link:hover {
  color: var(--jade-deep);
}

.btn .spinner {
  display: none;
}

.btn.is-loading .spinner {
  display: block;
}

.btn.is-loading .btn-label {
  opacity: 0.85;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field + .field {
  margin-top: 16px;
}

.field label,
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.field-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap > .icon {
  position: absolute;
  left: 15px;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrap input {
  padding-left: 44px;
}

.input-wrap input[type="password"],
.input-wrap input.has-toggle {
  padding-right: 46px;
}

.input,
.input-wrap input,
.select,
.textarea {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 15px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
}

.input::placeholder,
.input-wrap input::placeholder {
  color: #a7b0ab;
}

.input:focus,
.input-wrap input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(47, 107, 87, 0.6);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 107, 87, 0.1);
}

.input-wrap:focus-within > .icon {
  color: var(--jade);
}

.input-wrap .input-action {
  position: absolute;
  right: 6px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

.input-wrap .input-action:hover {
  color: var(--ink);
  background: rgba(23, 51, 43, 0.05);
}

.textarea {
  min-height: 100px;
  padding: 12px 15px;
  resize: vertical;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2353665f' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid .field + .field {
  margin-top: 0;
}

.form-grid .field-full {
  grid-column: 1 / -1;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.checkbox input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--jade);
  flex: 0 0 auto;
}

.form-error,
.form-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

.form-error {
  color: var(--coral-deep);
  background: var(--coral-soft);
}

.form-note {
  color: var(--ink-soft);
  background: var(--surface-soft);
  border: 1px solid var(--line-soft);
}

.form-note .icon,
.form-error .icon {
  margin-top: 1px;
}

/* -----------------------------
   Public header
   ----------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 26px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.brand-seal {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(255, 253, 248, 0.11);
  border-radius: 15px;
  background: var(--ink);
  color: #f3e8cd;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow:
    inset 0 0 0 4px rgba(255, 253, 248, 0.055),
    0 10px 24px -15px rgba(15, 56, 45, 0.8);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.brand-text strong {
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-text small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  backdrop-filter: blur(12px);
}

.site-nav a {
  padding: 8px 15px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
  transition: 0.2s;
}

.site-nav a:hover {
  color: var(--ink);
  background: rgba(23, 51, 43, 0.05);
}

.site-nav a.active {
  color: var(--surface);
  background: var(--ink);
}

/* -----------------------------
   Parent landing
   ----------------------------- */

.portal-main {
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  gap: clamp(36px, 6vw, 86px);
  align-items: center;
  min-height: calc(100vh - 220px);
  padding: 42px 0 72px;
}

.hero-copy {
  max-width: 610px;
  animation: fadeUp 0.8s var(--ease) both;
}

.hero h1 {
  margin: 22px 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(40px, 4.5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1.18;
}

.hero h1 em {
  position: relative;
  color: var(--jade);
  font-style: normal;
  white-space: nowrap;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: 5px;
  left: -3px;
  z-index: -1;
  height: 13px;
  border-radius: 2px;
  background: rgba(213, 177, 91, 0.3);
  transform: rotate(-1deg);
}

.hero-lead {
  max-width: 510px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.9;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 700;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.hero-feature .feature-dot {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--jade-soft);
  color: var(--jade);
}

.hero-feature .feature-dot .icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.6;
}

.hero-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
}

.hero-date .line {
  width: 32px;
  height: 1px;
  background: var(--line);
}

.query-stage {
  position: relative;
  min-height: 565px;
  animation: fadeUp 0.8s 0.12s var(--ease) both;
}

.deco-card {
  position: absolute;
  top: 5px;
  right: -4px;
  display: flex;
  flex-direction: column;
  width: 82%;
  min-height: 420px;
  padding: 34px 32px 28px;
  overflow: hidden;
  border-radius: 30px;
  background:
    radial-gradient(120% 100% at 100% 0, rgba(255, 255, 255, 0.09), transparent 50%),
    linear-gradient(145deg, #2c6653, #113b2f);
  color: #f4efdf;
  transform: rotate(3.2deg);
  box-shadow: var(--shadow-lg);
}

.deco-card::before {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -70px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(255, 255, 255, 0.035),
    0 0 0 58px rgba(255, 255, 255, 0.025);
}

.deco-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 253, 248, 0.56);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.deco-title {
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 27px;
  letter-spacing: -0.04em;
  line-height: 1.3;
  white-space: nowrap;
}

.deco-title span {
  color: #e3c98f;
}

.deco-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 34px;
}

.deco-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  font-size: 11.5px;
}

.deco-check {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 50%;
  background: rgba(226, 201, 143, 0.16);
  color: #e3c98f;
}

.deco-check .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.8;
}

.deco-row span:last-child {
  margin-left: auto;
  color: rgba(255, 253, 248, 0.55);
  font-size: 10px;
}

.deco-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 26px;
  color: rgba(255, 253, 248, 0.5);
  font-size: 10px;
}

.query-card {
  position: relative;
  z-index: 2;
  width: min(100%, 425px);
  margin: 112px 0 0 auto;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 25px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow:
    0 34px 80px -32px rgba(15, 56, 45, 0.48),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
}

.query-card::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px var(--coral-soft);
}

.query-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--jade);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.query-label .icon {
  width: 15px;
  height: 15px;
}

.query-card h2 {
  margin: 10px 0 6px;
  font-family: var(--font-serif);
  font-size: 25px;
  letter-spacing: -0.03em;
}

.query-sub {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12px;
}

.query-card .btn {
  min-height: 50px;
  margin-top: 22px;
}

.query-privacy {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.55;
}

.query-privacy .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: var(--jade);
}

.floating-note {
  position: absolute;
  top: 380px;
  left: -20px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-md);
  color: var(--ink-soft);
  font-size: 10.5px;
  backdrop-filter: blur(12px);
  transform: rotate(-2deg);
}

.floating-note .icon {
  width: 14px;
  height: 14px;
  color: var(--jade);
}

.portal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1240px, calc(100% - 64px));
  margin: 0 auto;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10.5px;
}

.portal-footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-footer .seal-mini {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 6px;
  background: var(--ink);
  color: #f3e8cd;
  font-family: var(--font-serif);
  font-size: 9px;
}

.portal-footer a {
  color: var(--ink-soft);
  font-weight: 700;
}

.portal-footer a:hover {
  color: var(--jade);
}

/* -----------------------------
   Parent report
   ----------------------------- */

.report-page {
  width: min(1080px, calc(100% - 64px));
  margin: 0 auto;
  padding: 16px 0 70px;
  animation: fadeUp 0.55s var(--ease) both;
}

.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.back-link:hover {
  color: var(--jade);
}

.report-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid rgba(47, 107, 87, 0.16);
  border-radius: 999px;
  background: var(--jade-pale);
  color: var(--jade);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.privacy-badge .icon {
  width: 12px;
  height: 12px;
}

.report-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 32px;
  align-items: center;
  min-height: 250px;
  padding: 36px 42px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(90% 140% at 100% 0, rgba(220, 190, 128, 0.17), transparent 55%),
    linear-gradient(135deg, #1e5544, #0d352b);
  color: #fffdf8;
  box-shadow: var(--shadow-lg);
}

.report-hero::before {
  content: "";
  position: absolute;
  top: -90px;
  right: 130px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 40px rgba(255, 255, 255, 0.025),
    0 0 0 84px rgba(255, 255, 255, 0.018);
}

.report-hero::after {
  content: "今日";
  position: absolute;
  right: 26px;
  bottom: -15px;
  color: rgba(255, 255, 255, 0.035);
  font-family: var(--font-serif);
  font-size: 120px;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.report-hero-copy {
  position: relative;
  z-index: 1;
}

.report-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: rgba(255, 253, 248, 0.58);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.report-kicker .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.report-hero h1 {
  margin: 17px 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.7vw, 40px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.28;
}

.report-hero h1 span {
  color: #e6cb8e;
}

.report-hero-sub {
  color: rgba(255, 253, 248, 0.68);
  font-size: 13px;
}

.report-score {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.score-ring {
  --percent: 0;
  position: relative;
  display: grid;
  width: 146px;
  height: 146px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#e2c486 calc(var(--percent) * 1%), rgba(255, 255, 255, 0.12) 0);
  box-shadow: 0 15px 35px -20px rgba(0, 0, 0, 0.6);
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #124033;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.score-ring-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.score-ring-inner strong {
  font-family: var(--font-serif);
  font-size: 39px;
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
}

.score-ring-inner span {
  color: rgba(255, 253, 248, 0.55);
  font-size: 12px;
}

.score-caption {
  margin-top: 12px;
  color: rgba(255, 253, 248, 0.58);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.report-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 22px;
}

.panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 18px;
}

.panel-head h2,
.panel-head h3 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.panel-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.panel-body {
  padding: 0 26px 26px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-dot.done {
  background: var(--jade);
}

.legend-dot.missing {
  background: var(--coral);
}

.legend-dot.pending {
  background: var(--amber);
}

.legend-dot.none {
  background: #cdd2cf;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.subject-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s,
    box-shadow 0.2s;
}

.subject-card:hover {
  transform: translateY(-2px);
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}

.subject-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
}

.subject-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.subject-name {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}

.subject-state {
  font-size: 10.5px;
  font-weight: 700;
}

.subject-card.status-done .subject-symbol {
  background: var(--jade-pale);
  color: var(--jade);
}

.subject-card.status-done .subject-state {
  color: var(--jade);
}

.subject-card.status-missing {
  border-color: rgba(213, 103, 79, 0.22);
  background: #fffbf9;
}

.subject-card.status-missing .subject-symbol {
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.subject-card.status-missing .subject-state {
  color: var(--coral-deep);
}

.subject-card.status-pending .subject-symbol {
  background: var(--amber-soft);
  color: var(--amber);
}

.subject-card.status-pending .subject-state {
  color: var(--amber);
}

.subject-card.status-exempt .subject-symbol {
  background: #f0efe9;
  color: #8e938d;
}

.subject-card.status-exempt .subject-state {
  color: #8e938d;
}

.subject-card.status-none .subject-symbol {
  background: #f2f1eb;
  color: #a3aaa5;
}

.subject-card.status-none .subject-state {
  color: #a3aaa5;
}

.special-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.special-card {
  position: relative;
  min-height: 202px;
  padding: 25px 26px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.special-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -50px;
  width: 145px;
  height: 145px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
}

.special-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.special-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.special-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 11px;
  background: var(--jade-pale);
  color: var(--jade);
}

.special-icon .icon {
  width: 18px;
  height: 18px;
}

.special-card.dictation .special-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.special-value {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.special-value.recitation-title-value {
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.38;
  overflow-wrap: anywhere;
}

.special-value .unit {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
}

.special-note {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 11.5px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.status-pill .icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.6;
}

.status-pill.done {
  color: var(--jade);
  background: var(--jade-soft);
}

.status-pill.missing {
  color: var(--coral-deep);
  background: var(--coral-soft);
}

.status-pill.pending {
  color: #8a6418;
  background: var(--amber-soft);
}

.status-pill.none {
  color: #7d8581;
  background: #efeee8;
}

.special-card .status-pill {
  margin-top: 16px;
}

.history-panel .panel-body {
  padding-top: 0;
}

.history-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.history-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 13px 12px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  text-align: left;
  transition: 0.2s var(--ease);
}

.history-day:hover {
  border-color: rgba(47, 107, 87, 0.3);
  transform: translateY(-2px);
}

.history-day.active {
  border-color: var(--jade);
  background: var(--jade-pale);
  box-shadow: inset 0 0 0 1px var(--jade);
}

.history-date {
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.history-ratio {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}

.history-ratio small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 400;
}

.history-bar {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(23, 51, 43, 0.08);
}

.history-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--jade);
}

.history-extra {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 8.5px;
  white-space: nowrap;
}

.history-extra .icon {
  width: 9px;
  height: 9px;
  color: var(--jade);
  stroke-width: 2.4;
}

.history-extra .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--coral);
}

.report-footnote {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 2px 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.report-footnote .icon {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: var(--jade);
}

.empty-report {
  padding: 72px 26px;
  text-align: center;
}

.empty-report .empty-icon {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 20px;
  place-items: center;
  border-radius: 21px;
  background: var(--jade-pale);
  color: var(--jade);
}

.empty-report h2 {
  font-family: var(--font-serif);
  font-size: 25px;
}

.empty-report p {
  max-width: 400px;
  margin: 8px auto 22px;
  color: var(--muted);
  font-size: 13px;
}

/* -----------------------------
   Admin auth
   ----------------------------- */

.auth-page {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(470px, 0.98fr);
  min-height: 100vh;
  background: var(--paper);
}

.auth-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: 38px clamp(38px, 5vw, 80px) 42px;
  overflow: hidden;
  background:
    radial-gradient(100% 100% at 100% 0, rgba(222, 196, 136, 0.15), transparent 55%),
    linear-gradient(150deg, #205644, #0d352b 72%);
  color: #f8f3e6;
}

.auth-art::before {
  content: "";
  position: absolute;
  top: 17%;
  right: -15%;
  width: min(46vw, 560px);
  height: min(46vw, 560px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 55px rgba(255, 255, 255, 0.025),
    0 0 0 118px rgba(255, 255, 255, 0.018),
    0 0 0 190px rgba(255, 255, 255, 0.012);
}

.auth-art::after {
  content: "作业";
  position: absolute;
  right: 4%;
  bottom: -50px;
  color: rgba(255, 255, 255, 0.035);
  font-family: var(--font-serif);
  font-size: clamp(140px, 19vw, 260px);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 1;
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 3px;
}

.auth-brand .brand-seal {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.auth-brand .brand-text small {
  color: rgba(255, 253, 248, 0.48);
}

.auth-quote {
  position: relative;
  z-index: 1;
  max-width: 550px;
  padding: 45px 0;
}

.auth-quote .eyebrow {
  color: #d9be80;
}

.auth-quote h1 {
  margin: 22px 0 22px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 4.4vw, 62px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.24;
}

.auth-quote h1 em {
  color: #e1c888;
  font-style: normal;
}

.auth-quote p {
  max-width: 420px;
  color: rgba(255, 253, 248, 0.6);
  font-size: 13px;
  line-height: 1.9;
}

.auth-art-foot {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(255, 253, 248, 0.38);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.auth-art-foot span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-art-foot .icon {
  width: 13px;
  height: 13px;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 7vw;
  background:
    radial-gradient(550px 420px at 100% 0, rgba(233, 241, 234, 0.8), transparent 65%),
    var(--paper);
}

.auth-card {
  width: min(100%, 450px);
  animation: fadeUp 0.65s var(--ease) both;
}

.auth-card .auth-kicker {
  color: var(--jade);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.auth-card h2 {
  margin: 9px 0 8px;
  font-family: var(--font-serif);
  font-size: 33px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.auth-card > p {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 12.5px;
}

.auth-form {
  padding: 25px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.85);
  box-shadow: var(--shadow-md);
}

.auth-form .btn-block {
  margin-top: 20px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 11px;
}

.auth-back:hover {
  color: var(--jade);
}

.auth-help {
  margin-top: 18px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

/* -----------------------------
   Admin shell
   ----------------------------- */

.admin-page {
  background: #f3efe5;
}

.admin-shell {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 26px 18px 22px;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 0 0, rgba(255, 255, 255, 0.06), transparent 50%),
    var(--jade-dark);
  color: #f7f2e5;
}

.sidebar::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: 80px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.sidebar-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 28px;
}

.sidebar-brand .brand-seal {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  color: #ead8ad;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.sidebar-brand .brand-text strong {
  font-size: 14px;
}

.sidebar-brand .brand-text small {
  color: rgba(255, 253, 248, 0.4);
  font-size: 9.5px;
}

.sidebar-label {
  padding: 0 12px;
  margin: 8px 0 8px;
  color: rgba(255, 253, 248, 0.32);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.side-nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.side-nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(255, 253, 248, 0.58);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  transition: 0.18s;
}

.side-nav button .icon {
  width: 18px;
  height: 18px;
  opacity: 0.78;
}

.side-nav button:hover {
  color: #fffdf8;
  background: rgba(255, 255, 255, 0.055);
}

.side-nav button.active {
  color: var(--ink);
  background: #f5f0e2;
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, 0.55);
}

.side-nav button.active .icon {
  opacity: 1;
  color: var(--jade);
}

.side-nav button .nav-badge {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 20px;
  background: rgba(213, 103, 79, 0.18);
  color: #f0b7a8;
  font-size: 9px;
  font-weight: 700;
}

.side-nav-link:hover {
  color: #fffdf8 !important;
  background: rgba(255, 255, 255, 0.055);
}

.side-nav button.active .nav-badge {
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-card {
  position: relative;
  z-index: 1;
  margin: 16px 4px;
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.sidebar-card .icon {
  width: 18px;
  height: 18px;
  color: #dfc88f;
}

.sidebar-card strong {
  display: block;
  margin-top: 10px;
  font-size: 11.5px;
}

.sidebar-card p {
  margin-top: 4px;
  color: rgba(255, 253, 248, 0.42);
  font-size: 10px;
  line-height: 1.6;
}

.sidebar-user {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.09);
  color: #ecdcb4;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
}

.sidebar-user-info {
  min-width: 0;
  flex: 1;
}

.sidebar-user-info strong {
  display: block;
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-info small {
  display: block;
  overflow: hidden;
  color: rgba(255, 253, 248, 0.36);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(255, 253, 248, 0.42);
}

.sidebar-user button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.admin-main {
  min-width: 0;
  min-height: 100vh;
  background:
    radial-gradient(800px 480px at 100% 0, rgba(233, 241, 234, 0.6), transparent 58%),
    #f4f0e6;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 0 clamp(22px, 3.5vw, 46px);
  border-bottom: 1px solid var(--line-soft);
  background: rgba(244, 240, 230, 0.82);
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.breadcrumb strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb .icon {
  width: 12px;
  height: 12px;
  opacity: 0.5;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-date {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.6);
  color: var(--ink-soft);
  font-size: 10.5px;
}

.topbar-date .icon {
  width: 13px;
  height: 13px;
  color: var(--jade);
}

.admin-content {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 30px clamp(22px, 3.5vw, 46px) 60px;
}

.view {
  animation: fadeUp 0.35s var(--ease) both;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.page-head-copy h1 {
  font-family: var(--font-serif);
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.3;
}

.page-head-copy h1 span {
  color: var(--jade);
}

.page-head-copy p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.page-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.date-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.date-nav button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
}

.date-nav button:hover {
  background: var(--jade-pale);
  color: var(--jade);
}

.date-nav input {
  width: 145px;
  height: 32px;
  padding: 0 4px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 600;
}

/* Overview */

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

.stat-card {
  position: relative;
  min-height: 124px;
  padding: 19px 20px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 94px;
  height: 94px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.stat-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 9px;
  background: var(--jade-pale);
  color: var(--jade);
}

.stat-icon .icon {
  width: 15px;
  height: 15px;
}

.stat-value {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 15px;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
}

.stat-value small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

.stat-foot {
  position: relative;
  z-index: 1;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9.5px;
}

.stat-card.coral .stat-icon {
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.stat-card.coral .stat-value {
  color: var(--coral-deep);
}

.stat-card.amber .stat-icon {
  background: var(--amber-soft);
  color: var(--amber);
}

.stat-card.amber .stat-value {
  color: #946915;
}

.stat-mini-bar {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 4px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(23, 51, 43, 0.08);
}

.stat-mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--jade);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  gap: 18px;
  align-items: start;
}

.table-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.table-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line-soft);
}

.table-panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.table-panel-title h2 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.table-panel-title .count {
  padding: 1px 7px;
  border-radius: 20px;
  background: var(--jade-pale);
  color: var(--jade);
  font-size: 9.5px;
  font-weight: 700;
}

.table-tools {
  display: flex;
  align-items: center;
  gap: 7px;
}

.table-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 152px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--surface-soft);
}

.table-search .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.table-search input {
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 10.5px;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.filter-toggle.active {
  border-color: rgba(213, 103, 79, 0.28);
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.filter-toggle .icon {
  width: 12px;
  height: 12px;
}

.table-scroll {
  max-height: 585px;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
}

.overview-table {
  min-width: 780px;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 39px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line-soft);
  background: #faf7ef;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
}

.data-table th.center,
.data-table td.center {
  text-align: center;
}

.data-table td {
  height: 52px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: #fcfaf3;
}

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

.student-cell {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 98px;
}

.student-avatar {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: var(--jade-pale);
  color: var(--jade);
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 700;
}

.student-cell strong {
  display: block;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
}

.student-cell small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.subject-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.subject-dot {
  position: relative;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 5px;
  background: #f0efe9;
  color: #9ba39e;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  cursor: default;
}

.subject-dot.done {
  background: var(--jade-soft);
  color: var(--jade-deep);
}

.subject-dot.missing {
  background: var(--coral-soft);
  color: var(--coral-deep);
}

.subject-dot.pending {
  background: var(--amber-soft);
  color: #946915;
}

.subject-dot.exempt {
  background: #f0efe9;
  color: #a2a8a3;
}

.subject-dot.none {
  background: #f1f0ea;
  color: #b0b6b1;
  box-shadow: inset 0 0 0 1px rgba(23, 51, 43, 0.06);
}

.subject-dot:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  z-index: 20;
  padding: 5px 7px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-size: 8px;
  font-weight: 500;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.row-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 50px;
}

.mini-progress {
  width: 28px;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(23, 51, 43, 0.08);
}

.mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--jade);
}

.row-progress small {
  color: var(--ink-soft);
  font-size: 9px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.status-chip.done {
  color: var(--jade);
  background: var(--jade-pale);
}

.status-chip.missing {
  color: var(--coral-deep);
  background: var(--coral-soft);
}

.status-chip.pending {
  color: #946915;
  background: var(--amber-soft);
}

.status-chip.exempt,
.status-chip.none {
  color: #8a928d;
  background: #f0efe9;
}

.score-text {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
}

.score-text small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 8.5px;
  font-weight: 400;
}

.recite-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  min-width: 84px;
  max-width: 130px;
}

.recite-title {
  max-width: 130px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recite-title.is-empty {
  color: #a4aba6;
  font-size: 8.5px;
  font-weight: 400;
}

.table-empty {
  padding: 70px 20px;
  text-align: center;
}

.table-empty .empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 15px;
  place-items: center;
  border-radius: 16px;
  background: var(--jade-pale);
  color: var(--jade);
}

.table-empty h3 {
  font-family: var(--font-serif);
  font-size: 18px;
}

.table-empty p {
  margin: 5px 0 16px;
  color: var(--muted);
  font-size: 10.5px;
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9.5px;
}

.legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-inline span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-inline i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.mobile-scroll-hint {
  display: none;
  color: var(--jade);
  font-size: 9px;
}

/* Focus panel */

.focus-panel {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.focus-card {
  padding: 19px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.focus-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 15px;
}

.focus-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
}

.focus-head .icon {
  width: 15px;
  height: 15px;
  color: var(--jade);
}

.focus-head .more {
  color: var(--muted);
  font-size: 9px;
}

.missing-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.missing-bar-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  gap: 8px;
  align-items: center;
}

.missing-bar-row span:first-child {
  color: var(--ink-soft);
  font-size: 10.5px;
}

.missing-bar-row strong {
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  text-align: right;
}

.missing-track {
  height: 5px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(23, 51, 43, 0.07);
}

.missing-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
}

.recite-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.recite-person {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.recite-person-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.recite-person .name {
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recite-piece {
  overflow: hidden;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recite-person .tag {
  padding: 2px 6px;
  border-radius: 99px;
  background: var(--coral-soft);
  color: var(--coral-deep);
  font-size: 9px;
  font-weight: 700;
}

.recite-person .tag.pending {
  background: var(--amber-soft);
  color: #946915;
}

.focus-empty {
  padding: 8px 0 5px;
  color: var(--muted);
  font-size: 10px;
}

.focus-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9px;
}

.focus-foot strong {
  color: var(--ink);
  font-size: 10px;
}

.quick-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.quick-date {
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 8.5px;
}

.quick-date:hover,
.quick-date.active {
  border-color: rgba(47, 107, 87, 0.32);
  background: var(--jade-pale);
  color: var(--jade);
}

/* -----------------------------
   Import view
   ----------------------------- */

.import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 308px;
  gap: 18px;
  align-items: start;
}

.import-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.panel-card {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.panel-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px 17px;
}

.step-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--jade);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.step-label b {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--jade-pale);
  font-size: 9px;
}

.panel-card-head h2 {
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.panel-card-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.panel-card-body {
  padding: 0 22px 22px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  padding: 28px;
  border: 1.5px dashed rgba(47, 107, 87, 0.28);
  border-radius: 15px;
  background:
    radial-gradient(320px 180px at 50% 0, rgba(223, 234, 227, 0.65), transparent 80%),
    #fbf9f2;
  text-align: center;
  transition: 0.22s var(--ease);
  cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--jade);
  background: var(--jade-pale);
  transform: translateY(-1px);
}

.dropzone-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid rgba(47, 107, 87, 0.12);
  border-radius: 17px;
  background: #fff;
  color: var(--jade);
  box-shadow: 0 9px 20px -13px rgba(23, 74, 59, 0.5);
}

.dropzone-icon .icon {
  width: 25px;
  height: 25px;
}

.dropzone h3 {
  font-size: 13px;
  font-weight: 700;
}

.dropzone p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.dropzone .browse {
  margin-top: 11px;
  color: var(--jade);
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 13px;
  padding: 11px 13px;
  border: 1px solid rgba(47, 107, 87, 0.17);
  border-radius: 11px;
  background: var(--jade-pale);
}

.file-chip-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: #fff;
  color: var(--jade);
}

.file-chip-copy {
  min-width: 0;
  flex: 1;
}

.file-chip-copy strong {
  display: block;
  overflow: hidden;
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-chip-copy small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.file-chip button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.file-chip button:hover {
  color: var(--coral-deep);
  background: var(--coral-soft);
}

.import-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 15px;
}

.import-controls .field + .field {
  margin-top: 0;
}

.import-controls .input {
  min-height: 43px;
  font-size: 12px;
}

.import-date-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9.5px;
}

.import-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.import-actions .hint {
  color: var(--muted);
  font-size: 9px;
}

.preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 21px 22px 15px;
  border-bottom: 1px solid var(--line-soft);
}

.preview-head h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
}

.preview-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.preview-stat {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--surface-soft);
}

.preview-stat small {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
}

.preview-stat strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
}

.preview-stat strong.coral {
  color: var(--coral-deep);
}

.mapping-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 13px 22px;
  border-bottom: 1px solid var(--line-soft);
}

.mapping-bar strong {
  margin-right: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.mapping-chip {
  padding: 3px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 8.5px;
}

.mapping-chip b {
  color: var(--jade);
  font-weight: 700;
}

.warning-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 14px 22px 0;
  padding: 11px 13px;
  border: 1px solid rgba(191, 141, 46, 0.16);
  border-radius: 9px;
  background: #fdf9ef;
}

.warning-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: #84621c;
  font-size: 9.5px;
  line-height: 1.5;
}

.warning-item .icon {
  width: 11px;
  height: 11px;
  margin-top: 2px;
}

.preview-table-wrap {
  max-height: 400px;
  overflow: auto;
  margin-top: 13px;
}

.preview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 10.5px;
}

.preview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 33px;
  padding: 0 9px;
  border-bottom: 1px solid var(--line-soft);
  background: #faf7ef;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.preview-table td {
  height: 44px;
  padding: 4px 9px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.preview-table tr.has-error td {
  background: #fff8f5;
}

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

.preview-table .error-text {
  color: var(--coral-deep);
  font-size: 8px;
  line-height: 1.45;
}

.mini-dots {
  display: flex;
  gap: 2px;
}

.mini-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #e7e6df;
}

.mini-dot.done {
  background: var(--jade);
}

.mini-dot.missing {
  background: var(--coral);
}

.mini-dot.pending {
  background: #d5a843;
}

.mini-dot.exempt {
  background: #c9cec9;
}

.import-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 22px;
  border-top: 1px solid var(--line-soft);
}

.import-footer .hint {
  color: var(--muted);
  font-size: 9px;
}

.import-aside {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.aside-card {
  padding: 19px;
  border: 1px solid var(--line-soft);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.aside-card.dark {
  background:
    radial-gradient(100% 120% at 100% 0, rgba(255, 255, 255, 0.1), transparent 55%),
    var(--jade-deep);
  color: #f9f4e6;
  border-color: transparent;
}

.aside-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
}

.aside-card h3 .icon {
  width: 16px;
  height: 16px;
  color: var(--jade);
}

.aside-card.dark h3 .icon {
  color: #e2c486;
}

.aside-card > p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

.aside-card.dark > p {
  color: rgba(255, 253, 248, 0.55);
}

.template-card .btn {
  margin-top: 14px;
  width: 100%;
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.guide-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.guide-num {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--jade-pale);
  color: var(--jade);
  font-size: 8px;
  font-weight: 700;
}

.guide-item strong {
  display: block;
  font-size: 10px;
  font-weight: 700;
}

.guide-item p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.success-card {
  padding: 38px 28px;
  text-align: center;
}

.success-icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--jade-soft);
  color: var(--jade);
}

.success-icon .icon {
  width: 30px;
  height: 30px;
}

.success-card h2 {
  font-family: var(--font-serif);
  font-size: 24px;
}

.success-card p {
  margin: 7px auto 20px;
  max-width: 400px;
  color: var(--muted);
  font-size: 11px;
}

.success-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
}

/* -----------------------------
   Records, roster, settings
   ----------------------------- */

.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.section-toolbar h2 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.section-toolbar .toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.record-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.archive-card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: 0.2s var(--ease);
}

.archive-card:hover {
  border-color: rgba(47, 107, 87, 0.32);
  background: var(--jade-pale);
  transform: translateY(-1px);
}

.archive-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 36px;
  padding-right: 10px;
  border-right: 1px solid var(--line-soft);
  line-height: 1;
}

.archive-date strong {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
}

.archive-date small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.archive-meta {
  min-width: 0;
  flex: 1;
}

.archive-meta strong {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
}

.archive-meta small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.archive-card > .icon {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.record-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.record-date {
  text-align: center;
  padding-right: 14px;
  border-right: 1px solid var(--line-soft);
}

.record-date strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1;
}

.record-date small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.record-main {
  min-width: 0;
}

.record-main strong {
  display: block;
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-main p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.record-main .record-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.record-chip {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 8px;
}

.record-actions {
  display: flex;
  gap: 5px;
}

.empty-state {
  padding: 64px 22px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.5);
  text-align: center;
}

.empty-state .empty-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  place-items: center;
  border-radius: 16px;
  background: var(--jade-pale);
  color: var(--jade);
}

.empty-state h3 {
  font-family: var(--font-serif);
  font-size: 19px;
}

.empty-state p {
  margin: 5px auto 16px;
  max-width: 340px;
  color: var(--muted);
  font-size: 10px;
}

.roster-table .student-cell {
  min-width: 140px;
}

.muted-cell {
  color: var(--muted);
  font-size: 9px;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: start;
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.settings-card {
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.settings-card-head {
  padding: 21px 22px 0;
}

.settings-card-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
}

.settings-card-head h2 .icon {
  width: 17px;
  height: 17px;
  color: var(--jade);
}

.settings-card-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.settings-card-body {
  padding: 18px 22px 22px;
}

.settings-card-body .btn {
  margin-top: 18px;
}

.settings-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line-soft);
}

.access-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: 18px;
  background:
    radial-gradient(100% 90% at 100% 0, rgba(226, 196, 134, 0.15), transparent 55%),
    var(--jade-deep);
  color: #f8f3e6;
  box-shadow: var(--shadow-md);
}

.access-card::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -68px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(255, 255, 255, 0.02);
}

.access-card h2 {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
}

.access-card h2 .icon {
  width: 17px;
  height: 17px;
  color: #e2c486;
}

.access-card > p {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: rgba(255, 253, 248, 0.5);
  font-size: 9.5px;
  line-height: 1.7;
}

.access-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.access-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.access-row .access-label {
  flex: 1;
  overflow: hidden;
  color: rgba(255, 253, 248, 0.8);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-row small {
  flex: 0 0 auto;
  color: rgba(255, 253, 248, 0.35);
  font-size: 8px;
}

.access-row button {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 253, 248, 0.65);
}

.access-row button:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.access-row button .icon {
  width: 12px;
  height: 12px;
}

.access-tip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 253, 248, 0.42);
  font-size: 8.5px;
  line-height: 1.6;
}

.access-tip .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
}

.data-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.data-action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: #fff;
  text-align: left;
}

.data-action:hover {
  border-color: rgba(47, 107, 87, 0.3);
  background: var(--jade-pale);
}

.data-action .icon {
  width: 16px;
  height: 16px;
  color: var(--jade);
}

.data-action span {
  flex: 1;
  font-size: 10px;
  font-weight: 600;
}

.data-action small {
  color: var(--muted);
  font-size: 8px;
}

.danger-action:hover {
  border-color: rgba(213, 103, 79, 0.3);
  background: #fff7f4;
}

.danger-action .icon {
  color: var(--coral-deep);
}

.about-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 9.5px;
}

.about-line:last-child {
  border-bottom: 0;
}

.about-line span:first-child {
  color: var(--muted);
}

.about-line strong {
  font-weight: 600;
}

/* -----------------------------
   Modal, toast, misc
   ----------------------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14, 35, 29, 0.42);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.2s ease both;
}

.modal {
  width: min(100%, 510px);
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s var(--ease) both;
}

.modal.modal-wide {
  width: min(100%, 680px);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 23px 24px 16px;
}

.modal-head h2 {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.modal-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
}

.modal-close {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--muted);
}

.modal-close:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.modal-body {
  padding: 4px 24px 24px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 15px 24px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.modal-foot .btn {
  min-height: 40px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 15px;
}

.detail-cell {
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--surface-soft);
}

.detail-cell small {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.detail-cell strong {
  display: block;
  margin-top: 2px;
  font-size: 11px;
}

.detail-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 15px;
}

.detail-subject {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 9px;
}

.detail-subject strong {
  font-weight: 600;
}

.detail-subject span {
  font-size: 8px;
  font-weight: 700;
}

.detail-subject.done span {
  color: var(--jade);
}

.detail-subject.missing span {
  color: var(--coral-deep);
}

.detail-subject.pending span {
  color: #946915;
}

.detail-note {
  margin-top: 14px;
  padding: 11px 12px;
  border-radius: 9px;
  background: var(--amber-soft);
  color: #795a18;
  font-size: 9.5px;
  line-height: 1.6;
}

.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 240px;
  max-width: 350px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: var(--ink);
  color: #fffdf8;
  box-shadow: var(--shadow-md);
  font-size: 10.5px;
  line-height: 1.55;
  pointer-events: auto;
  animation: toastIn 0.3s var(--ease) both;
}

.toast .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  color: #a9d2bb;
}

.toast.error .icon {
  color: #f0b7a8;
}

.toast.success .icon {
  color: #e2c486;
}

.skeleton {
  overflow: hidden;
  border-radius: 6px;
  background: linear-gradient(90deg, #eeece4 25%, #f7f4ec 37%, #eeece4 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}

.loading-panel {
  display: grid;
  min-height: 320px;
  place-items: center;
}

.loading-panel .spinner {
  width: 26px;
  height: 26px;
  color: var(--jade);
}

/* -----------------------------
   Animation
   ----------------------------- */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes shimmer {
  to {
    background-position: -400% 0;
  }
}

/* -----------------------------
   Responsive
   ----------------------------- */

@media (max-width: 1180px) {
  .admin-shell {
    grid-template-columns: 226px minmax(0, 1fr);
  }

  .overview-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .import-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .settings-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 1020px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
  }

  .query-card {
    padding: 24px;
  }

  .floating-note {
    left: -8px;
  }

  .auth-page {
    grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1.1fr);
  }

  .auth-art {
    padding-right: 36px;
    padding-left: 36px;
  }

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

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

  .focus-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .focus-card.quick-card {
    grid-column: 1 / -1;
  }

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

@media (max-width: 900px) {
  .site-header,
  .portal-main,
  .portal-footer,
  .report-page {
    width: min(100% - 40px, 720px);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 36px;
    gap: 8px;
  }

  .hero-copy {
    max-width: 670px;
  }

  .query-stage {
    min-height: 520px;
    max-width: 500px;
    margin: 18px 0 0 auto;
  }

  .deco-card {
    width: 88%;
  }

  .query-card {
    margin-top: 92px;
  }

  .floating-note {
    top: 355px;
    left: 0;
  }

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

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    width: 255px;
    transform: translateX(-104%);
    transition: transform 0.3s var(--ease);
    box-shadow: 30px 0 70px rgba(0, 0, 0, 0.2);
  }

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

  .menu-toggle {
    display: grid;
  }

  .admin-topbar {
    min-height: 68px;
  }

  .admin-content {
    padding-top: 24px;
  }

  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-art {
    min-height: 300px;
    padding: 28px;
  }

  .auth-quote {
    padding: 30px 0 10px;
  }

  .auth-quote h1 {
    font-size: 38px;
    margin: 14px 0;
  }

  .auth-quote p,
  .auth-art-foot {
    display: none;
  }

  .auth-main {
    padding: 36px 24px 50px;
  }

  .auth-card {
    width: min(100%, 540px);
  }

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

  .import-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(14, 35, 29, 0.38);
    backdrop-filter: blur(2px);
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 18px 0;
  }

  .site-nav {
    gap: 2px;
    padding: 4px;
  }

  .site-nav a {
    padding: 7px 11px;
    font-size: 11px;
  }

  .brand-seal {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .brand-text strong {
    font-size: 14px;
  }

  .hero {
    padding: 26px 0 52px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-lead {
    font-size: 14px;
  }

  .hero-features {
    gap: 10px 15px;
  }

  .query-stage {
    min-height: 500px;
  }

  .deco-card {
    width: 94%;
    padding: 26px 22px;
  }

  .deco-title {
    margin-top: 14px;
    font-size: 24px;
  }

  .deco-rows {
    margin-top: 20px;
  }

  .query-card {
    width: 94%;
    margin-top: 102px;
  }

  .floating-note {
    display: none;
  }

  .report-toolbar {
    flex-wrap: wrap;
  }

  .report-hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 28px 25px;
  }

  .report-score {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    justify-self: start;
    text-align: left;
  }

  .score-ring {
    width: 102px;
    height: 102px;
  }

  .score-ring::before {
    inset: 7px;
  }

  .score-ring-inner strong {
    font-size: 29px;
  }

  .score-caption {
    max-width: 90px;
    margin-top: 0;
    line-height: 1.5;
  }

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

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

  .history-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .panel-head,
  .panel-body {
    padding-right: 18px;
    padding-left: 18px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .page-head-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .topbar-date {
    display: none;
  }

  .admin-content {
    padding: 22px 16px 45px;
  }

  .admin-topbar {
    padding: 0 16px;
  }

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

  .stat-card {
    min-height: 112px;
    padding: 15px;
  }

  .stat-value {
    font-size: 28px;
  }

  .focus-panel {
    grid-template-columns: 1fr;
  }

  .table-panel-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
  }

  .table-tools {
    width: 100%;
  }

  .table-search {
    flex: 1;
    width: auto;
  }

  .table-foot {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 15px;
  }

  .mobile-scroll-hint {
    display: block;
  }

  .data-table th,
  .data-table td {
    padding-right: 7px;
    padding-left: 7px;
  }

  .import-controls {
    grid-template-columns: 1fr;
  }

  .preview-stats {
    grid-template-columns: 1fr 1fr;
    padding: 14px;
  }

  .preview-head,
  .mapping-bar,
  .import-footer {
    padding-right: 15px;
    padding-left: 15px;
  }

  .warning-list {
    margin-right: 15px;
    margin-left: 15px;
  }

  .import-aside {
    grid-template-columns: 1fr;
  }

  .record-item {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }

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

  .record-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

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

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal,
  .modal.modal-wide {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
  }

  .toast-stack {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }

  .form-grid .field-full {
    grid-column: auto;
  }

  .setup-form .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .site-header {
    gap: 12px;
  }

  .brand-text small {
    display: none;
  }

  .site-nav a {
    padding: 7px 9px;
  }

  .site-header,
  .portal-main,
  .portal-footer,
  .report-page {
    width: calc(100% - 28px);
  }

  .hero h1 {
    font-size: 34px;
    letter-spacing: -0.05em;
  }

  .hero-features {
    display: flex;
    gap: 8px 14px;
  }

  .query-stage {
    min-height: 500px;
  }

  .query-card {
    width: 100%;
    padding: 22px 19px;
  }

  .deco-card {
    width: 100%;
    min-height: 385px;
  }

  .report-hero {
    padding: 25px 20px;
  }

  .report-hero h1 {
    font-size: 26px;
  }

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

  .subject-card {
    padding: 11px 13px;
  }

  .special-card {
    min-height: 190px;
    padding: 21px;
  }

  .history-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .history-day {
    padding: 10px;
  }

  .auth-art {
    min-height: 230px;
    padding: 22px;
  }

  .auth-quote h1 {
    font-size: 30px;
  }

  .auth-quote .eyebrow {
    font-size: 9px;
  }

  .auth-card h2 {
    font-size: 28px;
  }

  .auth-form {
    padding: 20px;
  }

  .auth-main {
    padding: 28px 16px 40px;
  }

  .admin-content {
    padding-right: 12px;
    padding-left: 12px;
  }

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

  .stat-card {
    min-height: 98px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .stat-top {
    display: contents;
  }

  .stat-label {
    grid-column: 1;
  }

  .stat-icon {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .stat-value {
    grid-column: 1;
    margin-top: 0;
  }

  .stat-foot,
  .stat-mini-bar {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .stat-card::after {
    display: none;
  }

  .page-head-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .date-nav {
    justify-content: space-between;
  }

  .date-nav input {
    flex: 1;
  }

  .topbar-actions .btn span {
    display: none;
  }

  .topbar-actions .btn {
    width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 11px;
  }

  .preview-stats {
    grid-template-columns: 1fr 1fr;
  }

  .import-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .import-actions .btn {
    width: 100%;
  }

  .detail-grid,
  .detail-matrix {
    grid-template-columns: 1fr 1fr;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-right: 18px;
    padding-left: 18px;
  }

  .portal-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@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;
  }
}

/* Print: parent report */
@media print {
  body {
    background: #fff;
  }

  body::before,
  .site-header,
  .report-toolbar,
  .portal-footer,
  .report-footnote,
  .privacy-badge {
    display: none !important;
  }

  .report-page {
    width: 100%;
    padding: 0;
  }

  .report-hero {
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .panel,
  .special-card {
    break-inside: avoid;
    box-shadow: none;
  }

  .history-panel {
    display: none;
  }
}
