
:root{
  --bg:#f3f4f6;--paper:#fff;--ink:#171a1f;--muted:#667085;--line:#d9dee6;
  --soft:#f8fafc;--blue:#2f6bff;--blue-soft:#eef4ff;--green:#12805c;
  --warn:#a96308;--shadow:0 14px 40px rgba(16,24,40,.08),0 2px 8px rgba(16,24,40,.04);
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
button,input,select,textarea{font:inherit}button{cursor:pointer}
.shell{max-width:1500px;margin:0 auto;padding:18px 18px 96px}
.appbar{display:flex;justify-content:space-between;align-items:center;gap:14px;padding-bottom:14px}
.brandline{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.brandline h1{font-size:20px;margin:0}.order-no{font-size:13px;color:var(--muted)}
.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.btn{height:36px;padding:0 14px;border-radius:9px;border:1px solid var(--line);background:#fff;color:#344054;display:inline-flex;align-items:center;justify-content:center;line-height:1;vertical-align:middle;text-decoration:none;white-space:nowrap}
.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}
.role-switch{display:flex;padding:3px;border-radius:9px;background:#e9edf3;gap:2px}
.role-btn{height:30px;border:0;border-radius:7px;padding:0 12px;background:transparent;color:#667085}
.role-btn.active{background:#fff;color:#1f2937;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.stage{display:flex;justify-content:center}
.paper{width:min(1200px,100%);background:var(--paper);box-shadow:var(--shadow);border:1px solid #e2e6eb;border-radius:12px;overflow:hidden}
.paper-head{padding:20px 26px;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line)}
.paper-title h2{margin:0;font-size:27px}.paper-title .sub{margin-top:5px;color:var(--muted);font-size:12px}
.badges{display:flex;gap:7px;flex-wrap:wrap}.badge{display:inline-flex;align-items:center;height:27px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:600}
.badge.blue{background:var(--blue-soft);color:#2755c7}.badge.green{background:#edf8f3;color:var(--green)}
.section-title{height:44px;padding:0 16px;display:flex;align-items:center;justify-content:space-between;background:var(--soft);border-bottom:1px solid var(--line);font-size:13px;font-weight:700;color:#344054}
.section-title small{font-size:11px;color:#98a2b3;font-weight:400}

.order-info{border-bottom:1px solid var(--line)}
.order-grid{display:grid;grid-template-columns:repeat(3,1fr)}
.order-field{padding:13px 14px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);position:relative}
.order-field:nth-child(3n){border-right:0}
.order-field:nth-last-child(-n+3){border-bottom:0}
.order-field label{display:block;font-size:11px;color:#667085;margin-bottom:6px;font-weight:600}
.req{color:#d92d20;margin-right:2px}
.control{width:100%;height:38px;border:1px solid #d8dde5;border-radius:7px;background:#fff;padding:0 10px;outline:none;color:#1f2937}
.control:focus{border-color:#8fb0ff;box-shadow:0 0 0 3px #edf3ff}
.readonly{background:#f7f8fa;color:#667085}
.radio-line{display:flex;gap:15px;align-items:center;height:38px;font-size:13px;color:#344054}
.radio-line label{margin:0;display:flex;gap:6px;align-items:center;font-weight:400}

/* 彩色店铺选择 */
.shop-picker{position:relative}
.shop-trigger{
  width:100%;height:38px;border:1px solid #d8dde5;border-radius:7px;background:#fff;
  display:flex;align-items:center;justify-content:space-between;padding:0 9px;cursor:pointer
}
.shop-trigger.open{border-color:#8fb0ff;box-shadow:0 0 0 3px #edf3ff}
.shop-tag{display:inline-flex;align-items:center;min-height:25px;padding:3px 8px;border-radius:5px;font-size:12px;font-weight:600}
.tag-yellow{background:#fbbb04;color:#fff}.tag-red{background:#ef4444;color:#fff}
.tag-lblue{background:#a9c7ff;color:#173b7a}.tag-pink{background:#ffb0b0;color:#733535}
.tag-gray{background:#d9dee6;color:#344054}.tag-blue{background:#2f6bff;color:#fff}
.chev{color:#98a2b3;font-size:14px}
.shop-menu{
  display:none;position:absolute;left:0;right:0;top:44px;z-index:50;background:#fff;border:1px solid #d8dde5;
  border-radius:9px;box-shadow:0 12px 28px rgba(16,24,40,.16);padding:8px;max-height:310px;overflow:auto
}
.shop-menu.open{display:block}
.shop-search{width:100%;height:34px;border:1px solid #e1e5eb;border-radius:7px;padding:0 9px;outline:none;margin-bottom:7px}
.shop-option{padding:7px 8px;border-radius:7px;cursor:pointer}.shop-option:hover{background:#f6f8fb}

.top-grid{display:grid;grid-template-columns:1.02fr .98fr;border-bottom:1px solid var(--line)}
.left{border-right:1px solid var(--line)}
.field-row{display:grid;grid-template-columns:142px 1fr;min-height:54px;border-bottom:1px solid var(--line)}
.field-row:last-child{border-bottom:0}.label{background:#fbfcfd;border-right:1px solid var(--line);display:flex;align-items:center;padding:0 16px;font-size:12px;color:#475467;font-weight:600}
.summary-box{padding:13px 14px;background:#fcfdff}
.summary-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:7px}
.summary-label{font-size:11px;color:#98a2b3}

.summary-text{font-size:13px;line-height:1.7;color:#344054}.summary-line{display:flex;gap:6px;align-items:flex-start}.summary-line b{color:#111827}
.value{display:flex;align-items:center;padding:9px 12px}.doc-textarea{width:100%;border:1px solid #e7eaf0;background:#fff;border-radius:8px;padding:10px 11px;outline:none;color:#1f2937;min-height:78px;resize:vertical;line-height:1.55;font-size:13px}
.doc-textarea:hover{background:#f9fafb;border-color:#eef0f3}.doc-textarea:focus{background:#fff;border-color:#8fb0ff;box-shadow:0 0 0 3px #edf3ff}

.artwork{display:flex;flex-direction:column}
.art-body{padding:14px;display:flex;flex-direction:column;gap:10px;min-height:370px}
.paste-tip{font-size:11px;color:#475467;background:#eef4ff;border:1px solid #d8e4ff;padding:7px 9px;border-radius:7px}
.art-preview{
  flex:1;min-height:270px;border:1.5px dashed #b9c2ce;border-radius:10px;background:#fafbfc;
  display:flex;align-items:center;justify-content:center;text-align:center;color:#98a2b3;overflow:auto;position:relative;outline:none
}
.art-preview.active{border-color:var(--blue);box-shadow:0 0 0 3px #edf3ff;background:#fbfdff}
.empty-art strong{display:block;color:#475467;font-size:14px;margin-bottom:8px}.empty-art .paste{color:var(--blue);font-weight:700}.empty-art .small{font-size:11px;margin-top:8px;color:#98a2b3}
.gallery{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:10px}
.art-item{position:relative;border:1px solid var(--line);border-radius:8px;background:#fff;overflow:hidden;min-height:160px;cursor:pointer;transition:.12s ease}
.art-item:hover{border-color:#b8c3d3}
.art-item.selected{border-color:#3370ff;box-shadow:0 0 0 3px #eaf0ff}
.art-item img{width:100%;height:180px;object-fit:contain;background:#f8fafc;display:block}
.art-remove{
  position:absolute;right:7px;top:7px;z-index:2;
  width:28px;height:28px;border:1px solid rgba(208,213,221,.9);border-radius:7px;
  background:rgba(255,255,255,.94);color:#c4423b;padding:0;
  display:flex;align-items:center;justify-content:center;font-size:16px;line-height:1
}
.art-remove:hover{background:#fff0ef;border-color:#f2b8b2}

.art-tools{display:flex;justify-content:space-between;gap:8px;align-items:center;flex-wrap:wrap}.art-note{font-size:11px;color:#98a2b3}.art-actions{display:flex;gap:8px;align-items:center}.art-actions .btn{min-width:96px;height:36px;display:inline-flex;align-items:center;justify-content:center;text-align:center;padding:0 14px;line-height:1}
.file-btn{position:relative;overflow:hidden}.file-btn input{position:absolute;inset:0;opacity:0}

.detail-section{padding:12px 20px 14px}.detail-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:7px}.detail-head h3{margin:0;font-size:15px}.detail-head .hint{font-size:11px;color:#98a2b3}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:9px}table{border-collapse:separate;border-spacing:0;width:100%;min-width:860px}
th,td{border-right:1px solid var(--line);border-bottom:1px solid var(--line)}th:last-child,td:last-child{border-right:0}tbody tr:last-child td{border-bottom:0}
th{height:34px;background:#f7f9fb;padding:0 10px;text-align:left;font-size:11.5px;color:#475467;font-weight:700;letter-spacing:.1px}
td{height:42px;background:#fff;padding:0}.cell-input{width:100%;height:41px;border:0;padding:0 10px;outline:none;background:transparent;color:#273444;font-size:12.5px;line-height:1.3}.cell-input:focus{box-shadow:inset 0 0 0 2px #8fb0ff;background:#fbfdff}
.product,.spec{font-weight:600;color:#1f2937}.note{color:#475467}.num{text-align:right;font-variant-numeric:tabular-nums}.amount{padding:0 10px;text-align:right;font-weight:600}.op{text-align:center}.link-btn{border:0;background:transparent;color:var(--blue);padding:6px 8px}.link-btn.danger{color:#c4423b}
.add-row{height:32px;width:100%;border:0;background:#fbfcfd;color:var(--blue);font-size:11.5px}
.summary-bar{margin-top:8px;padding:9px 12px;border-radius:8px;background:#f8fafc;display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap}.summary-bar .permission{order:1}.summary-bar .sum-items{order:2;margin-left:auto;text-align:right;justify-content:flex-end}
.sum-items{display:flex;gap:25px;flex-wrap:wrap}.sum .k{font-size:10px;color:#98a2b3}.sum .v{font-size:14px;font-weight:700;margin-top:2px}.permission{font-size:11px;color:#667085}.permission.warn{color:var(--warn)}
.mobile-detail{display:none}
.bottom{position:fixed;left:50%;bottom:0;transform:translateX(-50%);width:min(1500px,100%);padding:10px 18px calc(10px + env(safe-area-inset-bottom));background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:12px;z-index:20}
.bottom-left{font-size:12px;color:#667085}.bottom-left b{color:#111827}


.source-pill{display:inline-flex;align-items:center;margin-left:6px;padding:2px 6px;border-radius:999px;background:#eef4ff;color:#315bb8;font-size:9px;font-weight:600;vertical-align:middle}
.shop-source-note{font-size:10px;color:#98a2b3;padding:3px 8px 7px;border-bottom:1px solid #eef0f3;margin-bottom:4px}

/* 自定义日期控件 */
.date-picker{position:relative}
.date-trigger{width:100%;height:38px;border:1px solid #d8dde5;border-radius:10px;background:#fff;padding:0 11px;display:flex;align-items:center;justify-content:space-between;color:#1f2937;cursor:pointer}
.date-trigger:hover{border-color:#bfc7d3}
.date-trigger.open{border-color:#8fb0ff;box-shadow:0 0 0 3px #edf3ff}
.date-trigger .cal-icon{width:24px;height:24px;border-radius:7px;background:#f2f5f9;display:flex;align-items:center;justify-content:center;color:#667085;font-size:12px}
.date-pop{display:none;position:absolute;left:0;top:45px;width:286px;background:#fff;border:1px solid #dce1e7;border-radius:12px;box-shadow:0 14px 34px rgba(16,24,40,.16);z-index:80;padding:10px}
.date-pop.open{display:block}
.cal-head{display:flex;align-items:center;justify-content:space-between;padding:2px 2px 8px}
.cal-title{font-size:13px;font-weight:700;color:#344054}
.cal-nav{width:30px;height:30px;border:0;border-radius:8px;background:#f7f8fa;color:#475467}
.cal-nav:hover{background:#eef1f5}
.cal-week,.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.cal-week div{font-size:10px;color:#98a2b3;text-align:center;padding:5px 0}
.cal-day{height:34px;border:0;border-radius:8px;background:transparent;color:#344054;font-size:12px}
.cal-day:hover{background:#f2f5f9}
.cal-day.muted{color:#c2c7d0}
.cal-day.selected{background:#3370ff;color:#fff}
.cal-day.today:not(.selected){box-shadow:inset 0 0 0 1px #a8b9e8;color:#2852a7}


.customer-trigger{
  width:100%;min-height:38px;border:1px solid #d8dde5;border-radius:9px;background:#fff;
  padding:6px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left
}
.customer-trigger:hover{border-color:#bfc7d3}
.customer-trigger-text{min-width:0;display:flex;flex-direction:column;gap:2px}
.customer-name{font-size:12px;color:#1f2937;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.customer-address{font-size:10px;color:#98a2b3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* 客户信息选择弹窗 */
.modal-mask{
  display:none;position:fixed;inset:0;background:rgba(17,24,39,.38);z-index:120;
  align-items:center;justify-content:center;padding:18px
}
.modal-mask.open{display:flex}
.customer-modal{
  width:min(900px,96vw);max-height:82vh;background:#fff;border-radius:14px;box-shadow:0 24px 70px rgba(16,24,40,.24);
  overflow:hidden;display:flex;flex-direction:column
}
.modal-head{padding:18px 20px 15px;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #e8ebef}
.modal-title{font-size:17px;font-weight:700;color:#111827}
.modal-sub{font-size:11px;color:#98a2b3;margin-top:4px}
.modal-x{width:32px;height:32px;border:0;border-radius:8px;background:#fff;color:#667085;font-size:20px;line-height:1}
.modal-x:hover{background:#f3f4f6}
.customer-search-wrap{padding:12px 20px;border-bottom:1px solid #eef0f3}
.customer-search{width:100%;height:38px;border:1px solid #d8dde5;border-radius:8px;padding:0 11px;outline:none}
.customer-search:focus{border-color:#8fb0ff;box-shadow:0 0 0 3px #edf3ff}
.customer-table-wrap{overflow:auto;min-height:260px}
.customer-table{width:100%;min-width:760px;border-collapse:separate;border-spacing:0}
.customer-table th,.customer-table td{height:42px;border-right:1px solid #e8ebef;border-bottom:1px solid #e8ebef;padding:0 9px;font-size:11px;background:#fff}
.customer-table th{background:#f8fafc;color:#667085;font-weight:700;position:sticky;top:0;z-index:1}
.customer-table th:last-child,.customer-table td:last-child{border-right:0}
.customer-table tbody tr:hover td{background:#f8fbff}
.customer-table tr.selected td{background:#edf4ff}
.customer-radio{accent-color:#3370ff}
.customer-store{display:inline-flex;padding:3px 6px;border-radius:5px;font-size:10px;font-weight:600}
.customer-mobile-list{display:none}
.customer-footer{
  padding:12px 20px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #e8ebef;background:#fff
}
.customer-footer-left{display:flex;gap:8px}
.customer-footer-right{display:flex;gap:8px}
.plus-btn{width:34px!important;padding:0!important;font-size:20px!important}

/* 新增客户 */
.add-customer-modal{width:min(720px,96vw)}
.add-customer-body{padding:16px 20px 6px;overflow:auto}
.form-row{display:grid;grid-template-columns:130px 1fr;gap:10px;align-items:start;margin-bottom:12px}
.form-row>label{font-size:12px;color:#475467;font-weight:600;padding-top:9px}
.form-control{width:100%;height:38px;border:1px solid #d8dde5;border-radius:8px;padding:0 10px;outline:none;background:#fff}
.form-control:focus,.raw-info:focus{border-color:#8fb0ff;box-shadow:0 0 0 3px #edf3ff}
.raw-info{width:100%;min-height:108px;border:1px solid #d8dde5;border-radius:8px;padding:10px;outline:none;resize:vertical;line-height:1.6;font-size:12px}
.parse-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 14px 140px}
.parse-hint{font-size:10px;color:#98a2b3}
.parsed-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.parsed-grid .wide{grid-column:1/-1}
.parse-state{font-size:11px;color:#138a61;font-weight:600}


/* 新增客户里的店铺选择：与主表/企微颜色保持一致 */
.add-shop-picker{position:relative}
.add-shop-trigger{
  width:100%;height:38px;border:1px solid #d8dde5;border-radius:8px;background:#fff;
  padding:0 9px;display:flex;align-items:center;justify-content:space-between;gap:8px;text-align:left
}
.add-shop-trigger:hover{border-color:#bfc7d3}
.add-shop-trigger.open{border-color:#8fb0ff;box-shadow:0 0 0 3px #edf3ff}
.add-shop-menu{
  display:none;position:absolute;left:0;right:0;top:44px;z-index:160;background:#fff;
  border:1px solid #d8dde5;border-radius:9px;box-shadow:0 12px 28px rgba(16,24,40,.16);
  padding:8px;max-height:290px;overflow:auto
}
.add-shop-menu.open{display:block}
.add-shop-option{padding:7px 8px;border-radius:7px;cursor:pointer}
.add-shop-option:hover{background:#f6f8fb}


/* V9：订单摘要是左侧主体 */
.summary-main-row{min-height:252px}
.summary-main-row .label{align-items:flex-start;padding-top:18px}
.summary-main-row .summary-box{
  min-height:252px;
  width:100%;
  background:#fff;
  padding:14px 16px 15px;
  display:flex;
  flex-direction:column;
}
.summary-main-row .summary-label{
  font-size:11px;
  color:#98a2b3;
  margin-bottom:9px;
}
.summary-main-row .summary-text{
  flex:1;
  min-height:182px;
  font-size:14px;
  color:#1f2937;
}
.order-summary-item{
  padding:7px 0 8px;
  border-bottom:1px solid #edf0f3;
}
.order-summary-item:first-child{padding-top:0}
.order-summary-item:last-child{border-bottom:0}
.order-summary-line{display:grid;grid-template-columns:48px 1fr;gap:5px;line-height:1.45}
.order-summary-line .sk{color:#667085;font-size:11.5px;font-weight:400}
.order-summary-line .sv{color:#1f2937;font-size:12.5px;font-weight:400}
.order-summary-line.qty .sv{font-size:12.5px;font-weight:400}

.plate-new{font-weight:700;color:#111827}
.plate-existing{font-weight:400;color:#475467}

.summary-empty{
  min-height:210px;
  display:flex;
  align-items:flex-start;
  color:#c0c6cf;
  font-size:13px;
  padding-top:2px;
}
.other-row{min-height:0;height:auto;align-items:stretch;grid-auto-rows:auto}
.other-row .value{display:block;padding:8px 12px;height:auto;min-height:0}
.other-row .doc-textarea{display:block;box-sizing:border-box;width:100%;min-height:74px;height:auto;overflow-y:hidden!important;resize:none;field-sizing:content}
.cell-select{
  width:100%;height:41px;border:0;outline:none;background:#fff;
  padding:0 9px;color:#344054;font-size:11.5px
}
.cell-select:focus{box-shadow:inset 0 0 0 2px #8fb0ff;background:#fbfdff}


.order-name-field{min-width:0}
.order-name-line{display:flex;align-items:center;gap:8px}
.order-name-input{min-width:0;flex:1}
.order-name-label{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.contract-ref{
  flex:0 0 auto;
  display:inline-flex;align-items:center;justify-content:center;
  height:22px;padding:0 8px;border-radius:6px;
  background:#eef4ff;color:#2f5fc5;font-size:10.5px;font-weight:600;
  border:1px solid #d8e4ff;white-space:nowrap
}
.inline-contract-ref{margin-left:auto;transform:translateX(8px)}
.contract-ref.invalid{background:#fff3f1;color:#b42318;border-color:#ffd6d1}
.order-name-help{margin-top:5px;font-size:10px;color:#98a2b3}


.invoice-options{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  width:100%;
}
.invoice-option{
  position:relative;
  margin:0!important;
  min-width:0;
  cursor:pointer;
}
.invoice-option input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.invoice-option span{
  height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid #d8dde5;
  border-radius:9px;
  background:#fff;
  color:#344054;
  font-size:13px;
  font-weight:500;
  transition:.15s ease;
}
.invoice-option:hover span{border-color:#b9c4d4;background:#fafcff}
.invoice-option input:checked + span{
  border-color:#8fb0ff;
  background:#eef4ff;
  color:#2457c5;
  box-shadow:inset 0 0 0 1px #bcd0ff;
}


.empty-art{
  width:100%;
  min-height:240px;
  background:
    radial-gradient(circle at center, rgba(47,107,255,.08) 0 2px, transparent 3px) center/28px 28px;
}


.date-line{display:flex;align-items:center;gap:8px}
.date-line .date-picker{flex:1}
.today-btn{
  flex:0 0 auto;
  height:38px;
  min-width:52px;
  padding:0 12px;
  border:1px solid #d8dde5;
  border-radius:9px;
  background:#fff;
  color:#344054;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
}
.today-btn:hover{border-color:#b8c6dc;background:#f8fbff}
.today-btn:active{background:#eef4ff}

@media(max-width:760px){

  .order-name-line{align-items:stretch;flex-direction:column;gap:6px}
  .order-name-label{flex-wrap:wrap;align-items:center}
  .inline-contract-ref{margin-left:auto;transform:translateX(8px)}


  .customer-modal{width:100%;max-height:88vh;border-radius:12px}
  .customer-table-wrap{display:none}.customer-mobile-list{display:block;overflow:auto;padding:8px 12px}
  .customer-card{border:1px solid #e4e7ec;border-radius:9px;padding:10px;margin:7px 0;background:#fff}
  .customer-card.selected{border-color:#9eb8ff;background:#f6f9ff}
  .customer-card-top{display:flex;justify-content:space-between;gap:8px;align-items:center}
  .customer-card-name{font-size:13px;font-weight:700}.customer-card-phone{font-size:11px;color:#667085}
  .customer-card-address{font-size:11px;color:#667085;line-height:1.5;margin-top:7px}
  .form-row{grid-template-columns:1fr;gap:5px}.form-row>label{padding-top:0}.parse-row{margin-left:0}
  .parsed-grid{grid-template-columns:1fr}

  .shell{padding:8px 8px 92px}.appbar{align-items:flex-start;flex-direction:column}.brandline h1{font-size:18px}
  .actions{width:100%;justify-content:space-between}.role-switch{flex:1}.role-btn{flex:1}.actions>.btn:not(.primary){display:none}
  .paper{border-radius:10px}.paper-head{padding:15px 16px}.paper-title h2{font-size:22px}.badges{max-width:130px;justify-content:flex-end}
  .order-grid{grid-template-columns:1fr 1fr}.order-field,.order-field:nth-child(3n){border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.order-field:nth-child(2n){border-right:0}.order-field:nth-last-child(-n+2){border-bottom:0}
  .shop-menu{position:fixed;left:12px;right:12px;top:120px;max-height:65vh}
  .top-grid{grid-template-columns:1fr}.left{border-right:0;border-bottom:1px solid var(--line)}
  .field-row{grid-template-columns:105px 1fr}.label{padding:0 12px}.section-title{height:42px;padding:0 12px}
  .summary-box{padding:11px 12px}.summary-text{font-size:12px}.summary-main-row{min-height:250px}.summary-main-row .summary-box{min-height:250px}.summary-main-row .summary-text{min-height:180px}.other-row{min-height:0;height:auto}.other-row .doc-textarea{height:auto;min-height:66px;overflow-y:hidden!important;resize:none;field-sizing:content}.summary-head{align-items:flex-start;flex-direction:column}
  .art-body{min-height:300px;padding:11px}.art-preview{min-height:220px}.gallery{grid-template-columns:1fr;padding:7px}.art-item img{height:220px}
  .art-tools{align-items:flex-start;flex-direction:column}.art-actions{width:100%}.art-actions .btn{flex:1;text-align:center}
  .detail-section{padding:10px 12px 12px}.table-wrap{display:none}.mobile-detail{display:block;border:1px solid var(--line);border-radius:8px;overflow:hidden}
  .m-row{padding:10px 11px;background:#fff}.m-row+.m-row{border-top:1px solid #eef0f3}.m-top{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:start}
  .m-spec{font-size:14px;font-weight:700}.m-note{font-size:12px;color:#667085;margin-top:4px}.m-qty{font-size:17px;font-weight:800;text-align:right}.m-bottom{display:flex;justify-content:space-between;gap:8px;margin-top:9px;padding-top:8px;border-top:1px dashed #e5e7eb;font-size:11px;color:#667085}.m-price{color:#344054;font-weight:600}
  .add-row{display:none}.summary-bar{padding:10px}.sum-items{gap:17px}.permission{width:100%}
  .bottom{padding:9px 8px calc(9px + env(safe-area-inset-bottom))}.bottom .btn:first-child{display:none}
}
@media(max-width:470px){.order-grid{grid-template-columns:1fr}.order-field,.order-field:nth-child(2n),.order-field:nth-child(3n){border-right:0;border-bottom:1px solid var(--line)}.order-field:last-child{border-bottom:0}}
@media print{body{background:#fff}.appbar,.bottom{display:none}.shell{padding:0}.paper{box-shadow:none;border:0;border-radius:0;width:100%}}


/* V9.11：产品明细汇总移到右下角 */
.summary-bar{display:flex!important;align-items:center!important;justify-content:space-between!important}
.summary-bar .permission{order:1}
.summary-bar .sum-items{
  order:2;
  margin-left:auto;
  justify-content:flex-end;
  text-align:right;
}
.summary-bar .sum{min-width:86px}
@media(max-width:760px){
  .summary-bar .permission{width:auto;flex:1 1 100%;order:1}
  .summary-bar .sum-items{width:100%;order:2;margin-left:0;justify-content:flex-end}
}


/* V9.11.2 最终覆盖：其他要求由内容直接撑开整行 */
.other-row{
  height:auto!important;
  min-height:0!important;
  align-items:stretch!important;
}
.other-row .value{
  height:auto!important;
  min-height:0!important;
  display:block!important;
  padding:8px 12px!important;
}
.other-row .doc-textarea{
  display:block!important;
  width:100%!important;
  min-height:74px!important;
  height:auto;
  max-height:none!important;
  overflow-y:hidden!important;
  resize:none!important;
}


/* V9.11.3：图稿粘贴区域保持可聚焦、可接收 Ctrl/⌘+V */
.art-preview{cursor:default}
.art-preview:focus{
  border-color:#8fb0ff!important;
  box-shadow:0 0 0 3px #edf3ff!important;
  outline:none!important;
}


/* V9.12 */
.date-pop{padding:10px 10px 12px!important}
.cal-footer{padding-top:10px;border-top:1px solid #eef2f6;margin-top:10px}
.cal-today{
  width:100%;height:36px;border:1px solid #d8dde5;border-radius:10px;background:#fff;
  color:#344054;font-size:12px;font-weight:600;cursor:pointer
}
.cal-today:hover{border-color:#b8c6dc;background:#f8fbff}

/* stronger summary */
.summary-bar{
  margin-top:10px!important;
  padding:14px 16px!important;
  border-radius:10px!important;
  background:#f8fafc!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:16px!important;
}
.summary-bar .permission{
  order:1;
  align-self:center;
  font-size:12px!important;
  color:#667085!important;
}
.summary-bar .sum-items{
  order:2;
  margin-left:auto;
  display:flex!important;
  gap:34px!important;
  align-items:flex-end!important;
  justify-content:flex-end!important;
  text-align:right!important;
}
.summary-bar .sum .k{
  font-size:11px!important;
  color:#98a2b3!important;
  margin-bottom:4px!important;
}
.summary-bar .sum .v{
  font-size:30px!important;
  line-height:1!important;
  font-weight:800!important;
  color:#111827!important;
}
.summary-bar .sum:first-child .v{font-size:22px!important}
.summary-bar .sum:nth-child(2) .v{font-size:28px!important}
.summary-bar .sum.price-summary .v{font-size:34px!important}

/* artwork preview eye */
.art-item{position:relative}
.art-eye{
  position:absolute;right:40px;top:7px;z-index:2;
  width:28px;height:28px;border:1px solid rgba(208,213,221,.9);border-radius:7px;
  background:rgba(255,255,255,.94);color:#475467;padding:0;
  display:none;align-items:center;justify-content:center;font-size:14px;line-height:1;
}
.art-item:hover .art-eye,.art-item.selected .art-eye{display:flex}
.art-eye:hover{background:#eef4ff;border-color:#b7cbff;color:#2457c5}

/* lightbox */
.art-lightbox-mask{
  display:none;position:fixed;inset:0;background:rgba(10,13,18,.72);z-index:120;
  align-items:center;justify-content:center;padding:24px;
}
.art-lightbox-mask.open{display:flex}
.art-lightbox{
  position:relative;
  width:min(96vw,1180px);height:min(90vh,820px);
  background:#fff;border-radius:14px;box-shadow:0 20px 60px rgba(0,0,0,.28);
  overflow:hidden;
}
.art-lightbox-head{
  height:48px;padding:0 14px;border-bottom:1px solid #eef2f6;
  display:flex;align-items:center;justify-content:space-between;gap:12px
}
.art-lightbox-title{font-size:13px;font-weight:700;color:#344054}
.art-lightbox-close{
  width:32px;height:32px;border:0;border-radius:8px;background:#f4f6f8;color:#475467;font-size:18px
}
.art-lightbox-body{
  height:calc(100% - 48px);display:flex;align-items:center;justify-content:center;padding:16px;background:#f8fafc
}
.art-lightbox-body img{max-width:100%;max-height:100%;object-fit:contain;border-radius:8px}
@media(max-width:760px){
  .summary-bar{align-items:flex-start!important}
  .summary-bar .permission{width:100%;order:1}
  .summary-bar .sum-items{width:100%;gap:18px!important;justify-content:space-between!important}
  .summary-bar .sum .v{font-size:22px!important}
  .summary-bar .sum.price-summary .v{font-size:26px!important}
  .art-lightbox-mask{padding:10px}
  .art-lightbox{width:100%;height:84vh;border-radius:12px}
}


/* V9.13 */
.seq-cell{
  width:68px;
  text-align:center;
  color:#475467;
  font-size:12px;
  font-weight:600;
  background:#fcfcfd;
}
.detail-head .hint{display:none!important}
.art-eye{
  font-size:16px!important;
  font-weight:700!important;
  color:#344054!important;
}
.art-eye:hover{color:#2457c5!important}
.summary-bar{
  margin-top:10px!important;
  padding:10px 14px!important;
  border-radius:10px!important;
  background:#f8fafc!important;
  align-items:center!important;
}
.summary-bar .permission{
  font-size:12px!important;
  color:#667085!important;
}
.summary-bar .sum-items{
  gap:22px!important;
  align-items:center!important;
}
.summary-bar .sum{
  min-width:98px;
}
.summary-bar .sum .k{
  font-size:11px!important;
  color:#98a2b3!important;
  margin-bottom:4px!important;
}
.summary-bar .sum .v{
  font-size:20px!important;
  line-height:1.15!important;
  font-weight:700!important;
  color:#111827!important;
}
.summary-bar .sum.price-summary .v{
  font-size:22px!important;
}
@media (max-width:760px){
  .summary-bar .sum-items{
    width:100%;
    justify-content:space-between!important;
    gap:14px!important;
  }
  .summary-bar .sum{
    min-width:auto;
  }
  .summary-bar .sum .v,
  .summary-bar .sum.price-summary .v{
    font-size:18px!important;
  }
}


.detail-section .table-wrap{overflow:hidden;border:1px solid #d7deea;border-radius:10px;background:#fff}.detail-table-scroll{overflow-x:auto}.detail-section .product-table{width:100%;min-width:1000px;table-layout:fixed;border-collapse:separate;border-spacing:0}.detail-section .product-table .col-index{width:6%}.detail-section .product-table .col-product{width:13%}.detail-section .product-table .col-specification{width:19.5%}.detail-section .product-table .col-quantity{width:12%}.detail-section .product-table .col-price{width:10.5%}.detail-section .product-table .col-amount{width:13%}.detail-section .product-table .col-status{width:10.5%}.detail-section .product-table .col-note{width:9.5%}.detail-section .product-table .col-action{width:6%}.detail-section .product-table th,.detail-section .product-table td{border-right:1px solid #d7deea;border-bottom:1px solid #d7deea;text-align:left;vertical-align:middle}.detail-section .product-table th:last-child,.detail-section .product-table td:last-child{border-right:0}.detail-section .product-table th{height:35px;padding:0 11px;color:#475467;background:#f6f8fa;font-size:12px;font-weight:650;white-space:nowrap}.detail-section .product-table td{height:48px;padding:0;color:#243044;background:#fff;font-size:13px;transition:background-color .14s ease}.detail-section .product-table tbody tr:hover td{background:#fbfcff}.detail-section .product-table input,.detail-section .product-table select{width:100%;height:47px;margin:0;padding:0 11px;border:0;border-radius:0;outline:0;color:#243044;background:transparent;font-size:13px}.detail-section .product-table input::placeholder{color:#b7c0ce}.detail-section .product-table input:focus,.detail-section .product-table select:focus{position:relative;z-index:1;box-shadow:inset 0 0 0 2px #4d7cff;background:#fff}.detail-section .product-table select{cursor:pointer}.detail-section .product-table .number-input{text-align:right;font-variant-numeric:tabular-nums}.seq-cell{padding-inline:11px!important;text-align:center!important;color:#344054!important;font-weight:650;font-variant-numeric:tabular-nums}.amount{padding-inline:11px!important;text-align:right!important;color:#101828!important;font-size:16px!important;font-weight:750;font-variant-numeric:tabular-nums}.op{padding-inline:8px!important;text-align:center!important}.remove{min-width:42px;min-height:34px;padding:5px 7px;border:0;border-radius:6px;color:#e5484d;background:transparent;cursor:pointer;transition:color .14s ease,background-color .14s ease}.remove:hover,.remove:focus-visible{color:#c93439;background:#fff1f0;outline:0}.add-row{width:100%;height:32px;display:flex;align-items:center;justify-content:center;gap:4px;border:0;color:#356df3;background:#fbfcff;font-size:12px;cursor:pointer;transition:color .14s ease,background-color .14s ease}.add-row:hover,.add-row:focus-visible{color:#2458db;background:#f2f6ff;outline:0}.add-row span{font-size:15px;line-height:1}
.detail-section .product-table {table-layout:fixed;min-width:1000px}
.detail-section .product-table .product,.detail-section .product-table .spec{font-weight:400}
.detail-section .product-table th{width:auto!important}
.detail-section .summary-bar .sum .v,.detail-section .summary-bar .sum:first-child .v,.detail-section .summary-bar .sum.price-summary .v{font-size:16px!important;font-weight:650!important}
.detail-section .sum:nth-child(2) .v{font-size:16px!important}
.detail-section .summary-bar{min-height:64px}
.detail-section .product-table .seq-cell{width:auto!important}
.detail-section .product-table .remove{font-size:12px}
.preview-notice{font-size:12px;color:#667085;margin:0 0 12px;text-align:center}


.file-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:1!important}.art-actions button,.art-actions label{font-size:13px!important;font-weight:500}
/* Mobile editing shares the desktop line values, keeping the existing document layout. */
.mobile-add{display:none}
.detail-errors{font-size:12px;color:#b42318;line-height:1.6;background:#fff4f2;padding:10px;border-radius:7px}
[aria-invalid="true"]{box-shadow:inset 0 0 0 1px #d92d20!important;background:#fff4f2!important}
button:disabled{cursor:default;opacity:.6}
body[data-preview-role="factory"] #detailErrors{display:none}
@media(max-width:760px){
 .mobile-add:not([hidden]){display:block;height:42px;margin-top:8px;border:1px dashed #b8c7ed;border-radius:8px}
 .m-edit-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .m-edit-field{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#667085;min-width:0}
 .m-edit-field input,.m-edit-field select{width:100%;min-width:0;height:40px;border:1px solid #d7deea;border-radius:7px;padding:0 8px;background:#fff;color:#243044;font-size:16px}
 .m-edit-field input[data-field="qty"]{font-weight:650}
 .m-edit-row .m-bottom{margin:7px 0;align-items:center}
 .m-line-amount{font-weight:650;color:#243044;font-size:15px}
}

/* Statistics remain at the right; each label is centered over its value. */
.detail-section .summary-bar .sum{ text-align:center!important; }
.detail-section .summary-bar .sum .k,
.detail-section .summary-bar .sum .v{ text-align:center!important; }
/* Table appearance editor: scoped to product details. */
.product-table th{position:relative}
.column-resize{position:absolute;top:0;right:-3px;width:10px;height:100%;z-index:3;padding:0;border:0;background:transparent;cursor:col-resize;touch-action:none}
.column-resize:hover,.column-resize:focus{background:#2f6bff55;outline:0}
.resizing-columns,.resizing-columns *{cursor:col-resize!important;user-select:none!important}
#tableSettings{width:min(680px,calc(100vw - 24px));max-height:85vh;overflow:auto;border:1px solid #d9dee6;border-radius:12px;padding:20px;color:#243044;box-shadow:0 20px 80px #0003}
#tableSettings::backdrop{background:#17203366}
.layout-heading,.layout-footer{display:flex;align-items:center;justify-content:space-between;gap:14px}
.layout-heading h3{margin:0;font-size:18px}
.layout-hint,.layout-footer span{font-size:12px;color:#667085;line-height:1.6}
.layout-grid-head,.layout-field-row{display:grid;grid-template-columns:1.1fr 1.5fr 1fr .7fr;gap:10px;align-items:center;margin:9px 0;font-size:12px}
.layout-grid-head{color:#667085}
.layout-field-row input{width:100%;min-width:0;height:36px;padding:0 7px;border:1px solid #d9dee6;border-radius:6px;font:inherit}
.layout-footer{margin-top:18px}
@media(max-width:760px){.layout-grid-head,.layout-field-row{gap:5px}.layout-field-row input{font-size:16px}#tableSettings{padding:12px}.layout-footer{align-items:flex-start;flex-direction:column}}
/* Matching label and control tracks keep every field aligned, including two-line recipients. */
.appbar{justify-content:flex-end}
.paper-head{justify-content:center;align-items:center;background:linear-gradient(110deg,#64d89b 0%,#8be2b4 35%,#67d8a2 65%,#83e0b0 100%);padding:24px 26px}
.paper-title{width:100%;text-align:center}
.paper-title h2{color:#fff;text-align:center;font-weight:750;letter-spacing:1px}.title-sparkle{display:inline-block;font-size:.85em;vertical-align:2px;margin:0 5px}
.order-grid>.order-field>label{height:22px;min-height:22px;display:flex;align-items:center;flex-wrap:nowrap;margin:0 0 6px;line-height:22px}
.order-grid .control,.order-grid .shop-trigger,.order-grid .customer-trigger,.order-grid .date-trigger,.order-grid .invoice-option span{height:48px;min-height:48px}
.order-grid .inline-contract-ref{transform:none}
@media print{.paper-head{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
@media(max-width:760px){.layout-grid-head,.layout-field-row{grid-template-columns:70px minmax(0,1fr) 65px 54px;gap:4px}}
@media(max-width:760px){.actions>#tableSettingsOpen{display:inline-flex}.actions{justify-content:flex-end}}
/* Only the settings dialog can change widths; the normal table is locked. */
.width-editor{display:grid;gap:5px;min-width:0}
.width-editor input{width:100%;min-width:0;box-sizing:border-box}
.width-editor input[type=range]{padding:0;height:20px;cursor:ew-resize;accent-color:#23a77e}
.red-edge{color:#d92d20!important}
#textStylePanel{position:fixed;right:24px;top:68px;z-index:150;width:min(430px,calc(100vw - 32px));box-sizing:border-box;padding:18px;background:white;border:1px solid #d4deea;border-radius:14px;box-shadow:0 10px 36px #17203326}
#textStylePanel[hidden]{display:none}
.style-heading,.style-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
#textStylePanel p,#textStylePanel small{font-size:12px;color:#667085}
.style-controls label{display:flex;align-items:center;gap:6px;font-size:13px}
.style-controls input[type=color]{width:34px;height:30px;padding:2px;border:1px solid #d4deea;background:white}
#styleBold[aria-pressed=true]{color:#08734f;background:#dcfce7}
.actions>#textStyleOpen{display:inline-flex}
@media print{#textStylePanel{display:none!important}}
/* Text is formatted at the selected range, through its contextual menu. */
#textStylePanel{right:auto;top:auto;z-index:150}
.rich-editor{box-sizing:border-box;white-space:pre-wrap;overflow-wrap:anywhere;outline:none;color:#172033;font-size:inherit;font-weight:400}
.rich-editor:focus{box-shadow:inset 0 0 0 1px #77a0ff}
.rich-editor:empty:before{content:attr(data-placeholder);color:#98a2b3;pointer-events:none}
.rich-single{min-height:47px;padding:12px 10px;line-height:23px}
.order-field>.rich-editor{height:48px;border:1px solid #d0d8e8;border-radius:8px;overflow:auto}
.rich-multiline{min-height:86px;padding:10px;border:1px solid #dce3ed;border-radius:8px;line-height:1.6}
.m-edit-field>.rich-editor{min-height:42px;border:1px solid #d0d8e8;border-radius:7px;font-size:16px}
.rich-editor[contenteditable=false]{cursor:default}
#detailBody .product{width:100%;color:#172033}
.product option{color:#172033}.product option[value="自封袋（红边）"]{color:#d92d20}
.order-grid input[hidden],.doc-textarea[hidden],#detailBody input[hidden],#mobileDetail input[hidden]{display:none!important}
select.product[hidden],select[data-field=product][hidden]{display:none!important}
.product-picker{width:100%;min-height:47px;padding:0 11px;border:0;background:transparent;color:#172033;font:inherit;text-align:left;cursor:pointer;white-space:nowrap}
.product-picker:focus-visible{outline:2px solid #4d7cff;outline-offset:-2px}
.product-picker:disabled{cursor:default}
.product-options{position:fixed;z-index:200;padding:5px;background:#fff;border:1px solid #d0d8e8;border-radius:8px;box-shadow:0 6px 22px #17203326;box-sizing:border-box}
.product-options[hidden]{display:none}
.product-options button{display:block;width:100%;padding:11px 12px;text-align:left;white-space:nowrap;border:0;border-radius:5px;background:white;font-size:14px;color:#172033;cursor:pointer}
.product-options button:hover,.product-options button:focus{background:#eef5ff;outline:none}
.product-options button[aria-selected=true]{font-weight:700}
.m-edit-field .product-picker{border:1px solid #d7deea;border-radius:7px;font-size:16px;min-height:40px}
@media print{.product-options{display:none!important}}
.num+.rich-editor{text-align:right;font-variant-numeric:tabular-nums}
.rich-editor[aria-invalid=true]{box-shadow:inset 0 0 0 2px #d92d20;background:#fff1f0}
#selectionFormat{position:fixed;z-index:160;width:34px;height:34px;border:1px solid #c7d7ec;border-radius:8px;background:#fff;color:#175cd3;font:bold 22px Georgia,serif;text-decoration:underline;box-shadow:0 3px 12px #17203326;cursor:pointer}
#selectionFormat[hidden]{display:none}
@media print{#selectionFormat{display:none!important}}
/* Compact form: identical geometry for native and rich text controls. */
.shell{max-width:1136px}
.paper{width:min(1100px,100%)}
.order-field{padding:10px 12px;min-width:0}
.order-grid>.order-field>label{font-size:13px;margin-bottom:5px;justify-content:flex-start;gap:8px}
.order-grid .inline-contract-ref{margin-left:0;transform:none;font-size:11px}
.order-grid .control,.order-grid .shop-trigger,.order-grid .customer-trigger,.order-grid .date-trigger,.order-grid .invoice-option span{height:44px;min-height:44px}
.order-field>.rich-editor,.order-name-line>.rich-editor{width:100%;min-width:0;height:44px;min-height:44px;box-sizing:border-box;border:1px solid #d0d8e8;border-radius:8px;padding:8px 10px;line-height:26px;font-size:16px;white-space:pre;overflow-wrap:normal;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
.order-field>.rich-editor::-webkit-scrollbar,.order-name-line>.rich-editor::-webkit-scrollbar{display:none}
.order-name-line>.rich-editor{flex:1}
.order-grid .control,.order-grid .date-trigger{font-size:16px}
.detail-section .product-table th{font-size:13px}
.detail-section .product-table td,.detail-section .product-table input,.detail-section .product-table select,.detail-section .product-picker{font-size:14px}
.paper-head{padding:20px 24px}
@media(max-width:470px){.order-field{padding:10px}.order-grid>.order-field>label{font-size:12px}}

/* Minimal test persistence controls; preserve the existing form. */
#testOrderDialog{width:min(640px,90vw);max-height:75vh;border:1px solid #ccd3df;border-radius:12px;padding:18px}
#testOrderList{display:grid;gap:8px;margin:14px 0;max-height:52vh;overflow:auto}
#testOrderList button{text-align:left;white-space:normal}
#testOrderStatus[data-error="true"]{color:#b42318}
@media(max-width:700px){.actions .test-order-action,.actions .test-save{display:inline-flex!important}.actions{flex-wrap:wrap} .bottom .test-save{display:inline-flex!important}}

.actions .role-switch{flex-shrink:0}.actions .role-btn{white-space:nowrap}

#discardTestDialog{max-width:90vw;border:1px solid #ccd3df;border-radius:12px;padding:20px}
/* Fit reorder controls inside the existing action column without tripling row height. */
.detail-section .product-table .op .remove{display:block;width:100%;min-width:0;min-height:22px;padding:1px 0}
.detail-section .product-table .op .move-row{display:inline-block;width:18px;height:20px;line-height:20px;padding:0;font-size:12px}

.production-tools{max-width:1100px;margin:10px auto;display:flex;gap:8px;flex-wrap:wrap;align-items:center}.production-tools [hidden]{display:none!important}#productionStatus{font-size:12px;color:#537563}#productionStatus[data-error=true]{color:#b42318}
.production-summary{margin:6px 8px;font-size:12px;line-height:1.5;color:#246849;white-space:normal;overflow-wrap:anywhere}.production-summary summary{cursor:pointer;font-weight:650}.production-record{border-top:1px solid #dbe6df;margin-top:6px;padding-top:4px}.production-record p{margin:4px 0}.production-record button{white-space:normal}
#correctionDialog,#referenceDialog{max-width:min(560px,92vw);max-height:85vh;overflow:auto;border:1px solid #b9cdc0;border-radius:10px;padding:20px}#correctionDialog label,#referenceOptions label{display:block;margin:12px 0}#correctQuantity,#correctReason{display:block;width:100%;font:inherit;font-size:16px;min-height:44px;padding:8px;border:1px solid #bdcec4;border-radius:6px}#referenceOptions input{width:auto}#correctStatus{color:#b42318}
@media(max-width:700px){.production-tools{padding:0 10px}.production-tools .btn{min-height:40px}#mobileDetail .production-summary{margin:12px 0}}

/* Fixed test destination; local save and remote subset must stay distinguishable. */
.wecom-test-panel{margin:12px 0;padding:12px 16px;border:1px solid #b8d8cd;border-radius:10px;background:#f3faf7;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.wecom-test-panel p{margin:6px 0}.wecom-test-actions{display:flex;gap:8px;flex-wrap:wrap}.wecom-test-panel .btn{display:inline-flex!important;white-space:normal;min-height:44px}.wecom-test-panel[data-phase="review"],.wecom-test-panel[data-phase="partial"],.wecom-test-panel[data-phase="modified"]{border-color:#dc9e38;background:#fff8e9}
@media(max-width:600px){.wecom-test-panel{padding:10px}.wecom-test-actions .btn{flex:1;justify-content:center}.wecom-test-panel label{display:block}}

/* The phase-one employee path uses the existing order form and only its order handoff. */
#phase1Submit[hidden],#phase1Panel[hidden],#phase1WorkshopLink[hidden],#v2Resume[hidden]{display:none!important}
.phase1-panel{margin:12px 0;padding:12px 16px;border:1px solid #b8d8cd;border-radius:10px;background:#f3faf7;font-size:13px;line-height:1.6}
.phase1-panel p{margin:6px 0}.phase1-panel p[data-state="review"]{color:#9a6700}.phase1-panel p[data-state="error"]{color:#b42318}
.phase1-panel-actions{display:flex;gap:8px;flex-wrap:wrap}
body.phase1-mode #wecomTestPanel,body.phase1-mode .production-tools,body.phase1-mode .role-switch,body.phase1-mode #tableSettingsOpen,body.phase1-mode #returnWecomDisabled,body.phase1-mode .bottom{display:none!important}
body.phase1-mode .actions .test-save{background:#fff;border-color:var(--line);color:#344054}
body.phase1-mode #phase1Submit{display:inline-flex!important;min-height:40px}
@media(max-width:700px){body.phase1-mode .actions .test-order-action,body.phase1-mode .actions .test-save{display:inline-flex!important}body.phase1-mode .actions{justify-content:flex-start}body.phase1-mode .phase1-panel-actions .btn{min-height:40px}}

/* V2 trial entry exposes only fields stored in the three V2 entities. */
body.v2-mode #wecomTestPanel,body.v2-mode .production-tools,body.v2-mode .role-switch,
body.v2-mode #tableSettingsOpen,body.v2-mode #returnWecomDisabled,body.v2-mode .bottom,
body.v2-mode #openTestOrder,body.v2-mode .test-save,body.v2-mode .v2-irrelevant,
body.v2-mode .artwork,body.v2-mode .product-table th:nth-child(5),
body.v2-mode .product-table td:nth-child(5),body.v2-mode .product-table th:nth-child(6),
body.v2-mode .product-table td:nth-child(6),body.v2-mode .product-table th:nth-child(7),
body.v2-mode .product-table td:nth-child(7),body.v2-mode .price-summary,
body.v2-mode .m-edit-field:nth-child(4),body.v2-mode .m-edit-field:nth-child(5),
body.v2-mode .m-price{display:none!important}
body.v2-mode #phase1Submit{display:inline-flex!important;min-height:40px}
body.v2-mode .top-grid{display:block}
body.v2-mode .top-grid .left{width:100%}
@media(max-width:700px){body.v2-mode .actions .test-order-action{display:inline-flex!important}}

.v2-real-info[hidden],.v2-files[hidden]{display:none!important}
.v2-real-info,.v2-files{margin:14px 0;padding:16px;border:1px solid var(--line);border-radius:10px;background:#fff}
.v2-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.v2-info-grid label{display:block;font-size:13px;font-weight:600;color:#344054}
.v2-info-grid input,.v2-info-grid textarea{display:block;width:100%;min-height:44px;margin-top:5px;padding:9px 12px;border:1px solid #bec9c3;border-radius:6px;background:#fff;color:#1d2939;font:16px/1.4 system-ui,-apple-system,sans-serif}
.v2-info-grid textarea{min-height:70px;resize:vertical}
.v2-info-grid .v2-wide{grid-column:1/-1}
.v2-files p{font-size:13px;color:#52635a}
.v2-files ul{margin:10px 0 0;padding-left:20px;overflow-wrap:anywhere}
.v2-files li{margin:6px 0}.v2-files li button{margin-left:10px}
.v2-files a{color:#176b4d}
@media(max-width:600px){.v2-info-grid{grid-template-columns:1fr}.v2-info-grid .v2-wide{grid-column:auto}}
