:root {
  --qb-canvas: #f5f4f1;
  --qb-surface: #fff;
  --qb-inset: #f3f2ef;
  --qb-ink: #171717;
  --qb-secondary: #5e5a54;
  --qb-muted: #74716b;
  --qb-quiet: #9a958d;
  --qb-border: #e4e2de;
  --qb-border-strong: #cbc8c1;
  --qb-success-bg: #e7f4e8;
  --qb-success: #27632c;
  --qb-warning-bg: #fff3cd;
  --qb-warning-border: #dbc36d;
  --qb-warning: #6d5200;
  --qb-danger-bg: #fee8e7;
  --qb-danger-border: #e2aaa8;
  --qb-danger: #a4262c;
  --qb-focus: rgba(64, 105, 225, .28);
  --qb-radius: 8px;
  --qb-header-height: 64px;
  --qb-cart-height: 64px;
}

.qb-app, .qb-app * { box-sizing: border-box; }
.qb-app [hidden] { display: none !important; }
.qb-app {
  width: 100%; height: 100dvh; margin: 0; overflow: hidden;
  background: var(--qb-canvas); color: var(--qb-ink);
  font: 13px/1.4 Inter, "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}
.qb-app button, .qb-app input, .qb-app textarea, .qb-app select { font: inherit; color: inherit; }
.qb-app button, .qb-app select { cursor: pointer; }
.qb-app button:focus-visible, .qb-app input:focus-visible, .qb-app textarea:focus-visible,
.qb-app select:focus-visible, .qb-app [tabindex]:focus-visible, .qb-app a:focus-visible {
  outline: 3px solid var(--qb-focus); outline-offset: 1px;
}
.qb-app button:disabled { cursor: not-allowed; opacity: .48; }
.qb-app h1, .qb-app h2, .qb-app p { margin: 0; }
.qb-app a { color: inherit; }
.qb-icon {
  width: 16px; height: 16px; display: inline-block; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.qb-icon-sm { width: 14px; height: 14px; }
.qb-icon-lg { width: 19px; height: 19px; }
.qb-spinner { animation: qb-spin .8s linear infinite; }
@keyframes qb-spin { to { transform: rotate(360deg); } }
.qb-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.qb-header {
  height: var(--qb-header-height); display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: var(--qb-surface); border-bottom: 1px solid var(--qb-border); position: relative; z-index: 40;
}
.qb-brand { width: 248px; display: flex; align-items: center; gap: 10px; text-decoration: none; flex: 0 0 auto; }
.qb-brand img { object-fit: contain; }
.qb-brand span, .qb-header-field span { min-width: 0; display: grid; }
.qb-brand b { font-size: 16px; letter-spacing: -.02em; }
.qb-brand small { color: var(--qb-muted); font-size: 11px; }
.qb-header-picker, .qb-profile-picker, .qb-head-actions { position: relative; }
.qb-header-field {
  width: 314px; height: 42px; border: 1px solid var(--qb-border-strong); border-radius: var(--qb-radius);
  background: #fff; display: flex; align-items: center; gap: 10px; padding: 0 11px; text-align: left;
}
.qb-version-field { width: 230px; }
.qb-header-field span { flex: 1; }
.qb-header-field small { color: var(--qb-muted); font-size: 9px; text-transform: uppercase; letter-spacing: .04em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-header-field .qb-deal-metadata { text-transform: none; }
.qb-header-field b { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.qb-button, .qb-icon-button, .qb-rail-button {
  border: 1px solid var(--qb-border-strong); background: #fff; border-radius: var(--qb-radius);
  min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.qb-button { padding: 0 12px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.qb-button:hover, .qb-icon-button:hover, .qb-rail-button:hover { background: var(--qb-inset); }
.qb-button.qb-primary { background: #111; color: #fff; border-color: #111; }
.qb-button.qb-primary:hover { background: #292929; }
.qb-button.qb-danger { color: var(--qb-danger); border-color: #ddb7b4; }
.qb-button.qb-success { color: var(--qb-success); background: var(--qb-success-bg); border-color: #b8d8ba; }
.qb-icon-button { width: 36px; padding: 0; position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip); position: absolute; z-index: 220; top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%); background: #222; color: #fff; padding: 5px 7px; border-radius: 5px;
  white-space: nowrap; font-size: 10px; pointer-events: none; opacity: 0; visibility: hidden;
}
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after { opacity: 1; visibility: visible; }

.qb-menu {
  position: absolute; z-index: 180; top: calc(100% + 6px); min-width: 100%; padding: 7px;
  border: 1px solid var(--qb-border-strong); border-radius: 9px; background: #fff;
  box-shadow: 0 12px 30px rgba(23, 23, 23, .16);
}
.qb-menu[hidden] { display: none; }
.qb-deal-menu { width: 390px; left: 0; }
.qb-version-menu { width: 300px; left: 0; max-height: 360px; overflow: auto; }
.qb-profile-menu { right: 0; min-width: 230px; }
.qb-menu-status { padding: 8px 10px 5px; color: var(--qb-muted); font-size: 10px; }
.qb-options { max-height: 286px; overflow: auto; }
.qb-option, .qb-menu-action {
  width: 100%; min-height: 40px; border: 0; border-radius: 6px; background: transparent;
  display: flex; align-items: center; gap: 9px; padding: 7px 9px; text-align: left;
}
.qb-option:hover, .qb-option.active, .qb-menu-action:hover { background: var(--qb-inset); }
.qb-option[aria-selected="true"] { box-shadow: inset 2px 0 var(--qb-ink); }
.qb-option-copy { min-width: 0; flex: 1; display: grid; }
.qb-option-copy b { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-option-copy small { color: var(--qb-muted); font-size: 9px; }
.qb-profile-copy { display: grid; gap: 2px; padding: 8px 9px 10px; border-bottom: 1px solid var(--qb-border); margin-bottom: 4px; }
.qb-profile-copy b { font-size: 12px; }
.qb-profile-copy small { color: var(--qb-muted); overflow: hidden; text-overflow: ellipsis; }

.qb-search-field {
  height: 36px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--qb-border-strong);
  border-radius: var(--qb-radius); background: var(--qb-inset); color: var(--qb-muted); padding: 0 10px;
}
.qb-search-field input { min-width: 0; width: 100%; height: 100%; border: 0; outline: 0; background: transparent; }
.qb-search-field:focus-within { box-shadow: 0 0 0 3px var(--qb-focus); border-color: #738de1; }
.qb-select-field, .qb-sort-field {
  height: 34px; border: 1px solid var(--qb-border); border-radius: 6px; background: #fff;
  display: flex; align-items: center; gap: 7px; padding: 0 8px; color: var(--qb-secondary);
}
.qb-select-field select, .qb-sort-field select { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; }

.qb-view-tab, .qb-conversation-tab {
  border: 0; border-bottom: 2px solid transparent; background: transparent; white-space: nowrap;
}
.qb-view-tab.active, .qb-conversation-tab.active {
  color: var(--qb-ink); border-bottom-color: var(--qb-ink); font-weight: 700;
}
.qb-state-icon {
  width: 24px; height: 24px; border-radius: 6px; display: inline-grid; place-items: center;
  background: var(--qb-inset); color: var(--qb-secondary); flex: 0 0 auto;
}
.qb-state-icon.qb-success { background: var(--qb-success-bg); color: var(--qb-success); }
.qb-state-icon.qb-warning { background: var(--qb-warning-bg); color: var(--qb-warning); }
.qb-state-icon.qb-danger { background: var(--qb-danger-bg); color: var(--qb-danger); }
.qb-requirement-state { margin-top: 5px; font-size: 10px; color: var(--qb-muted); }
.qb-requirement-state.qb-success { color: var(--qb-success); }
.qb-requirement-state.qb-warning { color: var(--qb-warning); }
.qb-requirement-state.qb-danger { color: var(--qb-danger); }

.qb-view-tabs { height: 44px; display: flex; align-items: stretch; gap: 15px; }
.qb-view-tab { height: 44px; padding: 0 4px; }
.qb-catalogue-search { margin-left: auto; width: min(260px, 44%); height: 31px; }
.qb-item-list { flex: 1; min-height: 0; overflow: auto; }
.qb-item-row { border-bottom: 1px solid var(--qb-border); background: #fff; }
.qb-item-summary { min-height: 116px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 15px 14px; }
.qb-item-copy { min-width: 0; display: grid; gap: 4px; }
.qb-item-copy b { font-size: 12px; }
.qb-item-copy small { color: var(--qb-muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-item-description { color: var(--qb-secondary); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-item-actions { display: grid; justify-items: end; gap: 8px; }
.qb-variants-panel { display: grid; gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--qb-border); background: #faf9f7; }
.qb-variant-row {
  min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(88px, auto) 104px 112px;
  align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--qb-border); border-radius: 7px; background: #fff;
}
.qb-variant-row.selectable { cursor: pointer; }
.qb-variant-row.selected { border-color: var(--qb-ink); box-shadow: 0 0 0 1px var(--qb-ink); }
.qb-variant-copy { min-width: 0; display: grid; gap: 2px; }
.qb-variant-copy b { font-size: 11px; }
.qb-variant-copy small { color: var(--qb-muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-price { text-align: right; font-weight: 700; font-size: 11px; white-space: nowrap; }
.qb-quantity-control { height: 32px; display: grid; grid-template-columns: 28px minmax(38px, 1fr) 28px; border: 1px solid var(--qb-border-strong); border-radius: 6px; overflow: hidden; background: #fff; }
.qb-quantity-control button { border: 0; border-radius: 0; background: var(--qb-inset); display: grid; place-items: center; padding: 0; }
.qb-quantity-control input { width: 100%; min-width: 0; border: 0; border-left: 1px solid var(--qb-border); border-right: 1px solid var(--qb-border); text-align: center; outline: 0; font-weight: 700; appearance: textfield; }
.qb-quantity-control input::-webkit-inner-spin-button, .qb-quantity-control input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.qb-field-error { color: var(--qb-danger); font-size: 9px; grid-column: 1 / -1; }

.qb-conversation-pane { display: flex; flex-direction: column; }
.qb-conversation-expanded { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.qb-conversation-head { flex: 0 0 92px; border-bottom: 1px solid var(--qb-border); }
.qb-conversation-title { height: 49px; display: flex; align-items: center; gap: 10px; padding: 0 12px; position: relative; }
.qb-conversation-title > div { min-width: 0; flex: 1; display: grid; }
.qb-conversation-title b { font-size: 14px; white-space: nowrap; }
.qb-conversation-title small { color: var(--qb-muted); font-size: 10px; white-space: nowrap; }
.qb-conversation-tabs { height: 43px; display: flex; align-items: stretch; gap: 14px; padding: 0 10px; }
.qb-conversation-tab { font-size: 11px; }
.qb-thread { flex: 1; min-height: 0; overflow: auto; }
.qb-conversation-input { flex: 0 0 132px; display: grid; gap: 7px; padding: 10px 12px; border-top: 1px solid var(--qb-border); background: #faf9f7; }
.qb-input-reference { min-height: 26px; display: flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 5px; background: var(--qb-inset); color: var(--qb-muted); font-size: 9px; overflow: hidden; }
.qb-input-reference span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-command-input { height: 62px; display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--qb-border-strong); border-radius: 8px; background: #fff; }
.qb-command-input textarea { flex: 1; height: 44px; border: 0; resize: none; outline: 0; font-size: 11px; }
.qb-command-input textarea:focus, .qb-command-input textarea:focus-visible { outline: 0; box-shadow: none; }
.qb-command-input .qb-icon-button { width: 30px; min-height: 30px; background: #111; color: #fff; border-color: #111; }
.qb-conversation-input > small { color: var(--qb-muted); font-size: 9px; }
.qb-conversation-list, .qb-activity-list { display: grid; gap: 10px; padding: 12px; }
.qb-message { display: grid; gap: 5px; padding: 9px 10px; border: 1px solid var(--qb-border); border-radius: 7px; background: #fff; }
.qb-message.user { margin-left: 22px; background: var(--qb-inset); }
.qb-message.assistant { margin-right: 10px; border-left: 2px solid var(--qb-success); }
.qb-message.system { color: var(--qb-muted); background: #faf9f7; }
.qb-message header, .qb-activity-event header { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.qb-message header b, .qb-activity-event header b { font-size: 10px; }
.qb-message time, .qb-activity-event time { color: var(--qb-muted); font-size: 8px; }
.qb-message p, .qb-activity-event p { margin: 0; color: var(--qb-secondary); font-size: 11px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.qb-message-rich { color: var(--qb-secondary); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.qb-message-rich > :first-child { margin-top: 0; }
.qb-message-rich > :last-child { margin-bottom: 0; }
.qb-message-rich p, .qb-message-rich ul, .qb-message-rich ol, .qb-message-rich blockquote, .qb-message-rich pre { margin: 0 0 8px; }
.qb-message-rich ul, .qb-message-rich ol { padding-left: 20px; }
.qb-message-rich h1, .qb-message-rich h2, .qb-message-rich h3, .qb-message-rich h4 { margin: 10px 0 6px; color: var(--qb-ink); line-height: 1.25; }
.qb-message-rich h1 { font-size: 16px; } .qb-message-rich h2 { font-size: 14px; } .qb-message-rich h3, .qb-message-rich h4 { font-size: 12px; }
.qb-message-rich blockquote { padding-left: 9px; border-left: 2px solid var(--qb-border-strong); color: var(--qb-muted); }
.qb-message-rich code { padding: 1px 4px; border-radius: 4px; background: var(--qb-inset); font: 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; }
.qb-message-rich pre { overflow: auto; padding: 8px; border-radius: 6px; background: #f3f2ef; }
.qb-message-rich pre code { padding: 0; background: transparent; white-space: pre; }
.qb-message-rich a { color: #3155a5; text-decoration: underline; }
.qb-rich-table-wrap { max-width: 100%; overflow-x: auto; margin-bottom: 8px; }
.qb-message-rich table { width: 100%; border-collapse: collapse; font-size: 10px; }
.qb-message-rich th, .qb-message-rich td { padding: 5px 6px; border: 1px solid var(--qb-border); text-align: left; vertical-align: top; }
.qb-message-rich th { background: var(--qb-inset); color: var(--qb-ink); }
.qb-proposal { display: grid; gap: 9px; padding: 11px; border: 1px solid var(--qb-warning-border); border-radius: 8px; background: var(--qb-warning-bg); }
.qb-proposal.rejected, .qb-proposal.conflict { border-color: var(--qb-danger-border); background: var(--qb-danger-bg); }
.qb-proposal header { display: flex; align-items: center; gap: 8px; }
.qb-proposal header > div { min-width: 0; display: grid; flex: 1; }
.qb-proposal header b { font-size: 11px; }
.qb-proposal header small, .qb-proposal > small { color: var(--qb-muted); font-size: 9px; }
.qb-proposal p { margin: 0; font-size: 11px; line-height: 1.4; }
.qb-proposal ul { margin: 0; padding-left: 18px; color: var(--qb-secondary); font-size: 9px; }
.qb-proposal-impact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.qb-proposal-impact span { display: grid; color: var(--qb-muted); font-size: 8px; }
.qb-proposal-impact b { color: var(--qb-ink); font-size: 10px; font-variant-numeric: tabular-nums; }
.qb-proposal-warning { display: flex; gap: 6px; align-items: flex-start; padding: 7px; border: 1px solid var(--qb-warning-border); background: #fff; color: var(--qb-warning); font-size: 9px; line-height: 1.35; }
.qb-proposal footer { display: flex; gap: 7px; }
.qb-product-sync { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.qb-product-sync span { display: grid; color: var(--qb-muted); font-size: 8px; }
.qb-product-sync b { color: var(--qb-ink); font-size: 9px; }
.qb-product-proposal details { font-size: 9px; }
.qb-product-proposal summary { cursor: pointer; color: var(--qb-secondary); }
.qb-product-proposal pre { max-height: 260px; overflow: auto; padding: 8px; border: 1px solid var(--qb-border); background: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.qb-activity-event { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--qb-border); }
.qb-activity-event > div { min-width: 0; display: grid; gap: 4px; }
.qb-activity-event small { color: var(--qb-muted); font-size: 8px; overflow-wrap: anywhere; }
.qb-activity-event .qb-button { width: max-content; margin-top: 3px; }
.qb-placeholder-state, .qb-empty-state, .qb-loading-state { height: 100%; min-height: 180px; display: grid; place-items: center; padding: 28px; text-align: center; }
.qb-placeholder-state > div, .qb-empty-state > div, .qb-loading-state > div { max-width: 410px; display: grid; justify-items: center; gap: 9px; }
.qb-placeholder-state .qb-state-icon, .qb-empty-state .qb-state-icon, .qb-loading-state .qb-state-icon { width: 50px; height: 50px; }
.qb-placeholder-state b, .qb-empty-state b { font-size: 15px; }
.qb-placeholder-state p, .qb-empty-state p, .qb-loading-state p { color: var(--qb-muted); font-size: 11px; }
.qb-placeholder-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.qb-activity-rail { width: 56px; height: 100%; align-items: center; flex-direction: column; padding: 10px 0; background: #faf9f7; }
.qb-activity-rail:not([hidden]) { display: flex; }
.qb-rail-button { width: 36px; height: 36px; min-height: 36px; border: 0; background: transparent; padding: 0; position: relative; margin-bottom: 8px; }
.qb-rail-spacer { flex: 1; }

.qb-cart-bar { height: var(--qb-cart-height); display: flex; align-items: center; gap: 12px; padding: 0 18px; background: #fff; border-top: 1px solid var(--qb-border-strong); position: relative; z-index: 35; cursor: pointer; }
.qb-cart-icon { width: 34px; height: 34px; border-radius: 7px; background: #111; color: #fff; display: grid; place-items: center; }
.qb-cart-copy { width: 260px; display: grid; }
.qb-cart-copy b { font-size: 12px; }
.qb-cart-copy span { color: var(--qb-muted); font-size: 10px; }
.qb-cart-totals { margin-left: auto; display: flex; align-items: center; gap: 26px; }
.qb-cart-totals > div { min-width: 106px; display: grid; text-align: right; }
.qb-cart-totals small { color: var(--qb-muted); font-size: 9px; }
.qb-cart-totals b { font-size: 12px; }
.qb-cart-totals .qb-grand-total b { font-size: 16px; }

.qb-dialog { padding: 0; border: 0; border-radius: 14px; color: var(--qb-ink); background: #fff; box-shadow: 0 24px 64px rgba(0, 0, 0, .24); overflow: hidden; }
.qb-dialog::backdrop { background: rgba(23, 23, 23, .46); }
.qb-cart-dialog { width: min(1160px, 84vw); height: min(760px, 84vh); }
.qb-upload-dialog { width: min(680px, calc(100vw - 32px)); height: min(750px, calc(100vh - 32px)); }
.qb-confirm-dialog { width: min(480px, calc(100vw - 32px)); }
.qb-dialog[open] { display: flex; flex-direction: column; }
.qb-modal-head { min-height: 68px; flex: 0 0 68px; display: flex; align-items: center; gap: 10px; padding: 0 22px; border-bottom: 1px solid var(--qb-border); }
.qb-modal-head > div { min-width: 0; flex: 1; }
.qb-modal-head h2 { font-size: 18px; }
.qb-modal-head p { color: var(--qb-muted); font-size: 11px; }
.qb-modal-head .qb-cart-modal-deal { color: var(--qb-secondary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qb-modal-body { flex: 1; min-height: 0; padding: 16px 22px; overflow: auto; }
.qb-modal-footer { min-height: 104px; flex: 0 0 auto; display: flex; align-items: center; padding: 16px 22px; border-top: 1px solid var(--qb-border); background: #faf9f7; }
.qb-commercial-banner, .qb-inline-error, .qb-inline-info { min-height: 38px; display: flex; align-items: center; gap: 8px; border: 1px solid #e3c86d; background: var(--qb-warning-bg); color: var(--qb-warning); border-radius: 7px; padding: 8px 10px; margin-bottom: 10px; font-size: 10px; }
.qb-inline-error { border-color: #dfa9a6; background: var(--qb-danger-bg); color: var(--qb-danger); }
.qb-inline-info { border-color: var(--qb-border-strong); background: var(--qb-inset); color: var(--qb-secondary); }
.qb-cart-group-title { min-height: 30px; display: flex; align-items: center; font-weight: 700; font-size: 11px; }
body:not(.qb-app) .qb-cart-table-head, body:not(.qb-app) .qb-cart-line { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(150px, 1.3fr) 104px 120px 88px 124px 36px; gap: 10px; align-items: center; }
body:not(.qb-app) .qb-cart-table-head { min-height: 28px; padding: 0 8px; background: var(--qb-inset); color: var(--qb-muted); font-size: 9px; }
body:not(.qb-app) .qb-cart-line { min-height: 88px; padding: 10px 8px; border-bottom: 1px solid var(--qb-border); }
.qb-cart-line.below-floor { box-shadow: inset 3px 0 var(--qb-warning); background: #fffdf7; }
.qb-cart-product { min-width: 0; display: grid; gap: 3px; }
.qb-cart-product b { font-size: 11px; }
.qb-cart-product small { color: var(--qb-muted); font-size: 9px; }
.qb-cart-value { text-align: right; font-size: 10px; }
.qb-margin-field { height: 32px; display: flex; align-items: center; gap: 2px; border: 1px solid var(--qb-border-strong); border-radius: 6px; background: #fff; padding: 0 6px; color: var(--qb-success); }
.qb-margin-field.warning { color: var(--qb-danger); border-color: #c7684e; background: #fff4ef; }
.qb-margin-field input { min-width: 0; width: 58px; border: 0; outline: 0; text-align: right; color: inherit; background: transparent; font-weight: 700; }
.qb-line-edit-state { grid-column: 1 / -1; min-height: 16px; color: var(--qb-muted); font-size: 9px; }
.qb-line-edit-state.error { color: var(--qb-danger); }
.qb-footer-actions, .qb-footer-totals { display: flex; align-items: center; gap: 8px; }
.qb-footer-totals { margin-left: auto; gap: 24px; }
.qb-footer-totals > div { min-width: 108px; display: grid; text-align: right; }
.qb-footer-totals small { color: var(--qb-muted); font-size: 9px; }
.qb-footer-totals b { font-size: 12px; }
.qb-footer-totals .qb-grand-total b { font-size: 17px; }

.qb-upload-body { flex: 1; min-height: 0; overflow: auto; padding: 20px 22px; display: grid; align-content: start; gap: 16px; }
.qb-dropzone { min-height: 174px; border: 1px dashed var(--qb-border-strong); border-radius: 10px; background: #faf9f7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; cursor: pointer; }
.qb-dropzone.dragging { border-color: var(--qb-ink); background: var(--qb-inset); }
.qb-dropzone .qb-state-icon { width: 50px; height: 50px; }
.qb-dropzone > span:not(.qb-state-icon):not(.qb-button) { color: var(--qb-muted); font-size: 10px; }
.qb-upload-section { display: grid; gap: 8px; }
.qb-section-title { display: flex; align-items: center; justify-content: space-between; font-size: 11px; }
.qb-section-title span { color: var(--qb-muted); font-size: 9px; }
.qb-file-list, .qb-analysis-history { display: grid; gap: 8px; }
.qb-file-row, .qb-analysis-row { min-height: 66px; border: 1px solid var(--qb-border); border-radius: 8px; display: flex; align-items: center; gap: 10px; padding: 10px; }
.qb-file-row.error { border-color: #dba8a4; background: #fffdfc; }
.qb-file-copy, .qb-analysis-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.qb-file-copy b, .qb-analysis-copy b { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-file-copy span, .qb-analysis-copy span { color: var(--qb-muted); font-size: 9px; }
.qb-progress { height: 5px; background: var(--qb-border); border-radius: 3px; overflow: hidden; }
.qb-progress span { display: block; height: 100%; background: var(--qb-ink); transition: width .15s linear; }
.qb-analysis-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.qb-analysis-actions .qb-button { min-height: 30px; font-size: 10px; padding: 0 8px; }
.qb-upload-footer { min-height: 74px; justify-content: flex-end; gap: 8px; }
.qb-confirm-body { padding: 22px; color: var(--qb-secondary); }
.qb-confirm-footer { min-height: 72px; justify-content: flex-end; gap: 8px; }
.qb-toast-region { position: fixed; z-index: 300; right: 18px; bottom: 82px; width: min(380px, calc(100vw - 36px)); display: grid; gap: 8px; pointer-events: none; }
.qb-toast { padding: 10px 12px; border: 1px solid var(--qb-border-strong); border-radius: 8px; background: #222; color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.18); font-size: 11px; }
.qb-toast.error { background: #7d2227; }
.qb-tbc-section { margin-top: 18px; border: 1px solid #d9a441; border-radius: 8px; overflow: hidden; background: #fffaf0; }
.qb-tbc-table-head, .qb-tbc-line { display: grid; grid-template-columns: minmax(190px, 1.7fr) minmax(145px, 1.1fr) minmax(145px, 1.1fr) minmax(135px, .9fr) minmax(190px, 1.35fr) minmax(190px, 1.25fr); gap: 12px; align-items: center; padding: 12px 14px; }
.qb-tbc-table-head { background: #f4e7c8; color: var(--qb-secondary); font-size: 9px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.qb-tbc-line { border-top: 1px solid #ead7ad; }
.qb-tbc-line:first-of-type { border-top: 0; }
.qb-tbc-line div { display: flex; flex-direction: column; gap: 3px; }
.qb-tbc-line small { color: var(--qb-muted); }
.qb-tbc-line.resolved { background: var(--qb-success-bg); }
.qb-tbc-price { color: #8a5a00; display: grid; gap: 3px; font-size: 9px; }
.qb-tbc-price input { width: 100%; height: 32px; border: 1px solid var(--qb-border-strong); border-radius: 6px; padding: 0 8px; background: #fff; }
.qb-tbc-price input[data-tbc-quantity] { appearance: textfield; -moz-appearance: textfield; }
.qb-tbc-price input[data-tbc-quantity]::-webkit-inner-spin-button,
.qb-tbc-price input[data-tbc-quantity]::-webkit-outer-spin-button { appearance: none; -webkit-appearance: none; margin: 0; }
.qb-tbc-actions { display: flex; flex-direction: row !important; justify-content: flex-end; gap: 5px !important; }
.qb-tbc-actions .qb-button { min-height: 32px; padding: 0 8px; font-size: 9px; }
.qb-tbc-requirements { display: flex !important; flex-direction: row !important; flex-wrap: wrap; }
.qb-tbc-status { font-weight: 700; color: var(--qb-secondary); }
.qb-input-with-unit { display: grid !important; grid-template-columns: minmax(70px, 1fr) auto; align-items: center; gap: 0 !important; }
.qb-input-with-unit input { border-radius: 6px 0 0 6px; }
.qb-input-unit { min-height: 32px; display: grid; place-items: center; padding: 0 9px; border: 1px solid var(--qb-border-strong); border-left: 0; border-radius: 0 6px 6px 0; background: #f5f5f3; color: var(--qb-secondary); font-size: 9px; white-space: nowrap; }
.qb-tbc-catalogue { color: var(--qb-muted); }
.qb-catalogue-choice-dialog { width: min(720px, calc(100vw - 32px)); }
.qb-catalogue-choice-body { padding: 18px; display: grid; gap: 10px; }
.qb-catalogue-choice-body > input { height: 40px; border: 1px solid var(--qb-border-strong); border-radius: 7px; padding: 0 11px; }
.qb-catalogue-choice-results { max-height: 390px; overflow: auto; display: grid; gap: 7px; }
.qb-catalogue-choice-result { display: grid; grid-template-columns: 24px 1fr auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--qb-border); border-radius: 7px; cursor: pointer; }
.qb-catalogue-choice-result:has(input:checked) { border-color: var(--qb-primary); background: var(--qb-primary-soft); }
.qb-catalogue-choice-result span { display: grid; gap: 2px; }
.qb-catalogue-choice-result small { color: var(--qb-muted); }
.qb-local-product-dialog { width: min(850px, calc(100vw - 32px)); }
.qb-local-product-body { padding: 18px; display: grid; gap: 16px; max-height: min(68vh, 680px); overflow: auto; }
.qb-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qb-form-grid label { display: grid; gap: 5px; color: var(--qb-secondary); font-size: 10px; font-weight: 700; }
.qb-form-grid input, .qb-form-grid select, .qb-form-grid textarea { width: 100%; border: 1px solid var(--qb-border-strong); border-radius: 7px; padding: 9px 10px; background: #fff; font: inherit; font-weight: 400; }
.qb-form-grid textarea { min-height: 76px; resize: vertical; }
.qb-form-wide { grid-column: 1 / -1; }
.qb-local-product-body details { border: 1px solid var(--qb-border); border-radius: 7px; padding: 12px; }
.qb-local-product-body details summary { cursor: pointer; font-weight: 700; margin-bottom: 12px; }

@media (max-width: 1280px) {
  .qb-brand { width: 218px; }
  .qb-header-field { width: 270px; }
  .qb-version-field { width: 205px; }
  .qb-secondary-action span { display: none; }
  .qb-cart-copy { width: 210px; }
  .qb-cart-totals { gap: 15px; }
}
@media (max-width: 1180px) {
  .qb-header { gap: 9px; padding-inline: 12px; }
  .qb-brand { width: 200px; }
  .qb-header-field { width: 255px; }
  .qb-version-field { width: 195px; }
}
@media (max-width: 960px) {
  .qb-header { overflow-x: auto; }
  .qb-brand { width: 190px; }
  .qb-header-field { width: 230px; }
  .qb-version-field { width: 190px; }
  .qb-cart-totals > div:not(.qb-grand-total) { display: none; }
}
@media (max-width: 720px) {
  .qb-header { height: 58px; --qb-header-height: 58px; }
  .qb-brand { width: 48px; }
  .qb-brand span { display: none; }
  .qb-header-field { width: 190px; }
  .qb-version-field { display: none; }
  .qb-catalogue-search { width: 46%; }
  .qb-variant-row { grid-template-columns: minmax(0,1fr) 90px; }
  .qb-variant-row .qb-quantity-control, .qb-variant-row .qb-button { grid-column: auto; }
  .qb-cart-copy { width: auto; }
  .qb-cart-totals > div { display: none; }
  .qb-cart-dialog { width: calc(100vw - 16px); height: calc(100vh - 16px); }
  .qb-cart-table-head { display: none; }
  .qb-cart-line { grid-template-columns: 1fr 1fr; }
  .qb-tbc-table-head { display: none; }
  .qb-tbc-line { grid-template-columns: 1fr 1fr; }
  .qb-form-grid { grid-template-columns: 1fr; }
  .qb-form-wide { grid-column: auto; }
  .qb-cart-value { text-align: left; }
  .qb-footer-totals > div:not(.qb-grand-total) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .qb-progress span { transition: none; }
  .qb-spinner { animation-duration: 1.5s; }
}

/* Existing shared-page styles are deliberately scoped away from the V3 calculator. */
body:not(.qb-app) { margin: 0; background: #f5f4f1; color: #171717; font: 13px/1.45 Inter, system-ui, sans-serif; }
body:not(.qb-app) button, body:not(.qb-app) input { font: inherit; }
body:not(.qb-app) button { cursor: pointer; border: 1px solid #d8d6d1; background: #fff; border-radius: 10px; padding: 9px 14px; color: #171717; }
body:not(.qb-app) button.primary { background: #111; color: #fff; border-color: #111; font-weight: 650; }
body:not(.qb-app) > header { height: 84px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid #e4e2de; }
body:not(.qb-app) > header h1 { font-size: 26px; margin: 0; letter-spacing: -.5px; }
body:not(.qb-app) > header span { color: #74716b; }
body:not(.qb-app) .header-actions { display: flex; align-items: center; gap: 10px; }
body:not(.qb-app) .header-actions form { display: inline; }
body:not(.qb-app) .button-link { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid #d8d6d1; border-radius: 9px; background: #fff; color: #171717; font-weight: 650; text-decoration: none; }
.rfq-page { width: min(1440px, calc(100% - 40px)); margin: 28px auto 64px; }
.rfq-panel { display: grid; gap: 22px; }
.rfq-draft-head { display: flex; align-items: flex-start; gap: 20px; }
.rfq-draft-head > div:first-child { min-width: 0; flex: 1; }
.rfq-draft-head h2 { margin: 0 0 5px; font-size: 22px; letter-spacing: -.02em; }
.rfq-draft-head p { max-width: 850px; margin: 0; color: #74716b; }
.rfq-draft-head > div:last-child { display: grid; justify-items: end; }
.rfq-draft-head > div:last-child strong { font-size: 20px; }
.rfq-draft-head > div:last-child small { color: #74716b; }
.rfq-compliance-overview { min-height: 92px; display: grid; grid-template-columns: minmax(240px, .75fr) minmax(0, 1.25fr); align-items: center; gap: 28px; padding: 18px 22px; border: 1px solid #dedbd5; border-radius: 14px; background: #fff; }
.rfq-compliance-overview > div:first-child { display: flex; align-items: center; gap: 16px; }
.rfq-compliance-overview strong { color: #27632c; font-size: 34px; line-height: 1; }
.rfq-compliance-overview span, .rfq-compliance-overview > div:last-child { color: #5e5a54; }
.rfq-matrix-filters { display: grid; gap: 12px; padding: 16px 18px; border: 1px solid #e4e2de; border-radius: 12px; background: #fff; }
.rfq-matrix-filters > div { display: grid; grid-template-columns: 124px minmax(0, 1fr); align-items: center; gap: 12px; }
.rfq-matrix-filters > div > span { color: #74716b; font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.compliance-filters { display: flex; flex-wrap: wrap; gap: 7px; }
body:not(.qb-app) .compliance-filters button { min-height: 32px; padding: 5px 10px; border-radius: 7px; font-size: 11px; }
body:not(.qb-app) .compliance-filters button.active { border-color: #171717; background: #171717; color: #fff; }
.compliance-filters button b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.rfq-compliance-requirements { display: grid; gap: 9px; }
.rfq-requirement-card { overflow: hidden; border: 1px solid #dedbd5; border-radius: 12px; background: #fff; }
body:not(.qb-app) .rfq-requirement-summary { width: 100%; min-height: 94px; display: grid; grid-template-columns: 145px minmax(280px, 1fr) minmax(220px, auto) 72px; align-items: center; gap: 18px; padding: 16px 18px; border: 0; border-radius: 0; text-align: left; }
body:not(.qb-app) .rfq-requirement-summary:hover { background: #faf9f7; }
.rfq-requirement-identity { min-width: 0; display: grid; gap: 4px; }
.rfq-requirement-identity b { font-size: 13px; }
.rfq-requirement-identity small { color: #74716b; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.rfq-requirement-copy { color: #282725; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.rfq-requirement-badges { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
.status-badge, .review-flag { min-height: 25px; display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid #dedbd5; border-radius: 13px; background: #f3f2ef; color: #5e5a54; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status-badge.compliant { border-color: #b8d8ba; background: #e7f4e8; color: #27632c; }
.status-badge.partially-compliant, .status-badge.needs-review, .review-flag.required { border-color: #dbc36d; background: #fff3cd; color: #6d5200; }
.status-badge.not-compliant { border-color: #e2aaa8; background: #fee8e7; color: #a4262c; }
.rfq-expand-label { justify-self: end; color: #74716b; font-size: 10px; font-weight: 700; white-space: nowrap; }
.requirement-toggle[aria-expanded="true"] .rfq-expand-label span { display: inline-block; transform: rotate(180deg); }
.rfq-requirement-detail { padding: 0 18px 18px 181px; border-top: 1px solid #eeeae4; background: #faf9f7; }
.rfq-requirement-detail dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; margin: 0; padding-top: 16px; }
.rfq-requirement-detail dl > div { min-width: 0; }
.rfq-requirement-detail .rfq-detail-wide { grid-column: 1 / -1; }
.rfq-requirement-detail dt { margin-bottom: 4px; color: #74716b; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.rfq-requirement-detail dd { margin: 0; color: #383632; line-height: 1.55; overflow-wrap: anywhere; }
.catalogue-missing { color: #8a5a00; }
.requirement-row.requirement-focus { border-color: #b78a00; background: #fff8dc; box-shadow: 0 0 0 2px #b78a00; }
.deal-warning, .rfq-assumptions { padding: 15px 18px; border: 1px solid #dbc36d; border-radius: 10px; background: #fff8df; }
.deal-warning p, .deal-warning ul, .rfq-assumptions ul { margin: 6px 0 0; }
.rfq-lines { display: grid; gap: 8px; }
.rfq-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 22px; padding: 16px 18px; border: 1px solid #e4e2de; border-radius: 10px; background: #fff; }
.rfq-line > div { display: grid; }
.rfq-line > div:nth-child(2) { justify-items: end; }
.rfq-line > .rfq-line-reasoning { grid-column: 1 / -1; gap: 3px; }
.rfq-line span, .rfq-line small { color: #74716b; }
.rfq-line p, .rfq-line small { grid-column: 1 / -1; margin: 0; }
.dialog-actions { min-height: 72px; display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid #e4e2de; border-radius: 10px; background: #fff; }
.dialog-actions > span { flex: 1; color: #5e5a54; }
.empty { padding: 28px; border: 1px dashed #cbc8c1; border-radius: 10px; color: #74716b; text-align: center; }
@media (max-width: 900px) {
  body:not(.qb-app) > header { height: auto; min-height: 76px; gap: 16px; padding: 14px 18px; }
  .rfq-page { width: min(100% - 24px, 720px); margin-top: 18px; }
  .rfq-draft-head, .dialog-actions { align-items: stretch; flex-direction: column; }
  .rfq-compliance-overview { grid-template-columns: 1fr; gap: 12px; }
  .rfq-matrix-filters > div { grid-template-columns: 1fr; gap: 7px; }
  body:not(.qb-app) .rfq-requirement-summary { grid-template-columns: 1fr; gap: 10px; }
  .rfq-requirement-badges { order: 3; }
  .rfq-expand-label { position: absolute; right: 18px; margin-top: 1px; }
  .rfq-requirement-detail { padding: 0 16px 16px; }
  .rfq-requirement-detail dl { grid-template-columns: 1fr; }
  .rfq-requirement-detail .rfq-detail-wide { grid-column: auto; }
  .rfq-line { grid-template-columns: 1fr; }
  .rfq-line > div:nth-child(2) { justify-items: start; }
}
.auth-page { min-height: 100vh; display: grid; place-items: center; }
.auth-card { width: min(420px, calc(100% - 32px)); background: #fff; border: 1px solid #11111117; border-radius: 18px; padding: 30px; }
.auth-card label { display: block; margin: 15px 0; }
.auth-card input { display: block; width: 100%; padding: 11px; margin-top: 5px; border: 1px solid #ccc; border-radius: 9px; }
.auth-card .primary { width: 100%; }
.warning { background: #fff1f0; color: #a4262c; padding: 10px; border-radius: 8px; }

/* Quotation Builder V3 final reference layout. */
.qb-app .qb-header { height: 64px; gap: 12px; padding: 0 18px; }
.qb-app .qb-brand { width: 218px; }
.qb-app .qb-brand b { font-size: 15px; }
.qb-app .qb-brand small { font-size: 10px; }
.qb-app .qb-header-field { width: 286px; height: 42px; background: var(--qb-inset); border-color: var(--qb-border); }
.qb-app .qb-version-field { width: 212px; }
.qb-spacer { flex: 1; }
.qb-app .qb-workspace { height: calc(100dvh - 128px); display: flex; min-width: 0; overflow: hidden; background: var(--qb-canvas); }
.qb-main { width: calc(100% - var(--conversation-width)); min-width: 0; height: 100%; position: relative; overflow: hidden; background: #fff; }
.qb-app .qb-conversation-pane { width: var(--conversation-width); flex: 0 0 var(--conversation-width); height: 100%; border-left: 1px solid var(--qb-border); background: #fff; }
.qb-app .qb-conversation-head { flex-basis: 62px; height: 62px; }
.qb-app .qb-conversation-title { height: 62px; padding: 0 16px; }
.qb-app .qb-conversation-title b { font-size: 14px; }
.qb-app .qb-conversation-tabs { display: none; }
.qb-app .qb-message { border: 0; border-radius: 3px 10px 10px 10px; background: var(--qb-success-bg); color: var(--qb-success); }
.qb-app .qb-message.user { margin-left: 30px; border-radius: 10px 10px 3px 10px; background: var(--qb-inset); color: var(--qb-ink); }
.qb-app .qb-conversation-input { flex-basis: 106px; padding: 12px; background: #fff; }
.qb-app .qb-input-reference { display: none; }
.qb-app .qb-command-input { height: 70px; }
.qb-catalogue-workspace, .qb-review-workspace { width: 100%; height: 100%; min-width: 0; position: relative; overflow: hidden; background: #fff; }
.qb-catalogue-workspace { --qb-catalogue-columns: minmax(0, 1fr) 150px 140px 96px 100px 116px; display: flex; flex-direction: column; }
.qb-catalogue-head { min-height: 112px; flex: 0 0 auto; border-bottom: 1px solid var(--qb-border); background: #fff; }
.qb-catalogue-title-row { height: 70px; display: flex; align-items: center; gap: 14px; padding: 0 18px; }
.qb-catalogue-title h1 { font-size: 18px; line-height: 22px; }
.qb-catalogue-title p { margin-top: 3px; color: var(--qb-muted); font-size: 10px; }
.qb-app .qb-catalogue-search { width: 360px; height: 38px; margin-left: 0; }
.qb-app .qb-view-tabs { height: 42px; align-items: flex-end; gap: 28px; padding: 0 18px; }
.qb-app .qb-view-tab { height: 42px; padding: 0; font-size: 12px; }
.qb-active-filters { height: 36px; display: flex; align-items: center; gap: 8px; padding: 5px 18px; border-top: 1px solid var(--qb-border); overflow: hidden; }
.qb-active-filters > strong { flex: 0 0 auto; font-size: 9px; text-transform: uppercase; color: var(--qb-muted); }
.qb-active-filter-scroll { min-width: 0; flex: 1; display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.qb-active-filter-scroll::-webkit-scrollbar { display: none; }
.qb-filter-chip { max-width: 260px; height: 26px; flex: 0 0 auto; border: 1px solid var(--qb-border); border-radius: 13px; background: var(--qb-inset); padding: 0 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.qb-filter-chip span { color: var(--qb-muted); }
.qb-filter-chip b { margin-left: 2px; font-size: 13px; font-weight: 500; }
.qb-filter-clear { flex: 0 0 auto; border: 0; background: transparent; color: var(--qb-muted); font-size: 10px; text-decoration: underline; }
.qb-product-table-head, .qb-item-summary { display: grid; grid-template-columns: var(--qb-catalogue-columns); align-items: center; padding-inline: 18px; }
.qb-product-table-head { height: 38px; flex: 0 0 38px; background: var(--qb-inset); border-bottom: 1px solid var(--qb-border); color: var(--qb-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.qb-product-table-head > span { justify-self: center; text-align: center; }
.qb-product-table-head > span:first-child { justify-self: start; text-align: left; }
.qb-app .qb-item-list { flex: 1; min-height: 0; overflow: auto; }
.qb-app .qb-item-summary { min-height: 126px; gap: 0; padding-block: 14px; }
.qb-app .qb-item-row:first-child .qb-item-summary { background: #f4faf4; }
.qb-app .qb-item-copy { justify-self: stretch; padding-right: 20px; text-align: left; }
.qb-app .qb-item-copy h3 { margin: 0 0 3px; font-size: 14px; line-height: 18px; }
.qb-app .qb-item-copy small { font-size: 10px; }
.qb-app .qb-item-description { margin-top: 3px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qb-item-requirements { justify-self: stretch; min-width: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; align-content: center; text-align: center; }
.qb-requirement-chip { min-height: 24px; display: inline-flex; align-items: center; padding: 0 9px; border: 1px solid var(--qb-border); border-radius: 6px; background: var(--qb-inset); font-size: 10px; font-weight: 700; }
.qb-item-logic { justify-self: center; min-width: 0; text-align: center; }
.qb-logic-button { height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border: 1px solid var(--qb-border); border-radius: 7px; background: #fff; font-size: 10px; white-space: nowrap; }
.qb-question { width: 15px; height: 15px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 700; }
.qb-item-price { justify-self: center; min-width: 0; text-align: center; font-size: 13px; font-weight: 700; white-space: nowrap; }
.qb-item-quantity { justify-self: center; width: 96px; }
.qb-app .qb-item-actions { justify-self: center; min-width: 0; display: flex; justify-content: center; }
.qb-app .qb-item-actions .qb-button { max-width: 116px; }
.qb-direct-item-state { grid-column: 5 / 7; justify-self: stretch; text-align: center; }
.qb-muted-copy { color: var(--qb-muted); }
.qb-app .qb-variants-panel { min-height: 178px; padding: 16px 18px; background: #fbfbfa; }
.qb-app .qb-variant-row { min-height: 48px; grid-template-columns: minmax(0,1fr) 120px 96px 120px; border-radius: 0; }
.qb-app .qb-variant-row.selected { border-color: var(--qb-success); background: #f4faf4; box-shadow: none; }
.qb-app .qb-variant-row .qb-price { display: grid; gap: 2px; justify-items: end; font-size: 11px; white-space: nowrap; }
.qb-app .qb-variant-row .qb-price small { max-width: 118px; overflow: hidden; text-overflow: ellipsis; font-size: 8px; }
.qb-filter-panel { position: absolute; z-index: 50; inset: 0 0 0 auto; width: 390px; display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--qb-border-strong); box-shadow: -8px 0 24px rgba(0,0,0,.08); }
.qb-filter-head, .qb-filter-foot { height: 62px; flex: 0 0 62px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--qb-border); }
.qb-filter-head b { font-size: 15px; }
.qb-filter-head .qb-button { margin-left: auto; border: 0; color: var(--qb-muted); font-size: 10px; }
.qb-filter-content { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 22px; padding: 18px 16px; }
.qb-filter-group { display: flex; flex-direction: column; gap: 9px; }
.qb-filter-group > b { font-size: 11px; }
.qb-filter-group > b span { margin-left: 3px; color: var(--qb-muted); font-size: 9px; font-weight: 500; }
.qb-filter-group > div { display: flex; flex-wrap: wrap; gap: 7px; }
.qb-filter-option { min-height: 30px; border: 1px solid var(--qb-border); border-radius: 7px; background: #fff; padding: 0 11px; font-size: 10px; }
.qb-filter-option.active { background: var(--qb-ink); color: #fff; border-color: var(--qb-ink); }
.qb-filter-foot { height: 64px; flex-basis: 64px; justify-content: flex-end; gap: 9px; border-top: 1px solid var(--qb-border); border-bottom: 0; }
.qb-review-workspace { --qb-review-columns: 30px minmax(145px,1fr) 170px 84px 38px 68px 72px 72px 88px 100px 36px; --qb-review-gap: 5px; --qb-review-padding: 12px; display: flex; flex-direction: column; }
.qb-review-head { height: 118px; flex: 0 0 118px; border-bottom: 1px solid var(--qb-border); }
.qb-review-title-row { height: 72px; display: flex; align-items: center; gap: 12px; padding: 0 18px; }
.qb-back-button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--qb-border); border-radius: 8px; background: #fff; }
.qb-review-title { min-width: 0; }
.qb-review-title h1 { font-size: 18px; }
.qb-review-title p { max-width: 370px; margin-top: 3px; color: var(--qb-muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-draft-pill { height: 26px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 13px; background: var(--qb-inset); font-size: 10px; font-weight: 700; }
.qb-company-picker { position: relative; }
.qb-company-trigger { width: 268px; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--qb-border); border-radius: 8px; background: var(--qb-inset); text-align: left; }
.qb-company-trigger span { min-width: 0; flex: 1; display: grid; }
.qb-company-trigger small { color: var(--qb-muted); font-size: 9px; text-transform: uppercase; }
.qb-company-trigger b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.qb-company-menu { position: absolute; z-index: 70; top: 50px; right: 0; width: 268px; padding: 6px; background: #fff; border: 1px solid var(--qb-border-strong); border-radius: 9px; box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.qb-company-option { width: 100%; min-height: 48px; display: grid; gap: 3px; padding: 8px 10px; border: 0; border-radius: 6px; background: #fff; text-align: left; }
.qb-company-option.active { background: var(--qb-inset); }
.qb-company-option b { font-size: 10px; }
.qb-company-option small { color: var(--qb-muted); font-size: 9px; }
.qb-review-tabs { height: 46px; display: flex; align-items: flex-end; gap: 26px; padding: 0 18px; }
.qb-review-tab { height: 46px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 12px; }
.qb-review-tab.active { border-bottom-color: var(--qb-ink); font-weight: 700; }
.qb-review-content { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px; background: var(--qb-canvas); }
.qb-review-toolbar { height: 34px; display: flex; align-items: center; gap: 10px; }
.qb-review-toolbar h2 { font-size: 13px; }
.qb-review-toolbar small { color: var(--qb-muted); }
.qb-review-toolbar > span { flex: 1; }
.qb-group-actions { position: relative; }
.qb-group-actions > .qb-button { gap: 6px; }
.qb-group-menu { position: absolute; z-index: 90; top: calc(100% + 6px); right: 0; width: 270px; max-height: 300px; overflow: auto; padding: 6px; border: 1px solid var(--qb-border-strong); border-radius: 9px; background: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.14); }
.qb-group-menu[hidden] { display: none; }
.qb-group-menu-label { padding: 9px 10px 5px; color: var(--qb-muted); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.qb-group-menu-action { width: 100%; min-height: 40px; display: grid; gap: 2px; align-items: center; padding: 7px 9px; border: 0; border-radius: 6px; background: transparent; text-align: left; }
.qb-group-menu-action:hover:not(:disabled), .qb-group-menu-action:focus-visible { background: var(--qb-inset); }
.qb-group-menu-action:disabled { cursor: default; opacity: .55; }
.qb-group-menu-action span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; font-weight: 700; }
.qb-group-menu-action small { color: var(--qb-muted); font-size: 8px; }
.qb-group-menu-create { grid-template-columns: 18px minmax(0, 1fr); border-bottom: 1px solid var(--qb-border); border-radius: 6px 6px 0 0; }
.qb-review-group { overflow: hidden; border: 1px solid var(--qb-border); border-radius: 10px; background: #fff; margin-bottom: 10px; }
.qb-review-group .qb-cart-group-title { padding: 0 14px; background: #fbfbfa; }
.qb-review-group .qb-cart-group-title > div { min-width: 0; display: grid; gap: 1px; }
.qb-review-group .qb-cart-group-title > div small { color: var(--qb-muted); font-size: 8px; font-weight: 400; }
.qb-review-group .qb-cart-group-title > span { flex: 1; }
.qb-review-group .qb-cart-group-title .qb-button { min-height: 26px; padding: 0 7px; font-size: 8px; }
.qb-review-group.qb-ungrouped { border-style: dashed; }
.qb-app .qb-cart-table-head, .qb-app .qb-cart-line { display: grid; grid-template-columns: var(--qb-review-columns); gap: var(--qb-review-gap); padding-inline: var(--qb-review-padding); align-items: center; }
.qb-app .qb-cart-table-head { height: 38px; min-height: 38px; border: 1px solid var(--qb-border); border-radius: 10px 10px 0 0; font-size: 8px; text-transform: uppercase; }
.qb-app .qb-cart-table-head > span { min-width: 0; }
.qb-app .qb-cart-table-head > span { justify-self: center; text-align: center; }
.qb-app .qb-cart-table-head > span:nth-child(2) { justify-self: start; text-align: left; }
.qb-app .qb-cart-line { min-height: 72px; background: #fff; }
.qb-review-check { justify-self: center; display: grid; place-items: center; }
.qb-review-check input { width: 16px; height: 16px; }
.qb-app .qb-cart-line.selected { background: #f4faf4; }
.qb-app .qb-cart-product { justify-self: stretch; text-align: left; }
.qb-cart-requirements { justify-self: stretch; display: flex; justify-content: center; align-items: center; align-content: center; flex-wrap: wrap; gap: 3px; text-align: center; }
.qb-cart-requirements .qb-requirement-chip { min-height: 22px; flex: 0 0 auto; padding: 0 6px; font-size: 9px; white-space: nowrap; }
.qb-logic-square { justify-self: center; width: 30px; height: 30px; border: 1px solid var(--qb-border-strong); border-radius: 7px; background: #fff; }
.qb-app .qb-cart-line > .qb-quantity-control { justify-self: center; width: 100%; grid-template-columns: 22px minmax(28px, 1fr) 22px; }
.qb-app .qb-cart-line > .qb-cart-value, .qb-app .qb-cart-line > .qb-margin-field { justify-self: center; text-align: center; }
.qb-app .qb-cart-line > .qb-margin-field { position: relative; width: 100%; padding: 0; }
.qb-app .qb-cart-line > .qb-margin-field input { min-width: 0; width: 100%; height: 100%; padding: 0; text-align: center; appearance: textfield; }
.qb-app .qb-cart-line > .qb-margin-field input::-webkit-inner-spin-button, .qb-app .qb-cart-line > .qb-margin-field input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.qb-app .qb-cart-line > .qb-margin-field span { position: absolute; right: 6px; pointer-events: none; }
.qb-app .qb-cart-line > .qb-quantity-control input, .qb-app .qb-tbc-price input { text-align: center; font-variant-numeric: tabular-nums; }
.qb-review-group-cell { justify-self: stretch; min-width: 0; display: flex; justify-content: center; text-align: center; }
.qb-app .qb-cart-line > .qb-icon-button { justify-self: center; width: 32px; }
.qb-trash-icon { width: 16px; height: 16px; display: block; object-fit: contain; }
.qb-group-tag { max-width: 108px; height: 28px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 6px; background: var(--qb-inset); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.qb-app .qb-cart-product small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-app .qb-line-edit-state { grid-column: 2 / -1; }
.qb-customer-preview { flex: 1; min-height: 0; background: var(--qb-canvas); }
.qb-preview-content { height: 100%; }
.qb-preview-toolbar { height: 52px; display: flex; align-items: center; padding: 0 22px; }
.qb-preview-toolbar span { color: var(--qb-muted); font-size: 11px; }
.qb-preview-toolbar .qb-button { margin-left: auto; }
.qb-preview-content iframe { display: block; width: calc(100% - 44px); height: calc(100% - 70px); margin: 0 22px 18px; border: 1px solid var(--qb-border); background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.07); }
.qb-margin-approval-gate { min-height: 100%; display: grid; place-items: center; padding: 32px; }
.qb-margin-approval-gate[hidden] { display: none; }
.qb-margin-approval-card { width: min(520px, 100%); display: grid; justify-items: center; gap: 12px; padding: 36px; border: 1px solid #e3c86d; border-radius: 12px; background: #fffaf0; text-align: center; box-shadow: 0 10px 24px rgba(0,0,0,.06); }
.qb-margin-approval-card h2 { color: var(--qb-warning); font-size: 20px; }
.qb-margin-approval-card p { max-width: 430px; color: var(--qb-secondary); }
.qb-margin-approval-card small { min-height: 17px; color: var(--qb-muted); }
.qb-app .qb-cart-bar { height: 64px; padding: 0 18px; cursor: default; }
.qb-app .qb-cart-copy { width: auto; }
.qb-app .qb-cart-totals { gap: 26px; }
.qb-app .qb-cart-totals .qb-grand-total b { font-size: 16px; }
.qb-popover { width: 350px; padding: 18px; gap: 14px; }
.qb-popover[open] { display: flex; flex-direction: column; }
.qb-popover::backdrop { background: rgba(23,23,23,.18); }
.qb-popover-head { display: flex; align-items: center; gap: 8px; }
.qb-popover-head b { font-size: 14px; }
.qb-popover-head .qb-icon-button { margin-left: auto; }
.qb-popover > small, .qb-popover div > small { color: var(--qb-muted); font-size: 10px; text-transform: uppercase; }
.qb-popover p { font-size: 12px; line-height: 18px; }
.qb-inset-note { padding: 12px; border-radius: 8px; background: var(--qb-inset); }
.qb-approval-dialog { width: min(500px, calc(100vw - 32px)); }
.qb-group-dialog { width: min(620px, calc(100vw - 32px)); }
.qb-group-dialog form { display: flex; flex-direction: column; }
.qb-group-body { display: grid; gap: 7px; padding: 20px; }
.qb-group-body label { margin-top: 6px; font-size: 10px; font-weight: 700; }
.qb-group-body input, .qb-group-body textarea { width: 100%; border: 1px solid var(--qb-border-strong); border-radius: 8px; background: #fff; padding: 9px 11px; }
.qb-group-body textarea { min-height: 86px; resize: vertical; }
.qb-group-items { max-height: 250px; overflow: auto; display: grid; border: 1px solid var(--qb-border); border-radius: 8px; }
.qb-group-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: center; padding: 9px 11px; border-bottom: 1px solid var(--qb-border); cursor: pointer; }
.qb-group-item:last-child { border-bottom: 0; }
.qb-group-item input { width: 16px; height: 16px; padding: 0; }
.qb-group-item span { min-width: 0; display: grid; gap: 2px; }
.qb-group-item b, .qb-group-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qb-group-item small { color: var(--qb-muted); font-size: 9px; }
.qb-group-item.readonly { grid-template-columns: minmax(0, 1fr); cursor: default; background: var(--qb-inset); }
.qb-group-footer { justify-content: flex-end; gap: 8px; }
.qb-approval-body { display: grid; gap: 8px; padding: 20px; }
.qb-approval-body label { font-size: 10px; font-weight: 700; }
.qb-approval-body select { height: 40px; border: 1px solid var(--qb-border-strong); border-radius: 8px; background: #fff; padding: 0 11px; }
.qb-approval-footer { justify-content: flex-end; gap: 8px; }
.requirement-row.requirement-focus { position: relative; z-index: 1; background: #fff8dc; box-shadow: inset 4px 0 #b78a00, 0 0 0 2px #b78a00; scroll-margin-block: 80px; }
@media (max-width: 1250px) {
  .qb-app .qb-brand { width: 190px; }
  .qb-app .qb-header-field { width: 250px; }
  .qb-app .qb-version-field { width: 190px; }
  .qb-catalogue-workspace { --qb-catalogue-columns: minmax(0,1fr) 90px 88px 84px 100px; }
  .qb-product-table-head span:nth-child(3), .qb-item-logic { display: none; }
  .qb-product-table-head span:nth-child(4) { grid-column: 3; }
  .qb-product-table-head span:nth-child(5) { grid-column: 4; }
  .qb-product-table-head span:nth-child(6) { grid-column: 5; }
  .qb-item-price { grid-column: 3; }
  .qb-item-quantity { width: 84px; grid-column: 4; }
  .qb-item-actions { grid-column: 5; }
  .qb-item-requirements { grid-column: 2; }
  .qb-app .qb-item-copy { grid-column: 1; }
  .qb-app .qb-item-summary { min-height: 142px; }
  .qb-direct-item-state { grid-column: 4 / 6; }
  .qb-review-workspace { --qb-review-columns: 24px minmax(100px,1fr) 160px 68px 30px 54px 56px 54px 70px 68px 32px; --qb-review-gap: 4px; --qb-review-padding: 8px; }
  .qb-group-tag { max-width: 82px; }
}
@media (max-width: 900px) {
  .qb-main { width: calc(100% - 56px); }
  .qb-app .qb-conversation-pane { width: 56px; flex-basis: 56px; }
  .qb-app .qb-catalogue-search { width: 44%; }
  .qb-app .qb-cart-totals > div:not(.qb-grand-total) { display: none; }
}
