/* Dashboard price enquiry. All styles stay inside the widget or its dialogs. */
.qp-widget,.qp-dialog{--qp-bg:#18191c;--qp-line:#363638;--qp-muted:#a4a5aa;--qp-gold:#f0bd65;--qp-text:#f5f3ee;box-sizing:border-box;color:var(--qp-text);font:inherit}
.qp-widget *,.qp-dialog *{box-sizing:border-box}
.qp-widget [hidden],.qp-dialog [hidden]{display:none!important}
.qp-widget{background:var(--qp-bg);border:1px solid #64533a;border-radius:20px;overflow:hidden;margin-block:0 24px;box-shadow:0 12px 34px #0002;min-width:0;container:quick-price / inline-size}
.qp-widget button,.qp-widget input,.qp-widget select,.qp-dialog button{font:inherit}
.qp-widget button,.qp-dialog button{cursor:pointer}
.qp-widget button:disabled,.qp-dialog button:disabled{cursor:not-allowed;opacity:.5}
.qp-widget :focus-visible,.qp-dialog :focus-visible{outline:3px solid #f0bd6580;outline-offset:3px}
.qp-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:20px 24px 0}
.qp-title{margin:0;font-size:15px;font-weight:750;letter-spacing:.025em;color:var(--qp-gold)}
.qp-caption,.qp-hint,.qp-note,.qp-formula{color:var(--qp-muted);font-size:12px;line-height:1.6}
.qp-store{display:flex;align-items:center;gap:9px;min-width:0;font-size:12px;color:var(--qp-muted)}
.qp-store select{max-width:260px;min-width:0;border:1px solid #48494e;border-radius:8px;padding:6px 9px;color:var(--qp-text);background:#25262b}
.qp-form{display:flex;gap:10px;margin:0;padding:16px 24px 10px}
.qp-input-wrap{position:relative;flex:1;min-width:0;display:flex;align-items:center;border:1px solid #46464c;border-radius:11px;background:#111215}
.qp-input-wrap:focus-within{border-color:var(--qp-gold)}
.qp-input-wrap svg{width:19px;height:19px;flex-shrink:0;margin-inline-start:14px;color:var(--qp-muted)}
.qp-input{border:0;background:transparent!important;color:var(--qp-text)!important;padding:13px 12px;min-width:0;width:100%;font-size:14px!important;border-radius:11px;line-height:1.5;box-shadow:none!important}
.qp-input::placeholder{color:#a2a3aa;opacity:1}
.qp-button{border:1px solid #4b4b50;border-radius:10px;background:#27282d;color:var(--qp-text);padding:10px 15px;min-height:44px;font-size:13px!important;font-weight:650!important;display:inline-flex;justify-content:center;align-items:center;gap:8px;line-height:1.5;text-decoration:none}
.qp-button svg{width:19px;height:19px;flex-shrink:0}
.qp-primary{background:var(--qp-gold);border-color:var(--qp-gold);color:#251b0d}
.qp-button:hover:enabled{filter:brightness(1.12)}
.qp-hint{margin:0;padding:0 24px 17px}
.qp-search-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:0 24px 17px}
.qp-search-tools .qp-hint{flex:1;min-width:180px;padding:0}
.qp-search-tools .qp-button{font-size:12px;padding:8px 12px;white-space:normal}
@media(max-width:720px){.qp-search-tools{padding-inline:16px}}
.qp-message{margin:0 24px 18px;border-radius:10px;padding:11px 14px;border:1px solid #655335;background:#30261a;color:#f2d8af;font-size:13px;line-height:1.6;overflow-wrap:anywhere}
.qp-message[data-kind=loading]{border-color:#3e4857;background:#202732;color:#d6dfec}
.qp-result{border-top:1px solid var(--qp-line);padding:24px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:30px}
.qp-item{display:grid;grid-template-columns:100px minmax(0,1fr);gap:18px;align-items:center}
.qp-photo{width:100px;height:112px;border:1px solid #4b4030;border-radius:12px;background:radial-gradient(ellipse at 50% 30%,#403222,#201d19 75%);display:flex;align-items:center;justify-content:center;overflow:hidden;color:#b59b70}
.qp-photo img{width:100%;height:100%;object-fit:contain}
.qp-photo-button{padding:0}
.qp-widget .qp-photo-button:enabled,.qp-dialog .qp-photo-button:enabled{cursor:zoom-in}
.qp-photo-button:hover{border-color:var(--qp-gold)}
.qp-dialog.qp-photo-dialog{max-width:1000px;width:calc(100% - 28px)}
.qp-photo-dialog::backdrop{background:#000c}
.qp-photo-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}
.qp-photo-dialog .qp-photo-heading h2{margin:0}
.qp-photo-full{display:block;width:100%;height:auto;max-height:calc(100dvh - 160px);object-fit:contain;border-radius:10px}
.qp-photo svg{width:44px;height:44px}
.qp-item h3,.qp-customer-name{font-size:22px;font-weight:700;line-height:1.35;overflow-wrap:anywhere;margin:7px 0}
.qp-item p{margin:0}
.qp-status{display:inline-flex;border-radius:20px;padding:3px 9px;font-size:11px;font-weight:600;background:#25362c;color:#a4e5be}
.qp-status[data-available=false]{background:#45331e;color:#f4d19a}
.qp-attributes{display:flex;gap:7px;flex-wrap:wrap;margin-block-start:10px}
.qp-pill{border:1px solid #46433d;border-radius:6px;padding:3px 8px;font-size:12px;line-height:1.5;color:#e1d8c9;overflow-wrap:anywhere}
.qp-ids{display:grid;grid-template-columns:1fr 1fr;gap:14px 10px;background:#111315;border-radius:11px;margin:18px 0 0;padding:14px}
.qp-ids dt{color:var(--qp-muted);font-size:11px;margin-bottom:4px}
.qp-ids dd{font-size:13px;margin:0;overflow-wrap:anywhere;unicode-bidi:plaintext}
.qp-wide{grid-column:1/-1}
.qp-quote{border-inline-start:1px solid var(--qp-line);padding-inline-start:28px;min-width:0}
.qp-price-label{margin:0;color:var(--qp-muted);font-size:12px}
.qp-total{font-size:clamp(29px,4vw,46px);line-height:1.25;font-weight:750;color:var(--qp-gold);margin:5px 0;letter-spacing:-.035em;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.qp-total small{font-size:14px;letter-spacing:0;font-weight:500;margin-inline-start:4px}
.qp-fresh{color:var(--qp-muted);font-size:11px;line-height:1.6;margin:9px 0 16px;overflow-wrap:anywhere}
.qp-breakdown{border-top:1px solid var(--qp-line);padding-top:14px;display:grid;gap:13px}
.qp-row{display:flex;align-items:start;justify-content:space-between;gap:12px;font-size:13px;line-height:1.55}
.qp-row p{margin:0}
.qp-row strong{font-size:13px;white-space:nowrap;font-variant-numeric:tabular-nums;font-weight:650}
.qp-formula{display:block;font-size:11px;unicode-bidi:plaintext}
.qp-actions{display:flex;gap:9px;margin-top:20px;flex-wrap:wrap}
.qp-actions button{flex:1}
.qp-note{font-size:11px;margin:12px 0 0}
.qp-unavailable,.qp-stale{font-size:12px;line-height:1.6;border:1px solid #6d512f;background:#33271b;border-radius:9px;padding:11px;color:#f4d4a8;margin-block:14px 0}
.qp-private{border:1px solid #584930;background:#211c16;padding:12px 14px;margin-top:18px;border-radius:10px}
.qp-private summary{cursor:pointer;color:#e0c18e;font-size:12px;font-weight:650;min-height:25px}
.qp-private .qp-row{margin-top:13px}
.qp-private small{display:block;margin-top:12px;color:var(--qp-muted);font-size:11px;line-height:1.6}
.qp-pieces{margin-block:14px 0;font-size:12px;color:var(--qp-muted)}
.qp-pieces summary{cursor:pointer;padding:4px 0}
.qp-pieces ul{padding-inline-start:18px;margin:6px 0;line-height:1.8}
.qp-matches{border-top:1px solid var(--qp-line);padding:18px 24px 24px}
.qp-matches h3{font-size:14px;font-weight:650;margin:0 0 12px}
.qp-match-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.qp-match{display:flex;align-items:center;gap:12px;text-align:start;justify-content:flex-start;min-width:0;padding:12px}
.qp-match .qp-photo{height:62px;width:58px;flex-shrink:0;border-radius:8px}
.qp-match-info{min-width:0;display:grid;gap:3px;font-size:12px;font-weight:400;overflow-wrap:anywhere}
.qp-match-info strong{font-size:14px;font-weight:650}
.qp-match-info small{color:var(--qp-muted);font-size:11px}
.qp-recent{border-top:1px solid var(--qp-line);padding:12px 24px;display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.qp-recent>span{color:var(--qp-muted);font-size:11px}
.qp-recent button{border:1px solid #45454a;background:#232429;color:#d3c8b6;border-radius:7px;padding:7px 10px;font-size:11px;min-height:34px;max-width:100%;overflow-wrap:anywhere}
.qp-dialog{margin:auto;max-width:510px;width:calc(100% - 28px);max-height:calc(100dvh - 28px);overflow:auto;background:#17191c;border:1px solid #75603c;padding:25px;border-radius:20px;box-shadow:0 18px 80px #0008}
.qp-dialog::backdrop{background:#090a0d}
.qp-dialog h2{font-size:21px;font-weight:700;line-height:1.4;margin:0 0 7px}
.qp-dialog .qp-caption{margin:0 0 15px}
.qp-camera-reader{width:100%;overflow:hidden;min-height:220px;border-radius:10px;background:#0e1012;margin:16px 0}
.qp-camera-reader video{display:block;width:100%;max-height:60dvh;object-fit:contain}
.qp-camera-dialog{padding:16px;max-width:700px}
.qp-camera-message{font-size:13px;color:#f2d8af;line-height:1.7;margin-block:12px}
.qp-camera-dialog .qp-button{width:100%}
.qp-customer-dialog{max-width:580px;text-align:center;padding:30px}
.qp-customer-dialog .qp-photo{margin:15px auto;width:115px;height:125px}
.qp-customer-dialog .qp-breakdown{text-align:start;margin-top:22px}
.qp-customer-dialog .qp-total{font-size:clamp(32px,7vw,52px);margin-block:18px 10px}
.qp-customer-dialog .qp-button{margin-top:22px;width:100%}
.qp-customer-dialog .qp-customer-name{margin:12px 0 8px}
.qp-customer-serial{font-size:12px;color:var(--qp-muted);overflow-wrap:anywhere;margin-block:7px}
.qp-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:720px){.qp-head{padding:17px 16px 0}.qp-form{padding:14px 16px 10px;flex-wrap:wrap}.qp-input-wrap{flex-basis:100%}.qp-form>.qp-button{flex:1}.qp-hint{padding:0 16px 15px;font-size:11px}.qp-caption{font-size:11px}.qp-store{width:100%;justify-content:space-between}.qp-store select{flex:1;max-width:none}.qp-message{margin:0 16px 16px}.qp-result{grid-template-columns:1fr;padding:20px 16px;gap:22px}.qp-quote{border-inline-start:0;padding-inline-start:0;border-top:1px solid var(--qp-line);padding-top:20px}.qp-item{grid-template-columns:85px minmax(0,1fr);gap:13px}.qp-photo{width:85px;height:100px}.qp-item h3{font-size:21px}.qp-total{font-size:40px}.qp-recent{padding:12px 16px}.qp-matches{padding:18px 16px}.qp-match-list{grid-template-columns:1fr}.qp-dialog{padding:22px 17px}.qp-customer-dialog .qp-row{font-size:12px}.qp-row strong{font-size:12px}.qp-widget{border-radius:17px}.qp-actions button{padding-inline:10px}}
@media(prefers-reduced-motion:reduce){.qp-widget *,.qp-dialog *{scroll-behavior:auto!important}}

/* Dashboard cards can be narrow even on a wide screen. Lay out the result
   from the card's available width so prices and item names remain readable. */
@container quick-price (max-width:720px){
  .qp-result{grid-template-columns:1fr;padding:20px 16px;gap:22px}
  .qp-quote{border-inline-start:0;padding-inline-start:0;border-top:1px solid var(--qp-line);padding-top:20px}
  .qp-item{grid-template-columns:85px minmax(0,1fr);gap:13px}
  .qp-photo{width:85px;height:100px}
  .qp-match-list{grid-template-columns:1fr}
}

/* The labor box: press and hold shows the rate. No text selection or long-press menu on touch. */
.qp-pill.qp-hold{cursor:pointer;user-select:none;-webkit-user-select:none;touch-action:none;min-width:2.2em;text-align:center}
.qp-pill.qp-hold[data-held]{background:#3b2f14;border-color:#b8861f;color:#f5d68a}
.qp-pill.qp-warn{border-color:#b45309;color:#fbbf24;font-weight:700}
.qp-pill.qp-acq[data-acq=cust]{border-color:#1d4ed8;color:#93c5fd}
.qp-pill.qp-acq[data-acq=new]{border-color:#047857;color:#6ee7b7}

/* Lending a piece out at the counter. Purple to match the consignment portal,
   so the button does not read as another way to sell. */
.qp-lend-button{border-color:#7e5bb8;color:#d9c4f2;background:#2b2138}
.qp-lend-dialog .qp-ids{margin:14px 0 16px}
.qp-lend-dialog .qp-message{margin:0 0 16px}
.qp-lend-wide{width:100%;margin-top:12px}
.qp-lend-manual{margin-top:16px}
.qp-lend-manual summary{color:#c7b7e6}
.qp-lend-label{display:block;font-size:12px;color:var(--qp-muted);margin-top:13px;line-height:1.7}
.qp-lend-label small{color:#7f8087}
.qp-lend-label input,.qp-lend-label select{display:block;width:100%;margin-top:5px;min-height:44px;border:1px solid #46464c;border-radius:10px;background:#111215;color:var(--qp-text);padding:10px 12px;font-size:14px}
.qp-lend-label input:focus,.qp-lend-label select:focus{border-color:var(--qp-gold);outline:none}
.qp-lend-rates{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.qp-lend-fixed{font-size:13px;line-height:1.7;margin:0 0 4px;color:var(--qp-muted)}
.qp-lend-fixed strong{color:var(--qp-text)}
@media(max-width:720px){.qp-lend-rates{grid-template-columns:1fr}}
