/*!
 * 慧集创 · 医院医保自查助手 V1.5（医保查询中心版）
 * 前端样式 —— 浅色主题
 */

/* ================================================================ 变量 */
:root {
  --navy: #122a42;
  --navy-2: #1b3a5a;
  --navy-3: #0c1e30;
  --brand: #137b80;
  --brand-dark: #0e6166;
  --brand-soft: #e2f2f2;
  --bg: #f2f5f9;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --line: #dde5ee;
  --line-2: #eaf0f6;
  --ink: #0f1c2e;
  --ink-2: #45596f;
  --ink-3: #7b8ca1;
  --ok: #12805c;
  --ok-soft: #e4f5ee;
  --warn: #b8530a;
  --warn-soft: #fdf0e2;
  --danger: #c0392b;
  --danger-soft: #fdeceb;
  --info: #2563a8;
  --info-soft: #e8f0fa;
  --purple: #6a4fa3;
  --purple-soft: #efecf9;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-1: 0 1px 2px rgba(15, 28, 46, .06), 0 2px 8px rgba(15, 28, 46, .05);
  --shadow-2: 0 6px 20px rgba(15, 28, 46, .12);
  --shadow-3: 0 18px 48px rgba(15, 28, 46, .22);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Consolas, "Courier New", monospace;
}

/* ================================================================ 基础 */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[hidden] { display: none !important; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; color: var(--ink); line-height: 1.35; }
h1 { font-size: 19px; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
h4 { font-size: 14px; }
p { margin: 0 0 8px; }
p:last-child { margin-bottom: 0; }
code, kbd, samp, pre { font-family: var(--mono); font-size: 12.5px; }
code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--brand-dark);
  word-break: break-all;
}
pre {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  overflow: auto;
  margin: 0;
}
ul, ol { margin: 0 0 8px; padding-left: 20px; }
strong, b { font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c6d2df; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a9b9ca; background-clip: content-box; }

/* ================================================================ 安装门禁 */
.boot-gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
  z-index: 900;
}
.boot-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-2);
  max-width: 640px;
  padding: 28px 30px;
}
.boot-card h1 { font-size: 20px; margin-bottom: 10px; }
.boot-card > p { color: var(--ink-2); }
.boot-steps { color: var(--ink-2); line-height: 2; margin-top: 12px; }

/* ================================================================ 登录页 */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
.login-visual {
  background:
    radial-gradient(1100px 480px at 12% -10%, rgba(19, 123, 128, .38), transparent 62%),
    linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 58%, #163d5c 100%);
  color: #eaf2f8;
  padding: 46px 50px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-visual::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -160px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 0 0 60px rgba(255, 255, 255, .03);
}
.login-brand { display: flex; align-items: baseline; gap: 12px; }
.brand-mark { font-size: 22px; font-weight: 700; letter-spacing: 2px; color: #fff; }
.brand-sub { font-size: 12.5px; color: rgba(234, 242, 248, .68); }
.login-headline {
  margin-top: auto;
  font-size: 34px;
  line-height: 1.35;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
}
.login-headline span { color: #8fd8db; font-size: 24px; font-weight: 600; }
.login-desc { margin-top: 16px; color: rgba(234, 242, 248, .82); font-size: 13.5px; line-height: 2; max-width: 520px; }
.login-points { display: flex; gap: 34px; margin-top: 30px; }
.login-points > div { display: flex; flex-direction: column; }
.login-points b { font-size: 26px; color: #8fd8db; font-weight: 700; line-height: 1.2; }
.login-points span { font-size: 12.5px; color: rgba(234, 242, 248, .7); margin-top: 2px; }
.login-foot {
  margin-top: auto;
  padding-top: 26px;
  font-size: 12px;
  color: rgba(234, 242, 248, .55);
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: var(--panel);
}
.login-form { width: 100%; max-width: 400px; }
.login-form > h3 { font-size: 21px; }
.login-form > .sub { color: var(--ink-3); font-size: 13px; margin: 6px 0 22px; }
.login-error {
  margin-top: 12px;
  background: var(--danger-soft);
  border: 1px solid #f3c9c5;
  color: #96261a;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 13px;
}
.login-demo { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 18px; }
.login-demo > .sub { color: var(--ink-3); font-size: 12.5px; margin-bottom: 10px; }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.demo-chip {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  transition: .16s;
  font-family: inherit;
}
.demo-chip:hover { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.demo-chip b { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.demo-chip small { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
}

/* ================================================================ 应用骨架 */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

.sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #cfdce8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-brand strong { display: block; color: #fff; font-size: 17px; letter-spacing: 1.5px; }
.sidebar-brand small { display: block; color: rgba(207, 220, 232, .62); font-size: 11.5px; margin-top: 5px; line-height: 1.5; }

.nav { padding: 12px 10px; flex: 1; }
.nav-group { margin-bottom: 6px; }
.nav-group-title {
  font-size: 11px;
  letter-spacing: 1.2px;
  color: rgba(207, 220, 232, .45);
  padding: 12px 10px 6px;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #cfdce8;
  text-align: left;
  font: inherit;
  font-size: 13.5px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: .15s;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav-item.is-active {
  background: linear-gradient(90deg, var(--brand) 0%, #1a9297 100%);
  color: #fff;
  box-shadow: 0 2px 10px rgba(19, 123, 128, .35);
}
.nav-item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: .55; flex: none;
}
.nav-item.is-active .dot { opacity: 1; background: #fff; }
.nav-item .nav-badge {
  margin-left: auto;
  font-size: 10.5px;
  background: rgba(255, 255, 255, .16);
  border-radius: 8px;
  padding: 0 6px;
  line-height: 16px;
}

.sidebar-foot {
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 11.5px;
  color: rgba(207, 220, 232, .5);
  line-height: 1.7;
}
.tag-demo {
  display: inline-block;
  margin-top: 6px;
  background: rgba(255, 255, 255, .08);
  border-radius: 4px;
  padding: 2px 6px;
}

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-title .sub { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
}
.user-chip b { color: var(--ink); font-weight: 600; }
.user-chip small { display: block; color: var(--ink-3); font-size: 11.5px; }

.identity-switch { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.identity-switch select {
  font: inherit;
  font-size: 12.5px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  color: var(--ink);
  max-width: 190px;
}

.page { padding: 20px 24px 32px; flex: 1; min-width: 0; }

.foot {
  padding: 14px 24px 22px;
  font-size: 11.5px;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  background: var(--panel);
  line-height: 1.8;
}

@media (max-width: 1080px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav-group { width: 100%; }
  .nav-group-title { padding-top: 6px; }
}

/* ================================================================ 卡片与栅格 */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  margin-bottom: 16px;
}
.card > header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.card > header h2, .card > header h3 { display: flex; align-items: center; gap: 8px; }
.card > header .sub { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 10px 12px; }
.card-body.flush { padding: 0; }
.card > footer {
  padding: 12px 18px;
  border-top: 1px solid var(--line-2);
  background: var(--panel-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); }
@media (max-width: 1280px) {
  .grid.cols-5, .grid.cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.cols-5, .grid.cols-6, .grid.side {
    grid-template-columns: 1fr;
  }
}

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

/* ================================================================ 指标卡 */
.metric {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
}
.metric::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--brand);
  opacity: .85;
}
.metric.tone-ok::before { background: var(--ok); }
.metric.tone-warn::before { background: var(--warn); }
.metric.tone-danger::before { background: var(--danger); }
.metric.tone-info::before { background: var(--info); }
.metric.tone-purple::before { background: var(--purple); }
.metric .label { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.metric .value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  margin: 4px 0 2px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.4px;
}
.metric .value.sm { font-size: 20px; }
.metric .hint { font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
.metric .unit { font-size: 14px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }

/* ================================================================ 表格 */
.table-wrap { width: 100%; overflow-x: auto; }
table.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
table.tbl th {
  background: var(--panel-2);
  color: var(--ink-2);
  font-weight: 600;
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  font-size: 12.5px;
}
table.tbl td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
  color: var(--ink);
}
table.tbl tbody tr:hover td { background: #f6fafb; }
table.tbl tbody tr.is-clickable { cursor: pointer; }
table.tbl tbody tr.is-selected td { background: var(--brand-soft); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.tbl td.mid, table.tbl th.mid { text-align: center; }
table.tbl td.mono { font-family: var(--mono); font-size: 12px; }
table.tbl .cell-main { font-weight: 600; }
table.tbl .cell-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }
table.tbl tr.row-total td { background: var(--panel-2); font-weight: 600; }
table.tbl.fixed { table-layout: fixed; }
table.tbl.compact th, table.tbl.compact td { padding: 6px 9px; }

/* ================================================================ 徽标 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  line-height: 18px;
  padding: 0 7px;
  border-radius: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}
.tag.risk-high { background: var(--danger-soft); border-color: #f0c4c0; color: #a5271b; }
.tag.risk-mid { background: var(--warn-soft); border-color: #f0d6b8; color: #97450a; }
.tag.risk-low { background: var(--info-soft); border-color: #c7daf0; color: #1e4f87; }
.tag.risk-pending { background: #f0f1f4; border-color: #d9dce3; color: #5b6577; }
.tag.ok { background: var(--ok-soft); border-color: #bde3d4; color: #0d6b4d; }
.tag.warn { background: var(--warn-soft); border-color: #f0d6b8; color: #97450a; }
.tag.danger { background: var(--danger-soft); border-color: #f0c4c0; color: #a5271b; }
.tag.info { background: var(--info-soft); border-color: #c7daf0; color: #1e4f87; }
.tag.purple { background: var(--purple-soft); border-color: #d5cdec; color: #55408a; }
.tag.plain { background: transparent; }
.tag.lg { font-size: 12.5px; line-height: 22px; padding: 0 9px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}
.pill b { color: var(--ink); font-weight: 600; }
.pill.is-live { background: var(--ok-soft); border-color: #bde3d4; color: #0d6b4d; }

.dot-flag {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ink-3);
  margin-right: 5px;
  vertical-align: 1px;
}
.dot-flag.ok { background: var(--ok); }
.dot-flag.warn { background: var(--warn); }
.dot-flag.danger { background: var(--danger); }
.dot-flag.info { background: var(--info); }

/* ================================================================ 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  transition: .15s;
  white-space: nowrap;
  line-height: 1.5;
}
.btn:hover { border-color: #c3d0dd; background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-loading { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #a72e21; border-color: #a72e21; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--panel-2); border-color: var(--line); color: var(--ink); }
.btn-sm { font-size: 12.5px; padding: 5px 10px; }
.btn-xs { font-size: 11.5px; padding: 3px 8px; border-radius: 4px; }
.btn-block { width: 100%; }
.btn.is-loading::before {
  content: "";
  width: 12px; height: 12px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ================================================================ 表单 */
.field { display: block; margin-bottom: 13px; }
.field > span, .field > label {
  display: block;
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 5px;
  font-weight: 500;
}
.field .req { color: var(--danger); margin-left: 2px; }
.field .help { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; line-height: 1.6; }

input[type=text], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], input[type=search], input[type=email], input[type=tel],
select, textarea {
  width: 100%;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  transition: .15s;
  outline: none;
}
textarea { min-height: 74px; resize: vertical; line-height: 1.65; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(19, 123, 128, .12);
}
input:disabled, select:disabled, textarea:disabled { background: var(--panel-2); color: var(--ink-3); cursor: not-allowed; }
input[type=file] { font-size: 12.5px; padding: 6px 0; }
input::placeholder, textarea::placeholder { color: #a9b7c6; }

.check-line { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check-line input[type=checkbox], .check-line input[type=radio] { margin: 3px 0 0; flex: none; }

.filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.filter-bar .field { margin-bottom: 0; min-width: 132px; }
.filter-bar .field.grow { flex: 1; min-width: 200px; }

/* 分段选择 */
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); }
.segmented button {
  font: inherit; font-size: 12.5px;
  border: 0; border-right: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink-2);
  padding: 6px 13px;
  cursor: pointer;
  transition: .15s;
}
.segmented button:last-child { border-right: 0; }
.segmented button:hover { background: var(--panel-2); }
.segmented button.is-active { background: var(--brand); color: #fff; }

/* ================================================================ 提示条 */
.alert {
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 12.8px;
  line-height: 1.75;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink-2);
  margin-bottom: 12px;
}
.alert:last-child { margin-bottom: 0; }
.alert b { color: var(--ink); }
.alert .alert-title { font-weight: 600; color: var(--ink); display: block; margin-bottom: 3px; }
.alert.info { background: var(--info-soft); border-color: #c7daf0; color: #1d4a80; }
.alert.ok { background: var(--ok-soft); border-color: #bde3d4; color: #0d6349; }
.alert.warn { background: var(--warn-soft); border-color: #f0d6b8; color: #8b400a; }
.alert.danger { background: var(--danger-soft); border-color: #f0c4c0; color: #96261a; }
.alert.plain { background: var(--panel-2); }
.alert ul { margin: 5px 0 0; padding-left: 18px; }
.alert.dismissible { position: relative; padding-right: 34px; }
.alert .close {
  position: absolute; right: 8px; top: 7px;
  border: 0; background: transparent; cursor: pointer;
  color: inherit; opacity: .55; font-size: 16px; line-height: 1; padding: 2px 5px;
}
.alert .close:hover { opacity: 1; }

.notice-line { font-size: 12px; color: var(--ink-3); line-height: 1.7; margin-top: 8px; }

/* ================================================================ 步骤条 */
.steps { display: flex; gap: 0; overflow-x: auto; padding: 4px 0; }
.step {
  flex: 1;
  min-width: 150px;
  padding: 10px 14px 10px 22px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-right: 0;
  position: relative;
  cursor: default;
}
.step:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.step:last-child { border-right: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) 0; }
.step::after {
  content: "";
  position: absolute;
  right: -8px; top: 50%;
  width: 14px; height: 14px;
  background: inherit;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  transform: translateY(-50%) rotate(45deg);
  z-index: 3;
}
.step:last-child::after { display: none; }
.step .step-title { font-size: 13px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.step .step-owner { font-size: 11.5px; color: var(--ink-3); }
.step .step-detail { font-size: 11.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.55; }
.step.is-done { background: var(--ok-soft); }
.step.is-done .step-title { color: #0d6349; }
.step.is-current { background: var(--brand-soft); }
.step.is-current .step-title { color: var(--brand-dark); }

/* ================================================================ 进度条 */
.bar { height: 7px; background: var(--line-2); border-radius: 4px; overflow: hidden; min-width: 62px; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 4px; transition: width .4s; }
.bar.ok > i { background: var(--ok); }
.bar.warn > i { background: var(--warn); }
.bar.danger > i { background: var(--danger); }
.bar-cell { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.bar-cell .pct { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ================================================================ 图表 */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }

/* ================================================================ 列表 */
.list { display: flex; flex-direction: column; }
.list-item {
  padding: 11px 2px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.list-item:last-child { border-bottom: 0; }
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.list-item .li-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.65; }
.list-item .li-side { font-size: 12px; color: var(--ink-3); text-align: right; white-space: nowrap; }

.kv { display: grid; grid-template-columns: 108px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }
.kv.wide { grid-template-columns: 132px 1fr; }
.kv.two { grid-template-columns: 92px 1fr 92px 1fr; }

.desc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; }
.desc-grid .dg-item .dg-label { font-size: 11.5px; color: var(--ink-3); }
.desc-grid .dg-item .dg-value { font-size: 13px; color: var(--ink); word-break: break-word; }

/* ================================================================ 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 2px 2px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.pager .pages { display: flex; align-items: center; gap: 4px; }
.pager button {
  font: inherit; font-size: 12.5px;
  min-width: 30px; height: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 5px;
  color: var(--ink-2);
  cursor: pointer;
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ================================================================ 空状态 / 加载 */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-3);
  font-size: 13px;
}
.empty .empty-title { font-size: 14px; color: var(--ink-2); font-weight: 600; margin-bottom: 5px; }
.empty .empty-hint { font-size: 12.5px; line-height: 1.8; }

.skeleton { padding: 16px 18px; }
.sk-line {
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #eef3f8 25%, #e3eaf2 37%, #eef3f8 63%);
  background-size: 400% 100%;
  animation: sk 1.3s ease infinite;
  margin-bottom: 10px;
}
.sk-line.w40 { width: 40%; }
.sk-line.w60 { width: 60%; }
.sk-line.w80 { width: 80%; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ================================================================ Toast */
.toasts {
  position: fixed;
  right: 20px;
  top: 18px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 380px;
  pointer-events: none;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2);
  padding: 11px 14px;
  font-size: 13px;
  color: var(--ink);
  animation: toast-in .22s ease;
  pointer-events: auto;
  line-height: 1.6;
}
.toast.ok { border-left-color: var(--ok); }
.toast.warn { border-left-color: var(--warn); }
.toast.error { border-left-color: var(--danger); }
.toast .toast-title { font-weight: 600; display: block; margin-bottom: 2px; }
.toast .toast-body { color: var(--ink-2); font-size: 12.5px; white-space: pre-line; }
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

/* ================================================================ 弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(12, 30, 48, .5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 46px 18px;
  overflow-y: auto;
}
.modal-card {
  background: var(--panel);
  border-radius: 12px;
  box-shadow: var(--shadow-3);
  width: 100%;
  max-width: 720px;
  animation: modal-in .2s ease;
  margin: auto 0;
}
.modal-card.wide { max-width: 1040px; }
.modal-card.narrow { max-width: 480px; }
.modal-card > header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.modal-card > header h3 { font-size: 15.5px; }
.modal-card > header .sub { font-size: 12px; color: var(--ink-3); }
.modal-card > .modal-body { padding: 18px 20px; max-height: 66vh; overflow-y: auto; }
.modal-card > footer {
  padding: 13px 20px;
  border-top: 1px solid var(--line-2);
  background: var(--panel-2);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
  border-radius: 0 0 12px 12px;
}
.modal-close {
  border: 0; background: transparent; cursor: pointer;
  font-size: 19px; line-height: 1; color: var(--ink-3); padding: 3px 6px;
}
.modal-close:hover { color: var(--ink); }
@keyframes modal-in { from { opacity: 0; transform: translateY(-12px) scale(.985); } to { opacity: 1; transform: none; } }

/* ================================================================ 标签页 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button {
  font: inherit; font-size: 13.5px;
  border: 0; background: transparent;
  color: var(--ink-2);
  padding: 9px 15px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}
.tabs button:hover { color: var(--brand); }
.tabs button.is-active { color: var(--brand-dark); border-bottom-color: var(--brand); font-weight: 600; }
.tabs button .cnt { font-size: 11.5px; color: var(--ink-3); margin-left: 4px; }

/* ================================================================ 时间线 */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 14px; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -18px; top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--brand);
}
.timeline-item.ok::before { border-color: var(--ok); }
.timeline-item.warn::before { border-color: var(--warn); }
.timeline-item.danger::before { border-color: var(--danger); }
.timeline-item .tl-time { font-size: 11.5px; color: var(--ink-3); }
.timeline-item .tl-title { font-size: 13px; font-weight: 600; }
.timeline-item .tl-body { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }

/* ================================================================ 备注块 */
.note-block {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--ink-3);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 12.8px;
  color: var(--ink-2);
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}
.note-block.quote { border-left-color: var(--brand); background: #f4fafa; }
.note-block.muted { color: var(--ink-3); font-style: normal; }

/* ================================================================ 字段契约表 */
.contract-wrap { max-height: 560px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.contract-wrap table.tbl th { top: 0; }

/* ================================================================ 上传区 */
.drop-zone {
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  background: var(--panel-2);
  transition: .18s;
  cursor: pointer;
}
.drop-zone:hover, .drop-zone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.drop-zone .dz-icon { font-size: 26px; line-height: 1; margin-bottom: 8px; }
.drop-zone .dz-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.drop-zone .dz-hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.7; }
.drop-zone .dz-file { margin-top: 10px; font-size: 12.5px; color: var(--brand-dark); font-weight: 600; word-break: break-all; }

/* ================================================================ 对照面版 */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.side-panel {
  position: sticky;
  top: 78px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
@media (max-width: 980px) { .side-panel { position: static; max-height: none; } }

/* ================================================================ 其他小工具 */
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.mt0 { margin-top: 0; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.mb8 { margin-bottom: 8px; }
.mb12 { margin-bottom: 12px; }
.mb16 { margin-bottom: 16px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.text-brand { color: var(--brand-dark); }
.flex-1 { flex: 1; min-width: 0; }
.scroll-y { overflow-y: auto; }

.detail-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
  margin-bottom: 14px;
}
.detail-head .dh-item .dh-label { font-size: 11.5px; color: var(--ink-3); }
.detail-head .dh-item .dh-value { font-size: 13.5px; font-weight: 600; }

.answer-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--ink-3);
}
.answer-badge[data-v="是"] { background: var(--danger-soft); border-color: #f0c4c0; color: #a5271b; }
.answer-badge[data-v="否"] { background: var(--ok-soft); border-color: #bde3d4; color: #0d6b4d; }
.answer-badge[data-v="待核实"] { background: var(--warn-soft); border-color: #f0d6b8; color: #97450a; }

@media print {
  .sidebar, .topbar, .foot, .toasts, .filter-bar, .btn-group { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
}
