* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; color: #2c2c2a; background: #f7f6f3; font-size: 14px; line-height: 1.6; }
a { color: #185fa5; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; font-weight: 500; margin: 0 0 20px; }
h2 { font-size: 16px; font-weight: 500; margin: 0 0 12px; }
h3 { font-size: 14px; font-weight: 500; margin: 0 0 8px; }
small { font-weight: 400; color: #888780; }

.topbar { display: flex; align-items: center; gap: 24px; padding: 0 24px; height: 56px; background: #fff; border-bottom: 1px solid #e5e3de; }
.topbar .brand { font-weight: 500; color: #2c2c2a; }
.topbar nav { display: flex; gap: 18px; flex: 1; }
.topbar nav a { color: #5f5e5a; }
.topbar nav a.active { color: #185fa5; border-bottom: 2px solid #185fa5; padding-bottom: 2px; }
.top-right { display: flex; gap: 14px; align-items: center; color: #5f5e5a; }
.container { max-width: 1100px; margin: 24px auto; padding: 0 20px; }
section { background: #fff; border: 1px solid #e5e3de; border-radius: 8px; padding: 18px 20px; margin-bottom: 18px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eeeae3; vertical-align: top; }
th { color: #5f5e5a; font-weight: 500; background: #faf9f6; }
tr:last-child td { border-bottom: none; }
.empty { color: #888780; text-align: center; padding: 24px; }
.hint { color: #888780; font-size: 12px; margin: 6px 0 12px; }
.error { color: #a32d2d; font-size: 13px; margin: 8px 0; }
.ok { color: #0f6e56; font-size: 13px; margin: 8px 0; }
.summary { margin: 12px 0; color: #5f5e5a; }

input, select, textarea, button { font-family: inherit; font-size: 14px; }
input, select, textarea { width: 100%; border: 1px solid #d8d5cd; border-radius: 6px; padding: 7px 10px; background: #fff; color: #2c2c2a; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #378add; }
textarea { resize: vertical; }
label { display: block; color: #5f5e5a; }
label.chk { display: flex; align-items: center; gap: 8px; }
label.chk input { width: auto; }
button { border: 1px solid #185fa5; background: #185fa5; color: #fff; border-radius: 6px; padding: 7px 14px; cursor: pointer; }
button:hover { background: #0c447c; }
button:disabled { opacity: .6; cursor: wait; }
.link-btn { border: none; background: none; color: #185fa5; padding: 0; cursor: pointer; font-size: 14px; }
.link-btn:hover { background: none; text-decoration: underline; }
.link-btn.danger { color: #a32d2d; }
.btn-ghost { display: inline-block; border: 1px solid #d8d5cd; border-radius: 6px; padding: 7px 14px; color: #5f5e5a; }
.actions { display: flex; gap: 12px; margin: 18px 0; }

.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form input, .inline-form select { width: auto; min-width: 180px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: span 3; }
.narrow-form { max-width: 360px; display: grid; gap: 14px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.card { background: #fff; border: 1px solid #e5e3de; border-radius: 8px; padding: 16px 20px; }
.card span { display: block; color: #888780; font-size: 12px; }
.card strong { display: block; font-size: 26px; font-weight: 500; margin-top: 4px; }

.q-card { border: 1px solid #e5e3de; border-radius: 8px; padding: 14px; margin-bottom: 14px; background: #faf9f6; }
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.q-head strong { flex: 1; }
.q-head select { width: auto; }
.q-head button { border: 1px solid #d8d5cd; background: #fff; color: #5f5e5a; padding: 4px 10px; font-size: 12px; }
.q-head button:hover { background: #f1efe8; }
.q-head .chk { font-size: 13px; white-space: nowrap; }
.field-label { display: block; color: #5f5e5a; margin-bottom: 6px; }
.opt-list { display: grid; gap: 8px; }
.opt-row { display: flex; align-items: center; gap: 8px; }
.opt-row input { flex: 1; min-width: 0; }
.opt-del { flex: none; border: 1px solid #d8d5cd; background: #fff; color: #5f5e5a; padding: 6px 12px; font-size: 12px; }
.opt-del:hover { background: #f1efe8; }
.opt-del:disabled { opacity: .4; cursor: not-allowed; }
.opt-add { margin-top: 8px; border: 1px dashed #85b7eb; background: #e6f1fb; color: #0c447c; padding: 5px 12px; font-size: 12px; }
.opt-add:hover { background: #b5d4f4; }
.add-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.add-bar button { border: 1px dashed #85b7eb; background: #e6f1fb; color: #0c447c; }
.add-bar button:hover { background: #b5d4f4; }

.stat-block { margin: 22px 0; }
.stat-block h3 small { margin-left: 8px; }
.bar { height: 8px; background: #f1efe8; border-radius: 4px; overflow: hidden; min-width: 100px; }
.bar span { display: block; height: 100%; background: #378add; }
.text-list { list-style: none; padding: 0; }
.text-list li { border-bottom: 1px solid #eeeae3; padding: 8px 0; }
.text-list li span { color: #888780; font-size: 12px; margin-right: 10px; }

.qr-box { display: inline-block; padding: 12px; background: #fff; border: 1px solid #e5e3de; border-radius: 8px; margin: 8px 0 16px; }
.qr-box img { display: block; }
.break { word-break: break-all; }

.login-body, .fill-body { display: flex; justify-content: center; align-items: flex-start; min-height: 100vh; padding: 40px 16px; background: #f7f6f3; }
.login-card, .fill-card { width: 100%; max-width: 520px; background: #fff; border: 1px solid #e5e3de; border-radius: 12px; padding: 28px; }
.login-card form { display: grid; gap: 16px; margin: 20px 0; }
.fill-card h1 { color: #185fa5; text-align: center; font-size: 20px; }
.fill-school { color: #888780; margin: 0 0 24px; text-align: center; }
.brand-logo { display: block; height: 22px; width: auto; margin: 0 0 14px; }
.question { border-top: 1px solid #eeeae3; padding: 18px 0; }
.q-title { font-size: 15px; margin-bottom: 12px; }
.req { color: #a32d2d; font-size: 12px; margin-left: 8px; }
.opt { color: #888780; font-size: 12px; margin-left: 8px; }
.options { display: grid; gap: 8px; }
.option { display: flex; align-items: center; gap: 10px; border: 1px solid #e5e3de; border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.option input { width: 18px; height: 18px; }
.fill-card button[type="submit"] { width: 100%; padding: 12px; margin-top: 12px; font-size: 15px; }
.thanks { text-align: center; }

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 10px; }
  .topbar nav { flex-wrap: wrap; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: span 1; }
  .cards { grid-template-columns: 1fr; }
  .container { margin: 14px auto; }
}
