/* ============================================================
   华星智能合同 · 双栏工作台（方案 E）
   设计变量沿用原型 05；字体全部自托管：
   - 界面：思源宋体（style.css 的 @font-face）+ 思源黑体（alias.css）
   - 预览：docx 模板按名字引用「微软雅黑/Aptos」，由 alias.css 用
     思源黑体子集顶替注册，保证 Windows / Mac 渲染一致
   ============================================================ */
:root {
  --ink: #1d3a2f;
  --ink-2: #31503f;
  --paper: #fdfcf8;
  --bg: #f1efe8;
  --line: #ddd6c8;
  --muted: #8a8276;
  --ai: #b97f1f;
  --ai-bg: #fff5e0;
  --ok: #2e7d54;
  --ok-bg: #e9f5ee;
  --bad: #c0392b;
  --bad-bg: #fdeeec;
  --accent: #b04a3e;
  /* 结算单 st-* 样式引用的原型 07 变量：缺了会让整条声明失效（如赠牌 on 态变白字透明底） */
  --green: #2e7955;
  --red: #b63e32;
  --muted-2: #a49c8e;
  --line-soft: #e8e2d7;
  --serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --sans: 'Noto Sans SC', -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  --hit: 225 29 72;   /* 预览联动高亮色（玫红）：与页面绿金体系对冲，见 .pv-hit/.pv-beacon */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { font-family: var(--sans); background: var(--bg); color: #2b2b28; font-size: 14px; }

/* 三栏各自成滚动上下文：行高必须显式 minmax(0,1fr)，否则 auto 行被长表单/长合同
   撑破 100vh，三栏会退化成整页单滚动条（实测：未加时文档溢出 2413px，加后为 0）。
   窄屏下 --app-h 切到 auto：整页单滚动条更符合小窗操作习惯（见下方媒体查询）。 */
:root { --app-h: 100vh; }
.app { display: grid; grid-template-columns: 128px minmax(430px, 1fr) minmax(520px, 54%);
       grid-template-rows: minmax(0, 1fr); height: var(--app-h); }

/* ---------------- 侧栏 ---------------- */
.side { background: var(--ink); color: #dfe8e2; display: flex; flex-direction: column;
        padding: 18px 0; min-height: 0; overflow: hidden; }
.brand { padding: 0 16px 16px; border-bottom: 1px solid rgba(255,255,255,.08); flex-shrink: 0; }
.brand .logo { font-family: var(--serif); font-size: 26px; font-weight: 700; color: #f0d9a0;
               letter-spacing: 6px; }
.brand .sub { font-size: 9px; letter-spacing: 3px; color: rgba(255,255,255,.4); margin-top: 4px; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.side-label { font-size: 10px; letter-spacing: 2px; color: rgba(255,255,255,.35);
              padding: 16px 16px 6px; }
.side-item { display: flex; gap: 10px; padding: 9px 14px; cursor: pointer; font-size: 14px;
             color: rgba(255,255,255,.72); border-left: 3px solid transparent; transition: all .15s; }
.side-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.side-item.active { background: rgba(255,255,255,.09); color: #f0d9a0; border-left-color: #f0d9a0; }
.side-item .num { font-family: var(--serif); opacity: .5; font-size: 11px; }
.side-foot { margin-top: auto; padding: 14px 16px 0; border-top: 1px solid rgba(255,255,255,.08);
             flex-shrink: 0; }
.today-dot { display: flex; align-items: center; gap: 8px; font-size: 12px;
             color: rgba(255,255,255,.55); padding-bottom: 10px; }
.today-dot i { width: 7px; height: 7px; border-radius: 50%; background: #f0d9a0; }
.side-btn { display: block; width: 100%; background: rgba(255,255,255,.08); color: #dfe8e2;
             border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 8px 0;
             font-size: 12.5px; cursor: pointer; margin-bottom: 12px; font-family: var(--sans); }
.side-btn:hover { background: rgba(255,255,255,.16); }

/* ---------------- 通用面板 ---------------- */
.pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.pane-top { padding: 14px 22px 10px; display: flex; align-items: baseline; gap: 10px;
            flex-wrap: wrap; row-gap: 6px; }
.pane-top h2 { font-family: var(--serif); font-size: 17px; color: var(--ink); letter-spacing: 1px; }
.tpl-name { font-size: 11.5px; color: var(--muted); }
.pane-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 22px 22px; }
.fx-warn { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 2px;
           background: var(--bad-bg); border: 1px solid #e5b3ac; color: #8c2f22;
           border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.5; }
.fx-warn-ic { flex: none; }

.sec { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; }
.sec-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px;
            border-bottom: 1px solid #ece7db; font-family: var(--serif); font-weight: 700;
            color: var(--ink); font-size: 14px; }
.sec-head .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.sec-hint { font-family: var(--sans); font-weight: 400; font-size: 11px; color: var(--muted); }
.sec-body { padding: 14px 16px; }
.spacer { flex: 1; }

/* 智能录入 */
.nl { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
      font-family: var(--sans); font-size: 13px; line-height: 1.7; resize: vertical;
      color: #33302a; background: #fffdf7; }
.nl:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(29,58,47,.08); }
.nl::placeholder { color: #b8b1a2; font-size: 12px; }
.extract-row { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.pipeline { display: none; gap: 6px; font-size: 11px; flex: 1; }
.pipeline.show { display: flex; }
.stage { flex: 1; background: #f2efe7; border-radius: 6px; padding: 6px 8px; color: var(--muted);
         text-align: center; transition: all .3s; }
.stage.run { background: #eef3ff; color: #3a6bc9; animation: pulse 1.1s ease-in-out infinite; }
.stage.done { background: var(--ok-bg); color: var(--ok); }
.stage.fail { background: var(--bad-bg); color: var(--bad); }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

/* 分组与字段三态 */
.group-label { font-size: 11px; letter-spacing: 2px; color: var(--muted); margin: 14px 0 8px;
               display: flex; align-items: center; gap: 8px; }
.group-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.field { position: relative; }
/* 「提到才显示」折叠条：中性文案，不暴露具体字段名（客户可能正看着屏幕）；
   撑满 fields 网格整行，点开后未提及字段出现在其下方 */
.extra-fold-bar { grid-column: 1 / -1; justify-self: start; border: 1px dashed var(--line);
                  background: none; border-radius: 8px; padding: 7px 14px; font-size: 12px;
                  color: var(--muted); cursor: pointer; font-family: var(--sans); transition: all .15s; }
.extra-fold-bar:hover { color: var(--ink); border-color: var(--ink-2); }
.field label { display: block; font-size: 11.5px; color: #6b655c; margin-bottom: 4px; }
.field label em { color: var(--bad); font-style: normal; margin-left: 2px; }
.f-inp { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px;
         font-family: var(--sans); font-size: 13px; color: #2b2622; background: #fff; }
.f-inp:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(29,58,47,.08); }
select.f-inp { appearance: auto; }
.field.miss .f-inp { border-color: #e5b3ac; background: #fffafa; }
.field.miss .f-inp:focus { box-shadow: 0 0 0 3px rgba(192,57,43,.10); }
.field.ai .f-inp { border-color: #e4c583; background: var(--ai-bg); }
.field.done .f-inp { background: #fffdf6; }
.badge { position: absolute; right: 8px; top: 26px; font-size: 10px; padding: 2px 7px;
         border-radius: 4px; border: none; cursor: pointer; font-family: var(--sans); }
.badge.ai { background: var(--ai); color: #fff; }
.badge.ai:hover { background: #9a6919; }
.badge.ok { color: var(--ok); background: none; cursor: default; font-size: 12px; }
.fee-cn { font-size: 10.5px; color: var(--muted); margin-top: 3px; font-family: var(--serif); }

/* 签署日期条 */
.sign-bar { display: flex; align-items: center; gap: 10px; background: #fbfaf6;
            border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 14px; }
.sb-label { font-size: 12px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.sign-bar .date { width: 150px; }
.sb-hint { font-size: 11px; color: var(--muted); }
.chip { font-size: 11px; padding: 3px 10px; border-radius: 10px; border: 1px solid var(--line);
        background: #fff; color: var(--muted); cursor: pointer; white-space: nowrap; font-family: var(--sans); }
.chip.on { background: var(--ok-bg); color: var(--ok); border-color: #bfd9c9; }
.chip.ai { background: var(--ai-bg); color: var(--ai); border-color: #e4c583; }

/* 付款卡片 */
.pay-cards { display: flex; flex-direction: column; gap: 10px; }
.pay-card { position: relative; border: 1px solid var(--line); border-radius: 9px; padding: 12px 14px;
            display: grid; grid-template-columns: 96px 1fr; gap: 12px; background: #fff; }
.pc-seq { display: flex; flex-direction: column; gap: 6px; }
.pc-seq b { font-family: var(--serif); color: var(--ink); font-size: 14px; }
.pc-name { border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-size: 12px;
           width: 90px; font-family: var(--sans); }
/* 删除按钮：卡片右上角带边框的幽灵按钮（此前是左列灰色小字，用户半天找不到） */
.pc-del { position: absolute; top: 10px; right: 10px; border: 1px solid var(--line);
          border-radius: 6px; background: #fff; color: var(--muted); font-size: 11px; line-height: 1;
          padding: 4px 9px; cursor: pointer; font-family: var(--sans); }
.pc-del:hover { color: var(--bad); border-color: var(--bad); background: #fdf2f2; }
.pc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
.pc-cell { display: flex; flex-direction: column; gap: 3px; }
.pc-cell.wide { grid-column: 1 / -1; }
.pay-card > .pc-cell.wide { margin-top: 2px; }   /* 付款事件条件：跨卡片整行，靠左铺满 */
.pc-cell label { font-size: 11px; color: #6b655c; }
.pc-cell input { border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px;
                 font-size: 13px; font-family: var(--sans); width: 100%; }
.pc-cell textarea { border: 1px solid var(--line); border-radius: 6px; padding: 6px 9px;
                    font-size: 13px; font-family: var(--sans); width: 100%; resize: vertical;
                    min-height: 52px; line-height: 1.5; background: #fff; }
.pc-cell textarea:focus { outline: none; border-color: var(--ink-2); }
.pc-cell input:focus { outline: none; border-color: var(--ink-2); }
.pc-cell input:disabled { background: #f4f2ec; color: var(--muted); }
.pc-cn { font-size: 10.5px; color: var(--muted); font-family: var(--serif); }
.total-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 12px;
              color: var(--muted); }
.total-line.ok { color: var(--ok); }
.total-line.bad { color: var(--bad); }
.note-strip { margin-top: 10px; border-radius: 8px; background: var(--ai-bg); padding: 8px 12px;
              font-size: 12px; color: #6e5112; display: flex; flex-direction: column; gap: 4px; }

/* ---------------- 预览栏 ---------------- */
.preview-pane { background: #e8e5db; border-left: 1px solid var(--line); }
.pv-head { padding: 12px 18px; background: #f3f0e7; border-bottom: 1px solid var(--line);
           display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink); }
.pv-sub { font-size: 10.5px; color: var(--muted); }
.pv-status { font-size: 11px; color: var(--muted); }
.pv-status.ok { color: var(--ok); }
.pv-issues { background: var(--ai-bg); border-bottom: 1px solid #e4c583; padding: 8px 18px;
             font-size: 11.5px; color: #6e5112; display: flex; flex-direction: column; gap: 3px;
             max-height: 140px; overflow-y: auto; animation: fadeIn .18s ease; }
.pv-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
             padding: 22px 24px 20px; position: relative; }
.pv-sheet { min-height: 60px; }
/* 字段聚焦联动高亮：玫红/绯红（--hit: 225 29 72）。页面体系是绿金暖纸（墨绿标题/金色
   副标/浅灰蓝表头/墨绿侧栏），玫红位于绿的互补色位，对冲最强；预览栏红色零存在，
   无语义竞争（左栏「必填缺失」的暗砖红在另一栏且更闷）。高亮面积小，可以大胆用高饱和。
   分两层：水洗底直接染在单元格上（!important 压过 docx-preview 的内联底色）；
   动效走 .pv-beacon 覆盖层——一圈淡环标记边界，一段柔和光晕沿边框匀速巡游
   （7s/圈，长尾渐变，无频闪）。焦点不离开字段就永不停，重渲期间同一覆盖层
   持续存在，巡游无缝连续。 */
.pv-sheet td.pv-hit, .pv-sheet p.pv-hit { background-color: rgb(var(--hit) / .09) !important; }
.pv-sheet tr.pv-hit > td, .pv-sheet table.pv-hit td { background-color: rgb(var(--hit) / .09) !important; }

.pv-beacon { position: absolute; z-index: 3; pointer-events: none; border-radius: 4px;
             box-shadow: 0 0 0 1px rgb(var(--hit) / .38), 0 0 0 6px rgb(var(--hit) / .10);
             opacity: 1; transition: opacity .35s ease; animation: pv-beacon-in .25s ease; }
.pv-beacon.off { opacity: 0; }
.pv-beacon::before { content: ""; position: absolute; inset: -2px; border-radius: 6px; padding: 2px;
  background: conic-gradient(from var(--pv-angle),
    rgb(var(--hit) / 0) 0deg, rgb(var(--hit) / 0) 205deg,
    rgb(var(--hit) / .28) 265deg, rgb(var(--hit) / .70) 320deg,
    rgba(255, 157, 184, .95) 348deg, rgb(var(--hit) / 0) 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: pv-orbit 7s linear infinite; }
@property --pv-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes pv-orbit { to { --pv-angle: 360deg; } }
@keyframes pv-beacon-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pv-beacon::before { animation: none; background: none; }
}
/* docx-preview 输出重排：单页纸面、去外框灰底，与侧栏纸感统一 */
.pv-sheet .docx-wrapper { background: transparent; padding: 0; display: block; }
.pv-sheet .docx-wrapper > section.docx { width: 100% !important; max-width: 780px; margin: 0 auto 18px !important;
  padding: 44px 40px !important; box-shadow: 0 3px 18px rgba(60,50,30,.14); border-radius: 3px;
  page-break-after: auto; }
.pv-placeholder { position: absolute; left: 0; right: 0; top: 52px; bottom: 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 0 28px; text-align: center; color: var(--muted);
  font-size: 13px; font-family: var(--serif); pointer-events: none;
  animation: fadeIn .22s ease; }
.pv-placeholder .pv-ph-mark { font-size: 42px; line-height: 1; color: #cdc4b0; }
.pv-placeholder .spin { margin: 0; }
.pv-placeholder.bad { color: var(--bad); pointer-events: auto; }

.gen-bar { flex-shrink: 0; background: var(--ink); color: #f3ede0;
           border-top: 1px solid rgba(255,255,255,.10); padding: 11px 18px;
           display: flex; align-items: center; gap: 12px; font-family: var(--sans); }
.gb-pill { border: none; border-radius: 12px; font-size: 11.5px; padding: 4px 12px;
           cursor: pointer; font-family: var(--sans); }
.gb-pill.bad { background: rgba(192,57,43,.35); color: #ffd9d3; }
.gb-pill.ok { background: rgba(46,125,84,.4); color: #c9e8d5; }
.gb-list { font-size: 11px; color: rgba(243,237,224,.65); overflow: hidden;
           text-overflow: ellipsis; white-space: nowrap; max-width: 40%; }
.gb-timer { font-size: 11px; color: #f0d9a0; }

/* ---------------- 按钮 ---------------- */
.btn { border: none; border-radius: 8px; padding: 9px 18px; font-size: 13px; cursor: pointer;
       font-family: var(--sans); transition: all .15s; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--ink); color: #f0e9d8; }
.btn.primary:hover:not(:disabled) { background: var(--ink-2); }
.btn.accent { background: var(--accent); color: #fff; }
.btn.accent:hover:not(:disabled) { background: #963b30; }
.btn.gold { background: #f0d9a0; color: #4a3a12; font-weight: 600; }
.btn.gold:hover { background: #e8cd8d; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: #5c564c; }
.btn.ghost:hover { background: #f7f4ec; }
.btn.sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.35);
        border-top-color: #fff; border-radius: 50%; animation: rot .8s linear infinite;
        margin-right: 6px; vertical-align: -2px; }
.spin.light { border-color: rgba(255,255,255,.3); }
.spin.dark { border-color: rgba(29,58,47,.22); border-top-color: var(--ink); }
@keyframes rot { to { transform: rotate(360deg) } }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.985) } to { opacity: 1; transform: none } }
@keyframes slideInRight { from { opacity: .35; transform: translateX(28px) } to { opacity: 1; transform: none } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) } to { opacity: 1; transform: none } }

.tag { font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--ai-bg); color: var(--ai); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }

/* ---------------- 视图过渡 ---------------- */
.pfade-enter-active, .pfade-leave-active { transition: opacity .18s ease; }
.pfade-enter-from, .pfade-leave-to { opacity: 0; }

/* ---------------- 抽屉 / 弹窗 / Toast ---------------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(30,28,20,.35); z-index: 50;
               animation: fadeIn .18s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; background: #fff;
          box-shadow: -8px 0 30px rgba(0,0,0,.2); z-index: 51; display: flex; flex-direction: column;
          animation: slideInRight .22s ease; }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex;
               align-items: center; font-weight: 600; color: var(--ink); font-family: var(--serif); }
.drawer-sub { font-family: var(--sans); font-weight: 400; font-size: 11px; color: var(--muted); margin-left: 6px; }
.drawer-body { flex: 1; overflow-y: auto; }
.drawer-list { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.drawer-list th { text-align: left; padding: 10px 20px; color: var(--muted); font-weight: 500;
                  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.drawer-list td { padding: 10px 20px; border-bottom: 1px solid #f0ece1; }
.drawer-list .mono { font-family: var(--serif); }
.drawer-list .dim { color: var(--muted); font-size: 11.5px; }
.drawer-empty { text-align: center; color: var(--muted); padding: 60px 0; }

.modal-mask { position: fixed; inset: 0; background: rgba(30,28,20,.4); z-index: 60;
              display: flex; align-items: center; justify-content: center;
              animation: fadeIn .18s ease; }
.modal-card { background: #fff; border-radius: 12px; width: min(460px, 92vw);
              box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden;
              animation: popIn .2s ease; }
.modal-card.wide { width: min(560px, 92vw); }
.modal-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex;
              align-items: center; gap: 10px; }
.modal-head h3 { font-family: var(--serif); color: var(--ink); font-size: 15px; }
.modal-body { padding: 14px 18px; max-height: 50vh; overflow-y: auto;
              display: flex; flex-direction: column; gap: 8px; }
.modal-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex;
              justify-content: flex-end; gap: 10px; }
.note { background: #faf8f2; border: 1px solid #ece7db; border-radius: 8px; padding: 9px 12px;
        font-size: 12.5px; color: #55503f; }
.note.error { background: var(--bad-bg); border-color: #e5b3ac; color: #8c2f22; }
.note.good { background: var(--ok-bg); border-color: #bfd9c9; color: var(--ok); }

.toast-wrap { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 90;
              display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #2b2622; color: #f3ede0; font-size: 12.5px; padding: 9px 18px;
         border-radius: 20px; box-shadow: 0 6px 20px rgba(0,0,0,.25);
         animation: toastIn .2s ease; }
.toast.error { background: #7c2d23; }
.toast.warn { background: #8a5a12; }

/* ---------------- 窄屏兜底 ----------------
   仍保持「每栏独立滚动」：只压缩栏宽，不回退成整页单滚动条
   （回退会让 .pane-body/.pv-scroll 的 flex:1 失去高度约束，合同内容将被裁切不可滚） */
@media (max-width: 1100px) {
  .app { grid-template-columns: 64px minmax(360px, 1fr) minmax(360px, 42%); }
  .brand .logo { font-size: 18px; letter-spacing: 2px; }
  .brand .sub { display: none; }
  .side-label, .side-item span:last-child { display: none; }
  .side-item { justify-content: center; padding: 10px 0; }
  .side-item .num { font-size: 13px; opacity: .8; }
  .side-foot { padding: 14px 8px 0; }
  .today-dot { display: none; }
  .side-btn { padding: 8px 0; font-size: 0; }
  .side-btn::after { content: '史'; font-size: 14px; }
  .fields { grid-template-columns: 1fr; }
}

/* ---------------- 动效偏好：尊重系统「减少动态效果」 ---------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ============================================================
   事实台账（ui_mode=ledger，试点：高新现牌 · 原型 06）
   分节编号与合同条款一一对应；事实行内编辑（宋体+下划线）；
   付款为时间轴（收起＝金额+条件摘要，展开＝日期/事件编辑）；
   录入/核对双模式。仅布局换皮：字段 id（f-*）、付款卡
   （.pay-card[data-pfield]）、签署条（.sign-bar）与常规表单一致，
   聚焦联动/生成链路不感知差异。
   ============================================================ */
.pane-top > .chip { align-self: center; }

/* 总完成度条 */
.overall { display: flex; align-items: center; gap: 10px; padding: 0 22px 10px; flex-shrink: 0; }
.overall-bar { flex: 1; height: 5px; border-radius: 3px; background: #e4ddcb; overflow: hidden; }
.overall-bar i { display: block; height: 100%; width: 0; border-radius: 3px;
                 background: linear-gradient(90deg, #c9a24b, #2e6e53); transition: width .35s ease; }
.overall span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
                white-space: nowrap; }

/* AI 快速导入：金色细条，默认收起为一个状态按钮，点开才是输入区 */
.ai-bar { margin-bottom: 14px; border: 1px solid #ecdfbd; border-left: 3px solid var(--ai);
          border-radius: 11px; background: linear-gradient(180deg, #fffdf4, #fbf6e9);
          padding: 8px 10px; }
.ai-bar.open { padding: 10px 12px; }
.ai-toggle { display: flex; align-items: center; gap: 8px; width: 100%; border: 0;
             background: transparent; cursor: pointer; font-family: var(--sans);
             font-size: 13px; color: var(--ink); padding: 4px 6px; text-align: left; }
.ai-toggle:hover { color: var(--ai); }
.ai-toggle-star { color: var(--ai); }
.ai-toggle-hint { font-size: 11px; color: var(--muted); margin-left: auto; }
.ai-collapse { border: 0; background: none; color: var(--muted); cursor: pointer;
               font-size: 12px; padding: 4px 6px; flex: none; align-self: center; }
.ai-collapse:hover { color: var(--ink); }
.ai-bar .ai-row { display: flex; gap: 10px; align-items: flex-start; }
.ai-bar .nl { flex: 1; margin: 0; min-height: 40px; max-height: 120px; }
.ai-bar .btn { flex: none; }
.ai-bar .pipeline { margin-top: 8px; }

.ledger { margin-bottom: 14px; }
.ledger-sheet { background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
                box-shadow: 0 10px 26px rgba(49,42,31,.05); overflow: hidden; padding: 4px 14px 14px; }
.led-sec { --acc: #2e6e53; margin: 12px 0 0; }
.led-sec.sec-2 { --acc: #a5741c; }
.led-sec.sec-3 { --acc: #a8493a; }
.led-sec-head { display: flex; align-items: center; gap: 10px; padding: 11px 15px;
                background: linear-gradient(180deg, #f7f4ea, #f3efe3);
                border: 1px solid var(--line-soft); border-bottom: 0;
                border-radius: 12px 12px 0 0; }
.led-no { flex: none; width: 27px; height: 27px; background: var(--acc); color: #fdf8ea;
          display: grid; place-items: center; border-radius: 50%; font-family: var(--serif);
          font-size: 11px; box-shadow: inset 0 -7px 10px rgba(0,0,0,.16); }
.led-sec-title h3 { font-family: var(--serif); font-size: 15.5px; color: var(--ink); letter-spacing: .6px; }
.led-en { font-size: 8.5px; letter-spacing: 2.4px; color: var(--muted); text-transform: uppercase;
          margin-top: 1px; }
.led-count { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 11.5px;
             color: var(--muted); font-variant-numeric: tabular-nums; }
.led-count .track { width: 54px; height: 5px; border-radius: 3px; background: #e5ddca; overflow: hidden; }
.led-count .track i { display: block; height: 100%; width: 0; border-radius: 3px;
                      background: var(--acc); transition: width .3s ease; }
.led-count .cnt { font-weight: 600; }
.led-count.ok { color: var(--ok); }
.led-count.ok .track i { background: var(--ok); }
.led-count.warn { color: var(--ai); }
.led-count.warn .track i { background: var(--ai); }
.led-body { padding: 10px 14px 10px; background: #fffdf8; border: 1px solid var(--line-soft);
            border-top: 0; border-radius: 0 0 12px 12px; }
.led-body .extra-fold-bar { margin: 2px 0 8px; grid-column: auto; justify-self: start; }

/* 事实行卡片：图标牌 | 行内事实… | 状态徽章 */
.led-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px;
           align-items: start; padding: 11px 14px; margin: 0 0 8px;
           border: 1px solid #eee6d6; border-radius: 11px; background: #fffefb;
           transition: border-color .15s, box-shadow .15s; }
.led-row:hover { border-color: #dcd1ba; box-shadow: 0 3px 12px rgba(70,58,32,.07); }
.led-row:focus-within { border-color: #b5c6bd; box-shadow: 0 0 0 3px rgba(29,58,47,.06); }
.led-row-label { display: flex; flex-direction: column; align-items: center; gap: 4px;
                 padding-top: 1px; }
.led-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
           background: color-mix(in srgb, var(--acc) 11%, #fff);
           color: var(--acc); cursor: help; }
.led-ico svg { width: 17px; height: 17px; }
.led-facts { display: flex; flex-wrap: wrap; gap: 5px 14px; align-items: baseline; min-width: 0;
             line-height: 2; }
.led-fact { display: inline-flex; align-items: baseline; gap: 5px; min-width: 0; position: relative; }
.lf-label { font-size: 11px; color: #8a8275; white-space: nowrap; }
.lf-label em { color: var(--bad); font-style: normal; margin-left: 1px; }
.lf-auto { font-family: var(--serif); font-size: 14.5px; color: #4c463c; padding: 1px 3px; }

/* 行状态徽章：✓ 完成 / ! 缺失 / AI 待核 */
.led-badge { width: 23px; height: 23px; border-radius: 50%; display: grid; place-items: center;
             font-style: normal; background: #edf2ec; color: #87a291; font-size: 12px;
             margin-top: 2px; }
.led-badge::after { content: '✓'; }
.led-row.has-miss .led-badge { background: var(--bad-bg); color: var(--bad); }
.led-row.has-miss .led-badge::after { content: '!'; font-family: var(--serif); font-weight: 700; }
.led-row.has-ai .led-badge { background: var(--ai-bg); color: var(--ai); }
.led-row.has-ai .led-badge::after { content: 'AI'; font-size: 8.5px; letter-spacing: .5px; }

/* 行内事实输入：宋体 + 下划线，聚焦浮起（输入法/粘贴走原生 input，稳） */
.lf-in { border: 0; border-bottom: 1px solid #d8d0c1; border-radius: 3px; background: transparent;
         padding: 1px 3px; font-family: var(--serif); font-size: 14.5px; color: #2c2a25;
         min-width: 0; transition: background .15s, border-color .15s, box-shadow .15s; }
.lf-in:hover { background: #f5f0e5; border-bottom-color: #aaa08e; }
.lf-in:focus { outline: none; background: #fff; border-color: var(--ink-2);
               box-shadow: 0 0 0 3px rgba(29,58,47,.10); }
.lf-in::placeholder { color: #b8b1a2; font-family: var(--sans); font-size: 12px; }
.led-fact.miss .lf-in { border-bottom-color: var(--bad); background: #fffafa; }
.led-fact.miss .lf-in::placeholder { color: var(--bad); }
.led-fact.ai .lf-in { background: var(--ai-bg); border-bottom-color: #e4c583; }
.lp-money.miss { border-bottom-color: var(--bad); background: #fffafa; }
.lp-money.miss::placeholder { color: var(--bad); }
.lf-sel { appearance: auto; cursor: pointer; max-width: 240px; }
.led-fact input[type="number"] { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }
.led-fact input.lp-money { width: 150px; text-align: right; font-size: 16px; }
.lp-money, .led-step-amount, .led-fact input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.lp-money::-webkit-outer-spin-button, .lp-money::-webkit-inner-spin-button,
.led-step-amount::-webkit-outer-spin-button, .led-step-amount::-webkit-inner-spin-button,
.led-fact input[type="number"]::-webkit-outer-spin-button,
.led-fact input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.lf-badge { flex: none; align-self: center; border: 0; border-radius: 8px; background: var(--ai);
            color: #fff; font-size: 9.5px; padding: 2px 6px; line-height: 1.4; cursor: pointer;
            white-space: nowrap; font-family: var(--sans); }
.lf-badge:hover { background: #9a6919; }

/* 只看待补：干净行/期整行隐藏，分节头保留（完成度计数仍是全局信号） */
.ledger.only-issue .led-row:not(.has-miss):not(.has-ai) { display: none; }
.ledger.only-issue .led-step:not(.step-issue) { display: none; }

/* 价款条：金色卡，币种可手动切换 */
.led-price { padding: 12px 16px 2px; }
.lp-main { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
           border: 1px solid #e9d8ae; border-radius: 11px;
           background: linear-gradient(180deg, #fffaf0, #fffdf6);
           box-shadow: inset 0 1px 0 #fff; padding: 12px 16px; }
.lp-main .lf-label { font-size: 12px; color: #7c5c18; letter-spacing: .5px; }
.lp-cur { border: 1px solid #e2cf9d; border-radius: 7px; background: #fff; padding: 7px 6px;
          font-size: 13px; color: #3a3122; cursor: pointer; max-width: none; }
.lp-main .lp-money { border: 1px solid #e2cf9d; border-radius: 7px; background: #fff;
                     padding: 8px 10px; font-size: 17px; font-weight: 700; color: #3a3122;
                     max-width: 260px; }
.lp-main .lp-money.miss { border-color: var(--bad); background: #fffafa; }
.lp-main .lp-money.miss::placeholder { color: var(--bad); }
.lp-main .lp-money:focus { border-color: var(--ai); box-shadow: 0 0 0 3px rgba(185,127,31,.12); }
.lp-cn { padding: 4px 4px 2px; }

/* 付款时间轴 */
.led-pay-hint { display: flex; align-items: center; gap: 10px; padding: 9px 16px 0;
                font-size: 11px; color: var(--muted); }
.text-act { border: 0; background: none; color: var(--ink-2); font-size: 11.5px; cursor: pointer;
            border-bottom: 1px dashed #a8b6af; padding: 0 1px; font-family: var(--sans); }
.text-act:hover { color: var(--accent); border-bottom-color: var(--accent); }
.led-timeline { position: relative; padding: 6px 16px 8px 48px; display: flex; flex-direction: column;
                gap: 10px; }
.led-timeline::before { content: ''; position: absolute; left: 24px; top: 20px; bottom: 20px;
                        width: 2px; background: linear-gradient(180deg, #d8cfba, #c9bfa8); }
.led-timeline .pay-card { position: relative; display: block; border: 1px solid #eee6d6;
                          border-radius: 13px; background: #fff; padding: 11px 14px;
                          box-shadow: 0 2px 8px rgba(70,58,32,.05);
                          transition: border-color .15s, box-shadow .15s; }
.led-timeline .pay-card:hover { border-color: #dcd1ba; box-shadow: 0 4px 14px rgba(70,58,32,.09); }
.led-timeline .pay-card::before { content: attr(data-n); position: absolute; left: -36px; top: 15px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--ink-2); color: #f5eeda;
  font-family: var(--serif); font-size: 12px; display: grid; place-items: center;
  box-shadow: 0 0 0 3px var(--paper); z-index: 1; }
.led-timeline .pay-card.step-issue::before { background: var(--bad); color: #fff; }
.led-timeline .pay-card.step-issue { border-color: #f0d3cd; }
.led-timeline .pay-card.open { border-color: #d5c9a8; box-shadow: 0 6px 18px rgba(70,58,32,.10); }
.led-step-main { display: grid; grid-template-columns: 88px 132px minmax(0, 1fr) 26px 18px; gap: 10px;
                 align-items: center; cursor: pointer; }
.led-step-x { width: 25px; height: 25px; border-radius: 50%; border: 1px solid var(--bad);
              background: var(--bad); color: #fff; display: grid; place-items: center;
              font-size: 12px; line-height: 1; cursor: pointer; justify-self: center;
              font-family: var(--sans); }
.led-step-x { border: 0; background: none; color: #c3bbaa; font-size: 15px; line-height: 1;
              cursor: pointer; padding: 0 2px; font-family: var(--sans); transition: color .15s; }
.led-step-x:hover { color: var(--bad); }
.led-step-name { border: 0; border-bottom: 1px solid transparent; background: transparent;
                 font-family: var(--serif); font-size: 13.5px; color: var(--ink); padding: 2px 3px;
                 width: 100%; }
.led-step-name:focus { outline: none; background: #fff; border-bottom-color: var(--ink-2); }
.led-step-name::placeholder { color: #b8b1a2; font-family: var(--sans); font-size: 11.5px; }
.led-step-amount { width: 100%; border: 0; border-bottom: 1px solid #d8d0c1; background: transparent;
                   text-align: right; font-family: var(--serif); font-size: 16px; font-weight: 600;
                   color: #282620; padding: 2px 4px; font-variant-numeric: tabular-nums; }
.led-step-amount:focus { outline: none; background: #fff; border-bottom-color: var(--ink-2); }
.led-step-amount::placeholder { color: #b8b1a2; font-family: var(--sans); font-size: 11.5px; }
.step-issue .led-step-amount { border-bottom-color: var(--bad); background: #fffafa; }
.led-step-cond { font-size: 11px; color: #665f54; white-space: nowrap; overflow: hidden;
                 text-overflow: ellipsis; background: #f6f1e4; border-radius: 9px;
                 padding: 3px 10px; justify-self: start; max-width: 100%; }
.step-issue .led-step-cond { background: var(--bad-bg); color: var(--bad); }
.led-chev { color: #aaa190; text-align: center; font-size: 11px; transition: transform .18s; }
.pay-card.open .led-chev { transform: rotate(180deg); }
.led-step-detail { display: none; padding: 10px 12px 12px; margin: 2px 0 0;
                   background: #fbf7ec; border: 1px dashed #e0d6bd; border-radius: 10px; }
.pay-card.open .led-step-detail { display: block; animation: fadeIn .18s ease; }
.lsd-row { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.lsd-row label { font-size: 11px; color: #6b655c; }
.lsd-row input, .lsd-row textarea { border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 9px; font-size: 13px; font-family: var(--sans); width: 100%; background: #fff; }
.lsd-row input:focus, .lsd-row textarea:focus { outline: none; border-color: var(--ink-2); }
.lsd-row input:disabled { background: #f4f2ec; color: var(--muted); }
.lsd-row textarea { resize: vertical; min-height: 52px; line-height: 1.5; }
.led-sec .total-line { margin: 4px 20px 12px; }
.led-sec .note-strip { margin: 0 16px 14px; }
.led-sign { margin: 14px 16px 16px; }

/* 台账窄屏 */
@media (max-width: 1100px) {
  .led-row { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .led-step-main { grid-template-columns: 76px 104px minmax(0, 1fr) 16px 14px; }
  .led-fact input.lp-money { width: 120px; }
}

/* ================= 收款结算单（st- 前缀 · 账单式 v6） ================= */
.st-pane .nl { width: 100%; min-height: 34vh; overflow: hidden; resize: vertical; line-height: 1.75; }
.st-pane .st-ic { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2.2;
                  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.st-pane .st-ic.sm { width: 14px; height: 14px; }

/* 抬头：紧凑行 + 图标标签 */
.st-head-compact { display: flex; flex-direction: column; gap: 9px; }
.st-head-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-head-row .hl { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); white-space: nowrap; cursor: help; }
.st-head-row .hl .st-ic { width: 20px; height: 20px; }
.st-head-row input { border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px;
                     background: #fff; color: inherit; font-size: 13px; min-width: 0; }
.st-head-row input:focus { outline: none; border-color: var(--ink-2); }
.st-head-row .st-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.st-chip { position: relative; }
.st-chip input { position: absolute; opacity: 0; pointer-events: none; }
.st-chip label { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 8px;
                 background: #fff; color: #6b6459; font-size: 12px; cursor: pointer; user-select: none; }
.st-chip input:checked + label { background: #eef3ec; border-color: var(--ink-2); color: var(--ink); font-weight: 500; }
.st-head-row .st-rate { margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
                        font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.st-head-row .st-rate b { color: var(--ink); font-weight: 600; font-size: 13px; }

/* 金额输入：固定币种前缀 */
.st-amt { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px;
          background: #fff; min-width: 0; }
.st-amt:focus-within { border-color: var(--ink-2); box-shadow: 0 0 0 3px rgba(23,63,53,.08); }
.st-amt .pfx { flex: 0 0 auto; padding: 0 5px 0 9px; font-size: 11px; font-weight: 600;
               color: var(--muted); white-space: nowrap; }
.st-amt input { border: 0; outline: none; background: transparent; text-align: right; font-size: 15.5px;
                font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink);
                width: 100%; min-width: 0; padding: 8px 9px 8px 2px; }
.st-amt input::placeholder { color: var(--muted-2); font-weight: 400; font-size: 12px; }

/* 合同内款项：三行 × 双币矩阵 */
.st-ct { display: grid; grid-template-columns: 96px 1fr 1fr; gap: 5px 8px; align-items: center; }
/* 已收小节标题：带边框小标签，与行标（圆点+可编辑名）明确区分（2026-10-21 她定） */
.st-ct .st-sec-head { grid-column: 1 / -1; margin-top: 4px; }
.st-ct .st-sec-head .tag { display: inline-flex; align-items: center; border: 1px solid var(--green);
                           border-radius: 6px; padding: 2px 10px; font-size: 12px; font-weight: 600;
                           color: var(--green); background: #eef7f0; }
.st-ct .add-row { grid-column: 1 / -1; margin: 2px 0 3px; }
.st-ct .col-h { font-size: 11px; color: var(--muted); padding: 0 2px 2px; text-align: right; }
.st-ct .col-h:first-child { text-align: left; }
.st-ct .row-label { display: flex; align-items: center; font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.st-ct .row-label input { width: 100%; border: 1px solid transparent; border-radius: 6px; padding: 5px 6px;
                          background: transparent; font-size: 12.5px; color: inherit; }
.st-ct .row-label input:hover { border-color: var(--line-soft); background: #fff; }
.st-ct .row-label input:focus { border-color: var(--ink-2); background: #fff; outline: none; }
.st-ct .row-label.in { color: var(--green); font-weight: 600; }
.st-ct .row-label.in input { color: var(--green); }
.st-ct .row-label.out { color: var(--red); font-weight: 600; }
.st-ct .row-label.out input { color: var(--red); }
.st-ct .sdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; margin-right: 6px; }
.st-row-x { border: 0; background: none; color: var(--red); opacity: .45; display: grid; place-items: center; padding: 0; }
.st-row-x:hover { opacity: 1; }
.st-row-x .st-ic { width: 13px; height: 13px; }

/* 合同外杂费：清单 + 双币 */
.st-fee { display: grid; grid-template-columns: minmax(110px, 1.2fr) 1fr 1fr 48px 24px;
          gap: 4px 6px; align-items: center; padding: 4px 6px; border-radius: 9px; }
.st-fee + .st-fee { margin-top: 2px; }
.st-fee .name { border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; font-size: 12.5px;
                background: #fff; color: inherit; width: 100%; min-width: 0; }
.st-fee .name:focus { outline: none; border-color: var(--ink-2); }
.st-fee .col-h { font-size: 11px; color: var(--muted); text-align: right; padding: 0 2px 2px; }
.st-fee .col-h:first-child { text-align: left; }
/* 赠送：左绿条 + 行底绿 + 金额格绿底绿字 + 「☑赠」勾选钮（2026-10-21 她：图标钮不明显，改汉字+勾选，清晰无歧义） */
.st-fee.gifted { background: #dcecdf; box-shadow: inset 3px 0 0 var(--green); }
.st-fee.gifted .name { border-color: #7fb892; color: var(--green); font-weight: 600; }
.st-fee.gifted .st-amt { border-color: #7fb892; background: #f3faf5; }
.st-fee.gifted .st-amt .pfx { color: var(--green); }
.st-fee.gifted .st-amt input { color: var(--green); }
.st-fee.gifted .st-amt input::placeholder { color: #9ec7ab; }
.st-gift { flex: 0 0 auto; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
           color: var(--muted-2); display: inline-flex; align-items: center; justify-content: center;
           gap: 4px; user-select: none; padding: 0 7px; font-size: 12.5px; font-weight: 600; }
.st-gift .tx { display: block; line-height: 1; }
.st-gift .ck { width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 4px;
               display: grid; place-items: center; flex: 0 0 auto; }
.st-gift .ck > span { display: flex; line-height: 0; }
.st-gift .ck .st-ic { width: 10px; height: 10px; stroke-width: 3.2; opacity: 0; }
.st-gift.on { border-color: var(--green); background: #eef7f0; color: var(--green); }
.st-gift.on .ck { background: var(--green); border-color: var(--green); color: #fff; }
.st-gift.on .ck .st-ic { opacity: 1; }

/* 杂费实收：总收 */
.st-paid-sec { margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--line-soft); }
/* 减免：独立分区，解析到才渲染（空则整区隐藏） */
.st-ded-sec { margin-top: 11px; padding-top: 9px; border-top: 1px dashed var(--line-soft); }
.st-ded-head { display: flex; align-items: center; gap: 7px; padding: 0 2px 7px; font-size: 12px;
               color: var(--red); font-weight: 600; }
.st-ded-head .sdot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.st-paid-head { display: flex; align-items: center; gap: 7px; padding: 0 2px 7px; font-size: 12px;
                color: var(--green); font-weight: 600; }
.st-paid-head .sdot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.st-paid-head .note { font-weight: 400; color: var(--muted-2); font-size: 10.5px; }
.st-fee.paid { background: #f0f6f1; }
.st-fee.paid .st-amt { border-color: #b9d2c0; }

.add-row { margin-top: 9px; border: 0; background: none; color: var(--ink-2); display: inline-flex;
           align-items: center; gap: 4px; font-size: 11.5px; border-bottom: 1px dashed var(--muted-2); padding: 0 0 1px; }
.add-row:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* 成品区 */
.st-result { padding: 18px; }
.st-warn { border-radius: 8px; background: var(--ai-bg); padding: 10px 14px; margin-bottom: 14px;
           font-size: 12.5px; line-height: 1.7; color: #7a5a14; }
.st-img { width: 100%; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.06);
          cursor: zoom-in; }
.st-img:active { position: fixed; inset: 4vh 4vw; width: 92vw; height: auto; max-height: 92vh; z-index: 60;
                 object-fit: contain; background: #fff; cursor: zoom-out; }
.st-dl { display: flex; gap: 10px; margin-top: 14px; }
.st-check { margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.st-img.st-draft { opacity: .93; }

/* 结算单：卡片容器 + 粘贴框 + 底栏审核（对齐原型 07 v6） */
.st-pane .card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
                 box-shadow: 0 6px 18px rgba(49,42,31,.05); margin-bottom: 14px; overflow: hidden; }
.st-pane .card-head { display: flex; align-items: center; gap: 9px; padding: 11px 15px;
                      background: linear-gradient(180deg,#f7f4ea,#f3efe3); border-bottom: 1px solid var(--line-soft); }
.st-pane .card-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.st-pane .card-head h3 { font-family: var(--serif); font-size: 14.5px; color: var(--ink); letter-spacing: .5px; }
.st-pane .card-body { padding: 12px 14px; }
.st-pane textarea.paste { width: 100%; min-height: 170px; border: 1px solid var(--line); border-radius: 9px;
                          background: #fff; padding: 11px 12px; color: #49443b; font-size: 12.5px;
                          line-height: 1.7; resize: vertical; }
.st-pane textarea.paste:focus { outline: none; border-color: var(--ink-2); }
.st-pane .row-btns { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
/* 解析等待遮罩：盖在粘贴框上，动效集中在一处、一眼可见 */
.st-pane .st-paste-wrap { position: relative; }
.st-pane textarea.paste.dim { opacity: .35; }
.st-pane .st-parse-mask { position: absolute; inset: 0; display: flex; flex-direction: column;
                          align-items: center; justify-content: center; gap: 11px;
                          background: rgba(252, 250, 245, .78); }
.st-pane .st-parse-mask .spin.dark.lg { width: 22px; height: 22px; border-width: 3px; margin: 0; }
.st-pane .st-parse-mask b { font-family: var(--sans); font-size: 13px; color: var(--ink); }
.st-pane .st-parse-mask .bar { width: 150px; height: 3px; border-radius: 2px; overflow: hidden;
                               background: rgba(29, 39, 51, .12); }
.st-pane .st-parse-mask .bar::after { content: ""; display: block; width: 40%; height: 100%;
                                      border-radius: 2px; background: var(--ink);
                                      transform: translateX(-110%);
                                      animation: stslide 1.15s ease-in-out infinite; }
@keyframes stslide { to { transform: translateX(380%); } }
.st-pane .st-img { animation: fadeIn .3s ease; }
.st-pane .col-h { font-size: 11px; color: var(--muted); text-align: right; padding: 0 2px 2px; }
/* 实收行：单金额框（跨人民币+港币两列），币种前缀点击切换 */
.st-amt-wide { grid-column: 2 / span 2; }
.st-cur-pfx { cursor: pointer; user-select: none; }
/* 硬校验：必填缺失时输入框红框闪烁提示 */
.st-miss { border-color: var(--accent) !important; box-shadow: 0 0 0 3px rgba(182,74,59,.18) !important; }
