/* ============================================================
 * 跑个流程 · 阿办主题样式（阶段 1A 起按 demo 定稿视觉实现）
 * 阿办基调：赭橙品牌点缀、灰蓝操作色、暖白底、小圆角、扁平无阴影。
 * 页面文案不出现"OA"字样。
 * ============================================================ */
:root {
  /* 品牌与操作色 */
  --mascot: #B96832;        /* 赭橙 · 吉祥物/签名点缀 */
  --mascot-light: #F8EEE6;
  --brand: #365F87;         /* 灰蓝 · 主操作色 */
  --brand-dark: #294A6B;
  --brand-light: #EAF0F6;
  --brand-lighter: #F3F6F9;
  --link: #365F87;

  /* 语义色 */
  --blue: #365F87;   --blue-bg: #EAF0F6;
  --green: #237552;  --green-bg: #EAF4EE;
  --red: #BF4246;    --red-bg: #FBECEE;
  --orange: #956015; --orange-bg: #FFF3D9;
  --gray: #647080;   --gray-bg: #EEF0F2;

  /* 中性色 */
  --bg: #F7F6F3;
  --card: #FFFFFF;
  --line: #E3E5E7;
  --t1: #243447;
  --t2: #586677;
  --t3: #6B7580;

  /* 形状：扁平小圆角 */
  --r-s: 4px; --r-m: 6px; --r-l: 8px;
  --shadow: none;
  --shadow-up: 0 -2px 10px rgba(0, 0, 0, .08);

  --font-num: "SF Mono", Consolas, "Roboto Mono", "Courier New", monospace;
  --tabbar-h: 60px;
  --actionbar-h: 68px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--ui-fill-e6e7e5, #E6E7E5);
  color: var(--t1);
  line-height: 1.5;
}
button { font-family: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea, select { font-family: inherit; font-size: 16px; color: var(--t1); }
a { color: var(--link); text-decoration: none; }

/* 手机形态（JS 按 UA+窗口宽度判定为非 PC 时）：居中限宽；PC 形态由 .pc-mode 接管整幅 */
#frame {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  box-shadow: 0 0 36px rgba(0, 0, 0, .14);
  position: relative;
}
@media (max-width: 480px) { #frame { box-shadow: none; } }
#frame.pc-mode { max-width: none; box-shadow: none; }
#app { min-height: 100vh; }

/* ============ 阿办品牌点缀（马蹄铁为方案 B 母版，颜色取所在处 color） ============ */
.boot-loading { position: fixed; inset: 0; padding: 48px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--t3); background: var(--bg); }
/* Keep the recovery link visible when a script or stylesheet fails to load. */
#boot-reload:not([hidden]) ~ #frame .boot-loading { position: static; min-height: 62vh; }
.boot-loading .boot-logo { width: 76px; height: 76px; border-radius: 50%; }
.boot-loading .boot-line { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--t2); }
.aban-steps { display: inline-flex; align-items: flex-start; gap: 5px; color: var(--mascot); }
.aban-steps svg { width: 16px; height: 16px; opacity: .38; display: block; }
.aban-steps svg:nth-child(even) { margin-top: 4px; }
/* Scale the initial desktop loading screen before device detection runs. */
@media (min-width: 900px) {
  .boot-loading { gap: clamp(24px, 2vw, 32px); }
  .boot-loading .boot-logo { width: clamp(128px, 10vw, 176px); height: clamp(128px, 10vw, 176px); }
  .boot-loading .boot-line { gap: 16px; font-size: clamp(1.125rem, .75rem + .6vw, 1.5rem); }
  .boot-loading .aban-steps { gap: 8px; }
  .boot-loading .aban-steps svg { width: clamp(22px, 1.7vw, 28px); height: clamp(22px, 1.7vw, 28px); }
  .boot-loading .aban-steps svg:nth-child(even) { margin-top: 6px; }
}
.hoof-trail { display: inline-flex; align-items: flex-start; gap: 10px; color: var(--mascot); }
.hoof-trail svg { width: 15px; height: 15px; display: block; }
.hoof-trail svg:nth-child(odd) { transform: rotate(-14deg); }
.hoof-trail svg:nth-child(even) { transform: rotate(14deg) translateY(4px); }
.hoof-trail svg:nth-child(1) { opacity: .55; }
.hoof-trail svg:nth-child(2) { opacity: .42; }
.hoof-trail svg:nth-child(3) { opacity: .30; }
.hoof-trail svg:nth-child(4) { opacity: .19; }
.hoof-trail svg:nth-child(5) { opacity: .10; }
@media (prefers-reduced-motion: no-preference) {
  .aban-steps svg { animation: aban-hoof-step 1.2s ease-in-out infinite; }
  .aban-steps svg:nth-child(2) { animation-delay: .16s; }
  .aban-steps svg:nth-child(3) { animation-delay: .32s; }
  @keyframes aban-hoof-step { 0%, 100% { opacity: .32; transform: scale(.84); } 42% { opacity: 1; transform: scale(1); } }
}
.num, .mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.muted { color: var(--t3); font-size: 13px; }

:is(button, input, textarea, select, a, summary, [tabindex]):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ui-confirm { position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:20px; }
.ui-confirm > dialog.card { position:fixed;inset:0;margin:auto;width:min(480px,calc(100vw - 40px));max-height:calc(100dvh - 40px);height:fit-content;overflow:auto;padding:24px;color:var(--t1); }
.ui-confirm > dialog::backdrop { background:rgba(0,0,0,.5); }
.ui-confirm h2 { margin:0 0 16px;font-size:20px; }
.ui-confirm p { white-space:pre-wrap;overflow-wrap:anywhere; }
.ui-confirm-actions { display:flex;justify-content:flex-end;gap:12px;margin-top:24px; }
.ui-confirm-actions button { min-height:44px; }

/* ============ 页面骨架（手机端） ============ */
.page { min-height: 100vh; padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px); animation: pageIn .18s ease; }
.page.no-tab { padding-bottom: 28px; }
.page.has-bar { padding-bottom: calc(var(--actionbar-h) + env(safe-area-inset-bottom) + 20px); }
@keyframes pageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.page-head {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: minmax(84px, 1fr) minmax(0, 2fr) minmax(84px, 1fr); align-items: center; min-height: 52px;
  background: var(--ui-translucent, rgba(255, 255, 255, .92)); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 0 6px;
}
.h-back, .h-link { min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 14px; line-height: 1.5; white-space: nowrap; color: var(--blue); }
.h-back { justify-self: start; }
.h-back-ph { min-width: 0; }
.h-title { min-width: 0; text-align: center; font-size: 17px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-right { min-width: 0; display: flex; align-items: center; justify-content: flex-end; font-size: 13px; color: var(--t2); }
.h-right .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) and (pointer: fine) { .h-back:hover, .h-link:hover { background: var(--blue-bg); } }

.page-body { padding: 14px 14px 0; }

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.card-title { font-size: 13px; color: var(--t3); margin-bottom: 10px; font-weight: 500; }
.sec-label { font-size: 14px; font-weight: 600; color: var(--t2); margin: 18px 4px 8px; }
.note { font-size: 12px; color: var(--t3); line-height: 1.6; padding: 2px 4px 10px; }

/* ============ 状态胶囊与单据类型 ============ */
.pill {
  display: inline-flex; align-items: center;
  font-size: 12px; line-height: 1; font-weight: 400;
  padding: 4px 7px; border-radius: 3px;
  white-space: nowrap;
}
.pill-blue   { color: var(--blue);   background: var(--blue-bg); }
.pill-green  { color: var(--green);  background: var(--green-bg); }
.pill-red    { color: var(--red);    background: var(--red-bg); }
.pill-orange { color: var(--orange); background: var(--orange-bg); }
.pill-gray   { color: var(--gray);   background: var(--gray-bg); }
.pill-brand  { color: var(--brand);  background: var(--brand-light); }

.doctype {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 500; color: var(--brand);
  background: var(--brand-light);
  border-radius: 3px; padding: 4px 8px; line-height: 1.2;
}

/* ============ 首页（手机端） ============ */
.home-head {
  background: var(--ui-fill-eef1f3, #EEF1F3);
  color: var(--t1);
  padding: 26px 20px 58px;
}
.home-brand { font-size: 22px; font-weight: 600; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand-mascot { width: 28px; height: 28px; flex: none; display: block; }
.home-hello { margin-top: 6px; font-size: 14px; color: var(--t2); }
.home-body { padding: 0 14px; margin-top: -42px; }
.home-body > .brand-signature { padding: 22px 0 10px; text-align: center; }
.brand-signature { font-size: 12px; font-weight: 500; letter-spacing: .04em; color: var(--mascot); }

.todo-summary {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; cursor: pointer;
}
.ts-left { display: flex; align-items: center; gap: 12px; }
.ts-icon {
  width: 40px; height: 40px; border-radius: 6px;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.ts-icon svg { width: 22px; height: 22px; }
.ts-text { font-size: 15px; color: var(--t2); }
.ts-text b { font-size: 20px; color: var(--t1); font-family: var(--font-num); padding: 0 2px; }
.ts-go { color: var(--t3); font-size: 13px; display: flex; align-items: center; gap: 2px; }
.ts-go svg { width: 16px; height: 16px; }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 4px; }
.g4-item {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m);
  min-height: 84px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font-size: 13px; color: var(--t1); position: relative; cursor: pointer;
  padding: 10px 2px;
}
.g4-item:active { transform: scale(.97); }
.g4-ic { width: 38px; height: 38px; border-radius: 6px; display: flex; align-items: center; justify-content: center; position: relative; }
.g4-ic svg { width: 21px; height: 21px; }
.badge {
  position: absolute; top: -6px; right: -10px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--red); color: var(--ui-ink-ffffff, #fff);
  font-size: 11px; font-weight: 600; font-style: normal;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ui-line-ffffff, #fff); box-sizing: content-box;
}
.badge[hidden] { display: none; }

/* 发起申请分组 */
.apply-group { margin-bottom: 4px; }
.apply-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.apply-item {
  width: 100%; display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 16px; font-size: 15px; text-align: left;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.apply-item:last-child { border-bottom: none; }
.apply-item:active { background: var(--brand-lighter); }
.apply-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mascot); flex: none; }
.apply-item .ai-name { flex: 1; }
.apply-item .ai-arrow { color: var(--t3); display: flex; }
.apply-item .ai-arrow svg { width: 16px; height: 16px; }

/* ============ 底部 TabBar（手机端） ============ */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(480px, 100%);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--ui-translucent, rgba(255, 255, 255, .96)); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex; z-index: 40;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 11px; color: var(--t3); min-height: 44px;
}
.tab.on { color: var(--brand); font-weight: 600; }
.tab-ic { position: relative; display: flex; }
.tab-ic svg { width: 24px; height: 24px; }
/* TabBar 徽标：锚定图标右侧外延，不再压住图标主体（基础 .badge 供 PC 九宫格等继续使用） */
.tab-ic .badge {
  top: -7px;
  right: auto;
  left: 15px;   /* 左边缘只搭在图标右上角，主体向右延伸到标签间空隙 */
}

/* ============ 列表卡（待办/已办/抄送/我发起的） ============ */
.biz-card { cursor: pointer; position: relative; display: block; color: inherit; }
.biz-card:active { transform: scale(.99); }
.bc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.bc-top .spacer { flex: 1; }
.bc-title { font-size: 15px; font-weight: 500; margin-bottom: 6px; word-break: break-all; }
.bc-meta { font-size: 13px; color: var(--t3); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bc-wait { font-size: 12px; color: var(--orange); }

.btn-mini {
  font-size: 13px; color: var(--brand); border: 1px solid var(--brand);
  border-radius: 4px; padding: 6px 14px; min-height: 32px; font-weight: 500;
  background: var(--ui-fill-ffffff, #fff);
}
.btn-mini:active { background: var(--brand-light); }

/* ============ 详情页 ============ */
/* 流程进度/预览（竖向 stepper：节点 + 办理人 + 状态时间；详情页与发起页预览共用） */
.flow { padding: 4px 2px 2px; }
.fnode { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.fnode:last-child { padding-bottom: 2px; }
.fnode::before { content: ''; position: absolute; left: 11px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.fnode:last-child::before { display: none; }
.fnode .dot {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  background: var(--gray-bg); color: var(--t3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; z-index: 1; border: 2px solid var(--gray-bg);
}
.fnode .dot svg { width: 13px; height: 13px; }
.fnode .fbody { flex: 1; min-width: 0; padding-top: 2px; }
.fnode .fhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fnode .fname { font-size: 14px; color: var(--t2); line-height: 1.3; }
.fnode .ftag { font-size: 11px; color: var(--orange); background: var(--orange-bg); border-radius: 4px; padding: 1px 6px; line-height: 1.5; }
.fnode .fline { font-size: 12px; color: var(--t3); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; }
.fnode .fline .fwho { color: var(--t2); }
.fnode .fline .ftime { color: var(--t3); }
.fnode .fline .rej-act { color: var(--red); }
.fnode.done .dot { background: var(--green); border-color: var(--green); color: var(--ui-ink-ffffff, #fff); }
.fnode.done .fname { color: var(--t1); }
.fnode.done::before { background: var(--green); }
.fnode.cur .dot { background: var(--ui-fill-ffffff, #fff); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.fnode.cur .fname { color: var(--brand); font-weight: 600; }
.fnode.cur .cur-act { color: var(--brand); }
.fnode.cur::before { background: var(--green); }
/* 分支区：右缩进、左轨与主干连接线同轴（自分支点岔出、向汇聚点合回） */
.fbranch { margin: 0 0 4px 11px; padding: 2px 0 2px 22px; border-left: 2px solid var(--line); }
.flane { padding: 2px 0 12px; }
.flane:last-child { padding-bottom: 4px; }
.flane-label { display: inline-block; position: relative; font-size: 11px; color: var(--orange); background: var(--orange-bg); border-radius: 4px; padding: 1px 6px; line-height: 1.5; margin-bottom: 8px; }
.flane-label::before { content: ''; position: absolute; left: -22px; top: 9px; width: 22px; height: 2px; background: var(--line); }
.flane-direct { font-size: 12px; color: var(--t3); }
/* 已办结/待修改单据：未经过的节点灰化 */
.fnode.untaken .dot { background: var(--gray-bg); border-color: var(--gray-bg); color: var(--t3); font-weight: 400; }
.fnode.untaken .fname { color: var(--t3); font-weight: 400; }
.fnode.untaken .fline .fwho { color: var(--t3); }
.flow-preview .fnode { padding-bottom: 14px; }
/* 发起页预览卡：默认折叠为一行标题，点标题行展开（开合状态存 localStorage） */
.fp-head { display: flex; align-items: center; justify-content: space-between; cursor: pointer; user-select: none; margin-bottom: 0; }
.fp-toggle { display: flex; align-items: center; gap: 3px; color: var(--t3); font-size: 12px; }
.fp-toggle .chev { display: flex; }
.fp-toggle .chev svg { width: 14px; height: 14px; transform: rotate(90deg); transition: transform .15s; }
.flow-preview.closed .fp-toggle .chev svg { transform: rotate(0deg); }
.flow-preview:not(.closed) .fp-head { margin-bottom: 10px; }
.flow-preview.closed .flow { display: none; }

/* 单据头 */
.doc-head .subj { font-size: 16px; font-weight: 600; word-break: break-all; }
.doc-head .meta { font-size: 12.5px; color: var(--t3); margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.doc-head .abn { margin-top: 8px; font-size: 13px; color: var(--orange); }
.approval-summary { position: relative; }
.approval-summary .doc-summary-actions { position: absolute; top: 12px; right: 14px; display: flex; gap: 6px; }
.approval-summary .doc-summary-actions .btn-mini { padding-inline: 10px; white-space: nowrap; }
.approval-summary .summary-task { padding-right: 96px; }
.approval-summary:has(.doc-reinitiate) .summary-task { padding-right: 190px; }

/* 键值行 */
.kv { display: flex; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv:first-of-type { border-top: none; }
.kv .k { width: 96px; flex: none; color: var(--t3); }
.kv .v { flex: 1; min-width: 0; color: var(--t1); white-space: pre-wrap; overflow-wrap: anywhere; }
/* Shared leaf text rendering; labels and editable controls keep their own whitespace rules. */
.text-preserve { white-space: pre-wrap; overflow-wrap: anywhere; }
.amount-big { font-size: 22px; font-weight: 600; color: var(--mascot); font-variant-numeric: tabular-nums; }
.daxie { font-size: 12.5px; color: var(--mascot); margin-top: 4px; }

/* 审批时间线 */
.timeline { padding: 4px 0 2px; }
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.tl-item > div { flex: 1; min-width: 0; }
.tl-item:last-child { padding-bottom: 4px; }
.tl-item::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 16px; height: 16px; border-radius: 50%; flex: none; margin-top: 3px; background: var(--green); border: 3px solid var(--green-bg); z-index: 1; }
.tl-dot.rejected { background: var(--red); border-color: var(--red-bg); }
.tl-dot.neutral { background: var(--gray); border-color: var(--gray-bg); }
.tl-who { font-size: 14px; font-weight: 500; }
.tl-act { font-size: 13px; color: var(--t2); margin-left: 6px; font-weight: 400; }
.tl-time { font-size: 12px; color: var(--t3); margin-top: 2px; }
.tl-comment { margin-top: 6px; font-size: 13px; color: var(--t2); background: var(--bg); border-radius: 4px; padding: 8px 10px; display: inline-block; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.tl-comment.rejected { background: var(--red-bg); color: var(--red); }
.supplement-record { padding: 16px 0; border-top: 1px solid var(--line, var(--ui-line-e4e7eb, #e4e7eb)); }
.supplement-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--t2); }
.supplement-text { margin: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.supplement-file { display: block; padding: 6px 0; overflow-wrap: anywhere; }
.supplement-upload { margin: 12px 0; border-style: dashed; }
[data-supp-editor] { padding: 12px 0; }
[data-supp-file] { display: block; max-width: 100%; font-size: 12px; }
[data-supp-message]:not(:empty) { padding: 8px 0; color: var(--brand); }
[data-supp-list] { margin-top: 12px; }

/* 可编辑字段（填写型节点） */
.edit-field { border: 1.5px dashed var(--brand); background: var(--brand-lighter); }
.edit-field .card-title { color: var(--brand-dark); }

/* 附件 */
.att-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.att-item {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 8px 10px; font-size: 13px; background: var(--ui-fill-fafbfc, #FAFBFC); color: var(--t2);
  max-width: 100%; word-break: break-all;
}
.att-item .att-del { color: var(--t3); margin-left: 2px; }
.att-item a:not(.att-del) { color: inherit; text-decoration: none; }
.att-item a:not(.att-del):hover { text-decoration: underline; color: var(--brand); }
.att-uploading { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.att-uploading:empty { margin-top: 0; }
.att-progress {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 6px 10px; font-size: 12px; color: var(--t3); background: var(--ui-fill-fafbfc, #FAFBFC);
}
.att-progress-name { max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--t2); }
.att-progress-track { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.att-progress-fill { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--brand); transition: width .15s ease; }
.att-progress-pct { min-width: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.att-progress-cancel { color: var(--t3); }
.att-progress-error { border-color: var(--red); }
.att-progress-error .att-progress-pct { color: var(--red); }
.att-dropzone {
  min-height: 148px; padding: 20px 16px; border: 1.5px dashed var(--ui-line-8fa4b7, #8FA4B7); border-radius: var(--r-m);
  background: var(--brand-lighter); color: var(--t2); text-align: center; cursor: pointer;
  display: flex; flex-direction: column; justify-content: center; transition: border-color .15s ease, background .15s ease;
}
.att-dropzone:hover, .att-dropzone:focus-visible { border-color: var(--brand); background: var(--brand-light); outline: none; }
.att-dropzone.drag-active { border-style: solid; border-color: var(--brand); background: var(--brand-light); }
.att-dropzone-main { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.att-dropzone-icon { display: inline-flex; color: var(--brand); }
.att-dropzone-icon svg { width: 28px; height: 28px; }
.att-dropzone-title { font-size: 15px; font-weight: 600; color: var(--t1); }
.att-dropzone-action { font-size: 13px; color: var(--brand); }
.att-dropzone .att-grid:not(:empty) { margin-top: 14px; text-align: left; }
.att-dropzone.has-items { min-height: 116px; padding: 14px 16px; text-align: left; }
.att-dropzone.has-items .att-dropzone-main { flex-direction: row; justify-content: center; text-align: left; }
.att-dropzone.has-items .att-dropzone-icon svg { width: 22px; height: 22px; }
.att-dropzone.has-items .f-help { margin-bottom: 0; }
@media (max-width: 480px) {
  .att-dropzone { min-height: 132px; padding: 18px 14px; }
  .att-dropzone.has-items { min-height: 108px; }
}

/* ============ 底部操作条 ============ */
.actionbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(480px, 100%);
  min-height: calc(var(--actionbar-h) + env(safe-area-inset-bottom));
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--ui-translucent, rgba(255, 255, 255, .97)); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; z-index: 40;
}
.btn {
  min-height: 44px; border-radius: 4px; font-size: 16px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 20px; border: 1px solid transparent;
}
.btn:active { opacity: .85; }
.btn-primary { background: var(--brand); color: var(--ui-ink-ffffff, #fff); flex: 1; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--ui-fill-ffffff, #fff); color: var(--t2); border-color: var(--ui-line-d9d9d9, #D9D9D9); flex: 1; }
.btn-danger { background: var(--red); color: var(--ui-ink-ffffff, #fff); flex: 1; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; font-size: 14px; padding: 0 14px; flex: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ============ 表单 ============ */
.form-card { padding: 4px 16px; }
.f-field { border-bottom: 1px solid var(--line); padding: 12px 0; }
.f-field:last-child { border-bottom: none; }
.f-label { font-size: 14px; color: var(--t2); margin-bottom: 8px; }
.f-label .req { color: var(--red); margin-left: 2px; }
.f-input, .f-textarea, .f-select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 10px 12px; background: var(--ui-fill-ffffff, #fff); min-height: 44px; font-size: 15px;
}
.f-textarea { min-height: 88px; resize: vertical; }
.f-input:focus, .f-textarea:focus, .f-select:focus { outline: none; border-color: var(--brand); }
.f-help { font-size: 12.5px; color: var(--t3); margin-top: 6px; }

/* 目录选择器（catalog 字段）：hidden input + 触发按钮 */
.f-cat-btn {
  width: 100%; border: 1px solid var(--line); border-radius: var(--r-s);
  padding: 10px 12px; background: var(--ui-fill-ffffff, #fff); min-height: 44px; font-size: 15px;
  text-align: left; color: var(--t1); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.f-cat-btn.placeholder { color: var(--t3); }
.f-cat-btn:active { border-color: var(--brand); }
.f-cat-btn span[data-catlabel] { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-cat-btn svg { width: 16px; height: 16px; flex: none; color: var(--t3); }
.multi-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.multi-choice label { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-s); cursor: pointer; }
.multi-choice input { width: 17px; height: 17px; accent-color: var(--brand); }
.catalog-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 8px; }
.catalog-chips:empty { display: none; }
.catalog-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 8px 5px 10px; background: var(--brand-light); border-radius: 20px; overflow-wrap: anywhere; }
.catalog-chip button { border: 0; background: transparent; color: var(--t2); font-size: 20px; line-height: 1; cursor: pointer; }

/* ============ 单据查询 ============ */
.sq-card .sq-top { display: flex; gap: 8px; align-items: center; padding: 14px 16px 0; }
.sq-card .sq-top .f-input { flex: 1; min-height: 40px; }
.sq-filterbtn {
  display: none; flex: none; align-items: center; gap: 4px;
  min-height: 40px; padding: 0 12px; font-size: 13px; color: var(--t2);
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer;
}
.sq-filterbtn .fi-arrow { display: flex; color: var(--t3); transition: transform var(--motion-fast); }
.sq-filterbtn .fi-arrow svg { width: 14px; height: 14px; }
/* 展开后箭头转向下（单据中心与四列表同一 sq-open 交互，2026-10-10 用户拍板） */
.sq-card.sq-open .sq-filterbtn .fi-arrow { transform: rotate(90deg); }
.sq-filterbtn .badge { position: static; border: none; }
.sq-card .filter-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 12px 16px 6px; }
.sq-card .filter-grid label > span { display: block; font-size: 13px; color: var(--t2); margin-bottom: 6px; }
.sq-card .filter-grid .f-input, .sq-card .filter-grid .f-select { min-height: 40px; }
/* 字段内容动态控件：容器重置 label 文本样式；区间控件两端等宽 */
.sq-card .filter-grid .sq-fqwrap { display: block; margin-bottom: 0; font-size: inherit; color: inherit; }
.sq-card .filter-grid .sq-range { display: flex; align-items: center; gap: 6px; }
.sq-card .filter-grid .sq-range .f-input { flex: 1 1 0; min-width: 0; }
.sq-card .filter-grid .sq-range-sep { flex: none; color: var(--t3); }
.filter-acts { display: flex; gap: 10px; align-items: center; padding: 8px 16px 12px; }
.filter-acts .sq-note { flex: 1; margin: 0; }
/* 主题列只显摘要：允许换行、不折叠（2026-09-23 用户拍板） */
.dc-subject { white-space: normal; word-break: break-word; min-width: 10em; }
/* 手机端：筛选默认折叠（顶部常驻关键字+筛选钮），展开后选择/日期两列、文本输入整行 */
@media (max-width: 1023px) {
  .sq-filterbtn { display: flex; }
  .sq-card .filter-grid { display: none; }
  .sq-card.sq-open .filter-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
  .sq-card.sq-open .filter-grid .fg-wide { grid-column: 1 / -1; }
}
/* PC：标签行内、控件紧凑，筛选区压到两行左右 */
@media (min-width: 1024px) {
  .sq-card .filter-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .sq-card .filter-grid label { display: flex; align-items: center; gap: 8px; }
  .sq-card .filter-grid label > span { margin-bottom: 0; white-space: nowrap; }
  .sq-card .filter-grid label .f-input, .sq-card .filter-grid label .f-select { flex: 1; min-width: 0; min-height: 34px; }
  .sq-card .filter-grid label > .sq-fqwrap { flex: 1; min-width: 0; white-space: normal; }
  .sq-card .filter-grid .sq-range .f-input { min-height: 34px; }
}
/* ---- 列表搜索条去卡片化（2026-10-05 用户拍板）：全局搜索同款浅底圆角条，无白卡；适用于待办/已办/我发起的/抄送/全局搜索结果页。
   高度与工作台全局搜索统一：手机 44px（同 .home-search），PC 41px（同 .pc-gs）。
   注意：本段必须放在上方 .sq-card 基础规则之后——特异性相同，后者居上。 ---- */
.lv-search { background: transparent; border: 0; box-shadow: none; padding: 0; }
.lv-search .sq-top { background: var(--brand-light); border-radius: 22px; padding: 0 6px 0 10px; min-height: 44px; }
.lv-search .sq-top:focus-within { box-shadow: 0 0 0 1px var(--brand); }
.lv-search .lv-ic { display: flex; flex: none; color: var(--t3); }
.lv-search .lv-ic svg { width: 15px; height: 15px; }
.lv-search .sq-top .f-input { border: 0; background: transparent; padding-left: 0; }
.lv-search .sq-top .f-input:focus { border-color: transparent; }
.lv-search .sq-filterbtn { border: 0; background: transparent; min-height: 44px; padding: 0 8px; }
.lv-search .filter-grid { padding: 12px 0 6px; }
.lv-search .filter-chips { padding: 8px 0 0; }
#frame.pc-mode .lv-search .sq-top { min-height: 41px; border-radius: 17px; }
#frame.pc-mode .lv-search .sq-filterbtn { min-height: 34px; }
.sh-search { padding: 12px 16px 4px; display: flex; gap: 8px; align-items: center; }
.sh-search .f-input { flex: 1; }
.sh-dept-filter .f-label { flex: none; margin-bottom: 0; white-space: nowrap; }
.sh-dept-filter .f-select { flex: 1; min-width: 0; }
.sh-dept-button, .sh-person-button { width: 100%; text-align: left; cursor: pointer; }
.sheet.sh-org { width: min(560px, 100%); }
.sheet.sh-org .sh-list { min-height: 110px; flex: 1; }
.sh-tree-select { overflow-y: auto; padding: 4px 16px 18px; }
.sh-tree-line { min-height: 38px; display: flex; align-items: center; }
.sh-tree-children { margin-left: 20px; border-left: 1px solid var(--line); }
.sh-tree-children[hidden] { display: none; }
.sh-tree-select[hidden], .sh-person-view[hidden] { display: none; }
.sh-tree-toggle, .sh-tree-spacer { width: 26px; flex: none; text-align: center; color: var(--t3); }
.sh-tree-toggle { min-height: 34px; }
.sh-tree-label { min-height: 38px; flex: 1; text-align: left; padding: 2px 8px; border-radius: 6px; }
.sh-tree-label:active { background: var(--brand-lighter); }
.sh-person-view { min-height: 110px; display: flex; flex: 1; flex-direction: column; overflow: hidden; }
.sh-person-nav { min-height: 46px; padding: 4px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.sh-person-nav button { color: var(--brand); flex: none; }
.sh-person-nav span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-sync { flex: none; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  color: var(--brand); font-size: 13px; cursor: pointer; white-space: nowrap; }
.sh-sync:disabled { opacity: .55; cursor: default; }
.doc-print { text-decoration: none; }

/* ============ 我的 ============ */
.me-head { display: flex; align-items: center; gap: 14px; padding: 10px 4px 14px; }
.me-avatar {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--brand); color: var(--ui-ink-ffffff, #fff); font-size: 24px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.me-name { font-size: 18px; font-weight: 600; }
.me-roles { font-size: 13px; color: var(--t3); margin-top: 3px; }
.me-list { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
/* 「我的」页相邻入口列表统一 12px 间距（2026-10-06；此前部分靠内联 margin、部分为 0，观感不一致） */
.me-list + .me-list { margin-top: 12px; }
.me-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  min-height: 48px; padding: 0 16px; font-size: 15px; text-align: left;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.me-item:last-child { border-bottom: none; }
.me-item:active { background: var(--brand-lighter); }
.me-item .mi-label { flex: 1; }
.me-item .mi-extra { color: var(--t3); font-size: 13px; }
.me-item .fi-arrow { color: var(--t3); display: flex; }
.me-item .fi-arrow svg { width: 16px; height: 16px; }
.me-item.danger .mi-label { color: var(--red); }
/* PC 左侧导航已覆盖的入口在「我的」页隐藏（手机端无侧栏，保留全部入口） */
.pc-mode .pc-dupe { display: none; }

/* ============ 底部弹层 ============ */
#sheet-root { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
#sheet-root.show { pointer-events: auto; }
.sheet-mask { position: absolute; inset: 0; background: rgba(15, 20, 25, .45); opacity: 0; transition: opacity .22s ease; }
#sheet-root.show .sheet-mask { opacity: 1; }
.sheet {
  position: absolute; bottom: 0; left: 50%; transform: translate(-50%, 102%);
  width: min(480px, 100%);
  background: var(--ui-fill-ffffff, #fff); border-radius: 10px 10px 0 0;
  box-shadow: var(--shadow-up);
  max-height: 78vh; display: flex; flex-direction: column;
  transition: transform .26s cubic-bezier(.2, .8, .3, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
#sheet-root.show .sheet { transform: translate(-50%, 0); }
.sh-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; flex: none; }
.sh-title { font-size: 16px; font-weight: 600; }
.sh-cancel { color: var(--t3); font-size: 15px; min-height: 40px; padding: 0 6px; }
.sh-list { overflow-y: auto; padding: 0 8px 14px; }
.sh-opt {
  width: 100%; display: flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 12px; font-size: 16px; text-align: left;
  border-radius: 4px;
}
.sh-opt:active { background: var(--brand-lighter); }
.sh-opt span { flex: 1; }
.sh-opt .muted { font-size: 13px; }
.sh-opt svg { width: 16px; height: 16px; flex: none; color: var(--t3); }
.sh-empty { text-align: center; color: var(--t3); font-size: 14px; padding: 26px 0; }
.sh-sec { font-size: 12px; color: var(--t3); padding: 10px 12px 4px; }
.sh-more { text-align: center; color: var(--t3); font-size: 12px; padding: 10px 0 4px; }
.sh-opt .sh-opt-name { flex: 1; white-space: normal; word-break: break-all; line-height: 1.45; }
/* 选择器特异性需压过上方 .sh-opt span 的 flex:1，否则星标 span 会吃掉行尾空间导致图标不靠右 */
.sh-opt .sh-fav { flex: none; display: inline-flex; padding: 6px; margin: -6px 0; color: var(--t3); }
.sh-fav svg { width: 18px; height: 18px; }
.sh-fav.on { color: var(--ui-ink-f5a623, #F5A623); }
.sh-cat {
  width: 100%; display: flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 12px; font-size: 15px; font-weight: 600; color: var(--t2);
  border-radius: 4px; text-align: left;
}
.sh-cat:active { background: var(--brand-lighter); }
.sh-cat span:first-child { flex: 1; }
.sh-cat .cnt { flex: none; font-weight: 400; color: var(--t3); font-size: 13px; }
.sh-cat svg { width: 16px; height: 16px; flex: none; color: var(--t3); transition: transform .15s; }
.sh-cat.open svg { transform: rotate(90deg); }
/* 目录选择弹层两栏布局（修饰类 .sh-catalog 限定，不影响 openTextSheet/openListSheet 等其它弹层）：
   左栏分类导航 + 右栏条目列表，两栏各自独立纵向滚动；右栏名称字号与左栏导航一致（2026-09-24 用户拍板） */
.sheet.sh-catalog .sh-cols { flex: 1; min-height: 0; display: flex; }
.sheet.sh-catalog .sh-nav {
  width: 96px; flex: none; overflow-y: auto;
  border-right: 1px solid var(--line); padding: 4px 0 14px;
}
.sheet.sh-catalog .sh-nav-item {
  width: 100%; text-align: left; font-size: 13px; color: var(--t2); line-height: 1.4;
  padding: 10px 8px 10px 11px; border-left: 3px solid transparent; word-break: break-all;
}
.sheet.sh-catalog .sh-nav-item:active { background: var(--brand-lighter); }
.sheet.sh-catalog .sh-nav-item.on {
  background: var(--brand-lighter); border-left-color: var(--brand);
  color: var(--brand); font-weight: 600;
}
.sheet.sh-catalog .sh-list { flex: 1; min-width: 0; }
.sheet.sh-catalog .sh-opt { font-size: 13px; }
#frame.pc-mode .sheet.sh-catalog .sh-nav { width: 120px; }
#frame.pc-mode .sheet.sh-catalog .sh-nav-item { font-size: 14px; padding: 10px 12px 10px 13px; }
#frame.pc-mode .sheet.sh-catalog .sh-opt { font-size: 14px; }
/* 行内编号（灰色小字，仅选择器内区分用）与"新"角标（近期新增 30 天内，放名称前随名称换行） */
.sh-opt .sh-opt-code { flex: none; font-size: 12px; color: var(--t3); }
.sh-badge-new {
  display: inline-block; margin-right: 4px; padding: 1px 4px; border-radius: 3px;
  font-size: 10px; line-height: 1.4; color: var(--red); background: var(--red-bg); vertical-align: 1px;
}
/* PC 形态：弹层屏幕居中（手机端保持底部弹层不变），以屏幕中心为锚，内容增减时双向扩展 */
#frame.pc-mode .sheet {
  top: 50%; bottom: auto;
  transform: translate(-50%, calc(-50% + 16px));
  width: min(720px, 92%);
  max-height: 84vh;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 20, 25, .22);
  padding-bottom: 0;
}
#frame.pc-mode #sheet-root.show .sheet { transform: translate(-50%, -50%); }
.sh-body { padding: 4px 16px 18px; }
.sh-body textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 4px;
  padding: 10px 12px; font-size: 15px; outline: none; resize: none; background: var(--ui-fill-fafbfc, #FAFBFC);
}
.sh-body textarea:focus { border-color: var(--brand); }
.sh-hint { font-size: 13px; color: var(--t3); margin-bottom: 8px; }
.sh-err { color: var(--red); font-size: 13px; margin: 8px 0 0; }
.sh-body .btn { margin-top: 14px; }

/* ============ 右侧抽屉（PC 单据中心「查看」；层级低于 sheet，终止/退回弹层可压在其上） ============ */
#drawer-root { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
#drawer-root.show { pointer-events: auto; }
.drawer-mask { position: absolute; inset: 0; background: rgba(15, 20, 25, .45); opacity: 0; transition: opacity .22s ease; }
#drawer-root.show .drawer-mask { opacity: 1; }
.drawer {
  position: absolute; top: 0; right: 0; height: 100vh;
  width: min(760px, 92vw);
  background: var(--gray-bg, var(--ui-fill-f5f6f8, #F5F6F8));
  box-shadow: -8px 0 24px rgba(15, 20, 25, .18);
  transform: translateX(102%);
  transition: transform .26s cubic-bezier(.2, .8, .3, 1);
  display: flex; flex-direction: column;
}
#drawer-root.show .drawer { transform: translateX(0); }
.drawer-head {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
.drawer-title {
  flex: 1; min-width: 0; font-size: 16px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.drawer-x {
  flex: none; width: 34px; height: 34px; border-radius: 6px;
  color: var(--t3); font-size: 20px; line-height: 1;
}
.drawer-x:hover { background: var(--brand-lighter); color: var(--t1); }
/* 整页打开兜底（宽表格/打印/复杂办理跳整页详情） */
.drawer-full {
  flex: none; width: 34px; height: 34px; border-radius: 6px;
  color: var(--t3); display: flex; align-items: center; justify-content: center;
}
.drawer-full svg { width: 17px; height: 17px; }
.drawer-full:hover { background: var(--brand-lighter); color: var(--t1); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px 24px; }

/* ============ 提示条（顶部滑入） ============ */
#toast-root {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%);
  width: min(480px, 100%); z-index: 120; pointer-events: none;
  display: flex; flex-direction: column; align-items: center;
  padding-top: calc(10px + env(safe-area-inset-top));
}
.toast {
  max-width: 88%; margin-bottom: 8px;
  padding: 10px 18px; border-radius: 6px;
  font-size: 14px; color: var(--ui-ink-ffffff, #fff); background: rgba(40, 45, 52, .92);
  opacity: 0; transform: translateY(-14px);
  transition: opacity .25s ease, transform .25s ease;
  text-align: center; line-height: 1.45;
  display: flex; align-items: center; gap: 8px;
}
.toast.in { opacity: 1; transform: none; }
.toast-success { background: var(--green); }
.toast-error { background: var(--red); }
.toast .t-hoof { width: 15px; height: 15px; flex: none; opacity: .9; }
.toast .t-hoof svg { width: 100%; height: 100%; display: block; }

/* 空态：文案 + 一行渐隐蹄印足迹 */
.empty { text-align: center; color: var(--t3); font-size: 14px; padding: 60px 0 40px; }
.empty .empty-trail { margin-top: 14px; display: flex; justify-content: center; }

/* ============ 登录页 ============ */
.login-wrap { max-width: 400px; margin: 0 auto; padding: 8vh 14px 40px; }
.login-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(36, 52, 71, .05); }
.login-brand { background: var(--mascot-light); text-align: center; padding: 26px 26px 20px; }
.login-brand .lb-mark { width: 64px; height: 54px; }
.login-brand .lb-name { font-size: 23px; font-weight: 700; letter-spacing: 3px; margin-top: 10px; }
.login-brand .lb-slogan { font-size: 12px; color: var(--mascot); letter-spacing: 5px; margin-top: 5px; }
.login-body { padding: 16px 26px 24px; text-align: center; }
.login-body .lb-trail { margin: 2px auto 12px; display: flex; justify-content: center; }
.login-body .lb-quote { font-size: 12px; color: var(--t3); min-height: 18px; margin-bottom: 16px; }
.login-body .lb-foot { font-size: 11px; color: var(--ui-ink-b9bdc4, #B9BDC4); margin-top: 14px; }
.login-body h3 { font-size: 14px; color: var(--t2); font-weight: 500; margin-bottom: 10px; text-align: left; }
.login-wait { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 22px 0; color: var(--t2); font-size: 14px; }
.login-err-hoof { width: 34px; height: 34px; margin: 4px auto 10px; color: var(--red); }
.login-err-hoof svg { width: 100%; height: 100%; display: block; }
.login-err-title { font-size: 18px; font-weight: 600; }
.login-err-desc { font-size: 14px; color: var(--t2); line-height: 1.8; margin: 10px 0 24px; overflow-wrap: anywhere; }
.pc-mode .login-wrap { width:100%; max-width:608px; min-height:100vh; padding:40px 24px; display:flex; align-items:center; }
.pc-mode .login-card { width:100%; }
.pc-mode .login-brand { padding:32px 40px 26px; }
.pc-mode .login-body { padding:28px 40px 32px; }
.pc-mode .login-err-title { font-size:22px; }
.pc-mode .login-err-desc,.pc-mode .login-wait { font-size:16px; }
.login-wait { flex-wrap:wrap; }
.user-pick {
  display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-m);
  padding: 12px 14px; margin-bottom: 8px; font-size: 15px;
}
.user-pick:active { border-color: var(--brand); background: var(--brand-lighter); }

/* ============ 启动失败 / 无法进入（整页） ============ */
.down-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.down-page .d-mark { width: 60px; height: 51px; opacity: .35; filter: grayscale(.4); }
.down-page .d-title { font-size: 16px; font-weight: 600; margin-top: 14px; }
.down-page .d-desc { font-size: 12.5px; color: var(--t3); margin-top: 6px; line-height: 1.8; }
.down-page .d-desc code { font-size: 11.5px; background: var(--ui-fill-edeef0, #EDEEF0); border-radius: 3px; padding: 1px 6px; color: var(--ui-ink-9b3034, #9b3034); }
.down-page .btn { margin-top: 16px; padding: 10px 34px; flex: none; width: auto; }
.down-page .d-safe { font-size: 11.5px; color: var(--ui-ink-b9bdc4, #B9BDC4); margin-top: 14px; }
.down-page .d-trail { margin-top: 18px; }

/* ============================================================
 * PC 端（#frame.pc-mode，由 JS 按设备 UA 判定为 PC 时）：侧边导航 + 顶部栏 + 主内容区
 * ============================================================ */
.pc-shell { display: flex; min-height: 100vh; align-items: stretch; }

/* ---- 侧边导航（浅色） ---- */
.pc-side {
  width: 216px; flex: none;
  background: var(--ui-fill-fcfbf9, #FCFBF9); color: var(--t2);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.pc-logo {
  padding: 20px 18px 16px; display: flex; align-items: center; gap: 10px; color: var(--t1);
}
.pc-logo .brand-mascot { width: 52px; height: 48px; }
.pc-logo-copy { display: flex; flex-direction: column; min-width: 0; white-space: nowrap; }
.pc-logo-name { font-size: 20px; font-weight: 700; letter-spacing: .06em; line-height: 1.2; }
.pc-logo-slogan { margin-top: 3px; color: var(--mascot); font-size: 11px; font-weight: 500; letter-spacing: .08em; line-height: 1.2; }
.pc-menu { flex: 1; padding: 6px 12px; display: flex; flex-direction: column; gap: 2px; }
.pc-menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px; height: 44px; border-radius: 6px;
  font-size: 14px; color: var(--t2); text-align: left;
  transition: background .15s ease;
}
.pc-menu-item:hover { background: var(--brand-lighter); color: var(--brand); }
.pc-menu-item.on { background: var(--brand-light); color: var(--brand); font-weight: 600; }
.pc-mi-ic { display: flex; flex: none; }
.pc-mi-ic svg { width: 19px; height: 19px; }
.pc-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--red); color: var(--ui-ink-ffffff, #fff);
  font-size: 11px; font-weight: 600; font-style: normal;
  display: flex; align-items: center; justify-content: center;
}
/* ---- 主区骨架 ---- */
.pc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-top {
  height: 60px; flex: none;
  background: var(--ui-translucent, rgba(255, 255, 255, .92)); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.pc-top-title { font-size: 17px; font-weight: 500; }
.pc-top-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.pc-date { font-size: 13px; color: var(--t3); }
.pc-user { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.pc-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: var(--ui-ink-ffffff, #fff); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.pc-logout {
  font-size: 13px; color: var(--t2); background: var(--ui-fill-ffffff, #fff);
  border: 1px solid var(--line); border-radius: 4px;
  padding: 0 14px; height: 32px; flex: none;
}
.pc-logout:hover { color: var(--red); border-color: var(--red); }
.pc-content { padding: 20px 24px 40px; animation: pageIn .18s ease; }
.pc-wrap { max-width: 880px; }

/* ---- 工作台 ---- */
.pc-sub-head { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: 600; margin-bottom: 12px; }

.pc-quick { display: flex; flex-wrap: wrap; gap: 8px; }
.pc-quick-item {
  font-size: 13px; padding: 8px 14px; border-radius: 4px;
  border: 1px solid var(--line); background: var(--ui-fill-ffffff, #fff); color: var(--t2);
  min-height: 34px;
}
.pc-quick-item:hover { border-color: var(--brand); color: var(--brand); }

/* PC 下内容页复用手机端卡片组件；actionbar 变为静态右挂 */
.pc-mode .actionbar {
  position: static; transform: none; width: auto;
  border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--card); backdrop-filter: none;
  padding: 12px 14px; justify-content: flex-end;
  min-height: 0; margin-top: 4px;
}
.pc-mode .actionbar .btn { flex: none; min-width: 120px; }
.pc-mode .tabbar { display: none; }

/* ============ 管理台 ============ */
/* 分区页签（绑定/异常/版本/审计）：胶囊式 */
.adm-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.adm-tab {
  font-size: 13px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--t2);
}
.adm-tab.on { background: var(--brand); border-color: var(--brand); color: var(--ui-ink-ffffff, #fff); font-weight: 500; }

/* 绑定管理内的二级切换（角色成员/部门负责人）：分段控件 */
.adm-switch {
  display: flex; margin-bottom: 12px;
  border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--card); overflow: hidden;
}
.adm-sw { flex: 1; min-height: 40px; font-size: 14px; color: var(--t2); }
.adm-sw.on { background: var(--brand-light); color: var(--brand); font-weight: 600; }

/* 角色/部门卡片与成员行 */
.adm-ent.editing { border-color: var(--brand); }
.adm-ent-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.adm-ent-head .spacer { flex: 1; }
.adm-ent-name { font-size: 15px; font-weight: 600; }
.adm-members { border-top: 1px solid var(--line); }
.adm-mrow {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.adm-mrow:last-child { border-bottom: none; }
.adm-mname { font-weight: 500; }
.adm-mname.off { color: var(--t3); }
.adm-mempty { padding: 8px 0; font-size: 13px; }
.adm-del {
  margin-left: auto; width: 30px; height: 30px; flex: none;
  border: 1px solid var(--line); border-radius: 4px; color: var(--t3); font-size: 15px;
}
.adm-del:active { color: var(--red); border-color: var(--red); }

/* 企微负责人参考提示（部门负责人卡片内，不作审批依据） */
.adm-wecom-leader { padding: 8px 0 0; font-size: 12.5px; color: var(--t3); border-top: 1px dashed var(--line); margin-top: 8px; }

/* 编辑态选人区 */
.adm-picker { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.adm-cands {
  margin-top: 8px; max-height: 264px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: var(--r-s);
}
.adm-cand {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 42px; padding: 4px 12px; font-size: 14px; text-align: left;
  border-bottom: 1px solid var(--line);
}
.adm-cand:last-child { border-bottom: none; }
.adm-cand:active { background: var(--brand-lighter); }
.adm-cand[disabled] { opacity: .45; }
.adm-add { color: var(--brand); font-size: 13px; flex: none; }
.adm-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

/* 只读表格（版本/审计） */
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th {
  text-align: left; color: var(--t3); font-weight: 500;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.adm-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; word-break: break-all; }
.adm-table tr:last-child td { border-bottom: none; }

/* 滑动开关（自审上移 / 通知分类） */
.adm-toggle {
  width: 46px; height: 26px; flex: none; border-radius: 999px;
  background: var(--gray-bg); border: 1px solid var(--line);
  position: relative; transition: background .15s;
}
.adm-toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%; background: var(--ui-fill-ffffff, #fff);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: left .15s;
}
.adm-toggle.on { background: var(--brand); border-color: var(--brand); }
.adm-toggle.on::after { left: 22px; }
.adm-toggle[disabled] { opacity: .5; }

/* 流程设置：开关行/节点行（可换行，手机端不溢出） */
.adm-nrow {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.adm-nrow:last-child { border-bottom: none; }
.adm-nrow .spacer { flex: 1; }
.adm-ov { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* 流程卡内的分区（节点办理人 / 枚举选项） */
.adm-sub { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.adm-sub-title { font-size: 13px; color: var(--t3); font-weight: 500; margin-bottom: 4px; }
.adm-khint { font-size: 12px; color: var(--t3); line-height: 1.6; margin: 2px 0 4px; }

/* 模板详情：流程设置卡内折叠区（节点参数可编辑）+ 版本查看弹层（只读）共用 */
.adm-tpl-toggle {
  display: flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
  font-size: 13px; color: var(--t2); padding: 6px 0;
}
.adm-tpl-arrow { display: inline-block; color: var(--t3); transition: transform .15s; }
.adm-tpl-toggle.open .adm-tpl-arrow { transform: rotate(90deg); }
.adm-tpl-detail { padding: 2px 0 8px; }
.adm-tpl-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 6px; }
.adm-tpl-sheet { max-height: 72vh; overflow-y: auto; }
/* 节点参数旋钮：生效值来源小字标注 + 三态下拉紧凑化 */
.adm-knob-src { font-size: 11px; line-height: 1.4; margin-top: 2px; }
.adm-knob-sel { padding: 3px 6px; font-size: 12px; width: auto; min-width: 86px; }

/* 枚举选项：值胶囊、编辑行与分支锁定置灰 */
.adm-enum { padding: 8px 0; border-bottom: 1px solid var(--line); }
.adm-enum:last-child { border-bottom: none; }
.adm-enum-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.adm-enum-head .spacer { flex: 1; }
.adm-enum.locked .adm-chips { opacity: .55; }
.adm-enum-lock { font-size: 12px; color: var(--t3); margin-top: 6px; }
.adm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-opt-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.adm-acts .adm-sel { margin-right: auto; align-self: center; font-size: 13px; }

/* 小按钮色变（清除覆盖=中性灰，停用=警示红） */
.adm-mini-gray { color: var(--t2); border-color: var(--line); }
.adm-mini-danger { color: var(--red); border-color: var(--red); }

/* 单据中心 */
.dc-sub { color: var(--t3); font-size: 12px; }
/* 流水号完整一排显示；创建时间按"日期 / 时间"两行断开（2026-10-09 用户调整列宽） */
#sq-result .adm-table td.dc-serial { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
#sq-result .adm-table td.dc-time { width: 7em; white-space: normal; word-break: normal; overflow-wrap: normal; }
/* 台账业务列中的金额/数字/日期值不换行（避免 1,009.00 拆行） */
#sq-result .adm-table td.dc-nowrap { white-space: nowrap; word-break: normal; }
/* Keep actions visible inside the document table even in a narrow desktop window. */
#frame.pc-mode #sq-result .adm-table { min-width: 1050px; }
#frame.pc-mode #sq-result .adm-table th:last-child,
#frame.pc-mode #sq-result .adm-table td.dc-ops {
  position: sticky; right: 0; z-index: 2; width: 1%; white-space: nowrap;
  background: var(--card); box-shadow: -1px 0 var(--line);
}
.dc-op-danger { color: var(--red); }
.dc-op-danger:hover { border-color: var(--red); }
/* 查询/台账双视图（2026-10-22）：分段切换控件；查询视图隐藏业务列入口 */
.sq-view { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: none; }
.sq-view button { border: 0; background: transparent; padding: 7px 14px; font-size: 13px; color: var(--t2); cursor: pointer; }
.sq-view button[aria-pressed="true"] { background: var(--brand); color: var(--ui-ink-ffffff, #fff); }
.sq-card.sq-view-query .fc-wrap,
.sq-card.sq-view-query #sq-preset-wrap,
.sq-card.sq-view-query .sq-lchips { display: none; }
/* 台账视图表格：限高内部滚动 + 表头吸顶 + 首列左冻结，横向滚动条常驻视口底部 */
#sq-result.ledger-mode .adm-table-wrap { max-height: calc(100dvh - 300px); min-height: 320px; overflow: auto; }
#sq-result.ledger-mode .adm-table thead th { position: sticky; top: 0; z-index: 3; background: var(--card); box-shadow: 0 1px 0 var(--line); }
#sq-result.ledger-mode .adm-table td:first-child,
#sq-result.ledger-mode .adm-table th:first-child { position: sticky; left: 0; z-index: 2; background: var(--card); box-shadow: 1px 0 0 var(--line); }
#sq-result.ledger-mode .adm-table thead th:first-child,
#sq-result.ledger-mode .adm-table thead th:last-child { z-index: 4; }
/* 台账空态：预设流程快捷卡片 */
.sq-ledger-empty { padding: 18px 20px; }
.sq-ledger-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 10px 0; }
.sq-ledger-card { text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 12px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; color: inherit; }
.sq-ledger-card:hover { border-color: var(--brand); }
.sq-ledger-card b { font-size: 14px; }
.sq-ledger-card span { color: var(--t3); font-size: 12px; }
.dc-column-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.dc-column-toolbar [data-column-reset] { margin-left: auto; }
.sq-card .filter-acts > .dc-column-toolbar { margin:0 0 0 auto; justify-content:flex-end; }
.sq-card .filter-acts > .dc-column-toolbar [data-column-reset] { margin-left:0; }
#sq-result th[data-document-column] { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; }
#sq-result.dc-dragging th[data-document-column] { cursor: grabbing; }
#sq-result th.dc-drag-source { opacity: .55; }
#sq-result th.dc-drop-before { box-shadow: inset 3px 0 var(--brand); }
#sq-result th.dc-drop-after { box-shadow: inset -3px 0 var(--brand); }

/* Shared interaction states, U01–U20. Existing brand palette is retained. */
:root { --motion-fast: 180ms; --motion-panel: 240ms; --body-size: 15px; --label-size: 14px; --help-size: 13px; }
button, input, select, textarea { font-family: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
[hidden] { display: none !important; }
.modal-open { overflow: hidden; }
.modal-blocked { pointer-events: none; }
.loading-state { padding: 20px 16px; color: var(--t2); min-height: 180px; }
.loading-state .loading-line { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: var(--t2); }
.skeleton { display: grid; gap: 16px; padding-top: 20px; }
.skeleton i { display: block; height: 24px; border-radius: 4px; background: linear-gradient(90deg, var(--ui-fill-edeef0, #EDEEF0) 25%, var(--ui-fill-f6f7f8, #F6F7F8) 50%, var(--ui-fill-edeef0, #EDEEF0) 75%); background-size: 200% 100%; }
.skeleton i:nth-child(2) { width: 65%; height: 36px; }
.skeleton i:last-child { height: 56px; }
@media (prefers-reduced-motion: no-preference) {
  .skeleton i { animation: aban-shimmer 1.4s linear infinite; }
  @keyframes aban-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
}
.load-error { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--ui-line-bf4246, #bf4246); background: var(--ui-fill-fff5f3, #fff5f3); border-radius: 6px; }
.load-error .le-hoof { color: var(--ui-ink-bf4246, #bf4246); flex: none; width: 26px; height: 26px; }
.load-error .le-hoof svg { width: 100%; height: 100%; display: block; }
.load-error .le-text { flex: 1; min-width: 0; }
.load-error .le-title { font-size: 13.5px; font-weight: 600; color: var(--ui-ink-9b3034, #9b3034); }
.load-error .le-sub { font-size: 12px; color: var(--ui-ink-b4656a, #b4656a); margin-top: 2px; }
.load-error .le-retry { flex: none; }
.validation-summary { padding: 16px; margin-bottom: 14px; border: 1px solid var(--ui-line-bf4246, #bf4246); background: var(--ui-fill-fff5f3, #fff5f3); border-radius: 6px; color: var(--ui-ink-9b3034, #9b3034); }
.validation-summary button { display: block; text-align: left; text-decoration: underline; color: inherit; min-height: 40px; }
.field-error { color: var(--ui-ink-9b3034, #9b3034); margin-top: 6px; font-size: var(--help-size); }
[aria-invalid="true"] { border-color: var(--ui-line-bf4246, #bf4246) !important; }
.form-card { min-width: 0; padding: 12px 18px 18px; position: relative; }
.form-card legend { font-size: 16px; font-weight: 650; padding: 0 6px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px 22px; }
.form-grid .f-field { border: 0; padding: 0; min-width: 0; }
.f-label { display: block; font-size: var(--label-size); }
.f-help, .note { font-size: var(--help-size); color: var(--t2); }
.empty, .boot-loading, .muted, .me-roles { color: var(--t2); }
.brand-signature { color: var(--ui-ink-945126, #945126); }
.f-input, .f-select, .f-textarea { font-size: 16px; }
.form-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--t2); font-size: var(--help-size); }
.form-meta b { color: var(--t1); font-size: 16px; }
.form-meta details { margin-left: auto; }
.form-heading .f-help { margin-top: 6px; overflow-wrap: anywhere; }
.form-heading .f-field { padding-bottom: 0; }
.pc-mode .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pc-mode .field-wide { grid-column: 1 / -1; }
.pc-mode .actionbar { position: sticky; bottom: 0; left: auto; z-index: 12; margin-top: 16px; box-shadow: 0 -4px 12px #24344708; }
.pc-mode .drawer > .actionbar { position: static; flex: none; margin: 0; border-radius: 0; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.actionbar { flex-wrap: wrap; gap: 8px; }
.btn-return { color: var(--ui-ink-a93238, #a93238); background: var(--ui-fill-fff5f3, #fff5f3); border: 1px solid var(--ui-line-bf4246, #bf4246); }
.drawer { height: 100vh; height: 100dvh; }
.drawer-body { min-height: 0; scroll-padding: 16px; }
.drawer-head { min-height: 64px; }
.drawer-x, .drawer-full, .sh-cancel { min-width: 44px; min-height: 44px; }
.approval-summary { display: grid; gap: 12px; }
.summary-task { color: var(--brand); font-weight: 600; font-size: 14px; }
.summary-money { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.summary-money .amount-big { font-size: 28px; white-space: nowrap; }
.summary-money .daxie { width: 100%; margin-top: 0; }
.summary-text { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; font-size: 15px; }
.summary-text b { font-weight: 400; color: var(--t2); }
.summary-text span { overflow-wrap: anywhere; white-space: pre-wrap; }
.summary-text summary { cursor: pointer; }
.summary-text details:not([open]) .summary-text-collapse,
.summary-text details[open] .summary-text-preview { display: none; }
.detail-disclosure { padding: 0; }
.detail-disclosure > summary { min-height: 48px; padding: 14px 16px; cursor: pointer; color: var(--t2); }
.detail-disclosure > .card { margin: 0; border: 0; }
.daxie { font-size: 14px; color: var(--ui-ink-945126, #945126); }
.catalog-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.catalog-row .sh-opt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; border: 0; padding: 12px; }
.catalog-row .sh-opt span { flex: none; }
.catalog-row .sh-opt-name { width: 100%; overflow-wrap: anywhere; }
.catalog-row .sh-opt-code { font-size: 12px; color: var(--t2); white-space: normal; overflow-wrap: anywhere; }
.catalog-row .sh-fav { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; margin: 0; }
.catalog-row .sh-fav.on { color: var(--mascot); }
.sheet.sh-catalog .sh-nav-item, .sheet.sh-catalog .sh-opt, #frame.pc-mode .sheet.sh-catalog .sh-nav-item, #frame.pc-mode .sheet.sh-catalog .sh-opt { font-size: 14px; min-height: 44px; }
.sh-sync { min-height: 44px; }
.sheet, .drawer { transition-duration: var(--motion-panel); }
.sheet-mask, .drawer-mask { transition-duration: var(--motion-fast); }
.sheet { max-height: 88vh; max-height: 88dvh; }
.sh-body { min-height: 0; overflow-y: auto; }
.sq-filterbtn { display: flex; min-height: 44px; border-radius: 4px; }
.sq-card .filter-grid { display: none; }
.sq-card.sq-open .filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sq-quick-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px 12px; }
.sq-quick-filters label > span { display: block; font-size: 14px; margin-bottom: 6px; color: var(--t2); }
.filter-acts { flex-wrap: wrap; }
.filter-acts .sq-note { flex-basis: 100%; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
/* 单据中心筛选区（2026-10-10）：快捷行 PC 合一行（管理员含「范围」4 列）；展开面板 PC 4 列，
   人员/部门/日期从至同行；查询字段/字段内容经 .sq-fqrow 独占一行各半。限定 #sq-more/#sq-scope，不影响四列表 lf-more。 */
@media (min-width: 1024px) {
  .sq-quick-filters:not(:has(#sq-scope)) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sq-quick-filters:has(#sq-scope) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #sq-more { grid-template-columns: repeat(4, 1fr); }
  /* 操作行同一行：清空条件 + 导出紧邻，提示文案随后靠右（flex-basis:100% 为手机端换行规则） */
  .filter-acts .sq-note { flex-basis: auto; }
}
/* 查询字段/字段内容独占一行各占一半：字段名（含明细列）可能较长、内容输入通常不多（2026-10-10 用户拍板）；
   独立子行不受上方日期列按内容撑宽的 fr 分派影响，两端一致 */
#sq-more .sq-fqrow { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.filter-chip { padding: 8px; min-height: 40px; border-radius: 4px; background: var(--blue-bg); color: var(--brand); text-align: left; overflow-wrap: anywhere; }
/* 台账快捷筛选 chips（预设声明）：未选中白底描边，选中回到主色填充 */
.sq-lchips { align-items: center; }
.sq-lchips[hidden] { display: none; }
.sq-lchips-label { font-size: 13px; color: var(--t2); }
.filter-chip.sq-lchip { background: var(--card); border: 1px solid var(--line); border-radius: 999px; color: var(--t2); min-height: 32px; padding: 4px 14px; }
.filter-chip.sq-lchip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chip.sq-lchip-on { background: var(--blue-bg); border-color: var(--brand); color: var(--brand); font-weight: 600; }
/* 业务列定制下拉（单据中心工具条） */
.fc-wrap { position: relative; display: inline-block; }
.fc-wrap[hidden] { display: none; }
.fc-panel { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: 300px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(36,52,71,.14); padding: 10px 12px; }
.fc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; max-height: 280px; overflow: auto; }
.fc-grid label { display: flex; gap: 6px; align-items: center; font-size: 13px; padding: 4px 2px; cursor: pointer; }
.fc-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.fc-acts [data-fc-status] { flex-basis: 100%; overflow-wrap: anywhere; }
.fc-note { margin: 8px 0 0; font-size: 12px; }
#export-status { padding: 0 16px 12px; font-size: 14px; color: var(--t2); }
.attachment-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; border-bottom: 1px solid var(--line); padding: 10px 0; }
.attachment-row > div { flex: 1 1 170px; min-width: 0; }
.attachment-row b { display: block; overflow-wrap: anywhere; font-weight: 500; }
.attachment-row .f-help { display: block; margin-top: 4px; }
.attachment-row a, .attachment-row button { min-height: 44px; display: inline-flex; align-items: center; }
.att-item { flex-wrap: wrap; gap: 8px; }
.att-name { overflow-wrap: anywhere; min-width: 0; }
.att-item > .att-name { flex: 1 1 160px; }
.att-item .btn-mini, .supplement-file .btn-mini { min-height: 44px; display: inline-flex; align-items: center; }
.supplement-file { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.supplement-file > .att-name { flex: 1 1 160px; }
.attachment-text-preview { min-width: 0; }
.attachment-text-preview .f-label { display: block; max-width: 300px; }
.attachment-text-preview pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.7; max-height: 55vh; overflow-y: auto; padding: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.attachment-preview { display: block; max-width: 100%; max-height: 65vh; object-fit: contain; margin: auto; }
#receipt-root { position: fixed; z-index: 75; top: 12px; left: 50%; transform: translateX(-50%); width: min(620px, calc(100% - 24px)); pointer-events: none; }
.receipt { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 16px; border: 1px solid var(--ui-line-237552, #237552); border-radius: 6px; background: var(--ui-fill-f0faf4, #f0faf4); color: var(--ui-ink-185637, #185637); box-shadow: 0 3px 12px #24344715; pointer-events: auto; }
.receipt > span:nth-child(2) { flex: 1; min-width: 120px; }
.receipt a { color: var(--ui-ink-185637, #185637); text-decoration: underline; }
.receipt button { min-width: 36px; min-height: 36px; color: inherit; }
.just-updated { animation: updateGlow 1s ease-out; }
@keyframes updateGlow { from { background-color: var(--ui-fill-eaf0f6, #eaf0f6); } }
#frame:not(.pc-mode) .page { animation: pageFade var(--motion-fast) ease-out; }
@keyframes pageFade { from { opacity: .7; } }
#frame:not(.pc-mode)[data-direction="forward"] .approval-summary { animation: detailForward var(--motion-fast) ease-out; }
#frame:not(.pc-mode)[data-direction="back"] .biz-card { animation: detailBack var(--motion-fast) ease-out; }
@keyframes detailForward { from { opacity: .7; transform: translateX(8px); } }
@keyframes detailBack { from { opacity: .7; transform: translateX(-8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Read-only values never create editable controls or enter the request payload. */
.f-readonly { min-height: 44px; padding: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
textarea.f-grow { width: 100%; min-height: 44px; height: auto; resize: none; overflow-y: hidden; line-height: 1.4; }
@supports (field-sizing: content) { textarea.f-grow { field-sizing: content; } }
/* Shared request navigation. Categories carry no authorization semantics. */
.apply-entry { display:flex; align-items:stretch; border-bottom:1px solid var(--line,var(--ui-line-dfe3e7, #dfe3e7)); }
.apply-entry:last-child { border-bottom:0; }
.apply-entry .apply-item { flex:1; min-width:0; border:0; }
.flow-star { flex:0 0 44px; min-height:44px; border:0; background:transparent; color:var(--muted,var(--ui-ink-697782, #697782)); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; padding:6px; }
.flow-star svg { width:20px; height:20px; }
.flow-star[aria-pressed="true"] { color:var(--ui-ink-f5a623, #F5A623); }
.flow-category { border:1px solid var(--line,var(--ui-line-dfe3e7, #dfe3e7)); border-radius:10px; margin-top:10px; overflow:hidden; }
.flow-category summary { padding:14px 16px; font-weight:600; cursor:pointer; min-height:44px; }
.flow-category summary span { float:right; font-size:13px; font-weight:400; color:var(--muted,var(--ui-ink-697782, #697782)); }
.flow-category .apply-list { border:0; border-radius:0; }
.flow-common h3 { font-size:15px; margin:0 0 10px; }
.rel-filters { display:flex; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.rel-filters label { display:grid; gap:6px; flex:1; min-width:160px; max-width:320px; }
.rel-history summary,.rel-catalogs summary { cursor:pointer; font-weight:600; min-height:44px; }
.rel-current .adm-table td { padding-top:12px; padding-bottom:12px; }
.rel-history, .rel-catalogs { padding:12px 16px; }
@media (min-width:900px) {
  .rel-current .adm-table-wrap { max-height:calc(100dvh - 530px); min-height:240px; overflow:auto; }
  .rel-current .adm-table th { position:sticky; top:0; z-index:1; }
}

/* ---- 全局搜索（05 第七节：入口 / 结果页分组 / 命中片段） ---- */
.pc-gs { flex: 0 1 340px; margin-left: 20px; display: flex; }
.pc-top > .pc-gs:first-child { margin-left: 0; }
.pc-gs .f-input { width: 100%; min-height: 34px; }
/* 窄窗（1100px 曾把搜索盒压到 220px，14 字占位文案必然截断）：隐藏装饰性日期、收紧右侧间距，让搜索盒保持 340px 放得下整句占位文案 */
@media (max-width: 1200px) { .pc-date { display: none; } .pc-top-right { gap: 12px; } }
.gs-group { margin-bottom: 4px; }
.gs-group-title { font-size: 14px; font-weight: 500; color: var(--t2); margin: 14px 2px 8px; }
.gs-more { text-align: center; padding: 4px 0 12px; }
.gs-more .fi-arrow { display: inline-flex; vertical-align: -2px; color: var(--t3); }
.gs-more .fi-arrow svg { width: 14px; height: 14px; }
.bc-hit { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--t2); word-break: break-all; }
.bc-hit-field { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 4px; background: var(--brand-light); color: var(--brand); font-size: 12px; }

/* ---- 工作台搜索条（2026-10-04 去卡片化：浅底圆角条 + 放大镜，手机首页与 PC 顶栏同款） ---- */
.home-search {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px; padding: 0 14px; min-height: 44px;
  background: var(--brand-light); border-radius: 22px;
}
.home-search .hs-ic { display: flex; flex: none; color: var(--t3); }
.home-search .hs-ic svg { width: 18px; height: 18px; }
.home-search input { flex: 1; min-width: 0; border: 0; background: transparent; min-height: 44px; font-size: 16px; color: var(--t1); outline: none; }
.home-search input::placeholder { color: var(--t3); }
.home-search:focus-within { box-shadow: 0 0 0 1px var(--brand); }
.pc-gs { align-items: center; gap: 6px; padding: 0 6px 0 10px; background: var(--brand-light); border-radius: 17px; }
.pc-gs .pc-gs-ic { display: flex; flex: none; color: var(--t3); }
.pc-gs .pc-gs-ic svg { width: 15px; height: 15px; }
.pc-gs .f-input { border: 0; background: transparent; padding-left: 0; }
.pc-gs .f-input:focus { border-color: transparent; }
.pc-gs:focus-within { box-shadow: 0 0 0 1px var(--brand); }

/* ---- 个人常用信息选择器（表单分组回填快捷项；仅本人可见） ---- */
/* 入口为分组卡片顶边右侧的文字链接（2026-10-06 由 legend 内边框按钮改为卡片右上角链接；
   背景与卡片同色、两侧留白，让 fieldset 顶边线不穿过文字，与 legend 同一手法） */
.infofav-corner {
  position: absolute; top: -11px; right: 14px;
  padding: 2px 6px; background: var(--card);
  border: 0; font-size: 13px; font-weight: 500; color: var(--brand); cursor: pointer;
}
.infofav-corner:hover { color: var(--brand-dark, var(--brand)); text-decoration: underline; }
.infofav-panel {
  position: fixed; z-index: 120; max-height: 70vh; overflow: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; border-radius: 10px; background: var(--ui-fill-ffffff, #fff);
  box-shadow: 0 6px 24px rgba(31, 35, 41, .18); border: 1px solid var(--line, var(--ui-line-e5e6eb, #e5e6eb));
}
.infofav-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; color: var(--t1); }
.infofav-list { display: flex; flex-direction: column; gap: 6px; }
.infofav-empty { padding: 14px 6px; text-align: center; font-size: 13px; color: var(--t3); }
.infofav-item { display: flex; align-items: stretch; gap: 6px; }
.infofav-pick {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left;
  padding: 8px 10px; border: 1px solid var(--line, var(--ui-line-e5e6eb, #e5e6eb)); border-radius: 8px; background: var(--ui-fill-ffffff, #fff); cursor: pointer;
}
.infofav-pick:hover { border-color: var(--brand); background: var(--brand-light); }
.infofav-title { font-size: 14px; color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.infofav-sub { font-size: 12px; color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.infofav-del { flex: none; align-self: center; }
.infofav-labelrow { display: flex; flex-direction: column; gap: 6px; }
.infofav-label { width: 100%; }
.infofav-tip { font-size: 12px; color: var(--t3); }
