.qd-overlay{position:fixed;inset:0;z-index:1200;background:rgba(15,23,42,.48);display:flex;align-items:center;justify-content:center;padding:24px;color:#20364d}
.qd-dialog{width:min(1080px,100%);max-height:calc(100dvh - 48px);display:flex;flex-direction:column;background:#fff;border-radius:12px;box-shadow:0 18px 60px #0f172a33;overflow:hidden}
.qd-header{display:flex;justify-content:space-between;align-items:center;padding:18px 24px;border-bottom:1px solid #dde5ee;flex-shrink:0}
.qd-header h2{font-size:20px;margin:0;flex:1;min-width:0}.qd-header button{width:auto;flex:none;margin:0 0 0 16px;padding:8px 16px;background:#fff;color:#334155;border:1px solid #cbd5e1;border-radius:6px}.qd-body{overflow:auto;padding:20px 24px;overscroll-behavior:contain;line-height:1.65}.qd-version{display:flex;gap:10px;align-items:center;justify-content:flex-end;font-size:13px}.qd-version select{width:auto;max-width:230px;margin:0}
.qd-summary{display:flex;justify-content:space-between;gap:24px;align-items:center;margin:16px 0 20px}.qd-summary h3{margin:0;font-size:19px;overflow-wrap:anywhere}.qd-summary p{margin:6px 0 0;color:#64748b;font-size:13px}.qd-summary>strong{font-size:24px;white-space:nowrap;color:#0f766e;font-variant-numeric:tabular-nums}
.qd-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px 24px;margin:0;padding-bottom:8px}.qd-meta dt{font-size:12px;color:#64748b;margin:0 0 3px}.qd-meta dd{margin:0;overflow-wrap:anywhere;white-space:pre-wrap;font-size:14px}.qd-section{border-top:1px solid #e2e8f0;margin-top:22px;padding-top:18px}.qd-section h4{margin:0 0 12px;font-size:15px}.qd-table-wrap{overflow:auto;border:1px solid #dde5ee;border-radius:6px}.qd-lines{width:100%;border-collapse:collapse;font-size:13px;min-width:600px}.qd-lines th{background:#f4f7fa;color:#52657a;text-align:left;font-weight:500}.qd-lines th,.qd-lines td{padding:10px 12px;border-bottom:1px solid #e2e8f0;white-space:nowrap}.qd-lines td:first-child{min-width:170px;white-space:normal;overflow-wrap:anywhere}.qd-lines td small{display:block;color:#64748b}.qd-lines tr:last-child td{border-bottom:0}.qd-lines td.qd-line-note{white-space:pre-wrap;min-width:120px;max-width:280px;overflow-wrap:anywhere}.qd-totals{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:12px 24px;padding:14px 0 0;font-size:13px}.qd-totals b{padding-left:6px;font-variant-numeric:tabular-nums}.qd-prose{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}.qd-scope{padding-top:18px;grid-template-columns:repeat(2,minmax(0,1fr))}.qd-section summary{cursor:pointer;font-weight:600;font-size:14px}.qd-attachments{padding-left:20px;margin:0;font-size:13px}.qd-muted,.qd-origin{color:#64748b;font-size:13px}.qd-notice{padding:16px;background:#fff7e6;border:1px solid #f0d4a0;border-radius:6px;margin:16px 0}.qd-loading{padding:60px 0;text-align:center;color:#64748b}
@media(max-width:700px){.qd-overlay{padding:8px}.qd-dialog{max-height:calc(100dvh - 16px)}.qd-header{padding:14px 16px}.qd-body{padding:16px}.qd-meta{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.qd-summary{align-items:flex-start;flex-direction:column;gap:8px}.qd-summary h3{font-size:17px}.qd-summary>strong{font-size:22px}.qd-totals{justify-content:flex-start}.qd-scope{grid-template-columns:1fr}}
.qd-extra-charge{margin-top:16px;padding:14px 16px;border:1px solid #dbe4ef;border-radius:6px;background:#f6f8fc;font-size:13px}.qd-extra-heading,.qd-extra-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.qd-extra-heading{justify-content:space-between}.qd-extra-heading strong{font-size:14px;margin-right:12px}.qd-extra-heading span{color:#64748b}.qd-extra-actions button,.qd-extra-charge>button{width:auto;margin:0;padding:6px 10px;font-size:13px;border-radius:6px}.qd-extra-form{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;margin-top:12px}.qd-extra-context,.qd-extra-note,.qd-extra-footer{grid-column:1/-1}.qd-extra-context{margin:0;color:#52657a;overflow-wrap:anywhere}.qd-extra-form label{font-size:13px;font-weight:400}.qd-extra-form input{display:block;width:100%;box-sizing:border-box;height:34px;margin-top:5px;font-size:13px;background:#fff;border:1px solid #cddbec;border-radius:5px;padding:6px 10px}.qd-extra-form input:disabled{background:#f1f4f8}.qd-extra-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px}.qd-extra-footer span{color:#64748b;margin-right:auto}.qd-extra-footer button{width:auto;margin:0;padding:7px 12px;font-size:13px;border-radius:6px}.qd-extra-message{margin:10px 0 0;color:#245784}.qd-extra-message.is-error{color:#a64219}

/* Quotation details stay compact while long content scrolls inside the dialog. */
.qd-dialog{min-height:0}.qd-header{padding:12px 18px}.qd-header h2{font-size:16px}.qd-body{padding:14px 18px;min-height:0}.qd-summary{margin:0 0 14px;gap:16px}.qd-summary h3{font-size:17px}.qd-summary-tools{display:flex;align-items:center;gap:18px;flex-shrink:0}.qd-summary-tools>strong{font-size:22px;color:#0f766e;white-space:nowrap;font-variant-numeric:tabular-nums}.qd-version{gap:6px;white-space:nowrap}.qd-version select{height:34px;font-size:13px}.qd-meta{gap:10px 20px}.qd-section{margin-top:16px;padding-top:14px}.qd-section h4{margin-bottom:8px}.qd-lines tbody tr:nth-child(even){background:#f8fafc}.qd-lines th,.qd-lines td{padding:8px 10px;vertical-align:top}.qd-lines td:not(:first-child):not(.qd-line-note){font-variant-numeric:tabular-nums}.qd-totals{padding-top:10px}.qd-attachments{list-style:none;padding:0;display:grid;gap:8px}.qd-attachments li{padding:9px 12px;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc}.qd-attachments li>strong{font-weight:500;margin-right:10px}.qd-attachments p{margin:4px 0 0}.qd-attachment-files{display:flex;gap:8px;align-items:flex-start;flex-wrap:wrap;margin-top:8px}.qd-attachment-files>button{width:auto;max-width:100%;margin:0;white-space:normal;overflow-wrap:anywhere;padding:6px 10px;border:1px solid #cfdaed;border-radius:6px;background:#fff;color:#175bc2}.qd-image-preview{max-width:100%;flex-basis:100%}.qd-image-preview summary{font-size:13px;font-weight:400;color:#1d4ed8}.qd-image-preview img{display:block;max-width:100%;max-height:340px;object-fit:contain;margin-top:8px}.qd-body :focus-visible{outline:2px solid #2563eb;outline-offset:2px}
@media(max-width:800px){.qd-summary{align-items:flex-start;flex-direction:column;gap:8px}.qd-summary-tools{width:100%;justify-content:space-between;gap:12px}.qd-version select{max-width:180px}.qd-summary-tools>strong{font-size:20px}}
