:root {
  --ink: #17232f;
  --muted: #7c8995;
  --line: #e7ebef;
  --paper: #ffffff;
  --canvas: #f5f7f9;
  --teal: #119b91;
  --teal-ink: #087f78;
  --teal-soft: #e8f7f5;
  --navy: #1a2c3a;
  --blue: #527eae;
  --blue-soft: #edf4fb;
  --amber: #b77a15;
  --amber-soft: #fff6e6;
  --red: #b84443;
  --red-soft: #fff0ef;
  --green: #27836e;
  --green-soft: #eaf7f1;
  --shadow: 0 10px 28px rgba(24, 43, 59, .055);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 800px; min-height: 100vh; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
/* ── 工作台外壳：整页永不滚动 ──────────────────────────────────
   零滚动契约：桌面带（宽 ≥ 1280 且高 ≥ 800）内连内容区也一屏放下，
   超高容器用「裁剪 + 还有 N 条」解决；更小的视口进入响应式模式，
   由 .main-area 整体滚动（顶栏与侧栏保持固定），内容不被裁掉。 */
.shell { height: 100vh; overflow: hidden; }
.topbar { height: 74px; display: flex; align-items: center; gap: 24px; padding: 0 34px; background: #fff; border-bottom: 1px solid var(--line); }
.brand { min-width: 218px; display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(145deg, #39c4b2, #0d8c85); color: #fff; font-size: 19px; font-weight: 750; box-shadow: 0 5px 12px #139a8f2e; }
.brand strong { display: block; font-size: 18px; letter-spacing: .04em; line-height: 1.15; }
.brand small { display: block; margin-top: 4px; color: #9aa4ac; font-size: 10px; letter-spacing: .08em; }
.firm-label { display: flex; align-items: center; gap: 9px; color: #566471; font-size: 12px; white-space: nowrap; }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: #21ae8a; box-shadow: 0 0 0 3px #21ae8a18; }
.topbar-spacer { flex: 1; }
.searchbox { width: min(310px, 24vw); height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 10px; color: #8e9aa4; border: 1px solid #e7ebef; border-radius: 9px; background: #f8fafb; }
.searchbox > span { font-size: 22px; line-height: 1; transform: rotate(-20deg); }
.searchbox input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.searchbox kbd { padding: 2px 5px; border: 1px solid #e3e8ec; border-radius: 4px; background: #fff; color: #97a1a9; font-size: 9px; white-space: nowrap; }
.icon-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #75828e; font-weight: 650; }
.identity { min-width: 190px; display: flex; align-items: center; gap: 10px; position: relative; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #e3f3f1; color: var(--teal-ink); font-size: 13px; font-weight: 700; }
.identity-copy { flex: 1; min-width: 0; }
.identity-copy b, .identity-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-copy b { font-size: 12px; font-weight: 650; }
.identity-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.identity select { width: 104px; max-width: 120px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #63717c; font-size: 10px; }
.workspace { height: calc(100vh - 74px); min-height: 0; display: grid; grid-template-columns: 230px minmax(0, 1fr); overflow: hidden; }
.sidebar { position: sticky; top: 0; height: 100%; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: 27px 15px 17px; background: #fbfcfd; border-right: 1px solid var(--line); }
.side-caption { padding: 0 13px 11px; color: #a1aab1; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.role-switch { margin: 0 0 24px; padding: 13px 11px 11px; border: 1px solid #e5ebee; border-radius: 10px; background: #fff; }
.role-switch-label { margin: 0 0 9px 2px; color: #96a1a9; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.role-switch-grid { display: grid; gap: 5px; }
.role-switch-grid button { height: 32px; padding: 0 9px; border: 1px solid transparent; border-radius: 7px; background: #f7f9fa; color: #65737d; text-align: left; font-size: 10px; }
.role-switch-grid button:hover { border-color: #cde8e4; color: var(--teal-ink); }
.role-switch-grid button.active { border-color: #b9e1dc; background: #eaf7f5; color: var(--teal-ink); font-weight: 700; }
.role-switch-grid button:disabled { cursor: default; opacity: .65; }
.role-switch > small { display: block; margin: 8px 2px 0; color: #9aa5ac; font-size: 8px; line-height: 1.5; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: #64717d; text-align: left; font-size: 12px; transition: .16s ease; }
.nav-item[hidden] { display: none; }
.nav-item:hover { background: #f1f5f6; color: var(--ink); }
.nav-item.active { background: #e9f6f4; color: #087f78; font-weight: 650; }
.nav-icon { width: 17px; color: currentColor; text-align: center; font-size: 16px; }
.nav-count { margin-left: auto; padding: 2px 6px; border-radius: 10px; background: #f0f2f4; color: #74808b; font-size: 9px; }
.nav-item.active .nav-count { background: #d5efec; color: var(--teal-ink); }
.sidebar-bottom { margin-top: auto; }
.basis-card { display: grid; gap: 6px; margin: 0 3px 13px; padding: 13px 13px 12px; border: 1px solid #e8edef; border-radius: 10px; background: #fff; }
.basis-label { color: #99a3aa; font-size: 9px; letter-spacing: .04em; }
.basis-card b { font-size: 13px; font-variant-numeric: tabular-nums; }
.basis-card small { color: #9ca5ac; font-size: 9px; }
.quiet-button { width: 100%; height: 36px; padding: 0 10px; border: 1px solid #e3e9ed; border-radius: 8px; background: #fff; color: #64717d; text-align: left; font-size: 10px; }
.quiet-button span { margin-right: 8px; color: var(--teal-ink); font-size: 15px; }
.build-label { display: flex; align-items: center; gap: 8px; margin: 17px 7px 0; color: #a0aab1; font-size: 9px; }
.main-area { width: 100%; max-width: 1640px; height: 100%; min-height: 0; margin: 0 auto; padding: 11px 26px 5px; overflow-y: auto; overflow-x: hidden; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 7px; }
.heading-copy h1 { margin: 0; color: #20313e; font-size: 18px; font-weight: 680; letter-spacing: -.025em; }
.heading-copy p { margin: 4px 0 0; color: #7d8890; font-size: 10px; }
.heading-actions { display: flex; align-items: center; gap: 8px; }
.date-stamp { padding: 8px 10px; border: 1px solid #e7ebef; border-radius: 7px; background: #fff; color: #84909a; font-size: 10px; }
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 8px; font-size: 11px; font-weight: 620; transition: .15s ease; }
.button.primary { background: var(--teal); color: #fff; box-shadow: 0 4px 9px #119b9125; }
.button.primary:hover { background: var(--teal-ink); }
.button.secondary { border-color: #dfe6e9; background: #fff; color: #53626e; }
.button.secondary:hover { border-color: #a9d9d4; color: var(--teal-ink); }
.button.ghost { background: transparent; color: #677580; }
.button.danger { background: #fff4f3; color: var(--red); }
.button.small { min-height: 29px; padding: 0 9px; font-size: 10px; }
.button.block { width: 100%; }
.surface { background: var(--paper); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.surface-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 13px 7px; border-bottom: 1px solid #edf0f2; }
.surface-head h2, .surface-head h3 { margin: 0; font-size: 13px; font-weight: 670; }
.surface-head p { margin: 4px 0 0; color: #95a0a8; font-size: 9px; }
.surface-body { padding: 10px 13px 11px; }
.section-label { color: #98a3aa; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.muted { color: var(--muted); }
.subtle { color: #7d8890; font-size: 10px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; margin-bottom: 6px; }
.metric { min-height: 74px; position: relative; overflow: hidden; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; box-shadow: var(--shadow); }
.metric::after { content: ""; position: absolute; right: -20px; bottom: -35px; width: 100px; height: 100px; border-radius: 50%; background: var(--metric-tint, #eff8f7); opacity: .8; }
.metric-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #7f8c96; font-size: 10px; }
.metric-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; background: var(--metric-tint, #eff8f7); color: var(--metric-color, var(--teal-ink)); font-size: 13px; }
.metric-value { display: flex; align-items: baseline; gap: 6px; margin-top: 5px; position: relative; z-index: 1; color: #223440; font-size: 20px; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.metric-value small { color: #95a0a8; font-size: 10px; font-weight: 500; letter-spacing: 0; }
.metric-note { position: relative; z-index: 1; margin-top: 2px; color: #8b959c; font-size: 9px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(320px,.85fr); gap: 12px; }
.stack { display: grid; align-content: start; gap: 8px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid #f0f2f4; }
.list-row:last-child { border-bottom: 0; }
.list-row-main { min-width: 0; flex: 1; }
.list-row-main b, .list-row-main small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.list-row-main b { font-size: 11px; font-weight: 620; }
.list-row-main small { margin-top: 4px; color: #6e7b85; font-size: 9px; }
.row-end { display: flex; align-items: center; gap: 8px; color: #7f8b94; font-size: 9px; white-space: nowrap; }
.priority-mark { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #c1c9ce; }
.priority-mark.high { background: #e26052; box-shadow: 0 0 0 3px #e260521b; }
.priority-mark.medium { background: #e9a438; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 7px; border-radius: 5px; background: #f2f5f6; color: #73808b; font-size: 9px; white-space: nowrap; }
.tag.teal { background: var(--teal-soft); color: var(--teal-ink); }
.tag.blue { background: var(--blue-soft); color: #4d7398; }
.tag.amber { background: var(--amber-soft); color: #9f6c1d; }
.tag.red { background: var(--red-soft); color: #ad4b49; }
.tag.green { background: var(--green-soft); color: #287660; }
.tag.outline { border: 1px solid #e6ebee; background: #fff; }
.deadline-row { display: grid; grid-template-columns: 62px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 6px 0; border-bottom: 1px solid #f0f2f4; }
.deadline-row:last-child { border-bottom: 0; }
.date-chip { padding: 6px 4px; border-radius: 6px; background: #f5f7f8; color: #586875; text-align: center; font-size: 9px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.date-chip.urgent { background: var(--red-soft); color: var(--red); }
.date-chip.warn { background: var(--amber-soft); color: var(--amber); }
.empty-state { padding: 12px 14px; color: #7d8890; text-align: center; font-size: 10px; }
.empty-state strong { display: block; margin-bottom: 5px; color: #61717c; font-size: 11px; }
.link-button { padding: 0; border: 0; background: transparent; color: var(--teal-ink); font-size: 10px; }

/* 零滚动契约：容器超高时裁掉尾部条目，原位写明还有多少条 */
.more-hint { display: block; width: 100%; margin-top: 6px; padding: 7px 0 2px; border: 0; border-top: 1px dashed #e2e8ea; background: transparent; color: var(--teal-ink); font-size: 9px; font-weight: 600; text-align: center; }
.more-hint:hover { color: var(--teal); }
.more-hint-row td { padding: 9px; border-top: 1px dashed #e2e8ea; color: var(--teal-ink); font-size: 9px; font-weight: 600; text-align: center; }

/* 接案台 */
.lead-layout { display: grid; grid-template-columns: 272px minmax(0,1fr); gap: 12px; align-items: start; }
.lead-list { padding: 4px 9px 8px; }
.lead-card { width: 100%; display: block; padding: 9px 9px; border: 0; border-bottom: 1px solid #f0f2f4; border-radius: 0; background: transparent; color: inherit; text-align: left; }
.lead-card:hover { background: #f8fbfb; }
.lead-card.selected { margin: 3px 0; border: 1px solid #cbe8e4; border-radius: 8px; background: #f1faf8; }
.lead-card-top { display: flex; justify-content: space-between; gap: 8px; }
.lead-card b { font-size: 11px; }
.lead-card p { margin: 5px 0; overflow: hidden; color: #74818b; font-size: 9px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.lead-card-foot { display: flex; align-items: center; justify-content: space-between; color: #8b959c; font-size: 9px; }
.lead-detail { min-width: 0; }
.lead-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.lead-title-row h2 { margin: 0; font-size: 16px; }
.lead-title-row p { margin: 4px 0 0; color: #74818b; font-size: 10px; }
.lead-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.lead-facts { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 7px; margin: 6px 0; }
.fact { padding: 7px 9px; border-radius: 8px; background: #f8fafb; }
.fact span { display: block; margin-bottom: 5px; color: #8b959c; font-size: 9px; }
.fact b { display: block; overflow-wrap: anywhere; color: #3d4c58; font-size: 10px; font-weight: 590; line-height: 1.4; }
.assessment-box { padding: 8px 10px; border: 1px solid #e7edef; border-radius: 9px; background: linear-gradient(130deg,#fbfdfd,#f7fbfb); }
.assessment-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.assessment-head strong { font-size: 11px; }
.assessment-score { display: inline-flex; align-items: baseline; gap: 4px; color: var(--teal-ink); font-size: 20px; font-weight: 700; }
.assessment-score small { color: #93a09f; font-size: 9px; font-weight: 500; }
.assessment-copy { margin: 0; color: #56656f; font-size: 10px; line-height: 1.6; }
.fact-pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.pill { padding: 5px 7px; border: 1px solid #e6ecee; border-radius: 5px; background: white; color: #6a7882; font-size: 9px; }
.quote-panel { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 12px; margin-top: 6px; padding: 8px 11px; border: 1px solid #dcefea; border-radius: 9px; background: #f2fbf8; }
.quote-panel b { display: block; font-size: 11px; }
.quote-panel p { margin: 5px 0 0; color: #6d7d78; font-size: 9px; line-height: 1.6; }
.quote-price { color: var(--teal-ink); font-size: 19px; font-weight: 700; white-space: nowrap; }
.quote-price small { display: block; margin-top: 2px; color: #8da09a; font-size: 8px; font-weight: 500; text-align: right; }
.notice { padding: 7px 10px; border-radius: 7px; background: #f7f8f9; color: #6e7b85; font-size: 9px; line-height: 1.55; }

/* 案件工作台 */
.case-layout { display: grid; grid-template-columns: 295px minmax(0,1fr); gap: 12px; align-items: start; }
.case-filter { display: flex; gap: 6px; padding: 0 12px 10px; overflow-x: auto; }
.filter-chip { padding: 5px 8px; border: 1px solid #e8edef; border-radius: 6px; background: #fff; color: #83909a; font-size: 9px; white-space: nowrap; }
.filter-chip.active { border-color: #c8e7e2; background: #eef9f7; color: var(--teal-ink); }
.case-list { padding: 0 9px 8px; }
.case-card { width: 100%; display: block; padding: 8px 9px; border: 0; border-bottom: 1px solid #f0f2f4; border-radius: 0; background: transparent; text-align: left; color: inherit; }
.case-card:hover { background: #f8fbfb; }
.case-card.selected { border: 1px solid #cbe8e4; border-radius: 8px; background: #f2faf8; }
.case-card-line { display: flex; align-items: center; gap: 7px; }
.case-card-line strong { min-width: 0; overflow: hidden; flex: 1; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.case-card p { margin: 5px 0; color: #79858e; font-size: 9px; }
.case-card-foot { display: flex; justify-content: space-between; color: #8b959c; font-size: 8px; }
.case-main { min-width: 0; }
.case-hero { padding: 13px; }
.case-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.case-hero h2 { margin: 0; font-size: 16px; line-height: 1.4; }
.case-number { margin-top: 5px; color: #929da5; font-size: 9px; }
.case-hero-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.case-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.stage-track { display: grid; grid-template-columns: repeat(5,1fr); margin-top: 13px; position: relative; }
.stage-track::before { content: ""; position: absolute; top: 8px; left: 6%; right: 6%; height: 1px; background: #e8edef; }
.stage-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #a2abb1; font-size: 8px; text-align: center; }
.stage-dot { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #dfe5e8; border-radius: 50%; background: #fff; color: transparent; font-size: 8px; }
.stage-node.done .stage-dot { border-color: #8ed0c7; background: #e9f7f5; color: var(--teal-ink); }
.stage-node.current { color: #087f78; font-weight: 700; }
.stage-node.current .stage-dot { border-color: var(--teal); background: var(--teal); color: white; box-shadow: 0 0 0 4px #119b9117; }
.case-tabs { display: flex; gap: 17px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.case-tab { position: relative; padding: 10px 1px 9px; border: 0; background: transparent; color: #7d8890; font-size: 10px; }
.case-tab.active { color: var(--teal-ink); font-weight: 650; }
.case-tab.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px; background: var(--teal); }
.case-content { padding: 13px 14px 14px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.detail-tile { padding: 8px 10px; border: 1px solid #edf0f2; border-radius: 8px; background: #fff; }
.detail-tile h3 { margin: 0 0 8px; font-size: 11px; }
.detail-tile p { margin: 0; color: #64727c; font-size: 10px; line-height: 1.65; }
.deadline-item { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f1f3f4; color: #5f6e78; font-size: 9px; }
.deadline-item:last-child { border: 0; }
.deadline-item b { color: #475660; font-weight: 590; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 7px 9px; color: #8b959c; font-size: 8px; font-weight: 600; text-align: left; }
.table td { padding: 7px 9px; border-top: 1px solid #f0f2f4; color: #5c6a74; font-size: 9px; vertical-align: middle; }
.table td strong { color: #344550; font-weight: 600; }
.table .right { text-align: right; }
.inline-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.timeline { position: relative; display: grid; gap: 0; padding-left: 17px; }
.timeline::before { content: ""; position: absolute; top: 6px; bottom: 10px; left: 5px; width: 1px; background: #e5ecee; }
.timeline-entry { position: relative; padding: 0 0 11px 6px; }
.timeline-entry::before { content: ""; position: absolute; top: 3px; left: -16px; width: 8px; height: 8px; border: 2px solid #9dd5ce; border-radius: 50%; background: #fff; }
.timeline-entry b { display: block; font-size: 10px; }
.timeline-entry p { margin: 5px 0 0; color: #74818b; font-size: 9px; line-height: 1.6; }
.timeline-entry small { display: block; margin-bottom: 4px; color: #8b959c; font-size: 8px; }
.worklog-compose { display: grid; grid-template-columns: minmax(150px,.6fr) minmax(220px,1.4fr) auto; align-items: end; gap: 8px; margin-top: 11px; padding-top: 11px; border-top: 1px solid #edf0f2; }
.checkline { display: flex; align-items: center; gap: 6px; color: #6e7b85; font-size: 9px; }
.checkline input { accent-color: var(--teal); }
.materials-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 8px; }
.materials-head h3 { margin: 0; font-size: 11px; }
.form-inline { display: flex; align-items: center; gap: 7px; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.archive-volumes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.archive-volume { padding: 10px; border: 1px solid #e8edef; border-radius: 8px; background: #fbfcfd; }
.archive-volume h3 { margin: 0 0 8px; font-size: 10px; }
.archive-volume li { margin: 0 0 6px; color: #67747e; font-size: 8px; line-height: 1.45; }
.archive-volume ul { margin: 0; padding-left: 15px; }
.archive-volume .missing { color: #9a6338; }

/* 客户服务、经营 */
.service-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(320px,.9fr); gap: 12px; align-items: start; }
.feedback-card { padding: 8px 0; border-bottom: 1px solid #eff2f3; }
.feedback-card:last-child { border: 0; }
.feedback-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.feedback-top b { font-size: 10px; }
.feedback-card p { margin: 7px 0; color: #5c6a74; font-size: 10px; line-height: 1.6; }
.feedback-card small { color: #8b959c; font-size: 8px; }
.feedback-reply { margin-top: 7px; padding: 8px 9px; border-radius: 6px; background: #f5f8f8; color: #64736c; font-size: 9px; line-height: 1.6; }
.notification-card { padding: 8px 0; border-bottom: 1px solid #eff2f3; }
.notification-card:last-child { border: 0; }
.notification-top { display: flex; justify-content: space-between; gap: 8px; }
.notification-top b { font-size: 10px; }
.notification-card p { margin: 5px 0; color: #6e7b85; font-size: 9px; line-height: 1.55; }
.notification-card small { color: #8b959c; font-size: 8px; }
.insight-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(300px,.8fr); gap: 12px; }
.digest-card { padding: 12px 14px; }
.digest-card h2 { margin: 0; font-size: 12px; }
.digest-card .summary { margin: 6px 0 10px; color: #5c6a74; font-size: 10px; line-height: 1.7; }
.digest-list { display: grid; gap: 6px; }
.digest-item { display: flex; gap: 8px; color: #64727c; font-size: 9px; line-height: 1.55; }
.digest-item::before { content: ""; flex: 0 0 5px; height: 5px; margin-top: 5px; border-radius: 50%; background: #73c7bb; }
.knowledge-card { padding: 8px 0; border-bottom: 1px solid #eff2f3; }
.knowledge-card:last-child { border: 0; }
.knowledge-card b { display: block; font-size: 10px; }
.knowledge-card p { margin: 5px 0 0; color: #68757f; font-size: 9px; line-height: 1.6; }

/* 客户端门户 */
.client-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; padding: 11px 18px; border-radius: 11px; background: linear-gradient(120deg,#143c45,#1a756e); color: white; }
.client-banner h2 { margin: 0; font-size: 16px; font-weight: 650; }
.client-banner p { margin: 6px 0 0; color: #c8e3df; font-size: 10px; }
.client-banner .tag { background: #ffffff20; color: #e2f6f1; }
.portal-case-grid { display: grid; grid-template-columns: 260px minmax(0,1fr); gap: 12px; }
.portal-case-card { width: 100%; display: block; padding: 10px; border: 1px solid transparent; border-bottom: 1px solid #edf0f2; border-radius: 7px; background: transparent; color: inherit; text-align: left; }
.portal-case-card.selected { border-color: #c7e8e3; background: #f1faf8; }
.portal-case-card strong { display: block; font-size: 10px; }
.portal-case-card small { display: block; margin-top: 5px; color: #7f8c95; font-size: 9px; }
.progress-line { height: 4px; overflow: hidden; margin-top: 10px; border-radius: 8px; background: #edf1f2; }
.progress-line span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.portal-section { margin-bottom: 6px; padding: 11px 14px; }
.portal-section h3 { margin: 0 0 9px; font-size: 11px; }
.portal-stage { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-radius: 7px; background: #f0faf8; color: #2f716a; font-size: 10px; }
.client-material { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid #f1f3f4; }
.client-material:last-child { border: 0; }
.client-material b { display: block; font-size: 9px; }
.client-material small { display: block; margin-top: 4px; color: #8b959c; font-size: 8px; }
.portal-footer-note { color: #7d8890; font-size: 8px; line-height: 1.6; }

/* Dialogs and forms */
.modal-root:empty { display: none; }
.modal-root { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: #14232d70; backdrop-filter: blur(3px); }
.modal { width: min(580px, 96vw); max-height: min(86vh, 850px); overflow: auto; border-radius: 12px; background: #fff; box-shadow: 0 25px 70px #1529363d; }
.modal.wide { width: min(760px, 96vw); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 19px 21px 14px; border-bottom: 1px solid #eef1f3; }
.modal-head h2 { margin: 0; font-size: 15px; }
.modal-head p { margin: 6px 0 0; color: #8a969f; font-size: 9px; line-height: 1.5; }
.modal-close { width: 27px; height: 27px; border: 0; border-radius: 7px; background: #f4f6f7; color: #77858f; font-size: 17px; }
.modal-body { padding: 17px 21px 19px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 5px; }
.field label { color: #687782; font-size: 9px; font-weight: 590; }
.field input, .field select, .field textarea, .form-inline input, .form-inline select, .worklog-compose input, .worklog-compose textarea { width: 100%; min-width: 0; padding: 8px 9px; border: 1px solid #e3e8eb; border-radius: 7px; outline: none; background: #fff; color: #293a45; font-size: 10px; }
.field input:focus, .field select:focus, .field textarea:focus, .form-inline input:focus, .worklog-compose input:focus, .worklog-compose textarea:focus { border-color: #7ecbc2; box-shadow: 0 0 0 3px #119b9110; }
.field textarea { min-height: 74px; resize: vertical; line-height: 1.6; }
.field small { color: #9aa4ab; font-size: 8px; line-height: 1.4; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 13px 21px 17px; border-top: 1px solid #eef1f3; }
.modal-note { margin: 12px 0 0; padding: 9px 10px; border-radius: 6px; background: #f7f9fa; color: #8b969e; font-size: 9px; line-height: 1.6; }
.access-code { margin: 15px 0; padding: 15px; border: 1px dashed #afdcd6; border-radius: 9px; background: #f2faf8; color: #087f78; text-align: center; font: 700 24px/1.1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .22em; }
.toast-region { position: fixed; right: 23px; bottom: 22px; z-index: 50; display: grid; gap: 8px; }
.toast { max-width: 380px; padding: 11px 14px; border: 1px solid #dfe9e8; border-radius: 8px; background: #fff; box-shadow: 0 9px 26px #1a30341b; color: #45615e; font-size: 10px; animation: toastIn .18s ease-out; }
.toast.error { border-color: #f1d6d4; color: #9e4745; }
@keyframes toastIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.loading { padding: 50px 20px; color: #95a0a8; text-align: center; font-size: 11px; }
.search-results { position: absolute; top: 45px; right: 0; z-index: 15; width: min(440px, 70vw); padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 14px 35px #1d303e20; }
.search-result { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 9px; border: 0; border-radius: 6px; background: transparent; color: #50606b; text-align: left; font-size: 10px; }
.search-result:hover { background: #f2f8f7; }
.search-result small { color: #9aa5ac; }

/* 律师沟通记录与类案核查 */
.communication-grid { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(310px,.85fr); gap: 12px; align-items: start; }
.meeting-form { display: grid; gap: 11px; }
.meeting-form input:not([type="checkbox"]), .meeting-form select, .meeting-form textarea, .research-picker select { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #e3e8eb; border-radius: 7px; outline: none; background: #fff; color: #293a45; font-size: 10px; }
.meeting-form textarea { min-height: 132px; resize: vertical; line-height: 1.6; }
.meeting-transcript-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(205px,.7fr); align-items: stretch; gap: 9px; }
.meeting-transcript-layout textarea { min-height: 132px; }
.meeting-transcript-layout #meetingMedia { height: 132px; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); gap: 6px; margin: 0; padding: 7px; }
.meeting-transcript-layout .meeting-audio-column { gap: 4px; }
.meeting-transcript-layout .meeting-audio-column strong { color: #52636d; font-size: 8px; }
.meeting-transcript-layout .meeting-audio-column audio { height: 33px; }
.meeting-audio-column audio[hidden] { display: none; }
.meeting-audio-placeholder { display: flex; min-height: 32px; align-items: center; padding: 6px 7px; border: 1px dashed #dbe3e5; border-radius: 6px; background: #fff; color: #76858d; font-size: 8px; line-height: 1.5; }
.meeting-transcript-layout .meeting-segments { min-height: 0; max-height: none; }
.meeting-form input:not([type="checkbox"]):focus, .meeting-form select:focus, .meeting-form textarea:focus, .research-picker select:focus { border-color: #7ecbc2; box-shadow: 0 0 0 3px #119b9110; }
.meeting-form textarea[readonly] { background: #fbfcfd; color: #364a57; }
.consent-panel { min-width: 0; margin: 0; padding: 12px 14px 13px; border: 1px solid #e7d9b5; border-radius: 9px; background: #fffcf4; }
.consent-panel legend { padding: 0 6px; color: #75643f; font-size: 10px; font-weight: 700; }
.consent-row { display: grid; grid-template-columns: 19px minmax(0,1fr) auto; align-items: start; gap: 10px; }
.consent-row input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--teal); cursor: pointer; }
.consent-copy label { display: block; color: #4c4c44; font-size: 10px; line-height: 1.55; cursor: pointer; }
.consent-copy small { display: block; margin-top: 4px; color: #7a6f57; font-size: 8px; line-height: 1.5; }
.consent-state { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 6px; background: #fff2d6; color: #9a6b20; font-size: 8px; white-space: nowrap; }
.consent-state.confirmed { background: #e9f7f1; color: #287660; }
.consent-panel p { margin: 9px 0 0 29px; color: #7c715a; font-size: 8px; line-height: 1.6; }
.transcript-live { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: start; gap: 8px; margin-top: 7px; padding: 9px 10px; border: 1px solid #e8edef; border-radius: 8px; background: #fafcfc; }
.speech-live-dot { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #aeb8bd; }
.transcript-live-copy strong, .transcript-live-copy small { display: block; }
.transcript-live-copy strong { color: #596a74; font-size: 9px; font-weight: 650; }
.transcript-live-copy small { margin-top: 3px; color: #89969e; font-size: 8px; line-height: 1.5; }
.transcript-count { padding: 4px 6px; border: 1px solid #e2e8eb; border-radius: 6px; background: #fff; color: #77858e; font-size: 8px; white-space: nowrap; }
.speech-latest { grid-column: 2 / -1; padding: 7px 8px; border-radius: 6px; background: #f0f6f5; color: #526d69; font-size: 8px; line-height: 1.6; overflow-wrap: anywhere; }
.transcript-live[data-state="listening"] { border-color: #a8dcd5; background: #f2fbf9; }
.transcript-live[data-state="listening"] .speech-live-dot { background: var(--teal); box-shadow: 0 0 0 4px #119b911b; animation: listeningPulse 1.5s ease-in-out infinite; }
.transcript-live[data-state="ready"] .speech-live-dot, .transcript-live[data-state="stopped"] .speech-live-dot { background: var(--green); }
.transcript-live[data-state="error"], .transcript-live[data-state="warning"] { border-color: #f0d3c3; background: #fff8f4; }
.transcript-live[data-state="error"] .speech-live-dot, .transcript-live[data-state="warning"] .speech-live-dot { background: #c27643; }
.transcript-live[data-state="draft"] { border-color: #cfe4e0; background: #f5fbfa; }
@keyframes listeningPulse { 50% { box-shadow: 0 0 0 7px #119b910c; } }
.meeting-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.meeting-action-spacer { flex: 1; }
.meeting-card { padding: 12px 0; border-bottom: 1px solid #edf0f2; }
.meeting-card:last-child { border: 0; }
.meeting-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.meeting-card-top b, .meeting-card-top small { display: block; }
.meeting-card-top b { font-size: 10px; }
.meeting-card-top small { margin-top: 5px; color: #96a1a9; font-size: 8px; }
.meeting-card p { margin: 8px 0 0; color: #71808a; font-size: 9px; line-height: 1.6; }
.meeting-card details { margin-top: 9px; color: #71808a; font-size: 9px; }
.meeting-card summary { cursor: pointer; color: var(--teal-ink); }
.meeting-card .transcript-preview { max-height: 190px; overflow: auto; white-space: pre-wrap; }
.meeting-media-grid { display: grid; grid-template-columns: minmax(190px,.8fr) minmax(0,1.2fr); gap: 9px; margin-top: 9px; padding: 9px; border: 1px solid #e6ecee; border-radius: 8px; background: #fbfcfc; }
.meeting-media-grid[hidden] { display: none; }
.meeting-audio-column { min-width: 0; display: grid; align-content: start; gap: 6px; }
.meeting-audio-column audio { display: block; width: 100%; min-width: 0; height: 36px; }
.meeting-audio-column small { color: #77868e; font-size: 8px; line-height: 1.5; }
.meeting-segments { min-width: 0; max-height: 146px; overflow: auto; border: 1px solid #e8edef; border-radius: 6px; background: #fff; overscroll-behavior: contain; }
.meeting-segment { width: 100%; display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 7px; padding: 6px 7px; border: 0; border-bottom: 1px solid #f0f2f3; background: #fff; color: #4e5f69; text-align: left; font-size: 8px; line-height: 1.5; }
.meeting-segment:last-child { border-bottom: 0; }
.meeting-segment:hover { background: #f4faf9; }
.meeting-segment.active { background: #e7f6f3; color: #086f69; box-shadow: inset 3px 0 var(--teal); }
.meeting-segment time { color: #73838b; font-size: 8px; font-variant-numeric: tabular-nums; }
.meeting-segment span { min-width: 0; overflow-wrap: anywhere; }
.meeting-segments-empty { padding: 9px; color: #77868e; font-size: 8px; line-height: 1.55; }
.meeting-audio-missing { margin-top: 9px; padding: 8px 9px; border-radius: 6px; background: #f6f8f9; color: #78858d; font-size: 8px; }
.meeting-card .saved-media { margin-top: 10px; }
.meeting-card .saved-media .meeting-segments { max-height: 124px; }
.meeting-card details { margin-top: 9px; }
.research-picker select { width: min(380px, 55%); }
.research-disclaimer { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 15px; border-bottom: 1px solid #edf0f2; }
.research-disclaimer b { color: #42545f; font-size: 10px; }
.research-disclaimer span { color: #98a3aa; font-size: 9px; }
.research-summary { margin: 8px 0 9px; }
.research-summary .metric-grid { margin-bottom: 7px; }
.research-summary .metric { min-height: 60px; padding: 7px 10px; }
.research-summary .metric-value { font-size: 18px; margin-top: 4px; }
.research-summary .metric-note { margin-top: 1px; font-size: 8px; }
.authority-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 8px; }
.authority-columns h3, .neutral-cases h3, .legal-gap-card h3 { margin: 0 0 6px; font-size: 11px; }
.authority-card { margin-bottom: 5px; padding: 8px 10px; border: 1px solid #e9eef0; border-radius: 8px; background: #fff; }
.authority-card-head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.authority-card-head b { font-size: 10px; line-height: 1.5; }
.authority-meta, .authority-card small { display: block; margin-top: 4px; color: #8b959c; font-size: 8px; line-height: 1.45; }
.authority-card p { margin: 5px 0; color: #5c6a74; font-size: 9px; line-height: 1.5; }
.authority-card blockquote { margin: 5px 0 0; padding: 5px 8px; border-left: 2px solid #89cfc5; background: #f6faf9; color: #4b625f; font-size: 9px; line-height: 1.5; }
.neutral-cases { margin-top: 8px; }
.legal-gap-card { margin-top: 9px; padding: 10px; border: 1px solid #e4e9ed; border-radius: 8px; background: #f8fafb; }
.legal-gap-card p { margin: 0 0 7px; color: #68757f; font-size: 9px; line-height: 1.5; }
.connection-error { margin-top: 40px; padding: 30px; text-align: center; }
.connection-error p { color: #89959e; font-size: 11px; }

@media (max-width: 900px) {
  .role-switch { margin: 8px 0; padding: 8px; }
  .role-switch-label, .role-switch > small { display: none; }
  .role-switch-grid { display: flex; gap: 5px; }
  .role-switch-grid button { flex: 1; height: 34px; text-align: center; white-space: nowrap; }
  .communication-grid, .authority-columns { grid-template-columns: 1fr; }
  .meeting-transcript-layout { grid-template-columns: 1fr; }
  .meeting-transcript-layout #meetingMedia { height: 170px; }
  .meeting-media-grid { grid-template-columns: 1fr; }
  .meeting-segments { max-height: 125px; }
  .consent-row { grid-template-columns: 19px minmax(0,1fr); }
  .consent-state { grid-column: 2; justify-self: start; }
  .consent-panel p { margin-left: 0; }
  .research-disclaimer { align-items: flex-start; flex-direction: column; }
  .research-picker select { width: 100%; }
}

@media (max-width: 1120px) {
  .topbar { gap: 14px; padding: 0 20px; }
  .brand { min-width: 165px; }
  .firm-label { display: none; }
  .workspace { grid-template-columns: 195px minmax(0,1fr); }
  .main-area { padding: 23px 22px 32px; }
  .lead-layout, .case-layout { grid-template-columns: 260px minmax(0,1fr); }
  .lead-facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .metric-grid { gap: 8px; }
  .metric { padding: 13px; }
}
@media (max-width: 900px) {
  body { min-width: 360px; }
  .topbar { height: 64px; padding: 0 14px; gap: 9px; }
  .brand { min-width: auto; }
  .brand-mark { width: 33px; height: 33px; }
  .brand strong { font-size: 15px; }
  .brand small, .searchbox, .icon-button { display: none; }
  .identity { min-width: 120px; }
  .identity-copy small { display: none; }
  .workspace { height: calc(100vh - 64px); min-height: 0; grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; z-index: 8; height: auto; min-height: 0; overflow: visible; padding: 0 8px; border-right: 0; border-bottom: 1px solid var(--line); background: #fff; }
  .side-caption, .sidebar-bottom { display: none; }
  .side-nav { display: flex; overflow-x: auto; }
  .nav-item { flex: 1 0 auto; height: 43px; justify-content: center; gap: 6px; padding: 0 9px; font-size: 10px; }
  .nav-count { display: none; }
  .main-area { height: auto; min-height: 0; padding: 19px 13px 28px; overflow-y: auto; }
  .dashboard-grid, .service-grid, .insight-grid { grid-template-columns: 1fr; }
  .lead-layout, .case-layout { grid-template-columns: 1fr; }
  .lead-layout > .surface:first-child, .case-layout > .surface:first-child { max-height: 330px; overflow: auto; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lead-facts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portal-case-grid { grid-template-columns: 1fr; }
  .archive-volumes { grid-template-columns: 1fr; }
  .worklog-compose { grid-template-columns: 1fr; }
}

/* ── 案情研判（转写稿 → 研判底稿） ── */
.analysis-strip { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; padding: 8px 10px; border: 1px solid #e3e8eb; border-radius: 7px; background: #fbfcfc; line-height: 1.5; }
.analysis-strip.done { border-color: #e3e8eb; background: #f8fafb; }
.analysis-strip b { display: block; color: var(--ink); font-size: 10px; }
.analysis-strip small { display: block; margin-top: 2px; color: #5b6a75; font-size: 8.5px; }
.analysis-view { display: grid; gap: 12px; color: var(--ink); line-height: 1.55; }
.an-head { display: flex; flex-wrap: wrap; gap: 6px; }
.an-summary { margin: 0; padding: 9px 11px; border-radius: 7px; background: #f6f8f9; font-size: 10px; }
.an-section h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 11px; }
.an-section h3 span { color: #5b6a75; font-size: 9px; font-weight: 500; }
.an-section.rejected h3 { color: var(--red); }
.an-row { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; border-top: 1px solid #eef1f3; font-size: 9.5px; }
.an-main { flex: 1; min-width: 0; }
.an-main p { margin: 3px 0 0; color: #3f4e59; }
.an-main small { display: block; margin-top: 2px; color: #5b6a75; font-size: 8.5px; }
.an-keep { display: flex; align-items: center; gap: 3px; flex: none; color: #5b6a75; font-size: 8.5px; white-space: nowrap; }
.an-quote { display: block; margin-top: 3px; color: #3f4e59; font-size: 9px; }
.an-quote em { margin: 0 6px; color: var(--teal-ink); font-style: normal; }
.an-inferred { display: inline-block; margin-left: 4px; color: #8a5f17; font-size: 8.5px; }
.an-empty { margin: 0; color: #5b6a75; font-size: 9px; }
.an-main .tag { padding: 2px 6px; vertical-align: 1px; }
.an-warn { padding: 8px 10px; border-radius: 7px; background: var(--amber-soft); color: #7a5413; font-size: 9.5px; line-height: 1.5; }
.an-section.legal { padding-top: 4px; }
.an-totals { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.an-totals > div { flex: 1 1 140px; padding: 8px 10px; border: 1px solid #e3e8eb; border-radius: 7px; background: #fbfcfc; }
.an-totals > div.risky { border-color: #f1dcb3; background: var(--amber-soft); }
.an-totals small { display: block; color: #5b6a75; font-size: 8.5px; }
.an-totals b { display: block; margin-top: 2px; font-size: 13px; color: var(--ink); }
.an-issue { margin-top: 8px; padding: 9px 11px; border: 1px solid #e6ebee; border-radius: 8px; }
.an-issue-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 10.5px; }
.an-amount { font-weight: 600; font-size: 11px; color: var(--ink); white-space: nowrap; }
.an-amount.risky { color: #8a5f17; }
.an-trigger { display: block; margin-top: 3px; color: #5b6a75; font-size: 8.5px; }
.an-calc { margin-top: 7px; padding: 7px 9px; border-radius: 6px; background: #f7f9fa; font-size: 9px; }
.an-calc ol { margin: 6px 0 0; padding-left: 16px; color: var(--ink); line-height: 1.6; }
.an-inputs { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.an-input { color: #3f4e59; }
.an-input small { display: block; color: #5b6a75; font-size: 8px; }
.an-input.missing b { color: var(--red); }
.an-note { margin: 5px 0 0; color: #3f4e59; font-size: 8.5px; line-height: 1.55; }
.an-cites { display: grid; gap: 4px; margin-top: 7px; }
.an-cite summary { cursor: pointer; color: var(--teal-ink); font-size: 9px; }
.an-cite p { margin: 4px 0; padding: 6px 8px; border-left: 2px solid #cfe7e3; color: var(--ink); font-size: 9px; line-height: 1.65; }
.an-cite small { display: block; color: #5b6a75; font-size: 8px; }
.an-cite a { color: var(--teal-ink); }
.an-terms { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.an-terms span { padding: 3px 7px; border-radius: 5px; background: var(--teal-soft); color: var(--teal-ink); font-size: 8.5px; }
.an-match { margin-left: 6px; color: #5b6a75; font-style: normal; font-size: 8px; }
.an-cite.missing { color: #8a5f17; font-size: 9px; }
.an-cleaned { padding: 8px 10px; border: 1px solid #e3e8eb; border-radius: 7px; background: #fbfcfc; font-size: 9.5px; }
.an-cleaned summary { cursor: pointer; color: var(--teal-ink); }
.an-cleaned p { margin: 8px 0; color: var(--ink); line-height: 1.75; }
/* ── 接案流程 ── */
.target-row { display: flex; gap: 8px; align-items: center; }
.target-row select { flex: 1; min-width: 0; }
.intake-flow { margin-top: 8px; padding: 8px 10px; border: 1px dashed #cfe0dd; border-radius: 7px; background: #fbfdfd; font-size: 9px; color: #3f4e59; }
.flow-steps { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.flow-step { padding: 2px 7px; border-radius: 10px; background: #f0f3f5; color: #5b6a75; font-size: 8.5px; }
.flow-step.on { background: var(--green-soft); color: #287660; }
.flow-quote { display: grid; gap: 3px; margin-bottom: 6px; }
.flow-quote b { color: var(--ink); }
.flow-quote small { color: #5b6a75; font-size: 8.5px; }
.intake-flow .row-end { justify-content: flex-end; }
/* ── 纠错、改字、案情总结 ── */
.an-edit { width: 100%; max-width: 640px; padding: 4px 7px; border: 1px solid #dfe6ea; border-radius: 5px; background: #fff; color: var(--ink); font: inherit; font-weight: 600; font-size: 10px; }
.an-edit:focus { outline: 2px solid #bfe3de; border-color: var(--teal); }
.an-edit-area { width: 100%; padding: 8px 10px; border: 1px solid #dfe6ea; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-size: 10px; line-height: 1.7; resize: vertical; }
.an-fix { display: inline-block; margin-left: 6px; padding: 1px 5px; border-radius: 4px; background: var(--blue-soft); color: #3f6489; font-size: 8px; vertical-align: 1px; }
.an-section.opinion { padding: 12px; border: 1px solid #d7ece9; border-radius: 9px; background: #fbfefd; display: grid; gap: 10px; }
.an-section.opinion h4 { margin: 0 0 4px; font-size: 10px; color: var(--ink); }
.an-section.opinion h4.fav { color: var(--green); }
.an-section.opinion h4.unfav { color: var(--red); }
.op-verdict { margin: 0; padding: 8px 10px; border-radius: 7px; background: #f3f7f9; font-size: 10.5px; font-weight: 600; color: var(--ink); }
.op-verdict.lv-good { background: var(--green-soft); }
.op-verdict.lv-caution { background: var(--red-soft); }
.op-verdict.lv-fair { background: var(--amber-soft); }
.op-bar { display: flex; height: 20px; border-radius: 10px; overflow: hidden; font-size: 9px; font-weight: 600; line-height: 20px; }
.op-bar span { white-space: nowrap; padding: 0 8px; min-width: 0; overflow: hidden; }
.op-bar .fav { background: var(--green); color: #fff; }
.op-bar .unfav { background: var(--red); color: #fff; text-align: right; }
.op-bar-wrap small { display: block; margin-top: 4px; color: #5b6a75; font-size: 8.5px; }
.op-grid, .op-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.op-list { margin: 0; padding-left: 16px; font-size: 9.5px; line-height: 1.65; color: var(--ink); }
.op-list.fav li::marker { color: var(--green); }
.op-list.unfav li::marker { color: var(--red); }
.op-steps { margin: 0; padding-left: 18px; font-size: 9.5px; line-height: 1.7; color: var(--ink); }
/* 打 / 不打：方向染色玻璃（设计规范 五·补「染色玻璃」：渐变起点 ≤.14、边框 ≤.22、顶面高光，禁止整卡大色块；
   浅色主题下尾部保留 .045 的淡底色，让两张卡整张都能一眼分辨）
   打 = 绿（积极争取），不打 = 蓝（中性的另一条路，不用红：不打不等于「输」） */
.op-choices { gap: 12px; align-items: stretch; }
.op-choice { --tone: 39, 131, 110; --tone-ink: var(--green); position: relative; padding: 12px 16px 14px; border-radius: 12px; display: flex; flex-direction: column; gap: 10px;
  border: 1px solid rgba(var(--tone), .22);
  background: linear-gradient(170deg, rgba(var(--tone), .14) 0%, rgba(var(--tone), .07) 38%, rgba(var(--tone), .045) 100%), #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 3px 0 rgba(var(--tone), .55), 0 6px 18px rgba(var(--tone), .08);
  transition: box-shadow .2s ease, border-color .2s ease; }
.op-choice:hover { border-color: rgba(var(--tone), .34); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 3px 0 rgba(var(--tone), .7), 0 8px 22px rgba(var(--tone), .12); }
.op-choice.nofight { --tone: 82, 126, 174; --tone-ink: var(--blue); }
.op-choice-head { display: flex; align-items: center; gap: 8px; line-height: 18px; }
.op-choice-head h4 { margin: 0; font-size: 11px; font-weight: 700; color: var(--tone-ink); }
.op-badge { flex: 0 0 auto; padding: 0 10px; border-radius: 999px; background: var(--tone-ink); color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; }
.op-choice-row { display: grid; gap: 2px; }
.op-choice-row small { color: var(--tone-ink); font-size: 8.5px; font-weight: 600; letter-spacing: .02em; }
.op-choice .op-list { line-height: 1.6; }
.op-cost { margin: 2px 0 0; padding: 6px 8px; border-radius: 6px; background: rgba(255, 255, 255, .75); border: 1px solid rgba(var(--tone), .16); font-size: 9.5px; font-weight: 600; color: var(--ink); line-height: 1.6; }
.op-client-head { display: flex; align-items: center; justify-content: space-between; }
.op-client small { display: block; margin-top: 4px; color: #5b6a75; font-size: 8.5px; }
@media (max-width: 720px) { .op-grid, .op-choices { grid-template-columns: 1fr; } }

/* 逻辑整理稿：研判的阅读主线，放在最上面，青色淡底与其他区块区分 */
.an-narrative { padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(17, 155, 145, .2); background: linear-gradient(170deg, rgba(17, 155, 145, .09), rgba(17, 155, 145, .03) 60%), #fff; }
.an-narrative h3 span { color: var(--teal-ink); }
.an-story { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; font-size: 10px; line-height: 1.7; }
.an-story dt { font-weight: 700; color: var(--teal-ink); }
.an-story dd { margin: 0; color: var(--ink); }
.an-story-edit { font-size: 10px; line-height: 1.8; background: rgba(255, 255, 255, .85); }
.an-story-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: 6px; }
.an-story-actions small, .an-story-note { color: #5b6a75; font-size: 8.5px; line-height: 1.6; }
.an-story-actions .button { flex: 0 0 auto; }
@media (max-width: 720px) { .an-story { grid-template-columns: 1fr; } }

/* 案件定性（接案第一步）：大类用色标区分，正文仍是深色字 */
.case-type { --ct: 82, 126, 174; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(var(--ct), .22); background: linear-gradient(170deg, rgba(var(--ct), .1), rgba(var(--ct), .03) 60%), #fff; }
.case-type.type-criminal { --ct: 26, 44, 58; }
.case-type.type-labor { --ct: 183, 122, 21; }
.case-type.type-civil { --ct: 17, 155, 145; }
.case-type.type-commercial { --ct: 82, 126, 174; }
.case-type.type-ip { --ct: 120, 92, 170; }
.case-type.type-admin { --ct: 90, 104, 117; }
.ct-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.ct-head h3 { margin: 0; }
.ct-crumbs { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 20px; }
.ct-crumbs b { font-weight: 600; color: var(--ink); }
.ct-crumbs b.ct-main { padding: 0 10px; border-radius: 999px; background: rgb(var(--ct)); color: #fff; }
.ct-crumbs i { font-style: normal; color: var(--muted); }
.ct-stage { margin-left: 4px; padding: 0 8px; border-radius: 999px; border: 1px solid rgba(var(--ct), .4); color: rgb(var(--ct)); font-size: 9px; }
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.ct-grid small { display: block; margin: 4px 0 2px; color: rgb(var(--ct)); font-size: 8.5px; font-weight: 600; }
.ct-grid ol { margin: 0; padding-left: 16px; font-size: 9.5px; line-height: 1.7; color: var(--ink); }
.ct-grid p { margin: 0 0 4px; font-size: 9.5px; line-height: 1.6; color: var(--ink); }
.ct-yes { color: var(--green); } .ct-no { color: var(--ink); }
.ct-fee { display: flex; justify-content: space-between; gap: 12px; padding: 4px 8px; border-radius: 6px; background: rgba(255, 255, 255, .8); border: 1px solid rgba(var(--ct), .14); }
.ct-fee span { color: var(--ink); } .ct-fee b { font-variant-numeric: tabular-nums; text-align: right; }
.ct-basis, .ct-also { color: #5b6a75; font-size: 8.5px; }
.ct-also { margin: 6px 0 0; }
.type-tag { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; background: #edf4fb; color: #3d6590; font-size: 8.5px; font-weight: 600; line-height: 15px; }
.type-tag.type-criminal { background: #e8ecf0; color: var(--navy); }
.type-tag.type-labor { background: var(--amber-soft); color: var(--amber); }
.type-tag.type-civil { background: var(--teal-soft); color: var(--teal-ink); }
.type-tag.type-ip { background: #f3effa; color: #6a4fa0; }
@media (max-width: 720px) { .ct-grid { grid-template-columns: 1fr; } }

/* 文书草稿 */
.doc-draft { display: grid; gap: 8px; }
.doc-hints { margin: 0; padding: 8px 12px 8px 24px; border-radius: 8px; background: var(--amber-soft); color: #6b4a10; font-size: 9px; line-height: 1.7; }
.doc-actions { display: flex; gap: 8px; justify-content: flex-end; }
.doc-text { width: 100%; box-sizing: border-box; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-family: "FangSong", "STFangsong", "Songti SC", serif; font-size: 11px; line-height: 2; resize: vertical; }

/* 录音笔导入、纠错词表 */
.recorder-drop input[type=file] { padding: 10px; border: 1px dashed rgba(17, 155, 145, .45); border-radius: 8px; background: var(--teal-soft); font-size: 10px; }
.consent-line { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 9.5px; font-weight: 500; color: var(--ink); }
.lexicon-list { display: grid; gap: 4px; margin-top: 8px; }
.lexicon-row { display: grid; grid-template-columns: auto auto auto 1fr auto; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; background: #f6f8fa; font-size: 10px; }
.lexicon-row i { font-style: normal; color: var(--muted); }
.lexicon-row small { color: #5b6a75; font-size: 8.5px; }
.recorder-drop .consent-line { justify-content: flex-start; }
.recorder-drop .consent-line input[type=checkbox] { flex: 0 0 auto; width: 14px; height: 14px; min-height: 0; margin: 0; padding: 0; }
.ct-fee span { flex: 0 0 auto; white-space: nowrap; }

/* 裁判文书导入与类案检索 */
.platform-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; font-size: 10px; }
.platform-links small { color: #5b6a75; }
.judgment-extra { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: #f6f8fa; }
.judgment-extra small { display: block; margin-top: 4px; color: var(--teal-ink); font-size: 8.5px; font-weight: 600; }
.judgment-extra p { margin: 2px 0 4px; font-size: 9.5px; line-height: 1.6; color: var(--ink); }
.caselaw-sum { margin: 12px 0 6px; font-size: 10px; color: var(--ink); }
.caselaw-quote { padding-left: 8px; border-left: 2px solid rgba(17, 155, 145, .35); color: var(--ink); }
#caselawResults .authority-card { margin-bottom: 8px; }
.an-similar .similar-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 10px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 9.5px; line-height: 1.6; color: var(--ink); }
.an-similar .similar-row small { display: block; color: #5b6a75; font-size: 8.5px; }
.an-similar .similar-row em { font-style: normal; color: #5b6a75; font-size: 8.5px; white-space: nowrap; }
.an-similar .row-end { margin-top: 6px; }

.role-switch[hidden] { display: none; }
