/* ============================================================================
   智慧西林 · 党建AI平台 后台管理 —— 样式表
   品牌色沿用前端 #9C1418 / #c1272d
   ========================================================================== */
:root {
  --brand: #9c1418;
  --brand-2: #c1272d;
  --brand-soft: #fdf1f0;
  --bg: #f4f5f7;
  --card: #ffffff;
  --line: #e6e8ec;
  --line-2: #eef0f3;
  --text: #1f2329;
  --text-2: #4e5560;
  --muted: #8b93a1;
  --ok: #1a8f5a;
  --ok-bg: #e9f7f0;
  --info: #2563a8;
  --info-bg: #eaf2fb;
  --warn: #b87308;
  --warn-bg: #fdf4e6;
  --danger: #b3261e;
  --danger-bg: #fdeceb;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .04);
  --side-w: 236px;
  --side-w-min: 64px;
}
html.side-min { --side-w: var(--side-w-min); }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans CN", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { opacity: .85; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 12.5px; }
.muted { color: var(--muted); }
.ico { flex: none; vertical-align: -3px; }

/* ------------------------------------------------------------ 布局 */
.app { min-height: 100vh; }

/* 侧栏固定：不随内容滚动，始终停在当前页面所在菜单 */
.side {
  width: var(--side-w); flex: none;
  background: linear-gradient(178deg, #8d1116 0%, #7a0f13 46%, #660c10 100%);
  color: #fff;
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0;
  height: 100vh; height: 100dvh;
  z-index: 40;
  transition: width .2s ease, transform .22s ease;
  box-shadow: 1px 0 0 rgba(0, 0, 0, .06);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; color: #fff; flex: none; }
.brand:hover { opacity: 1; }
.brand-mark {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  display: grid; place-items: center;
  font-weight: 700; font-size: 17px; letter-spacing: 1px;
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.brand-txt b { font-size: 15px; letter-spacing: .5px; white-space: nowrap; }
.brand-txt i { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .58); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 10px 14px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 3px; }
/* ---------------- 树形导航 ---------------- */
.nav-grp { margin-bottom: 1px; }
.ng-head {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border: 0; border-radius: 8px; background: transparent;
  color: rgba(255, 255, 255, .62); font: inherit; font-size: 12.5px; font-weight: 500;
  letter-spacing: .3px; cursor: pointer; text-align: left;
  transition: background .15s, color .15s;
}
.ng-head:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.ng-head.active { color: #fff; }
.ng-ic { display: grid; place-items: center; flex: none; opacity: .8; }
.ng-head.active .ng-ic { opacity: 1; }
.ng-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ng-cnt {
  flex: none; font-size: 10.5px; line-height: 16px; padding: 0 6px; border-radius: 20px;
  background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .55); font-weight: 400;
}
.ng-arw { flex: none; display: grid; place-items: center; opacity: .5; transition: transform .18s ease; }
.nav-grp.open .ng-arw { transform: rotate(180deg); }
.nav-grp.open > .ng-head { color: rgba(255, 255, 255, .9); }
.ng-title { display: none; }
.ng-items {
  display: none; margin: 1px 0 5px 19px; padding-left: 9px;
  border-left: 1px solid rgba(255, 255, 255, .13);
}
.nav-grp.open > .ng-items { display: block; }

.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: 7px; margin-bottom: 1px;
  color: rgba(255, 255, 255, .74); font-size: 13px;
  transition: background .16s, color .16s;
  position: relative; white-space: nowrap;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; opacity: 1; }
.nav-item.on { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.nav-item .ico { opacity: .75; }
.nav-item.on .ico { opacity: 1; }
.nav-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.side-foot {
  padding: 10px 18px 6px; font-size: 11px; color: rgba(255, 255, 255, .38);
  display: flex; align-items: center; gap: 7px; flex: none; white-space: nowrap;
}
.side-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }

/* 收起 / 展开按钮（侧栏底部） */
.side-collapse {
  flex: none; margin: 0 10px 12px; height: 34px; padding: 0 11px;
  display: flex; align-items: center; gap: 9px;
  border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 12.5px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .72);
  transition: background .15s, color .15s, width .2s;
}
.side-collapse:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.side-collapse .ico { transition: transform .2s ease; }
.sc-txt { white-space: nowrap; }

/* ---------------- 收起态（仅桌面端）：只留分组图标 + 悬停浮层 ---------------- */
@media (min-width: 861px) {
html.side-min .brand { padding: 16px 0 14px; justify-content: center; }
html.side-min .brand-txt { display: none; }
html.side-min .nav { padding: 4px 6px 12px; }
html.side-min .nav-grp { margin-bottom: 6px; position: relative; }
html.side-min .nav-grp + .nav-grp::before {
  content: ""; display: block; height: 1px; margin: 0 8px 6px;
  background: rgba(255, 255, 255, .13);
}
html.side-min .ng-head { justify-content: center; padding: 9px 0; gap: 0; position: relative; }
html.side-min .ng-head:hover { background: rgba(255, 255, 255, .14); }
html.side-min .ng-name, html.side-min .ng-cnt, html.side-min .ng-arw { display: none; }
html.side-min .ng-ic .ico { width: 19px; height: 19px; }
html.side-min .nav-grp.on .ng-head { background: rgba(255, 255, 255, .16); color: #fff; }
html.side-min .side-foot { display: none; }
html.side-min .side-collapse { width: 42px; padding: 0; margin: 0 auto 12px; justify-content: center; }
html.side-min .sc-txt { display: none; }
html.side-min .side-collapse .ico { transform: rotate(180deg); }

/* 浮层：子菜单以白色卡片弹出 */
html.side-min .ng-items {
  display: none;
  position: fixed; left: calc(var(--side-w) + 8px); top: var(--fly-y, 120px);
  width: 214px; padding: 6px; margin: 0; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; box-shadow: 0 16px 44px rgba(16, 24, 40, .2);
  max-height: 72vh; overflow: auto; z-index: 60; border-left: 1px solid var(--line);
}
html.side-min .ng-items::before { content: ""; position: absolute; left: -9px; top: 0; bottom: 0; width: 9px; }
html.side-min .nav-grp:hover > .ng-items { display: block; }
html.side-min .ng-title {
  display: block; padding: 7px 9px 7px; margin-bottom: 3px;
  font-size: 11px; letter-spacing: 1px; color: var(--muted);
  border-bottom: 1px solid var(--line-2);
}
html.side-min .ng-items .nav-item {
  color: var(--text-2); font-size: 13px; padding: 7px 9px; margin-bottom: 1px; font-weight: 400;
}
html.side-min .ng-items .nav-item:hover { background: #f6f7f9; color: var(--text); }
html.side-min .ng-items .nav-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; box-shadow: none; }
html.side-min .ng-items .nav-item .ico { opacity: .6; }
html.side-min .ng-items .nav-item.on .ico { opacity: 1; }
}

.main {
  margin-left: var(--side-w); min-width: 0;
  min-height: 100vh; display: flex; flex-direction: column;
  transition: margin-left .2s ease;
}

.topbar {
  height: 62px; flex: none;
  background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.tb-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.tb-title h1 { font-size: 16.5px; font-weight: 600; letter-spacing: .2px; white-space: nowrap; }
.tb-title p { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-right { display: flex; align-items: center; gap: 10px; }

.icon-btn { border: 1px solid var(--line); background: #fff; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; color: var(--text-2); }
.only-mobile { display: none; }
.only-desktop { display: grid; }

.user-menu { position: relative; }
.user-menu summary {
  list-style: none; display: flex; align-items: center; gap: 9px;
  padding: 5px 9px 5px 5px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: .15s;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: #fafbfc; border-color: var(--line); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600;
}
.um-txt { display: flex; flex-direction: column; line-height: 1.25; }
.um-txt b { font-size: 13px; font-weight: 600; }
.um-txt i { font-style: normal; font-size: 11px; color: var(--muted); }
.um-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 208px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .12); padding: 6px; z-index: 50;
}
.um-head { padding: 9px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 5px; }
.um-head b { display: block; font-size: 13px; }
.um-head span { font-size: 11.5px; color: var(--muted); }
.um-pop a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 7px; color: var(--text-2); font-size: 13px; }
.um-pop a:hover { background: #f6f7f9; opacity: 1; }
.um-pop a.danger { color: var(--danger); }

.content { padding: 20px 22px 40px; flex: 1; }

/* ------------------------------------------------------------ 通用组件 */
.flash {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px; border-radius: 9px; margin-bottom: 14px; font-size: 13.5px;
}
.f-success { background: var(--ok-bg); color: #146b45; border: 1px solid #cbe9da; }
.f-error { background: var(--danger-bg); color: #8d1d17; border: 1px solid #f6d4d1; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-2);
}
.card-head h3 { font-size: 14.5px; font-weight: 600; }
.card-head .sp { flex: 1; }
.card-body { padding: 16px; }
.card-body.p0 { padding: 0; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  font-size: 13px; cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: .15s;
}
.btn:hover { border-color: #d3d7de; color: var(--text); opacity: 1; }
.btn-primary { background: linear-gradient(180deg, #b41f26, var(--brand)); border-color: var(--brand); color: #fff; font-weight: 500; }
.btn-primary:hover { filter: brightness(1.06); color: #fff; }
.btn-danger { color: var(--danger); border-color: #f0cfcc; background: #fff; }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.badge {
  display: inline-flex; align-items: center; height: 21px; padding: 0 8px;
  border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-danger { background: var(--danger-bg); color: var(--danger); }
.b-muted { background: #f1f2f5; color: #6b7280; }

.chip {
  display: inline-block; padding: 1px 7px; margin-right: 4px;
  background: #f3f4f7; border: 1px solid var(--line-2);
  border-radius: 5px; font-size: 11.5px; color: var(--text-2);
}
.chip-more { background: #fff; color: var(--muted); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .1); vertical-align: -1px; }

/* ------------------------------------------------------------ 工具条 */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid var(--line-2); }
.toolbar form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar .sp { flex: 1; }
.inp, select.inp {
  height: 34px; padding: 0 11px; border: 1px solid #dcdfe5; border-radius: 8px;
  background: #fff; color: var(--text); font-size: 13px; font-family: inherit;
  outline: none; transition: .15s; max-width: 100%;
}
.inp:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(193, 39, 45, .09); }
.inp::placeholder { color: #b3b9c4; }
select.inp { padding-right: 26px; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b93a1' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; }
.ta { height: auto; padding: 9px 11px; line-height: 1.65; resize: vertical; width: 100%; }
.toolbar .inp[type=search] { width: 220px; }

/* ------------------------------------------------------------ 表格 */
.table-wrap { overflow-x: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
  padding: 10px 14px; background: #fafbfc; border-bottom: 1px solid var(--line-2); white-space: nowrap;
}
table.tb td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tb tr:last-child td { border-bottom: 0; }
table.tb tbody tr:hover { background: #fcfcfd; }
table.tb .act { text-align: right; white-space: nowrap; }
table.tb .act a { margin-left: 10px; font-size: 12.5px; }
table.tb .act a.del { color: var(--danger); }
.tb-title-cell { display: flex; flex-direction: column; gap: 2px; }
.tb-title-cell b { font-weight: 600; }
.tb-title-cell span { font-size: 11.5px; color: var(--muted); }

.empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 4px; }

/* ------------------------------------------------------------ 分页 */
.pager { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.pager-info { font-size: 12.5px; color: var(--muted); }
.pager-btns { margin-left: auto; display: flex; gap: 5px; }
.pg {
  min-width: 30px; height: 30px; padding: 0 9px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px;
}
.pg:hover { border-color: #d3d7de; opacity: 1; }
.pg.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ------------------------------------------------------------ 表单 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld.full { grid-column: 1 / -1; }
.fld label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.fld label .req { color: var(--brand-2); margin-left: 2px; }
.fld .help { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.fld .err { font-size: 11.5px; color: var(--danger); }
.fld input.inp, .fld select.inp { width: 100%; }
.color-wrap { display: flex; gap: 8px; align-items: center; }
.color-wrap input[type=color] { width: 40px; height: 34px; padding: 2px; border: 1px solid #dcdfe5; border-radius: 8px; background: #fff; cursor: pointer; }
.color-wrap .inp { flex: 1; }

.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; height: 34px; }
.sw input { display: none; }
.sw-track { width: 40px; height: 22px; border-radius: 999px; background: #dfe2e8; position: relative; transition: .18s; flex: none; }
.sw-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .18s; box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.sw input:checked + .sw-track { background: var(--brand-2); }
.sw input:checked + .sw-track::after { transform: translateX(18px); }
.sw-txt { font-size: 12.5px; color: var(--muted); }

.form-actions { display: flex; gap: 10px; padding-top: 6px; }

/* ------------------------------------------------------------ 工作台 */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; right: -18px; top: -18px; width: 66px; height: 66px; border-radius: 50%; background: var(--brand-soft); opacity: .7; }
.kpi .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 26px; font-weight: 650; letter-spacing: -.3px; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.kpi .v em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.kpi .s { font-size: 11.5px; color: var(--muted); position: relative; z-index: 1; }
.kpi .s b { color: var(--ok); font-weight: 600; }
.kpi .s b.dn { color: var(--danger); }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.grid-2.rev { grid-template-columns: 1fr 1.35fr; }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding: 8px 2px 0; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-col .bar { width: 100%; max-width: 36px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #d9454b, var(--brand)); min-height: 4px; transition: .3s; }
.bar-col .bar.mut { background: linear-gradient(180deg, #d9dde3, #c3c9d2); }
.bar-col .lb { font-size: 11px; color: var(--muted); }
.bar-col .vl { font-size: 11.5px; color: var(--text-2); font-weight: 600; }

.list-simple { display: flex; flex-direction: column; }
.list-simple .row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.list-simple .row:last-child { border-bottom: 0; }
.list-simple .row .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-simple .row .m { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

.quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick a {
  border: 1px solid var(--line); border-radius: 9px; padding: 12px 13px;
  display: flex; align-items: center; gap: 10px; color: var(--text); background: #fff;
  transition: .15s;
}
.quick a:hover { border-color: #e0b9b9; background: #fffafa; box-shadow: 0 2px 10px rgba(156, 20, 24, .06); opacity: 1; }
.quick a .q-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.quick a b { font-size: 13px; font-weight: 500; display: block; }
.quick a span { font-size: 11.5px; color: var(--muted); }

/* ------------------------------------------------------------ 详情页 */
.detail-head { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.detail-head .dh-main { flex: 1; min-width: 0; }
.detail-head h2 { font-size: 17px; font-weight: 600; margin-bottom: 5px; }
.detail-head .dh-meta { font-size: 12px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }

.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.dl .it { padding: 10px 0; border-bottom: 1px dashed var(--line-2); display: flex; gap: 10px; font-size: 13px; min-width: 0; }
.dl .it dt { color: var(--muted); flex: none; width: 96px; }
.dl .it dd { color: var(--text); flex: 1; min-width: 0; word-break: break-word; }
.dl .it.full { grid-column: 1 / -1; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 16px 0; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -21px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #cfd4dc; }
.tl-item.on::before { border-color: var(--brand-2); background: var(--brand-2); }
.tl-item b { font-size: 13px; font-weight: 600; }
.tl-item .ts { font-size: 11.5px; color: var(--muted); margin-left: 8px; }
.tl-item p { font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

.step-track { display: flex; gap: 0; overflow-x: auto; padding: 4px 0 2px; }
.step-track .st { flex: 1; min-width: 108px; position: relative; padding-top: 22px; text-align: center; }
.step-track .st::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--line); }
.step-track .st:first-child::before { left: 50%; }
.step-track .st:last-child::before { right: 50%; }
.step-track .st::after { content: ""; position: absolute; top: 2px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #cfd4dc; }
.step-track .st.done::after { background: var(--ok); border-color: var(--ok); }
.step-track .st.now::after { background: var(--brand-2); border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(193, 39, 45, .12); }
.step-track .st span { font-size: 11.5px; color: var(--muted); display: block; padding: 0 4px; }
.step-track .st.done span, .step-track .st.now span { color: var(--text-2); font-weight: 500; }

/* ------------------------------------------------------------ 弹层 */
.modal-mask { position: fixed; inset: 0; background: rgba(16, 24, 40, .42); display: none; align-items: center; justify-content: center; z-index: 90; padding: 20px; }
.modal-mask.on { display: flex; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 520px; box-shadow: 0 24px 60px rgba(16, 24, 40, .24); max-height: 88vh; overflow: auto; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; }
.modal-head h3 { font-size: 15px; flex: 1; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; }

/* ------------------------------------------------------------ 登录 */
.login-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1000px 520px at 12% -10%, rgba(193, 39, 45, .18), transparent 60%),
    radial-gradient(760px 420px at 100% 110%, rgba(156, 20, 24, .14), transparent 55%),
    #f6f4f4;
}
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; box-shadow: 0 20px 50px rgba(120, 20, 24, .12); overflow: hidden; }
.login-top { background: linear-gradient(135deg, #9c1418, #c1272d); color: #fff; padding: 26px 28px 24px; }
.login-top .lm { width: 42px; height: 42px; border-radius: 11px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .24); display: grid; place-items: center; font-size: 20px; font-weight: 700; margin-bottom: 14px; }
.login-top h1 { font-size: 19px; font-weight: 600; letter-spacing: .5px; }
.login-top p { font-size: 12px; color: rgba(255, 255, 255, .72); margin-top: 4px; }
.login-body { padding: 24px 28px 28px; }
.login-body .fld { margin-bottom: 14px; }
.login-body .btn { width: 100%; height: 40px; justify-content: center; font-size: 14px; }
.login-foot { text-align: center; font-size: 11.5px; color: var(--muted); padding: 0 28px 22px; }
.login-tip { background: #fafbfc; border: 1px dashed var(--line); border-radius: 9px; padding: 10px 12px; font-size: 11.5px; color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
.login-tip code { color: var(--brand); }

/* ------------------------------------------------------------ 权限矩阵 */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.perm-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; cursor: pointer; background: #fff; }
.perm-item:hover { border-color: #d9b6b6; }
.perm-item input { accent-color: var(--brand-2); width: 15px; height: 15px; }
.perm-group { margin-bottom: 18px; }
.perm-group h4 { font-size: 12.5px; color: var(--muted); font-weight: 500; margin-bottom: 8px; padding-left: 2px; }

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .grid-2.rev { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .side { width: 236px; transform: translateX(-100%); }
  .side.open { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  .main { margin-left: 0; }
  .side-collapse, .only-desktop { display: none !important; }
  .only-mobile { display: grid; }
  .content { padding: 16px 14px 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr; }
  .quick { grid-template-columns: 1fr; }
  .tb-title p { display: none; }
  .um-txt { display: none; }
}

/* ---------------------------------------------------------------- 标签页 */
.tabs { display: flex; align-items: center; gap: 6px; padding: 10px 14px; flex-wrap: wrap; }
.tabs .sp { flex: 1; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  font-size: 13px; color: var(--text-2); transition: .15s;
}
.tab:hover { background: #f5f6f8; color: var(--text); opacity: 1; }
.tab.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.tab svg { flex: none; }

/* ---------------------------------------------------------------- 支付中心 */
.pay-head { flex-wrap: wrap; }
.pay-logo {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
}
.pay-title { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.pay-title h3 { font-size: 15px; font-weight: 600; }
.pay-title .muted { font-size: 12px; }
.pay-switch { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pay-switch .sp { flex: 1; }
.fld-inline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.fld-inline .inp { padding: 0 9px; font-size: 12.5px; }

.reveal-wrap { position: relative; display: flex; }
.reveal-wrap .inp { flex: 1; padding-right: 38px; }
.reveal-btn {
  position: absolute; right: 3px; top: 3px; width: 30px; height: 28px;
  border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
}
.reveal-btn:hover { background: #f2f3f5; color: var(--text-2); }
.reveal-btn.on { background: var(--brand-soft); color: var(--brand); }
.help.sec-ok { color: var(--ok); }

.pay-tips { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 12.8px; line-height: 1.9; }
.pay-tips li { margin-bottom: 8px; }
.pay-tips b { color: var(--text); }
.pay-tips code { background: #f4f5f7; border-radius: 4px; padding: 1px 5px; color: var(--brand); }

@media (max-width: 860px) {
  .pay-head { gap: 10px; }
  .pay-title { flex: 1; }
}

/* 校验失败字段红标 */
.inp-err { border-color: var(--danger) !important; background: #fffafa; }
.inp-err:focus { box-shadow: 0 0 0 3px rgba(201, 39, 45, .12); }
.help.err { color: var(--danger); font-weight: 500; }
