/* Kind Score · 教育浅蓝弥漫光 · 通用令牌与组件 */
:root {
  --bg: #F2F8FF;
  --surface: #FFFFFF;
  --surface-alt: #EAF3FF;
  --ink: #1E3A5F;
  --ink-soft: #34547A;
  --muted: #6C89AC;
  --soft: #9BB4D0;
  --line: #DBE9F8;
  --brand: #2E90FA;
  --brand-dark: #1C7AE0;
  --cyan: #22BFC4;
  --mint: #16B8A6;
  --violet: #8B7CF6;
  --amber: #F0A020;
  --brand-soft: #DCEBFF;
  --cyan-soft: #D5F4F5;
  --mint-soft: #D6F5EE;
  --violet-soft: #EAE6FF;
  --amber-soft: #FFF1D8;
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 30px;
  --r-xl: 40px;
  --r-pill: 999px;
  --shadow-soft: 0 12px 32px -14px rgba(30, 58, 95, .18);
  --shadow-card: 0 20px 48px -20px rgba(30, 58, 95, .26);
  --shadow-brand: 0 12px 26px -10px rgba(46, 144, 250, .55);
  --sans: "Quicksand", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.2, .7, .3, 1);
  --dur-fast: .3s;
  --dur-base: .5s;
  --dur-slow: .8s;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-dark); text-decoration: none; }

.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora span { position: absolute; display: block; border-radius: 50%; filter: blur(70px); will-change: transform; }
.aurora .b1 { width: 48vw; height: 48vw; min-width: 380px; min-height: 380px; top: -14%; left: -10%; opacity: .5;
  background: radial-gradient(circle at 32% 32%, #6DB4FF, rgba(109, 180, 255, 0) 68%); animation: drift-a 22s var(--ease-out) infinite alternate; }
.aurora .b2 { width: 42vw; height: 42vw; min-width: 320px; min-height: 320px; top: 4%; right: -12%; opacity: .45;
  background: radial-gradient(circle at 60% 40%, #5FE0E4, rgba(95, 224, 228, 0) 70%); animation: drift-b 27s var(--ease-out) infinite alternate; }
.aurora .b3 { width: 40vw; height: 40vw; min-width: 300px; min-height: 300px; bottom: -16%; left: 24%; opacity: .42;
  background: radial-gradient(circle at 50% 50%, #A99BFF, rgba(169, 155, 255, 0) 70%); animation: drift-c 31s var(--ease-out) infinite alternate; }
.aurora .b4 { width: 28vw; height: 28vw; min-width: 220px; min-height: 220px; bottom: 6%; right: 4%; opacity: .28;
  background: radial-gradient(circle at 50% 50%, #FFD88A, rgba(255, 216, 138, 0) 68%); animation: drift-b 24s var(--ease-out) infinite alternate-reverse; }
@keyframes drift-a { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(6vw,4vh,0) scale(1.12); } }
@keyframes drift-b { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(-5vw,6vh,0) scale(.92); } }
@keyframes drift-c { from { transform: translate3d(0,0,0) scale(.95); } to { transform: translate3d(4vw,-5vh,0) scale(1.1); } }

.page { position: relative; z-index: 1; min-height: 100vh; padding: 22px clamp(14px, 3vw, 40px) 48px; }
.wrap { width: 100%; max-width: none; margin: 0; }

.topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 13px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-soft); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: .2px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--cyan)); box-shadow: var(--shadow-brand); font-size: 20px; }
.brand-text { font-size: 19px; }
.brand-sub { font-size: 12.5px; color: var(--muted); font-weight: 700; }
.topbar .grow { flex: 1; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 26px; }
.card-soft { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.card + .card { margin-top: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 12px 22px;
  border: 0; border-radius: var(--r-pill); font-weight: 800; font-size: 15.5px;
  transition: transform var(--dur-fast) var(--ease-spring), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-primary:hover:not(:disabled) { background: var(--brand-dark); transform: translateY(-2px) scale(1.02); }
.btn-soft { background: var(--surface); color: var(--ink-soft); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-danger { background: #FFF0EE; color: #C6442E; border: 1px solid #FFD9D2; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn-block { width: 100%; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 800; white-space: nowrap; }
.badge-brand { background: var(--brand-soft); color: var(--brand-dark); }
.badge-mint { background: var(--mint-soft); color: #0C7768; }
.badge-amber { background: var(--amber-soft); color: #9A6206; }
.badge-violet { background: var(--violet-soft); color: #5B49C4; }
.badge-cyan { background: var(--cyan-soft); color: #0E777C; }

.progress { height: 12px; border-radius: var(--r-pill); background: var(--surface-alt); border: 1px solid var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand), var(--cyan)); box-shadow: 0 0 12px rgba(46, 144, 250, .5);
  transition: width var(--dur-slow) var(--ease-spring); }

.input, .textarea, .select { width: 100%; min-height: 48px; padding: 11px 16px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--surface); outline: none; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.textarea { min-height: 110px; resize: vertical; line-height: 1.6; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
label.field { display: block; font-size: 14px; font-weight: 800; color: var(--ink-soft); margin: 0 0 8px 4px; }
.field + .input, .field + .textarea, .field + .select { margin-bottom: 14px; }

.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; }
.wrap-text { white-space: pre-wrap; word-break: break-word; }
.tiny { font-size: 12.5px; color: var(--muted); }
.sub { font-size: 14px; color: var(--muted); }
.hidden { display: none !important; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); background: var(--surface-alt); border-radius: var(--r-md); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

.section-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; margin: 0 0 14px; }
.section-title .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--cyan)); box-shadow: 0 0 0 5px var(--brand-soft); }

.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.tab { min-height: 44px; padding: 10px 20px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-soft); font-weight: 800; transition: all var(--dur-fast); }
.tab:hover { transform: translateY(-2px); }
.tab.active { background: linear-gradient(100deg, var(--brand), var(--cyan)); color: #fff; border-color: transparent; box-shadow: var(--shadow-brand); }

.submit-bar { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 20px; }
.submit-bar .sub { text-align: center; }
.submit-bar .btn-submit { width: 100%; min-height: 64px; border-radius: var(--r-lg); font-size: 18px;
  background: linear-gradient(100deg, var(--brand), var(--brand-dark)); }

.spin { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.pulse { animation: pulse 1.4s ease-in-out infinite; }

.toast-wrap { position: fixed; z-index: 9999; top: 24px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { padding: 12px 22px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow-card);
  animation: toast-in .35s var(--ease-spring); max-width: 90vw; text-align: center; }
.toast.ok { background: linear-gradient(100deg, #0F9E8E, #16B8A6); }
.toast.err { background: linear-gradient(100deg, #C6442E, #E27050); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.94); } to { opacity: 1; transform: none; } }

.modal-mask { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 20px;
  background: rgba(20, 42, 70, .45); backdrop-filter: blur(5px); }
.modal { width: 100%; max-width: 620px; max-height: 88vh; overflow: auto; background: var(--surface);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: 26px; }
.modal.wide { max-width: 980px; }
.modal h3 { margin: 0 0 10px; font-size: 21px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat-card { padding: 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-soft); }
.stat-card .num { font-size: 30px; font-weight: 800; color: var(--brand-dark); line-height: 1.2; }
.stat-card .label { font-size: 13.5px; color: var(--muted); font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; vertical-align: top; }
th { color: var(--muted); font-size: 13px; font-weight: 800; }
tr:last-child td { border-bottom: 0; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .stat-grid { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: var(--r-md); }
  .section-title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
