/* MyProfit "modern" layout: Bootstrap 5 plus a few app-specific rules.
   Served as a static file (public/) on purpose: the compiled asset pipeline is committed to git and
   Heroku does not run a precompile, so new stylesheets there would never reach production. */

:root {
  --mp-ink: #15171a;
  --mp-ink-2: #3d4148;
  --mp-ground: #f6f5f0;
  --mp-surface: #fff;
  --mp-brand: #0b6e4f;
  --mp-brand-dark: #084d38;
  --mp-brand-soft: #e3f1ea;
  --mp-accent: #0b6e4f;
  --mp-accent-soft: #e3f1ea;
  --mp-ok: #0b6e4f;
  --mp-ok-soft: #e3f1ea;
  --mp-err: #b93815;
  --mp-err-soft: #fcf0eb;
  --mp-warn-bg: #fbefd9;
  --mp-warn-ink: #7a4206;
  --mp-muted: #5b616b;
  --mp-border: #e4e2da;
  --mp-line: #efede6;
  --mp-font: 'Geist', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mp-display: 'Bricolage Grotesque', 'Geist', sans-serif;
  --mp-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --bs-body-font-family: var(--mp-font);
  --bs-body-color: var(--mp-ink);
  --bs-link-color-rgb: 11, 110, 79;
  --bs-link-hover-color-rgb: 8, 77, 56;
}

body { background: var(--mp-ground); color: var(--mp-ink); font-family: var(--mp-font); font-variant-numeric: tabular-nums; }

/* ----- shell: sidebar + main ----- */
.mp-shell { min-height: 100vh; }
.mp-brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--mp-brand); text-decoration: none; }
.mp-brand span { font-family: var(--mp-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; color: var(--mp-ink); }
.mp-brand:hover { color: var(--mp-brand-dark); }
.mp-topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; justify-content: space-between;
             padding: .6rem 1rem; background: var(--mp-surface); border-bottom: 1px solid var(--mp-border); }
.mp-icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--mp-ink); }
.mp-icon { flex-shrink: 0; }

.mp-sidebar { --bs-offcanvas-width: 264px; background: var(--mp-surface); border-right: 1px solid var(--mp-border); }
.mp-sidebar-body { display: flex; flex-direction: column; gap: 1.1rem; padding: 1.25rem .9rem; height: 100%; overflow-y: auto; }
.mp-sidebar-body > .d-lg-block { padding: .1rem .6rem; }
@media (min-width: 992px) {
  .mp-shell { display: flex; }
  .mp-sidebar { position: sticky; top: 0; width: 248px; height: 100vh; flex-shrink: 0; }
}
.mp-market .form-select, .mp-market-static { height: 44px; border-radius: .6rem; border-color: var(--mp-border); background-color: var(--mp-ground); font-size: .9rem; }
.mp-market-static { display: flex; align-items: center; padding: 0 .75rem; border: 1px solid var(--mp-border); }
.mp-nav { display: flex; flex-direction: column; gap: 1rem; }
.mp-nav-group { display: flex; flex-direction: column; gap: 2px; }
.mp-nav-title { font-size: .7rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--mp-muted); padding: 0 .65rem .35rem; }
.mp-nav-link { display: flex; align-items: center; gap: .65rem; min-height: 38px; padding: 0 .65rem; border-radius: .5rem;
               color: var(--mp-ink-2); font-size: .9rem; font-weight: 500; text-decoration: none; }
.mp-nav-link:hover { background: var(--mp-ground); color: var(--mp-ink); }
.mp-nav-link.active { background: var(--mp-brand-soft); color: var(--mp-brand); font-weight: 650; }
.mp-account { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--mp-border); }
.mp-signout { margin: 0; }
.mp-signout .mp-nav-link { width: 100%; border: 0; background: transparent; text-align: left; font-family: inherit; }
.mp-signout .mp-nav-link:hover { background: var(--mp-ground); color: var(--mp-ink); }
.mp-user { padding: .4rem .65rem 0; font-size: .78rem; color: var(--mp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-nav-lock { margin-left: auto; display: inline-flex; color: var(--mp-muted); opacity: .7; }
.mp-nav-badge { margin-left: auto; min-width: 1.35rem; padding: 0 .4rem; border-radius: 999px; background: var(--mp-err); color: #fff;
  font-size: .72rem; font-weight: 600; line-height: 1.3rem; text-align: center; }
.mp-nav-lock + .mp-nav-badge { margin-left: .35rem; }
.rb-case .rb-portal { display: block; margin-top: .45rem; font-size: .8rem; }
/* free plan (User#free_plan?): what it includes and the way to the Seller plan */
.mp-plan-box { display: flex; flex-direction: column; gap: .35rem; margin-top: 1rem; padding: .8rem .85rem; border-radius: .75rem; background: var(--mp-brand-soft);
               font-size: .8rem; line-height: 1.4; color: var(--mp-ink-2); }
.mp-plan-box strong { font-size: .85rem; color: var(--mp-brand); }
.mp-plan-box a { font-weight: 650; color: var(--mp-brand); }

.mp-main { flex-grow: 1; min-width: 0; padding: 1.75rem 1rem 3rem; }
@media (min-width: 992px) { .mp-main { padding: 1.75rem 2.25rem 3rem; } }

.mp-page { max-width: 1280px; margin: 0 auto; }
.mp-page-title { font-size: 1.35rem; font-weight: 700; margin: 0; }
.mp-h1 { font-family: var(--mp-display); font-size: 2rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .25rem; }
.mp-subtle { color: var(--mp-muted); font-size: .9rem; }

.mp-card { background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: .85rem; }
.mp-btn { height: 44px; display: inline-flex; align-items: center; gap: .45rem; padding: 0 .9rem; border: 1px solid var(--mp-border);
          border-radius: .6rem; background: var(--mp-surface); font-size: .82rem; font-weight: 600; color: var(--mp-ink); }
.mp-btn:hover, .mp-btn.active { border-color: var(--mp-ink); color: var(--mp-ink); background: var(--mp-surface); }

/* segmented control (links) */
.mp-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: .6rem; overflow-x: auto; max-width: 100%; }
.mp-seg a { flex-shrink: 0; display: inline-flex; align-items: center; height: 36px; padding: 0 .8rem; border-radius: .45rem;
            font-size: .8rem; font-weight: 600; color: var(--mp-ink-2); text-decoration: none; white-space: nowrap; }
.mp-seg a:hover { background: var(--mp-ground); color: var(--mp-ink); }
.mp-seg a.active { background: var(--mp-ink); color: #fff; }

/* ----- overview dashboard (profits#index) ----- */
.dash { display: flex; flex-direction: column; gap: 1.1rem; }
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.dash-range { display: flex; gap: .5rem; align-items: center; max-width: 100%; }
.dash-custom { min-width: 21rem; }
.dash-alert { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; border-radius: .75rem; background: var(--mp-warn-bg); color: var(--mp-warn-ink); font-size: .9rem; }
.dash-alert span { flex-grow: 1; }
.dash-alert a { color: var(--mp-warn-ink); font-weight: 650; white-space: nowrap; }

.dash-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .85rem; }
@media (max-width: 1199.98px) { .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-kpi-hero { grid-column: span 2; } }
.dash-kpi { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem; background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: .85rem; min-width: 0; }
.dash-kpi-label { font-size: .8rem; font-weight: 500; color: var(--mp-muted); }
.dash-kpi-value { font-family: var(--mp-display); font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.dash-kpi-sub { font-size: .75rem; color: var(--mp-muted); }
.dash-kpi-hero { background: var(--mp-brand); border-color: var(--mp-brand); color: #fff; }
.dash-kpi-hero.is-loss { background: #7a2a10; border-color: #7a2a10; }
.dash-kpi-hero .dash-kpi-label, .dash-kpi-hero .dash-kpi-sub { color: #d3eadf; }
.dash-kpi-hero .dash-kpi-value { font-size: 1.8rem; }
.dash-delta { font-weight: 700; }
.dash-delta.up { color: var(--mp-brand); }
.dash-delta.down { color: var(--mp-err); }
.dash-kpi-hero .dash-delta { color: #fff; }

.dash-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: .85rem; }
@media (max-width: 991.98px) { .dash-row { grid-template-columns: minmax(0, 1fr); } }
.dash-card { padding: 1.15rem 1.3rem; display: flex; flex-direction: column; gap: .7rem; }
.dash-card-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.dash-card-head h2 { font-size: 1rem; font-weight: 650; margin: 0; }
.dash-card-head a { font-size: .85rem; font-weight: 600; text-decoration: none; }
.dash-empty { padding: 2.5rem 1rem; text-align: center; color: var(--mp-muted); }

.dash-flow-total, .dash-flow-net { display: flex; justify-content: space-between; font-weight: 650; }
.dash-flow-total { padding-bottom: .5rem; border-bottom: 1px solid var(--mp-line); }
.dash-flow-net { margin-top: .2rem; padding-top: .6rem; border-top: 1px solid var(--mp-border); font-size: 1rem; font-weight: 700; color: var(--mp-brand); }
.dash-flow-net.is-loss { color: var(--mp-err); }
.dash-flow-row { display: flex; flex-direction: column; gap: .25rem; }
.dash-flow-line { display: flex; align-items: baseline; gap: .5rem; font-size: .85rem; }
.dash-flow-label { flex-grow: 1; color: var(--mp-ink-2); }
.dash-flow-amount { font-weight: 600; }
.dash-flow-pct { width: 3rem; text-align: right; font-size: .75rem; color: var(--mp-muted); }
.dash-bar { height: 5px; border-radius: 3px; background: #f1efe9; }
.dash-bar > div { height: 5px; border-radius: 3px; min-width: 2px; }
.dash-bar .out { background: #d9b58e; }
.dash-bar .in { background: var(--mp-brand); }

.dash-products { overflow: hidden; }
.dash-products .dash-card-head { padding: 1.1rem 1.3rem .8rem; }
.dash-table { --bs-table-bg: transparent; }
.dash-table th { background: var(--mp-ground); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--mp-muted); white-space: nowrap; padding: .6rem 1rem; border-bottom: 0; }
.dash-table td { padding: .65rem 1rem; vertical-align: middle; border-color: var(--mp-line); font-size: .9rem; }
.dash-table th:first-child, .dash-table td:first-child { padding-left: 1.3rem; }
.dash-table th:last-child, .dash-table td:last-child { padding-right: 1.3rem; }
.dash-table .num { text-align: right; white-space: nowrap; }
.dash-table tr.is-loss td { background: var(--mp-err-soft); color: var(--mp-err); }
.dash-product { display: flex; flex-direction: column; min-width: 14rem; max-width: 30rem; }
.dash-product-name { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-sku { font-family: var(--mp-mono); font-size: .75rem; color: var(--mp-muted); }
.dash-chip-warn { display: inline-block; padding: .2rem .6rem; border-radius: 999px; background: var(--mp-warn-bg); color: var(--mp-warn-ink); font-size: .75rem; font-weight: 600; text-decoration: none; }
.dash-chip-warn:hover { background: var(--mp-warn-ink); color: #fff; }
.dash-low { color: var(--mp-err); font-weight: 650; }

/* ----- costs table ----- */
.costs-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mp-muted); font-weight: 600; white-space: nowrap; }
.costs-table td { vertical-align: middle; }
.costs-table .col-money { width: 7.5rem; min-width: 6.5rem; text-align: right; white-space: nowrap; }
.costs-table .col-name { min-width: 16rem; }
.mp-toolbar input[type=search] { max-width: 22rem; }
.mp-toolbar .form-select { width: auto; min-width: 11rem; }
.costs-table .sku { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.costs-table .asin { color: var(--mp-muted); font-size: .8rem; }

/* editable cells look like text until you focus them */
.cost-input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: .35rem;
  background: transparent;
  padding: .25rem .4rem;
  font: inherit;
  text-align: right;
}
.cost-input.text { text-align: left; }
.cost-input:hover { border-color: var(--mp-border); background: #fff; }
.cost-input:focus { outline: none; border-color: var(--mp-accent); background: #fff; box-shadow: 0 0 0 3px var(--mp-accent-soft); }
.cost-input.is-dirty { background: #fffbe6; border-color: #f0d264; }
.cost-input::-webkit-outer-spin-button, .cost-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cost-input[type=number] { -moz-appearance: textfield; }

tr.cost-row.is-saving td { opacity: .6; }
tr.cost-row.just-saved { animation: mp-saved 1.4s ease-out; }
@keyframes mp-saved { 0% { background: var(--mp-ok-soft); } 100% { background: transparent; } }
tr.cost-row.has-error { background: var(--mp-err-soft); }
.cost-row .row-error { color: var(--mp-err); font-size: .8rem; }
.cost-row .row-notice { color: var(--mp-muted); font-size: .8rem; }
.cost-row .total { font-variant-numeric: tabular-nums; color: #1c2b3a; }
.cost-row.missing .total { color: var(--mp-err); font-weight: 600; }

tr.cost-history > td { border-top: 0; padding: .75rem 1rem 1rem; }
.periods-table th, .periods-table td { padding: .2rem .5rem; font-size: .85rem; }
.periods-table tr.table-active td { font-weight: 500; }

.mp-badge-missing { background: var(--mp-err-soft); color: var(--mp-err); }
a.mp-badge-missing:hover { background: var(--mp-err); color: #fff; }
.costs-table th a { color: inherit; }
.costs-table th a:hover { color: var(--mp-accent); }
.mp-toolbar .form-control, .mp-toolbar .form-select { min-width: 12rem; }
.apply-scope .form-select { width: auto; min-width: 16rem; }
.apply-scope input[type=date] { width: auto; min-width: 0; }

/* ----- ship orders (FBM) ----- */
.ship-stats .stat { background: #fff; border: 1px solid var(--mp-border); border-radius: .5rem; padding: .35rem .7rem; font-size: .85rem; color: var(--mp-muted); }
.ship-stats .stat b { color: #1c2b3a; font-size: 1rem; margin-right: .2rem; }
.ship-stats .stat.is-late { border-color: #f3b6b6; background: var(--mp-err-soft); }
.ship-stats .stat.is-late b { color: var(--mp-err); }
.ship-stats .stat.is-today { border-color: #f0d264; background: #fffbe6; }
.nav-pills.nav-sm .nav-link { padding: .3rem .7rem; font-size: .875rem; }
.ship-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mp-muted); font-weight: 600; white-space: nowrap; }
.ship-table td { vertical-align: top; padding-top: .7rem; padding-bottom: .7rem; }
.ship-table .col-pick { width: 2rem; }
.ship-table .col-addr { min-width: 15rem; }
.ship-table .col-items { min-width: 16rem; }
.ship-table .col-actions { width: 15rem; }
.ship-table .order-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; white-space: nowrap; }
.ship-table .addr { line-height: 1.3; }
.ship-table .addr .name { font-weight: 600; }
.ship-table .item { font-size: .9rem; }
.ship-table .item .sku { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; color: var(--mp-muted); }
.ship-table .copy { font-size: .8rem; }
.ship-table .shipment { font-size: .9rem; }
.ship-table .tracking { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.ship-table .row-error { color: var(--mp-err); font-size: .8rem; max-width: 14rem; margin-left: auto; }
.ship-table tr.ship-form > td { background: #f6f9ff; border-top: 0; }
.ship-table .tracking-input { min-width: 16rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ship-table .form-select, .ship-table .form-control { width: auto; }
.ship-table .package-dims { width: 20rem; }
.ship-table .package-dims .form-control { width: 4.5rem; flex: 0 0 auto; }
.ship-table .package-weight { width: 9.5rem; }
.ship-table .package-weight .form-control { width: 5rem; flex: 0 0 auto; }
.rates-table th { font-size: .75rem; }
.rates-table td { vertical-align: middle; padding: .35rem .5rem; }
.rates-table label { cursor: pointer; margin: 0; }

.pagination { margin: 0; }
.pagination .page-item .page-link { color: #1c2b3a; }
.pagination .page-item.active .page-link { background: var(--mp-accent); border-color: var(--mp-accent); }

/* ----- product cells (dashboard top products + products page) ----- */
.dash-product-cell { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.dash-thumb { width: 38px; height: 38px; flex-shrink: 0; border-radius: .5rem; object-fit: contain; background: #fff; border: 1px solid var(--mp-line); }
.dash-thumb-empty { display: inline-flex; align-items: center; justify-content: center; background: #eeece5; border: 0; color: var(--mp-muted); font-size: .72rem; font-weight: 700; }

/* ----- products page (profits#profit_analytics) ----- */
.prod-search-box { display: flex; align-items: center; gap: .5rem; width: 22rem; max-width: 100%; height: 44px; padding: 0 .85rem; margin: 0;
                   background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: .6rem; color: var(--mp-muted); }
.prod-search-box:focus-within { border-color: var(--mp-brand); box-shadow: 0 0 0 3px var(--mp-brand-soft); }
.prod-search-box input { flex-grow: 1; min-width: 0; border: 0; outline: none; background: transparent; font-size: .9rem; color: var(--mp-ink); }
.prod-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .85rem; }
.prod-controls-right { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.mp-btn-dark, .mp-btn-dark:hover { background: var(--mp-ink); border-color: var(--mp-ink); color: #fff; }
.prod-columns-menu { min-width: 14rem; max-height: 24rem; overflow-y: auto; }
.prod-columns-menu .dropdown-item { font-size: .85rem; cursor: pointer; }
.prod-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .85rem; }
.prod-chip { display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 .9rem; border-radius: 999px; border: 1px solid var(--mp-border);
             background: var(--mp-surface); color: var(--mp-ink); font-size: .82rem; font-weight: 600; text-decoration: none; }
.prod-chip:hover { border-color: var(--mp-ink); color: var(--mp-ink); }
.prod-chip-count { font-size: .75rem; padding: .05rem .5rem; border-radius: 999px; background: #eeece5; color: var(--mp-ink-2); }
.prod-chip.warn .prod-chip-count { background: var(--mp-warn-bg); color: var(--mp-warn-ink); }
.prod-chip.active { background: var(--mp-ink); border-color: var(--mp-ink); color: #fff; }
.prod-chip.active .prod-chip-count { background: #3d4148; color: #fff; }
.prod-table th a { color: inherit; text-decoration: none; }
.prod-table th a:hover, .prod-table th a.active { color: var(--mp-ink); }
.prod-table tfoot th, .prod-table tfoot td { background: var(--mp-ground); border-top: 1px solid #d8d5cb; border-bottom: 0; font-weight: 650; font-size: .88rem; padding-top: .8rem; padding-bottom: .8rem; }
.prod-table tfoot th { font-size: .88rem; text-transform: none; letter-spacing: 0; color: var(--mp-ink); }
.prod-table .dash-product { min-width: 15rem; max-width: 24rem; }
.prod-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .85rem; }
turbo-frame[busy] .dash-products { opacity: .6; transition: opacity .15s; }
/* keep the product name on screen when the wide table scrolls sideways; cost columns start a group */
.prod-table th, .prod-table td { padding-left: .6rem; padding-right: .6rem; }
.prod-table th:first-child, .prod-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--mp-surface); box-shadow: inset -1px 0 0 var(--mp-line); }
.prod-table thead th:first-child, .prod-table tfoot th:first-child { background: var(--mp-ground); }
.prod-table tr.is-loss td:first-child { background: var(--mp-err-soft); }
.prod-table [data-col="fees"] { border-left: 1px solid var(--mp-line); }
.prod-table .dash-product-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.prod-table .dash-product { min-width: 12rem; max-width: 18rem; }
@media (max-width: 575.98px) {
  .dash-range { flex-wrap: wrap; }
  .dash-range .mp-seg { flex: 1 1 100%; }
  .prod-search, .prod-search-box { width: 100%; }
  .prod-table .dash-thumb { display: none; }
  .prod-table .dash-product { min-width: 8.5rem; max-width: 10rem; }
}

/* ----- P&L page (profits#profit_and_loss) ----- */
.pnl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.pnl-picker .form-select { height: 44px; min-width: 18rem; max-width: 32rem; border-radius: .6rem; border-color: var(--mp-border); font-size: .9rem; }
.pnl-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
@media (max-width: 991.98px) { .pnl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pnl-table th, .pnl-table td { padding: .5rem .7rem; white-space: nowrap; }
.pnl-table thead th a { color: inherit; text-decoration: none; }
.pnl-table thead th a:hover { color: var(--mp-brand); text-decoration: underline; }
.pnl-partial { display: block; font-size: .65rem; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--mp-muted); }
.pnl-table tbody th { font-size: .88rem; font-weight: 500; color: var(--mp-ink-2); text-transform: none; letter-spacing: 0; background: var(--mp-surface); }
.pnl-table th:first-child { position: sticky; left: 0; z-index: 1; box-shadow: inset -1px 0 0 var(--mp-line); min-width: 11rem; }
.pnl-table .pnl-total { background: #faf9f5; font-weight: 650; border-left: 1px solid var(--mp-line); }
.pnl-table thead .pnl-total { background: var(--mp-ground); color: var(--mp-ink); }
.pnl-table tr.pnl-total > th, .pnl-table tr.pnl-total > td { font-weight: 700; color: var(--mp-ink); }
.pnl-table tr.pnl-memo > th, .pnl-table tr.pnl-memo > td { font-size: .78rem; color: var(--mp-muted); padding-top: .3rem; padding-bottom: .3rem; }
.pnl-table tr.pnl-memo > th { padding-left: 1.6rem; }
.pnl-table tr.pnl-net > th, .pnl-table tr.pnl-net > td { background: #eef6f1; font-weight: 700; color: var(--mp-brand); border-top: 1px solid #cfe3d8; }
.pnl-table tr.pnl-net > td.pnl-total { background: #e3f1ea; }
.pnl-table tr.pnl-pct > th, .pnl-table tr.pnl-pct > td { color: var(--mp-ink-2); }
.pnl-table tr.pnl-count > th, .pnl-table tr.pnl-count > td { font-size: .82rem; color: var(--mp-muted); }
.pnl-table td.text-loss, .pnl-table tr.pnl-net > td.text-loss { color: var(--mp-err); }
@media (max-width: 575.98px) { .pnl-picker, .pnl-picker .form-select { width: 100%; min-width: 0; } }

/* ----- advertising page (ppcs#index) ----- */
.text-loss { color: var(--mp-err); }
.text-gain { color: var(--mp-brand); }
.ads-connect { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; padding: 2rem; max-width: 44rem; }
.ads-connect h2 { font-family: var(--mp-display); font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.ads-connect p { margin: 0; color: var(--mp-ink-2); }
.ads-connect .dash-extra-icon { width: 48px; height: 48px; border-radius: .75rem; background: var(--mp-brand-soft); color: var(--mp-brand); display: inline-flex; align-items: center; justify-content: center; }
.ads-scope { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem;
             background: var(--mp-surface); border: 1px solid var(--mp-border); border-radius: .75rem; }
.ads-state { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; text-transform: capitalize;
             background: #eeece5; color: var(--mp-ink-2); margin-right: .25rem; }
.ads-state-enabled { background: var(--mp-brand-soft); color: var(--mp-brand); }
.ads-state-archived { background: #f1efe9; color: var(--mp-muted); }
.dash-products .ads-head { align-items: center; }
.ads-chips { padding: 0 1.3rem .85rem; margin: 0; }
.ads-campaign { display: flex; flex-direction: column; min-width: 14rem; max-width: 26rem; }
.ads-campaign-name { font-weight: 600; color: var(--mp-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-campaign-name:hover { color: var(--mp-brand); text-decoration: underline; }
.ads-table tr.is-loss td { color: var(--mp-ink); }
.ads-table tr.is-loss td:nth-child(4) { color: var(--mp-err); font-weight: 650; }
.ads-term-campaign { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.ads-foot { padding: .75rem 1.3rem 1rem; margin: 0; }

/* ----- inventory page (inventories#index) ----- */
.inv-date { display: block; font-size: .72rem; color: var(--mp-muted); }
.inv-over { color: var(--mp-warn-ink); font-weight: 600; }

/* ----- returns page (customer_returns#index) ----- */
.ret-outcomes { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .75rem; }
.ret-outcome { display: flex; flex-direction: column; gap: .15rem; padding: .85rem 1rem; border-radius: .7rem; background: #f6f5f0; }
.ret-outcome.is-good { background: var(--mp-brand-soft); }
.ret-outcome-units { font-family: var(--mp-display); font-size: 1.4rem; font-weight: 700; }
.ret-outcome-label { font-size: .85rem; font-weight: 600; color: var(--mp-ink-2); }
.ret-reason { font-size: .85rem; color: var(--mp-ink-2); white-space: nowrap; }
.ret-order a { color: var(--mp-ink); }

/* ----- review requests page (solicitations#index) ----- */
.mp-btn-brand, .mp-btn-brand:hover { background: var(--mp-brand); border-color: var(--mp-brand); color: #fff; }
.mp-btn-brand:hover { background: var(--mp-brand-dark); border-color: var(--mp-brand-dark); color: #fff; }
.rr-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.3rem; }
.rr-status-main { display: flex; gap: .9rem; align-items: flex-start; flex: 1 1 28rem; }
.rr-status h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .2rem; }
.rr-status p { margin: 0; color: var(--mp-ink-2); font-size: .9rem; max-width: 52rem; }
.rr-status-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.rr-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: .35rem; flex-shrink: 0; background: var(--mp-muted); }
.rr-status.is-on { border-color: #cfe3d8; background: #f4faf6; }
.rr-status.is-on .rr-dot { background: var(--mp-brand); box-shadow: 0 0 0 4px var(--mp-brand-soft); }
.rr-status.is-paused { border-color: #f0d9b0; background: #fffaf0; }
.rr-status.is-paused .rr-dot { background: #c98a3a; box-shadow: 0 0 0 4px var(--mp-warn-bg); }
.rr-settings { display: flex; flex-direction: column; gap: .85rem; font-size: .9rem; }
.rr-settings .form-control { border-color: var(--mp-border); }
.rr-settings input[type=number] { max-width: 7rem; }
.rr-pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eeece5; color: var(--mp-ink-2); white-space: nowrap; }
.rr-sent { background: var(--mp-brand-soft); color: var(--mp-brand); }
.rr-queued { background: #e8eefb; color: #274a8f; }
.rr-error { display: block; font-size: .75rem; color: var(--mp-err); margin-top: .15rem; }
.rr-pill.rr-error { display: inline-block; background: var(--mp-err-soft); color: var(--mp-err); margin: 0; font-size: .75rem; }

/* Sales by state */
.sbs-explain { padding: 1rem 1.3rem; }
.sbs-table th[scope="row"] { font-weight: 400; background: transparent; text-transform: none; letter-spacing: 0; font-size: .9rem; color: inherit; padding: .65rem 1rem .65rem 1.3rem; }
.sbs-state .sbs-counts { margin-left: .4rem; font-size: .68rem; }
.sbs-threshold { font-size: .85rem; min-width: 10rem; }
.sbs-bar-over { background: var(--mp-err) !important; }
.sbs-bar-near { background: #d99a2b !important; }
.sbs-pill-over { background: var(--mp-err-soft); color: var(--mp-err); }
.sbs-pill-near { background: var(--mp-warn-bg); color: var(--mp-warn-ink); }
.sbs-pill-no_tax { background: transparent; color: var(--mp-muted); padding-left: 0; }
.sbs-no_tax td, .sbs-no_tax th { color: var(--mp-muted); }
.sbs-input { width: 7.5rem; margin-left: auto; text-align: right; }
.sbs-status { min-width: 10rem; width: 11rem; }
.sbs-state { min-width: 10rem; }
.sbs-edit-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1.3rem; border-top: 1px solid var(--mp-line); position: sticky; bottom: 0; background: var(--mp-surface); }
.sbs-channels { padding: 1rem 1.3rem 1.1rem; }
.sbs-imported { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.sbs-imported details { flex-basis: 100%; }
.sbs-channel { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .25rem .15rem .6rem; border: 1px solid var(--mp-border); border-radius: 999px; font-size: .8rem; }
.sbs-remove { border: 0; background: transparent; color: var(--mp-muted); font-size: 1rem; line-height: 1; padding: 0 .35rem; border-radius: 999px; }
.sbs-remove:hover { background: var(--mp-err-soft); color: var(--mp-err); }
.sbs-other { white-space: nowrap; }

/* Xero */
.xero-connection h2 { font-size: 1.05rem; }
.xero-conn-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.xero-status { min-width: 12rem; }
.xero-mapping select { min-width: 22rem; max-width: 30rem; }
.xero-mapping tr.xero-group th { background: transparent; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--mp-muted); padding-top: 1.1rem; border-bottom: 1px solid var(--mp-line); }
.xero-cat { min-width: 16rem; max-width: 26rem; }
.xero-acct-state { margin-top: .2rem; }
.xero-idle { padding: .5rem 1.3rem 0; }
.xero-idle summary { cursor: pointer; padding: .4rem 0; }
.xero-preview-row > td { background: var(--mp-ground); padding: .9rem 1.3rem 1rem; }
.xero-preview-table { max-width: 52rem; background: var(--mp-surface); }
.xero-preview-table th, .xero-preview-table td { font-size: .85rem; }

/* ----- orders: search (orders#index) and one order (orders#show) ----- */
.ord-table .ord-cell { min-width: 12.5rem; }
.ord-id { font-family: var(--mp-mono); font-size: .82rem; font-weight: 600; color: var(--mp-ink); text-decoration: none; white-space: nowrap; }
.ord-id:hover { color: var(--mp-accent); text-decoration: underline; }
.ord-meta { display: block; font-size: .75rem; color: var(--mp-muted); white-space: nowrap; }
.ord-ship { font-size: .85rem; color: var(--mp-ink-2); white-space: nowrap; }
.ord-refund { display: block; font-size: .72rem; color: var(--mp-err); }
.ord-status { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 650; vertical-align: middle; letter-spacing: 0; }
.ord-status.is-shipped { background: var(--mp-ok-soft); color: var(--mp-ok); }
.ord-status.is-open { background: var(--mp-warn-bg); color: var(--mp-warn-ink); }
.ord-status.is-cancelled { background: #eeece5; color: var(--mp-muted); }
.ord-back { font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--mp-muted); }
.ord-back:hover { color: var(--mp-ink); }
.ord-title { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.ord-title-id { font-family: var(--mp-mono); font-size: .8em; letter-spacing: -.01em; }
.ord-title .ord-status { font-family: var(--mp-font); font-size: .8rem; }
.ord-lines td { padding-top: .5rem; padding-bottom: .5rem; }
.ord-lines td:first-child, .ord-lines th:first-child { padding-left: 0; }
.ord-lines td:last-child, .ord-lines th:last-child { padding-right: 0; }
.ord-lines tfoot th, .ord-lines tfoot td { border-bottom: 0; border-top: 1px solid #d8d5cb; font-weight: 650; background: transparent; font-size: .9rem; color: var(--mp-ink); text-transform: none; letter-spacing: 0; }
.ord-line-date { width: 4.5rem; color: var(--mp-muted); white-space: nowrap; }
.ord-line-kind { display: block; font-size: .72rem; color: var(--mp-muted); }
.ord-side { display: flex; flex-direction: column; gap: .85rem; min-width: 0; }
.ord-fact { display: flex; flex-direction: column; gap: .1rem; padding: .35rem 0; }
.ord-fact + .ord-fact { border-top: 1px solid var(--mp-line); padding-top: .6rem; }
.ord-good { color: var(--mp-ok); font-weight: 600; }
.ord-meta .ord-status { margin-left: .2rem; }

/* ----- sales tax (sales_taxes#index) ----- */
.dash-alert.tax-ok { background: var(--mp-ok-soft); color: var(--mp-ok); }
.dash-alert.tax-ok a { color: var(--mp-ok); }
.tax-chip { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 650; white-space: nowrap; }
.tax-chip.is-amazon { background: var(--mp-ok-soft); color: var(--mp-ok); }
.tax-chip.is-you { background: var(--mp-warn-bg); color: var(--mp-warn-ink); }
.tax-chip.is-off { background: #eeece5; color: var(--mp-muted); }
.tax-state { font-weight: 600; color: var(--mp-ink); text-decoration: none; margin-right: .35rem; }
.tax-state:hover { color: var(--mp-accent); text-decoration: underline; }
.tax-sub { font-size: .9rem; font-weight: 650; margin: 1.1rem 0 .4rem; }

/* ----- settings (registrations#edit) and Amazon connections (awscredentials#index) ----- */
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; align-items: start; }
@media (max-width: 991.98px) { .set-grid { grid-template-columns: minmax(0, 1fr); } }
.set-card { padding: 1.2rem 1.3rem; }
.set-card h2 { font-size: 1rem; font-weight: 650; margin: 0 0 .8rem; }
.set-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.set-form { display: grid; gap: .8rem; }
.set-form .form-label { font-size: .82rem; font-weight: 600; margin-bottom: .25rem; }
.set-form .form-text { font-size: .75rem; }
.set-action { border-top: 1px solid var(--mp-line); padding: .6rem 0; }
.set-action summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.set-action[open] summary { margin-bottom: .4rem; }
.set-passkeys { list-style: none; margin: 0 0 .5rem; padding: 0; }
.set-passkeys > li { display: grid; gap: .1rem; padding: .5rem 0; border-top: 1px solid var(--mp-line); }
.set-passkeys > li > span { display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: baseline; }
.set-passkeys .set-action { border-top: 0; padding: .2rem 0 0; }
.set-inline { width: auto; min-width: 14rem; }
.conn-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.conn-note { font-size: .85rem; margin-top: .6rem; }
.conn-empty { padding: .25rem 0; }
.mp-subtle-inv { opacity: .7; font-weight: 400; margin-left: .3rem; }

/* ----- help center (help#index, help#show) ----- */
.help-hero { max-width: 44rem; }
.help-hero .mp-subtle { font-size: 1rem; margin-bottom: 1rem; }
.help-search { width: 100%; max-width: 36rem; height: 50px; }
.help-search input { font-size: 1rem; }
.help-group h2 { font-size: .8rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--mp-muted); margin: .4rem 0 .6rem; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .75rem; }
.help-card { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.1rem; text-decoration: none; color: var(--mp-ink);
             transition: border-color .12s, box-shadow .12s; }
.help-card:hover { border-color: var(--mp-ink); color: var(--mp-ink); box-shadow: 0 2px 10px rgba(20, 20, 10, .06); }
.help-card-title { font-weight: 650; }
.help-card-sub { font-size: .85rem; color: var(--mp-muted); line-height: 1.4; }
.help-none { margin: 0; }
.help-layout { display: grid; grid-template-columns: minmax(0, 46rem) 15rem; gap: 2.5rem; align-items: start; }
@media (max-width: 991.98px) { .help-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; } }
.help-crumbs { font-size: .82rem; color: var(--mp-muted); margin-bottom: .6rem; }
.help-crumbs a { color: var(--mp-muted); text-decoration: none; font-weight: 600; }
.help-crumbs a:hover { color: var(--mp-ink); }
.help-lede { font-size: 1.05rem; color: var(--mp-ink-2); margin: 0 0 1.5rem; }
.help-body { font-size: .95rem; line-height: 1.65; color: var(--mp-ink); }
.help-body h2 { font-size: 1.15rem; font-weight: 700; margin: 1.8rem 0 .6rem; }
.help-body h3 { font-size: 1rem; font-weight: 650; margin: 1.3rem 0 .4rem; }
.help-body p, .help-body ul, .help-body ol { margin: 0 0 .9rem; }
.help-body li { margin-bottom: .35rem; }
.help-body code { font-family: var(--mp-mono); font-size: .85em; background: #eeece5; padding: .05rem .35rem; border-radius: .3rem; color: var(--mp-ink); }
.help-body table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: .9rem; }
.help-body th, .help-body td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--mp-line); vertical-align: top; }
.help-body th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mp-muted); font-weight: 650; }
.help-tip { background: var(--mp-ok-soft); color: var(--mp-ink); border-radius: .6rem; padding: .75rem 1rem; margin: 0 0 1rem; }
.help-warn { background: var(--mp-warn-bg); color: var(--mp-warn-ink); border-radius: .6rem; padding: .75rem 1rem; margin: 0 0 1rem; }
.help-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--mp-line); }
.help-pager-link { display: flex; flex-direction: column; text-decoration: none; color: var(--mp-ink); font-weight: 600; max-width: 48%; }
.help-pager-link.is-next { text-align: right; margin-left: auto; }
.help-pager-link:hover { color: var(--mp-accent); }
.help-side { position: sticky; top: 1.5rem; display: flex; flex-direction: column; gap: .15rem; }
@media (max-width: 991.98px) { .help-side { position: static; } }
.help-side-title { font-size: .75rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--mp-muted); margin-bottom: .4rem; }
.help-side-link { padding: .35rem .6rem; border-radius: .45rem; color: var(--mp-ink-2); text-decoration: none; font-size: .9rem; }
.help-side-link:hover { background: #eeece5; color: var(--mp-ink); }
.help-side-link.active { background: var(--mp-ink); color: #fff; }
.help-side-all { margin-top: .8rem; font-size: .85rem; font-weight: 600; text-decoration: none; }

/* ----- keyword harvest (ppc_keyword_harvests) ----- */
.hv-page .hv-form { display: grid; gap: .85rem; max-width: 52rem; }
.hv-steps { margin: 0 0 .8rem; padding-left: 1.2rem; display: grid; gap: .6rem; font-size: .92rem; color: var(--mp-ink-2); }
.hv-products { max-height: 20rem; overflow-y: auto; border: 1px solid var(--mp-line); border-radius: .6rem; }
.hv-product { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .5rem .75rem;
              border-bottom: 1px solid var(--mp-line); cursor: pointer; margin: 0; font-size: .9rem; }
.hv-product:last-child { border-bottom: 0; }
.hv-product:hover { background: var(--mp-ground); }
.hv-product input { width: 1rem; height: 1rem; accent-color: var(--mp-accent); }
.hv-product-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv-choice { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; margin: 0 0 .6rem; cursor: pointer; }
.hv-choice input { margin-top: .25rem; accent-color: var(--mp-accent); }
.hv-custom { margin: 0 0 .5rem 1.5rem; }
.hv-campaigns { margin: 0 0 .6rem; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .92rem; }
tr.hv-legacy td { color: var(--mp-muted); }

/* ----- campaign rules and Target ACoS (campaign_rules, ppc_acos_targets) ----- */
.rl-intro { margin: 0; font-size: .92rem; color: var(--mp-ink-2); max-width: 54rem; }
.rl-set { gap: .8rem; }
.rl-set-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .6rem 1rem; }
.rl-set-head h2 { font-size: 1.05rem; font-weight: 650; margin: 0 0 .15rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rl-rules { margin: 0; padding: 0; list-style: none; display: grid; }
.rl-rules li { display: grid; grid-template-columns: minmax(9rem, 14rem) minmax(0, 1fr); gap: .25rem 1rem; padding: .55rem 0;
               border-top: 1px solid var(--mp-line); font-size: .9rem; }
.rl-rule-name { font-weight: 600; }
.rl-rule-text { color: var(--mp-ink-2); }
.rl-rules li.is-off, .rl-rules li.is-off .rl-rule-text { color: var(--mp-muted); }
@media (max-width: 575.98px) { .rl-rules li { grid-template-columns: 1fr; } }

.rl-form { display: grid; gap: .85rem; max-width: 60rem; }
.rl-list { display: grid; gap: .75rem; }
.rl-rule { padding: 1rem 1.2rem; display: grid; gap: .65rem; margin: 0; min-width: 0; }
.rl-rule.is-invalid { border-color: var(--mp-err); }
.rl-rule-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.rl-rule-head .rl-name { flex: 1 1 16rem; width: 0; min-width: 12rem; font-weight: 600; } /* width 0: a text input otherwise refuses to share the line */
.rl-rule-head .rl-status { width: auto; }
.rl-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; font-size: .92rem; }
.rl-line .form-select, .rl-line .form-control { width: auto; }
.rl-word { font-weight: 650; min-width: 7.5rem; }
.rl-line .rl-wide { min-width: 13rem; max-width: 100%; }
.rl-line .rl-narrow { min-width: 6rem; }
.rl-line .rl-num { width: 6.5rem; }
.rl-bid { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.rl-errors { margin: 0; padding-left: 1.1rem; color: var(--mp-err); font-size: .85rem; }
.rl-filter { flex: 1 1 16rem; width: auto; }
.rl-adgroups { max-height: 28rem; }
.rl-adgroup-meta { display: inline-flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; align-items: center; }
.rl-history td { vertical-align: top; }

.acos-name { display: block; font-weight: 600; color: var(--mp-ink); }
.acos-campaign { display: block; font-size: .78rem; color: var(--mp-muted); }
.acos-cell { display: flex; align-items: center; gap: .5rem; }
.acos-input { width: 7.5rem; flex-wrap: nowrap; }
.acos-msg { font-size: .78rem; font-weight: 600; white-space: nowrap; }
.acos-msg.is-saved { color: var(--mp-ok); }
.acos-msg.is-error { color: var(--mp-err); white-space: normal; }
.acos-sets a { display: inline-block; margin-right: .4rem; font-size: .85rem; }

/* ----- settlements ----- */
.st-rate { display: block; font-size: .72rem; color: var(--mp-muted); font-weight: 500; }
.st-statement td { padding-top: .5rem; padding-bottom: .5rem; }
.st-line { display: block; font-weight: 600; color: var(--mp-ink); }
.st-note { display: block; font-size: .76rem; color: var(--mp-muted); }
.st-share { font-size: .8rem; color: var(--mp-muted); width: 5rem; }
/* what makes up a statement row, indented under it */
.st-statement .st-sub td { padding-top: .1rem; padding-bottom: .4rem; }
.st-sub .st-line { font-weight: 500; font-size: .84rem; padding-left: 1rem; }
.st-sub .st-note { padding-left: 1rem; max-width: 34rem; }
.st-sub .num { font-size: .84rem; color: var(--mp-muted); }
.st-total th { font-size: 1rem; border-top: 2px solid var(--mp-ink); border-bottom: 0; padding-top: .7rem; }
.st-downloads { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; font-size: .9rem; }
.st-downloads a { font-weight: 600; text-decoration: none; }
.st-downloads a:hover { text-decoration: underline; }
.st-subhead { font-size: .82rem; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--mp-muted); margin: .4rem 0 0; }
.set-narrow { max-width: 40rem; }

/* ----- ad schedule (ppc_ad_schedulings) ----- */
.sch-week { display: inline-grid; gap: 1px; }
.sch-week-row { display: grid; grid-template-columns: repeat(24, 5px); gap: 1px; }
.sch-week-row span { height: 5px; background: #e7e4dc; border-radius: 1px; }
.sch-week-row span.on { background: var(--mp-brand); }
.sch-grid-wrap { overflow-x: auto; }
.sch-grid { border-collapse: separate; border-spacing: 2px; font-size: .72rem; }
.sch-grid th { font-weight: 600; color: var(--mp-muted); text-align: center; padding: 0; }
.sch-grid th button { border: 0; background: none; color: inherit; font: inherit; padding: .1rem .15rem; border-radius: .3rem; cursor: pointer; min-width: 1.6rem; }
.sch-grid th button:hover { background: var(--mp-ground); color: var(--mp-ink); }
.sch-grid tbody th { text-align: left; padding-right: .3rem; }
.sch-grid td { padding: 0; }
.sch-grid input { appearance: none; -webkit-appearance: none; display: block; width: 1.3rem; height: 1.3rem; margin: 0; border-radius: .25rem;
                  background: #e7e4dc; cursor: pointer; }
.sch-grid input:checked { background: var(--mp-brand); }
.sch-grid input:focus-visible { outline: 2px solid var(--mp-accent); outline-offset: 1px; }
.dash-flow-note { font-size: .78rem; color: var(--mp-muted); margin: .1rem 0 0; }
/* Reimbursements */
.rb-kind { display: block; font-weight: 600; font-size: .85rem; }
.rb-soon { color: var(--mp-warn-ink); font-weight: 650; }
.rb-actions { white-space: nowrap; text-align: right; }
.rb-actions form { margin-left: .25rem; }
.rb-case { display: inline-block; text-align: left; vertical-align: middle; margin-right: .25rem; }
.rb-case summary { cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--mp-muted); }
.rb-case[open] { display: block; margin: .3rem 0 .5rem; white-space: normal; max-width: 34rem; }
.rb-case p { font-size: .82rem; background: var(--mp-ground); border-radius: .5rem; padding: .6rem .75rem; margin: .4rem 0; }
/* Amazon owes you tables fit the card: long product names wrap to two lines, the case text sits above the buttons */
.rb-table .dash-product { min-width: 11rem; max-width: 16rem; }
.rb-table .dash-product-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rb-table .rb-case { display: block; margin: 0 0 .35rem; }
.rb-table .rb-case[open] { max-width: 22rem; }
.mp-reconnect { margin-bottom: 1.25rem; }

/* Fee check (FeeChecksController) */
.fc-muted td { color: var(--mp-muted); }
.fc-reason { display: block; font-weight: 600; font-size: .85rem; }
.fc-muted .fc-reason { font-weight: 500; }
.fc-size { white-space: nowrap; }
.fc-pkg { display: flex; align-items: center; gap: .3rem; flex-wrap: nowrap; }
.fc-pkg .form-control { width: 3.4rem; padding: .2rem .3rem; font-size: .8rem; }
.fc-pkg .btn { white-space: nowrap; }
.fc-why { min-width: 14rem; }
.fc-explain { display: block; font-size: .78rem; line-height: 1.35; color: var(--mp-muted); margin-top: .15rem; }
.fc-actions { white-space: normal; min-width: 9rem; }
.fc-actions .rb-case { display: block; margin: 0 0 .3rem; }
.fc-actions form { display: inline-block; margin: .15rem 0 0 .25rem; }
.fc-table .dash-product { min-width: 10rem; max-width: 13rem; }
.fc-table .dash-product-name { white-space: normal; }
.fc-table .tax-chip { white-space: normal; }

/* First-run page (WelcomeController, Onboarding::Status) */
.wl-page { max-width: 52rem; }
.wl-card { padding: 1.4rem 1.5rem; }
.wl-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wl-step { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: .9rem; padding: .9rem 0; border-top: 1px solid var(--mp-border); }
.wl-step:first-child { border-top: 0; padding-top: 0; }
.wl-step strong { font-weight: 650; color: var(--mp-ink); }
.wl-step > div > span:not(.wl-state) { display: block; margin-top: .15rem; font-size: .88rem; color: var(--mp-muted); line-height: 1.45; }
.wl-dot { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%;
          background: var(--mp-ground); color: var(--mp-muted); font-weight: 650; font-size: .85rem; }
.wl-step.is-done .wl-dot { background: var(--mp-brand-soft); color: var(--mp-brand); }
.wl-step.is-current .wl-dot, .wl-step.is-working .wl-dot { background: var(--mp-brand); color: #fff; }
.wl-step.is-working .wl-dot .mp-icon { animation: wl-spin 1.2s linear infinite; }
@keyframes wl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wl-step.is-working .wl-dot .mp-icon { animation: none; } }
.wl-state { display: inline-block; margin-left: .4rem; padding: .05rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 650;
            background: var(--mp-ground); color: var(--mp-muted); vertical-align: 1px; }
.wl-step.is-done .wl-state { background: var(--mp-brand-soft); color: var(--mp-brand); }
.wl-step.is-working .wl-state { background: var(--mp-warn-bg); color: var(--mp-warn-ink); }
.wl-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.wl-fine { margin: .7rem 0 0; font-size: .8rem; color: var(--mp-muted); }
.wl-included { margin-top: 1rem; }
.wl-h2 { font-size: 1rem; font-weight: 650; margin: 0 0 .5rem; }
.wl-included ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; color: var(--mp-ink-2); }
.wl-included li + li { margin-top: .3rem; }
.wl-next { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }

/* Amazon owes you > "Let MyProfit file them": the guided Seller Central setup and the shipment invoices (money_owed/_filing) */
.fs-email { display: flex; align-items: center; gap: .5rem; margin-top: .5rem; }
.fs-email code { padding: .2rem .55rem; border-radius: .4rem; background: var(--mp-ground); color: var(--mp-ink); font-size: .9rem; }
.fs-perms { margin: .5rem 0 .45rem; padding-left: 1.15rem; font-size: .9rem; color: var(--mp-ink); }
.fs-perms li { margin: .15rem 0; }
.fs-docs { margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--mp-border); }
.fs-shipments, .fs-files { list-style: none; margin: 0 0 .8rem; padding: 0; font-size: .88rem; }
.fs-shipments li, .fs-files li { padding: .35rem 0; border-top: 1px solid var(--mp-border); }
.fs-shipments li:first-child, .fs-files li:first-child { border-top: 0; }
.fs-files li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.fs-ok { color: var(--mp-brand); font-weight: 600; }
.fs-upload { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.fs-upload .form-select, .fs-upload .form-control { width: auto; flex: 1 1 14rem; max-width: 100%; }
.cf-docs a { margin-right: .5rem; }

/* Admin > Outreach */
.or-link { display: inline-block; max-width: 18rem; overflow-wrap: anywhere; font-size: .8rem; margin-right: .3rem; }
.or-add { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.or-add .form-control { width: auto; flex: 1 1 10rem; }

/* Connecting to Amazon (awscredentials/connect) */
.cn-device { background: var(--mp-warn-bg); color: var(--mp-warn-ink); border: 0; margin-bottom: 1rem; }
.cn-device .wl-h2 { color: var(--mp-warn-ink); }
.cn-device p { margin: 0; font-size: .9rem; line-height: 1.5; }
.cn-roles th, .cn-roles td { font-size: .88rem; padding: .5rem .25rem; vertical-align: top; }
.cn-roles th { width: 38%; font-weight: 600; color: var(--mp-ink); }
.cn-roles td { color: var(--mp-ink-2); }
@media (max-width: 575.98px) { .cn-roles th, .cn-roles td { display: block; width: auto; padding: .15rem 0; } .cn-roles tr { display: block; padding: .45rem 0; border-top: 1px solid var(--mp-border); } .cn-roles td { border: 0; } .cn-roles th { border: 0; } }
/* welcome: "Connect North America  US, Canada" wrapped mid-phrase on phones; put the countries on their own line */
@media (max-width: 575.98px) { .wl-connect-na { flex-direction: column; gap: 0; } .wl-connect-na .mp-subtle-inv { margin-left: 0; } }

/* The sample store's banner (shared/_sample_store_banner) */
.mp-sample { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; margin-bottom: 1.25rem;
  padding: .85rem 1.1rem; border-radius: .9rem; background: var(--mp-brand-soft); border: 1px solid var(--mp-border); }
.mp-sample-text { flex: 1 1 22rem; font-size: .9rem; color: var(--mp-ink-2); line-height: 1.45; }
.mp-sample-text strong { display: block; color: var(--mp-brand); font-weight: 700; }
.mp-sample-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
