/*
 * Seller Center page group "orders" (approved mockup, 26 Nov 2026):
 * Performance, Returns, Orders list (+ row actions and their modals), Order details, the order
 * invoice and Reviews. Every Filament override is scoped to .sc-oc (the page classes these pages
 * add) or .fi-resource-orders; the oc-* classes exist only in this group's views, and the invoice
 * ones also work after "Print Invoice" moves the invoice into the bare body. Colours: tokens only.
 */

/* ───────────── Small shared bits ───────────── */
.oc-ico { width: 18px; height: 18px; flex: none; }
.oc-ico-sm { width: 14px; height: 14px; flex: none; }
.oc-muted { color: var(--sc-text-3); }
.oc-strong { font-weight: 600; color: var(--sc-text); }
.oc-wrap { overflow-wrap: anywhere; }
.oc-help { margin: 10px 0 0; font-size: 13px; color: var(--sc-text-3); }
.oc-card__body { padding: 0 20px 18px; }
.oc-card__link { margin-top: 12px; }

/* Notes (status, warnings) */
.oc-note { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--sc-radius-card); border: 1px solid var(--sc-border); background: var(--sc-surface); color: var(--sc-text); }
.oc-note__body { min-width: 0; }
.oc-note__t { margin: 0; font-weight: 700; font-size: 14.5px; }
.oc-note__s { margin: 2px 0 0; font-size: 13.5px; color: var(--sc-text-2); }
.oc-note--ok { background: var(--sc-ok-bg); border-color: var(--sc-ok-bg); }
.oc-note--ok .oc-note__t, .oc-note--ok .oc-note__s { color: var(--sc-ok-text); }
.oc-chip--ok { background: var(--sc-surface); color: var(--sc-ok-text); border-color: var(--sc-ok-bg); }
.oc-note--warn { background: var(--sc-warn-bg); border-color: var(--sc-warn-border); color: var(--sc-warn-text); }
.oc-note--plain { display: block; margin: 0; font-size: 13.5px; line-height: 1.5; }

/* Section heading above a group of cards */
.oc-section { display: flex; flex-direction: column; gap: 10px; }
.oc-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.oc-section__title { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--sc-text); }
.oc-section__note { font-size: 13px; color: var(--sc-text-3); }

/* Label / value lists (Order card, What you earned, invoice totals) */
.oc-dl { margin: 0; display: flex; flex-direction: column; }
.oc-dl__row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--sc-line); font-size: 14px; }
.oc-dl__row:last-child { border-bottom: 0; }
.oc-dl__row dt { color: var(--sc-text-2); min-width: 0; }
.oc-dl__row dd { margin: 0; color: var(--sc-text); text-align: right; font-variant-numeric: tabular-nums; }
.oc-dl__row--total { border-top: 1px solid var(--sc-border-strong); }
.oc-dl__row--total dt, .oc-dl__row--total dd { font-size: 15px; font-weight: 700; color: var(--sc-text); }
.oc-dl__note { display: block; margin-top: 2px; font-size: 12.5px; color: var(--sc-text-3); }

/* ───────────── Performance ───────────── */
.sc-oc-perf .fi-page-main, .sc-oc-perf .fi-page-content { row-gap: 20px; }
.oc-pro { padding: 18px 20px; }
.oc-pro__title { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--sc-text); }
.oc-crit { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.oc-crit li { padding: 11px 14px; border: 1px solid var(--sc-border); border-radius: 10px; background: var(--sc-surface-2); font-size: 14px; font-weight: 600; color: var(--sc-text); }
.oc-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.oc-kpi .sc-kpi__hint { display: block; line-height: 1.4; }
.oc-kpi__none { color: var(--sc-text-3); }
.oc-kpi__band { margin: 2px 0 0; display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
.oc-kpi__band i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.oc-kpi--ok .sc-kpi__chip { background: var(--sc-ok-bg); border-color: var(--sc-ok-bg); color: var(--sc-ok-text); }
.oc-kpi--ok .oc-kpi__band { color: var(--sc-ok-text); }
.oc-kpi--ok .oc-kpi__band i { background: var(--sc-ok-dot); }
.oc-kpi--warn .sc-kpi__chip { background: var(--sc-warn-bg); border-color: var(--sc-warn-border); color: var(--sc-warn-text); }
.oc-kpi--warn .oc-kpi__band { color: var(--sc-warn-text); }
.oc-kpi--warn .oc-kpi__band i { background: var(--sc-warn-dot); }
.oc-kpi--danger .sc-kpi__chip { background: var(--sc-danger-bg); border-color: var(--sc-danger-bg); color: var(--sc-danger-text); }
.oc-kpi--danger .oc-kpi__band { color: var(--sc-danger-text); }
.oc-kpi--danger .oc-kpi__band i { background: var(--sc-danger-dot); }
/* The "Last 90 nights" chart card (shared ScorecardTrendChart widget) */
.sc-oc-perf .fi-wi-chart .fi-section-header { padding: 16px 20px 4px; border: 0; }
.sc-oc-perf .fi-wi-chart .fi-section-content-ctn { border-top: 0 !important; }
.sc-oc-perf .fi-wi-chart .fi-section-header-heading svg { color: var(--sc-text-2); }

/* ───────────── Filament tables on these pages ───────────── */
/* Toolbar: search on the left, Filters / Columns as labelled buttons on the right */
.sc-oc .fi-ta-header-toolbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.sc-oc .fi-ta-header-toolbar > .fi-ta-actions:not(:has(*)) { display: none; }
.sc-oc .fi-ta-header-toolbar > div:not(.fi-ta-actions) { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.sc-oc .fi-ta-search-field { flex: 0 1 320px; margin-inline-end: auto; min-width: 0; }
.sc-oc .fi-ta-search-field .fi-input-wrp { min-height: 38px; border: 1px solid var(--sc-border-strong) !important; box-shadow: none !important; }
.sc-oc .fi-ta-search-field .fi-input::placeholder { color: var(--sc-text-3); }
.sc-oc .fi-ta-header-toolbar .fi-btn { min-height: 38px; }
.sc-oc .fi-ta-header-toolbar .fi-btn:not(.fi-color) { background: var(--sc-surface); color: var(--sc-text); border: 1px solid var(--sc-border-strong); padding-inline: 12px; }
.sc-oc .fi-ta-header-toolbar .fi-btn:not(.fi-color):hover { background: var(--sc-hover); }
.sc-oc .fi-ta-header-toolbar .fi-btn:not(.fi-color) .fi-icon { color: var(--sc-text-2); width: 16px; height: 16px; }
/* The filter count shows only when a filter is on (as the mockup) */
.sc-oc .fi-ta-ctn:not(:has(.fi-ta-filter-indicators)) .fi-ta-filters-dropdown .fi-btn-badge-ctn,
.sc-oc .fi-ta-ctn:not(:has(.fi-ta-filter-indicators)) .fi-ta-filters-dropdown .fi-badge { display: none; }
.sc-oc .fi-ta-filter-indicators { padding: 8px 16px; border-top: 1px solid var(--sc-line); font-size: 13px; color: var(--sc-text-3); }
/* A search alone is not a filter: Filament still shows a "0" count on Filters then, so it is hidden */
.sc-oc .fi-ta-ctn:not(:has(.fi-ta-filter-indicators .fi-badge-delete-btn[wire\:click^="removeTableFilter("])) .fi-ta-filters-dropdown .fi-btn-badge-ctn { display: none !important; }

/* Cells */
.sc-oc .fi-ta-text-description { font-size: 12.5px; color: var(--sc-text-3); line-height: 1.4; }
.sc-oc .fi-ta-placeholder { color: var(--sc-text-3); }
.sc-oc .fi-ta-text-item.fi-color-primary, .sc-oc .fi-ta-text.fi-color-primary { color: var(--sc-accent-text) !important; }
.sc-oc .fi-ta-text.fi-color-gray, .sc-oc .fi-ta-text-item.fi-color-gray { color: var(--sc-text-2) !important; }
.sc-oc .fi-ta-text-item.fi-color-danger, .sc-oc .fi-ta-text.fi-color-danger { color: var(--sc-danger-text) !important; }
.sc-oc .fi-ta-text-item.fi-color-warning, .sc-oc .fi-ta-text.fi-color-warning { color: var(--sc-warn-text) !important; }
.sc-oc .fi-ta-icon .fi-color-gray { color: var(--sc-text-3) !important; }
.sc-oc .fi-ta-icon .fi-color-success { color: var(--sc-ok-dot) !important; }

/* Rows with several lines read from the top (Returns, Reviews, the "You ship" view of Orders) */
.sc-oc-returns .fi-ta-cell, .sc-oc-reviews .fi-ta-cell,
.sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-cell { vertical-align: top; }
.sc-oc-returns .fi-ta-cell .fi-ta-text, .sc-oc-reviews .fi-ta-cell .fi-ta-text, .sc-oc-reviews .fi-ta-cell .fi-ta-icon,
.sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-cell .fi-ta-text { padding-block: 14px; }
.sc-oc-returns .fi-ta-cell .fi-ta-actions, .sc-oc-reviews .fi-ta-cell .fi-ta-actions,
.sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-cell .fi-ta-actions { padding-block: 10px; }
.sc-oc-returns .fi-ta-text-item, .sc-oc-reviews .fi-ta-text-item { line-height: 1.45; }
.sc-oc-reviews .fi-ta-cell-product\.name, .sc-oc-returns .fi-ta-cell-product\.name { min-width: 170px; }
.sc-oc .fi-ta-cell .fi-ta-actions .fi-btn:not(.fi-color) { background: var(--sc-surface); color: var(--sc-text); border: 1px solid var(--sc-border-strong); }
.sc-oc .fi-ta-cell .fi-ta-actions .fi-btn:not(.fi-color):hover { background: var(--sc-hover); }

/* Button icons follow the button text (Filament gives small primary buttons a near-black icon in light mode) */
.sc-oc .fi-btn.fi-color-primary:not(.fi-outlined) > .fi-icon { color: var(--sc-on-accent) !important; }
.sc-oc .fi-btn.fi-color-danger:not(.fi-outlined) > .fi-icon { color: var(--sc-danger-text) !important; }
.sc-oc .fi-btn.fi-color-gray:not(.fi-outlined) > .fi-icon { color: var(--sc-text-2) !important; }

/* Row action buttons: stacked on the right */
.sc-oc .fi-ta-cell .fi-ta-actions { gap: 8px; }
.sc-oc-returns .fi-ta-cell .fi-ta-actions,
.sc-oc-reviews .fi-ta-cell .fi-ta-actions { flex-direction: column; align-items: stretch; padding-inline: 16px; min-width: 132px; }
.sc-oc-returns .fi-ta-cell .fi-ta-actions .fi-btn,
.sc-oc-reviews .fi-ta-cell .fi-ta-actions .fi-btn { width: 100%; }

/* Empty tables: the column headings go, the message stays */
.sc-oc .fi-ta-ctn:has(.fi-ta-empty-state) .fi-ta-table thead { display: none; }
.sc-oc .fi-ta-empty-state { padding-block: 36px 32px; }
.sc-oc-returns .fi-ta-empty-state-icon-bg { background: var(--sc-ok-bg) !important; border-color: var(--sc-ok-bg) !important; }
.sc-oc-returns .fi-ta-empty-state-icon-bg .fi-icon { color: var(--sc-ok-text) !important; }
.sc-oc .fi-ta-empty-state-icon-bg { border-radius: 10px !important; }

/* ───────────── Orders list ───────────── */
.sc-oc-orders .fi-ta-cell-id .fi-ta-text-item { font-variant-numeric: tabular-nums; }
/* Customer initial before the name (Afrikart-shipped view) */
.sc-oc-orders .oc-cust { display: inline-flex !important; align-items: center; gap: 10px; }
.sc-oc-orders .oc-cust::before {
    content: attr(data-ini); width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center;
    font-size: 11px; font-weight: 700; background: var(--sc-surface-2); border: 1px solid var(--sc-border); color: var(--sc-text-2);
}
.sc-oc-orders .fi-ta-cell-earnings .fi-ta-text-item { font-variant-numeric: tabular-nums; color: var(--sc-text); }
.sc-oc-orders .oc-cell-ship { min-width: 190px; max-width: 240px; }
.sc-oc-orders .oc-cell-deadline { min-width: 150px; max-width: 190px; }
.sc-oc-orders .oc-cell-ship .fi-ta-text-description { margin-top: 4px; }
/* Row actions on the "You ship" view: step buttons wrap to the right, the menu last */
.sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-cell .fi-ta-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 172px; margin-inline-start: auto; padding-inline: 12px; }
.sc-oc-orders .fi-ta-cell .fi-ta-actions .fi-icon-btn { color: var(--sc-text-2); }
/* With every column switched on (Columns keeps a seller's choice in the session, so Shop and Created at
   can stay on) the "You ship" table scrolls sideways; the step buttons stay in view at the right edge.
   A sticky cell is its own layer, so the cell whose row menu is open is lifted above the rows below it. */
@media (min-width: 641px) {
    .sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-row > td:last-child:has(.fi-ta-actions),
    .sc-oc-orders .fi-ta-table:has(.oc-cell-ship) > thead > tr > th:last-child { position: sticky; right: 0; background: var(--sc-surface) !important; }
    .sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-row:hover > td:last-child:has(.fi-ta-actions) { background: var(--sc-hover) !important; }
    .sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-row > td:last-child:has(.fi-dropdown-panel[style*="display: block"]) { z-index: 25; }
    .sc-oc-orders .fi-ta-content-ctn:has(.oc-cell-ship) { overscroll-behavior-x: contain; }
}
/* Menu items that report something read in the warning colour */
.sc-oc-orders .fi-dropdown-list-item.fi-color-warning .fi-dropdown-list-item-label,
.sc-oc-orders .fi-dropdown-list-item.fi-color-warning .fi-icon { color: var(--sc-warn-text) !important; }

/* Tabs on the "You ship" view: underlined, across the top of the table card */
.sc-oc-orders .fi-page-content > .fi-sc:has(.fi-tabs) { gap: 0 !important; row-gap: 0 !important; }
.sc-oc-orders .fi-tabs {
    width: 100%; max-width: none; margin: 0 !important; justify-content: flex-start; padding: 0 12px !important; gap: 4px; overflow-x: auto;
    background: var(--sc-surface) !important; border: 1px solid var(--sc-border) !important; border-bottom-color: var(--sc-line) !important;
    border-radius: var(--sc-radius-card) var(--sc-radius-card) 0 0 !important; box-shadow: none !important;
}
.sc-oc-orders .fi-sc:has(.fi-tabs) .fi-ta-ctn { border-top: 0 !important; border-top-left-radius: 0 !important; border-top-right-radius: 0 !important; }
.sc-oc-orders .fi-tabs-item { border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding: 14px 8px 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
.sc-oc-orders .fi-tabs-item.fi-active { border-bottom-color: var(--sc-accent); background: transparent !important; }
/* Dark: chrome.css fills the selected tab (a pill look); here the underline marks it, as in light mode */
.dark .fi-panel-vendor .sc-oc-orders .fi-tabs-item.fi-active { background: transparent !important; }
.sc-oc-orders .fi-tabs-item.fi-active .fi-tabs-item-label { color: var(--sc-accent-text) !important; }
.sc-oc-orders .fi-tabs .fi-badge { background: var(--sc-warn-bg) !important; color: var(--sc-warn-text) !important; border-color: var(--sc-warn-border); }

/* ───────────── Modals and the Details slide-over of these pages ───────────── */
.sc-oc .fi-modal-heading { font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: var(--sc-text); }
.sc-oc .fi-modal-description { color: var(--sc-text-2); }
.sc-oc .fi-modal-footer { border-top: 1px solid var(--sc-line); background: var(--sc-surface-2); }
.sc-oc .fi-modal-footer.fi-align-start .fi-modal-footer-actions { flex-direction: row-reverse; justify-content: flex-start; }
.sc-oc .fi-modal-footer .fi-btn:not(.fi-color) { background: var(--sc-surface); color: var(--sc-text); border: 1px solid var(--sc-border-strong); }
.sc-oc .fi-modal-footer .fi-btn:not(.fi-color):hover { background: var(--sc-hover); }
.sc-oc .fi-modal-icon-bg { border-radius: 10px; background: var(--sc-accent-soft) !important; }
.sc-oc .fi-modal-icon-bg .fi-icon { color: var(--sc-accent-text) !important; }
.sc-oc .fi-modal-icon-bg.fi-color-danger { background: var(--sc-danger-bg) !important; }
.sc-oc .fi-modal-icon-bg.fi-color-danger .fi-icon { color: var(--sc-danger-text) !important; }
.sc-oc .fi-fo-radio label, .sc-oc .fi-fo-checkbox-list label { color: var(--sc-text); }
.sc-oc .fi-sc-wizard-header, .sc-oc .fi-fo-wizard-header { border: 1px solid var(--sc-border); border-radius: 12px; }
.oc-fbv { display: flex; flex-direction: column; gap: 14px; color: var(--sc-text); }
.oc-fbv__state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.oc-fbv__deadline { font-size: 13.5px; color: var(--sc-text-2); }
.oc-fbv__deadline.is-late { color: var(--sc-danger-text); font-weight: 600; }
.oc-fbv .sc-card__head { padding: 12px 16px 10px; border-bottom: 1px solid var(--sc-line); }
.oc-fbv .oc-card__body { padding: 12px 16px 14px; }
.oc-list { list-style: none; margin: 0; padding: 4px 16px; }
.oc-list li { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--sc-line); font-size: 14px; }
.oc-list li:last-child { border-bottom: 0; }
.oc-list__qty { font-weight: 600; white-space: nowrap; }
.oc-list__time { white-space: nowrap; }
.oc-address { font-size: 14px; line-height: 1.5; }
.oc-address p { margin: 0; }
.oc-address__name { font-weight: 600; }
.oc-address__hint { margin-top: 6px !important; font-size: 13px; }

/* ───────────── Order details ───────────── */
.oc-subhead { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.oc-subhead__text { font-size: 14px; color: var(--sc-text-2); }
.oc-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.oc-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.oc-track { list-style: none; margin: 0; padding: 0 20px 6px; }
.oc-track li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--sc-line); }
.oc-track li:last-child { border-bottom: 0; }
.oc-track__num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--sc-border-strong); color: var(--sc-text-2); font-size: 13px; font-weight: 700; background: var(--sc-surface); }
.oc-track__num.is-done { background: var(--sc-ok-dot); border-color: var(--sc-ok-dot); color: var(--sc-on-accent); }
/* Dark mode: white on the bright green dot is too faint (2.3:1), so the step reads green on dark green. */
.dark .oc-track__num.is-done { background: var(--sc-ok-bg); border-color: var(--sc-ok-dot); color: var(--sc-ok-text); }
.oc-track__body b { font-size: 14.5px; font-weight: 600; color: var(--sc-text); }
.oc-track__body p { margin: 1px 0 0; font-size: 13px; color: var(--sc-text-2); overflow-wrap: anywhere; }

/* Item lines (the shared invoice item table, restyled here) */
.oc-items { overflow-x: auto; }
.oc-items table { width: 100%; border-collapse: collapse; font-size: 14px; }
.oc-items table, .oc-items tbody, .oc-items thead { border: 0 !important; }
.oc-items thead { background: var(--sc-surface-2) !important; }
.oc-items th { padding: 10px 16px !important; font-size: 11.5px !important; font-weight: 600 !important; letter-spacing: .06em; text-transform: uppercase; color: var(--sc-text-3) !important; border-top: 1px solid var(--sc-line); border-bottom: 1px solid var(--sc-line); text-align: right !important; }
.oc-items th:first-child { text-align: left !important; }
.oc-items tbody { background: transparent !important; }
.oc-items td { padding: 12px 16px !important; border-bottom: 1px solid var(--sc-line); color: var(--sc-text) !important; text-align: right; font-variant-numeric: tabular-nums; vertical-align: middle; }
.oc-items td:first-child { text-align: left; }
.oc-items tbody tr:last-child td { border-bottom: 0; background: transparent !important; font-weight: 600; }
.oc-items tbody tr:last-child { background: transparent !important; }
.oc-items tbody tr:last-child td:first-child { text-align: right; color: var(--sc-text-2) !important; }
.oc-items td:last-child { font-weight: 600; }
.oc-items td:first-child > div { gap: 12px !important; }
.oc-items td:first-child > div > div:first-child { width: 36px !important; height: 36px !important; flex: none; border-radius: 8px; overflow: hidden; display: grid; place-items: center; background: var(--sc-surface-2) !important; border: 1px solid var(--sc-border); }
.oc-items td:first-child > div > div:first-child img { width: 100%; height: 100%; object-fit: cover; }
.oc-items td:first-child > div > div:first-child svg { width: 16px; height: 16px; color: var(--sc-text-3); }
.oc-items td:first-child > div > div:last-child { margin-left: 0 !important; }
.oc-items td:first-child > div > div:last-child > div:first-child { font-size: 14px !important; font-weight: 600; color: var(--sc-text) !important; white-space: normal; }
.oc-items td:first-child > div > div:last-child > div + div { font-size: 12px !important; color: var(--sc-text-3) !important; white-space: normal; overflow-wrap: anywhere; }
.oc-items .shop-section > div:first-child { background: var(--sc-surface-2) !important; color: var(--sc-text-2); }
.oc-items .shop-section h3 { color: var(--sc-text) !important; }
/* Dark: chrome.css turns the item table's light utility classes (bg-gray-50, text-gray-500) into dark tokens
   with a stronger selector, which gave the Subtotal row its own band, painted square corners over the card's
   rounded ones and dimmed price and quantity. Keep the lines as in light mode. */
.dark .fi-panel-vendor .fi-main .oc-items td { color: var(--sc-text) !important; }
.dark .fi-panel-vendor .fi-main .oc-items tbody,
.dark .fi-panel-vendor .fi-main .oc-items tbody tr:last-child,
.dark .fi-panel-vendor .fi-main .oc-items tbody tr:last-child td { background: transparent !important; }
.dark .fi-panel-vendor .fi-main .oc-items tbody tr:last-child td:first-child { color: var(--sc-text-2) !important; }
.dark .fi-panel-vendor .fi-main .oc-items td:first-child > div > div:last-child > div + div { color: var(--sc-text-3) !important; }

/* ───────────── Invoice ───────────── */
.oc-inv__card { overflow: hidden; }
.oc-inv__band { padding: 22px 24px 20px; background: var(--sc-accent); color: var(--sc-on-accent); }
.oc-inv__band h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: .02em; color: var(--sc-on-accent); }
.oc-inv__band p { margin: 2px 0 0; font-size: 14.5px; font-weight: 600; letter-spacing: .04em; color: var(--sc-on-accent); }
.oc-inv__meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 18px 24px; }
.oc-inv__k { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sc-text-3); }
.oc-inv__v { margin: 0; font-size: 14.5px; font-weight: 600; color: var(--sc-text); }
.oc-inv__shop { margin-bottom: 8px; }
.oc-inv__ships { margin: 0; padding: 4px 16px 8px; font-size: 13.5px; color: var(--sc-text-2); }
.oc-inv__totals { display: flex; justify-content: flex-end; padding: 20px 24px; border-top: 1px solid var(--sc-line); }
.oc-inv__totals .oc-dl { width: 100%; max-width: 300px; }
.oc-inv__info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 20px 24px; background: var(--sc-surface-2); border-top: 1px solid var(--sc-line); font-size: 14px; line-height: 1.5; color: var(--sc-text); }
.oc-inv__info p { margin: 0; }
.oc-inv__info .oc-inv__k { margin-bottom: 8px; font-size: 13px; }
.oc-inv__contact { margin-top: 8px !important; }
.oc-inv__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--sc-line); }
.oc-inv__foot p { margin: 0; font-size: 13px; }

/* ───────────── Phone ───────────── */
@media (max-width: 1023px) {
    .oc-cols { grid-template-columns: minmax(0, 1fr); }
    .oc-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .oc-crit { grid-template-columns: minmax(0, 1fr); }
    .oc-pro { padding: 16px; }
    .oc-card__body { padding: 0 16px 16px; }
    .oc-track { padding: 0 16px 4px; }
    .oc-inv__band { padding: 18px 16px; }
    .oc-inv__meta { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px; }
    .oc-inv__totals, .oc-inv__info, .oc-inv__foot { padding-inline: 16px; }
    .oc-inv__info { grid-template-columns: minmax(0, 1fr); }
    /* Item lines stack (the shared item table hides Price on phones while its Subtotal row still spans
       three columns, which pushed a phantom fourth column off the header): name, then Price · Qty · amount */
    .oc-inv__foot .no-print, .oc-inv__foot .fi-btn { width: 100%; }
    .oc-items thead { display: none; }
    .oc-items table, .oc-items tbody { display: block; width: 100%; }
    .oc-items tbody tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; row-gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--sc-line); }
    .oc-items td { display: block; padding: 0 !important; border-bottom: 0 !important; text-align: left; white-space: nowrap; }
    .oc-items tbody tr:not(:last-child) > td:first-child { grid-column: 1 / -1; white-space: normal; }
    .oc-items tbody tr:not(:last-child) > td:nth-child(2) { display: block !important; }
    .oc-items tbody tr:not(:last-child) > td:nth-child(2)::before { content: "Price: "; }
    .oc-items tbody tr:not(:last-child) > td:nth-child(3)::before { content: "Qty: "; }
    .oc-items tbody tr:not(:last-child) > td:nth-child(2), .oc-items tbody tr:not(:last-child) > td:nth-child(3) { font-weight: 400; font-size: 13.5px; }
    .oc-items tbody tr:not(:last-child) > td:last-child { grid-column: 4; text-align: right; font-size: 14px !important; }
    .oc-items tbody tr:last-child { display: flex; justify-content: flex-end; gap: 16px; border-bottom: 0; }
    .sc-oc .fi-ta-header-toolbar { padding: 10px 12px; flex-wrap: wrap; }
    .sc-oc .fi-ta-search-field { flex: 1 1 100%; }
    .sc-oc .fi-ta-header-toolbar > div:not(.fi-ta-actions) { flex-wrap: wrap; }
    .sc-oc .fi-ta-header-toolbar .fi-ta-filters-dropdown, .sc-oc .fi-ta-header-toolbar .fi-ta-col-manager-dropdown { flex: 1 1 0; }
    .sc-oc .fi-ta-header-toolbar .fi-ta-filters-dropdown .fi-btn, .sc-oc .fi-ta-header-toolbar .fi-ta-col-manager-dropdown .fi-btn { width: 100%; }
    .sc-oc-orders .fi-header .fi-ac, .sc-oc-orders .fi-header .fi-btn { width: 100%; }

    /* Tables become stacked rows: no sideways scroll */
    .sc-oc .fi-ta-content-ctn, .sc-oc .fi-ta-content { overflow: visible !important; }
    .sc-oc .fi-ta-table thead { display: none; }
    .sc-oc .fi-ta-table, .sc-oc .fi-ta-table > tbody { display: block; width: 100%; }
    .sc-oc .fi-ta-row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 4px; padding: 12px 16px; }
    .sc-oc .fi-ta-row > td { display: block; flex: 0 0 100%; min-width: 0; padding: 0 !important; max-width: none !important; }
    .sc-oc .fi-ta-row .fi-ta-col, .sc-oc .fi-ta-row .fi-ta-text, .sc-oc .fi-ta-row .fi-ta-icon { padding: 0 !important; }
    .sc-oc .fi-ta-row .fi-ta-cell .fi-ta-actions { padding: 0 !important; min-width: 0; max-width: none !important; width: 100%; margin: 0; }
    .sc-oc .fi-ta-row::before, .sc-oc .fi-ta-row::after { content: ""; flex: 0 0 100%; height: 0; }

    /* Orders: number and earnings, then date · customer · shop, then the pills and the menu */
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-id { order: 1; flex: 1 1 auto; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-earnings { order: 2; flex: 0 0 auto; }
    .sc-oc-orders .fi-ta-row::before { order: 3; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-created-at { order: 4; flex: 0 0 auto; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-user\.name { order: 5; flex: 0 1 auto; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-shop\.name { order: 6; flex: 0 1 auto; }
    .sc-oc-orders .fi-ta-table:not(:has(.oc-cell-ship)) .fi-ta-row > .fi-ta-cell-user\.name::before,
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-user\.name ~ .fi-ta-cell-shop\.name::before { content: "\00B7"; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-user\.name, .sc-oc-orders .fi-ta-row > .fi-ta-cell-shop\.name { display: flex; align-items: center; gap: 6px; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-created-at .fi-ta-text,
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-user\.name .fi-ta-text,
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-shop\.name .fi-ta-text { font-size: 13px; color: var(--sc-text-3) !important; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-created-at, .sc-oc-orders .fi-ta-row > .fi-ta-cell-user\.name::before, .sc-oc-orders .fi-ta-row > .fi-ta-cell-shop\.name::before { font-size: 13px; color: var(--sc-text-3); }
    .sc-oc-orders .oc-cust::before { display: none; }
    .sc-oc-orders .fi-ta-row::after { order: 7; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-status { order: 8; flex: 0 0 auto; margin-top: 4px; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-payment-status { order: 9; flex: 0 0 auto; margin-top: 4px; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-fbv-status { order: 10; margin-top: 6px; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-fbv-deadline { order: 11; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell-fbv-deadline:has(.fi-ta-placeholder) { display: none; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell:last-child { order: 12; flex: 1 1 auto; }
    .sc-oc-orders .fi-ta-row > .fi-ta-cell:last-child .fi-ta-actions { justify-content: flex-end; flex-wrap: wrap; }
    .sc-oc-orders .oc-cell-ship, .sc-oc-orders .oc-cell-deadline { max-width: none; min-width: 0; }
    .sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-row > .fi-ta-cell:last-child { flex: 0 0 100%; margin-top: 6px; }
    .sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-cell .fi-ta-text { padding-block: 0 !important; }
    /* "You ship" rows already show the date under the number and the shop under the customer; Shop and
       Created at (when a seller switched them on in Columns) would repeat them */
    .sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-row > .fi-ta-cell-created-at,
    .sc-oc-orders .fi-ta-table:has(.oc-cell-ship) .fi-ta-row > .fi-ta-cell-shop\.name { display: none; }

    /* Reviews: product, stars and date, the review, your reply, then the buttons across */
    .sc-oc-reviews .fi-ta-row > .fi-ta-cell-product\.name { order: 1; }
    .sc-oc-reviews .fi-ta-row > .fi-ta-cell-rating { order: 2; flex: 1 1 auto; }
    .sc-oc-reviews .fi-ta-row > .fi-ta-cell-created-at { order: 3; flex: 0 0 auto; }
    .sc-oc-reviews .fi-ta-row > .fi-ta-cell-verified-purchase { order: 4; flex: 0 0 auto; }
    .sc-oc-reviews .fi-ta-row::before { order: 5; }
    .sc-oc-reviews .fi-ta-row > .fi-ta-cell-review { order: 6; }
    .sc-oc-reviews .fi-ta-row > .fi-ta-cell-seller-reply { order: 7; margin-top: 4px; }
    .sc-oc-reviews .fi-ta-row > .fi-ta-cell-seller-reply .fi-ta-text::before { content: "Your reply: "; color: var(--sc-text-2); font-size: 13.5px; }
    .sc-oc-reviews .fi-ta-row > .fi-ta-cell-seller-reply .fi-ta-text { display: block; }
    .sc-oc-reviews .fi-ta-row > .fi-ta-cell-seller-reply .fi-ta-text > p { display: inline; }
    .sc-oc-reviews .fi-ta-row > .fi-ta-cell:last-child { order: 8; margin-top: 6px; }
    .sc-oc-reviews .fi-ta-row::after { order: 9; }
    .sc-oc-reviews .fi-ta-icon svg { width: 20px; height: 20px; }

    /* Returns: number and status, product and units, why, what was found, back to you, buttons */
    .sc-oc-returns .fi-ta-row > .fi-ta-cell-reference { order: 1; flex: 1 1 auto; }
    .sc-oc-returns .fi-ta-row > .fi-ta-cell-status { order: 2; flex: 0 1 auto; }
    .sc-oc-returns .fi-ta-row::before { order: 3; }
    .sc-oc-returns .fi-ta-row > .fi-ta-cell-product\.name { order: 4; flex: 1 1 0; }
    .sc-oc-returns .fi-ta-row > .fi-ta-cell-quantity { order: 5; flex: 0 0 auto; }
    .sc-oc-returns .fi-ta-row > .fi-ta-cell-quantity .fi-ta-text::before { content: "\00D7 "; }
    .sc-oc-returns .fi-ta-row::after { order: 6; }
    .sc-oc-returns .fi-ta-row > .fi-ta-cell-reason { order: 7; }
    .sc-oc-returns .fi-ta-row > .fi-ta-cell-inspection-outcome { order: 8; }
    .sc-oc-returns .fi-ta-row > .fi-ta-cell-seller-clock { order: 9; }
    .sc-oc-returns .fi-ta-row > .fi-ta-cell:last-child { order: 10; margin-top: 6px; }
}
