:root {
  color-scheme: light;
  --paper: #f3f5f7;
  --surface: #fff;
  --ink: #152a40;
  --muted: #42576c;
  --navy: #122b44;
  --blue: #1d4a75;
  --line: #d5dfe8;
  font: 16px/1.6 "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid #3779b7; outline-offset: 3px; }

.topbar { background: var(--navy); color: #fff; }
.bar-inner {
  max-width: 1200px; min-height: 72px; margin: auto; padding: 10px 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 650; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid #94adc7; border-radius: 8px; color: #edf4fc;
}
.account { display: flex; align-items: center; gap: 14px; font-size: .88rem; }
.quiet { background: transparent; color: #fff; border: 1px solid #8da5bf; }
button { min-height: 44px; padding: 8px 15px; border-radius: 7px; font-weight: 600; }
.primary { color: #fff; background: var(--blue); border: 1px solid var(--blue); }
.primary:hover { background: var(--navy); }
.secondary { color: var(--blue); background: var(--surface); border: 1px solid #9cacc0; }
.quiet:hover { background: #27455f; }
.secondary:hover { background: #e9f1f8; }

.shell { max-width: 1200px; margin: auto; padding: 42px 32px 64px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.8rem, 4vw, 2.35rem); line-height: 1.25; letter-spacing: -.035em; }
h2 { font-size: 1.125rem; }
.intro { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.intro p, .login-intro p { margin-top: 7px; color: var(--muted); }
.notice, .form-error { padding: 10px 14px; border-radius: 6px; background: #fff1d8; color: #604009; }
.notice { margin-bottom: 20px; }
.login {
  max-width: 450px; margin: clamp(8px, 6vh, 60px) auto;
  padding: clamp(22px, 5vw, 42px); border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); box-shadow: 0 12px 34px #18365510;
}
.login form { margin-top: 26px; display: grid; gap: 9px; }
.login input { margin-bottom: 9px; }
.login button { margin-top: 5px; }
.demo-hint { font-size: .84rem; margin-top: 10px; color: var(--muted); }
label { font-size: .84rem; font-weight: 600; color: var(--muted); }
input, select {
  color: var(--ink); background: var(--surface); border: 1px solid #9cacc0;
  min-height: 44px; padding: 8px 12px; border-radius: 7px; width: 100%;
}
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
.metric {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 16px 20px; display: grid; gap: 3px;
}
.metric span { color: var(--muted); font-size: .86rem; }
.metric strong { font-size: 2rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.metric:nth-child(2) strong { color: #166148; }
.metric:nth-child(3) strong { color: #845106; }
.course-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.panel-head { padding: 18px 22px; }
.filters { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr; margin-top: 12px; gap: 12px; }
.filters label { display: grid; gap: 4px; min-width: 0; }
.columns, .course-row { display: grid; grid-template-columns: 1.5fr 1.15fr 1fr .8fr; gap: 14px; padding: 12px 22px; align-items: center; }
.columns { background: #e9eff6; color: var(--muted); font-size: .8rem; font-weight: 650; }
.course-row { min-height: 58px; font-size: .9rem; border-bottom: 1px solid #e8edf3; }
.course-row span { min-width: 0; overflow-wrap: anywhere; }
.course-row .course-name { font-weight: 650; }
.course-row .date { color: var(--muted); font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: .8rem; padding: 3px 9px; border-radius: 5px; background: #e9edf2; color: #364b5f; }
.pill.complete { background: #e5f3eb; color: #15583e; }
.pill.partial { background: #fff0d5; color: #744806; }
.table-message { padding: 13px 22px; font-size: .84rem; color: var(--muted); }

@media (max-width: 650px) {
  .bar-inner { padding-inline: 16px; min-height: 60px; }
  .brand, .account { gap: 7px; }
  .brand-mark { width: 29px; height: 29px; }
  .account { font-size: .78rem; }
  .quiet { padding-inline: 8px; }
  .shell { padding: 25px 16px 40px; }
  .intro { align-items: start; }
  .intro p { font-size: .83rem; }
  .summary { margin: 18px 0; gap: 8px; }
  .metric { padding: 11px; }
  .metric strong { font-size: 1.55rem; }
  .panel-head, .table-message { padding-inline: 14px; }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .filters label:first-child { grid-column: span 2; }
  .columns { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); padding: 0; }
  .course-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 13px 14px; }
  .course-name { grid-row: 1; grid-column: 1; }
  .group { grid-row: 2; grid-column: 1; color: var(--muted); }
  .status-cell { grid-row: 1; grid-column: 2; text-align: right; }
  .date { grid-row: 2; grid-column: 2; font-size: .8rem; text-align: right; }
}
