/* =========================================================
   学生体质健康成绩查询 · 样式
   ========================================================= */
:root {
  --bg: #f5f8fb;
  --card: #ffffff;
  --ink: #0f1f33;
  --ink-2: #334155;
  --muted: #6b7f95;
  --line: #e6edf5;
  --brand: #0f766e;
  --brand-2: #14b8a6;
  --brand-ink: #0b3b3a;
  --ring-track: #eef3f8;

  --excellent: #0d9488;
  --good: #2563eb;
  --pass: #d97706;
  --fail: #dc2626;

  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15, 31, 51, .04);
  --shadow: 0 1px 2px rgba(15, 31, 51, .04), 0 18px 40px -24px rgba(15, 31, 51, .28);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

::selection { background: rgba(20, 184, 166, .22); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* =========================================================
   登录页
   ========================================================= */
.auth {
  display: grid;
  grid-template-columns: minmax(420px, 46%) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 52px 56px 40px;
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(45, 212, 191, .30), transparent 60%),
    linear-gradient(155deg, #0a2f2e 0%, #0f5f5a 48%, #0f766e 100%);
}

.aside-inner { position: relative; z-index: 2; }

.brandline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .82);
}

.brandline .logo { width: 32px; height: 32px; }

.aside-title {
  margin-top: clamp(40px, 9vh, 96px);
  font-size: clamp(32px, 3.4vw, 46px);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -.02em;
}

.aside-title em {
  font-style: normal;
  color: #7ff0dc;
  position: relative;
  white-space: nowrap;
}

.aside-title em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 8px;
  background: rgba(126, 240, 220, .18);
  border-radius: 2px;
  z-index: -1;
}

.aside-desc {
  margin-top: 18px;
  max-width: 30em;
  font-size: 14px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .66);
}

.aside-points {
  margin-top: 34px;
  display: grid;
  gap: 13px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .78);
}

.aside-points li { display: flex; align-items: center; gap: 10px; }

.aside-points i {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  position: relative;
}

.aside-points i::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 5px;
  height: 9px;
  border: solid #7ff0dc;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(42deg);
}

.track-art {
  position: absolute;
  right: -34%;
  bottom: -28%;
  width: 120%;
  height: auto;
  z-index: 1;
  opacity: .95;
  pointer-events: none;
}

.aside-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .55);
}

.aside-foot .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5eead4;
  box-shadow: 0 0 0 4px rgba(94, 234, 212, .15);
}

/* 右侧表单 */
.auth-main {
  display: grid;
  place-items: center;
  padding: 48px 28px;
  background:
    radial-gradient(60% 50% at 80% 0%, #eefaf7 0%, transparent 70%),
    radial-gradient(50% 40% at 0% 100%, #f2f7fd 0%, transparent 70%),
    #fbfdfe;
}

.auth-card { width: 100%; max-width: 392px; }

.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  color: var(--brand);
  text-transform: uppercase;
}

.auth-head h2 {
  margin-top: 8px;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.auth-sub {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

#login-form { margin-top: 30px; }

.field { margin-bottom: 16px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #46586d;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #dde7f0;
  border-radius: 12px;
  transition: border-color .18s, box-shadow .18s, background .18s;
  letter-spacing: .02em;
}

.field input::placeholder { color: #a8b7c7; font-size: 14px; letter-spacing: 0; }

.field input:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .12);
}

.field input:disabled { background: #f5f8fb; color: #94a3b8; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 48px; }

.field-hint {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.6;
  color: #94a3b8;
}

.field-hint b { color: #64748b; font-weight: 600; }

.eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: #9aabbb;
  border-radius: 9px;
  transition: color .15s, background .15s;
}

.eye:hover { color: var(--brand); background: #f1f9f7; }
.eye svg { width: 20px; height: 20px; }

.form-error {
  min-height: 20px;
  margin: -2px 0 10px;
  font-size: 13px;
  color: var(--fail);
}

.form-error.shake { animation: shake .32s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.btn-primary {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 600;
  color: #fff;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #149a90, #0f766e 60%, #0c5f59);
  box-shadow: 0 10px 24px -12px rgba(15, 118, 110, .75);
  transition: transform .16s, box-shadow .16s, filter .16s;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(15, 118, 110, .8); }
.btn-primary:active { transform: translateY(0); filter: brightness(.97); }
.btn-primary svg { width: 18px; height: 18px; transition: transform .18s; }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-primary[disabled] { opacity: .7; cursor: wait; }

.demo-hint {
  margin-top: 16px;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #0f766e;
  background: #f0faf8;
  border: 1px dashed #bfe8e1;
  border-radius: 10px;
}

.demo-hint button {
  padding: 1px 5px;
  margin: 0 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0f766e;
  background: #fff;
  border: 1px solid #c9e9e3;
  border-radius: 5px;
}

.auth-note {
  margin-top: 26px;
  padding-top: 18px;
  font-size: 12px;
  line-height: 1.8;
  color: #94a3b8;
  border-top: 1px dashed #e3ebf3;
}

/* =========================================================
   成绩单页
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.6) blur(12px);
  -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid rgba(15, 31, 51, .06);
}

.nav-in {
  max-width: 1000px;
  margin: 0 auto;
  height: 64px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .01em;
}

.nav-brand .logo { width: 27px; height: 27px; border-radius: 8px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  transition: all .16s;
}

.btn:hover { border-color: #cfe0ea; background: #f8fbfd; }
.btn svg { width: 16px; height: 16px; }
.btn.text { border-color: transparent; background: transparent; color: var(--muted); }
.btn.text:hover { color: var(--fail); background: #fef2f2; }

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 26px 20px 44px;
}

/* 概览卡 */
.hero {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 28px 30px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  animation: fadeUp .5s both;
}

.ring-wrap {
  position: relative;
  width: 172px;
  height: 172px;
  flex: none;
}

.ring { width: 100%; height: 100%; transform: rotate(-90deg); }

.ring-track {
  fill: none;
  stroke: var(--ring-track);
  stroke-width: 11;
}

.ring-fill {
  fill: none;
  stroke: var(--grade, var(--brand));
  stroke-width: 11;
  stroke-linecap: round;
  stroke-dasharray: 427.26;
  stroke-dashoffset: 427.26;
  transition: stroke-dashoffset 1.1s cubic-bezier(.22, .8, .25, 1);
  filter: drop-shadow(0 3px 8px rgba(15, 118, 110, .18));
}

.ring-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 2px;
}

.ring-num {
  font-size: 41px;
  font-weight: 700;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ring-cap {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .18em;
}

.hero-body { flex: 1; min-width: 0; }

.hero-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.hero-title h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 999px;
  color: var(--brand);
  background: #eefaf8;
  border: 1px solid #cdece6;
}

.pill.excellent { color: var(--excellent); background: #e7f8f4; border-color: #c3ece2; }
.pill.good { color: var(--good); background: #eaf1ff; border-color: #d3e2ff; }
.pill.pass { color: var(--pass); background: #fdf4e3; border-color: #f6e3bd; }
.pill.fail { color: var(--fail); background: #fdecec; border-color: #f8d4d4; }

.hero-meta {
  margin-top: 7px;
  font-size: 13.5px;
  color: var(--muted);
  letter-spacing: .01em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.stat {
  padding: 10px 12px;
  background: #f8fbfd;
  border: 1px solid #eef3f8;
  border-radius: 12px;
}

.stat span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat b {
  font-size: 19px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}

/* 区块 */
.block { margin-top: 34px; }

.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 0 2px;
  flex-wrap: wrap;
}

.block-head h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.01em;
}

.block-head p { font-size: 12px; color: var(--muted); }

/* 单项卡片 */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
  gap: 13px;
}

.item {
  position: relative;
  padding: 16px 16px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
  animation: fadeUp .45s both;
}

.item:hover {
  transform: translateY(-2px);
  border-color: #d8e6ef;
  box-shadow: 0 12px 28px -18px rgba(15, 31, 51, .45);
}

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

.item-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #3d5065;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  padding: 2.5px 8px;
  border-radius: 6px;
  line-height: 1.35;
}

.tag.excellent { color: var(--excellent); background: #e7f8f4; }
.tag.good { color: var(--good); background: #eaf1ff; }
.tag.pass { color: var(--pass); background: #fdf4e3; }
.tag.fail { color: var(--fail); background: #fdecec; }
.tag.na { color: #94a3b8; background: #f1f5f9; }

.item-value {
  margin-top: 10px;
  font-size: 27px;
  font-weight: 650;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

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

.item-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: #94a3b8;
  min-height: 16px;
}

.bar {
  position: relative;
  height: 6px;
  margin: 12px 0 10px;
  background: #eef3f8;
  border-radius: 999px;
}

.bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--grade, var(--brand));
  opacity: .85;
  transition: width .9s cubic-bezier(.22, .8, .25, 1);
}

.bar-avg {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 12px;
  margin-left: -1px;
  border-radius: 2px;
  background: #94a3b8;
  opacity: .55;
}

.item-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--muted);
}

.item-foot b {
  color: var(--ink-2);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.item-foot .bonus {
  color: var(--excellent);
  font-weight: 600;
}

/* 图表 */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}

.chart-panel { padding: 18px 18px 12px; }

.legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  color: var(--muted);
}

.lg { display: inline-flex; align-items: center; gap: 7px; }

.lg::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.lg-me::before { background: rgba(20, 184, 166, .22); border: 1.5px solid var(--brand); }
.lg-avg::before { background: transparent; border: 1.5px dashed #94a3b8; }

.radar-box {
  max-width: 430px;
  margin: 2px auto 0;
}

.radar-box svg { display: block; width: 100%; height: auto; overflow: visible; }

.radar-ring { fill: none; stroke: #eaf1f7; stroke-width: 1; }
.radar-axis { stroke: #eaf1f7; stroke-width: 1; }
.radar-label { font-size: 11.5px; fill: #6b7f95; font-family: var(--font); }
.radar-avg { fill: rgba(148, 163, 184, .13); stroke: #94a3b8; stroke-width: 1.3; stroke-dasharray: 4 3; }
.radar-me { fill: rgba(20, 184, 166, .18); stroke: #0f766e; stroke-width: 2; }
.radar-dot { fill: #fff; stroke: #0f766e; stroke-width: 2; }

/* 说明 */
.note-panel { padding: 20px 22px 22px; }

.grade-scale {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.gs {
  padding: 11px 12px;
  border-radius: 11px;
  background: #f8fbfd;
  border: 1px solid #eef3f8;
  border-top: 2px solid var(--grade);
}

.gs b { display: block; font-size: 13px; color: var(--grade); font-weight: 650; }
.gs span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gs-a { --grade: var(--excellent); }
.gs-b { --grade: var(--good); }
.gs-c { --grade: var(--pass); }
.gs-d { --grade: var(--fail); }

.note-list {
  margin-top: 16px;
  padding-left: 16px;
  list-style: disc;
  font-size: 12.5px;
  line-height: 1.95;
  color: #64748b;
}

.note-list li { margin-bottom: 2px; }

.foot {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: #9aabbb;
}

.foot .sep { margin: 0 6px; }

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

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-aside {
    padding: 30px 24px 26px;
    min-height: auto;
  }
  .aside-title { margin-top: 22px; font-size: 27px; }
  .aside-desc { margin-top: 10px; font-size: 13px; line-height: 1.75; }
  .aside-points, .track-art { display: none; }
  .aside-foot { margin-top: 18px; }
  .auth-main { padding: 34px 22px 46px; place-items: start center; }
  .auth-head h2 { font-size: 24px; }
}

@media (max-width: 720px) {
  .wrap { padding: 18px 14px 36px; }
  .hero { flex-direction: column; align-items: stretch; gap: 6px; padding: 22px 20px 20px; border-radius: 18px; }
  .ring-wrap { width: 138px; height: 138px; margin: 0 auto; }
  .ring-num { font-size: 34px; }
  .hero-body { text-align: center; }
  .hero-title { justify-content: center; margin-top: 12px; }
  .hero-title h1 { font-size: 24px; }
  .hero-meta { font-size: 12.5px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: 16px; }
  .stat b { font-size: 17px; }
  .block { margin-top: 26px; }
  .block-head { flex-direction: column; gap: 3px; }
  .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .item { padding: 13px 12px 12px; border-radius: 14px; }
  .item-name { font-size: 12.5px; }
  .item-value { font-size: 22px; margin-top: 8px; }
  .item-value small { font-size: 11px; }
  .tag { font-size: 10.5px; padding: 2px 6px; }
  .item-sub { font-size: 10.5px; }
  .item-foot { font-size: 10.5px; }
  .grade-scale { grid-template-columns: repeat(2, 1fr); }
  .chart-panel { padding: 14px 6px 6px; }
  .nav-in { height: 58px; padding: 0 14px; }
  .nav-brand span { display: none; }
  .btn.ghost { padding: 0 10px; }
}

@media (max-width: 334px) {
  .item-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================
   打印
   ========================================================= */
@media print {
  @page { size: A4; margin: 14mm 12mm; }

  body { background: #fff; }

  .nav { position: static; background: #fff; border-bottom: 1px solid #ddd; }
  .nav-actions { display: none; }

  .wrap { max-width: none; padding: 10px 0 0; }

  .hero, .item, .panel {
    box-shadow: none !important;
    border: 1px solid #dfe6ee;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .hero { animation: none; }
  .ring-fill { transition: none; filter: none; }

  .item { animation: none; }
  .item:hover { transform: none; }

  .block { margin-top: 18px; }
  .foot { margin-top: 16px; }
}
