/* resume-board —— 评审名册风格：暖白纸面、细线分栏、无卡片阴影。
   目标是"一份可以竖着比的名册"，不是 SaaS 仪表盘。 */

:root {
  --bg: #faf9f7;
  --paper: #fffefc;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --faint: #9a958d;
  --line: #e5e2dc;
  --line-strong: #d2cec6;
  --accent: #14635c;
  --accent-soft: #e6efee;
  --warn: #a3333d;
  --warn-soft: #f7ecec;
  --star: #b8860b;
  --t1: #0f4f49; --t2: #2f7d74; --t3: #6aa8a0; --t4: #a9c9c4;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16171a; --paper: #1c1e21; --fg: #e9e7e3; --muted: #a5a29c;
    --faint: #7c7871; --line: #2e3135; --line-strong: #3d4147;
    --accent: #6fb5ab; --accent-soft: #1e3330; --warn: #e08a91; --warn-soft: #332325;
    --star: #d9a93c;
    --t1: #7fc7bc; --t2: #5aa79c; --t3: #3f7d75; --t4: #2c5a55;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- 版心 */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px 80px; }

header.top {
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
header.top .wrap { padding-top: 14px; padding-bottom: 0; }
.brand { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.brand h1 { font-size: 17px; font-weight: 600; margin: 0; letter-spacing: .02em; }
.brand .sub { color: var(--muted); font-size: 12px; }
.brand .spacer { flex: 1; }
.brand .logout { font-size: 12px; color: var(--faint); text-decoration: none; }
.brand .logout:hover { color: var(--warn); }

/* 标签页 */
.tabs { display: flex; gap: 4px; margin-top: 12px; }
.tabs button {
  border: 0; background: none; font: inherit; font-size: 14px; cursor: pointer;
  padding: 8px 14px; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); font-weight: 600; }
.tabs button:disabled { color: var(--faint); cursor: default; }

/* ---------------------------------------------------------------- 筛选 */
.filters { padding: 16px 0 12px; border-bottom: 1px solid var(--line); }
.frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.frow:last-child { margin-bottom: 0; }
.flabel { color: var(--faint); font-size: 12px; min-width: 56px; }

input[type="search"], select {
  font: inherit; font-size: 13px; color: var(--fg);
  background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: 3px; padding: 6px 9px;
}
input[type="search"] { min-width: 240px; flex: 1; max-width: 380px; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.chip {
  font: inherit; font-size: 12px; cursor: pointer;
  background: none; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 11px;
}
.chip[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
}
.chip.warnchip[aria-pressed="true"] { background: var(--warn); border-color: var(--warn); }

.count { color: var(--muted); font-size: 12px; margin-left: auto; }
.count b { color: var(--fg); font-weight: 600; }

/* ---------------------------------------------------------------- 名册 */
.roster { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 30px 30px 1fr; gap: 0 10px;
  padding: 14px 8px 14px 4px; border-bottom: 1px solid var(--line);
  cursor: pointer; position: relative;
}
.row:hover { background: var(--paper); }
.row.marked-out { opacity: .42; }

/* 最左的收件序号：对应原始文件名前缀，用来回本地定位那份材料 */
.seq {
  color: var(--faint); font-size: 12.5px; padding-top: 3px;
  text-align: right; font-variant-numeric: tabular-nums; user-select: text;
}

.marks { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.marks button {
  border: 0; background: none; cursor: pointer; font-size: 14px; line-height: 1;
  padding: 2px; color: var(--faint); border-radius: 3px;
}
.marks button[aria-pressed="true"].star { color: var(--star); }
.marks button[aria-pressed="true"].out { color: var(--warn); }

.r-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.r-name { font-size: 16px; font-weight: 600; letter-spacing: .02em; }
.r-meta { color: var(--muted); font-size: 12.5px; }
.r-right { margin-left: auto; color: var(--muted); font-size: 12.5px; text-align: right; }

.r-edu { margin-top: 3px; font-size: 13px; }
.r-edu .school { font-weight: 600; }
.r-papers { margin-top: 5px; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.r-rep { margin-top: 4px; font-size: 12.5px; color: var(--muted); padding-left: 10px; border-left: 2px solid var(--line-strong); }
.r-rep .t { color: var(--fg); }
.r-review { margin-top: 5px; font-size: 12px; color: var(--warn); }

/* 徽章 */
.b {
  display: inline-block; font-size: 11px; line-height: 1.5; padding: 0 6px;
  border-radius: 3px; white-space: nowrap;
}
.b.tier { border: 1px solid var(--line-strong); color: var(--muted); }
.b.tier.hi { border-color: var(--accent); color: var(--accent); }
.b.q { color: #fff; font-weight: 600; }
.b.q1 { background: var(--t1); } .b.q2 { background: var(--t2); }
.b.q3 { background: var(--t3); } .b.q4 { background: var(--t4); color: #16302d; }
.b.idx { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.b.none { border: 1px dashed var(--line-strong); color: var(--faint); }
.b.eq { border: 1px solid var(--accent); color: var(--accent); }

.empty { padding: 60px 10px; text-align: center; color: var(--faint); }

/* ---------------------------------------------------------------- 详情 */
.detail { padding-top: 18px; }
.d-head { border-bottom: 2px solid var(--fg); padding-bottom: 12px; margin-bottom: 4px; }
.d-name { font-size: 26px; font-weight: 600; letter-spacing: .03em; margin: 0 0 6px; }
.d-seq {
  color: var(--faint); font-size: 15px; font-weight: 400; margin-right: 10px;
  font-variant-numeric: tabular-nums;
}
.d-line { color: var(--muted); font-size: 13px; }
.d-nav { display: flex; gap: 8px; align-items: center; margin: 14px 0 0; }
.d-nav button {
  font: inherit; font-size: 12.5px; cursor: pointer; background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 3px; padding: 5px 12px; color: var(--fg);
}
.d-nav button:disabled { color: var(--faint); cursor: default; }
.d-nav .pos { color: var(--faint); font-size: 12px; margin-left: auto; }

section.d-sec { margin-top: 26px; }
section.d-sec > h3 {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; color: var(--accent);
  margin: 0 0 10px; padding-bottom: 5px; border-bottom: 1px solid var(--line);
}

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 8px 22px; }
.kv div { font-size: 13px; }
.kv dt { color: var(--faint); font-size: 11.5px; }
.kv dd { margin: 0; }

.tbl-wrap { overflow-x: auto; }
table.d { border-collapse: collapse; width: 100%; font-size: 12.5px; min-width: 520px; }
table.d th {
  text-align: left; font-weight: 600; color: var(--faint); font-size: 11.5px;
  border-bottom: 1px solid var(--line-strong); padding: 5px 9px 5px 0; white-space: nowrap;
}
table.d td { padding: 7px 9px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.d tr:last-child td { border-bottom: 0; }
table.d .rep { color: var(--accent); font-weight: 600; }
/* 条目自带的备注（如“原文此行折行”），压低一档，不与条目正文抢视线 */
.cnote { color: var(--faint); font-size: 11.5px; }
.filelink {
  display: inline-block; font-size: 13px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--accent); border-radius: 3px; padding: 5px 13px; margin-right: 8px;
}
.filelink:hover { background: var(--accent); color: #fff; }

ul.plain { margin: 0; padding-left: 17px; font-size: 13px; }
ul.plain li { margin-bottom: 5px; }

.longtext { font-size: 13px; line-height: 1.85; color: var(--fg); white-space: pre-wrap; }
details.fold > summary { cursor: pointer; color: var(--accent); font-size: 12.5px; margin-bottom: 8px; }

.reviewbox {
  background: var(--warn-soft); border-left: 3px solid var(--warn);
  padding: 10px 14px; font-size: 12.5px;
}
.reviewbox ul { margin: 0; padding-left: 17px; }
.reviewbox li { margin: 3px 0; }
.flagbox { background: var(--accent-soft); border-left: 3px solid var(--accent); padding: 10px 14px; font-size: 12.5px; }
.flagbox ul { margin: 0; padding-left: 17px; }

/* ---------------------------------------------------------------- 登录 */
.login { max-width: 320px; margin: 16vh auto; padding: 0 20px; }
.login h1 { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.login p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.login input {
  width: 100%; font: inherit; padding: 9px 11px; border: 1px solid var(--line-strong);
  border-radius: 3px; background: var(--paper); color: var(--fg);
}
.login button {
  width: 100%; margin-top: 10px; font: inherit; font-weight: 600; cursor: pointer;
  padding: 9px; border: 0; border-radius: 3px; background: var(--accent); color: #fff;
}
.login .err { color: var(--warn); font-size: 12.5px; margin-top: 10px; }
.login .note { color: var(--faint); font-size: 11.5px; margin-top: 22px; line-height: 1.7; }

/* ---------------------------------------------------------------- 窄屏 */
@media (max-width: 720px) {
  .wrap { padding: 0 13px 60px; }
  .row { grid-template-columns: 24px 26px 1fr; gap: 0 8px; padding: 12px 2px; }
  .r-right { margin-left: 0; width: 100%; text-align: left; }
  .flabel { min-width: 0; }
  input[type="search"] { max-width: none; }
  .count { margin-left: 0; }
  .d-name { font-size: 21px; }
  .kv { grid-template-columns: 1fr; }
}
