:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --border: #e4e9f2;
  --border-strong: #d3dae7;
  --text: #14203a;
  --text-2: #48566e;
  --muted: #7d8ba2;
  --primary: #2563eb;
  --primary-soft: #eaf1ff;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --danger-soft: #fdeceb;
  --warn: #c2740b;
  --warn-soft: #fdf3e3;
  --ok: #0f7a5a;
  --ok-soft: #e7f6f0;
  --info: #0e7490;
  --info-soft: #e6f5f8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 32, 58, .04), 0 8px 24px -12px rgba(20, 32, 58, .12);
  --shadow-lg: 0 24px 60px -20px rgba(20, 32, 58, .28);
  --font: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: #c7dbff; }

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

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  color: #fff; font-weight: 700; font-size: 17px;
  display: grid; place-items: center;
  box-shadow: 0 6px 16px -6px rgba(37, 99, 235, .7);
}
.brand-title { font-size: 14px; font-weight: 700; letter-spacing: .3px; }
.brand-sub { font-size: 10px; color: var(--muted); letter-spacing: .6px; text-transform: uppercase; }

.nav { padding: 6px 10px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  color: var(--text-2); font-size: 13.5px; cursor: pointer;
  margin-bottom: 2px; position: relative; transition: background .15s, color .15s;
  user-select: none;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .85; }
.nav-badge {
  margin-left: auto; background: var(--danger-soft); color: var(--danger);
  font-size: 11px; padding: 1px 6px; border-radius: 20px; font-weight: 600;
}
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.mini-stat { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.mini-stat b { color: var(--text); font-size: 12.5px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 22px 28px 16px; gap: 16px; flex-wrap: wrap;
}
.topbar h1 { font-size: 20px; font-weight: 700; letter-spacing: -.2px; }
.topbar p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.view { padding: 4px 28px 36px; flex: 1; }

/* ---------------- 通用组件 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 33px; padding: 0 13px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text);
  font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: #c2ccdd; }
.btn:active { transform: translateY(.5px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--danger); border-color: #f3c9c6; background: #fff; }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { height: 27px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-link { border: none; background: none; color: var(--primary); cursor: pointer; font-size: 12.5px; padding: 2px 4px; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }
.btn-link.danger:hover { color: #b3261e; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border); gap: 12px;
}
.card-head h3 { font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.card-head .sub { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3, .g2, .g-2-1, .g-1-2 { grid-template-columns: 1fr; } }

/* KPI */
.kpi { padding: 15px 16px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-value { font-size: 23px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.kpi-foot { font-size: 11.5px; color: var(--muted); }
.kpi-accent { position: absolute; right: -18px; top: -18px; width: 74px; height: 74px; border-radius: 50%; background: var(--primary-soft); opacity: .65; }
.kpi.danger .kpi-accent { background: var(--danger-soft); }
.kpi.warn .kpi-accent { background: var(--warn-soft); }
.kpi.ok .kpi-accent { background: var(--ok-soft); }

/* 表格 */
.table-wrap { overflow: auto; border-radius: 0 0 var(--radius) var(--radius); }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.8px; }
table.data th {
  position: sticky; top: 0; z-index: 2;
  background: #f7f9fd; color: var(--text-2); font-weight: 600;
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border);
  white-space: nowrap; font-size: 12px;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid #eef1f7; vertical-align: middle; }
table.data tbody tr:hover { background: #f8faff; }
table.data tbody tr.selected { background: var(--primary-soft); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data td.actions { white-space: nowrap; text-align: right; }
.cell-main { font-weight: 600; color: var(--text); }
.cell-sub { font-size: 11.5px; color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; font-family: "Consolas", "SF Mono", monospace; font-size: 12px; }

/* 标签 */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
  background: #eef1f7; color: var(--text-2); white-space: nowrap;
}
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.pill.plain::before { display: none; }
.pill-待校验 { background: #eef1f7; color: #5b6b85; }
.pill-待提交 { background: var(--info-soft); color: var(--info); }
.pill-已提交 { background: #eaf0ff; color: #3556c9; }
.pill-已受理 { background: #ecf4ff; color: #1c56b8; }
.pill-已缴费 { background: var(--ok-soft); color: var(--ok); }
.pill-已排期 { background: #eef0ff; color: #5145c4; }
.pill-已开庭 { background: #f3ecff; color: #6d3fc0; }
.pill-已结案 { background: #e8f5ec; color: #16734a; }
.pill-已驳回 { background: var(--danger-soft); color: var(--danger); }
.pill-已撤诉 { background: #f0f1f4; color: #6b7280; }

.badge-lv { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.badge-expired { background: var(--danger-soft); color: var(--danger); }
.badge-urgent { background: var(--warn-soft); color: var(--warn); }
.badge-warning { background: #fff8e6; color: #94700a; }
.badge-normal { background: var(--ok-soft); color: var(--ok); }
.badge-unknown { background: #f0f1f4; color: var(--muted); }

.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; background: #f1f4f9; color: var(--text-2); }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.field label .req { color: var(--danger); margin-left: 2px; }
input[type="text"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  height: 33px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  font-size: 13px; font-family: inherit; color: var(--text); background: #fff; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea { height: auto; padding: 9px 10px; line-height: 1.6; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
input::placeholder { color: #a8b2c4; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237d8ba2' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span3 { grid-column: span 3; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.form-section { font-size: 12px; font-weight: 700; color: var(--primary-dark); letter-spacing: .5px; padding: 14px 0 8px; border-bottom: 1px dashed var(--border); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.form-section:first-child { padding-top: 0; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
input[type="checkbox"], input[type="radio"] { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; }

/* 工具条 */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.toolbar .grow { flex: 1; }
.search-box { position: relative; min-width: 220px; }
.search-box input { padding-left: 30px; }
.search-box svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 4px 10px; border-radius: 20px; font-size: 12px; cursor: pointer;
  background: #fff; border: 1px solid var(--border-strong); color: var(--text-2); user-select: none;
}
.chip:hover { border-color: #b9c5d8; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.chip .n { opacity: .7; margin-left: 3px; font-size: 11px; }

/* 批量操作条 */
.bulkbar {
  display: flex; align-items: center; gap: 10px; padding: 9px 16px;
  background: var(--primary-soft); border-bottom: 1px solid #d7e4ff; font-size: 12.5px; color: var(--primary-dark);
  flex-wrap: wrap;
}
.bulkbar b { font-variant-numeric: tabular-nums; }

/* 分页 */
.pager { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.pager .spacer { flex: 1; }
.pager button { min-width: 28px; height: 27px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--border-strong); background: #fff; cursor: pointer; font-size: 12.5px; }
.pager button.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }
/* pager 里的主按钮/危险按钮要压过 .pager button 的白底，否则会白底白字看不见 */
.pager button.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pager button.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.pager button.btn-danger { background: #fff; border-color: #f3c9c6; color: var(--danger); }
.pager button.btn-danger:hover { background: var(--danger-soft); }
.pager button.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }

/* 空态 */
.empty { padding: 44px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty svg { width: 42px; height: 42px; margin-bottom: 10px; opacity: .5; }
.empty h4 { font-size: 14px; color: var(--text-2); margin-bottom: 4px; }

/* 列表 */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid #eef1f7; }
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--surface-2); }
.li-main { flex: 1; min-width: 0; }
.li-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub { font-size: 11.5px; color: var(--muted); }
.li-right { text-align: right; font-size: 12px; }

/* 进度条 */
.bar { height: 6px; border-radius: 20px; background: #eef1f7; overflow: hidden; display: flex; }
.bar span { display: block; height: 100%; }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .bar { flex: 1; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(16, 26, 46, .42); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; z-index: 90; padding: 40px 20px; overflow: auto;
  animation: fade .14s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 620px;
  animation: pop .16s ease; margin: auto;
}
@keyframes pop { from { transform: translateY(8px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.modal.wide { max-width: 940px; }
.modal.narrow { max-width: 440px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 15px; font-weight: 700; }
.modal-head .sub { font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.modal-body { padding: 18px 20px; max-height: calc(100vh - 230px); overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.icon-btn { width: 28px; height: 28px; border-radius: 7px; border: none; background: transparent; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { background: #f0f3f9; color: var(--text); }

/* 抽屉 */
.drawer-mask { position: fixed; inset: 0; background: rgba(16, 26, 46, .35); z-index: 95; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(860px, 94vw); background: #fff; z-index: 96;
  display: flex; flex-direction: column; box-shadow: -24px 0 60px -30px rgba(16, 26, 46, .5);
  animation: slide .18s ease;
}
@keyframes slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.drawer-body { flex: 1; overflow: auto; padding: 16px 20px 26px; }
.drawer-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); }

/* Toast */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #14203a; color: #fff; padding: 9px 16px; border-radius: 9px; font-size: 12.8px;
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); animation: toastIn .18s ease; max-width: 80vw;
}
.toast.ok { background: #0f7a5a; }
.toast.err { background: #b91c1c; }
@keyframes toastIn { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Loading */
.loading-mask { position: fixed; inset: 0; background: rgba(255, 255, 255, .6); display: grid; place-items: center; z-index: 150; }
.loading-mask.hidden { display: none; }
.spinner { width: 26px; height: 26px; border: 3px solid #d8e2f4; border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 导入 */
.dropzone {
  border: 1.6px dashed #c3cfe2; border-radius: 12px; padding: 34px 20px; text-align: center;
  background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone h4 { font-size: 14px; margin-bottom: 4px; }
.dropzone p { font-size: 12px; color: var(--muted); }
.dropzone svg { width: 34px; height: 34px; color: var(--primary); margin-bottom: 8px; opacity: .8; }
.steps { display: flex; align-items: center; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.step .dot { width: 20px; height: 20px; border-radius: 50%; background: #e8ecf4; color: var(--muted); font-size: 11px; display: grid; place-items: center; font-weight: 700; }
.step.active { color: var(--primary-dark); font-weight: 600; }
.step.active .dot { background: var(--primary); color: #fff; }
.step.done .dot { background: var(--ok); color: #fff; }
.step-line { width: 26px; height: 1px; background: var(--border-strong); }
.map-grid { display: grid; grid-template-columns: 1fr 22px 1fr; gap: 8px 6px; align-items: center; font-size: 12.5px; }
.map-grid .arrow { color: var(--muted); text-align: center; }
.src-col { padding: 6px 10px; background: #f7f9fd; border: 1px solid var(--border); border-radius: 7px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 文书预览 */
.doc-paper {
  background: #fff; padding: 34px 40px; font-family: "SimSun", "Songti SC", serif; font-size: 14.5px; line-height: 2;
  color: #1a1a1a;
}
.doc-title { text-align: center; font-size: 21px; font-weight: 700; letter-spacing: 4px; font-family: "SimHei", "Heiti SC", sans-serif; margin: 6px 0 22px; }
.doc-center { text-align: center; }
.doc-right { text-align: right; }
.doc-body { text-indent: 2em; margin: 2px 0; }
.doc-bold { font-weight: 700; text-indent: 2em; }
.doc-spacer { height: 14px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; line-height: 1.7; }
.doc-table th, .doc-table td { border: 1px solid #444; padding: 5px 8px; }
.doc-table th { background: #f2f5fa; font-weight: 700; text-align: center; }

/* 图表 */
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }

/* 批次卡片 */
.batch-card { padding: 15px 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .08s; }
.batch-card:hover { border-color: #b9cdf3; box-shadow: 0 8px 26px -14px rgba(37, 99, 235, .4); transform: translateY(-1px); }
.batch-code { font-size: 11px; color: var(--muted); font-family: Consolas, monospace; }
.batch-name { font-size: 14px; font-weight: 700; line-height: 1.4; }
.batch-metrics { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.batch-metrics b { display: block; font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }

/* 详情键值 */
.kv { display: grid; grid-template-columns: 104px 1fr; gap: 8px 12px; font-size: 12.8px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }

.alert { display: flex; gap: 9px; padding: 10px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.6; }
.alert.block, .alert.expired { background: var(--danger-soft); color: #a01b1b; }
.alert.urgent { background: var(--warn-soft); color: #8a5a08; }
.alert.warn { background: #fffaea; color: #7a5c06; }
.alert.info { background: var(--info-soft); color: #0b5e70; }
.alert.ok { background: var(--ok-soft); color: var(--ok); }
.alert b { font-weight: 700; }
/* 多行说明文案：flex 会把每段文本拆成独立 item，改成常规块布局 */
.alert.stack { display: block; }

.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; }
.flex { display: flex; } .between { justify-content: space-between; } .center { align-items: center; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap12 { gap: 12px; }
.muted { color: var(--muted); } .small { font-size: 11.8px; } .right { text-align: right; }
.nowrap { white-space: nowrap; } .w100 { width: 100%; }
.hidden { display: none !important; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tabbar .tab { padding: 8px 14px; font-size: 13px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabbar .tab.active { color: var(--primary-dark); border-bottom-color: var(--primary); font-weight: 600; }

/* ==================== 立案进度视图 ==================== */
.stage-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: 10px; padding: 14px 16px 4px; }
.stage-card {
  position: relative; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px 11px 14px; cursor: pointer; background: #fff;
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.stage-card::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 3px; border-radius: 3px; background: var(--muted); opacity: .55;
}
.stage-card:hover { border-color: #c9d6ea; box-shadow: 0 2px 10px rgba(30, 60, 110, .07); }
.stage-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.stage-card.active::before { opacity: 1; }
.stage-card .sc-label { font-size: 12px; color: var(--text-2); display: flex; align-items: center; gap: 5px; }
.stage-card .sc-num { font-size: 24px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stage-card .sc-num small { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stage-card .sc-desc { font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-card.t-ok::before { background: var(--ok); }
.stage-card.t-ok .sc-num { color: var(--ok); }
.stage-card.t-warn::before { background: var(--warn); }
.stage-card.t-warn .sc-num { color: var(--warn); }
.stage-card.t-info::before { background: var(--info); }
.stage-card.t-info .sc-num { color: var(--info); }
.stage-card.t-danger::before { background: var(--danger); }
.stage-card.t-danger .sc-num { color: var(--danger); }
.stage-card.t-muted::before { background: #7b8798; }
.stage-card.t-muted .sc-num { color: #4b5565; }

/* 立案 / 缴费 / 开庭 三类状态标记 */
.flag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 2.5px 8px; border-radius: 6px; white-space: nowrap; }
.flag-filed { background: #e4f5ec; color: #0b6b4c; box-shadow: inset 0 0 0 1px #c7e8d8; }
.flag-unfiled { background: #f1f3f7; color: #5c6878; box-shadow: inset 0 0 0 1px #e2e7ef; }
.flag-mail { background: #fff4e5; color: #a8600a; box-shadow: inset 0 0 0 1px #fae0bb; }
.flag-reject { background: #fdecec; color: #b91c1c; box-shadow: inset 0 0 0 1px #f8cdcd; }
.flag-heard { background: #f0ecff; color: #5b3fb8; box-shadow: inset 0 0 0 1px #dfd6fb; }
.fee { font-size: 11.8px; font-weight: 600; white-space: nowrap; }
.fee-paid { color: var(--ok); }
.fee-due { color: var(--warn); }
.fee-na { color: var(--muted); }
.hbadge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.8px; font-weight: 700; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.hb-today { background: #fdecec; color: #b91c1c; }
.hb-soon { background: #fff4e5; color: #a8600a; }
.hb-later { background: #eaf2ff; color: #2158b5; }
.hb-passed { background: #f1f3f7; color: #6b7688; }
.hb-ok { background: #e4f5ec; color: #0b6b4c; }
.hb-overdue { background: #fdecec; color: #b42318; }
/* 邮寄 / 缴费详情：金额与缴费率 */
.money-line { font-variant-numeric: tabular-nums; font-weight: 700; }
.money-line.ok { color: var(--ok); }
.money-line.bad { color: #b91c1c; }
.rate-wrap { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.rate-bar { width: 78px; height: 6px; border-radius: 4px; background: #e8edf6; overflow: hidden; }
.rate-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #34a853, #0f7a5a); }
.prog-note { font-size: 11px; color: var(--muted); max-width: 210px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prog-note.warn { color: #a8600a; }
.prog-note.danger { color: #b91c1c; }
.chip .chip-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 4px; }

/* ==================== 法院沟通详情 ==================== */
.mt4 { margin-top: 4px; }
.hint { font-size: 11.8px; color: var(--muted); line-height: 1.65; }

.court-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 9px; padding: 0 16px 16px; }
.court-card {
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px 8px;
  cursor: pointer; background: #fff; transition: border-color .14s, box-shadow .14s;
}
.court-card:hover { border-color: #c9d6ea; box-shadow: 0 2px 8px rgba(30, 60, 110, .06); }
.court-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); background: #f8fbff; }
.cc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.cc-name { font-size: 12.5px; font-weight: 700; line-height: 1.35; color: var(--text-1); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-count { font-size: 15px; font-weight: 800; color: var(--primary); flex: none; font-variant-numeric: tabular-nums; }
.cc-count small { font-size: 10px; font-weight: 600; margin-left: 1px; color: var(--muted); }
.cc-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.cc-tel { font-size: 11px; color: #2158b5; font-family: var(--mono, monospace); }
.cc-tel.none { color: var(--muted); font-family: inherit; }
.cc-foot { font-size: 10.8px; color: var(--muted); margin-top: 5px; }

.reason-tag { display: inline-block; font-size: 10.8px; font-weight: 700; padding: 1.5px 6px; border-radius: 5px; white-space: nowrap; background: #f1f3f7; color: #5c6878; }
.reason-tag.t-digital { background: #ede9ff; color: #5b3fb8; }
.reason-tag.t-jurisdiction { background: #e8f0ff; color: #2158b5; }
.reason-tag.t-mediate { background: #fff4e5; color: #a8600a; }
.reason-tag.t-preserve { background: #fdf0e3; color: #95550a; }
.reason-tag.t-material { background: #e9f6ef; color: #0b6b4c; }
.reason-tag.t-postpone { background: #eef4f9; color: #3d6b8f; }
.reason-tag.t-noreason { background: #fdecec; color: #b91c1c; }
.reason-tag.t-other { background: #f1f3f7; color: #5c6878; }

.tel-chip {
  display: inline-block; font-size: 11.5px; font-weight: 600; color: #2158b5;
  background: #eef4ff; border-radius: 5px; padding: 2px 6px; margin: 1px 3px 1px 0;
  text-decoration: none; font-family: var(--mono, monospace);
}
.tel-chip:hover { background: #e0ebff; }

.reason-cell {
  font-size: 12px; color: var(--text-2); line-height: 1.55; max-width: 300px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.comm-table tbody tr.comm-row { cursor: pointer; }
.comm-table tbody tr.comm-row.open { background: #f7fafe; }
.comm-table tbody tr.comm-row.open td { border-bottom-color: transparent; }
.comm-table .detail-row > td { background: #f7fafe; padding: 0 16px 14px !important; }

.tl-wrap { border-left: 2px solid #d8e3f3; margin: 2px 0 0 4px; padding: 4px 0 0 14px; }
.tl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.tl-ch { background: #eef2f8; border-radius: 5px; padding: 2px 7px; color: #4a586c; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 10px 14px; }
.timeline li::before {
  content: ""; position: absolute; left: -21px; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: #fff; border: 2px solid #b8cbe6;
}
.timeline li.manual::before { border-color: var(--primary); background: var(--primary); }
.tl-date { font-size: 11px; font-weight: 700; color: #3d6b8f; font-variant-numeric: tabular-nums; }
.tl-text { font-size: 12.2px; color: var(--text-1); line-height: 1.6; margin-top: 1px; }
.tl-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.tl-src { font-size: 10.5px; color: var(--muted); background: #f1f3f7; border-radius: 4px; padding: 1px 5px; }
.tl-empty { font-size: 12px; color: var(--muted); padding: 6px 0 10px; }

/* 沟通页统计卡固定 5 列 */
#commStats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1280px) { #commStats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { #commStats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ==================== 后续待办 & 法院电话簿 ==================== */
#commStats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1400px) { #commStats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cc-book {
  border: none; background: none; padding: 0; cursor: pointer;
  font-size: 10.8px; color: var(--primary); font-weight: 600; white-space: nowrap;
}
.cc-book:hover { text-decoration: underline; }

.todo-line { display: flex; align-items: center; gap: 5px; max-width: 190px; }
.todo-date {
  font-size: 10.8px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: #eef2f8; color: #4a586c; border-radius: 4px; padding: 1px 5px; flex: none;
}
.todo-date.soon { background: #fff4e5; color: #a8600a; }
.todo-date.overdue { background: #fdecec; color: #b91c1c; }
.todo-action { font-size: 12px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 6px; }
.todo-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; background: #fbfcfe;
}
.ti-action { font-size: 12.5px; font-weight: 600; }

.book-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 12px; align-items: start; }
@media (max-width: 1100px) { .book-layout { grid-template-columns: 1fr; } }
.book-side { padding: 0; overflow: hidden; }
.book-side-head { padding: 12px 12px 8px; border-bottom: 1px solid var(--border); }
.book-list { max-height: calc(100vh - 250px); overflow-y: auto; padding: 6px; }
.book-item { border-radius: 8px; padding: 7px 9px; cursor: pointer; border: 1px solid transparent; }
.book-item:hover { background: #f6f9fe; }
.book-item.active { background: #f0f6ff; border-color: var(--primary-soft, #cfe0ff); }
.bi-name { font-size: 12.5px; font-weight: 700; color: var(--text-1); }
.bi-meta { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.bi-badge { font-size: 10.2px; background: #f1f3f7; color: #5c6878; border-radius: 4px; padding: 0.5px 5px; }
.bi-badge.danger { background: #fdecec; color: #b91c1c; }
.bi-tel { font-size: 11px; color: #2158b5; font-family: var(--mono, monospace); margin-top: 3px; }

.book-main { padding: 14px 16px 18px; }
.book-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.book-detail-head h3 { font-size: 16px; font-weight: 800; }
.book-section { margin-top: 14px; }
.bs-title { font-size: 12.8px; font-weight: 700; color: var(--text-1); margin-bottom: 8px; }
.phone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; }
.phone-card {
  border: 1px solid var(--border); border-left: 3px solid #c5d3e6; border-radius: 9px;
  padding: 9px 11px; background: #fff; position: relative;
}
.phone-card.t-primary { border-left-color: var(--primary); }
.phone-card.t-warn { border-left-color: var(--warn); }
.phone-card.t-danger { border-left-color: var(--danger); }
.phone-card.t-info { border-left-color: var(--info); }
.phone-card.t-muted { border-left-color: #9aa6b7; background: #fafbfc; }
.pc-role { font-size: 11px; font-weight: 700; color: var(--text-2); }
.pc-num { margin-top: 2px; }
.pc-num a { font-size: 15px; font-weight: 800; color: #1b4f9c; text-decoration: none; font-variant-numeric: tabular-nums; }
.pc-num a:hover { text-decoration: underline; }
.pc-note { font-size: 10.8px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-ops { display: flex; gap: 8px; margin-top: 5px; }
.pc-src { position: absolute; right: 10px; top: 9px; font-size: 9.8px; color: #b3bcc9; }

/* ---------- 案件按月分组 ---------- */
.month-row td { background: #f4f7fc; padding: 0 !important; border-top: 2px solid #e3eaf5; }
.month-row:first-child td { border-top: none; }
.month-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px; }
.month-head .mh-title { font-size: 12.8px; font-weight: 700; color: var(--text); letter-spacing: .2px; }
.month-head .mh-title::before { content: '▦'; margin-right: 6px; color: var(--primary); font-size: 12px; }
.month-head .mh-meta { font-size: 11.8px; color: var(--muted); }
.month-head .grow { flex: 1; }

/* ---------- 债权库 / 转让链 ---------- */
.drawer-section { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.drawer-section:last-child { border-bottom: none; }
.ds-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.ds-title::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); }
.ds-tag { font-size: 11px; font-weight: 500; color: var(--muted); background: #f1f4f9; border-radius: 5px; padding: 1px 7px; }

.amt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.amt-col { background: #fafbfd; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; }
.amt-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 3px 0; }
.amt-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.amt-hint { font-size: 10.5px; color: #9aa6b8; background: #eef1f6; border-radius: 4px; padding: 0 4px; }
.amt-value { font-family: ui-monospace, Menlo, monospace; font-size: 12.8px; color: var(--text); }
.amt-value.strong { font-size: 14px; font-weight: 700; color: var(--primary-dark, #1d4ed8); }

.chain { position: relative; margin-left: 4px; }
.chain-item { display: flex; gap: 10px; position: relative; padding-bottom: 12px; }
.chain-item::before { content: ''; position: absolute; left: 11px; top: 22px; bottom: 0; width: 2px; background: #e3eaf5; }
.chain-item:last-child { padding-bottom: 0; }
.chain-item:last-child::before { display: none; }
.chain-dot { flex: none; width: 24px; height: 22px; border-radius: 6px; background: #eef4ff; color: #1d4ed8; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.chain-body { flex: 1; min-width: 0; }
.chain-parties { font-size: 12.8px; font-weight: 600; }
.chain-arrow { color: var(--primary); margin: 0 3px; }
.chain-meta { font-size: 11.6px; color: var(--muted); margin-top: 2px; }
.chain-ops { margin-top: 3px; }
.chain-ops .btn-link { font-size: 12px; }

.issue-list { display: flex; flex-direction: column; gap: 6px; }
.issue-item { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.6; padding: 7px 10px; border-radius: 7px; }
.issue-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; margin-top: 7px; }
.issue-item.i-danger { background: var(--danger-soft); color: #a32a22; }
.issue-item.i-danger .issue-dot { background: var(--danger); }
.issue-item.i-warn { background: #fff8e6; color: #7a5c07; }
.issue-item.i-warn .issue-dot { background: var(--warn); }
.issue-item.i-info { background: #eef4ff; color: #1d4ed8; }
.issue-item.i-info .issue-dot { background: #3b82f6; }

/* ---------- 证据材料 ---------- */
.ev-summary { display: flex; align-items: center; gap: 18px; padding: 12px 16px; background: #fafbfd; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.ev-stat { display: flex; flex-direction: column; align-items: center; min-width: 52px; }
.ev-stat b { font-size: 17px; font-weight: 700; }
.ev-stat span { font-size: 11.4px; color: var(--muted); }
.ev-stat.ok b { color: var(--ok); }
.ev-stat.warn b { color: var(--warn); }
.ev-stat.danger b { color: var(--danger); }
.ev-progress { flex: 1; min-width: 160px; }
.ev-bar { height: 6px; border-radius: 4px; background: #e9eef6; overflow: hidden; }
.ev-bar i { display: block; height: 100%; border-radius: 4px; transition: width .3s; }
.ev-group { margin-bottom: 12px; }
.ev-group-head { display: flex; align-items: center; gap: 8px; font-size: 12.4px; font-weight: 700; color: var(--text-2); padding: 7px 2px; border-bottom: 1px dashed var(--border); }
.ev-row { display: flex; align-items: center; gap: 12px; padding: 8px 2px; border-bottom: 1px solid #f2f5fa; }
.ev-row:last-child { border-bottom: none; }
.ev-main { flex: 1; min-width: 0; }
.ev-name { font-size: 12.8px; font-weight: 600; }
.ev-proof { font-size: 11.6px; color: var(--muted); margin-top: 2px; }
.ev-fields { display: flex; align-items: center; gap: 6px; }
.ev-sel { height: 28px; font-size: 12px; }
.ev-ops { display: flex; gap: 2px; }
.ev-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 20px; padding: 4px 16px 16px; }
.ev-cat-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.4px; font-weight: 600; margin-bottom: 5px; }

/* ---------- 留案 / 退案 ---------- */
.hold-stats { display: inline-flex; gap: 4px; }
.hold-chip { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 12px; color: var(--text-2); cursor: pointer; transition: all .15s; }
.hold-chip b { font-size: 12.5px; color: var(--text); margin-left: 2px; }
.hold-chip:hover { border-color: #c9d6ea; background: #f7f9fd; }
.hold-chip.active { border-color: var(--primary); background: #eef4ff; color: var(--primary-dark, #1d4ed8); }
.hold-chip.active b { color: var(--primary-dark, #1d4ed8); }
.tag-hold { background: #fff4e5 !important; color: #94700a !important; }
.tag-return { background: #f3f4f6 !important; color: #6b7280 !important; }

/* ---------- 按月分类管理（每月独立一档） ---------- */
.crumb-bar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.crumb-bar .btn-link { font-size: 12.4px; color: var(--primary); }
.crumb-bar .crumb-sep { color: #c3ccdb; font-size: 12px; }
.crumb-bar .crumb-cur { font-size: 12.8px; font-weight: 700; color: var(--text); }
.crumb-bar .grow { flex: 1; }

.ov-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.ov-title h2 { font-size: 15px; font-weight: 800; letter-spacing: .2px; }
.ov-title .ov-sub { font-size: 11.8px; color: var(--muted); margin-top: 2px; }
.ov-title .ov-sub b { color: var(--text-2); font-weight: 700; }
.ov-head .grow { flex: 1; }
.ov-load { padding: 40px; text-align: center; color: var(--muted); font-size: 12.5px; }

.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px; padding: 14px 16px 18px; }
.month-card {
  position: relative; text-align: left; cursor: pointer; overflow: hidden;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  padding: 12px 13px 10px 15px; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.month-card:hover { border-color: #c3d3ec; box-shadow: 0 8px 22px -14px rgba(20, 32, 58, .45); transform: translateY(-1px); }
.month-card::after {
  content: ''; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--primary); opacity: .5;
}
.month-card.is-all { background: linear-gradient(180deg, #f7faff, #fff); border-color: #d7e3f7; }
.month-card.is-all::after { background: #1e40af; opacity: .85; }
.month-card.is-empty::after { background: var(--warn); opacity: .5; }

.mc-head { display: flex; align-items: baseline; gap: 8px; }
.mc-month { font-size: 13.4px; font-weight: 800; color: var(--text); letter-spacing: .2px; }
.mc-count { margin-left: auto; font-size: 17px; font-weight: 800; color: var(--primary-dark, #1d4ed8); font-variant-numeric: tabular-nums; }
.mc-count small { font-size: 10.5px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.mc-amount { font-size: 12.6px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: 1px; }
.mc-amount.muted { color: var(--muted); font-weight: 500; }
.mc-bar { height: 4px; border-radius: 3px; background: #eef2f8; overflow: hidden; margin: 7px 0 8px; }
.mc-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #93b4f5, #2563eb); }
.mc-tags { display: flex; flex-wrap: wrap; gap: 4px; min-height: 20px; }
.mc-tag { font-size: 10.8px; line-height: 18px; padding: 0 6px; border-radius: 5px; background: #f1f4f9; color: var(--text-2); white-space: nowrap; }
.mc-tag.ok { background: var(--ok-soft); color: var(--ok); }
.mc-tag.warn { background: var(--warn-soft); color: var(--warn); }
.mc-tag.info { background: var(--info-soft); color: var(--info); }
.mc-tag.danger { background: var(--danger-soft); color: var(--danger); }
.mc-edit {
  border: 1px solid #d8e3f5; background: #f7faff; color: var(--primary);
  font-size: 10.4px; font-weight: 700; line-height: 16px; padding: 0 6px;
  border-radius: 5px; cursor: pointer; flex: none; align-self: center;
  transition: background .12s, border-color .12s, color .12s;
}
.mc-edit:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.mc-edit:active { transform: translateY(1px); }
.mc-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; padding-top: 8px; border-top: 1px dashed #eef1f7; font-size: 10.9px; color: var(--muted); }
.mc-foot .grow { flex: 1; }
.mc-foot .mc-big { color: var(--warn); font-weight: 700; margin-left: 4px; }
.mc-go { font-size: 11.4px; font-weight: 700; color: var(--primary); }

/* 债务人信息列：地址过长单行截断 */
.data td .cell-sub.addr { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 导入预览：标红加粗行（已提交法院立案） */
.data tr.row-red { background: #fff7f5; }
.data tr.row-red:hover { background: #ffefec; }
.data tr.row-red td { color: #b42318; font-weight: 600; }
.tag.red { background: var(--danger-soft); color: var(--danger); }

/* ---------- 分类维度切换 & 担保公司分区 ---------- */
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.seg-btn { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; font-size: 12.4px; color: var(--text-2); cursor: pointer; font-weight: 600; transition: .15s; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: #fff; color: var(--primary-dark, #1d4ed8); box-shadow: 0 1px 3px rgba(20,32,58,.12); }

.guar-sections { padding: 6px 0 4px; }
.guar-sec { border-top: 1px solid var(--border); }
.guar-sec:first-child { border-top: 0; }
.guar-sec.is-empty { background: #fcfcfd; }
.gs-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 2px; }
.gs-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.gs-name { font-size: 13.6px; font-weight: 800; color: var(--text); letter-spacing: .2px; }
.gs-name::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--primary); margin-right: 7px; transform: translateY(-1px); }
.guar-sec.is-empty .gs-name::before { background: var(--muted); }
.gs-sub { font-size: 11.8px; color: var(--muted); font-variant-numeric: tabular-nums; }

.crumb-tag { font-size: 12px; font-weight: 700; color: var(--primary-dark, #1d4ed8); background: var(--info-soft, #eef4ff); padding: 2px 8px; border-radius: 6px; }

.imp-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.imp-tags .mc-tag b { font-weight: 800; }
/* 导入前的分类设置卡片 */
.imp-tag-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr) 240px; gap: 18px; align-items: start; }
.imp-tag-grid .field + .field { margin-top: 0; }
.imp-target {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 11px; font-size: 13px; line-height: 1.6; min-height: 38px;
}
.imp-target b { color: var(--primary); }
@media (max-width: 1180px) { .imp-tag-grid { grid-template-columns: 190px minmax(0, 1fr); } }
@media (max-width: 860px) { .imp-tag-grid { grid-template-columns: 1fr; } }
.widget .req, .req { color: var(--danger); }

/* 已提交法院待受理 */
.flag-submitted { background: #eef4ff; color: #1d4ed8; }

/* 弹窗内多字段纵向间距 */
.field + .field { margin-top: 14px; }
.modal-body .hint, .drawer-body .hint { margin-top: 2px; }

/* ============================ 登录页 ============================ */
.auth-root { position: fixed; inset: 0; z-index: 300; overflow: auto; }
.auth-root.hidden { display: none; }
.login-wrap {
  min-height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
  background:
    radial-gradient(900px 480px at 12% -10%, #e8f0ff 0%, rgba(232, 240, 255, 0) 62%),
    radial-gradient(760px 420px at 96% 108%, #e9f7f4 0%, rgba(233, 247, 244, 0) 60%),
    linear-gradient(180deg, #f7f9fd, #eef2f9);
}
.login-card {
  width: 100%; max-width: 880px;
  display: grid; grid-template-columns: 1.02fr 1fr;
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 30px 70px -30px rgba(20, 32, 58, .34), 0 2px 6px rgba(20, 32, 58, .04);
  overflow: hidden;
}

.login-brand {
  position: relative; padding: 38px 34px;
  background: linear-gradient(150deg, #1e3a8a 0%, #2563eb 52%, #3b82f6 100%);
  color: #fff; display: flex; flex-direction: column;
}
.login-brand::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(360px 220px at 88% 8%, rgba(255, 255, 255, .18), transparent 70%);
  pointer-events: none;
}
.lb-mark {
  width: 46px; height: 46px; border-radius: 13px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3);
  display: grid; place-items: center; font-size: 20px; font-weight: 800; letter-spacing: 1px;
}
.lb-title { margin-top: 18px; font-size: 21px; font-weight: 800; letter-spacing: .5px; }
.lb-sub { margin-top: 4px; font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; opacity: .72; }
.lb-points { position: relative; margin: 26px 0 0; padding: 0; list-style: none; font-size: 12.6px; line-height: 2; opacity: .92; }
.lb-points li { padding-left: 15px; position: relative; }
.lb-points li::before {
  content: ''; position: absolute; left: 0; top: .78em;
  width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .68);
}
.lb-foot { margin-top: auto; padding-top: 30px; font-size: 11px; opacity: .6; letter-spacing: .4px; }

.login-form { padding: 38px 36px 32px; }
.login-form h1 { font-size: 22px; font-weight: 800; letter-spacing: .5px; }
.lf-sub { margin: 5px 0 20px; font-size: 12.5px; color: var(--muted); }
.lf-sub + .alert { margin-bottom: 4px; }
.login-form .field { margin-top: 14px; }
.login-form .field:first-of-type { margin-top: 0; }
.login-form input {
  width: 100%; height: 40px; padding: 0 12px; font-size: 13.5px;
  border: 1px solid var(--border-strong); border-radius: 9px; background: #fff; color: var(--text);
  transition: border-color .14s, box-shadow .14s;
}
.login-form input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 54px; }
.pwd-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: var(--primary); font-size: 11.5px; font-weight: 700;
  padding: 4px 7px; border-radius: 6px; cursor: pointer;
}
.pwd-eye:hover { background: var(--primary-soft); }
.remember { display: flex; align-items: center; gap: 7px; margin: 15px 0 4px; font-size: 12.4px; color: var(--text-2); cursor: pointer; }
.remember input { width: 14px; height: 14px; accent-color: var(--primary); }
.login-btn { width: 100%; height: 42px; margin-top: 12px; font-size: 14px; font-weight: 700; letter-spacing: 3px; }
.lf-hint { margin-top: 16px; font-size: 11.5px; line-height: 1.7; color: var(--muted); }

@media (max-width: 760px) {
  .login-card { grid-template-columns: 1fr; max-width: 420px; }
  .login-brand { display: none; }
  .login-form { padding: 30px 24px 26px; }
}

/* ============================ 侧边栏账号 ============================ */
.user-box { padding: 8px 10px 4px; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 6px; }
.user-chip {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; border: 1px solid transparent; border-radius: 9px;
  background: rgba(255, 255, 255, .04); color: inherit; cursor: pointer;
  font-family: inherit; text-align: left; transition: background .14s, border-color .14s;
}
.user-chip:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); }
.user-chip .avatar {
  width: 28px; height: 28px; border-radius: 9px; flex: none;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #fff;
  background: linear-gradient(140deg, #3b82f6, #1d4ed8);
}
.user-chip .uc-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-chip .uc-text b { font-size: 12.6px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .uc-text i { font-size: 10.6px; font-style: normal; color: var(--muted); }
.user-chip .uc-more { margin-left: auto; font-size: 14px; color: var(--muted); letter-spacing: 1px; }
.user-menu { display: flex; flex-direction: column; }

/* ============================ 账号与安全 ============================ */
.acct-me {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2);
}
.acct-me .avatar-lg {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  font-size: 17px; font-weight: 800; color: #fff; background: linear-gradient(140deg, #3b82f6, #1d4ed8);
}
.acct-me .am-name { font-size: 14.5px; font-weight: 800; }
.acct-me .am-meta { font-size: 11.8px; color: var(--muted); }
.user-table td .uname { font-weight: 700; }
.user-table td .ulast { font-size: 11.5px; color: var(--muted); }
.pill { font-size: 11px; line-height: 18px; padding: 0 7px; border-radius: 5px; background: #f1f4f9; color: var(--text-2); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.off { background: #f3f4f6; color: var(--muted); }
.pill.admin { background: var(--info-soft); color: var(--info); }
.token-box {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 9px;
  padding: 9px 11px; font-size: 12px;
}
.token-box code { font-size: 11.5px; color: var(--text-2); word-break: break-all; }

/* ============================ 邮寄清单：案件选择器 ============================ */
.pick-list {
  margin-top: 10px; max-height: 300px; overflow: auto;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.pick-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.pick-item:last-child { border-bottom: 0; }
.pick-item:hover { background: var(--primary-soft); }
.pick-item.sel { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--primary); }
.pick-item.off { cursor: default; opacity: .55; background: var(--surface-2); }
.pick-item.off:hover { background: var(--surface-2); }
.pick-main { flex: 1; min-width: 0; }
.pick-main .cell-main { display: flex; align-items: center; gap: 6px; }
.pick-side { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pick-tag {
  font-size: 10.5px; line-height: 16px; padding: 0 6px; border-radius: 5px;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.pick-empty { padding: 18px 12px; text-align: center; font-size: 12.5px; color: var(--muted); }

/* ============================ 缴费详情：列头筛选 / 应缴金额修改 ============================ */
.th-f-th { white-space: nowrap; }
.th-f {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; margin-left: 4px; padding: 0;
  border: 1px solid transparent; border-radius: 5px; background: transparent;
  color: #9aa6b8; cursor: pointer; vertical-align: -3px;
}
.th-f svg { width: 11px; height: 11px; }
.th-f:hover { color: var(--primary); background: var(--primary-soft); border-color: #d7e4ff; }
.th-f.on { color: #fff; background: var(--primary); border-color: var(--primary); }
.fpop {
  position: fixed; z-index: 90; background: #fff; border: 1px solid var(--border-strong);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(23, 38, 64, .16); overflow: hidden;
  font-size: 12.5px;
}
.fpop-hd { padding: 9px 12px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.fpop-body { max-height: 288px; overflow: auto; padding: 4px 0; }
.fpop-grp { padding: 6px 12px 4px; font-size: 11px; color: var(--muted); letter-spacing: .3px; }
.fpop-opt {
  display: flex; align-items: center; gap: 6px; width: 100%; padding: 6px 12px;
  border: 0; background: transparent; cursor: pointer; text-align: left;
  font-size: 12.5px; color: var(--text-2); font-family: inherit;
}
.fpop-opt:hover { background: var(--primary-soft); }
.fpop-opt.on { color: var(--primary-dark); font-weight: 600; background: var(--primary-soft); }
.fpop-tick { width: 12px; flex: none; color: var(--primary); font-size: 11px; }
.fpop-lb { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpop-opt i { font-style: normal; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.fpop-ft { padding: 7px 12px; border-top: 1px solid var(--border); background: var(--surface); text-align: right; }
.fee-edit {
  margin-left: 5px; padding: 0 5px; height: 18px; line-height: 17px;
  font-size: 11px; border-radius: 5px; cursor: pointer;
  border: 1px solid var(--border-strong); background: #fff; color: var(--muted);
  vertical-align: 1px;
}
.fee-edit:hover { border-color: var(--primary); color: var(--primary); }

/* 案件表头：列设置按钮（放在表头最右） */
.cases-table { min-width: 100%; }
.cases-table th.colset-th { width: 38px; padding: 6px 4px; text-align: center; }
.colset-btn {
  width: 24px; height: 24px; padding: 0; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text-2);
  font-size: 13px; line-height: 1;
}
.colset-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.colset-td { border-bottom: 1px solid #eef1f7; }
.cases-table td.actions { white-space: nowrap; }
.cases-table .th-f-th { white-space: nowrap; }

/* 立案批次：已立案案件的开庭行内编辑 */
.hear-table th .th-tip { font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 4px; }
.hear-table .hp-cell { white-space: nowrap; }
.hear-table .hp-cell input[type="date"] {
  width: 132px; height: 30px; padding: 0 6px; font-size: 12.5px;
  border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; color: var(--text);
}
.hear-table .hp-cell input[type="time"] {
  width: 84px; height: 30px; padding: 0 4px; margin-left: 5px; font-size: 12.5px;
  border: 1px solid var(--border-strong); border-radius: 6px; background: #fff; color: var(--text);
}
.hear-table .hp-cell input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.hear-table .hp-cell input:invalid { border-color: var(--danger); }
.hp-flag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 20px;
  background: var(--danger-soft); color: var(--danger); font-size: 11px; font-weight: 600;
}
.hear-toggle {
  min-width: 84px; height: 28px; padding: 0 10px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--border-strong); background: #fff; color: var(--muted);
  font-size: 12px; font-weight: 600; font-family: inherit;
}
.hear-toggle:hover { border-color: var(--primary); color: var(--primary); }
.hear-toggle.on { background: var(--ok-soft); border-color: #b6e2c8; color: var(--ok); }
.hear-table tr.row-done td { background: #fbfdfc; }
.hear-table tr.row-done .cell-main { color: var(--text-2); }

/* ================= 调解 · 分期还款计划 ================= */
.plan-wrap { border: 1px solid #e2e9f4; border-radius: 9px; background: #fff; padding: 10px 12px 8px; margin-bottom: 12px; }
.plan-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); margin-bottom: 8px; }
.plan-title { font-size: 12.5px; font-weight: 700; color: var(--text); }
.plan-warn { color: #b91c1c; font-weight: 700; }
.plan-empty { font-size: 12px; color: var(--muted); padding: 10px 2px 12px; }
.plan-table { font-size: 12.2px; }
.plan-table th { background: #f4f7fc; padding: 7px 10px; }
.plan-table td { padding: 7px 10px; }
.plan-table tbody tr:hover { background: #f9fbff; }
.plan-table tr.plan-over td { background: #fff8f7; }
.plan-table tr.plan-over:hover td { background: #fff2f0; }
.plan-seq { display: inline-block; min-width: 44px; font-weight: 600; color: var(--text-2); }
.plan-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); padding: 9px 2px 3px; border-top: 1px dashed #e6ecf5; margin-top: 6px; }
.plan-chk { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.plan-chk input { width: 15px; height: 15px; accent-color: var(--primary); }
.plan-preview { margin-top: 10px; padding: 9px 11px; background: #f5f8fd; border: 1px dashed #d6e2f2; border-radius: 8px; }
.pay-sum { display: flex; gap: 18px; flex-wrap: wrap; padding: 10px 12px; background: #f5f8fd; border-radius: 8px; font-size: 12.5px; }
.pay-sum > div { display: flex; flex-direction: column; gap: 3px; }
.pay-sum b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }
