/* dnbj.css - 电脑报价页面样式 */
<style>
/* ─── 全局 ─── */
*{margin:0;padding:0;box-sizing:border-box;}
:root{
  /* 电脑报价主题色 - 沉稳科技蓝 */
  --primary:#1e3a5f; --primary-dark:#152a45; --primary-light:#2d4a6f;
  --primary-gradient:linear-gradient(135deg,#152a45,#1e3a5f);
  --primary-bg:#e8f0f8; --primary-hover:#d1e0f0;
  
  /* 辅助色 */
  --orange:#e65100; --green:#2e7d32; --red:#c0392b;
  --gray:#f5f7fa; --border:#dde4f0;
  
  /* 兼容旧变量 */
  --blue:#1e3a5f; --blue2:#2d4a6f; --blue3:#e8f0f8;
}
body{font-family:"微软雅黑",Arial,sans-serif;background:#eef2f8;color:#222;min-height:100vh;padding-top:64px;}

/* ─── 顶栏 ─── */
.topbar{background:linear-gradient(135deg,#152a45,#1e3a5f);color:#fff;padding:0 32px;height:64px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 3px 12px rgba(0,0,0,.2);position:fixed;top:0;left:0;right:0;z-index:100;}
.topbar .topbar-left{display:flex;align-items:center;gap:14px;}
.topbar .topbar-logo{display:flex;align-items:center;gap:10px;}
.topbar .topbar-logo-icon{font-size:24px;line-height:1;}
.topbar .topbar-logo-text{font-size:17px;font-weight:800;letter-spacing:.5px;}
.topbar .topbar-logo-sub{font-size:11px;opacity:.75;margin-top:2px;font-weight:400;}
.topbar .topbar-divider{width:1px;height:28px;background:rgba(255,255,255,.3);margin:0 4px;}
.topbar .page-title-dn{font-size:15px;font-weight:700;opacity:.92;}
.topbar .btns{display:flex;gap:8px;align-items:center;}
.topbar .tb-btns{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
.topbar .staff-badge{display:flex;align-items:center;gap:7px;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.28);border-radius:20px;padding:5px 13px;font-size:12.5px;}
.topbar .staff-badge b{font-weight:700;}

/* 联系人选择（顶栏内）*/
.tb-contact-wrap{display:flex;align-items:center;gap:8px;border-left:1px solid rgba(255,255,255,.25);padding-left:12px;}
.tb-contact-sel{
  background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.38);color:#fff;
  border-radius:20px;padding:5px 14px;font-size:12px;font-weight:600;
  font-family:inherit;cursor:pointer;outline:none;appearance:none;-webkit-appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 10px center;
  padding-right:28px;transition:.15s;
}
.tb-contact-sel:hover{background-color:rgba(255,255,255,.28);}
.tb-contact-sel option{background:#1a3f8f;color:#fff;}

/* ===== 公司信息顶栏 ===== */
.company-bar{
  background:linear-gradient(90deg,#152a45 0%,#1e3a5f 60%,#2d4a6f 100%);
  color:#fff;padding:10px 44px;
  display:flex;align-items:center;justify-content:space-between;
  border-bottom:2px solid rgba(255,255,255,.18);
}
.co-left{display:flex;flex-direction:column;gap:2px;}
.co-name{font-size:17px;font-weight:900;letter-spacing:2px;text-shadow:0 1px 4px rgba(0,0,0,.25);}
.co-addr{font-size:11.5px;opacity:.82;letter-spacing:.5px;}
.co-right{display:flex;flex-direction:column;align-items:flex-end;gap:4px;}
.co-contact{display:flex;gap:18px;}
.co-person{
  display:flex;align-items:center;gap:7px;
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.22);
  border-radius:20px;padding:4px 12px;font-size:12px;
}
.co-person b{font-size:13px;font-weight:700;}

/* 打印时隐藏下拉框，只显示联系人卡片 */
@media print{
  .tb-contact-sel{display:none!important;}
  #dnContactCard{font-size:9px!important;padding:2px 8px!important;}
}
/* 打印时公司栏适配 */
@media print{
  .company-bar{padding:6px 14px!important;border-bottom:2px solid rgba(255,255,255,.3)!important;}
  .co-name{font-size:13px!important;}
  .co-addr{font-size:9px!important;}
  .co-person{font-size:9px!important;padding:2px 8px!important;}
  .co-person b{font-size:10px!important;}
}

/* ===== 顶部标题区 ===== */
.hd{background:linear-gradient(130deg,#1e3a5f 0%,#2d4a6f 55%,#152a45 100%);color:#fff;padding:18px 44px 16px;position:relative;overflow:hidden;}
.hd::after{content:"💻";font-size:120px;position:absolute;right:30px;top:-10px;opacity:.09;pointer-events:none;}
.hd-inner{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;}
.hd-left{flex:1;min-width:0;}
.hd h1{font-size:22px;font-weight:800;letter-spacing:2px;margin-bottom:4px;}
.hd-hint{font-size:11px;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.28);border-radius:20px;display:inline-block;padding:2px 12px;opacity:.9;}
.hd-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;flex-shrink:0;padding-top:4px;}

/* ===== 移动端汉堡菜单 ===== */
.mobile-nav-btn{
  display:none;position:fixed;top:0;right:0;z-index:1001;
  width:56px;height:56px;background:linear-gradient(135deg,#1e3a5f,#2d4a6f);
  border:none;border-radius:0 0 0 12px;cursor:pointer;color:#fff;font-size:24px;
  align-items:center;justify-content:center;box-shadow:-2px 2px 8px rgba(0,0,0,.2);
}
.mobile-nav-btn:active{background:#152a45;}
.mobile-nav-overlay{
  position:fixed;inset:0;z-index:1002;background:rgba(0,0,0,.5);
  opacity:0;pointer-events:none;transition:opacity .3s;
}
.mobile-nav-overlay.show{opacity:1;pointer-events:auto;}
.mobile-nav-menu{
  position:fixed;top:0;left:0;bottom:0;width:280px;z-index:1003;
  background:#fff;transform:translateX(-100%);transition:transform .3s ease;
  overflow-y:auto;box-shadow:4px 0 20px rgba(0,0,0,.15);
}
.mobile-nav-menu.show{transform:translateX(0);}
.mobile-nav-header{
  background:linear-gradient(135deg,#1e3a5f,#2d4a6f);color:#fff;padding:16px;
  display:flex;align-items:center;gap:10px;
}
.mobile-nav-header span{font-size:16px;font-weight:700;}
.mobile-nav-close{
  margin-left:auto;background:rgba(255,255,255,.2);border:none;color:#fff;
  width:32px;height:32px;border-radius:50%;font-size:18px;cursor:pointer;
}
.mobile-nav-list{padding:8px 0;}
.mobile-nav-item{
  display:flex;align-items:center;gap:12px;padding:14px 18px;font-size:15px;
  color:#333;text-decoration:none;border-bottom:1px solid #f0f0f0;cursor:pointer;
}
.mobile-nav-item:hover{background:#f8fafb;}
.mobile-nav-item.active{background:#e8f0f6;color:#1e3a5f;font-weight:600;}

/* ===== 客户信息卡片 ===== */
.cust-panel{background:#fff;border-bottom:1px solid var(--border);}
.cust-panel-hd{background:linear-gradient(90deg,#1e3a5f,#152a45);color:#fff;padding:10px 44px;font-weight:700;font-size:14px;display:flex;align-items:center;justify-content:space-between;}
.cust-panel-hd-left{display:flex;align-items:center;gap:8px;}
.cust-panel-body{padding:14px 44px 18px;}
.cust-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;}
.cust-fg{display:flex;flex-direction:column;gap:4px;}
.cust-fg label{font-size:12px;color:#555;font-weight:600;}
.cust-fg input,.cust-fg select{
  padding:8px 12px;border:1.5px solid var(--border);border-radius:8px;
  font-size:13px;font-family:inherit;outline:none;transition:.2s;background:#fff;color:#111;
}
.cust-fg input:focus,.cust-fg select:focus{border-color:#1e3a5f;box-shadow:0 0 0 3px rgba(30,58,95,.1);}
.cust-name-row{display:flex;gap:6px;align-items:center;}
.cust-name-row input{flex:1;}

/* ===== 报价状态栏（客户信息卡片内） ===== */
.cust-panel-hd .quote-status-inline{display:flex;align-items:center;gap:8px;}
.cust-panel-hd .qs-btn{
  padding:4px 12px;border-radius:16px;border:1.5px solid rgba(255,255,255,.5);
  font-size:11px;cursor:pointer;transition:.2s;background:rgba(255,255,255,.15);
  color:#fff;font-family:inherit;font-weight:600;
}
.cust-panel-hd .qs-btn:hover{background:rgba(255,255,255,.25);}
.cust-panel-hd .qs-btn.active{background:#fff;color:#1e3a5f;border-color:#fff;}
.cust-panel-hd .qs-status-tag{padding:3px 10px;border-radius:12px;font-size:11px;font-weight:700;background:rgba(255,255,255,.2);color:#fff;border:1px solid rgba(255,255,255,.3);}

/* 打印时客户卡片适配 */
@media print{
  .cust-panel-hd{display:none!important;}
  .cust-panel-body{padding:0!important;}
  .cust-panel{border-bottom:none!important;}
  .cust-grid{
    display:grid!important;
    grid-template-columns:repeat(3,1fr)!important;
    gap:0!important;
    background:linear-gradient(130deg,#1e3a5f 0%,#2d4a6f 55%,#152a45 100%)!important;
    padding:8px 20px!important;
  }
  .cust-fg{flex-direction:row!important;align-items:center!important;gap:4px!important;padding:4px 6px!important;}
  .cust-fg label{font-size:9.5pt!important;color:rgba(255,255,255,.75)!important;white-space:nowrap!important;font-weight:600!important;}
  .cust-fg input,.cust-fg select{
    border:none!important;background:transparent!important;box-shadow:none!important;
    padding:0!important;font-size:10pt!important;font-weight:700!important;
    color:#fff!important;flex:1!important;min-width:0!important;
  }
  .cust-name-row{flex:1!important;}
  .cust-name-row input{font-size:10pt!important;font-weight:700!important;}
  .cust-pick-btn{display:none!important;}
}

/* ===== 工具栏 ===== */
.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:9px;padding:11px 44px;background:#f0f4ff;border-bottom:1px solid var(--border);}
.tbtn{border:none;border-radius:7px;padding:7px 14px;font-size:13px;cursor:pointer;font-family:inherit;display:flex;align-items:center;gap:5px;transition:.15s;font-weight:600;}
.tbtn:hover{opacity:.9;transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.15);}
.t-main {background:linear-gradient(135deg,#1e3a5f,#2d4a6f);color:#fff;}
.t-main:hover{background:linear-gradient(135deg,#152a45,#1e3a5f);}
.t-aux  {background:linear-gradient(135deg,#3498db,#2980b9);color:#fff;}
.t-aux:hover{background:linear-gradient(135deg,#2980b9,#1f6dad);}
.t-work {background:linear-gradient(135deg,#27ae60,#219a52);color:#fff;}
.t-work:hover{background:linear-gradient(135deg,#219a52,#1e8a47);}
.t-print{background:linear-gradient(135deg,#5d6d7e,#4a5a6b);color:#fff;}
.t-print:hover{background:linear-gradient(135deg,#4a5a6b,#3d4d5e);}
.t-reset{background:linear-gradient(135deg,#95a5a6,#7f8c8d);color:#fff;}
.t-reset:hover{background:linear-gradient(135deg,#7f8c8d,#6c7a7b);}
.t-mode{background:linear-gradient(135deg,#9b59b6,#8e44ad);color:#fff;}
.t-mode:hover{background:linear-gradient(135deg,#8e44ad,#7d3c98);}
.t-mode.active{background:linear-gradient(135deg,#e74c3c,#c0392b);color:#fff;}
.t-mode.active:hover{background:linear-gradient(135deg,#c0392b,#a93226);}
.disc-wrap{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--gray);}
.disc-wrap input{width:100px;padding:5px 8px;border:1px solid var(--border);border-radius:6px;font-size:13px;text-align:center;}
.toolbar-right{margin-left:auto;display:flex;align-items:center;gap:20px;}
.tax-toggle-wrap{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--gray);}

/* 费用汇总栏开关样式 */
.summary-controls .tax-switch .tax-slider:before{
  position:absolute;content:"";height:16px;width:16px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.3s;box-shadow:0 1px 3px rgba(0,0,0,.2);
}
.summary-controls .tax-switch input:checked + .tax-slider{background:#1e3a5f;}
.summary-controls .tax-switch input:checked + .tax-slider:before{transform:translateX(22px);}
.summary-controls .tax-switch .tax-slider:hover{opacity:.9;}

/* 立体水滴翡翠绿开关样式 - 使用更高优先级选择器 */
.summary-controls .tax-switch.jade-switch .tax-slider{
  position:absolute;cursor:pointer;inset:0;background:linear-gradient(145deg,#e3f2fd,#bbdefb);border-radius:14px;transition:.3s;box-shadow:inset 2px 2px 5px rgba(0,0,0,0.1),inset -2px -2px 5px rgba(255,255,255,0.8);
}
.summary-controls .tax-switch.jade-switch .tax-slider:before{
  position:absolute;content:"";height:22px;width:22px;left:3px;bottom:3px;background:linear-gradient(145deg,#ffffff,#e6e6e6);border-radius:50%;transition:.3s;box-shadow:2px 2px 5px rgba(0,0,0,0.2),-1px -1px 3px rgba(255,255,255,0.8);
}
.summary-controls .tax-switch.jade-switch input:checked + .tax-slider{
  background:linear-gradient(145deg,#00b894,#00a383);
  box-shadow:inset 2px 2px 5px rgba(0,0,0,0.2),inset -2px -2px 5px rgba(255,255,255,0.3);
}
.summary-controls .tax-switch.jade-switch input:checked + .tax-slider:before{
  transform:translateX(24px);
  background:linear-gradient(145deg,#ffffff,#f0f0f0);
  box-shadow:2px 2px 6px rgba(0,0,0,0.25),-1px -1px 3px rgba(255,255,255,1);
}
.summary-controls .tax-switch.jade-switch .tax-slider:hover{opacity:.95;}

/* ===== 报价状态栏 ===== */
.quote-status-bar{display:flex;align-items:center;gap:10px;padding:10px 44px 6px;flex-wrap:wrap;background:#f8faff;border-bottom:1px solid var(--border);}
.qs-label{font-size:13px;color:#666;font-weight:600;white-space:nowrap;}
.qs-btn{padding:6px 16px;border-radius:20px;border:2px solid var(--border);font-size:12px;cursor:pointer;transition:.2s;background:#fff;font-family:inherit;font-weight:600;}
.qs-btn.active.qs-pending{background:#f3f4f6;border-color:#6b7280;color:#374151;}
.qs-btn.active.qs-quoted{background:#e8f0f8;border-color:#1e3a5f;color:#1e3a5f;}
.qs-btn.active.qs-confirmed{background:#d1e0f0;border-color:#152a45;color:#152a45;}

.btn{padding:8px 18px;border:none;border-radius:6px;font-size:13px;font-weight:600;cursor:pointer;transition:.2s;font-family:inherit;}
.btn-primary{background:#fff;color:var(--blue);box-shadow:0 2px 8px rgba(0,0,0,.15);}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.2);}
.btn-success{background:#27ae60;color:#fff;}
.btn-success:hover{background:#219a52;}
.btn-danger{background:#e74c3c;color:#fff;}
.btn-orange{background:var(--orange);color:#fff;}
.btn-print{background:#8e44ad;color:#fff;}

/* ─── 主布局 ─── */
.main{display:grid;grid-template-columns:380px 1fr;gap:20px;padding:20px 24px;max-width:1600px;margin:0 auto;}

/* ─── 左栏：配件选择 ─── */
.panel{background:#fff;border-radius:12px;box-shadow:0 2px 12px rgba(0,0,0,.08);overflow:hidden;}

/* ─── 左栏固定定位 ─── */
.main > .panel.no-print{position:sticky;top:84px;max-height:calc(100vh - 104px);overflow:auto;}
.panel-header{background:var(--blue);color:#fff;padding:12px 18px;font-weight:700;font-size:14px;display:flex;align-items:center;gap:8px;}
.panel-body{padding:16px;}

/* 搜索框 */
.search-box{display:flex;gap:8px;margin-bottom:14px;}
.search-box input{flex:1;padding:8px 12px;border:1.5px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit;outline:none;transition:.2s;}
.search-box input:focus{border-color:var(--blue2);}
.search-box select{padding:8px 10px;border:1.5px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit;outline:none;background:#fff;cursor:pointer;}

/* 分类标签 */
.cat-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:14px;}
.cat-tab{padding:4px 12px;border-radius:20px;border:1.5px solid var(--border);font-size:12px;cursor:pointer;transition:.2s;background:#fff;}
.cat-tab:hover,.cat-tab.active{background:var(--blue2);color:#fff;border-color:var(--blue2);}

/* 配件列表 */
.parts-list{max-height:calc(100vh - 280px);overflow-y:auto;display:flex;flex-direction:column;gap:6px;}
.parts-list::-webkit-scrollbar{width:4px;}
.parts-list::-webkit-scrollbar-thumb{background:#ccc;border-radius:4px;}
.part-item{border:1.5px solid var(--border);border-radius:8px;padding:10px 12px;cursor:pointer;transition:.2s;display:flex;align-items:center;gap:10px;}
.part-item:hover{border-color:var(--blue2);background:#e8f0f8;}
.part-item.selected{border-color:#27ae60;background:#f0fff4;}
.part-icon{width:34px;height:34px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;}
.part-info{flex:1;min-width:0;}
.part-name{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.part-spec{font-size:11px;color:#888;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.part-price-wrap{text-align:right;flex-shrink:0;}
.part-price{font-size:14px;font-weight:700;color:var(--red);}
.part-price-tax{font-size:10px;color:#aaa;}
.part-add{width:26px;height:26px;border-radius:50%;border:none;background:var(--blue2);color:#fff;font-size:16px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.2s;flex-shrink:0;}
.part-add:hover{background:var(--blue);}

/* ─── 右栏：报价单 ─── */
.quote-panel{display:flex;flex-direction:column;gap:16px;}

/* 客户信息 */
.info-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;}
.form-group{display:flex;flex-direction:column;gap:4px;}
.form-group label{font-size:12px;color:#666;font-weight:600;}
.form-group input,.form-group select,.form-group textarea{padding:8px 12px;border:1.5px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit;outline:none;transition:.2s;}
.form-group input:focus,.form-group select:focus{border-color:var(--blue2);}

/* 报价表格 */
.quote-table-wrap{overflow-x:auto;}
table{width:100%;border-collapse:collapse;font-size:13px;}
thead tr{background:linear-gradient(90deg,#1e3a5f,#2d4a6f);color:#fff;}
thead th{padding:10px 12px;text-align:center;font-weight:600;white-space:nowrap;}
thead th:nth-child(2){text-align:left;}
tbody tr{border-bottom:1px solid var(--border);transition:.15s;}
tbody tr:hover{background:#f5f8ff;}
tbody tr:nth-child(even){background:#fafbff;}
tbody tr:nth-child(even):hover{background:#f0f4ff;}
td{padding:10px 12px;vertical-align:middle;}
td:not(:nth-child(2)):not(:last-child){text-align:center;}
.td-name{font-weight:600;color:#1a3c6e;}
.td-spec{font-size:11px;color:#999;margin-top:2px;}
.td-brand-inline{font-size:11px;color:#999;margin-top:2px;}  /* 名称列内嵌品牌显示（打印时隐藏） */
.td-cat{display:inline-block;font-size:10px;padding:1px 7px;border-radius:10px;font-weight:600;margin-bottom:3px;}
.qty-input{width:56px;padding:4px 8px;border:1.5px solid var(--border);border-radius:6px;text-align:center;font-size:13px;font-family:inherit;outline:none;}
.qty-input:focus{border-color:var(--blue2);}
.price-input{width:80px;padding:4px 8px;border:1.5px solid var(--border);border-radius:6px;text-align:center;font-size:13px;font-family:inherit;outline:none;}
.price-input:focus{border-color:var(--blue2);}
.del-btn{background:#fee;color:var(--red);border:1px solid #fcc;border-radius:6px;padding:4px 10px;cursor:pointer;font-size:12px;transition:.2s;}
.del-btn:hover{background:#fcc;}
/* 拖拽手柄 */
.drag-handle{
  cursor:grab;color:#9ca3af;font-size:16px;padding:0 4px;
  user-select:none;transition:.12s;
}
.drag-handle:hover{color:#6b7280;}
.drag-handle:active{cursor:grabbing;}

/* 拖拽中行样式 */
tr.dragging{opacity:.4;background:#fffbeb!important;}
tr.drag-over{border-top:3px solid var(--blue2);background:#e8f0fe!important;}
.sort-btns{display:none;}
.sort-btn{display:none;}
.subtotal-cell{font-weight:700;color:var(--red);}
.empty-row td{text-align:center;padding:40px;color:#bbb;font-size:14px;}

/* 汇总区 */
.summary-bar{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;}
.sum-card{background:var(--gray);border-radius:10px;padding:14px 18px;text-align:center;border:1.5px solid var(--border);}
.sum-card.highlight{background:linear-gradient(135deg,#fff8e1,#fff3cd);border-color:#f0c040;}
.sum-card .lbl{font-size:11px;color:#888;margin-bottom:4px;}
.sum-card .val{font-size:20px;font-weight:800;color:var(--red);}
.sum-card .note{font-size:10px;color:#aaa;margin-top:2px;}

/* 大写金额说明 */
.total-remark{background:#f0f6ff;border:1.5px solid #c5d9f5;border-radius:10px;padding:12px 18px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;}
.total-remark .cn-amount{font-size:14px;font-weight:700;color:var(--blue);}
.total-remark .total-note{font-size:12px;color:#888;}

/* 备注 */
.remark-box{border:1.5px solid var(--border);border-radius:8px;padding:10px 14px;font-size:13px;width:100%;resize:vertical;font-family:inherit;min-height:70px;outline:none;}
.remark-box:focus{border-color:var(--blue2);}

/* ─── 打印页眉/页脚（屏幕隐藏） ─── */
.print-page-header,.print-cust-bar,.print-seal-area{display:none;}
@media print{
  /* A4竖版，缩小边距让内容更紧凑，≤13行内容适配单页 */
  @page{size:A4 portrait;margin:8mm 8mm 8mm 8mm;}

  html,body{background:#fff !important;min-height:auto !important;height:auto !important;padding:0 !important;margin:0 !important;font-size:8.5pt;}
  .main{display:block;padding:0;margin:0;}
  .quote-panel{gap:2px;}
  .panel{box-shadow:none;border:1px solid #ccc;border-radius:0;margin-bottom:0;}

  /* === 隐藏所有非打印UI === */
  .topbar,.no-print,.btns,.company-bar,.print-header,
  .mobile-nav-btn,.mobile-nav-menu,.mobile-nav-overlay,.mobile-nav-close,
  .mobile-nav-item,.mobile-nav-header,.mobile-nav-list,
  .drawer-overlay,.lib-fab,.prod-fab,.prod-panel,
  .main > .panel.no-print,.main .panel:first-child,
  .part-add,.del-btn,.search-box,.cat-tabs,.parts-list,.drag-handle,.sort-btns,.sort-btn,
  .action-bar,.scheme-bar,.tpl-bar,.zol-search-section,.modal-overlay,
  .summary-bar,.sum-card,.summary-controls,.disc-wrap,.tax-toggle-wrap,.tax-switch,
  #toolbarTaxSwitch,#sumBaseCard,#gutterSealContainer,.gutter-seal-page,
  .toast-msg{display:none !important;}
  .panel-header .summary-controls{display:none !important;}

  /* === 打印页眉 === */
  .print-page-header{display:flex !important;align-items:center;justify-content:space-between;border-bottom:2px solid #1a3c6e;padding-bottom:3px;margin-bottom:3px;}
  .pph-meta{display:flex;gap:12px;align-items:center;font-size:10pt;color:#555;font-weight:600;white-space:nowrap;}
  .pph-title{font-size:14pt;font-weight:700;color:#333;letter-spacing:1px;text-align:center;flex:1;}

  /* === 打印客户信息条 === */
  .print-cust-bar{display:flex !important;align-items:center;justify-content:space-between;padding:3px 10px;background:#f0f6ff;border:1px solid #c5d9f5;border-radius:3px;margin-bottom:3px;font-size:10pt;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  .pcb-group{display:flex;gap:14px;align-items:center;}
  .pcb-item{display:flex;align-items:center;gap:4px;}
  .pcb-label{color:#888;}
  .pcb-val{font-weight:700;color:#1a3c6e;}
  .pcb-right{display:flex;gap:12px;align-items:center;color:#555;}

  /* === 配置明细 === */
  #detailPanel .panel-header{display:none !important;}
  #detailPanel{border:none !important;box-shadow:none !important;padding:0 !important;}
  .panel-header{-webkit-print-color-adjust:exact;print-color-adjust:exact;padding:2px 8px;font-size:8.5pt;font-weight:700;}
  .panel-body{padding:3px 8px;}
  table input{border:none !important;background:transparent !important;text-align:center;padding:0;}

  /* === 报价表格 === */
  thead tr{-webkit-print-color-adjust:exact;print-color-adjust:exact;}
  table{font-size:9.5pt;width:100%;border-collapse:collapse;}
  thead th{padding:3px 6px;font-size:9pt;}
  tbody td{padding:2px 6px;border-bottom:1px solid #eee;line-height:1.35;}
  .td-cat{font-size:7.5pt;padding:1px 3px;}
  .td-name{font-size:9.5pt;font-weight:600;}
  .td-spec{font-size:7.5pt;color:#666;margin-top:0;line-height:1.2;}
  .td-brand-inline{display:none !important;}
  /* 隐藏操作列 */
  thead th:last-child,tbody td:last-child{display:none !important;}
  /* 整机模式：隐藏单价、小计、单位列 */
  :not(.parts-mode) thead th:nth-child(6), :not(.parts-mode) tbody td:nth-child(6),
  :not(.parts-mode) thead th:nth-child(7), :not(.parts-mode) tbody td:nth-child(7),
  :not(.parts-mode) thead th:nth-child(8), :not(.parts-mode) tbody td:nth-child(8){display:none !important;}
  /* 零配件模式：显示单位、单价和小计列 */
  .parts-mode thead th:nth-child(6), .parts-mode tbody td:nth-child(6),
  .parts-mode thead th:nth-child(7), .parts-mode tbody td:nth-child(7),
  .parts-mode thead th:nth-child(8), .parts-mode tbody td:nth-child(8){display:table-cell !important;}
  
  /* 防止分页截断关键内容 */
  table, tbody, tr{page-break-inside:avoid !important;break-inside:avoid !important;}
  .panel{page-break-inside:avoid !important;break-inside:avoid !important;}
  .quote-panel{page-break-inside:avoid !important;break-inside:avoid !important;}

  /* === 折扣三段式 - 一行显示 === */
  .discount-row{padding:3px 8px;margin:2px 0;gap:6px;border-radius:4px;flex-wrap:nowrap !important;flex-direction:row !important;align-items:center !important;}
  .discount-row .dr-item{min-width:auto !important;width:auto !important;flex-shrink:1 !important;}
  .discount-row .dr-val{font-size:13px;}
  .discount-row .dr-val.final{font-size:15px;}
  .discount-row .dr-op{font-size:14px;padding-top:5px;display:inline !important;}

  /* === 大写金额 === */
  .total-remark{padding:3px 8px;background:#f8faff;border:1px solid #d0d8ec;margin:2px 0;}
  .cn-amount{font-size:8.5pt;font-weight:700;}
  .total-note{font-size:7.5pt;color:#777;}

  /* === 备注 === */
  .remark-box{font-size:7.5pt;min-height:16px;padding:2px 6px;border:1px solid #bbb;width:100%;}

  /* === 打印公章 === */
  .print-seal-area{display:block !important;}
  .print-remark-wrap{position:relative;page-break-inside:avoid !important;break-inside:avoid !important;}
  .print-seal-img{position:absolute;right:4mm;bottom:2mm;width:38mm;height:38mm;opacity:0.88;transform:rotate(-12deg);object-fit:contain;pointer-events:none;z-index:9999;-webkit-print-color-adjust:exact;print-color-adjust:exact;}

  /* === 零配件模式打印 === */
  .parts-mode .group-header{display:table-row !important;background:#f5f5f5 !important;border-left:3px solid #3498db !important;font-weight:bold !important;}
  .parts-mode .group-header{background:linear-gradient(90deg,#f8f9fa,#e9ecef) !important;border-left:4px solid #3498db !important;color:#2c3e50 !important;}
  .parts-mode .price-cell{display:table-cell !important;font-weight:bold !important;color:#e74c3c !important;}
  .parts-mode .subtotal-cell{display:table-cell !important;font-weight:bold !important;color:#c0392b !important;background:#fff3f3 !important;}
  .parts-mode .quote-item{border-bottom:1px solid #dee2e6 !important;}

  /* 打印页眉：标题 */
  .print-page-header{
    display:flex !important;
    align-items:center;
    justify-content:space-between;
    border-bottom:2px solid #1a3c6e;
    padding-bottom:3px;
    margin-bottom:3px;
    position:relative;
  }
  .pph-meta{display:flex;gap:12px;align-items:center;font-size:10pt;color:#555;font-weight:600;white-space:nowrap;}
  .pph-title{font-size:14pt;font-weight:700;color:#333;letter-spacing:1px;text-align:center;flex:1;}

  /* 打印客户信息条 */
  .print-cust-bar{
    display:flex !important;
    align-items:center;
    justify-content:space-between;
    padding:3px 10px;
    background:#f0f6ff;
    border:1px solid #c5d9f5;
    border-radius:3px;
    margin-bottom:3px;
    font-size:10pt;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }
  .pcb-group{display:flex;gap:14px;align-items:center;}
  .pcb-item{display:flex;align-items:center;gap:4px;}
  .pcb-label{color:#888;}
  .pcb-val{font-weight:700;color:#1a3c6e;}
  .pcb-right{display:flex;gap:12px;align-items:center;color:#555;}

  /* 隐藏屏幕端客户信息面板（打印时用顶部客户条替代） */
  .quote-panel > .panel:first-child{display:none !important;}

  /* 报价表格 — 隐藏品牌列后字体可适当放大 */
  table{font-size:9.5pt;width:100%;border-collapse:collapse;}
  thead th{padding:3px 6px;font-size:9pt;}
  tbody td{padding:2px 6px;border-bottom:1px solid #eee;line-height:1.35;}
  .td-cat{font-size:7.5pt;padding:1px 3px;}
  .td-name{font-size:9.5pt;font-weight:600;}
  .td-spec{font-size:7.5pt;color:#666;margin-top:0;line-height:1.2;}
  /* 隐藏操作列 */
  thead th:last-child,tbody td:last-child{display:none !important;}
  /* 整机模式：隐藏单价、小计、单位列，整机报价不暴露配件价格构成 */
  :not(.parts-mode) thead th:nth-child(6), :not(.parts-mode) tbody td:nth-child(6),
  :not(.parts-mode) thead th:nth-child(7), :not(.parts-mode) tbody td:nth-child(7),
  :not(.parts-mode) thead th:nth-child(8), :not(.parts-mode) tbody td:nth-child(8){display:none !important;}
  /* 零配件模式：显示单位、单价和小计列，让客户清楚了解价格构成 */
  .parts-mode thead th:nth-child(6), .parts-mode tbody td:nth-child(6),
  .parts-mode thead th:nth-child(7), .parts-mode tbody td:nth-child(7),
  .parts-mode thead th:nth-child(8), .parts-mode tbody td:nth-child(8){display:table-cell !important;}
  /* 名称列内嵌的品牌小字隐藏（品牌已在第4列独立显示，无需重复）*/
  .td-brand-inline{display:none !important;}
  
  /* 防止分页截断关键内容 */
  table, tbody, tr{page-break-inside:avoid !important;break-inside:avoid !important;}
  .panel{page-break-inside:avoid !important;break-inside:avoid !important;}
  .quote-panel{page-break-inside:avoid !important;break-inside:avoid !important;}

  /* 汇总区 */
  #sumBaseCard{display:none !important;}
  .summary-bar{display:none !important;}

  /* 折扣三段式 - 一行显示 */
  .discount-row{padding:3px 8px;margin:2px 0;gap:6px;border-radius:4px;flex-wrap:nowrap !important;flex-direction:row !important;align-items:center !important;}
  .discount-row .dr-item{min-width:auto !important;width:auto !important;flex-shrink:1 !important;}
  .discount-row .dr-val{font-size:13px;}
  .discount-row .dr-val.final{font-size:15px;}
  .discount-row .dr-op{font-size:14px;padding-top:5px;display:inline !important;}

  /* 大写金额行 */
  .total-remark{padding:3px 8px;background:#f8faff;border:1px solid #d0d8ec;margin:2px 0;}
  .cn-amount{font-size:8.5pt;font-weight:700;}
  .total-note{font-size:7.5pt;color:#777;}

  /* 备注 */
  .remark-box{font-size:7.5pt;min-height:16px;padding:2px 6px;border:1px solid #bbb;width:100%;}

  /* 打印公章：叠在备注说明区右下角，不遮挡报价金额 */
  .print-seal-area{display:block !important;}
  .print-remark-wrap{position:relative;page-break-inside:avoid !important;break-inside:avoid !important;}
  .print-seal-img{
    position:absolute;
    right:4mm;
    bottom:2mm;
    width:38mm; height:38mm;
    opacity:0.88;
    transform:rotate(-12deg);
    object-fit:contain;
    pointer-events:none;
    z-index:9999;
    -webkit-print-color-adjust:exact;
    print-color-adjust:exact;
  }

  /* 骑缝章已移除，电脑报价只有公章无骑缝章 */
  #gutterSealContainer{display:none !important;}

  /* 打印时隐藏控件元素：含税开关、优惠输入框等 */
  .tax-toggle-wrap,.disc-wrap,.summary-controls{display:none !important;}
  .tax-switch{display:none !important;}
  #toolbarTaxSwitch{display:none !important;}
  .panel-header .summary-controls{display:none !important;}
  
  /* 零配件模式打印样式 */
  .parts-mode .group-header {
    display: table-row !important;
    background: #f5f5f5 !important;
    border-left: 3px solid #3498db !important;
    font-weight: bold !important;
  }
  
  .parts-mode .price-cell {
    display: table-cell !important;
  }
  
  .parts-mode .subtotal-cell {
    display: table-cell !important;
    font-weight: bold !important;
  }
  
  /* 零配件模式打印美化 */
  .parts-mode {
    font-size: 10pt !important;
  }
  
  .parts-mode .group-header {
    background: linear-gradient(90deg, #f8f9fa, #e9ecef) !important;
    border-left: 4px solid #3498db !important;
    font-weight: bold !important;
    color: #2c3e50 !important;
  }
  
  .parts-mode .quote-item {
    border-bottom: 1px solid #dee2e6 !important;
  }
  
  .parts-mode .quote-item:hover {
    background: #f8f9fa !important;
  }
  
  .parts-mode .price-cell {
    font-weight: bold !important;
    color: #e74c3c !important;
  }
  
  .parts-mode .subtotal-cell {
    font-weight: bold !important;
    color: #c0392b !important;
    background: #fff3f3 !important;
  }
}

/* 骑缝章容器和切片：屏幕隐藏 */
#gutterSealContainer{display:none;}
.gutter-seal-page{display:none !important;}
.print-header{display:none;text-align:center;margin-bottom:16px;}
.print-header h1{font-size:22px;color:var(--blue);margin-bottom:4px;}
.print-header p{font-size:12px;color:#666;}

/* 标签颜色 */
.cat-cpu{background:#e3f2fd;color:#1565c0;}
.cat-mb{background:#f3e5f5;color:#6a1b9a;}
.cat-mem{background:#e8f5e9;color:#2e7d32;}
.cat-ssd{background:#fff3e0;color:#e65100;}
.cat-gpu{background:#fce4ec;color:#ad1457;}
.cat-psu{background:#f1f8e9;color:#558b2f;}
.cat-case{background:#e0f2f1;color:#00695c;}
.cat-cool{background:#e8eaf6;color:#283593;}
.cat-mon{background:#fff8e1;color:#f57f17;}
.cat-kb{background:#fbe9e7;color:#bf360c;}
.cat-mouse{background:#e8f5e9;color:#1b5e20;}
.cat-other{background:#f5f5f5;color:#424242;}

/* 操作栏 */
.action-bar{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;}
.scheme-btns{display:flex;gap:8px;align-items:center;}
.scheme-label{font-size:13px;color:#666;font-weight:600;}

/* 快速方案 */
.scheme-bar{display:flex;gap:8px;flex-wrap:wrap;padding:10px 0 4px;align-items:center;}
.scheme-btn{padding:6px 14px;border-radius:20px;border:1.5px solid var(--border);font-size:12px;cursor:pointer;transition:.2s;background:#fff;font-family:inherit;}
.scheme-btn:hover{background:var(--blue2);color:#fff;border-color:var(--blue2);}

/* ─── 自定义模板区 ─── */
.tpl-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;padding:8px 0 4px;border-top:1px dashed var(--border);margin-top:4px;}
.tpl-label{font-size:13px;color:#666;font-weight:600;white-space:nowrap;}
.tpl-item{display:inline-flex;align-items:center;gap:0;border-radius:20px;border:1.5px solid #b8d0f0;background:#f0f6ff;overflow:hidden;}
.tpl-load{padding:5px 12px;font-size:12px;cursor:pointer;background:none;border:none;color:var(--blue2);font-weight:600;font-family:inherit;transition:.2s;}
.tpl-load:hover{background:var(--blue2);color:#fff;}
.tpl-del{padding:5px 8px;font-size:12px;cursor:pointer;background:none;border:none;border-left:1px solid #c8daf5;color:#e74c3c;font-family:inherit;transition:.2s;line-height:1;}
.tpl-del:hover{background:#fee;color:#c0392b;}
.tpl-save-btn{padding:6px 14px;border-radius:20px;border:1.5px solid #27ae60;font-size:12px;cursor:pointer;transition:.2s;background:#f0fff4;color:#27ae60;font-weight:700;font-family:inherit;white-space:nowrap;}
.tpl-save-btn:hover{background:#27ae60;color:#fff;}
.tpl-empty{font-size:12px;color:#bbb;}

/* 响应式 */
@media screen and (max-width:1100px){
  .main{grid-template-columns:1fr;}
  .parts-list{max-height:300px;}
}

/* ═════════════════════════════════════════
   平板 (≤768px) - 移动端布局重设计
═════════════════════════════════════════ */
@media screen and (max-width:768px){
  /* 基础重置 */
  body{padding-top:0 !important;min-height:100vh;}
  .topbar,.company-bar{display:none !important;}

  /* 主布局：全屏单栏flex */
  .main{
    display:flex !important;
    flex-direction:column !important;
    width:100vw !important;
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    gap:0 !important;
    min-height:100vh;
    background:#eef2f8;
  }

  /* 隐藏配件库（由FAB触发抽屉） */
  .main > .panel.no-print{display:none !important;}

  /* ─── 顶部标题区 sticky ─── */
  .hd{
    background:linear-gradient(130deg,#1e3a5f 0%,#2d4a6f 100%) !important;
    padding:12px 16px !important;
    position:sticky !important;
    top:0 !important;
    z-index:100;
    box-shadow:0 2px 8px rgba(0,0,0,.15);
  }
  .hd::after{display:none !important;}
  .hd h1{font-size:17px !important;letter-spacing:1px !important;margin-bottom:0 !important;}
  .hd-hint{display:none !important;}
  .hd-actions{
    width:100% !important;
    overflow-x:auto !important;
    padding-bottom:0 !important;
    flex-shrink:0 !important;
    gap:8px !important;
    flex-wrap:nowrap !important;
    -webkit-overflow-scrolling:touch;
  }
  .hd-actions button{
    white-space:nowrap !important;
    flex-shrink:0 !important;
    padding:8px 12px !important;
    font-size:12px !important;
  }
  /* 隐藏不常用按钮 */
  .t-work[onclick="exportExcel()"],
  .t-print[onclick="printQuote()"],
  .t-mode{display:none !important;}

  /* ─── 客户信息卡片（折叠式）─── */
  .cust-panel{
    background:#fff !important;
    border-bottom:1px solid #dde4f0 !important;
  }
  .cust-panel-hd{
    padding:10px 16px !important;
    font-size:13px !important;
    cursor:pointer;
    user-select:none;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
  }
  .cust-panel-hd:active{opacity:.9;}
  .quote-status-inline{display:none !important;}
  .cust-panel-body{
    padding:12px 16px !important;
    display:none;
  }
  .cust-panel-body.open{display:block !important;}
  .cust-grid{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:10px !important;
  }
  .cust-fg label{font-size:11px !important;}
  .cust-fg input,.cust-fg select{
    padding:10px 12px !important;
    font-size:14px !important;
    min-height:44px;
  }

  /* ─── 报价明细面板 ─── */
  #detailPanel{
    background:#fff !important;
    margin-bottom:8px;
  }
  #detailPanel .panel-header{
    padding:10px 16px !important;
    font-size:13px !important;
    position:sticky;
    top:0;
    z-index:50;
    background:#1e3a5f !important;
  }
  #detailPanel .panel-body{padding:8px !important;}
  #detailPanel .tpl-bar{display:none !important;}

  /* 表格 */
  .quote-table-wrap{overflow-x:auto !important;-webkit-overflow-scrolling:touch;}
  table{font-size:12px !important;min-width:600px;}
  thead th{padding:8px !important;font-size:11px !important;white-space:nowrap;}
  tbody td{padding:10px 8px !important;min-height:44px;vertical-align:middle;}
  /* 隐藏次要列：品牌 */
  thead th:nth-child(4),
  tbody td:nth-child(4){display:none !important;}
  thead th:nth-child(1){width:32px !important;}
  tbody td:nth-child(1){width:32px !important;font-size:11px !important;color:#999 !important;}
  .qty-input,.price-input{width:50px !important;padding:8px 4px !important;font-size:14px !important;}
  .del-btn{padding:8px 10px !important;font-size:14px !important;min-width:36px;min-height:36px;}
  .td-name{font-size:13px !important;}
  .td-spec{font-size:10px !important;}

  /* ─── 费用汇总面板 ─── */
  .panel:has(#discountRow){background:#fff !important;margin-bottom:8px;}
  .panel:has(#discountRow) .panel-header{
    padding:10px 16px !important;
    font-size:13px !important;
    background:#1e3a5f !important;
  }
  .panel:has(#discountRow) .panel-body{padding:12px 16px !important;}

  /* 折扣三段式 */
  .discount-row{
    flex-direction:column !important;
    align-items:center !important;
    gap:10px !important;
    padding:12px !important;
  }
  .discount-row .dr-item{width:100%;text-align:center !important;}
  .discount-row .dr-val{font-size:20px !important;}
  .discount-row .dr-val.final{font-size:24px !important;}
  .discount-row .dr-op{display:none !important;}

  /* 大写金额 */
  .total-remark{
    flex-direction:column !important;
    align-items:flex-start !important;
    gap:4px !important;
    padding:10px 12px !important;
  }
  .cn-amount{font-size:13px !important;}
  .total-note{font-size:11px !important;margin-left:0 !important;}

  /* 备注 */
  .remark-box{font-size:14px !important;min-height:80px !important;padding:12px !important;}

  /* ─── 底部固定操作栏 ─── */
  .action-bar{
    position:fixed !important;
    bottom:0 !important;
    left:0 !important;
    right:0 !important;
    z-index:200 !important;
    background:#fff !important;
    padding:12px 16px !important;
    box-shadow:0 -2px 12px rgba(0,0,0,.1) !important;
    display:flex !important;
    gap:10px !important;
    justify-content:space-between !important;
  }
  .action-bar .btn{
    flex:1 !important;
    padding:14px 16px !important;
    font-size:14px !important;
    border-radius:10px !important;
    min-height:48px;
  }
  .action-bar .btn-primary{background:#1e3a5f !important;color:#fff !important;}

  /* 工具栏在移动端折叠到操作栏 */
  .toolbar{display:none !important;}

  /* ─── 汉堡菜单按钮 ─── */
  .mobile-nav-btn{
    display:flex !important;
    width:48px !important;
    height:48px !important;
    top:0 !important;
    right:0 !important;
    border-radius:0 0 0 12px !important;
  }

  /* ─── 抽屉式配件库（底部弹出）─── */
  .drawer-overlay{
    position:fixed;inset:0;
    background:rgba(0,0,0,.5);
    z-index:999;opacity:0;
    pointer-events:none;
    transition:opacity .3s;
  }
  .drawer-overlay.show{opacity:1;pointer-events:auto;}
  .lib-fab{
    display:flex !important;
    position:fixed !important;
    right:16px !important;
    bottom:80px !important;
    z-index:998 !important;
    width:56px !important;
    height:56px !important;
    border-radius:50% !important;
    background:linear-gradient(135deg,#1e3a5f,#2d4a6f) !important;
    color:#fff !important;
    border:none !important;
    cursor:pointer !important;
    box-shadow:0 4px 16px rgba(30,64,175,.4) !important;
    font-size:24px !important;
  }
  .main > .panel.no-print{
    position:fixed !important;
    left:0 !important;right:0 !important;
    bottom:0 !important;top:auto !important;
    width:100% !important;
    max-height:80vh !important;
    border-radius:16px 16px 0 0 !important;
    z-index:1000 !important;
    transform:translateY(100%) !important;
    transition:transform .3s ease !important;
    box-shadow:0 -4px 20px rgba(0,0,0,.15) !important;
    display:flex !important;
    flex-direction:column !important;
  }
  .main > .panel.no-print.open{transform:translateY(0) !important;}
  .panel-header{
    padding:14px 16px !important;
    font-size:14px !important;
    flex-shrink:0;
    border-radius:16px 16px 0 0 !important;
  }
  .panel-body{
    flex:1;overflow-y:auto;
    padding:12px !important;
    -webkit-overflow-scrolling:touch;
  }
  .parts-list{max-height:calc(80vh - 200px) !important;}
  .part-item{padding:12px !important;gap:12px !important;}
  .part-name{font-size:14px !important;}
  .part-price{font-size:15px !important;}
  .part-add{width:36px !important;height:36px !important;font-size:18px !important;}

  /* 内容区加底部安全距离 */
  .main > .quote-panel{margin-bottom:70px !important;}
}

/* ═════════════════════════════════════════
   手机 (≤480px)
═════════════════════════════════════════ */
@media screen and (max-width:480px){
  .hd h1{font-size:16px !important;}
  .hd-actions button{padding:7px 10px !important;font-size:11px !important;}
  .cust-grid{grid-template-columns:1fr !important;gap:8px !important;}
  table{min-width:520px;}
  thead th:nth-child(3),
  tbody td:nth-child(3){display:none !important;}  /* 隐藏规格列 */
  thead th:nth-child(6),
  tbody td:nth-child(6){display:none !important;}  /* 隐藏单位列 */
  .summary-bar{grid-template-columns:1fr !important;}
  .sum-card{padding:10px 12px !important;}
  .sum-card .val{font-size:18px !important;}
  .action-bar{padding:10px 12px !important;gap:8px !important;}
  .action-bar .btn{padding:12px 14px !important;font-size:13px !important;min-height:44px;}
  .lib-fab{bottom:70px !important;width:50px !important;height:50px !important;}
  .parts-list{max-height:calc(75vh - 180px) !important;}
}

/* 手机端抽屉式配件库（已合并到上方768px块，此处保留以防冲突） */
@media screen and (max-width:768px){
  .drawer-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:999;opacity:0;pointer-events:none;transition:opacity .3s;}
  .drawer-overlay.show{opacity:1;pointer-events:auto;}
  .lib-fab{display:flex !important;}
  .main > .panel.no-print{
    position:fixed;left:0;right:0;bottom:0;top:auto;
    width:100%;max-height:80vh;border-radius:16px 16px 0 0;
    z-index:1000;transform:translateY(100%);transition:transform .3s ease;
    box-shadow:0 -4px 20px rgba(0,0,0,.15);display:flex !important;flex-direction:column;
  }
  .main > .panel.no-print.open{transform:translateY(0);}
}
@media screen and (min-width:769px){
  .lib-fab{display:none !important;}
}
.lib-fab{position:fixed;right:16px;bottom:20px;z-index:998;width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,#1d4ed8,#1e40af);color:#fff;border:none;cursor:pointer;box-shadow:0 4px 16px rgba(30,64,175,.4);font-size:24px;display:none;align-items:center;justify-content:center;transition:.2s;}
.lib-fab:hover{transform:translateY(-2px) scale(1.05);box-shadow:0 6px 24px rgba(30,64,175,.5);}



/* ─── 自定义配件弹窗 ─── */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:1000;display:flex;align-items:center;justify-content:center;}
.modal-overlay.hidden{display:none;}
.modal-box{background:#fff;border-radius:14px;padding:28px 32px;width:480px;max-width:95vw;box-shadow:0 8px 40px rgba(0,0,0,.25);position:relative;}
.modal-box h3{font-size:17px;color:var(--blue);margin-bottom:20px;padding-bottom:10px;border-bottom:2px solid var(--blue3);}
.modal-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
.modal-grid .full{grid-column:1/-1;}
.modal-box .form-group label{font-weight:600;color:#555;}
.modal-actions{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-top:20px;padding-top:14px;border-top:1px solid var(--border);}
.modal-close{position:absolute;top:14px;right:16px;background:none;border:none;font-size:20px;cursor:pointer;color:#aaa;line-height:1;}
.modal-close:hover{color:#e74c3c;}
/* 自定义配件在列表中的标识 */
.custom-badge{display:inline-block;background:#fff3e0;color:#e65100;border:1px solid #ffcc80;border-radius:10px;font-size:10px;padding:1px 6px;margin-left:4px;font-weight:600;vertical-align:middle;}
@media print{.custom-badge{display:none !important;}}
/* 配件库中自定义配件的删除按钮 */
.part-db-del{width:22px;height:22px;border-radius:50%;border:1px solid #fcc;background:#fee;color:#e74c3c;font-size:13px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1;padding:0;transition:.2s;}
.part-db-del:hover{background:#e74c3c;color:#fff;border-color:#e74c3c;}
/* 弹窗底部保存开关 */
.modal-save-toggle{display:flex;align-items:center;gap:7px;font-size:13px;color:#555;cursor:pointer;user-select:none;}
.modal-save-toggle input[type=checkbox]{width:15px;height:15px;cursor:pointer;accent-color:var(--blue2);}

/* ─── 京东搜索区 ─── */
.zol-search-section{border-top:2px dashed #ffd0d0;margin-top:10px;padding-top:10px;}
.zol-search-header{display:flex;align-items:center;gap:8px;margin-bottom:8px;cursor:pointer;user-select:none;}
.zol-search-header .zol-title{font-size:13px;font-weight:700;color:#e2231a;}
.zol-search-header .zol-logo{font-size:11px;background:#fff0f0;color:#e2231a;border:1px solid #ffd0d0;border-radius:4px;padding:1px 5px;font-weight:700;}
.zol-search-header .zol-toggle{margin-left:auto;font-size:12px;color:#999;transition:.2s;}
.zol-search-body{display:none;}
.zol-search-body.open{display:block;}
.zol-input-row{display:flex;gap:6px;margin-bottom:8px;}
.zol-input-row input{flex:1;padding:7px 10px;border:1.5px solid var(--border);border-radius:8px;font-size:13px;font-family:inherit;outline:none;}
.zol-input-row input:focus{border-color:var(--blue2);}
.zol-input-row button{padding:7px 14px;background:#e2231a;color:#fff;border:none;border-radius:8px;font-size:13px;cursor:pointer;white-space:nowrap;transition:.2s;}
.zol-input-row button:hover{background:#b71c1c;}
.zol-results{max-height:260px;overflow-y:auto;display:flex;flex-direction:column;gap:6px;}
.zol-result-item{border:1px solid var(--border);border-radius:8px;padding:8px 10px;background:#fafcff;display:flex;align-items:flex-start;gap:8px;transition:.15s;}
.zol-result-item:hover{border-color:var(--blue2);background:#f0f6ff;}
.zol-result-info{flex:1;min-width:0;}
.zol-result-name{font-size:13px;font-weight:600;color:#222;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.zol-result-sub{font-size:11px;color:#888;margin-top:2px;display:flex;gap:8px;flex-wrap:wrap;}
.zol-result-price{font-size:13px;font-weight:700;color:#e53935;white-space:nowrap;}
.zol-result-btns{display:flex;flex-direction:column;gap:4px;flex-shrink:0;}
.zol-btn-add{padding:4px 10px;font-size:12px;border:1.5px solid var(--blue2);background:#fff;color:var(--blue2);border-radius:6px;cursor:pointer;transition:.15s;white-space:nowrap;}
.zol-btn-add:hover{background:var(--blue2);color:#fff;}
.zol-btn-add.added{background:#e8f5e9;border-color:#43a047;color:#2e7d32;pointer-events:none;}
.zol-tip{font-size:12px;color:#aaa;text-align:center;padding:12px 0;}
.zol-loading{text-align:center;padding:12px;color:#888;font-size:13px;}

/* ─── 打印专用页眉（屏幕隐藏） ─── */
.print-page-header{display:none;}

/* ─── 汇总折扣三段式（屏幕端） ─── */
.discount-row{
  display:flex;align-items:center;justify-content:center;
  gap:12px;padding:10px 18px;
  background:linear-gradient(90deg,#f8faff,#fff8f0);
  border:1.5px solid #d0d8ec;border-radius:10px;
  flex-wrap:wrap;
}
.discount-row .dr-item{text-align:center;min-width:100px;}
.discount-row .dr-label{font-size:11px;color:#888;margin-bottom:3px;}
.discount-row .dr-val{font-size:18px;font-weight:800;color:var(--blue);}
.discount-row .dr-val.strike{color:#bbb;text-decoration:line-through;font-size:16px;}
.discount-row .dr-val.discount{color:#e65100;}
.discount-row .dr-val.final{color:var(--red);font-size:22px;}
.discount-row .dr-op{font-size:22px;color:#bbb;font-weight:300;padding-top:12px;}
/* ─── 全局Toast提示 ─── */
.toast-msg{position:fixed;bottom:32px;left:50%;transform:translateX(-50%) translateY(20px);
  background:#1a3c6e;color:#fff;padding:11px 28px;border-radius:24px;font-size:14px;font-weight:600;
  box-shadow:0 4px 20px rgba(0,0,0,.22);z-index:9999;opacity:0;transition:all .3s;pointer-events:none;white-space:nowrap;}
.toast-msg.show{opacity:1;transform:translateX(-50%) translateY(0);}
.toast-msg.warn{background:#e65100;}
.toast-msg.error{background:#c0392b;}
.discount-row.no-discount .dr-op-eq,.discount-row.no-discount .dr-item-final{display:none;}
</style>