/* Vendor Mode is a focused capture workflow, not a second copy of the full scanner. */
.card-show-active .card-show-actions [data-show-view]{display:none}
.card-show-active .card-show-actions{grid-template-columns:repeat(5,minmax(0,1fr))}
.card-show-active .card-show-actions .vendor-transaction-open span{display:flex;align-items:center;justify-content:center;gap:5px}
.card-show-active .card-show-actions .vendor-transaction-open small{display:grid;place-items:center;min-width:32px;height:24px;padding:0 7px;border-radius:999px;background:#2e2e2e;color:#ddd;font-size:.7rem;font-variant-numeric:tabular-nums}
.card-show-active .card-show-actions .vendor-transaction-open.active small{background:#3a3a3a;color:#ddd}.card-show-active .card-show-actions .vendor-transaction-open.active small.has-value{background:#ff4054;color:#fff}
.card-show-active .card-show-actions .vendor-transaction-open[data-vendor-mode="sell"].active{border-color:#48bc85;background:#10251c}
.card-show-active .card-show-actions .vendor-transaction-open[data-vendor-mode="sell"] small.has-value,
.card-show-active .card-show-actions .vendor-transaction-open[data-vendor-mode="sell"].active small.has-value{background:#25895b;color:#fff}
.card-show-active #live-pricing>.workspace-tabs,
.card-show-active #live-pricing>.scan-history,
.card-show-active #live-pricing .category-choice,
.card-show-active #live-pricing .tool-tabs,
.card-show-active #live-pricing .scan-mode-tabs,
.card-show-active #scan-panel>.second-photo,
.card-show-active #scan-panel>#identify-card{display:none!important}
.card-show-active #live-pricing .finder-panel{padding-top:26px}
.card-show-active #scan-panel{padding-top:0}

/* The Totals toolbar tab is a report-only view. */
.vendor-cart-dialog.vendor-report-view{position:fixed;inset:0;width:min(94vw,680px);height:max-content;min-height:0;max-height:calc(100dvh - 24px);margin:auto;overflow-y:auto}
body:has(.vendor-cart-dialog[open]){overflow:hidden}
.vendor-cart-dialog:not(.vendor-tools-view)>.vendor-plus-tools{display:none!important}
.vendor-cart-dialog.vendor-tools-view>*:not(.vendor-cart-head):not(.vendor-plus-tools){display:none!important}.vendor-cart-dialog.vendor-tools-view>.vendor-plus-tools{display:block;margin:0;padding:18px}.vendor-cart-dialog.vendor-tools-view>.vendor-plus-tools>details{border:0;background:transparent}.vendor-cart-dialog.vendor-tools-view>.vendor-plus-tools>details>summary{display:none}
.vendor-cart-dialog.vendor-tools-view[open]{position:fixed;inset:12px;display:grid;grid-template-rows:auto minmax(0,1fr);width:min(calc(100vw - 24px),880px);height:min(760px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);margin:auto;overflow:hidden;overscroll-behavior:none}
.vendor-cart-dialog.vendor-tools-view>.vendor-cart-head{position:relative;top:auto}
.vendor-cart-dialog.vendor-tools-view>.vendor-plus-tools{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.vendor-report-view>.vendor-cart-head{position:absolute;top:12px;right:12px;padding:0;border:0;background:transparent}
.vendor-report-view>.vendor-cart-head>div{display:none}
.vendor-report-view>.vendor-mode-tabs,
.vendor-report-view>.vendor-totals,
.vendor-report-view>.vendor-cart-items,
.vendor-report-view>.vendor-cart-footer,
.vendor-report-view>.vendor-more{display:none!important}
.vendor-report-view>.vendor-show-report{display:block;margin:0;border:0;background:#0b0b0b}
.vendor-report-view>.vendor-show-report>summary{display:none}
.vendor-report-back{display:none}
.vendor-report-view>.vendor-show-report>.vendor-report-back{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:center;width:calc(100% - 24px);min-height:50px;margin:12px;border-color:#4b4b4b;background:#181818;color:#fff;font-size:.95rem;font-weight:900;box-shadow:0 8px 20px rgba(0,0,0,.45)}
.vendor-report-view>#vendor-show-report>#vendor-report-stats{margin-top:12px}
.vendor-cart-dialog:not(.vendor-report-view)>.vendor-show-report{display:none!important}

@media(max-width:760px){
  .vendor-cart-dialog.vendor-report-view{width:calc(100vw - 24px);max-height:calc(100dvh - 24px);border-radius:18px}
  .vendor-report-view.vendor-cart-empty-state{min-height:0}
  .vendor-report-view>.vendor-show-report{margin-inline:0}
}

@media(max-width:760px){
  .card-show-active{padding-top:126px!important}
  .card-show-active .card-show-toolbar{grid-template-columns:minmax(0,1fr) auto;align-items:stretch;padding:8px;gap:8px}
  .card-show-active .card-show-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
  .card-show-active .card-show-actions button{gap:3px;min-height:48px;padding-inline:7px}
  .card-show-active .card-show-actions button b{display:none}
  .card-show-active .card-show-exit{grid-column:2;grid-row:1;min-height:103px;padding-inline:12px}
}

/* The vendor toolbar replaces the app header in standalone mode. Keep its
   first row clear of the iPhone status bar and move the scan panel with it. */
@media (display-mode:standalone) and (max-width:760px){
  .card-show-active{padding-top:calc(126px + max(44px, env(safe-area-inset-top)))!important}
  .card-show-active .card-show-toolbar{padding-top:calc(8px + max(44px, env(safe-area-inset-top)))}
  .vendor-cart-dialog.vendor-report-view[open]{
    top:max(44px, env(safe-area-inset-top));
    bottom:auto;
    max-height:calc(100dvh - max(44px, env(safe-area-inset-top)) - 12px);
    margin:0 auto;
  }
  .vendor-cart-dialog.vendor-tools-view[open]{
    top:max(44px, env(safe-area-inset-top));
    bottom:12px;
    height:calc(100dvh - max(44px, env(safe-area-inset-top)) - 12px);
    max-height:calc(100dvh - max(44px, env(safe-area-inset-top)) - 12px);
    margin:0 auto;
  }
}

/* Keep the active transaction compact and its primary action within easy reach. */
.vendor-negotiator>summary{cursor:pointer;list-style:none}
.vendor-negotiator>summary::-webkit-details-marker{display:none}
.vendor-negotiator>summary::after{content:'＋';color:#ff7182;font-size:1.15rem;font-weight:500}
.vendor-negotiator[open]>summary::after{content:'−'}
.vendor-negotiator-body{padding-top:1px}
.vendor-negotiator-body>button{width:100%;min-height:46px;margin-top:12px;border:1px solid #4a4a4a;border-radius:10px;background:#1b1b1b;color:#fff;font-weight:850}

@media(max-width:760px){
  .vendor-cart-dialog:not(.vendor-report-view){height:min(92dvh,760px);max-height:92dvh;overflow-y:auto;overscroll-behavior:contain}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-head{padding:10px 12px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-head strong{font-size:1.05rem}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-head small{font-size:.72rem}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-head>div:first-child{min-width:0}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-head-actions{flex:0 0 auto;gap:8px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-head .vendor-clear-current{width:auto;min-width:64px;height:40px;padding:0 12px;white-space:nowrap}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) #vendor-cart-close{flex:0 0 40px;width:40px;height:40px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-mode-tabs{gap:6px;padding:8px 12px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-mode-tabs button{min-height:40px}

  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-totals{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0 12px 8px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-totals>div{min-width:0;padding:9px 8px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-totals>div:last-child{grid-column:auto}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-totals span{font-size:.65rem;white-space:nowrap}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-totals strong{margin-top:3px;font-size:1.05rem;white-space:nowrap}

  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-lot-summary{align-items:center;flex-direction:row;gap:8px;margin:0 12px 8px;padding:8px 10px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-lot-summary>div:first-child{gap:1px;min-width:0}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-lot-summary>div:first-child>span{font-size:.6rem}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-lot-summary>div:first-child>strong{font-size:.88rem}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-lot-summary>div:first-child>small{font-size:.7rem}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-lot-categories{margin-left:auto;justify-content:flex-end}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-lot-categories span{padding:4px 7px;font-size:.65rem}

  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-items{max-height:none;padding:0 12px 8px;overflow:visible}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-item{grid-template-columns:56px repeat(2,minmax(0,1fr));gap:7px;padding:10px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-item>div{padding-right:40px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-item label:nth-of-type(3){grid-column:auto}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-item input,
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-item select{min-height:40px;padding-inline:8px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-item>button{right:9px;top:9px;width:38px;height:38px}

  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-footer{position:sticky;bottom:0;z-index:4;grid-template-columns:minmax(78px,.55fr) minmax(0,1.45fr);gap:7px;padding:9px 12px calc(9px + env(safe-area-inset-bottom));border-top:1px solid #292929;background:rgba(10,10,10,.96);box-shadow:0 -12px 28px rgba(0,0,0,.55);backdrop-filter:blur(14px)}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-cart-footer button{min-height:48px}

  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-deal-guard{margin:8px 12px 0;padding:10px 11px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-deal-guard ul{gap:5px;margin-top:7px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-deal-guard li{padding:7px 9px;font-size:.78rem}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-negotiator{margin:8px 12px;padding:11px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-negotiator-grid{gap:6px;margin-top:9px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-negotiator-grid>div{padding:8px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-negotiator-grid strong{font-size:.92rem}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-more{margin-top:8px}
  .vendor-cart-dialog.vendor-tools-view[open]{inset:8px;width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:16px;margin:auto}
  .vendor-cart-dialog.vendor-tools-view>.vendor-plus-tools{padding:10px}
  .vendor-cart-dialog.vendor-tools-view .vendor-plus-grid{gap:8px;padding:0}
  .vendor-cart-dialog.vendor-tools-view .vendor-plus-grid>section{padding:12px}
}

.vendor-rules-help{margin:0;padding:0 14px 14px;color:#aaa;font-size:.875rem;line-height:1.5}
@media(max-width:560px){
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-lot-summary{padding:0;display:block}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-lot-summary>summary{padding:8px 10px}
  .vendor-cart-dialog:not(.vendor-cart-empty-state) .vendor-lot-categories{margin-left:0;justify-content:flex-start}
}

/* Keep show completion reachable while the report scrolls on mobile. */
.vendor-report-toolbar{display:none}
.vendor-report-view .vendor-report-toolbar{position:sticky;top:0;z-index:4;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:12px 0;background:#0b0b0b}
.vendor-report-view .vendor-report-toolbar button{display:flex;align-items:center;justify-content:center;width:100%;min-height:50px;margin:0;padding:10px;font-size:1rem;line-height:1.3}
.vendor-report-view .vendor-report-toolbar .vendor-finalize-show{border-color:#ff4054;background:#e3182d;color:#fff}
.vendor-report-view .vendor-report-toolbar .vendor-report-back{border-color:#4b4b4b;background:#181818;color:#fff}
.vendor-report-view .vendor-show-actions{grid-template-columns:1fr}
.vendor-cart-dialog.vendor-report-view{scroll-padding-top:90px;padding-bottom:env(safe-area-inset-bottom)}

/* Keep booth tools below mobile system chrome, including standalone apps. */
@media(max-width:760px){
 .vendor-cart-dialog.vendor-tools-view[open]{top:max(60px,env(safe-area-inset-top));right:8px;bottom:max(12px,env(safe-area-inset-bottom));left:8px;margin:0 auto;width:calc(100vw - 16px);height:calc(100dvh - max(60px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)));max-height:calc(100dvh - max(60px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom)))}
}
