.sales-dashboard { display: grid; gap: 22px; min-width: 0; }
.sales-dashboard .sales-muted { margin: 0; color: var(--muted); font-size: .79rem; line-height: 1.55; }
.sales-coverage { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.sales-coverage p { flex: 1; min-width: 220px; }
.sales-coverage > strong { color: #8d5c0e; font-weight: 600; }
.sales-coverage-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #5b8d79; }
.sales-coverage-warning .sales-coverage-dot { background: #b78538; }
.sales-metrics { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1.2fr; gap: 14px; }
.sales-metric { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.sales-metric-featured { background: #163d58; color: #fff; border-color: #163d58; }
.sales-metric-label { font-size: .79rem; font-weight: 600; color: var(--muted); }
.sales-metric-value { font-size: clamp(1.3rem,1.7vw,1.95rem); letter-spacing: -.045em; line-height: 1.2; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sales-metric-hint { font-size: .7rem; color: var(--muted); line-height: 1.45; }
.sales-metric-featured .sales-metric-label, .sales-metric-featured .sales-metric-hint { color: #c7dce9; }
.sales-filters { padding: 23px; }
.sales-filter-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 21px; }
.sales-filter-heading h2 { margin-bottom: 4px; }
.sales-reset.button { flex: none; min-height: 38px; padding: 0 12px; font-size: .75rem; color: var(--muted); }
.sales-filter-grid { display: grid; grid-template-columns: 1.15fr .9fr .9fr 1.1fr 1.1fr 1.1fr; gap: 12px; }
.sales-filter { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.sales-filter .field-label { margin: 0; font-size: .74rem; }
.sales-filter .input { width: 100%; min-height: 44px; padding: 10px 12px; font-size: .79rem; }
.sales-filter input[type=date] { min-width: 0; }
.sales-filter input:disabled { background: #f7f9fb; color: #7c8b99; }
.sales-search-row { display: grid; grid-template-columns: minmax(240px,1.25fr) minmax(200px,1fr); align-items: end; gap: 24px; margin-top: 19px; padding-top: 19px; border-top: 1px solid var(--line); }
.sales-reference-row { display: grid; grid-template-columns: minmax(220px,1fr) minmax(200px,2fr); gap: 18px; align-items: end; margin-top: 15px; }
.sales-reference-row .sales-muted { padding-bottom: 10px; font-size: .71rem; }
.sales-results-info { text-align: right; }
.sales-result-count { color: var(--blue-dark); font-size: .84rem; font-weight: 650; }
.sales-period-label { margin-top: 5px; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.sales-tabs { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px; width: fit-content; max-width: 100%; background: #e9eef4; border: 1px solid #e1e7ee; border-radius: 12px; }
.sales-tabs [role=tab] { min-height: 42px; padding: 0 21px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: .83rem; font-weight: 650; }
.sales-tabs [role=tab][aria-selected=true] { color: var(--blue-dark); background: #fff; box-shadow: 0 1px 3px #173b5814; }
.sales-content { display: grid; gap: 22px; min-width: 0; }
.sales-content:focus { outline: none; }
.sales-content:focus-visible { outline: 3px solid #2b82c6; outline-offset: 5px; border-radius: 8px; }
.sales-panel { min-width: 0; padding: 23px; }
.sales-panel-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.sales-panel-heading .button { min-height: 38px; padding: 0 12px; font-size: .76rem; }
.sales-count-chip { padding: 5px 9px; border-radius: 7px; background: #edf3f9; color: #506c85; font-size: .7rem; line-height: 1.35; font-weight: 600; }
.sales-money { color: var(--blue-dark); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sales-amount-unavailable { color: #8c6a32; font-size: .74rem; line-height: 1.45; font-weight: 600; }
.sales-amount-partial { display: grid; gap: 4px; }
.sales-amount-partial > span { color: #8c6a32; font-size: .65rem; line-height: 1.4; }
.sales-account-summary { display: grid; grid-template-columns: 1.25fr 1fr; gap: 32px; padding: 22px 25px; background: #f8fafc; }
.sales-account-summary > div { display: grid; gap: 7px; min-width: 0; }
.sales-account-summary > div + div { padding-left: 30px; border-left: 1px solid var(--line); }
.sales-account-summary > div > span { font-size: .75rem; color: var(--muted); font-weight: 600; }
.sales-account-summary > div > strong { color: var(--blue-dark); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.sales-ranking-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
.sales-ranking-list { display: grid; margin-top: 20px; }
.sales-ranking-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 11px 18px; padding: 14px 0; border-bottom: 1px solid #edf0f5; }
.sales-ranking-row:first-child { padding-top: 0; }
.sales-ranking-row:last-child { padding-bottom: 0; border-bottom: 0; }
.sales-ranking-copy { display: grid; gap: 4px; min-width: 0; }
.sales-ranking-copy strong { color: var(--blue-dark); font-size: .8rem; font-weight: 650; overflow-wrap: anywhere; }
.sales-ranking-copy > span { color: var(--muted); font-size: .69rem; line-height: 1.45; }
.sales-ranking-row > .sales-money { align-self: start; font-size: .82rem; }
.sales-ranking-row > .sales-amount-partial, .sales-ranking-row > .sales-amount-unavailable { text-align: right; }
.sales-ranking-track { grid-column: 1 / -1; appearance: none; display: block; width: 100%; height: 5px; border: 0; border-radius: 5px; overflow: hidden; background: #edf2f7; }
.sales-ranking-track::-webkit-progress-bar { background: #edf2f7; border-radius: inherit; }
.sales-ranking-track::-webkit-progress-value { border-radius: inherit; background: #789bb7; }
.sales-ranking-track::-moz-progress-bar { border-radius: inherit; background: #789bb7; }
.sales-ranking-row:first-child .sales-ranking-track::-webkit-progress-value { background: #1a648e; }
.sales-ranking-row:first-child .sales-ranking-track::-moz-progress-bar { background: #1a648e; }
.sales-table-wrap { min-width: 0; margin-top: 19px; overflow-x: auto; }
.sales-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .79rem; }
.sales-table thead { background: #f7f9fc; color: var(--muted); }
.sales-table th, .sales-table td { padding: 15px 13px; border-bottom: 1px solid #e8edf3; vertical-align: middle; }
.sales-table thead th { font-size: .7rem; font-weight: 600; }
.sales-table tbody th { font-weight: 550; }
.sales-table tbody tr:last-child > * { border-bottom: 0; }
.sales-table td { font-variant-numeric: tabular-nums; }
.sales-table td:last-child { text-align: right; }
.sales-daily-table .sales-table th:first-child { white-space: nowrap; }
.sales-product-title { display: flex; gap: 12px; align-items: center; min-width: 0; }
.sales-product-title > div { display: grid; gap: 4px; min-width: 0; }
.sales-product-title strong { color: var(--blue-dark); font-size: .82rem; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.sales-product-caption { display: block; color: var(--muted); font-size: .69rem; line-height: 1.4; overflow-wrap: anywhere; }
.sales-product-reference { display: block; color: #536d83; font-size: .67rem; line-height: 1.4; }
.sales-product-image { display: grid; position: relative; place-items: center; width: 46px; height: 46px; border-radius: 9px; background: #edf2f6; color: #7d93a7; overflow: hidden; flex: none; }
.sales-product-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sales-product-image svg { width: 19px; height: 19px; }
.sales-product-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.sales-mode.button { min-height: 38px; padding: 0 13px; color: var(--muted); border-color: #dce4ee; font-size: .73rem; }
.sales-mode.button[aria-pressed=true] { color: #fff; background: var(--blue-dark); border-color: var(--blue-dark); }
.sales-piece-identity { display: grid; gap: 4px; }
.sales-piece-identity > span { color: var(--muted); font-size: .7rem; line-height: 1.4; }
.sales-recent { display: grid; gap: 13px; }
.sales-sale-list { display: grid; gap: 13px; }
.sales-sale-card { min-width: 0; padding: 22px 24px 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sales-sale-heading { display: flex; justify-content: space-between; gap: 20px; align-items: start; }
.sales-sale-identity { display: grid; gap: 5px; min-width: 0; }
.sales-sale-identity h3 { color: var(--blue-dark); font-size: 1.04rem; font-weight: 750; letter-spacing: -.02em; }
.sales-sale-date { color: var(--muted); font-size: .72rem; }
.sales-sale-total { display: grid; gap: 5px; text-align: right; }
.sales-sale-total > span { color: var(--muted); font-size: .69rem; }
.sales-sale-total .sales-money { font-size: 1.15rem; }
.sales-sale-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin: 14px 0 9px; }
.sales-seller { display: inline-flex; align-items: center; gap: 7px; color: #496377; font-size: .77rem; }
.sales-seller svg { width: 15px; height: 15px; color: #7b92a5; }
.sales-payment-note { color: #8f641c; font-size: .68rem; }
.sales-sale-cancelled { background: #fbfcfd; }
.sales-sale-cancelled .sales-sale-total .sales-money { color: #758797; text-decoration: line-through; }
.sales-exclusion-note { margin-top: 8px; color: #7e6570; font-size: .73rem; }
.sales-sale-detail { margin-top: 16px; }
.sales-sale-detail > summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 46px; padding: 0 2px; color: var(--blue); border-top: 1px solid #e9eef4; list-style: none; cursor: pointer; font-size: .76rem; font-weight: 600; }
.sales-sale-detail > summary::-webkit-details-marker { display: none; }
.sales-sale-detail > summary svg { width: 17px; height: 17px; }
.sales-sale-detail[open] > summary svg { transform: rotate(90deg); }
.sales-sale-products { display: grid; }
.sales-sold-product { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 18px 0; border-top: 1px solid #e9eef4; }
.sales-product-amount { display: grid; gap: 5px; text-align: right; }
.sales-product-amount > span { font-size: .73rem; color: #526c82; }
.sales-product-amount > .sales-product-value-label { color: var(--muted); font-size: .65rem; }
.sales-receipt-totals { display: grid; gap: 9px; max-width: 480px; margin: 0 0 0 auto; padding: 18px 0 22px; }
.sales-receipt-totals > div { display: flex; justify-content: space-between; gap: 24px; }
.sales-receipt-totals dt { color: var(--muted); font-size: .74rem; }
.sales-receipt-totals dd { margin: 0; color: var(--blue-dark); font-size: .77rem; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.sales-discount-note { padding-bottom: 18px; color: var(--muted); font-size: .69rem; line-height: 1.5; }
.sales-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 18px; }
.sales-pagination > span { color: var(--muted); font-size: .74rem; }
.sales-pagination .button { min-height: 40px; padding: 0 16px; font-size: .77rem; }
@media(hover:hover) and (pointer:fine) {
  .sales-tabs [role=tab]:hover:not([aria-selected=true]) { color: var(--blue-dark); background: #f6f9fc; }
  .sales-sale-detail > summary:hover { color: var(--blue-dark); }
}
@media(max-width:1250px) {
  .sales-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sales-filter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .sales-metric-value { font-size: 1.65rem; }
}
@media(max-width:850px) {
  .sales-ranking-grid { grid-template-columns: 1fr; }
  .sales-search-row { grid-template-columns: 1fr; gap: 14px; }
  .sales-results-info { text-align: left; }
  .sales-reference-row { grid-template-columns: 1fr; gap: 8px; }
  .sales-reference-row .sales-muted { padding-bottom: 0; }
  .sales-account-summary { gap: 20px; }
  .sales-table { font-size: .75rem; }
  .sales-table th, .sales-table td { padding: 13px 9px; }
}
@media(max-width:640px) {
  .sales-dashboard, .sales-content { gap: 17px; }
  .sales-metrics { gap: 10px; }
  .sales-metric { padding: 17px 15px; gap: 12px; }
  .sales-metric-label { font-size: .72rem; }
  .sales-metric-value { font-size: 1.25rem; letter-spacing: -.035em; }
  .sales-metric-hint { font-size: .64rem; }
  .sales-filters, .sales-panel { padding: 18px; }
  .sales-filter-heading { gap: 10px; align-items: start; }
  .sales-filter-heading h2 { font-size: 1rem; }
  .sales-filter-heading .sales-muted { font-size: .72rem; }
  .sales-reset.button { padding: 0 8px; font-size: .69rem; }
  .sales-filter-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px 10px; }
  .sales-filter:first-child { grid-column: 1 / -1; }
  .sales-filter-grid > .sales-filter:last-child { grid-column: 1 / -1; }
  .sales-filter .input { font-size: .76rem; padding: 9px 10px; }
  .sales-tabs { width: 100%; gap: 3px; padding: 4px; }
  .sales-tabs [role=tab] { flex: 1; min-height: 44px; padding: 0 8px; font-size: .7rem; }
  .sales-account-summary { grid-template-columns: 1fr; padding: 19px; }
  .sales-account-summary > div + div { padding: 17px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .sales-table, .sales-table tbody, .sales-table tr { display: block; }
  .sales-table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .sales-table tbody tr { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .sales-table tbody tr:last-child { border-bottom: 0; padding-bottom: 0; }
  .sales-table tbody th { display: block; padding: 0 0 13px; border-bottom: 0; }
  .sales-table tbody td { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 6px 0; border-bottom: 0; text-align: right; }
  .sales-table tbody td::before { content: attr(data-label); color: var(--muted); font-size: .69rem; text-align: left; }
  .sales-daily-table .sales-table tbody th { padding-bottom: 7px; color: var(--blue-dark); font-weight: 650; }
  .sales-piece-identity { text-align: right; }
  .sales-sale-card { padding: 18px 18px 0; }
  .sales-sale-heading { gap: 12px; }
  .sales-sale-total .sales-money { font-size: 1rem; }
  .sales-sale-identity h3 { font-size: .94rem; }
  .sales-sale-date { font-size: .67rem; line-height: 1.5; }
  .sales-sold-product { grid-template-columns: 1fr; gap: 12px; }
  .sales-product-amount { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: baseline; justify-content: space-between; text-align: left; padding-left: 58px; }
  .sales-product-amount > .sales-product-value-label { display: none; }
  .sales-receipt-totals { max-width: none; }
  .sales-receipt-totals > div { gap: 14px; }
  .sales-receipt-totals dt { font-size: .69rem; }
}
@media(max-width:380px) {
  .sales-metrics { grid-template-columns: 1fr; }
  .sales-filter-heading { flex-direction: column; }
  .sales-filter-grid { grid-template-columns: 1fr; }
  .sales-sale-heading { flex-direction: column; }
  .sales-sale-total { text-align: left; }
  .sales-tabs [role=tab] { font-size: .66rem; padding: 0 5px; }
}
