/* ==========================================================================
   [03] 03-components.css —— 微派云运营管理后台（运营后台）
   来源：原型 assets/style.css 按分节先后顺序切分（保持原有级联顺序，勿调整加载顺序）
   本文件包含：通用组件（统计卡 / 筛选栏 / 按钮 / 表格 / 标签 / 表单 / 弹窗 / Tabs / 分页等）
   加载顺序：01-base.css → 02-layout.css → 03-components.css → 04-pages.css
   ========================================================================== */

/* ============================ 统计卡 ============================ */

.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm);
  transition: box-shadow .16s, border-color .16s;
}
.stat:hover { box-shadow: var(--shadow); border-color: var(--border-strong); }
.stat-top { display: flex; align-items: center; gap: 10px; }
.stat-ico {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--primary-weak); color: var(--primary); flex: 0 0 auto;
}
.stat-ico .ic { width: 18px; height: 18px; }
.tone-e .stat-ico { background: var(--emerald-weak); color: var(--emerald); }
.tone-a .stat-ico { background: var(--amber-weak);   color: var(--amber); }
.tone-r .stat-ico { background: var(--red-weak);     color: var(--red); }
.tone-v .stat-ico { background: var(--violet-weak);  color: var(--violet); }
.stat-label { font-size: 12.6px; color: var(--text-2); }
.stat-val {
  font-size: 26px; font-weight: 700; letter-spacing: -.6px;
  margin: 10px 0 3px; font-variant-numeric: tabular-nums; line-height: 1.1;
}
.stat-val small { font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-left: 4px; }
.stat-foot { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.trend-up { color: var(--red); font-weight: 600; }
.trend-down { color: var(--emerald); font-weight: 600; }

/* ============================ 筛选栏 ============================ */

.toolbar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--border); background: var(--panel);
}
.toolbar .tb-input, .toolbar .tb-select {
  height: 34px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel-2); padding: 0 11px; outline: none; font-size: 12.5px;
  transition: border-color .14s, background-color .14s, box-shadow .14s;
}
.toolbar .tb-input { padding-left: 32px; min-width: 200px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2393A0B1' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='7'/><path d='M20 20l-3.6-3.6'/></svg>");
  background-repeat: no-repeat; background-position: 10px center;
}
.toolbar .tb-input:focus, .toolbar .tb-select:focus {
  border-color: var(--primary-line); background-color: #fff;
  box-shadow: 0 0 0 3px var(--primary-weak);
}
.toolbar .tb-select { padding-right: 28px; cursor: pointer; min-width: 124px; }
.toolbar .tb-spacer { flex: 1; }
.toolbar .tb-count { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.toolbar .tb-count b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============================ 按钮 ============================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  cursor: pointer; font-size: 12.6px; font-weight: 500; white-space: nowrap;
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s, transform .06s;
}
.btn .ic { width: 14px; height: 14px; }
.btn:hover { background: var(--panel-2); border-color: var(--border-strong); color: var(--text); }
.btn:active { transform: translateY(.5px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(37,99,235,.3); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-emerald { background: var(--emerald); border-color: var(--emerald); color: #fff; box-shadow: 0 1px 2px rgba(14,159,110,.3); }
.btn-emerald:hover { background: #0C8C60; border-color: #0C8C60; color: #fff; }
.btn-danger { color: var(--red); border-color: #F5D5D5; background: var(--red-weak); }
.btn-danger:hover { background: #FBE0E0; border-color: #EFC4C4; color: var(--red); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--panel-3); color: var(--text); border-color: transparent; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: var(--radius-xs); }
.btn-sm .ic { width: 13px; height: 13px; }
.btn-lg { height: 42px; padding: 0 22px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* 表格里的文字按钮 */
.link-btn {
  border: none; background: none; padding: 0 2px; cursor: pointer;
  color: var(--primary); font-size: 12.6px; font-weight: 500;
  transition: color .12s;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--red); }
.link-btn.emerald { color: var(--emerald); }
.link-btn.muted { color: var(--text-3); }
.link-btn + .link-btn { margin-left: 9px; }
.link-sep { color: var(--border-strong); margin: 0 1px; font-size: 11px; }

/* ============================ 表格 ============================ */

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.9px; }
table.tbl th {
  position: sticky; top: 0; z-index: 2;
  background: var(--panel-2); color: var(--text-2);
  font-weight: 600; text-align: left; white-space: nowrap;
  padding: 11px 16px; border-bottom: 1px solid var(--border);
  font-size: 12.2px;
}
table.tbl td {
  padding: 12px 16px; border-bottom: 1px solid #F2F5F9;
  vertical-align: middle; color: var(--text);
}
table.tbl tbody tr { transition: background .1s; }
table.tbl tbody tr:hover td { background: #F8FAFD; }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .num { font-variant-numeric: tabular-nums; }
table.tbl .nowrap { white-space: nowrap; }
table.tbl .col-actions { white-space: nowrap; text-align: right; }
table.tbl th.col-actions { text-align: right; }
table.tbl .strong { font-weight: 600; }
table.tbl .muted { color: var(--text-3); }
table.tbl .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 12.2px; letter-spacing: .2px; }
.tbl-empty { padding: 50px 16px; text-align: center; color: var(--text-3); font-size: 13px; }
.tbl-empty .ico { font-size: 30px; display: block; margin-bottom: 10px; opacity: .45; }

/* ============================ 标签 / 徽标 ============================ */

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 9px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--panel-3); color: var(--text-2);
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.tag.no-dot::before { display: none; }
.tag-blue   { background: var(--primary-weak); color: var(--primary); }
.tag-green  { background: var(--emerald-weak); color: var(--emerald); }
.tag-amber  { background: var(--amber-weak);   color: var(--amber); }
.tag-red    { background: var(--red-weak);     color: var(--red); }
.tag-violet { background: var(--violet-weak);  color: var(--violet); }
.tag-gray   { background: var(--panel-3);      color: var(--text-3); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 25px; padding: 0 10px; border-radius: 7px;
  background: var(--panel-3); color: var(--text-2); font-size: 12px;
}
.chip b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.plate {
  display: inline-block; padding: 1.5px 7px; border-radius: 5px;
  background: #EAF3FF; color: #1B5FC1; border: 1px solid #CFE2FB;
  font-weight: 700; font-size: 12px; letter-spacing: .6px;
}
.plate.yellow { background: #FFF7E2; color: #A9750A; border-color: #F5E2B4; }
.vin { font-family: "SFMono-Regular", Consolas, Menlo, monospace; font-size: 12.2px; letter-spacing: .4px; color: var(--text-2); }

/* ============================ 表单 ============================ */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.form-grid .span-2 { grid-column: span 2; }
.field label { display: block; font-size: 12.4px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field label .req { color: var(--red); margin-left: 2px; }
.field .hint { font-size: 11px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: #fff; padding: 0 12px; height: 36px; outline: none;
  transition: border-color .14s, box-shadow .14s;
}
.textarea { height: auto; padding: 9px 12px; min-height: 76px; resize: vertical; line-height: 1.6; }
.select { padding-right: 30px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%2393A0B1' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-weak); }
.input[readonly] { background: var(--panel-2); color: var(--text-2); }
.input::placeholder, .textarea::placeholder { color: #AEB8C6; }
.form-section-title {
  grid-column: span 2; font-size: 12px; font-weight: 700; color: var(--text-3);
  letter-spacing: .5px; padding-bottom: 4px; border-bottom: 1px dashed var(--border); margin-top: 2px;
}

.upload {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: var(--panel-2); padding: 12px 14px; cursor: pointer; color: var(--text-3); font-size: 12.4px;
  transition: border-color .14s, color .14s, background .14s;
}
.upload:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-weak); }
.upload .up-ico { font-size: 17px; }

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track {
  width: 40px; height: 22px; border-radius: 12px; background: #D5DCE6;
  position: relative; transition: background .16s; flex: 0 0 auto;
}
.switch .track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .16s;
}
.switch input:checked + .track { background: var(--emerald); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:disabled + .track { opacity: .5; }
.switch .sw-label { font-size: 12.4px; color: var(--text-2); }

/* 表单内大号开关（带状态文案） */
.switch-lg { gap: 10px; }
.switch-lg .track { width: 46px; height: 25px; border-radius: 13px; }
.switch-lg .track::after { top: 3px; left: 3px; width: 19px; height: 19px; }
.switch-lg input:checked + .track::after { transform: translateX(21px); }
.switch-lg .sw-label { font-size: 12.8px; font-weight: 600; color: var(--text-3); }
.switch-lg input:checked ~ .sw-label { color: var(--emerald); }

/* 依赖开关显示的字段组（充电限额） */
.field label.switch { display: inline-flex; margin-bottom: 0; }  /* 覆盖 .field label 的 display:block */
/* 前置条件（门禁）提示：如「仅新能源车辆可开通汇充宝」 */
.field .hint-warn { color: var(--amber); background: var(--amber-weak); border-radius: 7px; padding: 6px 10px; line-height: 1.6; }
.switch.is-disabled { cursor: not-allowed; }
.switch.is-disabled .track { opacity: .45; }
.switch.is-disabled .sw-label { color: var(--text-3); font-weight: 500; }
/* 列表「能源类型」列：新能源车辆高亮 */
.tag .en-bolt { font-size: 10.5px; }
.field[data-dep] { animation: fade .18s ease; }
.field[data-dep] .input { border-color: #BFE6D4; background: var(--emerald-weak); }
.field[data-dep] .input:focus { border-color: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-weak); }
.field[data-dep] label { color: var(--emerald); }

/* ============================ 弹窗 ============================ */

.overlay {
  position: fixed; inset: 0; background: rgba(19, 27, 40, .44);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 60px 20px; z-index: 100; overflow-y: auto;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.99) } to { opacity: 1; transform: none } }
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 700px; animation: pop .2s cubic-bezier(.16,1,.3,1); overflow: hidden;
}
.modal.sm { max-width: 470px; }
.modal.md { max-width: 560px; }
.modal.lg { max-width: 900px; }
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15.5px; font-weight: 700; }
.modal-head .sub { font-size: 11.5px; color: var(--text-3); }
.modal-head .close {
  margin-left: auto; width: 30px; height: 30px; border-radius: 8px; border: none;
  background: transparent; color: var(--text-3); cursor: pointer; font-size: 16px;
  transition: background .14s, color .14s;
}
.modal-head .close:hover { background: var(--panel-3); color: var(--text); }
.modal-body { padding: 20px; max-height: calc(100vh - 230px); overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; gap: 9px; justify-content: flex-end;
  padding: 14px 20px; border-top: 1px solid var(--border); background: var(--panel-2);
}
.modal-foot .foot-left { margin-right: auto; font-size: 12px; color: var(--text-3); }

/* 详情描述列表 */
.desc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.desc .d-item { padding: 12px 15px; border-bottom: 1px solid #F2F5F9; border-right: 1px solid var(--border); }
.desc .d-item.span-2 { grid-column: span 2; }
.desc .d-label { font-size: 11.5px; color: var(--text-3); margin-bottom: 4px; }
.desc .d-val { font-size: 13px; font-weight: 500; word-break: break-all; }

/* ============================ Tabs ============================ */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 18px; background: var(--panel); flex-wrap: wrap; }
.tab {
  padding: 12px 14px; font-size: 13px; color: var(--text-2); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  transition: color .14s, border-color .14s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab .t-badge {
  display: inline-block; margin-left: 6px; font-size: 10.5px; line-height: 16px; height: 16px;
  padding: 0 6px; border-radius: 9px; background: var(--panel-3); color: var(--text-3); font-weight: 600;
}
.tab.active .t-badge { background: var(--primary-weak); color: var(--primary); }

/* ============================ 违章记录查询 ============================ */

.vio-panel .qgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; }
.vio-panel .qf { min-width: 0; }
.vio-panel .qf.span2 { grid-column: span 2; }
.vio-panel .qf > label { display: block; font-size: 12.2px; color: var(--text-3); margin-bottom: 6px; font-weight: 500; }
.vio-panel .qrange { display: flex; align-items: center; gap: 8px; }
.vio-panel .qrange span { color: var(--text-3); flex: 0 0 auto; }
.vio-panel .qchips {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border);
}
.vio-panel .qchip-label { font-size: 12px; color: var(--text-3); }
.vio-panel .qchip {
  height: 28px; padding: 0 12px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text-2); font-size: 12.2px; font-family: inherit;
  cursor: pointer; transition: border-color .14s, color .14s, background .14s;
}
.vio-panel .qchip:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-weak); }

.risk-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px dashed #EDF1F6; font-size: 12.6px;
}
.risk-row:last-child { border-bottom: none; }
.risk-row .risk-owner { color: var(--text-2); }
.risk-row .risk-tags { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

@media (max-width: 1240px) {
  .vio-panel .qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .vio-panel .qgrid { grid-template-columns: 1fr; }
  .vio-panel .qf.span2 { grid-column: span 1; }
}

/* ============================ 批量导入 ============================ */

.modal.xl { max-width: 1080px; }

.drop {
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--panel-2); padding: 28px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-weak); }
.drop.over { transform: scale(1.005); }
.drop-ico {
  width: 46px; height: 46px; margin: 0 auto 10px; border-radius: 14px;
  display: grid; place-items: center; background: #fff; border: 1px solid var(--border);
  color: var(--primary); box-shadow: var(--shadow-xs);
}
.drop-ico .ic { width: 22px; height: 22px; }
.drop-title { font-size: 13.6px; font-weight: 600; color: var(--text); }
.drop-sub { font-size: 12px; color: var(--text-3); margin-top: 5px; }

.imp-or { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--text-3); font-size: 12px; }
.imp-or::before, .imp-or::after { content: ""; height: 1px; background: var(--border); flex: 1; }

.imp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.imp-row-tip { font-size: 11.6px; color: var(--text-3); }

.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel-2); font-size: 12.6px; color: var(--text-2); transition: all .14s;
}
.radio:hover { border-color: var(--border-strong); }
.radio.on { border-color: var(--primary-line); background: var(--primary-weak); color: var(--primary); font-weight: 600; }
.radio input { accent-color: var(--primary); margin: 0; }

table.imp-spec th, table.imp-preview th { white-space: nowrap; }
table.imp-preview td { font-size: 12.2px; }
table.imp-preview tr.bad td { background: #FFFAFA; }
.imp-err { color: var(--red); font-size: 11.6px; line-height: 1.65; }
.imp-warn { color: var(--amber); font-size: 11.6px; line-height: 1.65; }

/* ==================== 企业认证 / 开票信息维护 ==================== */

.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 12.2px; letter-spacing: .2px; }
.strong { font-weight: 600; }

/* 认证流程步骤条 */
.cert-flow { display: flex; align-items: flex-start; padding: 6px 0 2px; }
.cert-step { flex: 1; position: relative; text-align: center; padding: 0 6px; }
.cert-step::after {
  content: ""; position: absolute; top: 15px; left: calc(50% + 22px); right: calc(-50% + 22px);
  height: 2px; background: var(--border); z-index: 0;
}
.cert-step:last-child::after { display: none; }
.cert-step.done::after { background: var(--emerald); }
.cert-dot {
  position: relative; z-index: 1; width: 32px; height: 32px; margin: 0 auto 9px;
  border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 2px solid var(--border); color: var(--text-3);
  font-size: 13px; font-weight: 700; transition: all .15s;
}
.cert-step.done .cert-dot { background: var(--emerald); border-color: var(--emerald); color: #fff; }
.cert-step.cur .cert-dot { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-weak); }
.cert-step.fail .cert-dot { background: var(--red); border-color: var(--red); color: #fff; }
.cert-step-t { font-size: 12.6px; font-weight: 600; color: var(--text); }
.cert-step-d { font-size: 11px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }

/* 证照 / 附件条目 */
.doc-list { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--panel-2); font-size: 12.2px; color: var(--text-2);
}
.doc-chip .dc-ico { display: grid; place-items: center; color: var(--primary); }
.doc-chip .dc-ico .ic { width: 15px; height: 15px; }
.doc-chip .dc-body { display: flex; flex-direction: column; line-height: 1.45; }
.doc-chip .dc-body b { font-size: 12.2px; font-weight: 600; color: var(--text); }
.doc-chip .dc-body em { font-size: 11px; font-style: normal; color: var(--text-3); }
.doc-chip[onclick] { cursor: pointer; transition: border-color .15s, background .15s; }
.doc-chip[onclick]:hover { border-color: var(--primary-line); background: var(--primary-weak); }

/* ============================ 企业认证中心 ============================ */
.cert-hero {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin-bottom: 16px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); box-shadow: var(--shadow-xs); position: relative; overflow: hidden;
}
.cert-hero::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--text-3); }
.cert-hero.ok::before   { background: var(--emerald); }
.cert-hero.ing::before  { background: var(--amber); }
.cert-hero.fail::before { background: var(--red); }
.cert-hero .ch-ico {
  width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px;
  display: grid; place-items: center; color: #fff; background: var(--text-3);
}
.cert-hero .ch-ico .ic { width: 22px; height: 22px; }
.cert-hero.ok .ch-ico   { background: linear-gradient(135deg, #12B981, #0E9F6E); }
.cert-hero.ing .ch-ico  { background: linear-gradient(135deg, #F0A423, #D97706); }
.cert-hero.fail .ch-ico { background: linear-gradient(135deg, #F05252, #E02424); }
.cert-hero.idle .ch-ico { background: linear-gradient(135deg, #7C8899, #58657A); }
.cert-hero .ch-main { flex: 1; min-width: 0; }
.cert-hero .ch-title { font-size: 15.5px; font-weight: 700; color: var(--text); }
.cert-hero .ch-desc { font-size: 12.4px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.cert-hero .ch-status { flex: 0 0 auto; }

/* 审核记录时间线 */
.ent-timeline { display: flex; flex-direction: column; }
.et-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; }
.et-item + .et-item { border-top: 1px dashed var(--border); }
.et-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; background: var(--text-3); box-shadow: 0 0 0 3px var(--panel-3); }
.et-item.done .et-dot { background: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-weak); }
.et-item.cur .et-dot  { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-weak); }
.et-item.fail .et-dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-weak); }
.et-body { flex: 1; min-width: 0; }
.et-t { font-size: 13px; font-weight: 600; color: var(--text); }
.et-d { font-size: 11.8px; color: var(--text-3); margin-top: 3px; }
.et-time { flex: 0 0 auto; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .cert-hero { flex-wrap: wrap; }
  .et-item { flex-wrap: wrap; }
  .et-time { width: 100%; padding-left: 22px; }
}

/* 发票抬头预览卡 */
.inv-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: linear-gradient(180deg, #FCFDFF, #F7F9FD); }
.inv-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--panel-3); border-bottom: 1px solid var(--border); }
.inv-tag { font-size: 11.5px; color: var(--text-3); letter-spacing: .5px; }
.inv-badge { font-size: 11px; font-weight: 600; color: var(--emerald); background: var(--emerald-weak); border: 1px solid #C9EBDF; padding: 2px 9px; border-radius: 999px; }
.inv-title { font-size: 17px; font-weight: 700; letter-spacing: .3px; padding: 14px 16px 6px; color: var(--text); }
.inv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); margin: 12px; border-radius: var(--radius-sm); overflow: hidden; }
.inv-grid > div { background: #fff; padding: 9px 13px; display: flex; flex-direction: column; gap: 3px; }
.inv-grid span { font-size: 11px; color: var(--text-3); }
.inv-grid b { font-size: 12.8px; font-weight: 600; color: var(--text); word-break: break-all; }

/* 资料完整度清单 */
.chk-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 12.6px; color: var(--text-2); }
.chk-dot { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: 0 0 auto; }
.chk.ok .chk-dot { background: var(--emerald-weak); color: var(--emerald); }
.chk.bad .chk-dot { background: var(--red-weak); color: var(--red); }
.chk-txt { margin-left: auto; font-size: 11.4px; color: var(--text-3); }

@media (max-width: 720px) {
  .inv-grid, .chk-list { grid-template-columns: 1fr; }
  .cert-flow { flex-wrap: wrap; gap: 12px; }
  .cert-step::after { display: none; }
}

/* ============================ 图表 ============================ */

.chart-wrap { width: 100%; }
.chart-wrap svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar-row .bl { width: 100px; font-size: 12.4px; color: var(--text-2); flex: 0 0 auto; text-align: right; }
.bar-row .bt { flex: 1; height: 9px; background: var(--panel-3); border-radius: 5px; overflow: hidden; }
.bar-row .bf { display: block; height: 100%; border-radius: 5px; background: var(--primary); transition: width .4s ease; }
.bar-row .bv { width: 80px; text-align: right; font-size: 12.4px; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; flex: 0 0 auto; }

/* 环形图（纯 CSS） */
.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut {
  width: 138px; height: 138px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; position: relative;
}
.donut::after {
  content: ""; position: absolute; inset: 27px; background: #fff; border-radius: 50%;
}
.donut .donut-center { position: relative; z-index: 2; text-align: center; }
.donut .donut-center b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.5px; }
.donut .donut-center span { font-size: 11px; color: var(--text-3); }
.donut-legend { flex: 1; min-width: 150px; }
.donut-legend .dl-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12.6px; }
.donut-legend .dl-row .dl-name { color: var(--text-2); }
.donut-legend .dl-row .dl-val { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.donut-legend .dl-row .dl-pct { width: 46px; text-align: right; color: var(--text-3); font-size: 11.5px; }

/* 进度条 */
.progress { height: 8px; background: var(--panel-3); border-radius: 4px; overflow: hidden; min-width: 70px; }
.progress i { display: block; height: 100%; border-radius: 4px; background: var(--primary); transition: width .4s ease; }
.progress i.ok { background: var(--emerald); }
.progress i.warn { background: var(--amber); }
.progress i.bad { background: var(--red); }

/* ============================ 详情页布局 ============================ */

.split { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }
.info-list .il-row { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #EDF1F6; font-size: 12.8px; }
.info-list .il-row:last-child { border-bottom: none; }
.info-list .il-k { color: var(--text-3); width: 88px; flex: 0 0 auto; }
.info-list .il-v { flex: 1; word-break: break-all; }

/* ============================ 提示条 ============================ */

.notice {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 15px; border-radius: var(--radius-sm); font-size: 12.7px; line-height: 1.7;
  background: var(--primary-weak); color: #1B4FBF; border: 1px solid var(--primary-line);
}
.notice.warn { background: var(--amber-weak); color: #96620A; border-color: #F3DEB6; }
.notice.danger { background: var(--red-weak); color: #B02020; border-color: #F2CFD0; }
.notice.ok { background: var(--emerald-weak); color: #0A7A5B; border-color: #C9EBDF; }
.notice .n-ico { display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.notice .n-ico .ic { width: 16px; height: 16px; }
.notice.tone-td { background: var(--emerald-weak); color: #0A7A5B; border-color: #C9EBDF; }

/* ============================ 步骤条 ============================ */

.steps { display: flex; gap: 0; align-items: center; }
.step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.step .s-no {
  width: 24px; height: 24px; border-radius: 50%; background: var(--panel-3);
  display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--text-3);
}
.step.done .s-no { background: var(--emerald-weak); color: var(--emerald); }
.step.active { color: var(--text); font-weight: 600; }
.step.active .s-no { background: var(--primary); color: #fff; }
.step-line { width: 36px; height: 1.5px; background: var(--border-strong); margin: 0 10px; }

/* ============================ 分页 ============================ */

.pager { display: flex; align-items: center; gap: 6px; padding: 13px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.pager .pg-info { font-size: 12.4px; color: var(--text-3); margin-right: auto; }
.pg-btn {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: var(--radius-xs);
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  cursor: pointer; font-size: 12.6px; transition: background .12s, border-color .12s, color .12s;
}
.pg-btn:hover { background: var(--panel-2); border-color: var(--border-strong); }
.pg-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pg-btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ============================ 时间线 ============================ */

.timeline { padding: 4px 0; }
.tl-item { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: 8px; top: 22px; bottom: 0; width: 1.5px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-dot {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto; margin-top: 2px;
  background: #fff; border: 2.5px solid var(--border-strong); z-index: 1;
}
.tl-item.ok .tl-dot { border-color: var(--emerald); }
.tl-item.warn .tl-dot { border-color: var(--amber); }
.tl-item.bad .tl-dot { border-color: var(--red); }
.tl-item.info .tl-dot { border-color: var(--primary); }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 13px; font-weight: 600; }
.tl-meta { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.tl-desc { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }

/* ============================ 图标 ============================ */

.ic { width: 16px; height: 16px; display: block; flex: 0 0 auto; }
.h-ic { display: grid; place-items: center; flex: 0 0 auto; }

/* ============================ 工具类 ============================ */

.mt-0 { margin-top: 0 } .mt-8 { margin-top: 8px } .mt-12 { margin-top: 12px } .mt-16 { margin-top: 16px }
.mb-0 { margin-bottom: 0 } .mb-8 { margin-bottom: 8px } .mb-12 { margin-bottom: 12px } .mb-16 { margin-bottom: 16px }
.flex { display: flex } .items-center { align-items: center } .items-end { align-items: flex-end }
.justify-between { justify-content: space-between } .gap-6 { gap: 6px } .gap-8 { gap: 8px } .gap-12 { gap: 12px } .gap-16 { gap: 16px }
.wrap { flex-wrap: wrap } .ml-auto { margin-left: auto } .flex-1 { flex: 1 }
.text-2 { color: var(--text-2) } .text-3 { color: var(--text-3) } .text-primary { color: var(--primary) } .text-emerald { color: var(--emerald) }
.text-red { color: var(--red) } .text-amber { color: var(--amber) }
.fs-11 { font-size: 11px } .fs-12 { font-size: 12px } .fs-13 { font-size: 13px } .fs-15 { font-size: 15px } .fs-17 { font-size: 17px }
.fw-6 { font-weight: 600 } .fw-7 { font-weight: 700 }
.tnum { font-variant-numeric: tabular-nums }
.hidden { display: none !important; }
