/* ============================================================================
 * 华鸣AI法务通 · Web 桌面版 · law.css
 * 2026-11-13  v3 —— 对话页严格复刻云课堂管理端「对话」页
 *
 * 云课堂基准（2026-11-13 实测 #adm-assistant）：
 *   .chat-shell{display:flex;height:calc(100vh-190px);background:#F7F8FB;
 *               border:1px solid var(--c-line);border-radius:12px;overflow:hidden;position:relative}
 *     .chat-mid{width:240px;flex:0 0 240px;background:linear-gradient(180deg,#FFF,#FCFBFE);
 *               border-right:1px solid var(--c-line);display:flex;flex-direction:column}
 *       .chat-mid-h{padding:14px 14px 8px;border-bottom:1px solid #F1F3F7;
 *                   font-size:var(--fs-1);color:var(--c-dim);font-weight:700;letter-spacing:.05em}
 *       .chat-job-list{flex:1;overflow-y:auto;padding:2px 8px 8px}
 *       .chat-job{display:flex;gap:9px;padding:8px 9px;border-radius:12px;cursor:pointer}
 *       .chat-job.on{background:var(--c-brand-soft)}
 *       .chat-job-av{width:26px;height:26px;border-radius:50%;flex:0 0 26px}
 *       .chat-job-t b{font-size:var(--fs-2);font-weight:600;line-height:1.4}
 *       .chat-job-t i{font-size:11.5px;color:var(--c-dim);line-height:1.5;margin-top:2px}
 *     .chat-main{flex:1;min-width:0;display:flex;flex-direction:column;background:#fff}
 *       .chat-head{height:50px;padding:0 16px;gap:12px;border-bottom:1px solid var(--c-line)}
 *       .chat-body{flex:1;overflow-y:auto;padding:18px 18px 10px;display:flex;
 *                  flex-direction:column;gap:12px;background:linear-gradient(180deg,#FBFCFE,#F7F8FB)}
 *       .asst-msg{max-width:min(760px,86%);border-radius:12px;padding:12px 14px;
 *                 font-size:var(--fs-2);line-height:1.85}
 *       .asst-msg.ai{align-self:flex-start;background:#fff;border:1px solid var(--c-line)}
 *       .asst-msg.me{align-self:flex-end;background:var(--c-brand);color:#fff}
 *       .chat-foot{border-top:1px solid var(--c-line);padding:10px 14px;background:#fff}
 *       .chat-input-wrap{display:flex;align-items:flex-end;gap:8px;background:#fff;
 *                        border:1px solid var(--c-line);border-radius:14px;padding:5px 6px 5px 12px}
 *       .chat-input-wrap textarea{flex:1;border:0;font-size:var(--fs-3);line-height:1.6}
 *
 * 铁律：类名、结构、字号、间距全部照抄，不自己发明。
 * ========================================================================== */

/* ============================ 0. 品牌默认色 ============================ */
:root{
  /* 2026-11-13 老板：默认主题色 = 藏青 #1E3A8A（原品牌紫 #660874 改为预设色之一） */
  --c-brand:#1E3A8A;
  --c-brand-d:#1A3175;
  --c-brand-soft:#EAF0FA;
  --c-brand-rgb:30,58,138;
  --c-brand-ring:rgba(30,58,138,.18);
  /* 2026-11-14 选中态统一 token（浅色底用了深色，浅底上深色文字）
     深色模式下整组在下方 [data-mode=dark] 里重新定义，避免各处写死颜色打架 */
  --c-on-bg:var(--c-brand-soft);
  --c-on-fg:var(--c-brand);
  --c-on-bd:var(--c-brand-ring);
  /* 表单控件统一高度（2026-11-14 UI 一致性：原来 28/32/34/35/38 五种混用） */
  --law-ctl-h:34px;
  --law-ctl-h-sm:28px;
  --law-topbar-h:52px;
  --law-side-w:172px;
}

/* ============================ 1. body（云课堂做法） ============================ */
/* 云课堂：html:not(.auth-ready) #appPage{display:none!important} → html 必须带 auth-ready */
html{height:100%}
body{
  padding-top:var(--law-topbar-h);
  overflow:hidden;
  background:var(--c-bg);
  height:100vh;
}

/* ============================ 2. 顶栏（fixed，纯色 52px） ============================ */
.topbar{
  position:fixed;top:0;left:0;right:0;
  height:var(--law-topbar-h);
  padding:0 18px;
  display:flex;align-items:center;gap:10px;
  background:var(--c-brand);
  color:#fff;
  border-bottom:1px solid rgba(255,255,255,.14);
  box-shadow:0 1px 2px rgba(16,24,40,.06);
  z-index:90;
}
.topbar .brand{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:600;line-height:1.35;color:#fff;text-decoration:none;flex:0 0 auto}
.topbar .brand:hover{text-decoration:none;opacity:.94}
.topbar .b-logo{width:32px;height:32px;border-radius:9px;background:#fff;object-fit:contain;flex:0 0 auto}
.topbar .b-txt{display:flex;align-items:center;gap:8px;white-space:nowrap}
.topbar .b-ver{font-size:var(--fs-1);font-weight:700;background:rgba(255,255,255,.22);border:1px solid rgba(255,255,255,.5);border-radius:14px;padding:2px 10px;line-height:1.5}
.topbar .spacer{flex:1}
.topbar .user{display:flex;align-items:center;gap:10px;font-size:var(--fs-2);color:rgba(255,255,255,.96);flex:0 0 auto}
.tb-btn{display:flex;align-items:center;justify-content:center;gap:5px;padding:6px 10px;border:none;border-radius:8px;background:transparent;color:#fff;font-size:var(--fs-2);font-weight:500;cursor:pointer;position:relative;transition:background .15s}
.tb-btn:hover{background:rgba(255,255,255,.18)}
.tb-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tb-btn .dot{position:absolute;top:2px;right:2px;min-width:15px;height:15px;padding:0 4px;border-radius:999px;background:#DC2626;color:#fff;font-size:10px;line-height:15px;text-align:center;font-weight:800}
.tb-av{width:30px;height:30px;border-radius:50%;object-fit:cover;border:2px solid rgba(255,255,255,.45);background:rgba(255,255,255,.2);cursor:pointer}
.law-top-search{display:flex;align-items:center;gap:6px;height:30px;padding:0 12px;border-radius:15px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.24);max-width:300px;flex:1 1 auto;min-width:120px;transition:background .15s}
.law-top-search:focus-within{background:rgba(255,255,255,.24)}
.law-top-search svg{width:14px;height:14px;stroke:rgba(255,255,255,.85);fill:none;stroke-width:2;flex:0 0 auto}
.law-top-search input{flex:1;min-width:0;border:none;background:transparent;outline:none;color:#fff;font-size:var(--fs-2);height:100%}
.law-top-search input::placeholder{color:rgba(255,255,255,.7)}

/* ============================ 3. 布局骨架 ============================ */
/* .wrap 在云课堂有 max-width:1280px+padding，靠 #appPage .wrap !important 覆盖 */
html body #appPage > .wrap{
  max-width:none!important;margin:0!important;padding:0!important;
  display:flex!important;height:calc(100vh - var(--law-topbar-h))!important;overflow:hidden!important;
}
.tea-layout{display:flex;flex:1;gap:10px;min-width:0;height:100%}

/* 侧栏：flex 子项（云课堂 app.css 会设 sticky，改回 static） */
html body #appPage .tea-side{
  flex:0 0 var(--law-side-w)!important;width:var(--law-side-w)!important;height:100%!important;
  padding:8px 8px 10px!important;background:#fff;
  border-right:1px solid var(--c-line);
  overflow-y:auto;overflow-x:hidden;display:block;
  border-radius:0;box-shadow:none;position:static!important;top:auto!important;
}
.tea-menu{display:block;padding:0;margin:0}
/* .tea-menu-item 云课堂多次覆盖（min-height:40px/padding:10px），管理端真实是 5px 9px + min-height:0 */
html body #appPage .tea-menu-item{
  display:flex;align-items:center;gap:7px;
  padding:5px 9px!important;margin:0 0 1px!important;min-height:0!important;
  border-radius:0 8px 8px 0;font-size:var(--fs-2);font-weight:600;line-height:1.35;
  color:var(--c-ink2);cursor:pointer;text-decoration:none;white-space:nowrap;
  border-left:3px solid transparent;transition:background .12s,color .12s;
}
html body #appPage .tea-menu-item:hover{background:#F6F8FB;color:var(--c-ink);text-decoration:none}
/* 2026-11-14：未认证用户的律师专属菜单 —— 置灰 + 锁，但仍可点（点了引导去认证，不是死按钮） */
html body #appPage .tea-menu-item.is-locked{opacity:.55;cursor:pointer}
html body #appPage .tea-menu-item.is-locked:hover{opacity:.8;background:#F6F8FB;color:var(--c-ink)}
html body #appPage .tea-menu-item.is-locked .mtx{font-weight:500}
html[data-mode="dark"] body #appPage .tea-menu-item.is-locked:hover{background:var(--c-hover);color:var(--c-ink)}
html body #appPage .tea-menu-item.active{background-color:var(--c-on-bg)!important;color:var(--c-on-fg)!important;border-left-color:var(--c-brand)}
html body #appPage .tea-menu-item.active .mtx{color:var(--c-on-fg)!important}
/* 2026-11-14 修：选中项图标改用品牌色（不变白），与文字同色系，深色下也不糊 */
html body #appPage .tea-menu-item.active svg{stroke:var(--c-on-fg);fill:none}
.tea-menu-item svg{width:15px;height:15px;flex:0 0 auto;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tea-menu-item .mtx{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.tea-menu-item .cnt{font-size:10px;min-width:16px;height:16px;line-height:16px;padding:0 4px;border-radius:999px;background:#DC2626;color:#fff;text-align:center;font-weight:800}
.tea-grp{padding:9px 9px 3px;font-size:10.5px;font-weight:800;letter-spacing:.8px;color:var(--c-dim)}
.tea-side-foot{margin-top:10px;padding:8px 1px 2px;border-top:1px solid var(--c-line)}

/* 主区 */
html body #appPage .tea-main{
  flex:1!important;min-width:0;height:100%!important;
  padding:14px 0 0!important;overflow-y:auto!important;background:transparent;
}
/* 对话页铺满（云课堂 .chat-full 做法） */
html body #appPage .tea-main.chat-full{padding:0!important;overflow:hidden!important}

/* 页头 */
.page-h{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px;flex-wrap:wrap}
.page-h h1{margin:0;font-size:var(--fs-6);font-weight:900;color:var(--c-ink);line-height:1.35;border:none;padding:0}
.page-h .sub{font-size:var(--fs-2);color:var(--c-dim);margin-top:4px}
.page-h .acts{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.law-pane{padding:0 14px 20px 0}
.law-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}

/* ============================================================================
 * 4. 对话页 —— 严格复刻云课堂 .chat-shell 三栏
 * ============================================================================ */
html body #appPage .chat-full{height:100%;display:flex}

.chat-shell{
  display:flex;
  flex:1;
  height:100%;
  background:#F7F8FB;
  border-radius:0;
  overflow:hidden;
  position:relative;
  border:none;
}

/* ---------- 左栏：岗位（.chat-mid） ---------- */
.chat-mid{
  width:240px;flex:0 0 240px;
  background:linear-gradient(180deg,#FFFFFF 0%,#FCFBFE 100%);
  border-right:1px solid var(--c-line);
  display:flex;flex-direction:column;
  overflow:hidden;
}
.chat-mid-h{
  display:flex;align-items:center;gap:8px;
  padding:14px 14px 8px;
  border-bottom:1px solid #F1F3F7;
  margin-bottom:4px;
  font-size:var(--fs-1);color:var(--c-dim);font-weight:700;letter-spacing:.05em;
}
.chat-job-list{flex:1;overflow-y:auto;padding:2px 8px 8px}
.chat-job-list::-webkit-scrollbar{width:7px}
.chat-job-list::-webkit-scrollbar-thumb{background:#D5DBE3;border-radius:8px}
.chat-job{
  display:flex;gap:9px;align-items:flex-start;
  padding:8px 9px;border-radius:12px;
  cursor:pointer;margin-bottom:2px;
  position:relative;
  transition:background .12s;
}
.chat-job:hover{background:#F4F6FA}
.chat-job.on{background:var(--c-brand-soft)}
.chat-job-av{
  width:26px;height:26px;border-radius:50%;
  flex:0 0 26px;object-fit:cover;
  background:#EEF1F6;
  display:flex;align-items:center;justify-content:center;
  font-size:13px;
  box-shadow:0 0 0 1px rgba(16,24,40,.06);
}
.chat-job.on .chat-job-av{box-shadow:0 0 0 2px var(--c-brand-ring)}
.chat-job-t{min-width:0;flex:1}
.chat-job-t b{display:block;font-size:var(--fs-2);font-weight:600;color:var(--c-ink);line-height:1.4}
.chat-job.on .chat-job-t b{color:var(--c-brand)}
.chat-job-t i{
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  font-size:11.5px;color:var(--c-dim);font-style:normal;line-height:1.5;margin-top:2px;
}
.chat-job-sep{
  margin:12px 0 6px;padding-left:10px;
  font-size:11.5px;font-weight:700;color:var(--c-dim);
}
.chat-mid-f{padding:8px 10px 10px;border-top:1px solid var(--c-line)}

/* ---------- 中栏：对话（.chat-main） ---------- */
.chat-main{
  flex:1;min-width:0;
  display:flex;flex-direction:column;
  background:#fff;
}
/* 云课堂 section{padding:20px 20px 16px} 会渗透到 .chat-main，必须清掉 */
html body #appPage .chat-main{
  padding:0!important;
  border:none!important;
  box-shadow:none!important;
  margin:0!important;
  border-radius:0!important;
}
html body #appPage .chat-mid{padding:0!important;border-top:none!important;border-bottom:none!important;border-left:none!important;box-shadow:none!important;margin:0!important}
.chat-head{
  height:50px;padding:0 16px;gap:12px;
  display:flex;align-items:center;flex-wrap:nowrap;
  border-bottom:1px solid var(--c-line);
  background:#fff;box-shadow:none;
  flex:0 0 auto;
}
.chat-head .chat-ava{
  width:32px;height:32px;border-radius:50%;flex:0 0 32px;object-fit:cover;
  background:var(--c-brand-soft);color:var(--c-brand);
  display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;
  box-shadow:0 0 0 2px var(--c-brand-ring);
}
.chat-who{min-width:0}
.chat-who b{display:block;font-size:var(--fs-2);font-weight:700;color:var(--c-ink);line-height:1.4}
.chat-who span{display:block;font-size:11.5px;color:var(--c-dim);line-height:1.4;margin-top:1px}
.chat-head .spacer{flex:1}
.chat-head .tb-btn{background:transparent;color:var(--c-dim);font-size:var(--fs-2);padding:6px 10px;border-radius:8px}
.chat-head .tb-btn:hover{background:var(--c-brand-soft);color:var(--c-brand)}

.chat-body{
  flex:1;overflow-y:auto;
  padding:18px 18px 10px;
  display:flex;flex-direction:column;gap:12px;
  background:linear-gradient(180deg,#FBFCFE 0%,#F7F8FB 100%);
}
/* 气泡：用 id 级选择器锁定（云课堂 .asst-msg 有多处覆盖，含 .asst-msg.me 等） */
#appPage #asstLog .asst-msg{
  max-width:min(760px,86%)!important;
  border-radius:12px!important;
  padding:12px 14px!important;
  font-size:var(--fs-2)!important;
  line-height:1.85!important;
  word-break:break-word;
  white-space:normal;
}
#appPage #asstLog .asst-msg.ai{
  align-self:flex-start!important;
  background-color:var(--c-surface)!important;
  background-image:none!important;
  border:1px solid var(--c-line)!important;
  color:var(--c-ink)!important;
}
#appPage #asstLog .asst-msg.me{
  align-self:flex-end!important;
  background-color:var(--c-brand)!important;
  background-image:none!important;
  border:none!important;
  color:#fff!important;
}
#appPage #asstLog .asst-msg.pending{color:var(--c-dim)!important}
#appPage #asstLog .asst-msg .md-body{white-space:normal}
#appPage #asstLog .asst-msg > div:not(.md-body):not(.asst-msg-f){white-space:pre-wrap}
#appPage #asstLog .asst-msg-f{
  display:flex;gap:8px;margin-top:10px;padding-top:10px;
  border-top:1px solid #F1F3F5;flex-wrap:wrap;
}

/* 空状态（.asst-empty，云课堂原生类） */
.asst-empty{
  margin:auto;text-align:center;padding:26px 20px;max-width:440px;
  display:flex;flex-direction:column;align-items:center;
}
.asst-empty-av{
  width:56px;height:56px;border-radius:50%;object-fit:cover;margin-bottom:12px;
  background:var(--c-brand-soft);color:var(--c-brand);
  display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;
}
.asst-empty b{display:block;font-size:var(--fs-4);font-weight:800;color:var(--c-ink);margin-bottom:4px}
.asst-empty p{margin:0;font-size:var(--fs-2);color:var(--c-dim);line-height:1.7}
.asst-empty-tips{
  margin-top:16px;font-size:var(--fs-2);color:var(--c-dim);line-height:2;
  text-align:left;background:#F7F8FB;border:1px solid var(--c-line);
  border-radius:10px;padding:12px 14px;
}

/* 底部输入（.chat-foot + .chat-input-wrap） */
.chat-foot{
  border-top:1px solid var(--c-line);
  padding:10px 14px;
  background:#fff;
  flex:0 0 auto;
}
.chat-input-wrap{
  display:flex;align-items:flex-end;gap:8px;
  background:#fff;border:1px solid var(--c-line);
  border-radius:14px;padding:5px 6px 5px 12px;
  box-shadow:0 1px 2px rgba(16,24,40,.04);
  transition:border-color .14s,box-shadow .14s;
}
.chat-input-wrap:focus-within{
  border-color:var(--c-brand);
  box-shadow:0 0 0 3px rgba(var(--c-brand-rgb),.12);
}
.chat-input-wrap textarea{
  flex:1;border:0;outline:0;resize:none;
  font-size:var(--fs-3);line-height:1.6;
  max-height:140px;padding:7px 0;
  font-family:inherit;background:transparent;color:var(--c-ink);
}
.chat-input-wrap textarea::placeholder{color:#9AA6B5}
.chat-attach{
  width:32px;height:32px;flex:0 0 32px;
  display:flex;align-items:center;justify-content:center;
  border:none;background:transparent;color:var(--c-dim);
  border-radius:8px;cursor:pointer;
  transition:background .12s,color .12s;
}
.chat-attach:hover{background:var(--c-brand-soft);color:var(--c-brand)}
.chat-mic{
  width:32px;height:32px;flex:0 0 32px;
  display:flex;align-items:center;justify-content:center;
  border:none;background:transparent;color:var(--c-dim);
  border-radius:8px;cursor:pointer;
  transition:background .12s,color .12s;
}
.chat-mic:hover{background:var(--c-brand-soft);color:var(--c-brand)}
.chat-mic.rec{background:linear-gradient(135deg,#d3453a,#b0332a);color:#fff}
@keyframes lawPulse{0%,100%{opacity:1}50%{opacity:.62}}
.chat-send{
  height:32px;padding:0 16px;flex:0 0 auto;
  border:none;border-radius:10px;cursor:pointer;
  background:var(--c-brand);color:#fff;
  font-size:var(--fs-2);font-weight:600;
  transition:opacity .12s;
}
.chat-send:hover{opacity:.88}
.chat-send:disabled{opacity:.5;cursor:not-allowed}

/* 阶段提示 / 来源标注 */
.law-stage{
  display:inline-flex;align-items:center;gap:6px;
  padding:4px 10px;border-radius:999px;
  background:var(--c-brand-soft);color:var(--c-brand);
  font-size:11.5px;font-weight:600;margin-bottom:8px;
}
.law-stage .sp{
  width:9px;height:9px;border:2px solid var(--c-brand-ring);
  border-top-color:var(--c-brand);border-radius:50%;
  animation:lawSpin .7s linear infinite;
}
@keyframes lawSpin{to{transform:rotate(360deg)}}
.law-typing::after{content:"▋";animation:lawBlink 1s step-end infinite;margin-left:2px;color:var(--c-brand)}
@keyframes lawBlink{50%{opacity:0}}
.law-src{
  display:inline-flex;align-items:center;gap:4px;
  padding:1px 7px;border-radius:999px;
  background:var(--c-brand-soft);color:var(--c-brand);font-size:11px;font-weight:700;
}

/* ============================ 5. 登录页 ============================ */
.law-login{
  min-height:100vh;display:grid;grid-template-columns:1fr 460px;
  background:var(--c-bg);
  margin-top:calc(var(--law-topbar-h) * -1);
  padding-top:var(--law-topbar-h);
  /* 2026-11-14：内容不要撑到 1000px+，居中收在 1080px 内更精致 */
  max-width:1180px;margin-left:auto;margin-right:auto;
}
/* 2026-11-14 老板：登录页重做 —— 精致 / 简约 / 专业。深蓝品牌区 + 白卡表单 + 署名 */
.law-login .l-hero{
  background:linear-gradient(155deg,var(--c-brand) 0%,#16295E 55%,#0F1E45 100%);
  color:#fff;padding:56px 64px;display:flex;flex-direction:column;justify-content:center;
  position:relative;overflow:hidden;border-radius:0
}
/* 两层柔和光晕，替代原来单个硬边圆，观感更高级 */
.law-login .l-hero::before{
  content:"";position:absolute;right:-120px;top:-120px;width:420px;height:420px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.13) 0%,rgba(255,255,255,0) 68%);pointer-events:none
}
.law-login .l-hero::after{
  content:"";position:absolute;left:-140px;bottom:-180px;width:460px;height:460px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.08) 0%,rgba(255,255,255,0) 70%);pointer-events:none
}
.law-login .l-hero > *{position:relative;z-index:1}

/* 品牌锁版：方形 logo + 名称 + 口号 */
/* 2026-11-14 老板：背景少量圆形/线条修饰 —— 克制、不干扰文字
   全部用 ::before/::after 与内联 SVG 背景，零图片请求 */
.law-login .lh-deco{position:absolute;inset:0;pointer-events:none;z-index:0;overflow:hidden}
/* 2026-11-14 老板：圆环太显眼，去掉。改为极淡的同心弧光（几乎不可见的空气感），不构成"图形" */
.law-login .lh-deco::before{
  content:"";position:absolute;right:-160px;top:50%;transform:translateY(-50%);
  width:520px;height:520px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,255,255,.055) 0%,rgba(255,255,255,.018) 46%,rgba(255,255,255,0) 70%);
  border:none;box-shadow:none;
}
.law-login .lh-deco::after{
  content:"";position:absolute;right:44px;top:calc(50% + 188px);
  width:96px;height:1px;background:rgba(255,255,255,.10);
  box-shadow:0 -18px 0 rgba(255,255,255,.06), 0 18px 0 rgba(255,255,255,.04);
}
/* 左上角一组细斜线（呼应"结构/秩序"），极低对比 */
.law-login .l-hero .lh-deco .lh-lines{
  position:absolute;left:-40px;bottom:-10px;width:240px;height:240px;opacity:.38;
  background:
    repeating-linear-gradient(48deg, rgba(255,255,255,.065) 0 1px, transparent 1px 30px);
  transform:rotate(-6deg);
}
.law-login .lh-brand{display:flex;align-items:center;gap:14px}
.law-login .l-hero .lh-logo{
  width:52px;height:52px;border-radius:14px;background:#fff;display:grid;place-items:center;
  font-size:25px;color:var(--c-brand);font-weight:900;flex:0 0 52px;
  box-shadow:0 6px 20px rgba(0,0,0,.18);letter-spacing:0
}
.law-login .lh-bt{min-width:0}
.law-login .lh-name{
  font-size:22px;font-weight:800;letter-spacing:.6px;line-height:1.25;color:#fff
}
.law-login .lh-slogan{
  font-size:var(--fs-3);color:rgba(255,255,255,.80);margin-top:3px;letter-spacing:.5px;line-height:1.5
}
/* 分隔线：细、低对比，起"呼吸"作用 */
.law-login .lh-rule{
  height:1px;background:rgba(255,255,255,.16);margin:30px 0 26px;max-width:330px
}
.law-login .l-hero .lh-lead{
  font-size:var(--fs-4);color:rgba(255,255,255,.88);line-height:1.85;max-width:400px
}
.law-login .l-hero .lh-list{margin-top:26px;display:flex;flex-direction:column;gap:11px;
  font-size:var(--fs-3);color:rgba(255,255,255,.92)}
/* 署名固定在品牌区底部 */
.law-login .lh-pb{
  margin-top:44px;font-size:11.5px;color:rgba(255,255,255,.62);letter-spacing:.4px
}  /* .52 时 4.81:1（勉强过），提到 .62 → 5.9:1 更易读 */
.law-login .l-hero .lh-list div{display:flex;align-items:center;gap:9px}
.law-login .l-hero .lh-list svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.law-login .l-panel{background:#fff;display:flex;align-items:center;justify-content:center;padding:40px 34px;border-left:1px solid var(--c-line)}
.law-login .l-form{width:100%;max-width:330px}
.law-login .l-form h2{margin:0 0 6px;font-size:var(--fs-6);color:var(--c-ink);font-weight:900}
.law-login .l-form .lf-sub{font-size:var(--fs-2);color:var(--c-dim);margin-bottom:22px}
.law-login .l-form .btn{width:100%;height:40px;font-size:var(--fs-4);margin-top:2px;display:flex;align-items:center;justify-content:center}
.law-login .l-form .lf-foot{margin-top:16px;text-align:center;font-size:var(--fs-2);color:var(--c-dim)}
.law-login .l-form .lf-foot a{margin:0 5px}
/* ===== 2026-11-14 老板：注册勾选用户协议 ===== */
.law-login .reg-agree{
  display:flex;align-items:flex-start;gap:8px;
  font-size:12px;color:var(--c-dim);line-height:1.65;
  margin:2px 0 14px;cursor:pointer;user-select:none
}
.law-login .reg-agree input[type=checkbox]{
  width:15px;height:15px;min-width:15px;flex:0 0 15px;margin:2px 0 0;padding:0;
  accent-color:var(--c-brand);cursor:pointer
}
.law-login .reg-agree a{color:var(--c-brand);text-decoration:none;font-weight:600}
.law-login .reg-agree a:hover{text-decoration:underline}
/* 未勾选被拦下时的高亮 */
.law-login .reg-agree.warn{color:#C0392B}
.law-login .reg-agree.warn input[type=checkbox]{
  outline:2px solid rgba(192,57,43,.45);outline-offset:2px;border-radius:3px
}
html[data-mode="dark"] body .law-login .reg-agree.warn{color:#F1948A}

/* ===== 2026-11-14 老板：注册页身份选择（普通用户 / 律师），高级感 ===== */
.law-login .reg-role{margin:0 0 20px}
.law-login .rr-label{
  font-size:var(--fs-2);color:var(--c-dim);font-weight:700;letter-spacing:.4px;
  margin:0 0 7px;text-transform:none
}
.law-login .rr-row{display:grid;grid-template-columns:1fr 1fr;gap:9px}
/* 2026-11-14 老板：去掉说明文字 → 横排「图标 + 名称」，高度压到 44px */
.law-login .rr-card{
  position:relative;display:flex;align-items:center;justify-content:center;gap:8px;
  height:44px;padding:0 12px;border:1.5px solid var(--c-line);border-radius:12px;
  background:#fff;cursor:pointer;text-align:center;font-family:inherit;
  transition:border-color .18s,box-shadow .18s,background .18s,transform .12s;
  -webkit-tap-highlight-color:transparent
}
.law-login .rr-card .rr-nm{font-size:var(--fs-3);color:var(--c-ink);font-weight:800;line-height:1;white-space:nowrap}
.law-login .rr-card:hover{border-color:color-mix(in srgb,var(--c-brand) 34%,var(--c-line));
  box-shadow:0 3px 14px rgba(var(--c-brand-rgb),.07)}
.law-login .rr-card:active{transform:scale(.985)}
/* 图标底座：浅品牌底 + 圆角，选中后反转成实色 */
.law-login .rr-card .rr-ic{
  width:24px;height:24px;flex:0 0 24px;border-radius:7px;padding:3.5px;box-sizing:border-box;
  background:var(--c-brand-soft);color:var(--c-brand);
  transition:background .18s,color .18s;
  /* 2026-11-14 修：之前漏了描边属性，SVG 默认 fill:black/stroke:none，
     symbol 里全是无填充路径 → 天平完全画不出来。必须写全。 */
  stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round
}
/* 图标内部符号也要继承（<use> 的实例不总是继承父级 svg 的表现属性） */
.law-login .rr-card .rr-ic use,.law-login .rr-card .rr-ic svg{
  stroke:currentColor;fill:none;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round
}
.law-login .rr-tx{min-width:0;display:flex;flex-direction:column;gap:2px}
.law-login .rr-tx b{font-size:var(--fs-3);color:var(--c-ink);font-weight:800;line-height:1.35}
.law-login .rr-tx span{font-size:11.5px;color:var(--c-dim);line-height:1.45}
/* 选中态：品牌描边 + 微光 + 右上角勾 */
.law-login .rr-card.on{
  border-color:var(--c-brand);
  background:color-mix(in srgb,var(--c-brand) 4%,#fff);
  box-shadow:0 0 0 3px var(--c-brand-ring),0 4px 16px rgba(var(--c-brand-rgb),.10)
}
.law-login .rr-card.on .rr-ic{background:var(--c-brand);color:#fff}
.law-login .rr-card.on .rr-nm{color:var(--c-brand)}
.law-login .rr-card.on::after{
  content:"";position:absolute;top:5px;right:6px;width:13px;height:13px;border-radius:50%;
  background:var(--c-brand) url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/9px 9px no-repeat
}
.law-login .rr-hint{
  font-size:11.5px;color:var(--c-dim);line-height:1.6;margin-top:9px;
  padding-left:1px
}
/* 深色模式：卡片底跟随主题 */
html[data-mode="dark"] body .law-login .rr-card{background:var(--c-card);border-color:var(--c-line)}
html[data-mode="dark"] body .law-login .rr-card.on{background:color-mix(in srgb,var(--c-brand) 18%,var(--c-card))}
html[data-mode="dark"] body .law-login .rr-card .rr-ic{background:var(--c-brand-soft);color:var(--c-on-fg)}
html[data-mode="dark"] body .law-login .rr-card.on .rr-ic{background:var(--c-brand-d);color:#fff}
/* 深色下品牌深蓝压不住底（1.67:1），选中态文字统一换亮色 token */
html[data-mode="dark"] body .law-login .rr-card.on .rr-nm{color:var(--c-on-fg)}
html[data-mode="dark"] body .law-login .rr-card.on::after{background-color:var(--c-brand-d)}

/* 署名（窄屏兜底）：桌面宽屏时品牌区已显示，隐藏这份避免重复 */
.law-login .l-form .lf-pb{
  display:none;margin-top:28px;padding-top:14px;text-align:center;
  font-size:11px;color:var(--c-dim);letter-spacing:.3px;border-top:1px solid var(--c-line)
}

/* ============================ 6. 响应式 ============================ */
/* 2026-11-14：品牌区变窄时同比缩小背景修饰，避免压制文字 */
@media (max-width:1199px){
  .law-login .lh-deco::before{width:400px;height:400px;right:-140px}
  .law-login .lh-deco::after{width:84px;right:30px;top:calc(50% + 150px)}
  .law-login .l-hero .lh-deco .lh-lines{width:190px;height:190px;opacity:.4}
}
@media (max-width:1199px){
  .chat-mid{width:200px;flex:0 0 200px}
}
@media (max-width:980px){
  :root{--law-side-w:56px}
  .tea-side{padding:8px 5px 10px}
  .tea-menu-item{justify-content:center;padding:8px 4px!important;border-radius:8px;border-left:none}
  .tea-menu-item .mtx,.tea-menu-item .cnt{display:none}
  .tea-grp{text-align:center;padding:8px 0 3px;font-size:9px;letter-spacing:0;overflow:hidden}
  .tea-side-foot{display:none}
}
@media (max-width:768px){
  body{overflow:auto;height:auto}
  .wrap{height:auto!important;min-height:calc(100vh - var(--law-topbar-h));overflow:visible!important}
  .tea-layout{display:block}
  .tea-side{flex:none!important;width:auto!important;height:auto!important;display:flex!important;gap:4px;overflow-x:auto;padding:6px 8px!important;border-right:none;border-bottom:1px solid var(--c-line)}
  .tea-menu{display:flex;gap:4px}
  .tea-menu-item{white-space:nowrap;padding:7px 10px!important;border-radius:8px;border-left:none}
  .tea-menu-item .mtx{display:block}
  .tea-grp,.tea-side-foot{display:none}
  .tea-main{height:auto!important;overflow:visible!important;padding:12px 10px 24px!important}
  .law-pane{padding:0}
  .chat-shell{height:calc(100vh - var(--law-topbar-h) - 60px);flex-direction:column}
  .chat-mid{width:auto;flex:0 0 auto;border-right:none;border-bottom:1px solid var(--c-line)}
  .chat-job-list{display:flex;gap:6px;overflow-x:auto;padding:6px 8px}
  .chat-job{flex:0 0 auto;width:auto;margin-bottom:0}
  .law-login{grid-template-columns:1fr}
  /* 2026-11-14：窄屏不要直接隐藏品牌区（会丢掉名称/口号/署名），
     改为收成顶部紧凑品牌条；只隐藏次要的介绍与特性列表 */
  .law-login .l-hero{
    display:flex;padding:26px 22px 24px;justify-content:flex-start;
    background:linear-gradient(155deg,var(--c-brand) 0%,#16295E 100%)
  }
  .law-login .l-hero .lh-rule,
  .law-login .l-hero .lh-lead,
  .law-login .l-hero .lh-list,
  .law-login .l-hero .lh-pb{display:none}
  .law-login .lh-name{font-size:19px}
  .law-login .l-hero .lh-logo{width:44px;height:44px;flex:0 0 44px;font-size:21px;border-radius:12px}
  .law-login .l-panel{padding:26px 22px 34px;border-left:none}
  /* 品牌区下方的署名重新显示（品牌区里的那份已隐藏） */
  .law-login .l-form .lf-pb{display:block}
  .topbar{padding:0 12px}
  .topbar .b-ver,.law-top-search{display:none}
}

/* ============================ 7. 通用两列（窄屏自动堆叠） ============================ */
.law-two-col{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}

/* ============================================================================
 * 8. UI 统一层 V1（2026-11-13 秋秋 · 视觉规范落地）
 *    依据：《华鸣AI法务通 Web 视觉规范 V1》
 *    原则：主色只用于「关键动作 / 当前态 / 焦点环」；卡片 1px 描边无阴影；
 *          零 emoji 图标；表格浅灰表头；圆角三档；间距 8px 基准。
 *    方法：edu-base.css 是云课堂复用的 238KB 带 !important 的死库，这里用
 *          「同等或更高特异性 + 必要 !important」做覆盖，不改源文件。
 * ========================================================================== */

/* ---------------------------- 8.0 设计令牌 ---------------------------- */
:root{
  --c-bg-soft:#F3F4F6;      /* 表头 / 禁用底 / 骨架底 */
  --c-hover:#F6F7F9;        /* 行 hover / 列表 hover */
  --c-line-2:#D8DDE4;       /* 强描边（hover） */
  --fs-xs:11.5px;
  --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px; --sp-6:24px;
  --law-radius-btn:8px;
  --law-focus:0 0 0 3px var(--c-brand-ring);
}

/* 数字统一等宽，避免列表数字跳动 */
.adm-kpi-lg-num,.adm-kpi-sm-num,.law-num,.tbl td.num,.kpi-num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}

/* 全局焦点可见（键盘可达） */
html body #appPage a:focus-visible,
html body #appPage button:focus-visible,
html body #appPage .tab:focus-visible,
html body #appPage .tea-menu-item:focus-visible,
html body #appPage input:focus-visible,
html body #appPage select:focus-visible,
html body #appPage textarea:focus-visible{
  outline:none;box-shadow:var(--law-focus);
}

/* ---------------------------- 8.1 按钮（四型 × 两档） ---------------------------- */
html body #appPage .btn{
  display:inline-flex!important;align-items:center;justify-content:center;gap:6px;
  height:34px!important;min-height:34px!important;padding:0 16px!important;
  border:1px solid var(--c-brand)!important;border-radius:var(--law-radius-btn)!important;
  background-color:var(--c-brand)!important;background-image:none!important;
  color:#fff!important;font-size:var(--fs-2)!important;font-weight:600!important;
  line-height:1!important;letter-spacing:.2px;
  cursor:pointer;text-decoration:none;
  box-shadow:none!important;
  transition:background .15s,border-color .15s,color .15s,box-shadow .15s;
}
html body #appPage .btn:hover{background-color:var(--c-brand-d)!important;border-color:var(--c-brand-d)!important;opacity:1!important;transform:none!important}
html body #appPage .btn:active{transform:none!important;box-shadow:inset 0 1px 2px rgba(16,24,40,.12)!important}
html body #appPage .btn:disabled,
html body #appPage .btn[aria-disabled="true"]{background-color:var(--c-bg-soft)!important;border-color:var(--c-line)!important;color:var(--c-dim)!important;cursor:not-allowed!important;box-shadow:none!important}

html body #appPage .btn.sm{height:28px!important;min-height:28px!important;padding:0 10px!important;font-size:var(--fs-1)!important;border-radius:7px!important}

/* ghost：白底 + 中性描边，hover 才显品牌 */
html body #appPage .btn.ghost{background:#fff!important;border-color:var(--c-line)!important;color:var(--c-ink2)!important}
html body #appPage .btn.ghost:hover{background-color:var(--c-brand-soft)!important;border-color:var(--c-brand)!important;color:var(--c-brand)!important}

/* danger：浅红底红字，不做满色块 */
html body #appPage .btn.danger{background:#FEF2F2!important;border-color:#FECACA!important;color:var(--c-err)!important}
html body #appPage .btn.danger:hover{background:#FEE2E2!important;border-color:#FCA5A5!important;color:#B91C1C!important}

/* 仅图标按钮 */
html body #appPage .btn.ic{padding:0!important;width:34px;flex:0 0 34px}
html body #appPage .btn.ic.sm{width:28px;flex:0 0 28px}
html body #appPage .btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}

/* 顶栏按钮统一（已存在，补焦点与触控高） */
html body #appPage .tb-btn{height:32px;min-height:32px!important;border-radius:8px!important;font-weight:500!important}
html body #appPage .tb-btn:focus-visible{box-shadow:0 0 0 3px rgba(255,255,255,.45)}

/* 登录页自带按钮（.lf-submit / 直接 button）没有 focus 环，补一条兜底 */
html body #appPage .law-login button:focus-visible,
html body #appPage .law-login input:focus-visible,
html body #appPage .law-login a:focus-visible{
  outline:2px solid var(--c-brand)!important;outline-offset:2px!important;
}

/* ---------------------------- 8.2 表单控件 ---------------------------- */
html body #appPage input[type=text],html body #appPage input[type=password],
html body #appPage input[type=number],html body #appPage input[type=email],
html body #appPage input[type=date],html body #appPage input[type=search],
html body #appPage input[type=tel],html body #appPage input[type=url],
html body #appPage input:not([type]),html body #appPage select{
  border:1px solid var(--c-line)!important;border-radius:var(--law-radius-btn)!important;
  background:#fff;color:var(--c-ink);font-size:var(--fs-2);font-family:inherit;
  /* 2026-11-14 UI 一致性：单行控件统一高 34px（原来 28/32/34/35/38 五种）；
     窄屏幕、紧凑筛选条用 .law-ctl-sm 降到 28px */
  height:var(--law-ctl-h);min-height:var(--law-ctl-h);
  padding:0 10px;margin:0;transition:border-color .14s,box-shadow .14s;
  box-sizing:border-box;
}
/* 多行文本域不限高，保留内边距 */
html body #appPage textarea{
  border:1px solid var(--c-line)!important;border-radius:var(--law-radius-btn)!important;
  background:#fff;color:var(--c-ink);font-size:var(--fs-2);font-family:inherit;
  padding:8px 10px;margin:0;transition:border-color .14s,box-shadow .14s;
  box-sizing:border-box;min-height:72px;
}
/* ============================================================
 * 2026-11-14 法条检索结果（命中内容是 Markdown 片段，需压成内联样式）
 *   `## 五、工伤认定` 原本会渲染成 h2，把表格行撑开 → 这里全部压小压平
 * ============================================================ */
html body #appPage .law-law-tbl td.law-law-hit{font-size:13px;line-height:1.75;vertical-align:top}
html body #appPage .law-law-tbl td.law-law-hit > h1,
html body #appPage .law-law-tbl td.law-law-hit > h2,
html body #appPage .law-law-tbl td.law-law-hit > h3,
html body #appPage .law-law-tbl td.law-law-hit > h4{
  font-size:13px!important;font-weight:800;margin:0!important;padding:0!important;
  line-height:1.75!important;color:var(--c-ink);border:0!important;display:inline;
}
html body #appPage .law-law-tbl td.law-law-hit > blockquote{
  margin:0!important;padding:0 0 0 8px!important;border-left:2px solid var(--c-line-2)!important;
  color:var(--c-ink2);font-size:12.5px;line-height:1.75;
}
html body #appPage .law-law-tbl td.law-law-hit > p{margin:0!important}
html body #appPage .law-law-tbl td.law-law-hit > pre{
  margin:0!important;padding:6px 8px!important;font-size:12px;white-space:pre-wrap;
}
html body #appPage .law-law-tbl td.law-law-hit strong{color:var(--c-ink);font-weight:800}
html body #appPage .law-law-tbl td.law-law-hit code{
  background:var(--c-bg-soft);padding:0 5px;border-radius:4px;font-size:12px;color:var(--c-ink2);
}
html[data-mode="dark"] body #appPage .law-law-tbl td.law-law-hit code{background:#232A32;color:var(--c-ink2)}

/* ============================================================
 * 2026-11-14 P1 全文检索页（/search）
 * ============================================================ */
html body #appPage .fw-group{margin-bottom:12px}html body #appPage .fw-group .card-h{display:flex;align-items:center;gap:6px;padding:10px 14px}
html body #appPage .fw-group .card-h svg{width:15px;height:15px;stroke:var(--c-brand);fill:none;stroke-width:1.9}
html body #appPage .fw-list{display:flex;flex-direction:column}
html body #appPage .fw-item{padding:11px 14px;border-top:1px solid var(--c-line);cursor:pointer;transition:background .12s}
html body #appPage .fw-item:first-child{border-top:0}
html body #appPage .fw-item:hover{background:var(--c-hover)}
html body #appPage .fw-i-h{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
html body #appPage .fw-i-h b{font-size:13.5px;color:var(--c-ink);font-weight:700;line-height:1.5}
html body #appPage .fw-tag{font-size:11px;color:var(--c-dim);font-weight:600}
html body #appPage .fw-snip{margin-top:4px;font-size:12.5px;color:var(--c-ink2);line-height:1.75;word-break:break-all}
html body #appPage mark.fw-mark{background:rgba(250,204,21,.38);color:inherit;padding:0 1px;border-radius:3px;font-weight:700}
html[data-mode="dark"] body #appPage mark.fw-mark{background:rgba(250,204,21,.28);color:#FDE68A}
/* 顶部搜索下拉里的「去全文检索」入口 */
html body #appPage .ls-more{
  display:block;margin:6px 8px 8px;padding:8px 10px;border-radius:8px;
  background:var(--c-brand-soft);color:var(--c-brand);font-size:12.5px;font-weight:700;
  text-decoration:none;text-align:center;transition:background .13s;
}
html body #appPage .ls-more:hover{background:var(--c-brand);color:#fff;text-decoration:none}
html[data-mode="dark"] body #appPage .ls-more{background:var(--c-on-bg);color:var(--c-on-fg)}
html[data-mode="dark"] body #appPage .ls-more:hover{background:var(--c-brand);color:#fff}
/* 顶部搜索里的「还有 N 份未搜」提示项（2026-11-14） */
html body #appPage .ls-item.ls-hint-item{
  background:var(--c-bg-soft);border-left:3px solid var(--c-brand);
}
html body #appPage .ls-item.ls-hint-item .ls-t{color:var(--c-brand);font-weight:700}
html body #appPage .ls-item.ls-hint-item .ls-s{color:var(--c-ink2)}
html[data-mode="dark"] body #appPage .ls-item.ls-hint-item .ls-t{color:var(--c-on-fg)}

/* ============================================================
 * 2026-11-14 P2 合同版本比对（.diff-*）
 * ============================================================ */
html body #appPage .diff-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:12px}
@media (max-width:900px){html body #appPage .diff-grid{grid-template-columns:1fr}}
html body #appPage .diff-ta{height:auto!important;min-height:220px;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.5px;line-height:1.7;resize:vertical}
html body #appPage .df-file{display:block;margin-top:6px;font-size:12px;color:var(--c-dim)}
html body #appPage .df-file input{font-size:12px;margin-top:4px}
html body #appPage .diff-acts{display:flex;align-items:center;gap:16px;margin-top:16px;flex-wrap:nowrap}
/* 2026-11-14 老板：两个勾选项必须排在一行，不能折行 */
html body #appPage .df-ck{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--c-ink2);cursor:pointer;white-space:nowrap;flex:0 0 auto}
/* 2026-11-14 修：checkbox 宽度被全局 .input 规则撑成 68px/93px（等于整个 label 宽），
   导致勾选框与文字“看似分开、实际重叠”，间距也非常挤。这里显式锁死 14px。 */
html body #appPage .df-ck input[type=checkbox]{
  width:14px;height:14px;min-width:14px;flex:0 0 14px;margin:0;padding:0;
  accent-color:var(--c-brand);cursor:pointer;
}
/* 两个勾选项之间拉开距离（原来只有容器的 16px，且被 input 超宽吃掉） */
html body #appPage .df-ck + .df-ck{margin-left:8px}
/* 窄屏：按钮占一行，勾选项整体换到下一行但仍两两一行 */
@media (max-width:640px){
  html body #appPage .diff-acts{flex-wrap:wrap}
  html body #appPage .df-ck{flex:0 0 auto}
}
html body #appPage .df-stat{display:flex;gap:10px;flex-wrap:wrap;padding:10px 14px;border-bottom:1px solid var(--c-line)}
html body #appPage .df-s{font-size:12px;font-weight:700;padding:3px 10px;border-radius:999px;background:var(--c-bg-soft);color:var(--c-ink2)}
html body #appPage .df-s.df-add{background:#ECFDF5;color:#047857}
html body #appPage .df-s.df-del{background:#FEF2F2;color:#B91C1C}
html body #appPage .df-s.df-chg{background:#FFFBEB;color:#B45309}
html body #appPage .df-s.df-sim{background:var(--c-brand-soft);color:var(--c-brand)}
html[data-mode="dark"] body #appPage .df-s.df-add{background:#0C2B22;color:#6EE7B7}
html[data-mode="dark"] body #appPage .df-s.df-del{background:#2E1618;color:#FCA5A5}
html[data-mode="dark"] body #appPage .df-s.df-chg{background:#2E2210;color:#FCD34D}
html body #appPage .df-body{max-height:560px;overflow:auto;font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.5px;line-height:1.75}
html body #appPage .df-row{display:flex;align-items:flex-start;padding:1px 0;border-left:3px solid transparent}
html body #appPage .df-gutter{flex:0 0 22px;text-align:center;color:var(--c-ink2);user-select:none;font-weight:700}
html body #appPage .df-tx{flex:1;white-space:pre-wrap;word-break:break-all;padding-right:10px}
html body #appPage .df-row.df-same{color:var(--c-ink2)}
html body #appPage .df-row.df-add{background:#F0FDF4;border-left-color:#059669}
html body #appPage .df-row.df-add .df-tx{color:#065F46}
html body #appPage .df-row.df-del{background:#FEF2F2;border-left-color:#DC2626}
html body #appPage .df-row.df-del .df-tx{color:#991B1B;text-decoration:line-through;text-decoration-color:rgba(220,38,38,.4)}
html[data-mode="dark"] body #appPage .df-row.df-add{background:rgba(5,150,105,.14)}
html[data-mode="dark"] body #appPage .df-row.df-add .df-tx{color:#6EE7B7}
html[data-mode="dark"] body #appPage .df-row.df-del{background:rgba(220,38,38,.14)}
html[data-mode="dark"] body #appPage .df-row.df-del .df-tx{color:#FCA5A5}
html body #appPage .df-sum{padding:6px 14px 14px}
html body #appPage .df-sum-item{display:flex;gap:10px;padding:8px 0;border-bottom:1px dashed var(--c-line)}
html body #appPage .df-sum-n{flex:0 0 34px;font-size:11.5px;font-weight:800;color:var(--c-dim)}
html body #appPage .df-sum-b{flex:1;min-width:0;font-size:12.5px;line-height:1.7}
html body #appPage .df-sum-del{color:#B91C1C;text-decoration:line-through;text-decoration-color:rgba(220,38,38,.35);word-break:break-all}
html body #appPage .df-sum-add{color:#047857;word-break:break-all}
html[data-mode="dark"] body #appPage .df-sum-del{color:#FCA5A5}
html[data-mode="dark"] body #appPage .df-sum-add{color:#6EE7B7}

/* ============================================================
 * 2026-11-14 P2 类案检索（/cases/search）
 * ============================================================ */
/* 提示行：原来 .cf-tip 只定义在 .law-caseform 作用域下，
 * 类案检索页不在其中 → 提示字用了默认字号，偏大。这里补回小号。 */
html body #appPage .cf-tip{font-size:12px;color:var(--c-dim);line-height:1.6}
html body #appPage .sc-form .cf-tip{margin-top:6px}
/* 检索按钮右侧的辅助说明也压小一号 */
html body #appPage .sc-hint{font-size:11.5px;color:var(--c-dim);line-height:1.6}
html body #appPage .cs-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width:760px){html body #appPage .cs-form{grid-template-columns:1fr}}
html body #appPage .sc-links{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
@media (max-width:760px){html body #appPage .sc-links{grid-template-columns:1fr}}
html body #appPage .sc-link{
  display:flex;flex-direction:column;gap:3px;padding:11px 14px;border-radius:11px;
  border:1px solid var(--c-line);background:var(--c-surface);text-decoration:none;transition:border-color .14s,box-shadow .14s;
}
html body #appPage .sc-link:hover{border-color:var(--c-brand);box-shadow:0 3px 12px rgba(var(--c-brand-rgb),.12);text-decoration:none}
html body #appPage .sc-link b{font-size:13px;color:var(--c-brand);font-weight:700}
html body #appPage .sc-link span{font-size:11.5px;color:var(--c-dim)}
html body #appPage .sc-ai{max-height:640px;overflow:auto;font-size:13.5px;line-height:1.85}
html body #appPage .law-stage{color:var(--c-ink2)}
html body #appPage .sc-ai h2{font-size:15px;margin:16px 0 8px;padding-left:9px;border-left:3px solid var(--c-brand)}
html body #appPage .sc-ai h3{font-size:13.5px;margin:12px 0 6px;color:var(--c-brand)}
html body #appPage .sc-ai ul,html body #appPage .sc-ai ol{padding-left:22px}
html body #appPage .sc-ai blockquote{border-left:3px solid var(--c-line-2);margin:8px 0;padding:4px 12px;color:var(--c-ink2)}
html[data-mode="dark"] body #appPage .sc-link{background:var(--c-bg-soft)}
html[data-mode="dark"] body #appPage .sc-link b{color:var(--c-on-fg)}

/* ============================================================
 * 2026-11-14 P1 结案复盘统计（/cases/stats）
 * ============================================================ */
html body #appPage .law-grid-2{
  display:grid;grid-template-columns:1fr 1fr;gap:14px;
}
@media (max-width:900px){html body #appPage .law-grid-2{grid-template-columns:1fr}}
html body #appPage .cs-good .adm-kpi-lg-num{color:#059669!important}
html body #appPage .cs-good .adm-kpi-lg-ic{background-color:#D1FAE5!important;color:#047857!important}

/* 结果分布条 */
html body #appPage .cs-bar-row{display:flex;align-items:center;gap:10px;margin:9px 0;font-size:12.5px}
html body #appPage .cs-bar-k{flex:0 0 70px;color:var(--c-ink2);font-weight:600}
html body #appPage .cs-bar-track{flex:1;height:9px;border-radius:999px;background:var(--c-bg-soft);overflow:hidden}
html body #appPage .cs-bar-fill{display:block;height:100%;border-radius:999px;background:var(--c-brand);transition:width .3s}
html body #appPage .cs-bar-fill.cs-win{background:#059669}
html body #appPage .cs-bar-fill.cs-partial{background:#0EA5E9}
html body #appPage .cs-bar-fill.cs-settle{background:#F59E0B}
html body #appPage .cs-bar-fill.cs-lose{background:#DC2626}
html body #appPage .cs-bar-fill.cs-unknown{background:#9CA3AF}
html body #appPage .cs-bar-v{flex:0 0 96px;text-align:right;color:var(--c-dim);font-variant-numeric:tabular-nums}

/* 月度结案柱状 */
html body #appPage .cs-cols{display:flex;align-items:flex-end;gap:10px;height:130px;padding:10px 4px 0;overflow-x:auto}
html body #appPage .cs-col{flex:1 0 42px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:3px;height:100%}
html body #appPage .cs-col i{display:block;width:22px;border-radius:5px 5px 0 0;background:linear-gradient(180deg,var(--c-brand),color-mix(in srgb,var(--c-brand) 55%,#fff))}
html body #appPage .cs-col em{font-size:11px;font-style:normal;font-weight:700;color:var(--c-ink2)}
html body #appPage .cs-col b{font-size:10.5px;font-weight:600;color:var(--c-dim)}

/* 紧凑尺寸：筛选条搜索框、表格内联小框 */
html body #appPage .law-ctl-sm,input.law-ctl-sm,select.law-ctl-sm{
  height:var(--law-ctl-h-sm)!important;min-height:var(--law-ctl-h-sm)!important;font-size:var(--fs-xs)!important;
}
/* 校验失败态（2026-11-14）：工具计算器空值/非法值标红 */
html body #appPage input.is-invalid,html body #appPage select.is-invalid{
  border-color:#DC2626!important;box-shadow:0 0 0 3px rgba(220,38,38,.12)!important;
}
html body #appPage input:hover,html body #appPage select:hover,html body #appPage textarea:hover{border-color:var(--c-line-2)!important}
html body #appPage input:focus,html body #appPage select:focus,html body #appPage textarea:focus{
  outline:none!important;border-color:var(--c-brand)!important;box-shadow:var(--law-focus)!important;
}
html body #appPage input::placeholder,html body #appPage textarea::placeholder{color:#9AA3AE}
html body #appPage input:disabled,html body #appPage select:disabled,html body #appPage textarea:disabled{
  background-color:var(--c-bg-soft)!important;color:var(--c-dim)!important;cursor:not-allowed;
}
/* 保留对话输入框自带的内嵌样式，不被通用规则破坏 */
html body #appPage .chat-input-wrap textarea,
html body #appPage .law-top-search input{
  border:0!important;box-shadow:none!important;background:transparent!important;padding:7px 0!important;
}
html body #appPage .chat-input-wrap textarea:focus{box-shadow:none!important}
/* 表单行内联排 */
html body #appPage .law-form{display:grid;gap:12px}
html body #appPage .law-form-row{display:grid;grid-template-columns:120px 1fr;align-items:center;gap:12px;font-size:var(--fs-2)}
html body #appPage .law-form-row>label{color:var(--c-ink2);font-weight:600}

/* ---------------------------- 8.3 Tab（此前全站无样式，浏览器默认灰块） ---------------------------- */
html body #appPage .tabs{
  display:flex;flex-wrap:wrap;gap:2px;align-items:center;
  border-bottom:1px solid var(--c-line);margin:0 0 16px;padding:0;
}
html body #appPage .tab{
  appearance:none;-webkit-appearance:none;
  display:inline-flex!important;align-items:center;justify-content:center;gap:6px;
  height:34px;padding:0 12px!important;margin:0!important;
  border:0!important;border-bottom:2px solid transparent!important;border-radius:0!important;
  background:transparent!important;background-image:none!important;
  color:var(--c-ink2)!important;font-size:var(--fs-2)!important;font-weight:600;line-height:1;
  cursor:pointer;white-space:nowrap;box-shadow:none!important;transform:none!important;
  transition:color .13s,border-color .13s,background .13s;
}
html body #appPage .tab:hover{color:var(--c-ink)!important;background-color:var(--c-hover)!important}
html body #appPage .tab.on,html body #appPage .tab.active{
  color:var(--c-brand)!important;border-bottom-color:var(--c-brand)!important;
  background:transparent!important;font-weight:700;
}
html body #appPage .tab:disabled{color:#B6BCC5!important;cursor:not-allowed}
/* 子页签（页面内二级切换，用「胶囊」形态） */
html body #appPage .tabs.pill{border-bottom:0;gap:6px}
html body #appPage .tabs.pill .tab{border-radius:999px!important;border-bottom:0!important;height:30px;padding:0 13px!important;background-color:var(--c-bg-soft)!important}
html body #appPage .tabs.pill .tab.on{background-color:var(--c-on-bg)!important;color:var(--c-on-fg)!important}

/* ---------------------------- 8.4 卡片 / KPI / 区块标题 ---------------------------- */
html body #appPage .card,
html body #appPage .law-card{
  background-color:var(--c-surface)!important;
  border:1px solid var(--c-line)!important;border-radius:var(--r-card)!important;
  box-shadow:none!important;padding:16px!important;
  transition:box-shadow .16s,border-color .16s,transform .16s;
}
html body #appPage .card.hover:hover,
html body #appPage .law-card.hover:hover{
  box-shadow:0 6px 18px rgba(16,24,40,.08)!important;border-color:var(--c-line-2)!important;transform:translateY(-1px);
}
html body #appPage .card h3{color:var(--c-ink)!important;font-size:var(--fs-3)!important;font-weight:700!important;margin:0 0 6px!important}
html body #appPage .card p{color:var(--c-dim)!important;font-size:var(--fs-2)!important}

/* 卡片头（.card-h + .card-t）—— 全站统一 */
html body #appPage .card-h{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:0 0 10px;margin:0 0 10px;border-bottom:1px solid #F1F3F5;
}
html body #appPage .card-t{font-size:var(--fs-3);font-weight:700;color:var(--c-ink);letter-spacing:.1px}
html body #appPage .card-h .dim,html body #appPage .dim{font-size:var(--fs-1);color:var(--c-dim);font-weight:500}

/* KPI 大卡：14px 圆角 + 1px 描边，数字 tabular */
html body #appPage .adm-kpi-lg{
  border:1px solid var(--c-line)!important;border-radius:var(--r-card)!important;
  background-color:var(--c-surface)!important;box-shadow:none!important;
  padding:14px 16px!important;transition:box-shadow .16s,border-color .16s;
}
html body #appPage .adm-kpi-lg:hover{box-shadow:0 4px 14px rgba(16,24,40,.07)!important;border-color:var(--c-line-2)!important;transform:none!important}
/* 2026-11-14：非律师首页的「律师认证」引导卡（KPI 位置），整卡可点 */
html body #appPage .adm-kpi-lg.td-kpi-cta{cursor:pointer;border-style:dashed!important}
html body #appPage .adm-kpi-lg.td-kpi-cta:hover{border-color:var(--c-brand)!important;box-shadow:0 4px 14px rgba(var(--c-brand-rgb),.14)!important}
html body #appPage .adm-kpi-lg.td-kpi-cta .adm-kpi-lg-num{font-size:16px!important}
html[data-mode="dark"] body #appPage .adm-kpi-lg.td-kpi-cta:hover{border-color:var(--c-on-fg)!important}
html body #appPage .adm-kpi-lg-ic{border-radius:12px!important;background-color:var(--c-brand-soft)!important;color:var(--c-brand)!important}
html body #appPage .adm-kpi-lg-ic svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .adm-kpi-lg-num{color:var(--c-ink)!important;font-weight:800!important;letter-spacing:-.3px}
html body #appPage .adm-kpi-lg-label{color:var(--c-ink2)!important;font-weight:600!important}
html body #appPage .adm-kpi-lg-sub{color:var(--c-dim)!important}
/* KPI 小卡 */
html body #appPage .adm-kpi-sm{
  border:1px solid var(--c-line)!important;border-radius:11px!important;
  background-color:var(--c-surface)!important;box-shadow:none!important;padding:10px 12px!important;
}
html body #appPage .adm-kpi-sm:hover{box-shadow:0 4px 12px rgba(16,24,40,.06)!important;transform:none!important;border-color:var(--c-line-2)!important}
html body #appPage .adm-kpi-sm-top{color:var(--c-dim)!important;font-weight:600!important}
html body #appPage .adm-kpi-sm-num{color:var(--c-ink)!important;font-weight:800!important}

/* 区块小节标题（替代以内联 style 写的 15px/700 标题） */
html body #appPage .law-sec-h{
  display:flex;align-items:center;gap:8px;margin:18px 0 10px;
  font-size:var(--fs-3);font-weight:700;color:var(--c-ink);
}
html body #appPage .law-sec-h::before{
  content:"";width:3px;height:14px;border-radius:2px;background:var(--c-brand);flex:0 0 auto;
}

/* ---------------------------- 8.5 表格（浅灰表头，去深色块） ---------------------------- */
html body #appPage table{
  width:100%;border-collapse:separate!important;border-spacing:0;
  font-size:var(--fs-2);background:#fff;
  border:1px solid var(--c-line);border-radius:12px;overflow:hidden;
}
html body #appPage thead th,html body #appPage th{
  background-color:var(--c-bg-soft)!important;color:var(--c-ink2)!important;
  font-size:var(--fs-1)!important;font-weight:700!important;letter-spacing:.02em;
  text-align:left;padding:9px 12px!important;border:0!important;
  border-bottom:1px solid var(--c-line)!important;white-space:nowrap;
}
html body #appPage td{
  padding:11px 12px!important;border:0!important;
  border-bottom:1px solid #F1F3F5!important;color:var(--c-ink);vertical-align:middle;
}
html body #appPage tbody tr:last-child td{border-bottom:0!important}
html body #appPage tr:nth-child(even) td{background:transparent!important}
html body #appPage tbody tr:hover td{background-color:var(--c-hover)!important}
/* 表格外包一层可横向滚动，窄屏不撑破布局 */
html body #appPage .law-table-wrap{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:12px}

/* ---------------------------- 8.6 标签 / 提示 / 空状态 ---------------------------- */
html body #appPage .tag{
  display:inline-flex;align-items:center;gap:4px;
  height:20px;padding:0 8px;border-radius:999px;
  font-size:var(--fs-xs);font-weight:700;line-height:1;
  background:var(--c-bg-soft);color:var(--c-ink2);border:1px solid transparent;
}
html body #appPage .tag.navy{background:var(--c-on-bg);color:var(--c-on-fg)}
html body #appPage .tag.ok{background:#ECFDF5;color:#047857}
html body #appPage .tag.warn{background:#FFFBEB;color:#B45309}
html body #appPage .tag.err{background:#FEF2F2;color:#B91C1C}
html body #appPage .tag.info{background:#EFF6FF;color:#1D4ED8}

/* 提示条 */
html body #appPage .alert{
  display:flex;align-items:flex-start;gap:9px;
  padding:10px 12px;border-radius:10px;
  font-size:var(--fs-2);line-height:1.65;
  background:#F8FAFC;border:1px solid var(--c-line);color:var(--c-ink2);
}
html body #appPage .alert .a-ic{flex:0 0 auto;display:flex;margin-top:1px}
html body #appPage .alert .a-ic svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .alert .a-tx{flex:1;min-width:0}
html body #appPage .alert.error{background:#FEF2F2;border-color:#FECACA;color:#991B1B}
html body #appPage .alert.warn{background:#FFFBEB;border-color:#FDE68A;color:#92400E}
html body #appPage .alert.ok{background:#ECFDF5;border-color:#A7F3D0;color:#065F46}
html body #appPage .alert.info{background:#EFF6FF;border-color:#BFDBFE;color:#1E40AF}

/* 空状态：线性图标，不用 emoji */
html body #appPage .asst-empty{display:flex;flex-direction:column;align-items:center;text-align:center;padding:28px 20px}
html body #appPage .asst-empty-av{
  width:44px!important;height:44px!important;border-radius:12px!important;
  background-color:var(--c-bg-soft)!important;color:#94A3B8!important;
  display:flex;align-items:center;justify-content:center;margin-bottom:10px;
  font-size:0!important;
}
html body #appPage .asst-empty-av svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .asst-empty b{font-size:var(--fs-3)!important;font-weight:700!important;color:var(--c-ink)!important;margin-bottom:4px}
html body #appPage .asst-empty p{font-size:var(--fs-2)!important;color:var(--c-dim)!important;line-height:1.7;margin:0}

/* 全部通用图标（业务内联 svg） */
html body #appPage .law-ic{width:16px;height:16px;flex:0 0 auto;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;vertical-align:-3px}
html body #appPage .law-ic.lg{width:20px;height:20px}
html body #appPage .law-ic.xl{width:22px;height:22px}

/* ---------------------------- 8.7 页头 / 工具条 / 栅格 ---------------------------- */
html body #appPage .page-h{margin-bottom:16px!important;align-items:center}
html body #appPage .page-h h1{font-size:20px!important;font-weight:800!important;letter-spacing:-.2px!important;color:var(--c-ink)!important}
html body #appPage .page-h .sub{font-size:var(--fs-2)!important;color:var(--c-dim)!important;margin-top:3px}
html body #appPage .page-h .acts{gap:8px}
html body #appPage .law-pane{padding:18px 20px 24px 20px!important}

/* 页内工具条（搜索 + 筛选 + 右侧动作） */
html body #appPage .law-toolbar{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  background:#fff;border:1px solid var(--c-line);border-radius:12px;
  padding:10px 12px;margin-bottom:12px;
}
html body #appPage .law-toolbar .spacer{flex:1}

/* 栅格：8px 基准，最小卡宽 240 */
html body #appPage .grid-cards,html body #appPage .law-grid{
  display:grid!important;gap:12px!important;
  grid-template-columns:repeat(auto-fill,minmax(232px,1fr))!important;
}
html body #appPage .law-two-col{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(320px,1fr))!important;gap:12px!important}

/* 快捷入口卡：图标槽统一 34×34 浅底方块（原来直接放 emoji） */
html body #appPage .law-qk{
  display:flex!important;flex-direction:column;gap:2px;
  padding:14px!important;cursor:pointer;
}
html body #appPage .law-qk .qi{
  width:34px;height:34px;border-radius:10px;flex:0 0 34px;
  display:flex;align-items:center;justify-content:center;
  background:var(--c-brand-soft);color:var(--c-brand);margin-bottom:8px;
}
html body #appPage .law-qk .qi svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .law-qk b{font-size:var(--fs-2);font-weight:700;color:var(--c-ink)}
html body #appPage .law-qk i{font-size:var(--fs-xs);color:var(--c-dim);font-style:normal}
html body #appPage .law-qk:hover{border-color:var(--c-brand)!important}
html body #appPage .law-qk:hover .qi{background:var(--c-brand);color:#fff}

/* ---------------------------- 8.8 列表项 / 侧栏补强 ---------------------------- */
html body #appPage .law-list{display:flex;flex-direction:column}
html body #appPage .law-li{
  display:flex;align-items:center;gap:10px;padding:10px 2px;
  border-bottom:1px solid #F1F3F5;font-size:var(--fs-2);color:var(--c-ink);
}
html body #appPage .law-li:last-child{border-bottom:0}
html body #appPage .law-li:hover{background:var(--c-hover)}
html body #appPage .law-li .li-ic{flex:0 0 auto;color:var(--c-dim);display:flex}
html body #appPage .law-li .li-ic svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9}
html body #appPage .law-li .li-tx{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body #appPage .law-li .li-meta{flex:0 0 auto;font-size:var(--fs-xs);color:var(--c-dim)}

/* 侧栏底部「主题色」等辅助项与主菜单视觉分档 */
html body #appPage .tea-side-foot .tea-menu-item{color:var(--c-dim)!important;font-weight:500!important}
html body #appPage .tea-grp{color:#6B7280!important;letter-spacing:.6px!important}

/* ---------------------------- 8.9 骨架 / 加载 ---------------------------- */
.law-sk{background:linear-gradient(90deg,#F1F3F6 25%,#E9EDF2 37%,#F1F3F6 63%);background-size:400% 100%;animation:lawSk 1.2s ease infinite;border-radius:6px}
@keyframes lawSk{0%{background-position:100% 50%}100%{background-position:0 50%}}

/* ---------------------------- 8.10 无障碍 / 动效偏好 ---------------------------- */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media (prefers-reduced-motion:reduce){
  html body #appPage *,html body #appPage *::before,html body #appPage *::after{
    animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;
  }
}

/* ---------------------------- 8.11 三态页（锁 / 404 / 出错） ---------------------------- */
html body #appPage .state{
  border:1px solid var(--c-line)!important;border-style:solid!important;border-radius:var(--r-card)!important;
  background-color:var(--c-surface)!important;box-shadow:none!important;
  padding:34px 26px!important;text-align:center;
}
html body #appPage .state__ic{
  display:flex;align-items:center;justify-content:center;
  width:44px;height:44px;margin:0 auto 12px;border-radius:12px;
  background:var(--c-bg-soft);color:#94A3B8;opacity:1!important;font-size:0!important;
}
html body #appPage .state--error .state__ic{background:#FEF2F2;color:#B91C1C}
html body #appPage .state__t{font-size:var(--fs-4)!important;font-weight:700!important;color:var(--c-ink)!important}
html body #appPage .state__d{font-size:var(--fs-2)!important;color:var(--c-dim)!important;margin-top:6px;line-height:1.7}
html body #appPage .state__act{margin-top:16px;display:flex;gap:8px;justify-content:center;flex-wrap:wrap}

/* 表格容器（业务里用 .tbl-wrap / .law-table-wrap 都可） */
html body #appPage .tbl-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
html body #appPage .tbl-wrap>table{min-width:680px}

/* 主题色块等小控件触控尺寸 */
html body #appPage .theme-sw{min-width:28px;min-height:28px}


@media (max-width:1024px){
  html body #appPage .law-pane{padding:14px 14px 20px!important}
  html body #appPage .page-h h1{font-size:18px!important}
}
@media (max-width:768px){
  html body #appPage .grid-cards,html body #appPage .law-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))!important}
  html body #appPage table{font-size:var(--fs-1)}
}

/* ---------------------------- 8.12 emoji → SVG 图标统一（V1 收口） ---------------------------- */
/* 通用：任何带 data-ico 的元素，由 core.js 的 LAW.ico() 填入 SVG */
.law-i{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;line-height:1;color:inherit}
.law-i svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;display:block}
.law-i.md svg{width:18px;height:18px}
.law-i.lg svg{width:20px;height:20px}
.law-i.xl svg{width:22px;height:22px}
/* 提示条里的图标槽：语义色跟随所在 alert */
html body #appPage .alert .a-ic .law-i svg{width:16px;height:16px}
/* 空状态图标槽：不再吃 font-size（8.6 已处理），这里确保 SVG 居中 */
html body #appPage .asst-empty-av .law-i{width:100%;height:100%}
/* 工具卡 / 内容工厂卡的图标块 */
html body #appPage .law-tool-ic{
  width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;
  background:var(--c-brand-soft);color:var(--c-brand);margin-bottom:8px;flex:0 0 34px;
}
html body #appPage .law-tool-ic svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
/* 免责声明条：统一灰底小字，去掉 emoji */
html body #appPage .disclaimer{
  display:flex;align-items:flex-start;gap:8px;
  padding:10px 12px;border-radius:10px;
  background:var(--c-bg-soft);border:1px solid var(--c-line);
  font-size:var(--fs-1);color:var(--c-dim);line-height:1.7;
}
/* 2026-11-14：fs-1 在浅灰底上只有 4.39:1（差 0.11 到 AA）→ 改用 ink2 级 */
html body #appPage .disclaimer{color:var(--c-ink2)}
html body #appPage .disclaimer .law-i svg{width:15px;height:15px}
html body #appPage .disclaimer b{color:var(--c-ink2);font-weight:700}

/* ---------------------------- 8.13 主题面板定位修复 ---------------------------- */
/* 原 bug：面板 absolute 挂在 .tea-side 上（非定位祖先），y 跑到视口下方 908px 飘出屏幕，
   在 900 高的窗口里根本点不到。改成 fixed 贴左下，并限高可滚动。 */
html body #appPage .theme-pop{
  position:fixed!important;left:12px!important;bottom:12px!important;top:auto!important;right:auto!important;
  z-index:200!important;max-height:calc(100vh - 24px);overflow-y:auto;
}

/* ---------------------------- 8.13 顶栏搜索下拉 ---------------------------- */
html body #appPage .law-top-search{position:relative}
html body #appPage .law-search-pop{
  position:absolute;top:calc(100% + 8px);left:0;right:0;min-width:320px;
  background:var(--c-surface);border:1px solid var(--c-line);border-radius:12px;
  box-shadow:var(--sh-pop);padding:6px;z-index:120;
  max-height:min(60vh,420px);overflow-y:auto;text-align:left;
}
html body #appPage .law-search-pop .ls-grp{
  font-size:var(--fs-xs);font-weight:800;color:#9AA3AE;letter-spacing:.6px;
  padding:8px 10px 4px;
}
html body #appPage .law-search-pop .ls-item{
  display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;
  color:var(--c-ink);text-decoration:none;font-size:var(--fs-2);cursor:pointer;
}
html body #appPage .law-search-pop .ls-item:hover,
html body #appPage .law-search-pop .ls-item.on{background:var(--c-brand-soft);color:var(--c-brand);text-decoration:none}
html body #appPage .law-search-pop .ls-item .law-i{color:var(--c-dim)}
html body #appPage .law-search-pop .ls-item:hover .law-i,
html body #appPage .law-search-pop .ls-item.on .law-i{color:var(--c-brand)}
html body #appPage .law-search-pop .ls-t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body #appPage .law-search-pop .ls-s{flex:0 0 auto;font-size:var(--fs-xs);color:var(--c-dim);max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body #appPage .law-search-pop .ls-empty{
  display:flex;flex-direction:column;align-items:center;gap:4px;padding:22px 14px;text-align:center;color:var(--c-dim);
}
html body #appPage .law-search-pop .ls-empty b{font-size:var(--fs-2);color:var(--c-ink);font-weight:700}
html body #appPage .law-search-pop .ls-empty span{font-size:var(--fs-xs)}
html body #appPage .law-search-pop .ls-note{
  display:flex;align-items:center;gap:6px;margin:6px 4px 2px;padding:8px 10px;
  background:var(--c-bg-soft);border-radius:8px;font-size:var(--fs-xs);color:var(--c-dim);
}
/* 顶栏是品牌色底，输入框内的下拉需要脱离透明继承 */
html body #appPage .law-nav-search .law-search-pop{color:var(--c-ink)}

/* ============================================================================
 * 9. 深色模式（UI 统一层 V1 · 2026-11-13）
 *    入口：左下「主题色」面板 → 明暗模式（浅色 / 深色 / 跟随系统）
 *    html[data-mode="dark"] 由 theme.js 写入，localStorage 记忆。
 *    edu-base.css 的暗色规则是给云课堂写的，这里用更高特异性重写一遍法务通实际结构。
 * ========================================================================== */
html[data-mode="dark"]{
  --c-bg:#0F1216; --c-surface:#171B21; --c-ink:#E6E8EB; --c-ink2:#BFC5CC; --c-dim:#98A0AA;
  --c-line:#2A3038; --c-line-2:#3A424C;
  --c-bg-soft:#1E242C; --c-hover:#1B2129;
  --sh-card:0 1px 2px rgba(0,0,0,.4);
  --sh-pop:0 12px 32px rgba(0,0,0,.55);
  color-scheme:dark;
  /* 品牌浅色底在深色下要压暗，否则整块发亮 */
  --c-brand-soft:color-mix(in srgb, var(--c-brand) 26%, #12161B);
  /* 2026-11-14 选中态 token：深色下用「品牌色淡底 + 亮品牌色字」
     原来写死 #E9D5F0（紫调）导致藏青主题下字与底色亮度接近，对比度只有 1.16–1.81:1 */
  --c-on-bg:color-mix(in srgb, var(--c-brand) 34%, #12161B);
  --c-on-fg:#C7D2FE;
  --c-on-bd:rgba(199,210,254,.30);
}
html[data-mode="dark"] body{background:var(--c-bg);color:var(--c-ink)}

/* ---------- 外壳 ---------- */
html[data-mode="dark"] body #appPage .tea-side{background:var(--c-surface);border-right-color:var(--c-line)}
html[data-mode="dark"] body #appPage .tea-menu-item{color:var(--c-ink2)}
html[data-mode="dark"] body #appPage .tea-menu-item:hover{background:var(--c-hover);color:var(--c-ink)}
html[data-mode="dark"] body #appPage .tea-menu-item.active{background:var(--c-on-bg)!important;color:var(--c-on-fg)!important;border-left-color:var(--c-brand)}
/* 2026-11-14 修：.mtx 是菜单文字的实际载体，只给父级 .tea-menu-item 设色不够（被 inherited 规则抢） */
html[data-mode="dark"] body #appPage .tea-menu-item.active .mtx{color:var(--c-on-fg)!important}
html[data-mode="dark"] body #appPage .tea-menu-item.active svg{stroke:var(--c-on-fg)!important}
html[data-mode="dark"] body #appPage .tea-grp{color:#8B96A3!important}
html[data-mode="dark"] body #appPage .tea-side-foot{border-top-color:var(--c-line)}
/* 2026-11-14 回填：上一处编辑把它顶掉了，不影响视觉但保持完整 */
html[data-mode="dark"] body #appPage .tea-main{background:transparent}
html[data-mode="dark"] body #appPage .tab.on,html[data-mode="dark"] body #appPage .tab.active{
  color:var(--c-on-fg)!important;border-bottom-color:var(--c-on-fg)!important;
}

/* ---------- 卡片 / KPI / 表格 / 表单 ---------- */
html[data-mode="dark"] body #appPage .card,
html[data-mode="dark"] body #appPage .law-card,
html[data-mode="dark"] body #appPage .adm-kpi-lg,
html[data-mode="dark"] body #appPage .adm-kpi-sm,
html[data-mode="dark"] body #appPage .state,
html[data-mode="dark"] body #appPage .law-toolbar,
html[data-mode="dark"] body #appPage .law-search-pop{
  background:var(--c-surface)!important;border-color:var(--c-line)!important;
}
html[data-mode="dark"] body #appPage .card h3,
html[data-mode="dark"] body #appPage .card-t,
html[data-mode="dark"] body #appPage .page-h h1,
html[data-mode="dark"] body #appPage .adm-kpi-lg-num,
html[data-mode="dark"] body #appPage .adm-kpi-sm-num,
html[data-mode="dark"] body #appPage .law-sec-h{color:var(--c-ink)!important}
html[data-mode="dark"] body #appPage .adm-kpi-lg-ic,
html[data-mode="dark"] body #appPage .law-qk .qi,
html[data-mode="dark"] body #appPage .law-tool-ic{background:var(--c-brand-soft)!important;color:#D8B4E2!important}
html[data-mode="dark"] body #appPage .card-h{border-bottom-color:#232A32}
html[data-mode="dark"] body #appPage thead th,
html[data-mode="dark"] body #appPage th{background:#1E242C!important;color:var(--c-ink2)!important;border-bottom-color:var(--c-line)!important}
html[data-mode="dark"] body #appPage td{color:var(--c-ink2);border-bottom-color:#232A32!important}
html[data-mode="dark"] body #appPage table{background:var(--c-surface);border-color:var(--c-line)}
html[data-mode="dark"] body #appPage tbody tr:hover td{background:var(--c-hover)!important}
html[data-mode="dark"] body #appPage input[type=text],
html[data-mode="dark"] body #appPage input[type=password],
html[data-mode="dark"] body #appPage input[type=number],
html[data-mode="dark"] body #appPage input[type=date],
html[data-mode="dark"] body #appPage input[type=search],
html[data-mode="dark"] body #appPage input:not([type]),
html[data-mode="dark"] body #appPage select,
html[data-mode="dark"] body #appPage textarea{
  background:#12161B!important;border-color:var(--c-line)!important;color:var(--c-ink)!important;
}
html[data-mode="dark"] body #appPage input::placeholder,
html[data-mode="dark"] body #appPage textarea::placeholder{color:#6B7480}
html[data-mode="dark"] body #appPage .btn.ghost{background:transparent!important;border-color:var(--c-line)!important;color:var(--c-ink2)!important}
html[data-mode="dark"] body #appPage .btn.ghost:hover{background:var(--c-hover)!important;border-color:var(--c-brand)!important;color:#E9D5F0!important}

/* ---------- 标签 / 提示 / 空状态 ---------- */
html[data-mode="dark"] body #appPage .tag{background:#232A32;color:var(--c-ink2)}
html[data-mode="dark"] body #appPage .tag.navy{background:var(--c-on-bg);color:var(--c-on-fg)}
html[data-mode="dark"] body #appPage .tag.ok{background:#0C2B22;color:#6EE7B7}
html[data-mode="dark"] body #appPage .tag.warn{background:#2E2210;color:#FCD34D}
html[data-mode="dark"] body #appPage .tag.err{background:#2E1618;color:#FCA5A5}
html[data-mode="dark"] body #appPage .tag.info{background:#12233F;color:#93C5FD}
html[data-mode="dark"] body #appPage .alert{background:#1A1F26;border-color:var(--c-line);color:var(--c-ink2)}
html[data-mode="dark"] body #appPage .alert.error{background:#2A1719;border-color:#5B2626;color:#FCA5A5}
html[data-mode="dark"] body #appPage .alert.warn{background:#2A2113;border-color:#5B4420;color:#FCD34D}
html[data-mode="dark"] body #appPage .alert.ok{background:#0E2A21;border-color:#1F5B45;color:#6EE7B7}
html[data-mode="dark"] body #appPage .alert.info{background:#12233F;border-color:#1E3E6B;color:#93C5FD}
html[data-mode="dark"] body #appPage .asst-empty-av,
html[data-mode="dark"] body #appPage .state__ic{background:#232A32!important;color:#8B95A1!important}
html[data-mode="dark"] body #appPage .disclaimer{background:#1A1F26;border-color:var(--c-line);color:var(--c-dim)}
html[data-mode="dark"] body #appPage .law-search-pop .ls-item:hover,
html[data-mode="dark"] body #appPage .law-search-pop .ls-item.on{background:var(--c-brand-soft);color:#E9D5F0}
html[data-mode="dark"] body #appPage .law-search-pop .ls-note{background:#1E242C;color:var(--c-dim)}

/* ---------- 对话页 ---------- */
html[data-mode="dark"] body #appPage .chat-shell{background:var(--c-bg)}
html[data-mode="dark"] body #appPage .chat-mid{background:linear-gradient(180deg,#171B21,#14181E);border-right-color:var(--c-line)}
html[data-mode="dark"] body #appPage .chat-mid-h{border-bottom-color:#232A32;color:var(--c-dim)}
html[data-mode="dark"] body #appPage .chat-job:hover{background:var(--c-hover)}
html[data-mode="dark"] body #appPage .chat-job.on{background:var(--c-brand-soft)}
html[data-mode="dark"] body #appPage .chat-job-t b{color:var(--c-ink)}
html[data-mode="dark"] body #appPage .chat-main,
html[data-mode="dark"] body #appPage .chat-foot,
html[data-mode="dark"] body #appPage .chat-head{background:var(--c-surface);border-color:var(--c-line)}
html[data-mode="dark"] body #appPage .chat-body{background:linear-gradient(180deg,#14181E,#11151A)}
html[data-mode="dark"] body #appPage #asstLog .asst-msg.ai{background:var(--c-surface)!important;border-color:var(--c-line)!important;color:var(--c-ink)!important}
html[data-mode="dark"] body #appPage .chat-input-wrap{background:var(--c-surface);border-color:var(--c-line)}
html[data-mode="dark"] body #appPage .chat-input-wrap textarea{color:var(--c-ink);background:transparent!important}
html[data-mode="dark"] body #appPage .asst-empty-tips{background:#1A1F26;border-color:var(--c-line);color:var(--c-dim)}

/* ---------- 登录页 ---------- */
html[data-mode="dark"] body #appPage .law-login .l-panel{background:var(--c-surface);border-left-color:var(--c-line)}
html[data-mode="dark"] body #appPage .law-login .l-form h2{color:var(--c-ink)}
html[data-mode="dark"] body #appPage .law-login .l-hero{background:color-mix(in srgb, var(--c-brand) 55%, #0B0E12)}
html[data-mode="dark"] body #appPage .law-boot .bm>div{opacity:.5}

/* ---------- 面板按钮 ---------- */
html[data-mode="dark"] body #appPage .mode-btn{background:#1E242C;border-color:var(--c-line);color:var(--c-ink2)}
html[data-mode="dark"] body #appPage .mode-btn.on{background:var(--c-brand-soft);border-color:var(--c-brand);color:#E9D5F0}

/* ---------------------------- 8.14 明暗模式切换按钮（主题面板） ---------------------------- */
html body #appPage .mode-row{display:flex;gap:6px;margin:6px 0 10px}
html body #appPage .mode-btn{
  flex:1;display:flex;align-items:center;justify-content:center;gap:5px;
  height:30px;border:1px solid var(--c-line);border-radius:8px;background:#fff;
  font-size:var(--fs-1);font-weight:600;color:var(--c-ink2);cursor:pointer;
  transition:background .13s,border-color .13s,color .13s;
}
html body #appPage .mode-btn:hover{border-color:var(--c-brand);color:var(--c-brand)}
html body #appPage .mode-btn.on{background:var(--c-brand-soft);border-color:var(--c-brand);color:var(--c-brand)}
html body #appPage .mode-btn .law-i svg{width:14px;height:14px}

/* ---------------------------- 8.15 布局工具类（替代内联 style） ---------------------------- */
/* 只放「主题无关」的纯布局工具类；任何带颜色的内联样式都不要用工具类，
   一律进组件规则，这样换主题/深色模式才能整体生效。 */
html body #appPage .law-row{display:flex;align-items:center;gap:8px}
html body #appPage .law-row.top{align-items:flex-start}
html body #appPage .law-row.baseline{align-items:baseline;gap:10px}
html body #appPage .law-row.wrap{flex-wrap:wrap}
html body #appPage .law-row.gap-6{gap:6px}
html body #appPage .law-col{display:flex;flex-direction:column;gap:8px}
html body #appPage .law-fill{flex:1 1 auto;min-width:0}
html body #appPage .law-mb-12{margin-bottom:12px}
html body #appPage .law-mb-14{margin-bottom:14px}
html body #appPage .law-mt-12{margin-top:12px}
html body #appPage .law-mt-14{margin-top:14px}
html body #appPage .law-mt-16{margin-top:16px}
html body #appPage .law-mt-18{margin-top:18px}
html body #appPage .law-mt-20{margin-top:20px}
html body #appPage .law-max-640{max-width:640px}
html body #appPage .law-max-880{max-width:880px}
html body #appPage .law-hide{display:none}
html body #appPage .law-w-220{width:220px;flex:0 0 220px}
html body #appPage .law-center{text-align:center}

/* 内联排列表单字段（label + 控件），替代 13px/600/ink2 那套散写 */
html body #appPage .law-field{margin-bottom:14px}
html body #appPage .law-field>label{
  display:block;font-size:var(--fs-2);font-weight:600;color:var(--c-ink2);margin-bottom:6px;
}
html body #appPage .law-field>input,
html body #appPage .law-field>select,
html body #appPage .law-field>textarea{width:100%}

/* 列表行（待办 / 通知 / 明细），替代 3 处内联 border-bottom + padding */
html body #appPage .law-lrow{
  display:flex;align-items:center;gap:9px;padding:8px 0;
  border-bottom:1px solid var(--c-line);
  font-size:var(--fs-2);color:var(--c-ink);
}
html body #appPage .law-lrow:last-child{border-bottom:0}
html body #appPage .law-lrow.top{align-items:flex-start}
html body #appPage .law-lrow .lr-ic{flex:0 0 auto;display:flex;color:var(--c-dim)}
html body #appPage .law-lrow .lr-ic svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .law-lrow .lr-tx{flex:1;min-width:0;line-height:1.6;overflow-wrap:anywhere}
html body #appPage .law-lrow .lr-meta{flex:0 0 auto;font-size:var(--fs-xs);color:var(--c-dim)}

/* 只读/预览文本框（知识库预览、长文查看） */
html body #appPage .law-preview{
  font-size:13.5px;line-height:1.9;white-space:pre-wrap;
  max-height:64vh;overflow:auto;
  background:var(--c-bg-soft);border:1px solid var(--c-line);border-radius:10px;
  padding:12px 14px;color:var(--c-ink2);
}
html body #appPage .law-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}


/* 卡片内工具条（案件页筛选条）：卡片自带 padding，这里只压紧凑 */
html body #appPage .law-toolbar-in-card{padding:12px 14px!important;margin-bottom:12px}
html body #appPage .law-field-label{display:block;font-size:var(--fs-2);font-weight:600;color:var(--c-ink2);margin-bottom:6px}

/* ---------------------------- 8.16 补充：卡片变体 / 说明文字 / 表单网格 ---------------------------- */
html body #appPage .adm-kpi-sm-unit{font-size:11px;font-weight:600;color:var(--c-dim);margin-left:2px}
html body #appPage .asst-empty.compact{padding:20px 10px}
html body #appPage .law-note{font-size:var(--fs-1);color:var(--c-dim);margin-top:8px;line-height:1.7}
html body #appPage .law-note.md{font-size:var(--fs-2)}
/* 卡片承载表格：去内边距，让表格自己贴边 */
html body #appPage .card.flush{padding:0!important;overflow:hidden}
html body #appPage .card.flush .tbl-wrap{border:0;border-radius:0}
html body #appPage .card.narrow{max-width:680px}
/* 两列表单网格（律师入驻等） */
html body #appPage .law-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
html body #appPage .law-form-grid .full{grid-column:1/-1}
@media (max-width:768px){html body #appPage .law-form-grid{grid-template-columns:1fr}}
/* 头像大圆 / 小圆（我的页、律师主页） */
html body #appPage .law-ava{display:grid;place-items:center;border-radius:50%;font-weight:800;flex:0 0 auto}
html body #appPage .law-ava.xl{width:64px;height:64px;font-size:22px}
html body #appPage .law-ava.lg{width:56px;height:56px;font-size:20px}
html body #appPage .law-ava.md{width:44px;height:44px;font-size:17px}
html body #appPage .law-h3{font-size:var(--fs-4);font-weight:800;color:var(--c-ink);margin-bottom:6px}
html body #appPage .law-p{font-size:var(--fs-2);color:var(--c-dim);line-height:1.8}
html body #appPage .law-meta{font-size:var(--fs-xs);color:var(--c-dim);line-height:1.6}
html body #appPage .law-h3{margin:0}
html body #appPage .law-note.nomargin{margin:0}
html body #appPage .law-profile-hd{gap:16px;margin-bottom:18px}
html body #appPage .law-h3.tight{margin-bottom:2px}
html body #appPage .law-w-200{width:200px;flex:0 0 200px;margin-left:auto;height:32px}
html body #appPage .law-ellipsis{max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:768px){html body #appPage .law-w-200{width:100%;flex:1 1 100%;margin-left:0}}

/* 岗位头像：颜色走 --av 自定义属性（原先是内联 background/color，深色下不跟随） */
html body #appPage .chat-job-av[style*="--av"]{background:color-mix(in srgb, var(--av) 13%, #fff);color:var(--av)}
html body #appPage .asst-empty-av[style*="--av"]{background:color-mix(in srgb, var(--av) 13%, #fff);color:var(--av)}
html body #appPage .chat-head .chat-ava[style*="--av"]{background:color-mix(in srgb, var(--av) 13%, #fff);color:var(--av)}
html[data-mode="dark"] body #appPage .chat-job-av[style*="--av"],
html[data-mode="dark"] body #appPage .asst-empty-av[style*="--av"],
html[data-mode="dark"] body #appPage .chat-head .chat-ava[style*="--av"]{
  background:color-mix(in srgb, var(--av) 26%, #12161B);color:color-mix(in srgb, var(--av) 60%, #fff);
}

html body #appPage .asst-empty-av[style*="--av"]{
  background:color-mix(in srgb, var(--av) 13%, #fff)!important;
  color:var(--av)!important;
}
html[data-mode="dark"] body #appPage .asst-empty-av[style*="--av"]{
  background:color-mix(in srgb, var(--av) 26%, #12161B)!important;
  color:color-mix(in srgb, var(--av) 60%, #fff)!important;
}
html body #appPage .law-search-pop .ls-hist-foot{
  display:flex;justify-content:flex-end;padding:6px 8px 2px;border-top:1px solid var(--c-line);margin-top:4px;
}
html body #appPage .law-search-pop .ls-hist-foot button{
  border:0;background:transparent;color:var(--c-dim);font-size:var(--fs-xs);
  cursor:pointer;padding:4px 6px;border-radius:6px;font-family:inherit;
}
html body #appPage .law-search-pop .ls-hist-foot button:hover{background:var(--c-hover);color:var(--c-brand)}

/* ---------------------------- 9.x 深色模式下的图片（2026-11-13 老板要求） ---------------------------- */
/* 深色背景下白底照片/头像/二维码会「发亮刺眼」，按类型分档压暗：
 *   law-face 人像/头像    → 92%（保留肤色可辨）
 *   .tb-av / .chat-*av    → 92%
 *   .law-qr  二维码       → 96%（几乎不动，保证扫得出来）
 *   .b-logo  品牌 logo    → 不压（已是白底品牌标）
 * 只压亮度不做反色，避免人脸发灰或二维码失真。
 */
html[data-mode="dark"] body #appPage .law-face,
html[data-mode="dark"] body #appPage .tb-av,
html[data-mode="dark"] body #appPage .chat-job-av img,
html[data-mode="dark"] body #appPage .chat-head .chat-ava img,
html[data-mode="dark"] body #appPage .asst-empty-av img,
html[data-mode="dark"] body #appPage img[src*="avatar"],
html[data-mode="dark"] body #appPage img[src*="/files/"]{
  filter:brightness(.92) contrast(1.02);
}
/* 二维码：只压 4%，扫码识别率基本无感 */
html[data-mode="dark"] body #appPage .law-qr{filter:brightness(.96);border-radius:8px;background:#fff;padding:6px}
/* 品牌 logo 与顶栏头像不动 */
html[data-mode="dark"] body #appPage .topbar .b-logo{filter:none}

/* 二维码容器（弹窗里居中 + 白底，深色下也能扫） */
html body #appPage .law-qr{display:block;max-width:220px;margin:0 auto}

/* ============================================================================
 * 10. 外观设置面板（主题色 + 明暗模式）· 2026-11-13 重做
 *    原问题：色块 28px 且文字竖排溢出（254px 一行塞 7 个，第 7 个被裁）、
 *            自定义取色挤成一行、深浅按钮图标语义错（浅色配「图片」、深色配「靶心」）。
 *    新结构：头部(标题+关闭) / 明暗模式(3 等分) / 主题色(4×2 网格带名称+选中勾) / 自定义 / 底部重置
 * ========================================================================== */
html body #appPage .theme-pop{
  width:296px!important;padding:0!important;border-radius:16px!important;
  border:1px solid var(--c-line)!important;box-shadow:var(--sh-pop)!important;
  overflow:hidden;
}

/* ---- 头部 ---- */
html body #appPage .theme-pop .tp-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 14px 10px;border-bottom:1px solid var(--c-line);
}
html body #appPage .theme-pop .tp-tt{font-size:var(--fs-3);font-weight:800;color:var(--c-ink);letter-spacing:.2px}
html body #appPage .theme-pop .tp-x{
  width:26px;height:26px;display:flex;align-items:center;justify-content:center;
  border:0;background:transparent;border-radius:8px;color:var(--c-dim);cursor:pointer;
  transition:background .13s,color .13s;
}
html body #appPage .theme-pop .tp-x:hover{background:var(--c-hover);color:var(--c-ink)}
html body #appPage .theme-pop .tp-x svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}

/* ---- 分区 ---- */
html body #appPage .theme-pop .tp-sec{padding:12px 14px}
html body #appPage .theme-pop .tp-sec + .tp-sec{border-top:1px solid var(--c-line)}
html body #appPage .theme-pop .tp-label{
  display:flex;align-items:center;gap:6px;
  font-size:var(--fs-xs);font-weight:800;color:var(--c-dim);
  letter-spacing:.06em;text-transform:none;margin-bottom:9px;
}
html body #appPage .theme-pop .tp-cur{
  font-style:normal;font-weight:700;color:var(--c-brand);
  background:var(--c-brand-soft);border-radius:999px;padding:1px 8px;letter-spacing:0;
}

/* ---- 明暗模式：三段等分 ---- */
html body #appPage .theme-pop .mode-row{display:flex;gap:6px;margin:0}
html body #appPage .theme-pop .mode-btn{
  flex:1 1 0;min-width:0;height:56px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  border:1px solid var(--c-line);border-radius:10px;background:var(--c-surface);
  font-size:var(--fs-xs);font-weight:600;color:var(--c-ink2);cursor:pointer;
  transition:background .13s,border-color .13s,color .13s,box-shadow .13s;
}
html body #appPage .theme-pop .mode-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .theme-pop .mode-btn:hover{border-color:var(--c-brand);color:var(--c-brand);background:var(--c-brand-soft)}
html body #appPage .theme-pop .mode-btn.on{
  border-color:var(--c-brand);color:var(--c-brand);background:var(--c-brand-soft);
  box-shadow:0 0 0 1px var(--c-brand) inset;font-weight:700;
}

/* ---- 主题色：4 列网格，色块 + 名称 + 选中勾 ---- */
html body #appPage .theme-pop .tp-grid{
  display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:8px!important;
}
html body #appPage .theme-pop .tp-sw{
  display:flex;flex-direction:column;align-items:center;gap:5px;
  padding:7px 2px 6px;border:1px solid transparent;border-radius:10px;
  background:transparent;cursor:pointer;min-width:0;
  transition:background .13s,border-color .13s;
}
html body #appPage .theme-pop .tp-sw:hover{background:var(--c-hover)}
html body #appPage .theme-pop .tp-sw.on{border-color:var(--c-brand);background:var(--c-brand-soft)}
html body #appPage .theme-pop .tp-sw i{
  position:relative;display:block;width:26px;height:26px;border-radius:50%;
  background:var(--sw);box-shadow:0 0 0 1px rgba(16,24,40,.10),inset 0 -1px 2px rgba(0,0,0,.10);
}
html body #appPage .theme-pop .tp-sw.on i{box-shadow:0 0 0 2px var(--c-surface),0 0 0 4px var(--sw)}
html body #appPage .theme-pop .tp-sw-ck{display:none;position:absolute;inset:0;border-radius:50%}
html body #appPage .theme-pop .tp-sw.on .tp-sw-ck{
  display:block;
  background:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l5 5L19 7'/%3E%3C/svg%3E") center/13px no-repeat;
}
html body #appPage .theme-pop .tp-sw-n{
  font-size:var(--fs-xs);color:var(--c-ink2);font-weight:600;line-height:1.2;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;
}
html body #appPage .theme-pop .tp-sw.on .tp-sw-n{color:var(--c-brand);font-weight:700}

/* ---- 自定义取色 ---- */
html body #appPage .theme-pop .tp-custom{
  display:flex;align-items:center;gap:8px;margin-top:10px;padding:8px 10px;
  border:1px dashed var(--c-line);border-radius:10px;cursor:pointer;
  transition:border-color .13s,background .13s;
}
html body #appPage .theme-pop .tp-custom:hover{border-color:var(--c-brand);background:var(--c-brand-soft)}
html body #appPage .theme-pop .tp-custom-t{font-size:var(--fs-2);font-weight:600;color:var(--c-ink2);flex:1}
html body #appPage .theme-pop .tp-custom-v{
  font-size:var(--fs-xs);font-family:ui-monospace,Menlo,Consolas,monospace;
  color:var(--c-dim);letter-spacing:.3px;
}
html body #appPage .theme-pop .tp-custom input[type=color]{
  width:30px;height:30px;padding:0;border:1px solid var(--c-line);border-radius:8px;
  background:var(--c-surface);cursor:pointer;flex:0 0 30px;
}
html body #appPage .theme-pop .tp-custom input[type=color]::-webkit-color-swatch-wrapper{padding:3px}
html body #appPage .theme-pop .tp-custom input[type=color]::-webkit-color-swatch{border:0;border-radius:5px}

/* ---- 底部重置 ---- */
html body #appPage .theme-pop .tp-foot{
  padding:10px 14px 12px;border-top:1px solid var(--c-line);background:var(--c-bg-soft);
}
html body #appPage .theme-pop .tp-reset{
  width:100%;height:32px;display:flex;align-items:center;justify-content:center;gap:6px;
  border:1px solid var(--c-line);border-radius:9px;background:var(--c-surface);
  font-size:var(--fs-2);font-weight:600;color:var(--c-ink2);cursor:pointer;font-family:inherit;
  transition:border-color .13s,color .13s,background .13s;
}
html body #appPage .theme-pop .tp-reset:hover{border-color:var(--c-brand);color:var(--c-brand);background:var(--c-brand-soft)}
html body #appPage .theme-pop .tp-reset svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* ---- 深色模式下的面板 ---- */
html[data-mode="dark"] body #appPage .theme-pop{
  background:var(--c-surface)!important;border-color:var(--c-line)!important;
}
html[data-mode="dark"] body #appPage .theme-pop .tp-head,
html[data-mode="dark"] body #appPage .theme-pop .tp-sec + .tp-sec,
html[data-mode="dark"] body #appPage .theme-pop .tp-foot{border-color:var(--c-line)}
html[data-mode="dark"] body #appPage .theme-pop .tp-foot{background:#14181E}
html[data-mode="dark"] body #appPage .theme-pop .tp-tt{color:var(--c-ink)}
html[data-mode="dark"] body #appPage .theme-pop .mode-btn,
html[data-mode="dark"] body #appPage .theme-pop .tp-reset,
html[data-mode="dark"] body #appPage .theme-pop .tp-custom input[type=color]{
  background:var(--c-surface);border-color:var(--c-line);color:var(--c-ink2);
}
html[data-mode="dark"] body #appPage .theme-pop .mode-btn.on{
  background:var(--c-brand-soft);border-color:var(--c-brand);color:#E9D5F0;
}
html[data-mode="dark"] body #appPage .theme-pop .tp-sw.on{background:var(--c-brand-soft)}
html[data-mode="dark"] body #appPage .theme-pop .tp-sw.on i{box-shadow:0 0 0 2px var(--c-surface),0 0 0 4px var(--sw)}
html[data-mode="dark"] body #appPage .theme-pop .tp-custom:hover,
html[data-mode="dark"] body #appPage .theme-pop .tp-reset:hover{background:#1E242C}

/* 窄屏：面板贴底展开，宽度自适应 */
@media (max-width:520px){
  html body #appPage .theme-pop{
    left:8px!important;right:8px!important;bottom:8px!important;width:auto!important;
  }
  html body #appPage .theme-pop .tp-grid{grid-template-columns:repeat(3,1fr)!important}
}

/* 关闭按钮补强：确保按钮本身不吃文字、图标居中、点得中 */
html body #appPage .theme-pop .tp-x{
  position:relative;flex:0 0 26px;font-size:0;line-height:0;
}
html body #appPage .theme-pop .tp-x .law-i{width:100%;height:100%;display:flex;align-items:center;justify-content:center}
html body #appPage .theme-pop .tp-x:focus-visible{outline:2px solid var(--c-brand);outline-offset:2px}
html body #appPage .theme-pop .tp-head .tp-x{margin-left:auto}

/* 面板内 Tab 顺序：从头开始（避免焦点落到面板外的隐藏元素） */
html body #appPage .theme-pop{outline:none}
html body #appPage .theme-pop .tp-x,
html body #appPage .theme-pop .mode-btn,
html body #appPage .theme-pop .tp-sw,
html body #appPage .theme-pop .tp-custom,
html body #appPage .theme-pop .tp-reset{touch-action:manipulation}
/* 面板内元素统一焦点环（品牌色，深色下也可见） */
html body #appPage .theme-pop :is(button,label,input):focus-visible{
  outline:2px solid var(--c-brand)!important;outline-offset:2px!important;
}

/* ============================================================================
 * 11. 2026-11-13 老板第 4 轮改版
 * ========================================================================== */

/* ---------- 11.1 顶栏「退出」按钮 ---------- */
html body #appPage .topbar .tb-exit{
  display:flex;align-items:center;gap:5px;height:32px;padding:0 12px;
  border:1px solid rgba(255,255,255,.34)!important;border-radius:8px;
  background:rgba(255,255,255,.12)!important;color:#fff!important;
  font-size:var(--fs-2);font-weight:600;cursor:pointer;
  transition:background .14s,border-color .14s;
}
html body #appPage .topbar .tb-exit:hover{background:rgba(255,255,255,.24)!important;border-color:rgba(255,255,255,.6)!important}
html body #appPage .topbar .tb-exit svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .topbar .tb-exit .tb-tx{letter-spacing:.3px}

/* ---------- 11.2 侧栏底部用户卡（固定） ---------- */
html body #appPage .tea-side{
  display:flex!important;flex-direction:column!important;
}
html body #appPage .tea-side > .tea-menu{flex:0 0 auto;overflow-y:auto;min-height:0}
html body #appPage .law-side-user{
  margin-top:auto;flex:0 0 auto;
  display:flex;align-items:center;gap:9px;
  padding:9px 9px;border-radius:10px;
  border:1px solid var(--c-line);background:var(--c-surface);
  text-decoration:none;cursor:pointer;
  transition:background .14s,border-color .14s;
}
html body #appPage .law-side-user:hover{background:var(--c-brand-soft);border-color:var(--c-brand);text-decoration:none}
html body #appPage .law-side-user .su-av{
  width:30px;height:30px;border-radius:50%;object-fit:cover;flex:0 0 30px;
  background:var(--c-brand-soft);box-shadow:0 0 0 1px rgba(16,24,40,.08);
}
html body #appPage .law-side-user .su-tx{min-width:0;display:flex;flex-direction:column;gap:1px;line-height:1.3}
html body #appPage .law-side-user .su-tx b{
  font-size:var(--fs-2);font-weight:700;color:var(--c-ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:104px;
}
html body #appPage .law-side-user .su-tx i{
  font-style:normal;font-size:var(--fs-xs);color:var(--c-dim);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:104px;
}
html body #appPage .tea-side-foot{margin-top:6px!important;padding-top:6px!important}
/* 侧栏窄屏（收成 56px）：只留头像 */
@media (max-width:980px){
  html body #appPage .law-side-user{justify-content:center;padding:8px 4px;border:0;background:transparent}
  html body #appPage .law-side-user .su-tx{display:none}
}
html[data-mode="dark"] body #appPage .law-side-user{background:var(--c-surface);border-color:var(--c-line)}
html[data-mode="dark"] body #appPage .law-side-user:hover{background:var(--c-brand-soft)}

/* ---------------------------- 11.3 对话页：云课堂对齐样式 ---------------------------- */
/* 岗位列表：去掉介绍文字后行更紧凑，头像改仿真人头像 */
html body #appPage .chat-job{padding:7px 9px!important;align-items:center!important}
html body #appPage .chat-job-av{
  width:28px!important;height:28px!important;flex:0 0 28px!important;
  border-radius:50%!important;object-fit:cover;
  background:var(--c-bg-soft)!important;
  box-shadow:0 0 0 1px rgba(16,24,40,.08)!important;
}
html body #appPage .chat-job.on .chat-job-av{box-shadow:0 0 0 2px var(--c-brand)!important}
html body #appPage .chat-job-t b{font-size:var(--fs-2)!important;line-height:1.5!important}
html body #appPage .chat-head .chat-ava{
  width:32px!important;height:32px!important;flex:0 0 32px!important;border-radius:50%!important;
  object-fit:cover;box-shadow:0 0 0 2px var(--c-brand-ring)!important;background:var(--c-bg-soft);
}
html[data-mode="dark"] body #appPage .chat-job-av,
html[data-mode="dark"] body #appPage .chat-head .chat-ava{filter:brightness(.92) contrast(1.02)}

/* 头部按钮：图标 + 文字 */
html body #appPage .chat-head .tb-btn{display:flex;align-items:center;gap:5px;color:var(--c-ink2)!important;font-weight:600}
html body #appPage .chat-head .tb-btn svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .chat-head .tb-btn:hover{background:var(--c-brand-soft)!important;color:var(--c-brand)!important}
html body #appPage .chat-head .tb-btn .tb-tx{font-size:var(--fs-2)}

/* 附件 chip 行（对齐云课堂 .chat-attach-row） */
html body #appPage .chat-attach-row{display:none;gap:6px;flex-wrap:wrap;padding:0 0 8px}
html body #appPage .chat-attach-row .achip{
  display:inline-flex;align-items:center;gap:6px;
  height:26px;padding:0 6px 0 8px;border-radius:999px;
  background:var(--c-brand-soft);color:var(--c-brand);
  font-size:var(--fs-xs);font-weight:600;max-width:100%;
}
html body #appPage .chat-attach-row .achip svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;flex:0 0 auto}
html body #appPage .chat-attach-row .achip-n{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body #appPage .chat-attach-row .achip-s{color:var(--c-dim);font-weight:500}
html body #appPage .chat-attach-row .achip.parsing{background:var(--c-bg-soft);color:var(--c-dim)}
html body #appPage .chat-attach-row .achip.error{background:#FEF2F2;color:#B91C1C}
html body #appPage .chat-attach-row .achip-x{
  width:16px;height:16px;display:flex;align-items:center;justify-content:center;
  border:0;background:transparent;color:inherit;cursor:pointer;border-radius:50%;padding:0;opacity:.7;
}
html body #appPage .chat-attach-row .achip-x:hover{opacity:1;background:rgba(0,0,0,.08)}
html body #appPage .chat-attach-row .achip-x svg{width:11px;height:11px}
/* 话筒图标槽 */
html body #appPage .chat-mic .chat-mic-ico{display:flex;align-items:center;justify-content:center;width:100%;height:100%}

/* 历史对话弹窗 */
html body #appPage .law-hist{display:flex;flex-direction:column;gap:6px;max-height:62vh;overflow-y:auto}
html body #appPage .law-hist .hist-row{
  display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:10px;
  border:1px solid var(--c-line);background:var(--c-surface);transition:border-color .13s,background .13s;
}
html body #appPage .law-hist .hist-row:hover{border-color:var(--c-brand);background:var(--c-bg-soft)}
html body #appPage .law-hist .hist-av{width:30px;height:30px;border-radius:50%;object-fit:cover;flex:0 0 30px;background:var(--c-bg-soft)}
html body #appPage .law-hist .hist-tx{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
html body #appPage .law-hist .hist-tx b{font-size:var(--fs-2);font-weight:700;color:var(--c-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #appPage .law-hist .hist-tx span{font-size:var(--fs-xs);color:var(--c-dim)}
html[data-mode="dark"] body #appPage .law-hist .hist-row{background:var(--c-surface);border-color:var(--c-line)}
html[data-mode="dark"] body #appPage .law-hist .hist-row:hover{background:var(--c-hover)}

/* ---------------------------- 11.4 紧凑筛选条（案件 / 客户） ---------------------------- */
/* 原高度 214px（案件）/ 138px（客户），因为 .input 被 .law-w-220 等内联/类冲突撑开换行。
   统一改成「一行内：胶囊分类 + 右对齐搜索框」，高 48px 左右。 */
html body #appPage .law-filterbar{
  display:flex!important;align-items:center;gap:10px;flex-wrap:nowrap;
  padding:8px 12px!important;margin-bottom:12px;
}
html body #appPage .law-filterbar .fb-chips{
  display:flex;align-items:center;gap:4px;flex:1 1 auto;min-width:0;
  overflow-x:auto;scrollbar-width:none;
}
html body #appPage .law-filterbar .fb-chips::-webkit-scrollbar{display:none}
html body #appPage .law-filterbar .fb-chip{
  flex:0 0 auto;height:28px;padding:0 12px;
  border:1px solid transparent;border-radius:999px;background:transparent;
  font-size:var(--fs-2);font-weight:600;color:var(--c-ink2);cursor:pointer;font-family:inherit;
  transition:background .13s,color .13s,border-color .13s;white-space:nowrap;
}
html body #appPage .law-filterbar .fb-chip:hover{background:var(--c-hover);color:var(--c-ink)}
html body #appPage .law-filterbar .fb-chip.on{background:var(--c-on-bg);color:var(--c-on-fg);border-color:var(--c-on-bd)}
html body #appPage .law-filterbar .fb-search{
  flex:0 0 240px!important;width:240px!important;height:32px!important;margin:0!important;
}

/* ============================================================
 * 2026-11-14 通用筛选胶囊（原来只写在 .law-filterbar 下，
 *   全文检索页的 .fb-chips 完全不生效 → 名称和数字黏在一起）
 * ============================================================ */
html body #appPage .fb-chips{
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
}
html body #appPage .fb-chips .fb-chip{
  display:inline-flex;align-items:center;gap:6px;
  flex:0 0 auto;height:28px;padding:0 12px;
  border:1px solid var(--c-line);border-radius:999px;background:var(--c-surface);
  font-size:var(--fs-2);font-weight:600;color:var(--c-ink2);cursor:pointer;font-family:inherit;
  transition:background .13s,color .13s,border-color .13s;white-space:nowrap;
}
html body #appPage .fb-chips .fb-chip:hover{background:var(--c-hover);color:var(--c-ink);border-color:var(--c-line-2)}
html body #appPage .fb-chips .fb-chip.on{background:var(--c-on-bg);color:var(--c-on-fg);border-color:var(--c-on-bd)}
/* 数字徽标：与名称分开，视觉不粘连 */
html body #appPage .fb-chips .fb-chip .fc-n{
  min-width:18px;height:17px;line-height:17px;padding:0 5px;border-radius:999px;
  background:var(--c-bg-soft);color:var(--c-ink2);font-size:11px;font-weight:800;
  font-variant-numeric:tabular-nums;text-align:center;
}
html body #appPage .fb-chips .fb-chip.on .fc-n{background:rgba(255,255,255,.28);color:var(--c-on-fg)}
html[data-mode="dark"] body #appPage .fb-chips .fb-chip.on .fc-n{background:rgba(255,255,255,.16)}
/* 全文检索页：筛选条与搜索条之间加分隔线 */
html body #appPage .fts-chips{margin-top:10px;padding-top:10px;border-top:1px solid var(--c-line)}
/* 客户页 KPI 小卡也压矮（原 68px → 52px） */
html body #appPage .adm-kpi-sm{padding:8px 12px!important;border-radius:10px!important}
html body #appPage .adm-kpi-sm-top{font-size:var(--fs-xs)!important}
html body #appPage .adm-kpi-sm-num{font-size:17px!important;margin-top:1px!important}
html body #appPage .adm-kpi-sm-row{gap:8px!important;margin-bottom:10px!important}
@media (max-width:900px){
  html body #appPage .law-filterbar{flex-wrap:wrap!important}
  html body #appPage .law-filterbar .fb-search{flex:1 1 100%!important;width:100%!important}
}
html[data-mode="dark"] body #appPage .law-filterbar .fb-chip.on{background:var(--c-on-bg);color:var(--c-on-fg);border-color:var(--c-on-bd)}

/* ---------------------------- 11.5 工具页：搜索条 + 紧凑工具卡 ---------------------------- */
html body #appPage .law-searchbar{padding:10px 12px!important;margin-bottom:12px}
html body #appPage .law-searchbar .sb-row{
  display:flex;align-items:center;gap:8px;
  /* 2026-11-14 UI 一致性：原来是 38px，与全站控件 34px 不齐 → 收归 token */
  height:var(--law-ctl-h);padding:0 4px 0 12px;
  border:1px solid var(--c-line);border-radius:10px;background:var(--c-surface);
  transition:border-color .14s,box-shadow .14s;
}
html body #appPage .law-searchbar .sb-row:focus-within{border-color:var(--c-brand);box-shadow:var(--law-focus)}
html body #appPage .law-searchbar .sb-ic{display:flex;color:var(--c-dim);flex:0 0 auto}
html body #appPage .law-searchbar .sb-ic svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9}
html body #appPage .law-searchbar .sb-input{
  flex:1;min-width:0;height:100%;border:0!important;background:transparent!important;
  padding:0!important;font-size:var(--fs-3);color:var(--c-ink);margin:0!important;
}
html body #appPage .law-searchbar .sb-input:focus{box-shadow:none!important;border:0!important}
html body #appPage .law-searchbar .sb-btn{
  flex:0 0 auto;height:var(--law-ctl-h-sm)!important;min-height:var(--law-ctl-h-sm)!important;padding:0 16px!important;border-radius:8px!important;
}
html body #appPage .law-searchbar .sb-res{margin-top:10px;padding-top:10px;border-top:1px solid var(--c-line)}

/* 工具卡：从 232px 大卡 → 128px 紧凑磁贴，一屏放更多 */
html body #appPage .law-tool-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fill,minmax(128px,1fr))!important;
  gap:8px!important;
}
html body #appPage .law-tool-tile{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;
  padding:12px 8px;min-height:82px;cursor:pointer;
  border:1px solid var(--c-line);border-radius:12px;background:var(--c-surface);
  transition:border-color .14s,box-shadow .14s,transform .14s,background .14s;
}
html body #appPage .law-tool-tile:hover{border-color:var(--c-brand);box-shadow:0 4px 14px rgba(16,24,40,.08);transform:translateY(-1px)}
html body #appPage .law-tool-tile:focus-visible{outline:2px solid var(--c-brand);outline-offset:2px}
html body #appPage .law-tool-tile .tt-ic{
  width:30px;height:30px;border-radius:9px;display:flex;align-items:center;justify-content:center;
  background:var(--c-brand-soft);color:var(--c-brand);
  transition:background .14s,color .14s;
}
html body #appPage .law-tool-tile .tt-ic svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .law-tool-tile:hover .tt-ic{background:var(--c-brand);color:#fff}
html body #appPage .law-tool-tile .tt-nm{
  font-size:var(--fs-2);font-weight:700;color:var(--c-ink);
  text-align:center;line-height:1.3;max-width:100%;
  overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
}
html body #appPage .law-tool-tile .tt-pro{
  position:absolute;top:6px;right:6px;
  font-size:10px;font-weight:800;color:var(--c-brand);
  background:var(--c-brand-soft);border-radius:999px;padding:1px 5px;line-height:1.5;
}
html[data-mode="dark"] body #appPage .law-searchbar .sb-row,
html[data-mode="dark"] body #appPage .law-tool-tile{background:var(--c-surface);border-color:var(--c-line)}
html[data-mode="dark"] body #appPage .law-tool-tile .tt-ic{background:var(--c-brand-soft);color:#D8B4E2}
html[data-mode="dark"] body #appPage .law-tool-tile .tt-pro{background:var(--c-brand-soft);color:#E9D5F0}

/* ---------------------------- 11.6 「我的」页分组标签 ---------------------------- */
html body #appPage .me-tabs{gap:2px;margin-bottom:10px;overflow-x:auto;scrollbar-width:none}
html body #appPage .me-tabs::-webkit-scrollbar{display:none}
html body #appPage .me-tabs .tab{display:inline-flex;align-items:center;gap:6px}
html body #appPage .me-tabs .tab svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .me-subtabs{margin:-4px 0 14px;gap:5px}
html body #appPage .me-subtabs .tab{height:28px;font-size:var(--fs-1);padding:0 11px!important;font-weight:600}

/* ---------------------------- 11.7 文档页（/mydocs） ---------------------------- */
html body #appPage .law-p10{padding:10px}
html body #appPage .w-nm{max-width:520px}
html body #appPage .w-sz{width:96px}
html body #appPage .w-tm{width:150px}
html body #appPage .w-op{width:170px}
html body #appPage .doc-ic{float:left;margin-right:6px;color:var(--c-dim)}
@media (max-width:900px){
  html body #appPage .w-nm{max-width:200px}
  html body #appPage .w-sz,html body #appPage .w-tm{display:none}
}

/* ---------------------------- 11.8 侧栏底部贴底（2026-11-13 老板） ---------------------------- */
/* 要求：底部与屏幕下边线不留白；「主题色」不再出现在侧栏。
   做法：侧栏 padding-bottom 归零 + 用户卡去掉底圆角/边框，做成一条通栏底栏，直贴屏幕底。 */
html body #appPage .tea-side{
  padding-bottom:0!important;
  overflow-y:hidden!important;
  justify-content:flex-start;
}
html body #appPage .tea-side > .tea-menu{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:0;padding-bottom:6px}
html body #appPage .law-side-user{
  margin-top:auto;margin-bottom:0;
  border-radius:0;
  border:0;border-top:1px solid var(--c-line);
  background:var(--c-surface);
  padding:11px 12px calc(11px + env(safe-area-inset-bottom, 0px));
  width:100%;
}
html body #appPage .law-side-user:hover{background:var(--c-brand-soft)}
/* 侧栏滚动条收细，避免贴边视觉毛刺 */
html body #appPage .tea-side > .tea-menu::-webkit-scrollbar{width:5px}
html body #appPage .tea-side > .tea-menu::-webkit-scrollbar-thumb{background:#D5DBE3;border-radius:8px}
html body #appPage .tea-side > .tea-menu::-webkit-scrollbar-track{background:transparent}
/* 窄屏（侧栏收成 56px 或横排）：保持贴边、不要圆角 */
@media (max-width:980px){
  html body #appPage .law-side-user{border-radius:0;border-top:1px solid var(--c-line)}
}
html[data-mode="dark"] body #appPage .law-side-user{border-top-color:var(--c-line);background:var(--c-surface)}
html[data-mode="dark"] body #appPage .tea-side > .tea-menu::-webkit-scrollbar-thumb{background:#3A424C}

/* 侧栏高度修正：.tea-side 原本 height:100% 在 .tea-layout（有 padding/存在 cross-axis 差异）里
   只算出 816px，比容器 848px 矮 32px → 底部露白。
   改为 align-self:stretch + height:auto，让它跟着 flex 容器铺满到底。 */
html body #appPage .tea-layout{align-items:stretch!important}
html body #appPage .tea-side{
  height:auto!important;
  align-self:stretch!important;
  max-height:none!important;
  min-height:0;
}
html body #appPage .tea-main{height:auto!important;align-self:stretch!important}

/* ---------------------------- 11.9 新建/编辑案件表单重排 ---------------------------- */
html body .law-caseform{display:flex;flex-direction:column;gap:14px}
html body .law-caseform .cf-sec{
  border:1px solid var(--c-line);border-radius:12px;padding:14px 14px 4px;background:var(--c-surface);
}
html body .law-caseform .cf-h{
  display:flex;align-items:center;gap:8px;
  font-size:var(--fs-3);font-weight:800;color:var(--c-ink);
  margin:0 0 12px;padding-bottom:10px;border-bottom:1px solid #F1F3F5;
}
html body .law-caseform .cf-n{
  width:20px;height:20px;flex:0 0 20px;border-radius:50%;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--c-brand-soft);color:var(--c-brand);
  font-size:11.5px;font-weight:800;
}
html body .law-caseform .cf-opt{
  margin-left:auto;font-size:var(--fs-xs);font-weight:600;color:var(--c-dim);
  background:var(--c-bg-soft);border-radius:999px;padding:1px 8px;
}
html body .law-caseform .cf-field{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}
html body .law-caseform .cf-lb{
  font-size:var(--fs-2);font-weight:700;color:var(--c-ink2);display:flex;align-items:center;gap:4px;
}
html body .law-caseform .cf-lb .req{color:var(--c-err);font-style:normal;font-weight:800}
html body .law-caseform .cf-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
html body .law-caseform .cf-grid>.cf-field{margin-bottom:12px}
html body .law-caseform .cf-tip{font-size:var(--fs-xs);color:var(--c-dim);line-height:1.6}
html body .law-caseform .cf-ta{height:auto!important;min-height:72px;resize:vertical;line-height:1.7}
html body .law-caseform .cf-mono{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.5px}
html body .law-caseform .cf-err{
  font-size:var(--fs-xs);color:#B91C1C;background:#FEF2F2;border:1px solid #FECACA;
  border-radius:8px;padding:6px 9px;line-height:1.6;margin-top:6px;
}
html body .law-caseform .input.cf-invalid{
  border-color:var(--c-err)!important;box-shadow:0 0 0 3px rgba(220,38,38,.12)!important;
}
html body .law-caseform .input{width:100%}
@media (max-width:640px){
  html body .law-caseform .cf-grid{grid-template-columns:1fr}
}
html[data-mode="dark"] body .law-caseform .cf-sec{background:var(--c-surface);border-color:var(--c-line)}
html[data-mode="dark"] body .law-caseform .cf-h{border-bottom-color:#232A32}
html[data-mode="dark"] body .law-caseform .cf-err{background:#2A1719;border-color:#5B2626;color:#FCA5A5}

/* ---------------------------- 11.10 案件表单 = 独立页面（不再弹窗） ---------------------------- */
/* 原弹窗问题：core.js 的 .modal/.modal-mask 没有基础样式（body 里没有 modal 相关 CSS），
   宽度撑成 1440px、无遮罩、无圆角 → 视觉完全变形。
   2026-11-13 老板决定：新建/编辑案件改成独立页面，从根上绕开。 */
html body #appPage .law-pane .law-backlink{
  display:inline-flex;align-items:center;gap:3px;
  border:0;background:transparent;padding:0;margin-bottom:8px;
  font-size:var(--fs-2);font-weight:600;color:var(--c-dim);cursor:pointer;font-family:inherit;
  transition:color .13s;
}
html body #appPage .law-pane .law-backlink:hover{color:var(--c-brand)}
html body #appPage .law-pane .law-backlink svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* 页面形态下表单最大宽度，避免输入框横贯满屏 */
html body .law-caseform{max-width:860px}
/* 底部操作条：吸在页面底部，带分隔与浅底 */
html body .cf-foot{
  display:flex;align-items:center;justify-content:flex-end;gap:8px;
  margin-top:16px;padding:12px 14px;
  border:1px solid var(--c-line);border-radius:12px;background:var(--c-surface);
  max-width:860px;position:sticky;bottom:0;z-index:5;
}
html body .cf-foot .btn{height:34px!important}
html[data-mode="dark"] body .cf-foot{background:var(--c-surface);border-color:var(--c-line)}
/* 编辑态「删除」按钮放到最左 */
html body .cf-foot .btn.danger{margin-right:auto}

/* ---------------------------- 11.11 我的 → 子页（形象与推送 / 域名 / 说明）---------------------------- */
/* 2026-11-13：这批子页原来全是内联 style（64 处），现全部收成类，深浅色统一。 */
html body #appPage .card.fig-card{max-width:600px;text-align:center;padding:24px!important}
html body #appPage .fig-av{
  width:96px;height:96px;border-radius:50%;margin:0 auto 16px;overflow:hidden;
  display:grid;place-items:center;
  background:var(--c-brand-soft);color:var(--c-brand);font-size:34px;font-weight:800;
}
html body #appPage .fig-av .fig-img{width:100%;height:100%;object-fit:cover}
html body #appPage .fig-hint{font-size:var(--fs-2);color:var(--c-dim);margin:0 0 16px;line-height:1.7}
html body #appPage .fig-acts{display:flex;gap:8px;justify-content:center}

html body #appPage .card.sub-card{max-width:760px}
html body #appPage .card.form-card{max-width:860px}
html body #appPage .card.wide-card{max-width:820px}
html body #appPage .sub-hint{font-size:var(--fs-2);color:var(--c-dim);line-height:1.75;margin:0 0 14px}
html body #appPage .auto-h{height:auto!important;min-height:96px;resize:vertical;line-height:1.75}

/* 行内新增（记忆：要素 + 内容 + 按钮） */
html body #appPage .inline-add{display:flex;gap:8px;margin-bottom:14px;align-items:center}
html body #appPage .inline-add .ia-k{flex:0 0 34%;min-width:0}
html body #appPage .inline-add .ia-v{flex:1 1 auto;min-width:0}
html body #appPage .inline-add .btn{flex:0 0 auto;height:34px!important}
@media (max-width:640px){html body #appPage .inline-add{flex-wrap:wrap}html body #appPage .inline-add .ia-k{flex:1 1 100%}}

/* 设置行（语音对讲等） */
html body #appPage .set-row{
  display:flex;align-items:center;gap:10px;
  padding:12px 0;border-top:1px solid var(--c-line);
}
html body #appPage .set-row.col{flex-direction:column;align-items:flex-start;gap:6px}
html body #appPage .set-row input[type=checkbox]{width:16px;height:16px;flex:0 0 16px;accent-color:var(--c-brand);margin:0}
html body #appPage .set-row .sr-tx{display:flex;flex-direction:column;gap:2px;line-height:1.4}
html body #appPage .set-row .sr-tx b{font-size:var(--fs-3);font-weight:700;color:var(--c-ink)}
html body #appPage .set-row .sr-tx i{font-style:normal;font-size:var(--fs-xs);color:var(--c-dim)}
html body #appPage .set-row .sr-lb{font-size:var(--fs-3);font-weight:600;color:var(--c-ink2)}
html body #appPage .set-sel{max-width:280px}
html body #appPage .set-acts{display:flex;gap:8px;margin-top:16px}

/* 键值网格（主页设置 / 关于平台） */
html body #appPage .kv-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}
html body #appPage .kv-item{display:flex;flex-direction:column;gap:2px;min-width:0}
html body #appPage .kv-k{font-size:var(--fs-xs);color:var(--c-dim)}
html body #appPage .kv-v{font-size:13.5px;font-weight:600;color:var(--c-ink);word-break:break-all}
html body #appPage .kv-line{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px solid var(--c-line)}
html body #appPage .kv-line:last-child{border-bottom:0}
@media (max-width:640px){html body #appPage .kv-grid{grid-template-columns:1fr}}

/* 主页链接那一行（输入 + 复制 + 打开） */
html body #appPage .inline-row{display:flex;gap:8px;align-items:center}
html body #appPage .inline-row .input{flex:1;min-width:0}
html body #appPage .inline-row .btn{flex:0 0 auto;height:34px!important}
@media (max-width:640px){html body #appPage .inline-row{flex-wrap:wrap}html body #appPage .inline-row .input{flex:1 1 100%}}

/* 说明页正文 */
html body #appPage .about-text{font-size:var(--fs-2);line-height:2;color:var(--c-ink2)}
html body #appPage .about-text b{color:var(--c-ink);font-weight:800}

/* 记忆列表用的行内元素 */
html body #appPage .law-lrow .lr-k{font-size:var(--fs-xs);color:var(--c-dim);flex:0 0 84px;overflow:hidden;text-overflow:ellipsis}
html body #appPage .law-lrow .lr-tx{flex:1;min-width:0;font-size:var(--fs-2)}

/* ---------------------------- 11.12 今日待办/节点 & 案件详情 行内元素类 ---------------------------- */
html body #appPage .td-ck{
  width:17px;height:17px;flex:0 0 17px;border-radius:5px;display:inline-flex;align-items:center;justify-content:center;
  border:1.5px solid var(--c-line-2);color:transparent;background:var(--c-surface);margin-top:1px;
}
html body #appPage .td-ck svg{width:11px;height:11px;stroke:currentColor;fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .td-ck.on{border-color:var(--c-ok);background:var(--c-ok);color:#fff}
html body #appPage .td-tx{flex:1 1 auto;min-width:0;font-size:var(--fs-2);color:var(--c-ink);line-height:1.6}
html body #appPage .td-tx.done{color:var(--c-dim);text-decoration:line-through}
html body #appPage .td-due{font-size:var(--fs-xs);color:var(--c-dim);flex:0 0 auto;white-space:nowrap}
html body #appPage .law-fill-0{flex:0 0 auto}
html body #appPage .nowrap-ell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* 案件详情：三列键值 + 小节标题 + 可点行 */
html body #appPage .kv-grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}
@media (max-width:700px){html body #appPage .kv-grid-3{grid-template-columns:1fr}}
html body #appPage .sub-title{font-size:var(--fs-2);font-weight:800;color:var(--c-ink);margin:0 0 8px}
html body #appPage tr.row-click{cursor:pointer}
html[data-mode="dark"] body #appPage .td-ck{background:var(--c-surface);border-color:var(--c-line-2)}
html[data-mode="dark"] body #appPage .td-ck.on{background:var(--c-ok);border-color:var(--c-ok)}

/* ---------------------------- 11.13 律师主页（我的门户）头部 ---------------------------- */
html body #appPage .lw-head{display:flex;gap:14px;align-items:center;margin-bottom:18px}
/* 2026-11-14 老板：头像姓名右侧对称位置放二维码，手机扫可打开该律师主页 */
html body #appPage .lw-qr{
  margin-left:auto;flex:0 0 auto;display:flex;flex-direction:column;align-items:center;gap:4px;
}
html body #appPage .lw-qr-img{
  width:78px;height:78px;display:block;border-radius:8px;background:#fff;
  padding:4px;border:1px solid var(--c-line);cursor:pointer;transition:transform .15s,box-shadow .15s;
}
html body #appPage .lw-qr-img:hover{transform:scale(1.04);box-shadow:0 3px 12px rgba(15,42,67,.16)}
html body #appPage .lw-qr-tx{font-size:11px;color:var(--c-dim);white-space:nowrap}
/* 深色：二维码保持白底（必须白边才能扫），只把描边调亮 */
html[data-mode="dark"] body #appPage .lw-qr-img{background:#fff;border-color:rgba(255,255,255,.38)}
html body #appPage .lw-av{
  width:56px;height:56px;flex:0 0 56px;border-radius:50%;
  display:grid;place-items:center;font-size:22px;font-weight:800;
  background:color-mix(in srgb,var(--lwc) 14%,transparent);color:var(--lwc);
  overflow:hidden;              /* 必须有，否则里面的 img 会按原图尺寸撑开 */  box-sizing:border-box;
}
/* 2026-11-14 深色：未上传头像时的姓名首字占位（.lw-av）用亮品牌色，否则 1.52:1 看不见 */
html[data-mode="dark"] body #appPage .lw-av{color:var(--c-on-fg);background:var(--c-on-bg)}
/* 上传头像：撑满圆形裁切 */
html body #appPage .lw-av.has-img img,
html body #appPage .lw-av img{
  width:56px!important;height:56px!important;max-width:56px!important;max-height:56px!important;
  object-fit:cover!important;object-position:center;border-radius:50%;display:block;
}
html body #appPage .lw-who{display:flex;flex-direction:column;gap:2px;min-width:0}
html body #appPage .lw-who b{font-size:16px;font-weight:800;color:var(--c-ink)}
html body #appPage .lw-who span{font-size:var(--fs-2);color:var(--c-dim)}

/* ---------------------------- 11.14 手机尺寸预览窗（phonePreview） ----------------------------
 * ⚠️ 挂 #modalRoot，不在 #appPage 内 → 不能带 #appPage 作用域 */
html body .pp-mask{
  position:fixed;inset:0;z-index:9600;
  display:flex;align-items:center;justify-content:center;
  background:rgba(17,20,24,.55);backdrop-filter:blur(2px);
  animation:ppFade .16s ease-out;
}
@keyframes ppFade{from{opacity:0}to{opacity:1}}
html body .pp-box{
  width:min(92vw,468px);max-height:92vh;
  display:flex;flex-direction:column;
  background:var(--c-surface);border-radius:16px;overflow:hidden;
  box-shadow:0 24px 64px rgba(0,0,0,.34);
}
html body .pp-bar{
  display:flex;align-items:center;gap:8px;padding:10px 12px;
  border-bottom:1px solid var(--c-line);flex:0 0 auto;
}
html body .pp-tt{font-size:var(--fs-2);font-weight:800;color:var(--c-ink);flex:0 0 auto}
html body .pp-url{
  flex:1 1 auto;min-width:0;font-size:var(--fs-xs);color:var(--c-dim);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
html body .pp-x{
  flex:0 0 26px;width:26px;height:26px;border-radius:8px;border:1px solid var(--c-line);
  background:var(--c-surface);color:var(--c-dim);font-size:12px;line-height:1;cursor:pointer;
  display:grid;place-items:center;transition:.13s;
}
html body .pp-x:hover{border-color:var(--c-brand);color:var(--c-brand)}
html body .pp-stage{padding:14px;display:flex;justify-content:center;overflow:auto;background:var(--c-bg)}
html body .pp-phone{
  position:relative;width:375px;height:720px;flex:0 0 auto;
  background:#fff;border-radius:28px;overflow:hidden;
  box-shadow:0 0 0 9px #1c2026,0 12px 28px rgba(0,0,0,.3);
}
html body .pp-notch{
  position:absolute;top:0;left:50%;transform:translateX(-50%);
  width:132px;height:22px;background:#1c2026;border-radius:0 0 12px 12px;z-index:2;pointer-events:none;
}
html body .pp-frame{width:100%;height:100%;border:0;display:block;background:#fff}
html.pp-open{overflow:hidden}
@media (max-width:520px){
  html body .pp-box{width:100vw;max-height:100vh;border-radius:0}
  html body .pp-phone{width:100%;height:calc(100vh - 54px);border-radius:0;box-shadow:none}
  html body .pp-notch{display:none}
  html body .pp-stage{padding:0}
}
html[data-mode="dark"] body .pp-stage{background:#0e1116}

/* ---------------------------- 11.15 账号页头像块（横排：圆头像 + 右侧按钮） ---------------------------- */
html body #appPage .av-block{display:flex;align-items:center;gap:18px}
html body #appPage .av-block .fig-av{margin:0;flex:0 0 96px}
html body #appPage .av-block .av-side{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:12px}
html body #appPage .av-block .fig-hint{margin:0}
html body #appPage .av-block .fig-acts{justify-content:flex-start}
@media (max-width:560px){
  html body #appPage .av-block{flex-direction:column;align-items:flex-start;gap:12px}
}

/* ---------------------------- 11.16 个性设置 · 主题色（内嵌页，不弹窗） ---------------------------- */
html body #appPage .card-h .card-cur{
  margin-left:auto;font-size:var(--fs-xs);color:var(--c-dim);font-weight:500;
}
html body #appPage .card-h .card-cur b{color:var(--c-brand);font-weight:800}
html body #appPage .ts-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px;margin:4px 0 16px;
}
html body #appPage .ts-sw{
  display:flex;flex-direction:column;align-items:center;gap:7px;
  padding:12px 6px 10px;border:1px solid var(--c-line);border-radius:12px;
  background:var(--c-surface);cursor:pointer;font-family:inherit;transition:.13s;
}
html body #appPage .ts-sw:hover{border-color:var(--c-brand-ring);background:var(--c-brand-soft)}
html body #appPage .ts-sw.on{border-color:var(--c-brand);background:var(--c-brand-soft);box-shadow:0 0 0 2px var(--c-brand-ring)}
html body #appPage .ts-dot{
  position:relative;width:34px;height:34px;border-radius:50%;background:var(--sw);
  display:grid;place-items:center;box-shadow:inset 0 0 0 1px rgba(0,0,0,.06);
}
html body #appPage .ts-ck{display:none;color:#fff;line-height:1}
html body #appPage .ts-sw.on .ts-ck{display:grid;place-items:center}
html body #appPage .ts-ck svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .ts-nm{font-size:var(--fs-xs);color:var(--c-ink2);font-weight:600}
html body #appPage .ts-sw.on .ts-nm{color:var(--c-brand)}
/* 自定义取色行 */
html body #appPage .ts-custom{
  display:flex;align-items:center;gap:10px;padding:10px 12px;
  border:1px dashed var(--c-line-2);border-radius:10px;background:var(--c-bg);
}
html body #appPage .ts-custom-l{font-size:var(--fs-2);font-weight:700;color:var(--c-ink2)}
html body #appPage .ts-custom-v{font-size:var(--fs-xs);color:var(--c-dim);font-family:ui-monospace,Menlo,monospace}
html body #appPage .ts-custom input[type=color]{
  margin-left:auto;width:44px;height:28px;padding:0;border:1px solid var(--c-line);
  border-radius:7px;background:transparent;cursor:pointer;
}
/* 明暗三项 */
html body #appPage .mode-row-3{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
html body #appPage .mode-row-3 .mode-btn{
  display:flex;align-items:center;justify-content:center;gap:7px;
  height:40px;border:1px solid var(--c-line);border-radius:10px;
  background:var(--c-surface);color:var(--c-ink2);font-size:var(--fs-2);font-weight:600;
  cursor:pointer;font-family:inherit;transition:.13s;
}
html body #appPage .mode-row-3 .mode-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.9}
html body #appPage .mode-row-3 .mode-btn:hover{border-color:var(--c-brand-ring)}
html body #appPage .mode-row-3 .mode-btn.on{
  border-color:var(--c-brand);color:var(--c-brand);background:var(--c-brand-soft);font-weight:800;
}
@media (max-width:560px){html body #appPage .ts-grid{grid-template-columns:repeat(3,1fr)}}

/* 顶栏白天/夜晚按钮（与云课堂 #btn-mode 一致） */
html body .tb-mode svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html[data-mode="dark"] body .tb-mode svg{stroke:#F5C451}

/* ---------------------------- 11.17 弹窗基础样式（补历史缺失） ----------------------------
 * 背景：core.js 的 LAW.modal 会产出 .modal-mask/.modal/.modal-h/.modal-b/.modal-f，
 *       但这套类**从来没有 CSS**（第 8 轮排查发现，导致新建案件弹窗撑成 1440px 裸壳）。
 *       案件表单已改页面，但「案件详情」「扫码支付」「二次确认」仍在用 → 这里补齐。
 * ⚠️ 挂 #modalRoot，不在 #appPage 内 → 不能带 #appPage 作用域 */
html body .modal-mask{
  position:fixed;inset:0;z-index:9500;
  display:flex;align-items:center;justify-content:center;
  background:rgba(17,20,24,.46);
  animation:lmFade .14s ease-out;
}
@keyframes lmFade{from{opacity:0}to{opacity:1}}
html body .modal{
  width:min(92vw,640px);max-height:86vh;
  display:flex;flex-direction:column;
  background:var(--c-surface);border-radius:14px;overflow:hidden;
  box-shadow:0 20px 56px rgba(0,0,0,.3);
  animation:lmUp .16s ease-out;
}
@keyframes lmUp{from{transform:translateY(10px);opacity:.6}to{transform:none;opacity:1}}
html body .modal.md{width:min(92vw,720px)}
html body .modal.lg{width:min(94vw,920px)}
html body .modal.sm{width:min(90vw,420px)}
html body .modal-h{
  display:flex;align-items:center;gap:8px;flex:0 0 auto;
  padding:14px 16px;border-bottom:1px solid var(--c-line);
}
html body .modal-h .mt{flex:1;min-width:0;font-size:var(--fs-3);font-weight:800;color:var(--c-ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html body .modal-b{flex:1 1 auto;overflow:auto;padding:16px;min-height:0}
html body .modal-f{
  flex:0 0 auto;display:flex;align-items:center;justify-content:flex-end;gap:8px;
  padding:12px 16px;border-top:1px solid var(--c-line);background:var(--c-surface);
}
html body .modal-f .btn{height:34px!important}
html body .modal-mask.show{display:flex}
/* 窄屏：底部弹出式 */
@media (max-width:560px){
  html body .modal-mask{align-items:flex-end}
  html body .modal{width:100vw;max-height:88vh;border-radius:14px 14px 0 0}
}
html[data-mode="dark"] body .modal{background:var(--c-surface)}
html[data-mode="dark"] body .modal-mask{background:rgba(0,0,0,.62)}

/* ---------------------------- 11.18 长期记忆列表行 ---------------------------- */
html body #appPage .mem-row{align-items:flex-start;gap:10px}
html body #appPage .mem-row .lr-tx{line-height:1.65}
html body #appPage .mem-row .mem-tags{display:flex;gap:5px;flex-wrap:wrap;flex:0 0 auto}
html body #appPage .mem-row .lr-k{flex:0 0 auto;font-variant-numeric:tabular-nums}
html body #appPage .mem-row .btn.sm{flex:0 0 auto}

/* ---------------------------- 11.19 文档页（按云课堂「文档」页对齐）----------------------------
 * 移植自 edu.hkimf.com/assets/app.css「文档页顶部重构」+「doc-row」两段，
 * 类名保持一致（doc-toolbar / doc-filter / doc-tabs / doc-tab / doc-count / doc-row / doc-ico /
 * doc-main / doc-kind / doc-del），便于两站对照维护。
 * 2026-11-13 老板：法务通「文档」参照云课堂排版、筛选分类及按钮功能 */
html body #appPage .doc-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
html body #appPage .doc-toolbar-lab{font-size:var(--fs-2);color:var(--c-dim);flex:0 0 auto}
html body #appPage .doc-hint{font-size:var(--fs-xs);color:var(--c-dim);line-height:1.5;margin-left:auto;text-align:right}
html body #appPage .doc-search{max-width:260px;height:34px!important;font-size:var(--fs-2)}
html body #appPage .doc-sort{max-width:130px;height:34px!important;font-size:var(--fs-2)}

html body #appPage .doc-filter{
  display:flex;align-items:flex-end;justify-content:space-between;gap:12px;
  border-bottom:1px solid var(--c-line);margin:8px 0 14px;
}
html body #appPage .doc-tabs{display:flex;gap:22px;overflow-x:auto;scrollbar-width:none}
html body #appPage .doc-tabs::-webkit-scrollbar{display:none}
html body #appPage .doc-tab{
  padding:9px 1px;font-size:var(--fs-2);color:var(--c-dim);cursor:pointer;white-space:nowrap;
  border-bottom:2px solid transparent;margin-bottom:-1px;user-select:none;
  transition:color .15s,border-color .15s;
}
html body #appPage .doc-tab:hover{color:var(--c-ink)}
html body #appPage .doc-tab.active{color:var(--c-on-fg);border-bottom-color:var(--c-brand);font-weight:600}
/* 2026-11-14 深色：文档页一级页签 active 用统一选中色 */
html[data-mode="dark"] body #appPage .doc-tab.active{color:var(--c-on-fg);border-bottom-color:var(--c-on-fg)}
html body #appPage .doc-tab:focus-visible{outline:2px solid var(--c-brand-ring);outline-offset:2px;border-radius:3px}
html body #appPage .doc-count{font-size:var(--fs-xs);color:var(--c-dim);padding-bottom:9px;white-space:nowrap}

html body #appPage .doc-row{
  display:flex;align-items:center;gap:8px;padding:12px 14px;
  border:1px solid var(--c-line);border-radius:var(--r-card);
  margin-bottom:8px;background:var(--c-surface);transition:border-color .15s,box-shadow .15s;
}
html body #appPage .doc-row:hover{border-color:var(--c-brand-ring);box-shadow:0 2px 8px rgba(16,24,40,.06)}
html body #appPage .doc-ico{
  flex:0 0 34px;width:34px;height:34px;border-radius:9px;
  background:var(--c-brand-soft);color:var(--c-brand);
  display:flex;align-items:center;justify-content:center;
  font-size:var(--fs-2);font-weight:700;letter-spacing:-.2px;
}
html body #appPage .doc-main{flex:1;min-width:0}
html body #appPage .doc-main b{
  display:block;font-size:var(--fs-2);color:var(--c-ink);font-weight:600;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
html body #appPage .doc-main span{display:block;font-size:var(--fs-xs);color:var(--c-dim);margin-top:2px;line-height:1.6}
html body #appPage .doc-kind{
  display:inline-block;font-style:normal;padding:0 7px;border-radius:999px;
  font-size:11px;line-height:17px;background:var(--c-brand-soft);color:var(--c-brand);
  margin-right:7px;vertical-align:1px;
}
html body #appPage .doc-kind.k-contract{background:#ECFDF5;color:#047857}
html body #appPage .doc-kind.k-opinion{background:#EFF6FF;color:#1D4ED8}
html body #appPage .doc-kind.k-review{background:#FFFBEB;color:#B45309}
html body #appPage .doc-kind.k-complaint{background:#FEF2F2;color:#B42318}
html body #appPage .doc-kind.k-other{background:#F3F4F6;color:#4B5563}
html body #appPage .doc-row .btn.sm{padding:4px 9px;font-size:var(--fs-xs);height:28px!important;flex:0 0 auto}
html body #appPage .doc-del{color:#B42318!important}
html body #appPage .doc-del:hover{background:#FEF3F2!important;border-color:#FDA29B!important}
html body #appPage .doc-row a.btn{text-decoration:none;display:inline-flex;align-items:center}
@media (max-width:700px){
  html body #appPage .doc-tabs{gap:16px}
  html body #appPage .doc-hint{display:none}
  html body #appPage .doc-row{flex-wrap:wrap}
}
/* 暗色 */
html[data-mode="dark"] body #appPage .doc-row{background:var(--c-surface);border-color:var(--c-line)}
html[data-mode="dark"] body #appPage .doc-row:hover{border-color:var(--c-brand-ring);box-shadow:none}
html[data-mode="dark"] body #appPage .doc-kind{filter:brightness(.92) saturate(1.1)}

/* ============================================================
 * 11.20 · AI法务团队 HUB（2026-11-13 老板）
 *   侧栏「对话」下新增入口，卡片墙一行四个：头像 + 名称 + 简介
 * ============================================================ */
.tm-page{padding:2px 2px 24px}
.tm-hero{display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap;padding:4px 2px 16px;border-bottom:1px solid var(--c-line);margin-bottom:16px}
/* 2026-11-14 页头结构统一：hero 已改成 .page-h 结构，子容器需要撑满 */
.tm-hero > div:first-child{flex:1;min-width:220px}
.tm-hero-l{flex:1;min-width:220px}
.tm-title{margin:0;font-size:20px;font-weight:700;color:var(--c-ink);letter-spacing:.3px;line-height:1.3}
.tm-sub{margin:6px 0 0;font-size:var(--fs-2);color:var(--c-dim);line-height:1.7}
.tm-hero-r{display:flex;gap:10px;flex:0 0 auto}
.tm-stat{display:flex;align-items:baseline;gap:5px;background:var(--c-brand-soft);border:1px solid var(--c-brand-ring);border-radius:10px;padding:7px 13px}
.tm-stat b{font-size:17px;font-weight:700;color:var(--c-brand);line-height:1}
.tm-stat span{font-size:11.5px;color:var(--c-brand)}
/* 2026-11-14 深色：团队页「N 位在岗」深藏青字在深底上只有 1.81:1 */
html[data-mode="dark"] .tm-stat b,html[data-mode="dark"] .tm-stat span{color:var(--c-on-fg)}
html[data-mode="dark"] .tm-stat{background:var(--c-on-bg);border-color:var(--c-on-bd)}

.tm-sec{margin-top:20px}
.tm-sec-h{display:flex;align-items:center;gap:8px;padding:0 2px 10px}
.tm-sec-t{margin:0;font-size:13px;font-weight:700;color:var(--c-ink);letter-spacing:.4px;line-height:1.3}
.tm-sec-n{font-size:11px;font-weight:600;color:var(--c-brand);background:var(--c-brand-soft);border-radius:999px;padding:2px 8px;line-height:1.5}
.tm-sec-hint{font-size:11.5px;color:var(--c-dim)}

.tm-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}

/* —— 卡片 —— */
.tm-card{
  position:relative;display:flex;flex-direction:column;gap:9px;
  background:#fff;border:1px solid var(--c-line);border-radius:14px;
  padding:14px 14px 11px;cursor:pointer;
  transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease;
}
.tm-card:hover{
  border-color:var(--c-brand-ring);
  box-shadow:0 4px 16px rgba(16,24,40,.08);
  transform:translateY(-1px);
}
.tm-card:active{transform:translateY(0)}
.tm-card:focus-visible{outline:2px solid var(--c-brand-ring);outline-offset:2px}

.tm-top{display:flex;align-items:center;gap:10px;min-width:0}
.tm-avw{
  flex:0 0 42px;width:42px;height:42px;border-radius:13px;overflow:hidden;
  background:color-mix(in srgb,var(--av,var(--c-brand)) 13%,#fff);
  box-shadow:0 1px 3px rgba(16,24,40,.12);
}
.tm-avw--lg{flex:0 0 48px;width:48px;height:48px;border-radius:15px}
.tm-av{width:100%;height:100%;object-fit:cover;display:block}

.tm-nm{min-width:0;flex:1;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.tm-nm b{font-size:14px;font-weight:700;color:var(--c-ink);line-height:1.35;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tm-em{font-style:normal;font-size:13px;line-height:1;opacity:.9}
.tm-badge{font-style:normal;font-size:10.5px;font-weight:600;color:var(--c-brand);
  background:var(--c-brand-soft);border-radius:999px;padding:1px 7px;line-height:1.6;white-space:nowrap}

.tm-brief{
  margin:0;font-size:11.8px;line-height:1.7;color:var(--c-dim);
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  min-height:calc(1.7em * 3);
}
.tm-foot{display:flex;align-items:center;gap:4px;padding-top:2px;margin-top:auto}
.tm-go{font-size:11.5px;font-weight:600;color:var(--c-brand);line-height:1;opacity:.6;transition:opacity .15s}
.tm-foot svg{color:var(--c-brand);opacity:.6;transition:opacity .15s,transform .15s}
.tm-card:hover .tm-go{opacity:1}
.tm-card:hover .tm-foot svg{opacity:1;transform:translateX(2px)}

/* 大管家卡：整行通栏，强调入口 */
.tm-card--butler{
  flex-direction:row;flex-wrap:wrap;align-items:center;gap:14px;
  background:linear-gradient(135deg,var(--c-brand-soft) 0%,#fff 62%);
  border-color:var(--c-brand-ring);padding:16px 18px;
}
.tm-card--butler .tm-top{flex:0 0 auto}
.tm-card--butler .tm-brief{flex:1 1 260px;min-width:180px;-webkit-line-clamp:2;min-height:0;
  font-size:12.5px;color:var(--c-ink2)}
.tm-card--butler .tm-foot{flex:0 0 auto;margin-top:0}
.tm-card--butler .tm-go{font-size:12.5px;opacity:1}
.tm-card--butler .tm-foot svg{opacity:1}

@media(max-width:1180px){ .tm-grid{grid-template-columns:repeat(3,minmax(0,1fr))} }
@media(max-width:860px){
  .tm-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .tm-card{padding:12px 12px 10px}
  .tm-card--butler{flex-direction:column;align-items:flex-start;gap:9px}
  .tm-title{font-size:18px}
}
@media(max-width:520px){ .tm-grid{grid-template-columns:minmax(0,1fr)} }

/* 暗色 */
html[data-mode="dark"] .tm-card{background:var(--c-surface);border-color:var(--c-line)}
html[data-mode="dark"] .tm-card:hover{border-color:var(--c-brand);box-shadow:0 4px 16px rgba(0,0,0,.35)}
html[data-mode="dark"] .tm-card--butler{background:linear-gradient(135deg,rgba(var(--c-brand-rgb),.20) 0%,var(--c-surface) 62%)}
html[data-mode="dark"] .tm-avw{background:#242A32;box-shadow:none}
html[data-mode="dark"] .tm-stat{background:rgba(var(--c-brand-rgb),.18);border-color:rgba(var(--c-brand-rgb),.34)}
html[data-mode="dark"] .tm-sec-n{background:rgba(var(--c-brand-rgb),.18);color:var(--c-on-fg)}
html[data-mode="dark"] .tm-badge{background:rgba(var(--c-brand-rgb),.18);color:var(--c-on-fg)}
/* 2026-11-14 修：团队卡片里的「开始对话 / 数字」在深色底上是深藏青字（1.81:1），换亮品牌色 */
html[data-mode="dark"] .tm-go{color:var(--c-on-fg)}
html[data-mode="dark"] .tm-foot svg{color:var(--c-on-fg)}
html[data-mode="dark"] .tm-sec-n,
html[data-mode="dark"] .tm-card--butler .tm-go{color:var(--c-on-fg)}
/* 今日页卡片底部「去客户管理 →」同类问题 */
html[data-mode="dark"] body #pageRoot .td-card-more{color:var(--c-on-fg)}

/* ============================================================
 * 11.21 · 对话页中栏：可收缩 + 最新对话分组 + 全部专家（2026-11-13 老板）
 *   参照云课堂 .chat-mid（167px、圆角头像、移入中栏、midcol 收缩）
 * ============================================================ */
#appPage .chat-shell{position:relative}
#appPage .chat-mid{
  width:196px;flex:0 0 196px;background:#fff;border-right:1px solid var(--c-line);
  display:flex;flex-direction:column;transition:width .18s ease,flex-basis .18s ease,opacity .18s ease;
}
#appPage .chat-shell.midcol .chat-mid{width:0;flex-basis:0;opacity:0;border-right:0;overflow:hidden}

#appPage .chat-mid-h{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:12px 10px 8px 14px;margin:0;border-bottom:0;
  font-size:11.5px;font-weight:700;color:var(--c-dim);letter-spacing:.08em;
}
#appPage .chat-mid-tx{flex:1;min-width:0}
#appPage .chat-mid-tg{
  flex:0 0 22px;width:22px;height:22px;border:1px solid var(--c-line);background:#fff;
  color:var(--c-dim);border-radius:7px;cursor:pointer;display:inline-flex;
  align-items:center;justify-content:center;padding:0;transition:all .15s;
}
#appPage .chat-mid-tg:hover{color:var(--c-brand);border-color:var(--c-brand-ring);background:var(--c-brand-soft)}

#appPage .chat-job-list{padding:0 6px 10px;flex:1;overflow-y:auto}
#appPage .chat-job{
  display:flex;align-items:center;gap:9px;padding:8px 9px;margin:0;
  border-radius:10px;cursor:pointer;border-bottom:0;transition:background .12s;
}
#appPage .chat-job:hover{background:#F4F6FA}
#appPage .chat-job.on{background:var(--c-brand-soft);box-shadow:none}
#appPage .chat-job.on::before{display:none}
#appPage .chat-job-av{
  width:28px;height:28px;flex:0 0 28px;border-radius:50%!important;
  object-fit:cover;box-shadow:none;background:#EEF1F6;
}
#appPage .chat-job.on .chat-job-av{box-shadow:0 0 0 2px var(--c-brand-ring)}
#appPage .chat-job-t b{font-size:12.8px;font-weight:600;color:var(--c-ink);line-height:1.4;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
#appPage .chat-job.on .chat-job-t b{color:var(--c-brand)}
#appPage .chat-job-t i{display:none}

/* 分组标题 */
#appPage .chat-job-sep{
  display:flex;align-items:center;gap:6px;padding:12px 10px 5px;margin:0;
  font-size:10.8px;font-weight:700;color:var(--c-dim);letter-spacing:.08em;
  border:0;background:none;
}
#appPage .chat-job-sep .cjs-n{
  font-style:normal;font-size:10px;font-weight:600;color:var(--c-brand);
  background:var(--c-brand-soft);border-radius:999px;padding:0 6px;line-height:1.7;
}
#appPage .chat-job-empty{padding:6px 10px 10px;font-size:11.5px;color:var(--c-dim);line-height:1.6}
#appPage .chat-mid-load{padding:14px 10px;font-size:12px;color:var(--c-dim)}

/* 底部：全部专家 */
#appPage .chat-mid-f{padding:8px 8px 10px;border-top:1px solid var(--c-line);background:#fff}
#appPage .chat-mid-all{
  width:100%;display:flex;align-items:center;justify-content:center;gap:5px;
  border:1px solid var(--c-line);background:#fff;color:var(--c-ink2);
  border-radius:9px;padding:7px 10px;font-size:12.3px;font-weight:600;cursor:pointer;
  transition:all .15s;font-family:inherit;
}
#appPage .chat-mid-all:hover{color:var(--c-brand);border-color:var(--c-brand-ring);background:var(--c-brand-soft)}

/* 收缩后的展开条 */
#appPage .chat-mid-open{
  display:none;width:16px;flex:0 0 16px;border:0;background:#EEF1F6;
  color:var(--c-dim);cursor:pointer;align-items:center;justify-content:center;padding:0;
}
#appPage .chat-shell.midcol .chat-mid-open{display:flex}
#appPage .chat-mid-open:hover{background:var(--c-brand-soft);color:var(--c-brand)}

/* 顶部头像一个裁切保险（防图片撑开） */
#appPage .chat-ava{width:38px;height:38px;flex:0 0 38px;border-radius:50%!important;
  object-fit:cover;overflow:hidden;background:#EEF1F6}

/* 暗色 */
html[data-mode="dark"] #appPage .chat-mid,
html[data-mode="dark"] #appPage .chat-mid-f,
html[data-mode="dark"] #appPage .chat-mid-all{background:var(--c-surface)}
html[data-mode="dark"] #appPage .chat-job:hover{background:#1E242C}
html[data-mode="dark"] #appPage .chat-job.on{background:rgba(var(--c-brand-rgb),.22)}
html[data-mode="dark"] #appPage .chat-job-av{background:#242A32}
html[data-mode="dark"] #appPage .chat-mid-tg{background:var(--c-surface);border-color:var(--c-line)}
html[data-mode="dark"] #appPage .chat-mid-open{background:#242A32}
html[data-mode="dark"] #appPage .chat-mid-all{color:var(--c-ink2);border-color:var(--c-line)}
html[data-mode="dark"] #appPage .chat-ava{background:#242A32}

@media(max-width:860px){
  /* 窄屏：中栏改为浮层叠加，不收占位 */
  #appPage .chat-shell{position:relative}
  #appPage .chat-mid{position:absolute;left:0;top:0;z-index:20;height:100%;box-shadow:6px 0 20px rgba(16,24,40,.10)}
  #appPage .chat-shell:not(.midcol) #lawChatMid{width:196px;flex-basis:196px;opacity:1}
  /* 2026-11-13：展开条浮在左边缘，不挤占主区、也不压住列表(列表展开时置于更上层) */
  #appPage .chat-mid-open{
    display:flex;position:absolute;left:0;top:0;bottom:0;z-index:5;
    border-radius:0 8px 8px 0;
  }
  #appPage .chat-shell:not(.midcol) .chat-mid-open{display:none}
  #appPage .chat-shell:not(.midcol) .chat-main{margin-left:16px}
}

/* ============================================================
 * 11.22 · 对话输入框：字号加大 + 文字与两侧图标中线对齐（2026-11-13 老板）
 *   问题：textarea 带 padding 后会顶偏，文字基线跟附件/语音按钮中线不齐
 *   修法：整条 flex 居中，textarea 单行高度锁定 = 图标高，靠 line-height 对齐
 * ============================================================ */
#appPage .chat-input-wrap{
  display:flex;align-items:center;gap:8px;padding:6px 6px 6px 12px;
}
#appPage .chat-input-wrap > *{align-self:center}
#appPage .chat-input-wrap textarea{
  flex:1;min-width:0;
  font-size:15px;              /* 原 var(--fs-3)≈13.5px，加大一档 */
  line-height:22px;
  height:34px;min-height:34px;max-height:140px;
  padding:6px 0;margin:0;
  box-sizing:border-box;
  display:block;
}
/* 多行展开时仍与按钮保持中线视觉：按钮顶部对齐 */
#appPage .chat-input-wrap:has(textarea[style*="px"]) > .chat-attach,
#appPage .chat-input-wrap:has(textarea[style*="px"]) > .chat-mic,
#appPage .chat-input-wrap:has(textarea[style*="px"]) > .chat-send{align-self:flex-end}

#appPage .chat-attach,
#appPage .chat-mic{
  width:34px;height:34px;flex:0 0 34px;border-radius:9px;
  display:inline-flex;align-items:center;justify-content:center;padding:0;
}
#appPage .chat-send{
  height:34px;padding:0 18px;flex:0 0 auto;border-radius:9px;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:13.5px;line-height:1;
}
/* 占位符字号同步 */
#appPage .chat-input-wrap textarea::placeholder{font-size:15px}

@media(max-width:860px){
  #appPage .chat-input-wrap textarea{font-size:15px}
  #appPage .chat-attach,#appPage .chat-mic{width:32px;height:32px;flex:0 0 32px}
  #appPage .chat-send{height:32px;padding:0 14px}
}

/* 空状态大头像：图片版（2026-11-13 老板：对话区头像缺失） */
#appPage .asst-empty-avw{
  width:64px;height:64px;border-radius:50%;overflow:hidden;
  margin:0 auto 12px;display:block;
  background:color-mix(in srgb,var(--av,var(--c-brand)) 13%,#fff);
  box-shadow:0 4px 14px rgba(16,24,40,.14);
}
#appPage .asst-empty-avw .asst-empty-av{
  width:100%!important;height:100%!important;border-radius:50%;
  object-fit:cover;display:block;background:transparent;
  box-shadow:none;margin:0;
}
html[data-mode="dark"] #appPage .asst-empty-avw{background:#242A32;box-shadow:none}

/* ============================================================
 * 11.23 · 顶栏副标题 + 弹窗关闭按钮美化（2026-11-13 老板）
 * ============================================================ */

/* 副标题「你的专属法务工作平台」比原「律师版」长，弱化底色避免抢品牌 */
.topbar .b-ver{
  font-size:11.5px;font-weight:600;letter-spacing:.2px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.28);
  border-radius:999px;padding:2px 10px;line-height:1.6;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:190px;
}
/* 中屏开始收窄，窄屏隐藏（保持品牌 + 用户区完整） */
@media(max-width:1200px){ .topbar .b-ver{max-width:150px;font-size:11px;padding:2px 8px} }
@media(max-width:1000px){ .topbar .b-ver{display:none} }

/* ---------- 弹窗右上角关闭按钮（全站 .modal 通用） ---------- */
html body .modal-h{padding-right:12px}
html body .modal-h .modal-x{
  flex:0 0 30px;width:30px;height:30px;
  display:inline-flex;align-items:center;justify-content:center;
  margin-left:auto;padding:0;border:0;cursor:pointer;
  background:transparent;color:var(--c-dim);
  border-radius:9px;
  transition:background .15s ease,color .15s ease,transform .12s ease;
  font-family:inherit;
}
html body .modal-h .modal-x:hover{
  background:var(--c-hover,#F1F3F5);color:var(--c-ink);
}
html body .modal-h .modal-x:active{transform:scale(.94)}
html body .modal-h .modal-x:focus-visible{
  outline:2px solid var(--c-brand-ring);outline-offset:1px;
}
html body .modal-h .modal-x svg{display:block;pointer-events:none}

/* 危险确认框（如删除）：关闭按钮用红调，提示语义 */
html body .modal-h .modal-x.danger:hover{background:#FEE2E2;color:#DC2626}

html[data-mode="dark"] body .modal-h .modal-x:hover{background:#242A32;color:var(--c-ink)}
html[data-mode="dark"] body .modal-h .modal-x.danger:hover{background:#3B1D1D;color:#F87171}

/* 预览浮层（.pp-x）同样美化，保持全站一致 */
html body .pp-x{
  display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;border-radius:8px;border:0;padding:0;
  background:transparent;color:var(--c-dim);cursor:pointer;
  transition:background .15s,color .15s;
}
html body .pp-x:hover{background:rgba(0,0,0,.06);color:var(--c-ink)}
html[data-mode="dark"] body .pp-x:hover{background:#242A32;color:var(--c-ink)}

/* ============================================================================
 * 文档预览器 docview.js（2026-11-14 老板：Word 打开方式对齐平台工作台）
 * 全屏浮层 + 顶部工具条 + 白底纸张区；docx 用 docx-preview、pdf 用 pdf.js
 * ========================================================================== */
html.dv-lock, html.dv-lock body{overflow:hidden}
html body .dv-root{
  position:fixed;inset:0;z-index:9000;display:none;flex-direction:column;
  background:var(--c-bg,#F4F6FA);
}
html body .dv-root.on{display:flex}
/* 顶部工具条 */
html body .dv-bar{
  flex:0 0 auto;display:flex;align-items:center;gap:8px;
  padding:9px 14px;background:#fff;border-bottom:1px solid var(--c-line,#E5E8EF);
  box-shadow:0 1px 2px rgba(16,24,40,.04);
}
html[data-mode="dark"] body .dv-bar{background:#171B21;border-bottom-color:#262C35}
html body .dv-btn{
  display:inline-flex;align-items:center;gap:5px;height:30px;padding:0 11px;
  border:1px solid var(--c-line,#E5E8EF);border-radius:8px;background:#fff;
  color:var(--c-ink,#111827);font-size:12.5px;font-family:inherit;cursor:pointer;
  transition:background .15s,border-color .15s,transform .12s;
}
html body .dv-btn:hover{background:var(--c-hover,#F3F5F9);border-color:var(--c-line2,#D5DAE4)}
html body .dv-btn:active{transform:scale(.97)}
html[data-mode="dark"] body .dv-btn{background:#1E242C;border-color:#2B323C;color:#E5E7EB}
html body .dv-btn.dv-x{margin-left:2px}
html body .dv-ic{
  flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;
  min-width:38px;height:22px;padding:0 6px;border-radius:6px;
  font-size:10.5px;font-weight:800;letter-spacing:.4px;
  background:rgba(30,58,138,.10);color:var(--c-brand,#1E3A8A);
}
html body .dv-ic.f-pdf{background:rgba(220,38,38,.10);color:#DC2626}
html body .dv-name{
  min-width:0;max-width:52vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:13.5px;font-weight:650;color:var(--c-ink,#111827);
}
html body .dv-sp{flex:1 1 auto}
html body .dv-page{font-size:12px;color:var(--c-dim,#8A93A3);white-space:nowrap}
/* 主体 */
html body .dv-body{
  flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch;
  padding:20px 16px 40px;background:#EDF0F5;
}
html[data-mode="dark"] body .dv-body{background:#12161B}
/* 纸张 */
html body .dv-paper{
  max-width:900px;margin:0 auto;background:#fff;border-radius:10px;
  box-shadow:0 2px 14px rgba(16,24,40,.10);padding:34px 40px;
  font-size:14px;line-height:1.85;color:#1F2937;
}
html body .dv-paper.dv-text pre{white-space:pre-wrap;word-break:break-word;font-family:inherit;margin:0}
/* docx-preview 生成的结构：容器已给了纸张，内部 wrapper 去掉自带阴影 */
html body .dv-paper .docx-wrapper{background:transparent!important;padding:0!important}
html body .dv-paper .docx-wrapper>section.docx{
  box-shadow:none!important;background:#fff!important;margin:0 auto 18px!important;
  padding:0!important;border-radius:0!important;
}
html body .dv-paper .docx-wrapper>section.docx:last-child{margin-bottom:0!important}
/* pdf 画布 */
html body .dv-pdf{max-width:1100px;margin:0 auto}
html body .dv-pagec{
  display:block;max-width:100%;margin:0 auto 14px;background:#fff;border-radius:4px;
  box-shadow:0 2px 10px rgba(16,24,40,.18);
}
/* 图片 */
html body .dv-imgwrap{text-align:center}
html body .dv-imgwrap img{max-width:100%;border-radius:8px;background:#fff;box-shadow:0 2px 14px rgba(16,24,40,.12)}
/* 加载 / 失败 */
html body .dv-load{
  max-width:520px;margin:56px auto;background:#fff;border:1px solid var(--c-line,#E5E8EF);
  border-radius:12px;padding:28px 24px;text-align:center;color:var(--c-dim,#8A93A3);
  font-size:13.5px;line-height:1.7;
}
html body .dv-load b{display:block;color:var(--c-ink,#111827);font-size:14.5px;margin-bottom:6px}
html body .dv-load p{margin:0}
html body .dv-fail-hint{color:var(--c-dim,#8A93A3);font-size:12.5px;margin-top:8px!important}
html body .dv-spin{
  display:inline-block;width:18px;height:18px;margin-right:8px;vertical-align:-3px;
  border:2px solid rgba(30,58,138,.22);border-top-color:var(--c-brand,#1E3A8A);
  border-radius:50%;animation:dvspin .8s linear infinite;
}
@keyframes dvspin{to{transform:rotate(360deg)}}
html[data-mode="dark"] body .dv-load{background:#171B21;border-color:#2B323C}
html[data-mode="dark"] body .dv-paper{background:#fff}
@media (max-width:768px){
  html body .dv-bar{padding:8px 10px;gap:6px;flex-wrap:wrap}
  html body .dv-name{max-width:40vw;font-size:13px}
  html body .dv-page{display:none}
  html body .dv-body{padding:10px 8px 30px}
  html body .dv-paper{padding:18px 14px;border-radius:8px}
}

/* ============================================================================
 * 对话页右栏：岗位行胶囊（2026-11-14 老板：右栏「开始对话」加个胶囊）
 * ========================================================================== */
#appPage .chat-job{position:relative}
#appPage .chat-job-t i.chat-job-act{
  display:inline-flex;align-items:center;justify-content:center;
  margin-top:5px;padding:2px 9px;border-radius:999px;
  font-style:normal;font-size:10.8px;font-weight:600;line-height:1.6;letter-spacing:.02em;
  color:var(--c-brand);
  background:transparent;
  border:1px solid color-mix(in srgb,var(--c-brand) 32%,transparent);
  transition:background .15s,color .15s,border-color .15s;
  -webkit-user-select:none;user-select:none;
}
#appPage .chat-job:hover .chat-job-act{
  background:var(--c-brand);color:#fff;border-color:var(--c-brand);
}
#appPage .chat-job.on .chat-job-t i.chat-job-act{
  background:var(--c-brand);color:#fff;border-color:var(--c-brand);
}
#appPage .chat-job.on .chat-job-act{opacity:.92}
html[data-mode="dark"] #appPage .chat-job-t i.chat-job-act{
  color:#C7D2FE;border-color:rgba(199,210,254,.34);
}
html[data-mode="dark"] #appPage .chat-job:hover .chat-job-act,
html[data-mode="dark"] #appPage .chat-job.on .chat-job-act{
  background:var(--c-brand);color:#fff;border-color:var(--c-brand);
}

/* ============================================================================
 * 首页：客户经营 + 快捷入口（2026-11-14 集成）
 * ========================================================================== */

/* 客户经营 */
html body #pageRoot .td-cust-grid{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;padding:2px 0 8px;
}
html body #pageRoot .td-cust-cell{
  display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:9px 4px;border-radius:10px;text-decoration:none;
  background:var(--c-surface,#F7F9FC);border:1px solid transparent;
  transition:background .15s,border-color .15s,transform .12s;
}
html body #pageRoot .td-cust-cell:hover{
  background:var(--c-brand-soft);border-color:var(--c-brand-ring);transform:translateY(-1px);
}
html body #pageRoot .td-cust-n{
  font-size:18px;font-weight:750;color:var(--c-ink);line-height:1.1;
  font-variant-numeric:tabular-nums;
}
html body #pageRoot .td-cust-cell.has .td-cust-n{color:var(--c-brand)}
html body #pageRoot .td-cust-t{
  display:inline-flex;align-items:center;gap:3px;font-size:11.2px;color:var(--c-dim);white-space:nowrap;
}
html body #pageRoot .td-cust-t svg{width:12px;height:12px;opacity:.75}
html body #pageRoot .td-cust-recent{border-top:1px dashed var(--c-line);padding-top:6px}
html body #pageRoot .td-cust-row{
  display:flex;align-items:center;gap:8px;padding:5px 2px;font-size:12.5px;
}
html body #pageRoot .td-cust-who{flex:1;min-width:0;color:var(--c-ink2);font-weight:600}
html body #pageRoot .td-cust-ago{flex:0 0 auto;font-size:11.5px;color:var(--c-dim)}
html body #pageRoot .td-cust-more{
  display:inline-block;margin-top:8px;font-size:12.5px;font-weight:600;
  color:var(--c-brand);text-decoration:none;
}
html body #pageRoot .td-cust-more:hover{text-decoration:underline}

/* 快捷入口：规则见文末「首页 v3 版式」（固定 4 列 × 2 行，不再按宽度降到 3 列） */
html body #pageRoot .td-q{
  position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  padding:14px 6px;border-radius:11px;text-decoration:none;
  background:var(--c-surface,#F7F9FC);border:1px solid var(--c-line,#E5E8EF);
  transition:background .15s,border-color .15s,transform .12s,box-shadow .15s;
}
html body #pageRoot .td-q:hover{
  background:#fff;border-color:var(--c-brand-ring);
  box-shadow:0 4px 14px rgba(30,58,138,.10);transform:translateY(-2px);
}
html body #pageRoot .td-q-ic{
  display:inline-flex;align-items:center;justify-content:center;
  width:32px;height:32px;border-radius:9px;
  background:var(--c-brand-soft);color:var(--c-brand);
}
html body #pageRoot .td-q-ic svg{width:16px;height:16px}
html body #pageRoot .td-q-nm{font-size:12.5px;font-weight:600;color:var(--c-ink);white-space:nowrap}
html body #pageRoot .td-q-tag{
  position:absolute;top:6px;right:6px;font-style:normal;
  font-size:9.5px;font-weight:700;line-height:1.5;padding:0 5px;border-radius:999px;
  color:#B45309;background:#FEF3C7;
}
html[data-mode="dark"] body #pageRoot .td-cust-cell,
html[data-mode="dark"] body #pageRoot .td-q{background:#1B2129;border-color:#2A313B}
html[data-mode="dark"] body #pageRoot .td-q:hover{background:#212932}
html[data-mode="dark"] body #pageRoot .td-q-tag{background:#3A2E12;color:#FBBF24}

/* 2026-11-14 修：.chat-job-list 在宽屏下被误套 flex 行布局（岗位行被拉高到数百 px）
   与云课堂一致：竖列 + 岗位行高度自适应 */
html body #appPage .chat-job-list{display:block!important;gap:0!important;overflow-x:visible!important}
html body #appPage .chat-job-list>#lawJobList,
html body #appPage #lawJobList{display:block!important}
html body #appPage .chat-job{
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;
  align-items:center!important;height:auto!important;min-height:0!important;
  flex:0 0 auto!important;
}
html body #appPage .chat-job-t{flex:1 1 auto!important;min-width:0!important}

/* ============================================================================
 * 首页 v3 版式（2026-11-14 老板：各区块排列整齐 + 美化）
 * 统一节奏：块间距 12px，卡片内边距一致，等高对齐
 * ========================================================================== */
html body #pageRoot .td-page{display:flex;flex-direction:column;gap:12px}
html body #pageRoot .td-block{margin-top:0!important}
html body #pageRoot .td-page .page-h{margin-bottom:0!important}
html body #pageRoot .td-alerts:empty{display:none}
html body #pageRoot .td-alerts .alerts{margin:0}

/* 卡片统一：等高、内边距一致、头部对齐 */
html body #pageRoot .td-card{
  display:flex;flex-direction:column;margin:0!important;
  padding:0!important;overflow:hidden;
}
html body #pageRoot .td-card>.card-h{
  margin:0;padding:12px 14px;border-bottom:1px solid var(--c-line);
  display:flex;align-items:center;gap:8px;min-height:46px;
}
html body #pageRoot .td-card>.card-h .card-t{font-size:13.5px;font-weight:700;margin:0}
html body #pageRoot .td-card>.card-h .dim{margin-left:auto;font-size:11.5px}
html body #pageRoot .td-card-body{padding:12px 14px;flex:1 1 auto;min-height:0}
html body #pageRoot .td-card-more{
  display:inline-flex;align-items:center;gap:4px;margin-top:10px;
  font-size:12.5px;font-weight:600;color:var(--c-brand);text-decoration:none;
}
html body #pageRoot .td-card-more:hover{text-decoration:underline}

/* 三栏：客户 / 快捷 / 日程 */
html body #pageRoot .td-trio{
  display:grid;gap:12px;align-items:stretch;
  grid-template-columns:minmax(0,1.02fr) minmax(0,1fr) minmax(0,1.06fr);
}
@media(max-width:1360px){
  html body #pageRoot .td-trio{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  html body #pageRoot .td-trio>.td-day{grid-column:1 / -1}
}
@media(max-width:860px){html body #pageRoot .td-trio{grid-template-columns:1fr}}

/* —— 客户经营 —— */
html body #pageRoot .td-cust-grid{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;
}
html body #pageRoot .td-cust-cell{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  padding:9px 2px;border-radius:9px;background:var(--c-surface,#F7F9FC);
  border:1px solid transparent;transition:background .15s,border-color .15s;
}
html body #pageRoot .td-cust-cell:hover{background:var(--c-brand-soft);border-color:var(--c-brand-ring)}
html body #pageRoot .td-cust-n{font-size:17px;font-weight:750;color:var(--c-ink);line-height:1.15;font-variant-numeric:tabular-nums}
html body #pageRoot .td-cust-cell.has .td-cust-n{color:var(--c-brand)}
html body #pageRoot .td-cust-t{font-size:11px;color:var(--c-dim);white-space:nowrap}
html body #pageRoot .td-cust-recent{
  margin-top:10px;padding-top:8px;border-top:1px dashed var(--c-line);
  display:flex;flex-direction:column;gap:2px;
}
html body #pageRoot .td-cust-row{display:flex;align-items:center;gap:7px;font-size:12.3px;padding:3px 0}
html body #pageRoot .td-cust-who{flex:1;min-width:0;color:var(--c-ink2);font-weight:600}
html body #pageRoot .td-cust-ago{flex:0 0 auto;font-size:11.3px;color:var(--c-dim)}
html body #pageRoot .td-cust-empty{font-size:12.3px;color:var(--c-dim);line-height:1.7;margin-top:8px}

/* —— 快捷入口：一行四个 × 两行 —— */
html body #pageRoot .td-quick-grid{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;
}
html body #pageRoot .td-q{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
  padding:11px 4px;border-radius:10px;text-decoration:none;
  background:var(--c-surface,#F7F9FC);border:1px solid var(--c-line,#E5E8EF);
  transition:background .15s,border-color .15s,box-shadow .15s,transform .12s;
}
html body #pageRoot .td-q:hover{
  background:#fff;border-color:var(--c-brand-ring);
  box-shadow:0 3px 12px rgba(30,58,138,.09);transform:translateY(-1px);
}
html body #pageRoot .td-q-ic{
  display:inline-flex;align-items:center;justify-content:center;
  width:28px;height:28px;border-radius:8px;background:var(--c-brand-soft);color:var(--c-brand);
}
html body #pageRoot .td-q-ic svg{width:15px;height:15px}
html body #pageRoot .td-q-nm{font-size:12px;font-weight:600;color:var(--c-ink);white-space:nowrap}
@media(max-width:600px){html body #pageRoot .td-quick-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}}

/* —— 开庭 · 日程（今日视角） —— */
html body #pageRoot .td-day-tabs{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;
  padding:8px 14px 0;
}
html body #pageRoot .td-day-tab{
  display:flex;flex-direction:column;align-items:center;gap:1px;
  padding:6px 2px;border-radius:8px;border:1px solid var(--c-line);
  background:#fff;cursor:pointer;font-family:inherit;transition:all .15s;
}
html body #pageRoot .td-day-tab b{font-size:12px;font-weight:650;color:var(--c-ink2);line-height:1.3}
html body #pageRoot .td-day-tab i{font-style:normal;font-size:10.3px;color:var(--c-dim);line-height:1.3}
html body #pageRoot .td-day-tab:hover{border-color:var(--c-brand-ring);background:var(--c-brand-soft)}
html body #pageRoot .td-day-tab.on{background:var(--c-brand);border-color:var(--c-brand)}
html body #pageRoot .td-day-tab.on b,
html body #pageRoot .td-day-tab.on i{color:#fff}
html body #pageRoot .td-day-row{
  display:flex;align-items:center;gap:8px;padding:7px 0;
  border-bottom:1px dashed var(--c-line);font-size:12.6px;
}
html body #pageRoot .td-day-row:last-child{border-bottom:0}
html body #pageRoot .td-day-dot{flex:0 0 7px;width:7px;height:7px;border-radius:50%;background:var(--c-brand)}
html body #pageRoot .td-day-dot.court{background:var(--c-err)}
html body #pageRoot .td-day-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
html body #pageRoot .td-day-main b{
  font-size:12.8px;font-weight:650;color:var(--c-ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
html body #pageRoot .td-day-main i{
  font-style:normal;font-size:11.3px;color:var(--c-dim);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

/* 暗色 */
html[data-mode="dark"] body #pageRoot .td-cust-cell,
html[data-mode="dark"] body #pageRoot .td-q,
html[data-mode="dark"] body #pageRoot .td-day-tab{background:#1B2129;border-color:#2A313B}
html[data-mode="dark"] body #pageRoot .td-q:hover{background:#212932}
html[data-mode="dark"] body #pageRoot .td-card>.card-h{border-bottom-color:#2A313B}

/* ============================================================================
 * 表格「操作」列排版（2026-11-14 老板：按钮别挤在一起）
 * 所有 .adm-table 的操作列统一 .law-act-row：横排 + 8px 间距 + 不换行 + 右对齐
 * ========================================================================== */
html body #appPage table.adm-table td.actions,
html body #appPage table.adm-table th.actions{white-space:nowrap}
html body #appPage .law-act-row{
  display:flex;align-items:center;gap:8px;flex-wrap:nowrap;justify-content:flex-start;
}
html body #appPage .law-act-row>.btn,
html body #appPage .law-act-row>a.btn{
  margin:0!important;flex:0 0 auto;white-space:nowrap;
  min-height:28px;padding:0 11px;line-height:26px;
  display:inline-flex;align-items:center;justify-content:center;
}
html body #appPage table.adm-table td.actions:empty{display:none}

/* ============================================================================
 * 会员 / 积分：微信扫码支付弹窗（2026-11-14 老板要求加微信扫码支付）
 * ========================================================================== */
html body .pay-qr{text-align:center;padding:6px 4px 2px}
html body .pay-qr-amt{
  font-size:13px;color:var(--c-dim);line-height:1.2;
}
html body .pay-qr-amt b{font-size:28px;font-weight:800;color:var(--c-ink);margin-left:2px;letter-spacing:-.5px}
html body .pay-qr-name{font-size:13px;color:var(--c-ink2);font-weight:600;margin-top:4px}
html body .pay-qr-box{
  margin:14px auto 10px;width:200px;height:200px;
  border:1px solid var(--c-line);border-radius:12px;background:#fff;
  display:flex;align-items:center;justify-content:center;overflow:hidden;
}
html body .pay-qr-box img{width:100%;height:100%;object-fit:contain;display:block}
html body .pay-qr-tip{font-size:12.5px;color:var(--c-dim)}
html body .pay-qr-tip b{color:var(--c-ok)}
html body .pay-qr-state{
  margin-top:10px;display:inline-flex;align-items:center;gap:6px;
  font-size:12.3px;color:var(--c-dim);
  padding:4px 12px;border-radius:999px;background:var(--c-surface,#F4F6FA);
}
html body .pay-qr-state::before{
  content:'';width:7px;height:7px;border-radius:50%;background:#F59E0B;
  animation:paypulse 1.2s ease-in-out infinite;
}
html body .pay-qr-state.ok{background:rgba(5,150,105,.10);color:var(--c-ok)}
html body .pay-qr-state.ok::before{background:var(--c-ok);animation:none}
@keyframes paypulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.35;transform:scale(.8)}}
html[data-mode="dark"] body .pay-qr-box{background:#fff}
html[data-mode="dark"] body .pay-qr-state{background:#1B2129}
/* 套餐卡 hover 统一 */
html body #pageRoot .mem-plan{transition:border-color .15s,box-shadow .15s,transform .12s}
/* 2026-11-14 深色修复：会员/积分价格「¥238」用品牌色渲在深底上只有 1.67:1，
   换成亮品牌色（与全站选中态 token 一致） */
html[data-mode="dark"] body #pageRoot .mem-plan div[style*="font-size:22px"]{color:var(--c-on-fg)!important}
html body #pageRoot .mem-plan:hover{
  border-color:var(--c-brand-ring);box-shadow:0 4px 14px rgba(30,58,138,.10);transform:translateY(-2px);
}

/* 确认框正文：允许 \n 换行（LAW.confirm 走 esc，只能靠 CSS 保留换行） */
html body .modal .modal-b{white-space:pre-wrap}
html body .modal .modal-b .pay-qr,
html body .modal .modal-b .law-center,
html body .modal .modal-b table,
html body .modal .modal-b .law-preview{white-space:normal}

/* 2026-11-14 二维码放大弹层（律师主页 · 扫码分享） */
html body #appPage .qr-mask,
html body .qr-mask{position:fixed;inset:0;z-index:9000;background:rgba(9,20,33,.62);display:flex;align-items:center;justify-content:center;padding:20px}
html body .qr-box{background:#fff;border-radius:16px;padding:22px 24px;max-width:360px;width:100%;text-align:center;box-shadow:0 18px 50px rgba(0,0,0,.28)}
html body .qr-t{font-size:15px;font-weight:800;color:#0f2a43;margin-bottom:14px}
html body .qr-big{width:240px;height:240px;display:block;margin:0 auto;background:#fff;border-radius:8px}
html body .qr-u{font-size:11.5px;color:#64748b;word-break:break-all;margin:12px 0 14px;line-height:1.5}
html body .qr-acts{display:flex;gap:10px;justify-content:center}
html body .qr-acts .btn{flex:0 0 auto;min-width:96px}
html body .qr-tip{font-size:11.5px;color:#5b6b7d;margin-top:12px}  /* 原 #94a3b8 只有 2.56:1，压深到 4.7:1 */
/* 弹层是固定白底（不跟随深色主题），按钮颜色必须写死不依赖主题变量，
   否则深色下 .btn.ghost 用浅色字渲在白底上只有 1.74:1 */
html body .qr-box .btn.ghost{background:#f1f5fb;color:#0f2a43 !important;border:1px solid #cfd8e3}
html body .qr-box .btn.ghost:hover{background:#e6edf7}
html body .qr-box .btn:not(.ghost){background:#1f4e8c;color:#fff !important}

/* ============================================================================
 * 2026-11-14 老板：律师操作指南（/guide，侧栏「关于平台」之下）
 * 定位：可扫读的实操手册，不是功能堆砌
 * ========================================================================== */
html body #appPage .gd-toc{
  display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px;padding:12px 14px;
  background:var(--c-bg-soft);border:1px solid var(--c-line);border-radius:12px
}
html body #appPage .gd-toc-item{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 12px;border-radius:999px;background:var(--c-card);
  border:1px solid var(--c-line);color:var(--c-ink2);
  font-size:12.5px;font-weight:600;text-decoration:none;
  transition:border-color .15s,color .15s,background .15s
}
html body #appPage .gd-toc-item:hover{
  border-color:var(--c-brand);color:var(--c-brand);background:var(--c-brand-soft)
}
html body #appPage .gd-toc-ic{width:14px;height:14px;flex:0 0 14px;
  stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* 章节卡 */
html body #appPage .gd-sec{scroll-margin-top:calc(var(--law-topbar-h) + 12px)}
html body #appPage .gd-sec-t{display:flex;align-items:center;gap:8px}
html body #appPage .gd-sec-ic{width:17px;height:17px;flex:0 0 17px;
  stroke:var(--c-brand);fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html body #appPage .gd-lead{
  margin:2px 0 14px;font-size:13px;color:var(--c-dim);line-height:1.7
}
html body #appPage .gd-list{display:flex;flex-direction:column;gap:0}

/* 条目 */
html body #appPage .gd-item{
  padding:13px 0 13px 14px;border-left:2px solid var(--c-line);
  transition:border-color .15s
}
html body #appPage .gd-item:hover{border-left-color:var(--c-brand)}
html body #appPage .gd-item + .gd-item{border-top:1px solid var(--c-line)}
html body #appPage .gd-item-t{
  font-size:13.5px;font-weight:800;color:var(--c-ink);margin-bottom:5px;line-height:1.5
}
html body #appPage .gd-item-d{
  font-size:13px;color:var(--c-ink2);line-height:1.85
}
html body #appPage .gd-item-d b{color:var(--c-ink);font-weight:700}

/* 页脚 */
html body #appPage .gd-foot{
  margin:16px 0 4px;padding:14px 16px;border-radius:12px;
  background:var(--c-bg-soft);border:1px solid var(--c-line);
  /* --c-dim 在浅底 4.39:1，压深到 --c-ink2（7.1:1） */
  font-size:12px;color:var(--c-ink2);line-height:1.75;text-align:center
}

/* 深色模式 */
html[data-mode="dark"] body #appPage .gd-toc{background:var(--c-card);border-color:var(--c-line)}
html[data-mode="dark"] body #appPage .gd-toc-item{background:var(--c-bg-soft)}
html[data-mode="dark"] body #appPage .gd-toc-item:hover{background:var(--c-on-bg);color:var(--c-on-fg);border-color:var(--c-on-bd)}
html[data-mode="dark"] body #appPage .gd-sec-ic{stroke:var(--c-on-fg)}
html[data-mode="dark"] body #appPage .gd-item:hover{border-left-color:var(--c-on-fg)}

/* 窄屏 */
@media (max-width:880px){
  html body #appPage .gd-toc{padding:10px;gap:6px}
  html body #appPage .gd-toc-item{padding:5px 10px;font-size:12px}
  html body #appPage .gd-item{padding:11px 0 11px 11px}
}
