/* Operator aftersales list. Shared business metrics and family grouping stay
   in aftersales.mjs; these rules only arrange the existing presentation. */
#main.returns-page { --ui-list-row: 76px; --ui-list-cell-padding: 14px 12px; }
#main.returns-page > .page-heading,
.returns-page #returns-view,
.returns-page > footer { max-width: var(--ui-list-width); margin-inline: auto; }
.returns-page .returns-toolbar {
  min-height: 50px; padding: 8px 14px; gap: 10px; flex-wrap: nowrap;
}
.returns-page .returns-toolbar .search {
  flex: 0 1 220px; min-width: 160px; height: 34px; min-height: 34px; padding: 0 10px;
}
.returns-page .returns-toolbar :is(input, select, button) {
  height: 34px; min-height: 34px; font-size: 13px; padding-block: 5px;
}
.returns-page .returns-toolbar .search input { height: 32px; min-height: 0; padding: 0; }
.returns-page .returns-toolbar .select-label { gap: 8px; flex: none; font-size: 13px; }
.returns-page #returns-count { margin-left: auto; font-size: 12px; color: var(--ui-muted); white-space: nowrap; }
.returns-page .refund-display-note { padding: 7px 14px; font-size: 12px; line-height: 1.5; }
.returns-page .refund-display-note[hidden] { display: none; }
.returns-page #returns-view .table-scroll { max-height: calc(100vh - 328px); min-height: 260px; }
.returns-page .returns-table { width: 100%; min-width: 960px; table-layout: fixed; }
.returns-page .returns-table th:first-child { width: 24%; min-width: 0; }
.returns-page .returns-table th:nth-child(2) { width: 16%; }
.returns-page .returns-table th:nth-child(3),
.returns-page .returns-table th:nth-child(4),
.returns-page .returns-table th:nth-child(5) { width: 20%; min-width: 0; }
.returns-page .returns-table th { padding: 8px 10px; font-size: 13px; line-height: 1.4; }
.returns-page .returns-table td { height: 76px; padding: 14px 12px; font-size: 14px; vertical-align: middle; }
.returns-page .returns-table :is(th,td) { border-left: 0; border-right: 0; }
.returns-page .returns-table tbody tr { background: #fff; }
.returns-page .returns-table tbody tr:hover { background: #f6f9fd; }
.returns-page .returns-table :is(th,td).numeric { text-align: left; }
.returns-page .inbound-product { gap: 10px; }
.returns-page .inbound-product > div { min-width: 0; }
.returns-page .product-thumb,
.returns-page .inbound-thumb { width: 44px; height: 44px; flex: 0 0 44px; }
.returns-page .product-name { font-size: 15px; line-height: 1.4; font-weight: 500; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.returns-page .returns-table .sku { font-size: 13px; line-height: 1.4; margin-top: 3px; color: var(--ui-muted); }
.returns-page .refund-sample-range { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: var(--ui-muted); overflow-wrap: anywhere; }
.returns-page .refund-sample-count { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--ui-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.returns-page .refund-rating .spec-ratings summary { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 2px 4px; }
.returns-page .refund-rating .family-rating-primary { display: contents; }
.returns-page .refund-rating .sales-stars .sales-star { width:16px; height:16px; }
.returns-page .refund-rating .sales-stars { gap:1px; }
.returns-page .refund-rating .family-rating-primary > .sales-stars { grid-row:1; grid-column:1; }
.returns-page .refund-rating .family-rating-primary > small { grid-row:2; grid-column:1/-1; margin-top:0; font-size:12px; }
.returns-page .refund-rating .spec-rating-toggle { grid-row:1; grid-column:2; }
.returns-page .spec-rating-toggle { font-size: 12px; }
.returns-page .spec-rating-list { margin-top: 6px; padding-top: 4px; }
.returns-page .refund-meter {
  display: flex; align-items: center; gap: 7px; max-width: none; margin: 0;
}
.returns-page .refund-rate-label {
  flex: 0 0 auto; min-width: 64px; margin: 0; font-size: 18px; line-height: 1.4; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.returns-page .refund-bar { flex: 0 1 64px; width: 64px; min-width: 24px; height: 8px; }
.returns-page .refund-no-data { font-size: 13px; color: var(--ui-muted); }
.returns-page #returns-view .table-footer { padding: 8px 14px; min-height: 48px; font-size: 12px; }
.returns-page .returns-pagination :is(button,select) { min-height: 34px; height: 34px; font-size: 13px; padding-block: 5px; }
.returns-page #returns-sort{max-width:155px}
.returns-page .refund-list-key { display: flex; justify-content: space-between; padding: 7px 14px; border-top: 1px solid #edf1f6; color: #718197; font-size: 12px; line-height: 18px; }
.returns-page .refund-metric-layout { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; }
.returns-page .refund-cumulative { flex: 0 0 76px; white-space: nowrap; }
.returns-page .refund-cumulative .refund-meter { flex-direction: column; align-items: flex-start; gap: 5px; }
.returns-page .refund-cumulative .refund-rate-label { font-size: 18px; line-height: 1.4; font-weight: 600; color: inherit; min-width: 0; }
.returns-page .refund-cumulative .refund-bar { flex: none; width: 64px; height: 6px; min-width: 0; }
.returns-page .refund-cumulative .is-missing { font-weight: 400; color: #8b99aa; }
.returns-page .refund-trend-button { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex: 0 0 72px; width: 72px; height: 44px; min-height: 44px; padding: 4px; border: 1px solid transparent; border-radius: 6px; background: transparent; cursor: pointer; }
.returns-page .refund-trend-button:hover { background: #edf3fa; border-color: #dbe5f1; }
.returns-page .refund-trend-button:focus-visible { outline: 2px solid #3972bf; outline-offset: 2px; }
.returns-page .refund-mini-chart { display: block; width: auto; height: 32px; flex: 0 0 auto; }
.returns-page .refund-mini-bar { fill: currentColor; }
.returns-page .refund-mini-missing { fill: none; stroke: #bcc7d5; stroke-width: 1; }
.returns-page .refund-mini-empty { color: #9aa9ba; width: 32px; font-size: 16px; text-align: center; }
.returns-page .refund-direction { flex: 0 0 16px; font-family: Arial, sans-serif; font-size: 20px; line-height: 24px; font-weight: 700; }
.returns-page .refund-direction-arrow { display: block; width: 16px; height: 22px; }
.returns-page .delta-up { color: #16853c; }
.returns-page .delta-down { color: #df2b2b; }
.returns-page .delta-flat,.returns-page .delta-unknown { color: #7790aa; }

/* The native modal owns focus and stacking; it never adds height to list rows. */
#refund-detail { width: min(580px,calc(100vw - 48px)); max-height: calc(100vh - 64px); padding: 0; border: 1px solid #dbe3ee; border-radius: 12px; background: #fff; color: #263c55; }
#refund-detail::backdrop { background: #15273b66; backdrop-filter: blur(2px); }
#refund-detail .refund-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 22px 26px 18px; border-bottom: 1px solid #eaf0f6; }
#refund-detail h2 { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 0; }
#refund-detail-sku { font-size: 13px; line-height: 1.5; color: #718197; margin: 6px 0 0; overflow-wrap: anywhere; }
#refund-detail .refund-detail-close { width: 32px; height: 32px; flex: 0 0 32px; border: 0; border-radius: 6px; background: #f3f6fa; color: #70839a; font-size: 23px; line-height: 1; cursor: pointer; }
#refund-detail .refund-detail-close:hover { background: #e8eff7; }
#refund-detail .refund-detail-close:focus-visible { outline: 2px solid #3972bf; outline-offset: 2px; }
#refund-detail-content { padding: 22px 26px; }
#refund-detail .refund-detail-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
#refund-detail .refund-detail-label { display: block; color: #718197; font-size: 12px; margin-bottom: 4px; }
#refund-detail .refund-detail-summary strong { font-size: 30px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
#refund-detail .refund-detail-change { text-align: right; }
#refund-detail .refund-detail-change span { display: block; font-size: 14px; color: #62758b; margin-bottom: 6px; }
#refund-detail .refund-detail-change strong { font-size: 15px; }
#refund-detail .refund-detail-chart { display: flex; justify-content: center; gap: 36px; padding-bottom: 22px; }
#refund-detail .refund-detail-month { width: 82px; flex: 0 1 82px; min-width: 0; text-align: center; }
#refund-detail .refund-detail-month svg { display: block; margin: auto; }
#refund-detail .refund-detail-month > span { display: block; font-size: 12px; color: #62758b; white-space: nowrap; }
#refund-detail .refund-detail-bar { fill: currentColor; }
#refund-detail .refund-detail-value { fill: #344d68; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
#refund-detail .refund-detail-baseline { fill: none; stroke: #e6ecf4; stroke-width: 1; }
#refund-detail .refund-detail-note { padding-top: 15px; border-top: 1px solid #edf1f6; margin: 0; font-size: 12px; line-height: 1.8; color: #7a8a9e; }
#refund-detail .refund-detail-empty { padding: 36px 0; text-align: center; font-size: 14px; color: #7a8a9e; }
#refund-detail .delta-up { color: #16853c; }
#refund-detail .delta-down { color: #df2b2b; }
#refund-detail .delta-flat,#refund-detail .delta-unknown { color: #728aa5; }
