/* Sales register: same navy, teal and Readex typography as the merchant shell. */
#sales-section.catalog-panel { padding: 0; border: 0; background: transparent; box-shadow: none; }
.sales { display: grid; gap: 16px; color: #19343e; }
.sales button { font: inherit; cursor: pointer; }
.sales-tools { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 20px; background: #fff; border: 1px solid #e0eaed; border-radius: 12px; }
.sales-tools label { display: grid; gap: 7px; min-width: 170px; color: #415e68; font-size: 13px; font-weight: 600; }
.sales-tools .sales-search-label { flex: 1 1 260px; }
.sales-tools input, .sales-tools select { min-height: 44px; width: 100%; padding: 0 12px; border: 1px solid #d5e3e7; border-radius: 8px; background: #fff; color: #19343e; font: inherit; font-size: 14px; }
.sales-tools input:focus, .sales-tools select:focus { outline: 2px solid #75c7ca; outline-offset: 1px; }
.sales-refresh, .sales-more, .sales-empty-action { min-height: 44px; padding: 0 16px; border: 1px solid #d6e4e8; border-radius: 9px; background: #fff; color: #315964; font-weight: 600; }
.sales-more { justify-self: center; }
.sales-count, .sales-message { margin: 0; color: #526f79; font-size: 13px; line-height: 1.7; }
.sales-count[hidden], .sales-message:empty { display: none; }
.sales-table { overflow-x: auto; border: 1px solid #e0eaed; border-radius: 12px; background: #fff; }
.sales-table[hidden], .sales-empty[hidden], .sales-more[hidden] { display: none; }
.sales-list-head, .sale-row { display: grid; grid-template-columns: 1.1fr 1.4fr .9fr .8fr 1fr 1fr .8fr; align-items: center; gap: 12px; min-width: 780px; text-align: right; }
.sales-list-head { padding: 14px 18px; background: #f4f8f9; color: #607985; font-size: 12px; font-weight: 600; }
.sale-row { width: 100%; min-height: 60px; padding: 12px 18px; background: #fff; border: 0; border-top: 1px solid #edf2f3; color: #263f48; font-size: 14px; }
.sale-row:hover, .sale-row:focus-visible { background: #f3fbfb; outline-color: #65bdc2; }
.sale-number { color: #087b86; font-weight: 700; direction: ltr; text-align: right; white-space: nowrap; }
.sale-ltr { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sale-amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sale-owed, .sale-owed dd { color: #a64038; font-weight: 700; }
.sale-status { justify-self: start; padding: 5px 9px; border-radius: 6px; background: #eef3f4; color: #516b73; font-size: 12px; font-weight: 700; }
.sale-status-posted { background: #e5f5ee; color: #1f6b4a; }
.sale-status-draft { background: #fff5dd; color: #7a5a14; }
.sale-status-cancelled { background: #fbeceb; color: #a64038; }
.sales-empty { display: grid; justify-items: center; gap: 8px; padding: 44px 20px; background: #fff; border: 1px solid #e0eaed; border-radius: 12px; text-align: center; }
.sales-empty-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: #e8f5f6; color: #087e91; font-size: 24px; }
.sales-empty h3 { margin: 6px 0 0; font-size: 17px; }
.sales-empty p { margin: 0 0 8px; color: #607985; font-size: 14px; line-height: 1.7; }

.sale-detail { width: min(640px, calc(100% - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid #e0e9ee; border-radius: 12px; background: #fff; color: #102235; box-shadow: 0 24px 80px #10223535; }
.sale-detail::backdrop { background: #10223588; }
.sale-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 0; }
.sale-detail-kicker { margin: 0 0 4px; color: #087e91; font-size: 12px; font-weight: 700; }
.sale-detail-head h3 { margin: 0; font-size: 20px; direction: ltr; text-align: right; }
.sale-detail-close { width: 44px; height: 44px; border: 1px solid #e0e9ee; border-radius: 8px; background: #fff; color: #617a88; font-size: 22px; }
.sale-detail-message { margin: 12px 24px 0; color: #607985; font-size: 14px; }
.sale-detail-message:empty { display: none; }
.sale-detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 16px 24px; }
.sale-detail-meta:empty, .sale-detail-totals:empty, .sale-detail-lines:empty { display: none; }
.sale-detail dt { color: #718794; font-size: 12px; margin-bottom: 3px; }
.sale-detail dd { margin: 0; font-size: 14px; font-weight: 600; }
.sale-detail-lines { margin: 0 24px; border-top: 1px solid #e8eef2; overflow-x: auto; }
.sale-line { display: grid; grid-template-columns: minmax(0, 1.6fr) .8fr 1fr 1fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #edf2f5; font-size: 14px; }
.sale-line-head { color: #718794; font-size: 12px; padding: 10px 0; }
.sale-line strong { font-weight: 600; overflow-wrap: anywhere; }
.sale-detail-totals { display: grid; gap: 8px; margin: 16px 24px 24px; }
.sale-detail-totals > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sale-detail-totals dt { margin: 0; font-size: 14px; }
.sale-detail-totals .sale-total { margin-top: 4px; padding: 12px 14px; border-radius: 8px; background: #e8f5f6; color: #087e91; }
.sale-detail-totals .sale-total dt { color: #087e91; font-weight: 700; }
.sale-detail-totals .sale-total dd { font-size: 20px; font-weight: 700; }
@media (max-width: 560px) { .sale-detail-meta { grid-template-columns: 1fr; } }

.sale-detail-actions { display: flex; align-items: center; gap: 8px; }
.sale-detail-print { min-height: 44px; padding: 0 16px; border: 1px solid #b7d5dc; border-radius: 8px; background: #f2f9fa; color: #087e91; font: inherit; font-weight: 700; cursor: pointer; }
.sale-detail-print[hidden] { display: none; }
