/* ==========================================================================
   会议报名系统 · 基础样式
   风格：极简、公文感、纸白底 + 墨黑字 + 禾绿点缀；移动端优先（微信内打开为主）。
   ========================================================================== */
:root {
  --paper: #ffffff;
  --paper-2: #fafaf8;
  --paper-3: #f4f4f1;
  --ink: #1a1a1a;
  --ink-2: #4a4a4a;
  --ink-3: #8b8b8b;
  --line: #e3e3df;
  --line-2: #eeeeea;
  --accent: #2c5a3f;      /* 禾绿，与研究会主站一致 */
  --accent-2: #3f7a56;
  --accent-soft: #eef3ef;
  --gold: #8a6d2f;        /* 麦金点缀 */
  --warn: #a4551f;
  --warn-soft: #fbf3ec;
  --danger: #8f2424;
  --danger-soft: #faf0f0;
  --ok: #2c5a3f;
  --radius: 4px;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.35; margin: 0 0 .5em; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.4em 0; }
code, .mono { font-family: var(--mono); font-size: .92em; }

.wrap { max-width: 780px; margin: 0 auto; padding: 0 18px 64px; }
.wrap-wide { max-width: 1360px; }
.hide { display: none !important; }
.center { text-align: center; }
.muted { color: var(--ink-3); font-size: 13px; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }

/* ---------------------------------------------------------------- 刊头 */
.masthead { border-bottom: 3px double var(--ink); margin-bottom: 22px; padding-top: 20px; }
.masthead .date-line {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; color: var(--ink-2); border-bottom: 1px solid var(--line);
  padding-bottom: 4px; letter-spacing: .04em;
}
.masthead .org {
  font-family: var(--serif); font-size: 13px; letter-spacing: .22em; color: var(--accent);
  margin-top: 14px;
}
.masthead h1 { font-size: 26px; margin: 2px 0 6px; letter-spacing: .02em; }
.masthead .sub { font-size: 13px; color: var(--ink-2); padding-bottom: 12px; }
.masthead.compact h1 { font-size: 20px; }
.back-link { font-size: 13px; }

/* 顶部条（工作人员/表单页） */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line); padding: 10px 18px; background: var(--paper);
  position: sticky; top: 0; z-index: 30;
}
.topbar .brand { font-family: var(--serif); font-size: 14px; letter-spacing: .06em; }
.topbar .brand span { color: var(--ink-3); font-family: var(--sans); font-size: 12px; letter-spacing: 0; margin-left: 6px; }

/* ---------------------------------------------------------------- 卡片 */
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 16px; background: var(--paper);
}
.card.flat { background: var(--paper-2); }
.card h2 { font-size: 17px; margin-bottom: 10px; }
.card h3 { font-size: 15px; }
.card-tight { padding: 12px 14px; }
.sec-label {
  font-size: 12px; letter-spacing: .18em; color: var(--accent);
  border-left: 3px solid var(--accent); padding-left: 8px; margin-bottom: 12px;
  font-family: var(--serif);
}
.notice { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; border-radius: 0 var(--radius) var(--radius) 0; }
.notice.info { border-color: var(--accent); background: var(--accent-soft); }
.notice.danger { border-color: var(--danger); background: var(--danger-soft); }

/* 会议信息表 */
.meta-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.meta-table th, .meta-table td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.meta-table th { width: 92px; font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.meta-table tr:last-child th, .meta-table tr:last-child td { border-bottom: 0; }
.notes { white-space: pre-line; font-size: 13px; color: var(--ink-2); background: var(--paper-2); padding: 12px 14px; border-radius: var(--radius); }

/* 日程 */
.sched { list-style: none; padding: 0; margin: 0; }
.sched li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px dotted var(--line); font-size: 14px; }
.sched li:last-child { border-bottom: 0; }
.sched .t { color: var(--ink-3); font-size: 12.5px; }
.sched .t b { display: block; color: var(--ink); font-weight: 600; font-size: 12.5px; }
.sched .place { color: var(--ink-3); font-size: 12.5px; }

/* ---------------------------------------------------------------- 入口 */
.entries { display: grid; gap: 12px; }
@media (min-width: 720px) { .entries.two { grid-template-columns: 1fr 1fr; } }
.entry {
  display: block; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; background: var(--paper); transition: border-color .15s, background .15s;
}
.entry:hover { border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.entry.disabled { opacity: .55; pointer-events: none; background: var(--paper-3); }
.entry .t { font-family: var(--serif); font-size: 16px; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.entry .d { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.entry .arrow { float: right; color: var(--accent); }

/* ---------------------------------------------------------------- 表单 */
.field { margin-bottom: 16px; }
.field > label, .field-label { display: block; font-size: 13.5px; margin-bottom: 6px; color: var(--ink-2); }
.req::after { content: "＊"; color: var(--danger); margin-left: 2px; }
input[type=text], input[type=tel], input[type=email], input[type=date], input[type=datetime-local],
input[type=number], input[type=password], select, textarea {
  width: 100%; padding: 10px 12px; font-size: 15px; font-family: inherit; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  appearance: none; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
input:disabled, select:disabled { background: var(--paper-3); color: var(--ink-3); }
textarea { min-height: 72px; resize: vertical; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.field .err { font-size: 12.5px; color: var(--danger); margin-top: 5px; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field.invalid input:focus { box-shadow: 0 0 0 2px var(--danger-soft); }
.field.valid input, .field.valid select { border-color: var(--ok); }
.field.valid input:focus { box-shadow: 0 0 0 2px var(--accent-soft); }
.grid-2 { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.radios { display: flex; gap: 18px; padding-top: 4px; }
.radios label, .check label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
input[type=radio], input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); flex: 0 0 auto; margin: 2px 0 0; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
legend { font-size: 13px; color: var(--accent); padding: 0 6px; font-family: var(--serif); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* 短信验证码：输入框 + 获取按钮同排 */
.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row input { flex: 1 1 auto; min-width: 0; letter-spacing: 2px; }
.code-row .btn { flex: 0 0 auto; white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 20px; font-size: 15px; font-family: inherit; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: var(--radius);
  transition: background .15s;
}
.btn:hover { background: var(--accent-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--paper); color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.grey { background: var(--paper); border-color: var(--line); color: var(--ink-2); }
.btn.grey:hover { background: var(--paper-3); }
.btn.danger { background: var(--paper); border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); }
.btn.block { width: 100%; }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 徽标 */
.badge { display: inline-block; padding: 1px 7px; font-size: 12px; border-radius: 2px; border: 1px solid var(--line); background: var(--paper-3); color: var(--ink-2); white-space: nowrap; }
.badge.guest { border-color: #c9b482; background: #fbf7ec; color: var(--gold); }
.badge.public { border-color: #bcd0c3; background: var(--accent-soft); color: var(--accent); }
.badge.st-submitted { border-color: #cfcfc7; background: var(--paper-3); }
.badge.st-confirmed { border-color: #bcd0c3; background: var(--accent-soft); color: var(--accent); }
.badge.st-checked_in { border-color: #9dc3ad; background: #e6f0e9; color: #1f4a30; }
.badge.st-departed { border-color: #c8c3e0; background: #f1effa; color: #40357a; }
.badge.st-cancelled { border-color: #e2bcbc; background: var(--danger-soft); color: var(--danger); text-decoration: line-through; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin-right: 5px; }

/* ---------------------------------------------------------------- 表格 */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
table.data th, table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; white-space: nowrap; }
table.data th { background: var(--paper-2); font-weight: 500; color: var(--ink-2); font-size: 12.5px; position: sticky; top: 0; z-index: 2; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.is-new td { background: #fdf8ec; }
table.data tbody tr:hover td { background: var(--paper-2); }
table.data td.wrap-cell { white-space: normal; min-width: 160px; }
.empty { padding: 32px 12px; text-align: center; color: var(--ink-3); font-size: 13.5px; }

/* ---------------------------------------------------------------- 统计 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--paper); }
.stat .k { font-size: 12px; color: var(--ink-3); }
.stat .v { font-family: var(--serif); font-size: 26px; line-height: 1.2; margin-top: 2px; }
.stat .u { font-size: 12px; color: var(--ink-3); margin-left: 3px; font-family: var(--sans); }
.stat.accent .v { color: var(--accent); }
.bars { margin: 4px 0 0; }
.bar-row { display: grid; grid-template-columns: 84px 1fr 46px; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 7px; }
.bar-track { height: 12px; background: var(--paper-3); border-radius: 2px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .3s; }
.bar-fill.mute { background: #b9b9b2; }
.bar-row .n { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.legend { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* ---------------------------------------------------------------- 控制台 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; position: sticky; top: 42px; background: var(--paper); z-index: 20; }
.tabs button {
  flex: 0 0 auto; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 14px;
  font-size: 14px; font-family: inherit; color: var(--ink-2); cursor: pointer;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs button .cnt { font-size: 11px; color: var(--ink-3); margin-left: 4px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters select, .filters input { width: auto; min-width: 110px; padding: 7px 10px; font-size: 14px; }
.filters input[type=search] { min-width: 180px; flex: 1 1 180px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.live { font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.live .dot { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13px; color: var(--ink-2); }

/* 抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(26, 26, 26, .35); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); background: var(--paper);
  z-index: 41; overflow-y: auto; padding: 20px; border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(0, 0, 0, .08);
}
.drawer h3 { font-size: 18px; margin-bottom: 4px; }
.kv { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 16px; }
.kv th, .kv td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.kv th { width: 104px; color: var(--ink-3); font-weight: 400; }
.drawer-close { position: absolute; top: 14px; right: 16px; border: 1px solid var(--line); background: var(--paper); width: 30px; height: 30px; border-radius: var(--radius); cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink-2); }

/* 提示条 */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast .t {
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-size: 13.5px; max-width: min(90vw, 460px); box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
}
#toast .t.err { background: var(--danger); }
#toast .t.ok { background: var(--accent); }

/* 查询码 */
.code-box {
  border: 1px dashed var(--accent); background: var(--accent-soft); border-radius: var(--radius);
  padding: 14px 16px; text-align: center; margin-bottom: 14px;
}
.code-box .code { font-family: var(--mono); font-size: 22px; letter-spacing: .16em; color: var(--accent); word-break: break-all; }
.code-list { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.code-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; font-family: var(--mono); font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.copy-mini { border: 1px solid var(--line); background: var(--paper-2); border-radius: 2px; font-size: 11px; padding: 2px 6px; cursor: pointer; color: var(--ink-2); font-family: var(--sans); }

/* 登录 */
.login-box { max-width: 380px; margin: 12vh auto 0; }

footer.site-footer { border-top: 3px double var(--ink); margin-top: 28px; padding-top: 12px; font-size: 12px; color: var(--ink-3); }
.footer-links { margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ============================================================ 会期流程时间轴 */
.flow { margin: 0; padding: 0; list-style: none; }
.flow-day { margin-bottom: 14px; }
.flow-day:last-child { margin-bottom: 0; }
.flow-day > .d {
  font-family: var(--serif); font-size: 13.5px; color: var(--ink-2);
  border-bottom: 1px solid var(--line-2); padding-bottom: 4px; margin-bottom: 8px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
}
.flow-day > .d span { font-family: var(--sans); font-size: 12px; color: var(--ink-3); }
.flow-item { display: grid; grid-template-columns: 14px 1fr; gap: 10px; padding: 4px 0; position: relative; }
.flow-item .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--paper);
  border: 1.5px solid var(--accent); margin-top: 8px; justify-self: center;
}
.flow-item.major .dot { background: var(--accent); }
.flow-item .body { font-size: 14px; }
.flow-item .body b { font-weight: 600; }
.flow-item .meta { font-size: 12px; color: var(--ink-3); }
.flow-item:not(:last-child) .dot::after {
  content: ''; position: absolute; left: 6px; top: 17px; bottom: -6px; width: 1px; background: var(--line);
}

/* ============================================================ 报名身份切换 */
.identity {
  display: flex; gap: 0; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 14px;
}
.identity > div { flex: 1; padding: 10px 12px; font-size: 13px; color: var(--ink-3); background: var(--paper-2); }
.identity > div + div { border-left: 1px solid var(--line); }
.identity > div.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.identity > div .s { display: block; font-weight: 400; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.identity > div.on .s { color: var(--accent-2); }
.unlock {
  border: 1px dashed var(--line); background: var(--paper-2); border-radius: var(--radius);
  padding: 10px 14px; font-size: 13px; color: var(--ink-2); margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}
.unlock.ok { border-style: solid; border-color: #9dc3ad; background: #eef6f1; color: #1f4a30; }

/* 环节勾选 */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chips label {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px 5px 9px; font-size: 13px; cursor: pointer;
  background: var(--paper); color: var(--ink-2);
}
.chips label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.chips label .t { color: var(--ink-3); font-size: 12px; }
.chips .chip-day { width: 100%; font-size: 12px; color: var(--ink-3); margin: 6px 0 -2px; }

/* 参会凭证 */
.credential {
  border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px; background: var(--paper-2);
}
.credential .who { font-family: var(--serif); font-size: 17px; }
.credential .who span { font-family: var(--sans); font-size: 13px; color: var(--ink-3); margin-left: 8px; }
.credential .nos { display: flex; gap: 22px; margin-top: 10px; flex-wrap: wrap; }
.credential .nos div { font-size: 12px; color: var(--ink-3); }
.credential .nos b { display: block; font-family: var(--mono); font-size: 20px; letter-spacing: .08em; color: var(--ink); }
.staff-flag {
  border: 1px solid #c9b482; background: #fbf7ec; border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px; color: var(--gold);
}
.staff-flag strong { color: #7a5f24; }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list li { border-bottom: 1px dotted var(--line); padding: 10px 0; font-size: 14px; }
.notice-list li:last-child { border-bottom: 0; }
.notice-list .h { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.notice-list .h time { font-size: 12px; color: var(--ink-3); }
.notice-list .b { font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; margin-top: 4px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 4px; }
.steps li { counter-increment: s; position: relative; padding-left: 26px; font-size: 13.5px; margin-bottom: 7px; color: var(--ink-2); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 2px; width: 17px; height: 17px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px;
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}

/* 二维码转发 */
.qr-wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: flex-start; margin-top: 12px; }
.qr-box { width: 148px; height: 148px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 6px; flex: 0 0 auto; }
.qr-box img, .qr-box canvas { display: block; width: 100% !important; height: 100% !important; }
.qr-side { flex: 1 1 220px; min-width: 200px; }
.qr-side .hint { word-break: break-all; margin-top: 10px; font-size: 12.5px; }
@media (max-width: 520px) {
  .qr-wrap { flex-direction: column; align-items: center; }
  .qr-side { width: 100%; }
  .qr-side .btn-row { flex-direction: row !important; }
}

/* 打印（名册） */
@media print {
  .topbar, .tabs, .filters, .toolbar, .pager, .btn, .badge { display: none !important; }
  body { font-size: 12px; }
  .table-scroll { border: 0; }
  table.data { min-width: 0; font-size: 11px; }
}
