* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f5f7;
  color: #1f2329;
  font-size: 14px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
header {
  background: #26215c;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 { font-size: 16px; margin: 0; font-weight: 500; }
header .hint { font-size: 12px; opacity: 0.8; }
.tabs { display: flex; gap: 6px; padding: 10px 12px 0; }
.tab {
  flex: 1;
  padding: 10px 0;
  border: none;
  background: #e6e7eb;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-size: 14px;
  color: #444;
}
.tab.active { background: #fff; color: #26215c; font-weight: 500; }
main { background: #fff; margin: 0 12px 40px; padding: 18px; border-radius: 0 8px 8px 8px; }
.view { display: none; }
.view.active { display: block; }
label { display: block; margin: 12px 0 4px; font-size: 13px; color: #444; }
label .req { color: #d85a30; }
input, select, textarea {
  width: 100%;
  padding: 11px 10px;
  border: 1px solid #d0d3d9;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > div { flex: 1; min-width: 140px; }
button.primary {
  margin-top: 18px;
  width: 100%;
  background: #534ab7;
  color: #fff;
  border: none;
  padding: 13px 22px;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
}
button.primary:hover { background: #3c3489; }
.att-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.att-controls > div { flex: 1; min-width: 130px; }
.stu-list { margin-top: 14px; border-top: 1px solid #eee; }
.stu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px;
  border-bottom: 1px solid #f0f0f0;
  gap: 8px;
}
.stu-row .name { font-weight: 500; font-size: 15px; }
.stu-row .meta { font-size: 12px; color: #888; }
.radios { display: flex; gap: 10px; flex-shrink: 0; }
.radios label { margin: 0; display: flex; align-items: center; gap: 3px; font-size: 13px; color: #333; }
.radios input { width: auto; }
.card {
  border: 1px solid #e3e5ea;
  border-radius: 10px;
  padding: 14px;
  margin-top: 14px;
}
.card .field { display: flex; gap: 10px; align-items: center; margin: 8px 0; }
.card .field .k { width: 64px; color: #666; font-size: 13px; flex-shrink: 0; }
.card .field .v { flex: 1; }
.actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.actions button { padding: 10px 14px; border-radius: 8px; border: 1px solid #d0d3d9; background: #fff; cursor: pointer; font-size: 14px; }
.actions button.danger { color: #a32d2d; border-color: #e24b4b; }
.actions button.warn { color: #854f0b; border-color: #ef9f27; }
.actions button.ok { color: #0f6e56; border-color: #1d9e75; }
.toast {
  position: fixed; left: 50%; top: 20px; transform: translateX(-50%);
  background: #26215c; color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 13px; opacity: 0; transition: opacity .3s; pointer-events: none;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; }
.muted { color: #999; font-size: 12px; }
.empty { color: #999; padding: 20px 0; }

/* 手机竖屏适配 */
@media (max-width: 600px) {
  .row { flex-direction: column; gap: 0; }
  .row > div { min-width: 0; }
  .att-controls { flex-direction: column; align-items: stretch; }
  .att-controls > div { min-width: 0; }
  .stu-row { flex-direction: column; align-items: stretch; }
  .radios { justify-content: space-around; margin-top: 8px; }
  .card .field { flex-direction: column; align-items: stretch; }
  .card .field .k { width: auto; }
}
