
  * { margin:0; padding:0; box-sizing:border-box; font-family:"Segoe UI","Microsoft YaHei","Hiragino Sans GB",Tahoma,Arial,sans-serif; }
  :root {
    --nav-bg:#2E6589; --nav-dark:#26445C;
    --side-bg:#F5F6F7; --side-border:#DDE2E6;
    --link:#478FCA; --primary:#478FCA; --primary-dark:#3978B5;
    --grid:#DCE0E5; --th-bg:#EFF3F8;
    --t1:#393939; --t2:#667; --t3:#93A1AE;
    --green:#82AF6F; --amber:#F0AD4E; --red:#D15B47; --blue:#5BC0DE; --purple:#9490CE;
  }
  html,body { height:100%; }
  body { background:#ECEFF1; color:var(--t1); font-size:13px; }

  /* ===== 顶部导航 ===== */
  #navbar { position:fixed; top:0; left:0; right:0; height:45px; background:linear-gradient(to bottom,#3778A4,#2E6589); box-shadow:0 1px 3px rgba(0,0,0,.25); z-index:200; display:flex; align-items:center; padding:0 16px; }
  #navbar .brand { color:#fff; font-size:16px; font-weight:600; display:flex; align-items:center; gap:9px; }
  #navbar .brand .mark { width:26px; height:26px; background:#fff; color:var(--nav-bg); border-radius:3px; display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700; }
  #navbar .brand small { font-weight:400; opacity:.75; font-size:12px; }
  #navbar .nav-right { margin-left:auto; display:flex; align-items:center; gap:4px; color:#D9E7F1; font-size:12px; }
  #navbar .nav-right .sep { color:rgba(255,255,255,.3); margin:0 6px; }
  #navbar .nav-right a { color:#D9E7F1; text-decoration:none; padding:4px 8px; border-radius:3px; cursor:pointer; }
  #navbar .nav-right a:hover { background:rgba(255,255,255,.15); color:#fff; }
  #navbar .nav-right .user { color:#FFD24D; margin-right:4px; }

  /* ===== 面包屑 ===== */
  #crumb { position:fixed; top:45px; left:0; right:0; height:36px; background:#F5F5F5; border-bottom:1px solid #DDD; box-shadow:0 2px 3px rgba(0,0,0,.06); z-index:190; display:flex; align-items:center; padding:0 16px; font-size:12.5px; color:var(--t2); }
  #crumb .fa { color:#C1CBD4; margin:0 6px; font-style:normal; }
  #crumb b { color:#555; font-weight:600; }
  #crumb .crumb-actions { margin-left:auto; display:flex; gap:8px; }

  /* ===== 侧边栏 ===== */
  #sidebar { position:fixed; top:81px; left:0; bottom:0; width:192px; background:var(--side-bg); border-right:1px solid var(--side-border); overflow-y:auto; z-index:150; padding-bottom:20px; }
  #sidebar::-webkit-scrollbar { width:5px; } #sidebar::-webkit-scrollbar-thumb { background:#C6CDD3; border-radius:3px; }
  .menu-group { border-bottom:1px solid var(--side-border); }
  .menu-group > .mg-title { display:flex; align-items:center; gap:8px; padding:10px 14px; font-size:13px; font-weight:600; color:#55606B; cursor:pointer; background:linear-gradient(to bottom,#F9FAFA,#F0F1F2); user-select:none; }
  .menu-group > .mg-title:hover { color:var(--link); }
  .menu-group > .mg-title .arrow { margin-left:auto; font-size:10px; color:#98A2AB; transition:transform .15s; }
  .menu-group.open > .mg-title .arrow { transform:rotate(90deg); }
  .menu-toggle { cursor:pointer; user-select:none; }
  .menu-toggle .caret { margin-left:auto; transition:transform .15s; font-size:10px; color:#98A2AB; }
  .menu-toggle.open .caret { transform:rotate(90deg); }
  .menu-sub { background:#EDF1F5; padding:4px 0; }
  .menu-sub.hidden { display:none; }
  .menu-item.sub { padding-left:34px !important; font-size:12.5px; color:#55606B; }
  .tab { padding:7px 18px; cursor:pointer; color:#7A8694; font-size:13px; border-bottom:2px solid transparent; margin-bottom:-2px; transition:all .15s; }
  .tab.on { color:#265D8D; border-bottom-color:#478FCA; font-weight:600; background:#fff; }
  .menu-group .mg-body { display:none; }
  .menu-group.open .mg-body { display:block; }
  .menu-item { display:flex; align-items:center; gap:8px; padding:8px 14px 8px 30px; font-size:12.5px; color:#666F78; cursor:pointer; border-left:3px solid transparent; }
  .menu-item:hover { color:var(--link); background:#EFEFF0; }
  .menu-item.active { color:#fff; background:var(--primary); border-left-color:#2F6DA5; }
  .menu-item.active:hover { color:#fff; }
  .menu-item .mi-icon { width:16px; text-align:center; font-size:12px; opacity:.85; }

  /* ===== 主区域 ===== */
  #main { margin:81px 0 0 192px; padding:14px 16px 30px; min-height:calc(100vh - 81px); }
  /* 公式管理：隐藏左侧系统导航，腾出整行空间给公式页自己的左栏 */
  body.fm-full #sidebar { display:none; }
  body.fm-full #main { margin-left:0; }
  body.fm-full #crumb { left:0; }
  /* 销售制单：隐藏左侧导航，腾出整行给左中右三栏 */
  body.order-full #sidebar { display:none; }
  body.order-full #main { margin-left:0; }
  body.order-full #crumb { left:0; }
  /* ===== 三栏布局 ===== */
  .od3-layout { display:flex; gap:10px; align-items:flex-start; }
  .od3-colstack { display:flex; flex-direction:column; gap:10px; min-width:0; }
  .od3-colstack.od3-stack-left { width:330px; flex:0 0 330px; }
  .od3-colstack.od3-stack-right { flex:1; min-width:0; }
  .od3-colstack .od3-col-right { flex:0 0 auto; width:100%; }
  .od3-colstack .od3-col-left { width:100%; flex:0 0 auto; }
  .od3-col { background:#fff; border:1px solid #C5D0DC; border-radius:6px; box-shadow:0 1px 2px rgba(0,0,0,.05); }
  .od3-col-left { width:330px; }
  .od3-col-mid { width:302px; flex:0 0 302px; }
  .od3-col-right { flex:1; min-width:0; }
  .od3-phead { padding:8px 12px; color:#fff; font-size:13px; font-weight:600; display:flex; align-items:center; gap:8px; }
  .od3-phead.blue { background:linear-gradient(to bottom,#5A9AC9,#478FCA); }
  .od3-phead.teal { background:linear-gradient(to bottom,#3AC4B6,#2BA79A); }
  .od3-phead .tool { margin-left:auto; }
  .od3-phead .tool .btn { background:rgba(255,255,255,.22); color:#fff; border:none; }
  .od3-phead .tool .btn:hover { background:rgba(255,255,255,.35); }
  .od3-pbody { padding:10px 12px; }
  .od3-field { margin-bottom:10px; display:flex; align-items:center; gap:8px; }
  .od3-field > label { flex:0 0 92px; display:block; font-size:12px; color:#4A5A6A; font-weight:600; text-align:left; line-height:1.3; }
  .od3-field > label small { font-weight:400; color:#93A1AE; }
  .od3-field .note { color:#93A1AE; font-weight:400; font-size:11px; }
  .od3-field .flex-r { flex:1; }
  .od3-field > .combo, .od3-field > .chips { flex:1; min-width:0; }
  .od3-field input[type=text], .od3-field input[type=number], .od3-field input[type=date], .od3-field select, .od3-field textarea {
    width:100%; box-sizing:border-box; height:30px; border:1px solid #C8CDD3; border-radius:3px; padding:0 7px; font-size:12.5px; outline:none; background:#fff; color:#1F2D3D;
  }
  .od3-field textarea { height:auto; resize:vertical; min-height:46px; padding:5px 7px; }
  .od3-field input:focus, .od3-field select:focus, .od3-field textarea:focus { border-color:#478FCA; box-shadow:0 0 0 2px rgba(71,143,202,.1); }
  .od3-field .chk { flex:1; display:flex; align-items:center; gap:6px; cursor:pointer; font-weight:500; }
  .od3-field .chk input { width:auto; height:auto; }
  .od3-meta { font-size:11.5px; color:#5C7080; background:#F4F7FA; border:1px solid #E4E9EF; border-radius:3px; padding:5px 8px; margin:4px 0 10px; line-height:1.5; }
  .od3-params { border:1px solid #E4E9EF; border-radius:4px; overflow:hidden; margin-bottom:12px; }
  .od3-param { display:flex; align-items:center; border-bottom:1px solid #EEF1F4; }
  .od3-param:last-child { border-bottom:none; }
  .od3-param .pl { flex:0 0 82px; background:#F7FAFD; padding:7px 8px; font-size:12px; color:#33424F; font-weight:600; }
  .od3-param .pv { flex:1; padding:4px 6px; }
  .od3-param .pv input, .od3-param .pv select { width:100%; box-sizing:border-box; height:28px; border:1px solid transparent; border-radius:3px; padding:0 7px; font-size:12.5px; outline:none; background:transparent; }
  .od3-param .pv input:focus, .od3-param .pv select:focus { border-color:#478FCA; background:#fff; box-shadow:none; }
  .od3-param .pv .dup { color:#D97706; font-size:11px; }
  /* 下单入口结构条分组（外框/框内/玻璃）：整组卡片 + 条头（条名+结构选项下拉） + 参数体 */
  .od3-struct { border:1px solid #E1E8F0; border-radius:5px; margin-bottom:10px; overflow:hidden; }
  .od3-struct:last-child { margin-bottom:0; }
  .od3-st-head { display:flex; align-items:center; gap:8px; padding:7px 10px; background:linear-gradient(to bottom,#F0F5FA,#E5EDF5); border-bottom:1px solid #DCE5EE; }
  .od3-st-name { font-size:12.5px; font-weight:700; color:#2C4760; }
  .od3-st-val { height:25px; min-width:130px; border:1px solid #C5D0DC; border-radius:3px; padding:0 6px; font-size:12px; outline:none; background:#fff; color:#1F2D3D; }
  .od3-st-body { background:#fff; }
  .od3-st-empty { padding:8px 12px; font-size:11.5px; color:#93A1AE; }
  /* 右栏页签 */
  .od3-tabs { display:flex; gap:4px; margin-bottom:8px; background:#fff; border:1px solid #C5D0DC; border-radius:6px 6px 0 0; border-bottom:none; padding:6px 8px 0; }
  .od3-tabs button { flex:1; padding:8px 6px; border:1px solid #D5DCE3; border-bottom:none; background:#F4F6F8; color:#4A5A6A; font-size:12.5px; cursor:pointer; border-radius:5px 5px 0 0; }
  .od3-tabs button.on { background:linear-gradient(to bottom,#5A9AC9,#478FCA); color:#fff; font-weight:600; border-color:#478FCA; }
  .tab-pane { display:none; }
  .tab-pane.on { display:block; }
  .od3-calc { margin:0; }
  .od3-calc th { background:#2C3E50; color:#fff; }
  .od3-calc td { font-size:12.5px; }
  .od3-calc td input, .od3-calc td select { width:100%; box-sizing:border-box; height:26px; border:1px solid #E4E9EF; border-radius:3px; padding:0 6px; font-size:12.5px; outline:none; }
  .od3-calc .num { text-align:right; font-variant-numeric:tabular-nums; }
  .od3-calc td input.od3-disc { width:52px; text-align:center; margin:0 auto; display:block; color:#265D8D; font-weight:600; }
  .od3-calc td.input-disc { text-align:center; }
  .od3-summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; padding:8px 12px; background:#F8F9FA; border-top:1px solid #DDE2E6; font-size:12px; color:#33424F; }
  .od3-summary b { color:#C04D3A; }
  .od3-summary input { width:56px; height:24px; border:1px solid #C8CDD3; border-radius:3px; padding:0 5px; font-size:12px; }
  .od3-markup { border-top:1px solid #DDE2E6; }
  .od3-muhead { padding:6px 12px; background:linear-gradient(to bottom,#F8F9FA,#EEF0F2); border-bottom:1px solid #DDE2E6; font-size:12px; font-weight:600; color:#265D8D; }
  .od3-murow { display:flex; align-items:center; gap:8px; padding:6px 12px; flex-wrap:nowrap; }
  .od3-murow input { height:26px; border:1px solid #C8CDD3; border-radius:3px; padding:0 6px; font-size:12px; }
  .od3-murow input.mu-content { width:150px; }
  .od3-murow input.mu-amount { width:160px; }
  .od3-murow select.mu-unit { height:26px; border:1px solid #C8CDD3; border-radius:3px; font-size:12px; color:#4A5A6A; }
  .od3-murow .mu-del { cursor:pointer; color:#C0392B; font-weight:700; font-size:13px; padding:0 4px; user-select:none; }
  .od3-murow .mu-del:hover { color:#A93226; }
  .od3-murow.od3-mu-empty { color:#93A1AE; font-size:12px; }
  .od3-muaddbar { padding:0 12px 9px; }
  .od3-mu-add { height:24px; padding:0 10px; border:1px dashed #478FCA; color:#478FCA; background:#F4F9FD; border-radius:3px; cursor:pointer; font-size:12px; }
  .od3-mu-add:hover { background:#E7F1FB; }
  /* —— 公式区 勾选/分享复制 —— */
  .fm-selbtn { border:1px solid #478FCA !important; color:#478FCA !important; background:#fff !important; }
  .fm-selbtn.on { background:#478FCA !important; color:#fff !important; border-color:#478FCA !important; }
  .fm-sharebtn { border:1px solid #E8A33D !important; color:#C77F1A !important; background:#fff !important; }
  .fm-chk { display:inline-flex; align-items:center; margin-right:6px; }
  .fm-chk input { width:15px; height:15px; cursor:pointer; }
  .of-row .fm-chk { flex:0 0 auto; }
  tr.fm-selrow, .of-row.fm-selrow, .fvm-card.fm-selrow { outline:2px solid #478FCA; outline-offset:-2px; }
  /* —— 分享复制弹窗 —— */
  #shModal .modal-box { width:860px; max-width:94vw; }
  .sh-tree { max-height:52vh; overflow:auto; padding:6px 2px; }
  .sh-cat { border:1px solid #E4EAF2; border-radius:6px; margin-bottom:10px; overflow:hidden; }
  .sh-cat > .sh-catname { display:flex; align-items:center; gap:6px; padding:8px 12px; background:#F4F8FC; font-size:13px; font-weight:600; color:#265D8D; cursor:pointer; user-select:none; }
  .sh-sub { display:flex; align-items:center; gap:10px; padding:7px 12px; border-top:1px dashed #E8EEF4; flex-wrap:wrap; }
  .sh-sub .sh-subname { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; color:#3A5468; flex:0 0 auto; user-select:none; }
  .sh-styles { display:flex; gap:6px 16px; flex-wrap:wrap; flex:1; }
  .sh-styles label { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:#4A5A6A; cursor:pointer; user-select:none; }
  .sh-styles label .sh-nd { color:#B3BEC8; font-size:11px; }
  .sh-styles label input, .sh-subname input, .sh-catname input { width:15px; height:15px; cursor:pointer; }
  .sh-specbar { margin:12px 14px 4px; }
  .sh-specbar label { display:flex; align-items:center; gap:8px; font-size:12.5px; color:#3A5468; }
  .sh-specbar select { flex:1; height:30px; border:1px solid #C8CDD3; border-radius:4px; padding:0 6px; font-size:12.5px; }
  .od3-placeholder { color:#93A1AE; font-size:12.5px; padding:20px; text-align:center; line-height:1.7; }
  /* 底部区：特殊加工要求 + 公式用（作为右侧列内堆叠卡片，不受中间列高度影响） */
  .od3-bt-main { display:flex; gap:10px; min-width:0; align-items:stretch; }
  .od3-bt-main .bt-special { flex:1; min-width:0; display:flex; flex-direction:column; }
  .od3-bt-main .od3-bt-img { flex:1.3; min-width:0; display:flex; flex-direction:column; }
  .od3-bt-main .od3-col { min-height:400px; }
  .od3-bt-main .bt-special .od3-pbody { display:flex; flex-direction:column; flex:1; }
  .od3-bt-main .bt-special textarea { flex:1; min-height:350px; }
  .od3-bt-main .od3-bt-img .od3-pbody { display:flex; flex-direction:column; flex:1; }
  .od3-stack { display:flex; gap:10px; margin-top:10px; flex-wrap:wrap; }
  .od3-stack > div { flex:1; min-width:270px; }
  .od3-tagrow { display:flex; gap:4px; margin-bottom:6px; }
  .od3-tagrow .tag { flex:1; text-align:center; padding:5px 4px; font-size:11.5px; border:1px solid #D5DCE3; border-radius:3px; cursor:pointer; background:#fff; color:#33424F; }
  .od3-tagrow .tag.on { background:#478FCA; color:#fff; border-color:#478FCA; }
  .od3-formula-img { border:1px dashed #C4CDD5; background:#FAFBFC; min-height:180px; display:flex; align-items:center; justify-content:center; color:#93A1AE; font-size:12px; position:relative; overflow:hidden; border-radius:4px; }
  .od3-formula-img img { width:100%; height:auto; display:block; }
  .od3-img-actions { display:flex; gap:6px; margin-top:6px; }
  .od3-img-actions button { flex:1; height:27px; font-size:11.5px; }
  .od3-prodinfo { font-size:12px; color:#33424F; margin-top:6px; line-height:1.6; }
  .od3-prodinfo b { color:#265D8D; }
  /* 操作条 */
  .od3-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; margin-top:12px; flex-wrap:nowrap; }
  .od3-actions .hint { font-size:11.5px; color:#93A1AE; }
  .od3-actions .spacer { flex:1; }
  .od3-btn-ai { background:linear-gradient(to bottom,#E15C4A,#C94B38); color:#fff; border:none; padding:9px 22px; font-size:13.5px; border-radius:4px; cursor:pointer; font-weight:600; }
  .od3-btn-ai:hover { filter:brightness(95%); }
  .od3-btn-save { background:linear-gradient(to bottom,#3AC4B6,#2BA79A); color:#fff; border:none; padding:9px 22px; font-size:13.5px; border-radius:4px; cursor:pointer; font-weight:600; }
  .od3-btn-save:hover { filter:brightness(95%); }
  .od3-btn-calc { background:linear-gradient(to bottom,#4A90E2,#3A78C8); color:#fff; border:none; padding:9px 22px; font-size:13.5px; border-radius:4px; cursor:pointer; font-weight:600; margin-left:auto; }
  .od3-btn-calc:hover { filter:brightness(95%); }
  /* 已下订单（本总订单）抽屉 */
  .od3-drawer-mask { position:fixed; inset:0; background:rgba(18,32,48,.45); z-index:300; opacity:0; pointer-events:none; transition:opacity .25s ease; }
  .od3-drawer-mask.open { opacity:1; pointer-events:auto; }
  .od3-drawer { position:fixed; top:0; right:0; bottom:0; width:440px; max-width:94vw; background:#F5F6F7; border-left:1px solid #C5D0DC; box-shadow:-6px 0 22px rgba(0,0,0,.22); z-index:310; transform:translateX(105%); transition:transform .28s ease; display:flex; flex-direction:column; }
  .od3-drawer.open { transform:translateX(0); }
  .od3-drawer .od3-phead { flex:0 0 auto; border-radius:0; }
  .od3-drawer .od3-phead .tool { display:flex; align-items:center; gap:6px; }
  .od3-drawer .od3-phead .tool .btn { background:rgba(255,255,255,.22); color:#fff; border:none; line-height:1; }
  .od3-drawer .od3-pbody { flex:1; min-height:0; overflow:auto; padding:10px; }
  .od3-drawer #recentOrdersBox { flex:1; min-height:0; }
  /* 公式页左右分栏 */
  .fm-layout { display:flex; gap:12px; align-items:flex-start; }
  .fm-left { width:420px; flex:0 0 420px; background:#fff; border:1px solid #D5DCE3; border-radius:6px; overflow:hidden; position:sticky; top:92px; }
  .fm-left .fm-left-head { padding:8px 12px; background:linear-gradient(to bottom,#5A9AC9,#478FCA); color:#fff; font-size:13px; font-weight:600; display:flex; align-items:center; gap:6px; }
  .fm-left .fm-left-head small { font-weight:400; opacity:.85; font-size:11px; margin-left:auto; }
  .of-row { display:flex; align-items:center; gap:6px; padding:6px 8px; border-bottom:1px solid #EEF1F4; cursor:pointer; }
  .of-row.sel { background:#EAF3FA; }
  .of-tag { flex:0 0 auto; white-space:nowrap; font-size:11px; color:#8A97A5; }
  .of-row .of-name { flex:2.2; min-width:0; box-sizing:border-box; height:27px; border:1px solid #C8CDD3; padding:0 6px; font-size:12px; outline:none; }
  .of-row .of-name:focus { border-color:#478FCA; }
  .of-row .of-val { flex:3; min-width:0; box-sizing:border-box; height:27px; border:1px solid #C8CDD3; padding:0 6px; font-size:12px; outline:none; }
  .of-row .of-val:focus { border-color:#478FCA; }
  .of-empty { padding:14px; color:#B3BEC8; font-size:12px; text-align:center; }

  /* 结构条（下单参数分组容器：外框/框内/玻璃等） */
  .of-struct { border:1px solid #D9E2EC; border-radius:6px; margin:0 8px 8px; overflow:hidden; background:#fff; }
  .of-struct.sel { outline:2px solid #478FCA; outline-offset:-1px; }
  .of-struct .of-st-name { flex:0 0 auto; }
  .of-struct .of-st-name input { height:26px; min-width:120px; border:1px solid #C8CDD3; border-radius:3px; padding:0 6px; font-size:12.5px; outline:none; }
  .of-struct .of-st-name input:focus { border-color:#478FCA; }
  .of-st-strip { display:flex; align-items:center; gap:8px; padding:7px 9px; background:linear-gradient(to bottom,#F0F5FA,#E5EDF5); border-bottom:1px solid #D9E2EC; }
  .of-st-strip .of-gear { cursor:pointer; color:#7A8B9B; font-size:12px; padding:0 2px; }
  .of-st-strip .of-gear:hover { color:#478FCA; }
  .of-struct .of-st-val { height:26px; min-width:150px; border:1px solid #C5D0DC; border-radius:3px; padding:0 6px; font-size:12.5px; outline:none; background:#fff; color:#1F2D3D; }
  .of-st-act { margin-left:auto; display:flex; gap:6px; align-items:center; font-size:12px; }
  .of-st-act a { color:#478FCA; cursor:pointer; text-decoration:none; padding:0 2px; }
  .of-st-act a:hover { color:#2E6EA6; }
  .of-st-empty { padding:8px 12px; font-size:11.5px; color:#93A1AE; }
  .of-struct .of-row { border-bottom-color:#EEF1F4; }

  /* 结构条-结构选项与增删控件 */
  .of-cond-add { color:#478FCA; cursor:pointer; font-size:12px; padding:0 2px; white-space:nowrap; }
  .of-cond-add:hover { color:#2E6EA6; }
  .of-struct .of-row-del { color:#C04D3A; cursor:pointer; font-size:12px; padding:0 2px; flex:0 0 auto; opacity:.55; text-decoration:none; }
  .of-struct .of-row-del:hover { opacity:1; color:#8E2F22; }
  .of-st-body { background:#fff; }
  .of-st-cond-addbar { padding:4px 9px; }
  .of-st-cond-addbar a { color:#3C82B8; cursor:pointer; font-size:11.5px; text-decoration:none; }
  .of-st-cond-addbar a:hover { color:#2E6EA6; text-decoration:underline; }

  /* 选择列表弹窗（新格尔式：修改选择列表） */
  .ofdlg-tip { color:#8A94A0; font-size:12px; margin-bottom:10px; }
  .ofdlg-row { display:flex; align-items:center; gap:8px; margin:0 0 10px; }
  .ofdlg-row label { font-size:13px; color:#444; min-width:70px; }
  .ofdlg-row input { flex:1; height:28px; border:1px solid #C8CDD3; border-radius:3px; padding:0 8px; font-size:13px; outline:none; }
  .ofdlg-row input:focus { border-color:#4A90C2; }
  .ofdlg-tip2 { color:#8A94A0; font-size:12px; margin:0 0 10px; line-height:1.6; }
  .ofdlg-tb { width:100%; border-collapse:collapse; table-layout:fixed; }
  .ofdlg-tb th { background:#2C3E50; color:#fff; font-weight:500; font-size:12px; padding:7px 8px; text-align:left; border:1px solid #2C3E50; }
  .ofdlg-tb td { border:1px solid #E4E9EF; padding:4px 6px; vertical-align:middle; }
  .ofdlg-tb td input { width:100%; box-sizing:border-box; height:26px; border:1px solid #E4E9EF; border-radius:3px; padding:0 6px; font-size:12px; outline:none; }
  .ofdlg-tb td input:focus { border-color:#4A90C2; }
  .ofdlg-sort { display:flex; gap:2px; align-items:center; justify-content:center; }
  .ofdlg-sort span { cursor:pointer; color:#3498DB; font-size:9px; padding:2px; border:1px solid #E4E9EF; border-radius:3px; line-height:1; }
  .ofdlg-sort span:hover { background:#EAF2FB; }
  .ofdlg-del { color:#E74C3C; cursor:pointer; font-size:12px; }
  .ofdlg-empty { text-align:center; color:#93A1AE; font-size:12px; padding:14px !important; }
  .ofdlg-adds { display:flex; gap:18px; margin:9px 0; }
  .ofdlg-adds a { color:#3498DB; cursor:pointer; font-size:13px; text-decoration:none; }
  .ofdlg-flags { display:flex; gap:20px; margin:4px 0 2px; flex-wrap:wrap; }
  .ofdlg-flags label { font-size:13px; color:#444; display:flex; align-items:center; gap:5px; cursor:pointer; }
  .ofdlg-flags input { margin:0; }
  .ofdlg-btn { padding:7px 28px; font-size:13px; border-radius:4px; border:1px solid #C8CDD3; background:#fff; color:#333; cursor:pointer; }
  .ofdlg-btn:hover { background:#F5F7FA; }
  .ofdlg-btn.primary { background:#1ABC9C; border-color:#1ABC9C; color:#fff; }
  .ofdlg-btn.primary:hover { background:#17A689; }
  /* 变量区：卡片流式换行布局（右侧有位置就放右侧，铺满一行再往下放） */
  #fmvars { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-start; }
  .fvm-card { position:relative; flex:0 0 auto; width:320px; max-width:100%; box-sizing:border-box; }
  /* 卡片右边缘拖拽手柄：可左右伸缩卡片宽度 */
  .fvm-resize { position:absolute; right:0; top:0; bottom:0; width:12px; cursor:ew-resize; z-index:6; display:flex; align-items:center; justify-content:center; }
  .fvm-resize::before { content:""; width:3px; height:30px; border-radius:2px; background:#C9D4DE; opacity:0; transition:opacity .15s; }
  .fvm-card:hover .fvm-resize::before { opacity:1; }
  .fvm-resize:hover::before { background:#478FCA; }
  .fvm-resize.active { background:rgba(71,143,202,.06); }
  .fvm-resize.active::before { background:#478FCA; opacity:1; }
  .fvm-head { display:flex; align-items:center; gap:8px; padding:6px 10px; background:linear-gradient(to bottom,#F5F8FB,#EAF0F6); border-bottom:1px solid #DCE5EF; }
  .fvm-num { width:20px; height:20px; border-radius:3px; background:linear-gradient(to bottom,#5A9AC9,#478FCA); color:#fff; font-size:11.5px; font-weight:700; display:flex; align-items:center; justify-content:center; flex:0 0 20px; }
  .fvm-name { flex:1; min-width:0; height:26px; border:1px solid #C8CDD3; padding:0 6px; font-size:12.5px; font-weight:600; outline:none; box-sizing:border-box; }
  .fvm-name:focus { border-color:#478FCA; }
  .fvm-test { font-size:11.5px; color:#1565C0; white-space:nowrap; }
  .fvm-op { cursor:pointer; color:#C0392B; font-size:14px; padding:0 2px; }
  .fvm-cols { display:flex; gap:6px; padding:4px 10px; background:#F4F7FA; border-bottom:1px solid #EEF1F4; font-size:11px; color:#5C7080; }
  .fvm-cols .c1 { flex:1.15; } .fvm-cols .c2 { flex:0 0 16px; text-align:center; } .fvm-cols .c3 { flex:1.25; }
  .fvm-row { display:flex; gap:6px; align-items:center; padding:4px 10px; }
  .fvm-row:nth-child(even) { background:#FBFCFE; }
  .fvm-row .fvm-cond { flex:1.15; min-width:0; height:26px; border:1px solid #C8CDD3; padding:0 6px; font-size:12px; outline:none; box-sizing:border-box; }
  .fvm-row .fvm-val { flex:1.25; min-width:0; height:26px; border:1px solid #C8CDD3; padding:0 6px; font-size:12px; outline:none; box-sizing:border-box; }
  .fvm-row .fvm-cond:focus, .fvm-row .fvm-val:focus { border-color:#478FCA; }
  .fvm-row .fvm-eq { color:#93A1AE; font-size:12px; flex:0 0 12px; text-align:center; }
  .fvm-row .fvm-x { cursor:pointer; color:#C0392B; font-size:14px; line-height:1; flex:0 0 14px; }
  .fvm-rowempty { padding:8px 10px; color:#B3BEC8; font-size:12px; }
  .fvm-foot { display:flex; gap:12px; padding:6px 10px; border-top:1px solid #EEF1F4; background:#FBFCFE; }
  .fvm-foot a { cursor:pointer; font-size:12px; color:#478FCA; }
  .fvm-foot a.del { color:#C0392B; margin-left:auto; }
  .fvm-empty { color:#B3BEC8; font-size:12.5px; text-align:center; padding:20px; background:#fff; border:1px solid #E4EAF2; border-radius:6px; }
  /* 变量表卡片：紧凑一行展示，右上角 ≡ 编辑弹出卡片编辑（同一 vartabId 的多变量合并为一张表） */
  .fvm-table { padding:0; }
  .fvm-compact { display:flex; align-items:center; gap:8px; padding:6px 10px; background:linear-gradient(to bottom,#F5F8FB,#EAF0F6); }
  .fvm-tlabel { color:#478FCA; font-size:11px; font-weight:700; white-space:nowrap; flex:0 0 auto; }
  .fvm-tcnt { font-style:normal; color:#93A1AE; font-weight:400; font-size:10.5px; margin-left:4px; }
  .fvm-compact-names { flex:1; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:12.5px; color:#1F2D3D; padding:0 4px; }
  .fvm-compact-edit { flex:0 0 auto; width:26px; height:24px; display:flex; align-items:center; justify-content:center; background:#478FCA; color:#fff; border-radius:3px; cursor:pointer; font-size:15px; font-weight:700; line-height:1; }
  .fvm-compact-edit:hover { background:#3A78B4; }
  .fvm-compact-del { flex:0 0 auto; width:24px; height:24px; display:flex; align-items:center; justify-content:center; color:#C0392B; border-radius:3px; cursor:pointer; font-size:14px; line-height:1; }
  .fvm-compact-del:hover { background:#FCE8E8; }
  .fvm-menu-dim { position:fixed; top:0; left:0; right:0; bottom:0; z-index:900; }
  .fvm-menu { position:fixed; z-index:901; min-width:138px; background:#fff; border:1px solid #D5DBE2; border-radius:6px; box-shadow:0 6px 18px rgba(0,0,0,.25); padding:4px 0; }
  .fvm-menu-it { display:flex; align-items:center; gap:8px; padding:7px 14px; font-size:12.5px; color:#1F2D3D; cursor:pointer; white-space:nowrap; }
  .fvm-menu-it:hover { background:#F0F6FC; color:#1565C0; }
  .fvm-menu-it.danger { color:#C0392B; }
  .fvm-menu-it.danger:hover { background:#FCE8E8; color:#C0392B; }
  .fvm-menu-sep { height:1px; background:#E7EBF0; margin:4px 0; }
  .fvm-pick-mask { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.35); z-index:505; display:flex; align-items:center; justify-content:center; padding:32px; }
  .fvm-pick { background:#fff; border-radius:8px; box-shadow:0 10px 30px rgba(0,0,0,.25); min-width:320px; max-width:520px; max-height:60vh; display:flex; flex-direction:column; overflow:hidden; }
  .fvm-pick-x { width:26px; height:26px; display:flex; align-items:center; justify-content:center; color:#6C7A89; cursor:pointer; font-size:17px; line-height:1; }
  .fvm-pick-x:hover { color:#2C3E50; background:#F0F6FC; border-radius:4px; }
  .fvm-pick-body { flex:1; overflow:auto; padding:4px 0; }
  .fvm-pick-it { padding:8px 14px; font-size:12.5px; color:#1F2D3D; cursor:pointer; }
  .fvm-pick-it:hover { background:#F0F6FC; color:#1565C0; }
  .fvm-pick-empty { padding:12px 14px; color:#93A1AE; font-size:12.5px; text-align:center; }
  /* 构件公式区：表格行内编辑（每格可直接填写） */
  .fmr-inp { width:100%; box-sizing:border-box; height:26px; border:1px solid #E0E6ED; background:#fff; padding:0 6px; font-size:12.5px; outline:none; border-radius:2px; color:#1F2D3D; }
  .fmr-inp:hover { border-color:#C4CDD5; }
  .fmr-inp:focus { border-color:#478FCA; box-shadow:0 0 0 2px rgba(71,143,202,.12); }
  .fmr-inp.mono { font-family:Consolas,'Courier New',monospace; color:#6A3B2F; }
  .fmr-sel { width:100%; box-sizing:border-box; height:26px; border:1px solid #E0E6ED; background:#fff; font-size:12.5px; outline:none; border-radius:2px; color:#1F2D3D; padding:0 2px; }
  .fmr-sel:hover { border-color:#C4CDD5; }
  .fmr-sel:focus { border-color:#478FCA; box-shadow:0 0 0 2px rgba(71,143,202,.12); }
  /* 构件公式区：列宽拖拽调整 */
  #fmtbl th { position:relative; }
  #fmtbl .fm-colres { position:absolute; top:0; right:-3px; bottom:0; width:7px; cursor:col-resize; z-index:6; user-select:none; }
  #fmtbl .fm-colres::after { content:''; position:absolute; top:0; bottom:0; left:3px; width:1px; background:transparent; transition:background .15s; }
  #fmtbl .fm-colres:hover::after, #fmtbl .fm-colres.active::after { background:#478FCA; }
  /* 构件公式区：自适应列宽（表头不换行、列宽随内容自适应，仅对需要可读性的列设最小宽下限） */
  #fmtbl { table-layout:auto; }
  #fmtbl th.fm-th { padding:7px 10px; border:1px solid #DEE7F0; text-align:left; white-space:nowrap; }
  #fmtbl td.fmr-td { border:1px solid #EEF1F4; padding:5px 6px; }
  #fmtbl td.fmr-idx { color:#93A1AE; text-align:center; padding:6px 6px; white-space:nowrap; }
  #fmtbl td.fmr-test { color:#1565C0; font-family:Consolas,monospace; font-size:11.5px; padding:6px 8px; min-width:80px; white-space:nowrap; }
  #fmtbl td.fmr-act { white-space:nowrap; }
  #fmtbl tr.fmr-on { background:#EAF4FD; } /* 构件公式区：点击序号选中的行（供复制行）高亮 */
  #fmtbl tr.fmr-on td { color:#1F2D3D; }
  /* 添加变量表弹窗：行=条件，列=变量 */
  #fvtTb { border-collapse:separate; border-spacing:0; }
  #fvtTb th { background:#3A5A8A; color:#fff; font-weight:600; text-align:center; padding:9px 10px; border:none; border-right:1px solid #33507C; border-bottom:1px solid #33507C; font-size:12.5px; min-width:110px; position:sticky; }
  #fvtTb th.fvt-cond { text-align:left; width:150px; min-width:150px; cursor:pointer; position:sticky; left:0; z-index:11; border-left:1px solid #33507C; }
  #fvtTb th.fvt-var { cursor:pointer; }
  #fvtTb th.sel { background:#2C4770; box-shadow:inset 0 0 0 2px rgba(255,255,255,.35); }
  #fvtTb th .pen { margin-left:5px; font-size:11px; opacity:.85; cursor:pointer; }
  #fvtTb th .pen:hover { opacity:1; }
  #fvtTb td { border:none; border-right:1px solid #E0E4E9; border-bottom:1px solid #E0E4E9; padding:0; }
  #fvtTb td .fvt-cin { width:100%; box-sizing:border-box; height:32px; border:none; padding:0 8px; font-size:12.5px; outline:none; text-align:left; background:transparent; }
  #fvtTb td .fvt-vin { width:100%; box-sizing:border-box; height:32px; border:none; padding:0 8px; font-size:12.5px; outline:none; text-align:center; background:transparent; }
  #fvtTb td .fvt-vin:focus, #fvtTb td .fvt-cin:focus { box-shadow:inset 0 0 0 2px #478FCA; }
  /* 条件列：横向滚动时锁定在左侧（sticky），背景需不透明 */
  #fvtTb tr.fvt-row td:first-child { position:sticky; left:0; z-index:6; background:#fff; border-left:1px solid #E0E4E9; }
  #fvtTb tr.fvt-row.sel td:first-child { background:#F0F6FC; }
  #fvtTb tr.fvt-row td:first-child.selcol { background:#E3EDF9; }
  #fvtTb tr.fvt-row.sel td:first-child.slot { background:#CDE2F6; box-shadow:inset 0 0 0 2px #478FCA; }
  #fvtTb tr.sel td { background:#F0F6FC; }
  #fvtTb tr.sel td .fvt-vin, #fvtTb tr.sel td .fvt-cin { background:transparent; }
  #fvtTb td.selcol { background:#E3EDF9; }
  #fvtTb td.selcol .fvt-vin, #fvtTb td.selcol .fvt-cin { background:transparent; }
  #fvtTb tr.sel td.slot { background:#CDE2F6; box-shadow:inset 0 0 0 2px #478FCA; }
  #fvtTb th .fvt-ne { width:90px; box-sizing:border-box; height:24px; border:1px solid #fff; background:#fff; color:#1F2D3D; font-size:12.5px; text-align:center; outline:none; border-radius:2px; }
  /* 多变量表：表头列宽拖拽把手 */
  #fvtTb .fvt-colres { position:absolute; top:0; right:-3px; width:7px; height:100%; cursor:col-resize; z-index:5; user-select:none; }
  #fvtTb .fvt-colres:hover { background:rgba(255,255,255,.45); }
  /* 多变量表：卡片右下角缩放把手 */
  .fvt-resize { position:absolute; right:2px; bottom:2px; width:16px; height:16px; cursor:nwse-resize; opacity:.5; z-index:20; }
  .fvt-resize::before { content:''; position:absolute; right:2px; bottom:2px; width:9px; height:9px; border-right:2px solid #5C7080; border-bottom:2px solid #5C7080; }
  .fvt-resize:hover { opacity:1; }
  /* 下单格式：行内下拉选项编辑器 */
  .of-row .of-gear { cursor:pointer; color:#93A1AE; font-size:11px; padding:0 2px; flex:0 0 auto; line-height:1; }
  .of-row .of-gear:hover { color:#478FCA; }
  .of-opts { padding:4px 10px 6px; background:#F7FAFD; border-bottom:1px solid #EEF1F4; }
  .of-opts .of-opts-inp { width:100%; box-sizing:border-box; height:26px; border:1px solid #C8CDD3; padding:0 6px; font-size:12px; outline:none; }
  .of-opts .of-opts-inp:focus { border-color:#478FCA; }
  .fm-of-toolbar { display:flex; gap:4px; padding:6px 8px; border-top:1px solid #EEF1F4; flex-wrap:wrap; }
  .fm-of-toolbar .tbtn { height:24px; padding:0 8px; font-size:11.5px; }
  .fm-img { padding:10px 12px; border-top:1px solid #EEF1F4; }
  .fm-img .fm-img-title { font-size:12.5px; font-weight:600; color:#265D8D; margin-bottom:6px; }
  .fm-img .fm-img-box { border:1px dashed #C4CDD5; background:#FAFBFC; min-height:150px; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#93A1AE; font-size:12px; gap:8px; border-radius:4px; position:relative; overflow:hidden; }
  .fm-img .fm-img-box img { width:100%; height:auto; display:block; }
  .fm-main { flex:1; min-width:0; }
  .page-header { margin-bottom:12px; padding-bottom:8px; border-bottom:1px solid #DDE2E6; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
  .page-header h1 { font-size:18px; color:#265D8D; font-weight:600; }
  .page-header .ph-actions { display:flex; gap:8px; }

  /* ===== Widget 盒子（Ace 风格）===== */
  .widget { background:#fff; border:1px solid #C5D0DC; margin-bottom:14px; box-shadow:0 1px 2px rgba(0,0,0,.05); width:100%; box-sizing:border-box; }
  .widget-header { padding:9px 14px; background:linear-gradient(to bottom,#F8F9FA,#EEF0F2); border-bottom:1px solid #DDE2E6; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
  .widget-header h3 { font-size:14px; color:#4C3A3A; font-weight:600; }
  .widget-header h3::before { content:""; display:inline-block; width:3px; height:13px; background:var(--primary); margin-right:8px; vertical-align:-1px; border-radius:2px; }
  .widget-header .wh-actions { display:flex; gap:8px; align-items:center; }
  .widget-body { padding:14px; }
  .widget-body.no-pad { padding:0; overflow-x:hidden; }

  /* ===== 表单 ===== */
  .form-row { display:flex; flex-wrap:wrap; gap:10px 16px; }
  .field { display:flex; flex-direction:column; gap:4px; }
  .field > label { font-size:12px; color:var(--t2); font-weight:600; }
  .field input, .field select, #draftBody td input, #draftBody td select { height:30px; border:1px solid #A8B4BF; border-radius:0; background:#fff; padding:0 8px; font-size:12.5px; color:var(--t1); outline:none; box-shadow:inset 0 1px 1px rgba(0,0,0,.04); }
  .field input:focus, .field select:focus { border-color:var(--link); box-shadow:0 0 0 2px rgba(71,143,202,.15); }
  /* 输入框提示文字（placeholder）统一调淡 */
  input::placeholder, textarea::placeholder { color:#C3CBD3; opacity:1; }
  input:focus::placeholder { color:#D5DBE1; }
  .field input[readonly] { background:#F0F0F0; color:#888; }
  .checkbox-line { display:flex; align-items:center; gap:5px; height:30px; font-size:12.5px; color:#555; }
  .checkbox-line input[type=checkbox] { width:14px; height:14px; vertical-align:-2px; cursor:pointer; }

  /* ===== 按钮（Ace 风格）===== */
  .btn { display:inline-flex; align-items:center; justify-content:center; height:30px; padding:0 14px; font-size:12.5px; border-radius:3px; border:1px solid #D4D4D4; cursor:pointer; background:linear-gradient(to bottom,#FCFCFC,#EDEDED); color:#5A6166; transition:all .12s; white-space:nowrap; }
  .btn:hover { background:linear-gradient(to bottom,#fff,#EAEAEA); border-color:#BFBFBF; }
  .btn:active { box-shadow:inset 0 2px 4px rgba(0,0,0,.1); }
  .btn.sm { height:26px; padding:0 10px; font-size:12px; }
  .btn.primary { background:linear-gradient(to bottom,#5A9AC9,#478FCA); border-color:#478FCA; color:#fff; }
  .btn.primary:hover { background:linear-gradient(to bottom,#66A5D3,#4E97D1); }
  .btn.success { background:linear-gradient(to bottom,#8FBB6D,#82AF6F); border-color:#82AF6F; color:#fff; }
  .btn.success:hover { background:linear-gradient(to bottom,#99C176,#8AB977); }
  .btn.danger { background:linear-gradient(to bottom,#DB7B69,#D15B47); border-color:#D15B47; color:#fff; }
  .btn.danger:hover { background:linear-gradient(to bottom,#E08877,#D96A57); }
  .btn.info { background:linear-gradient(to bottom,#70C8E2,#5BC0DE); border-color:#5BC0DE; color:#fff; }
  .btn-group { display:flex; gap:8px; }

  /* ===== 表格（全边框紧凑）===== */
  table.grid { width:100%; border-collapse:collapse; font-size:12.5px; }
  table.grid th, table.grid td { border:1px solid var(--grid); padding:6px 8px; }
  table.grid th { background:var(--th-bg); color:#58697A; font-weight:600; font-size:12px; text-align:left; white-space:nowrap; }
  table.grid tbody tr:nth-child(even) { background:#FAFBFC; }
  table.grid tbody tr:hover { background:#F2F7FC; }
  table.grid input, table.grid select { height:27px; border:1px solid #D5D5D5; border-radius:0; background:#fff; padding:0 5px; font-size:12px; color:var(--t1); width:100%; outline:none; }
  table.grid input:focus, table.grid select:focus { border-color:var(--link); }
  /* 隐藏 number 输入框的上下箭头 */
  input[type=number]::-webkit-inner-spin-button,
  input[type=number]::-webkit-outer-spin-button { -webkit-appearance:none; margin:0; }
  input[type=number] { -moz-appearance:textfield; appearance:textfield; }
  /* 规格参数：文本样式（无边框） */
  table.grid .dims input { width:54px; height:24px; border:0; background:transparent; box-shadow:none; padding:0 4px; text-align:center; color:var(--t1); }
  table.grid .dims input:hover { background:#F7F8FA; }
  table.grid .dims input:focus { background:#fff; box-shadow:inset 0 0 0 1px var(--link); }
  .num { text-align:right; }
  .dims { display:flex; align-items:center; gap:3px; color:var(--t3); font-size:11px; }
  .dims input { width:50px; }
  .qtycell { display:flex; align-items:center; gap:4px; }
  .qtycell input { width:46px; }
  .qtycell span { font-size:11px; color:var(--t2); white-space:nowrap; }

  /* ===== 链接 / 标签 ===== */
  .link { color:var(--link); cursor:pointer; margin-right:10px; white-space:nowrap; }
  .link:hover { text-decoration:underline; }
  .link.danger { color:var(--red); }
  .label { display:inline-block; padding:2px 8px; border-radius:3px; font-size:11.5px; font-weight:400; line-height:1.5; white-space:nowrap; }
  .label.amber { background:#FCF3E3; color:#B8860B; border:1px solid #F0D7A4; }
  .label.green { background:#EDF6E9; color:#63974C; border:1px solid #C3D9A8; }
  .label.blue  { background:#EAF3FA; color:#478FCA; border:1px solid #B9D7EF; }
  .label.gray  { background:#F2F2F2; color:#848484; border:1px solid #DDD; }
  .label.red   { background:#FBEDE9; color:#D15B47; border:1px solid #F0BFBA; }
  .label.purple{ background:#F0EFFA; color:#9490CE; border:1px solid #D5D4EC; }

  /* ===== KPI ===== */
  .kpi-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; margin-bottom:14px; }
  .kpi { background:#fff; border:1px solid #C5D0DC; box-shadow:0 1px 2px rgba(0,0,0,.05); padding:14px 16px; position:relative; overflow:hidden; }
  .kpi::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--primary); }
  .kpi.green::before { background:var(--green); } .kpi.amber::before { background:var(--amber); }
  .kpi.danger::before { background:var(--red); } .kpi.purple::before { background:var(--purple); }
  .kpi .label { border:none; background:transparent; padding:0; color:var(--t2); font-size:12px; font-weight:600; }
  .kpi .value { font-size:23px; font-weight:600; margin:5px 0 2px; color:#333; }
  .kpi .sub { font-size:11px; color:var(--t3); }

  /* ===== 图表 ===== */
  .charts-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(340px,1fr)); gap:12px; }

  /* ===== 筛选区 ===== */
  .filter-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px 14px; align-items:end; }
  .filter-grid .field input, .filter-grid .field select { width:100%; }

  /* ===== 组合框 / 多选 ===== */
  .combo { position:relative; }
  .combo-list { position:absolute; top:45px; left:0; right:0; background:#fff; border:1px solid #B9C4CE; border-radius:6px; box-shadow:0 8px 22px rgba(0,0,0,.18); max-height:380px; overflow-y:auto; z-index:200; }
  .combo-item { padding:8px 11px; font-size:12.5px; cursor:pointer; border-bottom:1px solid #F0F2F4; }
  .combo-item:hover { background:#F0F6FB; }
  .combo-item small { color:var(--t3); display:block; font-size:11px; }
  .mutiselect .ms-trigger { min-height:30px; border:1px solid #D5D5D5; background:#fff; padding:4px 8px; font-size:12px; cursor:pointer; display:flex; flex-wrap:wrap; gap:3px; align-items:center; }
  .mutiselect .ms-trigger .ms-tag { background:#EAF3FA; color:#478FCA; border:1px solid #B9D7EF; padding:0 6px; border-radius:2px; font-size:11px; }
  .mutiselect .ms-trigger .ms-placeholder { color:var(--t3); }
  .mutiselect .ms-panel { position:absolute; top:32px; left:0; right:0; background:#fff; border:1px solid #B9C4CE; box-shadow:0 6px 18px rgba(0,0,0,.15); max-height:240px; overflow:auto; z-index:120; padding:4px 0; }
  .mutiselect .ms-panel label { display:flex; align-items:center; gap:6px; padding:5px 12px; font-size:12px; cursor:pointer; }
  .mutiselect .ms-panel label:hover { background:#F0F6FB; }

  /* ===== 汇总条 / 提示 ===== */
  .summary-bar { display:flex; justify-content:space-between; align-items:center; margin-top:12px; padding-top:11px; border-top:1px dashed #C5D0DC; flex-wrap:wrap; gap:10px; }
  .summary-bar .total { font-size:12.5px; color:var(--t2); }
  .summary-bar .total b { color:#C04D3A; font-size:19px; margin-left:4px; font-family:Georgia,serif; }
  .note { font-size:11.5px; color:var(--t3); margin-top:7px; line-height:1.6; }
  .empty { padding:28px; text-align:center; color:var(--t3); font-size:12.5px; }
  .hidden { display:none !important; }
  .radio-line { display:flex; flex-direction:column; gap:3px; }
  .radio-line label { display:flex; align-items:center; gap:4px; font-size:12px; color:#555; cursor:pointer; }
  .radio-line label input { margin:0; }
  .chips { display:flex; gap:5px; align-items:center; height:30px; }
  .chip { height:25px; padding:0 11px; border-radius:2px; background:#F3F3F3; color:#666; font-size:12px; cursor:pointer; border:1px solid #D5D5D5; display:flex; align-items:center; white-space:nowrap; }
  .chip.on { background:#EAF3FA; color:var(--link); font-weight:600; border-color:var(--link); }
  .two-col { display:flex; gap:14px; align-items:flex-start; }
  .info-bar { background:#EAF3FA; border:1px solid #B9D7EF; color:#2F6DA5; border-radius:2px; padding:8px 12px; font-size:12px; margin-bottom:12px; line-height:1.6; }

  /* ===== 字典管理 ===== */
  .dicts-grid { display:block; }
  .dicts-toolbar { display:flex; align-items:center; gap:6px; padding:8px 10px; margin-bottom:12px; background:linear-gradient(to bottom,#F8FAFC,#EFF3F8); border:1px solid #C8CDD3; border-radius:3px; grid-column:1 / -1; }
  .dicts-toolbar input { flex:1; max-width:300px; height:28px; border:1px solid #C8CDD3; padding:0 8px; font-size:12px; outline:none; }
  .dicts-toolbar input:focus { border-color:var(--link); }
  .dict-head { display:flex; align-items:center; gap:4px; cursor:default; }
  .dict-head h3 { user-select:none; }
  .dict-head h3:hover { color:var(--link); }
  .dict-default-btn { display:inline-block; padding:0; width:22px; text-align:center; border:1px solid transparent; background:transparent; color:#93A1AE; font-size:11px; border-radius:3px; cursor:pointer; user-select:none; line-height:20px; margin:0 4px 0 0; flex-shrink:0; }
  .dict-default-btn:hover { background:#F0F0F0; color:#5C7080; }
  .dict-default-btn.active { background:#5A8F3F; border-color:transparent; color:#fff; }
  .dict-default-btn.active:hover { background:#6CA34A; color:#fff; }
  /* 字典表格样式 */
  .dicts-table { width:100%; table-layout:fixed; border-collapse:separate; border-spacing:0; background:#fff; border:1px solid #DDE2E6; border-radius:4px; overflow:hidden; }
  .dicts-table thead th { background:#F0F4F8; color:#265D8D; font-weight:600; font-size:12px; text-align:left; padding:8px 10px; border-bottom:1px solid #DDE2E6; white-space:nowrap; }
  .dicts-table tbody td { padding:8px 10px; font-size:12.5px; border-bottom:1px solid #F0F2F4; vertical-align:middle; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .dicts-table tbody td:nth-child(3) { white-space:normal; } /* 类型名称允许换行 */
  .dicts-table tbody tr.dict-type-row:hover { background:#FAFCFE; }
  .dicts-table tbody tr.dict-detail-row td { background:#FAFBFC; padding:8px 16px 14px; border-bottom:1px solid #DDE2E6; }
  .dict-style-tag { display:inline-block; padding:1px 8px; border-radius:3px; font-size:11px; line-height:1.6; }
  .dict-style-tag.tag-builtin { background:#FEF3E2; color:#B45309; border:1px solid #F0C68A; }
  .dict-style-tag.tag-user-fixed { background:#EAF3FA; color:#265D8D; border:1px solid #B9D7EF; }
  .dict-style-tag.tag-custom { background:#F0F9EB; color:#2A6B2F; border:1px solid #C8E6C9; }
  .dict-switch { display:inline-block; position:relative; width:32px; height:16px; cursor:pointer; }
  .dict-switch input { opacity:0; width:0; height:0; }
  .dict-switch span { position:absolute; inset:0; background:#C8CDD3; border-radius:8px; transition:.2s; }
  .dict-switch span::before { content:""; position:absolute; left:2px; top:2px; width:12px; height:12px; background:#fff; border-radius:50%; transition:.2s; }
  .dict-switch input:checked + span { background:#478FCA; }
  .dict-switch input:checked + span::before { transform:translateX(16px); }
  .dict-act-btn { display:inline-block; width:22px; height:22px; line-height:22px; text-align:center; border-radius:3px; cursor:pointer; font-size:13px; user-select:none; margin:0 1px; color:#fff; }
  .dict-act-btn.act-detail { background:#478FCA; }
  .dict-act-btn.act-edit { background:#F0AD4E; }
  .dict-act-btn.act-scope { background:#5A8F3F; }
  .dict-act-btn.act-del { background:#D15B47; }
  .dict-act-btn:hover { opacity:0.85; }
  .dicts-pager { display:flex; align-items:center; gap:6px; padding:8px 10px; margin-top:8px; background:#fff; border:1px solid #DDE2E6; border-radius:4px; }
  .p-btn { background:#fff; border:1px solid #C8CDD3; padding:3px 10px; cursor:pointer; font-size:12px; border-radius:3px; }
  .p-btn:hover:not(:disabled) { background:#EAF3FA; border-color:#478FCA; }
  .p-btn:disabled { color:#C8CDD3; cursor:not-allowed; }
  .p-current { background:#478FCA; color:#fff; padding:3px 10px; font-size:12px; border-radius:3px; }
  .dict-add { display:flex; gap:6px; margin-bottom:10px; }
  .dict-add input { flex:1; height:28px; border:1px solid #D5D5D5; padding:0 8px; font-size:12px; outline:none; }
  .dict-add input:focus { border-color:var(--link); }
  .dict-list .dl-row { display:flex; align-items:center; gap:6px; padding:4px 2px; border-bottom:1px solid #F0F2F4; }
  .dict-list .dl-row input { flex:1; min-width:0; height:26px; border:1px solid transparent; background:transparent; padding:0 4px; font-size:12.5px; color:var(--t1); outline:none; }
  .dict-list .dl-row input:hover { border-color:#E0E4E8; background:#FAFBFC; }
  .dict-list .dl-row input:focus { border-color:var(--link); background:#fff; }
  .dict-list .dl-row .dl-idx { color:#C1CBD4; font-size:11px; width:20px; text-align:right; }

  /* 明细表横向滚动 */
  .widget-body.scrollable { overflow-x:auto; width:100%; }
  .widget-body.scrollable table.grid { min-width:1560px; }

  /* ===== 页脚 ===== */
  #footer { text-align:center; color:#98A2AB; font-size:11.5px; padding:18px 0 6px; }

  /* ===== 打印 ===== */
  #printArea { display:none; }
  /* ===== 订单详情弹窗 ===== */
  .modal-mask { position:fixed; top:0; left:0; right:0; bottom:0; background:rgba(0,0,0,.45); z-index:500; display:flex; align-items:flex-start; justify-content:center; padding:32px; }
  .modal-box { background:#fff; border-radius:10px; box-shadow:0 12px 40px rgba(0,0,0,.25); width:100%; max-width:980px; max-height:calc(100vh - 64px); overflow:auto; }
  .modal-head { padding:14px 20px; background:linear-gradient(to bottom,#F8F9FA,#EEF0F2); border-bottom:1px solid #DDE2E6; display:flex; justify-content:space-between; align-items:center; }
  .modal-head h2 { font-size:15px; color:#265D8D; font-weight:600; }
  .modal-body { padding:18px 20px; }
  .modal-actions { display:flex; gap:8px; padding:12px 20px; border-top:1px solid #DDE2E6; background:#FAFBFC; }
  /* 范围配置：标签多选 */
  .dsm-section { background:#FAFBFC; border:1px solid #DDE2E6; border-radius:4px; padding:8px 10px; }
  .dsm-section-head { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
  .dsm-section-head > span:first-child { font-size:13px; font-weight:600; color:#265D8D; flex-shrink:0; min-width:80px; }
  .dsm-tip { font-size:11px; color:#93A1AE; flex:1; }
  .dsm-all { font-size:11.5px; color:#478FCA; cursor:pointer; user-select:none; }
  .dsm-all:hover { color:#265D8D; text-decoration:underline; }
  .dsm-tag-box { display:flex; flex-wrap:wrap; gap:6px; max-height:160px; overflow:auto; padding:2px; }
  .dsm-tag { display:inline-flex; align-items:center; gap:3px; padding:4px 10px; border:1px solid #C8CDD3; background:#fff; border-radius:3px; cursor:pointer; font-size:12px; color:#5C7080; user-select:none; transition:all .15s; line-height:1.4; }
  .dsm-tag:hover { border-color:#478FCA; color:#265D8D; }
  .dsm-tag.on { background:#478FCA; border-color:#265D8D; color:#fff; font-weight:600; }
  .dsm-tag .dsm-cat-mark { font-size:10px; opacity:0.7; padding:1px 4px; background:rgba(255,255,255,0.2); border-radius:2px; }
  .dsm-tag:not(.on) .dsm-cat-mark { background:#EEF2F6; color:#93A1AE; }
  .modal-close { font-size:18px; cursor:pointer; color:#888; padding:2px 6px; }
  .info-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px 16px; margin-bottom:14px; }
  .info-grid .ig-label { font-size:11px; color:#888; }
  .info-grid .ig-val { font-size:13px; color:#333; font-weight:500; }
  .pay-row td { padding:6px 8px !important; }

  /* ===== 款/套数 明细小卡片 ===== */
  .items-popover { position:absolute; background:#fff; border:1px solid #B9D7EF; border-radius:6px; box-shadow:0 8px 24px rgba(0,0,0,.18); z-index:400; width:900px; max-height:400px; overflow-x:hidden; overflow-y:auto; }
  .items-popover .ip-head { padding:7px 12px; background:linear-gradient(to bottom,#EAF3FA,#D8E8F5); border-bottom:1px solid #B9D7EF; font-size:12px; color:#2F6DA5; font-weight:600; display:flex; justify-content:space-between; align-items:center; }
  .items-popover .ip-head .ip-close { cursor:pointer; color:#2F6DA5; padding:0 4px; }
  .items-popover table { width:100%; border-collapse:collapse; font-size:11.5px; table-layout:fixed; }
  .items-popover th { background:#F4F8FB; color:#58697A; font-weight:500; padding:6px 6px; text-align:left; border-bottom:1px solid #DCE0E5; white-space:nowrap; }
  .items-popover td { padding:5px 6px; border-bottom:1px solid #F0F2F4; vertical-align:top; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .items-popover td.num { text-align:right; }
  .items-popover th:nth-child(1), .items-popover td:nth-child(1) { width:42px; }
  .items-popover th:nth-child(2), .items-popover td:nth-child(2) { width:90px; }
  .items-popover th:nth-child(3), .items-popover td:nth-child(3) { width:85px; }
  .items-popover th:nth-child(4), .items-popover td:nth-child(4) { width:155px; }
  .items-popover th:nth-child(5), .items-popover td:nth-child(5) { width:90px; }
  .items-popover th:nth-child(6), .items-popover td:nth-child(6) { width:75px; }
  .items-popover th:nth-child(7), .items-popover td:nth-child(7) { width:160px; }
  .items-popover th:nth-child(8), .items-popover td:nth-child(8) { width:48px; }
  .items-popover th:nth-child(9), .items-popover td:nth-child(9) { width:82px; }
  .items-popover th:nth-child(10), .items-popover td:nth-child(10) { width:88px; }

  /* ===== 打印布局配置页：预览区屏显模拟（复刻打印版式） ===== */
  #pcfgPreview { color:#222; font-size:12px; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  #pcfgPreview h1 { font-size:20px; text-align:center; margin-bottom:6px; font-weight:700; color:#265D8D; letter-spacing:3px; border-bottom:2px solid #478FCA; padding-bottom:5px; }
  #pcfgPreview .sub { text-align:center; color:#444; font-size:12px; margin-bottom:10px; }
  #pcfgPreview .p-info { display:flex; flex-wrap:wrap; gap:4px 18px; font-size:12px; margin-bottom:8px; }
  #pcfgPreview table { font-size:11.5px; width:100%; border-collapse:collapse; table-layout:auto; }
  #pcfgPreview th, #pcfgPreview td { border:1px solid #A9C4DE; padding:3px 6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  #pcfgPreview th { background:#E7F0FA; color:#265D8D; font-weight:700; }
  #pcfgPreview .p-total { text-align:right; margin-top:8px; font-size:13px; color:#C04D3A; font-weight:600; border-bottom:1.5px solid #333; padding-bottom:4px; }
  #pcfgPreview .p-total b { color:#D15B47; font-size:15px; }
  #pcfgPreview .p-notice { margin-top:12px; border:1px solid #888; padding:6px 10px; font-size:11.5px; line-height:1.7; color:#222; }
  #pcfgPreview .p-notice .p-notice-title { font-weight:700; font-size:12.5px; margin-bottom:2px; }
  #pcfgPreview .p-qr { display:flex; justify-content:flex-end; margin-top:8px; }
  #pcfgPreview .p-sign { display:flex; justify-content:space-between; margin-top:28px; font-size:12px; }
  #pcfgPreview .p-sign-qr { display:flex; align-items:flex-end; margin-top:28px; font-size:12px; }
  #pcfgPreview .p-sign-qr .p-sign-fields { display:flex; flex:1; justify-content:space-between; }
  #pcfgPreview .p-qr-inline { display:flex; flex-direction:column; align-items:center; margin-left:18px; }
  #pcfgPreview .p-qr-box img, #pcfgPreview .p-qr-inline img { display:block; }
  #pcfgPreview .p-qr-cap { text-align:center; font-size:11px; color:#333; margin-top:3px; }

  /* ===== 已开订单卡片（销售制单页底部） ===== */
  #recentOrdersBox .saved-card { background:#fff; border:1px solid #C8CDD3; border-radius:4px; padding:9px 14px 10px; margin-bottom:9px; box-shadow:0 1px 2px rgba(0,0,0,0.03); }
  #recentOrdersBox .saved-card:last-child { margin-bottom:0; }
  #recentOrdersBox .saved-card-head { display:flex; align-items:center; gap:14px; padding-bottom:6px; border-bottom:1px dashed #DDE2E6; }
  #recentOrdersBox .saved-card-no { font-weight:700; color:#3978B5; font-size:14px; letter-spacing:0.3px; }
  #recentOrdersBox .saved-card-cust { flex:1; min-width:0; font-size:13px; color:#393939; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #recentOrdersBox .saved-card-amt { color:#D15B47; font-weight:700; font-size:14px; white-space:nowrap; }
  #recentOrdersBox .saved-card-meta { font-size:11.5px; color:#667; padding:6px 0 4px; display:flex; gap:14px; flex-wrap:wrap; }
  #recentOrdersBox .saved-card-meta span { white-space:nowrap; }
  #recentOrdersBox .saved-card-items { font-size:11.5px; line-height:1.75; color:#393939; border-top:1px dashed #EFF3F8; padding-top:6px; }
  #recentOrdersBox .saved-card-item { padding:1px 0; display:flex; gap:6px; align-items:flex-start; }
  #recentOrdersBox .saved-card-item:hover { background:#EFF3F8; }
  #recentOrdersBox .saved-card-item .item-idx { color:#93A1AE; min-width:18px; flex-shrink:0; }
  #recentOrdersBox .saved-card-item .item-main { flex:1; }
  #recentOrdersBox .saved-card-item .item-sub { font-size:11px; color:#667; margin-top:1px; }
  #recentOrdersBox .saved-card-item .item-sub b { color:#D15B47; }
  #recentOrdersBox .recent-orders-empty { color:#93A1AE; font-size:12px; padding:22px; text-align:center; background:#FAFBFC; border:1px dashed #C8CDD3; border-radius:4px; }
  #recentOrdersBox .saved-card-del { font-size:11.5px; color:#D15B47; cursor:pointer; padding:2px 6px; }
  #recentOrdersBox .saved-card-del:hover { text-decoration:underline; }
  /* 编辑模式下子单号列表（每行一项，点击切换） */
  #recentOrdersBox .suborder-list { display:flex; flex-direction:column; gap:4px; }
  #recentOrdersBox .suborder-block { display:flex; flex-direction:column; gap:0; }
  #recentOrdersBox .suborder-row { display:flex; align-items:center; gap:8px; padding:6px 10px; border:1px solid #E0E6EC; border-radius:3px; cursor:pointer; background:#FAFBFC; font-size:12px; transition:background 0.12s, border-color 0.12s; }
  #recentOrdersBox .suborder-row:hover { background:#EFF3F8; border-color:#478FCA; }
  #recentOrdersBox .suborder-row.current { background:#EAF3FA; border-color:#478FCA; box-shadow:inset 0 0 0 1px #B9D7EF; }
  #recentOrdersBox .suborder-row.expanded { border-bottom-left-radius:0; border-bottom-right-radius:0; border-color:#478FCA; }
  #recentOrdersBox .suborder-row .suborder-idx { color:#93A1AE; min-width:18px; flex-shrink:0; }
  #recentOrdersBox .suborder-row .suborder-no { color:#265D8D; font-weight:600; font-family:Consolas,monospace; min-width:120px; }
  #recentOrdersBox .suborder-row.current .suborder-no { color:#3978B5; }
  #recentOrdersBox .suborder-row .suborder-no::after { content:' ✱'; color:#C04D3A; }
  #recentOrdersBox .suborder-row:not(.current) .suborder-no::after { content:''; }
  #recentOrdersBox .suborder-row .suborder-info { color:#5C7080; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  #recentOrdersBox .suborder-row .suborder-amt { color:#D15B47; font-weight:700; white-space:nowrap; }
  #recentOrdersBox .suborder-row .suborder-del { color:#D15B47; font-size:11.5px; cursor:pointer; padding:2px 8px; border:1px solid #F0BFBA; border-radius:2px; background:#FBEDE9; white-space:nowrap; flex-shrink:0; line-height:1.4; }
  #recentOrdersBox .suborder-row .suborder-del:hover { background:#D15B47; color:#fff; border-color:#D15B47; }
  #recentOrdersBox .suborder-row .suborder-arrow { color:#93A1AE; font-size:11px; min-width:14px; text-align:center; flex-shrink:0; }
  /* 双击展开：子单号完整开单明细 */
  #recentOrdersBox .suborder-detail { background:#F5F8FB; border:1px solid #478FCA; border-top:none; border-radius:0 0 3px 3px; padding:8px 14px 10px; margin-top:-1px; font-size:11.5px; color:#393939; user-select:text; }
  #recentOrdersBox .suborder-detail .detail-row { display:flex; gap:10px; padding:2px 0; align-items:flex-start; }
  #recentOrdersBox .suborder-detail .lbl { color:#5C7080; min-width:78px; flex-shrink:0; }
  #recentOrdersBox .suborder-detail .val { color:#393939; flex:1; }
  #recentOrdersBox .suborder-detail .val b { color:#D15B47; }

  /* ===== 销售订单详情页（参考 MD_V202607 风格） ===== */
  #view-orderdetail { font-size:13px; color:#393939; }
  #view-orderdetail .od-toolbar { display:flex; align-items:center; gap:8px; padding:6px 10px; background:linear-gradient(to bottom,#EFF3F8,#DDE2E6); border:1px solid #C8CDD3; border-radius:3px; margin-bottom:10px; }
  #view-orderdetail .od-breadcrumb { color:#478FCA; font-size:13px; flex:1; }
  #view-orderdetail .od-breadcrumb b { color:#C04D3A; font-weight:700; }
  #view-orderdetail .od-breadcrumb .sep { color:#93A1AE; margin:0 6px; }
  #view-orderdetail .od-actions { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
  #view-orderdetail .od-actions .btn { font-size:12px; padding:3px 10px; height:24px; line-height:18px; }
  #view-orderdetail .od-actions select { height:24px; font-size:12px; padding:0 6px; border:1px solid #C8CDD3; background:#fff; border-radius:2px; }
  #view-orderdetail .od-info-table { width:100%; border-collapse:collapse; border:1px solid #BFC8D2; margin-bottom:14px; background:#fff; }
  #view-orderdetail .od-info-table th.lbl { background:#EFF3F8; color:#5C7080; font-weight:400; text-align:right; width:90px; padding:7px 12px; border:1px solid #DDE2E6; font-size:12.5px; }
  #view-orderdetail .od-info-table td { padding:7px 12px; border:1px solid #DDE2E6; font-size:13px; min-width:160px; color:#393939; }
  #view-orderdetail .od-info-table td.empty { color:#C04D3A; font-style:italic; }
  #view-orderdetail .od-items { width:100%; border-collapse:collapse; border:1px solid #BFC8D2; background:#fff; }
  #view-orderdetail .od-items th { background:#EFF3F8; color:#5C7080; font-weight:600; padding:9px 10px; border:1px solid #DDE2E6; text-align:center; font-size:12.5px; }
  #view-orderdetail .od-items td { padding:8px 10px; border:1px solid #DDE2E6; font-size:12.5px; vertical-align:top; }
  #view-orderdetail .od-items .od-prod-btn { display:inline-block; writing-mode:vertical-rl; text-orientation:upright; background:#fff; border:1px solid #478FCA; color:#478FCA; padding:6px 4px; font-size:12px; border-radius:2px; cursor:pointer; }
#view-orderdetail .od-items .od-prod-no { color:#265D8D; font-size:11.5px; font-family:Consolas,monospace; cursor:pointer; text-decoration:none; font-weight:normal; }
#view-orderdetail .od-items .od-prod-no:hover { text-decoration: underline; color:#478FCA; }
#view-orderdetail .od-items .od-style-name { font-size:11.5px; color:#5C7080; font-weight:normal; margin-left:6px; }
#view-orderdetail .od-items .od-style-name::before { content:'· '; color:#93A1AE; }
  #view-orderdetail .od-items .od-spec { color:#5C7080; font-size:11.5px; line-height:1.7; }
  #view-orderdetail .od-items .od-spec div { padding:1px 0; }
  #view-orderdetail .od-items .od-price-calc { color:#393939; font-size:12.5px; line-height:1.8; }
  #view-orderdetail .od-items .od-price-calc .price-row { display:flex; justify-content:space-between; gap:12px; }
  #view-orderdetail .od-items .od-price-calc .price-line { display:flex; justify-content:space-between; gap:12px; padding-top:3px; border-top:1px dashed #DDE2E6; margin-top:4px; font-weight:600; }
  #view-orderdetail .od-items .od-qty { text-align:center; font-weight:600; font-size:13px; }
  #view-orderdetail .od-items .od-amount { text-align:right; font-weight:700; color:#C04D3A; font-size:13px; }
  #view-orderdetail .od-items .od-state .label.bill-tag-clickable:hover { box-shadow:0 0 0 2px rgba(71,143,202,0.25); filter:brightness(0.96); }
  #view-orderdetail .od-items .od-state { font-size:11.5px; color:#5C7080; line-height:1.7; }
  #view-orderdetail .od-items .od-state .state-in { color:#18A058; }
  #view-orderdetail .od-items .od-state .state-out { color:#C04D3A; }
  #view-orderdetail .od-items .od-remark { color:#5C7080; font-size:12.5px; }
  #view-orderdetail .od-totals { display:flex; gap:30px; padding:12px 16px; background:linear-gradient(to bottom,#FAFBFC,#EFF3F8); border:1px solid #C8CDD3; border-top:none; border-radius:0 0 3px 3px; font-size:13px; }
  #view-orderdetail .od-totals .od-tot { display:flex; align-items:baseline; gap:6px; }
  #view-orderdetail .od-totals b { font-size:17px; font-weight:700; padding-left:4px; }
  #view-orderdetail .od-totals .c-red { color:#D15B47; }
  #view-orderdetail .od-totals .c-green { color:#18A058; }
  #view-orderdetail .od-totals .c-orange { color:#E6A23C; }
  #view-orderdetail .od-back { font-size:12px; padding:3px 12px; }

  @page { size: A4 landscape; margin: 8mm; }
  @media print {
    html, body { width:100%; height:100%; margin:0 !important; padding:0 !important; background:#fff; }
    body > * { display:none !important; }
    #printArea { display:block !important; color:#222; position:absolute; top:0; left:0; right:0; margin:0; padding:8mm; box-sizing:border-box; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
    #printArea h1 { font-size:26px; text-align:center; margin-bottom:8px; color:#265D8D; letter-spacing:4px; border-bottom:2px solid #478FCA; padding-bottom:6px; }
    #printArea .sub { text-align:center; color:#444; font-size:15px; margin-bottom:12px; }
    #printArea .p-info { display:flex; flex-wrap:wrap; gap:6px 24px; font-size:15px; margin-bottom:10px; }
    #printArea table { font-size:14.5px; width:100%; border-collapse:collapse; table-layout:auto; }
    #printArea th, #printArea td { border:1px solid #A9C4DE; padding:5px 8px; border-radius:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    #printArea th { background:#E7F0FA; color:#265D8D; font-weight:700; }
    #printArea .p-total { text-align:right; margin-top:10px; font-size:16px; color:#C04D3A; font-weight:600; border-bottom:1.5px solid #333; padding-bottom:4px; }
    #printArea .p-total b { color:#D15B47; font-size:18px; }
    #printArea .p-sign { display:flex; justify-content:space-between; margin-top:36px; font-size:15px; }
    #printArea td[colspan] { font-size:14px; }
    /* ===== 打印布局配置：客户须知 / 二维码 ===== */
    #printArea .p-notice { margin-top:14px; border:1px solid #888; padding:8px 12px; font-size:13.5px; line-height:1.8; color:#222; }
    #printArea .p-notice .p-notice-title { font-weight:700; font-size:14.5px; margin-bottom:2px; }
    .p-notice.p-notice-with-qr { display:flex !important; align-items:center !important; gap:14px !important; }
    #printArea .p-notice .p-notice-text { flex:1 1 auto; }
    #printArea .p-notice .p-notice-qr { flex:0 0 auto; padding:6px; border:1px dashed #999; background:#fff; text-align:center; align-self:center; }
    #printArea .p-notice .p-notice-qr img { display:block; }
    #printArea .p-qr { display:flex; justify-content:flex-end; margin-top:10px; }
    #printArea .p-qr-box { display:flex; align-items:center; gap:10px; }
    #printArea .p-qr-box img { display:block; }
    #printArea .p-qr-cap { text-align:center; font-size:12px; color:#333; margin-top:3px; }
    #printArea .p-sign-qr { display:flex; align-items:flex-end; margin-top:36px; font-size:15px; }
    #printArea .p-sign-qr .p-sign-fields { display:flex; flex:1; justify-content:space-between; }
    #printArea .p-qr-inline { display:flex; flex-direction:column; align-items:center; margin-left:24px; }
    /* 制单的重复表头仅开单时可见，打印隐藏 */
    .rep-header { display:none !important; }
    /* 制单的重复表头仅开单时可见，打印隐藏 */
  }
  /* ============== 手机/平板适配（仅窄屏生效，桌面不受影响） ============== */
  #menuToggle{ display:none; }
  @media (max-width: 820px){
    #menuToggle{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px;
      background:rgba(255,255,255,.18); border:1px solid rgba(255,255,255,.32); border-radius:4px;
      color:#fff; font-size:19px; margin-right:9px; cursor:pointer; line-height:1; }
    #navbar{ padding:0 8px; }
    #navbar .brand{ font-size:14px; }
    #navbar .brand small{ display:none; }
    .nav-right .sep{ margin:0 3px; }
    #crumb{ padding:0 8px; font-size:11.5px; height:auto; min-height:36px; }
    #sidebar{ top:45px; width:244px; transform:translateX(-100%); transition:transform .22s ease; box-shadow:6px 0 22px rgba(0,0,0,.28); }
    #sidebar.open{ transform:translateX(0); }
    #main{ margin:81px 0 0 0; width:100%; padding:8px 8px 24px; overflow-x:auto; -webkit-overflow-scrolling:touch; }
    .form-row{ flex-direction:column; gap:10px; }
    .field{ width:100% !important; min-width:0 !important; }
    .field input,.field select,.field textarea{ height:38px; font-size:15px; font-size:16px; }
    .two-col{ flex-direction:column; }
    .page-header{ flex-direction:column; align-items:stretch; }
    .page-header .ph-actions{ flex-wrap:wrap; gap:6px; }
    .btn{ height:36px; font-size:13px; padding:0 12px; }
    .btn-group{ flex-wrap:wrap; }
    .summary-bar{ flex-direction:column; align-items:stretch; gap:8px; }
    .charts-grid{ grid-template-columns:1fr !important; }
    table.grid{ display:block; overflow-x:auto; width:100%; }
  }

/* 材料中心：类型页签 */
.mat-tabs .mat-tab{display:inline-block;padding:6px 16px;background:#EFF3F6;color:#4A5A68;border:1px solid #D8DEE4;border-radius:16px;font-size:13px;cursor:pointer;user-select:none}
.mat-tabs .mat-tab:hover{background:#E3ECF5}
.mat-tabs .mat-tab.on{background:#478FCA;color:#fff;border-color:#478FCA;font-weight:600}
#view-material .grid td{vertical-align:middle}
#view-material .grid a{cursor:pointer}
/* 开关（复合材料启用状态） */
.switch{position:relative;display:inline-block;width:42px;height:22px;vertical-align:middle}
.switch input{opacity:0;width:0;height:0}
.switch .slider{position:absolute;cursor:pointer;inset:0;background:#C8CDD3;border-radius:22px;transition:.2s}
.switch .slider:before{content:"";position:absolute;height:16px;width:16px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.2s;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.switch input:checked + .slider{background:#3DBD7D}
.switch input:checked + .slider:before{transform:translateX(20px)}

/* ===== 多选下拉组件（门类型/门标签等可勾选多项的筛选） ===== */
.pp-msel{position:relative;width:100%;min-width:150px}
.pp-msel-head{display:flex;align-items:center;justify-content:space-between;gap:6px;height:30px;padding:0 10px;border:1px solid #D5D5D5;border-radius:4px;background:#fff;font-size:12.5px;color:#333;cursor:pointer;user-select:none}
.pp-msel-head:hover{border-color:#478FCA}
.pp-msel-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pp-msel-arrow{color:#7A8694;font-size:11px}
.pp-msel-panel{position:absolute;top:34px;left:0;z-index:3000;width:max-content;min-width:160px;max-width:360px;background:#fff;border:1px solid #C8CDD3;border-radius:6px;box-shadow:0 8px 24px rgba(0,0,0,.14);padding:5px;box-sizing:border-box}
.pp-msel-all{display:inline-flex;align-items:center;gap:7px;padding:7px 9px;font-size:12.5px;color:#265D8D;font-weight:600;border-bottom:1px solid #EDF0F2;margin-bottom:4px;cursor:pointer}
.pp-msel-all span{flex:none;white-space:nowrap}
.pp-msel-opts{max-height:230px;overflow-x:hidden;overflow-y:auto}
.pp-msel-opt{display:flex;align-items:center;gap:8px;padding:6px 9px;font-size:12.5px;color:#333;cursor:pointer;border-radius:4px}
.pp-msel-opt:hover{background:#F2F7FC}
.pp-msel-panel input[type=checkbox]{width:14px!important;height:14px!important;min-width:14px;max-width:14px;margin:0;padding:0;cursor:pointer;flex:0 0 auto!important;flex-shrink:0;accent-color:#478FCA;box-sizing:border-box}
.pp-msel-opt span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333}
.pp-msel-opt:has(input:checked){background:#E8F1FB}
.pp-msel-tools{display:flex;align-items:center;gap:6px;padding:0 2px 6px}
.pp-msel-search{flex:1;height:26px;border:1px solid #D5D5D5;border-radius:4px;padding:0 8px;font-size:12.5px;box-sizing:border-box}
.pp-msel-search:focus{outline:none;border-color:#478FCA}
.pp-msel-acts{display:flex;gap:4px;flex:0 0 auto}
.pp-msel-acts button{height:24px;padding:0 8px;font-size:11.5px;border:1px solid #C8CDD3;background:#fff;color:#4A5A68;cursor:pointer;border-radius:4px}
.pp-msel-acts button:hover{border-color:#478FCA;color:#265D8D}

/* ===== 生产详单打印：明细清单左下角工具栏 ===== */
.pp-fb{display:flex;align-items:center;gap:8px;justify-content:flex-start;padding:8px 12px;border-top:1px solid var(--grid,#DEE4EA);background:#F8FAFC}
