.buying-page { max-width: 1420px; margin: 8px auto 36px; }
.buying-page [hidden] { display: none !important; }
.buying-page--form { max-width: 920px; }
.buying-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 26px 0 30px; }
.buying-heading h1 { font-size: 28px; line-height: 1.25; margin: 0 0 9px; font-weight: 650; }
.buying-heading > div { min-width: 0; overflow-wrap: anywhere; }
.buying-heading p { margin: 0; color: var(--muted); line-height: 1.5; }
.buying-heading .buying-eyebrow { color: var(--brand-primary); font-size: 11px; font-weight: 750; margin-bottom: 10px; }
.buying-eyebrow span { color: var(--muted); font-weight: 500; }
.buying-page .button { width: auto; flex-shrink: 0; font-weight: 650; padding: 11px 18px; border-radius: 7px; }
.buying-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 20px; }
.buying-muted, .buying-field-help { color: var(--muted); font-size: 12px; line-height: 1.6; }
.buying-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; }
.buying-list, .buying-form, .buying-chat { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.buying-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 24px; border-bottom: 1px solid var(--border-soft); }
.buying-list-toolbar h2 { margin: 0; font-size: 16px; font-weight: 650; }
.buying-search { display: flex; align-items: center; gap: 12px; width: min(100%, 620px); flex-wrap: wrap; }
.buying-search .buying-plan-filter { display: inline-flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.buying-plan-filter input[type="checkbox"] { width: auto; margin: 0; }
.buying-search input[type="search"] { min-width: 0; flex: 1; }
.buying-page input:not([type="checkbox"]):not([type="hidden"]):not([type="submit"]), .buying-page textarea { background: white; border: 1px solid #d7d9de; border-radius: 6px; padding: 11px 12px; font-family: inherit; font-size: 14px; color: var(--text); width: 100%; min-height: 43px; }
.buying-page input::placeholder, .buying-page textarea::placeholder { color: #858991; }
.buying-page textarea { resize: vertical; line-height: 1.6; }
.buying-page input[type="checkbox"] { accent-color: var(--brand-primary); width: 16px; height: 16px; flex: 0 0 16px; }
.buying-empty { text-align: center; padding: 84px 24px 92px; }
.buying-empty-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid #e5d6e2; border-radius: 12px; color: var(--brand-primary); background: #faf6f9; font-size: 24px; margin-bottom: 15px; }
.buying-empty h2 { font-size: 20px; font-weight: 600; margin: 0 0 12px; }
.buying-empty p { max-width: 440px; margin: 0 auto 26px; color: var(--muted); line-height: 1.7; }
.buying-table-wrap { overflow-x: auto; }
.buying-table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.buying-table th { padding: 13px 24px; background: #fcfcfd; color: var(--muted); font-weight: 550; white-space: nowrap; }
.buying-table td { padding: 23px 24px; border-top: 1px solid var(--border-soft); vertical-align: middle; }
.buying-table tbody tr:hover { background: #fdfafd; }
.buying-plan-link { display: block; font-size: 15px; font-weight: 650; margin-bottom: 7px; }
.buying-subline { color: var(--muted); font-size: 12px; }
.buying-pagination { display: flex; justify-content: center; gap: 24px; padding: 20px; border-top: 1px solid var(--border-soft); font-size: 13px; }
.buying-page-note { margin: 18px 2px; color: var(--muted); font-size: 12px; }
.buying-form-section { padding: 28px 32px; border-bottom: 1px solid var(--border-soft); }
.buying-section-heading { margin-bottom: 22px; }
.buying-section-heading h2 { font-size: 17px; margin: 0 0 7px; font-weight: 650; }
.buying-section-heading p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.6; }
.buying-field { min-width: 0; }
.buying-field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.buying-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 20px; }
.buying-field-help { margin: 12px 0 0; }
.buying-reference-status { display: flex; gap: 12px; align-items: center; margin: 10px 0 18px; color: var(--muted); font-size: 12px; }
.buying-reference-status .link-button { font-size: 12px; padding: 0; flex-shrink: 0; }
.buying-reference-status[data-state="error"] { color: var(--warning-text); align-items: flex-start; line-height: 1.6; }
.buying-page input[readonly] { background: #f8f8fa !important; color: var(--muted) !important; }
.buying-hierarchies { border: 1px solid var(--border-soft); border-radius: 6px; }
.buying-hierarchies summary { display: flex; justify-content: space-between; cursor: pointer; padding: 14px 16px; font-size: 13px; list-style: none; gap: 12px; }
.buying-hierarchies summary::-webkit-details-marker, .buying-guidance summary::-webkit-details-marker { display: none; }
.buying-hierarchy-tools { display: flex; align-items: center; gap: 14px; padding: 0 16px 12px; }
.buying-hierarchy-tools input { flex: 1; min-width: 0; }
.buying-hierarchy-tools button { white-space: nowrap; font-size: 12px; }
.buying-hierarchy-options { max-height: 270px; overflow-y: auto; padding: 0 16px 12px; }
.buying-hierarchy-options label { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border-soft); cursor: pointer; }
.buying-hierarchy-options strong { display: block; font-size: 13px; font-weight: 500; }
.buying-hierarchy-options small { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.buying-guidance > summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; gap: 20px; list-style: none; }
.buying-guidance summary strong { display: block; font-size: 16px; font-weight: 650; }
.buying-guidance summary small { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; }
.buying-guidance-fields { margin-top: 26px; }
.buying-form-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 32px; background: #fdfdfe; }
.buying-form-footer > span { font-size: 12px; color: var(--muted); }
.buying-form-footer > div { display: flex; gap: 24px; align-items: center; font-size: 13px; }
.buying-form-errors { background: var(--warning-bg); color: var(--warning-text); padding: 20px 32px; font-size: 13px; line-height: 1.7; }
.buying-plan-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 32px; align-items: start; }
.buying-plan-context { padding: 0 4px; }
.buying-context-section { padding: 20px 0; border-bottom: 1px solid var(--border); }
.buying-context-section:first-child { padding-top: 4px; }
.buying-context-section h2 { margin: 0 0 24px; font-size: 14px; font-weight: 650; }
.buying-context-section dl { margin: 0; }
.buying-context-section dt { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.buying-context-section dd { font-size: 13px; line-height: 1.6; margin: 0 0 20px; }
.buying-context-section dd:last-child { margin-bottom: 0; }
.buying-context-section summary { cursor: pointer; font-size: 13px; }
.buying-context-section summary strong { font-weight: 550; }
.buying-scope-list { padding: 0; list-style: none; max-height: 360px; overflow-y: auto; }
.buying-scope-list li { padding: 9px 0; font-size: 12px; line-height: 1.5; }
.buying-scope-list small { display: block; color: var(--muted); margin-top: 3px; }
.buying-instructions { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.7; }
.buying-context-footnote { color: var(--muted); font-size: 11px; line-height: 1.8; margin: 18px 0; }
.buying-next-step { border-left: 2px solid #d9c4d4; padding-left: 15px; margin: 24px 0; }
.buying-next-step strong { font-size: 13px; font-weight: 600; }
.buying-next-step p { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 7px 0 0; }
.buying-chat-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; border-bottom: 1px solid var(--border-soft); }
.buying-chat-heading > div { display: flex; align-items: center; gap: 10px; }
.buying-chat-heading h2 { font-size: 15px; font-weight: 650; margin: 0; }
.buying-chat-heading button { font-size: 12px; }
.buying-ai-mark { color: var(--brand-primary); font-size: 22px; }
.buying-chat-history { display: flex; flex-wrap: wrap; gap: 12px; padding: 12px 26px; border-bottom: 1px solid var(--border-soft); font-size: 12px; }
.buying-chat-history [aria-current="page"] { font-weight: 700; color: var(--text); }
.buying-transcript { height: min(52vh, 600px); min-height: 310px; overflow-y: auto; padding: 26px; }
.buying-chat-empty { padding: 48px 0 30px; max-width: 470px; margin: 0 auto; text-align: center; }
.buying-chat-empty h3 { margin: 12px 0; font-size: 20px; font-weight: 550; }
.buying-chat-empty p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0 auto; max-width: 350px; }
.buying-starters { display: grid; gap: 10px; margin: 26px auto 0; }
.buying-starters button { background: white; color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 13px 16px; text-align: left; cursor: pointer; font: inherit; font-size: 13px; display: flex; justify-content: space-between; gap: 14px; }
.buying-starters button:hover { border-color: var(--brand-primary); background: #fdfafd; }
.buying-starters span { color: var(--brand-primary); }
.buying-composer { border-top: 1px solid var(--border-soft); padding: 20px 26px; }
.buying-composer textarea { border-color: transparent; background: #f8f8fa; }
.buying-composer-actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 12px 0 0; }
.buying-composer-actions > span { color: var(--muted); font-size: 11px; }
.buying-message-context { color: var(--muted); font-size: 11px; margin: 0 0 12px; }
.buying-transcript .ai-turn { margin-bottom: 30px; }
.buying-transcript .ai-message-text { font-size: 14px; }
@media (max-width: 960px) {
  .buying-plan-layout { grid-template-columns: 245px minmax(0,1fr); gap: 20px; }
  .buying-table th, .buying-table td { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 720px) {
  .buying-heading { align-items: flex-start; gap: 14px; margin: 22px 0; }
  .buying-heading h1 { font-size: 23px; }
  .buying-heading p { font-size: 13px; }
  .buying-plan-layout { grid-template-columns: minmax(0,1fr); }
  .buying-plan-context { display: contents; }
  .buying-context-section:first-child dl { display: grid; grid-template-columns: 120px 1fr; column-gap: 14px; }
  .buying-context-section h2 { margin-bottom: 14px; }
  .buying-context-section, .buying-context-footnote { margin: 0; padding: 10px 0; }
  .buying-next-step { display: none; }
  .buying-list-toolbar { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .buying-search { width: 100%; }
  .buying-form-section { padding: 24px 20px; }
  .buying-fields-row { grid-template-columns: minmax(0,1fr); gap: 18px; }
  .buying-form-footer { padding: 20px; flex-wrap: wrap; justify-content: flex-end; }
  .buying-form-footer > span { width: 100%; }
  .buying-chat-heading, .buying-composer, .buying-transcript { padding: 18px; }
  .buying-composer-actions > span { max-width: 160px; }
  .buying-hierarchy-tools { gap: 10px; flex-wrap: wrap; }
  .buying-hierarchy-tools input { flex-basis: 100%; }
}

.buying-form { overflow: visible; }
.buying-form-footer { border-radius: 0 0 10px 10px; }
.buying-picker { position: relative; }
.buying-picker-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 28px rgb(29 31 34 / 12%); overflow: hidden; }
.buying-picker-options { max-height: min(260px, 38vh); overflow-y: auto; overscroll-behavior: contain; padding: 5px; }
.buying-picker-option { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; width: 100%; border: 0; border-radius: 4px; padding: 11px 12px; background: transparent; color: var(--text); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.buying-picker-option span { min-width: 0; overflow-wrap: anywhere; }
.buying-picker-option small { color: var(--muted); font-size: 11px; max-width: 35%; overflow-wrap: anywhere; text-align: right; }
.buying-picker-option[aria-selected="true"] { background: var(--brand-primary-soft); color: var(--brand-primary-dark); }
.buying-picker-status { border-top: 1px solid var(--border-soft); color: var(--muted); font-size: 11px; line-height: 1.5; padding: 9px 16px; }

/* Plan-led workspace: assignment / selections / conversation. */
.app-shell__main:has(.buying-plan-page) { max-width: none; padding: 24px 28px; }
.buying-page.buying-plan-page { max-width: none; margin-top: 0; }
.plan-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 24px 0; }
.plan-page-heading h1 { font-size: 26px; font-weight: 650; margin: 8px 0; }
.plan-page-heading .buying-eyebrow { font-size: 10px; font-weight: 650; color: var(--brand-primary); margin: 0; }
.plan-page-heading .buying-eyebrow span { color: var(--muted); font-weight: 500; }
.plan-page-heading > div > p:last-child { font-size: 13px; color: var(--muted); margin: 0; }
.plan-page-heading p strong { color: var(--text); font-weight: 500; }
.plan-view-controls { display: flex; align-items: center; gap: 8px; }
.plan-view-controls > button { font: inherit; font-size: 12px; cursor: pointer; background: white; color: var(--muted); padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; }
.plan-view-controls > button[aria-expanded="true"] { color: var(--brand-primary); background: var(--brand-primary-soft); border-color: #ddc8d8; }
.plan-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; border-block: 1px solid var(--border); padding: 20px 0; margin-bottom: 28px; }
.plan-overview > div { border-right: 1px solid var(--border); padding-left: 16px; }
.plan-overview > div:first-child { padding-left: 0; }
.plan-overview > div:last-child { border: 0; }
.plan-overview span, .plan-overview small { display: block; color: var(--muted); font-size: 12px; }
.plan-overview strong { display: block; font-size: 25px; font-weight: 600; margin: 8px 0; font-variant-numeric: tabular-nums; }
.plan-overview small { font-size: 11px; }
.plan-workspace-layout { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(540px, 2.3fr) minmax(310px, 1.25fr); gap: 24px; align-items: start; }
.plan-hide-details .plan-workspace-layout { grid-template-columns: minmax(540px, 2.3fr) minmax(310px, 1.25fr); }
.plan-hide-conversation .plan-workspace-layout { grid-template-columns: minmax(180px, .8fr) minmax(540px, 3.55fr); }
.plan-hide-details.plan-hide-conversation .plan-workspace-layout { grid-template-columns: minmax(0, 1fr); }
.buying-plan-page .buying-plan-context { min-width: 0; padding-right: 4px; }
.buying-plan-page .buying-context-section:first-child { padding-top: 6px; }
.buying-plan-page .buying-context-section h2 { margin-bottom: 18px; }
.buying-plan-page .buying-context-section dd { margin-bottom: 16px; overflow-wrap: anywhere; }
.plan-workspace { min-width: 0; background: white; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.plan-work-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px; }
.plan-work-heading h2 { font-size: 17px; margin: 0 0 6px; font-weight: 650; }
.plan-work-heading p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.5; }
.buying-plan-page .plan-work-heading .button { font-size: 12px; padding: 10px 12px; }
.plan-hierarchies { display: flex; overflow-x: auto; gap: 8px; padding: 0 20px 18px; }
.plan-hierarchies button { background: #fafafb; border: 1px solid var(--border); color: var(--text); border-radius: 6px; cursor: pointer; flex: 0 0 auto; text-align: left; padding: 10px 12px; max-width: 240px; font: inherit; }
.plan-hierarchies button[aria-pressed="true"] { border-color: var(--brand-primary); background: var(--brand-primary-soft); }
.plan-hierarchies strong { display: block; font-size: 12px; font-weight: 600; }
.plan-hierarchies small { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; }
.plan-selection-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--border-soft); }
.plan-selection-heading h3 { font-size: 13px; font-weight: 600; margin: 0; }
.plan-selection-heading > span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.plan-selections th { font-size: 10px; padding: 10px 12px; }
.plan-selections td { padding: 13px 12px; }
.plan-selections td:first-child { min-width: 175px; width: 45%; }
.plan-selections td strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.5; }
.plan-line-sub { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 4px; }
.plan-line-warning { display: block; color: #956117; font-size: 10px; line-height: 1.5; margin-top: 5px; }
.buying-page.buying-plan-page .plan-selections input[type="number"] { width: 82px; min-height: 34px; padding: 6px 8px; font-size: 12px; }
.buying-page.buying-plan-page .plan-selections input[name="quantity"] { width: 64px; }
.plan-line-total { font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 12px; font-weight: 550; }
.plan-row-actions { display: grid; gap: 8px; white-space: nowrap; }
.plan-row-actions .link-button { font-size: 10px; text-align: left; padding: 0; }
.plan-selection-total { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 20px; font-size: 12px; border-top: 1px solid var(--border-soft); }
.plan-selection-total > span { color: var(--muted); }
.plan-selection-empty { text-align: center; padding: 42px 25px 52px; }
.plan-selection-empty h3 { font-size: 18px; font-weight: 550; margin: 14px 0; }
.plan-selection-empty p { color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 340px; margin: 0 auto 22px; }
.plan-editor-foot { border-top: 1px solid var(--border-soft); padding: 14px 20px; font-size: 11px; color: var(--muted); line-height: 1.6; }
.plan-editor-foot details { margin-top: 14px; }
.plan-editor-foot summary { cursor: pointer; }
.plan-editor-foot small { display: block; }
.plan-removed-line { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 14px; }
.buying-plan-page .buying-chat { min-width: 0; position: sticky; top: 16px; }
.buying-plan-page .buying-chat-heading, .buying-plan-page .buying-composer, .buying-plan-page .buying-transcript { padding: 18px; }
.buying-plan-page .buying-chat-heading h2 { font-size: 14px; }
.buying-plan-page .buying-chat-heading button { font-size: 11px; }
.buying-plan-page .buying-transcript { min-height: 250px; height: 37vh; }
.buying-plan-page .buying-chat-empty { padding: 20px 0; }
.buying-plan-page .buying-chat-empty h3 { font-size: 17px; }
.buying-plan-page .buying-starters { margin-top: 18px; }
.buying-plan-page .buying-starters button { font-size: 12px; padding: 10px 12px; }
.buying-plan-page .buying-composer-actions { flex-wrap: wrap; gap: 10px; }
.buying-plan-page .buying-composer-actions > span { font-size: 10px; }
.buying-plan-page .buying-composer .button { padding: 9px 12px; font-size: 12px; }
.buying-page.buying-plan-page .sandbox-product-actions input[type="number"] { width: 80px; min-height: 36px; padding: 8px 10px; font-size: 13px; }
@media (max-width: 1190px) {
  .plan-workspace-layout, .plan-hide-details .plan-workspace-layout { grid-template-columns: minmax(0, 1fr) minmax(290px, .55fr); }
  .buying-plan-page .buying-plan-context { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid var(--border); }
  .buying-plan-page .buying-plan-context .buying-context-section { flex: 1 1 180px; border: 0; padding-top: 0; }
  .plan-hide-conversation .plan-workspace-layout { grid-template-columns: minmax(0, 1fr); }
  .plan-page-heading { flex-wrap: wrap; }
}
@media (max-width: 800px) {
  .app-shell__main:has(.buying-plan-page) { padding: 18px 14px; }
  .plan-workspace-layout, .plan-hide-details .plan-workspace-layout { grid-template-columns: minmax(0, 1fr); }
  .buying-plan-page .buying-chat { position: static; }
  .plan-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .plan-overview > div { border: 0; padding: 0; }
  .plan-overview strong { font-size: 22px; }
  .plan-view-controls { flex-wrap: wrap; }
}

.buying-sales { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; margin-bottom: 24px; overflow: hidden; }
.buying-sales-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px 0; }
.buying-sales-heading h2 { font-size: 15px; font-weight: 650; margin: 0 0 5px; }
.buying-sales-heading p, .buying-sales-refresh { font-size: 11px; color: var(--muted); margin: 0; }
.buying-sales-refresh { display: flex; gap: 14px; align-items: center; }
.buying-sales-refresh button, .buying-sales-status button { font-size: 11px; padding: 0; }
.buying-sales-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 22px; }
.buying-sales-metrics span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.buying-sales-metrics strong { display: block; font-size: clamp(19px, 1.7vw, 28px); font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.buying-sales-metrics small { display: block; font-size: 10px; line-height: 1.6; color: var(--muted); }
.buying-sales-division { display: flex; gap: 24px; align-items: baseline; flex-wrap: wrap; padding: 13px 22px; background: #fafafb; border-top: 1px solid var(--border-soft); font-size: 12px; }
.buying-sales-division strong { font-weight: 600; margin-right: auto; }
.buying-sales-division small { color: var(--muted); margin-left: 5px; }
.buying-inventory-coverage { max-width: 210px; white-space: normal; }
.buying-sales-up { color: #246747; }
.buying-sales-down { color: #9f433e; }
.buying-sales-details, .buying-sales-method { border-top: 1px solid var(--border-soft); }
.buying-sales-details > summary, .buying-sales-method > summary { padding: 13px 22px; font-size: 12px; cursor: pointer; }
.buying-sales-details > summary > span { color: var(--muted); margin-left: 14px; font-size: 11px; }
.buying-sales-table th, .buying-sales-table td { font-size: 11px; padding: 11px 22px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.buying-sales-table th:first-child { text-align: left; white-space: normal; min-width: 150px; }
.buying-sales-table tbody th { color: var(--text); background: transparent; border-top: 1px solid var(--border-soft); font-weight: 550; }
.buying-sales-table small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.buying-sales-method > summary { font-size: 10px; color: var(--muted); }
.buying-sales-method p { font-size: 11px; line-height: 1.7; color: var(--muted); margin: 0 22px 14px; max-width: 1050px; }
.buying-sales-warning, .buying-sales-status { padding: 12px 22px; font-size: 12px; line-height: 1.6; margin: 0; }
.buying-sales-warning { color: #805311; background: #fffaf0; }
.buying-forecast h2 .pill { margin-left: 7px; vertical-align: middle; font-size: 10px; }
.buying-sales-metrics .buying-forecast-denominator { display: inline; font-size: 13px; font-weight: 400; }
.buying-sales-metrics .buying-forecast-confidence { font-size: 20px; }
.buying-sales-status { color: var(--muted); }
@media (max-width: 800px) {
  .buying-sales-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 18px; }
  .buying-sales-heading { align-items: start; padding: 18px 18px 0; }
  .buying-sales-refresh { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .buying-sales-refresh span { text-align: right; }
  .buying-sales-division { gap: 10px 18px; padding: 13px 18px; }
  .buying-sales-division strong { flex-basis: 100%; }
}

.assortment-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); padding: 0 24px; }
.assortment-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 12px 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.assortment-tabs button[aria-pressed="true"] { border-color: var(--brand-primary); color: var(--brand-primary); font-weight: 600; }
.assortment-board { padding: 22px 24px; font-size: 12px; line-height: 1.6; }
.assortment-summary { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.assortment-summary strong { display: block; font-size: 20px; font-weight: 600; }
.assortment-summary span, .assortment-caption { color: var(--muted); font-size: 12px; }
.assortment-caption { margin: 8px 0 16px; }
.assortment-overview-hint { padding: 0 24px; }
.assortment-evidence { color: var(--muted); font-size: 11px; margin: 0 0 20px; }
.assortment-evidence summary, .assortment-notes summary, .assortment-previous summary { cursor: pointer; }
.assortment-slots { display: grid; gap: 14px; }
.assortment-slot { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; min-width: 0; }
.assortment-slot-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 10px 16px; background: #f8f7f9; font-size: 11px; color: var(--muted); }
.assortment-slot-heading strong { color: var(--text); font-size: 13px; margin-right: 12px; }
.assortment-requirements { margin: 0; padding: 9px 16px 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.assortment-product { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 110px; gap: 18px; padding: 14px 16px; }
.assortment-product-name { min-width: 0; overflow-wrap: anywhere; }
.assortment-product-name > *, .assortment-sales > *, .assortment-previous > div > * { display: block; }
.assortment-product-name > strong { font-size: 13px; line-height: 1.5; font-weight: 600; }
.assortment-product-name span, .assortment-product-name small { color: var(--muted); font-size: 11px; margin-top: 5px; }
.assortment-sales span { color: var(--muted); font-size: 10px; }
.assortment-sales strong { font-size: 11px; font-weight: 550; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.assortment-action { font-size: 11px; color: var(--muted); }
.assortment-action label { display: block; font-size: 10px; }
.buying-page .assortment-action input[type="number"] { width: 100%; padding: 7px 8px; min-height: 34px; font-size: 12px; margin-top: 4px; }
.assortment-action .button { margin-top: 8px; padding: 7px 10px; font-size: 11px; width: 100%; }
.assortment-action .link-button { text-align: left; font-size: 11px; padding: 7px 0; }
.assortment-previous, .assortment-previous-empty, .assortment-empty, .assortment-notes { margin: 0; padding: 10px 16px; font-size: 11px; color: var(--muted); }
.assortment-previous { background: #faf9fb; border-top: 1px solid var(--border-soft); }
.assortment-previous > div { padding-top: 8px; }
.assortment-previous strong { color: var(--text); font-weight: 550; }
.assortment-warning { color: #855411; font-size: 11px; }
.assortment-slot > .assortment-warning, .assortment-slot > .assortment-caption { margin: 8px 16px 0; }
.assortment-board { container-type: inline-size; }
@container (max-width: 570px) {
  .assortment-product { grid-template-columns: minmax(0, 1fr) 110px; gap: 12px; }
  .assortment-product-name { grid-column: 1; }
  .assortment-sales { grid-column: 1; }
  .assortment-action { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 600px) {
  .assortment-board { padding: 16px; }
  .assortment-summary { flex-wrap: wrap; }
}

.sandbox-summary { display: flex; align-items: center; gap: 52px; padding: 0 0 28px; margin-bottom: 26px; border-bottom: 1px solid var(--border); }
.sandbox-summary > div > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.sandbox-summary strong { font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sandbox-save-state { margin-left: auto; color: var(--muted); font-size: 12px; }
.sandbox-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
.sandbox-sidebar { display: grid; gap: 5px; }
.sandbox-order-link { text-align: left; border: 1px solid transparent; border-radius: 7px; padding: 14px; background: transparent; font: inherit; cursor: pointer; color: var(--text); overflow-wrap: anywhere; }
.sandbox-order-link strong { display: block; font-weight: 600; font-size: 13px; line-height: 1.5; }
.sandbox-order-link small { display: block; color: var(--muted); font-size: 11px; margin-top: 6px; }
.sandbox-order-link.is-selected { background: white; border-color: #ddc8d8; box-shadow: 0 2px 5px rgb(40 20 35 / 3%); }
.sandbox-new-order { text-align: left; padding: 16px 14px; background: transparent; border: 0; color: var(--brand-primary); cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; }
.sandbox-sidebar details { font-size: 12px; color: var(--muted); padding: 15px 0; border-top: 1px solid var(--border); }
.sandbox-sidebar summary { cursor: pointer; padding: 0 14px; }
.sandbox-sidebar details .sandbox-order-link { width: 100%; }
.sandbox-editor { background: white; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.sandbox-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border-bottom: 1px solid var(--border-soft); }
.sandbox-editor-heading h2 { font-size: 18px; font-weight: 600; margin: 0 0 8px; overflow-wrap: anywhere; }
.sandbox-editor-heading p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.6; }
.sandbox-order-details { padding: 15px 24px; font-size: 12px; border-bottom: 1px solid var(--border-soft); }
.sandbox-order-details summary, .sandbox-removed summary, .sandbox-history summary { cursor: pointer; color: var(--muted); }
.sandbox-order-details form { display: flex; flex-wrap: wrap; gap: 15px; align-items: end; padding-top: 20px; }
.sandbox-order-details label { flex: 1 1 160px; }
.sandbox-order-details label:first-child { flex-basis: 100%; }
.sandbox-order-details input { margin-top: 7px; }
.sandbox-lines th { font-size: 11px; padding: 13px 18px; }
.sandbox-lines td { padding: 18px; }
.sandbox-lines td:first-child { min-width: 210px; width: 45%; }
.sandbox-lines td strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.5; }
.sandbox-line-sub { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; margin-top: 5px; }
.sandbox-line-warning { display: block; color: #956117; font-size: 11px; line-height: 1.5; margin-top: 6px; }
.buying-page.buying-sandbox .sandbox-lines input[type="number"] { width: 95px; min-height: 36px; padding: 8px 10px; font-size: 13px; }
.buying-page.buying-sandbox .sandbox-lines input[name="quantity"] { width: 78px; }
.sandbox-line-total { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 550; }
.sandbox-row-actions { display: grid; gap: 8px; white-space: nowrap; }
.sandbox-row-actions .link-button { font-size: 11px; text-align: left; padding: 0; }
.sandbox-totals { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--border-soft); padding: 20px 24px; font-size: 13px; }
.sandbox-totals span { color: var(--muted); }
.sandbox-removed { border-top: 1px solid var(--border-soft); padding: 18px 24px; font-size: 12px; }
.sandbox-removed > div { display: flex; justify-content: space-between; gap: 20px; padding-top: 16px; }
.sandbox-history { margin-top: 24px; font-size: 12px; }
.sandbox-history p { color: var(--muted); padding: 8px 0; }
.sandbox-history p > span { margin-right: 14px; }
.sandbox-history small { margin-left: 14px; }
.sandbox-notice { padding: 10px 14px; margin: -10px 0 20px; border-radius: 6px; background: #f1ecf0; font-size: 12px; line-height: 1.6; }
.sandbox-recovery { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 20px; font-size: 12px; }
.sandbox-dialog { width: min(520px, calc(100vw - 32px)); max-height: 88vh; border: 1px solid var(--border); border-radius: 12px; padding: 28px; color: var(--text); overflow: auto; box-shadow: 0 20px 70px rgb(20 15 20 / 18%); }
.sandbox-dialog::backdrop { background: rgb(30 25 30 / 25%); }
.sandbox-dialog--products { width: min(940px, calc(100vw - 32px)); }
.sandbox-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.sandbox-dialog h2 { font-size: 21px; font-weight: 600; margin: 0; }
.sandbox-dialog header p:not(.buying-eyebrow) { font-size: 12px; line-height: 1.5; margin: 9px 0 0; color: var(--muted); }
.sandbox-dialog .buying-eyebrow { font-size: 10px; font-weight: 650; color: var(--brand-primary); margin: 0 0 9px; }
.sandbox-close { border: 0; background: transparent; font-size: 24px; color: var(--muted); cursor: pointer; padding: 0 5px; }
.sandbox-dialog .buying-field, .sandbox-dialog form > label { display: block; margin: 20px 0; font-size: 13px; }
.sandbox-dialog form > label > input, .sandbox-dialog form > label > select { margin-top: 8px; }
.sandbox-dialog form > .button { margin-top: 16px; }
.sandbox-dialog select { font: inherit; font-size: 12px; border: 1px solid var(--border); border-radius: 6px; background: white; color: var(--text); padding: 10px; width: 100%; }
.sandbox-dialog-feedback { background: #f1ecf0; border-radius: 6px; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.sandbox-search { display: flex; align-items: center; gap: 12px; }
.sandbox-dialog .sandbox-search > .button { margin: 0; }
.sandbox-search-results { margin-top: 24px; }
.sandbox-product { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; border-top: 1px solid var(--border-soft); }
.sandbox-product strong { font-size: 14px; font-weight: 600; line-height: 1.6; }
.sandbox-product span, .sandbox-product small { display: block; font-size: 11px; line-height: 1.6; color: var(--muted); margin-top: 4px; }
.sandbox-product-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; flex: 0 0 250px; }
.sandbox-product-actions select { flex-basis: 100%; }
.buying-page.buying-sandbox .sandbox-product-actions input[type="number"] { width: 80px; min-height: 36px; padding: 8px 10px; font-size: 13px; }
.sandbox-product-actions .button { padding: 8px 14px; }
.sandbox-search-empty { text-align: center; padding: 40px 24px; font-size: 13px; line-height: 1.7; color: var(--muted); }
.sandbox-search-empty h3 { color: var(--text); font-weight: 550; }
.sandbox-pagination { display: flex; justify-content: center; align-items: center; gap: 30px; padding-top: 20px; font-size: 12px; }
@media (max-width: 960px) {
  .sandbox-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .sandbox-sidebar { display: flex; flex-wrap: wrap; }
  .sandbox-sidebar .sandbox-order-link { flex: 1 1 160px; }
  .sandbox-sidebar details { width: 100%; }
}
@media (max-width: 600px) {
  .buying-sandbox .buying-heading { flex-wrap: wrap; }
  .sandbox-summary { gap: 20px; flex-wrap: wrap; }
  .sandbox-summary strong { font-size: 20px; }
  .sandbox-save-state { width: 100%; margin: 0; }
  .sandbox-editor-heading { padding: 20px; flex-wrap: wrap; }
  .sandbox-dialog { padding: 20px; }
  .sandbox-product { align-items: stretch; flex-direction: column; gap: 14px; }
  .sandbox-product-actions { flex: auto; justify-content: flex-start; }
}

/* Sales history groups comparable measures by year without changing other panels. */
.buying-sales-years { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 22px; gap: 28px; }
.buying-sales-year { min-width: 0; }
.buying-sales-year + .buying-sales-year { border-left: 1px solid var(--border); padding-left: 28px; }
.buying-sales-year h3 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.buying-sales-year-dates { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.buying-sales-year dl { display: grid; gap: 14px; margin: 0 0 20px; }
.buying-sales-year dl > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.buying-sales-year dt { color: var(--text); font-size: 16px; }
.buying-sales-year dd { margin: 0; font-size: clamp(24px, 1.8vw, 28px); font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.buying-sales-year small { display: block; color: var(--muted); font-size: 10px; line-height: 1.6; }
@media (max-width: 960px) {
  .buying-sales-years { grid-template-columns: 1fr; gap: 20px; padding: 18px; }
  .buying-sales-year + .buying-sales-year { border-left: 0; border-top: 1px solid var(--border); padding: 20px 0 0; }
}

/* Hierarchy comparisons follow the same year grouping as the sales header. */
.buying-hierarchy-comparison { table-layout: fixed; min-width: 860px; }
.buying-hierarchy-comparison th, .buying-hierarchy-comparison td { width: 25%; vertical-align: top; white-space: normal; text-align: left; padding: 18px 22px; }
.buying-hierarchy-comparison thead th { font-weight: 600; }
.buying-hierarchy-comparison td + td { border-left: 1px solid var(--border-soft); }
.buying-hierarchy-metrics { display: grid; gap: 10px; margin: 0; }
.buying-hierarchy-metrics > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.buying-hierarchy-metrics dt { color: var(--muted); }
.buying-hierarchy-metrics dd { margin: 0; text-align: right; white-space: nowrap; }
.buying-hierarchy-metrics > div:first-child dd { font-weight: 600; }
.buying-cost-label { font-size: 10px; color: #875700; }



.buying-inventory-cohort { margin: 18px 0; }
.buying-inventory-cohort + .buying-inventory-cohort { border-top: 1px solid var(--border-soft); padding-top: 18px; }
.buying-inventory-cohort h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; color: var(--text); }
.buying-inventory-cohorts strong { font-size: clamp(24px, 1.8vw, 28px); }

.buying-inventory-totals { border-top: 1px solid var(--border); background: #f8f8fa; }
.buying-inventory-totals strong { font-size: clamp(24px, 1.8vw, 28px); }

/* One disclosure collects supporting evidence for each analytics panel. */
.buying-panel-details { border-top: 1px solid var(--border-soft); }
.buying-panel-details > summary { padding: 13px 22px; cursor: pointer; font-size: 12px; color: var(--muted); }
.buying-panel-details p, .buying-panel-details small { font-size: 12px; line-height: 1.6; color: var(--muted); }
.buying-evidence-timestamp, .buying-evidence-section > p { margin: 12px 22px; }
.buying-evidence-section > h3 { margin: 20px 22px 12px; font-size: 14px; }
.buying-evidence-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 18px 22px; }
.buying-evidence-grid small { display: block; }
.buying-evidence-grid h3, .buying-evidence-grid > div > span { display: block; font-size: 12px; font-weight: 600; margin: 0 0 10px; }
.buying-evidence-cohort { margin: 14px 0; }
.buying-inventory-cohorts { padding-bottom: 8px; }
.buying-inventory-cohort { margin: 12px 0; }
.buying-inventory-cohort + .buying-inventory-cohort { padding-top: 12px; }
.buying-inventory-totals { padding-top: 12px; padding-bottom: 12px; }
.buying-sales-metrics strong .buying-forecast-denominator { display: inline; margin: 0; }
.buying-forecast-confidence > span { margin-top: 6px; }
@media (max-width: 960px) { .buying-evidence-grid { grid-template-columns: 1fr; } }

.buying-inventory-cohorts > div > span { font-size: 16px; font-weight: 600; color: var(--text); }
.buying-inventory-totals > div > span { font-size: 15px; font-weight: 600; color: var(--text); }
.buying-sales-metrics strong .buying-metric-unit { display: inline; margin: 0; font-size: 16px; font-weight: 400; color: var(--muted); }

.assortment-forecast { margin: 0 16px 16px; padding: 12px 14px; background: #f8f8fa; border: 1px solid var(--border-soft); border-radius: 6px; font-size: 13px; }
.assortment-forecast p { margin: 6px 0 0; color: var(--muted); line-height: 1.5; }

/* Slot/style boundaries stay stronger than mapping-date boundaries. */
.assortment-filters { display: flex; align-items: end; gap: 14px; margin: 16px 0; flex-wrap: wrap; }
.assortment-filters label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; }
.assortment-filters label:first-child { flex: 1; min-width: 220px; }
.assortment-filters input, .assortment-filters select { padding: 8px 10px; font: inherit; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); min-height: 36px; }
.assortment-filters > span { padding-bottom: 8px; font-size: 12px; color: var(--muted); }
.assortment-tables { gap: 26px; }
.assortment-tables .assortment-slot { border-left: 4px solid var(--brand-primary); }
.assortment-tables .assortment-slot-heading { background: var(--brand-primary-soft); color: var(--text); padding: 12px 14px; font-size: 13px; }
.assortment-tables .assortment-slot-heading strong { color: var(--brand-primary-dark); font-size: 16px; }
.assortment-style { margin-left: 14px; }
.assortment-period > h3 { margin: 0; padding: 8px 12px; background: #f5f4f7; border-top: 1px solid var(--border); font-size: 12px; }
.assortment-period > h3 span { font-weight: 400; color: var(--muted); }
.assortment-table-wrap { overflow-x: auto; }
.assortment-sku-table { border-collapse: collapse; width: 100%; min-width: 1000px; font-size: 12px; line-height: 1.4; }
.assortment-sku-table th, .assortment-sku-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-soft); }
.assortment-sku-table thead th { color: var(--muted); font-size: 11px; font-weight: 600; background: #fcfcfd; }
.assortment-sku-table tbody > tr:first-child:hover { background: #faf8fb; }
.assortment-sku-table th[scope="row"] { min-width: 180px; max-width: 260px; font-weight: 400; }
.assortment-sku-table th[scope="row"] > span, .assortment-sku-table td > span { display: block; color: var(--muted); margin-top: 3px; }
.assortment-sku-table .assortment-row-toggle { padding: 2px 0; margin-top: 3px; font-size: 11px; }
.assortment-sku-table .assortment-action { width: 120px; min-width: 120px; }
.assortment-sku-table .assortment-action label { font-size: 0; }
.buying-page .assortment-sku-table .assortment-action input[type="number"] { width: 76px; margin: 0; padding: 5px 7px; min-height: 30px; }
.assortment-sku-table .assortment-action .button { width: auto; margin: 4px 0 0; padding: 5px 8px; }
.assortment-sku-table .assortment-action .link-button { padding: 3px 0; }
.assortment-sku-table [data-assortment-row-details] > td { padding: 10px; background: #faf9fb; }
.assortment-sku-table .assortment-forecast { margin: 0; }
.assortment-tables [hidden] { display: none !important; }

.slot-sales-history { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 22px; padding: 8px 14px 12px; background: var(--brand-primary-soft); font-size: 13px; border-bottom: 1px solid var(--border); }
.slot-sales-history > span:first-child { color: var(--muted); }
.slot-sales-history details { flex-basis: 100%; }
.slot-sales-history summary { cursor: pointer; color: var(--brand-primary-dark); font-size: 12px; }
.slot-sales-history p { margin: 8px 0; }
.assortment-slot-toggle { width: 100%; border: 0; border-radius: 0; font-family: inherit; font-weight: 400; text-align: left; cursor: pointer; }
.assortment-slot-toggle:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: -3px; }
.assortment-slot-caret { display: inline-block; margin-right: 8px; font-size: 22px; line-height: 1; vertical-align: middle; color: var(--brand-primary-dark); }
.assortment-slot-toggle[aria-expanded="false"] .assortment-slot-caret { transform: rotate(-90deg); }
.assortment-slot-toggle-label { margin-left: 16px; color: var(--brand-primary-dark); font-weight: 600; }
.assortment-sku-table .assortment-suggestion { background: var(--brand-primary-soft); }
.assortment-suggestion strong { color: var(--brand-primary-dark); }

/* Subtle section landmarks; metric colors continue to express performance. */
.buying-panel-heading { padding: 16px 22px; border-bottom: 1px solid var(--border-soft); }
.buying-panel-heading--sales { background: #f7f0f6; }
.buying-panel-heading--inventory { background: #eef6f4; }
.buying-panel-heading--forecast { background: #eff4fa; }
.buying-panel-heading h2 { font-size: 18px; font-weight: 650; line-height: 1.35; color: var(--text); }
.buying-panel-heading h2 .pill { vertical-align: middle; }
.assortment-sku-table thead small { display: block; margin-top: 5px; font-size: 11px; font-weight: 400; line-height: 1.4; color: var(--muted); }
.assortment-sku-table .assortment-column-groups th[colspan] { background: #f5f4f7; color: var(--text); border-left: 1px solid var(--border); font-size: 12px; }
.store-size-coverage { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.store-size-coverage > summary { cursor: pointer; font-weight: 600; color: var(--brand-primary-dark); }
.store-size-coverage > summary span { margin-left: 12px; color: var(--muted); font-size: 12px; font-weight: 400; }
.store-size-coverage p { font-size: 12px; color: var(--muted); margin: 10px 0; }
.store-size-coverage h4 { margin: 18px 0 6px; font-size: 14px; }
.store-size-scroll { overflow-x: auto; max-width: 100%; }
.store-size-scroll table { width: 100%; border-collapse: collapse; font-size: 12px; }
.store-size-scroll th, .store-size-scroll td { padding: 9px 12px; border: 1px solid var(--border-soft); min-width: 100px; text-align: left; }
.store-size-scroll th { background: #f8f7f9; }
.store-size-scroll th[scope="row"] { position: sticky; left: 0; min-width: 130px; z-index: 1; }
.store-size-scroll small { display: block; font-weight: 400; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.store-size-scroll strong { font-size: 16px; }
.store-size-coverage .store-size-empty { background: #fff7e8; }
.store-size-coverage .store-size-empty-required { background: #fceeed; }
.store-size-legend { display: flex; flex-wrap: wrap; gap: 8px; }
.store-size-legend span { padding: 5px 8px; border-radius: 4px; color: var(--text); }
.store-size-scroll .store-size-incoming { background: #eaf6ed; color: #245735; border-radius: 3px; padding: 2px 4px; }
.store-size-dc { border-top: 3px solid var(--border); background: #f1f7fd; }
.store-size-dc th[scope="row"] { background: #f1f7fd; }

.buying-ai-proposal { margin: 12px 0; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: #faf7fb; }
.buying-ai-proposal h3 { margin-top: 0; }
.buying-ai-proposal-line { padding: 12px 0; border-top: 1px solid var(--border); }
.buying-ai-proposal-line p { margin: 6px 0; }
.buying-ai-proposal form { margin: 12px 0 6px; }
.buying-composer select[data-buying-ai-focus] { width: 100%; margin: 6px 0 12px; }
.data-table td strong.buying-on-hand-label {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
}

.buying-on-hand-label--assorted {
  background-color: #f3faf5;
}

.buying-on-hand-label--non-assorted {
  background-color: #fff5f4;
}

.buying-on-hand-totals { display: grid; grid-template-columns: repeat(4, minmax(75px, 1fr)); gap: 8px; }
.buying-location-legend { margin-top: 6px; font-size: 12px; font-weight: 400; text-transform: none; }
.buying-location-strip { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 10px; }
.buying-location { padding: 3px 5px; text-align: center; border-radius: 3px; font-size: 12px; line-height: 1.4; }
.buying-location-number { font-weight: 700; }
.buying-location-quantity { white-space: nowrap; font-variant-numeric: tabular-nums; }
.buying-location--warehouse { background: #f1f7fd; }
.data-table td .buying-location-quantity span { display: inline; margin: 0; font-size: inherit; color: inherit; }
.data-table td .buying-location-quantity .buying-location-positive-stock,
.data-table td .buying-location-quantity .buying-location-incoming { background: #24834b; color: #ffffff; border-radius: 2px; padding: 0 2px; }

.assortment-filters .buying-style-toggle { display: flex; align-items: center; gap: 6px; }
.assortment-filters .buying-style-toggle input { width: auto; margin: 0; }
.buying-inventory-style { margin-bottom: 8px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.buying-inventory-style > summary { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; background: #f7f5f8; }
.buying-inventory-style > summary::before { content: "▸"; color: var(--brand-primary); }
.buying-inventory-style[open] > summary::before { content: "▾"; }
.buying-inventory-style > summary > div:first-of-type { flex: 1; }
.buying-inventory-style > summary strong { display: block; }
.buying-inventory-style > summary .buying-on-hand-totals { flex: 1; }
@media (max-width: 700px) {
  .buying-inventory-style > summary { flex-wrap: wrap; }
  .buying-inventory-style > summary .buying-on-hand-totals { flex-basis: 100%; }
}

.buying-po-group > summary { flex-wrap: wrap; }
.buying-po-dates { min-width: 110px; }
.buying-po-lines { font-size: 13px; }
.buying-po-lines td { vertical-align: top; }
.buying-po-lines td p { margin: 4px 0; }
.buying-po-lines td small { display: block; }

.data-table td .buying-location-quantity .buying-location-zero-stock { background: #f5a6a0; border-radius: 2px; padding: 0 2px; }
.data-table td .buying-location-quantity .buying-location-zero-transfer { background: #f9da61; border-radius: 2px; padding: 0 2px; }

.assortment-filters > button { padding: 8px 10px; min-height: 36px; font-size: 12px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); cursor: pointer; }
.assortment-filters > button[aria-pressed="true"] { border-color: var(--brand-primary); background: var(--brand-primary-soft); color: var(--brand-primary); }

.buying-sales-report-filters .buying-sales-report-search { flex: 1; min-width: 240px; }
.buying-sales-report-filters .buying-style-toggle input { min-height: 0; width: 16px; height: 16px; padding: 0; accent-color: var(--brand-primary); }
.buying-sales-report-filters input[type="submit"] { width: auto; }

.buying-sales-vendors { min-width: 960px; }
.buying-sales-vendors tbody th { text-transform: none; font-weight: 600; }

.sales-period-cards { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.sales-period-cards > div { padding: 12px 16px; border-radius: 8px; }
.sales-history-cell { background: #f0f6fc; }
.sales-future-cell { background: #f7eff8; }
.sales-mapping-status { font-weight: 600; margin: 3px 0; }
.sales-mapping-status--full { color: #23734b; }
.sales-mapping-status--none { color: #a23d39; }
.sales-mapping-status--partial, .sales-mapping-status--mixed { color: #805710; }
.sales-mapping-muted { color: var(--muted); }
.sales-comparables-cell { min-width: 260px; }
.sales-comparable { margin: 5px 0 10px; }
.sales-comparable--same_slot { color: #195a9d; }
.sales-comparable--comparable { color: var(--brand-primary); }
.sales-style-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 16px; background: white; }
.sales-style-heading { display: flex; justify-content: space-between; gap: 16px; padding: 14px; background: var(--surface); }
.sales-style-group { margin: 0; border: 0; }
.sales-style-comparison { display: grid; grid-template-columns: 1fr 1fr 2fr; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: white; }
.sales-style-comparison > div { padding: 10px 14px; }
.sales-style-comparison small { color: var(--muted); }
@media (max-width: 800px) { .sales-style-comparison { grid-template-columns: 1fr; } }

.sales-vendor-summary > summary { cursor: pointer; font-size: 18px; font-weight: 600; padding: 12px 0; }
.sales-vendor-summary > summary span { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.sales-breakdown-layout { display: grid; grid-template-columns: 164px minmax(0, 1fr); align-items: start; gap: 14px; scroll-margin-top: 16px; }
.sales-breakdown-content { min-width: 0; }
.sales-vendor-sidebar { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.sales-vendor-sidebar h3 { font-size: 15px; margin: 0; padding: 12px 10px 8px; }
.sales-vendor-sidebar a { display: block; padding: 8px 10px; font-size: 13px; text-decoration: none; border-left: 3px solid transparent; overflow-wrap: anywhere; }
.sales-vendor-sidebar a small { display: block; color: var(--muted); font-size: 11px; }
.sales-vendor-sidebar a:hover { background: var(--page-bg); }
.sales-vendor-sidebar a[aria-current="true"] { background: var(--brand-primary-soft); border-left-color: var(--brand-primary); font-weight: 700; }
@media (max-width: 800px) {
  .sales-breakdown-layout { grid-template-columns: minmax(0, 1fr); }
  .sales-vendor-sidebar { position: static; max-height: 180px; }
  .sales-vendor-sidebar nav { display: flex; flex-wrap: wrap; align-items: center; }
}
.sales-vendor-sort-button { appearance: none; background: none; border: 0; padding: 0; color: inherit; font: inherit; text-transform: inherit; cursor: pointer; text-align: left; white-space: nowrap; }
.sales-vendor-sort-button:hover { color: var(--brand-primary); }
.sales-vendor-sort-button:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 4px; }
