:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #1e2028;
  background: #f7f8fc;
  --surface: #ffffff;
  --ink: #1e2028;
  --muted: #565c6d;
  --line: #e3e6ee;
  --accent: #ce1237;
  --accent-soft: #fff0f3;
  --focus: #ed395b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 8px; padding: .55rem .9rem; min-height: 40px; }
button:hover { border-color: #b9bfcc; }
button:disabled { cursor: default; opacity: .58; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.primary { background: var(--accent); color: white; border-color: var(--accent); font-weight: 650; }
.primary:hover { background: #af0e2d; border-color: #af0e2d; }
.plain { background: transparent; border-color: transparent; }
.quiet { color: var(--muted); white-space: nowrap; font-size: .875rem; }
.quiet:hover { color: var(--accent); text-decoration: underline; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.shell { width: min(100% - 2rem, 1100px); margin-inline: auto; }
.topbar-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.brand { display: inline-flex; gap: .7rem; align-items: center; font-weight: 680; line-height: 1.25; }
.mark { display: grid; place-items: center; background: #ff2442; color: white; width: 34px; height: 34px; border-radius: 10px; flex: none; font-size: .95rem; }
.member-main { max-width: 560px; padding: clamp(2.1rem, 7vw, 4.25rem) 0 4rem; }
.admin-main { padding: 2.1rem 0 4rem; }
.intro { margin-bottom: 1.4rem; }
h1 { margin: 0; font-size: clamp(1.85rem, 5vw, 2.55rem); font-weight: 750; line-height: 1.14; letter-spacing: -.035em; }
.intro p { color: var(--muted); margin: .65rem 0 0; line-height: 1.55; }
h2 { margin: 0; font-size: 1.15rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 3px 14px #1d294207; overflow: hidden; min-width: 0; }
.card + .card { margin-top: 1rem; }
.card-body { padding: clamp(1rem, 4vw, 1.65rem); }
.login-card { max-width: 430px; }
.login-card h2 { margin-bottom: 1.1rem; }
.tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 .6rem; }
.tab { flex: 1; min-height: 54px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); padding: .5rem .3rem; }
.tab.active { border-bottom-color: var(--accent); color: var(--accent); font-weight: 650; }
.tab:hover { background: #fafaff; }
.form-layout, #member-form { display: grid; gap: .95rem; }
label { display: grid; gap: .4rem; font-size: .92rem; font-weight: 600; }
input:not([type="checkbox"]), select, textarea {
  width: 100%; min-width: 0; border: 1px solid #cfd4df; border-radius: 8px; background: var(--surface);
  padding: .6rem .7rem; color: var(--ink); font-size: 1rem; min-height: 42px;
}
select { appearance: none; padding-right: 2.15rem; background-image: linear-gradient(45deg, transparent 50%, #626778 50%), linear-gradient(135deg, #626778 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.check, .inline { display: flex; align-items: center; gap: .55rem; }
.compact { white-space: nowrap; color: var(--muted); }
.member-submit { min-height: 45px; }
.feedback { color: var(--muted); font-size: .9rem; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
.feedback.error { color: #ab1030; }
.feedback:empty { display: none; }
.result { background: var(--accent-soft); border: 1px solid #f4cbd4; border-radius: 10px; padding: 1rem; margin-top: 1.1rem; }
.result p { margin: .45rem 0 .75rem; color: var(--muted); line-height: 1.5; }
.result input, #individual-code { font-family: ui-monospace, monospace; font-size: .85rem; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.metrics div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .85rem 1rem; }
.metrics span { display: block; color: var(--muted); font-size: .875rem; }
.metrics strong { display: block; font-size: 1.65rem; margin-top: .25rem; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
#admin-feedback { margin-bottom: .85rem; }
.section-header { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .9rem 1rem; }
.section-tools { padding: .7rem 1rem; }
.section-tools input { max-width: 230px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; }
th, td { padding: .7rem 1rem; border-top: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 630; background: #f9faff; white-space: nowrap; }
td { overflow-wrap: anywhere; }
td:last-child .inline { flex-wrap: wrap; min-width: 92px; }
td button { font-size: .875rem; min-height: 34px; padding: .32rem .55rem; }
.empty { text-align: center; padding: 1.35rem 1rem; color: var(--muted); }
.status { display: inline-block; background: #edf0f6; color: #41495d; border-radius: 5px; font-size: .875rem; padding: .17rem .36rem; white-space: nowrap; }
.status.on { background: #e8f7ee; color: #125838; }
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; width: min(100% - 2rem, 500px); max-height: calc(100% - 2rem); box-shadow: 0 12px 44px #12182544; }
dialog::backdrop { background: #1a1b2b77; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .55rem; margin-top: .3rem; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(100%); overflow: hidden; }
@media (max-width: 580px) {
  .metrics { gap: .45rem; }
  .metrics div { padding: .6rem; }
  .metrics strong { font-size: 1.4rem; }
  .topbar-inner { min-height: 62px; }
  .admin-main { padding-top: 1.4rem; }
  th, td { padding: .6rem .75rem; }
}
