/* ============================================================
 * 批 V19 V19-13b 新建订单（#454；稿 rv/V19-designs docs/样稿/V19-设计稿/V19-13b_新建订单/，README 规矩 1–9）：public/js/neworder19.js 的样式
 *   整屏三栏（左右各留 24、最宽 1280、高到底）：左 196「6 步」、中间分段表单、右 312「这张单」；三栏各自滚。手机（≤ 600）一栏、步骤变吸顶胶囊、底部固定条。
 *   只用 core-v17-ui.css 的 --u- 变量；类名都是 of19- 开头，只在 .modal-box.of19 里生效（别的弹窗不受影响）；#458 编辑订单同一套三栏（5 段 + 改了什么）
 * ============================================================ */
.modal-box.of19 { width: min(1280px, calc(100vw - 48px)); max-width: none; height: calc(100vh - 48px); max-height: none; }
.modal-box.of19 > .drawer-bd { flex: 1; min-height: 0; padding: 0; display: grid; grid-template-columns: 196px minmax(0, 1fr) 312px; grid-template-rows: minmax(0, 1fr); overflow: hidden; background: var(--u-ground); }

/* 左：6 步 */
.of19-rail { padding: var(--u-space-4) var(--u-space-3); border-right: 1px solid var(--u-line); background: var(--u-surface); overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.of19-step { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; row-gap: 2px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--u-radius-md); background: none; font: inherit; font-size: var(--u-fs-body); line-height: 20px; color: var(--u-ink-2); text-align: left; cursor: pointer; }
.of19-step:hover { background: var(--u-neutral-soft); }
.of19-step:focus-visible { outline: 2px solid var(--u-brand); outline-offset: 1px; }
.of19-step .n { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--u-fs-caption); font-weight: 600; background: var(--u-neutral-soft); color: var(--u-ink-3); }
.of19-step.done .n { background: var(--u-success-soft); color: var(--u-success); }
.of19-step.on { background: var(--u-brand-soft); color: var(--u-brand); font-weight: 600; }
.of19-step.on .n { background: var(--u-brand); color: var(--u-surface); }
/* 步骤名不在词中间断（审核方 #454 11-19 14:2x 第 1 条：俄文 1366「Клиент и маршрут」被「ещё 2」挤成 «маршру / т»）：放不下时小标换到下一行 */
.of19-step .t { flex: 1 1 0; min-width: min-content; white-space: normal; overflow-wrap: normal; word-break: normal; }
.of19-step .m { flex: none; margin-left: auto; font-size: 11px; line-height: 16px; font-weight: 600; color: var(--u-warning); background: var(--u-warning-soft); border-radius: var(--u-radius-pill); padding: 1px 7px; }

/* 中：分段表单（#of-form 本身是滚动区；格子还在 #of-form 里，读表单照旧） */
.modal-box.of19 #of-form.of19-form { display: block; height: 100%; overflow: auto; padding: var(--u-space-4) 18px 28px; box-sizing: border-box; min-width: 0; }
.of19-sec { background: var(--u-surface); border: 1px solid var(--u-line); border-radius: var(--u-radius-lg); margin: 0 0 14px; scroll-margin-top: 8px; }
.of19-sh { display: flex; align-items: baseline; gap: 10px; padding: 12px var(--u-space-4); border-bottom: 1px solid var(--u-line); }
.of19-sh .n { flex: none; align-self: center; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: var(--u-fs-caption); font-weight: 600; background: var(--u-brand); color: var(--u-surface); }
.of19-sh b { font-size: var(--u-fs-body); color: var(--u-ink); }
.of19-sh .s { font-size: var(--u-fs-caption); color: var(--u-ink-3); }
.of19-g { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; padding: 14px var(--u-space-4) var(--u-space-4); }
.of19-g > .field, .of19-fold-b > .field { grid-column: span 3; margin: 0; min-width: 0; }
.of19-g > .field.full { grid-column: 1 / -1; }
.of19-g > .field.of19-c2, .of19-fold-b > .field.of19-c2 { grid-column: span 2; }
.of19-fold { grid-column: 1 / -1; border-top: 1px dashed var(--u-line-dot); padding-top: 6px; }
.of19-fold-t { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; background: none; font: inherit; font-size: var(--u-fs-caption); color: var(--u-ink-3); cursor: pointer; }
.of19-fold-t:focus-visible { outline: 2px solid var(--u-brand); outline-offset: 2px; }
.of19-fold.shut .of19-fold-t .ic { transform: rotate(-90deg); }
.of19-fold-b { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 14px; padding-top: 8px; }
.of19-fold.shut .of19-fold-b { display: none; }

/* 右：这张单 + 底部 */
.of19-aside { border-left: 1px solid var(--u-line); background: var(--u-surface); display: flex; flex-direction: column; min-height: 0; }
.of19-ab { flex: 1; min-height: 0; overflow: auto; padding: var(--u-space-4); }
.of19-at { font-size: var(--u-fs-caption); font-weight: 600; color: var(--u-ink-3); margin: 0 0 8px; }
.of19-kv { display: grid; grid-template-columns: minmax(64px, max-content) minmax(0, 1fr); column-gap: 12px; row-gap: 7px; font-size: 13px; line-height: 19px; margin: 0 0 var(--u-space-4); }
.of19-kv dt { color: var(--u-ink-3); }
.of19-kv dd { margin: 0; min-width: 0; color: var(--u-ink); overflow-wrap: anywhere; }
.of19-kv dd.e, .of19-e { color: var(--u-ink-3); }
.of19-e { font-size: 13px; margin: 0 0 var(--u-space-4); }
.of19-big { font-size: 22px; line-height: 28px; font-weight: 700; color: var(--u-ink); margin: 0 0 var(--u-space-4); }
.of19-tl { position: relative; list-style: none; margin: 0 0 var(--u-space-3); padding: 0 0 0 22px; }
.of19-tl::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--u-line); }
.of19-ti { position: relative; padding: 0 0 10px; font-size: 13px; line-height: 19px; }
.of19-ti::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--u-surface); border: 2px solid var(--u-brand); box-sizing: border-box; }
.of19-ti .r { display: flex; gap: 8px; align-items: baseline; }
.of19-ti .r b { flex: 1; min-width: 0; font-weight: 600; color: var(--u-ink); }
.of19-ti .c { font-size: var(--u-fs-caption); color: var(--u-ink-3); }
.of19-pl { font-size: var(--u-fs-caption); color: var(--u-ink-3); margin: 0 0 var(--u-space-4); }
.of19-note { display: flex; gap: 8px; font-size: var(--u-fs-caption); line-height: 18px; color: var(--u-ink-2); padding: 9px 10px; border-radius: var(--u-radius-md); background: var(--u-ground); margin: 0 0 8px; }
.of19-note .ic { flex: none; margin-top: 2px; color: var(--u-ink-3); }
.of19-draft { border: 1px solid var(--u-brand-line); background: var(--u-brand-soft); border-radius: var(--u-radius-md); padding: 10px; margin: 0 0 var(--u-space-4); font-size: var(--u-fs-caption); line-height: 18px; color: var(--u-ink-2); }
.of19-draft > div:first-child { display: flex; gap: 6px; }
.of19-draft .ic { flex: none; margin-top: 2px; color: var(--u-brand); }
.of19-dr-a { display: flex; gap: 8px; margin-top: 8px; }
.of19-af { flex: none; border-top: 1px solid var(--u-line); padding: 12px var(--u-space-4); display: flex; flex-direction: column; gap: 8px; background: var(--u-surface); }
.of19-miss { display: flex; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0; background: none; font: inherit; font-size: var(--u-fs-caption); line-height: 18px; color: var(--u-warning); text-align: left; cursor: pointer; }
.of19-miss.ok { color: var(--u-success); cursor: default; }
.of19-miss:focus-visible { outline: 2px solid var(--u-brand); outline-offset: 2px; }
.of19-af > .u-btn { width: 100%; }
.of19-row { display: flex; gap: 8px; }
.of19-row > .u-btn { flex: 1; }

/* 编辑订单（#458）：步骤小标「改了 N」蓝色；右栏「改了什么」每项一行（名字 + 怎么生效，下面「旧 → 新」）；底部那行改过了是蓝色；「收款期次在项目 360 › 财务里调」能点 */
.of19-step .m.chg { color: var(--u-brand); background: var(--u-brand-soft); }
.of19-chg { list-style: none; margin: 0 0 var(--u-space-4); padding: 0; display: flex; flex-direction: column; gap: 8px; }
.of19-ci { font-size: 13px; line-height: 19px; padding: 0 0 8px; border-bottom: 1px dashed var(--u-line); }
.of19-ci:last-child { border-bottom: 0; padding-bottom: 0; }
.of19-ci .r { display: flex; gap: 8px; align-items: baseline; justify-content: space-between; }
.of19-ci .r b { min-width: 0; font-weight: 600; color: var(--u-ink); }
.of19-ci .c { font-size: var(--u-fs-caption); color: var(--u-ink-2); overflow-wrap: anywhere; }
.of19-ci .c s { color: var(--u-ink-3); }
.of19-ef { flex: none; max-width: 60%; font-size: 11px; line-height: 16px; text-align: right; color: var(--u-success); }
.of19-ef.ap { color: var(--u-warning); font-weight: 600; }
.of19-ef.pv { color: var(--u-brand); }
.of19-miss.chg { color: var(--u-brand); cursor: default; }
.of19-miss.none { color: var(--u-ink-3); cursor: default; }
.of19-go { width: 100%; border: 0; font: inherit; font-size: var(--u-fs-caption); text-align: left; cursor: pointer; color: var(--u-brand); }
.of19-go:hover { background: var(--u-brand-soft); }
.of19-go:focus-visible { outline: 2px solid var(--u-brand); outline-offset: 1px; }
.of19-go .ic { color: var(--u-brand); }

/* 手机（规矩 8）：一栏；步骤变顶上可横滑的胶囊（吸顶）；每格整行；期次每期一张小卡（两格一行）；底部固定条；取消用右上角 × */
@media (max-width: 600px) {
  body.app-shell .modal-box.of19, .modal-box.of19 { width: 100vw !important; height: 100vh; border-radius: 0; }   /* 盖过 app.css 手机下所有弹窗「100vw − 24」那条（它带 !important） */
  .modal-box.of19 > .drawer-bd { display: block; overflow: auto; padding-bottom: 150px; }
  .modal-box.of19 #of-form.of19-form { height: auto; overflow: visible; padding: var(--u-space-3); }
  .of19-rail { position: sticky; top: 0; z-index: 5; flex-direction: row; gap: 6px; overflow-x: auto; padding: 10px var(--u-space-3); border-right: 0; border-bottom: 1px solid var(--u-line); }
  .of19-step { flex: none; flex-wrap: nowrap; width: auto; padding: 6px 10px; border: 1px solid var(--u-line); border-radius: var(--u-radius-pill); }
  .of19-step .n { width: 18px; height: 18px; font-size: 11px; }
  .of19-step .t { white-space: nowrap; }
  .of19-g, .of19-fold-b { grid-template-columns: minmax(0, 1fr); padding: var(--u-space-3); }
  .of19-fold-b { padding: 8px 0 0; }
  .of19-g > .field, .of19-g > .field.of19-c2, .of19-fold-b > .field, .of19-fold-b > .field.of19-c2 { grid-column: 1 / -1; }
  .modal-box.of19 .of-br-head { display: none; }
  .modal-box.of19 .of-br-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 8px 0; border-bottom: 1px dashed var(--u-line); }
  .modal-box.of19 .of-br-row > * { min-width: 0; width: auto; }
  .of19-aside { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; border-left: 0; border-top: 1px solid var(--u-line); box-shadow: var(--u-shadow-pop); }
  .of19-ab { display: none; }
  .of19-af { padding: 10px var(--u-space-3); }
  .of19-row > .u-btn.of19-cancel { display: none; }
}
