/* ==========================================================================
   河南工学院第二届长三角校友联谊会 · 报名系统
   设计基调：高校蓝 + 象牙白 + 柔和金色点缀；移动优先，兼容微信内置浏览器
   ========================================================================== */

:root {
  --blue: #0b3d91;
  --blue-deep: #082b66;
  --blue-mid: #1d55b8;
  --blue-soft: #e8eefa;
  --blue-line: #d3ddf2;
  --ivory: #faf7ef;
  --gold: #c9a227;
  --gold-soft: #f6edd2;
  --ink: #1b2430;
  --ink-soft: #3d4a5c;
  --muted: #6b7688;
  --line: #e3e7ee;
  --white: #ffffff;
  --red: #b3261e;
  --red-soft: #fdecea;
  --green: #1f7a4d;
  --green-soft: #e7f5ec;
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(11, 61, 145, 0.08);
  --shadow-soft: 0 2px 10px rgba(11, 61, 145, 0.06);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background-color: var(--ivory);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(11, 61, 145, 0.06), transparent 42%),
    radial-gradient(circle at 88% 22%, rgba(201, 162, 39, 0.08), transparent 38%);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--blue); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 99;
  background: var(--white);
  padding: 8px 14px;
  border-radius: 999px;
}
.skip-link:focus { left: 8px; }

.demo-strip {
  background: linear-gradient(90deg, #7f1d1d, #b3261e);
  color: #fff7ed;
  font-size: 12.5px;
  text-align: center;
  padding: 6px 12px;
  letter-spacing: 0.02em;
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% -10%, rgba(201, 162, 39, 0.35), transparent 46%),
    radial-gradient(circle at 8% 110%, rgba(29, 85, 184, 0.55), transparent 55%),
    linear-gradient(155deg, var(--blue) 0%, var(--blue-deep) 62%, #061f4a 100%);
  color: #fff;
  padding: 26px 20px 30px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -42% auto;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 50%;
  pointer-events: none;
}

.hero__inner { max-width: 720px; margin: 0 auto; position: relative; z-index: 1; }

.hero__badge {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
}

.hero__badge img { width: 46px; height: 46px; }

.hero h1 {
  font-size: clamp(22px, 5.6vw, 30px);
  line-height: 1.35;
  margin: 16px 0 6px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero__theme {
  margin: 0;
  font-size: 14.5px;
  color: var(--gold);
  letter-spacing: 0.16em;
  font-weight: 500;
}

.hero__meta {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.9);
}

.hero__meta li { display: flex; gap: 9px; align-items: flex-start; }
.hero__meta .ico { flex: none; width: 18px; opacity: 0.9; }

.hero__deadline {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(201, 162, 39, 0.5);
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
}

/* ---------------- Layout ---------------- */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 18px 16px;
  margin-bottom: 16px;
}

.card__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card__title::before {
  content: "";
  width: 4px;
  height: 17px;
  border-radius: 2px;
  background: linear-gradient(var(--gold), var(--blue-mid));
}

.card__sub { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }

/* ---------------- Intro ---------------- */
.intro-card { padding-bottom: 12px; }

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 4px 0 12px;
}

@media (min-width: 560px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}

.info-item {
  background: var(--blue-soft);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.info-item strong { display: block; color: var(--blue); font-size: 12px; margin-bottom: 2px; }

.schedule { margin: 6px 0 0; padding: 0; list-style: none; }

.schedule__day { margin-bottom: 10px; }
.schedule__day > strong { color: var(--blue); font-size: 13.5px; }
.schedule__items { list-style: none; margin: 6px 0 0; padding: 0; }
.schedule__items li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  padding: 3px 0;
}
.schedule__items .t { flex: none; width: 96px; color: var(--muted); font-variant-numeric: tabular-nums; }

.note-line { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.fee-hint {
  margin-top: 10px;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #6b5514;
}

details.fold { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; }
details.fold summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  list-style: none;
}
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: " ＋"; color: var(--gold); }
details.fold[open] summary::after { content: " －"; }

/* ---------------- Steps ---------------- */
.steps {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 4px 0 14px;
  padding: 0;
}

.steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  min-width: 0;
}

.steps .dot {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.steps li.is-active {
  color: var(--blue);
  border-color: var(--blue-line);
  background: #fff;
  box-shadow: var(--shadow-soft);
  font-weight: 600;
}
.steps li.is-active .dot { background: var(--blue); color: #fff; }
.steps li.is-done { color: var(--green); border-color: #cfe8db; background: var(--green-soft); }
.steps li.is-done .dot { background: var(--green); color: #fff; }
.steps .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- Form ---------------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.form-section { margin-top: 6px; }

.form-section + .form-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.form-section__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-section__title .tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
}

.field { margin-bottom: 14px; }

.field > label,
.field-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.req { color: var(--red); margin-left: 2px; }
.opt { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }

input[type="text"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="date"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cdd5e3;
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  min-height: 44px;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(29, 85, 184, 0.14);
}

input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--red);
  background: #fffafa;
}

.field-hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.field-error {
  display: none;
  font-size: 12.5px;
  color: var(--red);
  margin: 6px 0 0;
  align-items: flex-start;
  gap: 4px;
}
.field-error.is-visible { display: flex; }

.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }

.radio-chip { position: relative; flex: 1 1 auto; min-width: 96px; }
.radio-chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.radio-chip span {
  display: block;
  text-align: center;
  border: 1px solid #cdd5e3;
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  font-size: 14px;
  color: var(--ink-soft);
  background: #fff;
  transition: all 0.15s;
}
.radio-chip input:checked + span {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--blue);
}
.radio-chip input:focus-visible + span { outline: 2px solid var(--blue-mid); outline-offset: 2px; }

.radio-line { display: flex; flex-wrap: wrap; gap: 14px; padding: 4px 0; }
.radio-line label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.radio-line input { width: 18px; height: 18px; accent-color: var(--blue); }

.checkbox-line { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-line input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--blue);
  flex: none;
}
.checkbox-line label { font-size: 13.5px; line-height: 1.55; }

/* ---------------- Companions ---------------- */
.companion-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.companion-toolbar .count { font-size: 12.5px; color: var(--muted); }

.btn-add {
  border: 1px dashed var(--blue-mid);
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
}
.btn-add:hover { background: #dde7fb; }

.companion-list { display: grid; gap: 12px; }
.companion-empty {
  font-size: 12.5px;
  color: var(--muted);
  background: var(--ivory);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.companion-card {
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
  background: #fbfcff;
  padding: 12px 12px 4px;
  position: relative;
}
.companion-card legend {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--blue);
  padding: 0 6px;
}
.companion-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  padding: 6px 8px;
  min-height: 32px;
}
.companion-remove:hover { color: var(--red); }
.companion-card .grid-2 { display: grid; gap: 10px; }
@media (min-width: 480px) { .companion-card .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------------- Buttons ---------------- */
.btn {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  min-height: 48px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(11, 61, 145, 0.28);
}
.btn-primary:hover { box-shadow: 0 10px 26px rgba(11, 61, 145, 0.34); }

.btn-gold {
  background: linear-gradient(135deg, #b8901f, var(--gold));
  color: #221a02;
  box-shadow: 0 8px 20px rgba(201, 162, 39, 0.3);
}

.btn-ghost {
  background: #fff;
  color: var(--blue);
  border-color: var(--blue-line);
}
.btn-ghost:hover { background: var(--blue-soft); }

.btn-danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: #f2c9c5;
}
.btn-sm { font-size: 13px; padding: 8px 12px; min-height: 38px; }
.btn-block { width: 100%; }

.actions-row { display: flex; gap: 10px; margin-top: 16px; }
.actions-row .btn { flex: 1; }

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 18px -16px -18px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(250, 247, 239, 0.98) 62%, rgba(250, 247, 239, 0));
}

.form-alert {
  display: none;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}
.form-alert.is-visible { display: block; }
.form-alert--error { background: var(--red-soft); color: #7f1d1d; border-color: #f2c9c5; }
.form-alert--info { background: var(--blue-soft); color: var(--blue-deep); border-color: var(--blue-line); }
.form-alert--warn { background: var(--gold-soft); color: #6b5514; border-color: #e7d8a8; }

/* ---------------- Review ---------------- */
.review-group { margin-bottom: 16px; }
.review-group h3 {
  font-size: 13px;
  color: var(--blue);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.review-group h3::before {
  content: "";
  width: 3px;
  height: 14px;
  background: var(--gold);
  border-radius: 2px;
}
.review-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.review-list li {
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  border-bottom: 1px solid #f0f2f7;
}
.review-list li:last-child { border-bottom: 0; }
.review-list .k { flex: none; width: 96px; color: var(--muted); }
.review-list .v { flex: 1; color: var(--ink); word-break: break-all; }
.review-companion {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  background: #fbfcff;
}
.review-companion strong { color: var(--blue); margin-right: 8px; }
.review-companion .meta { color: var(--muted); }

/* ---------------- Fee / payment ---------------- */
.fee-box {
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #f8faff, #fff);
  padding: 14px;
}
.fee-box h3 { margin: 0 0 6px; font-size: 14px; color: var(--blue); }
.fee-box ul { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--ink-soft); }
.fee-box li + li { margin-top: 4px; }

.payment-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: #fff;
}
.payment-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.payment-card__head h4 { margin: 0; font-size: 14px; }
.payment-region { font-size: 12.5px; color: var(--muted); }

.payment-figure {
  position: relative;
  margin: 0;
  border: 2px dashed #e0b4b0;
  border-radius: var(--radius);
  padding: 10px;
  background: repeating-linear-gradient(45deg, #fff 0 10px, #fdf6f5 10px 20px);
}
.payment-figure img { width: 100%; max-width: 360px; margin: 0 auto; border-radius: var(--radius-sm); }
.payment-figure figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--red);
  font-weight: 600;
}
.payment-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(179, 38, 30, 0.3);
}

.payment-notice {
  margin-top: 10px;
  background: var(--red-soft);
  color: #7f1d1d;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.6;
}

.status-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 12.5px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
}
.chip--warn { background: var(--gold-soft); border-color: #e7d8a8; color: #6b5514; }
.chip--ok { background: var(--green-soft); border-color: #cfe8db; color: var(--green); }
.chip--info { background: var(--blue-soft); border-color: var(--blue-line); color: var(--blue); }
.chip--muted { background: #f3f4f6; color: var(--muted); }
.chip--danger { background: var(--red-soft); border-color: #f2c9c5; color: var(--red); }

/* ---------------- Success ---------------- */
.success-hero { text-align: center; padding: 8px 0 4px; }
.success-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  border: 2px solid #b7e0c8;
  color: var(--green);
  font-size: 34px;
}
.success-hero h2 { margin: 0 0 4px; font-size: 20px; color: var(--blue); }
.success-hero p { margin: 0; font-size: 13px; color: var(--muted); }

.code-box {
  margin: 16px 0 12px;
  border: 1px solid var(--blue-line);
  background: linear-gradient(180deg, var(--blue-soft), #fff);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.code-box .k { font-size: 12px; color: var(--muted); letter-spacing: 0.14em; }
.code-box .code {
  font-size: clamp(24px, 7vw, 32px);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}
.code-box .hint { font-size: 12px; color: var(--muted); }

.next-steps { margin: 14px 0 0; padding: 0; list-style: none; counter-reset: step; }
.next-steps li {
  position: relative;
  padding: 0 0 12px 34px;
  font-size: 13px;
  color: var(--ink-soft);
  counter-increment: step;
}
.next-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

/* ---------------- Lookup ---------------- */
.lookup-form { display: grid; gap: 10px; margin-top: 10px; }
.lookup-result { margin-top: 12px; display: none; }
.lookup-result.is-visible { display: block; }

/* ---------------- Footer ---------------- */
footer.site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 40px;
  color: var(--muted);
  font-size: 12px;
}
footer .footer-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
footer h2 { font-size: 13px; color: var(--ink-soft); margin: 0 0 8px; }
footer ul { margin: 0 0 10px; padding-left: 16px; }
footer li { margin: 2px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin: 0; padding: 0; list-style: none; }
.contact-grid li { font-size: 12px; }
.contact-grid .region { color: var(--blue); font-weight: 600; margin-right: 4px; }
.contact-grid a { text-decoration: none; }

/* ---------------- Admin ---------------- */
.admin-body { background: #f4f6fa; }
.admin-topbar {
  background: linear-gradient(120deg, var(--blue-deep), var(--blue));
  color: #fff;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.admin-topbar .brand { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.admin-topbar .brand img { width: 32px; height: 32px; }
.admin-topbar .who { font-size: 12.5px; color: rgba(255, 255, 255, 0.86); display: flex; align-items: center; gap: 10px; }
.admin-topbar .btn { min-height: 34px; padding: 6px 12px; font-size: 12.5px; }

.admin-shell { max-width: 1240px; margin: 0 auto; padding: 16px; }

.admin-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  margin-bottom: 16px;
}

.admin-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.admin-section__head h2 { margin: 0; font-size: 15px; color: var(--blue); }
.admin-section__head .tools { display: flex; gap: 8px; flex-wrap: wrap; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: linear-gradient(180deg, #fbfcff, #fff);
}
.stat-card .k { font-size: 12px; color: var(--muted); }
.stat-card .v { font-size: 26px; font-weight: 800; color: var(--blue); line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-card .s { font-size: 11.5px; color: var(--muted); }
.stat-card--gold { background: linear-gradient(180deg, #fffdf5, #fff); }
.stat-card--gold .v { color: #8a6d10; }
.stat-card--muted .v { color: var(--muted); font-size: 20px; }

.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; align-items: end; }
.filters label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.filters input, .filters select { min-height: 38px; font-size: 13.5px; padding: 7px 10px; }
.filters .filter-actions { display: flex; gap: 8px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 980px;
}
table.data th, table.data td { padding: 9px 10px; text-align: left; border-bottom: 1px solid #eef1f7; vertical-align: middle; }
table.data thead th {
  background: #f5f7fc;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
table.data tbody tr:hover { background: #f9fbff; }
table.data tbody tr.is-cancelled { color: var(--muted); background: #fbfbfc; }
table.data tbody tr.is-cancelled .name { text-decoration: line-through; }
table.data .mono { font-variant-numeric: tabular-nums; }
table.data .name { font-weight: 600; }
.table-empty { padding: 28px; text-align: center; color: var(--muted); font-size: 13px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.pager .info { font-size: 12.5px; color: var(--muted); }
.pager .buttons { display: flex; gap: 8px; }

/* Detail drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 40;
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(560px, 100vw);
  background: #fff;
  box-shadow: -12px 0 40px rgba(10, 20, 40, 0.2);
  transform: translateX(102%);
  transition: transform 0.22s ease;
  z-index: 41;
  display: flex;
  flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.drawer__head h2 { margin: 0; font-size: 16px; color: var(--blue); }
.drawer__body { padding: 16px; overflow-y: auto; flex: 1; }
.drawer__foot { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; background: #fbfcff; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 13px; margin: 0 0 14px; }
.detail-grid dt { color: var(--muted); font-size: 12px; }
.detail-grid dd { margin: 0; color: var(--ink); word-break: break-all; }
.detail-block { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 12px; }
.detail-block h3 { margin: 0 0 8px; font-size: 13px; color: var(--blue); }

.edit-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.edit-grid .field { margin: 0; }
.edit-grid .field--full { grid-column: 1 / -1; }
.edit-grid label { font-size: 12px; }
.edit-grid input, .edit-grid select, .edit-grid textarea { min-height: 38px; font-size: 13.5px; padding: 7px 10px; }

.companion-line {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed #eef1f7;
}
.companion-line:last-child { border-bottom: 0; }
.companion-line .badge { font-size: 11px; background: var(--blue-soft); color: var(--blue); border-radius: 999px; padding: 1px 8px; }

.audit-list { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.audit-list li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #eef1f7; }
.audit-list .at { color: var(--muted); white-space: nowrap; }
.audit-list .actor { color: var(--blue); white-space: nowrap; }
.audit-list .what { flex: 1; color: var(--ink-soft); word-break: break-all; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 38px;
}
.tab.is-active { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }

.channel-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.channel-table th, .channel-table td { padding: 9px 10px; border-bottom: 1px solid #eef1f7; text-align: left; }
.channel-table th { font-size: 12px; color: var(--muted); font-weight: 600; }
.channel-preview { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--ivory); }

/* Login */
.login-body {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(circle at 78% 12%, rgba(201, 162, 39, 0.22), transparent 42%),
    linear-gradient(160deg, #0b3d91, #061f4a);
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 20px;
  padding: 26px 22px;
  box-shadow: 0 24px 60px rgba(4, 16, 40, 0.35);
}
.login-card__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-card__brand img { width: 40px; height: 40px; }
.login-card h1 { font-size: 18px; margin: 0; color: var(--blue); }
.login-card .sub { font-size: 12.5px; color: var(--muted); margin: 4px 0 18px; }
.login-card .field { margin-bottom: 12px; }
.login-card .btn { width: 100%; margin-top: 4px; }
.login-foot { margin-top: 14px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.login-error {
  display: none;
  background: var(--red-soft);
  color: #7f1d1d;
  border: 1px solid #f2c9c5;
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 12.5px;
  margin-bottom: 12px;
}
.login-error.is-visible { display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 少量排版工具类（替代内联 style，满足严格 CSP） */
.u-mt-10 { margin-top: 10px; }
.u-mt-12 { margin-top: 12px; }
.u-mt-14 { margin-top: 14px; }
.u-center { text-align: center; }
.u-center-list { justify-content: center; margin-top: 14px; }
.u-flush { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 380px) {
  .steps .label { font-size: 11px; }
  .steps li { padding: 6px 8px; gap: 6px; }
}

@media print {
  .hero, .sticky-actions, .demo-strip, footer.site-footer { display: none !important; }
}
