/* ==========================================================================
   订单详情 V3 · 独立样式命名空间（第二轮精简版 2026-11-06）
   --------------------------------------------------------------------------
   全部规则挂 `.yx-order-detail`，只在订单详情这一棵树里生效。
   第二轮变化（指令《订单详情V3第二轮精简整改》）：
   1. 取消固定右侧 PDF 预览卡与固定右侧待办栏 → 删除 63:37 两栏骨架，
      主体改**全宽单栏**（`.yx-detail-body` 只排导航 + 工作区）。
   2. 订单单据不再常驻，改为顶部一个「订单单据」按钮 + 按需弹层，
      真实 PDF 接口与打印能力原样保留（`.yx-paper*`）。
   3. 新增：业务状态总览（`.yx-ov-*`）、当前待办摘要（`.yx-todo-*`）、
      简单待办原地填写（`.yx-inline*`）。
   4. 删除：右栏卡片、预览滚动区、解释性小字（`.yx-hint`/`.yx-pdf-note`）为
      承载位保留样式但页面不再渲染说明文字。
   ========================================================================== */

.yx-order-detail {
  --yx-nav: #132746;
  --yx-blue: #2878ec;
  --yx-blue-dark: #165fcc;
  --yx-bg: #f2f5fa;
  --yx-border: #dfe7f1;
  --yx-text: #1c2e49;
  --yx-muted: #788ba4;
  --yx-green: #198552;
  --yx-amber: #b77708;
  --yx-red: #bb4747;
  color: var(--yx-text);
  font-size: 15px;
  max-width: 100%;
  min-width: 0;
}

/* 面包屑保持不变，只把字号压到原型的 13px */
.yx-order-detail .oui-crumb { font-size: 13px; color: #70829a; }

/* —— 标题行：‹ 返回 · 订单详情 · 订单编号 · 状态标识 —— */
.yx-order-detail .oui-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.yx-order-detail .oui-head > div:first-child { display: flex; align-items: center; gap: 12px; min-width: 0; }
.yx-order-detail .oui-head h1 { font-size: 25px; letter-spacing: -.5px; margin: 0; }
.yx-order-detail .oui-head .muted { font-size: 13px; color: #6f85a1; font-weight: 600; }
.yx-order-detail .oui-head > button,
.yx-order-detail .oui-head .oui-actions,
.yx-order-detail .oui-head > details { margin-left: auto; }
.yx-order-detail .oui-head .oui-actions { display: flex; gap: 8px; align-items: center; }

/* 订单编号与状态标识同一行：编号是标识、状态是事实，两者不过期 */
.yx-order-detail .yx-titlesub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yx-orderid { color: #6f85a1; font-weight: 600; font-size: 13px; letter-spacing: 0; }

/* 分块标题：第二轮不再跟一句口径说明，只留标题本身 */
.yx-section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.yx-section-head h3 { font-size: 15px; font-weight: 700; margin: 0; }
.yx-hint { color: #8192a8; font-size: 12px; }

/* —— 顶部订单摘要（原型 .headline）——
   2026-11-11 单页工作台：摘要改成两行。第一行是「哪张单、谁的、多少钱」，
   第二行承接原来那张「订单基本信息」卡（预计交付 / 付款条件 / 收货 / 开票），
   因此页面里不再出现第二份基本信息。 */
.yx-headline {
  display: block;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: 11px;
  box-shadow: 0 3px 13px #0d36680b;
}
.yx-headline-main { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 30px; }
.yx-headline-facts {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--yx-border);
}
.yx-headfact { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.yx-headfact.is-wide { flex: 1 1 300px; }
.yx-headfact small { color: var(--yx-muted); font-size: 12px; white-space: nowrap; }
.yx-headfact strong {
  font-size: 12.5px; font-weight: 600; color: #3b5473;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px;
}
.yx-headfact strong.is-empty { color: #98a8bb; font-weight: 500; }
.yx-headpair { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.yx-headpair small { color: var(--yx-muted); font-size: 12px; white-space: nowrap; }
.yx-headpair strong {
  font-size: 13px; font-weight: 700; color: #253a57;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 156px;
}
.yx-headsep { height: 26px; border-left: 1px solid var(--yx-border); }
.yx-grow { flex: 1 1 auto; }

/* —— 单页工作台：商品 → 进度与待办 → 业务块 → 历史折叠 ——
   不再有页签，块与块之间只留 12px；空分组由脚本直接移除，不留空壳。 */
.yx-single-page { display: flex; flex-direction: column; gap: 12px; }
.yx-single-page > * { margin: 0 !important; }
.yx-single-page > [data-oui-part="notices"] { margin: 0 !important; }
.yx-history-fold { background: #fff; border: 1px solid var(--yx-border); border-radius: 11px; }
.yx-history-fold > summary {
  cursor: pointer; padding: 11px 15px; font-size: 13px; font-weight: 650; color: #33506f;
  list-style: none;
}
.yx-history-fold > summary::-webkit-details-marker { display: none; }
.yx-history-fold > summary::before { content: '▸'; margin-right: 7px; color: #7d93ad; }
.yx-history-fold[open] > summary::before { content: '▾'; }
.yx-history-fold > [data-order-workspace-panel] {
  border: 0; border-top: 1px solid var(--yx-border); border-radius: 0; padding: 4px 15px 12px;
}

/* 「订单单据」入口：一个按钮，需要时再打开完整 PDF */
.yx-doc-entry {
  flex: 0 0 auto;
  border: 1px solid #cfe0f5;
  background: #f4f9ff;
  color: #1e6bd0;
  border-radius: 8px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.yx-doc-entry:hover { background: #e8f2ff; border-color: #a9cdf2; }

/* —— 主体：全宽单栏 —— */
.yx-detail-body { display: block; min-width: 0; }
.yx-workspace { display: block; min-width: 0; }

/* —— 五分组导航（原型 .tabs / .tab）—— */
.yx-order-detail .yx-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 5px;
  padding: 0 1px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--yx-border);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.yx-order-detail .yx-tabs button {
  flex: 0 0 auto;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 7px 7px 0 0;
  background: transparent;
  padding: 12px 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  color: #536e90;
  cursor: pointer;
  white-space: nowrap;
}
.yx-order-detail .yx-tabs button.active {
  border-bottom-color: var(--yx-blue);
  color: #1565ca;
  background: #edf4ff;
}
.yx-order-detail .yx-tabs button:hover { color: #1565ca; }

/* —— 业务卡：单栏全宽 —— */
.yx-card {
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: 12px;
  box-shadow: 0 3px 14px #123b7109;
  padding: 16px 18px;
  min-width: 0;
}
.yx-card[hidden] { display: none !important; }
.yx-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.yx-page-title h2 { font-size: 18px; letter-spacing: -.3px; margin: 0; }

/* 每个业务分块自动成为一个 section：分组里原有的面板不用逐个改类名 */
.yx-card [data-oui-part] {
  border: 1px solid #e4eaf3;
  border-radius: 9px;
  background: #fff;
  padding: 12px 14px;
  margin-bottom: 10px;
  min-width: 0;
}
.yx-card [data-oui-part]:last-child { margin-bottom: 0; }
/* 面板自带的卡片外观在 section 里是「卡中卡」，压平 */
.yx-card .panel,
.yx-card .oui-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
  margin: 0;
}
.yx-card .panel-title { margin-bottom: 12px; }
.yx-card .panel-title h2 { font-size: 15px; font-weight: 700; margin: 0; }
.yx-card .oui-group-part > .panel + .panel { margin-top: 14px; }

/* —— 基本信息两列键值（原型 .kv-two / .kv-pair）—— */
.yx-kv { display: grid; grid-template-columns: 1fr; gap: 0; }
.yx-kv-two { grid-template-columns: 1fr 1fr; column-gap: 25px; }
.yx-pair {
  display: flex;
  align-items: baseline;
  gap: 13px;
  padding: 5px 0;
  border-bottom: 1px solid #edf1f6;
  min-width: 0;
}
.yx-pair:nth-last-child(-n+2) { border-bottom-color: transparent; }
.yx-key { flex: 0 0 84px; width: 84px; color: #8392a7; font-size: 13px; }
.yx-value {
  min-width: 0; color: #253a57; font-size: 13.5px; font-weight: 560;
  overflow-wrap: anywhere;
}
.yx-value.is-empty { color: #a9b6c6; font-weight: 500; }

/* —— 业务状态总览：六项事实，只显示结果 —— */
.yx-ov-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.yx-ov {
  border: 1px solid #e6ecf4;
  border-radius: 9px;
  background: #fbfdff;
  padding: 11px 12px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.yx-ov-k { font-size: 12px; color: #8392a7; }
.yx-ov-v {
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 650; color: #253a57;
  overflow-wrap: anywhere;
}
.yx-ov-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; background: #b9c6d6; }
.yx-ov.is-done .yx-ov-dot { background: var(--yx-green); }
.yx-ov.is-wait .yx-ov-dot { background: var(--yx-amber); }
.yx-ov.is-mine .yx-ov-dot { background: var(--yx-blue); }
.yx-ov.is-stop .yx-ov-dot { background: #9aa9bb; }
.yx-ov.is-warn .yx-ov-dot { background: var(--yx-red); }
.yx-ov.is-done .yx-ov-v { color: #17694a; }
.yx-ov.is-mine .yx-ov-v { color: #1a5fb4; }
.yx-ov.is-warn .yx-ov-v { color: #a63e3e; }

/* —— 当前待办：事项 / 状态 / 责任人 / 操作，一行一项 —— */
.yx-todo-list { display: flex; flex-direction: column; }
.yx-todo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px 104px 100px;
  align-items: center;
  gap: 12px;
  padding: 8px 2px;
  border-top: 1px solid #edf2f6;
  font-size: 13px;
}
.yx-todo:first-child { border-top: 0; }
.yx-todo.is-mine .yx-todo-name { color: #14335c; }
.yx-todo.is-block .yx-todo-name { color: #a63e3e; }
.yx-todo.is-wait .yx-todo-name { color: #4b6280; }
.yx-todo.is-wait .yx-todo-state { color: #8b9bb0; }
.yx-todo-name { font-weight: 650; color: #23384f; min-width: 0; overflow-wrap: anywhere; }
.yx-todo-state { color: #6d8199; min-width: 0; overflow-wrap: anywhere; }
.yx-todo-who { color: #8294a9; font-size: 12px; white-space: nowrap; }
.yx-todo-by { justify-self: end; color: #b3c0cf; font-size: 12px; }
.yx-todo-go {
  justify-self: end;
  border: 1px solid #d6e3f2;
  background: #fff;
  color: #2f6bb5;
  border-radius: 7px;
  padding: 4px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.yx-todo-go:hover { background: #f2f7ff; }
.yx-todo-go.is-primary { background: #2878ec; border-color: #2878ec; color: #fff; }
.yx-todo-go.is-primary:hover { background: #165fcc; }
.yx-todo-empty { padding: 4px 2px; font-size: 13px; color: #7d8ea4; }
.yx-todo-more { padding-top: 6px; }

/* —— 单一任务表（2026-11-11 单页工作台）——
   四列：业务事项 / 当前状态 / 责任人 / 操作。
   一行一项，表头只在桌面出现；阻断原因作为事项下的第二行小字，不额外占卡片。 */
.yx-prog-cnts { display: flex; gap: 6px; flex-wrap: wrap; }
.yx-cnt.is-wait { background: #fdf3e2; color: #96660a; }
.yx-task { border: 1px solid #e6edf5; border-radius: 10px; overflow: hidden; background: #fff; }
.yx-task-head,
.yx-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px 108px 96px;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
}
.yx-task-head {
  grid-template-rows: auto;
  background: #f7fafd;
  border-bottom: 1px solid #e6edf5;
  font-size: 12px;
  font-weight: 650;
  color: #7d8ea4;
  letter-spacing: .2px;
}
.yx-task-head span:last-child { text-align: right; }
.yx-task-row { border-top: 1px solid #eef3f8; font-size: 13px; }
.yx-task-row:first-of-type { border-top: 0; }
.yx-task-row:hover { background: #fafcff; }
.yx-task-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-weight: 650; color: #23384f; overflow-wrap: anywhere; }
.yx-task-name small { font-weight: 400; font-size: 12px; color: #8d9db2; line-height: 1.45; }
.yx-task-row.is-mine .yx-task-name { color: #14335c; }
.yx-task-row.is-block .yx-task-name { color: #a63e3e; }
.yx-task-row.is-block .yx-task-name small { color: #b8615f; }
.yx-task-row.is-wait .yx-task-name { color: #4b6280; }
.yx-task-row.is-done .yx-task-name { color: #6d8199; font-weight: 600; }
.yx-task-state { font-size: 12.5px; color: #6d8199; white-space: nowrap; }
.yx-task-state.is-done { color: #17694a; }
.yx-task-state.is-todo { color: #1a5fb4; }
.yx-task-state.is-doing, .yx-task-state.is-part { color: #96660a; }
.yx-task-state.is-block { color: #b54747; }
.yx-task-state.is-wait { color: #8b9bb0; }
.yx-task-who { font-size: 12.5px; color: #8294a9; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yx-task-act { justify-self: end; white-space: nowrap; }
.yx-task-go {
  border: 1px solid #d6e3f2;
  background: #fff;
  color: #2f6bb5;
  border-radius: 7px;
  padding: 4px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.yx-task-go:hover { background: #f2f7ff; }
.yx-task-go.is-primary { background: #2878ec; border-color: #2878ec; color: #fff; }
.yx-task-go.is-primary:hover { background: #165fcc; }
.yx-task-lock { font-size: 12px; color: #9aabbf; }
.yx-task-empty { padding: 6px 2px; font-size: 13px; color: #7d8ea4; }
/* 只需要一句状态、不需要整块表单的事项（例如本人现在不必确认的开票安排） */
.yx-section-line { display: flex; align-items: baseline; gap: 10px; padding: 8px 2px; font-size: 13px; border-top: 1px solid #eef3f8; }
.yx-section-line span { color: #7d8ea4; }
.yx-section-line strong { font-weight: 650; color: #23384f; }
/* 点「直接办理 / 查看前置」滚到的目标块：短暂高亮，告诉人「就是这里」 */
.yx-order-detail .is-focus { outline: 2px solid rgba(40, 120, 236, .45); outline-offset: 2px; border-radius: 10px; transition: outline-color .2s ease; }
/* CSP 是 style-src 'self'：进度条宽度只能走档位 class，不能写内联 width */
.yx-bar.is-p0 i { width: 0; }
.yx-bar.is-p5 i { width: 5%; }
.yx-bar.is-p10 i { width: 10%; }
.yx-bar.is-p15 i { width: 15%; }
.yx-bar.is-p20 i { width: 20%; }
.yx-bar.is-p25 i { width: 25%; }
.yx-bar.is-p30 i { width: 30%; }
.yx-bar.is-p35 i { width: 35%; }
.yx-bar.is-p40 i { width: 40%; }
.yx-bar.is-p45 i { width: 45%; }
.yx-bar.is-p50 i { width: 50%; }
.yx-bar.is-p55 i { width: 55%; }
.yx-bar.is-p60 i { width: 60%; }
.yx-bar.is-p65 i { width: 65%; }
.yx-bar.is-p70 i { width: 70%; }
.yx-bar.is-p75 i { width: 75%; }
.yx-bar.is-p80 i { width: 80%; }
.yx-bar.is-p85 i { width: 85%; }
.yx-bar.is-p90 i { width: 90%; }
.yx-bar.is-p95 i { width: 95%; }
.yx-bar.is-p100 i { width: 100%; }

@media (max-width: 900px) {
  .yx-task-head, .yx-task-row { grid-template-columns: minmax(0, 1fr) 92px 84px; }
  .yx-task-who { display: none; }
}
@media (max-width: 639px) {
  .yx-task-head { display: none; }
  .yx-task-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; padding: 9px 10px; }
  /* 两行两列：第一行「事项 + 操作」，第二行「状态 + 责任人」。
     不能再用 grid-column:1/-1（跨两列会和操作按钮抢同一格，真机上顺序会乱）。 */
  .yx-task-name { grid-column: 1; grid-row: 1; }
  .yx-task-act { grid-column: 2; grid-row: 1; align-self: start; justify-self: end; }
  .yx-task-state { grid-column: 1; grid-row: 2; }
  .yx-task-who { display: block; grid-column: 2; grid-row: 2; justify-self: end; text-align: right; }
}

/* —— 简单待办原地填写 —— */
.yx-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 0 2px;
  border-top: 1px solid #edf2f6;
}
.yx-inline label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: #7d8ea4; }
.yx-inline input,
.yx-inline select {
  border: 1px solid #dce6f1;
  border-radius: 6px;
  padding: 7px 9px;
  font: inherit;
  font-size: 13px;
  color: #22374f;
  background: #fff;
  min-width: 0;
}
.yx-inline input[type=number] { width: 104px; text-align: center; }
.yx-inline input[type=text],
.yx-inline input[type=date] { width: 172px; }
.yx-inline .yx-inline-wide { flex: 1 1 220px; }
.yx-inline .yx-inline-wide input { width: 100%; }
.yx-inline-btn {
  border: 0;
  border-radius: 7px;
  background: var(--yx-blue);
  color: #fff;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}
.yx-inline-btn:hover { background: var(--yx-blue-dark); }
.yx-inline-btn[disabled] { opacity: .55; cursor: default; }

/* 通知条：只保留一句事实 + 一个动作，不让它把进度挤下去 */
.yx-card [data-oui-part="notices"] { border: 0; padding: 0; margin-bottom: 8px; background: transparent; }
.yx-card [data-oui-part="notices"] .notice {
  padding: 8px 12px; margin: 0 0 6px; font-size: 13px; line-height: 1.5;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.yx-card [data-oui-part="notices"] .notice:last-child { margin-bottom: 0; }
.yx-card [data-oui-part="notices"] .notice .button-row { margin: 0 0 0 auto; }
.yx-card [data-oui-part="notices"] .notice .oui-btn,
.yx-card [data-oui-part="notices"] .notice button { padding: 5px 12px; font-size: 12.5px; }

/* —— 业务进度 + 当前待办（V3.3 合并块，替换原六格总览）—— */
.yx-prog { display: flex; flex-direction: column; gap: 10px; }
.yx-prog-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.yx-prog-title { font-size: 15px; font-weight: 700; color: #1c2e49; }
.yx-prog-num { font-size: 13px; color: #5b7290; }
.yx-prog-num b { font-size: 19px; color: #17694a; font-variant-numeric: tabular-nums; margin: 0 1px; }
.yx-prog-sp { flex: 1 1 auto; }
.yx-cnt {
  font-size: 12px; font-weight: 650; border-radius: 20px; padding: 4px 11px; white-space: nowrap;
  background: #eef2f8; color: #5b7290;
}
.yx-cnt.is-mine { background: #e8f1ff; color: #1a5fb4; }
.yx-cnt.is-other { background: #eef2f8; color: #6b7d94; }
.yx-cnt.is-warn { background: #fdeceb; color: #b54747; }
.yx-bar { height: 6px; background: #eef2f8; border-radius: 3px; overflow: hidden; }
.yx-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #34a06a, #198552); transition: width .35s ease; }
.yx-prog-steps { min-width: 0; }
.yx-prog-loading { font-size: 12.5px; color: #93a2b6; }
.yx-segs { display: flex; gap: 6px; flex-wrap: wrap; }
.yx-seg {
  flex: 1 1 0; min-width: 104px; border-radius: 8px; padding: 7px 10px;
  display: flex; flex-direction: column; gap: 2px;
  border: 1px solid #e6ecf4; background: #fbfdff; min-width: 0;
}
.yx-seg b { font-size: 12.5px; font-weight: 650; color: #3b5170; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yx-seg i { font-size: 11.5px; font-style: normal; color: #8b9bb0; }
.yx-seg.is-done { border-color: #cdeada; background: #f2fbf6; }
.yx-seg.is-done i { color: #14744d; }
.yx-seg.is-todo { border-color: #d3e2f6; background: #f5f9ff; }
.yx-seg.is-todo i { color: #1a5fb4; }
.yx-seg.is-doing { border-color: #d3e2f6; background: #f5f9ff; }
.yx-seg.is-doing i { color: #1a5fb4; }
.yx-seg.is-part { border-color: #f3e2c4; background: #fffaf1; }
.yx-seg.is-part i { color: #a4711b; }
.yx-seg.is-block { border-color: #f3d4d2; background: #fff6f5; }
.yx-seg.is-block i { color: #b54747; }
/* 等待前置：正常排队，不是故障，所以用中性灰而不是告警红。 */
.yx-seg.is-wait { border-color: #e6ecf4; background: #fafbfd; }
.yx-seg.is-wait i { color: #7b8a9c; }
.yx-prog-done { min-width: 0; }
.yx-done > summary {
  cursor: pointer; font-size: 13px; font-weight: 650; color: #2c70c9; padding: 6px 0;
}
.yx-done-list { list-style: none; margin: 4px 0 0; padding: 0; }
.yx-done-list li { display: flex; gap: 12px; padding: 5px 0; font-size: 12.5px; color: #4b6280; border-top: 1px solid #f0f4f9; }
.yx-done-list li b { font-weight: 650; color: #23384f; }
.yx-done-list li span { color: #14744d; }

/* —— 商品明细表（V3 八列：名称/规格/订单/已交/待交/供货方式/状态/操作）—— */
.yx-order-detail #item-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.yx-order-detail #item-table th {
  background: #f2f6fb;
  color: #59718e;
  font-weight: 650;
  text-align: left;
  padding: 10px 11px;
  border-bottom: 1px solid #e0e8f3;
  white-space: nowrap;
}
.yx-order-detail #item-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #ecf1f6;
  color: #293e5a;
  vertical-align: middle;
}
.yx-order-detail #item-table th:last-child,
.yx-order-detail #item-table td:last-child { text-align: right; }
.yx-order-detail #item-table .sub { color: #93a2b3; font-size: 11px; margin-top: 3px; }
.yx-order-detail #item-table .yx-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 供货属性小徽标：四态与后端 procurement-plan 的 strategy 一一对应 */
.yx-tag {
  display: inline-block;
  border-radius: 5px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  background: #edf2f8;
  color: #556980;
}
.yx-tag.is-green { background: #e7f7ed; color: #14744d; }
.yx-tag.is-amber { background: #fff1db; color: #ae7000; }
.yx-tag.is-blue { background: #e9f2ff; color: #2166b8; }
.yx-tag.is-red { background: #ffebec; color: #bc4c4c; }
.yx-tag.is-grey { background: #eef2f7; color: #7b8ba0; }

/* —— 订单信息首页的紧凑商品表（只列名称/规格/数量/单价/金额）—— */
.yx-order-detail .yx-items-brief { width: 100%; border-collapse: collapse; font-size: 13px; }
.yx-order-detail .yx-items-brief th {
  background: #f2f6fb;
  color: #59718e;
  font-weight: 650;
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid #e0e8f3;
  white-space: nowrap;
}
.yx-order-detail .yx-items-brief td {
  padding: 9px 11px;
  border-bottom: 1px solid #ecf1f6;
  color: #293e5a;
  vertical-align: middle;
}
.yx-order-detail .yx-items-brief th:nth-child(n+3),
.yx-order-detail .yx-items-brief td:nth-child(n+3) { text-align: right; }

/* —— 订单合计 —— */
.yx-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
  color: #667c99;
  font-size: 14px;
}
.yx-total b { color: #1d6dde; font-size: 20px; font-variant-numeric: tabular-nums; }

/* —— 底部条：真实按钮 —— */
.yx-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.yx-tip { margin-right: auto; font-size: 12px; color: #8193a9; }

/* —— 订单单据弹层：按需打开，真实 PDF —— */
.yx-paper {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #0a1e3bcc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 3vw;
}
.yx-paper[hidden] { display: none !important; }
.yx-paper-box {
  background: #eef2f8;
  border-radius: 12px;
  box-shadow: 0 18px 60px #0a1e3b55;
  width: min(920px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.yx-paper-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--yx-border);
}
.yx-paper-head h3 { font-size: 15px; margin: 0; }
.yx-paper-head .yx-paper-sp { flex: 1 1 auto; }
.yx-paper-head button {
  border: 1px solid #cfe0f5;
  background: #f4f9ff;
  color: #1e6bd0;
  border-radius: 7px;
  padding: 6px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.yx-scroller {
  flex: 1 1 auto;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}
.yx-scroller canvas {
  display: block;
  width: 100%;
  max-width: 780px;
  height: auto;
  background: #fff;
  box-shadow: 0 3px 9px #1c3e6b16;
}
.yx-scroller.is-loading::before {
  content: '正在生成订单单据…';
  color: #8ea0b5;
  font-size: 12.5px;
  padding: 40px 0;
}
.yx-scroller.is-failed::before {
  content: '订单单据暂时读不到，可稍后重试；不影响继续办理业务。';
  color: #a4680f;
  font-size: 12.5px;
  padding: 40px 0;
  text-align: center;
}

/* 采购缺口核定的操作行：数量 / 原因 / 核定，三个控件同排，不挤成一列 */
.yx-order-detail .oui-proc-list li { grid-template-columns: 12px minmax(0, 1fr); row-gap: 8px; }
.yx-order-detail .oui-proc-list li strong { grid-column: 2; }
.yx-order-detail .oui-proc-list li em { grid-column: 2; }
.yx-order-detail .oui-proc-act {
  grid-column: 2; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
.yx-order-detail .oui-proc-act input[type=number] {
  width: 92px; padding: 6px 8px; border: 1px solid #dce6f1; border-radius: 6px;
  font: inherit; font-size: 13px; text-align: center;
}
.yx-order-detail .oui-proc-act input[type=text] {
  flex: 1 1 180px; min-width: 0; padding: 6px 8px; border: 1px solid #dce6f1;
  border-radius: 6px; font: inherit; font-size: 13px;
}

/* 页面后置注入的折叠块（人员与责任快照）落进卡片后，按同样的分块外观收口 */
.yx-card > details.order-business-detail {
  border: 1px solid #e4eaf3;
  border-radius: 9px;
  background: #fff;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.yx-card > details.order-business-detail > summary { cursor: pointer; font-size: 13px; font-weight: 650; color: #2c70c9; }
.yx-card > .notice { margin-bottom: 12px; }

/* —— 分组内的原有构件：只做必要的贴合，不改它们的业务行为 —— */
.yx-card .oui-todo-fold > summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  color: #2c70c9;
  padding: 8px 0;
}
.yx-card .oui-todo-fold[open] > summary { margin-bottom: 8px; }

/* —— 响应式：1440 / 1250 / 900 / 640 四档 —— */
@media (max-width: 1440px) {
  .yx-ov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1250px) {
  .yx-card { padding: 16px; }
  .yx-kv-two { column-gap: 10px; }
  .yx-order-detail .yx-tabs button { padding: 11px 14px; }
  .yx-headpair strong { max-width: 200px; }
  .yx-ov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 1280 一档笔记本：摘要条还是要保持一排，只收间距与字号，不换行。
   换行会让「订单单据」单独占一行，看起来像漏了个字段。 */
@media (max-width: 1330px) {
  .yx-headline { gap: 9px; padding: 8px 12px; }
  .yx-headpair { gap: 7px; }
  .yx-headpair small { font-size: 11.5px; }
  .yx-headpair strong { font-size: 12.5px; max-width: 132px; }
  .yx-doc-entry { padding: 6px 10px; font-size: 12px; }
}

@media (max-width: 900px) {
  .yx-headline { flex-wrap: wrap; }
  .yx-headsep { display: none; }
  .yx-ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yx-todo { grid-template-columns: minmax(0, 1.4fr) 88px 76px; }
  .yx-todo-state { display: none; }
}

@media (max-width: 640px) {
  /* 390 手机：标题竖排、分组可横滑、明细内部滚动、按钮不溢出、整页不横向滚动 */
  .yx-order-detail { font-size: 14px; }
  .yx-order-detail .oui-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .yx-order-detail .oui-head > div:first-child { flex-wrap: wrap; width: 100%; }
  .yx-order-detail .oui-head h1 { font-size: 20px; }
  .yx-order-detail .oui-head .muted { flex-basis: 100%; font-size: 12px; }
  .yx-order-detail .oui-head > button,
  .yx-order-detail .oui-head .oui-actions { margin-left: 0; }
  .yx-orderid { flex: 1 1 100%; white-space: nowrap; font-size: 12px; }
  .yx-headline { gap: 10px; padding: 12px 14px; }
  .yx-headpair { flex: 1 1 46%; min-width: 0; }
  .yx-headpair strong { max-width: none; white-space: normal; overflow-wrap: anywhere; }
  .yx-doc-entry { width: 100%; }
  .yx-kv-two { grid-template-columns: 1fr; }
  .yx-key { flex-basis: 76px; width: 76px; }
  .yx-card { padding: 12px; border-radius: 10px; }
  .yx-card [data-oui-part] { padding: 12px; }
  .yx-ov-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .yx-todo { grid-template-columns: minmax(0, 1fr) 72px; row-gap: 4px; }
  .yx-todo-who { grid-column: 1; }
  .yx-todo-go { grid-row: 1; grid-column: 2; }
  .yx-inline label { flex: 1 1 100%; }
  .yx-inline input[type=number],
  .yx-inline input[type=text],
  .yx-inline input[type=date] { width: 100%; }
  .yx-inline-btn { width: 100%; }
  .yx-total { font-size: 13px; gap: 12px; }
  .yx-total b { font-size: 18px; }
  .yx-bottom { justify-content: flex-start; }
  .yx-tip { flex-basis: 100%; }
  .yx-section-head,
  .yx-page-title { flex-wrap: wrap; }
  /* 390 下明细表在自己的容器里滚，不带动整页 */
  .yx-card .table-wrap,
  .yx-card .oui-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .yx-order-detail #item-table { min-width: 760px; }
  .yx-paper { padding: 0; }
  .yx-paper-box { border-radius: 0; width: 100%; }
}

/* ==========================================================================
   R6（2026-11-11）· 四区域收敛
   「库存与出库 / 合同与商务 / 开票与回款」不再常驻页面：整块移进隐藏区
   （.yx-stage-host），点待办时在统一弹窗（.yx-modal）里按事项打开真实控件。
   「其它合法操作」改为常驻操作栏（.yx-ops），不再折叠。
   ========================================================================== */
.yx-stage-host { display: none !important; }

.yx-ops {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: 11px;
}
.yx-ops-title { font-size: 12.5px; font-weight: 650; color: #5a6f8b; }
.yx-ops-list { display: flex; flex-wrap: wrap; gap: 8px; }
.yx-ops-list button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
  color: #1c3355;
  font-size: 13px;
  cursor: pointer;
}
.yx-ops-list button:hover { border-color: #9dc0ea; background: #f6faff; }
.yx-ops-list button.is-danger { color: #b54747; border-color: #eccfcf; }
.yx-ops-list button.is-danger:hover { background: #fff6f6; border-color: #dda6a6; }
.yx-ops-note { font-size: 12.5px; color: #8b9bb0; }

/* —— 统一办理弹窗：只放事项、必要数据、必填字段 —— */
.yx-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.yx-modal[hidden] { display: none !important; }
.yx-modal-mask { position: absolute; inset: 0; background: rgba(18, 30, 48, .42); }
.yx-modal-box {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(600px, 100%);
  max-height: calc(100vh - 64px);
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(15, 30, 55, .26);
}
.yx-modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #eef3f8; }
.yx-modal-titles { flex: 1 1 auto; min-width: 0; }
.yx-modal-titles h2 { margin: 0; font-size: 15px; font-weight: 700; color: #16283f; }
.yx-modal-titles p { margin: 3px 0 0; font-size: 12.5px; color: #8b9bb0; }
.yx-modal-x {
  width: 28px; height: 28px;
  border: 0; border-radius: 6px;
  background: transparent; color: #8b9bb0;
  font-size: 18px; line-height: 1; cursor: pointer;
}
.yx-modal-x:hover { background: #f2f6fb; color: #33465e; }
.yx-modal-body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; overflow: auto; }
.yx-modal-body .yx-modal-note { margin: 0; font-size: 12.5px; color: #7d8ea4; }
.yx-modal-body .yx-modal-hide { display: none !important; }
.yx-modal-body .yx-section-head { margin: 0; }
.yx-modal-actions { display: flex; justify-content: flex-end; }
.yx-modal-actions .is-primary {
  height: 32px; padding: 0 16px;
  border: 0; border-radius: 7px;
  background: var(--yx-blue); color: #fff;
  font-size: 13px; cursor: pointer;
}
.yx-modal-foot { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid #eef3f8; }
.yx-modal-msg { flex: 1 1 auto; font-size: 12.5px; color: #b54747; }
.yx-modal-foot button {
  height: 30px; padding: 0 14px;
  border: 1px solid #d8e2ee; border-radius: 7px;
  background: #fff; color: #1c3355;
  font-size: 13px; cursor: pointer;
}
.yx-modal-foot button:hover { border-color: #9dc0ea; background: #f6faff; }

@media (max-width: 639px) {
  .yx-modal { align-items: flex-end; padding: 0; }
  .yx-modal-box { width: 100%; max-height: 86vh; border-radius: 12px 12px 0 0; }
  .yx-ops { padding: 10px; }
  .yx-ops-list { gap: 6px; }
  .yx-ops-list button { height: 32px; }
}
.yx-modal-body .yx-modal-soft-hide { display: none !important; }

/* ==========================================================================
   R7（2026-11-11）· 轻量办理窗口、单据与资料、视觉统一
   目标：正文 14px、辅助 ≥12px、模块间距 12–16px、卡内边距 16–20px、
   表格行高 44–48px、按钮同高同圆角、弹窗 560–680px 且只有一层滚动。
   不靠整体缩小字号换「一屏」——字号只按上面这套值统一。
   ========================================================================== */
.yx-order-detail { font-size: 14px; }
.yx-order-detail .yx-ops,
.yx-order-detail .yx-card,
.yx-order-detail .oui-group-part { margin-block: 12px; border-radius: 11px; }
.yx-order-detail .yx-ops { padding: 12px 14px; gap: 10px; }
.yx-order-detail .yx-ops-list button { height: 32px; border-radius: 7px; font-size: 13px; }
/* 主操作实心蓝、普通操作紧凑描边、作废低强调危险：只在操作栏里区分强弱。 */
.yx-ops-list button.is-primary { background: var(--yx-blue); border-color: var(--yx-blue); color: #fff; }
.yx-ops-list button.is-primary:hover { background: var(--yx-blue-dark); border-color: var(--yx-blue-dark); }
.yx-ops-note { font-size: 12px; color: #8b9bb0; }

/* —— 事实区：自动带入的只读信息（商品、批次、数量、金额），不做输入控件 —— */
.yx-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 10px 12px;
  background: #f6f9fd;
  border: 1px solid #e6eef7;
  border-radius: 9px;
  font-size: 13px;
  color: #34496a;
}
.yx-facts span { white-space: nowrap; }

/* —— 轻量表单：一个必填字段一行，取消/保存在右下 —— */
.yx-form { display: flex; flex-direction: column; gap: 12px; }
.yx-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #4a6080; }
.yx-field input,
.yx-field select {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
  font-size: 14px;
  color: var(--yx-text);
}
.yx-field input:focus,
.yx-field select:focus { outline: 2px solid #bcd6f6; outline-offset: 1px; border-color: #9dc0ea; }
.yx-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}
.yx-form-actions button {
  height: 32px;
  padding: 0 16px;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
  color: #1c3355;
  font-size: 13px;
  cursor: pointer;
}
.yx-form-actions button:hover { border-color: #9dc0ea; background: #f6faff; }
.yx-form-actions button.is-primary { background: var(--yx-blue); border-color: var(--yx-blue); color: #fff; }
.yx-form-actions button.is-primary:hover { background: var(--yx-blue-dark); border-color: var(--yx-blue-dark); }
.yx-form-actions button[disabled] { opacity: .55; cursor: not-allowed; }
.yx-modal-msg.is-bad { color: #b54747; }
.yx-modal-msg.is-ok { color: var(--yx-green); }

/* —— 开票资料清单：按正式发票的读法排，金额右对齐 —— */
.yx-inv { display: flex; flex-direction: column; gap: 10px; }
.yx-inv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  background: #f6f9fd;
  border-radius: 9px;
  font-size: 13px;
  color: #4a6080;
}
.yx-inv-head strong { margin-left: auto; font-size: 15px; color: var(--yx-text); }
.yx-inv-facts,
.yx-inv-goods { width: 100%; border-collapse: collapse; font-size: 13px; }
.yx-inv-facts th {
  width: 38%;
  padding: 7px 10px 7px 0;
  text-align: left;
  font-weight: 500;
  color: #7d8ea4;
  border-bottom: 1px solid #eef3f8;
}
.yx-inv-facts td { padding: 7px 0; color: #1c3355; border-bottom: 1px solid #eef3f8; }
.yx-inv-goods th,
.yx-inv-goods td { padding: 9px 8px; border-bottom: 1px solid #eef3f8; text-align: left; }
.yx-inv-goods th { font-weight: 600; color: #5a6f8b; background: #f8fafd; }
.yx-inv-goods .yx-num { text-align: right; font-variant-numeric: tabular-nums; }
.yx-inv-plan { margin: 0; font-size: 12.5px; color: #7d8ea4; }
/* 票面五要素（销售方 / 购买方 / 税号 / 票种 / 价税合计）：开票前必须一眼看全，
   不再靠「去开票工作台」才知道开给谁、开什么票。 */
/* 用 flex 而不是 grid：5 个要素排两行时 gridauto-fit 会留一个空白格子，
   看着像"少了一块"；flex 让第二行的两个格子自动撑满，不留洞。 */
.yx-inv-face {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #e7eef7;
  border-radius: 9px;
  overflow: hidden;
  background: #fff;
}
.yx-inv-face > div { flex: 1 1 180px; min-width: 0; padding: 8px 12px; background: #fff; border-right: 1px solid #eef3f8; border-bottom: 1px solid #eef3f8; }
.yx-inv-face dt { margin: 0 0 3px; font-size: 11.5px; color: #8a9aae; }
.yx-inv-face dd { margin: 0; font-size: 13px; color: #1c3355; word-break: break-all; }
.yx-inv-face > div:nth-child(5) dd { font-weight: 700; font-variant-numeric: tabular-nums; }

/* —— 单据与资料：页面末尾一个紧凑入口，内容在弹窗里 —— */
.yx-docs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 4px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: 11px;
}
.yx-docs-btn {
  height: 32px;
  padding: 0 14px;
  border: 1px solid #d8e2ee;
  border-radius: 7px;
  background: #fff;
  color: #1c3355;
  font-size: 13px;
  cursor: pointer;
}
.yx-docs-btn:hover { border-color: #9dc0ea; background: #f6faff; }
.yx-docs-btn em {
  display: inline-block;
  min-width: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 9px;
  background: #eef4fc;
  color: #2f6bbd;
  font-size: 12px;
  font-style: normal;
  text-align: center;
}
.yx-docs-hint { font-size: 12px; color: #8b9bb0; }
.yx-docs-block { display: flex; flex-direction: column; gap: 8px; }
.yx-docs-block h3 { margin: 0; font-size: 14px; font-weight: 650; color: #2b3f5c; }
.yx-docs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.yx-docs-table th,
.yx-docs-table td { padding: 9px 8px; border-bottom: 1px solid #eef3f8; text-align: left; }
.yx-docs-table th { font-weight: 600; color: #5a6f8b; background: #f8fafd; }
.yx-docs-table .yx-num { text-align: right; font-variant-numeric: tabular-nums; }
.yx-docs-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.yx-docs-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  padding: 8px 10px;
  background: #f8fafd;
  border-radius: 7px;
  font-size: 13px;
}
.yx-docs-list li span { color: #7d8ea4; }
.yx-docs-list li strong { color: #1c3355; }
.yx-docs-list li em { margin-left: auto; color: #7d8ea4; font-style: normal; }

/* —— 待办表：行高 44–48px，本人浅蓝底 + 左侧蓝标，已完成绿色，异常橙色 —— */
.yx-order-detail [data-oui-task-row] { min-height: 46px; }
.yx-order-detail [data-oui-task-row].is-mine { background: #f4f9ff; box-shadow: inset 3px 0 0 #4d8fe8; }
.yx-order-detail [data-oui-task-row].is-done { background: #f5fbf7; }
.yx-order-detail .yx-task-go { min-width: 76px; height: 30px; border-radius: 7px; font-size: 13px; }

/* —— 微交互：轻过渡、状态锁定、尊重减少动态 —— */
.yx-modal-box { animation: yx-modal-in .16s ease-out; }
@keyframes yx-modal-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.yx-order-detail [data-oui-task-row],
.yx-order-detail .yx-bar > i { transition: background-color .18s ease, width .28s ease, box-shadow .18s ease; }
.yx-docs-btn:active,
.yx-form-actions button:active,
.yx-ops-list button:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) {
  .yx-modal-box { animation: none; }
  .yx-order-detail [data-oui-task-row],
  .yx-order-detail .yx-bar > i,
  .yx-docs-btn,
  .yx-form-actions button,
  .yx-ops-list button { transition: none; }
  .yx-docs-btn:active,
  .yx-form-actions button:active,
  .yx-ops-list button:active { transform: none; }
}

/* —— 弹窗宽度：560–680px，标题栏/底栏固定，只有内容区滚动 —— */
.yx-modal-box { width: min(640px, 100%); }
.yx-modal-head,
.yx-modal-foot { flex: 0 0 auto; }
.yx-modal-body { overscroll-behavior: contain; }

/* —— 响应式：1280 收紧间距、1440 保首屏、390 不出横向滚动 —— */
@media (max-width: 1440px) {
  .yx-order-detail .yx-ops,
  .yx-order-detail .yx-card,
  .yx-order-detail .oui-group-part { margin-block: 10px; }
  .yx-order-detail .yx-ops { padding: 10px 12px; }
}
@media (max-width: 1280px) {
  .yx-facts { font-size: 12.5px; }
  .yx-modal-box { width: min(600px, 100%); }
}
@media (max-width: 639px) {
  .yx-order-detail { font-size: 13.5px; }
  .yx-order-detail .yx-ops { padding: 10px; }
  .yx-order-detail .yx-ops-list { gap: 6px; }
  .yx-order-detail .yx-ops-list button { height: 34px; padding: 0 10px; }
  .yx-order-detail .yx-ops-title { flex: 1 1 100%; }
  .yx-docs { padding: 10px; }
  .yx-form-actions { flex-direction: column-reverse; }
  .yx-form-actions button { width: 100%; height: 38px; }
  .yx-inv-head strong { margin-left: 0; }
  .yx-inv-goods,
  .yx-docs-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .yx-modal-body { padding: 12px; }
}

/* —— 客户出库单（R8.2 C/D）：详情页唯一入口，状态 + 一个下一步动作 —— */
.yx-outbound-wrap { margin: 8px 0 4px; }
.yx-outbound {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "head acts" "meta acts";
  align-items: center;
  gap: 4px 16px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--yx-border);
  border-radius: 11px;
}
.yx-outbound-head { grid-area: head; display: flex; align-items: center; gap: 9px; min-width: 0; }
.yx-outbound-title { font-size: 13.5px; font-weight: 650; color: #1c3355; }
.yx-outbound-meta { grid-area: meta; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: #6b7f97; }
.yx-outbound-meta span { position: relative; }
.yx-outbound-meta span + span::before { content: "·"; position: absolute; left: -9px; color: #c3cfdd; }
.yx-outbound-acts { grid-area: acts; display: flex; align-items: center; gap: 8px; }
.yx-outbound-btn { height: 32px; padding: 0 14px; border: 1px solid #d8e2ee; border-radius: 7px; background: #fff; color: #1c3355; font-size: 13px; cursor: pointer; }
.yx-outbound-btn:hover { border-color: #9dc0ea; background: #f6faff; }
.yx-outbound-btn.is-primary { border-color: #1a6ef2; background: #1a6ef2; color: #fff; }
.yx-outbound-btn.is-primary:hover { background: #1560d8; border-color: #1560d8; }
.yx-outbound-note { font-size: 12.5px; color: #8b9bb0; }
/* 生成确认弹窗：键值两列，只列这件事真正需要看的字段 */
.yx-ob-confirm { display: grid; gap: 8px; }
.yx-ob-confirm-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: baseline; gap: 12px; font-size: 13px; }
.yx-ob-confirm-row > span { color: #7b8fa8; }
.yx-ob-confirm-row > strong { font-weight: 600; color: #21374f; overflow-wrap: anywhere; }
.yx-ob-confirm-row select { min-height: 32px; padding: 4px 8px; border: 1px solid #d8e2ee; border-radius: 7px; font-size: 13px; background: #fff; }

/* ————— R8.3（2026-11-12）五步业务进度 + 出库单预览 ————— */
.yx-flow-zone { margin: 14px 0; }
.yx-flow { display: flex; flex-direction: column; }
.yx-flow-row { display: grid; grid-template-columns: 30px 88px minmax(84px, auto) minmax(0, 1fr) minmax(96px, auto) auto; gap: 10px; align-items: center; padding: 11px 14px; border: 1px solid #e3eaf3; border-radius: 10px; background: #fff; }
.yx-flow-row + .yx-flow-row { margin-top: 8px; }
.yx-flow-row.is-na { opacity: .62; }
.yx-flow-idx { width: 26px; height: 26px; border-radius: 50%; background: #eef2f8; color: #5a7291; font-weight: 600; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.yx-flow-row.st-done .yx-flow-idx { background: #e6f6ec; color: #1d7f4d; }
.yx-flow-row.is-mine { border-color: #bcd7ff; box-shadow: 0 0 0 1px #bcd7ff inset; }
.yx-flow-name { font-weight: 600; color: #22354e; font-size: 14px; white-space: nowrap; }
.yx-flow-status { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: #eef2f8; color: #51637c; width: fit-content; white-space: nowrap; }
.yx-flow-row.st-done .yx-flow-status { background: #e6f6ec; color: #1d7f4d; }
.yx-flow-row.st-blocked .yx-flow-status { background: #fdf1e2; color: #a05a00; }
.yx-flow-row.st-na .yx-flow-status { background: #f0f2f5; color: #93a3b5; }
.yx-flow-sum { font-size: 12.5px; color: #5a7291; line-height: 1.5; overflow-wrap: anywhere; }
.yx-flow-reason { display: block; color: #a05a00; font-style: normal; }
.yx-flow-owner { font-size: 12px; color: #8296ad; text-align: right; overflow-wrap: anywhere; }
.yx-flow-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.yx-flow-na { font-size: 12px; color: #93a3b5; }
.yx-flow-btn { min-height: 30px; padding: 4px 12px; border-radius: 8px; border: 1px solid #c9d6e6; background: #fff; color: #33475e; font-size: 12.5px; cursor: pointer; }
.yx-flow-btn.is-primary { background: #1a6ef2; border-color: #1a6ef2; color: #fff; }
.yx-flow-btn:disabled { opacity: .5; cursor: default; }
.yx-flow-stat { margin: 10px 2px 0; font-size: 12px; color: #8296ad; }
.yx-ob-preview-zone { margin: 14px 0; border: 1px solid #e3eaf3; border-radius: 12px; background: #fff; padding: 14px 16px; }
.yx-ob-preview-zone .yx-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.yx-ob-frame iframe { width: 100%; height: 620px; border: 1px solid #e3eaf3; border-radius: 8px; background: #f7f9fc; }
.yx-ob-draft-tag { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; background: #fdf1e2; color: #a05a00; font-size: 12.5px; }
.yx-ob-formal-tag { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; background: #e6f6ec; color: #1d7f4d; font-size: 12.5px; }
/* R27-补：出库单编辑 + 实时预览统一窗口。两栏只在足够宽时启用，窄屏降级为上下切换式单栏。 */
.yx-modal-box.is-w1180 { width: min(1180px, 100%); }
.yx-ob-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; min-width: 0; }
.yx-ob-edit, .yx-ob-preview { display: flex; flex-direction: column; gap: 10px; min-width: 0; max-height: calc(82vh - 150px); }
.yx-ob-edit { overflow: auto; padding-right: 2px; }
.yx-ob-preview { overflow: hidden; }
.yx-ob-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 12px; border: 1px solid #e6edf5; border-radius: 8px; background: #fafcff; }
.yx-ob-facts span { display: inline-flex; gap: 8px; min-width: 0; font-size: 12.5px; }
.yx-ob-facts em { color: #7b8fa8; font-style: normal; white-space: nowrap; }
.yx-ob-facts b { color: #21374f; font-weight: 600; overflow-wrap: anywhere; }
.yx-ob-gaps { padding: 9px 11px; border: 1px solid #f0d8b6; border-radius: 8px; background: #fffaf2; }
.yx-ob-gaps > span { display: block; margin-bottom: 6px; color: #9a641c; font-size: 12px; }
.yx-ob-gaps > div { display: flex; flex-wrap: wrap; gap: 6px; }
.yx-ob-gaps.is-clear { border-color: #cfe8d8; background: #f4fbf6; color: #1d7f4d; font-size: 12.5px; }
.yx-ob-chip { padding: 4px 9px; border: 1px solid #e4c493; border-radius: 999px; background: #fff; color: #8a5b16; font-size: 12px; cursor: pointer; }
.yx-ob-chip:hover { border-color: #c98f38; background: #fff5e6; }
.yx-ob-chip.is-invoice { border-color: #bcd6f2; color: #14508f; }
.yx-ob-groups { display: flex; flex-direction: column; gap: 10px; }
.yx-ob-item { border: 1px solid #e6edf5; border-radius: 9px; padding: 10px 12px; background: #fff; }
.yx-ob-item-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; color: #21374f; }
.yx-ob-item-head strong { font-size: 13px; }
.yx-ob-item-head span { color: #8b9bb0; font-size: 12px; }
.yx-ob-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.yx-ob-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 7px 9px; border: 1px solid #e6edf5; border-radius: 8px; background: #fff; }
.yx-ob-field.is-missing { border-color: #e6b5b5; background: #fffafa; }
.yx-ob-field-label { color: #33475e; font-size: 12.5px; font-weight: 600; }
.yx-ob-field-label em { color: #8296ad; font-size: 11px; font-style: normal; font-weight: 400; }
.yx-ob-field input[type="text"], .yx-ob-field select { width: 100%; box-sizing: border-box; min-width: 0; height: 30px; padding: 4px 8px; border: 1px solid #d8e2ee; border-radius: 6px; font: inherit; font-size: 12.5px; color: #21374f; background: #fff; }
.yx-ob-field.is-missing input[type="text"] { border-color: #d14343; }
.yx-ob-field input[readonly] { background: #f7f9fc; color: #5f7187; }
.yx-ob-field-src { color: #8296ad; font-size: 11px; }
.yx-ob-proof { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px; }
.yx-ob-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.yx-ob-preview-head strong { min-width: 0; color: #33475e; font-size: 12.5px; overflow-wrap: anywhere; }
.yx-ob-preview-head button { flex: 0 0 auto; padding: 4px 10px; border: 1px solid #c9d6e6; border-radius: 7px; background: #fff; color: #33475e; font-size: 12px; cursor: pointer; }
.yx-ob-frame-inline { flex: 1 1 auto; min-width: 0; overflow: auto; border: 1px solid #e3eaf3; border-radius: 8px; background: #f7f9fc; }
.yx-ob-frame-inline iframe { display: block; width: 100%; height: 100%; min-height: 420px; border: 0; background: #f7f9fc; }
.yx-ob-paper { min-width: 0; padding: 12px; background: #fff; }
.yx-ob-paper-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-bottom: 8px; border-bottom: 2px solid #1f3c63; }
.yx-ob-paper-head strong { display: block; color: #12233c; font-size: 15px; letter-spacing: 1px; }
.yx-ob-paper-head span { color: #8296ad; font-size: 11px; }
.yx-ob-paper-head em { padding: 3px 8px; border: 1px solid #e0b06a; border-radius: 4px; color: #9a641c; font-size: 11px; font-style: normal; white-space: nowrap; }
.yx-ob-paper-head em.is-formal { border-color: #9fd2b1; color: #1d7f4d; }
.yx-ob-paper-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 8px 0; }
.yx-ob-paper-meta span { display: flex; gap: 6px; min-width: 0; font-size: 11.5px; }
.yx-ob-paper-meta em { color: #7b8fa8; font-style: normal; white-space: nowrap; }
.yx-ob-paper-meta b { color: #21374f; font-weight: 600; overflow-wrap: anywhere; }
.yx-ob-paper-scroll { overflow-x: auto; }
.yx-ob-paper table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 10.5px; color: #21374f; }
.yx-ob-paper th, .yx-ob-paper td { border: 1px solid #cdd9e7; padding: 5px 3px; text-align: center; overflow-wrap: anywhere; }
.yx-ob-paper th { background: #eef4fb; color: #33475e; font-weight: 600; }
.yx-ob-actions { justify-content: flex-end; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid #eef2f7; }
.yx-ob-readonly { color: #8296ad; font-size: 12px; }
@media (max-width: 1000px) {
  .yx-ob-workspace { grid-template-columns: minmax(0, 1fr); }
  .yx-ob-edit, .yx-ob-preview { max-height: none; }
  .yx-ob-frame-inline iframe { min-height: 360px; }
}
@media (max-width: 620px) {
  .yx-ob-grid { grid-template-columns: minmax(0, 1fr); }
  .yx-ob-proof { grid-template-columns: minmax(0, 1fr); }
}
.yx-archive-fold { margin: 14px 0; border: 1px solid #e3eaf3; border-radius: 10px; background: #fff; }
.yx-archive-fold > summary { padding: 11px 14px; cursor: pointer; font-weight: 600; color: #33475e; }
.yx-archive-fold[open] > summary { border-bottom: 1px solid #eef2f8; }
@media (max-width: 1360px) {
  .yx-flow-row { grid-template-columns: 30px 84px minmax(76px, auto) minmax(0, 1fr) auto; }
  .yx-flow-owner { display: none; }
}
@media (max-width: 900px) {
  .yx-flow-row { grid-template-columns: 30px 1fr auto; grid-template-areas: "idx name status" "sum sum sum" "acts acts acts"; row-gap: 6px; }
  .yx-flow-idx { grid-area: idx; } .yx-flow-name { grid-area: name; } .yx-flow-status { grid-area: status; }
  .yx-flow-sum { grid-area: sum; } .yx-flow-acts { grid-area: acts; justify-content: flex-start; }
  .yx-ob-frame iframe { height: 480px; }
}

/* —— R8.4：面包屑可点击层级 + 第4区块「资料邮寄」行 —— */
.oui-crumb .oui-crumb-link{padding:0;border:0;background:none;color:var(--ux-c-blue,#1a6fd4);font:inherit;cursor:pointer;border-radius:4px}
.oui-crumb .oui-crumb-link:hover{text-decoration:underline}
.oui-crumb .oui-crumb-link:focus-visible{outline:2px solid var(--ux-c-blue,#1a6fd4);outline-offset:2px}
.oui-row-mail .oui-row-body{gap:8px}
.oui-mail-box{display:flex;flex-direction:column;gap:8px;margin-top:8px;padding:10px 12px;border:1px solid var(--ux-c-line,#e2e8f0);border-radius:8px;background:var(--ux-c-fill,#f8fafc)}
.oui-mail-box[hidden]{display:none}
.oui-mail-src{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;font-size:12.5px;color:#4a5b70}
.oui-mail-src-label{color:#7b8fa8}
.oui-mail-src label{display:inline-flex;align-items:center;gap:5px;cursor:pointer}
.oui-mail-src input{accent-color:var(--ux-c-blue,#1a6fd4)}
.oui-mail-card{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:9px 12px;border:1px solid #e6edf5;border-radius:8px;background:#fff}
.oui-mail-card-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.oui-mail-line{display:flex;align-items:center;gap:6px;font-size:12.5px;color:#34465c;line-height:1.5}
.oui-mail-line b{font-weight:600;color:#21374f}
.oui-mail-line i{font-style:normal;color:#5a7291}
.oui-mail-ic{color:#8aa0b8;font-size:12px}
.oui-mail-copy{white-space:nowrap}
.oui-mail-other,.oui-mail-manual{margin-top:2px}
.oui-mail-other[hidden],.oui-mail-manual[hidden]{display:none}
.oui-mail-manual{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.oui-mail-manual .oui-span2{grid-column:1/-1}
.oui-mail-manual .oui-field{display:flex;flex-direction:column;gap:4px;font-size:12.5px;color:#5a7291}
.oui-mail-manual input{padding:6px 9px;border:1px solid #dbe4ef;border-radius:6px;font:inherit;font-size:13px;color:#21374f;background:#fff}
.combo-empty{margin:6px 0;padding:8px 10px;font-size:12.5px;color:#7b8fa8}
@media (max-width:640px){.oui-mail-card{flex-direction:column}.oui-mail-manual{grid-template-columns:1fr}}

/* —— R8.4：办理货物发货 / 资料邮寄 统一窗口 —— */
.yx-ship-form{gap:12px}
.yx-ship-supply{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;border:1px solid #e6edf5;border-radius:8px;background:#f8fafc}
.yx-ship-label{font-size:12.5px;color:#7b8fa8;letter-spacing:.2px}
.yx-ship-supply-value{font-size:13.5px;color:#21374f}
.yx-ship-hint{font-size:12px;color:#8aa0b8;line-height:1.5}
.yx-ship-block{display:flex;flex-direction:column;gap:6px;padding:10px 12px;border:1px solid #e6edf5;border-radius:8px;background:#fff}
.yx-carriers{display:flex;flex-wrap:wrap;gap:6px}
.yx-carrier{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid #dbe4ef;border-radius:999px;font-size:12.5px;color:#34465c;background:#fff;cursor:pointer}
.yx-carrier:has(input:checked){border-color:var(--ux-c-blue,#1a6fd4);background:#eef5ff;color:#14508f;font-weight:600}
.yx-carrier input{accent-color:var(--ux-c-blue,#1a6fd4)}
.yx-ship-contact{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.yx-ship-contact-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.yx-ship-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.yx-ship-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.yx-ship-grid .yx-span2{grid-column:span 2}
.yx-ship-form .yx-field{display:flex;flex-direction:column;gap:4px;font-size:12.5px;color:#5a7291}
.yx-ship-form .yx-field input,.yx-ship-form .yx-field select{padding:7px 10px;border:1px solid #dbe4ef;border-radius:6px;font:inherit;font-size:13px;color:#21374f;background:#fff}
.yx-ship-form .yx-field input[readonly]{background:#f4f7fb;color:#5a7291}
.yx-ship-freight{display:flex;flex-direction:column;gap:8px;padding:10px 12px;border:1px dashed #cfe0f5;border-radius:8px;background:#f7fbff}
.yx-ship-freight[hidden]{display:none}
.yx-ship-freight-head{display:flex;align-items:baseline;gap:8px;font-size:12.5px;color:#14508f;font-weight:600}
.yx-ship-freight-head span{font-weight:400;color:#8aa0b8}
.yx-mail-items{display:flex;flex-wrap:wrap;gap:6px}
.yx-mail-item{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border:1px solid #dbe4ef;border-radius:999px;font-size:12.5px;color:#34465c;background:#fff;cursor:pointer}
.yx-mail-item:has(input:checked){border-color:var(--ux-c-blue,#1a6fd4);background:#eef5ff}
@media (max-width:760px){.yx-ship-grid,.yx-ship-grid-4{grid-template-columns:1fr 1fr}.yx-ship-grid .yx-span2{grid-column:1/-1}}

/* R8.4：把页面里残留的内联 style 属性收成类。CSP 是 style-src 'self'，
   内联 style 属性会被浏览器直接丢掉（表格排序没了手型、分页省略号还会带边框），
   所以排序表头、分页占位这些一律走类，不再写 style="…"。 */
.oui-sortable{cursor:pointer}
.oui-pagegap{border:0;background:none}
.oui-mt-10{margin-top:10px}
.oui-mt-12{margin-top:12px}
.oui-mt-14{margin-top:14px}
.oui-w-40{width:40px}
.oui-w-96{width:96px}
.oui-actions-end{justify-content:flex-end}

/* ————————————————————————————————————————————————
   R8.5（2026-11-12）· 办理弹窗尺寸档位与单一底部操作区
   指令 7.2–7.6：确认开票 800 / 发货 860 / 销项开票 900 / 资料寄送更紧凑。
   弹窗内容自己带 .yx-form-actions 时，把外壳那个「关闭」底栏收起来 ——
   一套主次按钮，不再出现两个关闭、两层操作区。
   ———————————————————————————————————————————————— */
.yx-modal-box.is-w800{width:min(800px,100%)}
.yx-modal-box.is-w860{width:min(860px,100%)}
.yx-modal-box.is-w900{width:min(900px,100%)}
.yx-modal-box.is-w620{width:min(620px,100%)}
.yx-modal-box.has-actions .yx-modal-foot{display:none}
.yx-modal-box.has-actions .yx-modal-body{padding-bottom:6px}
@media (max-height:820px){
  .yx-modal-box{max-height:85vh}
}

/* 发货窗口：状态徽标 / 分项复制 / 紧凑事实行 / 批次折叠 */
.yx-ship-state{margin-left:auto;padding:2px 9px;border-radius:999px;font-size:12px;background:#eef5ff;color:#2166b8}
.yx-ship-state.is-warn{background:#fff3e0;color:#a76500}
.yx-copy-all{flex:0 0 auto}
.yx-copy-chip{border:1px solid #dbe4ef;background:#fff;color:#5a7291;border-radius:5px;font-size:11.5px;
  padding:1px 6px;margin-left:6px;cursor:pointer;line-height:1.6}
.yx-copy-chip:hover{border-color:#9dc0ea;color:#2166b8;background:#f6faff}
.yx-ship-facts{margin:0;font-size:12.5px;color:#5a7291;line-height:1.7;padding:2px 2px 0}
.yx-ship-batches{border:1px solid #e6edf5;border-radius:8px;background:#fff}
.yx-ship-batches>summary{cursor:pointer;padding:8px 12px;font-size:12.5px;color:#14508f;list-style:none}
.yx-ship-batches>summary::-webkit-details-marker{display:none}
.yx-ship-batches>summary::before{content:'▸';display:inline-block;margin-right:6px;color:#8aa0b8}
.yx-ship-batches[open]>summary::before{content:'▾'}
.yx-ship-batch-table{width:100%;border-collapse:collapse;font-size:12.5px}
.yx-ship-batch-table th,.yx-ship-batch-table td{padding:6px 8px;border-top:1px solid #f0f4f9;text-align:left;white-space:nowrap}
.yx-ship-batch-table th{background:#f8fafc;color:#6b7f96;font-weight:500}

/* 确认开票安排与资料 */
.yx-plan{display:flex;flex-direction:column;gap:14px}
.yx-plan-sec{display:flex;flex-direction:column;gap:8px}
.yx-plan-h{font-size:13px;color:#21374f;font-weight:600;display:flex;align-items:center;gap:8px}
.yx-plan-h em{font-style:normal;font-size:12px;color:#8aa0b8;font-weight:400}
.yx-plan-modes{display:flex;gap:8px}
.yx-plan-mode{display:inline-flex;align-items:center;gap:6px;padding:6px 14px;border:1px solid #dbe4ef;
  border-radius:999px;font-size:13px;color:#34465c;background:#fff;cursor:pointer}
.yx-plan-mode:has(input:checked){border-color:var(--ux-c-blue,#1a6fd4);background:#eef5ff;color:#14508f}
.yx-plan-date{display:flex;align-items:center;gap:8px}
.yx-plan-date input[type=date]{padding:6px 10px;border:1px solid #dbe4ef;border-radius:6px;font:inherit;font-size:13px}
.yx-plan-tags{display:flex;flex-wrap:wrap;gap:8px}
/* 「更多资料」是折叠区：display:flex 会盖掉浏览器默认的 [hidden]{display:none}，
   所以必须显式写一条，否则 15 个标签一次性全铺开，「更多资料」按钮形同虚设。 */
.yx-plan-tags[hidden]{display:none}
.yx-plan-tag{display:inline-flex;align-items:center;gap:5px;padding:4px 11px;border:1px solid #dbe4ef;
  border-radius:999px;font-size:12.5px;color:#34465c;background:#fff;cursor:pointer}
.yx-plan-tag:has(input:checked){border-color:var(--ux-c-blue,#1a6fd4);background:#eef5ff;color:#14508f}
.yx-plan-more{border:0;background:none;color:#2166b8;font-size:12.5px;cursor:pointer;padding:2px 0;text-align:left}
.yx-plan-contact{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:10px 12px;border:1px solid #e6edf5;border-radius:8px;background:#f8fafc}
.yx-plan-contact-main{display:flex;flex-direction:column;gap:4px;min-width:0}
.yx-plan-none{font-size:12.5px;color:#8aa0b8;margin:0}
.yx-meta-note{margin:6px 0 0;font-size:12px;color:#7b8fa8;line-height:1.6}

/* 收票联系人选择器：搜索 + 紧凑列表（姓名｜电话｜科室 + 完整地址） */
.yx-plan-search{width:100%;padding:7px 10px;border:1px solid #dbe4ef;border-radius:6px;font:inherit;font-size:13px}
.yx-plan-list{display:flex;flex-direction:column;gap:6px;margin-top:8px;max-height:240px;overflow:auto}
.yx-plan-item{display:flex;flex-direction:column;gap:2px;text-align:left;padding:8px 10px;
  border:1px solid #e6edf5;border-radius:8px;background:#fff;cursor:pointer;font-weight:400}
.yx-plan-item:hover{border-color:#9dc0ea;background:#f6faff}
.yx-plan-item-top{display:flex;align-items:baseline;gap:8px;font-size:13px;color:#1c3355}
.yx-plan-item-top b{font-weight:600}
.yx-plan-item-top i{font-style:normal;color:#5a7291;font-variant-numeric:tabular-nums}
.yx-plan-item-top em{font-style:normal;font-size:11.5px;color:#8a9aae;padding:1px 6px;background:#f1f5fa;border-radius:4px}
.yx-plan-item-addr{font-size:12px;color:#7d8ea4;line-height:1.5}

/* 销项开票：本次开票金额单独一栏，不混在票面五要素里 */
.yx-inv-amount{display:flex;align-items:baseline;gap:10px;padding:10px 14px;border:1px solid #dbe9f8;
  border-radius:8px;background:#f5f9ff}
.yx-inv-amount span{font-size:12.5px;color:#5a7291}
.yx-inv-amount strong{font-size:22px;font-weight:700;color:#14508f;font-variant-numeric:tabular-nums;letter-spacing:-.2px}
.yx-inv-amount em{font-style:normal;font-size:11.5px;color:#8a9aae;margin-left:auto}
.yx-inv-face-tag{margin-left:auto;padding:2px 10px;border-radius:999px;background:#eef5ff;color:#2166b8;font-size:12px}


/* ===== 图 1「办理货物发货」按用户参考图重做（R8.5 第二轮） =====
   蓝色标题栏 / 600px 窄窗 / 横向表单行 / 三行收件面板 / 两列物流字段 / 居中双按钮。 */
.yx-modal-box.is-w600{width:min(600px,100%)}
.yx-modal-box.is-blue-head .yx-modal-head{
  align-items:center;gap:10px;padding:11px 14px;border-bottom:0;
  background:linear-gradient(100deg,#1657c8 0%,#2b7bf3 100%);
}
.yx-modal-box.is-blue-head .yx-modal-titles h2{color:#fff;font-size:15.5px;letter-spacing:.2px}
.yx-modal-box.is-blue-head .yx-modal-titles h2::before{content:"▣";display:inline-block;margin-right:8px;font-size:15px;opacity:.92}
.yx-modal-box.is-blue-head .yx-modal-titles p{display:none}
.yx-modal-box.is-blue-head .yx-modal-x{color:#fff;font-size:20px}
.yx-modal-box.is-blue-head .yx-modal-x:hover{background:rgba(255,255,255,.18);color:#fff}
.yx-modal-box.is-blue-head .yx-modal-body{padding:14px 18px}
.yx-ship-form.is-fig1{gap:11px;padding:2px 0}
.yx-fig-line{display:flex;align-items:center;gap:10px}
.yx-fig-k{flex:0 0 68px;font-size:12.5px;color:#3b5878;white-space:nowrap}
.yx-fig-k i,.yx-ship-form.is-fig1 .yx-field i{color:#e34b4b;font-style:normal;margin-left:2px}
.yx-fig-v{display:flex;align-items:center;gap:6px;min-width:0;flex:1 1 auto}
.yx-fig-supply{position:relative;flex:0 0 190px;height:32px;border:1px solid #ccd9e8;border-radius:6px;background:#fff;overflow:hidden}
.yx-fig-supply-ic{position:absolute;left:9px;top:6px;font-size:14px;color:#6b8bb5;pointer-events:none}
.yx-fig-supply select{width:100%;height:100%;padding:0 26px 0 30px;border:0;appearance:none;background:transparent;color:#253d59;font-size:13px;cursor:default}
.yx-fig-supply::after{content:"⌄";position:absolute;right:9px;top:4px;color:#7b8fa8;pointer-events:none;font-size:14px}
.yx-fig-tip{flex:1 1 auto;padding:6px 9px;border-radius:6px;background:#eef5ff;border:1px solid #d8e7fb;font-size:11.5px;line-height:1.5;color:#2b5f9e}
.yx-fig-tip b{font-weight:600}
.yx-ship-form.is-fig1 .yx-carriers{gap:6px;flex:0 1 auto}
.yx-ship-form.is-fig1 .yx-carrier{border:0;background:transparent;padding:3px 4px;border-radius:0;font-size:12.5px;font-weight:400;gap:5px}
.yx-ship-form.is-fig1 .yx-carrier:has(input:checked){color:#1657c8;font-weight:600;background:transparent}
.yx-ship-form.is-fig1 .yx-carrier input{accent-color:#1657c8}
.yx-fig-freight-chip{margin-left:auto;flex:0 0 auto;padding:2px 7px;border:1px solid #dfe5ee;border-radius:4px;background:#f8fafc;color:#98a7b9;font-size:10.5px;cursor:pointer}
.yx-fig-freight-chip.is-on{border-color:#8b6fe0;background:#f2ecff;color:#6a44c9}
.yx-fig-status{margin:0 0 0 78px;padding:4px 8px;border-left:3px solid #e8b64c;border-radius:0 4px 4px 0;background:#fff8e8;font-size:11.5px;color:#8a6a2f}
.yx-fig-contact{position:relative;display:flex;align-items:flex-start;gap:10px;padding:10px 12px 10px 14px;border:1px solid #dbe8f8;border-radius:8px;background:#f5f9ff}
.yx-fig-contact-head{position:absolute;top:8px;left:13px;font-size:12px;color:#2b5f9e;font-weight:600}
.yx-fig-contact-body{display:flex;flex-direction:column;gap:3px;padding-top:20px;min-width:0;flex:1 1 auto}
.yx-fig-row{display:flex;align-items:center;gap:8px;font-size:12.5px;color:#253d59;line-height:1.5}
.yx-fig-k2{flex:0 0 60px;color:#6b819c;font-size:12px;white-space:nowrap}
.yx-fig-row b{font-weight:600}
/* 图 1 收件面板里只有一个「复制全部」；分项复制保留能力但不常显，
   鼠标移到该行才出现，避免为了功能把参考图的紧凑版面撑出三个按钮。 */
.yx-copy-mini{border:0;background:none;color:#9fb0c4;font-size:10.5px;cursor:pointer;padding:0 2px;opacity:0;transition:opacity .12s}
.yx-fig-row:hover .yx-copy-mini,.yx-copy-mini:focus-visible{opacity:1}
.yx-copy-mini:hover{color:#1657c8}
.yx-ship-form.is-fig1 .yx-field .yx-fig-lb{display:block;white-space:nowrap}
.yx-fig-copy-all{flex:0 0 auto;align-self:center;margin-top:16px;padding:5px 10px;border:1px solid #a9c7f0;border-radius:6px;background:#fff;color:#1657c8;font-size:12px;cursor:pointer;white-space:nowrap}
.yx-fig-copy-all:hover{background:#eef5ff}
.yx-ship-form.is-fig1 .yx-ship-grid.is-two{grid-template-columns:1fr 1fr;gap:12px}
.yx-ship-form.is-fig1 .yx-field{font-size:12.5px;color:#3b5878}
.yx-ship-form.is-fig1 .yx-field input{padding:7px 10px;border:1px solid #ccd9e8;border-radius:6px;font-size:13px}
.yx-ship-form.is-fig1 .yx-ship-freight{padding:10px 12px;border:1px dashed #cfe0f5;border-radius:8px;background:#f7fbff}
.yx-fig-batches{font-size:11.5px}
.yx-fig-batches .yx-ship-batches summary{color:#2b5f9e;cursor:pointer;list-style:none}
.yx-ship-form.is-fig1 .yx-form-actions{justify-content:center;gap:12px;margin-top:4px}
.yx-ship-form.is-fig1 .yx-form-actions button{min-width:96px;height:34px}
@media (max-width:640px){
  .yx-fig-line{flex-wrap:wrap}.yx-fig-tip{flex-basis:100%}.yx-fig-supply{flex-basis:190px}
  .yx-ship-form.is-fig1 .yx-ship-grid.is-two{grid-template-columns:1fr}
}

/* 单套按钮窗口隐藏了 foot，校验/失败提示改在 body 顶部内联显示，
   不能再让用户「填了单号点保存毫无反应」。 */
.yx-modal-msg.is-inline{display:block;flex:none;margin:0 0 10px;padding:8px 11px;
  border:1px solid #f3c9c9;border-radius:6px;background:#fff5f5;color:#b54747;
  font-size:12.5px;line-height:1.5}
.yx-modal-msg.is-inline[hidden]{display:none}
.yx-modal-msg.is-inline.is-ok{border-color:#bfe6cd;background:#f2fbf5;color:#16794a}
.yx-fig-supply select{cursor:pointer}

/* ————————————————————————————————————————————————
   R8.5 图4 · 资料邮寄办理窗口（参考「资料邮寄办理流程示意」）
   只作用于 .yx-mail4-form：接口、字段、权限、合同排除规则均不变。
   ———————————————————————————————————————————————— */
.yx-modal-box .yx-mail4-form{display:flex;flex-direction:column;gap:12px;padding:2px 2px 0}
.yx-modal-box .yx-mail4-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.yx-modal-box .yx-mail4-badge{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border:1px solid #ccebd8;border-radius:999px;background:#eaf7ef;color:#1a7f45;font-size:12.5px;font-weight:600;white-space:nowrap}
.yx-modal-box .yx-mail4-note{display:inline-flex;align-items:center;gap:5px;font-size:12px;color:#7b8fa8;line-height:1.5}
.yx-modal-box .yx-mail4-info{color:#1a6fd4;font-size:12.5px}
.yx-modal-box .yx-mail4-block{display:flex;flex-direction:column;gap:7px;padding:10px 12px;border:1px solid #e6edf5;border-radius:8px;background:#fff}
.yx-modal-box .yx-mail4-label{display:flex;align-items:center;gap:5px;font-size:12.5px;font-weight:600;color:#33475e}
.yx-modal-box .yx-mail4-label .oui-req{color:#d14343}
.yx-modal-box .yx-mail4-items{display:flex;flex-wrap:wrap;gap:6px}
.yx-modal-box .yx-mail4-item{display:inline-flex;align-items:center;gap:5px;padding:5px 10px;border:1px solid #dbe4ef;border-radius:999px;font-size:12.5px;color:#34465c;background:#fff;cursor:pointer}
.yx-modal-box .yx-mail4-item:has(input:checked){border-color:#1a6fd4;background:#eef5ff;color:#14508f;font-weight:600}
.yx-modal-box .yx-mail4-item input{accent-color:#1a6fd4}
.yx-modal-box .yx-mail4-contact{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:10px 12px;border:1px solid #dce9f8;border-radius:8px;background:#f7fbff}
.yx-modal-box .yx-mail4-contact-main{display:flex;flex-direction:column;gap:4px;min-width:0}
.yx-modal-box .yx-mail4-line{display:flex;align-items:baseline;gap:8px;font-size:12.5px;line-height:1.6;color:#2f4258;min-width:0}
.yx-modal-box .yx-mail4-k{flex:0 0 56px;color:#7b8fa8;white-space:nowrap}
.yx-modal-box .yx-mail4-line b{font-weight:600;color:#21374f}
.yx-modal-box .yx-mail4-line span{min-width:0;overflow-wrap:anywhere}
.yx-modal-box .yx-mail4-copy{align-self:center;white-space:nowrap}
.yx-modal-box .yx-mail4-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:8px 10px;padding:10px 12px;border:1px solid #dce9f8;border-radius:8px;background:#f7fbff}
.yx-modal-box .yx-mail4-span{grid-column:1/-1}

/* ===== R8.6 本单开票信息（参考图 B）：白卡、无蓝头、无解释文字 ===== */
.yx-modal-box.is-plain-card .yx-modal-head{background:#fff;border-bottom:1px solid #eef2f7}
.yx-modal-box .yx-modal-x.is-text{width:auto;height:32px;padding:0 16px;border:1px solid #dfe6ee;border-radius:6px;
  background:#fff;color:#33475e;font-size:13.5px;line-height:30px}
.yx-modal-box .yx-issue{display:flex;flex-direction:column;width:100%;padding:2px 2px 0}
.yx-modal-box .yx-issue-parties{display:grid;gap:8px;width:100%;padding:0 0 12px}
.yx-modal-box .yx-issue-p{display:grid;grid-template-columns:auto minmax(0,1.15fr) auto minmax(0,1fr);
  align-items:baseline;gap:2px 6px;font-size:14px;color:#33475e}
.yx-modal-box .yx-issue-k{color:#5a6b80;white-space:nowrap}
.yx-modal-box .yx-issue-n{font-weight:600;color:#1f2d3d;overflow-wrap:anywhere}
.yx-modal-box .yx-issue-t{color:#1f2d3d;overflow-wrap:anywhere}
.yx-modal-box .yx-issue-sum{display:flex;align-items:center;gap:12px;padding:4px 0 16px}
.yx-modal-box .yx-issue-kind{display:inline-flex;align-items:center;padding:4px 12px;border-radius:6px;
  background:#eaf1ff;color:#1a6ef2;font-size:14px;font-weight:600}
.yx-modal-box .yx-issue-lab{font-size:15px;font-weight:600;color:#1f2d3d}
.yx-modal-box .yx-issue-sum strong{font-size:23px;font-weight:700;color:#1a6ef2;letter-spacing:-.01em}
.yx-modal-box .yx-issue-items{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13.5px;color:#1f2d3d}.yx-modal-box .yx-issue-items th,.yx-modal-box .yx-issue-items td{border:1px solid #dbe6f2;padding:9px 8px;text-align:center}
.yx-modal-box .yx-issue-items th{background:#f4f8fe;color:#33475e;font-weight:600}
.yx-modal-box .yx-issue-items td{overflow-wrap:anywhere}
.yx-modal-box .yx-issue-plan{display:flex;align-items:center;width:100%;margin:16px 0 0;padding:14px 16px;
  border-radius:8px;background:#f5f8fd;font-size:13.5px;color:#33475e}
.yx-modal-box .yx-issue-plan>span{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.yx-modal-box .yx-issue-plan>span:first-child{padding-right:28px;border-right:1px solid #d7e2f0}
.yx-modal-box .yx-issue-plan>span+span{padding-left:28px}
.yx-modal-box .yx-issue-plan b{font-weight:600;color:#1f2d3d}
.yx-modal-box .yx-issue-actions{display:flex;align-items:center;gap:14px;width:100%;margin-top:18px;padding-top:16px;border-top:1px solid #eef2f7}
.yx-modal-box .yx-issue-no{display:flex;flex-direction:row;align-items:center;gap:10px;flex:0 1 auto;width:min(100%,560px);min-width:0}
.yx-modal-box .yx-issue-no>span{flex:0 0 auto}
.yx-modal-box .yx-issue-no>span{font-size:15px;font-weight:600;color:#1f2d3d;white-space:nowrap}
.yx-modal-box .yx-issue-no>input{flex:1 1 auto;min-width:0;height:38px;padding:7px 12px;border:1px solid #dfe6ee;
  border-radius:6px;font-size:14px;color:#1f2d3d;background:#fff}
.yx-modal-box .yx-issue-no>input:focus{outline:2px solid #a8c8fb;outline-offset:1px;border-color:#7fa9ef}
.yx-modal-box .yx-issue-btns{display:flex;align-items:center;gap:10px;flex:0 0 auto;margin-left:auto}
.yx-modal-box .yx-issue-btns button{min-height:38px;padding:0 20px;border:1px solid #dfe6ee;border-radius:6px;
  background:#fff;color:#33475e;font-size:14px;cursor:pointer;white-space:nowrap}
.yx-modal-box .yx-issue-btns button.is-primary{background:#1a6ef2;border-color:#1a6ef2;color:#fff}
.yx-modal-box .yx-issue-btns button.is-primary:hover{background:#155fd6;border-color:#155fd6}
.yx-modal-box .yx-issue-btns button[disabled]{opacity:.6;cursor:default}
@media (max-width:640px){
  .yx-modal-box .yx-issue-p{grid-template-columns:auto minmax(0,1fr)}
  .yx-modal-box .yx-issue-plan{flex-direction:column;align-items:flex-start;gap:8px}
  .yx-modal-box .yx-issue-plan>span:first-child{padding-right:0;border-right:0}
  .yx-modal-box .yx-issue-plan>span+span{padding-left:0}
  .yx-modal-box .yx-issue-actions{flex-direction:column;align-items:stretch}
  .yx-modal-box .yx-issue-btns{justify-content:flex-end}
}
.yx-modal-box .yx-mail4-grid .yx-field{display:flex;flex-direction:column;gap:4px;font-size:12px;color:#5a7291;min-width:0}
.yx-modal-box .yx-mail4-grid input,.yx-modal-box .yx-mail4-grid select,.yx-modal-box .yx-mail4-grid textarea{width:100%;box-sizing:border-box;padding:7px 9px;border:1px solid #dbe4ef;border-radius:6px;font:inherit;font-size:12.5px;color:#21374f;background:#fff}
.yx-modal-box .yx-mail4-grid textarea{min-height:54px;resize:vertical;line-height:1.55}
@media (max-width:760px){
  .yx-modal-box .yx-mail4-grid{grid-template-columns:1fr 1fr}
  .yx-modal-box .yx-mail4-contact{grid-template-columns:1fr}
  .yx-modal-box .yx-mail4-copy{justify-self:start}
}
@media (max-width:520px){
  .yx-modal-box .yx-mail4-grid{grid-template-columns:1fr}
  .yx-modal-box .yx-mail4-note{font-size:11.5px}
}

/* Local invoice-plan choices: native rectangular checkboxes, original font size. */
.yx-plan .yx-plan-tag{border-radius:4px;padding:4px 7px;background:white}.yx-plan .yx-plan-tag input{appearance:auto;width:16px;height:16px;min-width:16px;padding:0;border-radius:2px}.yx-plan [hidden]{display:none!important}.yx-plan [data-plan-selected]{margin-top:6px}.yx-plan [data-plan-custom],.yx-plan [data-plan-channel]{width:100%;box-sizing:border-box}

[data-oui-modal-body]:has(.yx-plan){max-height:calc(100vh - 190px);overflow:auto}.yx-plan label.yx-plan-tag{display:inline-flex!important;flex-direction:row!important;align-items:center!important;width:auto!important;min-height:28px;gap:6px!important}.yx-plan .yx-plan-modes label{display:inline-flex;flex-direction:row;align-items:center;gap:6px}.yx-plan .yx-plan-h em{display:none}.yx-plan [data-plan-other]{margin:0}

/* Keep all 13 outbound columns readable; scroll instead of compressing headers. */
.yx-ob-paper-scroll{overflow-x:auto;max-width:100%}.yx-ob-paper-scroll table{min-width:1100px;table-layout:auto}.yx-ob-paper-scroll th{white-space:nowrap;padding:6px 8px}

.yx-modal-box.is-readonly .yx-ob-workspace{grid-template-columns:minmax(0,1fr)}.yx-modal-box.is-readonly .yx-ob-groups{display:none}

.yx-confirm-summary dl{display:grid;grid-template-columns:100px minmax(0,1fr);gap:10px;margin:0}.yx-confirm-summary dt{color:#63758b}.yx-confirm-summary dd{margin:0;overflow-wrap:anywhere}.yx-confirm-attest{display:flex!important;flex-direction:row!important;align-items:center;gap:8px;margin-top:14px}.yx-confirm-attest input{width:16px;height:16px;min-width:16px}.yx-plan [data-plan-editor][hidden]{display:none!important}

.yx-plan [data-plan-editor] > details{border-top:1px solid #e6edf5;margin-top:10px}.yx-plan [data-plan-editor] > details > summary{cursor:pointer;padding:10px 0;color:#34465c;font-weight:600}

/* 出库单基础商品表与逐商品适用资料，旧正式快照继续使用原列。 */
.yx-ob-paper-scroll.is-basic table{min-width:0;table-layout:fixed}
.yx-ob-paper-scroll.is-basic th{white-space:normal;padding:6px 3px}
.yx-ob-regulatory{margin-top:10px;overflow-wrap:anywhere}
.yx-ob-regulatory dl{display:grid;grid-template-columns:minmax(100px,1fr) minmax(0,3fr);gap:4px 8px;margin:6px 0}
.yx-ob-regulatory dd{margin:0}
.yx-ob-groups:empty{display:none}

.yx-ob-workspace.is-basic-only{grid-template-columns:minmax(0,1fr)}
