﻿* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #f4f6f9;
  color: #1a1b1c;
  line-height: 1.6;
}
.workspace-file-frame { display:block; width:100%; min-height:160px; border:0; margin-bottom:16px; }
html.workspace-embedded body { display:block!important; min-height:0!important; min-width:0!important; background:#fff!important; }
html.workspace-embedded body>.public-header,html.workspace-embedded body>.public-footer,
html.workspace-embedded .container>.header,html.workspace-embedded .process-selector,
html.workspace-embedded .quote-sidebar,html.workspace-embedded .upload-area,
html.workspace-embedded .upload-settings,html.workspace-embedded .upload-policy-notice,html.workspace-embedded .file-list-toolbar,
html.workspace-embedded .workspace-bulk-actions,html.workspace-embedded .workspace-file-frame { display:none!important; }
html.workspace-embedded .container { max-width:none!important; padding:0!important; margin:0!important; }
html.workspace-embedded .quote-workspace { display:block!important; }
html.workspace-embedded .file-panel { border:0!important; box-shadow:none!important; padding:0!important; margin:0!important; }
html.workspace-embedded body>form { flex:none!important; }
.workspace-file-frame.workspace-modal-frame { position:fixed; inset:0; width:100vw!important; height:100dvh!important; max-width:none!important; margin:0; z-index:100010; background:transparent; }
.workspace-modal-placeholder { margin-bottom:16px; }
html.workspace-modal-document,html.workspace-modal-document body.workspace-modal-document { background:transparent!important; }
body.workspace-modal-document>form,body.workspace-modal-document>:not(form):not(dialog) { visibility:hidden; }
body.workspace-modal-document dialog[open] { visibility:visible; }
.part-delete-dialog,#processParameterDialog { position:fixed; inset:0; height:fit-content; }
.model-file-selection { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0; font-size:13px; }
.model-file-selection label,.part-selection { display:inline-flex; align-items:center; gap:5px; cursor:pointer; }
.model-file-selection input,.part-selection input { width:15px; height:15px; accent-color:#3092ff; flex-shrink:0; }
.model-selected-count { color:#6b7280; white-space:nowrap; font-size:12px; }
.file-data-row.part-not-selected { opacity:.6; }
.workspace-bulk-actions { display:flex; align-items:center; justify-content:flex-start; flex-wrap:wrap; gap:16px; margin:-8px 0 20px; font-size:13px; }
.workspace-bulk-actions[hidden] { display:none; }
.browser-quote-status { color:#6b7280; font-size:12px; margin:0 0 12px; }
.browser-pending-file { border:1px solid #e0e6ef; padding:20px; margin-bottom:16px; background:#f8fbff; font-size:13px; }
html.workspace-embedded .browser-quote-status { display:none; }
.workspace-bulk-actions label { display:inline-flex; align-items:center; gap:6px; cursor:pointer; }
.workspace-bulk-actions input { width:15px; height:15px; accent-color:#3092ff; }
.workspace-bulk-actions #workspaceBulkStatus { color:#6b7280; font-size:12px; }
.file-caption-actions { display:inline-flex; align-items:center; flex-wrap:wrap; gap:8px; }
.part-delete-button { border:1px solid #d9dde5; border-radius:4px; padding:3px 9px; background:#fff; color:inherit; font-size:12px; cursor:pointer; }
.part-delete-dialog { padding:0; width:440px; max-width:calc(100vw - 32px); margin:auto; border:1px solid #d9dde5; border-radius:4px; color:#666; box-shadow:0 8px 32px #0002; }
.part-delete-dialog::backdrop { background:#0004; }
.part-delete-dialog-head { display:flex; align-items:center; justify-content:space-between; padding:8px 16px; border-bottom:1px solid #e5e5e5; color:#333; font-size:18px; }
.part-delete-close { background:none; border:0; color:#90949b; font-size:28px; line-height:1; cursor:pointer; }
.part-delete-dialog-message { display:flex; align-items:center; justify-content:center; gap:10px; margin:22px 16px; font-size:16px; }
.part-delete-dialog-icon { display:inline-flex; align-items:center; justify-content:center; width:27px; height:27px; border-radius:50%; background:#eca12c; color:white; font-weight:700; }
.part-delete-dialog-actions { display:flex; justify-content:center; gap:12px; padding:0 16px 22px; }
.part-delete-dialog-actions button { min-width:88px; padding:7px 16px; border:1px solid #d9dde5; border-radius:4px; color:#666; background:white; cursor:pointer; font-size:14px; }
.part-delete-dialog-actions .part-delete-confirm { color:white; background:#60a9ff; border-color:#60a9ff; }
.part-total-line { display:inline-flex; align-items:center; justify-content:center; gap:5px; white-space:nowrap; }
.part-rule-warning { display:inline-flex; align-items:center; margin:0; }
.part-rule-warning[hidden] { display:none; }
.part-rule-warning .manual-quote-hint { background:#eca12c; margin:0; }
body .manual-quote-tooltip { white-space:pre-line; width:max-content; max-width:min(420px,calc(100vw - 24px)); }
.part-delete-button:disabled { opacity:.5; cursor:wait; }
.part-delete-status { color:#c33b3b; font-size:12px; }
.delivery-options { border:0; padding:0; margin:18px 0; min-width:0; }
.delivery-options legend { font-size:12px; color:#6b7280; margin-bottom:8px; }
.delivery-options label { display:flex; align-items:center; gap:7px; padding:10px 6px; border-bottom:1px solid #e5e7eb; cursor:pointer; font-size:12px; }
.delivery-options input { margin:0; accent-color:#248cff; }
.delivery-options strong { margin-left:auto; white-space:nowrap; }
.estimate-price-warning { color:#c26a17; font-size:12px; font-weight:400; line-height:1.6; margin-top:8px; white-space:normal; }
.file-price .estimate-price-warning { max-width:220px; }
.surface-treatment-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:12px; }
.surface-settings .surface-treatment-row select { width:auto; min-width:120px; max-width:240px; }
.surface-settings .surface-treatment-row .surface-color { min-width:100px; }
.surface-finish-option { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.surface-treatment-row input[type=radio] { width:auto; accent-color:#2786ff; }
.surface-add,.surface-remove { width:28px; height:28px; border:1px solid #2786ff; border-radius:50%; background:#fff; color:#2786ff; cursor:pointer; font-size:20px; line-height:1; }
.surface-remove { color:#d14b4b; border-color:#d14b4b; }
.quote-sidebar .btn-primary:disabled { opacity:.5; cursor:not-allowed; }
.container { max-width: 1200px; margin: 0 auto; padding: 24px 16px; }
.header { text-align: center; margin-bottom: 32px; }
.header h1 { font-size: 28px; font-weight: 700; color: #1a1b1c; }
.header p { color: #6b7280; font-size: 14px; margin-top: 6px; }
.header .badge { display: inline-block; background: linear-gradient(135deg, #1d4ed8, #3b82f6); color: #fff; padding: 3px 12px; border-radius: 20px; font-size: 12px; margin-left: 8px; vertical-align: middle; }
.header .topbar-links { text-align: right; font-size: 13px; margin-top: 6px; }
.header .topbar-links a { color: #1d4ed8; text-decoration: none; margin-left: 14px; }
.layout { display: flex; gap: 24px; flex-wrap: wrap; }
.panel { background: #fff; border-radius: 16px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.panel-left { flex: 0 0 380px; min-width: 320px; }
.panel-right { flex: 1; min-width: 300px; }
.section-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 4px; height: 18px; background: #1d4ed8; border-radius: 2px; }
.proc-card { flex: 0 0 90px; padding: 14px 8px; text-align: center; border: 2px solid #e5e7eb; border-radius: 12px; cursor: pointer; background: #fff; transition: all 0.2s; }
.proc-card:hover { border-color: #93c5fd; }
.proc-card.active { border-color: #1d4ed8; background: #eff6ff; }
.upload-area { border: 2px dashed #d1d5db; border-radius: 12px; padding: 40px 20px; text-align: center; cursor: pointer; transition: all 0.2s; background: #fafbfc; }
.upload-area:hover { border-color: #1d4ed8; background: #eff6ff; }
.upload-area .icon { font-size: 40px; margin-bottom: 12px; }
.upload-area .text { font-size: 14px; color: #374151; }
.upload-area .hint { font-size: 12px; color: #9ca3af; margin-top: 6px; }
.upload-area .file-name { margin-top: 12px; padding: 8px 12px; background: #eff6ff; border-radius: 8px; font-size: 13px; color: #1e40af; word-break: break-all; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 6px; }
.form-group input[type="number"], .form-group select, .form-group input[type="text"] { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.quantity-row { display: flex; gap: 8px; align-items: center; }
.quantity-row input { flex: 1; }
.quantity-row .qty-btn { padding: 10px 14px; border: 1px solid #d1d5db; background: #fff; border-radius: 8px; cursor: pointer; font-size: 14px; }
.btn-primary { width: 100%; padding: 14px; background: linear-gradient(135deg, #1d4ed8, #3b82f6); color: #fff; border: none; border-radius: 10px; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 8px; }
.btn-secondary { padding: 8px 16px; background: #fff; color: #1e40af; border: 1px solid #bfdbfe; border-radius: 8px; font-size: 13px; cursor: pointer; text-decoration: none; }
.result-empty { text-align: center; padding: 80px 20px; color: #9ca3af; }
.result-empty .icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; }
.price-card { background: #f8f9fb; color: #1a1b1c; border: 1px solid #e5e7eb; border-radius: 16px; padding: 28px; margin-bottom: 20px; }
.price-card .label { font-size: 13px; color: #6b7280; }
.price-card .price { font-size: 40px; font-weight: 700; margin: 4px 0; }
.price-card .price span { font-size: 18px; font-weight: 400; }
.price-card .meta { display: flex; gap: 24px; margin-top: 12px; font-size: 13px; color: #6b7280; flex-wrap: wrap; }
.cost-breakdown { margin-bottom: 24px; }
.cost-bar-row { display: flex; align-items: center; margin-bottom: 8px; font-size: 13px; }
.cost-bar-row .label { width: 90px; color: #4b5563; flex-shrink: 0; }
.cost-bar-row .bar-wrap { flex: 1; height: 24px; background: #f3f4f6; border-radius: 6px; overflow: hidden; margin: 0 10px; }
.cost-bar-row .bar { height: 100%; border-radius: 6px; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; font-size: 11px; color: #fff; }
.cost-bar-row .value { width: 80px; text-align: right; font-weight: 500; color: #1a1b1c; flex-shrink: 0; }
.part-card { border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 16px; overflow: hidden; }
.part-card-header { padding: 16px 20px; background: #fafbfc; display: flex; justify-content: space-between; align-items: center; }
.part-card-header .left { display: flex; align-items: center; gap: 12px; }
.part-card-header .part-id { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #fff; }
.part-card-header .part-info h4 { font-size: 15px; font-weight: 600; }
.part-card-header .part-info p { font-size: 12px; color: #6b7280; margin-top: 2px; }
.part-card-header .right { text-align: right; }
.part-card-header .part-cost { font-size: 18px; font-weight: 700; color: #1a1b1c; }
.confidence { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; margin-top: 4px; }
.confidence.high { background: #dcfce7; color: #166534; }
.confidence.mid { background: #fef3c7; color: #92400e; }
.confidence.low { background: #fee2e2; color: #991b1b; }
.part-card-body { padding: 16px 20px; border-top: 1px solid #e5e7eb; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.feature-item { background: #f9fafb; border-radius: 8px; padding: 10px 12px; }
.feature-item .f-label { font-size: 11px; color: #9ca3af; }
.feature-item .f-value { font-size: 15px; font-weight: 600; color: #1a1b1c; margin-top: 2px; }
.process-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; }
.process-step { padding: 6px 12px; background: #eff6ff; color: #1e40af; border-radius: 20px; font-size: 12px; font-weight: 500; }
.process-arrow { color: #bfdbfe; font-size: 14px; }
.process-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.process-table th { text-align: left; padding: 8px 10px; background: #f9fafb; color: #6b7280; font-weight: 500; font-size: 12px; border-bottom: 1px solid #e5e7eb; }
.process-table td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; }
.process-table .cost { text-align: right; font-weight: 500; }
.dfm-item { padding: 8px 12px; border-radius: 8px; font-size: 13px; margin-bottom: 6px; display: flex; align-items: flex-start; gap: 2px; }
.dfm-item.warning { background: #fffbeb; color: #92400e; border-left: 3px solid #f59e0b; }
.dfm-item.error { background: #fef2f2; color: #991b1b; border-left: 3px solid #ef4444; }
.dfm-item.ok { background: #f0fdf4; color: #166534; border-left: 3px solid #22c55e; }
.download-area { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.error-box { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
@media (max-width: 768px) { .panel-left { flex: 1 1 100%; } .price-card .price { font-size: 32px; } .feature-grid { grid-template-columns: repeat(2, 1fr); } }
#quoteLoading { display: none; margin-bottom: 16px; }
#quoteLoading .progress-wrap { height: 14px; background: #e8eef7; border-radius: 999px; box-shadow: inset 0 1px 3px rgba(30, 64, 175, 0.1); }
#quoteLoading .progress-bar { position: relative; height: 100%; width: 0; max-width: 100%; overflow: hidden; background: linear-gradient(90deg, #2456ed, #3188ff 68%, #49b7ff); border-radius: inherit; box-shadow: 0 0 7px rgba(49, 136, 255, 0.48), 0 0 15px rgba(49, 136, 255, 0.18); transition: width 0.25s ease; animation: quote-progress-glow 2.8s ease-in-out infinite; }
#quoteLoading .progress-bar::before { content: ""; position: absolute; inset: -3px 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='20' viewBox='0 0 96 20'%3E%3Cpath d='M0 7 Q12 0 24 7 T48 7 T72 7 T96 7 V20 H0Z' fill='%23fff' fill-opacity='.24'/%3E%3Cpath d='M0 13 Q12 6 24 13 T48 13 T72 13 T96 13 V20 H0Z' fill='%23b4efff' fill-opacity='.25'/%3E%3C/svg%3E"); background-repeat: repeat-x; background-size: 96px 20px; animation: quote-progress-wave 2s linear infinite; pointer-events: none; }
#quoteLoading .progress-bar::after { content: ""; position: absolute; inset: 0 auto 0 -40%; width: 35%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.48), transparent); transform: skewX(-18deg); animation: quote-progress-shine 3s ease-in-out infinite; pointer-events: none; }
@keyframes quote-progress-wave { from { background-position: 0 0; } to { background-position: 96px 0; } }
@keyframes quote-progress-shine { 0% { left: -40%; } 75%, 100% { left: 110%; } }
@keyframes quote-progress-glow { 0%, 100% { box-shadow: 0 0 7px rgba(49, 136, 255, 0.48), 0 0 15px rgba(49, 136, 255, 0.18); } 50% { box-shadow: 0 0 10px rgba(49, 136, 255, 0.62), 0 0 20px rgba(49, 136, 255, 0.25); } }
@media (prefers-reduced-motion: reduce) { #quoteLoading .progress-bar { transition: none; } #quoteLoading .progress-bar, #quoteLoading .progress-bar::before, #quoteLoading .progress-bar::after { animation: none; } #quoteLoading .progress-bar::after { display: none; } }
#quoteLoading .progress-percent { margin-top: 8px; font-size: 13px; font-weight: 600; color: #1e40af; }
#quoteLoading .txt { margin-top: 4px; font-size: 13px; color: #6b7280; }
/* ===== 联系客服浮窗 ===== */
#chatFloatingBtn { position: relative; display: inline-flex; align-items: center; gap: 5px; margin-left: 12px; padding: 4px 14px; background: #fff; color: #1d4ed8; border: 1px solid #bfdbfe; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; vertical-align: middle; user-select: none; }
#chatFloatingBtn:hover { background: #eff6ff; border-color: #1d4ed8; }
#chatUnreadDot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; border-radius: 9px; display: none; align-items: center; justify-content: center; border: 2px solid #fff; box-sizing: border-box; }
#chatPanel { position: fixed; top: 0; right: 5px; width: 370px; max-width: 90vw; height: 710.8px; z-index: 99991; background: #fff; border-radius: 16px 0 0 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.18); display: flex; flex-direction: column; overflow: hidden; transform: translateX(110%); transition: transform 0.3s ease; }
#chatPanel.open { transform: translateX(0); }
#chatPanelHeader { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: linear-gradient(135deg, #1d4ed8, #3b82f6); color: #fff; }
#chatPanelTitle { font-size: 15px; font-weight: 700; }
#chatPanelSub { font-size: 11px; opacity: 0.85; margin-top: 2px; }
#chatPanelClose { background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; line-height: 1; padding: 4px; }
#chatMessages { flex: 1; overflow-y: auto; padding: 14px; background: #f4f6f9; }
.chat-tip { text-align: center; color: #9ca3af; font-size: 12px; padding: 12px 0; }
.chat-row { display: flex; margin-bottom: 10px; }
.chat-row.mine { justify-content: flex-end; }
.chat-row.theirs { justify-content: flex-start; }
.chat-bubble { max-width: 78%; padding: 9px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.chat-row.mine .chat-bubble { background: #1d4ed8; color: #fff; border-bottom-right-radius: 4px; }
.chat-row.theirs .chat-bubble { background: #fff; color: #1a1b1c; border: 1px solid #e5e7eb; border-bottom-left-radius: 4px; }
.chat-time { text-align: center; font-size: 12px; color: #b2b2b2; margin: 8px 0 6px; line-height: 1; user-select: none; }
#chatInputArea { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e5e7eb; background: #fff; }
#chatInput { flex: 1; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 20px; font-size: 14px; outline: none; }
#chatInput:focus { border-color: #1d4ed8; }
#chatSendBtn { padding: 10px 18px; background: linear-gradient(135deg, #1d4ed8, #3b82f6); color: #fff; border: none; border-radius: 20px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* 即时报价：文件列表与右侧报价汇总 */
.container { max-width: 1600px; padding: 24px 28px; }
.header { margin-bottom: 22px; }
.process-selector { margin-bottom: 22px; padding: 20px 24px; }
#processCards { display: flex; flex-wrap: nowrap; gap: 16px; overflow-x: auto; padding: 4px 2px; }
#processCards .proc-card-disabled { cursor: not-allowed; }
#processCards .process-testing-label { color: #f59e0b; }
#processCards .proc-card { display: flex; flex: 1 0 auto; min-height: 96px; align-items: center; justify-content: center; gap: 12px; border-radius: 10px; padding: 22px 24px; white-space: nowrap; font-family: inherit; color: #334155; border: 1px solid #e0e6ef; box-shadow: 0 2px 6px rgba(30, 64, 110, 0.04); transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; }
#processCards .proc-card:hover { border-color: #93c5fd; background: #f6faff; box-shadow: 0 4px 12px rgba(41, 141, 255, 0.1); }
#processCards .proc-card.active { border-color: #298dff; background: #eff6ff; color: #1d6fd1; box-shadow: 0 0 0 1px #298dff, 0 4px 12px rgba(41, 141, 255, 0.1); }
#processCards .proc-card > div:first-child { font-size: 30px !important; line-height: 1; }
#processCards .proc-card > div:last-child { font-size: 14px !important; font-weight: 600; margin-top: 0 !important; }
#altMaterialBox { max-width: 380px; margin-top: 12px; }
#altMaterialBox label { margin-right: 12px; font-size: 13px; }
#alt_material { padding: 8px; border: 1px solid #dce2ea; border-radius: 4px; }
.quote-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
.quote-workspace > .quote-sidebar { display: none; }
.quote-workspace.has-quote-file { grid-template-columns: minmax(0, 1fr) 310px; }
.quote-workspace.has-quote-file > .quote-sidebar { display: block; }
.file-panel { min-width: 0; border-radius: 6px; }
.file-list-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.file-list-toolbar .section-title { margin: 0; }
.file-list-toolbar > span { font-size: 12px; color: #8993a2; }
.file-caption { display: flex; gap: 20px; align-items: center; background: #f4f5f7; padding: 12px 20px; font-size: 13px; overflow-wrap: anywhere; text-align: left; color: #193452; }
.file-ready { color: #27865a; font-size: 12px; margin-left: auto; flex-shrink: 0; }
.file-table-scroll { overflow-x: auto; }
.file-table { width: 100%; min-width: 900px; table-layout: fixed; border-collapse: collapse; border: 1px solid #e2e5eb; font-size: 13px; color: #49566a; }
.file-table .col-index { width: 6%; }
.file-table .col-drawing { width: 11%; }
.file-table .col-model { width: 24%; }
.file-table .col-parameters { width: 23%; }
.file-table .col-quantity { width: 12%; }
.file-table .col-unit, .file-table .col-total { width: 12%; }
.file-table .file-name-row > td { padding: 0; }
.file-table .file-data-row { height: 175px; }
.file-table th { background: #fafafa; font-weight: 500; color: #193452; padding: 14px 10px; border: 1px solid #e2e5eb; border-left: 0; border-right: 0; white-space: nowrap; }
.file-table td { padding: 22px 10px; text-align: center; border-bottom: 1px solid #e2e5eb; }
.file-table .model-info, .file-table .parameter-info { text-align: left; font-size: 12px; line-height: 2; }
.model-info { overflow-wrap: anywhere; }
.parameter-box { position: relative; border: 1px dashed #3796ff; padding: 26px 10px 12px; min-height: 130px; overflow-wrap: anywhere; }
.parameter-edit { position: absolute; top: 0; right: 0; padding: 2px 10px; color: #fff; background: #3092ff; border: 0; font-size: 12px; cursor: pointer; }
.model-dimensions { color: #334155; }
.geometry-source { color: #8a95a5; }
.model-preview-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 90px; height: 100px; background: #eef2f6; border: 0; border-radius: 0; color: #4c698c; font-weight: 600; cursor: pointer; overflow: hidden; }
.model-preview-button img { width: 100%; height: 100%; object-fit: contain; }
.preview-zoom { position: absolute; right: 0; bottom: 0; background: #8c96a2; color: #fff; font-size: 20px; line-height: 26px; width: 28px; border-radius: 12px 0 0 0; }
.manual-price { color: #298dff; font-size: 18px; font-weight: 600; }
.model-preview-button small { display: block; font-size: 11px; font-weight: 400; margin-top: 8px; }
.file-price { white-space: nowrap; }
.file-price small, .file-price a { display: block; font-size: 11px; margin-top: 6px; }
.file-price small { color: #ef554f; }
.file-price a, .text-button { color: #298dff; }
.text-button { border: 0; background: transparent; cursor: pointer; font-size: 12px; }
.quote-details { margin: 14px 0; font-size: 13px; }
.quote-details > summary { color: #298dff; padding: 10px 0; cursor: pointer; }
.quote-details-body { padding-top: 12px; }
.upload-area { margin-top: 16px; padding: 30px 18px; background: #f7f8fa; border: 1px dashed #3796ff; border-radius: 5px; }
.upload-area .icon { font-size: 48px; line-height: 1.3; color: #bbc5d1; }
.upload-button { display: inline-block; padding: 10px 24px; background: #3092ff; border-radius: 4px; color: white; margin-bottom: 12px; }
.upload-area .hint { color: #8b96a4; line-height: 1.9; }
.upload-area.drag-over { border-color: #1677ed; background: #eaf4ff; }
.upload-policy-notice { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding: 16px; border: 1px solid #ffdfc5; border-radius: 10px; background: #fff7f0; color: #ff791f; font-size: 13px; line-height: 1.6; }
.upload-policy-notice p { margin: 0; min-width: 0; }
.upload-policy-icon { display: inline-flex; flex: 0 0 17px; align-items: center; justify-content: center; width: 17px; height: 17px; margin-top: 2px; border-radius: 50%; background: #ff791f; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }
.upload-settings { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.upload-settings .quantity-row { gap: 0; }
.upload-settings input[type=number] { width: 64px; height: 34px; text-align: center; border: 1px solid #dce2eb; border-left: 0; border-right: 0; }
.upload-settings .qty-btn { padding: 4px 12px; border-radius: 3px; height: 34px; }
.quote-sidebar { position: sticky; top: 20px; border: 1px solid #e1e5eb; border-radius: 4px; padding: 22px; box-shadow: none; }
.summary-price-label { color: #6b7280; font-size: 13px; }
.summary-price { color: #298dff; font-size: 32px; font-weight: 600; margin: 6px 0 24px; }
.summary-price small { color: #8c96a4; font-size: 13px; font-weight: 400; }
.summary-line { display: flex; justify-content: space-between; gap: 8px; margin: 14px 0; color: #33465e; font-size: 14px; }
.summary-line strong { font-weight: 500; }
.summary-total { border-top: 1px solid #e1e5eb; padding-top: 18px; margin-top: 22px; }
.summary-total strong { color: #f34e51; font-size: 22px; font-weight: 600; }
.quote-sidebar .btn-primary { border-radius: 4px; background: #3092ff; font-size: 15px; }
.summary-manual-actions { display: flex; align-items: stretch; gap: 8px; margin-top: 8px; }
.summary-manual-actions[hidden], #summaryCreateOrder[hidden] { display: none; }
.summary-manual-actions .btn-primary, .summary-manual-actions .btn-secondary { flex: 1; min-width: 0; width: auto; margin: 0; padding: 12px 6px; border-radius: 4px; font-size: 13px; white-space: nowrap; }
.summary-manual-actions .btn-primary:disabled { background: #3092ff; color: #fff; cursor: not-allowed; }
.summary-detail-link { display: block; text-align: center; margin-top: 14px; color: #298dff; font-size: 13px; text-decoration: none; }
.quote-disclaimer { color: #ed565a; font-size: 12px; margin-top: 22px; line-height: 1.8; }
.summary-empty { color: #97a0ac; font-size: 13px; padding: 20px 0; }
.pending-file-row { gap: 24px; align-items: center; justify-content: space-between; border: 1px solid #e0e5ed; background: #fafcff; padding: 20px; margin-bottom: 16px; font-size: 13px; }
.pending-file-row > div { min-width: 0; overflow-wrap: anywhere; }
.pending-status { display: block; font-size: 12px; color: #8390a2; margin-top: 6px; }
#quoteLoading { width: 45%; flex-shrink: 0; margin: 0; }
#quoteLoading .progress-wrap { height: 14px; margin-top: 7px; }
#quoteLoading .txt { font-size: 14px; line-height: 1.5; }
.result-empty { padding: 30px 20px; }
@media (max-width: 1100px) { .quote-workspace { gap: 16px; } .quote-workspace.has-quote-file { grid-template-columns: minmax(0, 1fr) 270px; } .file-panel { padding: 18px; } .container { padding: 18px; } }
@media (max-width: 800px) { .quote-workspace, .quote-workspace.has-quote-file { grid-template-columns: minmax(0, 1fr); } .quote-sidebar { position: static; } .container { padding: 12px; } .header h1 { font-size: 22px; } .process-selector { padding: 16px; } .file-ready { display: none; } .pending-file-row { gap: 12px; padding: 14px; } }
.file-table .quantity-row { justify-content: center; gap: 0; min-width: 112px; }
.file-table .quantity-row input { width: 50px; min-width: 0; flex: 0 0 50px; height: 34px; border: 1px solid #dce2eb; text-align: center; }
.file-table .quantity-row .qty-btn { height: 34px; padding: 4px 10px; border-radius: 2px; }
#drawingPreviewDialog { width: min(1100px, 94vw); max-width: 94vw; max-height: 92vh; margin: auto; padding: 0; border: 0; border-radius: 12px; color: #334155; background: #fff; box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28); }
#drawingPreviewDialog::backdrop { background: rgba(15, 23, 42, 0.58); }
.drawing-preview-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; border-bottom: 1px solid #e2e8f0; }
.drawing-preview-header h2 { font-size: 17px; font-weight: 600; }
.drawing-preview-header h2 { flex-shrink: 0; }
.drawing-preview-dimensions { margin-left: 16px; margin-right: auto; color: #6b7280; font-size: 13px; text-align: left; }
.drawing-preview-header .drawing-preview-close { margin-left: 16px; flex-shrink: 0; }
.drawing-preview-close { width: 34px; height: 34px; border: 0; border-radius: 6px; background: #f1f5f9; color: #64748b; font-size: 18px; cursor: pointer; }
.drawing-preview-close:hover { background: #e2e8f0; color: #1e293b; }
#drawingPreviewHost { padding: 16px; overflow: auto; max-height: calc(92vh - 70px); }
#drawingPreviewHost #threePreviewWrap { margin-bottom: 0 !important; }
#drawingPreviewHost #threePreview { height: clamp(240px, 62vh, 640px) !important; }
#drawingPreviewHost iframe { height: 65vh !important; }
/* 加工参数弹层：左侧参数，右侧模型与确认操作 */
#processParameterDialog { width: min(1440px, 96vw); max-width: 96vw; max-height: calc(100dvh - 24px); overflow: hidden; margin: auto; border: 0; padding: 0; border-radius: 10px; color: #334155; background: #fff; box-shadow: 0 24px 80px rgba(15,23,42,.28); }
#processParameterDialog::backdrop { background: rgba(15,23,42,.55); }
.parameter-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; border-bottom: 1px solid #e2e5eb; }
.parameter-modal-header h2 { font-size: 20px; font-weight: 600; color: #333; }
.parameter-modal-layout { display: grid; grid-template-columns: minmax(0,1fr) 250px; overflow: visible; transform-origin: top left; }
.parameter-modal-main { min-width: 0; padding: 16px 20px; }
.parameter-section { margin-bottom: 16px; }
.parameter-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: #333; }
.parameter-section em { color: #f15c61; font-style: normal; margin-right: 5px; }
.parameter-section h3 span { color: #298dff; }
.parameter-part-selects { display: none; }
.parameter-part-selects label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.parameter-modal-main select { background: #fff; border: 1px solid #dce2eb; padding: 7px 10px; border-radius: 4px; color: #536176; max-width: 100%; font-family: inherit; font-size: 13px; }
.material-browser { display: grid; grid-template-columns: 120px minmax(0,1fr); background: #f5f5f6; padding: 10px 12px; gap: 12px; }
.material-browser h4 { font-size: 14px; font-weight: 600; color: #333; margin: 0 6px 6px; }
#materialCategoryOptions { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
#materialChoiceOptions { display: grid; grid-template-columns: repeat(auto-fill,minmax(115px,1fr)); gap: 4px 8px; align-content: start; justify-items: start; }
.material-browser button { background: transparent; border: 1px solid transparent; border-radius: 16px; padding: 3px 10px; font-size: 12px; color: #334155; font-family: inherit; cursor: pointer; text-align: left; }
.material-browser button:hover { color: #298dff; }
.material-browser button.selected { color: #298dff; border-color: #298dff; background: #f5faff; }
.material-browser button:disabled { color: #a7afb9; border-color: transparent; background: transparent; cursor: not-allowed; opacity: .65; }
.surface-mode-options { display: flex; gap: 10px; margin-bottom: 10px; }
.surface-mode-options button { flex: 0 1 220px; min-height: 44px; padding: 10px 16px; background: #fff; border: 1px solid #dce2eb; border-radius: 4px; font-size: 14px; color: #334155; font-family: inherit; cursor: pointer; }
.surface-mode-options button small { display: block; font-size: 11px; margin-top: 5px; color: #8390a2; }
.surface-mode-options button.selected { color: #298dff; border-color: #298dff; background: #f8fbff; box-shadow: inset 0 -3px #298dff; }
.surface-mode-options button:disabled, .parameter-modal-main select:disabled { opacity: .55; cursor: default; }
.surface-settings { padding: 10px 14px; border: 1px solid #e0e4ea; border-radius: 4px; background: #f7f8fa; font-size: 13px; }
.surface-settings label { margin-right: 12px; }
.surface-settings p { color: #7b8797; font-size: 12px; margin-top: 6px; }
.parameter-field-rows { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; margin-bottom: 0; }
.parameter-field-row { display: flex; gap: 14px; align-items: center; margin: 0; }
.parameter-field-row > label { width: 100px; flex-shrink: 0; font-size: 13px; font-weight: 600; color: #333; }
.parameter-field-row > select { width: 260px; max-width: calc(100% - 114px); }
.parameter-field-row > input { width: 260px; max-width: calc(100% - 114px); box-sizing: border-box; background: #fff; border: 1px solid #dce2eb; padding: 7px 10px; border-radius: 4px; color: #536176; font-family: inherit; font-size: 13px; }
.parameter-quantity { display: flex; }
.parameter-quantity button { width: 38px; border: 1px solid #dce2eb; background: #f7f9fc; color: #64748b; cursor: pointer; font-size: 18px; }
.parameter-quantity input { width: 64px; height: 34px; border: 1px solid #dce2eb; border-left: 0; border-right: 0; text-align: center; font-family: inherit; }
.parameter-help { grid-column: 1 / -1; color: #8b95a3; font-size: 12px; }
.parameter-modal-summary { border-left: 8px solid #f7f9fc; padding: 16px; background: #fff; }
.parameter-model-image { display: block; width: 100%; height: 155px; object-fit: contain; background: #eff2f4; }
.parameter-model-image[hidden] { display: none; }
.parameter-model-name { font-size: 13px; text-align: center; margin-top: 8px; overflow-wrap: anywhere; }
.parameter-model-dimensions { font-size: 12px; color: #8b95a3; text-align: center; margin-top: 6px; }
.parameter-summary-note { font-size: 13px; color: #64748b; line-height: 1.6; margin: 14px 0; }
.parameter-original-total { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #dce2eb; padding-top: 12px; font-size: 14px; }
.parameter-original-total strong { color: #298dff; font-size: 20px; font-weight: 500; }
.parameter-price-pending { font-size: 12px; color: #f18a30; margin-top: 12px; }
.parameter-modal-summary .btn-primary { background: #3092ff; border-radius: 4px; margin-top: 14px; font-size: 14px; }
.parameter-modal-summary .btn-primary:disabled { background: #cbd5e1; color: #f8fafc; cursor: not-allowed; box-shadow: none; }
.parameter-cancel { display: block; background: transparent; border: 0; padding: 8px; margin: 2px auto 0; color: #8390a2; cursor: pointer; }
@media(max-width:800px) { .parameter-modal-layout { grid-template-columns: minmax(0,1fr); } .parameter-modal-main { padding: 12px; } .parameter-modal-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border-left: 0; border-top: 1px solid #e2e5eb; padding: 10px 12px; } .parameter-model-image, .parameter-summary-note, .parameter-model-dimensions { display: none; } .parameter-model-name { max-width: 32%; margin: 0; text-align: left; } .parameter-original-total { border: 0; padding: 0; gap: 10px; margin-left: auto; } .parameter-modal-summary .btn-primary { width: auto; margin: 0; padding: 10px 14px; } .parameter-cancel { margin: 0; } .parameter-price-pending { margin: 0; } .material-browser { grid-template-columns: 100px minmax(0,1fr); } .parameter-field-rows { gap: 8px; } .parameter-field-row > label { width: 100px; } }
/* 总价明细：跟随明细按钮显示的费用清单 */
.cost-detail-trigger { display: block; margin: 6px auto 0; padding: 0; border: 0; background: transparent; color: #298dff; font-family: inherit; font-size: 12px; cursor: pointer; }
.cost-detail-trigger:hover { text-decoration: underline; }
.cost-detail-trigger[hidden] { display: none; }
.manual-quote-hint { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; margin-right: 5px; border-radius: 50%; background: #298dff; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; vertical-align: middle; cursor: default; }
.manual-quote-hint:focus-visible { outline: 2px solid #298dff; outline-offset: 2px; }
.manual-quote-tooltip { position: fixed; z-index: 100001; box-sizing: border-box; max-width: calc(100vw - 24px); padding: 14px 16px; border: 1px solid #e8edf4; border-radius: 4px; background: #fff; color: #475569; font-size: 13px; font-weight: 400; line-height: 20px; pointer-events: none; box-shadow: 0 4px 12px rgba(30,64,110,.10); }
.manual-quote-tooltip::after { content: ''; position: absolute; left: var(--tooltip-arrow-left, 50%); bottom: -5px; width: 8px; height: 8px; background: #fff; border-right: 1px solid #e8edf4; border-bottom: 1px solid #e8edf4; transform: translateX(-50%) rotate(45deg); }
.manual-quote-tooltip[data-placement='below']::after { top: -5px; bottom: auto; transform: translateX(-50%) rotate(225deg); }
.quote-cost-popover { position: fixed; inset: auto; margin: 0; width: 320px; max-width: calc(100vw - 24px); max-height: none; padding: 0; border: 1px solid #e4eaf2; border-radius: 5px; background: #fff; color: #6b7280; box-shadow: 0 8px 28px rgba(30,64,110,.12); font-size: 13px; line-height: 1.5; overflow: visible; }
.quote-cost-popover::before { content: ''; position: absolute; top: 0; left: var(--cost-arrow-left, 24px); width: 8px; height: 8px; background: #fff; border-left: 1px solid #e4eaf2; border-top: 1px solid #e4eaf2; transform: translate(-50%, -50%) rotate(45deg); }
.quote-cost-popover.cost-popover-above::before { top: auto; bottom: 0; transform: translate(-50%, 50%) rotate(225deg); }
.cost-popover-heading { display: flex; justify-content: space-between; align-items: center; padding: 9px 18px; border-bottom: 1px solid #f0f3f7; }
.cost-popover-heading button { padding: 0 2px; border: 0; background: transparent; color: #9aa4b2; cursor: pointer; font-size: 15px; }
.cost-popover-quantity { padding: 6px 18px 0; color: #98a1ae; font-size: 11px; }
.cost-popover-items { margin: 0; padding: 5px 18px 8px; }
.cost-popover-items > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.cost-popover-items dd { margin: 0; font-variant-numeric: tabular-nums; }
.cost-popover-total { display: flex; justify-content: space-between; padding: 10px 18px 6px; border-top: 1px solid #f0f3f7; }
.cost-popover-total strong { color: #ff4d63; font-weight: 500; }
.cost-popover-notice { padding: 4px 18px 12px; color: #ff4d63; font-size: 12px; font-weight: 600; line-height: 1.5; }


#quantitySyncStatus { font-size: 12px; color: #7b8797; }
#quantitySyncStatus.quantity-save-error { color: #e34d59; }

#fileQuantityCell #quantitySyncStatus { display: block; margin-top: 8px; font-size: 11px; white-space: normal; }

.part-price-note { color: #8b95a3; font-size: 12px; margin-top: 8px; }

.whole-preview-entry { margin-top: 10px; margin-bottom: 8px; }
.part-quantity { display: inline-flex; align-items: stretch; height: 34px; }
.part-quantity button { width: 28px; border: 1px solid #dce2eb; background: #f7f9fc; color: #64748b; cursor: pointer; font-size: 16px; }
.part-quantity-input { width: 48px; min-width: 0; border: 1px solid #dce2eb; border-left: 0; border-right: 0; border-radius: 0; text-align: center; font-size: 13px; font-family: inherit; appearance: textfield; }
.part-quantity-input::-webkit-inner-spin-button, .part-quantity-input::-webkit-outer-spin-button { appearance: none; margin: 0; }

.parameter-save-status{margin-top:8px;font-size:12px;line-height:1.6;color:#64748b}.parameter-save-status .part-delete-button{padding:1px 7px;margin-left:4px}

.order-validation-error{margin:0 0 10px;color:#ef4444;font-size:13px;line-height:1.6;text-align:left}
.order-create-busy{position:fixed;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(15,23,42,.24);backdrop-filter:blur(3px);color:#1f2937}
.order-create-busy[hidden]{display:none!important}
.order-create-card{width:360px;max-width:100%;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;padding:34px 26px 28px;border:1px solid #e2e8f0;border-radius:18px;background:#fff;box-shadow:0 18px 64px rgba(15,23,42,.18);text-align:center;animation:order-create-appear .18s ease-out}
.order-create-card strong{margin-top:20px;font-size:19px;font-weight:600}
.order-create-card p{min-height:44px;margin:12px 0 16px;color:#64748b;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
.order-create-card small{margin-top:18px;color:#94a3b8;font-size:12px;line-height:1.6}
.order-create-spinner{display:block;width:46px;height:46px;border:4px solid #e6efff;border-top-color:#298dff;border-right-color:#90bfff;border-radius:50%;animation:order-create-spin .85s linear infinite}
.order-create-flow{position:relative;width:100%;height:4px;border-radius:4px;background:#edf3fc;overflow:hidden}
.order-create-flow:after{content:'';position:absolute;inset:0 auto 0 -40%;width:40%;border-radius:4px;background:linear-gradient(90deg,#93c5fd,#298dff);animation:order-create-flow 1.6s ease-in-out infinite}
@keyframes order-create-flow{to{left:100%}}
@keyframes order-create-appear{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.order-create-card{animation:none}.order-create-spinner{animation-duration:2s}.order-create-flow:after{animation:none;left:0;width:100%}}
@keyframes order-create-spin{to{transform:rotate(360deg)}}
.workspace-order-actions{display:flex;gap:10px;align-items:stretch}
.workspace-order-actions>button{flex:1;min-width:0;width:auto;margin:0}
.drawing-manual-price{display:inline-flex;align-items:center;white-space:nowrap;color:#298dff;font-weight:700}
.pdf-preview-link{padding:10px 16px;margin:0;text-align:right}
.file-data-row[data-drawing-unavailable="true"] .part-unit-price,
.file-data-row[data-drawing-unavailable="true"] .file-price>small,
.file-data-row[data-drawing-unavailable="true"] .part-total-price,
.file-data-row[data-drawing-unavailable="true"] .cost-detail-trigger,
.file-data-row[data-drawing-unavailable="true"] .part-rule-warning{display:none!important}

/* 兼容浏览器缓存的旧报价明细。 */
.cnc-time-summary { display: none !important; }

/* 旧报价缓存中的焊缝子项统一隐藏，费用仍计入加工费。 */
.cost-sheet-welding { display: none !important; }
