/* ===== 咏歌订单管理系统 · 样式 v3 ===== */
*{margin:0;padding:0;box-sizing:border-box;}
html,body{max-width:100%;overflow-x:hidden;}
:root{
  --bg:#0f141a;--bg2:#121923;--bg3:#17202a;--bg4:#1f2935;--bg5:#273341;
  --surface:#151d27;--surface-soft:#1b2531;--surface-raised:#243142;
  --border:#2d3a49;--border-light:#405166;
  --text:#f3f6fa;--text-muted:#a8b3c1;--text-dim:#718093;
  --brand:#d4ad68;--brand-hover:#e0bd7c;--brand-bg:rgba(212,173,104,0.12);
  --accent:#4f8cff;--accent-hover:#6aa0ff;--accent-bg:rgba(79,140,255,0.14);
  --success:#2fca7a;--warning:#f6b23f;--danger:#f05f67;--info:#5aa7ff;
  --radius:8px;--shadow:0 14px 34px rgba(0,0,0,0.30);
  --focus:0 0 0 3px rgba(79,140,255,0.22);
}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--text);min-height:100vh;line-height:1.45;}
a{color:var(--accent);text-decoration:none;}
input,select,textarea{background:var(--bg4);border:1px solid var(--border);color:var(--text);padding:8px 11px;border-radius:var(--radius);font-size:13px;width:100%;outline:none;transition:border-color .16s,box-shadow .16s,background .16s;}
input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:var(--focus);background:var(--surface-raised);}
select{cursor:pointer;}
textarea{resize:vertical;min-height:44px;}
label{display:block;font-size:11px;color:var(--text-muted);margin-bottom:2px;letter-spacing:0.5px;}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:8px 16px;border:1px solid transparent;border-radius:var(--radius);cursor:pointer;font-size:13px;font-weight:650;transition:background .16s,border-color .16s,color .16s,transform .16s,box-shadow .16s;white-space:nowrap;}
.btn-primary{background:var(--accent);color:#fff;}
.btn-primary:hover{background:var(--accent-hover);box-shadow:0 8px 18px rgba(79,140,255,0.22);transform:translateY(-1px);}
.btn-outline{background:var(--surface-soft);border:1px solid var(--border);color:var(--text-muted);}
.btn-outline:hover{border-color:var(--accent);color:var(--accent);background:var(--accent-bg);}
.btn-danger{background:var(--danger);color:white;}
.btn-danger:hover{box-shadow:0 8px 18px rgba(239,92,92,0.18);transform:translateY(-1px);}
.btn-sm{min-height:28px;padding:4px 10px;font-size:11px;}
.btn:active{transform:translateY(0);}
.btn:focus-visible,a:focus-visible,.modal-close:focus-visible{outline:none;box-shadow:var(--focus);}
.hidden{display:none !important;}
.filtered-out{display:none !important;}

/* 登录 */
.login-page{display:flex;align-items:center;justify-content:center;min-height:100vh;background:radial-gradient(circle at 50% 0%,rgba(79,140,255,0.08),transparent 34%),var(--bg);padding:20px;}
.login-box{background:linear-gradient(180deg,var(--surface),var(--bg3));border:1px solid var(--border);border-radius:16px;padding:40px;width:100%;max-width:400px;box-shadow:var(--shadow);}
.login-box h1{font-size:32px;color:var(--brand);text-align:center;margin-bottom:4px;}
.login-box .subtitle{font-size:13px;color:var(--text-muted);text-align:center;margin-bottom:30px;}
.login-box .form-group{margin-bottom:14px;}
.login-box .btn-primary{width:100%;padding:12px;font-size:16px;margin-top:8px;}
.login-box .hint{text-align:center;font-size:11px;color:var(--text-dim);margin-top:12px;}

/* 布局 */
.app-layout{display:flex;min-height:100vh;}
.sidebar{width:208px;background:linear-gradient(180deg,var(--surface),var(--bg2));border-right:1px solid var(--border);display:flex;flex-direction:column;position:fixed;top:0;left:0;bottom:0;z-index:100;}
.sidebar .logo{padding:16px 14px;border-bottom:1px solid var(--border);}
.sidebar .logo h2{font-size:17px;color:var(--brand);}
.sidebar .logo .role{font-size:10px;color:var(--text-dim);margin-top:3px;}
.sidebar nav{flex:1;overflow-y:auto;padding:8px;}
.sidebar nav a{display:flex;align-items:center;gap:8px;min-height:34px;padding:8px 10px;border-radius:7px;color:var(--text-muted);font-size:12px;transition:background .15s,color .15s,border-color .15s;margin-bottom:2px;border:1px solid transparent;}
.sidebar nav a:hover{background:var(--bg5);color:var(--text);border-color:var(--border);}
.sidebar nav a.active{background:var(--accent-bg);color:var(--accent);font-weight:650;border-color:rgba(79,140,255,0.30);}
.sidebar .logout{padding:12px 14px;border-top:1px solid var(--border);display:flex;align-items:center;gap:7px;font-size:12px;color:var(--text-muted);cursor:pointer;}
.sidebar .logout:hover{color:var(--danger);}
.role-view-section{margin-top:16px;padding-top:12px;border-top:1px solid var(--border);}
.role-view-title{font-size:10px;color:var(--text-dim);text-transform:uppercase;letter-spacing:1px;margin-bottom:8px;padding:0 10px;}
.role-view-list{display:flex;flex-wrap:wrap;gap:6px;padding:0 10px;}
.role-view-btn{background:var(--bg4);border:1px solid var(--border);color:var(--text-muted);border-radius:var(--radius);padding:4px 8px;font-size:11px;cursor:pointer;transition:all .15s;}
.role-view-btn:hover{border-color:var(--accent);color:var(--accent);}
.role-view-btn.active{background:var(--accent-bg);border-color:var(--accent);color:var(--accent);font-weight:600;}
.role-view-btn.reset{border-color:var(--danger);color:var(--danger);}
.role-view-btn.reset:hover{background:rgba(244,67,54,0.1);}
.group-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin-bottom:16px;padding:8px 0;border-bottom:1px solid var(--border);font-size:12px;}
.group-tab{background:transparent;border:1px solid var(--border);color:var(--text-muted);border-radius:var(--radius);padding:6px 16px;font-size:13px;cursor:pointer;transition:all .15s;}
.group-tab:hover{border-color:var(--accent);color:var(--accent);}
.group-tab.active{background:var(--accent-bg);border-color:var(--accent);color:var(--accent);font-weight:600;}
.group-check{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--text-muted);cursor:pointer;white-space:nowrap;}
.group-check input[type="checkbox"]{accent-color:var(--accent);}
.main-content{flex:1;min-width:0;width:calc(100% - 208px);margin-left:208px;padding:18px 22px 28px;}

/* 页面头部 */
.page-header{margin-bottom:12px;position:relative;}
.page-header h1{font-size:18px;font-weight:700;display:flex;align-items:center;gap:8px;}
.admin-manage-header{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;}
.admin-manage-header h1{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.page-action-btn{flex:0 0 auto;margin-left:auto;}

/* 统计卡片 */
.stats-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin-bottom:14px;}
.stat-card{min-width:0;background:linear-gradient(180deg,var(--surface),var(--bg3));border:1px solid var(--border);border-radius:var(--radius);padding:12px 14px;box-shadow:0 8px 20px rgba(0,0,0,0.16);}
.stat-label{font-size:10px;color:var(--text-muted);margin-bottom:2px;letter-spacing:0.5px;}
.stat-value{max-width:100%;font-size:22px;font-weight:700;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;}
.amount-summary-panel{display:grid;grid-template-columns:minmax(150px,auto) minmax(220px,340px) minmax(0,1fr);gap:10px 14px;align-items:center;margin:-4px 0 14px;padding:10px 12px;background:var(--bg2);border:1px solid var(--border);border-radius:var(--radius);}
.amount-summary-title{min-width:0;display:flex;flex-direction:column;gap:2px;}
.amount-summary-title strong{font-size:12px;color:var(--accent);line-height:1.2;}
.amount-summary-title span{font-size:11px;color:var(--text-dim);line-height:1.35;}
.amount-summary-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0;}
.amount-mini-card{min-width:0;padding:8px 10px;border:1px solid var(--border);border-radius:7px;background:linear-gradient(180deg,var(--surface),var(--bg3));}
.amount-mini-card .stat-value{font-size:19px;}
.amount-shipped{color:var(--success);}
.amount-unfinished{color:var(--warning);}
.amount-filter-panel{min-width:0;}
.amount-filter-fields{display:flex;align-items:end;justify-content:flex-end;gap:8px;min-width:0;flex-wrap:wrap;}
.amount-filter-fields label{display:grid;gap:3px;min-width:118px;}
.amount-filter-fields label span{font-size:10px;color:var(--text-dim);line-height:1;}
.amount-filter-fields input[type="date"]{width:132px;max-width:100%;height:30px;padding:4px 7px;font-size:12px;border:1px solid var(--border);border-radius:6px;background:var(--bg4);color:var(--text);}
.amount-filter-fields .btn{height:30px;padding:4px 10px;font-size:12px;}
.amount-filter-fields .btn:disabled{opacity:.45;cursor:not-allowed;}
.date-stack{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:48px;line-height:1.05;vertical-align:middle;font-variant-numeric:tabular-nums;}
.date-stack b{font-size:10px;color:var(--text-dim);font-weight:650;}
.date-stack em{font-style:normal;font-size:12px;color:var(--text);font-weight:750;white-space:nowrap;}
.finance-filter-pop{padding:4px 6px;background:var(--bg4);border-bottom:1px solid var(--border);}
.finance-filter-inline,.finance-amount-inline{display:flex;align-items:center;gap:4px;min-width:0;}
.finance-filter-inline select{width:118px;height:26px;padding:3px 7px;font-size:11px;border-radius:5px;}
.finance-amount-inline input{width:64px;height:26px;padding:3px 6px;font-size:11px;text-align:right;border-radius:5px;}
.finance-filter-inline button,.finance-amount-inline button{flex:0 0 auto;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:transparent;border:0;color:var(--text-dim);cursor:pointer;font-size:14px;border-radius:5px;}
.finance-filter-inline button:hover,.finance-amount-inline button:hover{color:var(--danger);background:rgba(240,95,103,.12);}

/* ===== 表单 - 核心布局 ===== */
.form-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:20px;box-shadow:0 10px 26px rgba(0,0,0,0.16);}
.form-section{margin-bottom:24px;}
.form-section:last-child{margin-bottom:0;}
.form-section h3{font-size:12px;color:var(--accent);letter-spacing:1.5px;margin-bottom:12px;text-transform:uppercase;border-bottom:2px solid var(--accent);padding-bottom:8px;font-weight:600;}

/* 统一 6 列网格：列等宽，紧凑框靠左、文本框撑满 */
.form-grid{display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr;gap:10px 10px;align-items:start;}
.form-grid .form-group.full{grid-column:span 6;}
.form-grid .form-group.half{grid-column:span 3;}
.form-grid .form-group.third{grid-column:span 2;}
.form-grid .form-group.two-thirds{grid-column:span 4;}

/* 只有 textarea 撑满；其它输入框保持紧凑宽度、靠左 */
.form-grid .form-group textarea{width:100%;}
.form-grid .form-group input[type="text"],
.form-grid .form-group input[type="password"]{width:auto;min-width:120px;}
.form-grid .form-group input[type="number"]{width:120px;text-align:right;}
.form-grid .form-group input[type="date"]{width:150px;}
.form-grid .form-group select{width:auto;min-width:100px;}

/* 表单项 */
.form-group{margin-bottom:0;position:relative;padding:2px 0;}
.form-group label{font-size:12px;color:var(--text-muted);margin-bottom:4px;display:block;font-weight:500;letter-spacing:0.3px;}

/* 新建生产单：基础信息区专用布局 */
.new-order-basic-grid{display:grid;grid-template-columns:minmax(0,0.58fr) minmax(300px,1fr);gap:10px 12px;align-items:start;}
#newOrderForm{padding:16px;}
#newOrderForm .form-section h3{margin-bottom:10px;padding-bottom:8px;font-size:14px;}
.new-order-basic-left{display:flex;flex-direction:column;gap:7px;min-width:0;}
.new-order-basic-left .form-row{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap;margin:0;}
.new-order-basic-left .form-group{margin:0;}
.new-order-basic-left .order-main-row,
.new-order-basic-left .order-date-row,
.new-order-basic-left .order-channel-row,
.new-order-basic-left .order-amount-row,
.new-order-basic-left .order-platform-row,
.new-order-basic-left .order-corp-row,
.new-order-basic-left .order-extra-row{display:grid;gap:6px;align-items:start;width:100%;flex-wrap:unset;}
.new-order-basic-left .order-main-row{grid-template-columns:86px 126px 118px 178px;max-width:540px;}
.new-order-basic-left .order-date-row{grid-template-columns:132px 156px;max-width:300px;}
.new-order-basic-left .order-channel-row{grid-template-columns:112px 116px;max-width:240px;}
.new-order-basic-left .order-amount-row{grid-template-columns:132px minmax(250px,1fr) minmax(170px,0.8fr);max-width:560px;}
.new-order-basic-left .order-platform-row{grid-template-columns:minmax(170px,1fr) minmax(170px,1fr);max-width:450px;}
.new-order-basic-left .order-corp-row,
.new-order-basic-left .order-extra-row{grid-template-columns:minmax(220px,1fr);}
.new-order-basic-left .order-main-row .form-group,
.new-order-basic-left .order-date-row .form-group,
.new-order-basic-left .order-channel-row .form-group,
.new-order-basic-left .order-amount-row .form-group,
.new-order-basic-left .order-platform-row .form-group,
.new-order-basic-left .order-corp-row .form-group,
.new-order-basic-left .order-extra-row .form-group{min-width:0;width:100%;}
.new-order-basic-left .order-main-row input,
.new-order-basic-left .order-main-row select,
.new-order-basic-left .order-date-row input,
.new-order-basic-left .order-channel-row select,
.new-order-basic-left .order-channel-row input,
.new-order-basic-left .order-amount-row input,
.new-order-basic-left .order-platform-row input,
.new-order-basic-left .order-corp-row input,
.new-order-basic-left .order-extra-row input{width:100%!important;min-width:0!important;}
.new-order-basic-left .order-channel-row #orderPriceNote{width:100%!important;min-width:0!important;}
#newOrderForm input,
#newOrderForm select,
#newOrderForm textarea{text-align:left!important;}
.new-order-basic-left input,
.new-order-basic-left select,
.new-order-basic-right textarea{height:34px!important;font-size:13px!important;padding:7px 10px!important;border-radius:6px!important;}
.new-order-basic-left .field-hint,
.new-order-basic-right .field-hint{font-size:10px;line-height:1.25;margin-top:3px;}
.new-order-basic-left #orderGroup{width:86px;}
.new-order-basic-left .order-group-mode{width:100%;min-width:0;}
.order-group-mode-control{height:34px;display:flex;align-items:stretch;border:1px solid var(--border);background:var(--bg3);overflow:hidden;transition:border-color .15s,box-shadow .15s;}
.order-native-group{min-width:86px;display:flex;align-items:center;justify-content:center;gap:5px;padding:0 9px;border-right:1px solid var(--border);white-space:nowrap;}
.order-native-group b{font-size:13px;color:var(--text);}.order-native-group small{font-size:9px;color:var(--text-dim);}
.order-shared-toggle{display:flex;align-items:center;justify-content:center;gap:6px;flex:1;padding:0 9px;cursor:pointer;color:var(--text-muted);white-space:nowrap;user-select:none;}
.order-shared-toggle input{width:14px!important;height:14px!important;min-width:14px;margin:0;accent-color:var(--warning);}
.order-shared-toggle span{font-size:12px;font-weight:700;}
.order-group-mode-control.is-shared{border-color:rgba(214,170,88,.75);box-shadow:0 0 0 1px rgba(214,170,88,.18);}
.order-group-mode-control.is-shared .order-shared-toggle{color:var(--warning);background:rgba(214,170,88,.08);}
@media(max-width:640px){.new-order-basic-left .order-group-mode{width:100%;min-width:0}.order-native-group{min-width:92px}.order-shared-toggle{justify-content:flex-start}}
.new-order-basic-left #orderSalespersonName{width:126px;}
.new-order-basic-left #orderCustomer{width:118px;}
.new-order-basic-left #orderPhone{width:178px;}
.new-order-basic-left #orderDate,
.new-order-basic-left #orderDeadline{width:150px;}
.new-order-basic-left #orderPrice{width:130px;}
.new-order-basic-left #orderPriceNote{width:100%!important;}
.new-order-basic-left #depositFields{display:none;align-items:flex-start;gap:8px;flex-wrap:nowrap;min-width:0;}
.new-order-basic-left #depositFields .form-group{flex:1 1 0;min-width:0;}
.new-order-basic-right{min-width:0;}
.new-order-basic-right .form-row-full,
.new-order-basic-right .form-group{height:100%;}
.new-order-basic-right #orderAddress{width:100%;height:112px!important;min-height:112px!important;max-height:112px!important;resize:none;line-height:1.45;}
#collaboratorRow{margin-top:0;}
#collaboratorRow #collabList{display:inline-flex!important;flex-direction:column!important;align-items:flex-start!important;min-height:34px;width:fit-content!important;max-width:100%;padding:4px 7px;border:1px solid var(--border);border-radius:6px;background:rgba(255,255,255,0.02);}
#collaboratorRow .collab-tools{display:flex;align-items:center;gap:5px;margin-bottom:4px;white-space:nowrap;width:auto;}
#collaboratorRow .collab-items{display:flex;flex-wrap:wrap;gap:4px;align-items:center;width:auto;}
#collaboratorRow .collab-title{font-size:11px;color:var(--text-dim);margin-right:4px;white-space:nowrap;}
#collaboratorRow .collab-item{display:inline-flex;gap:4px;align-items:center;}
#collaboratorRow .collab-name{width:96px!important;}
#collaboratorRow .collab-pct{width:104px!important;}
#collaboratorRow .collab-percent-mark{font-size:11px;color:var(--text-dim);}
#collaboratorRow .collab-remove-btn{width:22px;height:22px;line-height:18px;border:1px solid var(--border);border-radius:6px;background:transparent;color:var(--danger);cursor:pointer;padding:0;font-size:14px;}
#collaboratorRow .collab-remove-btn:hover{background:rgba(255,77,87,0.12);border-color:var(--danger);}
#collaboratorRow .collab-add-btn{padding:2px 7px!important;font-size:12px!important;height:24px!important;min-height:24px!important;flex:0 0 auto;}
#collaboratorRow .collab-hint{font-size:10px;color:var(--text-dim);margin-left:2px;white-space:nowrap;}
.new-order-basic-left .order-flags-line{display:flex!important;width:100%;max-width:560px;margin:0;gap:0;}
.new-order-basic-left .order-flags-row{align-self:center;padding-top:0;width:100%;}
.new-order-basic-left .order-flag-checks{display:flex;align-items:center;gap:10px;min-height:28px;flex:0 0 auto;}
.new-order-basic-left .order-flag-check{font-size:12px;line-height:1;color:var(--text);}
.new-order-basic-left .order-flag-check input{width:13px!important;height:13px!important;margin:0 4px 0 0;vertical-align:-2px;}
.new-order-basic-left .supplier-select-wrap{height:34px;min-width:220px;max-width:260px;}
@media(max-width:1100px){
  .new-order-basic-grid{grid-template-columns:1fr;gap:12px;}
  .new-order-basic-left .order-main-row{grid-template-columns:96px minmax(126px,1fr) minmax(118px,1fr) minmax(160px,1.2fr);max-width:none;}
  .new-order-basic-left .order-date-row{grid-template-columns:132px 156px;max-width:300px;}
  .new-order-basic-left .order-channel-row{grid-template-columns:112px 116px;}
  .new-order-basic-left .order-amount-row{grid-template-columns:132px minmax(240px,1fr) minmax(160px,0.8fr);}
  .new-order-basic-right #orderAddress{height:96px;min-height:96px;}
}
@media(max-width:760px){
  #collaboratorRow #collabList{width:100%;}
  .new-order-basic-left .order-main-row{grid-template-columns:96px 1fr;}
  .new-order-basic-left .order-main-row .form-group:nth-child(2),
  .new-order-basic-left .order-main-row .form-group:nth-child(3),
  .new-order-basic-left .order-main-row .form-group:nth-child(4){grid-column:span 2;}
  .new-order-basic-left .order-date-row,
  .new-order-basic-left .order-channel-row,
  .new-order-basic-left .order-amount-row,
  .new-order-basic-left .order-platform-row{grid-template-columns:1fr;}
  .new-order-basic-left #depositFields{flex-wrap:wrap;}
  .new-order-basic-left #depositFields .form-group{flex:1 1 130px;}
}

/* 所有输入框统一基础 */
.form-group input,.form-group select,.form-group textarea{
  padding:8px 10px;height:38px;background:var(--bg4);border:1px solid var(--border);
  color:var(--text);border-radius:var(--radius);font-size:14px;transition:all 0.2s;box-sizing:border-box;
}
.form-group input:focus,.form-group select:focus,.form-group textarea:focus{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-bg);}
.form-group input[type="checkbox"],.form-group input[type="radio"]{width:auto;height:auto;padding:0;border:none;background:none;box-shadow:none;accent-color:var(--accent);}
datalist{display:none!important;}
.form-group>label:has(input[type="checkbox"]){display:flex!important;align-items:center;height:38px;padding:0 10px;border:1px solid var(--border);border-radius:var(--radius);background:var(--bg4);cursor:pointer;font-size:14px;color:var(--text);gap:6px;margin:0;}
.form-group>label:has(input[type="checkbox"]) input[type="checkbox"]{width:18px;height:18px;}
.invite-toolbar .form-group input[type="number"]{width:70px;min-width:50px;}
.invite-toolbar{flex-wrap:nowrap!important;overflow-x:auto;}

/* 文本输入（非网格时）：自适应不撑满 */
.form-group input[type="text"],
.form-group input[type="password"]{width:auto;min-width:120px;}

/* textarea：撑满格子 */
.form-group textarea{width:100%;height:auto;min-height:44px;resize:vertical;font-size:13px;}

/* 数字输入：固定宽度，右对齐 */
.form-group input[type="number"]{width:120px;text-align:right;}

/* 下拉选择：自适应不撑满 */
.form-group select{width:auto;min-width:100px;cursor:pointer;}

/* 日期输入：固定宽度 */
.form-group input[type="date"]{width:150px;}
.form-group.wide{grid-column:span 2;}
.form-group.full{grid-column:span 3;}

/* 特殊字段样式 */
.form-group input[type="date"]{padding-right:12px;}

/* 产品条目 */
.product-entry{background:var(--surface-soft);border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:16px;}
.product-entry-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding-bottom:8px;border-bottom:1px solid var(--border);}
.product-entry h4{font-size:13px;color:var(--accent);letter-spacing:0.5px;font-weight:600;margin:0;}
.product-entry .form-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:10px 10px;align-items:start;}
.product-entry .form-grid .form-group.full{grid-column:span 6;}
.product-entry .form-grid .form-group.half{grid-column:span 3;}
.product-entry .form-grid .form-group.third{grid-column:span 2;}
.product-entry .form-grid .form-group.two-thirds{grid-column:span 4;}
.product-entry .form-grid .form-group textarea{width:100%;}
.product-entry .form-grid .form-group input[type="text"],
.product-entry .form-grid .form-group input[type="password"]{width:auto;min-width:120px;}
.product-entry .form-grid .form-group input[type="number"]{width:120px;text-align:right;}
.product-entry .form-grid .form-group input[type="date"]{width:150px;}
.product-entry .form-grid .form-group select{width:auto;min-width:100px;}
.product-dimensions{display:flex;flex-direction:column;gap:7px;width:100%;margin:0 0 10px;}
.product-dimension-row{display:grid;grid-template-columns:max-content 34px;align-items:start;gap:7px;width:100%;min-width:0;}
.product-dimension-fields{display:grid;grid-template-columns:repeat(3,minmax(96px,120px));align-items:start;gap:7px;min-width:0;}
.product-dimension-fields .form-group{display:grid;grid-template-rows:36px auto;align-content:start;width:100%;min-width:0;margin:0;padding:0!important;}
.product-dimension-fields input{display:block;width:100%!important;min-width:0!important;height:36px!important;min-height:36px!important;max-height:36px!important;margin:0!important;text-align:left!important;}
.product-dimension-action{grid-column:2;grid-row:1;align-self:start!important;width:34px!important;min-width:34px!important;max-width:34px!important;height:36px!important;min-height:36px!important;max-height:36px!important;margin:0!important;padding:0!important;box-sizing:border-box;border:1px solid var(--border-light);border-radius:5px;background:var(--bg5);color:var(--text);font-size:18px;line-height:1;cursor:pointer;transition:border-color .16s,background .16s,color .16s;}
.product-dimension-add:hover{border-color:var(--accent);background:var(--accent-bg);color:var(--accent);}
.product-dimension-remove{color:var(--danger);}
.product-dimension-remove:hover{border-color:var(--danger);background:rgba(244,67,54,.08);}
.product-paint-supplier-group{min-width:220px!important;align-self:start;}
.product-paint-suppliers{display:flex;flex-direction:column;gap:7px;width:100%;min-width:0;}
.product-paint-supplier-row{display:grid;grid-template-columns:minmax(150px,1fr) 34px;align-items:start;gap:7px;width:100%;min-width:0;}
.product-paint-supplier-row select{display:block;width:100%!important;min-width:0!important;height:36px!important;min-height:36px!important;margin:0!important;}
.product-paint-supplier-action{width:34px!important;min-width:34px!important;max-width:34px!important;height:36px!important;min-height:36px!important;max-height:36px!important;margin:0!important;padding:0!important;box-sizing:border-box;border:1px solid var(--border-light);border-radius:5px;background:var(--bg5);color:var(--text);font-size:18px;line-height:1;cursor:pointer;transition:border-color .16s,background .16s,color .16s;}
.product-paint-supplier-add:hover{border-color:var(--accent);background:var(--accent-bg);color:var(--accent);}
.product-paint-supplier-remove{color:var(--danger);}
.product-paint-supplier-remove:hover{border-color:var(--danger);background:rgba(244,67,54,.08);}

/* 图片上传 */
.upload-area{border:1px dashed var(--border-light);border-radius:var(--radius);padding:16px;text-align:center;cursor:pointer;transition:background .16s,border-color .16s,color .16s;background:var(--bg5);}
.upload-area:hover{border-color:var(--accent);background:var(--accent-bg);}
.upload-area:focus{outline:2px solid var(--accent);outline-offset:2px;border-color:var(--accent);background:var(--accent-bg);}
.upload-area p{font-size:12px;color:var(--text-muted);margin:0;}
.image-preview-grid{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px;}
.image-preview-item{width:100px;height:80px;border-radius:6px;overflow:hidden;border:1px solid var(--border);position:relative;background:var(--bg5);}
.image-preview-item img{width:100%;height:100%;object-fit:cover;}
.image-preview-item img.form-image-zoomable{cursor:zoom-in;transition:filter .16s ease,transform .16s ease;}
.image-preview-item img.form-image-zoomable:hover{filter:brightness(1.12);transform:scale(1.025);}
.image-preview-item img.form-image-zoomable:focus-visible{outline:2px solid #d8b66f;outline-offset:-3px;filter:brightness(1.12);}
.image-preview-item .remove-img{position:absolute;top:4px;right:4px;background:rgba(0,0,0,0.7);color:white;border:none;border-radius:50%;width:20px;height:20px;cursor:pointer;font-size:12px;display:flex;align-items:center;justify-content:center;transition:all 0.2s;}
.image-preview-item .remove-img:hover{background:var(--danger);border-color:var(--danger);}

/* 操作栏 */
.form-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:20px;padding-top:16px;border-top:1px solid var(--border);}

/* 表格 */
.order-table{overflow-x:auto;border-radius:var(--radius);border:1px solid var(--border);background:var(--surface);box-shadow:0 10px 24px rgba(0,0,0,0.16);}
.order-table table{width:100%;border-collapse:collapse;}
.order-table th{background:var(--surface-soft);padding:12px 16px;font-size:11px;color:var(--text-muted);text-align:left;letter-spacing:0.5px;text-transform:uppercase;font-weight:650;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:1;}
.order-table td{padding:12px 16px;font-size:13px;border-bottom:1px solid rgba(48,58,70,0.75);white-space:nowrap;vertical-align:middle;}
.clickable-row{cursor:pointer;transition:all 0.15s;}
.clickable-row:hover{background:rgba(79,140,255,0.08);transform:translateY(-1px);box-shadow:0 2px 8px rgba(0,0,0,0.14);}

/* 状态标签 */
.status-badge{padding:4px 10px;border-radius:20px;font-size:11px;font-weight:600;display:inline-block;}
.status-pending{background:rgba(245,185,66,.12);color:#f5b942;border-color:rgba(245,185,66,.38);}
.status-confirmed{background:rgba(45,212,191,.11);color:#2dd4bf;border-color:rgba(45,212,191,.38);}
.status-producing{background:rgba(167,139,250,.12);color:#a78bfa;border-color:rgba(167,139,250,.40);}
.status-completed{background:rgba(52,208,88,.11);color:#34d058;border-color:rgba(52,208,88,.38);}
.status-shipped{background:rgba(59,130,246,.12);color:#3b82f6;border-color:rgba(59,130,246,.44);font-weight:700;}
.status-received{background:rgba(148,163,184,.08);color:#94a3b8;border-color:rgba(148,163,184,.30);font-weight:700;}
.status-offline{background:rgba(141,152,159,.08);color:#8d989f;border-color:rgba(141,152,159,.26);}
.status-cancelled{background:rgba(244,63,94,.11);color:#f43f5e;border-color:rgba(244,63,94,.38);text-decoration:line-through;}
.order-flag-badge{margin-left:6px;border:1px solid transparent;vertical-align:middle;}
.order-flag-urgent{background:rgba(244,67,54,0.14);color:var(--danger);border-color:rgba(244,67,54,0.34);}
.order-flag-water{background:rgba(201,169,110,0.14);color:var(--accent);border-color:rgba(201,169,110,0.36);}
.order-flag-repeat{background:rgba(47,202,122,0.12);color:var(--success);border-color:rgba(47,202,122,0.30);}
.order-flag-sample{background:rgba(246,178,63,0.12);color:var(--warning);border-color:rgba(246,178,63,0.32);}
.order-flag-supplier{background:rgba(212,173,104,0.12);color:var(--brand);border-color:rgba(212,173,104,0.34);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.order-table td.mobile-card-status{width:1%;min-width:92px;max-width:180px;overflow:visible;white-space:normal;}
.order-row-flags{display:inline-flex;align-items:center;gap:4px;margin-left:6px;vertical-align:middle;flex-wrap:wrap;}
.order-row-flag{display:inline-flex;align-items:center;gap:3px;min-height:17px;padding:1px 6px;border:1px solid rgba(255,255,255,.15);border-radius:999px;background:rgba(255,255,255,.045);font-size:10px;font-weight:800;line-height:1.1;white-space:nowrap;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);}
.order-row-flag i{width:5px;height:5px;border-radius:50%;background:currentColor;box-shadow:0 0 7px currentColor;flex:0 0 auto;}
.order-row-flag-urgent{color:#ff737d;border-color:rgba(255,115,125,.34);background:rgba(255,115,125,.12);}
.order-row-flag-repeat{color:#56d28d;border-color:rgba(86,210,141,.30);background:rgba(86,210,141,.10);}
.order-row-flag-sample{color:#f3c66f;border-color:rgba(243,198,111,.34);background:rgba(243,198,111,.10);}
.order-row-flag-water{color:#73b7ff;border-color:rgba(115,183,255,.32);background:rgba(115,183,255,.10);}
.sales-balance-summary{display:flex;align-items:center;gap:11px;margin:0 0 12px;padding:10px 13px;border:1px solid rgba(240,190,92,.42);border-left:3px solid #e6b64f;border-radius:6px;background:linear-gradient(90deg,rgba(218,153,42,.16),rgba(218,153,42,.055));color:#e6c47a;box-shadow:inset 0 1px 0 rgba(255,255,255,.025);}
.sales-balance-summary-icon{position:relative;width:10px;height:10px;border-radius:50%;background:#f0bd58;box-shadow:0 0 0 4px rgba(240,189,88,.12),0 0 14px rgba(240,189,88,.46);flex:0 0 auto;animation:salesBalancePulse 1.8s ease-in-out infinite;}
.sales-balance-summary>div{display:flex;align-items:baseline;gap:9px;min-width:0;flex-wrap:wrap;}
.sales-balance-summary strong{color:#f1ce83;font-size:12px;white-space:nowrap;}
.sales-balance-summary span:not(.sales-balance-summary-icon){color:#bdad8d;font-size:11px;line-height:1.45;}
.sales-balance-summary b{color:#ffd67c;font-size:13px;}
.sales-balance-row-badge{display:flex;align-items:center;width:max-content;margin:4px 0 0;padding:2px 6px;border:1px solid rgba(240,189,88,.42);border-radius:999px;background:rgba(218,153,42,.13);color:#f0c66d;font-size:9px;font-weight:800;line-height:1.2;white-space:nowrap;vertical-align:middle;box-shadow:0 0 10px rgba(218,153,42,.08);}
.sales-balance-row-badge::before{content:"";width:5px;height:5px;margin-right:4px;border-radius:50%;background:#f0bd58;box-shadow:0 0 7px rgba(240,189,88,.68);}
@keyframes salesBalancePulse{0%,100%{transform:scale(.9);opacity:.72}50%{transform:scale(1.08);opacity:1}}
@media (prefers-reduced-motion:reduce){.sales-balance-summary-icon{animation:none}}
.order-flag-checks{display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:nowrap;}
.order-flag-check{display:flex;align-items:center;gap:4px;font-size:12px;cursor:pointer;white-space:nowrap;}
.order-flag-check.urgent{color:var(--danger);}
.order-flag-check.water{color:var(--accent);}
.order-flag-check.repeat{color:var(--success);}
.order-flag-check.sample{color:var(--warning);}
.order-flags-line{display:flex;align-items:center;margin-top:2px;margin-bottom:4px;}
.order-flags-line .form-group{margin-bottom:0;}
.order-flags-row{display:flex;flex-direction:row!important;align-items:center;justify-content:flex-start;gap:8px 12px;flex-wrap:wrap;min-width:0;width:100%;padding:0;}
.order-flags-row .order-flag-checks{flex:0 0 auto;}
.order-flags-row .supplier-select-wrap{display:flex;align-items:center;gap:6px;min-width:220px;max-width:270px;flex:0 1 270px;}
.order-flags-row .supplier-select-wrap label{margin:0;white-space:nowrap;font-size:11px;color:var(--text-muted);flex:0 0 auto;}
.order-flags-row .supplier-select-wrap select,
.order-flags-row .supplier-select-wrap input{height:34px;min-width:0;width:100%;font-size:12px;padding:6px 8px;}
@media(max-width:640px){
  .order-flags-row{gap:6px;}
  .order-flag-checks{gap:6px;flex-wrap:wrap;}
  .order-flag-check{font-size:11px;}
  .order-flags-row .supplier-select-wrap{flex:1 1 100%;max-width:none;min-width:0;}
  .order-flags-row .supplier-select-wrap label{width:100%;line-height:1.2;}
  .order-flags-row .supplier-select-wrap select,
  .order-flags-row .supplier-select-wrap input{height:32px;}
}
.tracker-main-text{display:inline-flex;align-items:center;min-width:0;max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;}
.tracker-stage-chip{gap:4px;max-width:230px;padding:3px 8px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(255,255,255,.05);font-weight:750;line-height:1.25;box-shadow:inset 0 0 0 1px rgba(255,255,255,.02);}
.tracker-stage-iron{color:#f1c982!important;background:rgba(201,169,110,.13);border-color:rgba(201,169,110,.42);}
.tracker-stage-paint{color:#62d8a6!important;background:rgba(47,202,122,.12);border-color:rgba(47,202,122,.38);}
.tracker-stage-tabletop{color:#e8a6ff!important;background:rgba(209,111,255,.12);border-color:rgba(209,111,255,.40);}
.tracker-stage-logo{color:#67e8f9!important;background:rgba(34,211,238,.11);border-color:rgba(34,211,238,.40);}
.tracker-stage-upholstery{color:#ff9f6e!important;background:rgba(251,146,60,.11);border-color:rgba(251,146,60,.40);}
.tracker-stage-packaging{color:#9db8ff!important;background:rgba(110,137,255,.13);border-color:rgba(110,137,255,.40);}
.tracker-stage-pending{color:#f5b942!important;background:rgba(245,185,66,.12);border-color:rgba(245,185,66,.40);}
.tracker-stage-dispatched{color:#2dd4bf!important;background:rgba(45,212,191,.11);border-color:rgba(45,212,191,.40);}
.tracker-stage-completed{color:var(--success)!important;background:rgba(47,202,122,.13);border-color:rgba(47,202,122,.42);}
.tracker-stage-received{color:#94a3b8!important;background:rgba(148,163,184,.08);border-color:rgba(148,163,184,.30);}
.tracker-stage-shipped{color:#3b82f6!important;background:rgba(59,130,246,.12);border-color:rgba(59,130,246,.44);}
.tracker-stage-overdue,.tracker-stage-deadline{color:var(--danger)!important;background:rgba(240,95,103,.13);border-color:rgba(240,95,103,.46);}
.tracker-stage-active{color:var(--text)!important;background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.16);}
.tracker-overdue-badge{display:inline-flex;align-items:center;margin-left:6px;padding:2px 6px;border:1px solid rgba(244,67,54,0.42);border-radius:999px;background:rgba(244,67,54,0.12);color:var(--danger);font-size:10px;font-weight:750;line-height:1.2;white-space:nowrap;vertical-align:middle;}
.tracker-checkpoint-dialog h3{margin:0 0 14px;color:var(--accent);font-size:18px;}
.tracker-checkpoint-order{margin-bottom:14px;padding:9px 11px;border-radius:8px;background:var(--bg4);color:var(--text-muted);font-size:13px;}
.tracker-checkpoint-title{margin-bottom:10px;color:var(--text);font-size:15px;font-weight:750;}
.tracker-checkpoint-due{margin-bottom:14px;padding:9px 11px;border:1px solid rgba(201,169,110,.35);border-radius:8px;background:rgba(201,169,110,.09);color:var(--text-muted);font-size:12px;line-height:1.5;}
.tracker-checkpoint-due.overdue{border-color:rgba(240,95,103,.48);background:rgba(240,95,103,.12);color:var(--danger);}
.tracker-checkpoint-complete{margin-bottom:18px;padding:11px 12px;border:1px solid rgba(52,208,88,.32);border-radius:8px;background:rgba(52,208,88,.08);color:var(--success);font-size:13px;}
.order-table td.mobile-card-tracker{max-width:300px;overflow:visible;white-space:normal;text-align:left;}
.supplier-signal{display:inline-grid;grid-template-columns:auto auto minmax(0,1fr);align-items:center;gap:4px;max-width:170px;margin:2px 4px 2px 0;padding:2px 7px;border:1px solid rgba(255,255,255,.14);border-radius:999px;background:rgba(255,255,255,.045);font-size:12px;font-weight:750;line-height:1.25;vertical-align:middle;white-space:nowrap;}
.supplier-signal i{width:7px;height:7px;border-radius:50%;box-shadow:0 0 8px currentColor;background:currentColor;}
.supplier-signal b{font-weight:800;}
.supplier-signal em{font-style:normal;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.supplier-signal-iron{color:#76a7ff;border-color:rgba(79,140,255,.36);background:rgba(79,140,255,.10);}
.supplier-signal-paint{color:#62d8a6;border-color:rgba(47,202,122,.38);background:rgba(47,202,122,.10);}
.production-source-cell{display:flex;align-items:center;gap:5px;flex-wrap:wrap;max-width:260px;}
.production-source-stage{display:inline-flex;align-items:center;gap:4px;min-width:0;}
.production-source-suppliers{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-width:0;}
.production-source-timeline{cursor:pointer;margin-left:2px;font-size:10px;opacity:.85;}
.warehouse-supplier-info{padding:10px 12px;background:rgba(79,140,255,.08);border:1px solid rgba(79,140,255,.28);border-radius:10px;margin:-8px 0 18px;}
.warehouse-supplier-info-title{font-size:12px;color:var(--text-dim);font-weight:700;margin-bottom:7px;}
.warehouse-supplier-info-body{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
.ship-image-list{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;}
.ship-image-thumb{width:96px;height:72px;object-fit:cover;border-radius:6px;border:1px solid var(--border);cursor:zoom-in;background:var(--bg4);transition:border-color .15s ease,transform .15s ease;}
.ship-image-thumb:hover,.ship-image-thumb:focus-visible{border-color:var(--accent);transform:translateY(-1px);outline:none;}
.warehouse-shipment-gallery{width:min(210mm,calc(100% - 24px));margin:12px auto 0;padding:12px 14px;border:1px solid var(--border);border-radius:8px;background:var(--bg2);}
.warehouse-shipment-gallery-title{font-size:13px;font-weight:700;color:var(--text);}
.warehouse-shipment-gallery-title span{margin-left:6px;font-size:11px;font-weight:400;color:var(--text-dim);}
.order-list-thumb-box{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;vertical-align:middle;line-height:1;}
.order-thumb-edit{position:static;width:28px;height:13px;display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--border-light);border-radius:4px;background:var(--bg4);color:var(--accent);font-size:10px;font-weight:800;line-height:1;cursor:pointer;opacity:.42;transition:opacity .12s,background .12s,transform .12s;}
.order-list-thumb-box:hover .order-thumb-edit{opacity:1;background:var(--surface-raised);transform:translateY(-1px);}
.order-thumb-float{position:fixed;left:0;top:0;width:126px;height:126px;padding:6px;border:1px solid var(--border-light);border-radius:9px;background:var(--bg2);box-shadow:0 16px 36px rgba(0,0,0,.48);z-index:99999;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(3px);transition:opacity .1s ease,transform .1s ease;}
.order-thumb-float.show{opacity:1;visibility:visible;transform:translateY(0);}
.order-thumb-float img{width:100%;height:100%;object-fit:contain;border-radius:5px;background:var(--bg3);}

/* 筛选栏 */
.filter-bar{display:flex;gap:8px;margin-bottom:12px;flex-wrap:wrap;align-items:center;}
.filter-bar input,.filter-bar select{width:auto;min-width:130px;}

/* 订单详情 */
.order-detail{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;box-shadow:0 10px 24px rgba(0,0,0,0.14);}
.order-detail h2{font-size:15px;color:var(--accent);margin-bottom:3px;}
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px 16px;margin:10px 0;}
.detail-grid .item{display:flex;gap:6px;font-size:12px;}
.detail-grid .label{color:var(--text-muted);min-width:55px;}
.detail-grid .value{color:var(--text);}
.cancel-info-box{background:rgba(244,67,54,0.08);border:1px solid rgba(244,67,54,0.3);border-radius:var(--radius);padding:10px;margin:10px 0;}

/* 打印条 */
.batch-print-bar{display:flex;align-items:center;justify-content:space-between;background:var(--surface);border:1px solid rgba(79,140,255,0.42);border-radius:var(--radius);padding:10px 12px;margin-bottom:12px;box-shadow:0 8px 20px rgba(0,0,0,0.16);}

/* 记忆下拉 */
.memory-dropdown{position:absolute;background:var(--bg4);border:1px solid var(--border);border-radius:6px;max-height:180px;overflow-y:auto;z-index:50;width:100%;}
.memory-dropdown-item{padding:5px 10px;font-size:12px;cursor:pointer;color:var(--text-muted);}
.memory-dropdown-item:hover{background:var(--bg5);color:var(--text);}

/* 数字输入框箭头隐藏 */
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;}

/* Date picker fix */
input[type="date"]{position:relative;cursor:pointer;}
input[type="date"]::-webkit-calendar-picker-indicator{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;}

/* 模态框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(3, 6, 10, 0.72);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-container {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  max-width: 960px;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-soft);
}

.modal-body {
  padding: 20px;
}
.timeline-modal{max-width:520px;overflow:hidden;}
.timeline-modal .modal-body{display:flex;flex-direction:column;max-height:calc(90vh - 58px);min-height:0;}
.timeline-order-id{font-size:13px;color:var(--text-muted);margin-bottom:12px;padding:10px 12px;background:var(--bg4);border-radius:8px;}
.timeline-order-id strong{color:var(--accent);}
.timeline-list{min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:4px;}
.timeline-actions{display:flex;gap:12px;justify-content:flex-end;border-top:1px solid var(--border);padding-top:14px;margin-top:14px;}

/* 不同大小的模态框 */
.modal-container.small { max-width: 400px; }
.modal-container.large { max-width: 1200px; }
.modal-container.full { max-width: 100%; margin: 0; border-radius: 0; }

/* 图片预览模态框 */
.modal-container.image-preview-modal {
  background: transparent;
  border: none;
  box-shadow: none;
  width: min(96vw, 1600px);
  height: min(92dvh, 1200px);
  max-width: 96vw;
  max-height: 92dvh;
  padding: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Personnel management: one tracker account may manage multiple order groups. */
.tracker-group-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  background: var(--bg4);
}
.tracker-group-choice {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 7px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  background: var(--bg3);
  cursor: pointer;
}
.tracker-group-choice:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg3));
}
.tracker-group-choice-shared {
  border-style: dashed;
}
.tracker-group-choice-shared:has(input:checked) {
  border-style: solid;
}
.tracker-group-choice input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}
.tracker-group-choice span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tracker-group-hint,
.tracker-group-empty {
  display: block;
  margin-top: 7px;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.5;
}
@media (max-width: 560px) {
  .tracker-group-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.modal-container.image-preview-modal img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}
.password-change-overlay{position:fixed;inset:0;z-index:2600;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(2,5,7,.82);backdrop-filter:blur(8px);}
.password-change-panel{width:min(440px,100%);padding:24px;background:var(--bg3);border:1px solid var(--border);border-radius:8px;box-shadow:0 24px 72px rgba(0,0,0,.52);}
.password-change-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:12px;}
.password-change-heading span{display:block;margin-bottom:5px;color:var(--accent);font-size:10px;font-weight:700;}
.password-change-heading h2{margin:0;color:var(--text);font-size:20px;}
.password-change-intro{margin:0 0 18px;color:var(--text-muted);font-size:12px;line-height:1.65;}
.password-policy-hint{margin-top:-4px;color:var(--text-dim);font-size:11px;line-height:1.55;}
.password-change-error{display:none;margin-top:10px;padding:9px 10px;color:#ff8f98;background:rgba(255,73,89,.08);border:1px solid rgba(255,73,89,.28);border-radius:5px;font-size:12px;line-height:1.5;}
.password-change-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:20px;padding-top:16px;border-top:1px solid var(--border);}
.password-change-pending{color:#e7b85d!important;background:rgba(231,184,93,.1)!important;border-color:rgba(231,184,93,.34)!important;}
body.mobile .password-change-overlay{padding:8px;}
body.mobile .password-change-panel{padding:18px 14px;}
body.mobile .password-change-heading h2{font-size:18px;}

.print-crop-modal{max-width:860px;width:min(860px,calc(100vw - 24px));max-height:92vh;overflow:hidden;}
.print-crop-body{display:grid;grid-template-columns:minmax(280px,1fr) 280px;gap:16px;align-items:start;max-height:calc(92vh - 58px);overflow:auto;}
.print-crop-stage{display:flex;align-items:center;justify-content:center;min-width:0;background:#f5f5f5;border:1px solid var(--border);border-radius:8px;padding:12px;}
.print-crop-stage canvas{width:min(100%,440px);aspect-ratio:1/1;height:auto;background:#fff;border:1px solid #ddd;box-shadow:0 10px 24px rgba(0,0,0,.18);}
.print-crop-controls{display:flex;flex-direction:column;gap:12px;min-width:0;}
.print-crop-note{font-size:12px;line-height:1.5;color:var(--text-muted);background:var(--bg4);border:1px solid var(--border);border-radius:8px;padding:10px;}
.print-crop-mode-row,.print-crop-actions{display:flex;gap:8px;flex-wrap:wrap;}
.print-crop-controls label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text-muted);}
.print-crop-controls input[type="range"]{width:100%;accent-color:var(--accent);}
.print-crop-actions{justify-content:flex-end;border-top:1px solid var(--border);padding-top:12px;margin-top:4px;}
@media(max-width:640px){
  .print-crop-body{grid-template-columns:1fr;gap:10px;max-height:calc(94vh - 50px);}
  .print-crop-stage{padding:8px;}
  .print-crop-stage canvas{width:min(100%,320px);}
  .print-crop-controls{gap:10px;}
  .print-crop-actions .btn{flex:1 1 auto;}
}

/* 模态框关闭按钮 */
.modal-close {
  background: var(--bg4);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

/* ===== 专业订单系统基础体验增强 ===== */
button,input,select,textarea{font-family:inherit;}
input::placeholder,textarea::placeholder{color:var(--text-dim);}
table strong{font-weight:700;color:var(--text);}
.rich-editor{width:100%;min-height:76px;background:var(--bg4);border:1px solid var(--border);color:var(--text);padding:8px 11px;border-radius:var(--radius);font-size:13px;line-height:1.5;outline:none;overflow:auto;word-break:break-word;white-space:pre-wrap;}
.rich-editor:focus{border-color:var(--accent);box-shadow:var(--focus);background:var(--surface-raised);}
.rich-editor:empty:before{content:attr(data-placeholder);color:var(--text-dim);pointer-events:none;}
.rich-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:6px;}
.rich-color-btn{width:24px;height:24px;border-radius:50%;border:1px solid var(--border);background:var(--swatch);cursor:pointer;box-shadow:inset 0 0 0 2px rgba(255,255,255,0.22);}
.rich-color-btn:hover{border-color:var(--accent);transform:translateY(-1px);}
.page-header h1{letter-spacing:0;}
.role-view-section{padding-bottom:8px;}
.role-view-btn{min-height:28px;}
.group-tab{min-height:32px;}
.memory-dropdown{box-shadow:var(--shadow);}
.status-badge{line-height:1.2;border:1px solid transparent;}
.status-pending{border-color:rgba(245,165,36,0.22);}
.status-confirmed{border-color:rgba(95,180,255,0.22);}
.status-producing{border-color:rgba(79,140,255,0.28);}
.status-completed{border-color:rgba(53,192,120,0.24);}
.status-received{border-color:rgba(141,152,159,.30);}
.status-cancelled{border-color:rgba(239,92,92,0.24);}
.image-preview-item{box-shadow:0 6px 14px rgba(0,0,0,0.16);}

.dash-status-filter{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;min-width:0;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding:3px 4px;border:1px solid var(--border);border-radius:7px;background:var(--bg4);}
.dash-status-filter::-webkit-scrollbar{display:none;}
.dash-status-filter>span{font-size:11px;color:var(--text-dim);margin:0 2px;}
.dash-status-filter label{display:inline-flex;flex:0 0 auto;align-items:center;gap:4px;margin:0;min-height:24px;padding:3px 7px;border:1px solid var(--border);border-radius:999px;background:var(--surface-soft);color:var(--text-muted);font-size:11px;cursor:pointer;letter-spacing:0;white-space:nowrap;}
.dash-status-filter label:has(input:checked){border-color:var(--accent);background:var(--accent-bg);color:var(--accent);}
.dash-status-filter input{width:auto;height:auto;min-height:0;margin:0;accent-color:var(--accent);}
.dash-status-filter button{border:0;background:transparent;color:var(--text-dim);font-size:11px;cursor:pointer;padding:3px 5px;}
.dash-status-filter button:hover{color:var(--accent);}
.dash-status-action{flex:0 0 auto;}
.dash-status-action>.btn{white-space:nowrap;}
.dash-status-action .dash-status-filter{position:absolute;right:0;top:32px;z-index:50;width:280px;max-width:min(280px,calc(100vw - 24px));display:flex;flex-wrap:wrap;overflow:visible;box-shadow:var(--shadow);}
.dash-status-clear{position:sticky;right:0;flex:0 0 auto;margin-left:auto;white-space:nowrap;background:linear-gradient(90deg,rgba(24,32,43,0.72),var(--bg4) 38%);}
.dash-date-fields{display:flex;align-items:center;gap:6px;min-width:0;}
.dash-range-actions{display:flex;align-items:center;gap:6px;min-width:0;}
.dash-range-actions .btn{white-space:nowrap;}
.dash-filter-actions{display:flex;align-items:center;gap:6px;min-width:0;}
.dash-column-action{flex:0 0 auto;}
.dashboard-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;position:relative;}
.dashboard-new-order-btn{flex:0 0 auto;white-space:nowrap;}
.order-table td,.order-table th{min-width:0;max-width:260px;overflow:hidden;text-overflow:ellipsis;}
.order-product-cell{display:flex;align-items:center;gap:8px;min-width:0;max-width:180px;overflow:visible;}
.order-product-thumb{width:40px;height:30px;object-fit:cover;border-radius:4px;border:1px solid var(--border);background:var(--bg3);flex:0 0 auto;}
.order-table td.mobile-card-image,.order-table td.mobile-card-product{overflow:visible;}
.order-table tbody tr:has(.order-thumb-wrap:hover){position:relative;z-index:80;}
.order-table td.mobile-card-image:has(.order-thumb-wrap:hover),
.order-table td.mobile-card-product:has(.order-thumb-wrap:hover){position:relative;z-index:90;overflow:visible!important;}
.order-product-cell:has(.order-thumb-wrap:hover){position:relative;z-index:95;}
.order-thumb-wrap{position:relative;display:inline-flex;align-items:center;justify-content:center;line-height:0;vertical-align:middle;z-index:1;}
.order-thumb-wrap>img{display:block;cursor:default;}
.order-thumb-popover{display:none!important;}
.order-thumb-popover img{width:100%!important;height:100%!important;object-fit:contain;border:0!important;border-radius:5px;background:var(--bg3);}
.order-thumb-wrap:hover{z-index:1300;}
.order-thumb-wrap:hover .order-thumb-popover{display:none!important;}
.order-product-text{display:inline-block;min-width:0;max-width:128px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text);}
.boss-revenue-section{margin-bottom:20px;background:var(--bg2);border:1px solid var(--border);border-radius:12px;padding:20px 24px;min-width:0;overflow:hidden;}
.boss-time-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-width:0;}
.boss-time-card{min-width:0;background:var(--bg3);border:1px solid var(--border);border-radius:10px;padding:14px 16px;overflow:hidden;}
.boss-time-label,.boss-time-count{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.boss-time-label{font-size:12px;color:var(--text-dim);margin-bottom:4px;}
.boss-time-count{font-size:11px;color:var(--text-dim);}
.boss-money{display:block;max-width:100%;font-size:20px;font-weight:700;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;}
.money-fit{display:inline-block;max-width:100%;white-space:nowrap;line-height:1.12;font-variant-numeric:tabular-nums;letter-spacing:0;}
.money-fit-lg{font-size:.9em;}
.money-fit-xl{font-size:.8em;}
.money-fit-xxl{font-size:.7em;}
.boss-table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--border);border-radius:10px;}
.boss-time-table{width:100%;min-width:640px;border-collapse:collapse;table-layout:fixed;font-size:13px;}
.boss-time-table th,.boss-time-table td{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.boss-rank-head,.boss-group-head{padding:8px 12px;text-align:left;color:var(--text-dim);font-size:12px;font-weight:600;}
.boss-rank,.boss-group-name{padding:10px 12px;font-size:13px;}
.boss-rank{width:48px;font-weight:700;color:var(--warning);}
.boss-group-name{width:78px;font-weight:600;color:var(--accent);}
.boss-amount-col{padding:8px 12px;text-align:right;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap;}
.boss-amount-cell{padding:10px 12px;text-align:right;font-size:13px;font-variant-numeric:tabular-nums;}
.boss-amount-main{font-size:14px;font-weight:700;color:var(--text);}
.boss-supplier-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;min-width:0;}
.boss-supplier-card{min-width:0;background:var(--bg3);border:1px solid var(--border);border-radius:10px;padding:14px 16px;overflow:hidden;}
.boss-supplier-label,.boss-supplier-count{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.boss-supplier-label{font-size:12px;color:var(--text-dim);margin-bottom:4px;}
.boss-supplier-money{display:block;max-width:100%;font-size:20px;font-weight:700;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;}
.boss-supplier-count{font-size:11px;color:var(--text-dim);margin-top:2px;}

/* ===== 预览/打印样式 ===== */
.preview-box{max-width:800px;margin:0 auto;background:white;color:#333;padding:40px;border-radius:8px;}
.preview-title{text-align:center;font-size:22px;color:var(--brand);margin-bottom:4px;font-weight:600;letter-spacing:2px;}
.preview-subtitle{text-align:center;color:#999;font-size:12px;margin-bottom:24px;}
.preview-split{display:flex;gap:24px;border-bottom:2px solid var(--brand);padding-bottom:16px;margin-bottom:16px;}
.preview-col{flex:1;min-width:0;}
.preview-section h5{font-size:12px;color:var(--brand);letter-spacing:1.5px;text-transform:uppercase;margin-bottom:8px;font-weight:600;}
.preview-field{font-size:13px;color:#555;margin-bottom:3px;line-height:1.6;}
.preview-field strong{color:#222;}
.preview-product{border:1px solid #ddd;border-radius:6px;padding:12px;margin-bottom:10px;font-size:13px;}
.preview-prod-header{display:flex;justify-content:space-between;margin-bottom:6px;color:#333;}
.preview-prod-header span{color:#666;}
.preview-prod-detail{color:#666;margin-bottom:2px;line-height:1.6;}
.preview-dot{margin:0 8px;color:#ccc;}
.preview-prod-remark{margin-top:6px;padding-top:6px;border-top:1px solid #eee;color:#999;font-size:12px;}
.preview-footer{border-top:1px solid #eee;padding-top:12px;margin-top:16px;font-size:13px;color:#555;}
.preview-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:24px;}

/* 打印样式 */
@media print{
  body *{visibility:hidden;}
  .preview-box,.preview-box *{visibility:visible;}
  .preview-box{position:absolute;top:0;left:0;right:0;max-width:100%;padding:20px;border-radius:0;box-shadow:none;}
  .preview-actions{display:none;}
}


/* ===== 手机端 APP-like 适配 v2 ===== */
.sidebar-toggle{display:none;position:fixed;top:8px;left:8px;z-index:200;background:var(--bg3);border:1px solid var(--border);border-radius:8px;padding:8px 10px;cursor:pointer;color:var(--accent);font-size:18px;line-height:1;}

body.mobile *{box-sizing:border-box;}

/* ===== 平板 / 窄屏电脑：保留表格效率，收紧密度 ===== */
@media(min-width:769px) and (max-width:1024px){
.sidebar{width:188px;}
.main-content{width:calc(100% - 188px);margin-left:188px;padding:16px 16px 24px;}
.sidebar nav a{min-height:32px;padding:7px 9px;font-size:12px;}
.stats-row{grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:8px;}
.stat-card{padding:10px 10px;}
.stat-value{font-size:19px;}
.form-grid,.product-entry .form-grid{grid-template-columns:repeat(4,1fr);}
.form-grid .form-group.full,.product-entry .form-grid .form-group.full{grid-column:span 4;}
.form-grid .form-group.half,.product-entry .form-grid .form-group.half{grid-column:span 2;}
.form-grid .form-group.third,.product-entry .form-grid .form-group.third{grid-column:span 2;}
.form-grid .form-group.two-thirds,.product-entry .form-grid .form-group.two-thirds{grid-column:span 4;}
.form-two-col,.product-two-col{grid-template-columns:1fr 1fr!important;gap:16px!important;}
.order-table th{padding:9px 10px;font-size:10px;}
.order-table td{padding:9px 10px;font-size:12px;}
.modal-container{max-width:calc(100vw - 32px);}
}

@media(max-width:768px){
/* ========== 1. 侧边栏：抽屉式，直接遮住汉堡按钮 ========== */
.sidebar-toggle{display:flex!important;align-items:center;justify-content:center;min-width:38px;min-height:38px;}
.sidebar{transform:translateX(-100%);transition:transform .25s ease;width:min(72vw,280px);z-index:201;position:fixed!important;box-shadow:18px 0 40px rgba(0,0,0,0.36);}
.sidebar.open{transform:translateX(0);}
.sidebar nav a{min-height:36px!important;padding:8px 10px!important;font-size:12px!important;}
.role-view-btn{min-height:30px!important;padding:5px 8px!important;}

/* ========== 2. 主内容区：全宽 ========== */
.main-content{margin-left:0!important;padding:10px 10px 20px 10px!important;padding-top:50px!important;width:100%!important;}

/* ========== 3. 登录页 ========== */
.login-page{padding:16px!important;}
.login-box{padding:24px 20px!important;max-width:100%!important;border-radius:12px!important;}
.login-box h1{font-size:20px!important;margin-bottom:2px!important;}
.login-box .subtitle{font-size:12px!important;margin-bottom:24px!important;}
.login-box .btn-primary{padding:11px!important;font-size:15px!important;}
.login-box .form-group{margin-bottom:12px!important;}
.login-box .hint{font-size:10px!important;}

/* ========== 4. 页面标题 ========== */
.page-header{margin-bottom:8px!important;flex-wrap:wrap;}
.page-header h1{font-size:16px!important;gap:6px!important;}
.page-header .btn{font-size:11px!important;padding:5px 10px!important;}
.dashboard-header{flex-wrap:nowrap!important;align-items:flex-start!important;margin-bottom:4px!important;}
.dashboard-header h1{min-width:0;}
.dashboard-new-order-btn{margin-top:-20px!important;min-height:30px!important;padding:5px 9px!important;max-width:138px;overflow:hidden;text-overflow:ellipsis;}

/* ========== 5. 统计卡片：3列等宽 ========== */
.stats-row{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:4px!important;margin-bottom:10px!important;}
.stat-card{padding:6px 4px!important;text-align:center;background:var(--bg3);border:1px solid var(--border);border-radius:7px;box-shadow:none!important;cursor:default!important;}
.stat-label{font-size:9px!important;color:var(--text-muted);margin-bottom:2px;letter-spacing:0;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.stat-value{font-size:13px!important;font-weight:700;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* ========== 6. 按钮：只保留触摸需要的高度 ========== */
.btn{min-height:38px!important;padding:8px 12px!important;font-size:12px!important;border-radius:7px!important;}
.btn-sm{min-height:30px!important;padding:5px 9px!important;font-size:11px!important;}

/* ========== 7. 工具栏：垂直排列 ========== */
.filter-bar{flex-direction:column!important;gap:6px!important;}
.filter-bar input,.filter-bar select{width:100%!important;min-width:auto!important;max-width:100%!important;height:36px!important;font-size:13px!important;}

/* ========== 8. 分组标签 ========== */
.group-tabs{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;padding:8px 0;margin-bottom:10px;border-bottom:1px solid var(--border);font-size:12px;}
.group-check{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--text-muted);cursor:pointer;white-space:nowrap;}
.group-check input[type="checkbox"]{accent-color:var(--accent);}

/* ========== 9. 普通管理表：横向滑动，核心订单表在下面转卡片 ========== */
.order-table{overflow-x:auto;-webkit-overflow-scrolling:touch;border-radius:8px!important;scrollbar-width:thin;}
.order-table table{min-width:560px;}
.order-table th{padding:7px 8px!important;font-size:10px!important;white-space:nowrap;}
.order-table td{padding:7px 8px!important;font-size:11px!important;white-space:nowrap!important;}

/* ========== 10. 表单：单栏布局 ========== */
.form-card{padding:12px!important;}
.form-section{margin-bottom:14px!important;}
.form-section h3{font-size:11px!important;margin-bottom:8px!important;padding-bottom:6px!important;}
.form-two-col{grid-template-columns:1fr!important;gap:10px!important;}
.product-two-col{grid-template-columns:1fr!important;gap:10px!important;}
.form-row{gap:6px!important;}
.form-row input[type="text"],.form-row input[type="password"],
.form-row input[type="number"],.form-row input[type="date"],
.form-row select{width:100%!important;min-width:auto!important;max-width:100%!important;height:36px!important;font-size:13px!important;}
.form-row-full textarea{min-height:80px!important;}
.form-col-right .form-row-full textarea{min-height:80px!important;height:80px!important;}
.product-col-right textarea{min-height:80px!important;height:80px!important;}

/* ========== 11. 表单网格：2列 ========== */
.form-grid{grid-template-columns:1fr 1fr!important;gap:8px!important;}
.form-grid .form-group.full{grid-column:span 2!important;}
.form-grid .form-group.half{grid-column:span 2!important;}
.form-grid .form-group.third{grid-column:span 1!important;}
.form-grid .form-group.two-thirds{grid-column:span 2!important;}

/* ========== 12. 输入框：统一高度 ========== */
.form-group input,.form-group select,.form-group textarea{min-height:36px!important;height:36px!important;font-size:13px!important;padding:7px 9px!important;}
.form-group textarea{height:auto!important;min-height:60px!important;}
.form-group .rich-editor{height:auto!important;min-height:72px!important;font-size:13px!important;padding:7px 9px!important;}
.rich-toolbar{gap:5px!important;}
.rich-color-btn{width:24px!important;height:24px!important;flex:0 0 24px;}
.form-group label{font-size:11px!important;}
.field-hint{font-size:9px!important;white-space:normal!important;}

/* ========== 13. 操作栏：垂直按钮 ========== */
.form-actions{flex-direction:column-reverse!important;gap:8px!important;margin-top:12px!important;padding-top:12px!important;}
.form-actions .btn{width:100%!important;}

/* ========== 14. 产品条目 ========== */
.product-entry{padding:10px!important;margin-bottom:10px!important;}
.product-entry-header{margin-bottom:8px!important;padding-bottom:6px!important;}
.product-entry h4{font-size:12px!important;}

/* ========== 15. 图片上传 ========== */
.upload-area{padding:10px!important;min-height:46px!important;}
.image-preview-grid{gap:6px!important;}
.image-preview-item{width:72px!important;height:58px!important;}

/* ========== 16. 订单详情 ========== */
.detail-grid{grid-template-columns:1fr!important;gap:4px!important;}
.detail-grid .item{font-size:11px!important;}
.order-detail{padding:10px!important;}
.order-detail h2{font-size:14px!important;}
.cancel-info-box{padding:8px!important;}

/* ========== 17. 模态框：近全屏 ========== */
.modal-overlay{padding:6px!important;}
.modal-container{max-width:calc(100vw - 12px)!important;max-height:94vh!important;border-radius:10px!important;}
.modal-header{padding:10px 12px!important;}
.modal-header h2{font-size:14px!important;}
.modal-body{padding:12px!important;}

/* ========== 18. centerConfirm 弹窗 ========== */
[style*="max-width:420px"]{max-width:calc(100vw - 32px)!important;margin:40px auto!important;padding:20px!important;}
[style*="max-width:500px"]{max-width:calc(100vw - 24px)!important;margin:20px auto!important;padding:16px!important;}
[style*="max-width:600px"]{max-width:calc(100vw - 20px)!important;margin:16px auto!important;padding:14px!important;}
[style*="max-width:700px"]{max-width:calc(100vw - 16px)!important;margin:12px auto!important;padding:14px!important;}
[style*="max-width:750px"]{max-width:calc(100vw - 16px)!important;margin:12px auto!important;padding:14px!important;}

/* ========== 19. 批量打印条 ========== */
.batch-print-bar{flex-direction:column!important;gap:8px!important;align-items:stretch!important;padding:10px!important;}
.batch-print-bar .btn{width:100%!important;}

/* ========== 20. 预览框 ========== */
.preview-box{padding:12px!important;}
.preview-title{font-size:14px!important;}
.preview-subtitle{font-size:10px!important;margin-bottom:12px!important;}
.preview-split{flex-direction:column!important;gap:10px!important;}
.preview-product{padding:8px!important;font-size:11px!important;}
.preview-actions{flex-direction:column!important;gap:8px!important;}
.preview-actions .btn{width:100%!important;}
.preview-scale{flex-wrap:wrap!important;gap:6px!important;}

/* ========== 21. 论坛 ========== */
.forum-post{padding:12px!important;}
.forum-post .post-content{font-size:13px!important;}
.forum-reply-input{flex-direction:column!important;gap:6px!important;}
.forum-reply-input textarea{min-height:60px!important;width:100%!important;}
.forum-reply-input .btn{width:100%!important;}

/* ========== 22. 备注/评论模态框 ========== */
.note-thread{max-height:50vh!important;}
.note-input-row{flex-wrap:wrap;}

/* ========== 23. 营收统计 ========== */
[style*="min-width:120px"]{min-width:0!important;flex:1!important;}
[style*="grid-template-columns:1fr 1fr"]{grid-template-columns:1fr!important;}

/* ========== 24. 日期搜索框 ========== */
input[style*="width:120px"]{width:100%!important;}
input[style*="width:220px"]{width:100%!important;}

/* ========== 25. 列切换面板 ========== */
[style*="width:280px"][style*="position:absolute"]{width:calc(100vw - 24px)!important;right:0!important;}

/* ========== 26. 工作台日期筛选区 ========== */
.dash-filter-wrap{flex-direction:column;align-items:stretch!important;}
.dash-filter-wrap input[type="date"]{width:100%!important;max-width:100%!important;}
.dash-filter-wrap>div{width:100%;}
.dash-filter-wrap .btn{flex:1;min-width:0;}

/* ========== 27. 表格列筛选全宽 ========== */
.dash-col-filter{position:absolute!important;left:0!important;right:0!important;z-index:10;width:auto!important;}
.dash-col-filter input{font-size:14px!important;padding:8px 12px!important;}
.dash-col-filter button{font-size:18px!important;padding:6px 8px!important;}

/* ========== 28. 预览弹窗可缩放 ========== */
#previewModal .modal-body{overflow:auto!important;-webkit-overflow-scrolling:touch!important;touch-action:pan-x pan-y pinch-zoom;}
.a4-preview{transform-origin:top center;}

/* ========== 29. 老板看台 ========== */
.boss-revenue-section{padding:12px!important;border-radius:8px!important;}
.shared-order-summary{margin:0 0 16px;border:1px solid rgba(214,170,88,.45);background:linear-gradient(135deg,rgba(214,170,88,.10),rgba(21,29,36,.35));padding:12px;min-width:0;}
.shared-order-summary-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;}
.shared-order-summary-head>div{display:grid;grid-template-columns:auto auto;align-items:center;gap:2px 8px;min-width:0;}
.shared-order-summary-head span{grid-row:1/3;display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--warning);color:var(--warning);font-weight:800;font-size:13px;}
.shared-order-summary-head strong{font-size:14px;color:var(--text);}
.shared-order-summary-head small{font-size:11px;color:var(--text-dim);white-space:normal;}
.shared-order-summary-head>b{font-size:22px;color:var(--warning);white-space:nowrap;}
.shared-order-metrics{display:flex;gap:18px;flex-wrap:wrap;margin:10px 0 8px;padding:8px 0;border-top:1px solid rgba(214,170,88,.2);border-bottom:1px solid rgba(214,170,88,.2);font-size:11px;color:var(--text-dim);}
.shared-order-metrics b{color:var(--text);margin-left:4px;}
.shared-order-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:6px;}
.shared-order-item{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;padding:7px 9px;border:1px solid var(--border);background:var(--bg3);color:var(--text);cursor:pointer;text-align:left;}
.shared-order-item:hover{border-color:var(--warning);background:rgba(214,170,88,.08);}
.shared-order-item span{display:flex;flex-direction:column;min-width:0;}
.shared-order-item strong,.shared-order-item small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.shared-order-item strong{font-size:11px;color:var(--warning);}.shared-order-item small{font-size:10px;color:var(--text-dim);}.shared-order-item>b{font-size:12px;white-space:nowrap;}
.shared-order-empty{font-size:12px;color:var(--text-dim);padding:4px 0;}
.shared-order-collab{border-color:rgba(214,170,88,.55)!important;background:rgba(214,170,88,.06)!important;}
@media(max-width:640px){.shared-order-summary-head{align-items:flex-start}.shared-order-summary-head>b{font-size:17px}.shared-order-metrics{gap:8px 12px}.shared-order-list{grid-template-columns:1fr}.shared-order-summary-head small{max-width:160px}}
.boss-time-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;}
.boss-time-card{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;gap:2px 8px;min-height:50px;padding:7px 9px!important;border-radius:7px!important;}
.boss-time-label{grid-column:1;grid-row:1;font-size:9px!important;line-height:1.15;}
.boss-money{grid-column:1 / -1;grid-row:2;max-width:100%;font-size:16px!important;line-height:1.12;overflow:visible;text-overflow:clip;}
.boss-time-count{font-size:9px!important;line-height:1.15;}
.boss-time-count{grid-column:2;grid-row:1;text-align:right;}
.boss-supplier-grid{grid-template-columns:1fr!important;gap:4px!important;}
.boss-supplier-card{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(58px,auto) 28px;align-items:center;gap:6px;padding:5px 7px!important;border-radius:6px!important;min-height:28px;}
.boss-supplier-label{font-size:9px!important;line-height:1.15;margin:0!important;}
.boss-supplier-money{min-width:0;font-size:11px!important;line-height:1.12;text-align:right;max-width:none;overflow:visible;}
.boss-supplier-count{font-size:9px!important;line-height:1.15;margin:0!important;text-align:right;}
.boss-table-wrap{max-width:100%;overflow-x:auto!important;}
.boss-time-table{min-width:560px!important;table-layout:fixed!important;}
.boss-rank-head,.boss-group-head,.boss-amount-col{padding:6px 8px!important;font-size:10px!important;}
.boss-rank,.boss-group-name,.boss-amount-cell{padding:7px 8px!important;font-size:11px!important;}
.boss-amount-main{font-size:11px!important;}

/* ========== 30. 统计卡片可点击 ========== */
.stat-card{cursor:pointer;transition:all .15s;border:1px solid var(--border);}
.stat-card:active{transform:scale(0.96);opacity:0.8;}

/* ========== 31. A4生产单表格 ========== */
.a4-info-table{width:100%;border-collapse:collapse;border:1px solid #c9a96e;border-radius:6px;overflow:hidden;margin-bottom:6px;font-size:11px}
.a4-info-table td{padding:5px 8px;border:1px solid #ddd;vertical-align:middle;line-height:1.6;text-align:left;background:#f0ece3;color:#333;font-weight:600}
.stat-card.active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent);background:var(--accent-bg);}

/* ========== 31. 邀请码管理：表单垂直排列 ========== */
.invite-toolbar{flex-direction:column!important;}
.invite-toolbar>.form-group{flex:0 0 100%!important;width:100%!important;min-width:0!important;}
.invite-toolbar>.btn{flex:0 0 100%!important;width:100%!important;}
}



/* 物控员更新状态弹窗：移动端可滚动，底部操作固定可见 */
.tracker-status-dialog{max-width:750px;margin:40px auto;background:var(--bg3);border:1px solid var(--border);border-radius:16px;padding:32px 36px;box-shadow:0 8px 32px rgba(0,0,0,0.4);max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);overflow-y:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;}
.tracker-status-actions{display:flex;gap:12px;justify-content:flex-end;border-top:1px solid var(--border);padding-top:16px;margin-top:4px;position:sticky;bottom:-32px;background:linear-gradient(180deg,rgba(0,0,0,0),var(--bg3) 18%,var(--bg3));padding-bottom:2px;z-index:2;}
.tracker-supplier-row{margin-bottom:18px;}
.tracker-supplier-toggle{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:8px;padding:10px 12px;background:var(--bg4);border:1px solid var(--border);border-radius:8px;color:var(--text);cursor:pointer;text-align:left;}
.tracker-supplier-toggle strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--accent);font-size:13px;}
.tracker-supplier-toggle em{font-style:normal;color:var(--text-dim);font-size:12px;white-space:nowrap;}
.tracker-supplier-toggle.open em{color:var(--accent);}
.tracker-supplier-panel{margin-top:8px;padding:10px;background:rgba(255,255,255,0.03);border:1px solid var(--border);border-radius:8px;}
.tracker-supplier-options{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px;max-height:132px;overflow:auto;-webkit-overflow-scrolling:touch;}
.tracker-supplier-custom{display:flex;gap:6px;align-items:center;margin-bottom:2px;}
.tracker-supplier-custom input{flex:1;min-width:0;padding:8px 10px;border:1px solid var(--border);border-radius:6px;font-size:13px;background:var(--bg4);color:var(--text);}
.tracker-supplier-custom button{padding:8px 14px;background:var(--accent);color:#000;border:none;border-radius:6px;cursor:pointer;font-size:13px;font-weight:600;white-space:nowrap;}
.tracker-stage-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
.tracker-stage-grid .tracker-stage-option{min-width:0;justify-content:center;padding:11px 8px!important;overflow:hidden;}
.tracker-stage-grid .tracker-stage-option span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.warehouse-filter-bar{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin:12px 0 4px;position:relative;z-index:4;}
.universal-order-search-wrap{display:flex;align-items:center;gap:6px;min-width:308px;max-width:100%;}
.universal-order-search{display:flex;align-items:center;gap:6px;min-width:248px;height:32px;padding:0 9px;border:1px solid var(--border);border-radius:6px;background:var(--bg4);color:var(--text-dim);}
.universal-order-search-wrap .universal-order-search{flex:1 1 auto;min-width:0;}
.universal-order-search span{font-size:16px;line-height:1;}
.universal-order-search input{width:100%;min-width:0;height:28px;padding:0;border:0;background:transparent;color:var(--text);outline:0;font-size:12px;text-align:left;}
.universal-order-search input::placeholder{color:var(--text-dim);}
.universal-order-search-btn{flex:0 0 auto;height:32px;padding:0 12px;border:1px solid var(--border-light);border-radius:6px;background:var(--bg3);color:var(--text);font-size:12px;font-weight:700;letter-spacing:0;cursor:pointer;}
.universal-order-search-btn:hover,.universal-order-search-btn:focus-visible{border-color:var(--accent);color:var(--accent);outline:0;}
.warehouse-status-action{position:relative;}
.warehouse-status-panel{position:absolute;right:0;top:34px;z-index:60;width:252px;padding:10px;background:var(--bg3);border:1px solid var(--border);border-radius:8px;box-shadow:var(--shadow);display:flex;flex-wrap:wrap;gap:6px;}
.warehouse-status-panel label{display:inline-flex;align-items:center;gap:4px;padding:4px 6px;border:1px solid var(--border);border-radius:5px;font-size:12px;white-space:nowrap;cursor:pointer;}
.warehouse-status-clear{width:100%;padding:4px;border:0;border-top:1px solid var(--border);background:transparent;color:var(--text-dim);font-size:12px;cursor:pointer;}
@media(max-width:640px){
  .tracker-status-dialog{width:calc(100vw - 14px);max-width:calc(100vw - 14px);max-height:calc(100dvh - 14px);margin:7px auto;padding:14px;border-radius:12px;}
  .tracker-status-actions{bottom:-14px;margin-left:-14px;margin-right:-14px;padding:12px 14px calc(12px + env(safe-area-inset-bottom));background:var(--bg3);box-shadow:0 -10px 18px rgba(0,0,0,.28);}
  .tracker-status-actions .btn{flex:1;min-height:38px;padding:9px 10px!important;}
  .tracker-supplier-options{max-height:112px;}
  .tracker-supplier-custom{flex-direction:column;align-items:stretch;}
  .tracker-supplier-custom button{width:100%;}
  .tracker-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
  .tracker-stage-grid .tracker-stage-option{justify-content:flex-start;padding:10px 8px!important;font-size:13px!important;}
  .warehouse-filter-bar{justify-content:flex-start;margin:8px 0 2px;}
  .warehouse-filter-bar .universal-order-search-wrap{flex:1 1 100%;width:100%;min-width:0;}
  .warehouse-filter-bar .universal-order-search{width:100%;min-width:0;}
  .warehouse-status-panel{left:0;right:auto;width:min(252px,calc(100vw - 34px));}
}

/* Desktop uses the dedicated status column; the compact status moves beside the ID only on mobile. */
.mobile-inline-status{display:none;}
.mobile-card-summary{display:none!important;}

/* ===== 业务员业绩目标 ===== */
.performance-goal-panel{position:relative;margin:12px 0 16px;padding:14px 16px;border:1px solid var(--border);border-radius:8px;background:var(--bg2);}
.performance-goal-panel.is-loading{pointer-events:none;}
.performance-goal-panel.is-loading>*{opacity:.55;}
.performance-goal-panel.is-loading::after{content:"正在查询";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(10,15,19,.38);color:var(--accent);font-size:13px;font-weight:700;letter-spacing:0;border-radius:inherit;}
.performance-goal-head,.performance-goal-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;}
.performance-goal-head strong,.performance-goal-title strong{display:block;color:var(--accent);font-size:15px;}
.performance-goal-head span,.performance-goal-title span{display:block;margin-top:3px;color:var(--text-dim);font-size:11px;}
.performance-period{display:flex;align-items:center;gap:6px;white-space:nowrap;font-size:11px;color:var(--text-dim);}
.performance-period input{width:126px;padding:5px 7px;border:1px solid var(--border);border-radius:4px;background:var(--bg4);color:var(--text);}
.performance-period .btn{min-width:52px;padding:5px 10px;}
.performance-period .btn:disabled{opacity:.55;cursor:wait;}
.performance-goal-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.performance-goal-actions>.btn{min-width:112px;}
.performance-goal-actions>.btn.has-changes{box-shadow:0 0 0 2px rgba(217,180,108,.18);}
.performance-cards,.performance-group-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.performance-cards>div,.performance-group-summary>div{padding:9px 10px;border:1px solid var(--border);border-radius:6px;background:var(--bg3);min-width:0;}
.performance-cards span,.performance-group-summary span{display:block;font-size:11px;color:var(--text-dim);}
.performance-cards b,.performance-group-summary b{display:block;margin-top:4px;font-size:16px;color:var(--text);max-width:100%;overflow-wrap:anywhere;white-space:normal;font-variant-numeric:tabular-nums;}
.performance-cards .performance-actual{color:var(--success);}
.performance-group-summary{grid-template-columns:minmax(180px,1.2fr) repeat(3,minmax(0,1fr));align-items:stretch;}
.performance-group-summary label{display:grid;gap:4px;font-size:11px;color:var(--text-dim);}
.performance-group-summary input,.member-performance-target{width:100%;min-width:0;padding:6px 8px;border:1px solid var(--border);border-radius:4px;background:var(--bg4);color:var(--text);text-align:left;}
.performance-progress{display:flex;align-items:center;gap:10px;margin-top:10px;font-size:12px;color:var(--text-muted);}
.performance-progress b{color:var(--accent);}
.performance-progress i{display:block;flex:1;height:7px;overflow:hidden;border-radius:4px;background:var(--bg4);}
.performance-progress em{display:block;height:100%;border-radius:inherit;background:var(--success);}
.performance-member-table{margin-top:12px;overflow:auto;border:1px solid var(--border);border-radius:6px;}
.performance-member-table table{width:100%;border-collapse:collapse;min-width:620px;}
.performance-company-table table{min-width:480px;}
.performance-company-table td:nth-child(n+2),.performance-company-table th:nth-child(n+2){text-align:right;}
.performance-member-table th,.performance-member-table td{padding:8px 10px;border-bottom:1px solid var(--border);font-size:12px;text-align:left;}
.performance-member-table th{color:var(--text-dim);font-weight:500;background:var(--bg3);}
.performance-member-table tr:last-child td{border-bottom:0;}
.performance-member-table th:last-child,.performance-member-table td:last-child{width:90px;}
.performance-rate{font-weight:700;color:var(--accent);}
.performance-empty{text-align:center;color:var(--text-dim);}

/* ===== 手机竖屏：核心订单列表转卡片，避免横向宽屏依赖 ===== */
@media(max-width:640px){
.performance-goal-panel{padding:10px;margin:10px 0;}
.performance-goal-head{display:block;}
.performance-goal-actions{margin-top:8px;display:grid;grid-template-columns:1fr;align-items:stretch;}
.performance-period{margin-top:8px;justify-content:space-between;}
.performance-period input{width:min(142px,48vw);}
.performance-cards{grid-template-columns:repeat(2,minmax(0,1fr));}
.performance-group-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
.performance-group-summary label{grid-column:span 2;}
.performance-goal-actions>.btn{width:100%;}
.performance-cards b,.performance-group-summary b{font-size:14px;}
.dash-list-header{display:block!important;}
.dash-list-header h2{width:100%;margin:0 0 8px 0!important;white-space:nowrap;}
.dash-list-header .dash-filter-wrap{width:100%;}
.dash-filter-wrap{display:grid!important;grid-template-columns:1fr!important;gap:6px!important;align-items:stretch!important;}
.dash-filter-wrap .universal-order-search{width:100%;min-width:0;}
.amount-summary-panel{grid-template-columns:1fr!important;gap:8px!important;padding:9px!important;}
.amount-summary-title span{font-size:10px!important;}
.amount-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
.amount-mini-card{padding:7px 8px!important;}
.amount-mini-card .stat-value{display:block;max-width:100%;font-size:16px!important;white-space:nowrap;overflow:visible;text-overflow:clip;font-variant-numeric:tabular-nums;}
.amount-filter-fields{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important;align-items:end!important;}
.amount-filter-fields label{min-width:0!important;width:100%;}
.amount-filter-fields input[type="date"]{width:100%!important;min-width:0!important;height:30px!important;font-size:11px!important;}
.amount-filter-fields .btn{grid-column:span 2;width:100%!important;height:30px!important;}
.finance-filter-pop{padding:4px!important;}
.finance-filter-inline select{width:100%!important;min-width:72px!important;height:24px!important;font-size:10px!important;}
.finance-amount-inline{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 22px!important;}
.finance-amount-inline input{width:100%!important;height:24px!important;font-size:10px!important;}
.dash-date-fields{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:4px;width:100%;}
.dash-date-label,.dash-date-sep{font-size:10px!important;white-space:nowrap;}
.dash-date-fields input[type="date"]{width:100%!important;min-width:0!important;height:30px!important;padding:4px 6px!important;font-size:11px!important;}
.dash-range-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;width:100%;}
.dash-range-actions .btn{width:100%!important;min-height:28px!important;padding:4px 6px!important;font-size:11px!important;}
.dash-filter-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;width:100%;}
.dash-status-action{width:100%;min-width:0;}
.dash-status-action>.btn{width:100%!important;min-height:28px!important;padding:4px 8px!important;}
.dash-status-action .dash-status-filter{position:fixed!important;left:50%!important;right:auto!important;top:116px!important;transform:translateX(-50%);width:min(320px,calc(100vw - 20px));max-width:calc(100vw - 20px);gap:5px;padding:8px;flex-wrap:wrap;overflow:visible;scrollbar-width:none;z-index:1200;}
.dash-status-filter::-webkit-scrollbar{display:none;}
.dash-status-filter>span{flex:0 0 100%;font-size:10px;}
.dash-status-filter label{flex:0 0 auto;min-height:24px;padding:3px 7px;font-size:10px;}
.dash-status-filter button{flex:0 0 auto;}
.dash-status-clear{margin-left:auto;}
.dash-column-action{width:100%;min-width:0;}
.dash-column-action>.btn{width:100%!important;min-height:28px!important;padding:4px 8px!important;}
.admin-manage-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;flex-wrap:nowrap!important;}
.admin-manage-header h1{flex:1 1 auto;min-width:0;}
.admin-manage-header .page-action-btn{flex:0 0 auto;max-width:136px;overflow:hidden;text-overflow:ellipsis;}
.timeline-modal{max-width:calc(100vw - 12px)!important;}
.timeline-modal .modal-body{max-height:calc(94vh - 48px);padding:12px!important;}
.timeline-order-id{font-size:12px;margin-bottom:8px;padding:8px 10px;}
.timeline-list{padding-right:2px;}
.timeline-actions{padding-top:10px;margin-top:10px;}
.timeline-actions .btn{width:100%;}
.mobile-order-list{overflow:visible!important;border:none!important;background:transparent!important;box-shadow:none!important;}
.mobile-order-list table,.mobile-order-list tbody{display:block!important;width:100%!important;min-width:0!important;}
.mobile-order-list thead{display:none!important;}
.mobile-order-list tr{display:grid!important;grid-template-columns:18px minmax(0,1fr) 50px;grid-template-rows:auto auto auto auto auto;gap:3px 8px;position:relative;margin-bottom:6px;padding:8px;background:var(--surface);border:1px solid var(--border);border-radius:7px;box-shadow:none;min-height:86px;}
.mobile-order-list tr:has(.mobile-card-production-source){grid-template-rows:auto auto auto auto auto auto;}
.mobile-order-list tr:has(.mobile-card-channel){grid-template-rows:auto auto auto auto auto auto;}
.mobile-order-list td{display:flex!important;flex-direction:row;align-items:center;justify-content:flex-start;gap:5px;min-width:0;padding:0!important;border:0!important;white-space:nowrap!important;font-size:11px!important;line-height:1.25;color:var(--text);overflow:hidden!important;text-overflow:ellipsis;max-width:none!important;font-weight:600;}
.mobile-order-list td::before{content:attr(data-label);flex:0 0 auto;color:var(--text-dim);font-size:9px;line-height:1;font-weight:500;}
.mobile-order-list td.mobile-card-check{grid-column:1;grid-row:1 / -1;position:static;display:flex!important;align-items:flex-start!important;justify-content:center;width:18px;height:auto;padding-top:2px!important;}
.mobile-order-list td.mobile-card-check input{width:14px;height:14px;}
.mobile-order-list td.mobile-card-check::before{display:none;}
.mobile-order-list td.mobile-card-title{grid-column:2;grid-row:1;justify-content:flex-start;font-size:12px!important;padding-right:0!important;min-height:0;}
.mobile-order-list td.mobile-card-title::before{display:none;}
.mobile-order-list td.mobile-card-title strong{font-size:13px;color:var(--accent);line-height:1.2;overflow:hidden;text-overflow:ellipsis;}
.mobile-inline-status{display:inline-flex;align-items:center;justify-content:flex-end;gap:3px;min-width:0;margin-left:auto;flex-wrap:wrap;}
.mobile-inline-status .status-badge{font-size:10px;padding:2px 6px;white-space:nowrap;}
.mobile-inline-status .order-row-flags{margin-left:0;gap:3px;justify-content:flex-end;}
.mobile-order-list td.mobile-card-status{display:none!important;}
.mobile-order-list td.mobile-card-status::before{display:none;}
.mobile-order-list td.mobile-card-status .status-badge{font-size:10px;padding:2px 6px;white-space:nowrap;margin-left:0;}
.mobile-order-list .order-row-flags{margin-left:0;gap:3px;justify-content:flex-end;}
  .mobile-order-list .order-row-flag{font-size:9px;min-height:15px;padding:1px 5px;}
  .sales-balance-summary{align-items:flex-start;margin-bottom:8px;padding:8px 9px;gap:8px;}
  .sales-balance-summary>div{display:block;}
  .sales-balance-summary strong{display:block;margin-bottom:2px;font-size:11px;}
  .sales-balance-summary span:not(.sales-balance-summary-icon){font-size:10px;}
  .mobile-order-list .sales-balance-row-badge{display:inline-flex;width:auto;margin:0 0 0 4px;padding:1px 4px;font-size:8px;}
.mobile-order-list .tracker-main-text{max-width:100%;font-size:11px;}
.mobile-order-list .tracker-stage-chip{padding:2px 6px;max-width:150px;font-size:10px;line-height:1.2;}
.mobile-order-list .tracker-overdue-badge{margin-left:0;padding:1px 5px;font-size:9px;}
.mobile-order-list .supplier-signal{max-width:138px;margin-left:0;padding:2px 6px;font-size:10px;gap:3px;}
.mobile-order-list .supplier-signal i{width:6px;height:6px;}
.mobile-order-list td.mobile-card-production-source{grid-column:2 / span 2;grid-row:5;display:flex!important;align-items:flex-start;justify-content:flex-start;min-width:0;white-space:normal!important;overflow:visible!important;}
.mobile-order-list .production-source-cell{max-width:100%;gap:3px;}
.mobile-order-list .production-source-suppliers{gap:3px;}
.mobile-order-list .warehouse-supplier-info{margin-bottom:12px;}
.mobile-order-list td.mobile-card-image{grid-column:3;grid-row:2;position:static;width:44px;height:auto;justify-self:end;align-self:start;}
.mobile-order-list td.mobile-card-image::before{display:none;}
.mobile-order-list td.mobile-card-image > img,
.mobile-order-list td.mobile-card-image > div,
.mobile-order-list td.mobile-card-image > .order-thumb-wrap,
.mobile-order-list td.mobile-card-image > .order-thumb-wrap > img{width:44px!important;height:34px!important;}
.mobile-order-list td.mobile-card-image > .order-list-thumb-box{width:44px!important;height:auto!important;}
.mobile-order-list td.mobile-card-image > .order-list-thumb-box > .order-thumb-wrap,
.mobile-order-list td.mobile-card-image > .order-list-thumb-box > .order-thumb-wrap > img{width:44px!important;height:34px!important;}
.mobile-order-list td.mobile-card-image .order-thumb-edit{width:34px!important;height:12px!important;font-size:9px!important;padding:0!important;}
.mobile-order-list td.mobile-card-image .order-thumb-popover img{width:100%!important;height:100%!important;}
.mobile-order-list td.mobile-card-customer{grid-column:2;grid-row:2;}
.mobile-order-list td.mobile-card-product{grid-column:2;grid-row:3;color:var(--text-muted)!important;font-size:11px!important;font-weight:600!important;}
.mobile-order-list td.mobile-card-tracker{grid-column:2 / -1;grid-row:3;font-size:11px!important;font-weight:600!important;flex-wrap:wrap;white-space:normal!important;overflow:visible!important;row-gap:3px;width:100%;word-break:break-word;}
.mobile-order-list td.mobile-card-tracker .tracker-main-text{max-width:calc(100% - 36px);white-space:normal!important;overflow-wrap:anywhere;}
.mobile-order-list td.mobile-card-tracker .tracker-stage-chip{max-width:100%;white-space:normal!important;overflow-wrap:anywhere;}
.mobile-order-list td.mobile-card-deadline{grid-column:2;grid-row:4;}
.mobile-order-list td.mobile-card-sales{grid-column:3;grid-row:4;justify-content:flex-end;text-align:right;}
.mobile-order-list td.mobile-card-channel{grid-column:2 / -1;grid-row:5;min-width:0;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis;}
.mobile-order-list td.mobile-card-price.finance-amount-cell{grid-column:2 / -1;grid-row:6;min-width:0;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis;}
.mobile-order-list td.mobile-card-group,.mobile-order-list td.mobile-card-qty,.mobile-order-list td.mobile-card-date,.mobile-order-list td.mobile-card-note{display:none!important;}
.mobile-order-list td.mobile-card-price,.mobile-order-list td.mobile-card-cost,.mobile-order-list td.mobile-card-profit{font-weight:700!important;}
.mobile-order-list td.mobile-card-actions{grid-column:2 / -1;grid-row:5;justify-content:flex-end;padding-top:2px!important;}
.mobile-order-list tr:has(.mobile-card-production-source) td.mobile-card-actions{grid-row:6;}
.mobile-order-list td.mobile-card-actions::before{display:none;}

/* Full order preview: fit the A4 content to a phone first; individual images open separately for gesture zoom. */
#previewModal .modal-container.large-modal{width:calc(100vw - 12px);max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px);margin:6px;}
#previewModal .modal-header{padding:11px 12px;}
#previewModal .modal-header h2{font-size:16px;}
#previewModal .modal-body{padding:8px;max-height:calc(100dvh - 62px);overflow:auto!important;-webkit-overflow-scrolling:touch;touch-action:pan-y pinch-zoom;}
#previewModal .a4-preview{width:100%!important;min-width:0!important;margin:0!important;padding:5mm 4mm!important;font-size:13px!important;line-height:1.28;box-shadow:none!important;}
#previewModal .a4-title{font-size:17px!important;letter-spacing:1px!important;}
#previewModal .a4-info-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px!important;margin-bottom:5px!important;padding:0!important;align-items:stretch!important;}
#previewModal .a4-field{display:block!important;flex:none!important;min-width:0!important;width:auto!important;padding:5px 6px;border:1px solid #e2e5e8;border-radius:4px;background:#fafafa;font-size:13px!important;line-height:1.25!important;overflow:hidden;}
#previewModal .a4-field.a4-full,#previewModal .a4-field.a4-half,#previewModal .a4-field.a4-long,#previewModal .a4-platform-row .a4-order-no,#previewModal .a4-address-row .a4-field{grid-column:1 / -1;}
#previewModal .a4-label{display:block;margin-bottom:2px;color:#66717a!important;font-size:10px!important;font-weight:600!important;line-height:1.2!important;white-space:normal!important;}
#previewModal .a4-value{display:block;min-width:0;color:#111!important;font-size:13px!important;font-weight:700!important;line-height:1.28!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
#previewModal .a4-model-field{min-width:0!important;}
#previewModal .a4-model-badge{max-width:100%;font-size:12px!important;white-space:normal!important;}
#previewModal .a4-product{margin-bottom:8px!important;padding:5px!important;background:#f7f8f9!important;}
#previewModal .a4-product-title{margin-top:8px!important;font-size:14px!important;}
#previewModal .a4-product .a4-spec-table,#previewModal .a4-product .a4-spec-table tbody{display:block!important;width:100%!important;}
#previewModal .a4-product .a4-spec-table colgroup,#previewModal .a4-product .a4-spec-table thead{display:none!important;}
#previewModal .a4-product .a4-spec-table tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px!important;width:100%!important;}
#previewModal .a4-product .a4-spec-table td{display:grid!important;grid-template-columns:max-content minmax(0,1fr);align-items:start;gap:5px;min-width:0!important;padding:6px!important;border:1px solid #dfe3e6!important;border-radius:4px;background:#fff!important;font-size:13px!important;line-height:1.3!important;text-align:left!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:break-word!important;}
#previewModal .a4-product .a4-spec-table td::before{content:attr(data-label);color:#69747d;font-size:10px;font-weight:600;line-height:1.5;white-space:nowrap;}
#previewModal .a4-product .a4-spec-table td[data-label="尺寸"],#previewModal .a4-product .a4-spec-table td[data-label="材质"],#previewModal .a4-product .a4-spec-table td[data-label="颜色"],#previewModal .a4-product .a4-spec-table td[data-label="漆面供应商"]{grid-column:1 / -1;}
#previewModal .a4-product .a4-dimension-value{white-space:normal!important;}
#previewModal .a4-product-remark{font-size:13px!important;line-height:1.28!important;padding:4px 5px!important;}
#previewModal .preview-prod-images{display:block!important;text-align:center;}
#previewModal .preview-prod-images img{display:block;max-width:100%!important;width:auto;height:auto;max-height:none!important;margin:0 auto 8px;cursor:zoom-in;touch-action:manipulation;}
#imagePreviewModal.order-image-zoom-viewer .image-preview-modal{width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;padding:8px;}
#imagePreviewModal.order-image-zoom-viewer .image-preview-modal img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;touch-action:pan-x pan-y pinch-zoom;}
}

@media (max-width:360px){
#previewModal .a4-info-row,#previewModal .a4-product .a4-spec-table tr{grid-template-columns:minmax(0,1fr)!important;}
#previewModal .a4-field,#previewModal .a4-product .a4-spec-table td{grid-column:1!important;}
}

.command-deck{display:none;}
.mobile-filter-toggle{display:none;}
.mobile-filter-content{display:block;}

/* ===== UI NEXT / PC mission control ===== */
@media (min-width:761px){
  body.ui-next{
    --bg:#090d10;--bg2:#0d1216;--bg3:#11171c;--bg4:#161d23;--bg5:#202a31;
    --surface:#0f151a;--surface-soft:#151c22;--surface-raised:#1b242b;
    --border:#26323a;--border-light:#36444d;
    --text:#f1f4f5;--text-muted:#a5b0b6;--text-dim:#6f7d85;
    --brand:#f0c76d;--brand-hover:#f7d488;--brand-bg:rgba(240,199,109,.09);
    --accent:#f0c76d;--accent-hover:#f7d488;--accent-bg:rgba(240,199,109,.10);
    --success:#4ed39a;--warning:#edbb59;--danger:#f26d74;--info:#8db8c7;
    --radius:6px;--shadow:0 16px 40px rgba(0,0,0,.25);--focus:0 0 0 3px rgba(240,199,109,.15);
    background:
      linear-gradient(180deg,rgba(107,134,145,.055),transparent 220px),
      repeating-linear-gradient(90deg,transparent 0,transparent 119px,rgba(166,195,205,.018) 120px),var(--bg);
    font-family:Inter,"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,sans-serif;
    letter-spacing:0;
  }
  body.ui-next::selection{background:rgba(217,180,108,.28);color:#fff;}
  body.ui-next ::-webkit-scrollbar{width:8px;height:8px;}
  body.ui-next ::-webkit-scrollbar-track{background:transparent;}
  body.ui-next ::-webkit-scrollbar-thumb{background:#33404a;border:2px solid var(--bg);border-radius:99px;}
  body.ui-next ::-webkit-scrollbar-thumb:hover{background:#52606a;}
  body.ui-next .app-layout{position:relative;isolation:isolate;}
  body.ui-next .app-layout::before{content:"";position:fixed;left:0;right:0;top:0;height:1px;background:linear-gradient(90deg,transparent,rgba(217,180,108,.85),transparent);z-index:150;pointer-events:none;}

  /* Mission status rail */
  body.ui-next .command-deck{position:fixed;display:flex;left:236px;right:0;top:0;height:58px;z-index:140;align-items:stretch;justify-content:space-between;background:rgba(9,13,16,.96);border-bottom:1px solid #28343c;backdrop-filter:blur(12px);}
  body.ui-next .command-deck::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;background:linear-gradient(90deg,rgba(240,199,109,.72),rgba(78,211,154,.28) 38%,transparent 78%);pointer-events:none;}
  body.ui-next .command-deck-brand{min-width:245px;display:flex;align-items:center;gap:9px;padding:0 20px;border-right:1px solid #26323a;color:#dfe7ea;font-family:"Consolas","SFMono-Regular",monospace;font-size:12px;letter-spacing:1.2px;}
  body.ui-next .command-deck-brand .command-mark{display:inline-grid;place-items:center;width:30px;height:30px;border:1px solid rgba(240,199,109,.62);color:#f0c76d;font-weight:800;letter-spacing:0;clip-path:polygon(0 0,76% 0,100% 24%,100% 100%,24% 100%,0 76%);}
  body.ui-next .command-deck-brand small{color:#63727a;font-size:8px;letter-spacing:1.5px;margin-left:3px;}
  body.ui-next .command-deck-rail{display:flex;align-items:stretch;justify-content:flex-end;min-width:0;}
  body.ui-next .command-signal,body.ui-next .command-alert-metric,body.ui-next .command-clock{display:flex;align-items:center;gap:7px;min-width:112px;padding:0 16px;border-left:1px solid #202a31;color:#829098;font-size:10px;white-space:nowrap;}
  body.ui-next .command-signal b{font-size:10px;color:#aeb9be;letter-spacing:.25px;}
  body.ui-next .command-signal i{width:6px;height:6px;border-radius:50%;background:#58666d;box-shadow:0 0 0 3px rgba(88,102,109,.10);}
  body.ui-next .command-signal.is-live i{background:#4ed39a;box-shadow:0 0 9px rgba(78,211,154,.68);}
  body.ui-next .command-signal.is-alert{color:#f26d74;}
  body.ui-next .command-signal.is-alert i{background:#f26d74;box-shadow:0 0 9px rgba(242,109,116,.65);animation:missionPulse 1.35s ease-in-out infinite;}
  body.ui-next .command-alert-metric{display:grid;grid-template-columns:auto auto;align-content:center;justify-content:center;column-gap:10px;min-width:130px;}
  body.ui-next .command-alert-metric small{font-size:9px;letter-spacing:.45px;color:#6f7e86;}
  body.ui-next .command-alert-metric b{font:750 14px/1 "Consolas",monospace;color:#78858c;}
  body.ui-next .command-alert-metric.has-alert small,body.ui-next .command-alert-metric.has-alert b{color:#efc66e;}
  body.ui-next #commandOverdueProduction.has-alert small,body.ui-next #commandOverdueProduction.has-alert b{color:#f26d74;}
  body.ui-next .command-clock{min-width:94px;color:#f0c76d;font:700 12px/1 "Consolas",monospace;letter-spacing:1px;justify-content:center;}
  @keyframes missionPulse{50%{opacity:.46;box-shadow:0 0 3px rgba(242,109,116,.34);}}

  /* Navigation rail */
  body.ui-next .sidebar{width:236px;background:#0c1115;border-right:1px solid #253039;box-shadow:none;}
  body.ui-next .sidebar .logo{min-height:58px;height:58px;padding:11px 16px!important;position:relative;border-bottom:1px solid rgba(174,192,200,.12);}
  body.ui-next .sidebar .logo::after{content:"";position:absolute;left:16px;bottom:-1px;width:42px;height:1px;background:var(--brand);box-shadow:0 0 12px rgba(217,180,108,.75);}
  body.ui-next .sidebar .logo h2{font-size:12px!important;color:var(--text)!important;font-weight:750;letter-spacing:.35px!important;}
  body.ui-next #sidebarRole{display:none;}
  body.ui-next .sidebar .logo img{width:34px!important;height:34px!important;border-radius:0!important;background:transparent!important;padding:0!important;filter:drop-shadow(0 1px 5px rgba(255,255,255,.16));}
  body.ui-next .sidebar nav{padding:10px 10px 14px;scrollbar-width:thin;}
  body.ui-next .sidebar nav a{min-height:38px;margin:2px 0;padding:8px 10px;border-radius:5px;font-size:12px;color:#93a1aa;border-color:transparent;position:relative;}
  body.ui-next .sidebar nav a .icon{width:18px;text-align:center;filter:grayscale(1) saturate(.2);opacity:.85;}
  body.ui-next .sidebar nav a:hover{background:#151c21;border-color:#2b3740;color:#f1f4f5;}
  body.ui-next .sidebar nav a.active{background:#181e21;border-color:rgba(240,199,109,.34);color:#f3cf80;font-weight:700;}
  body.ui-next .sidebar nav a.active::before{content:"";position:absolute;left:-10px;top:9px;bottom:9px;width:2px;background:var(--brand);box-shadow:0 0 11px rgba(217,180,108,.72);}
  body.ui-next .sidebar .logout{min-height:54px;padding:14px 16px;background:rgba(255,255,255,.015);border-color:rgba(174,192,200,.12);}
  body.ui-next .role-view-section{margin-top:12px;padding-top:12px;border-color:rgba(174,192,200,.12);}
  body.ui-next .role-view-title{color:#6d7c86;letter-spacing:1.2px;}
  body.ui-next .role-view-btn{border-radius:5px;background:#182028;border-color:#2e3b45;color:#aab6bc;padding:5px 8px;}
  body.ui-next .role-view-btn.active{background:rgba(217,180,108,.13);border-color:rgba(217,180,108,.48);color:#f0ce89;}
  body.ui-next .role-view-btn.reset{border-color:rgba(242,109,116,.55);color:#f4878c;}
  body.ui-next .operator-card{display:grid!important;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto auto auto auto;column-gap:10px;align-items:center;padding:13px 10px 12px!important;text-align:left!important;background:#0e1418;}
  body.ui-next .operator-card .operator-avatar{grid-row:1 / 3;width:42px!important;height:42px!important;margin:0!important;border-radius:4px!important;border:1px solid #53616a!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.03)!important;clip-path:polygon(0 0,82% 0,100% 18%,100% 100%,18% 100%,0 82%);}
  body.ui-next .operator-card>div:nth-child(2){align-self:end;font-family:"Consolas","Segoe UI",sans-serif;font-size:11px!important;letter-spacing:.25px;}
  body.ui-next .operator-card>div:nth-child(3){align-self:start;margin-top:1px!important;font-size:9px!important;letter-spacing:.6px;text-transform:uppercase;}
  body.ui-next .operator-card .operator-actions{grid-column:1 / -1;justify-content:flex-start!important;margin-top:9px!important;}
  body.ui-next .operator-card .operator-actions button{border-radius:3px!important;padding:4px 8px!important;}
  body.ui-next .operator-card .operator-runtime{grid-column:1 / -1;display:flex!important;align-items:baseline;gap:5px;margin-top:9px!important;padding-top:8px;border-top:1px solid rgba(174,192,200,.1);color:#66757d;font-size:9px;letter-spacing:.35px;}
  body.ui-next .operator-card .operator-runtime b{margin-left:auto;color:#efcc84;font:750 13px/1 "Consolas",monospace;}
  body.ui-next .operator-card .operator-runtime small{color:#69767d;font-size:8px;}

  /* Main frame and page hierarchy */
  body.ui-next .main-content{width:calc(100% - 236px);margin-left:236px;padding:82px 28px 42px;max-width:1920px;}
  body.ui-next .page-header{min-height:44px;display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;padding:12px 0 12px 17px;border-bottom:1px solid #29353d;position:relative;}
  body.ui-next .page-header::before{content:"OPS / ACTIVE VIEW";position:absolute;left:17px;top:-3px;color:#627078;font:700 8px/1 "Consolas",monospace;letter-spacing:1.5px;}
  body.ui-next .page-header::after{content:"";position:absolute;left:0;top:11px;bottom:11px;width:2px;background:#f0c76d;box-shadow:0 0 8px rgba(240,199,109,.38);}
  body.ui-next .page-header h1{font-size:20px;font-weight:760;letter-spacing:.15px;}
  body.ui-next .page-header h1{color:#f4f6f7;}
  body.ui-next .dashboard-header{align-items:center!important;}
  body.ui-next .dashboard-new-order-btn{min-height:34px!important;margin:0!important;padding:7px 13px!important;border-radius:5px;box-shadow:0 8px 22px rgba(217,180,108,.12);}
  body.ui-next h2{font-size:16px;letter-spacing:0;}
  body.ui-next .btn{min-height:34px;border-radius:3px;padding:7px 12px;font-weight:680;letter-spacing:.05px;box-shadow:none;transition:background-color .12s ease,border-color .12s ease,color .12s ease,transform .12s ease;}
  body.ui-next .btn:active{transform:translateY(1px);}
  body.ui-next .btn-primary{background:#e8bd61;color:#14110a;border-color:#f0ca78;}
  body.ui-next .btn-primary:hover{background:#f2cb76;box-shadow:0 0 0 3px rgba(240,199,109,.12);}
  body.ui-next .btn-outline{background:rgba(255,255,255,.025);border-color:#34414b;color:#b7c1c6;}
  body.ui-next .btn-outline:hover{border-color:rgba(217,180,108,.7);color:#f0ce89;background:rgba(217,180,108,.08);}
  body.ui-next .btn-danger{background:#b9454f;border-color:#e36c74;}
  body.ui-next input,body.ui-next select,body.ui-next textarea{background:#131a20;border-color:#34414b;border-radius:5px;color:var(--text);box-shadow:inset 0 1px 0 rgba(255,255,255,.025);}
  body.ui-next input:hover,body.ui-next select:hover,body.ui-next textarea:hover{border-color:#485865;}
  body.ui-next input:focus,body.ui-next select:focus,body.ui-next textarea:focus{border-color:#d9b46c;background:#151d23;box-shadow:0 0 0 3px rgba(217,180,108,.13);}
  body.ui-next label,body.ui-next .form-group label{font-size:11px;color:#9caab3;font-weight:650;letter-spacing:.25px;}

  /* Metrics and operating panels */
  body.ui-next .stats-row{gap:8px;margin-bottom:16px;grid-template-columns:repeat(5,minmax(0,1fr));}
  body.ui-next .stat-card{min-height:78px;padding:14px 15px;background:#0f1519;border-color:#29353d;border-radius:2px;box-shadow:none;position:relative;overflow:hidden;clip-path:polygon(0 0,calc(100% - 9px) 0,100% 9px,100% 100%,0 100%);}
  body.ui-next .stat-card::before{content:"";position:absolute;right:0;top:0;width:9px;height:9px;border-top:1px solid #62727a;border-right:1px solid #62727a;}
  body.ui-next .stat-card::after{content:"";position:absolute;left:0;bottom:0;width:42px;height:2px;background:var(--accent);opacity:.8;}
  body.ui-next .stat-label{font-size:10px;text-transform:uppercase;letter-spacing:.8px;color:#7f909a;margin-bottom:5px;}
  body.ui-next .stat-value{font-size:25px;font-weight:760;font-variant-numeric:tabular-nums;}
  body.ui-next .amount-summary-panel,body.ui-next .performance-goal-panel{background:#0f151a;border-color:#29353d;border-radius:6px;box-shadow:none;}
  body.ui-next .amount-summary-title strong,body.ui-next .performance-goal-head strong{color:#f0ce89;}
  body.ui-next .amount-mini-card,body.ui-next .performance-cards>div,body.ui-next .performance-group-summary>div{background:#12191f;border-color:#303d47;border-radius:5px;}

  /* Lists, filters and tabular scan rhythm */
  body.ui-next .dash-list-header{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center!important;padding:11px 0 12px;margin-bottom:0!important;gap:20px!important;border-top:1px solid rgba(174,192,200,.1);}
  body.ui-next .dash-list-header h2{color:#dbe1e3!important;font-size:14px!important;font-weight:720;}
  body.ui-next .dash-filter-wrap{display:flex!important;justify-content:flex-end;align-items:center;gap:7px!important;min-width:0;}
  body.ui-next .universal-order-search-wrap{width:min(400px,35vw);min-width:280px;}
  body.ui-next .universal-order-search{width:auto!important;min-width:0!important;background:#131a20!important;border-color:#34414b!important;border-radius:4px!important;}
  body.ui-next .universal-order-search-btn{height:32px;border-radius:4px;background:#151d23;border-color:#34414b;color:#d9e0e3;}
  body.ui-next .dash-date-fields{display:flex;align-items:center;gap:5px;padding-left:8px;border-left:1px solid #2c3740;}
  body.ui-next .dash-range-actions,body.ui-next .dash-filter-actions{display:flex;align-items:center;gap:4px;padding-left:7px;border-left:1px solid #2c3740;}
  body.ui-next .dash-range-actions .btn,body.ui-next .dash-filter-actions .btn{background:#151d23;border-color:#34414b;color:#aab7be;}
  body.ui-next .order-table{border-radius:6px;border-color:#29353d;background:#0e1418;box-shadow:none;}
  body.ui-next .order-table th{height:42px;padding:10px 13px;background:#151d23;color:#91a0a7;border-color:#2c3943;font-size:10px;letter-spacing:.75px;text-transform:none;font-weight:700;}
  body.ui-next .order-table td{height:56px;padding:9px 13px;border-color:rgba(56,70,80,.55);font-size:12px;color:#d9e0e3;}
  body.ui-next .order-table tbody tr:nth-child(even){background:rgba(255,255,255,.012);}
  /* Order focus: hover previews the row; a checked row keeps an edge signal on both sides. */
  body.ui-next .clickable-row{transition:filter .14s ease;}
  body.ui-next .clickable-row>td{transition:background-color .14s ease,box-shadow .14s ease;}
  body.ui-next .clickable-row:hover>td{background:#131a1f;border-top-color:rgba(141,184,199,.28);border-bottom-color:rgba(141,184,199,.28);}
  body.ui-next .clickable-row:hover>td:first-child{box-shadow:inset 2px 0 #8db8c7;}
  body.ui-next .clickable-row:hover>td:last-child{box-shadow:inset -2px 0 rgba(141,184,199,.72);}
  body.ui-next .clickable-row.is-order-selected>td{background:#191b18;border-top-color:rgba(240,199,109,.38);border-bottom-color:rgba(240,199,109,.38);}
  body.ui-next .clickable-row.is-order-selected>td:first-child{box-shadow:inset 3px 0 #efcc84;}
  body.ui-next .clickable-row.is-order-selected>td:last-child{box-shadow:inset -3px 0 #efcc84;}
  body.ui-next .clickable-row.is-order-selected:hover>td{background:#20221e;}
  body.ui-next .clickable-row.is-order-selected .order-checkbox{accent-color:#efcc84;}
  body.ui-next .order-table strong{color:#f4d48e;font-size:12px;font-weight:750;}
  body.ui-next .status-badge{padding:3px 8px;border:1px solid currentColor;border-radius:4px;font-size:10px;font-weight:720;letter-spacing:.1px;background:transparent;}
  body.ui-next .status-pending{color:#f5b942;background:rgba(245,185,66,.08);border-color:rgba(245,185,66,.36);}
  body.ui-next .status-confirmed{color:#2dd4bf;background:rgba(45,212,191,.08);border-color:rgba(45,212,191,.36);}
  body.ui-next .status-producing{color:#a78bfa;background:rgba(167,139,250,.08);border-color:rgba(167,139,250,.38);}
  body.ui-next .status-completed{color:#34d058;background:rgba(52,208,88,.08);border-color:rgba(52,208,88,.36);}
  body.ui-next .status-shipped{color:#3b82f6;background:rgba(59,130,246,.10);border-color:rgba(59,130,246,.40);}
  body.ui-next .status-received{color:#94a3b8;background:rgba(148,163,184,.07);border-color:rgba(148,163,184,.30);}
  body.ui-next .status-cancelled{color:#f43f5e;background:rgba(244,63,94,.08);border-color:rgba(244,63,94,.34);}
  body.ui-next .tracker-stage-chip{border-radius:4px!important;box-shadow:none!important;}
  body.ui-next .supplier-signal{border-radius:4px!important;font-size:11px!important;}
  body.ui-next .order-row-flag{border-radius:4px;box-shadow:none;}

  /* Forms and detail workbench */
  body.ui-next .form-card{padding:22px;background:#0f151a;border-color:#29353d;border-radius:7px;box-shadow:none;}
  body.ui-next .form-section{margin-bottom:22px;}
  body.ui-next .form-section h3{color:#e9c77e;border-bottom:1px solid rgba(217,180,108,.42);font-size:11px;letter-spacing:1.1px;padding-bottom:9px;margin-bottom:14px;}
  body.ui-next #newOrderForm{padding:20px;}
  body.ui-next .product-entry{background:#11181e;border-color:#303e48;border-radius:6px;padding:16px;margin-bottom:12px;}
  body.ui-next .product-entry-header{border-color:#303e48;}
  body.ui-next .product-entry h4{color:#ebca83;}
  body.ui-next .product-dimension-action{background:#151d23;border-color:#40505c;color:#d7e0e5;}
  body.ui-next .product-dimension-add:hover{border-color:#d9b46c;background:rgba(217,180,108,.08);color:#efcd89;}
  body.ui-next .product-dimension-remove{color:#f07c81;}
  body.ui-next .upload-area{background:#12191f;border-color:#40505c;border-radius:6px;}
  body.ui-next .upload-area:hover{border-color:#d9b46c;background:rgba(217,180,108,.06);}
  body.ui-next .form-actions{position:sticky;bottom:0;z-index:10;margin:22px -20px -20px;padding:14px 20px;background:rgba(13,18,23,.93);backdrop-filter:blur(14px);border-color:#303d47;}
  body.ui-next .order-detail{background:#11181e;}
  body.ui-next .detail-grid>div{border-color:#2d3a44!important;background:#151d24!important;border-radius:5px;}

  /* New-order work grid: compact on wide screens, while hidden fields occupy no space. */
  body.ui-next #newOrderForm{padding:16px;}
  body.ui-next #newOrderForm>.form-section:first-child{margin-bottom:10px;}
  body.ui-next .new-order-products-section{margin-top:8px!important;}
  body.ui-next .new-order-basic-grid{
    display:grid;
    grid-template-columns:repeat(12,minmax(0,1fr));
    grid-auto-flow:row;
    gap:8px 10px;
    align-items:start;
  }
  body.ui-next .new-order-basic-left,
  body.ui-next .new-order-basic-right{display:contents;}
  body.ui-next .new-order-basic-left .form-row{max-width:none;margin:0;}
  body.ui-next .new-order-basic-left .order-main-row{
    grid-column:1 / span 8;
    grid-row:1;
    grid-template-columns:minmax(92px,.72fr) minmax(130px,1fr) minmax(130px,1fr) minmax(180px,1.35fr);
    max-width:none;
  }
  body.ui-next .new-order-basic-left .order-date-row{
    grid-column:1 / span 3;
    grid-row:2;
    grid-template-columns:minmax(132px,1fr) minmax(156px,1.15fr);
    max-width:none;
  }
  body.ui-next .new-order-basic-left .order-flags-line{
    grid-column:4 / span 5;
    grid-row:2;
    max-width:none;
    align-self:start;
  }
  body.ui-next .new-order-basic-right .form-row-full{
    grid-column:9 / -1;
    grid-row:1 / span 2;
    min-width:0;
    height:100%;
    margin:0;
  }
  body.ui-next .new-order-basic-right #orderAddress{
    height:100%!important;
    min-height:92px!important;
    max-height:108px!important;
  }
  body.ui-next .new-order-basic-left .order-collab-row{
    grid-column:1 / span 4;
    grid-row:3;
  }
  body.ui-next .new-order-basic-left .order-channel-row{
    grid-column:5 / span 3;
    grid-row:3;
    grid-template-columns:repeat(2,minmax(0,1fr));
    max-width:none;
  }
  body.ui-next .new-order-basic-left .order-amount-row{
    grid-column:8 / -1;
    grid-row:3;
    grid-template-columns:minmax(118px,.72fr) minmax(190px,1.28fr) minmax(170px,1fr);
    max-width:none;
  }
  body.ui-next .new-order-basic-left .order-platform-row{
    grid-column:span 5;
    grid-template-columns:repeat(2,minmax(0,1fr));
    max-width:none;
  }
  body.ui-next .new-order-basic-left .order-corp-row{grid-column:span 4;}
  body.ui-next .new-order-basic-left .order-extra-row{grid-column:span 3;}
  body.ui-next .new-order-basic-left .order-flags-row{width:100%;}
  body.ui-next .new-order-basic-left .order-flag-checks{min-height:34px;}
  body.ui-next #collaboratorRow #collabList{max-width:100%;}

  /* Stable three-zone entry desk: expandable fields grow only inside their own column. */
  body.ui-next .new-order-basic-grid{
    grid-template-columns:minmax(330px,1fr) minmax(360px,1fr) minmax(430px,1.28fr);
    gap:12px;
  }
  body.ui-next .new-order-basic-left,
  body.ui-next .new-order-basic-right{
    display:flex;
    flex-direction:column;
    gap:12px;
    min-width:0;
  }
  body.ui-next .new-order-basic-left .form-row,
  body.ui-next .new-order-basic-right .form-row{width:100%;max-width:none;margin:0;}
  body.ui-next .new-order-basic-left .order-main-row,
  body.ui-next .new-order-basic-left .order-date-row,
  body.ui-next .new-order-basic-left .order-channel-row,
  body.ui-next .new-order-basic-left .order-amount-row,
  body.ui-next .new-order-basic-left .order-platform-row,
  body.ui-next .new-order-basic-right .order-contact-row{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }
  body.ui-next .new-order-order-column .order-main-row{grid-template-columns:minmax(190px,1.1fr) minmax(130px,.9fr);}
  body.ui-next .new-order-order-column .order-date-row{grid-template-columns:minmax(140px,1fr) minmax(170px,1.15fr);}
  body.ui-next .new-order-finance-column .order-amount-row{grid-template-columns:minmax(135px,.8fr) minmax(180px,1.2fr);}
  body.ui-next .new-order-finance-column .order-amount-row #depositFields{grid-column:1 / -1;}
  body.ui-next .new-order-basic-left .order-flags-line,
  body.ui-next .new-order-basic-left .order-collab-row,
  body.ui-next .new-order-basic-left .order-corp-row,
  body.ui-next .new-order-basic-left .order-extra-row{display:block;width:100%;}
  body.ui-next .new-order-basic-left .order-corp-row input,
  body.ui-next .new-order-basic-left .order-extra-row input{width:100%!important;}
  body.ui-next .new-order-finance-column .order-flag-checks{justify-content:flex-start;gap:12px;}
  body.ui-next .new-order-finance-column .order-flags-line{min-height:52px;}
  body.ui-next .new-order-finance-column .order-collab-row{max-width:300px;}
  body.ui-next .new-order-finance-column .supplier-select-wrap{margin-top:6px;}
  body.ui-next .new-order-basic-right .form-row-full{width:100%;height:auto;margin:0;}
  body.ui-next .new-order-basic-right #orderAddress{height:112px!important;min-height:112px!important;max-height:112px!important;}
  body.ui-next .new-order-basic-right .order-contact-row{grid-template-columns:minmax(140px,.8fr) minmax(210px,1.2fr);}
  body.ui-next .new-order-basic-right .order-contact-row .form-group,
  body.ui-next .new-order-basic-right .order-contact-row input{width:100%!important;min-width:0!important;}

  /* Modals, management grids and quiet depth */
  body.ui-next .modal-overlay{background:rgba(3,6,8,.74);backdrop-filter:blur(7px);}
  body.ui-next .modal-container{border-color:#34414a;border-radius:8px;background:#11181d;box-shadow:0 28px 80px rgba(0,0,0,.52);}
  body.ui-next .modal-header{padding:15px 18px;border-color:#33414b;background:rgba(255,255,255,.018);}
  body.ui-next .modal-header h2{font-size:16px;color:#f0f2f3;}
  body.ui-next .modal-body{padding:18px;}
  body.ui-next .modal-close{border-color:#3a4751;background:#151d23;color:#9aabb3;border-radius:5px;}
  body.ui-next .modal-close:hover{border-color:#d9b46c;color:#f2d18c;background:rgba(217,180,108,.08);}
  body.ui-next .group-tabs{padding:8px 0 12px;border-color:#2c3943;}
  body.ui-next .group-tab{border-radius:5px;border-color:#35434d;background:#141b21;color:#aab5ba;}
  body.ui-next .group-tab.active{border-color:rgba(217,180,108,.65);background:rgba(217,180,108,.10);color:#efcd89;}
  body.ui-next .performance-member-table{border-color:#34414b;border-radius:5px;}
  body.ui-next .performance-member-table th{background:#182129;color:#84959e;}
  body.ui-next .performance-member-table td{border-color:#2c3943;}
  body.ui-next .login-page{background:#090d10;}
  body.ui-next .login-box{border-color:#35424a;border-radius:9px;background:#11171b;box-shadow:0 24px 70px rgba(0,0,0,.42);}
  body.ui-next .login-box h1{font-size:27px;color:#f0cd87;}

  /* Order inspector: keep the list spatially anchored while details slide in. */
  body.ui-next #orderDetailModal{align-items:stretch;justify-content:flex-end;padding:0;background:rgba(3,6,8,.58);backdrop-filter:blur(3px);}
  body.ui-next #orderDetailModal .modal-container{width:min(760px,74vw);max-width:none;height:100vh;max-height:100vh;margin:0;border-radius:0;border-width:0 0 0 1px;animation:missionInspectorIn .18s cubic-bezier(.2,.72,.25,1);}
  body.ui-next #orderDetailModal .modal-header{height:58px;padding:0 18px;border-bottom-color:#303d45;background:#0e1418;}
  body.ui-next #orderDetailModal .modal-header h2::before{content:"INSPECT / ";color:#66757d;font:700 9px/1 "Consolas",monospace;letter-spacing:1.2px;vertical-align:2px;}
  body.ui-next #orderDetailModal .modal-body{height:calc(100vh - 58px);max-height:none;padding:16px 18px 32px;overflow-y:auto;}
  body.ui-next #orderDetailModal .order-detail{border:0;padding:0;background:transparent;box-shadow:none;}
  body.ui-next #orderDetailModal .order-detail>div:first-child{display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-items:start!important;gap:11px;margin-bottom:14px!important;}
  body.ui-next #orderDetailModal .order-detail>div:first-child>div:first-child h2{white-space:nowrap;font:800 17px/1.2 "Consolas","Segoe UI",sans-serif;letter-spacing:.35px;}
  body.ui-next #orderDetailModal .order-detail>div:first-child>div:last-child{justify-content:flex-start!important;gap:6px!important;padding-top:10px;border-top:1px solid #29353d;}
  body.ui-next #orderDetailModal .order-detail>div:first-child>div:last-child .btn{min-height:31px;padding:5px 9px;font-size:11px;}
  @keyframes missionInspectorIn{from{transform:translateX(28px);opacity:.4}to{transform:translateX(0);opacity:1}}
  @media(prefers-reduced-motion:reduce){
    body.ui-next *,body.ui-next *::before,body.ui-next *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;}
  }
}

@media (min-width:1421px){
  /* Short values keep compact visual widths; field values and submission data remain unchanged. */
  body.ui-next .new-order-order-column .order-main-row{
    grid-template-columns:206px 200px;
    justify-content:start;
  }
  body.ui-next .new-order-order-column .order-date-row{
    grid-template-columns:150px 165px;
    justify-content:start;
  }
  body.ui-next .new-order-order-column .order-channel-row{
    grid-template-columns:180px 180px;
    justify-content:start;
  }
  body.ui-next .new-order-order-column .order-platform-row{
    grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);
    justify-content:start;
    width:100%;
    max-width:100%;
  }
  body.ui-next .new-order-finance-column .order-amount-row{
    grid-template-columns:120px 180px;
    justify-content:start;
  }
  body.ui-next .new-order-basic-right .order-contact-row{
    grid-template-columns:185px 280px;
    justify-content:start;
  }
}

/* ===== UI NEXT / mobile operation surface ===== */
@media (max-width:760px){
  html,body{width:100%;max-width:100%;overflow-x:hidden;}
  body.ui-next{
    --bg:#090d10;--bg2:#0d1216;--bg3:#11181e;--bg4:#172129;--bg5:#202c35;
    --surface:#10171d;--surface-soft:#151e25;--surface-raised:#1a252d;
    --border:#293842;--border-light:#3b4b56;
    --text:#eef2f4;--text-muted:#a0adb4;--text-dim:#687881;
    --brand:#efc66e;--brand-hover:#f5d184;--brand-bg:rgba(239,198,110,.1);
    --accent:#efc66e;--accent-hover:#f5d184;--accent-bg:rgba(239,198,110,.1);
    --success:#4ed39a;--warning:#e9b95e;--danger:#f16e75;--info:#8cb9c8;
    background:var(--bg);font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;
  }
  body.ui-next #sidebarRole{display:none;}
  body.ui-next .command-deck{display:none!important;}
  body.ui-next .app-layout,body.ui-next .main-content{width:100%!important;max-width:100%!important;min-width:0!important;overflow:visible;}
  body.ui-next .main-content{margin:0!important;padding:48px 8px calc(24px + env(safe-area-inset-bottom))!important;}

  /* Navigation is a drawer; account and role live here only. */
  body.ui-next .sidebar-toggle{top:max(7px,env(safe-area-inset-top));left:8px;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border-radius:5px;background:#141d23;border-color:#34444e;color:#efc66e;box-shadow:0 8px 20px rgba(0,0,0,.28);}
  body.ui-next .sidebar{width:min(82vw,300px);max-width:300px;background:#0c1216;border-right:1px solid #34424b;box-shadow:22px 0 48px rgba(0,0,0,.58);}
  body.ui-next .sidebar .logo{height:54px;min-height:54px;padding:10px 14px!important;border-bottom:1px solid #29363f;}
  body.ui-next .sidebar .logo h2{font-size:12px!important;color:#eef2f3!important;}
  body.ui-next .sidebar nav{padding:8px 9px 14px;}
  body.ui-next .sidebar nav a{margin:2px 0!important;min-height:38px!important;border-radius:5px!important;color:#a3afb5!important;}
  body.ui-next .sidebar nav a.active{background:rgba(239,198,110,.1)!important;border-color:rgba(239,198,110,.38)!important;color:#f1cc7c!important;}
  body.ui-next .operator-card{display:grid!important;grid-template-columns:48px minmax(0,1fr);grid-template-rows:auto auto auto auto;column-gap:10px;text-align:left!important;padding:12px 10px!important;background:#10171c;}
  body.ui-next .operator-card .operator-avatar{grid-row:1 / 3;width:42px!important;height:42px!important;margin:0!important;border-radius:5px!important;border-width:1px!important;}
  body.ui-next .operator-card .operator-actions,body.ui-next .operator-card .operator-runtime{grid-column:1 / -1;}
  body.ui-next .operator-card .operator-actions{justify-content:flex-start!important;margin-top:8px!important;}
  body.ui-next .operator-card .operator-runtime{display:flex!important;align-items:baseline;gap:5px;margin-top:8px!important;padding-top:7px;border-top:1px solid #29363e;color:#687780;font-size:9px;}
  body.ui-next .operator-card .operator-runtime b{margin-left:auto;color:#efc66e;font:750 13px/1 Consolas,monospace;}

  /* Page identity appears once in the content area. */
  body.ui-next .page-header{min-height:38px;margin:0 0 8px!important;padding:4px 2px 8px 44px!important;border-bottom:1px solid #26343d;align-items:center!important;flex-wrap:nowrap!important;}
  body.ui-next .page-header h1{min-width:0;margin:0;font-size:16px!important;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#f0f3f4;}
  body.ui-next .page-header .btn{flex:0 0 auto;max-width:132px;min-height:30px!important;padding:5px 9px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
  body.ui-next .dashboard-new-order-btn{margin:0!important;}

  /* Dense status strip, designed for one-handed scanning. */
  body.ui-next .stats-row{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:4px!important;margin:0 0 8px!important;}
  body.ui-next .stat-card{min-width:0;min-height:48px;padding:6px 3px!important;border-radius:4px!important;background:#11191f;border-color:#2b3942;clip-path:polygon(0 0,calc(100% - 6px) 0,100% 6px,100% 100%,0 100%);}
  body.ui-next .stat-label{font-size:8px!important;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#718089;}
  body.ui-next .stat-value{font-size:15px!important;line-height:1.15;font-variant-numeric:tabular-nums;}

  body.ui-next .amount-summary-panel,body.ui-next .performance-goal-panel{padding:9px!important;border-radius:5px!important;background:#0f171c;border-color:#2b3942;}
  body.ui-next .amount-summary-title{margin-bottom:7px;}
  body.ui-next .amount-summary-title strong{font-size:12px;color:#efc66e;}
  body.ui-next .amount-summary-cards{gap:5px!important;}
  body.ui-next .amount-mini-card{min-height:46px;padding:6px 8px!important;border-radius:4px!important;background:#141e25;border-color:#30404a;}
  body.ui-next .amount-mini-card .stat-value{font-size:15px!important;white-space:nowrap;overflow:visible;text-overflow:clip;}
  body.ui-next .amount-filter-fields{gap:5px!important;}
  body.ui-next .amount-filter-fields label{font-size:9px!important;}
  body.ui-next .amount-filter-fields input[type="date"]{height:29px!important;border-radius:4px!important;}

  body.ui-next .mobile-filter-panel{margin:6px 0 0;border:1px solid #2b3a43;border-radius:5px;background:#10181e;overflow:hidden;}
  body.ui-next .mobile-filter-toggle{display:flex!important;width:100%;min-height:38px;align-items:center;justify-content:space-between;gap:10px;padding:6px 9px!important;border:0;border-radius:0!important;background:#121b21;color:#dfe5e7;text-align:left;}
  body.ui-next .mobile-filter-toggle-copy{display:grid;gap:1px;min-width:0;}
  body.ui-next .mobile-filter-toggle-copy strong{font-size:11px;color:#cfd7da;}
  body.ui-next .mobile-filter-toggle-copy small{font-size:8px;color:#687780;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  body.ui-next .mobile-filter-toggle-state{flex:0 0 auto;display:inline-flex;align-items:center;gap:4px;color:#91a0a7;font-size:9px;}
  body.ui-next .mobile-filter-toggle-state::after{content:"⌄";font-size:13px;line-height:1;transition:transform .15s ease;}
  body.ui-next .mobile-filter-panel.is-open .mobile-filter-toggle-state::after{transform:rotate(180deg);}
  body.ui-next .mobile-filter-panel:not(.is-open) .mobile-filter-content{display:none;}
  body.ui-next .mobile-filter-panel.is-open .mobile-filter-content{display:block;padding:7px;border-top:1px solid #293840;}
  body.ui-next .amount-summary-panel>.mobile-filter-panel{grid-column:1 / -1;width:100%;margin-top:2px;}
  body.ui-next .dash-list-header>.mobile-filter-panel{width:100%;margin:0;}
  body.ui-next .warehouse-filter-bar{margin:0!important;}

  /* One compact query console: search, dates, ranges, secondary controls. */
  body.ui-next .dash-list-header{display:block!important;padding:8px 0 7px!important;border-top:1px solid #24313a;}
  body.ui-next .dash-list-header h2{margin:0 0 6px!important;font-size:13px!important;color:#dce3e6!important;}
  body.ui-next .dash-filter-wrap{display:grid!important;grid-template-columns:1fr!important;gap:5px!important;width:100%;min-width:0;}
  body.ui-next .universal-order-search-wrap{display:grid;grid-template-columns:minmax(0,1fr) 54px;gap:5px;width:100%!important;min-width:0!important;}
  body.ui-next .universal-order-search{width:100%!important;min-width:0!important;height:34px;border-radius:4px;background:#141e26;border-color:#30414c;}
  body.ui-next .universal-order-search input{font-size:12px;}
  body.ui-next .universal-order-search-btn{width:54px;height:34px;padding:0;border-radius:4px;background:#1a252d;border-color:#40515c;color:#f0ce89;font-size:11px;}
  body.ui-next .dash-date-fields{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto minmax(0,1fr)!important;gap:4px!important;width:100%;padding:0!important;border:0!important;}
  body.ui-next .dash-date-fields input[type="date"]{height:30px!important;min-width:0!important;width:100%!important;padding:3px 5px!important;border-radius:4px!important;font-size:10px!important;}
  body.ui-next .dash-range-actions,body.ui-next .dash-filter-actions{display:grid!important;width:100%;gap:4px!important;padding:0!important;border:0!important;}
  body.ui-next .dash-range-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  body.ui-next .dash-filter-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  body.ui-next .dash-range-actions .btn,body.ui-next .dash-filter-actions .btn{width:100%;min-height:29px!important;padding:4px 6px!important;border-radius:4px!important;background:#141e25;border-color:#30404a;font-size:10px!important;}
  body.ui-next .dash-status-action .dash-status-filter{top:96px!important;width:min(330px,calc(100vw - 16px));max-width:calc(100vw - 16px);padding:9px;background:#11191f;border-color:#3a4a54;border-radius:6px;box-shadow:0 18px 45px rgba(0,0,0,.62);}

  /* Orders are compact records, not oversized cards. */
  body.ui-next .mobile-order-list{width:100%!important;max-width:100%!important;overflow:visible!important;}
  body.ui-next .mobile-order-list table,body.ui-next .mobile-order-list tbody{width:100%!important;min-width:0!important;max-width:100%!important;}
  body.ui-next .mobile-order-list tr{width:100%;max-width:100%;grid-template-columns:16px minmax(0,1fr) 52px!important;grid-template-rows:auto auto auto auto auto!important;gap:6px 8px!important;margin-bottom:7px!important;padding:9px 8px!important;min-height:0!important;border-radius:6px!important;background:#10181e;border-color:#2d3d47;box-shadow:none;overflow:hidden;}
  body.ui-next .mobile-order-list tr.is-order-selected{border-color:rgba(239,198,110,.66);box-shadow:inset 2px 0 #efc66e,inset -2px 0 #efc66e;}
  body.ui-next .mobile-order-list td{max-width:100%!important;min-width:0!important;font-size:10px!important;line-height:1.35!important;gap:5px!important;}
  body.ui-next .mobile-order-list td::before{font-size:8.5px!important;color:#687983;}
  body.ui-next .mobile-order-list td.mobile-card-check{grid-column:1!important;grid-row:1 / -1!important;width:16px!important;padding-top:1px!important;}
  body.ui-next .mobile-order-list td.mobile-card-check input{width:13px;height:13px;}
  body.ui-next .mobile-order-list td.mobile-card-title{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-auto-rows:auto;grid-column:2 / -1!important;grid-row:1!important;gap:4px 8px!important;min-height:20px;align-items:start;overflow:visible!important;}
  body.ui-next .mobile-order-list td.mobile-card-title strong{grid-column:1;grid-row:1;min-width:0;max-width:100%;font:800 12px/1.3 Consolas,"Segoe UI",sans-serif;color:#efcc7e;white-space:normal;overflow:visible;overflow-wrap:anywhere;}
  body.ui-next .mobile-inline-status{display:contents!important;}
  body.ui-next .mobile-inline-status>.status-badge{grid-column:2;grid-row:1;align-self:start;justify-self:end;max-width:100%;padding:2px 6px;font-size:9px;overflow:visible;white-space:nowrap;}
  body.ui-next .mobile-inline-status .order-row-flags{display:flex!important;position:static!important;grid-column:1 / -1;grid-row:2;right:auto!important;bottom:auto!important;width:100%;max-width:100%;margin:0;justify-content:flex-start;flex-wrap:wrap;gap:4px;overflow:visible;}
  body.ui-next .mobile-inline-status .order-row-flag{font-size:8.5px!important;min-height:16px;padding:1px 5px!important;}
  body.ui-next .mobile-order-list td.mobile-card-title>.order-relation-badge,
  body.ui-next .mobile-order-list td.mobile-card-title>.sales-balance-row-badge{grid-column:1 / -1;justify-self:start;margin:0;}
  body.ui-next .mobile-order-list td.mobile-card-customer{grid-column:2!important;grid-row:2!important;align-self:start;padding-right:0!important;font-size:10.5px!important;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere;}
  body.ui-next .mobile-order-list td.mobile-card-image{position:static!important;grid-column:3!important;grid-row:2!important;justify-self:end;align-self:start;width:52px!important;overflow:visible!important;z-index:2;}
  body.ui-next .mobile-order-list td.mobile-card-image>.order-list-thumb-box{width:52px!important;}
  body.ui-next .mobile-order-list td.mobile-card-image>.order-list-thumb-box>.order-thumb-wrap,
  body.ui-next .mobile-order-list td.mobile-card-image>.order-list-thumb-box>.order-thumb-wrap>img{width:52px!important;height:39px!important;border-radius:3px!important;}
  body.ui-next .mobile-order-list td.mobile-card-image .order-thumb-edit{width:42px!important;height:15px!important;margin-top:3px!important;font-size:8px!important;}
  body.ui-next .mobile-order-list td.mobile-card-tracker{grid-column:2 / -1!important;grid-row:3!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:4px!important;width:100%;margin-right:0;padding:5px 0!important;border-top:1px solid rgba(72,91,102,.28)!important;border-bottom:1px solid rgba(72,91,102,.28)!important;overflow:visible!important;white-space:normal!important;}
  body.ui-next .mobile-order-list .production-source-cell{display:flex!important;min-width:0;max-width:100%;align-items:center;gap:3px;flex-wrap:wrap!important;overflow:visible;}
  body.ui-next .mobile-order-list .production-source-stage{display:flex!important;align-items:center;gap:3px;min-width:0;max-width:100%;overflow:visible;}
  body.ui-next .mobile-order-list .tracker-stage-chip{flex:0 1 auto;max-width:100%!important;padding:2px 6px!important;border-radius:3px!important;font-size:10px!important;white-space:normal!important;overflow:visible;overflow-wrap:anywhere;}
  body.ui-next .mobile-order-list .production-source-timeline{flex:0 0 auto;font-size:9px;}
  body.ui-next .mobile-order-list .production-source-suppliers{display:grid!important;grid-template-columns:minmax(0,1fr);width:100%;min-width:0;gap:3px;overflow:visible;}
  body.ui-next .mobile-order-list .production-source-suppliers:empty{display:none!important;}
  body.ui-next .mobile-order-list .supplier-signal{display:grid!important;grid-template-columns:auto auto minmax(0,1fr);width:100%;min-width:0;max-width:100%!important;margin:0;padding:3px 7px!important;border-radius:3px!important;font-size:10.5px!important;line-height:1.35!important;overflow:visible;}
  body.ui-next .mobile-order-list .supplier-signal b{flex:0 0 auto;}
  body.ui-next .mobile-order-list .supplier-signal em{min-width:0;overflow:visible;text-overflow:clip;white-space:normal;overflow-wrap:anywhere;}
  body.ui-next .mobile-order-list .tracker-overdue-badge{flex:0 0 auto;padding:1px 4px!important;font-size:8px!important;}
  body.ui-next .mobile-order-list td.mobile-card-summary{display:block!important;grid-column:2 / -1!important;grid-row:4!important;width:100%;white-space:normal!important;overflow:visible!important;}
  body.ui-next .mobile-order-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;width:100%;padding:0;}
  body.ui-next .mobile-order-summary-item{display:grid;grid-template-columns:32px minmax(0,1fr);align-items:start;gap:5px;min-width:0;padding:3px 0;border-bottom:1px solid rgba(72,91,102,.18);font-size:9.5px;line-height:1.35;}
  body.ui-next .mobile-order-summary-item.is-wide{grid-column:1 / -1;}
  body.ui-next .mobile-order-summary-item i{color:#687983;font-style:normal;font-weight:500;white-space:nowrap;}
  body.ui-next .mobile-order-summary-item b{min-width:0;color:#e0e7ea;font-size:10px;font-weight:650;white-space:normal;overflow-wrap:anywhere;}
  body.ui-next .mobile-order-summary-item.is-wide b{line-height:1.4;}
  body.ui-next .mobile-order-list td.mobile-card-product{grid-column:2 / -1!important;grid-row:3!important;width:auto;margin-right:60px;padding:5px 0!important;border-top:1px solid rgba(72,91,102,.28)!important;border-bottom:1px solid rgba(72,91,102,.28)!important;white-space:normal!important;overflow:visible!important;}
  body.ui-next .mobile-order-list td.mobile-card-product .order-product-cell{width:100%;max-width:100%;align-items:flex-start;}
  body.ui-next .mobile-order-list td.mobile-card-product .order-product-text{max-width:none;white-space:normal;overflow:visible;overflow-wrap:anywhere;}
  body.ui-next .mobile-order-list td.mobile-card-deadline,
  body.ui-next .mobile-order-list td.mobile-card-sales,
  body.ui-next .mobile-order-list td.mobile-card-group,
  body.ui-next .mobile-order-list td.mobile-card-qty,
  body.ui-next .mobile-order-list td.mobile-card-date,
  body.ui-next .mobile-order-list td.mobile-card-note,
  body.ui-next .mobile-order-list td.mobile-card-channel,
  body.ui-next .mobile-order-list td.mobile-card-price,
  body.ui-next .mobile-order-list td.mobile-card-cost,
  body.ui-next .mobile-order-list td.mobile-card-profit{display:none!important;}
  body.ui-next .mobile-order-list td.mobile-card-production-source{grid-row:5!important;padding-top:2px!important;}
  body.ui-next .mobile-order-list td.mobile-card-actions{grid-row:5!important;}
  body.ui-next .mobile-order-list tr:has(.mobile-card-production-source) td.mobile-card-actions{grid-row:6!important;}
  body.ui-next .mobile-order-list .order-row-flags{position:static!important;right:auto!important;bottom:auto!important;max-width:100%;justify-content:flex-start;overflow:visible;}
  body.ui-next .mobile-order-list .order-row-flag{font-size:8px!important;padding:1px 4px!important;}

  /* Mobile details use the screen, with actions reachable by thumb. */
  body.ui-next .modal-overlay{padding:4px!important;background:rgba(2,5,7,.82);}
  body.ui-next .modal-container{width:calc(100vw - 8px)!important;max-width:calc(100vw - 8px)!important;max-height:calc(100dvh - 8px)!important;border-radius:7px!important;background:#10181e;border-color:#34444e;}
  body.ui-next .modal-header{min-height:48px;padding:9px 11px!important;background:#131d24;border-color:#30404a;}
  body.ui-next .modal-header h2{font-size:15px!important;}
  body.ui-next .modal-body{max-height:calc(100dvh - 56px);padding:10px!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;}
  body.ui-next #orderDetailModal .order-detail{padding:0!important;background:transparent;}
  body.ui-next #orderDetailModal .order-detail>div:first-child{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;}
  body.ui-next #orderDetailModal .order-detail>div:first-child>div:last-child{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px!important;}
  body.ui-next #orderDetailModal .order-detail>div:first-child>div:last-child .btn{width:100%;min-width:0;min-height:34px!important;padding:6px!important;font-size:10px!important;white-space:normal;}
  body.ui-next .detail-grid{grid-template-columns:1fr!important;gap:5px!important;}
  body.ui-next .detail-grid>div{min-width:0;overflow-wrap:anywhere;}
  body.ui-next .form-actions{position:sticky;bottom:-12px;z-index:10;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px!important;margin:12px -12px -12px!important;padding:10px 12px calc(10px + env(safe-area-inset-bottom))!important;background:#10181e;border-top:1px solid #30404a;}
  body.ui-next .form-actions .btn{width:100%!important;min-width:0;}

  /* Admin pages remain usable without letting controls escape the viewport. */
  body.ui-next .admin-manage-header .page-action-btn{max-width:118px!important;}
  body.ui-next .order-table:not(.mobile-order-list){max-width:100%;overflow-x:auto!important;border-radius:5px!important;}
  body.ui-next .order-table:not(.mobile-order-list) table{min-width:620px;}
  body.ui-next .form-card,body.ui-next .product-entry{max-width:100%;min-width:0;border-radius:5px!important;}
  body.ui-next input,body.ui-next select,body.ui-next textarea,body.ui-next button{max-width:100%;}

  body.ui-next #newOrderForm{padding:10px!important;}
  body.ui-next .new-order-basic-grid{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;}
  body.ui-next .new-order-order-column{order:1;}
  body.ui-next .new-order-basic-right{order:2;}
  body.ui-next .new-order-finance-column{order:3;}
  body.ui-next .new-order-basic-left,body.ui-next .new-order-basic-right{min-width:0;width:100%;}
  body.ui-next .new-order-basic-left .form-row{width:100%;max-width:none!important;margin-bottom:8px!important;}
  body.ui-next .new-order-basic-left .order-main-row{display:grid!important;grid-template-columns:minmax(140px,.95fr) minmax(0,1.05fr)!important;gap:7px!important;}
  body.ui-next .new-order-basic-left .order-main-row>.form-group{grid-column:auto!important;}
  body.ui-next .new-order-basic-left .order-date-row,
  body.ui-next .new-order-basic-left .order-channel-row,
  body.ui-next .new-order-basic-left .order-platform-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important;}
  body.ui-next .new-order-basic-left .order-amount-row{display:grid!important;grid-template-columns:minmax(108px,.8fr) minmax(0,1.2fr)!important;gap:7px!important;}
  body.ui-next .new-order-basic-left .order-amount-row #depositFields{grid-column:1 / -1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;}
  body.ui-next .new-order-basic-left .order-flags-line,
  body.ui-next .new-order-basic-left .order-collab-row,
  body.ui-next .new-order-basic-left .order-corp-row,
  body.ui-next .new-order-basic-left .order-extra-row{display:block!important;}
  body.ui-next .new-order-basic-left .form-group{min-width:0!important;width:100%!important;max-width:none!important;margin:0!important;}
  body.ui-next .new-order-basic-left input,body.ui-next .new-order-basic-left select{width:100%!important;min-width:0!important;}
  body.ui-next .order-flag-checks{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px!important;width:100%;}
  body.ui-next .order-flag-check{justify-content:center;min-width:0;min-height:32px;padding:5px 3px;border:1px solid #30404a;border-radius:4px;background:#121b21;font-size:10px;white-space:nowrap;}
  body.ui-next .order-flag-check input[type="checkbox"]{flex:0 0 14px!important;width:14px!important;height:14px!important;min-height:0!important;margin:0!important;padding:0!important;accent-color:#efc66e;}
  body.ui-next .supplier-select-wrap{grid-template-columns:auto minmax(0,1fr)!important;gap:6px!important;margin-top:6px;}
  body.ui-next .new-order-basic-right #orderAddress{width:100%!important;height:82px!important;min-height:82px!important;resize:none!important;}
  body.ui-next .new-order-basic-right .order-contact-row{display:grid!important;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important;gap:7px!important;}
  body.ui-next #collaboratorRow #collabList{width:100%;max-width:100%;}
  body.ui-next .collab-item{max-width:100%;}
  body.ui-next .product-entry{padding:10px!important;}
  body.ui-next .product-entry .product-two-col{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important;}
  body.ui-next .product-dimensions{gap:6px;margin-bottom:8px;}
  body.ui-next .product-dimension-row{display:grid;grid-template-columns:minmax(0,1fr) 32px;gap:5px;}
  body.ui-next .product-dimension-fields{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;width:100%;}
  body.ui-next .product-dimension-fields .form-group{min-width:0!important;width:100%!important;margin:0!important;}
  body.ui-next .product-dimension-fields input{width:100%!important;min-width:0!important;height:36px!important;padding-left:7px!important;padding-right:7px!important;font-size:12px!important;}
  body.ui-next .product-dimension-action{width:32px!important;min-width:32px!important;max-width:32px!important;height:36px!important;min-height:36px!important;max-height:36px!important;}
  body.ui-next .product-col-left>.form-row{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px!important;width:100%;}
  body.ui-next .product-col-left>.form-row .form-group{min-width:0!important;width:100%!important;margin:0!important;}
  body.ui-next .product-col-left>.form-row input,body.ui-next .product-col-left>.form-row select{width:100%!important;min-width:0!important;margin-left:0!important;}
  body.ui-next .product-col-left>.product-primary-row{grid-template-columns:minmax(72px,.65fr) minmax(0,1fr)!important;align-items:start;}
  body.ui-next .product-col-left>.product-primary-row .product-paint-supplier-group{grid-column:1 / -1;min-width:0!important;}
  body.ui-next .product-paint-suppliers{gap:5px;}
  body.ui-next .product-paint-supplier-row{grid-template-columns:minmax(0,1fr) 32px;gap:5px;}
  body.ui-next .product-paint-supplier-action{width:32px!important;min-width:32px!important;max-width:32px!important;height:36px!important;min-height:36px!important;max-height:36px!important;}
  body.ui-next .product-col-right .rich-editor{min-height:76px!important;}
  body.ui-next .upload-area{min-height:48px!important;padding:9px!important;border-radius:4px!important;}
  body.ui-next .upload-area p{margin:0;font-size:11px;}

  body.ui-next .employee-mobile-table{overflow:visible!important;border:0!important;background:transparent;}
  body.ui-next .employee-mobile-table table,body.ui-next .employee-mobile-table tbody{display:block;width:100%;min-width:0!important;}
  body.ui-next .employee-mobile-table thead{display:none;}
  body.ui-next .employee-mobile-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;margin-bottom:6px;padding:9px;background:#10181e;border:1px solid #2d3c45;border-radius:5px;}
  body.ui-next .employee-mobile-table td{display:flex!important;align-items:center;gap:5px;min-width:0;padding:0!important;border:0!important;font-size:11px!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;}
  body.ui-next .employee-mobile-table td::before{content:attr(data-label);flex:0 0 auto;color:#667781;font-size:8px;}
  body.ui-next .employee-mobile-table td:nth-child(2) strong{min-width:0;overflow:hidden;text-overflow:ellipsis;}
  body.ui-next .employee-mobile-table td:last-child{grid-column:1 / span 2!important;width:100%!important;justify-self:stretch;display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding-top:7px!important;border-top:1px solid rgba(93,112,122,.25)!important;overflow:visible;}
  body.ui-next .employee-mobile-table td:last-child::before{display:none;}
  body.ui-next .employee-mobile-table td:last-child .btn{width:100%;min-width:0;min-height:30px!important;padding:4px 5px!important;font-size:10px!important;}

  body.ui-next .boss-table-wrap{overflow:visible!important;}
  body.ui-next .boss-time-table{display:block;width:100%;min-width:0!important;}
  body.ui-next .boss-time-table thead{display:none;}
  body.ui-next .boss-time-table tbody{display:block;width:100%;}
  body.ui-next .boss-time-table tr{display:grid;grid-template-columns:30px 58px repeat(2,minmax(0,1fr));gap:4px 6px;margin-bottom:5px;padding:7px;background:#111a20;border:1px solid #2d3c45;border-radius:4px;}
  body.ui-next .boss-time-table td{display:flex;align-items:baseline;justify-content:space-between;gap:4px;min-width:0;padding:0!important;border:0!important;font-size:10px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  body.ui-next .boss-time-table td:nth-child(n+3){overflow:visible;text-overflow:clip;}
  body.ui-next .boss-time-table td::before{flex:0 0 auto;color:#64747d;font-size:7px;}
  body.ui-next .boss-time-table td:nth-child(1){grid-column:1;grid-row:1 / span 3;align-items:center;justify-content:center;color:#efc66e;}
  body.ui-next .boss-time-table td:nth-child(2){grid-column:2;grid-row:1 / span 3;align-items:center;font-weight:750;}
  body.ui-next .boss-time-table td:nth-child(3){grid-column:3;grid-row:1;}body.ui-next .boss-time-table td:nth-child(3)::before{content:"累计";}
  body.ui-next .boss-time-table td:nth-child(4){grid-column:4;grid-row:1;}body.ui-next .boss-time-table td:nth-child(4)::before{content:"7天";}
  body.ui-next .boss-time-table td:nth-child(5){grid-column:3;grid-row:2;}body.ui-next .boss-time-table td:nth-child(5)::before{content:"本月";}
  body.ui-next .boss-time-table td:nth-child(6){grid-column:4;grid-row:2;}body.ui-next .boss-time-table td:nth-child(6)::before{content:"季度";}
  body.ui-next .boss-time-table td:nth-child(7){grid-column:3 / span 2;grid-row:3;}body.ui-next .boss-time-table td:nth-child(7)::before{content:"本年";}
}

@media (max-width:360px){
  body.ui-next .main-content{padding-left:6px!important;padding-right:6px!important;}
  body.ui-next .mobile-order-list tr{padding-left:6px!important;padding-right:6px!important;gap:4px 6px!important;}
  body.ui-next .mobile-order-list td.mobile-card-tracker{overflow:visible!important;white-space:normal!important;}
  body.ui-next .mobile-order-list .production-source-cell{flex-wrap:wrap!important;overflow:visible;row-gap:3px;}
  body.ui-next .mobile-order-list .production-source-suppliers{width:100%;overflow:visible;}
  body.ui-next .mobile-order-list .supplier-signal{max-width:100%!important;}
  body.ui-next .new-order-basic-left .order-main-row{grid-template-columns:minmax(130px,.92fr) minmax(0,1.08fr)!important;}
  body.ui-next .order-flag-checks{grid-template-columns:repeat(2,minmax(0,1fr));}
  body.ui-next .product-col-left>.form-row{grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* Narrow desktop/tablet: two compact work columns, with contact details using the full row. */
@media (min-width:761px) and (max-width:1420px){
  body.ui-next .new-order-basic-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  body.ui-next .new-order-order-column,
  body.ui-next .new-order-finance-column{grid-column:auto;}
  body.ui-next .new-order-basic-right{
    grid-column:1 / -1;
    display:grid;
    grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);
    gap:10px;
    align-items:start;
  }
  body.ui-next .new-order-basic-right .form-row-full{grid-column:1;grid-row:1;margin:0;}
  body.ui-next .new-order-basic-right .order-contact-row{grid-column:2;grid-row:1;align-self:start;}
}
/* 模型附件与图片上传分离，避免原文件进入图片压缩和打印链路。 */
.model-upload-row{margin-top:8px}
.model-upload-area{min-height:54px;padding:9px 12px;border:1px dashed var(--border);border-radius:6px;display:flex;align-items:center;gap:10px;cursor:pointer;background:rgba(255,255,255,.015);transition:border-color .16s ease,background .16s ease}
.model-upload-area:hover,.model-upload-area:focus-within{border-color:var(--accent);background:rgba(74,137,220,.07)}
.model-upload-area.has-existing-models{border-style:solid;border-color:rgba(42,190,128,.55);background:rgba(42,190,128,.055)}
.model-upload-area.model-required-error{border-color:var(--danger);background:rgba(244,67,54,.08);box-shadow:0 0 0 2px rgba(244,67,54,.12)}
.model-upload-area.no-model-disabled{cursor:not-allowed;border-color:rgba(239,185,94,.5);background:rgba(239,185,94,.055);opacity:.62}
.model-upload-area.no-model-disabled:hover{border-color:rgba(239,185,94,.5);background:rgba(239,185,94,.055)}
.model-upload-icon{font-size:20px;line-height:1}
.model-upload-area strong{display:block;color:var(--text);font-size:12px;font-weight:650}
.required-model-mark{margin-left:4px;color:#ff6b73;font-size:10px;font-style:normal;font-weight:750}
.model-upload-area small{display:block;margin-top:2px;color:var(--text-dim);font-size:10px;line-height:1.35}
.no-model-declaration-wrap{margin-top:8px;display:grid;gap:7px}
.no-model-declaration-option{width:max-content;max-width:100%;display:flex;align-items:flex-start;gap:8px;padding:7px 9px;border:1px solid var(--border);border-radius:5px;background:var(--bg4);cursor:pointer}
.no-model-declaration-option input{flex:0 0 auto;margin-top:2px}
.no-model-declaration-option span,.no-model-declaration-option strong,.no-model-declaration-option small{display:block}
.no-model-declaration-option strong{color:var(--warning);font-size:12px}
.no-model-declaration-option small{margin-top:1px;color:var(--text-dim);font-size:10px;line-height:1.35}
.no-model-responsibility-warning,.no-model-submit-warning{padding:8px 10px;border:1px solid rgba(241,110,117,.58);border-left:3px solid var(--danger);border-radius:5px;background:rgba(241,110,117,.08);color:#ffd8da;font-size:11px;line-height:1.5;text-align:left}
.no-model-submit-warning{margin:12px 0}
.no-model-submit-warning strong{color:#fff}
.model-file-list{display:grid;gap:5px;margin-top:6px}
.model-file-item{min-width:0;padding:6px 8px;border:1px solid var(--border);border-radius:5px;display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;background:var(--bg4);font-size:11px}
.model-file-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.model-file-size{color:var(--text-dim);font-variant-numeric:tabular-nums}
.model-file-actions{display:inline-flex;align-items:center;justify-content:flex-end;gap:5px;white-space:nowrap}
.model-file-item button{min-width:36px;height:24px;padding:0 6px;border:1px solid transparent;border-radius:4px;background:transparent;color:var(--text-dim);cursor:pointer;font-size:10px}
.model-file-item button:hover{background:rgba(244,67,54,.13);color:var(--danger)}
.model-file-item button:disabled{opacity:.55;cursor:wait}
.model-file-delete{border-color:rgba(244,67,54,.25)!important;color:#ef7d86!important}
.model-file-delete:hover{border-color:rgba(244,67,54,.55)!important}
.model-file-existing{border-color:rgba(42,190,128,.38);background:rgba(42,190,128,.055)}
.model-file-state{display:inline-flex;align-items:center;margin-right:6px;padding:1px 5px;border-radius:3px;background:rgba(74,137,220,.14);color:var(--accent);font-size:9px;font-weight:700;vertical-align:1px}
.model-file-existing .model-file-state{background:rgba(42,190,128,.14);color:#46d59b}
.model-file-download,.model-file-saved{min-width:38px;text-align:center;font-size:10px;white-space:nowrap}
.model-file-download{color:var(--accent);text-decoration:none}
.model-file-download:hover{text-decoration:underline}
.model-file-saved{color:#46d59b}
.order-model-files-panel{width:min(100%,960px);margin:12px auto;padding:12px;border:1px solid var(--border);border-radius:7px;background:var(--bg3)}
.order-model-files-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;color:var(--text);font-size:13px;font-weight:700}
.order-model-files-title>div{min-width:0}
.order-model-files-title strong{color:var(--accent);font-size:11px}
.order-model-files-title span{color:var(--text-dim);font-size:10px;font-weight:400}
.no-model-order-warning{border-color:rgba(241,110,117,.55);background:rgba(241,110,117,.055)}
.no-model-order-warning .order-model-files-title{margin:0;color:#ffd0d3}
.no-model-order-warning .order-model-files-title strong{color:#ff7b82}
.no-model-order-warning .order-model-files-title span{display:block;margin-top:3px;color:#d7b5b7}
.order-model-download-all{flex:0 0 auto;white-space:nowrap}
.order-model-product+.order-model-product{margin-top:9px;padding-top:9px;border-top:1px solid var(--border)}
.order-model-product-title{margin-bottom:5px;color:var(--accent);font-size:11px;font-weight:650}
.order-model-file{min-width:0;padding:7px 8px;display:grid;grid-template-columns:22px minmax(0,1fr) auto;gap:8px;align-items:center;border-radius:5px;background:var(--bg4)}
.order-model-file+.order-model-file{margin-top:4px}
.order-model-file-info{min-width:0}
.order-model-file-info strong,.order-model-file-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-model-file-info strong{color:var(--text);font-size:11px}
.order-model-file-info small{margin-top:2px;color:var(--text-dim);font-size:9px}
.model-file-unavailable{color:var(--text-dim);font-size:10px}
@media print{.order-model-files-panel{display:none!important}}
@media(max-width:640px){
  .model-upload-area{min-height:48px;padding:8px 9px}
  .model-upload-area small{white-space:normal}
  .order-model-files-panel{margin:8px 0;padding:9px}
  .order-model-files-title{align-items:stretch;flex-direction:column}
  .order-model-files-title span{display:block;margin-top:2px}
  .order-model-download-all{width:100%;justify-content:center}
  .order-model-file{grid-template-columns:18px minmax(0,1fr) auto;padding:6px}
  .order-model-file .btn{min-height:30px;padding:5px 8px}
}
.order-relation-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  line-height: 16px;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: 1px;
}
.order-relation-collab {
  color: #f7d36f;
  border: 1px solid rgba(247, 211, 111, .55);
  background: rgba(247, 211, 111, .10);
}

/* Keep the GD switch compact even when mobile form inputs expand to full width. */
body.ui-next #newOrderForm .order-shared-toggle {
  display: inline-flex !important;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-width: 0 !important;
  width: auto !important;
  overflow: hidden;
}
body.ui-next #newOrderForm .order-shared-toggle input[type="checkbox"] {
  flex: 0 0 14px !important;
  width: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  height: 14px !important;
  min-height: 14px !important;
  max-height: 14px !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.ui-next #newOrderForm .order-shared-toggle span {
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}
@media(max-width:640px) {
  body.ui-next #newOrderForm .order-native-group {
    min-width: 82px;
    padding-inline: 6px;
  }
  body.ui-next #newOrderForm .order-shared-toggle {
    justify-content: flex-start;
    padding-inline: 7px;
    gap: 4px;
  }
}

/* GD revenue summary: one responsive component for desktop and mobile. */
body.ui-next .shared-order-summary {
  min-width: 0;
  margin: 0 0 16px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(217,180,108,.42);
  border-radius: 6px;
  background: linear-gradient(135deg,rgba(217,180,108,.09),rgba(15,21,26,.78));
}
body.ui-next .shared-order-summary-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
body.ui-next .shared-order-summary-head>div:first-child {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  min-width: 0;
}
body.ui-next .shared-order-summary-head>div:first-child>span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(240,199,109,.68);
  color: #f0c76d;
  font-weight: 800;
  font-size: 13px;
}
body.ui-next .shared-order-summary-head strong {
  min-width: 0;
  color: #f2f4f5;
  font-size: 14px;
  line-height: 1.2;
}
body.ui-next .shared-order-summary-head>div:first-child>small {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #7f8d95;
  font-size: 10px;
  line-height: 1.35;
}
body.ui-next .shared-order-total {
  display: grid;
  justify-items: end;
  min-width: 118px;
}
body.ui-next .shared-order-total>small {
  color: #7f8d95;
  font-size: 9px;
}
body.ui-next .shared-order-total>b {
  display: block;
  max-width: 100%;
  color: #f0c76d;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}
body.ui-next .shared-order-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 12px 0 9px;
  padding: 9px 0;
  border-top: 1px solid rgba(217,180,108,.18);
  border-bottom: 1px solid rgba(217,180,108,.18);
  color: #829099;
  font-size: 11px;
}
body.ui-next .shared-order-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
}
body.ui-next .shared-order-metrics b {
  min-width: 0;
  color: #eef1f2;
}
body.ui-next .shared-order-list {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 7px;
}
body.ui-next .shared-order-item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #303d47;
  border-radius: 4px;
  background: #11191f;
  color: #dfe5e7;
  text-align: left;
}
body.ui-next .shared-order-item:hover {
  border-color: rgba(217,180,108,.7);
  background: rgba(217,180,108,.07);
}
body.ui-next .shared-order-item>span {
  display: grid;
  min-width: 0;
}
body.ui-next .shared-order-item strong,
body.ui-next .shared-order-item small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.ui-next .shared-order-item strong {
  color: #f0c76d;
  font-size: 11px;
}
body.ui-next .shared-order-item small {
  color: #829099;
  font-size: 10px;
}
body.ui-next .shared-order-item>b {
  min-width: 0;
  max-width: 100%;
  color: #eef1f2;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media(max-width:640px) {
  body.ui-next .shared-order-summary {
    padding: 10px;
  }
  body.ui-next .shared-order-summary-head {
    grid-template-columns: minmax(0,1fr);
    gap: 9px;
  }
  body.ui-next .shared-order-summary-head>div:first-child {
    grid-template-columns: 34px minmax(0,1fr);
    gap: 2px 8px;
  }
  body.ui-next .shared-order-summary-head>div:first-child>span {
    width: 34px;
    height: 34px;
  }
  body.ui-next .shared-order-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(217,180,108,.18);
  }
  body.ui-next .shared-order-total>b {
    min-width: 0;
    max-width: calc(100% - 62px);
    font-size: 17px;
    text-align: right;
  }
  body.ui-next .shared-order-total .money-fit {
    display: inline-block;
    width: auto;
    height: auto;
    border: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
  }
  body.ui-next .shared-order-metrics {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 6px 10px;
    margin-top: 9px;
  }
  body.ui-next .shared-order-metrics span:nth-child(even) {
    justify-content: flex-end;
  }
  body.ui-next .shared-order-list {
    grid-template-columns: minmax(0,1fr);
  }
  body.ui-next .shared-order-item {
    grid-template-columns: minmax(0,1fr) minmax(72px,auto);
  }
  body.ui-next .shared-order-item>b {
    overflow: visible;
    text-align: right;
  }
}
