/* ==========================================================================
   律所办公系统 · 设计规范
   基调：深墨蓝 + 暖灰底 + 细金线。律所的界面要"稳"，不要花。
   原则：一套间距、一套字号、一套圆角。任何地方都不靠"感觉"调数字。
   ========================================================================== */

:root {
  /* 主色：墨蓝。用于侧栏、主按钮、标题 */
  --ink-900: #0f1d2b;
  --ink-800: #16293d;
  --ink-700: #1e3651;
  --navy: #17324f;
  --navy-2: #20456b;
  --gold: #b08a4f;              /* 只做点缀：侧栏细线、当前项标记 */

  /* 中性 */
  --bg: #eef1f6;
  --card: #ffffff;
  --line: #e1e6ee;
  --line-2: #eef1f6;
  --txt: #1b2430;
  --sub: #69788c;
  --muted: #93a0b0;

  /* 语义 */
  --ok: #12724a;
  --ok-bg: #e9f5ee;
  --warn: #a35a0b;
  --warn-bg: #fdf4e6;
  --danger: #a92216;
  --danger-bg: #fcece9;
  --info-bg: #edf2f8;

  /* 尺寸与节奏 */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 28px;
  --h-ctl: 36px;                /* 输入框与按钮统一高度 */

  --sh-1: 0 1px 2px rgba(15, 29, 43, .06), 0 1px 3px rgba(15, 29, 43, .03);
  --sh-2: 0 6px 20px rgba(15, 29, 43, .07);
  --sh-3: 0 24px 64px rgba(11, 22, 34, .24);

  --sidebar-w: 236px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
               "Source Han Sans SC", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--txt);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font-family: inherit; font-size: 14px; color: inherit; }
a { color: var(--navy-2); text-decoration: none; }
.hide { display: none !important; }
::selection { background: #d7e4f2; }

/* 滚动条细一点，别喧哗 */
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #cfd7e2; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #b6c0cd; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- 登录 ---------- */
#login {
  min-height: 100%; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(176, 138, 79, .10), transparent 60%),
    linear-gradient(160deg, #0b1723 0%, #14283c 55%, #1b3550 100%);
}
.login-card {
  position: relative; width: 100%; max-width: 396px; background: #fff; border-radius: 18px;
  padding: 42px 36px 34px; box-shadow: var(--sh-3);
  border: 1px solid rgba(255, 255, 255, .6);
}

.login-logo {
  display: block; width: 236px; max-width: 100%; height: auto; margin: 2px auto 16px;
}
.login-card .sub {
  position: relative; text-align: center; color: var(--sub);
  font-size: 12px; letter-spacing: 3px;
  margin-bottom: 26px; padding-bottom: 20px; border-bottom: 1px solid var(--line-2);
}
/* 分隔线中央压一枚金色短线，与侧边栏品牌区呼应 */
.login-card .sub::after {
  content: ''; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  width: 34px; height: 2px; background: var(--gold); border-radius: 2px;
}
.login-card label { display: block; font-size: 12px; color: var(--sub); margin: 0 0 7px; letter-spacing: .5px; }
.login-card input {
  width: 100%; height: 44px; padding: 0 13px; border: 1px solid var(--line);
  border-radius: 10px; outline: none; background: #fdfefe; font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(23, 50, 79, .09); background: #fff; }
.login-card button {
  width: 100%; margin-top: 26px; height: 44px; border: 0; border-radius: 10px;
  background: var(--ink-800); color: #fff; font-weight: 600; letter-spacing: 4px;
  cursor: pointer; transition: background .15s;
}
.login-card button:hover { background: var(--ink-700); }
.err { color: var(--danger); font-size: 12.5px; margin-top: 14px; min-height: 16px; }

/* ---------- 骨架 ---------- */
/* 版式参照成熟律所系统（Clio / MyCase）的三层结构：
   顶部常驻操作栏 + 左侧常驻导航 + 内容区。顶栏是"系统"和"网页"的分水岭，
   没有它，每个页面都像一张独立的表格。 */
/* 固定外壳：只让内容区滚动，侧栏与顶栏始终在位。
   这样侧栏不会在长页面上"断掉"半截露白，也是成熟产品的标准做法。 */
#app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.body { flex: 1; display: flex; min-width: 0; min-height: 0; }

aside {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, #12212f 0%, #16293d 55%, #101d2a 100%);
  color: #a9bacd; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .05);
  transition: width .18s ease, flex-basis .18s ease;
}
/* 顶部一道金色细线，像信笺的抬头线，也给深色块一个起点 */
aside::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, rgba(176, 138, 79, .22) 42%, transparent 100%);
}

/* 品牌区放在顶栏左上，宽度与侧栏对齐，下面的金色竖线正好落在侧栏边缘 */
.tb-brand {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  display: flex; align-items: center; gap: 9px; padding-left: 18px;
  align-self: stretch; box-shadow: inset -1px 0 0 var(--line);
  transition: width .18s ease, flex-basis .18s ease;
}
.brand-logo { width: 26px; height: 26px; flex: 0 0 26px; object-fit: contain; }
.tb-brand b {
  font-size: 13.5px; font-weight: 600; color: var(--ink-900);
  letter-spacing: .5px; white-space: nowrap;
}

nav { padding: 12px 12px 14px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
nav .nav-group {
  font-size: 9.5px; color: #5c718a; letter-spacing: 1.8px; padding: 12px 11px 5px;
  font-weight: 600;
}
nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 11px; border-radius: 8px;
  color: #aabccf; font-size: 13.5px; margin-bottom: 1px; cursor: pointer;
  position: relative; transition: background .13s, color .13s;
}
nav a svg { width: 16px; height: 16px; flex: 0 0 16px; opacity: .7; transition: opacity .13s; }
nav a:hover { background: rgba(255, 255, 255, .055); color: #eaf1f8; }
nav a:hover svg { opacity: .95; }
nav a.on {
  background: rgba(255, 255, 255, .09); color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
nav a.on svg { opacity: 1; color: #fff; }
nav a.on::before {
  content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  background: var(--gold); border-radius: 0 3px 3px 0;
}

/* 折叠态：只留图标，宽度收到 66px。导航项多的时候给正文让位 */
#app.collapsed { --sidebar-w: 66px; }
#app.collapsed .tb-brand { padding-left: 0; justify-content: center; }
#app.collapsed .tb-brand b { display: none; }
#app.collapsed nav { padding: 8px 9px; }
#app.collapsed nav .nav-group { display: none; }
#app.collapsed nav a { justify-content: center; padding: 9px 0; gap: 0; }
#app.collapsed nav a span { display: none; }
#app.collapsed nav a svg { width: 18px; height: 18px; flex-basis: 18px; }
#app.collapsed nav a.on::before { left: -9px; }
#app.collapsed nav a b.nb { display: none; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: relative; z-index: 40; height: 56px; flex: 0 0 56px;
  display: flex; align-items: center; gap: 12px; padding: 0 22px 0 14px;
  background: rgba(255, 255, 255, .93);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.tb-burger {
  width: 32px; height: 32px; flex: 0 0 32px; display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; border-radius: 8px;
  color: #64748b; cursor: pointer; transition: background .13s, color .13s;
}
.tb-burger:hover { background: #eff2f7; color: var(--ink-800); }
.tb-burger svg { width: 17px; height: 17px; }
.tb-title {
  font-size: 14.5px; font-weight: 600; color: var(--ink-900); letter-spacing: .3px;
  white-space: nowrap; padding-right: 4px;
}

/* 全局搜索：浅底、无边框，聚焦才浮起来。这是成熟产品的通行做法，
   常驻但低调，不跟主操作抢注意力 */
.tb-search { position: relative; flex: 1 1 auto; max-width: 440px; margin: 0 auto; }
.tb-search input {
  width: 100%; height: 34px; padding: 0 64px 0 33px;
  border: 1px solid transparent; border-radius: 9px; background: #eff2f7;
  font-size: 13px; outline: none; color: var(--txt);
  transition: background .14s, border-color .14s, box-shadow .14s;
}
.tb-search input::placeholder { color: #8d9bad; }
.tb-search input:focus {
  background: #fff; border-color: var(--navy-2);
  box-shadow: 0 0 0 3px rgba(23, 50, 79, .08);
}
.tb-mag {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: #93a0b0; pointer-events: none;
}
#gsKbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: inherit; font-size: 10.5px; color: #93a0b0; background: #fff;
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; line-height: 1.4;
  pointer-events: none;
}
.tb-search input:focus + #gsKbd { display: none; }

/* 搜索结果下拉 */
.gs-drop {
  position: absolute; left: 0; right: 0; top: 41px; z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 18px 44px -14px rgba(11, 22, 34, .3), 0 2px 6px rgba(11, 22, 34, .06);
  padding: 6px; max-height: 68vh; overflow-y: auto;
  animation: dropIn .14s ease-out;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-5px) } to { opacity: 1; transform: none } }
.gs-g {
  font-size: 10.5px; color: var(--muted); letter-spacing: 1.5px; font-weight: 600;
  padding: 9px 10px 5px;
}
.gs-i {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
}
.gs-m { flex: 1; min-width: 0; }
.gs-i .t {
  font-size: 13px; color: var(--ink-900); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gs-i .s {
  font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gs-i .tag { flex: 0 0 auto; }
.gs-i.on, .gs-i:hover { background: #f1f5fa; }
.gs-i.on .t { color: var(--navy); }
.gs-empty { padding: 20px 12px; text-align: center; font-size: 12.5px; color: var(--muted); }

/* 顶栏右侧 */
.tb-act { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.tb-new { position: relative; }
.tb-new .btn.pri { height: 34px; padding: 0 13px; border-radius: 9px; font-size: 13px; gap: 5px; }
.tb-new .btn.pri svg { width: 15px; height: 15px; }

.tb-ico {
  position: relative; width: 34px; height: 34px; flex: 0 0 34px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; border-radius: 9px;
  color: #5b6c81; cursor: pointer; transition: background .13s, color .13s;
}
.tb-ico:hover { background: #eff2f7; color: var(--ink-800); }
.tb-ico svg { width: 18px; height: 18px; }
.badge {
  position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  background: var(--danger); color: #fff; font-size: 10px; font-style: normal;
  font-weight: 600; border-radius: 8px; line-height: 1;
  box-shadow: 0 0 0 2px #fff;
}

.tb-user {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 7px 0 5px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; margin-left: 3px;
  transition: background .13s;
}
.tb-user:hover, .tb-user.open { background: #eff2f7; }
.tb-user .uav {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #2a4a6b 0%, #17324f 100%);
  color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .5px;
}
.tu-tx { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.tu-tx b {
  font-size: 12.5px; font-weight: 600; color: var(--ink-900);
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tu-tx span { font-size: 10.5px; color: var(--muted); }
.tu-caret { width: 13px; height: 13px; color: var(--muted); flex: 0 0 13px; }

/* 下拉菜单（新建 / 用户） */
.menu {
  position: absolute; right: 0; top: calc(100% + 7px); min-width: 176px; z-index: 70;
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: 0 18px 44px -14px rgba(11, 22, 34, .3), 0 2px 6px rgba(11, 22, 34, .06);
  padding: 5px; animation: dropIn .14s ease-out;
}
.menu a {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: 7px; font-size: 13px; color: var(--txt); cursor: pointer; white-space: nowrap;
}
.menu a:hover { background: #f1f5fa; }
.menu a svg { width: 15px; height: 15px; color: var(--sub); flex: 0 0 15px; }
.menu .sep { height: 1px; background: var(--line-2); margin: 5px 4px; }

/* 导航项右侧的计数角标（未认领线索、逾期待办） */
nav a b.nb {
  margin-left: auto; flex: 0 0 auto; min-width: 17px; height: 17px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .13); color: #d9e4f0;
  font-size: 10.5px; font-weight: 600; border-radius: 9px; line-height: 1;
}
nav a.on b.nb { background: var(--gold); color: #1a1206; }

main {
  flex: 1; min-width: 0; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: 0 34px 64px;
}
main > * { width: 100%; max-width: 1320px; margin-left: auto; margin-right: auto; }


/* 焦点可见：键盘操作时给一圈清晰的描边，鼠标点击不显示 */
:focus-visible { outline: 2px solid var(--navy-2); outline-offset: 2px; border-radius: 6px; }

/* ---------- 页头 ---------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-4); flex-wrap: wrap;
  padding: 26px 0 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.page-head h2 {
  font-size: 20px; margin: 0; font-weight: 700; letter-spacing: .2px;
  color: var(--ink-900); line-height: 1.3;
}
.page-head .desc {
  font-size: 12.5px; color: var(--sub); margin-top: 7px; line-height: 1.6; max-width: 720px;
}
.page-head .desc .hide-sm { color: var(--muted); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 29, 43, .04), 0 10px 28px -18px rgba(15, 29, 43, .22);
  overflow: hidden;
}
.card-h {
  padding: 15px 20px; border-bottom: 1px solid var(--line-2);
  background: #fcfdfe;
  font-weight: 600; font-size: 13.5px; letter-spacing: .2px; color: var(--ink-900);
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-3);
  min-height: 52px;
}
.card-h small { font-weight: 400; color: var(--muted); font-size: 12px; }
.card-b { padding: 18px 20px; }
.card-h + .card-b { padding-top: 16px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--h-ctl); padding: 0 15px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--txt);
  cursor: pointer; font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: border-color .13s, background .13s, box-shadow .13s;
}
.btn:hover { border-color: #c6d0dd; background: #fbfcfd; box-shadow: var(--sh-1); }
.btn:active { background: #f5f7fa; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn.pri {
  background: linear-gradient(180deg, #1d3550 0%, #16293d 100%);
  border-color: #12222f; color: #fff; font-weight: 600;
  box-shadow: 0 1px 2px rgba(15, 29, 43, .22);
}
.btn.pri:hover {
  background: linear-gradient(180deg, #22405f 0%, #1a3048 100%);
  border-color: #16293d;
}
.btn.pri:active { box-shadow: none; transform: translateY(.5px); }
.btn.danger { color: var(--danger); border-color: #f0c9c4; }
.btn.danger:hover { background: #fdf6f5; border-color: #e4b0a9; }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-xs { height: 27px; padding: 0 9px; font-size: 12px; border-radius: 6px; font-weight: 500; }
a.btn { text-decoration: none; }

/* ---------- 表单控件 ---------- */
/* 原生「选择文件」按钮默认长得跟其他控件不一样，这里统一成小号按钮 */
input[type=file] {
  font-size: 12.5px; color: var(--sub); max-width: 100%;
  height: var(--h-ctl); padding: 0; border: 0; background: transparent;
}
input[type=file]::file-selector-button {
  height: 30px; margin-right: 9px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  color: var(--txt); font-family: inherit; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: border-color .13s, background .13s;
}
input[type=file]::file-selector-button:hover { border-color: #c6d0dd; background: #fbfcfd; }
input[type=file]::-webkit-file-upload-button {
  height: 30px; margin-right: 9px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  color: var(--txt); font-family: inherit; font-size: 12.5px; cursor: pointer;
}

/* ---------- 单选框 / 复选框 ---------- */
input[type=checkbox], input[type=radio] { accent-color: var(--ink-800); cursor: pointer; }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-4); }
.toolbar input[type=text], .toolbar input[type=date], .toolbar input[type=number],
.toolbar select {
  height: var(--h-ctl); padding: 0 12px; border: 1px solid var(--line);
  border-radius: 9px; outline: none; background: #fff; color: var(--txt);
  transition: border-color .13s, box-shadow .13s;
}
.toolbar input[type=text] { min-width: 230px; flex: 1; max-width: 340px; }
.toolbar input:focus, .toolbar select:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(23, 50, 79, .08); }
.toolbar .spacer { flex: 1; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-2);
  font-size: 13.5px; vertical-align: middle;
}
th {
  background: #f5f7fb; color: var(--sub); font-weight: 600; font-size: 11px;
  white-space: nowrap; letter-spacing: .8px; padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
th:first-child { border-top-left-radius: 0; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: #f8fafd; }
tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--navy-2); }
tbody tr:first-child td { border-top: 0; }
tbody tr:last-child td { border-bottom: 0; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
td:first-child { font-weight: 500; color: var(--ink-900); }
.tbl-wrap { overflow-x: auto; }
.tbl-wrap table { min-width: 560px; }
/* 工作台左栏较窄，去掉最小宽度并固定编号/阶段列，避免名称被挤成两行 */
.tbl-wrap table.tbl-dash { min-width: 0; table-layout: fixed; }
.tbl-dash th:first-child, .tbl-dash td:first-child { width: 108px; }
.tbl-dash th:nth-child(3), .tbl-dash td:nth-child(3) { width: 92px; }
.tbl-dash th:last-child, .tbl-dash td:last-child { width: 104px; text-align: right; }
.tbl-dash td:nth-child(2) { line-height: 1.5; }
.tbl-dash td:nth-child(2) .mini-s { margin-top: 1px; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; line-height: 1.7; font-weight: 500; white-space: nowrap;
}
.t-active { background: var(--ok-bg); color: var(--ok); }
.t-closed { background: #eff2f6; color: var(--sub); }
.t-paused { background: var(--warn-bg); color: var(--warn); }
.t-danger { background: var(--danger-bg); color: var(--danger); }
.t-navy { background: var(--info-bg); color: var(--navy-2); }

/* ---------- 指标卡 ---------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: var(--sp-3); margin-bottom: var(--sp-5);
}
.stat {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 13px;
  padding: 16px 18px; box-shadow: 0 1px 2px rgba(15, 29, 43, .04);
  transition: box-shadow .15s, border-color .15s;
}
.stat:hover { box-shadow: 0 6px 20px -14px rgba(15, 29, 43, .3); border-color: #dbe2ec; }
/* 工作台的第一张是在办案件，作为主指标稍微强调，避免六个方块一样重。
   其他页面（卷宗、回款）的指标卡是平级的，加 .pri 才启用这个强调。 */
.stats.pri .stat:first-child {
  background: linear-gradient(160deg, #f6faff 0%, #edf3fb 100%);
  border-color: #d3dfee;
  box-shadow: 0 1px 2px rgba(15, 29, 43, .05), 0 8px 22px -18px rgba(23, 50, 79, .45);
}
.stats.pri .stat:first-child::before {
  content: ''; position: absolute; left: 0; top: 0; width: 34px; height: 2px;
  background: var(--gold); border-radius: 0 2px 2px 0;
}
.stats.pri .stat:first-child .v { font-size: 31px; color: var(--navy); }
.stats.pri .stat:first-child .k { color: var(--navy-2); }
.stat .k { font-size: 12px; color: var(--sub); margin-bottom: 9px; letter-spacing: .4px; }
.stat .v {
  font-size: 26px; font-weight: 700; color: var(--ink-900);
  font-variant-numeric: tabular-nums; line-height: 1.15; letter-spacing: -.3px;
}
.stat .v small { font-size: 12px; font-weight: 400; color: var(--sub); margin-left: 4px; letter-spacing: 0; }
.stat.is-bad { border-color: #f0d5d0; background: linear-gradient(180deg, #fffdfc, #fff); }
.stat.is-bad .k { color: #a8564a; }

/* ---------- 工作台两栏 ---------- */
.dash-grid {
  display: grid; grid-template-columns: minmax(0, 1.58fr) minmax(292px, 1fr);
  gap: var(--sp-4); align-items: start;
}
.dash-grid > div { min-width: 0; }
.sbar {
  display: flex; height: 10px; border-radius: 5px; overflow: hidden;
  background: #eef1f6; margin-bottom: 16px;
}
.sbar i { display: block; height: 100%; transition: width .3s; }
.legend {
  display: flex; gap: 9px 22px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--sub);
}
.legend span { display: inline-flex; align-items: center; }
.legend i {
  width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 7px;
}
.legend b { color: var(--ink-900); font-weight: 600; margin-left: 5px; font-variant-numeric: tabular-nums; }

.mini { display: flex; flex-direction: column; }
.mini-i {
  display: flex; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line-2);
  transition: background .1s;
}
.mini-i:last-child { border-bottom: 0; }
.mini-i:hover { background: #fafbfd; }
.mini-d {
  flex: 0 0 44px; font-size: 11.5px; color: var(--sub); font-variant-numeric: tabular-nums;
  padding-top: 2px; letter-spacing: .2px;
}
.mini-d.is-late { color: var(--danger); font-weight: 600; }
.mini-m { min-width: 0; }
.mini-t {
  font-size: 13px; color: var(--ink-800); line-height: 1.45;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mini-s {
  display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 弹窗 ---------- */
.mask {
  position: fixed; inset: 0; background: rgba(11, 22, 34, .42);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 16px; z-index: 90; overflow-y: auto;
  animation: fadeIn .14s ease-out;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.modal {
  background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 720px;
  box-shadow: var(--sh-3); animation: modalIn .18s cubic-bezier(.2, .8, .3, 1);
  border: 1px solid rgba(255, 255, 255, .5);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-8px) scale(.99) } to { opacity: 1; transform: none } }
.modal-h {
  padding: 17px 22px; border-bottom: 1px solid var(--line-2);
  font-weight: 700; font-size: 15px; color: var(--ink-900);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.modal-b { padding: 20px 22px; max-height: 66vh; overflow-y: auto; }
.modal-f {
  padding: 14px 22px; border-top: 1px solid var(--line-2);
  display: flex; justify-content: flex-end; gap: 10px; background: #fcfdfe;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.x {
  cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; border: 0;
  background: none; padding: 0 4px; transition: color .13s;
}
.x:hover { color: var(--txt); }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; color: var(--sub); margin-bottom: 7px; letter-spacing: .3px; }
.field label em { color: var(--danger); font-style: normal; margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; height: var(--h-ctl); padding: 0 11px; border: 1px solid var(--line);
  border-radius: 9px; outline: none; background: #fff; transition: border-color .13s, box-shadow .13s;
}
.field textarea { height: auto; min-height: 76px; padding: 9px 11px; line-height: 1.6; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(23, 50, 79, .08);
}
.field input:disabled, .field select:disabled { background: #f7f9fb; color: var(--sub); }

/* ---------- 详情 ---------- */
.detail-row {
  display: flex; padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 13px;
}
.detail-row:last-child { border-bottom: 0; }
.detail-row .lbl { width: 112px; flex: 0 0 112px; color: var(--sub); font-size: 12.5px; }
.detail-row .val { flex: 1; word-break: break-all; }

/* ---------- 时间轴 ---------- */
.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: ''; position: absolute; left: 4px; top: 8px; bottom: 8px; width: 1px; background: var(--line);
}
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -18px; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: #fff; border: 2px solid var(--navy-2);
  box-shadow: 0 0 0 3px #fff;
}
.tl-meta { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; letter-spacing: .3px; }
.tl-body { font-size: 13px; white-space: pre-wrap; word-break: break-word; line-height: 1.7; }

/* ---------- 冲突风险 ---------- */
.risk-high { border-left: 3px solid var(--danger); }
.risk-medium { border-left: 3px solid var(--warn); }
.risk-low { border-left: 3px solid var(--navy-2); }
.risk-none { border-left: 3px solid var(--ok); }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center; color: var(--muted); padding: 40px 16px 44px; font-size: 13px;
  line-height: 1.9;
}
/* 空状态给一枚淡描线的纸页图标，比一行灰字显得是设计过的状态，而不是漏了内容 */
.empty::before {
  content: ''; display: block; width: 34px; height: 34px; margin: 0 auto 12px;
  background: currentColor; opacity: .22;
  -webkit-mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h7.5L19 8.5V21H6z'/%3E%3Cpath d='M13.2 3v5.6H19'/%3E%3Cpath d='M9 13h7'/%3E%3Cpath d='M9 16.6h4.6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h7.5L19 8.5V21H6z'/%3E%3Cpath d='M13.2 3v5.6H19'/%3E%3Cpath d='M9 13h7'/%3E%3Cpath d='M9 16.6h4.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* 弹窗里的空状态不需要图标，太挤 */
.modal .empty::before, .mini .empty::before { display: none; }

/* ---------- 分页 ---------- */
.pager {
  display: flex; gap: 10px; align-items: center; justify-content: flex-end;
  padding: 13px 20px; font-size: 12.5px; color: var(--sub); border-top: 1px solid var(--line-2);
}
.pager button {
  height: 30px; padding: 0 12px; border: 1px solid var(--line); background: #fff;
  border-radius: 7px; cursor: pointer; font-size: 12.5px;
}
.pager button:disabled { opacity: .42; cursor: default; }

/* ---------- 提示条 ---------- */
#toast {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%);
  background: var(--ink-800); color: #fff; padding: 11px 22px; border-radius: 10px;
  font-size: 13px; z-index: 200; box-shadow: var(--sh-2); max-width: 86vw;
  animation: toastIn .18s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, -8px) } to { opacity: 1; transform: translate(-50%, 0) } }
#toast.bad { background: var(--danger); }

/* ---------- AI 审查正文 ---------- */
.ai-review { font-size: 13.5px; line-height: 1.85; }
.ai-review h1, .ai-review h2, .ai-review h3 {
  font-size: 14px; margin: 18px 0 8px; color: var(--ink-900); letter-spacing: .2px;
}
.ai-review h1:first-child, .ai-review h2:first-child, .ai-review h3:first-child { margin-top: 0; }
.ai-review ul, .ai-review ol { padding-left: 20px; margin: 8px 0; }
.ai-review li { margin-bottom: 5px; }
.ai-review p { margin: 8px 0; }
.ai-review strong { color: var(--ink-900); }

/* ---------- 工具类（替代内联样式，保证间距一致） ---------- */
.mt-0 { margin-top: 0 } .mt-8 { margin-top: 8px } .mt-12 { margin-top: 12px }
.mt-16 { margin-top: 16px } .mt-20 { margin-top: 20px }
.mb-0 { margin-bottom: 0 } .mb-8 { margin-bottom: 8px } .mb-12 { margin-bottom: 12px }
.mb-14 { margin-bottom: 14px } .mb-16 { margin-bottom: 16px } .mb-20 { margin-bottom: 20px }
.muted { color: var(--sub) } .dim { color: var(--muted) }
.tiny { font-size: 11.5px } .small { font-size: 12.5px }
.ok-t { color: var(--ok) } .warn-t { color: var(--warn) } .danger-t { color: var(--danger) }
.nowrap { white-space: nowrap } .flex1 { flex: 1 } .spacer { flex: 1 }
.hair { border-top: 1px solid var(--line-2) }
.rowf { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.stack { display: flex; gap: 6px; flex-direction: column }
.scroll-box { overflow: auto; max-height: 70vh }
.sec-label {
  font-size: 12px; font-weight: 600; color: var(--sub);
  letter-spacing: .8px; margin: 22px 0 10px;
}
.sec-label:first-child { margin-top: 0; }
.notice {
  font-size: 12.5px; line-height: 1.75; padding: 10px 13px; border-radius: 8px;
  background: var(--info-bg); color: var(--navy-2);
}
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.danger { background: var(--danger-bg); color: var(--danger); }
.ptr { cursor: pointer }
.mt-12 { margin-top: 12px }
.flush { margin: 0 }
.g1 { grid-template-columns: 1fr }
.note { font-size: 12px; color: var(--sub); line-height: 1.7 }
.danger-600 { color: var(--danger); font-weight: 600 }
.num-lg { font-size: 22px; font-weight: 700; letter-spacing: -.2px }
.prose { font-size: 13px; line-height: 2 }
.plain { font-weight: 400; font-size: 13px }
.actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap }
.facts { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 10px }
.foot-note {
  border-top: 1px solid var(--line-2); margin-top: 14px; padding-top: 12px;
  font-size: 12px; color: var(--sub);
}
.t-sub { font-size: 12.5px; color: var(--sub) }
.t-danger-s { font-size: 12.5px; color: var(--danger) }
.t-warn { font-size: 12.5px; color: var(--warn) }
.muted-fw { font-weight: 400; color: var(--sub) }
.alert-warn {
  background: #fdf7ec; border: 1px solid #f3e2c0; border-radius: 8px;
  padding: 12px 14px; font-size: 12.5px; line-height: 1.8; color: #7a5a18;
}
.panel-note {
  background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; font-size: 12.5px; line-height: 1.8; color: #33445c;
}
.modal-act {
  border-top: 1px solid var(--line-2); display: flex; gap: 8px;
  justify-content: flex-end; padding-top: 14px; margin-top: 18px;
}
/* 可点击的表格行统一给手型，避免每行写一次内联样式 */
tbody tr.ptr:hover { background: #f5f8fc; }
tbody tr.ptr td:first-child { position: relative; }

/* ---------- 卷宗 ---------- */
.docs-split { display: grid; grid-template-columns: 330px 1fr; gap: var(--sp-4); align-items: start; }
.docs-left { position: sticky; top: 12px; }
.doc-case {
  padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer;
  border-left: 3px solid transparent; transition: background .12s, border-color .12s;
}
.doc-case:hover { background: #f8fafd; }
.doc-case.on { background: #f0f5fb; border-left-color: var(--navy); }
.doc-case .dc-no {
  font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .3px;
}
.doc-case .dc-t { font-size: 13.5px; font-weight: 600; margin: 4px 0 7px; line-height: 1.45; color: var(--ink-900); }
.doc-case .dc-m { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-case .dc-no2 { font-size: 11px; color: var(--sub); }
tr.doc-grp td {
  background: #f7f9fc; font-weight: 600; font-size: 12px; color: var(--navy);
  padding: 8px 14px; letter-spacing: .5px;
}
.btn-xs { padding: 0 9px; }

/* ---------- 流程 ---------- */
.fl-bar { height: 7px; border-radius: 6px; background: #eef1f6; overflow: hidden; }
.fl-bar-in {
  height: 100%; border-radius: 6px; transition: width .35s ease;
  background: linear-gradient(90deg, var(--navy-2), #3d6a99);
}
.fl-stats { display: flex; gap: 18px; font-size: 12.5px; color: var(--sub); margin-top: 12px; align-items: center; }
.fl-phase {
  font-size: 11.5px; font-weight: 700; color: var(--navy); background: #f2f6fb;
  padding: 7px 12px; border-radius: 7px; margin: 18px 0 4px; letter-spacing: .8px;
}
.fl-phase:first-child { margin-top: 0; }
.fl-node {
  display: flex; gap: 13px; padding: 13px 6px; border-bottom: 1px solid var(--line-2);
  align-items: flex-start;
}
.fl-node:last-child { border-bottom: 0; }
.fl-node.done .fl-nt { color: var(--muted); text-decoration: line-through; }
.fl-node.late { background: #fffaf9; }
.fl-nc { padding-top: 2px; }
.fl-nc input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--navy); }
.fl-nb { flex: 1; min-width: 0; }
.fl-nt { font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--ink-900); }
.fl-nm { font-size: 12px; color: var(--sub); margin-top: 4px; }
.fl-ck { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--sub); line-height: 1.9; }
.fl-ck li::marker { color: #c3cddb; }
.fl-out { font-size: 11.5px; color: var(--navy-2); margin-top: 7px; }
.fl-na { white-space: nowrap; }
.fl-lb { font-size: 12px; color: var(--sub); display: block; margin-bottom: 7px; letter-spacing: .3px; }

.et-row {
  display: grid; grid-template-columns: 30px 1fr 84px; gap: 12px;
  padding: 14px 0; border-bottom: 1px dashed var(--line); align-items: start;
}
.et-row:last-child { border-bottom: 0; }
.et-no {
  font-size: 11.5px; color: var(--muted); padding-top: 9px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.et-f { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.et-f input, .et-f select {
  height: 32px; padding: 0 9px; font-size: 12.5px; border: 1px solid var(--line);
  border-radius: 7px; outline: none; background: #fff;
}
.et-f input:focus, .et-f select:focus { border-color: var(--navy-2); }
.et-f input[data-f=title] { flex: 1; min-width: 170px; font-weight: 600; }
.et-wd { font-size: 11.5px; color: var(--muted); }
.et-f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 7px; }
.et-f2 textarea {
  font-size: 12px; padding: 8px 10px; line-height: 1.7; resize: vertical;
  border: 1px solid var(--line); border-radius: 7px; outline: none;
}
.et-f2 textarea:focus { border-color: var(--navy-2); }
.et-act { display: flex; flex-direction: column; gap: 4px; }

.mobile-bar { display: none; }
.only-sm { display: none; }

/* ---------- 记录页（案件详情） ---------- */
/* 成熟产品都不把一条记录塞进弹窗：记录页有抬头、有标签页、有侧栏事实卡。
   弹窗只留给"新建/编辑"这类短表单。 */
.rec-head {
  display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap;
  padding: 22px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px;
}
.rec-back {
  width: 32px; height: 32px; flex: 0 0 32px; margin-top: 3px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  color: var(--sub); cursor: pointer; transition: color .13s, border-color .13s, background .13s;
}
.rec-back:hover { color: var(--ink-900); border-color: #c6d0dd; background: #fbfcfd; }
.rec-back svg { width: 16px; height: 16px; }
.rec-hm { flex: 1; min-width: 0; }
.rec-hm h2 {
  font-size: 19px; margin: 0; font-weight: 700; color: var(--ink-900);
  line-height: 1.35; letter-spacing: .2px; word-break: break-word;
}
.rec-chips {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px; font-size: 12.5px; color: var(--sub);
}
.rec-chips .dot { width: 3px; height: 3px; border-radius: 50%; background: #c2ccd9; }
.rec-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }

/* 标签页：下划线式，不用分段控件——分段控件是"筛数据"，标签页是"切区块" */
.tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line);
  margin-bottom: 18px; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: 9px 13px 11px; border: 0; background: none;
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--sub);
  cursor: pointer; white-space: nowrap; transition: color .13s;
}
.tab:hover { color: var(--ink-800); }
.tab.on { color: var(--ink-900); font-weight: 600; }
.tab.on::after {
  content: ''; position: absolute; left: 11px; right: 11px; bottom: -1px; height: 2px;
  background: var(--navy); border-radius: 2px 2px 0 0;
}
.tab em {
  font-style: normal; margin-left: 6px; font-size: 10.5px; font-weight: 600;
  color: var(--sub); background: #eef1f6; padding: 1px 5px; border-radius: 5px;
}
.tab.on em { background: #e5edf7; color: var(--navy-2); }

.rec-grid {
  display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(272px, 1fr);
  gap: var(--sp-4); align-items: start;
}
.rec-grid > div { min-width: 0; }

/* 事实行：左标签右值，虚线下分隔，密度比表格松、比表单紧 */
.fact-row {
  display: flex; gap: 12px; padding: 9px 0;
  border-bottom: 1px dashed var(--line-2); font-size: 12.5px;
}
.fact-row:last-child { border-bottom: 0; }
.fact-row .lbl { width: 88px; flex: 0 0 88px; color: var(--sub); }
.fact-row .val { flex: 1; min-width: 0; color: var(--ink-800); word-break: break-word; }

/* 记录页里的小号输入框（日期等） */
.inp-sm {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--txt); outline: none; font-size: 13px;
  transition: border-color .13s, box-shadow .13s;
}
.inp-sm:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(23, 50, 79, .08); }

/* 列表页顶部的结果说明行 */
.list-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 0 2px 10px; font-size: 12.5px; color: var(--sub);
}
.list-meta b { color: var(--ink-900); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 窄屏 / 平板 ---------- */
@media (max-width: 1180px) {
  .dash-grid { grid-template-columns: 1fr; }
  .rec-grid { grid-template-columns: 1fr; }
}

/* ---------- 手机 ---------- */
@media (max-width: 820px) {
  /* 手机上顶栏在最上，导航条紧随其后横向滑动；两者都吸顶 */
  .body { flex-direction: column; }
  aside {
    width: 100%; flex: none; height: auto; z-index: 30;
    flex-direction: row; align-items: center; overflow-x: auto; overflow-y: hidden; padding: 0;
  }
  nav { padding: 0; }
  nav { display: flex; padding: 0; flex: 1 1 auto; min-width: 0; overflow-x: auto; }
  nav .nav-group { display: none; }
  /* 每一项按内容宽度撑开并可横向滑动，避免被压成两个字宽后截断 */
  nav a {
    flex: 0 0 auto; padding: 13px 12px; margin: 0; border-radius: 0;
    white-space: nowrap; font-size: 13px; gap: 0;
  }
  nav a svg { display: none; }
  nav a b.nb { margin-left: 5px; }
  nav a.on { background: rgba(255, 255, 255, .12); box-shadow: inset 0 -2px 0 var(--gold); }
  nav a.on::before { display: none; }

  /* 顶栏瘦身：只留搜索 + 三个操作，标题让位 */
  .topbar { height: 48px; flex-basis: 48px; padding: 0 10px; gap: 8px; }
  .tb-brand {
    width: auto; flex: 0 0 auto; padding-left: 2px; box-shadow: none; gap: 7px;
  }
  /* 手机上品牌只留标志，把宽度让给搜索框 */
  .tb-brand b { display: none; }
  .tb-brand { padding-left: 0; }
  .tb-burger, .tb-title { display: none; }
  .tb-search { max-width: none; flex: 1 1 auto; margin: 0; }
  .tb-search input { height: 32px; padding-right: 12px; font-size: 13px; }
  #gsKbd { display: none; }
  .tb-act { gap: 2px; }
  .tb-new .btn.pri { height: 32px; padding: 0 10px; }
  .tb-new .btn.pri span { display: none; }
  .tb-user { padding: 0; height: 32px; margin-left: 0; }
  .tb-user .tu-tx, .tb-user .tu-caret { display: none; }
  .tb-ico { width: 32px; height: 32px; flex-basis: 32px; }
  .gs-drop { top: 39px; left: -6px; right: -6px; }

  main { padding: 16px 14px 48px; }
  .page-head { padding: 14px 0 12px; margin-bottom: 14px; }
  .page-head h2 { font-size: 18px; }
  .rec-head { padding: 16px 0 12px; gap: 8px; }
  .rec-hm h2 { font-size: 16.5px; }
  .rec-acts { width: 100%; }
  .rec-acts .btn { flex: 1 1 auto; }
  .fact-row .lbl { width: 76px; flex-basis: 76px; }
  .tab { padding: 9px 10px 10px; font-size: 12.5px; }
  .stats.pri .stat:first-child .v { font-size: 24px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px 14px; }
  .stat .v { font-size: 21px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal-f { padding: 12px 16px; }
  .modal-b { padding: 16px; }
  .docs-split { grid-template-columns: 1fr; }
  .docs-left { position: static; }
  .tbl-list { table-layout: fixed; width: 100%; }
  .tbl-list th, .tbl-list td { overflow: hidden; text-overflow: ellipsis; }
  /* 手机端表格只留"名称 + 一个状态列"，名称列要多给宽度，否则三个字就换行 */
  .tbl-list th:nth-child(2), .tbl-list td:nth-child(2) { white-space: normal; width: 68%; }
  .et-row { grid-template-columns: 22px 1fr; }
  .et-act { flex-direction: row; grid-column: 2; }
  .et-f2 { grid-template-columns: 1fr; }
  .fl-stats { flex-wrap: wrap; gap: 10px; }
  /* 窄屏下取消工作台表格的固定列宽，交给内容自适应 */
  .tbl-dash th:first-child, .tbl-dash td:first-child,
  .tbl-dash th:nth-child(3), .tbl-dash td:nth-child(3),
  .tbl-dash th:last-child, .tbl-dash td:last-child { width: auto; }
  /* 只剩两列时，阶段列按"咨询/立案前"这档最长标签定宽，名称列吃掉剩下的宽度 */
  .tbl-dash th:nth-child(3), .tbl-dash td:nth-child(3) { width: 108px; }
  .tbl-dash td .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .hide-sm { display: none !important; }
  .only-sm { display: block; }
  .login-card { padding: 32px 24px 26px; }
  .login-logo { width: 168px; margin-bottom: 14px; }
  table { font-size: 13px; }
  th, td { padding: 11px 10px; }
}
