/* Studio visual language on the existing operational records.
   No data, permission, status or print behavior is changed here. */
@media screen {
 html:root #app #page {
  --sales-revenue:var(--ds-accent);
  --sales-positive:var(--ds-record-positive);
  --sales-negative:var(--ds-record-negative);
  --sales-pending:var(--ds-record-warning);
  --sales-cost:var(--ds-muted);
  --sales-commission:#087b88;
 }
 html:root[data-theme="dark"] #app #page { --sales-commission:#7cdbd9; }

 /* The six filters retain explicit slots; every control shares a baseline. */
 html:root #app #page[data-screen="sales"] #filter-form.sales-filters {
  grid-template-columns:145px minmax(190px,1.6fr) minmax(120px,.9fr) minmax(150px,1fr) minmax(125px,.8fr) auto;
  grid-template-areas:"period query type seller finance actions";
  align-items:end; gap:12px; padding:18px; margin:0 0 12px;
  border:1px solid var(--ds-line); border-radius:16px; background:var(--ds-surface); box-shadow:none;
 }
 html:root #app #page[data-screen="sales"] #filter-form>.field { gap:7px; font-size:11px; font-weight:650; color:var(--ds-muted); }
 html:root #app #page[data-screen="sales"] #filter-form :is(input[type="search"],.select-trigger,.period-picker>summary) {
  min-height:43px; height:43px; border-radius:10px; border:1px solid var(--ds-line);
  background:var(--ds-surface-alt); color:var(--ds-text); font-size:12px; font-weight:500; box-shadow:none;
 }
 html:root #app #page[data-screen="sales"] #filter-form .period-picker>summary { padding:6px 11px; }
 html:root #app #page[data-screen="sales"] #filter-form .period-picker>summary small { font-size:9px; letter-spacing:.06em; }
 html:root #app #page[data-screen="sales"] #filter-form .period-picker>summary strong { font-size:12px; font-weight:650; }
 html:root #app #page[data-screen="sales"] #filter-form .period-picker[open]>summary,
 html:root #app #page[data-screen="sales"] #filter-form :is(input[type="search"],.select-trigger):focus-visible { border-color:var(--ds-accent); outline:2px solid var(--ds-accent-soft); outline-offset:2px; }
 html:root #app #page[data-screen="sales"] #filter-form>.sales-filter-actions { align-items:center; gap:6px; }
 html:root #app #page[data-screen="sales"] #filter-form .sales-filter-actions :is(button,.bulk-mode-icon) { min-height:43px; height:43px; border-radius:10px; box-shadow:none; }
 html:root #app #page[data-screen="sales"] #filter-form:has(.sales-bulk-toolbar) { grid-template-areas:"period query type seller finance finance" "actions actions actions actions actions actions"; }
 html:root #app #page[data-screen="sales"] .applied-sales-period { margin:0 3px 20px; color:var(--ds-muted); font-size:11px; font-weight:450; line-height:1.65; }
 html:root #app #page[data-screen="sales"] .sales-list-toolbar { margin:0 0 16px; padding:0; border-bottom:1px solid var(--ds-line); }
 html:root #app #page[data-screen="sales"] .sales-situation-label { margin:0 14px 0 0; font-size:10px; color:var(--ds-muted); }
 html:root #app #page[data-screen="sales"] .sales-status-shortcuts { gap:4px 21px; align-items:center; }
 html:root #app #page[data-screen="sales"] .sales-status-shortcut { min-height:42px; padding:10px 2px 13px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; font-size:12px; font-weight:650; color:var(--ds-muted); }
 html:root #app #page[data-screen="sales"] .sales-status-shortcut[aria-pressed="true"] { color:var(--ds-accent); background:transparent; border-bottom-color:var(--ds-accent); }
 html:root #app #page[data-screen="sales"] .sales-status-shortcut:hover { color:var(--ds-text); background:transparent; }

 /* Compact identity and semantic amounts, with status and seller in the footer. */
 html:root #app #page #sales-results>.sales-records-compact { gap:10px; }
 html:root #app #page #sales-results[data-layout="list"] .sale-record-compact { grid-template-columns:minmax(0,1fr) minmax(310px,450px) 36px 32px; padding:15px 18px 0; gap:3px 12px; border:1px solid var(--ds-line); border-radius:14px; background:var(--ds-surface); box-shadow:none; transition:border-color .16s,background-color .16s; }
 html:root #app #page #sales-results .sale-record-compact:is(:hover,:focus-within) { background:color-mix(in srgb,var(--ds-accent) 2%,var(--ds-surface)); border-color:color-mix(in srgb,var(--ds-accent) 35%,var(--ds-line)); box-shadow:none; }
 html:root #app #page #sales-results .sale-record-compact:has([data-sale-select]:checked) { background:var(--ds-accent-soft); border-color:var(--ds-accent); box-shadow:inset 3px 0 var(--ds-accent); }
 html:root #app #page #sales-results .sale-record-reference { gap:6px 9px; }
 html:root #app #page #sales-results .sale-record-meta-line .sale-number { font-size:11px; font-weight:750; letter-spacing:.01em; }
 html:root #app #page #sales-results .sale-timing,
 html:root #app #page #sales-results .sale-timing>strong { font-size:10px; color:var(--ds-muted); font-weight:450; }
 html:root #app #page #sales-results .sale-record-compact-identity>strong { font-size:14px; font-weight:700; letter-spacing:-.015em; line-height:1.6; }
 html:root #app #page #sales-results .sale-record-compact-values { gap:0; }
 html:root #app #page #sales-results .sale-record-compact-values>span { padding:3px 11px; gap:6px; border-left-color:var(--ds-line); }
 html:root #app #page #sales-results .sale-record-compact-values small { font-size:10px; font-weight:450; line-height:1.4; }
 html:root #app #page #sales-results .sale-record-compact-values strong { font-size:14px; font-weight:750; line-height:1.4; letter-spacing:-.035em; font-variant-numeric:tabular-nums; }
 html:root #app #page #sales-results .sale-record-compact-footer { margin-top:11px; padding:8px 0 9px; border-top:1px solid var(--ds-line); gap:6px 10px; min-height:0; }
 html:root #app #page #sales-results .sale-record-markers :is(.sale-record-status-summary,.badge,.wholesale-badge) { border-radius:6px; font-size:10px; line-height:15px; min-height:22px; padding:2px 7px; border-color:color-mix(in srgb,currentColor 22%,transparent); }
 html:root #app #page #sales-results .sale-record-markers .sale-record-seller-badge { font-size:10px; line-height:18px; font-weight:500; }
 html:root #app #page #sales-results .sale-record-markers .sale-commission-paid { font-size:10px; min-height:22px; padding:2px 7px; border-radius:6px; }
 html:root #app #page #sales-results .sale-record-header>.sale-record-open,
 html:root #app #page .sale-actions-menu>summary { border-radius:8px; color:var(--ds-muted); }
 html:root #app #page #sales-results .sale-record-header>.sale-record-open:hover,
 html:root #app #page .sale-actions-menu[open]>summary { color:var(--ds-accent); background:var(--ds-accent-soft); }
 html:root #app #page .sale-actions-popover { border-color:color-mix(in srgb,var(--ds-accent) 26%,var(--ds-line)); border-radius:14px; padding:8px; box-shadow:0 18px 50px #0003; }
 html:root #app #page .sale-actions-item,
 html:root #app #page .sale-actions-disclosure>summary { font-size:12px; padding:10px 11px; border-radius:8px; }
 html:root #app #page .sale-menu-heading { padding:11px 10px 15px; }
 html:root #app #page .sale-record-products { margin-top:0; padding:10px 0 15px; }
 html:root #app #page .sale-record-products li { padding:12px 0; font-size:12px; }
 html:root #app #page .sale-record-products li small { font-size:10px; line-height:1.6; }

 /* Detail pages use the same restrained containers as the Studio prototype. */
 html:root #app #page .sale-detail-header { border-radius:16px; padding:22px 24px; }
 html:root #app #page .sale-detail-title-line h1 { font-size:25px; font-weight:750; letter-spacing:-.04em; }
 html:root #app #page .sale-detail-party { gap:6px 14px; font-size:11px; }
 html:root #app #page .sale-detail-summary { border-radius:16px; }
 html:root #app #page .sale-detail-metric { padding:20px 22px; }
 html:root #app #page .sale-detail-metric>span { font-size:11px; }
 html:root #app #page .sale-detail-metric>strong { font-size:24px; font-weight:750; letter-spacing:-.045em; }
 html:root #app #page .sale-detail-summary:not(.cancelled-detail-summary)>.sale-detail-metric:first-child>strong { color:var(--ds-accent); }
 html:root #app #page .sale-detail-summary:not(.cancelled-detail-summary)>.sale-detail-metric:nth-child(2)>strong { color:var(--ds-record-positive); }
 html:root #app #page .sale-detail-commission>strong { color:var(--sales-commission); font-size:21px; }
 html:root #app #page .sale-detail-section { border-radius:16px; border-color:var(--ds-line); }
 html:root #app #page .sale-detail-section>.panel-header { padding:17px 20px; min-height:58px; background:transparent; border-left:0; }
 html:root #app #page .sale-section-heading h2 { font-size:14px; font-weight:700; }
 html:root #app #page .sale-section-heading p { font-size:11px; line-height:1.5; }
 html:root #app #page .sale-section-icon { width:36px; height:36px; border:1px solid color-mix(in srgb,currentColor 18%,transparent); border-radius:11px; }
 html:root #app #page .sale-detail-products .sale-detail-product-list { padding:0 20px; gap:0; }
 html:root #app #page .sale-detail-products .sale-detail-product { padding:17px 0; border:0; border-top:1px solid var(--ds-line); border-radius:0; background:transparent; }
 html:root #app #page .sale-detail-products .sale-detail-product:first-child { border-top:0; }
 html:root #app #page .sale-detail-payment-list { padding:18px 20px; gap:14px; }
 html:root #app #page .sale-detail-payment { background:var(--ds-surface-alt); border-radius:12px; padding:16px; }

 /* Products and stock stay in rows, with aligned quantities and readable codes. */
 html:root #app #page .product-catalog { border:1px solid var(--ds-line); border-radius:16px; background:var(--ds-surface); box-shadow:none; }
 html:root #app #page .product-catalog .product-table th { padding:16px 18px; color:var(--ds-muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; font-weight:650; background:var(--ds-surface-alt); }
 html:root #app #page .product-catalog .product-table td { padding:17px 18px; border-color:var(--ds-line); vertical-align:middle; }
 html:root #app #page .product-catalog .product-table td.num { font-size:12px; font-weight:650; letter-spacing:-.02em; }
 html:root #app #page .product-catalog .product-price-cell { color:var(--ds-accent); }
 html:root #app #page .product-catalog .product-table tbody>tr:is(:hover,:focus-within) { background:color-mix(in srgb,var(--ds-accent) 3%,var(--ds-surface)); }
 html:root #app #page .product-catalog .product-table .product-stock-cell>.badge { padding:4px 8px; border-radius:6px; font-size:11px; font-weight:650; }
 html:root #app #page .inventory-product-identity .link-button { font-size:13px; line-height:1.6; font-weight:700; letter-spacing:-.01em; }
 html:root #app #page .inventory-product-meta { margin-top:5px; gap:5px 9px; font-size:10px; line-height:1.6; }
 html:root #app #page .product-sku { color:var(--ds-muted); font-size:10px; font-weight:450; letter-spacing:.015em; }
 html:root #app #page .inventory-serial-tag { padding:2px 6px; font-size:9px; border-radius:5px; letter-spacing:.035em; }
 html:root #app #page .inventory-page .inventory-overview { margin-bottom:22px; gap:10px; }
 html:root #app #page .inventory-page .inventory-overview>div { padding:10px 14px; border-radius:10px; font-size:11px; }
 html:root #app #page .inventory-page .inventory-overview strong { color:var(--ds-accent); font-size:15px; }
 html:root #app #page .inventory-page .inventory-workspace { border:1px solid var(--ds-line); border-radius:16px; background:var(--ds-surface); }
 html:root #app #page .inventory-page .inventory-navigation { padding:0 22px; gap:25px; border:0; border-bottom:1px solid var(--ds-line); border-radius:0; background:transparent; }
 html:root #app #page .inventory-page .inventory-navigation button { padding:15px 0; min-height:52px; border:0; border-bottom:2px solid transparent; border-radius:0; background:transparent; color:var(--ds-muted); font-size:12px; font-weight:650; }
 html:root #app #page .inventory-page .inventory-navigation button[aria-pressed="true"] { background:transparent; color:var(--ds-accent); border-bottom-color:var(--ds-accent); }
 html:root #app #page .inventory-page .inventory-navigation button span { padding:2px 6px; font-size:9px; border:1px solid var(--ds-line); border-radius:5px; }
 html:root #app #page .inventory-page .inventory-search { margin:20px 20px 0; }
 html:root #app #page .inventory-page .inventory-search>div { background:var(--ds-surface-alt); border-color:var(--ds-line); border-radius:10px; }
 html:root #app #page .inventory-page .inventory-search input { min-height:44px; font-size:12px; }
 html:root #app #page .inventory-page .stock-result-count { margin:16px 20px; padding:0; color:var(--ds-muted); font-size:10px; }
 html:root #app #page .inventory-list-view .inventory-list-header { padding:0 18px 12px; margin:0 12px; color:var(--ds-muted); font-size:10px; text-transform:uppercase; letter-spacing:.05em; }
 html:root #app #page .inventory-list-view .inventory-products { gap:8px; padding:0 12px 12px; }
 html:root #app #page .inventory-list-view .inventory-product { padding:17px 18px; border-radius:12px; background:var(--ds-surface); box-shadow:none; }
 html:root #app #page .inventory-product .stock-balance-value { color:var(--ds-record-positive); font-size:16px; font-weight:750; letter-spacing:-.03em; }
 html:root #app #page .inventory-product-costs dd { font-size:12px; font-weight:650; }
 html:root #app #page .inventory-product .inventory-unit-toggle { width:36px; min-width:36px; height:36px; min-height:36px; border-radius:9px; background:var(--ds-surface-alt); }
 html:root #app #page .inventory-unit-expansion { margin-top:3px; border-top:1px solid var(--ds-line); }
 html:root #app #page .inventory-unit-chips>li { padding:11px 13px; border-radius:9px; background:var(--ds-surface-alt); }
 html:root #app #page .inventory-unit-chips strong { font-size:12px; letter-spacing:.025em; }
 html:root #app #page .inventory-unit-chips small { font-size:10px; }
 html:root #app #page .inventory-detail-heading { padding:24px; border-radius:16px; }
 html:root #app #page .inventory-detail-heading h1 { font-size:24px; line-height:1.3; font-weight:750; letter-spacing:-.035em; }
 html:root #app #page .product-detail-summary { margin-bottom:22px; border-radius:16px; }
 html:root #app #page .product-detail-summary>div { padding:18px 20px; }
 html:root #app #page .product-detail-summary dd { font-size:22px; color:var(--ds-accent); }
 html:root #app #page .product-detail-navigation { border-radius:12px; padding:5px; background:var(--ds-surface); }
 html:root #app #page .product-detail-navigation>button[aria-selected="true"] { background:var(--ds-accent-soft); border-color:transparent; box-shadow:none; }
 html:root #app #page .inventory-history[data-layout="list"] .inventory-entry { border-radius:12px; box-shadow:none; }
 html:root #app #page .inventory-entry-identification strong { font-weight:750; }
 html:root #app #page .inventory-entry-body h3 { font-size:13px; font-weight:700; }
 html:root #app #page .inventory-page .inventory-help { padding:13px 17px; margin-top:18px; border-radius:12px; }

 @media(max-width:1400px) and (min-width:1101px) {
  html:root #app #page[data-screen="sales"] #filter-form.sales-filters { grid-template-columns:145px minmax(110px,.8fr) minmax(150px,1.2fr) minmax(120px,.9fr) auto; grid-template-areas:"query query query query query" "period type seller finance actions"; }
  html:root #app #page[data-screen="sales"] #filter-form.sales-filters:has(.sales-bulk-toolbar) { grid-template-areas:"query query query query query" "period type seller finance finance" "actions actions actions actions actions"; }
 }
 @media(max-width:1100px) {
  html:root #app #page[data-screen="sales"] #filter-form.sales-filters,
  html:root #app #page[data-screen="sales"] #filter-form.sales-filters:has(.sales-bulk-toolbar) { grid-template-columns:repeat(2,minmax(0,1fr)); grid-template-areas:"query query" "period type" "seller finance" "actions actions"; gap:12px; }
  html:root #app #page[data-screen="sales"] #filter-form>.sales-filter-actions { border-top:1px solid var(--ds-line); padding-top:12px; }
  html:root #app #page #sales-results[data-layout="list"] .sale-record-compact { grid-template-columns:minmax(0,1fr) minmax(270px,370px) 34px 30px; padding:13px 14px 0; gap:3px 6px; }
  html:root #app #page #sales-results .sale-record-compact-values>span { padding:3px 8px; }
  html:root #app #page #sales-results .sale-record-compact-values strong { font-size:13px; }
 }
 @media(max-width:850px) {
  html:root #app #page #sales-results[data-layout="list"] .sale-record-compact { grid-template-columns:minmax(0,1fr) 44px 44px; padding:14px 14px 0; gap:4px 5px; }
  html:root #app #page #sales-results .sale-record-compact-values { grid-column:1/-1; grid-row:3; padding-top:10px; }
  html:root #app #page #sales-results .sale-record-compact-footer { grid-row:4; margin-top:10px; }
  html:root #app #page #sales-results .sale-record-products { grid-row:5; }
  html:root #app #page #sales-results .sale-record-header>.sale-record-open { grid-column:2; width:44px; min-width:44px; height:44px; min-height:44px; }
  html:root #app #page #sales-results .sale-record-header>.sale-actions-menu { grid-column:3; }
  html:root #app #page .sale-actions-menu>summary { width:44px; height:44px; min-height:44px; }
 }
 @media(max-width:700px) {
  html:root #app #page[data-screen="sales"] #filter-form.sales-filters { padding:14px; border-radius:14px; gap:11px; }
  html:root #app #page[data-screen="sales"] .applied-sales-period { margin-bottom:15px; font-size:10px; }
  html:root #app #page[data-screen="sales"] .sales-situation-label { width:100%; margin:0 0 5px; }
  html:root #app #page[data-screen="sales"] .sales-status-shortcuts { gap:3px 14px; }
  html:root #app #page[data-screen="sales"] .sales-status-shortcut { font-size:11px; min-height:44px; }
  html:root #app #page #sales-results .sale-record-compact-values>span { padding:3px 8px; gap:4px; }
  html:root #app #page #sales-results .sale-record-compact-values>span:nth-child(odd) { padding-left:0; }
  html:root #app #page #sales-results .sale-record-compact-values.values-3>span:not(:first-child) { padding-left:8px; }
  html:root #app #page #sales-results .sale-record-compact-values small { font-size:10px; }
  html:root #app #page #sales-results .sale-record-compact-values strong { font-size:14px; }
  html:root #app #page .sale-detail-header { padding:18px; border-radius:14px; }
  html:root #app #page .sale-detail-title-line h1 { font-size:22px; }
  html:root #app #page .sale-detail-metric { padding:15px; }
  html:root #app #page .sale-detail-metric>strong { font-size:21px; }
  html:root #app #page .sale-detail-section>.panel-header { padding:15px; }
  html:root #app #page .sale-detail-products .sale-detail-product-list { padding:0 15px; }
  html:root #app #page .sale-detail-payment-list { padding:15px; }
  html:root #app #page .product-catalog { border:0; border-radius:0; background:transparent; }
  html:root #app #page .product-catalog .product-table.mobile-records tbody>tr { background:var(--ds-surface); border:1px solid var(--ds-line); border-radius:14px; }
  html:root #app #page .product-catalog .product-table.mobile-records td { padding:9px 13px; }
  html:root #app #page .product-catalog .product-table.mobile-records .product-name-cell { padding-block:14px; }
  html:root #app #page .inventory-page .inventory-navigation { padding:0 16px; gap:22px; }
  html:root #app #page .inventory-page .inventory-search { margin:16px 14px 0; }
  html:root #app #page .inventory-page .stock-result-count { margin:14px; }
  html:root #app #page .inventory-list-view .inventory-product { padding:14px; gap:12px; }
  html:root #app #page .inventory-product .inventory-unit-toggle { width:44px; min-width:44px; height:44px; min-height:44px; }
  html:root #app #page .inventory-detail-heading { padding:18px; }
  html:root #app #page .inventory-detail-heading h1 { font-size:21px; }
  html:root #app #page .product-detail-summary>div { padding:15px; }
  html:root #app #page .product-detail-summary dd { font-size:19px; }
 }
 @media(max-width:700px) {
  html:root #app #page .compact-filters { background:transparent; border:1px solid var(--ds-line); border-radius:10px; overflow:visible; }
  html:root #app #page .compact-filters>summary { padding:12px; min-height:44px; background:transparent; color:var(--ds-text); font-size:12px; font-weight:600; }
  html:root #app #page .compact-filters .compact-filter-fields { padding:12px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  html:root #app #page .compact-filters .compact-filter-fields>* { min-width:0; margin:0; }
 }
 @media(min-width:701px) {
  html:root #app #page .product-table th { white-space:nowrap; padding-inline:12px; letter-spacing:.035em; }
 }
 @media(prefers-reduced-motion:reduce) { html:root #app #page #sales-results .sale-record-compact { transition:none; } }
}
