.sales-tracker { min-width: 0; }

.sales-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 36px;
  min-height: 238px;
  padding: clamp(28px, 4vw, 44px);
  overflow: hidden;
  border: 1px solid #2d3028;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 79% 16%, rgba(240, 91, 54, .26), transparent 26%),
    radial-gradient(circle at 100% 108%, rgba(116, 145, 98, .18), transparent 34%),
    linear-gradient(135deg, #10120f 0%, #171a14 58%, #231e16 100%);
  color: #f4f3ed;
  box-shadow: 0 24px 62px rgba(17, 19, 15, .17);
}

.sales-hero::before {
  position: absolute;
  z-index: -1;
  top: -36px;
  right: 18px;
  color: rgba(255, 255, 255, .035);
  font-size: clamp(108px, 15vw, 194px);
  font-weight: 900;
  letter-spacing: -.1em;
  line-height: 1;
  content: "SALES";
  pointer-events: none;
}

.sales-hero-copy h2 {
  max-width: 820px;
  margin: 4px 0 12px;
  font-size: clamp(38px, 4.7vw, 58px);
  line-height: .98;
  letter-spacing: -.055em;
  text-wrap: balance;
}

.sales-hero-copy .eyebrow { color: #ff9b82; }
.sales-hero-copy > p:last-child { max-width: 680px; margin: 0; color: #aaaea0; font-size: 13px; line-height: 1.6; text-wrap: pretty; }

.sales-hero-metrics {
  display: grid;
  width: min(100%, 780px);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 15px;
  background: rgba(255, 255, 255, .045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(12px);
}

.sales-metric {
  display: grid;
  min-width: 0;
  min-height: 148px;
  grid-template-rows: minmax(2.6em, auto) auto minmax(2.6em, auto);
  align-content: center;
  padding: 18px 20px;
  border-right: 1px solid rgba(255, 255, 255, .1);
}
.sales-metric:last-child { border-right: 0; }
.sales-metric span, .sales-metric small {
  display: block;
  color: #b8bcb0;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: .045em;
  text-transform: uppercase;
  text-wrap: balance;
}
.sales-metric strong { display: block; align-self: center; margin: 6px 0; font-size: 30px; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.sales-metric small { align-self: start; letter-spacing: 0; line-height: 1.35; text-transform: none; text-wrap: balance; }

.sales-readonly-badge {
  position: absolute;
  top: 20px;
  right: 22px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 7px;
  background: rgba(255, 255, 255, .05);
  color: #c0c3b9;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.sales-view-nav { display: flex; gap: 4px; margin: 22px 0 16px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.sales-view-button {
  display: inline-flex;
  min-height: 46px;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
  transition-property: color, border-color, background-color;
  transition-duration: 140ms;
  transition-timing-function: ease-out;
}
.sales-view-button small { display: grid; min-width: 24px; height: 24px; padding-inline: 6px; place-items: center; border-radius: 6px; background: var(--surface-muted); color: var(--subtle); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.sales-view-button:hover { color: var(--text); }
.sales-view-button[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text); }
.sales-view-button[aria-current="page"] small { background: var(--accent-soft); color: var(--accent-text); }
.sales-view-button:focus-visible { border-radius: 6px 6px 0 0; outline: 2px solid var(--accent); outline-offset: -2px; }

.sales-content { min-width: 0; margin-top: 22px; }
.sales-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  min-height: 92px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(120deg, color-mix(in srgb, var(--surface-muted) 68%, var(--surface)), var(--surface-strong));
}
.sales-section-header h3 { margin: 4px 0 3px; font-size: clamp(23px, 3vw, 30px); letter-spacing: -.045em; text-wrap: balance; }
.sales-section-header p:last-child { margin: 0; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.sales-section-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.sales-section-actions a { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.sales-offer-actions { flex-wrap: wrap; justify-content: flex-end; }
.sales-archive-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.sales-archive-switch-button { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 7px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 760; cursor: pointer; }
.sales-archive-switch-button small { display: grid; min-width: 21px; height: 21px; place-items: center; border-radius: 6px; background: var(--surface); color: inherit; font-size: 10px; }
.sales-archive-switch-button[aria-pressed="true"] { background: var(--surface-strong); color: var(--text); box-shadow: 0 2px 7px rgba(0, 0, 0, .1); }
.sales-archive-switch-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sales-view-switch { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-muted); }
.sales-view-switch-button { min-height: 36px; padding: 7px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 760; cursor: pointer; }
.sales-view-switch-button[aria-pressed="true"] { background: var(--surface-strong); color: var(--text); box-shadow: 0 2px 7px rgba(0, 0, 0, .1); }
.sales-view-switch-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sales-add-button, .sales-export-button { min-height: 42px; white-space: nowrap; }

.sales-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(150px, .7fr)) repeat(2, minmax(128px, .52fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.sales-filters.is-offers { grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(120px, .72fr)) repeat(2, minmax(116px, .58fr)) auto; }
.sales-field { min-width: 0; }
.sales-field label { display: block; margin: 0 0 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.sales-field input, .sales-field select, .sales-field textarea { width: 100%; min-height: 44px; }
.sales-field small { display: block; margin-top: 5px; color: var(--subtle); font-size: 10px; }
.sales-reset-button { min-width: 92px; min-height: 44px; }

.sales-merchant-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(21, 22, 18, .055);
}

.sales-merchant-card {
  display: flex;
  min-width: 0;
  min-height: 250px;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 96%, var(--accent) 4%), var(--surface));
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: default;
  box-shadow: 0 8px 24px rgba(21, 22, 18, .045);
  transition-property: border-color, box-shadow, transform, background-color;
  transition-duration: 160ms;
  transition-timing-function: ease-out;
}

.sales-merchant-card:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  box-shadow: 0 16px 34px rgba(21, 22, 18, .09);
  transform: translateY(-2px);
}

.sales-merchant-card:active { transform: translateY(0); }
.sales-merchant-card > span { display: flex; min-width: 0; }
.sales-merchant-card-top { align-items: flex-start; justify-content: space-between; gap: 12px; }
.sales-merchant-card-name { display: grid; min-width: 0; gap: 5px; }
.sales-merchant-card-name strong { overflow: hidden; font-size: 18px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.sales-merchant-card-name small, .sales-merchant-contact small, .sales-merchant-card-footer small { color: var(--muted); font-size: 11.5px; }
.sales-merchant-contact { display: grid !important; gap: 4px; }
.sales-merchant-contact > span { font-size: 13px; font-weight: 750; }
.sales-merchant-progress { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
.sales-merchant-progress > span { display: grid; min-width: 0; gap: 4px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-muted); }
.sales-merchant-progress strong { font-size: 22px; font-variant-numeric: tabular-nums; line-height: 1; }
.sales-merchant-progress small { color: var(--muted); font-size: 10.5px; line-height: 1.3; }
.sales-merchant-card-footer { display: grid; gap: 12px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.sales-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sales-card-action { min-height: 42px; padding-inline: 10px; white-space: normal; text-align: center; }
.sales-merchant-grid.is-list { grid-template-columns: 1fr; gap: 8px; }
.sales-merchant-grid.is-list .sales-merchant-card { min-height: 0; display: grid; grid-template-columns: minmax(210px, 1.1fr) minmax(160px, .8fr) minmax(190px, .9fr) minmax(280px, 1.2fr); align-items: center; gap: 14px; padding: 14px 16px; }
.sales-merchant-grid.is-list .sales-merchant-card:hover { transform: none; }
.sales-merchant-grid.is-list .sales-merchant-card-footer { grid-template-columns: minmax(100px, .6fr) minmax(240px, 1fr); align-items: center; gap: 10px; margin: 0; padding: 0 0 0 14px; border-top: 0; border-left: 1px solid var(--border); }
.sales-merchant-grid.is-list .sales-merchant-progress > span { padding: 9px; }
.sales-merchant-grid.is-list .sales-merchant-progress strong { font-size: 17px; }
.requested-methods-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.sales-offer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(21, 22, 18, .055);
}
.sales-available-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(21, 22, 18, .055);
}
.sales-available-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--success) 24%, var(--border));
  border-radius: 13px;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--success-soft) 38%, var(--surface-strong)), var(--surface-strong));
}
.sales-available-card::before {
  position: absolute;
  inset: 15px auto 15px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--success);
  content: "";
}
.sales-available-card.is-expiring { border-color: color-mix(in srgb, var(--warning) 30%, var(--border)); }
.sales-available-card.is-expiring::before { background: var(--warning); }
.sales-available-card .sales-method-card-header small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}
.sales-available-rates, .sales-available-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.sales-available-rates .sales-overview-item {
  border-color: color-mix(in srgb, var(--success) 20%, var(--border));
}
.sales-available-rates strong, .sales-available-rates time {
  color: var(--text);
  font-size: 15px;
  font-weight: 820;
  font-variant-numeric: tabular-nums;
}
.sales-available-comment {
  display: grid;
  gap: 6px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface-muted);
}
.sales-available-comment span {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.sales-available-comment p { margin: 0; color: var(--text); font-size: 11.5px; line-height: 1.55; text-wrap: pretty; }
.sales-available-footer { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; }
.sales-available-footer small { color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.sales-available-footer .sales-method-action { min-height: 44px; }
.sales-filters.sales-available-filters {
  grid-template-columns: minmax(200px, 1.3fr) repeat(4, minmax(132px, .72fr)) auto;
}
.sales-offer-card { position: relative; display: grid; min-width: 0; gap: 14px; padding: 18px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-strong); }
.sales-offer-card::before { position: absolute; inset: 15px auto 15px 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); content: ""; }
.sales-offer-card .sales-method-card-header small { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; }
.sales-method-card-statuses { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.sales-archive-badge { display: inline-flex; min-height: 30px; align-items: center; padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-muted); color: var(--muted); font-size: 10.5px; font-weight: 760; }
.sales-archive-button { margin-right: auto; border-color: color-mix(in srgb, var(--danger) 34%, var(--border)); color: var(--danger); }
.sales-archive-button.is-restore { border-color: color-mix(in srgb, var(--success) 34%, var(--border)); color: var(--success); }

.sales-catalog-empty {
  min-height: 220px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 16px 16px;
}

.sales-table-wrap {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: var(--surface);
  box-shadow: 0 16px 42px rgba(21, 22, 18, .055);
}
.sales-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12.5px; }
.sales-table th {
  height: 48px;
  padding: 9px 10px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border-strong);
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 820;
  letter-spacing: .02em;
  line-height: 1.3;
  text-align: left;
  text-transform: uppercase;
  vertical-align: middle;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}
.sales-table th:last-child, .sales-table td:last-child { border-right: 0; }
.sales-table td {
  min-width: 0;
  height: auto;
  min-height: 70px;
  padding: 11px 10px;
  overflow: hidden;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  line-height: 1.42;
  overflow-wrap: break-word;
  word-break: normal;
  vertical-align: middle;
}
.sales-table tbody tr:last-child td { border-bottom: 0; }
.sales-table tbody tr { transition-property: background-color; transition-duration: 130ms; transition-timing-function: ease-out; }
.sales-table tbody tr:hover td { background: var(--surface-hover); }
.sales-table th:first-child, .sales-table td:first-child { padding-left: 16px; }
.sales-table th:last-child, .sales-table td:last-child { padding-right: 16px; }
.sales-table.is-merchants th:nth-child(1) { width: 8%; }
.sales-table.is-merchants th:nth-child(2) { width: 14%; }
.sales-table.is-merchants th:nth-child(3) { width: 12%; }
.sales-table.is-merchants th:nth-child(4) { width: 11%; }
.sales-table.is-merchants th:nth-child(5) { width: 10%; }
.sales-table.is-merchants th:nth-child(6), .sales-table.is-merchants th:nth-child(7) { width: 8%; }
.sales-table.is-merchants th:nth-child(8) { width: 12%; }
.sales-table.is-merchants th:nth-child(9) { width: 8%; }
.sales-table.is-merchants th:nth-child(10) { width: 9%; }
.sales-table.is-stage1 th:nth-child(1) { width: 15%; }
.sales-table.is-stage1 th:nth-child(2) { width: 7%; }
.sales-table.is-stage1 th:nth-child(3) { width: 12%; }
.sales-table.is-stage1 th:nth-child(4), .sales-table.is-stage1 th:nth-child(5), .sales-table.is-stage1 th:nth-child(6) { width: 16%; }
.sales-table.is-stage1 th:nth-child(7) { width: 10%; }
.sales-table.is-stage1 th:nth-child(8) { width: 8%; }
.sales-table.is-stage2 th:nth-child(1) { width: 14%; }
.sales-table.is-stage2 th:nth-child(2) { width: 11%; }
.sales-table.is-stage2 th:nth-child(3) { width: 14%; }
.sales-table.is-stage2 th:nth-child(4) { width: 10%; }
.sales-table.is-stage2 th:nth-child(5) { width: 10%; }
.sales-table.is-stage2 th:nth-child(6) { width: 12%; }
.sales-table.is-stage2 th:nth-child(7) { width: 11%; }
.sales-table.is-stage2 th:nth-child(8) { width: 10%; }
.sales-table.is-stage2 th:nth-child(9) { width: 8%; }

.sales-identity-cell, .sales-stack-cell { min-width: 0; }
.sales-identity-cell strong, .sales-identity-cell small, .sales-stack-cell strong, .sales-stack-cell small { display: block; }
.sales-identity-cell strong, .sales-stack-cell strong { overflow: hidden; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.sales-identity-cell small, .sales-stack-cell small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10.5px; text-overflow: ellipsis; white-space: normal; overflow-wrap: anywhere; }
.sales-long-cell { max-height: none; overflow: visible; text-wrap: pretty; }
.sales-date-cell, .sales-code-cell, .sales-rate-pair { font-variant-numeric: tabular-nums; }
.sales-code-cell { color: var(--accent-text) !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; }
.sales-rate-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.sales-rate-pair span { padding: 5px 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-muted); text-align: center; }

.sales-status { display: inline-flex; max-width: 100%; min-height: 30px; align-items: center; padding: 5px 8px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-muted); color: var(--muted); font-size: 10.5px; font-weight: 760; line-height: 1.3; text-wrap: pretty; }
.sales-status.is-positive { border-color: color-mix(in srgb, var(--success) 26%, var(--border)); background: var(--success-soft); color: var(--success); }
.sales-status.is-warning { border-color: color-mix(in srgb, var(--warning) 28%, var(--border)); background: var(--warning-soft); color: var(--warning); }
.sales-status.is-negative { border-color: color-mix(in srgb, var(--danger) 24%, var(--border)); background: var(--danger-soft); color: var(--danger); }
.sales-action-cell { text-align: right; }
.sales-open-button { min-width: 88px; min-height: 44px; padding: 8px 11px; border-color: var(--border); background: var(--surface-strong); color: var(--text); font-size: 11.5px; }
.sales-empty-cell { height: 190px !important; padding: 36px !important; text-align: center; }
.sales-empty-cell strong, .sales-empty-cell span { display: block; }
.sales-empty-cell strong { margin-bottom: 7px; font-size: 15px; }
.sales-empty-cell span { color: var(--muted); }

.sales-dialog { width: min(1040px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 0; overflow: auto; }
.sales-dialog-header { position: sticky; z-index: 3; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 24px 28px 19px; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--surface-strong) 96%, transparent); backdrop-filter: blur(14px); }
.sales-dialog-header h2 { margin: 3px 0 7px; font-size: clamp(25px, 4vw, 34px); letter-spacing: -.045em; text-wrap: balance; }
.sales-dialog-header p:last-child { max-width: 660px; margin: 0; color: var(--muted); font-size: 12px; text-wrap: pretty; }
.sales-dialog .sales-form { display: grid; gap: 18px; padding: 24px 28px 28px; }
.sales-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.sales-form-grid .is-wide { grid-column: span 3; }
.sales-form textarea { min-height: 92px; resize: vertical; }
.sales-form :disabled { opacity: .72; cursor: not-allowed; }
.sales-form .operation-status[role="alert"] { padding: 10px 12px; border-left: 3px solid var(--danger); background: var(--danger-soft); color: var(--danger); }

.sales-merchant-workspace { width: min(1180px, calc(100vw - 28px)); }
.sales-merchant-workspace-body { display: grid; gap: 16px; padding: 22px 26px 28px; }
.sales-merchant-overview, .sales-portfolio-section { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.sales-merchant-overview { padding: 18px; }
.sales-merchant-overview > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sales-merchant-overview > header > div { display: flex; align-items: center; gap: 10px; }
.sales-merchant-overview-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.sales-merchant-overview-actions button { min-height: 42px; }
.sales-merchant-overview > header p { margin: 0; color: var(--muted); font-size: 11px; }
.sales-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sales-overview-item { display: grid; min-width: 0; gap: 5px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-muted); }
.sales-overview-item > span { color: var(--muted); font-size: 9.5px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.sales-overview-item > strong { min-width: 0; font-size: 12px; font-weight: 730; line-height: 1.45; overflow-wrap: anywhere; }
.sales-portfolio-section { overflow: hidden; }
.sales-portfolio-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 18px; border-bottom: 1px solid var(--border); background: var(--surface-strong); }
.sales-portfolio-header p { max-width: 660px; margin: 5px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }
.sales-portfolio-title { display: flex; align-items: center; gap: 8px; }
.sales-portfolio-title h3 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.sales-portfolio-title span { display: grid; min-width: 25px; height: 25px; padding-inline: 6px; place-items: center; border-radius: 7px; background: var(--accent-soft); color: var(--accent-text); font-size: 10px; font-weight: 850; font-variant-numeric: tabular-nums; }
.sales-portfolio-header button { min-height: 42px; flex: 0 0 auto; }
.sales-method-list { display: grid; gap: 10px; padding: 12px; }
.sales-method-card { position: relative; display: grid; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-strong); }
.sales-method-card::before { position: absolute; inset: 13px auto 13px 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); content: ""; }
.sales-method-card.is-request::before { background: var(--warning); }
.sales-method-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sales-method-card-header h4 { margin: 2px 0 0; font-size: 16px; letter-spacing: -.02em; }
.sales-method-kicker { color: var(--accent-text); font-size: 9.5px; font-weight: 850; letter-spacing: .065em; text-transform: uppercase; }
.sales-method-flow, .sales-request-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.sales-request-workflow {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}
.sales-request-workflow .sales-method-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sales-request-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sales-method-comment { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; text-wrap: pretty; }
.sales-method-comment-block { display: grid; gap: 5px; margin: 0; }
.sales-method-comment-block > span { color: var(--muted); font-size: 9.5px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.sales-method-comment-block > p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; text-wrap: pretty; }
.sales-method-finance { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 5px 10px; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border)); border-radius: 9px; background: color-mix(in srgb, var(--accent) 8%, transparent); }
.sales-method-finance-label { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sales-method-finance strong { font-size: 12px; }
.sales-method-finance small { grid-column: 1 / -1; color: var(--muted); line-height: 1.45; }
.sales-method-action { min-height: 40px; justify-self: end; }
.sales-method-card-footer { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 12px; }
.sales-priority-badge { display: inline-flex; min-height: 30px; align-items: center; padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--warning) 28%, var(--border)); border-radius: 7px; background: var(--warning-soft); color: var(--warning); font-size: 10px; font-weight: 780; }
.requested-methods-grid { align-items: stretch; }
.requested-methods-card { min-height: 248px; grid-template-rows: auto 1fr auto; }
.requested-methods-card-meta { display: flex; min-width: 0; align-items: center; flex-wrap: wrap; gap: 8px; }
.requested-methods-card-meta small { color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.sales-filters.requested-methods-filters { grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(120px, .72fr)) repeat(2, minmax(116px, .58fr)) auto; }
.sales-portfolio-empty { display: grid; min-height: 130px; place-content: center; padding: 28px; text-align: center; }
.sales-portfolio-empty strong { font-size: 14px; }
.sales-portfolio-empty p { max-width: 520px; margin: 6px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.5; }

.sales-handoff-body { display: grid; gap: 18px; padding: 22px 26px 26px; }
.sales-handoff-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.sales-handoff-note { margin: 0; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--accent-soft); color: var(--muted); font-size: 12px; line-height: 1.55; text-wrap: pretty; }

.sales-loading, .sales-state { display: grid; gap: 12px; min-height: 260px; align-content: center; margin-top: 14px; padding: 30px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.sales-loading-hero, .sales-loading-line { border-radius: 8px; background: linear-gradient(90deg, var(--surface-muted), var(--surface-hover), var(--surface-muted)); background-size: 200% 100%; animation: sales-shimmer 1.25s linear infinite; }
.sales-loading-hero { height: 150px; }
.sales-loading-line { width: 100%; height: 18px; }
.sales-loading-line.is-short { width: 62%; }
.sales-state { justify-items: start; min-height: 220px; }
.sales-state strong { font-size: 18px; }
.sales-state p { max-width: 620px; margin: 0; color: var(--muted); }

@keyframes sales-shimmer { to { background-position: -200% 0; } }

@media (min-width: 901px) and (max-width: 1320px) {
  .sales-filters { grid-template-columns: minmax(220px, 1.3fr) repeat(2, minmax(150px, 1fr)); }
  .sales-filters.is-offers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sales-filters.sales-available-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sales-reset-button { width: 100%; }
}

@media (max-width: 1120px) {
  .sales-hero-metrics { max-width: 780px; }
  .sales-filters { grid-template-columns: minmax(220px, 1.3fr) repeat(2, minmax(150px, 1fr)); }
  .sales-reset-button { width: 100%; }
  .sales-table { font-size: 12px; }
  .sales-table th { font-size: 10.5px; }
  .sales-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-form-grid .is-wide { grid-column: span 2; }
  .sales-merchant-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-merchant-grid.is-list .sales-merchant-card { grid-template-columns: minmax(190px, 1fr) minmax(150px, .8fr) minmax(240px, 1.2fr); }
  .sales-merchant-grid.is-list .sales-merchant-progress { display: none !important; }
  .sales-offer-grid { grid-template-columns: 1fr; }
  .sales-available-grid { grid-template-columns: 1fr; }
  .sales-request-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-filters.requested-methods-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sales-filters.sales-available-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .sales-hero { min-height: 360px; align-content: end; gap: 24px; padding: 24px; }
  .sales-hero::before { top: 14px; right: -12px; font-size: 92px; }
  .sales-hero-copy h2 { font-size: 45px; }
  .sales-hero-metrics { width: 100%; }
  .sales-metric { min-height: 136px; padding: 14px 16px; }
  .sales-metric strong { font-size: 24px; }
  .sales-readonly-badge { top: 14px; right: 14px; }
  .sales-section-header { align-items: stretch; flex-direction: column; }
  .sales-section-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .sales-section-actions > * { width: 100%; }
  .sales-filters { grid-template-columns: 1fr 1fr; }
  .sales-filters .sales-field:first-child { grid-column: 1 / -1; }
  .sales-filters.requested-methods-filters { grid-template-columns: 1fr 1fr; }
  .sales-filters.sales-available-filters { grid-template-columns: 1fr 1fr; }
  .sales-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .sales-table { display: block; width: 100%; min-width: 0; max-width: 100%; }
  .sales-table tbody { display: grid; width: 100%; min-width: 0; max-width: 100%; gap: 10px; }
  .sales-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .sales-table tr { display: grid; width: 100%; min-width: 0; max-width: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); box-shadow: 0 8px 22px rgba(21, 22, 18, .045); }
  .sales-table td { display: grid; width: auto; min-width: 0; max-width: 100%; grid-template-columns: minmax(116px, .42fr) minmax(0, 1fr); gap: 12px; height: auto; min-height: 52px; padding: 11px 14px !important; border-right: 0; border-bottom: 1px solid var(--border); text-align: left; }
  .sales-table td > * { min-width: 0; max-width: 100%; }
  .sales-table td::before { color: var(--subtle); font-size: 10.5px; font-weight: 820; line-height: 1.35; letter-spacing: .035em; text-transform: uppercase; content: attr(data-label); }
  .sales-table td:last-child { border-bottom: 0; }
  .sales-table tbody tr:hover td { background: transparent; }
  .sales-action-cell { display: block !important; }
  .sales-action-cell::before { display: none; }
  .sales-open-button { width: 100%; }
  .sales-long-cell { max-height: none; }
  .sales-empty-cell { display: block !important; }
  .sales-empty-cell::before { display: none; }
  .sales-form-grid, .sales-form-grid .is-wide { grid-template-columns: 1fr; grid-column: auto; }
  .sales-dialog { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); }
  .sales-dialog-header { padding: 20px; }
  .sales-dialog .sales-form { padding: 20px; }
  .sales-overview-grid, .sales-method-flow,
  .sales-request-workflow .sales-method-flow { grid-template-columns: 1fr 1fr; }
  .sales-merchant-workspace-body { padding: 14px; }
  .sales-merchant-overview-actions { width: 100%; justify-content: stretch; }
  .sales-merchant-overview-actions button { flex: 1 1 180px; }
  .sales-merchant-grid.is-list .sales-merchant-card { grid-template-columns: 1fr 1fr; }
  .sales-merchant-grid.is-list .sales-merchant-card-footer { grid-column: 1 / -1; padding: 12px 0 0; border-top: 1px solid var(--border); border-left: 0; }
}

@media (max-width: 480px) {
  .sales-hero-metrics { grid-template-columns: 1fr; }
  .sales-metric { min-height: 0; grid-template-rows: auto auto; grid-template-columns: 1fr auto; align-items: center; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .sales-metric:last-child { border-bottom: 0; }
  .sales-metric strong { grid-row: 1 / span 2; grid-column: 2; margin: 0; }
  .sales-filters, .sales-section-actions { grid-template-columns: 1fr; }
  .sales-filters .sales-field:first-child { grid-column: auto; }
  .sales-filters.requested-methods-filters { grid-template-columns: 1fr; }
  .sales-filters.sales-available-filters { grid-template-columns: 1fr; }
  .sales-table td { grid-template-columns: 104px minmax(0, 1fr); }
  .sales-dialog .dialog-actions { flex-direction: column-reverse; }
  .sales-dialog .dialog-actions > * { width: 100%; }
  .sales-merchant-grid { grid-template-columns: 1fr; padding: 10px; }
  .sales-offer-grid { padding: 10px; }
  .sales-available-grid { padding: 10px; }
  .sales-card-actions, .sales-handoff-summary { grid-template-columns: 1fr; }
  .sales-merchant-card { min-height: 230px; padding: 16px; }
  .sales-merchant-grid.is-list .sales-merchant-card { display: flex; min-height: 0; }
  .sales-merchant-grid.is-list .sales-merchant-progress { display: grid !important; }
  .sales-merchant-grid.is-list .sales-merchant-card-footer { display: grid; padding-top: 12px; }
  .sales-merchant-card-top, .sales-method-card-header, .sales-merchant-overview > header, .sales-portfolio-header { align-items: stretch; flex-direction: column; }
  .sales-overview-grid, .sales-method-flow, .sales-request-summary,
  .sales-request-workflow .sales-method-flow { grid-template-columns: 1fr; }
  .sales-available-rates, .sales-available-meta { grid-template-columns: 1fr; }
  .sales-available-footer { align-items: stretch; flex-direction: column; }
  .sales-available-footer .sales-method-action { width: 100%; }
  .sales-portfolio-header button, .sales-merchant-overview > header > button { width: 100%; }
  .sales-method-action { width: 100%; }
  .sales-method-card-footer { align-items: stretch; flex-direction: column; }
  .requested-methods-card { min-height: 0; }
  .requested-methods-card-meta { align-items: flex-start; flex-direction: column; }
  .requested-methods-card-actions { width: 100%; }
  .requested-methods-card-actions > * { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .sales-view-button, .sales-table tbody tr, .sales-merchant-card { transition-duration: 0ms; }
  .sales-loading-hero, .sales-loading-line { animation: none; }
}
