/* 综合系统 · 全站样式（桌面优先，纯本地样式，无远程字体与图片） */
:root {
  --c-bg: #f4f6f8;
  --c-surface: #ffffff;
  --c-border: #dfe3e8;
  --c-border-strong: #c7cdd5;
  --c-text: #1f2933;
  --c-muted: #66727f;
  --c-primary: #2f5d8c;
  --c-primary-dark: #244a72;
  --c-primary-soft: #eaf1f9;
  --c-neutral-bg: #eef1f4;
  --c-neutral-text: #4b5563;
  --c-warn-bg: #fff3e0;
  --c-warn-text: #a35b00;
  --c-danger-bg: #fdecec;
  --c-danger-text: #b3261e;
  --c-success-bg: #e6f4ea;
  --c-success-text: #137333;
  --c-shadow: 0 2px 10px rgba(31, 41, 51, 0.08);
  --radius: 8px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
mark { background: #fff2a8; color: inherit; padding: 0 1px; border-radius: 2px; }
code, .mono { font-family: Consolas, "Courier New", monospace; font-size: 12px; }

/* ---------- 登录 ---------- */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(140deg, #eef2f7 0%, #dfe8f2 100%);
}
.login-card {
  width: 100%;
  max-width: 390px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: var(--c-shadow);
  padding: 30px 30px 26px;
}
.login-card h1 { font-size: 22px; text-align: center; }
.login-sub { text-align: center; color: var(--c-muted); margin-top: 6px; font-size: 13px; }
.login-l2 { text-align: center; margin: 18px 0 20px; }
.login-card .form-row { margin-bottom: 14px; }
.login-card .btn-primary { width: 100%; margin-top: 6px; padding: 10px; }

/* ---------- 外壳布局 ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px;
  flex: 0 0 224px;
  background: #22303e;
  color: #e8eef4;
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.brand-mark {
  width: 34px; height: 34px; flex: 0 0 34px; border-radius: 8px;
  background: #3d6a99; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-size: 15px; }
.brand-text span { font-size: 11px; color: #aab8c6; }
.nav { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; overflow-y: auto; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
/* 一级分类标题（可点击展开 / 收起二级明细） */
.nav-group-head {
  display: flex; align-items: center; gap: 7px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(255,255,255,0.07); color: #e8eff7;
  font-size: 13px; font-weight: 700; letter-spacing: 0.3px; text-align: left;
}
.nav-group-head:hover { background: rgba(255,255,255,0.13); color: #fff; }
.nav-group-caret {
  font-size: 10px; line-height: 1; color: #9fb0c1;
  transform: rotate(0deg); transition: transform 0.15s ease;
}
.nav-group.collapsed .nav-group-caret { transform: rotate(-90deg); }
.nav-group-name { flex: 1 1 auto; }
.nav-group-count {
  font-size: 11px; font-weight: 500; color: #a9b9c9;
  background: rgba(255,255,255,0.10); border-radius: 9px; padding: 1px 7px;
}
.nav-group-body { display: flex; flex-direction: column; gap: 2px; margin-top: 3px; }
.nav-group.collapsed .nav-group-body { display: none; }
.nav-item {
  display: block; padding: 8px 12px 8px 18px; border-radius: 6px; cursor: pointer;
  color: #cdd8e3; border: 0; background: transparent; text-align: left; width: 100%;
  font-size: 14px; position: relative;
}
.nav-item::before {
  content: ''; position: absolute; left: 8px; top: 15px; width: 4px; height: 4px;
  border-radius: 50%; background: #5b7085;
}
.nav-item.active::before { background: #cfe3f7; }
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; text-decoration: none; }
.nav-item.active { background: #3d6a99; color: #fff; font-weight: 600; }
.nav-item .nav-desc { display: block; font-size: 11px; color: #9fb0c1; font-weight: 400; }
.nav-item.active .nav-desc { color: #dbe7f3; }
.sidebar-foot { padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,0.12); }
.sidebar-l2 { margin-bottom: 8px; }
.sidebar-tip { font-size: 11px; color: #9fb0c1; line-height: 1.5; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; flex: 0 0 58px; background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex; align-items: center; gap: 14px; padding: 0 22px;
}
.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-spacer { flex: 1; }
.topbar-user { font-size: 13px; color: var(--c-muted); }
.topbar-user strong { color: var(--c-text); }
.content { padding: 20px 22px 40px; flex: 1; min-width: 0; }

/* ---------- 通用块 ---------- */
.page-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h2 { font-size: 19px; }
.page-head .page-desc { color: var(--c-muted); font-size: 12px; margin-top: 3px; }
.page-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); box-shadow: var(--c-shadow); padding: 16px; margin-bottom: 16px;
}
.card > h3 { font-size: 15px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--c-border); }
.card-hint { font-size: 12px; color: var(--c-muted); margin-bottom: 10px; }
.muted { color: var(--c-muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row-tight { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.split { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.divider { height: 1px; background: var(--c-border); margin: 12px 0; }
.notice {
  border: 1px solid #d6e2f0; background: #f2f7fc; color: #2c4d6e;
  border-radius: 6px; padding: 9px 12px; font-size: 12.5px; line-height: 1.6;
}
.notice-warn { border-color: #f0dcc0; background: #fff8ed; color: #8a5410; }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--c-border-strong); background: var(--c-surface); color: var(--c-text);
  border-radius: 6px; padding: 7px 13px; cursor: pointer; line-height: 1.4;
  white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover:not(:disabled) { background: var(--c-primary-soft); border-color: var(--c-primary); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--c-primary-dark); border-color: var(--c-primary-dark); }
.btn-danger { background: var(--c-surface); border-color: #e3b6b3; color: var(--c-danger-text); }
.btn-danger:hover:not(:disabled) { background: var(--c-danger-bg); border-color: var(--c-danger-text); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn-link { border: 0; background: transparent; color: var(--c-primary); padding: 2px 4px; cursor: pointer; }
.btn-link:hover { background: transparent; text-decoration: underline; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.form-row { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-row > label { font-size: 12px; color: var(--c-muted); }
.form-row .req::after { content: " *"; color: var(--c-danger-text); }
input[type=text], input[type=password], input[type=date], input[type=number],
input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; border: 1px solid var(--c-border-strong); border-radius: 6px;
  padding: 7px 9px; background: #fff; color: var(--c-text); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(47,93,140,.14); }
input:disabled, select:disabled, textarea:disabled { background: #f2f4f6; color: var(--c-muted); }
textarea { min-height: 76px; resize: vertical; }
.form-error { color: var(--c-danger-text); font-size: 12.5px; min-height: 18px; }
.form-help { font-size: 11px; color: var(--c-muted); }
.checkbox-row { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.checkbox-row input { width: auto; }
.field-badge { font-size: 11px; color: var(--c-muted); margin-left: 4px; }

/* ---------- 筛选区 ---------- */
.filter-bar { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.filter-bar .form-row > label { font-weight: 500; }
.filter-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; align-items: center; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; background: var(--c-primary-soft);
  color: var(--c-primary-dark); border: 1px solid #c9dcf0; border-radius: 20px;
  padding: 3px 6px 3px 10px; font-size: 12px;
}
.tag button { border: 0; background: transparent; cursor: pointer; color: inherit; font-size: 13px; line-height: 1; padding: 0 2px; }
.tag button:hover { color: var(--c-danger-text); }
.search-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.search-row input { flex: 1; max-width: 420px; }
.search-hint { font-size: 11px; color: var(--c-muted); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 9px 11px; text-align: left; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
th { background: #f7f9fb; color: #41505f; font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfe; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { background: var(--c-primary-soft); }
th .sort-ind { color: var(--c-primary); font-size: 11px; margin-left: 3px; }
td.cell-actions { white-space: nowrap; }
.empty-state { padding: 34px 12px; text-align: center; color: var(--c-muted); font-size: 13px; }

/* ---------- 状态标签：仅 tone=success 使用绿色 ---------- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 12px;
  line-height: 1.6; white-space: nowrap; border: 1px solid transparent;
}
.badge--neutral { background: var(--c-neutral-bg); color: var(--c-neutral-text); border-color: #d8dee5; }
.badge--neutral-warn { background: #f4eee2; color: #7a5b24; border-color: #e6d7b8; }
.badge--warn { background: var(--c-warn-bg); color: var(--c-warn-text); border-color: #f0d6a8; }
.badge--danger { background: var(--c-danger-bg); color: var(--c-danger-text); border-color: #f1c4c1; }
.badge--success { background: var(--c-success-bg); color: var(--c-success-text); border-color: #b7dfc3; }
.l2-badge {
  display: inline-block; padding: 3px 10px; border-radius: 5px; font-size: 12px;
  background: #eceff2; color: #4b5563; border: 1px solid #d5dae0;
}
.tag-soft { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; background: var(--c-neutral-bg); color: var(--c-neutral-text); }
.tag-warn { background: var(--c-warn-bg); color: var(--c-warn-text); }
.tag-danger { background: var(--c-danger-bg); color: var(--c-danger-text); }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--c-muted); }
.pager button { border: 1px solid var(--c-border-strong); background: #fff; border-radius: 5px; padding: 4px 9px; cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--c-primary); color: var(--c-primary); }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
.pager button.current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.pager select { width: auto; padding: 4px 6px; }
.pager-spacer { flex: 1; }

/* ---------- L1 明细 ---------- */
.l1-list { display: flex; flex-direction: column; gap: 6px; }
.l1-item { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; border: 1px solid var(--c-border); border-radius: 6px; padding: 7px 10px; }
.l1-item.ok { background: #f7faf8; border-color: #dfe9e2; }
.l1-item.bad { background: #fff6f5; border-color: #f0d0cd; }
.l1-rule { flex: 0 0 92px; color: var(--c-muted); }
.l1-field { flex: 0 0 120px; font-weight: 600; }
.l1-reason { flex: 1; color: var(--c-text); }
.l1-ok { color: #4b5563; }
.l1-bad { color: var(--c-danger-text); }

/* ---------- 详情 ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.kv { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kv .k { font-size: 11.5px; color: var(--c-muted); }
.kv .v { font-size: 13.5px; word-break: break-word; }
.attach-list { display: flex; flex-direction: column; gap: 8px; }
.attach-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--c-border); border-radius: 6px; padding: 8px 10px; flex-wrap: wrap; }
.attach-name { font-weight: 600; word-break: break-all; }
.attach-meta { font-size: 11.5px; color: var(--c-muted); }
.attach-actions { margin-left: auto; display: flex; gap: 6px; }
.review-item { border-left: 3px solid var(--c-border-strong); padding: 6px 0 6px 12px; margin-bottom: 10px; }
.review-head { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12.5px; }
.review-note { color: var(--c-muted); font-size: 12.5px; margin-top: 4px; white-space: pre-wrap; }
.section-title { font-size: 14px; font-weight: 600; margin: 0 0 10px; }

/* ---------- 步骤条 ---------- */
.steps { display: flex; gap: 0; margin-bottom: 18px; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--c-border); background: #fff; font-size: 13px; }
.step:first-child { border-radius: 6px 0 0 6px; }
.step:last-child { border-radius: 0 6px 6px 0; }
.step + .step { border-left: 0; }
.step.active { background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 600; }
.step.done { background: #f4f8f4; color: #40634a; }
.step-num { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; background: var(--c-neutral-bg); color: var(--c-neutral-text); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.step.active .step-num { background: var(--c-primary); color: #fff; }
.step.done .step-num { background: #b7d7bf; color: #1f4a2c; }

/* ---------- 核验队列 ---------- */
.queue-list { display: flex; flex-direction: column; gap: 6px; max-height: 560px; overflow-y: auto; }
.queue-item { border: 1px solid var(--c-border); border-radius: 6px; padding: 9px 10px; cursor: pointer; background: #fff; }
.queue-item:hover { border-color: var(--c-primary); background: #fafcff; }
.queue-item.active { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(47,93,140,.14); }
.queue-title { font-weight: 600; font-size: 13px; word-break: break-all; }
.queue-meta { font-size: 11.5px; color: var(--c-muted); margin-top: 3px; }
.queue-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.count-chip { border: 1px solid var(--c-border); border-radius: 6px; padding: 6px 10px; background: #fff; font-size: 12px; }
.count-chip strong { font-size: 15px; margin-right: 4px; }

/* ---------- 弹窗 / toast ---------- */
.modal-root { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.modal-mask { position: absolute; inset: 0; background: rgba(20,28,36,.48); display: flex; align-items: flex-start; justify-content: center; padding: 48px 18px; overflow-y: auto; pointer-events: auto; }
.modal {
  background: #fff; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.22);
  width: 100%; max-width: 560px; pointer-events: auto;
}
.modal.wide { max-width: 880px; }
.modal-head { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--c-border); }
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 16px 18px; max-height: 66vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--c-border); }
.toast-root { position: fixed; top: 16px; right: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.toast {
  background: #fff; border: 1px solid var(--c-border-strong); border-left: 4px solid var(--c-primary);
  border-radius: 6px; padding: 10px 14px; box-shadow: var(--c-shadow); font-size: 13px; word-break: break-word;
}
.toast.error { border-left-color: var(--c-danger-text); }
.toast.warn { border-left-color: #c07a10; }
.toast.ok { border-left-color: var(--c-success-text); }

@media (max-width: 1050px) {
  .split { grid-template-columns: 1fr; }
  .sidebar { width: 180px; flex-basis: 180px; }
}
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; flex-basis: auto; padding: 10px 12px; }
  .nav { flex-direction: column; flex-wrap: nowrap; margin-top: 10px; }
  .nav-group { flex-direction: column; gap: 4px; }
  .nav-group-head { padding: 6px 8px; }
  .nav-group-body { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav-item { width: auto; padding: 6px 10px; }
  .nav-item::before { display: none; }
  .nav-item .nav-desc, .sidebar-foot { display: none; }
  .topbar { padding: 0 12px; gap: 8px; flex-wrap: wrap; height: auto; min-height: 58px; }
  .content { padding: 14px 12px 30px; }
  .steps { flex-direction: column; }
  .step, .step:first-child, .step:last-child { border-radius: 6px; }
  .step + .step { border-left: 1px solid var(--c-border); border-top: 0; }
}

/* ---------- 资质目录（简化首页） ---------- */
.cat-hero {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(135deg, #2f5d8c, #3d78b0);
  color: #fff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px;
}
.cat-hero h1 { font-size: 20px; }
.cat-hero p { font-size: 12.5px; opacity: .9; margin-top: 3px; }
.cat-hero .cat-stat { margin-left: auto; display: flex; gap: 22px; }
.cat-hero .cat-stat div { text-align: center; }
.cat-hero .cat-stat b { display: block; font-size: 24px; line-height: 1.1; }
.cat-hero .cat-stat span { font-size: 11px; opacity: .85; }
.cat-search { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
.cat-search input { flex: 1; max-width: 520px; padding: 10px 12px; font-size: 14px; border: 1px solid var(--c-border-strong); border-radius: var(--radius); }
.cat-search .btn { padding: 9px 18px; }
.cat-group { margin-bottom: 26px; }
.cat-group-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cat-group-head h3 { font-size: 16px; }
.cat-group-head .cat-count { font-size: 12px; color: var(--c-muted); background: var(--c-neutral-bg); padding: 2px 9px; border-radius: 12px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.cat-card {
  display: block; background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 14px 15px; cursor: pointer;
  transition: box-shadow .15s, border-color .15s, transform .15s; text-align: left; width: 100%;
}
.cat-card:hover { border-color: var(--c-primary); box-shadow: var(--c-shadow); transform: translateY(-2px); }
.cat-card .cat-card-top { display: flex; align-items: flex-start; gap: 8px; }
.cat-card .cat-no { font-size: 11px; color: var(--c-muted); font-family: Consolas, monospace; flex-shrink: 0; padding-top: 2px; }
.cat-card .cat-name { font-size: 14px; font-weight: 600; color: var(--c-text); line-height: 1.4; }
.cat-card .cat-card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.cat-chip { font-size: 11px; padding: 2px 8px; border-radius: 11px; background: var(--c-primary-soft); color: var(--c-primary); }
.cat-chip.mat { background: var(--c-success-bg); color: var(--c-success-text); }
.cat-chip.mat-none { background: var(--c-neutral-bg); color: var(--c-neutral-text); }
.cat-chip.valid { background: var(--c-warn-bg); color: var(--c-warn-text); }

/* 材料详情 */
.cat-detail-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cat-detail-head h2 { font-size: 20px; }
.cat-detail-head .cat-detail-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.mat-list { list-style: none; padding: 0; margin: 0; counter-reset: mat; }
.mat-list li {
  position: relative; padding: 10px 12px 10px 44px; border-bottom: 1px solid var(--c-border);
  line-height: 1.65; font-size: 14px;
}
.mat-list li:last-child { border-bottom: 0; }
.mat-list li:before {
  counter-increment: mat; content: counter(mat);
  position: absolute; left: 12px; top: 10px; width: 22px; height: 22px;
  background: var(--c-primary); color: #fff; border-radius: 50%;
  font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.mat-list li[data-plain]:before { content: "注"; background: var(--c-warn-text); }
@media (max-width: 720px) {
  .cat-hero .cat-stat { margin-left: 0; }
  .cat-grid { grid-template-columns: 1fr; }
}

/* ---------- 资质目录：证件样张 + 每条材料的空白模板 ---------- */
.mat-list li { display: flex; align-items: flex-start; gap: 10px; }
.mat-list li .mat-line-text { flex: 1 1 auto; min-width: 0; word-break: break-word; }
.mat-list li .mat-tpl { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mat-tpl-empty { font-size: 12px; color: var(--c-muted); background: var(--c-neutral-bg); border-radius: 11px; padding: 2px 9px; }
.mat-tpl .btn-sm { padding: 2px 9px; font-size: 12px; }

/* 证件样张卡片 */
.sample-card { padding-bottom: 6px; }
.sample-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sample-head h3 { font-size: 14px; }
.sample-hint { font-size: 12px; color: var(--c-muted); }
.sample-body-row { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.sample-thumb-btn {
  padding: 0; border: 1px solid var(--c-border); border-radius: 6px; background: #fff;
  cursor: zoom-in; overflow: hidden; line-height: 0; transition: border-color .15s, box-shadow .15s;
}
.sample-thumb-btn:hover { border-color: var(--c-primary); box-shadow: var(--c-shadow); }
.sample-thumb { display: block; width: 150px; height: 104px; object-fit: cover; background: var(--c-neutral-bg); }
.sample-file {
  flex: 0 0 auto; font-size: 12.5px; color: var(--c-primary); background: var(--c-primary-soft);
  border-radius: 6px; padding: 10px 14px;
}
.sample-info { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.sample-meta { font-size: 12.5px; color: var(--c-muted); word-break: break-all; }
.sample-ops { display: flex; gap: 8px; flex-wrap: wrap; }
.sample-empty { display: flex; align-items: center; gap: 10px; padding: 4px 0 10px; }
.sample-preview-wrap { text-align: center; }
.sample-preview { max-width: 100%; max-height: 64vh; border: 1px solid var(--c-border); border-radius: 6px; }

/* 管理页行内样张 / 模板单元格 + 模板管理弹窗 */
.cell-assets { vertical-align: top; }
.asset-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 2px 0; }
.asset-row + .asset-row { border-top: 1px dashed var(--c-border); padding-top: 5px; }
.asset-label { font-size: 11px; color: var(--c-muted); background: var(--c-neutral-bg); border-radius: 10px; padding: 1px 7px; flex: 0 0 auto; }
.asset-file { font-size: 12px; color: var(--c-text); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpl-list { display: flex; flex-direction: column; }
.tpl-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--c-border); }
.tpl-row:last-child { border-bottom: 0; }
.tpl-no {
  flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.tpl-name { flex: 1 1 auto; min-width: 0; font-size: 13px; word-break: break-word; }
.file-pick { display: none !important; }

@media (max-width: 720px) {
  .mat-list li { flex-direction: column; align-items: stretch; gap: 6px; }
  .mat-list li .mat-tpl { justify-content: flex-start; }
  .sample-thumb { width: 100%; height: 160px; }
  .sample-thumb-btn { width: 100%; }
  .tpl-row { flex-wrap: wrap; }
  .tpl-row .mat-tpl { width: 100%; justify-content: flex-start; }
}

/* ---------- 资质详情：材料表格 + 复核提示 + 办理流程 ---------- */
.mat-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.mat-table th, .mat-table td {
  padding: 9px 10px; border-bottom: 1px solid var(--c-border);
  vertical-align: top; text-align: left; font-size: 13px;
}
.mat-table thead th { color: var(--c-muted); font-weight: 600; background: var(--c-neutral-bg); }
.mat-table tbody tr:last-child td { border-bottom: 0; }
.mat-table .mat-no { text-align: center; color: var(--c-primary); font-weight: 600; }
.mat-table .mat-line-text { word-break: break-word; line-height: 1.6; }
.mat-table .mat-tpl { white-space: nowrap; text-align: right; }
.mat-table .mat-tpl .btn-sm { margin: 1px 0 1px 4px; }
.mat-table tr.mat-plain .mat-line-text { color: var(--c-warn-text); }

.review-note { border-left: 4px solid var(--c-warn-text); }
.review-note-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.review-note-head h3 { font-size: 14px; }
.review-note-item { margin: 5px 0; font-size: 13px; line-height: 1.7; word-break: break-word; }
.cat-chip.warn { color: var(--c-warn-text); background: var(--c-neutral-bg); }

.process-card .process-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.process-card .process-head h3 { font-size: 14px; }
.process-steps { display: flex; flex-direction: column; gap: 10px; }
.process-step {
  display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--c-border); border-radius: 8px; background: var(--c-neutral-bg);
}
.process-step .process-no {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--c-primary); color: #fff; font-size: 12px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.process-step .process-body { min-width: 0; }
.process-step .process-body strong { font-size: 13px; }
.process-step .process-body p { margin: 4px 0 0; font-size: 12.5px; color: var(--c-muted); line-height: 1.6; word-break: break-word; }

.cell-perm { text-align: center; }
.cell-perm input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.cell-perm input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .55; }

/* 账号管理：人员职务与区域 */
.cell-scope { white-space: nowrap; }
.cell-scope .scope-sum {
  display: inline-block; max-width: 210px; overflow: hidden; text-overflow: ellipsis;
  vertical-align: middle; margin-right: 8px; font-size: 12.5px; color: var(--c-text);
}
.cell-scope .btn-sm { vertical-align: middle; }

@media (max-width: 720px) {
  .mat-table, .mat-table tbody, .mat-table tr, .mat-table td { display: block; width: 100%; }
  .mat-table thead { display: none; }
  .mat-table tr { border: 1px solid var(--c-border); border-radius: 8px; margin-bottom: 10px; padding: 4px 0; }
  .mat-table td { border-bottom: 0; padding: 5px 10px; }
  .mat-table .mat-no { text-align: left; }
  .mat-table .mat-no::before { content: "序号："; color: var(--c-muted); font-weight: 400; }
  .mat-table .mat-tpl { text-align: left; white-space: normal; }
  .mat-table .mat-tpl .btn-sm { margin: 2px 4px 2px 0; }
  .review-note-item { font-size: 12.5px; }
  .process-step { padding: 9px; gap: 9px; }
}

/* ---------- 资料查询：证件分组浏览 + 证件材料清单 ---------- */
.mg-toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.mg-seg { display: inline-flex; border: 1px solid var(--c-border-strong); border-radius: var(--radius); overflow: hidden; flex: 0 0 auto; }
.mg-seg-btn {
  border: 0; background: var(--c-surface); color: var(--c-muted); cursor: pointer;
  padding: 8px 16px; font-size: 13px; line-height: 1.4;
}
.mg-seg-btn + .mg-seg-btn { border-left: 1px solid var(--c-border); }
.mg-seg-btn:hover { color: var(--c-primary); }
.mg-seg-btn.active { background: var(--c-primary); color: #fff; font-weight: 600; }
.mg-search { display: flex; gap: 8px; align-items: center; flex: 1 1 280px; max-width: 460px; }
.mg-search input {
  flex: 1 1 auto; min-width: 0; padding: 8px 11px; font-size: 13px;
  border: 1px solid var(--c-border-strong); border-radius: var(--radius);
}
.mg-stat { font-size: 12px; color: var(--c-muted); margin-left: auto; }
.mg-stat b { color: var(--c-text); }
.mg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mg-card .cat-name { font-size: 14.5px; }
/* 明细列表子视图复用原 list.js，隐藏其重复页头，保留搜索/筛选/表格/分页与全部 admin 按钮 */
.mg-detail .page-head { display: none; }

.mgm-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.mgm-toolbar input {
  flex: 1 1 260px; max-width: 360px; padding: 8px 11px; font-size: 13px;
  border: 1px solid var(--c-border-strong); border-radius: var(--radius);
}
.mat-name-link { padding: 0; text-align: left; white-space: normal; line-height: 1.5; }
.mgm-table th:nth-child(1) { width: 52px; }
.mgm-table th:nth-child(3) { width: 130px; }
.mgm-table th:nth-child(4) { width: 74px; }
.mgm-table th:nth-child(5) { width: 116px; }
.mgm-table th:nth-child(6) { width: 240px; }
.mgm-table .mat-tpl { white-space: normal; }

@media (max-width: 720px) {
  .mg-grid { grid-template-columns: 1fr; }
  .mg-search { max-width: none; }
  .mg-stat { margin-left: 0; }
  .mgm-toolbar input { max-width: none; }
}

/* ===== 细分板块权限（账号管理弹窗）===== */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 10px; }
.perm-group {
  border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 10px 12px; background: var(--c-surface);
}
.perm-group-title {
  font-size: 12px; font-weight: 700; color: var(--c-primary);
  margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--c-border);
}
.perm-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; cursor: pointer; }
.perm-item input { width: 15px; height: 15px; cursor: pointer; }

/* ===== 地址托管系统 ===== */
.hosting-date { font-size: 12px; color: var(--c-muted); }
.host-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.host-kpi {
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; position: relative;
}
.host-kpi span { font-size: 12px; color: var(--c-muted); }
.host-kpi b { font-size: 26px; line-height: 1.1; }
.host-kpi small { position: absolute; right: 16px; bottom: 16px; color: var(--c-muted); }
.host-kpi.warn { border-left: 3px solid #d99b2b; }
.host-kpi.danger { border-left: 3px solid var(--c-danger); }
.host-type-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; }
.host-type-label { width: 92px; flex: 0 0 auto; font-size: 13px; }
.host-type-bar { flex: 1 1 auto; height: 10px; background: var(--c-border); border-radius: 6px; overflow: hidden; }
.host-type-bar i { display: block; height: 100%; background: var(--c-primary); border-radius: 6px; }
.host-type-count { width: 130px; text-align: right; font-size: 12px; color: var(--c-muted); }
.host-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-top: 8px; }
.host-stat-cell {
  display: flex; justify-content: space-between; padding: 8px 12px;
  border: 1px solid var(--c-border); border-radius: var(--radius); font-size: 13px;
}
.host-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.host-toolbar input {
  flex: 1 1 300px; max-width: 440px; padding: 8px 11px; font-size: 13px;
  border: 1px solid var(--c-border-strong); border-radius: var(--radius);
}
.host-toolbar select { width: auto; flex: 0 0 auto; padding: 8px 10px; font-size: 13px; border: 1px solid var(--c-border-strong); border-radius: var(--radius); }
.host-toolbar-spacer { flex: 1 1 auto; }
.notice { background: #eef3f8; border: 1px solid #d4e0ec; border-radius: var(--radius); padding: 8px 12px; font-size: 12px; color: var(--c-muted); margin-bottom: 12px; }
.notice-ok { background: #e9f6ec; border-color: #b9e0c2; color: #256b36; }
.notice-warn { background: #fdf3e2; border-color: #ecd3a0; color: #8a5a12; }
.host-import-result { margin-top: 12px; }
.host-import-result:empty { display: none; }

@media (max-width: 720px) {
  .host-toolbar input { max-width: none; }
  .host-type-label { width: 76px; }
  .host-type-count { width: 96px; }
}

/* ===== 资质公示开关（目录管理） ===== */
.cell-pub { text-align: center; }
.pub-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px 3px 4px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--c-border-strong); background: #f1f4f7; color: #6b7b8c;
  font-size: 12px; line-height: 1.5; transition: background .15s, color .15s, border-color .15s;
}
.pub-switch .pub-dot {
  width: 12px; height: 12px; border-radius: 50%; background: #b9c4cf;
  transition: background .15s, transform .15s;
}
.pub-switch:hover { border-color: var(--c-primary); color: var(--c-primary); }
.pub-switch.on { background: #e6f4ea; border-color: #a9d8b6; color: #1f7a3d; font-weight: 600; }
.pub-switch.on .pub-dot { background: #2c9e55; }
.pub-switch:disabled { opacity: .6; cursor: default; }
.check-inline { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.check-inline input { width: 15px; height: 15px; }
.cat-chip.hidden-chip { background: #f3e6e6; color: #a33; }

/* ===== 地址托管 v2：宽表 / 筛选浮层 / 出证中心 ===== */
.host-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.host-grid2 .card { margin: 0; }
.host-trend { display: flex; align-items: flex-end; gap: 10px; height: 132px; padding: 4px 2px 0; }
.host-trend-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; height: 100%; }
.host-trend-col b { font-size: 12px; color: var(--c-text); }
.host-trend-col i { display: block; width: 100%; max-width: 34px; background: var(--c-primary); border-radius: 4px 4px 0 0; opacity: .85; }
.host-trend-col span { font-size: 11px; color: var(--c-muted); }
.life-active { background: #1f4fb8; } .life-countdown { background: #c27c0f; }
.life-dormant { background: #b26a00; } .life-preabnormal { background: #c13b41; }
.life-terminated { background: #64748b; }

/* 宽表：表格自身是滚动区（横向滚动条常驻可见）+ 表头吸顶 + 首列/末列冻结 */
.host-scroll {
  overflow: auto; max-width: 100%;
  max-height: calc(100vh - 252px); min-height: 300px;
  border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff;
}
.host-tbl { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; }
.host-tbl th {
  position: sticky; top: 0; z-index: 4; white-space: normal; line-height: 1.3;
  vertical-align: middle; background: #f7f9fb;
}
.host-tbl th, .host-tbl td { padding: 7px 10px; }
.host-tbl td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.host-tbl .stk-0 { position: sticky; left: 0; z-index: 3; background: var(--c-surface); }
.host-tbl .stk-1 { position: sticky; left: 66px; z-index: 3; background: var(--c-surface); box-shadow: 1px 0 0 0 var(--c-border); }
.host-tbl thead .stk-0, .host-tbl thead .stk-1 { z-index: 7; background: #f7f9fb; }
.host-tbl .stk-r { position: sticky; right: 0; z-index: 3; background: var(--c-surface); box-shadow: -6px 0 8px -6px rgba(16,24,40,.18); }
.host-tbl thead .stk-r { z-index: 7; background: #f7f9fb; }
.host-tbl tbody tr:hover td { background: #f7f9fc; }
.host-tbl tbody tr:hover .stk-0, .host-tbl tbody tr:hover .stk-1, .host-tbl tbody tr:hover .stk-r { background: #f7f9fc; }
.host-tbl td.addrcol { white-space: normal; overflow: hidden; }
.host-tbl td.addrcol .addr2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-word; line-height: 1.45; font-size: 12.5px;
}
.host-tbl .tag.addrno {
  display: inline-block; margin-right: 6px; padding: 0 6px; height: 16px; line-height: 16px;
  border-radius: 5px; font-size: 10.5px; background: #eef2fb; color: #1f4fb8; vertical-align: 1px;
}
.host-tbl .num { color: var(--c-muted); font-variant-numeric: tabular-nums; }
.cellsel { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.cellsel .chk { width: 15px; height: 15px; cursor: pointer; }
.rowmore { position: relative; display: inline-block; }
.rowmenu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 132px;
  background: #fff; border: 1px solid var(--c-border); border-radius: 8px;
  box-shadow: 0 10px 24px rgba(16,24,40,.14); padding: 4px;
}
.rowmenu[hidden] { display: none; }
.rowmenu button {
  display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: none;
  font-size: 13px; border-radius: 6px; cursor: pointer; color: var(--c-text);
}
.rowmenu button:hover { background: #f2f5fa; }
.rowmenu button.danger { color: #c13b41; }
.scroll-hint { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--c-muted); padding: 8px 2px; }
.scroll-hint .hi-ic { color: var(--c-primary); font-weight: 700; }

/* 表单分段（对齐参考站的三段式录入口径） */
.form-sec { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--c-border); }
.form-sec b { font-size: 13px; color: var(--c-text); }
.form-sec .sp { flex: 1 1 auto; }
.form-sec .tip { font-size: 11.5px; color: var(--c-muted); }
.fld-hint { display: block; margin-top: 3px; font-size: 11.5px; color: var(--c-muted); line-height: 1.5; }
.form-grid .form-row.span2 { grid-column: 1 / -1; }
label .req { color: #c13b41; margin-left: 2px; }
.chip-picks { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-pick {
  padding: 5px 10px; font-size: 12.5px; border: 1px solid var(--c-border-strong);
  border-radius: 14px; background: #fff; cursor: pointer;
}
.chip-pick.on { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-soft, #edf1fa); }

/* 折叠行 */
.fold-caret { display: inline-block; width: 14px; color: var(--c-primary); cursor: pointer; font-size: 11px; }
.fold-indent { display: inline-block; width: 14px; }
.fold-child td { background: #fbfcfe; }
.fold-child .stk-0 { background: #fbfcfe; }

/* 筛选浮层 */
.flt-fab { display: inline-flex; align-items: center; gap: 6px; }
.flt-fab .n { background: var(--c-primary); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 11px; }
.flt-fab.on { border-color: var(--c-primary); color: var(--c-primary); }
.flt-pop { border: 1px solid var(--c-border); background: #f8fafc; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 10px; }
.flt-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flt-row label { font-size: 12px; color: var(--c-muted); }
.flt-row select, .flt-row input { padding: 6px 8px; font-size: 13px; border: 1px solid var(--c-border-strong); border-radius: 6px; }

/* 到期提醒色阶 */
.lv { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; white-space: nowrap; }
.lv-urgent { background: #fbebec; color: #c13b41; font-weight: 600; }
.lv-soon { background: #fcf3e3; color: #b26a00; }
.lv-watch { background: #eef2fb; color: #1f4fb8; }
.lv-expired { background: #f3e6e6; color: #a33; }
.lv-normal { background: #e8f6ee; color: #0e8a4f; }
.lv-none { background: var(--c-neutral-bg, #f1f4f7); color: var(--c-muted); }

.chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11.5px; }
.chip-ok { background: #e8f6ee; color: #0e8a4f; }
.chip-warn { background: #fcf3e3; color: #b26a00; }
.chip-danger { background: #fbebec; color: #c13b41; }

/* 详情键值网格 */
.doc-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.kv-grid .kv b { font-size: 13.5px; font-weight: 500; word-break: break-word; }
.kv-grid .kv span { font-size: 11.5px; color: var(--c-muted); }

/* 出证中心 */
.doc-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.doc-layout .card { margin: 0; }
.tpl-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 6px; margin-bottom: 6px; cursor: pointer; }
.tpl-item:hover { border-color: var(--c-primary); }
.tpl-item.on { border-color: var(--c-primary); background: var(--c-primary-soft, #edf1fa); }
.tpl-item-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.tpl-item-main b { font-size: 13px; }
.tpl-item-ops { display: flex; gap: 4px; }
.tpl-fields { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; max-height: 120px; overflow-y: auto; }
.doc-paper {
  margin-top: 12px; background: #fff; border: 1px solid var(--c-border);
  border-radius: var(--radius); padding: 32px 40px; min-height: 380px;
  box-shadow: inset 0 0 0 1px rgba(16,24,40,.02);
}
.doc-text { white-space: pre-wrap; word-break: break-word; font-family: "Songti SC","SimSun",serif; font-size: 15px; line-height: 2; margin: 0; color: #111; }

@media (max-width: 900px) {
  .host-grid2 { grid-template-columns: 1fr; }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-paper { padding: 18px 16px; }
}
.perm-section-title { font-size: 12px; font-weight: 700; color: var(--c-text); margin: 14px 0 6px; padding-left: 8px; border-left: 3px solid var(--c-primary); }

/* 文本链接按钮 */
.link { background: none; border: 0; padding: 0; color: var(--c-primary); font-size: 12px; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- 同渠道批量录入：表格式内嵌输入 ---------- */
.ab-wrap { overflow-x: auto; }
.ab-tbl { width: 100%; min-width: 660px; border-collapse: collapse; }
.ab-tbl thead th { position: static; background: var(--c-neutral-bg); padding: 7px 6px; font-size: 11.5px; color: var(--c-muted); border-bottom: 1px solid var(--c-border); text-align: left; white-space: nowrap; }
.ab-tbl td { padding: 4px 5px; border-bottom: 1px solid var(--c-border); vertical-align: middle; }
.ab-tbl input, .ab-tbl select {
  width: 100%; height: 32px; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 0 8px; font: inherit; font-size: 12.5px; background: var(--c-surface);
  color: var(--c-text); outline: none; box-sizing: border-box;
}
.ab-tbl input:focus, .ab-tbl select:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(47,93,140,.12); }
.ab-tbl input[type=number] { text-align: right; }
.ab-del { width: 28px; height: 28px; padding: 0; border-radius: 7px; border: 1px solid var(--c-border); background: var(--c-surface); color: var(--c-muted); cursor: pointer; font-size: 14px; line-height: 1; }
.ab-del:hover { border-color: #e3b6b3; background: var(--c-danger-bg); color: var(--c-danger-text); }
.ab-acts { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ab-acts .mini { font-size: 12px; color: var(--c-muted); }
.ab-tip { font-size: 11.5px; color: var(--c-muted); line-height: 1.6; margin: 8px 0 0; padding: 8px 10px; background: var(--c-neutral-bg); border-radius: var(--radius); }
.ab-tip.warn { background: var(--c-warn-bg); color: var(--c-warn-text); }

/* ---------- 外勤工单 ---------- */
.ow-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.ow-kpi { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 14px 16px; }
.ow-kpi .k { font-size: 12px; color: var(--c-muted); }
.ow-kpi .v { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ow-kpi .v.warn { color: var(--c-warn-text); }
.ow-kpi .v.danger { color: var(--c-danger-text); }
.ow-kpi .v.ok { color: var(--c-success-text); }
.ow-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .ow-grid2 { grid-template-columns: 1fr; } }
.ow-bar-row { display: flex; align-items: center; gap: 10px; margin: 9px 0; font-size: 12.5px; }
.ow-bar-row .nm { width: 90px; color: var(--c-muted); flex: none; }
.ow-bar-row .bar { flex: 1; height: 8px; background: var(--c-neutral-bg); border-radius: 4px; overflow: hidden; }
.ow-bar-row .bar > i { display: block; height: 100%; background: var(--c-primary); border-radius: 4px; }
.ow-bar-row .ct { width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.ow-st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; line-height: 1.8; white-space: nowrap; }
.ow-st.pending { background: var(--c-warn-bg); color: var(--c-warn-text); }
.ow-st.assigned { background: var(--c-primary-soft); color: var(--c-primary); }
.ow-st.processing { background: #e8f1fb; color: #1f4f9c; }
.ow-st.confirming { background: #fff4e0; color: #98600a; }
.ow-st.done { background: var(--c-success-bg); color: var(--c-success-text); }
.ow-st.cancelled { background: var(--c-neutral-bg); color: var(--c-muted); }
.ow-st.rejected { background: var(--c-danger-bg); color: var(--c-danger-text); }
.ow-due { font-size: 11.5px; color: var(--c-muted); }
.ow-due.overdue { color: var(--c-danger-text); font-weight: 700; }
.ow-due.today { color: var(--c-warn-text); font-weight: 700; }
.ow-due.soon { color: var(--c-warn-text); }
.ow-pri { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 4px; background: var(--c-neutral-bg); color: var(--c-muted); }
.ow-pri.urgent { background: var(--c-danger-bg); color: var(--c-danger-text); }
.ow-pri.high { background: var(--c-warn-bg); color: var(--c-warn-text); }
.ow-detail-v { font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--c-border); word-break: break-all; }
.ow-tl { list-style: none; margin: 8px 0 0; padding: 0; }
.ow-tl li { position: relative; padding: 0 0 12px 18px; border-left: 2px solid var(--c-border); font-size: 12.5px; }
.ow-tl li:last-child { border-left-color: transparent; padding-bottom: 0; }
.ow-tl li::before { content: ''; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); }
.ow-tl .at { color: var(--c-muted); font-size: 11.5px; margin-top: 2px; }
.ow-detail-acts { display: flex; gap: 8px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--c-border); flex-wrap: wrap; }
/* 材料上传模块：按用户选择隐藏入口，代码保留以便日后恢复（移除本规则即可） */
.ow-hidden-module { display: none !important; }
/* 进度评论输入框 */
.ow-comment-box { margin-top: 14px; }
.ow-comment-box textarea { width: 100%; box-sizing: border-box; font-family: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--c-border); border-radius: 6px; resize: vertical; background: var(--c-surface, #fff); color: inherit; }
.ow-comment-box textarea:focus { outline: none; border-color: var(--c-primary); }
.ow-comment-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
/* 详情页折叠区：默认收起，点标题展开 */
.ow-fold { margin-top: 14px; border-top: 1px dashed var(--c-border); padding-top: 10px; }
.ow-fold-hd { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13px; color: var(--c-primary); }
.ow-fold-hd::before { content: '▸'; font-size: 11px; transition: transform .15s; }
.ow-fold.open .ow-fold-hd::before { transform: rotate(90deg); }
.ow-fold-bd { display: none; margin-top: 10px; }
.ow-fold.open .ow-fold-bd { display: block; }
/* 看板人员筛选 / 个人钻取 */
.ow-board-scope { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ow-board-scope select { min-width: 160px; }
.ow-board-range { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); }
.ow-board-range select { min-width: 110px; }
.ow-board-range input[type=date] { width: 140px; }
.ow-kpi { transition: box-shadow .15s ease, transform .15s ease; }
.ow-kpi:hover { box-shadow: 0 3px 12px rgba(0,0,0,.07); transform: translateY(-1px); }
.ow-avg-banner { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; margin-top: 14px; padding: 16px 20px; border-radius: var(--radius); border: 1px solid #cfe0f2; background: linear-gradient(100deg, #eef5fd 0%, #f7fbff 60%, var(--c-surface) 100%); }
.ow-avg-main { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid #d8e5f2; padding-right: 26px; }
.ow-avg-label { font-size: 12px; color: var(--c-muted); }
.ow-avg-val { font-size: 34px; font-weight: 800; color: var(--c-primary, #2f5d8c); font-variant-numeric: tabular-nums; line-height: 1.15; }
.ow-avg-val small { font-size: 13px; font-weight: 500; color: var(--c-muted); }
.ow-avg-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--c-text, #333); }
.ow-avg-tiers { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.ow-avg-tier { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 16px; background: var(--c-surface); border: 1px solid var(--c-border); font-size: 12px; color: var(--c-muted); }
.ow-avg-tier b { font-size: 15px; color: var(--c-text, #333); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .ow-avg-banner { gap: 14px; } .ow-avg-tiers { margin-left: 0; } .ow-avg-main { border-right: none; padding-right: 0; } }
.ow-person-link { color: var(--c-primary); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.ow-person-link:hover { opacity: .8; }
.ow-detail-back { margin-left: auto; }

.ow-dingtalk { font-size: 11px; color: var(--c-primary, #2f5d8c); font-variant-numeric: tabular-nums; word-break: break-all; }

/* ===== 时效倒计时：双线剩余工作日 ===== */
.ow-cd { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 5px; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--c-neutral-bg); color: var(--c-muted); }
.ow-cd.ok { background: var(--c-success-bg); color: var(--c-success-text); }
.ow-cd.soon { background: var(--c-warn-bg, #fff6e6); color: var(--c-warn-text); }
.ow-cd.today { background: var(--c-warn-bg, #fff1dc); color: var(--c-warn-text); font-weight: 700; }
.ow-cd.normal { background: #e8f1fb; color: #1f4f9c; }
.ow-cd.critical { background: var(--c-warn-bg, #ffe9d6); color: var(--c-warn-text); font-weight: 700; }
.ow-cd.overdue { background: var(--c-danger-bg); color: var(--c-danger-text); font-weight: 700; }
.ow-cd.done { background: var(--c-neutral-bg); color: var(--c-muted); }
.ow-cd.pending { background: var(--c-neutral-bg); color: var(--c-muted); }
.ow-cd-banner { border: 1px solid var(--c-border); border-left-width: 4px; border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; background: var(--c-neutral-bg); }
.ow-cd-banner.ok { border-left-color: var(--c-success-text); background: var(--c-success-bg); }
.ow-cd-banner.soon, .ow-cd-banner.today { border-left-color: var(--c-warn-text); background: var(--c-warn-bg, #fff6e6); }
.ow-cd-banner.normal { border-left-color: #1f4f9c; background: #e8f1fb; }
.ow-cd-banner.critical { border-left-color: var(--c-warn-text); background: var(--c-warn-bg, #ffe9d6); }
.ow-cd-banner.overdue { border-left-color: var(--c-danger-text); background: var(--c-danger-bg); }
.ow-cd-banner .ow-cd-big { font-size: 15px; font-weight: 700; color: var(--c-text, #333); line-height: 1.5; }
.ow-cd-banner.overdue .ow-cd-big { color: var(--c-danger-text); }
.ow-cd-banner .ow-cd-sub { font-size: 11.5px; color: var(--c-muted); margin-top: 3px; }

/* ===== 薪酬方案：时效档位 / 提成预估 / 设置页 ===== */
.ow-tier { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 4px; white-space: nowrap; background: var(--c-neutral-bg); color: var(--c-muted); }
.ow-tier.t-fast { background: var(--c-success-bg); color: var(--c-success-text); }
.ow-tier.t-normal { background: #e8f1fb; color: #1f4f9c; }
.ow-tier.t-overtime { background: var(--c-danger-bg); color: var(--c-danger-text); }
.ow-tier.t-none { background: var(--c-neutral-bg); color: var(--c-muted); }
.ow-comm { color: var(--c-success-text); font-variant-numeric: tabular-nums; }
.ow-pay-tip { margin-top: 10px; border: 1px solid #c9dcf0; background: var(--c-primary-soft, #edf1fa); border-radius: var(--radius); padding: 9px 12px; font-size: 12px; }
.ow-pay-line { display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.ow-pay-line b { font-size: 13px; color: var(--c-primary-dark, #2f5d8c); }
.ow-pay-detail { margin-top: 6px; color: var(--c-text, #333); line-height: 1.6; }
.ow-pay-note { margin-top: 5px; color: var(--c-muted); line-height: 1.6; }
.ow-comm-preview { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px dashed var(--c-success-text); background: var(--c-success-bg); border-radius: var(--radius); padding: 9px 12px; }
.ow-comm-preview .cm-l { font-size: 12px; color: var(--c-muted); }
.ow-comm-preview .cm-v { font-size: 19px; color: var(--c-success-text); font-variant-numeric: tabular-nums; }
.ow-comm-preview .cm-f { font-size: 12px; color: var(--c-muted); }
.ow-urgent-lbl { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ow-urgent-lbl input { width: auto; }
.ow-coef-note { margin-top: 10px; font-size: 12px; color: var(--c-muted); line-height: 1.7; }
.ow-coef-row { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; margin-top: 4px; }
.ow-coef-row span { background: var(--c-neutral-bg); border-radius: 4px; padding: 2px 7px; }
.ow-cal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 10px; font-size: 12.5px; }
.ow-holiday-list { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 6px; }
.ow-holiday-list span { background: var(--c-neutral-bg); border-radius: 4px; padding: 1px 6px; font-size: 11.5px; color: var(--c-muted); }

/* ===== 工单资料要求（勾选事项 → 必传材料 + 上传按钮） ===== */
.ow-doc-tip { font-size: 12px; color: var(--c-primary-dark, #2f5d8c); background: var(--c-primary-soft, #edf1fa); border: 1px solid #c9dcf0; border-radius: var(--radius); padding: 6px 10px; margin-bottom: 8px; }
.ow-doc-tip.done { background: #e9f6ec; border-color: #b9e0c2; color: #256b36; }
.ow-extra-picks { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 8px 0 10px; }
.ow-extra-pick { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--c-text); cursor: pointer; }
.ow-extra-pick input { width: 14px; height: 14px; accent-color: var(--c-primary); }
.ow-doc-list { display: flex; flex-direction: column; gap: 8px; }
.ow-doc-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; border: 1px solid var(--c-border); border-radius: var(--radius); padding: 8px 10px; background: #fff; }
.ow-doc-item.uploaded { border-color: #b9e0c2; background: #f7fcf8; }
.ow-doc-nm { font-size: 12.5px; font-weight: 600; color: var(--c-text); }
.ow-doc-nm .req { color: #c13b41; margin-left: 2px; }
.ow-doc-hint { grid-column: 1; font-size: 11px; color: var(--c-muted); }
.ow-doc-act { grid-column: 2; grid-row: 1 / 3; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ow-doc-file { max-width: 220px; font-size: 11px; color: #256b36; word-break: break-all; text-align: right; }
.ow-doc-file a { color: inherit; text-decoration: underline; cursor: pointer; }
.ow-doc-del { border: 0; background: transparent; color: #c13b41; font-size: 11px; cursor: pointer; padding: 0; }
.ow-doc-state { font-size: 11px; color: #b8860b; }

/* ===== 站内主动预警：顶栏消息入口 + 消息中心 ===== */
.topbar-alert { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 30px; border: 1px solid var(--c-border); border-radius: 6px; background: var(--c-surface); cursor: pointer; }
.topbar-alert:hover { border-color: var(--c-primary); }
.topbar-bell { font-size: 15px; line-height: 1; }
.topbar-badge { position: absolute; top: -6px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #c62828; color: #fff; font-size: 10px; line-height: 17px; text-align: center; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.ow-alert-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-height: 460px; overflow: auto; }
.ow-alert-item { display: grid; grid-template-columns: 90px minmax(0, 1fr) 110px; gap: 10px; align-items: center; width: 100%; text-align: left; border: 1px solid var(--c-border); border-radius: var(--radius); background: var(--c-surface); padding: 9px 11px; cursor: pointer; }
.ow-alert-item:hover { border-color: var(--c-primary); background: var(--c-primary-soft); }
.ow-alert-item.read { opacity: .62; }
.ow-alert-item.overdue { border-left: 4px solid var(--c-danger-text); }
.ow-alert-item.critical, .ow-alert-item.today { border-left: 4px solid var(--c-warn-text); }
.ow-alert-item.soon { border-left: 4px solid #d2a300; }
.ow-alert-lv { font-size: 11.5px; font-weight: 700; color: var(--c-danger-text); }
.ow-alert-item.critical .ow-alert-lv, .ow-alert-item.today .ow-alert-lv { color: var(--c-warn-text); }
.ow-alert-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 12.5px; }
.ow-alert-body span { color: var(--c-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ow-alert-time { font-size: 11px; color: var(--c-muted); text-align: right; font-variant-numeric: tabular-nums; }

/* ===== 看板增强：预警清单 / 6 个月趋势 / 率值 ===== */
.ow-alert-card h3 .mini { margin-left: 10px; font-weight: 400; }
.ow-trend { display: flex; gap: 10px; height: 150px; align-items: flex-end; padding: 12px 6px 0; border-bottom: 1px solid var(--c-border); }
.ow-trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.ow-trend-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.ow-trend-bars i { display: block; width: 16px; min-height: 2px; border-radius: 3px 3px 0 0; }
.ow-trend-bars .b-created { background: #9db8d5; }
.ow-trend-bars .b-done { background: var(--c-success-text); }
.ow-trend-bars .b-overtime { background: var(--c-danger-text); }
.ow-trend-label { font-size: 11px; color: var(--c-muted); margin-top: 5px; }
.ow-trend-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 11px; color: var(--c-muted); }
.ow-trend-legend span { display: inline-flex; align-items: center; gap: 4px; }
.ow-trend-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ===== 办理透明度：结构化进度 / 停留时长 / 最新进度 ===== */
.ow-dwell { display: flex; align-items: center; gap: 8px; border: 1px solid #c9dcf0; background: var(--c-primary-soft); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 14px; font-size: 12.5px; }
.ow-dwell.ended { border-color: var(--c-border); background: var(--c-neutral-bg); color: var(--c-muted); }
.ow-dwell-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-primary); flex: none; }
.ow-dwell.ended .ow-dwell-dot { background: var(--c-muted); }
.ow-dwell .mini { margin-left: auto; }
.ow-kind-picker { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.ow-kind-btn, .ow-kind { border: 1px solid var(--c-border); background: var(--c-neutral-bg); color: var(--c-muted); border-radius: 4px; font-size: 11px; padding: 2px 7px; cursor: pointer; }
.ow-kind-btn.active, .ow-kind-btn:hover { border-color: var(--c-primary); background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 600; }
.ow-kind { margin-left: 6px; cursor: default; }
.ow-kind.k-contact, .ow-kind-btn.k-contact { border-color: #b9d6c2; background: #e9f6ec; color: #256b36; }
.ow-kind.k-site, .ow-kind-btn.k-site { border-color: #c9dcf0; background: #eaf1f9; color: #24507d; }
.ow-kind.k-submit, .ow-kind-btn.k-submit { border-color: #e3d1a6; background: #fff6e6; color: #8a5a00; }
.ow-kind.k-waiting, .ow-kind-btn.k-waiting { border-color: #d9cbe8; background: #f3edfa; color: #6b4a91; }
.ow-kind.k-done, .ow-kind-btn.k-done { border-color: #b9e0c2; background: var(--c-success-bg); color: var(--c-success-text); }
.ow-progress-mini { display: inline-block; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* ---------- ICP 备案号页脚（合规展示：首页底部标明备案号并链接工信部） ---------- */
.site-filing-host { flex: 0 0 auto; }
.site-filing {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px 18px;
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.6;
}
.site-filing a.site-filing-item {
  color: var(--c-muted);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: color .15s, border-color .15s;
}
.site-filing a.site-filing-item:hover {
  color: var(--c-text);
  border-bottom-color: var(--c-border-strong);
}
.site-filing-sep { color: var(--c-border-strong); }
/* 登录页：绝对定位贴底，不参与居中布局，避免把登录卡片顶偏 */
.login-view { position: relative; }
.site-filing.site-filing-fixed {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  padding: 0 16px;
}
