*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;background:#f5f6f8;color:#222}.app{display:flex;min-height:100vh}aside{width:220px;background:#1f2937;color:#fff;padding:24px 16px}.brand{font-size:22px;font-weight:800;line-height:1.25;margin-bottom:28px}.brand span{font-size:13px;color:#cbd5e1;font-weight:400}.nav{display:block;width:100%;padding:12px 14px;border:0;border-radius:10px;background:transparent;color:#d1d5db;text-align:left;cursor:pointer;margin-bottom:8px;font-size:15px}.nav.active,.nav:hover{background:#374151;color:#fff}main{flex:1;padding:26px;overflow:auto}.page{display:none}.page.active{display:block}.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}h1{margin:0 0 12px;font-size:26px}h2{margin:0 0 14px;font-size:18px}h3{margin:18px 0 10px;font-size:16px}.card{background:#fff;border-radius:14px;padding:18px;margin-bottom:18px;box-shadow:0 5px 20px rgba(0,0,0,.05)}.grid{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:12px}input,select,textarea{width:100%;padding:11px 12px;border:1px solid #d8dde6;border-radius:9px;font-size:14px;background:#fff}textarea{margin-top:12px;min-height:72px}.primary{background:#2563eb;color:#fff;border:0;border-radius:10px;padding:11px 18px;font-weight:700;cursor:pointer}.danger{background:#ef4444;color:#fff;border:0;border-radius:8px;padding:8px 12px;cursor:pointer}.secondary{background:#e5e7eb;color:#111827;border:0;border-radius:8px;padding:8px 12px;cursor:pointer}.link{border:0;background:transparent;color:#2563eb;cursor:pointer;font-size:15px;margin-bottom:12px}.hidden{display:none!important}.list{display:grid;gap:12px}.item{background:#fff;border-radius:14px;padding:16px;box-shadow:0 5px 20px rgba(0,0,0,.04)}.item-head{display:flex;justify-content:space-between;gap:12px}.muted{color:#6b7280;font-size:13px;line-height:1.7}.actions{display:flex;gap:8px;flex-wrap:wrap}.upload{display:inline-block;margin:12px 0;padding:11px 14px;background:#f3f4f6;border-radius:10px;cursor:pointer}.upload input{display:none}.tabs{display:flex;gap:8px;margin:14px 0}.pill{padding:8px 12px;border:1px solid #d1d5db;border-radius:999px;background:#fff;cursor:pointer}.pill.active{background:#111827;color:#fff}.room-list{display:grid;gap:12px;margin:14px 0}.room-card{border:1px solid #e5e7eb;background:#fafafa;border-radius:14px;padding:14px}.room-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:10px}.room-functions{display:flex;flex-wrap:wrap;gap:8px}.small-check{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid #e5e7eb;border-radius:999px;padding:7px 10px;font-size:13px;white-space:nowrap}.small-check input,.checkboxes input,.column-tools input{width:auto}.small-check:has(input:checked){background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}.quote-row{display:grid;grid-template-columns:1fr 1fr .75fr 1.5fr .65fr .65fr .85fr .85fr 1.8fr auto;gap:8px;align-items:center;margin-bottom:8px}.quote-head{font-weight:700;color:#374151}.accessory-row{background:#f8fafc;border-left:3px solid #93c5fd;padding:6px;border-radius:8px}.pending-row{background:#fff7ed;border-left:3px solid #f59e0b;padding:6px;border-radius:8px}.role-tag{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#eef2ff;color:#3730a3;padding:5px 8px;font-size:12px}.pending-box{margin-top:18px;border:1px dashed #f59e0b;background:#fffbeb;border-radius:14px;padding:14px}.total{font-size:22px;font-weight:900;text-align:right;margin:16px 0}.checkboxes{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}.checkboxes label,.column-tools label{background:#f3f4f6;border-radius:999px;padding:8px 12px}.quick-tools,.column-tools{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.column-tools{padding:12px;background:#fafafa;border-radius:12px;border:1px dashed #d1d5db}.floorplan{max-width:280px;max-height:180px;border-radius:10px;border:1px solid #e5e7eb}.prose{line-height:1.8}@media(max-width:1100px){.grid{grid-template-columns:repeat(2,1fr)}aside{width:180px}.quote-row{grid-template-columns:1fr 1fr}.quote-head{display:none}.room-card-head{display:block}.room-card-head .danger{margin-top:10px}}

.service-fee-box{display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:12px;padding:12px;margin:10px 0 14px}.service-fee-box label{display:flex;gap:6px;align-items:center;background:#fff;border-radius:999px;padding:8px 12px}.service-fee-box input[type=checkbox]{width:auto}.service-fee-box select{max-width:210px}.service-fee-box input[type=number]{max-width:180px}.service-row{background:#eff6ff;border-left:4px solid #2563eb;padding:8px;border-radius:8px;font-weight:700}
.package-grid{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:10px;margin:10px 0 14px}.package-card{display:flex;flex-direction:column;gap:6px;align-items:flex-start;text-align:left;border:1px solid #dbeafe;background:linear-gradient(180deg,#fff,#f8fbff);border-radius:14px;padding:13px;cursor:pointer;min-height:150px;color:#111827;box-shadow:0 4px 14px rgba(37,99,235,.06)}.package-card:hover{border-color:#2563eb;box-shadow:0 10px 26px rgba(37,99,235,.14);transform:translateY(-1px)}.package-card b{font-size:16px}.package-card em{font-style:normal;color:#475569;font-size:12px;line-height:1.55}.package-card small{color:#64748b;font-size:12px;line-height:1.45}.package-card .tag{background:#dbeafe;color:#1d4ed8;border-radius:999px;padding:3px 8px;font-size:12px;font-weight:700}
@media(max-width:1100px){.package-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.package-grid{grid-template-columns:1fr}.package-card{min-height:auto}}
.import-card{border:1px solid #dbeafe;background:#f8fbff}.small-upload{margin:0;padding:8px 12px}.warn{margin-top:8px;color:#b45309;line-height:1.6}.danger-text{color:#dc2626;font-weight:700}
.image-import-card{border:1px solid #dcfce7;background:#f8fff9}.inline-check{display:inline-flex;align-items:center;gap:6px;background:#fff;border-radius:999px;padding:8px 12px}.inline-check input{width:auto}.match-list{margin-top:8px;line-height:1.7;color:#166534}.product-item{display:grid;grid-template-columns:86px 1fr;gap:14px;align-items:start}.product-thumb{width:74px;height:74px;border:1px solid #e5e7eb;border-radius:12px;background:#f8fafc;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:12px;overflow:hidden}.product-thumb img{width:100%;height:100%;object-fit:cover}.product-info{min-width:0}.form-actions{margin-top:12px;align-items:center}
@media(max-width:800px){.product-item{grid-template-columns:1fr}.product-thumb{width:100%;height:120px}}

/* V1.10 产品表单：提示文字移到输入框外面 */
.form-grid{align-items:start}.form-field{display:flex;flex-direction:column;gap:7px}.form-field span{font-size:13px;font-weight:700;color:#374151}.form-field em{font-style:normal;font-size:12px;line-height:1.4;color:#8a94a6}.form-field input,.form-field select,.form-field textarea{margin:0}.wide-field{margin-top:12px}.wide-field textarea{min-height:82px}

/* V1.10 手机端适配 */
.quote-edit-field{display:block;margin:0}.quote-edit-field em{display:none}.quote-edit-field input{width:100%}.quote-actions{gap:6px}
@media(max-width:760px){
  html{-webkit-text-size-adjust:100%}
  body{background:#f3f4f6;overscroll-behavior-y:none}.app{display:block;min-height:100vh;padding-bottom:76px}
  aside{position:fixed;left:0;right:0;bottom:0;z-index:100;width:auto;height:68px;background:#111827;padding:8px 8px calc(8px + env(safe-area-inset-bottom));display:flex;gap:6px;align-items:center;justify-content:space-between;border-radius:18px 18px 0 0;box-shadow:0 -8px 28px rgba(0,0,0,.18)}
  .brand{display:none}.nav{flex:1;margin:0;padding:9px 4px;text-align:center;border-radius:13px;font-size:13px;line-height:1.2;color:#cbd5e1}.nav.active,.nav:hover{background:#2563eb;color:#fff}
  main{padding:12px 10px 92px;overflow:visible}.page{animation:fadeIn .18s ease}@keyframes fadeIn{from{opacity:.6;transform:translateY(4px)}to{opacity:1;transform:none}}
  .topbar{position:sticky;top:0;z-index:30;display:flex;gap:10px;align-items:center;justify-content:space-between;margin:-12px -10px 12px;padding:12px 10px;background:rgba(243,244,246,.95);backdrop-filter:blur(10px);border-bottom:1px solid #e5e7eb}
  h1{font-size:21px;line-height:1.25;margin:0 0 8px}h2{font-size:17px}h3{font-size:15px;margin:14px 0 8px}.card,.item{border-radius:16px;padding:14px;margin-bottom:12px;box-shadow:0 3px 14px rgba(15,23,42,.06)}
  .grid,.form-grid{grid-template-columns:1fr!important;gap:10px}input,select,textarea{font-size:16px;min-height:44px;padding:12px;border-radius:11px}textarea{margin-top:10px;min-height:86px}.form-field{gap:6px}.form-field span{font-size:14px}.form-field em{font-size:12px}
  .primary,.secondary,.danger,.upload{min-height:44px;border-radius:12px}.actions,.quick-tools,.column-tools,.checkboxes,.service-fee-box{display:grid;grid-template-columns:1fr;gap:8px}.actions button,.quick-tools button,.primary,.secondary,.danger,.upload{width:100%;text-align:center}.small-upload{width:100%;text-align:center;margin:0}.inline-check{width:100%;justify-content:center;border-radius:12px}
  .item-head{display:block}.item-head .actions{margin-top:12px}.muted{font-size:12.5px}.list{gap:10px}.floorplan{display:block;max-width:100%;max-height:260px;margin-top:10px;border-radius:12px}
  .room-card{padding:12px;border-radius:16px;background:#fff}.room-card-head{display:block}.room-card-head .danger{margin-top:10px}.room-functions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.small-check{justify-content:center;white-space:normal;border-radius:12px;padding:10px 6px;font-size:13.5px;min-height:40px}.small-check input,.checkboxes input,.column-tools input,.service-fee-box input[type=checkbox]{width:auto;min-height:auto}
  .column-tools{background:#fff;border:1px dashed #cbd5e1;border-radius:14px}.checkboxes label,.column-tools label,.service-fee-box label{border-radius:12px;padding:10px 12px;background:#fff}.service-fee-box{align-items:stretch}.service-fee-box select,.service-fee-box input[type=number]{max-width:none;width:100%}.total{text-align:left;font-size:20px;background:#111827;color:#fff;padding:12px 14px;border-radius:14px}
  .quote-head{display:none!important}.quote-row{display:block!important;grid-template-columns:none!important;background:#fff;border:1px solid #e5e7eb;border-left:4px solid #cbd5e1;border-radius:16px;padding:12px;margin-bottom:10px;box-shadow:0 2px 10px rgba(15,23,42,.04)}.accessory-row{border-left-color:#60a5fa}.pending-row{border-left-color:#f59e0b}.service-row{border-left-color:#2563eb}
  .quote-row>span{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;border-bottom:1px dashed #e5e7eb;padding:7px 0;margin:0;font-size:14px}.quote-row>span::before{content:attr(data-label);flex:0 0 54px;color:#6b7280;font-weight:700}.quote-row .role-tag{display:flex;justify-content:space-between;background:transparent;color:#111827;border-radius:0}.quote-row .role-tag::after{display:none}
  .quote-edit-field{display:grid;grid-template-columns:54px 1fr;gap:12px;align-items:center;border-bottom:1px dashed #e5e7eb;padding:8px 0;margin:0}.quote-edit-field em{display:block;font-style:normal;color:#6b7280;font-size:14px;font-weight:700}.quote-edit-field input{min-height:40px;font-size:16px}.quote-actions{display:grid!important;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.quote-actions button{width:100%}
  .pending-box{border-radius:16px;padding:12px;margin-top:14px}.product-item{grid-template-columns:70px 1fr!important;gap:10px;align-items:start}.product-thumb{width:64px!important;height:64px!important;border-radius:12px}.product-info{display:block}.product-info .actions{margin-top:10px}.prose{font-size:14px}.link{padding:10px 0;margin-bottom:6px}.import-card,.image-import-card{border-radius:16px}
}
@media(max-width:380px){.room-functions{grid-template-columns:1fr}.nav{font-size:12px}.quote-actions{grid-template-columns:1fr}.product-item{grid-template-columns:1fr!important}.product-thumb{width:100%!important;height:120px!important}}


/* V1.10 产品新增/编辑独立弹窗 */
.modal-mask{position:fixed;inset:0;z-index:999;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center;padding:20px}.modal-mask.hidden{display:none!important}.modal-panel{width:min(980px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:18px;padding:20px;box-shadow:0 24px 80px rgba(0,0,0,.28)}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}.modal-head h2{margin:0 0 4px}.modal-close{border:0;background:#f3f4f6;color:#111827;width:38px;height:38px;border-radius:999px;font-size:26px;line-height:1;cursor:pointer}.modal-close:hover{background:#e5e7eb}.modal-actions{position:sticky;bottom:-20px;background:#fff;padding-top:12px;border-top:1px solid #eef2f7}.modal-open{overflow:hidden}
@media(max-width:760px){.modal-mask{align-items:flex-end;padding:0}.modal-panel{width:100vw;max-height:92vh;border-radius:22px 22px 0 0;padding:16px 12px calc(18px + env(safe-area-inset-bottom))}.modal-head{position:sticky;top:0;z-index:2;background:#fff;padding-bottom:10px}.modal-actions{bottom:calc(-18px - env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr;gap:8px}.modal-close{width:42px;height:42px}}

/* V1.10 新增产品独立页面 */
.product-create-tip{border:1px solid #e0e7ff;background:#f8fbff}.product-create-panel{width:min(980px,96vw)}.create-actions{grid-template-columns:auto auto auto auto auto}
@media(max-width:760px){.product-create-tip .item-head{display:block}.product-create-tip .primary{margin-top:10px}.create-actions{grid-template-columns:1fr!important}}

/* V1.11 账号登录/注册/后台授权 */
.auth-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:linear-gradient(135deg,#0f172a,#1e3a8a)}.auth-card{width:min(460px,94vw);background:#fff;border-radius:22px;padding:26px;box-shadow:0 24px 80px rgba(0,0,0,.25)}.auth-brand{font-size:28px;font-weight:900;line-height:1.2;margin-bottom:18px;color:#111827}.auth-brand span{font-size:14px;color:#64748b;font-weight:500}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px;background:#f3f4f6;border-radius:14px;padding:6px}.auth-tabs button{border:0;background:transparent;border-radius:10px;padding:10px;cursor:pointer;font-weight:700;color:#64748b}.auth-tabs button.active{background:#2563eb;color:#fff}.full-btn{width:100%;margin-top:14px}.auth-msg{margin-top:12px}.auth-error{background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;border-radius:12px;padding:10px 12px;line-height:1.6}.auth-ok{background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;border-radius:12px;padding:10px 12px;line-height:1.6}.account-bar{margin:0 0 16px}.account-pill{background:#eef2ff;border:1px solid #c7d2fe;color:#3730a3;border-radius:999px;padding:10px 14px;font-size:14px;display:inline-flex;max-width:100%;line-height:1.5}.logout-nav{background:#4b5563!important;color:#fff!important}.user-item{border-left:4px solid #cbd5e1}.status-badge{display:inline-flex;margin-left:8px;border-radius:999px;padding:3px 8px;font-size:12px;font-weight:700}.ok-badge{background:#dcfce7;color:#166534}.wait-badge{background:#fef3c7;color:#92400e}.bad-badge{background:#fee2e2;color:#991b1b}.admin-actions{max-width:560px;justify-content:flex-end}
@media(max-width:760px){.auth-page{padding:18px}.auth-card{padding:20px;border-radius:20px}.auth-brand{font-size:24px}.account-pill{display:block;border-radius:14px}.admin-actions{max-width:none;display:grid!important;grid-template-columns:1fr!important}.logout-nav{font-size:12px}}

/* V1.13 修复：登录成功后授权页必须真正隐藏，避免 .auth-page / 手机端 .app 样式覆盖 .hidden */
.auth-page.hidden{display:none!important}
.app.hidden{display:none!important}

/* V1.16 产品归属和下拨 */
.product-distribute-panel{width:min(760px,96vw)}.inner-card{background:#f8fafc;border:1px solid #e5e7eb;margin-bottom:12px}.distribute-list{display:grid;gap:10px;max-height:46vh;overflow:auto;margin:12px 0}.distribute-user{display:flex;align-items:flex-start;gap:10px;border:1px solid #e5e7eb;border-radius:12px;padding:11px;background:#fff;cursor:pointer}.distribute-user:hover{background:#f8fafc}.distribute-user input{width:auto;margin-top:4px}.distribute-user span{display:flex;flex-direction:column;gap:3px}.distribute-user em{font-style:normal;color:#6b7280;font-size:12px;line-height:1.5}
@media(max-width:760px){.distribute-list{max-height:50vh}.distribute-user{padding:12px}.distribute-user input{min-height:auto}}

/* V1.17 批量下拨产品 */
.batch-distribute-panel { max-width: 980px; }
.batch-distribute-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.batch-panel-col { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: var(--card-bg); max-height: 62vh; overflow: auto; }
.mini-actions { gap: 6px; }
.mini-actions button { padding: 6px 10px; font-size: 12px; }
.batch-product-row em { display: block; color: var(--muted); font-style: normal; margin-top: 3px; }
@media (max-width: 720px) {
  .batch-distribute-columns { grid-template-columns: 1fr; }
  .batch-panel-col { max-height: 36vh; }
  .batch-distribute-panel { max-width: 100%; }
}


.construction-preview { overflow: hidden; }
.construction-legend { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 14px; }
.point-legend { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border:1px solid #dbe4ef; border-radius:999px; background:#f8fafc; font-size:13px; }
.point-legend b, .point-badge b { display:inline-flex; align-items:center; justify-content:center; min-width:28px; height:28px; border-radius:50%; background:#1d4ed8; color:#fff; font-weight:700; }
.construction-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; }
.construction-room-card { border:1px solid #e5e7eb; border-radius:14px; padding:12px; background:linear-gradient(180deg,#ffffff,#f8fafc); }
.construction-room-card h4 { margin:0 0 8px; }
.construction-points { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:8px; }
.point-badge { display:inline-flex; align-items:center; gap:6px; padding:5px 8px; border:1px solid #dbe4ef; border-radius:999px; background:white; font-size:12px; }
.construction-room-card ul { margin:6px 0 0; padding-left:18px; color:#475569; font-size:13px; }
@media (max-width: 760px) { .construction-grid { grid-template-columns: 1fr; } }


/* V1.19 施工图第二阶段 */
.construction-editor-card .actions { flex-wrap: wrap; }
.construction-canvas { margin-top: 12px; }
.plan-board { position: relative; width: 100%; min-height: 460px; border: 1px solid #dbe3ef; border-radius: 16px; background: #f8fafc; overflow: hidden; }
.plan-board img { width: 100%; display: block; user-select: none; -webkit-user-drag: none; }
.blank-board { display: flex; align-items: center; justify-content: center; background-image: linear-gradient(#e5e7eb 1px, transparent 1px), linear-gradient(90deg, #e5e7eb 1px, transparent 1px); background-size: 32px 32px; }
.blank-tip { text-align: center; color: #64748b; font-size: 15px; line-height: 1.8; }
.plan-marker { position: absolute; transform: translate(-50%, -50%); min-width: 42px; height: 42px; border: 2px solid #111827; border-radius: 999px; background: #fff; color: #111827; box-shadow: 0 8px 20px rgba(15,23,42,.18); cursor: grab; display:flex; flex-direction:column; align-items:center; justify-content:center; font-size: 12px; z-index: 4; }
.plan-marker:active { cursor: grabbing; transform: translate(-50%, -50%) scale(1.08); }
.plan-marker b { line-height: 1; }
.plan-marker small { font-size: 10px; color:#475569; transform: scale(.9); }
.symbol-L { border-color:#f59e0b; }
.symbol-S { border-color:#2563eb; }
.symbol-C { border-color:#16a34a; }
.symbol-P { border-color:#7c3aed; }
.symbol-A { border-color:#0891b2; }
.symbol-W { border-color:#0f766e; }
.symbol-N { border-color:#dc2626; }
.symbol-M { border-color:#db2777; }
.symbol-D { border-color:#111827; }
.symbol-G { border-color:#9333ea; }
.construction-point-list { margin-top: 16px; display: grid; gap: 10px; }
.construction-edit-row { display: grid; grid-template-columns: .8fr .9fr 1fr 1fr 1.5fr 2fr 2fr 1.2fr auto; gap: 8px; align-items: end; padding: 12px; border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; }
.construction-edit-row label { display:flex; flex-direction:column; gap:5px; }
.construction-edit-row em { font-style: normal; color:#64748b; font-size:12px; }
.construction-edit-row input,.construction-edit-row select { width:100%; min-height:36px; border:1px solid #d1d5db; border-radius:10px; padding:6px 8px; }
@media (max-width: 900px) {
  .plan-board { min-height: 320px; }
  .construction-edit-row { grid-template-columns: 1fr; }
  .plan-marker { min-width: 38px; height: 38px; font-size: 11px; }
}

/* V1.20 内部利润表独立查看 */
.profit-card { border-left: 4px solid #f59e0b; }
.profit-box { margin-top: 12px; }
.profit-summary { display:grid; grid-template-columns:repeat(4,minmax(120px,1fr)); gap:10px; margin:12px 0; }
.profit-summary b { display:block; padding:12px; border-radius:12px; background:#fff7ed; color:#9a3412; border:1px solid #fed7aa; }
.profit-row span, .profit-head span { min-width: 96px; }
@media (max-width: 760px) {
  .profit-summary { grid-template-columns:1fr 1fr; }
  .profit-row { display:block; padding:12px; }
  .profit-row span { display:block; margin:4px 0; }
}

.symbol-Z{border-color:#ea580c;background:#fff7ed}

/* V1.26 客户需求下拉多选 */
.form-field{margin-top:12px}.form-field>label{display:block;font-weight:700;color:#111827;margin:0 0 8px}.field-help{font-size:13px;color:#64748b;line-height:1.6;margin-top:6px}.need-select{position:relative}.need-toggle{width:100%;min-height:44px;text-align:left;border:1px solid #d8dde6;background:#fff;border-radius:9px;padding:11px 42px 11px 12px;color:#6b7280;font-size:14px;cursor:pointer;line-height:1.5;white-space:normal}.need-toggle:after{content:'⌄';position:absolute;right:14px;top:11px;font-size:18px;color:#64748b}.need-toggle.has-value{color:#111827;font-weight:600}.need-menu{position:absolute;left:0;right:0;top:calc(100% + 6px);z-index:50;background:#fff;border:1px solid #d8dde6;border-radius:14px;box-shadow:0 18px 50px rgba(15,23,42,.16);padding:10px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:330px;overflow:auto}.need-option{display:flex;align-items:center;gap:8px;border:1px solid #e5e7eb;background:#f8fafc;border-radius:999px;padding:8px 10px;cursor:pointer;font-size:13px;color:#374151}.need-option:hover{background:#eff6ff;border-color:#bfdbfe}.need-option input{width:auto;margin:0}.need-option:has(input:checked){background:#eff6ff;border-color:#2563eb;color:#1d4ed8;font-weight:700}.need-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px;border-top:1px solid #eef2f7;padding-top:10px;margin-top:2px}
@media(max-width:760px){.need-menu{position:fixed;left:12px;right:12px;top:auto;bottom:86px;grid-template-columns:1fr 1fr;max-height:54vh}.need-actions{display:grid;grid-template-columns:1fr 1fr}.need-toggle{min-height:48px}}

.floorplan-status{margin:8px 0 12px;padding:10px 12px;border-radius:10px;background:#f8fafc;border:1px dashed #cbd5e1}.floorplan-status.ok{background:#f0fdf4;border-color:#86efac;color:#166534}.floorplan-status.error{background:#fef2f2;border-color:#fecaca;color:#991b1b}.floorplan-status.loading{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}.floorplan-preview{display:block;max-width:360px;max-height:240px;margin-top:10px;border-radius:12px;border:1px solid #e5e7eb;background:#fff;object-fit:contain}
@media(max-width:760px){.floorplan-preview{max-width:100%;max-height:220px}}
.export-options-panel{width:min(860px,96vw)}
.export-sheet-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 8px}.export-sheet-item{display:flex;gap:10px;align-items:flex-start;border:1px solid #e5e7eb;background:#f8fafc;border-radius:14px;padding:12px;cursor:pointer}.export-sheet-item:hover{border-color:#bfdbfe;background:#eff6ff}.export-sheet-item input{margin-top:4px}.export-sheet-item span{display:flex;flex-direction:column;gap:4px}.export-sheet-item b{font-size:14px;color:#111827}.export-sheet-item em{font-style:normal;color:#64748b;font-size:12px;line-height:1.45}@media(max-width:760px){.export-sheet-list{grid-template-columns:1fr}.export-options-panel{width:100vw}}

/* V1.34 库存管理 */
.inventory-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:12px 0 16px;}
.summary-card{background:#fff;border:1px solid #e5e7eb;border-radius:14px;padding:16px;box-shadow:0 8px 24px rgba(15,23,42,.05);}
.summary-card b{display:block;font-size:24px;color:#111827;margin-bottom:4px;}
.summary-card span{color:#6b7280;font-size:13px;}
.warn-card{border-color:#f59e0b;background:#fffbeb;}
.inventory-line{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:8px 0;color:#374151;}
.status-badge{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:700;white-space:nowrap;}
.ok-badge{background:#dcfce7;color:#166534;}
.wait-badge{background:#fef3c7;color:#92400e;}
.bad-badge{background:#fee2e2;color:#991b1b;}
.inventory-actions{min-width:220px;justify-content:flex-end;}
.inventory-panel{max-width:760px;}
.inventory-product-preview{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:12px;margin-bottom:14px;}
.compact-list .item,.compact-item{padding:12px;border-radius:12px;}
.inventory-record{display:grid;grid-template-columns:1.5fr .5fr 1.2fr 1.6fr;gap:10px;align-items:center;}
@media (max-width: 760px){
  .inventory-summary{grid-template-columns:repeat(2,minmax(0,1fr));}
  .inventory-record{display:block;}
  .inventory-actions{min-width:0;justify-content:flex-start;}
}

/* V1.52 销售单产品搜索 + 批量入库 */
.sales-order-panel{max-width:1100px;width:min(96vw,1100px)}
.sales-item-rows{display:flex;flex-direction:column;gap:12px;margin-top:10px}
.sales-item-row{display:grid;grid-template-columns:minmax(220px,1.45fr) minmax(190px,1.3fr) minmax(90px,.55fr) minmax(120px,.75fr) minmax(170px,1fr) 74px;gap:10px;align-items:start;border:1px solid var(--border,#e5e7eb);border-radius:14px;padding:12px;background:#fff}
.sales-product-field,.sales-product-search-field{min-width:0}
.sales-product-field select,.sales-product-search-field input{width:100%}
.sales-item-row > button.secondary{height:46px;margin-top:31px;align-self:start}
.sales-stock-tip{grid-column:1/-1;font-size:12px}
.sales-total{font-size:16px;font-weight:700;text-align:right;margin:14px 0;color:#111827}
.sales-order-item .inventory-line{margin-top:8px}
.table-wrap{overflow:auto;width:100%;margin-top:12px}
.mini-table{width:100%;border-collapse:collapse;background:#fff;border-radius:12px;overflow:hidden}
.mini-table th,.mini-table td{border:1px solid #e5e7eb;padding:8px 10px;text-align:left;font-size:13px;white-space:nowrap}
.mini-table th{background:#f8fafc;font-weight:700}
.danger-btn{border-color:#fecaca!important;color:#b91c1c!important;background:#fff5f5!important}
@media (max-width: 980px){
  .sales-item-row{grid-template-columns:1fr 1fr;gap:8px}
  .sales-item-row > button.secondary{margin-top:0;grid-column:1/-1}
}
@media (max-width: 768px){
  .sales-item-row{grid-template-columns:1fr;gap:8px}
  .sales-order-panel{width:100%;max-height:92vh;border-radius:18px 18px 0 0;margin-top:auto}
  .sales-total{text-align:left}
}


/* V1.52 销售单产品搜索 + 批量入库 */
.inventory-batch-panel{max-width:1240px;width:min(98vw,1240px)}
.batch-in-rows{display:flex;flex-direction:column;gap:10px;margin-top:10px}
.batch-in-row{display:grid;grid-template-columns:minmax(220px,1.7fr) minmax(130px,1fr) minmax(110px,.8fr) minmax(130px,1fr) minmax(170px,1.2fr) minmax(170px,1.2fr) 92px;gap:10px;align-items:start;padding:12px;border:1px solid #e5e7eb;border-radius:14px;background:#fff}
.batch-in-row .wide-field{grid-column:auto}
.batch-in-row > button.danger.small-btn{height:46px;margin-top:31px;width:100%;align-self:start}
.small-btn{padding:8px 10px;border-radius:10px}
@media(max-width:1180px){
  .inventory-batch-panel{max-width:96vw;width:96vw}
  .batch-in-row{grid-template-columns:1.3fr 1fr 1fr;align-items:start}
  .batch-in-row > button.danger.small-btn{margin-top:0;grid-column:1/-1}
}
@media(max-width:760px){
  .batch-in-row{grid-template-columns:1fr;align-items:stretch}
  .inventory-batch-panel{width:100vw;max-width:100vw}
  .batch-in-row > button.danger.small-btn{margin-top:0;grid-column:auto}
}

/* V1.40 户型图自动识别空间面积 */
.recognition-box{margin-top:14px;padding:14px;border:1px solid #dbe4f0;border-radius:18px;background:#f8fbff;overflow-x:auto}
.recognition-loading{padding:16px;border-radius:14px;background:#eef6ff;color:#12385f}
.recognition-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:12px}
.recognition-head h3{margin:0 0 6px}
.recognition-warnings{margin-top:8px;padding:10px;border-radius:12px;background:#fff7ed;color:#9a3412;font-size:13px;line-height:1.7}
.recognition-table{min-width:980px;border:1px solid #e2e8f0;border-radius:14px;overflow:hidden;background:#fff}
.recognition-row{display:grid;grid-template-columns:58px 150px 140px 110px 150px minmax(260px,1fr) 210px;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid #eef2f7}
.recognition-row:last-child{border-bottom:none}
.recognition-title{font-weight:700;background:#f1f5f9;color:#0f172a}
.recognition-row input,.recognition-row select{width:100%;height:42px;border:1px solid #d6e0ec;border-radius:10px;padding:0 10px;box-sizing:border-box;background:#fff}
.recognition-row input[type="checkbox"]{width:18px;height:18px}
.mini-functions{display:flex;flex-wrap:wrap;gap:6px 10px;font-size:12px;color:#334155}
.mini-functions label{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}
.mini-functions input{width:14px!important;height:14px!important;padding:0!important}
.small-text{font-size:12px;line-height:1.45}
.recognition-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-top:12px}
.warn-box{padding:14px;border-radius:14px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}
.ocr-details{margin-top:12px}
.ocr-details pre,.warn-box pre{white-space:pre-wrap;background:#0f172a;color:#e2e8f0;padding:12px;border-radius:12px;max-height:260px;overflow:auto}
@media(max-width:760px){
  .recognition-head{display:block}
  .recognition-table{min-width:0;border:none;background:transparent}
  .recognition-title{display:none}
  .recognition-row{display:block;border:1px solid #e2e8f0;border-radius:14px;margin-bottom:12px;background:#fff}
  .recognition-row>*{display:block;margin-bottom:8px}
  .recognition-row label:first-child{display:flex;align-items:center;gap:8px}
  .recognition-row label:first-child::after{content:'使用这个空间'}
  .mini-functions{margin-top:6px}
}

/* V1.46 PDF增强识别 + 手动框选空间 */

.manual-toolbox{display:flex;flex-wrap:wrap;gap:8px;align-items:center;border:1px solid #e1e7f0;background:#fff;border-radius:14px;padding:10px;margin-bottom:12px}
.manual-toolbox .inline-field{display:flex;align-items:center;gap:6px;font-weight:700;color:#17233c}
.manual-toolbox .inline-field input{width:110px}
.scale-status{display:inline-flex;align-items:center;min-height:34px;padding:6px 10px;border-radius:999px;background:#f5f7fb;font-size:13px}
.scale-status.ok{background:#e8f7ef;color:#0f7a3b;border:1px solid #bfe8cf}
.manual-canvas-stage{position:relative;display:block;width:100%;min-width:100%;transform-origin:0 0}
.manual-canvas-stage img{display:block;width:100%;height:auto;margin:0;user-select:none;-webkit-user-drag:none}
.manual-tip-box{border:1px dashed #c9d4e6;background:#f8fbff;border-radius:12px;padding:10px;font-size:13px;color:#42526e;line-height:1.55}
.manual-scale-line{position:absolute;border-top:3px solid #ef4444;background:transparent;pointer-events:none;box-shadow:0 0 0 1px rgba(255,255,255,.8)}
.manual-scale-line.active:after{content:'比例尺';position:absolute;left:50%;top:-28px;transform:translateX(-50%);background:#ef4444;color:#fff;border-radius:999px;padding:4px 8px;font-size:12px;white-space:nowrap}
@media(max-width:720px){
  .manual-toolbox{gap:6px;padding:8px}
  .manual-toolbox button{flex:1 1 calc(33.33% - 6px);padding:8px 6px;font-size:13px}
  .manual-toolbox .inline-field{flex:1 1 100%;font-size:13px}
  .manual-toolbox .inline-field input{flex:1}
  .scale-status{flex:1 1 100%;border-radius:12px;font-size:12px;line-height:1.4}
}

.manual-box-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}
.manual-box-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;align-items:start}
.manual-canvas-wrap{position:relative;border:1px solid #d8e0ee;border-radius:16px;background:#f7f9fc;overflow:auto;min-height:360px;max-height:680px;touch-action:none}
.manual-canvas-wrap > img{display:block;max-width:100%;height:auto;margin:auto;user-select:none;-webkit-user-drag:none}
.manual-overlay{position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none}
.manual-rect{position:absolute;border:2px solid #2563eb;background:rgba(37,99,235,.12);box-shadow:0 0 0 1px rgba(255,255,255,.8) inset;pointer-events:none;min-width:10px;min-height:10px}
.manual-rect.active{border-style:dashed;background:rgba(37,99,235,.18)}
.manual-rect-label{position:absolute;background:#2563eb;color:#fff;font-size:12px;line-height:1;padding:5px 8px;border-radius:999px;box-shadow:0 4px 12px rgba(0,0,0,.16);pointer-events:none;white-space:nowrap}
.manual-panel{border:1px solid #e1e7f0;border-radius:16px;background:#fff;padding:14px;display:grid;gap:8px}
.manual-panel label{font-weight:700;font-size:14px;color:#17233c}
.manual-panel input,.manual-panel select{width:100%}
.manual-list-box{margin-top:16px;border:1px solid #e1e7f0;border-radius:16px;padding:14px;background:#fff}
.manual-list-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:10px}
.manual-room-list{display:grid;gap:8px}
.manual-room-item{display:grid;grid-template-columns:1.3fr 1fr .7fr 1.4fr auto;gap:8px;align-items:center;border:1px solid #edf1f7;border-radius:12px;padding:10px;background:#fbfcff}
.small-btn{padding:8px 12px;font-size:13px;border-radius:10px}
@media (max-width:900px){
  
.manual-toolbox{display:flex;flex-wrap:wrap;gap:8px;align-items:center;border:1px solid #e1e7f0;background:#fff;border-radius:14px;padding:10px;margin-bottom:12px}
.manual-toolbox .inline-field{display:flex;align-items:center;gap:6px;font-weight:700;color:#17233c}
.manual-toolbox .inline-field input{width:110px}
.scale-status{display:inline-flex;align-items:center;min-height:34px;padding:6px 10px;border-radius:999px;background:#f5f7fb;font-size:13px}
.scale-status.ok{background:#e8f7ef;color:#0f7a3b;border:1px solid #bfe8cf}
.manual-canvas-stage{position:relative;display:block;width:100%;min-width:100%;transform-origin:0 0}
.manual-canvas-stage img{display:block;width:100%;height:auto;margin:0;user-select:none;-webkit-user-drag:none}
.manual-tip-box{border:1px dashed #c9d4e6;background:#f8fbff;border-radius:12px;padding:10px;font-size:13px;color:#42526e;line-height:1.55}
.manual-scale-line{position:absolute;border-top:3px solid #ef4444;background:transparent;pointer-events:none;box-shadow:0 0 0 1px rgba(255,255,255,.8)}
.manual-scale-line.active:after{content:'比例尺';position:absolute;left:50%;top:-28px;transform:translateX(-50%);background:#ef4444;color:#fff;border-radius:999px;padding:4px 8px;font-size:12px;white-space:nowrap}
@media(max-width:720px){
  .manual-toolbox{gap:6px;padding:8px}
  .manual-toolbox button{flex:1 1 calc(33.33% - 6px);padding:8px 6px;font-size:13px}
  .manual-toolbox .inline-field{flex:1 1 100%;font-size:13px}
  .manual-toolbox .inline-field input{flex:1}
  .scale-status{flex:1 1 100%;border-radius:12px;font-size:12px;line-height:1.4}
}

.manual-box-head{display:block}
  .manual-box-grid{grid-template-columns:1fr}
  .manual-canvas-wrap{min-height:260px;max-height:520px}
  .manual-room-item{grid-template-columns:1fr 1fr;gap:6px}
}

/* V1.51 项目销售单联动用料统计 */
.room-param-grid{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr));gap:10px;margin:12px 0;padding:12px;border:1px solid #e6edf6;border-radius:14px;background:#fbfdff}
.room-param-grid label{display:grid;gap:5px;font-size:13px;color:#17233c;font-weight:700}
.room-param-grid label em{font-style:normal;color:#334155}
.room-param-grid input{height:40px;border:1px solid #d6e0ec;border-radius:10px;padding:0 10px;background:#fff;box-sizing:border-box;width:100%}
.room-param-grid .wide{grid-column:span 2}
.room-param-grid button{height:40px;align-self:end}
@media(max-width:1100px){.room-param-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.room-param-grid{grid-template-columns:1fr}.room-param-grid .wide{grid-column:auto}}

/* V1.53 客户管理 */
.customer-tabs{display:flex;gap:10px;margin:0 0 14px;flex-wrap:wrap}
.tab-btn{border:0;border-radius:12px;padding:12px 18px;background:#e5e7eb;font-weight:700;cursor:pointer;color:#111827}
.tab-btn.active{background:#2563eb;color:#fff}
.customer-panel{display:none}
.customer-panel.active{display:block}
.kv-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 14px;margin:8px 0;color:#334155;font-size:14px}
.tag{display:inline-block;border-radius:999px;background:#eef2ff;color:#3730a3;padding:2px 8px;font-size:12px;font-weight:700}
.project-type-tag{align-self:flex-start;background:#ecfeff;color:#0e7490;margin-right:8px;white-space:nowrap}
.tag.hot{background:#fee2e2;color:#b91c1c}
.tag.cold{background:#e5e7eb;color:#374151}
.tag.success{background:#dcfce7;color:#15803d}
@media(max-width:900px){.kv-grid{grid-template-columns:1fr 1fr}.customer-tabs{position:sticky;top:0;background:#f8fafc;z-index:4;padding:6px 0}}
@media(max-width:560px){.kv-grid{grid-template-columns:1fr}.tab-btn{flex:1}}

/* V1.58 客户管理新增/编辑弹窗 */
.customer-action-card .item-head{align-items:center}
.customer-modal-panel{width:min(980px,96vw)}
@media(max-width:760px){.customer-action-card .item-head{display:block}.customer-action-card .primary{margin-top:10px;width:100%}.customer-modal-panel{width:100vw}}

/* V1.58 项目管理命名 + 产品分类拖动排序 */
.category-sort-list{display:grid;gap:10px;margin:12px 0}.category-sort-item{display:grid;grid-template-columns:42px 44px 1fr 110px auto;gap:10px;align-items:center;padding:12px;border:1px solid #e5e7eb;border-radius:12px;background:#fff}.category-sort-item.dragging{opacity:.55;border-color:#2563eb;background:#eff6ff}.drag-handle{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;background:#f3f4f6;color:#475569;cursor:grab;font-size:18px}.category-order{font-weight:800;color:#64748b}.category-name{font-weight:800;color:#111827}.category-item-actions{display:flex;gap:8px;justify-content:flex-end}.category-actions{margin-top:10px}@media(max-width:760px){.category-sort-item{grid-template-columns:34px 34px 1fr;align-items:flex-start}.category-sort-item .muted{grid-column:3/4}.category-item-actions{grid-column:1/4;justify-content:stretch}.category-item-actions button{flex:1}}


/* V1.58 网络产品图片选择 */
.image-chooser-panel { max-width: 980px; width: min(96vw, 980px); }
.network-image-search-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; margin: 12px 0 16px; }
.network-image-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; max-height: 62vh; overflow: auto; padding: 4px; }
.network-image-card { border: 1px solid #e5e7eb; border-radius: 14px; background: #fff; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.network-image-thumb { height: 128px; border-radius: 12px; background: #f3f4f6; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #999; font-size: 12px; }
.network-image-thumb img { width: 100%; height: 100%; object-fit: contain; }
.network-image-card button { width: 100%; justify-content: center; }
@media (max-width: 720px) {
  .network-image-search-row { grid-template-columns: 1fr; }
  .network-image-results { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 58vh; }
  .network-image-thumb { height: 110px; }
}
/* V1.58 网络图片高相关筛选 */
.image-search-warning { grid-column: 1 / -1; margin-bottom: 4px; }
.manual-image-url-row { margin-top: -4px; }
.image-score { font-size: 12px; color: #64748b; background: #f8fafc; border-radius: 8px; padding: 4px 6px; }

/* V1.59 产品按分类归属展示 */
.product-category-nav{margin:14px 0;display:block}.category-filter-head{display:flex;gap:10px;align-items:baseline;margin-bottom:10px}.category-filter-head b{font-size:18px}.category-filter-row{display:flex;flex-wrap:wrap;gap:10px}.category-filter{border:1px solid #dbe3ef;background:#fff;border-radius:14px;padding:10px 14px;display:inline-flex;gap:8px;align-items:center;cursor:pointer;color:#0f172a;font-weight:700}.category-filter b{display:inline-flex;min-width:24px;height:24px;border-radius:999px;background:#eef2ff;color:#2563eb;align-items:center;justify-content:center;font-size:13px}.category-filter.active{background:#2563eb;color:#fff;border-color:#2563eb}.category-filter.active b{background:#fff;color:#2563eb}.product-group-list{display:grid;gap:16px}.product-category-section{border:1px solid #e2e8f0;background:#f8fafc;border-radius:18px;padding:14px}.product-category-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.product-category-title b{font-size:20px;color:#0f172a}.product-category-title span{margin-left:10px;color:#64748b;font-size:14px}.product-category-items{display:grid;gap:10px}.category-name-btn{border:0;background:transparent;text-align:left;padding:0;cursor:pointer}.category-name-btn:hover{color:#2563eb;text-decoration:underline}.small{padding:8px 12px;font-size:14px}
@media(max-width:760px){.category-filter-head{display:block}.category-filter-row{display:grid;grid-template-columns:1fr 1fr}.category-filter{justify-content:space-between}.product-category-title{align-items:flex-start}.product-category-title{display:grid}.product-category-title .small{width:100%}}

/* V1.60 二级分类归属一级分类 */
.category-parent-block{display:grid;gap:8px}
.category-sort-parent{border-color:#cbd5e1;background:#f8fafc}
.category-child-list{display:grid;gap:8px;margin-left:34px;padding-left:14px;border-left:3px solid #e2e8f0}
.category-sort-child{background:#fff;grid-template-columns:42px 58px 1fr 150px auto}
.category-empty-child{padding:8px 12px}
.category-filter-tree{align-items:flex-start}
.category-filter-parent{font-weight:900}
.category-filter-child{margin-left:12px;background:#f8fafc}
.product-subcategory-section{margin-top:12px;padding:12px;border:1px dashed #cbd5e1;border-radius:14px;background:#fff}
.product-subcategory-title{display:flex;align-items:center;justify-content:space-between;gap:10px;font-weight:800;margin-bottom:10px;color:#334155}
.product-subcategory-title span{color:#64748b;font-weight:500;margin-left:8px}
.product-direct-title{margin:8px 0}
@media(max-width:760px){.category-child-list{margin-left:0;padding-left:10px}.category-sort-child{grid-template-columns:34px 44px 1fr}.category-filter-child{margin-left:0}.product-subcategory-title{display:grid}}

.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin:10px 0 16px;}
.perm-option{display:flex;flex-direction:column;gap:4px;border:1px solid #d7dfed;border-radius:12px;padding:12px;background:#f8fbff;cursor:pointer;}
.perm-option input{width:18px;height:18px;margin-bottom:4px;}
.perm-option b{font-size:14px;color:#0f172a;}
.perm-option em{font-style:normal;color:#64748b;font-size:12px;line-height:1.4;}


/* V1.71 适用空间复选多选 */
.multi-select.product-room-select {
  min-height: 128px;
  padding: 10px 12px;
  line-height: 1.8;
}
.multi-select.product-room-select option {
  padding: 6px 8px;
  border-radius: 8px;
}


/* V1.66 手机端产品录入弹窗优化 */
/* V1.70 手机端新增产品底部按钮一排显示 */
.product-image-details{
  margin:12px 0 6px;
  border:1px solid #dbe3ef;
  border-radius:14px;
  background:#f8fafc;
  overflow:hidden;
}
.product-image-details summary{
  cursor:pointer;
  padding:12px 14px;
  font-weight:800;
  color:#0f172a;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.product-image-details summary::-webkit-details-marker{display:none}
.product-image-details summary:after{content:'展开';font-size:12px;color:#2563eb;background:#eff6ff;border-radius:999px;padding:4px 9px;white-space:nowrap}
.product-image-details[open] summary:after{content:'收起'}
.product-image-details-body{padding:0 14px 14px;border-top:1px solid #e2e8f0}
.image-tool-actions{margin-top:8px;align-items:center}
.compact-upload{margin:0;display:inline-flex;align-items:center;min-height:42px}
.sticky-modal-actions{border-top:1px solid #edf2f7;padding-top:12px;margin-top:12px;background:#fff}

@media(max-width:760px){
  .product-create-panel,.product-editor-panel{width:100vw;max-width:100vw;border-radius:22px 22px 0 0;max-height:92vh;overflow:auto;padding:18px 16px 12px}
  .product-create-panel .modal-head,.product-editor-panel .modal-head{position:sticky;top:0;background:#fff;z-index:3;padding-bottom:10px;margin-bottom:8px}
  .product-create-panel .modal-head p,.product-editor-panel .modal-head p{display:none}
  .product-create-panel .form-grid,.product-editor-panel .form-grid{grid-template-columns:1fr;gap:10px}
  .product-create-panel .form-field,.product-editor-panel .form-field{margin-bottom:4px}
  .product-image-details{margin:8px 0;background:#fff}
  .product-image-details summary{padding:11px 12px;font-size:14px}
  .product-image-details-body{padding:0 12px 12px}
  .image-tool-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .image-tool-actions .secondary,.image-tool-actions .upload{width:100%;justify-content:center;text-align:center;margin:0;padding:10px 8px;font-size:13px;border-radius:10px}
  .sticky-modal-actions{position:sticky;bottom:0;z-index:4;margin:12px -16px -12px;padding:10px 16px 12px;background:rgba(255,255,255,.96);box-shadow:0 -8px 22px rgba(15,23,42,.08);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-items:center}
  .sticky-modal-actions .inline-check{grid-column:1 / -1;justify-content:flex-start;font-size:13px;margin-bottom:2px}
  .sticky-modal-actions button{width:100%;padding:12px 6px;min-width:0;font-size:13px;white-space:nowrap}
  .create-actions button.primary{grid-column:auto}
  .product-room-select{min-height:96px!important;max-height:120px}
}

/* V1.70 酷家乐灯光场景展示 */
.kujiale-scenes{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:16px;margin-top:12px}
.kujiale-scene-card{border:1px solid #e5e7eb;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 8px 24px rgba(15,23,42,.05)}
.kujiale-scene-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid #eef2f7}
.kujiale-scene-head b{font-size:16px;color:#0f172a;margin-right:8px}.kujiale-scene-head .actions{flex-shrink:0}
.kujiale-embed{position:relative;width:100%;height:360px;background:#111827}.kujiale-embed iframe{position:absolute;inset:0;width:100%;height:100%;border:0;background:#111827}
.kujiale-cover{display:block;width:100%;height:260px;object-fit:cover;background:#f1f5f9}.kujiale-empty{height:180px;display:flex;align-items:center;justify-content:center;color:#64748b;background:linear-gradient(135deg,#f8fafc,#e2e8f0);padding:20px;text-align:center}
.scene-link-line{padding:10px 16px}.kujiale-panel textarea{min-height:88px}.small-tip{font-size:13px;margin-top:10px}.empty-tip{padding:22px;text-align:center;background:#f8fafc;border:1px dashed #cbd5e1;border-radius:16px}
@media (max-width: 768px){.kujiale-scenes{grid-template-columns:1fr}.kujiale-embed{height:240px}.kujiale-scene-head{align-items:flex-start;flex-direction:column}.kujiale-scene-head .actions{width:100%;display:flex}.kujiale-scene-head .actions button{flex:1}.kujiale-panel{max-height:92vh;overflow:auto}.kujiale-cover{height:200px}}


/* V1.70 手机端产品新增/编辑强制优化：图片设置默认收起，底部按钮固定一排 */
.product-image-details:not([open]) .product-image-details-body{display:none!important}
@media(max-width:760px){
  #productCreateModal .product-create-panel,
  #productEditorModal .product-editor-panel{
    display:flex!important;
    flex-direction:column!important;
    height:92vh!important;
    max-height:92vh!important;
    overflow:auto!important;
    padding-bottom:0!important;
  }
  #productCreateModal .product-image-details,
  #productEditorModal .product-image-details{
    flex:0 0 auto!important;
    margin:8px 0!important;
  }
  #productCreateModal .product-image-details:not([open]),
  #productEditorModal .product-image-details:not([open]){
    max-height:48px!important;
    overflow:hidden!important;
  }
  #productCreateModal .sticky-modal-actions,
  #productEditorModal .sticky-modal-actions{
    position:sticky!important;
    bottom:0!important;
    z-index:10!important;
    margin:10px -12px 0!important;
    padding:9px 10px calc(10px + env(safe-area-inset-bottom))!important;
    background:rgba(255,255,255,.98)!important;
    box-shadow:0 -10px 28px rgba(15,23,42,.10)!important;
    border-top:1px solid #e5e7eb!important;
    display:grid!important;
    grid-template-columns:1fr 1fr 1fr!important;
    gap:8px!important;
    align-items:center!important;
  }
  #productCreateModal .sticky-modal-actions .inline-check,
  #productEditorModal .sticky-modal-actions .inline-check{
    grid-column:1 / -1!important;
    width:100%!important;
    justify-content:flex-start!important;
    min-height:34px!important;
    padding:4px 2px!important;
    margin:0!important;
    background:transparent!important;
    border-radius:0!important;
  }
  #productCreateModal .sticky-modal-actions button,
  #productEditorModal .sticky-modal-actions button{
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    padding:10px 4px!important;
    margin:0!important;
    font-size:13px!important;
    line-height:1.15!important;
    white-space:nowrap!important;
    border-radius:12px!important;
  }
  #productEditorModal .sticky-modal-actions{grid-template-columns:1fr 1fr!important}
  #productEditorModal .sticky-modal-actions .inline-check{grid-column:1 / -1!important}
}


/* V1.71 适用空间复选按钮：手机/电脑都能直接多选 */
.room-multi-check.product-room-select{
  min-height:0;
  padding:10px;
  border:1px solid #d7dfed;
  border-radius:12px;
  background:#fff;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.room-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border:1px solid #d7dfed;
  border-radius:999px;
  background:#f8fafc;
  color:#334155;
  font-size:13px;
  cursor:pointer;
  user-select:none;
}
.room-chip input{
  width:16px;
  height:16px;
  margin:0;
}
.room-chip.checked{
  border-color:#2f67f6;
  background:#eef4ff;
  color:#1d4ed8;
  font-weight:700;
}
@media (max-width: 720px){
  .room-multi-check.product-room-select{
    max-height:168px;
    overflow:auto;
    padding:8px;
  }
  .room-chip{
    padding:7px 9px;
    font-size:12px;
  }
}

/* V1.76 量尺校准 + 自动墙体空间识别 */
.manual-polygon-svg{position:absolute;left:0;top:0;z-index:5;pointer-events:none;overflow:visible}
.manual-poly-shape{fill:rgba(16,185,129,.10);stroke:#10b981;stroke-width:3;stroke-dasharray:8 5;vector-effect:non-scaling-stroke}
.manual-poly-shape.closed{fill:rgba(16,185,129,.18);stroke-dasharray:none}
.manual-poly-shape.saved{fill:rgba(37,99,235,.10);stroke:#2563eb;stroke-width:2}
.manual-poly-point{position:absolute;z-index:8;width:20px;height:20px;border-radius:999px;background:#10b981;color:#fff;border:2px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.18);font-size:11px;line-height:16px;text-align:center;font-weight:800;pointer-events:none}
.manual-poly-point.saved{background:#2563eb;opacity:.7}
.manual-poly-label{position:absolute;z-index:10;background:#10b981;color:#fff;font-size:12px;line-height:1;padding:6px 9px;border-radius:999px;box-shadow:0 4px 12px rgba(0,0,0,.16);pointer-events:none;white-space:nowrap}
.manual-panel #manual_room_size_hint{font-size:12px;line-height:1.5;padding:7px 9px;border-radius:10px;background:#f6f8fb}
@media(max-width:720px){
  .manual-toolbox button{flex:1 1 calc(33.33% - 6px)}
  .manual-toolbox .scale-status{flex:1 1 100%}
}


/* V1.76 自动墙体识别候选空间 */
.auto-wall-result{ margin-top:12px; padding:12px; border:1px solid #dbeafe; background:#f8fbff; border-radius:12px; }
.auto-wall-head{ display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:10px; flex-wrap:wrap; }
.auto-wall-grid-head,.auto-wall-row{ display:grid; grid-template-columns:54px 1.2fr 1fr 95px 90px 82px 100px; gap:8px; align-items:center; }
.auto-wall-grid-head{ color:#64748b; font-size:12px; padding:6px 0; border-bottom:1px solid #e2e8f0; }
.auto-wall-row{ padding:8px 0; border-bottom:1px dashed #e2e8f0; }
.auto-wall-row input,.auto-wall-row select{ width:100%; min-width:0; }
.auto-room-box{ position:absolute; border:2px solid rgba(37,99,235,.82); background:rgba(37,99,235,.10); z-index:7; cursor:pointer; box-sizing:border-box; border-radius:4px; }
.auto-room-box.active{ border-color:#f97316; background:rgba(249,115,22,.16); box-shadow:0 0 0 2px rgba(249,115,22,.18); }
.auto-room-label{ position:absolute; z-index:8; background:#1d4ed8; color:white; border-radius:999px; padding:3px 8px; font-size:12px; line-height:1.2; cursor:pointer; white-space:nowrap; box-shadow:0 4px 12px rgba(15,23,42,.18); }
@media (max-width: 720px){
  .auto-wall-grid-head{ display:none; }
  .auto-wall-row{ grid-template-columns:34px 1fr 1fr; gap:6px; padding:10px 0; }
  .auto-wall-row input[type="number"]{ grid-column:2/3; }
  .auto-wall-row button{ grid-column:3/4; }
}


/* V1.81 OpenCV识别：端点竖线随量尺方向自适应 */
.manual-toolbox-simple{align-items:center}
.manual-length-field{min-width:260px}
.manual-advanced-tools{flex:1 1 100%;border-top:1px dashed #dbe3ef;padding-top:8px}
.manual-advanced-tools summary{cursor:pointer;color:#475569;font-weight:700}
.manual-advanced-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.manual-scale-ruler{position:absolute;inset:0;pointer-events:none;z-index:20}
.manual-scale-ruler-line{position:absolute;height:4px;background:#ef4444;transform-origin:0 50%;pointer-events:auto;cursor:move;border-radius:999px;box-shadow:0 0 0 1px rgba(255,255,255,.9),0 2px 8px rgba(0,0,0,.22)}
.manual-scale-handle{position:absolute;width:30px;height:42px;border:0;background:transparent;transform:translate(-50%,-50%);transform-origin:50% 50%;pointer-events:auto;cursor:grab;padding:0;outline:0}
.manual-scale-handle::before{content:"";position:absolute;left:50%;top:50%;width:4px;height:30px;background:#ef4444;border-radius:2px;transform:translate(-50%,-50%);box-shadow:0 0 0 1px rgba(255,255,255,.95),0 2px 8px rgba(0,0,0,.28)}
.manual-scale-handle:active{cursor:grabbing}
.manual-scale-handle:focus-visible::before{box-shadow:0 0 0 3px rgba(239,68,68,.25),0 0 0 1px rgba(255,255,255,.95),0 2px 8px rgba(0,0,0,.28)}
.manual-scale-ruler-label{position:absolute;transform:translateX(-50%);background:#ef4444;color:#fff;padding:5px 9px;border-radius:999px;font-size:12px;line-height:1;white-space:nowrap;pointer-events:none;box-shadow:0 2px 8px rgba(0,0,0,.18)}
@media(max-width:720px){.manual-length-field{min-width:0}.manual-advanced-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.manual-scale-handle{width:36px;height:48px}.manual-scale-handle::before{height:34px}}
/* V1.85 深度学习房间轮廓：使用真实分割多边形展示，不再只显示外接矩形 */
.auto-room-polygon{ position:absolute; z-index:7; cursor:pointer; box-sizing:border-box; background:rgba(37,99,235,.14); outline:2px solid rgba(37,99,235,.86); outline-offset:-2px; }
.auto-room-polygon.active{ background:rgba(249,115,22,.20); outline-color:#f97316; }
.curtain-candidate-line{position:absolute;height:5px;background:#16a34a;transform-origin:0 50%;z-index:12;border-radius:999px;box-shadow:0 0 0 2px rgba(255,255,255,.9),0 2px 8px rgba(22,163,74,.45);pointer-events:none}
.manual-curtain-measure{position:absolute;height:5px;background:#16a34a;transform-origin:0 0;z-index:25;border-radius:999px;box-shadow:0 0 0 2px rgba(255,255,255,.95),0 2px 9px rgba(22,163,74,.5);pointer-events:none}
.auto-room-actions{display:flex;gap:4px}.auto-room-actions .small-btn{padding:5px 7px;font-size:12px;white-space:nowrap}

/* V1.85.3 产品导入文件选择反馈 */
.selected-file-tip{display:inline-flex;align-items:center;min-height:36px;padding:7px 10px;border-radius:10px;background:#f8fafc;border:1px dashed #cbd5e1;color:#64748b;font-size:13px;max-width:520px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.selected-file-tip.ok{background:#ecfdf5;border-color:#86efac;color:#166534;font-weight:700}
.selected-file-tip.bad{background:#fef2f2;border-color:#fecaca;color:#b91c1c;font-weight:700}
.upload.file-selected{background:#dcfce7!important;color:#166534!important;border:1px solid #86efac}
#productImportBtn:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:760px){.selected-file-tip{width:100%;max-width:100%;white-space:normal}.import-card .actions{display:grid;grid-template-columns:1fr;align-items:stretch}.import-card .actions button,.import-card .actions label{width:100%;text-align:center}}

/* V1.85.5 销售单页面状态提示 */
.loading-card { color:#475569; background:#f8fafc; border:1px solid #e2e8f0; }
.error-card { background:#fff7ed; border:1px solid #fdba74; color:#9a3412; }
.error-card p { margin:8px 0 0; color:#9a3412; }


/* V1.86.0 项目新建弹窗 */
.project-form-panel{width:min(920px,96vw)}
.project-form-panel .grid{grid-template-columns:repeat(2,minmax(180px,1fr));}
.project-form-panel .upload{margin-top:12px}
.project-modal-actions{display:flex;justify-content:flex-end;gap:10px}
.project-modal-actions button{min-width:120px}
@media(max-width:760px){
  .project-form-panel .grid{grid-template-columns:1fr!important}
  .project-modal-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .project-modal-actions button{width:100%;min-width:0}
}

/* V1.92 customer follow-up dashboard */
.customer-dashboard{margin:12px 0 16px;padding:18px;border:1px solid #dbeafe;background:linear-gradient(135deg,#f8fbff,#fff);box-shadow:0 12px 28px rgba(37,99,235,.06)}
.dashboard-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}
.dashboard-head h2{margin:0 0 4px;color:#0f172a}
.dashboard-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin-bottom:16px}
.dashboard-card{border:1px solid #dbe3ef;background:#fff;border-radius:14px;padding:13px 10px;text-align:left;cursor:pointer;box-shadow:0 8px 18px rgba(15,23,42,.04)}
.dashboard-card:hover{border-color:#2563eb;transform:translateY(-1px)}
.dashboard-card b{display:block;font-size:24px;line-height:1.1;color:#1d4ed8;margin-bottom:5px}
.dashboard-card span{font-size:13px;color:#475569}
.dashboard-card.warn-card{border-color:#fecaca;background:#fff7f7}
.dashboard-card.warn-card b{color:#dc2626}
.dashboard-card.hot-card{border-color:#fed7aa;background:#fffaf2}
.dashboard-card.hot-card b{color:#ea580c}
.dashboard-two-col{display:grid;grid-template-columns:1.15fr 1fr;gap:14px}
.dashboard-two-col h3{margin:0 0 8px;font-size:15px;color:#0f172a}
.follow-list,.dashboard-channel-list{display:grid;gap:8px}
.follow-item{display:block;width:100%;text-align:left;border:1px solid #e2e8f0;background:#fff;border-radius:12px;padding:10px 12px;cursor:pointer}
.follow-item:hover{border-color:#2563eb;background:#f8fbff}
.follow-item b,.dashboard-channel-row b{display:block;color:#0f172a;margin-bottom:4px}
.follow-item span,.dashboard-channel-row span{display:block;color:#475569;font-size:13px}
.follow-item em,.dashboard-channel-row em{display:block;color:#64748b;font-size:12px;font-style:normal;margin-top:3px}
.dashboard-channel-row{border:1px solid #e2e8f0;background:#fff;border-radius:12px;padding:10px 12px}
.status-mini{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.status-mini span{background:#f1f5f9;color:#475569;border-radius:999px;padding:5px 9px;font-size:12px}
.follow-badge{display:inline-flex;align-items:center;margin-left:8px;padding:3px 8px;border-radius:999px;font-size:12px;font-weight:700;vertical-align:middle}
.follow-badge.overdue{background:#fee2e2;color:#b91c1c}
.follow-badge.today{background:#dbeafe;color:#1d4ed8}
.follow-badge.future{background:#dcfce7;color:#166534}
.follow-badge.no-date{background:#f1f5f9;color:#64748b}
@media(max-width:980px){.dashboard-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.dashboard-two-col{grid-template-columns:1fr}}
@media(max-width:640px){
  .dashboard-head{display:block}
  .dashboard-head .actions{display:grid;grid-template-columns:1fr 1fr;margin-top:10px}
  .dashboard-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-card b{font-size:21px}
}

/* V1.95 construction delivery and acceptance flow */
.delivery-card{border-color:#dbeafe;background:linear-gradient(135deg,#f8fbff,#fff)}
.delivery-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.delivery-tabs .tab-btn{border:1px solid #dbe3ef;background:#fff;border-radius:999px;padding:8px 12px;cursor:pointer}
.delivery-tabs .tab-btn.active{background:#2563eb;border-color:#2563eb;color:#fff;font-weight:800}
.delivery-list{display:grid;gap:10px}
.delivery-item{border:1px solid #e2e8f0;border-left:5px solid #94a3b8;border-radius:14px;background:#fff;padding:12px;display:grid;gap:8px}
.delivery-item.status-done{border-left-color:#16a34a;background:#f7fef9}
.delivery-item.status-fix{border-left-color:#ef4444;background:#fff7f7}
.delivery-item.status-na{border-left-color:#64748b;background:#f8fafc}
.delivery-item .delivery-main b{display:block;color:#0f172a;margin-bottom:4px}
.delivery-item .delivery-main p{margin:0;color:#475569;line-height:1.5}
.delivery-fields{display:grid;grid-template-columns:120px 150px minmax(220px,1fr) 82px;gap:8px;align-items:center}
.delivery-fields input,.delivery-fields select{width:100%;min-width:0}
@media(max-width:760px){
  .delivery-card .item-head{display:block}
  .delivery-card .actions{display:grid;grid-template-columns:1fr;margin-top:10px}
  .delivery-fields{grid-template-columns:1fr}
}

/* V1.97.0 项目管理三模块 + 流程弹窗 */
.project-type-dashboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 16px}
.project-type-card{border:1px solid #dbe3ef;background:linear-gradient(135deg,#fff,#f8fbff);border-radius:16px;padding:14px;text-align:left;cursor:pointer;box-shadow:0 10px 22px rgba(15,23,42,.05);display:grid;gap:6px}
.project-type-card:hover{border-color:#2563eb;transform:translateY(-1px)}
.project-type-card.active{border-color:#2563eb;background:#eff6ff;box-shadow:0 12px 26px rgba(37,99,235,.12)}
.project-type-card strong{font-size:15px;color:#0f172a}
.project-type-card b{font-size:28px;line-height:1;color:#1d4ed8}
.project-type-card span{font-size:12px;color:#64748b;line-height:1.45}
.project-list-item{cursor:pointer;transition:.16s ease}
.project-list-item:hover{border-color:#bfdbfe;background:#f8fbff}
.project-card-main{min-width:0;flex:1}
.mini-progress{height:8px;background:#e2e8f0;border-radius:999px;overflow:hidden;margin:8px 0 4px;max-width:420px}
.mini-progress span{display:block;height:100%;background:#2563eb;border-radius:999px}
.project-flow-panel{width:min(880px,96vw)}
.project-flow-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}
.project-flow-summary div{border:1px solid #dbeafe;background:#f8fbff;border-radius:14px;padding:14px;text-align:center}
.project-flow-summary b{display:block;font-size:24px;color:#1d4ed8;margin-bottom:4px}
.project-flow-summary span{color:#64748b;font-size:13px}
.project-flow-meta{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.project-flow-meta span{background:#f1f5f9;color:#475569;border-radius:999px;padding:6px 10px;font-size:13px}
.project-flow-list{display:grid;gap:9px}
.project-flow-step{border:1px solid #e2e8f0;background:#fff;border-radius:14px;padding:10px 12px;display:grid;grid-template-columns:48px minmax(0,1fr) 120px;gap:10px;align-items:center}
.project-flow-step em{width:38px;height:38px;border-radius:999px;background:#f1f5f9;color:#64748b;display:grid;place-items:center;font-style:normal;font-weight:800}
.project-flow-step b{display:block;color:#0f172a;margin-bottom:3px}
.project-flow-step span{color:#64748b;font-size:13px}
.project-flow-step select{width:100%}
.project-flow-step.doing{border-left:5px solid #f59e0b;background:#fffbeb}
.project-flow-step.done{border-left:5px solid #16a34a;background:#f0fdf4}
.project-flow-step.doing em{background:#fef3c7;color:#92400e}
.project-flow-step.done em{background:#dcfce7;color:#166534}
@media(max-width:920px){.project-type-dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){
  .project-type-dashboard{grid-template-columns:1fr}
  .project-flow-summary{grid-template-columns:1fr}
  .project-flow-step{grid-template-columns:42px minmax(0,1fr);align-items:start}
  .project-flow-step select{grid-column:1 / -1}
}

.project-type-card{position:relative}
.project-type-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:10px}
button.small{padding:7px 12px;font-size:13px;border-radius:8px}


.section-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.section-title-row h3{margin:0}.small-link{padding:0;border:0;background:transparent;color:#16a34a;cursor:pointer}.dashboard-channel-btn{width:100%;text-align:left;border:0;background:#fff;cursor:pointer}.dashboard-channel-btn:hover{background:#f7faf8}.channel-rank-panel{max-width:860px}.channel-rank-table-wrap{max-height:60vh;overflow:auto}.channel-rank-table{width:100%;border-collapse:collapse}.channel-rank-table th,.channel-rank-table td{padding:12px;border-bottom:1px solid #eef0f2;text-align:left}.channel-rank-table th{position:sticky;top:0;background:#f8fafc;z-index:1}.rank-summary{margin-bottom:12px}.empty-panel{padding:24px;background:#f8fafc;border-radius:12px}

/* V2.11 project management upgrade */
.project-detail-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px;border-bottom:1px solid #e2e8f0;padding-bottom:10px}
.project-detail-tabs .tab-btn{border:1px solid #dbeafe;background:#fff;color:#1e3a8a;border-radius:999px;padding:8px 13px;font-weight:700;cursor:pointer}
.project-detail-tabs .tab-btn.active{background:#2563eb;color:#fff;border-color:#2563eb}
.project-overview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.project-overview-grid div{border:1px solid #e2e8f0;background:#fff;border-radius:14px;padding:12px}
.project-overview-grid span{display:block;color:#64748b;font-size:13px;margin-bottom:5px}.project-overview-grid b{color:#0f172a}
.soft-card{background:#f8fafc;border:1px solid #e2e8f0}.project-record-editor{margin-bottom:12px}.project-record-editor h3{margin-top:0}.small-tip{font-size:12px;margin:4px 0 0}.project-record-editor select[multiple]{min-height:120px;width:100%;border:1px solid #d1d5db;border-radius:10px;padding:8px;background:#fff}.project-record-list{display:grid;gap:10px}.record-card .item-head{margin-bottom:4px}.record-card p{margin:6px 0}.project-album-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.album-card p{margin:6px 0}.album-files{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.album-files img,.album-files video{width:100%;height:110px;object-fit:cover;border-radius:10px;border:1px solid #e2e8f0;background:#000}.project-log-list{display:grid;gap:9px}.project-log-row{border-left:4px solid #2563eb;background:#f8fafc;border-radius:10px;padding:10px 12px}.project-log-row em{display:block;color:#64748b;font-style:normal;font-size:12px;margin-bottom:3px}.project-log-row b{color:#0f172a}
@media(max-width:720px){.project-overview-grid{grid-template-columns:1fr}.project-album-grid{grid-template-columns:1fr}.album-files{grid-template-columns:1fr}}

/* V2.12 工地相册增强 */
.project-album-summary{display:flex;justify-content:space-between;gap:12px;align-items:center;background:#fff;border:1px dashed #cbd5e1;border-radius:12px;padding:10px 12px;margin-bottom:12px;color:#334155}.project-album-summary span{font-size:12px;color:#64748b}.project-album-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px}.chip-btn{border:1px solid #cbd5e1;background:#fff;border-radius:999px;padding:7px 12px;cursor:pointer;color:#334155}.chip-btn.active{background:#2563eb;color:#fff;border-color:#2563eb}.album-card-head{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.album-card-head .danger,.album-file-actions .danger{color:#dc2626;border-color:#fecaca;background:#fff5f5}.album-file-card{border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;background:#fff}.album-file-card img,.album-file-card video{width:100%;height:138px;object-fit:cover;background:#000;display:block;cursor:pointer}.album-file-actions{display:flex;justify-content:space-between;gap:6px;align-items:center;padding:7px 8px}.album-file-actions span{font-size:12px;color:#475569;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:110px}.album-file-actions button{font-size:12px;padding:4px 7px;border-radius:7px;border:1px solid #cbd5e1;background:#fff;margin-left:4px;cursor:pointer}.project-media-preview{position:fixed;inset:0;background:rgba(15,23,42,.72);z-index:9999;display:flex;align-items:center;justify-content:center;padding:18px}.project-media-preview.hidden{display:none}.project-media-preview-inner{position:relative;background:#fff;border-radius:16px;max-width:92vw;max-height:92vh;padding:16px;box-shadow:0 24px 80px rgba(0,0,0,.35);overflow:auto}.project-media-preview-inner h3{margin:0 42px 12px 0}.project-media-preview-inner img,.project-media-preview-inner video{max-width:86vw;max-height:74vh;border-radius:12px;background:#000}.project-media-preview-inner .close{position:absolute;right:12px;top:10px;width:32px;height:32px;border-radius:999px;border:0;background:#0f172a;color:#fff;font-size:22px;cursor:pointer}
@media(max-width:720px){.project-album-summary{display:block}.album-card-head{display:block}.album-file-actions{display:block}.album-file-actions div{margin-top:6px}.album-file-actions span{max-width:100%;display:block}}

/* V2.13.0 项目进度中心 */
.project-progress-center{border:1px solid #dbeafe;background:linear-gradient(135deg,#f8fbff,#eef6ff);border-radius:18px;padding:16px;margin-bottom:14px}
.project-progress-hero{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:12px}
.project-progress-hero span{color:#64748b;font-size:13px}
.project-progress-hero strong{display:block;font-size:34px;color:#1d4ed8;line-height:1.1;margin:4px 0}
.project-progress-hero p{margin:0;color:#475569}
.project-progress-ring{width:86px;height:86px;border-radius:999px;background:conic-gradient(#2563eb calc(var(--p)*1%),#dbeafe 0);display:grid;place-items:center;flex:0 0 auto}
.project-progress-ring b{width:66px;height:66px;border-radius:999px;background:#fff;display:grid;place-items:center;color:#1d4ed8;font-size:18px}
.progress-center-bar{height:12px;margin:10px 0 14px;background:#dbeafe}
.progress-summary-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.project-progress-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.progress-timeline{position:relative}
.progress-timeline .project-flow-step.done select{border-color:#86efac}
.progress-timeline .project-flow-step.doing select{border-color:#fbbf24}
@media(max-width:720px){.project-progress-hero{align-items:flex-start}.progress-summary-4{grid-template-columns:1fr 1fr}.project-progress-ring{width:72px;height:72px}.project-progress-ring b{width:56px;height:56px;font-size:15px}}

/* V2.14 项目日志中心 */
.project-log-center{display:grid;gap:12px}.project-log-hero{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.project-log-hero div{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:12px}.project-log-hero b{display:block;font-size:22px;color:#0f172a}.project-log-hero span{font-size:12px;color:#64748b}.project-log-tools{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap}.project-log-actions{display:flex;gap:8px;flex-wrap:wrap}.project-log-row{position:relative}.project-log-row-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:4px}.project-log-row p{margin:6px 0 0}.project-log-row button{margin-top:8px}.project-log-row.log-巡检{border-left-color:#0891b2}.project-log-row.log-验收{border-left-color:#16a34a}.project-log-row.log-相册{border-left-color:#7c3aed}.project-log-row.log-整改{border-left-color:#dc2626}.project-log-row.log-进度{border-left-color:#2563eb}.project-log-row.log-系统{border-left-color:#64748b}@media(max-width:720px){.project-log-hero{grid-template-columns:repeat(2,minmax(0,1fr))}.project-log-tools{display:grid}.project-log-actions{width:100%}}

/* V2.15 客户-项目联动 */
.customer-link-card { margin-top: 14px; }
.project-customer-link { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; align-items: start; }
.customer-link-info { display: grid; gap: 6px; padding: 12px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.customer-project-list { display: grid; gap: 8px; }
.customer-project-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 12px; background: #fff; }
.customer-project-row button { white-space: nowrap; }
@media (max-width: 760px) { .project-customer-link { grid-template-columns: 1fr; } .customer-project-row { align-items: flex-start; flex-direction: column; } }

/* V2.16 付款节点管理 */
.project-payment-center{display:grid;gap:12px}.payment-hero{background:linear-gradient(135deg,#f0fdf4,#eff6ff);border:1px solid #bfdbfe}.payment-summary div b{font-size:20px}.payment-node-table input.mini-input{width:96px;padding:6px 8px;border:1px solid #cbd5e1;border-radius:8px}.pay-status{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;font-weight:800;font-size:12px;border:1px solid #cbd5e1;background:#f8fafc;color:#475569}.pay-status.done{background:#dcfce7;color:#166534;border-color:#86efac}.pay-status.doing{background:#fef3c7;color:#92400e;border-color:#fcd34d}.pay-status.todo{background:#fee2e2;color:#991b1b;border-color:#fecaca}.project-payment-center .record-card{border-left:4px solid #16a34a}.project-payment-center .table-wrap{overflow:auto}.project-payment-center .data-table th,.project-payment-center .data-table td{white-space:nowrap}.project-payment-center .actions{margin-top:10px;display:flex;gap:8px;flex-wrap:wrap}

.signature-field{position:relative}.signature-help{display:block;margin-top:6px;color:#64748b;font-style:normal;font-size:12px;line-height:1.5}.mini-btn{margin-top:8px;padding:7px 12px;min-height:auto;font-size:13px}.signature-preview{margin-top:8px;min-height:42px;border:1px dashed #cbd5e1;border-radius:12px;background:#fff;padding:10px 14px;font-size:22px;font-weight:700;letter-spacing:4px;text-align:center;color:#0f172a}.signature-preview.generated{font-family:cursive,"KaiTi","STKaiti",serif;font-size:28px}.signature-preview.muted{font-size:14px;font-weight:400;letter-spacing:0;color:#94a3b8}


/* V2.20.1 验收手写签字 */
.sign-btn{width:100%;min-height:44px;border-radius:12px;font-weight:700}.signature-preview.has-signature{padding:6px;background:#fff}.signature-preview img{max-width:100%;max-height:70px;display:block;margin:auto}.signature-pad-panel{width:min(720px,96vw)}.signature-pad-wrap{border:1px solid #cbd5e1;border-radius:16px;background:#fff;overflow:hidden;box-shadow:inset 0 0 0 1px rgba(15,23,42,.03)}#acceptanceSignatureCanvas{display:block;width:100%;height:260px;touch-action:none;cursor:crosshair;background:#fff}.signature-pad-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:14px}.signature-pad-actions button{min-width:120px}.record-signature-box{margin:6px 0 10px}.record-signature-img{max-width:220px;max-height:88px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;padding:4px;display:block}
@media(max-width:760px){.signature-pad-mask{align-items:center;padding:12px}.signature-pad-panel{width:100%;max-height:94vh;border-radius:18px;padding:14px}.signature-pad-actions{display:grid;grid-template-columns:1fr 1fr}.signature-pad-actions button{width:100%;min-width:0}#acceptanceSignatureCanvas{height:300px}}


.project-independent-quote { border: 2px solid #dfe8ff; background: linear-gradient(180deg,#ffffff,#f8fbff); }
.project-quote-summary { display:grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin:14px 0; }
.project-quote-summary div { background:#f3f6ff; border:1px solid #e0e8ff; border-radius:12px; padding:12px; }
.project-quote-summary span { display:block; color:#64748b; font-size:12px; margin-bottom:6px; }
.project-quote-summary b { font-size:18px; color:#0f172a; }
.project-quote-discount { display:grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap:10px; align-items:end; margin:12px 0 18px; }
.project-quote-discount label em, .project-quote-add-grid label em { display:block; font-style:normal; font-size:12px; color:#64748b; margin-bottom:4px; }
.quote-section-list { display:grid; gap:14px; }
.quote-section-card { border:1px solid #e5e7eb; border-radius:14px; background:#fff; padding:14px; }
.project-quote-add-grid { display:grid; grid-template-columns: 1.4fr 1.2fr .7fr .7fr .8fr 1.5fr auto; gap:8px; align-items:center; margin:10px 0 12px; }
.project-quote-lines .quote-row { grid-template-columns: 1fr 1fr .7fr 1.5fr .9fr .7fr .9fr .9fr 1.4fr auto; }
.legacy-smart-quote-card { border-top: 4px solid #e2e8f0; }
@media (max-width: 900px) { .project-quote-add-grid { grid-template-columns: 1fr; } .project-quote-lines .quote-row { grid-template-columns: 1fr; } }

/* V2.24.0 智能项目报价重构 */
.smart-quote-page { padding: 0; overflow: hidden; }
.smart-quote-hero { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; padding:18px; background:linear-gradient(135deg,#eef5ff,#ffffff); border-bottom:1px solid #e5e7eb; }
.smart-quote-hero h2 { margin:0 0 6px; font-size:22px; }
.smart-quote-hero p { margin:0; color:#64748b; }
.smart-quote-totalbar { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; padding:16px 18px; background:#fff; border-bottom:1px solid #e5e7eb; }
.smart-quote-totalbar div { border:1px solid #e5e7eb; border-radius:14px; padding:12px; background:#f8fafc; }
.smart-quote-totalbar div.strong { background:#0f172a; color:#fff; }
.smart-quote-totalbar span { display:block; font-size:12px; color:#64748b; margin-bottom:6px; }
.smart-quote-totalbar .strong span { color:#cbd5e1; }
.smart-quote-totalbar b { font-size:20px; }
.smart-quote-layout { display:grid; grid-template-columns:220px 1fr; gap:16px; padding:18px; background:#f8fafc; }
.smart-quote-sidebar { display:flex; flex-direction:column; gap:8px; position:sticky; top:12px; align-self:start; }
.smart-quote-sidebar button { text-align:left; border:1px solid #e5e7eb; background:#fff; border-radius:14px; padding:12px; cursor:pointer; }
.smart-quote-sidebar button.active { border-color:#2563eb; background:#eff6ff; box-shadow:0 8px 20px rgba(37,99,235,.12); }
.smart-quote-sidebar span { display:block; font-weight:700; color:#0f172a; }
.smart-quote-sidebar em { display:block; font-style:normal; color:#64748b; font-size:12px; margin:4px 0; }
.smart-quote-sidebar b { color:#2563eb; }
.smart-quote-main { min-width:0; }
.active-smart-section { box-shadow:0 10px 25px rgba(15,23,42,.06); }
.smart-current-lines { margin-top:12px; }
.smart-discount-box { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:12px; }
.smart-quote-all-list { margin:0 18px 18px; border:1px solid #e5e7eb; border-radius:14px; background:#fff; padding:12px; }
.smart-quote-all-list summary { cursor:pointer; font-weight:700; padding:4px 0 12px; }
.smart-quote-list-group { border-top:1px solid #eef2f7; padding-top:12px; margin-top:12px; }
.legacy-smart-quote-card summary { cursor:pointer; list-style:none; }
.legacy-smart-quote-card summary::-webkit-details-marker { display:none; }
@media (max-width: 900px) {
  .smart-quote-hero { flex-direction:column; }
  .smart-quote-layout { grid-template-columns:1fr; }
  .smart-quote-sidebar { position:static; display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); }
}

/* V2.24.5 签约客户跳转修复：报价页定位高亮 */
.quote-focus-flash {
  animation: quoteFocusFlash 1.4s ease-in-out 1;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18), 0 16px 40px rgba(37, 99, 235, .12);
}
@keyframes quoteFocusFlash {
  0% { transform: translateY(-4px); }
  35% { transform: translateY(0); box-shadow: 0 0 0 4px rgba(37, 99, 235, .22), 0 16px 40px rgba(37, 99, 235, .16); }
  100% { transform: none; }
}

/* V2.24.6 供应商管理增强 */
.supplier-table .supplier-category-select {
  min-width: 150px;
  min-height: 92px;
  width: 100%;
}
.supplier-editor .supplier-category-select {
  min-height: 120px;
}
.supplier-table td {
  vertical-align: top;
}
.supplier-table .mini-save {
  margin-top: 6px;
  padding: 5px 10px;
  font-size: 12px;
}
.supplier-table td:last-child {
  white-space: nowrap;
}

/* V2.24.7 产品库管理重构：分类按钮 + 弹窗产品列表 */
.product-library-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin:16px 0 12px}.product-library-head h2{margin:0 0 4px}.product-category-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}.product-category-card{border:1px solid #e2e8f0;background:#fff;border-radius:18px;padding:14px;text-align:left;display:grid;grid-template-columns:46px 1fr auto;gap:12px;align-items:center;cursor:pointer;box-shadow:0 8px 24px rgba(15,23,42,.04);transition:.18s ease}.product-category-card:hover{transform:translateY(-2px);border-color:#93c5fd;box-shadow:0 14px 34px rgba(37,99,235,.12)}.product-category-card-icon{width:46px;height:46px;border-radius:14px;background:#eff6ff;color:#2563eb;display:flex;align-items:center;justify-content:center;font-weight:800}.product-category-card-main b{display:block;color:#0f172a;font-size:16px}.product-category-card-main em{display:block;color:#64748b;font-style:normal;font-size:12px;margin-top:3px;line-height:1.4}.product-category-card-count{background:#f1f5f9;color:#334155;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:700}.product-category-card.all{background:linear-gradient(135deg,#eff6ff,#fff)}.product-category-card.child .product-category-card-icon{background:#f8fafc;color:#475569}.product-library-empty-tip{text-align:center;padding:28px}.product-library-modal-panel{width:min(1180px,96vw)}.product-library-modal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.product-modal-stats{display:flex;flex-wrap:wrap;gap:10px}.product-modal-stats span{border:1px solid #e2e8f0;background:#f8fafc;border-radius:14px;padding:9px 12px;color:#64748b}.product-modal-stats b{font-size:20px;color:#0f172a;margin-right:6px}.product-modal-search{display:flex;gap:10px;align-items:center}.product-modal-search input{min-width:280px}.product-library-table-wrap{overflow:auto;border:1px solid #e2e8f0;border-radius:16px;background:#fff}.product-library-table{width:100%;border-collapse:separate;border-spacing:0;min-width:920px}.product-library-table th{background:#f8fafc;color:#475569;text-align:left;font-size:12px;padding:10px;border-bottom:1px solid #e2e8f0;white-space:nowrap}.product-library-table td{padding:12px 10px;border-bottom:1px solid #eef2f7;vertical-align:middle;font-size:13px}.product-library-table tr:hover td{background:#f8fbff}.product-library-table tr:last-child td{border-bottom:0}.product-table-thumb{width:56px;height:56px;border:1px solid #e5e7eb;border-radius:12px;background:#f8fafc;display:flex;align-items:center;justify-content:center;color:#94a3b8;font-size:12px;overflow:hidden}.product-table-thumb img{width:100%;height:100%;object-fit:cover}.product-library-table td p{margin:4px 0;color:#64748b}.product-library-table td em,.product-library-table td small{display:block;color:#94a3b8;font-style:normal;margin-top:3px;max-width:320px}.table-actions{display:flex;flex-wrap:wrap;gap:6px}.table-actions .small{padding:7px 10px;font-size:12px}
.product-category-breadcrumb{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:8px 0 14px;padding:10px 12px;border:1px solid #dbeafe;background:#eff6ff;border-radius:14px;color:#334155}.product-category-breadcrumb span{font-size:13px}.product-category-breadcrumb b{color:#0f172a}.product-category-card.parent .product-category-card-icon{background:#ecfdf5;color:#059669}.product-category-card.child-all .product-category-card-icon{background:#fff7ed;color:#ea580c}
@media(max-width:760px){.product-library-head{display:block}.product-library-head .actions{margin-top:10px;display:grid;grid-template-columns:1fr}.product-category-card-grid{grid-template-columns:1fr}.product-library-modal-toolbar{display:block}.product-modal-stats{margin-bottom:10px}.product-modal-search{display:grid;grid-template-columns:1fr}.product-modal-search input{min-width:0;width:100%}.product-library-table{min-width:820px}}

/* V2.24.8 供应分类默认收起，点击后展开 */
.supplier-category-dropdown details {
  border: 1px solid #d8e0ef;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.supplier-category-dropdown summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  color: #1f2937;
  font-size: 13px;
}
.supplier-category-dropdown summary::-webkit-details-marker { display: none; }
.supplier-category-dropdown summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.supplier-category-dropdown summary b {
  font-size: 12px;
  color: #2563eb;
  font-weight: 600;
  flex: 0 0 auto;
}
.supplier-category-dropdown details[open] summary b { font-size: 0; }
.supplier-category-dropdown details[open] summary b::before { content: '收起'; font-size: 12px; }
.supplier-category-dropdown select.supplier-category-select,
.supplier-table .supplier-category-dropdown select.supplier-category-select,
.supplier-editor .supplier-category-dropdown select.supplier-category-select {
  min-height: 126px;
  width: calc(100% - 18px);
  margin: 0 9px 8px;
  border-radius: 8px;
}
.supplier-category-dropdown small {
  display: block;
  padding: 0 10px 10px;
}
.supplier-category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  min-height: 24px;
}
.supplier-table .supplier-category-select,
.supplier-editor .supplier-category-select {
  min-height: 0;
}

/* V2.24.9 智能报价三级选择：区域 → 分类 → 产品 */
.smart-quote-stepbar{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:12px 0}.smart-quote-stepbar div{border:1px solid #dbeafe;background:linear-gradient(135deg,#eff6ff,#fff);border-radius:14px;padding:12px}.smart-quote-stepbar b{display:block;color:#1d4ed8;margin-bottom:4px}.smart-quote-stepbar span{font-size:12px;color:#64748b}.smart-area-picker{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px}.smart-area-picker button{border:1px solid #d8e0ef;background:#fff;border-radius:999px;padding:8px 12px;cursor:pointer;color:#334155}.smart-area-picker button.active{background:#2563eb;color:#fff;border-color:#2563eb;box-shadow:0 8px 20px rgba(37,99,235,.22)}.smart-area-picker em{font-style:normal;font-size:11px;margin-left:6px;opacity:.72}.smart-three-step-grid{grid-template-columns:.9fr .9fr 1.05fr 1.7fr .7fr .7fr .8fr 1.4fr auto}.smart-floor-group{border:1px solid #c7d2fe;border-radius:18px;padding:14px;margin:14px 0;background:#f8fbff}.smart-floor-group>.item-head{border-bottom:1px solid #dbeafe;padding-bottom:8px;margin-bottom:10px}.smart-area-group{border:1px solid #e2e8f0;border-radius:16px;padding:12px;margin:12px 0;background:#fff}.smart-area-group>.item-head{border-bottom:1px dashed #e2e8f0;padding-bottom:8px;margin-bottom:8px}.smart-area-group h3,.smart-quote-list-group h4{margin:0}.smart-quote-list-group{margin-top:10px;padding:10px;border-radius:12px;background:#f8fafc}
@media(max-width:900px){.smart-quote-stepbar{grid-template-columns:1fr}.smart-three-step-grid{grid-template-columns:1fr}.smart-area-picker button{flex:1 1 auto}.smart-quote-layout{display:block}.smart-quote-sidebar{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-bottom:12px}}


/* V2.25.4 智能方案书生成模块 */
.solution-book-modal{z-index:9999}.solution-book-panel{width:min(1180px,96vw);max-height:92vh;overflow:auto}.solution-book-actions{position:sticky;top:0;background:#fff;z-index:2;padding:10px 0;border-bottom:1px solid #e5e7eb}.solution-book{background:#eef2f7;padding:18px}.solution-page{background:#fff;border:1px solid #e5e7eb;border-radius:20px;box-shadow:0 12px 30px rgba(15,23,42,.08);padding:34px;margin:0 auto 18px;max-width:980px;min-height:560px;color:#0f172a}.solution-page h1{font-size:44px;line-height:1.15;margin:10px 0}.solution-page h2{font-size:24px;margin:0 0 18px;color:#111827}.solution-page h3{margin:0 0 8px}.solution-cover{position:relative;display:flex;align-items:center;justify-content:center;text-align:center;overflow:hidden;background:#f7efe6 url('/solution-cover-bg.png?v=2.25.4') center/cover no-repeat;color:#101828;min-height:620px}.solution-cover:before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,.56),rgba(255,255,255,.22) 45%,rgba(255,255,255,.70));}.solution-cover:after{content:"";position:absolute;inset:18px;border:1px solid rgba(255,255,255,.78);border-radius:18px;pointer-events:none}.solution-cover-inner{position:relative;z-index:1;width:min(760px,88%);padding:38px 46px;border-radius:28px;background:rgba(255,255,255,.42);backdrop-filter:blur(6px);box-shadow:0 20px 70px rgba(15,23,42,.12)}.solution-cover h1{font-size:54px;letter-spacing:1px;color:#15213a;text-shadow:0 2px 12px rgba(255,255,255,.55)}.solution-cover h2{color:#17223b;font-size:30px;margin-top:10px}.solution-cover-subtitle{font-size:21px;color:#24324f;margin-top:18px}.solution-cover-features{display:flex;justify-content:center;gap:16px;flex-wrap:wrap;margin-top:32px}.solution-cover-features span{display:inline-flex;align-items:center;justify-content:center;min-width:98px;padding:10px 14px;border-radius:999px;background:rgba(255,255,255,.72);border:1px solid rgba(255,255,255,.85);font-weight:700;color:#344054}.solution-kicker{letter-spacing:8px;color:#1f2937;font-weight:700}.solution-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.solution-grid div,.solution-scene-list div,.solution-space-card{border:1px solid #e2e8f0;border-radius:16px;padding:16px;background:#f8fafc}.solution-grid b{display:block;color:#475569;margin-bottom:6px}.solution-grid span{font-size:17px;font-weight:700}.solution-note{font-size:16px;line-height:1.8;color:#475569;background:#f8fafc;border-left:4px solid #2563eb;padding:14px;margin-top:18px}.solution-scene-list{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.solution-scene-list h3{color:#1d4ed8}.solution-space-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.solution-space-card p{min-height:44px;color:#475569}.solution-space-card b{color:#dc2626}.solution-table{width:100%;border-collapse:collapse;background:#fff;border-radius:14px;overflow:hidden}.solution-table th,.solution-table td{border:1px solid #e5e7eb;padding:10px;text-align:left}.solution-table th{background:#f1f5f9}.solution-total td{font-size:20px;font-weight:800;color:#dc2626}.solution-checks p,.solution-service p{font-size:17px;line-height:1.9;background:#f8fafc;border-radius:14px;padding:12px;margin:10px 0}.solution-print{background:#fff;padding:0}.solution-print .solution-page{max-width:none;border-radius:0}
@media(max-width:900px){.solution-grid,.solution-scene-list,.solution-space-grid{grid-template-columns:1fr}.solution-page{padding:22px;min-height:auto}.solution-page h1{font-size:32px}.solution-cover h1{font-size:36px}.solution-cover h2{font-size:22px}.solution-cover-inner{padding:28px 20px}.solution-cover-features{gap:8px}.solution-cover-features span{min-width:auto}}


/* V2.25.5 新建项目选择潜客 */
.project-lead-field { grid-column: span 2; }
.project-lead-field select { width: 100%; }
.project-lead-field small { display:block; margin-top:6px; line-height:1.5; }
@media (max-width: 768px) { .project-lead-field { grid-column: span 1; } }

/* V2.25.6 报价页面户型图上传识别 */
.quote-floorplan-card{margin:14px 0 18px;border:1px solid #dbeafe;background:linear-gradient(180deg,#f8fbff,#fff);border-radius:16px;padding:14px;box-shadow:0 8px 22px rgba(15,23,42,.04)}
.quote-floorplan-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.quote-floorplan-head h3{margin:0 0 6px;font-size:18px;color:#10203f}
.quote-floorplan-preview{min-width:180px;text-align:right}
.quote-floorplan-thumb{display:block;max-width:220px;max-height:130px;object-fit:contain;border:1px solid #e5e7eb;border-radius:12px;background:#fff;margin-left:auto}
.quote-floorplan-preview-link{display:inline-flex;padding:10px 12px;border-radius:12px;background:#eef6ff;color:#1d4ed8;font-weight:700;text-decoration:none}
.quote-floorplan-empty{padding:14px 16px;border:1px dashed #cbd5e1;border-radius:12px;color:#64748b;background:#fff}
.quote-floorplan-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}
.quote-floorplan-card .floorplan-status{margin-top:10px;margin-bottom:0}
@media(max-width:760px){.quote-floorplan-head{display:block}.quote-floorplan-preview{text-align:left;margin-top:10px}.quote-floorplan-thumb{margin-left:0;max-width:100%}.quote-floorplan-actions button{flex:1 1 100%}}


/* V2.25.7 报表中心 */
.report-tabs .tabbar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.report-tabs .tab{border:1px solid #d7dee8;background:#f8fafc;border-radius:999px;padding:8px 14px;cursor:pointer;font-size:14px}
.report-tabs .tab.active{background:#2563eb;color:#fff;border-color:#2563eb}
.report-content{display:flex;flex-direction:column;gap:16px}
.report-table-block{margin-top:8px}
.table-headline{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.table-headline h3{margin:0;font-size:16px;color:#0f172a}
.report-table-block .mini-table th,.report-table-block .mini-table td{white-space:nowrap}
.error-card{border-color:#fecaca;background:#fff7f7;color:#7f1d1d}
.loading-card{padding:18px;border:1px dashed #cbd5e1;border-radius:12px;background:#f8fafc;color:#64748b}

/* V2.25.9 报表中心数据总览专业版 */
.report-overview-card{
  border:0;
  background:linear-gradient(135deg,#f8fbff 0%,#ffffff 42%,#f6f7ff 100%);
  box-shadow:0 18px 48px rgba(15,23,42,.08);
  overflow:hidden;
  position:relative;
}
.report-overview-card:before{
  content:"";
  position:absolute;
  right:-90px;
  top:-110px;
  width:260px;
  height:260px;
  background:radial-gradient(circle,rgba(37,99,235,.16),rgba(37,99,235,0) 68%);
  pointer-events:none;
}
.report-overview-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  position:relative;
  z-index:1;
  margin-bottom:16px;
}
.report-overview-head h2{margin:0 0 6px;color:#0f172a;font-size:22px;letter-spacing:-.02em}
.report-overview-head p{margin:0;max-width:780px;line-height:1.7}
.report-overview-badge{
  white-space:nowrap;
  border:1px solid #bfdbfe;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:999px;
  padding:7px 12px;
  font-size:12px;
  font-weight:800;
}
.report-overview-panel{display:grid;gap:16px;position:relative;z-index:1}
.report-hero-grid{display:grid;grid-template-columns:1.35fr .9fr;gap:14px;align-items:stretch}
.report-hero-main{
  border-radius:22px;
  padding:22px;
  color:#fff;
  background:linear-gradient(135deg,#0f172a,#1d4ed8);
  box-shadow:0 18px 44px rgba(37,99,235,.22);
  min-height:178px;
}
.report-hero-main.good{background:linear-gradient(135deg,#0f172a,#166534 42%,#16a34a)}
.report-hero-main.danger{background:linear-gradient(135deg,#0f172a,#991b1b 48%,#ef4444)}
.report-hero-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.report-hero-title span{font-weight:800;opacity:.92;letter-spacing:.04em}
.report-hero-title button{border:1px solid rgba(255,255,255,.32);background:rgba(255,255,255,.14);color:#fff;border-radius:999px;padding:7px 12px;font-weight:800;cursor:pointer}
.report-hero-main strong{display:block;font-size:38px;line-height:1.08;letter-spacing:-.04em;margin-bottom:10px}
.report-hero-main p{margin:0 0 16px;color:rgba(255,255,255,.78);line-height:1.7}
.report-profit-meter{height:9px;border-radius:999px;background:rgba(255,255,255,.2);overflow:hidden;margin-bottom:12px}
.report-profit-meter i{display:block;height:100%;border-radius:999px;background:rgba(255,255,255,.82)}
.report-hero-foot{display:flex;flex-wrap:wrap;gap:10px;color:rgba(255,255,255,.9);font-size:13px}
.report-hero-foot span{border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.1);border-radius:999px;padding:6px 10px}
.report-hero-side{display:grid;grid-template-rows:repeat(3,1fr);gap:10px}
.report-mini-line{
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:rgba(255,255,255,.92);
  padding:14px 16px;
  box-shadow:0 10px 26px rgba(15,23,42,.05);
  overflow:hidden;
}
.report-mini-line span{display:block;color:#64748b;font-size:13px;margin-bottom:6px}
.report-mini-line b{display:block;color:#0f172a;font-size:20px;margin-bottom:10px;letter-spacing:-.02em}
.report-mini-line i{display:block;height:7px;border-radius:999px;background:linear-gradient(90deg,#2563eb,#60a5fa);max-width:100%}
.report-mini-line.warn i{background:linear-gradient(90deg,#f59e0b,#fbbf24)}
.report-mini-line.good i{background:linear-gradient(90deg,#16a34a,#86efac)}
.report-section-title{display:flex;align-items:baseline;gap:10px;margin-top:2px}
.report-section-title b{font-size:16px;color:#0f172a}
.report-section-title span{font-size:13px;color:#64748b}
.report-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.report-kpi-grid.finance{grid-template-columns:repeat(3,minmax(0,1fr))}
.report-kpi-card{
  text-align:left;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:#fff;
  padding:14px;
  display:grid;
  grid-template-columns:44px 1fr;
  gap:12px;
  align-items:center;
  cursor:pointer;
  box-shadow:0 10px 26px rgba(15,23,42,.045);
  transition:.18s ease;
}
.report-kpi-card:hover{transform:translateY(-2px);border-color:#93c5fd;box-shadow:0 16px 36px rgba(37,99,235,.12)}
.report-kpi-icon{width:44px;height:44px;border-radius:15px;background:#eff6ff;display:flex;align-items:center;justify-content:center;font-size:20px}
.report-kpi-body small{display:block;color:#64748b;font-size:12px;margin-bottom:5px}
.report-kpi-body b{display:block;color:#0f172a;font-size:20px;line-height:1.18;letter-spacing:-.025em;word-break:break-all}
.report-kpi-body em{display:block;color:#94a3b8;font-style:normal;font-size:12px;margin-top:5px;line-height:1.35}
.report-kpi-card.good{border-color:#bbf7d0;background:linear-gradient(135deg,#f0fdf4,#fff)}
.report-kpi-card.good .report-kpi-icon{background:#dcfce7}
.report-kpi-card.warn{border-color:#fde68a;background:linear-gradient(135deg,#fffbeb,#fff)}
.report-kpi-card.warn .report-kpi-icon{background:#fef3c7}
.report-kpi-card.danger{border-color:#fecaca;background:linear-gradient(135deg,#fef2f2,#fff)}
.report-kpi-card.danger .report-kpi-icon{background:#fee2e2}
.report-kpi-card.blue{border-color:#bfdbfe;background:linear-gradient(135deg,#eff6ff,#fff)}
.report-kpi-card.blue .report-kpi-icon{background:#dbeafe}
@media(max-width:1180px){.report-kpi-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.report-kpi-grid.finance{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:860px){.report-hero-grid{grid-template-columns:1fr}.report-overview-head{display:block}.report-overview-badge{display:inline-flex;margin-top:10px}.report-kpi-grid,.report-kpi-grid.finance{grid-template-columns:repeat(2,minmax(0,1fr))}.report-hero-main strong{font-size:30px}}
@media(max-width:560px){.report-kpi-grid,.report-kpi-grid.finance{grid-template-columns:1fr}.report-hero-title{display:block}.report-hero-title button{margin-top:10px}.report-section-title{display:block}.report-kpi-body b{font-size:18px}}

/* V2.25.15 潜客项目意向选择 */
.product-create-panel .product-room-select, .product-editor-panel .product-room-select{width:100%;min-height:46px;}


/* V2.25.15 产品库多层弹窗层级修复：分类产品列表 < 新增/编辑产品 < 图片选择 */
#productLibraryCategoryModal{z-index:1200;}
#productCreateModal,#productEditorModal{z-index:1300;}
#productImageChooserModal{z-index:1400;}
#productEditorModal .product-editor-panel,#productCreateModal .product-create-panel{box-shadow:0 34px 120px rgba(15,23,42,.38);}

/* V2.25.19 产品图片 AI 搜索增强 */
.image-query-list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 8px; font-size: 12px; color: #64748b; }
.image-query-list span { background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; border-radius: 999px; padding: 4px 8px; }
.network-image-card.high-match { border-color: #93c5fd; box-shadow: 0 8px 20px rgba(37,99,235,.08); }
.network-image-card.possible-match { border-color: #e5e7eb; }
.image-level { display: inline-flex; align-self: flex-start; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; color: #1d4ed8; background: #dbeafe; }
.ai-score { background: #f5f3ff; color: #6d28d9; }


/* V2.25.19 豆包测试按钮强制显示 */
.doubao-toolbar-top{display:flex;gap:10px;align-items:center;margin:12px 0 16px;flex-wrap:wrap}
.doubao-test-btn{font-weight:700}
@media (max-width: 768px){.doubao-toolbar-top .btn,.doubao-toolbar-top button{width:100%;}}

/* V2.25.24 潜客报价弹窗同步项目报价详情样式 */
.extra-wide-modal{width:min(1280px,98vw)}
.lead-quote-page-pro{padding:0;overflow:auto}
.lead-quote-page-pro>.modal-head{padding:20px 20px 10px;margin-bottom:0;background:#fff;position:sticky;top:0;z-index:5;border-bottom:1px solid #eef2f7}
.lead-quote-page-pro .smart-quote-stepbar{padding:0 18px}
.lead-quote-page-pro .smart-area-picker{padding:0 18px;margin-top:12px}
.lead-quote-page-pro .smart-floor-picker{padding-top:16px}
.lead-quote-totalbar-pro{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
@media(max-width:760px){.extra-wide-modal{width:100vw}.lead-quote-page-pro>.modal-head{padding:16px 12px 10px}.lead-quote-page-pro .smart-quote-stepbar,.lead-quote-page-pro .smart-area-picker{padding:0 12px}}

/* V2.25.33 巡检/验收多选打勾样式：小号紧凑版 */
.project-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: 6px;
  max-height: 168px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #d8e2f0;
  border-radius: 10px;
  background: #fff;
}
.project-check-option {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #172033;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: all .15s ease;
}
.project-check-option:hover {
  border-color: #2563eb;
  background: #eef5ff;
}
.project-check-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: 0 0 14px;
  accent-color: #2563eb;
  cursor: pointer;
}
.project-check-option span {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-check-option:has(input:checked) {
  border-color: #2563eb;
  background: #eaf2ff;
  color: #1746a2;
}
@media (max-width: 768px) {
  .project-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 210px; gap: 6px; }
  .project-check-option { min-height: 32px; padding: 6px 8px; font-size: 13px; }
}

/* V2.25.33 付款节点比例手动调整 */
.percent-input-wrap { display: inline-flex; align-items: center; gap: 4px; }
.percent-input-wrap .percent-input { width: 72px; text-align: center; }
.percent-input-wrap span { color: #64748b; font-weight: 700; }

/* V2.25.37 新增潜客：来源渠道/小区首拼搜索下拉 */
.lead-autocomplete-field { position: relative; }
.lead-suggest-box {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  z-index: 80;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
}
.lead-suggest-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  padding: 9px 10px;
  color: #172033;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
}
.lead-suggest-item:hover { background: #eff6ff; color: #1d4ed8; }
.lead-suggest-item span { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-suggest-item em { font-style: normal; color: #94a3b8; font-size: 12px; flex: 0 0 auto; }
@media (max-width: 768px) {
  .lead-suggest-box { max-height: 260px; }
  .lead-suggest-item { min-height: 42px; font-size: 14px; }
}

/* V2.25.38 报表中心：年月日营业数据筛选 */
.report-date-tools{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px;}
.report-date-tools button{border:1px solid #d8e2f3;background:#fff;color:#1f3b66;border-radius:999px;padding:8px 14px;font-weight:800;cursor:pointer;}
.report-date-tools button:hover{border-color:#2563eb;color:#2563eb;background:#eff6ff;}
.report-filter-grid{grid-template-columns:1.3fr .7fr .8fr .8fr;align-items:end;}
.report-period-hint{display:flex;align-items:center;gap:6px;margin-bottom:12px;padding:10px 14px;border:1px solid #dbeafe;background:#eff6ff;color:#1e3a8a;border-radius:14px;font-size:13px;}
.report-business-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px 4px 14px;}
.report-business-toolbar b{font-size:18px;color:#0f172a;}
@media (max-width: 900px){.report-filter-grid{grid-template-columns:1fr}.report-business-toolbar{display:block}.report-date-tools button{flex:1;min-width:72px}}
