:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #1f2733;
  --muted: #6b7686;
  --line: #e6eaf2;
  --brand: #3b6ef5;
  --brand2: #6a4bf5;
  --red: #e5484d;
  --red-bg: #fdecec;
  --yellow: #d98a00;
  --yellow-bg: #fff6e6;
  --green: #2f9e57;
  --green-bg: #e9f7ee;
  --info: #3b6ef5;
  --info-bg: #eaf0ff;
  --shadow: 0 6px 22px rgba(31, 39, 51, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b6ef5 0%, #6a4bf5 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  padding: 40px 38px;
  width: 360px;
  text-align: center;
}
.login-card h1 {
  margin: 0 0 6px;
  font-size: 22px;
  background: linear-gradient(90deg, #3b6ef5, #6a4bf5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-card p { color: var(--muted); margin: 0 0 22px; font-size: 13px; }
.login-card input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 15px;
  margin-bottom: 14px;
  outline: none;
  transition: border .2s;
}
.login-card input:focus { border-color: var(--brand); }
.login-card button {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #3b6ef5, #6a4bf5);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.login-card button:hover { opacity: .92; }
.login-err { color: var(--red); font-size: 13px; margin-bottom: 12px; }

/* ---------- 主框架 ---------- */
.topbar {
  background: linear-gradient(90deg, #3b6ef5, #6a4bf5);
  color: #fff;
  padding: 16px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.topbar h1 { margin: 0; font-size: 18px; font-weight: 700; }
.topbar .who { font-size: 13px; opacity: .9; }
.topbar a { color: #fff; text-decoration: none; opacity: .9; font-size: 13px; }
.topbar a:hover { opacity: 1; }

.container { max-width: 980px; margin: 26px auto; padding: 0 20px; }
/* 台账页：全宽显示，不窝在中间窄版式里 */
.container-wide { max-width: none; margin: 26px auto; padding: 0 24px; }

/* 上传区 */
.upload-zone {
  background: var(--card);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 34px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: border .2s, background .2s;
}
.upload-zone.drag { border-color: var(--brand); background: var(--info-bg); }
.upload-zone h2 { margin: 0 0 8px; font-size: 17px; }
.upload-zone p { color: var(--muted); margin: 0 0 18px; font-size: 13px; }
.btn {
  display: inline-block;
  padding: 11px 22px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #3b6ef5, #6a4bf5);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { opacity: .92; }
.btn.ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--brand); }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn.active { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.4); }

.filter-bar {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
  padding: 12px 16px; margin: 18px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.filter-bar span { font-size: 14px; color: var(--muted); }
.filter-tip { font-size: 12px; color: var(--muted); margin-left: auto; }

.contacts { margin: 0 0 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contacts span { font-size: 13px; color: var(--muted); }
.chip {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  background: var(--info-bg); color: var(--brand); font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--brand); cursor: pointer;
}
.chip:hover { background: var(--brand); color: #fff; }
.chip.disabled {
  background: #f4f6fb; color: var(--muted); border-color: var(--line); cursor: help; font-weight: 400;
}
.chip.disabled small { font-size: 11px; opacity: .8; }

/* 提示 */
.notice { padding: 12px 16px; border-radius: 12px; margin: 16px 0; font-size: 14px; }
.notice.err { background: var(--red-bg); color: var(--red); }
.notice.ok { background: var(--green-bg); color: var(--green); }

/* 结果统计卡 */
.summary {
  display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0 8px;
}
.sum-chip {
  flex: 1; min-width: 120px;
  background: var(--card); border-radius: 14px; padding: 16px;
  box-shadow: var(--shadow); text-align: center;
}
.sum-chip .n { font-size: 28px; font-weight: 800; }
.sum-chip .l { font-size: 13px; color: var(--muted); }
.sum-chip.red .n { color: var(--red); }
.sum-chip.yellow .n { color: var(--yellow); }
.sum-chip.green .n { color: var(--green); }
.sum-chip.info .n { color: var(--info); }

.fileinfo {
  background: var(--card); border-radius: 14px; padding: 14px 18px;
  box-shadow: var(--shadow); font-size: 14px; margin-bottom: 18px;
}
.fileinfo b { color: var(--brand); }

/* 类别 */
.cat { margin: 26px 0 8px; }
.cat h3 {
  font-size: 16px; margin: 0 0 12px; padding-left: 12px;
  border-left: 4px solid var(--brand);
}
.cat .desc { color: var(--muted); font-size: 13px; margin: -6px 0 14px; }

/* 规则卡片 */
.rule {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
  margin-bottom: 12px; overflow: hidden; display: flex;
}
.rule .bar { width: 6px; flex-shrink: 0; }
.rule.red .bar { background: var(--red); }
.rule.yellow .bar { background: var(--yellow); }
.rule.green .bar { background: var(--green); }
.rule.info .bar { background: var(--info); }
.rule .body { padding: 14px 16px; flex: 1; }
.rule .head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rule .title { font-weight: 700; font-size: 15px; }
.tag {
  font-size: 12px; padding: 2px 10px; border-radius: 999px; font-weight: 600;
}
.tag.red { background: var(--red-bg); color: var(--red); }
.tag.yellow { background: var(--yellow-bg); color: var(--yellow); }
.tag.green { background: var(--green-bg); color: var(--green); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.hit { background: var(--red-bg); color: var(--red); }
.tag.manual { background: var(--yellow-bg); color: var(--yellow); }
.tag.pass { background: #eef1f6; color: var(--muted); }
.rule .desc { color: var(--muted); font-size: 13px; margin: 8px 0; }
.rule .hint { font-size: 13px; background: var(--info-bg); color: var(--brand); padding: 8px 12px; border-radius: 10px; margin-top: 8px; }
.rule .advice { font-size: 13px; color: var(--ink); margin-top: 8px; }
.hit-frag {
  font-size: 13px; background: #fbfbfd; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; margin-top: 8px; color: var(--ink);
}
.hit-frag b { color: var(--red); background: #ffe9ea; padding: 0 3px; border-radius: 4px; }

/* 邮件表单 */
.mail-box {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px; margin-top: 30px;
}
.mail-box h3 { margin: 0 0 14px; font-size: 16px; }
.mail-box label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 5px; }
.mail-box input, .mail-box textarea {
  width: 100%; padding: 11px 13px; border: 1.5px solid var(--line);
  border-radius: 11px; font-size: 14px; outline: none; font-family: inherit;
}
.mail-box input:focus, .mail-box textarea:focus { border-color: var(--brand); }
.mail-box textarea { min-height: 220px; resize: vertical; }
.mail-meta { font-size: 12px; color: var(--muted); margin-top: 8px; }

.foot { text-align: center; color: var(--muted); font-size: 12px; margin: 30px 0; }

/* ---------- 类型识别横幅 / 脱敏信息 ---------- */
.type-banner {
  background: linear-gradient(90deg, var(--info-bg), #f3efff);
  border: 1.5px solid var(--brand);
  border-radius: 14px; padding: 12px 18px; font-size: 14px;
  margin: 20px 0 4px; box-shadow: var(--shadow);
}
.type-banner b { color: var(--brand); }

/* ---------- 审核结论（一句话：能不能签）---------- */
.verdict {
  display: flex; align-items: center; gap: 12px;
  margin: 12px 0 18px; padding: 16px 20px;
  border-radius: var(--radius); box-shadow: var(--shadow);
  font-size: 17px; font-weight: 800; letter-spacing: 0.2px;
  border-left: 6px solid transparent;
}
.verdict .vd-ico { font-size: 22px; line-height: 1; }
.verdict .vd-text { display: flex; flex-direction: column; gap: 2px; }
.verdict .vd-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; opacity: 0.75;
}
.verdict.green {
  background: linear-gradient(100deg, #e9f7ee 0%, #f4fbf6 70%);
  border-left-color: var(--green); color: #1d7a41;
}
.verdict.yellow {
  background: linear-gradient(100deg, #fff6e6 0%, #fffcf4 70%);
  border-left-color: var(--yellow); color: #a86a00;
}
.verdict.red {
  background: linear-gradient(100deg, #fdecec 0%, #fff7f7 70%);
  border-left-color: var(--red); color: #b83034;
}
.san-box {
  background: var(--green-bg); border-radius: 12px; padding: 12px 16px;
  font-size: 13px; margin-bottom: 16px;
}
.san-box .chip { cursor: default; }
.san-box .filter-tip { margin-left: 0; }
.radio { display: inline-flex; align-items: center; gap: 5px; margin-right: 14px; font-size: 13px; color: var(--ink); }
.radio input { width: auto; }

/* ---------- 发送记录页 ---------- */
.rec-card {
  background: var(--card); border-radius: 14px; box-shadow: var(--shadow);
  padding: 16px 20px; margin-bottom: 14px;
}
.rec-card.fail { border-left: 5px solid var(--red); }
.rec-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rec-time { font-size: 13px; color: var(--muted); font-weight: 600; }
.rec-file { font-weight: 700; font-size: 14px; }
.rec-to { font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.rec-to b { color: var(--ink); }
.rec-card details { margin-top: 8px; }
.rec-card summary {
  cursor: pointer; font-size: 13px; color: var(--brand); font-weight: 600;
  padding: 6px 10px; background: var(--info-bg); border-radius: 9px;
  display: inline-block;
}
.rec-subject { font-size: 13px; color: var(--muted); margin: 10px 0 6px; }
.rec-body {
  white-space: pre-wrap; word-break: break-all;
  background: #fbfbfd; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 13px; font-family: inherit; margin: 10px 0;
}
.rec-card details label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.rec-card details input[type="text"] {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 13px; outline: none;
}
.rec-card details input[type="text"]:focus { border-color: var(--brand); }

/* ---------- 精简审核结果（一条一行） ---------- */
.fin-group { margin: 22px 0 6px; }
.fg-title { font-size: 15px; margin: 0 0 10px; padding-left: 10px; border-left: 4px solid var(--line); }
.fg-title.red { border-color: var(--red); }
.fg-title.yellow { border-color: var(--yellow); }
.fg-title.info { border-color: var(--info); }
.fin {
  background: var(--card); border-radius: 12px; box-shadow: var(--shadow);
  padding: 11px 16px; margin-bottom: 8px;
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
  font-size: 14px; border-left: 5px solid var(--line);
}
.fin.red { border-left-color: var(--red); }
.fin.yellow { border-left-color: var(--yellow); }
.fin.info { border-left-color: var(--info); }
.fin.pass { border-left-color: #cfd6e2; color: var(--muted); }
.fin .fdot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex-shrink: 0; }
.fin.red .fdot { background: var(--red); }
.fin.yellow .fdot { background: var(--yellow); }
.fin.info .fdot { background: var(--info); }
.fin .fid { font-size: 12px; color: var(--muted); font-weight: 600; }
.fin .ftitle { font-weight: 700; }
.fin .fpos {
  font-size: 12px; color: var(--brand); background: var(--info-bg);
  padding: 1px 8px; border-radius: 999px; font-weight: 600;
}
.fin .fadv { font-size: 13px; color: var(--ink); }
.fin.pass .fadv { color: var(--muted); font-size: 12px; }
.fin .fdetail {
  flex-basis: 100%; font-size: 12.5px; color: var(--muted);
  background: #fbfbfd; border-radius: 8px; padding: 6px 10px; margin-top: 2px;
}

/* 原文条款摘录 */
.fin .fquote {
  flex-basis: 100%; margin-top: 6px;
  background: #f7f9fd; border-left: 3px solid #d8e0ef;
  border-radius: 0 9px 9px 0; padding: 8px 12px;
  font-size: 13px; color: #39424f; line-height: 1.7;
}
.fin.red .fquote { background: #fdf8f8; border-left-color: #f0b9bb; }
.fin.yellow .fquote { background: #fffdf7; border-left-color: #f0d3a0; }
.fq-line + .fq-line { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #e4e9f3; }
.fq-pos {
  display: inline-block; font-size: 11px; font-weight: 600; color: var(--muted);
  background: #eaeff8; border-radius: 5px; padding: 0 6px; margin-right: 7px;
  vertical-align: 1px; white-space: nowrap;
}

/* 产品型号清单 */
.model-box {
  margin: 18px 0 4px 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.model-box .mb-title {
  margin: 0 0 10px 0;
  font-size: 15px; font-weight: 700; color: var(--info);
}
.model-box .mb-sub {
  font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px;
}
.model-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.model-table th {
  text-align: left; color: var(--muted); font-weight: 600;
  padding: 7px 8px; border-bottom: 2px solid var(--info-bg);
}
.model-table td {
  padding: 7px 8px; border-bottom: 1px solid #f0f3f8; color: var(--ink);
}
.model-table td.mm {
  font-weight: 700; color: var(--ink);
  background: var(--info-bg); border-radius: 6px;
}
.model-table td.mpos { color: var(--muted); font-size: 12px; }

/* ===== 台账 / 审计 / 设置 新增样式 ===== */
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { opacity: .92; }
.notice.warn { background: #fff4e5; color: #b3541b; }
.notice.info { background: var(--info-bg); color: var(--info); }

.ledger-cta { margin: 22px 0 6px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ledger-cta .btn { font-size: 15px; padding: 12px 20px; }

.ledger-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.ledger-head h2 { margin: 0; font-size: 20px; }
.ledger-actions { display: flex; gap: 10px; }

.table-scroll { overflow-x: auto; border: 1px solid #e4e8ef; border-radius: 12px; margin: 14px 0; background: #fff; }
.ledger-table { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 2200px; }
.ledger-table th, .ledger-table td { border-bottom: 1px solid #eef1f5; padding: 9px 11px; text-align: left; white-space: nowrap; vertical-align: top; }
.ledger-table thead th { background: #f5f7fa; position: sticky; top: 0; font-weight: 700; color: #334; z-index: 2; }
.ledger-table tbody tr:hover { background: #fafbfd; }
.ledger-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-table td.op { white-space: nowrap; }
/* 横向滚动时：序号/公司简称 列与 操作 列固定可见，方便对行编辑 */
.ledger-table .sticky-l { position: sticky; background: #fff; z-index: 1; }
.ledger-table th:nth-child(1), .ledger-table td:nth-child(1) { width: 56px; min-width: 56px; }
.ledger-table .sticky-l.first { left: 0; box-shadow: inset -1px 0 0 #e4e8ef; }
.ledger-table .sticky-l.company { left: 56px; box-shadow: inset -1px 0 0 #e4e8ef; }
.ledger-table .sticky-r { position: sticky; right: 0; background: #fff; z-index: 1; box-shadow: inset 1px 0 0 #e4e8ef; }
.ledger-table thead .sticky-l, .ledger-table thead .sticky-r { background: #f5f7fa; z-index: 3; }
.ledger-table tbody tr:hover .sticky-l, .ledger-table tbody tr:hover .sticky-r { background: #fafbfd; }
.chip.del { color: var(--red); border-color: #f0c9c9; }
.chip.del:hover { background: var(--red); color: #fff; border-color: var(--red); }
.lf-lbl .req { color: var(--red); font-style: normal; margin-left: 2px; }

/* ---------- 审核快照条 + 台账新行高亮（2026-11-02） ---------- */
.rv-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 14px 0 4px; padding: 10px 14px; border-radius: 12px;
  background: var(--info-bg); border: 1px dashed var(--brand);
}
.rv-tag { font-size: 13px; font-weight: 600; color: var(--info); }
.rv-bar .filter-tip { margin-left: 0; }

/* 刚登记的那一行：整行浅黄底 + 闪三下，一眼能找到 */
@keyframes rowflash {
  0%, 100% { background: #fffbe6; }
  50%      { background: #ffe9a8; }
}
tr.row-new td, tr.row-new td.sticky-l, tr.row-new td.sticky-r {
  background: #fffbe6 !important;
  animation: rowflash 1.2s ease-in-out 3;
}
tr.row-new td.first, tr.row-new td.company { box-shadow: inset 3px 0 0 #f0a500; }
