:root {
  color-scheme: dark;
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --ink: #101828;
  --ink-soft: #475467;
  --ink-muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --brand: #155eef;
  --brand-dark: #004eeb;
  --brand-soft: #eff4ff;
  --success: #067647;
  --success-soft: #ecfdf3;
  --warning: #b54708;
  --warning-soft: #fffaeb;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(21, 94, 239, 0.08), transparent 28rem),
    var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

.page-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: calc(72px + var(--safe-top));
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + var(--safe-top)) clamp(18px, 4vw, 48px) 14px;
  border-bottom: 1px solid rgba(228, 231, 236, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  line-height: 1.2;
}

.brand small {
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-label {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid #abefc6;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
}

.user-label {
  max-width: 240px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-content {
  width: 100%;
}

.loading-screen {
  display: grid;
  min-height: calc(100vh - 73px);
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--ink-muted);
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.auth-layout {
  display: grid;
  width: min(1180px, calc(100% - 36px));
  min-height: calc(100vh - 73px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
  padding: 48px 0 72px;
}

.auth-copy h1 {
  max-width: 690px;
  margin: 16px 0 24px;
  overflow-wrap: anywhere;
  font-size: clamp(42px, 5.2vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  text-wrap: balance;
}

.auth-copy > p {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.outcome-grid {
  display: grid;
  max-width: 680px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 30px;
}

.outcome-grid article {
  min-height: 98px;
  padding: 16px;
  border: 1px solid rgba(208, 213, 221, 0.78);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.outcome-grid strong,
.outcome-grid span {
  display: block;
}

.outcome-grid strong {
  color: var(--brand-dark);
  font-size: 13px;
}

.outcome-grid span {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.proof-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.proof-list span,
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
}

.auth-card {
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(228, 231, 236, 0.9);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.segmented-control {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

.auth-card > .segmented-control {
  width: 100%;
  margin-bottom: 30px;
}

.segment {
  min-height: 36px;
  flex: 1;
  padding: 7px 13px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 700;
}

.segment.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.12);
}

.form-heading {
  margin-bottom: 24px;
}

.form-heading h2 {
  margin: 6px 0 8px;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.form-heading p,
.section-heading p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.5;
}

.field,
.compact-field {
  display: grid;
  gap: 7px;
}

.field {
  margin-bottom: 17px;
}

.field > span,
.compact-field > span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.field small {
  color: var(--ink-muted);
  font-size: 11px;
}

#ozon-performance-fields {
  margin: 2px 0 17px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-muted);
}

#ozon-performance-fields .field:last-child {
  margin-bottom: 0;
}

.field-note {
  margin: 0 0 14px;
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.5;
}

input,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.11);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 750;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

a.button,
a.nav-item {
  text-decoration: none;
}

.button:focus-visible,
.nav-item:focus-visible,
.mobile-dock a:focus-visible,
.mobile-dock button:focus-visible {
  outline: 3px solid rgba(21, 94, 239, 0.2);
  outline-offset: 2px;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--brand);
  color: #fff;
}

.button-primary:hover {
  background: var(--brand-dark);
}

.button-secondary {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover,
.button-quiet:hover {
  background: var(--surface-muted);
}

.button-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}

.button-full {
  width: 100%;
}

.app-layout {
  display: grid;
  min-height: calc(100vh - 73px);
  grid-template-columns: 258px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 73px;
  display: flex;
  height: calc(100vh - 73px);
  flex-direction: column;
  padding: 24px 18px calc(24px + var(--safe-bottom));
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.sidebar-section {
  display: grid;
  gap: 14px;
}

.compact-field select {
  min-height: 42px;
  font-size: 13px;
}

.nav-list {
  display: grid;
  gap: 6px;
  margin-top: 30px;
}

.nav-item {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.nav-item.is-active {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.nav-item:disabled {
  opacity: 0.42;
}

.sidebar-note {
  margin-top: auto;
  padding: 15px;
  border: 1px solid #b2ddff;
  border-radius: 14px;
  background: #eff8ff;
}

.sidebar-note strong {
  color: #175cd3;
  font-size: 12px;
  text-transform: uppercase;
}

.sidebar-note p {
  margin: 7px 0 0;
  color: #1849a9;
  font-size: 12px;
  line-height: 1.45;
}

.dashboard {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px);
}

.dashboard-header,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-header {
  margin-bottom: 28px;
}

.dashboard-header h1 {
  margin: 7px 0 8px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.045em;
}

.dashboard-header p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.dashboard-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.period-control .segment {
  min-width: 70px;
}

.setup-panel {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.8);
}

.setup-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.setup-heading h2 {
  margin: 5px 0 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.setup-status {
  min-width: max-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
}

.setup-steps {
  display: grid;
  margin: 18px 0 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.setup-steps li {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-muted);
  color: var(--ink-muted);
}

.setup-steps li > span {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
}

.setup-steps strong,
.setup-steps small {
  display: block;
}

.setup-steps strong {
  color: inherit;
  font-size: 12px;
}

.setup-steps small {
  overflow: hidden;
  margin-top: 3px;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-steps li[data-state="active"] {
  border-color: #b2ccff;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.setup-steps li[data-state="complete"] {
  border-color: #abefc6;
  background: var(--success-soft);
  color: var(--success);
}

.setup-steps li[data-state="complete"] > span {
  font-size: 0;
}

.setup-steps li[data-state="complete"] > span::after {
  content: "✓";
  font-size: 13px;
}

.empty-panel {
  display: grid;
  min-height: 470px;
  place-content: center;
  justify-items: center;
  padding: 40px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 30px;
}

.empty-panel h2 {
  margin: 20px 0 8px;
}

.empty-panel p {
  max-width: 520px;
  margin: 0 0 24px;
  color: var(--ink-muted);
  line-height: 1.55;
}

.status-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(16, 24, 40, 0.05);
}

.status-card[data-status="ready"] {
  border-color: #abefc6;
  background: linear-gradient(135deg, var(--success-soft), #fff 70%);
}

.status-card[data-status="blocked"] {
  border-color: #fedf89;
  background: linear-gradient(135deg, var(--warning-soft), #fff 70%);
}

.status-card[data-status="no_data"] {
  border-color: #b2ddff;
  background: linear-gradient(135deg, #eff8ff, #fff 70%);
}

.status-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 17px;
  background: var(--surface-muted);
  font-size: 23px;
  font-weight: 800;
}

.status-card[data-status="ready"] .status-icon {
  background: #d1fadf;
  color: var(--success);
}

.status-card[data-status="blocked"] .status-icon {
  background: #fef0c7;
  color: var(--warning);
}

.status-card[data-status="no_data"] .status-icon {
  background: #d1e9ff;
  color: #175cd3;
}

.status-label {
  display: block;
  margin-bottom: 5px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-copy h2 {
  margin: 0 0 6px;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: -0.03em;
}

.status-copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}

.status-count {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.section-block {
  margin-top: 34px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.section-heading > p {
  max-width: 460px;
  text-align: right;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.metric-card span {
  display: block;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin-top: 17px;
  font-size: clamp(20px, 2.7vw, 29px);
  letter-spacing: -0.035em;
}

.metric-card small {
  display: block;
  margin-top: 6px;
  color: var(--ink-muted);
  font-size: 11px;
}

.metric-card.is-missing strong {
  color: var(--ink-muted);
}

.blocker-list {
  display: grid;
  gap: 10px;
}

.blocker-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.blocker-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 12px;
  font-weight: 800;
}

.blocker-item h3 {
  margin: 0;
  font-size: 15px;
}

.blocker-item p {
  margin: 5px 0 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.45;
}

.blocker-item small {
  display: block;
  margin-top: 9px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
}

.success-panel {
  padding: 22px;
  border: 1px solid #abefc6;
  border-radius: var(--radius-lg);
  background: var(--success-soft);
  color: var(--success);
}

.success-panel strong {
  display: block;
  margin-bottom: 5px;
}

.success-panel p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.data-quality-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 0;
}

.quality-section {
  padding-bottom: 4px;
}

.data-quality-grid article {
  padding: 17px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.64);
}

.data-quality-grid span,
.data-quality-grid strong {
  display: block;
}

.data-quality-grid span {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
}

.data-quality-grid strong {
  margin-top: 7px;
  font-size: 21px;
}

.store-dialog {
  width: min(540px, calc(100% - 28px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 20px 26px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(16, 24, 40, 0.24);
}

.store-dialog::backdrop {
  background: rgba(11, 18, 32, 0.48);
  backdrop-filter: blur(4px);
}

.dialog-close-row {
  display: flex;
  justify-content: flex-end;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 24px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: calc(20px + var(--safe-bottom));
  max-width: min(420px, calc(100% - 40px));
  padding: 13px 16px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 13px;
  line-height: 1.45;
}

.toast[data-kind="error"] {
  background: var(--danger);
}

.mobile-dock {
  display: none;
}

.plan-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-tenant-field {
  width: min(440px, 100%);
  margin-top: 20px;
}

.plan-card {
  position: relative;
  display: flex;
  min-height: 360px;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 6px 22px rgba(16, 24, 40, 0.05);
}

.plan-card.is-featured {
  border-color: #84adff;
  background: linear-gradient(150deg, var(--brand-soft), #fff 52%);
}

.plan-kicker,
.plan-name,
.plan-price,
.plan-caption {
  display: block;
}

.plan-kicker {
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.plan-name {
  margin-top: 10px;
  color: var(--ink);
  font-size: 23px;
  letter-spacing: -0.03em;
}

.plan-price {
  margin-top: 24px;
  font-size: clamp(31px, 4vw, 42px);
  letter-spacing: -0.045em;
}

.plan-caption {
  margin-top: 5px;
  color: var(--ink-muted);
  font-size: 12px;
}

.plan-features {
  display: grid;
  margin: 24px 0 26px;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.plan-features li {
  display: flex;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

.plan-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 900;
}

.plan-card .button {
  margin-top: auto;
}

.tariff-comparison-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.tariff-comparison-table table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.tariff-comparison-table th,
.tariff-comparison-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

.tariff-comparison-table thead th {
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.tariff-comparison-table tbody th {
  color: var(--ink);
  font-weight: 700;
}

.tariff-comparison-table tr:last-child th,
.tariff-comparison-table tr:last-child td {
  border-bottom: 0;
}

.tariff-choice-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.tariff-choice-notes article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.tariff-choice-notes strong,
.tariff-choice-notes p {
  display: block;
}

.tariff-choice-notes p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .auth-copy {
    padding-top: 20px;
  }

  .auth-copy h1 {
    max-width: 760px;
    font-size: clamp(40px, 8vw, 60px);
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 16px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .sidebar-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-section .button {
    grid-column: 1 / -1;
  }

  .nav-list,
  .sidebar-note {
    display: none;
  }

  .metrics-grid,
  .data-quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .tariff-choice-notes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: calc(64px + var(--safe-top));
    padding-right: 14px;
    padding-left: 14px;
  }

  .brand small,
  .user-label,
  .plan-label,
  .topbar-billing {
    display: none;
  }

  .auth-layout {
    width: min(100% - 28px, 520px);
    padding: 34px 0 52px;
  }

  .auth-copy h1 {
    font-size: clamp(38px, 12vw, 48px);
    line-height: 1.02;
  }

  .auth-copy > p {
    font-size: 16px;
  }

  .outcome-grid {
    grid-template-columns: 1fr;
  }

  .outcome-grid article {
    min-height: 0;
  }

  .auth-card {
    padding: 22px;
  }

  .sidebar {
    top: calc(64px + var(--safe-top));
    padding: 13px 14px;
  }

  .dashboard {
    padding: 23px 14px calc(112px + var(--safe-bottom));
  }

  .dashboard-header,
  .section-heading {
    display: grid;
  }

  .dashboard-tools {
    width: 100%;
    align-items: stretch;
  }

  .dashboard-tools > .button {
    flex: 1;
  }

  .setup-heading {
    display: grid;
  }

  .setup-status {
    justify-self: start;
  }

  .setup-steps {
    grid-template-columns: 1fr;
  }

  .dashboard-tools .period-control {
    flex: 1;
  }

  .period-control .segment {
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .status-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .status-count {
    grid-column: 1 / -1;
    text-align: left;
  }

  .section-heading > p {
    text-align: left;
  }

  .metrics-grid,
  .data-quality-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .metric-card {
    min-height: 112px;
    padding: 15px;
  }

  .metric-card strong {
    font-size: 21px;
  }

  .store-dialog {
    width: 100%;
    max-width: none;
    max-height: 92vh;
    margin: auto 0 0;
    padding: 18px 18px calc(24px + var(--safe-bottom));
    border-radius: 24px 24px 0 0;
  }

  .mobile-dock:not([hidden]) {
    position: fixed;
    z-index: 40;
    right: 12px;
    bottom: calc(10px + var(--safe-bottom));
    left: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 7px;
    border: 1px solid rgba(208, 213, 221, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.2);
    backdrop-filter: blur(18px);
  }

  .mobile-dock a,
  .mobile-dock button {
    display: grid;
    min-height: 48px;
    place-items: center;
    gap: 2px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-dock span {
    font-size: 16px;
  }

  .mobile-dock .is-active {
    background: var(--brand-soft);
    color: var(--brand-dark);
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }
}

/* Finance workspace: real calculation, product costs and controlled actions */
.workspace-view[hidden],
.profit-section[hidden],
.workspace-empty[hidden],
.table-shell[hidden] {
  display: none !important;
}

.status-side {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.button-small {
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 12px;
}

.profit-section {
  border: 1px solid #d8c5f2;
  background: linear-gradient(145deg, #fff 18%, #fbf3ff 100%);
}

.profit-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.profit-summary-grid article {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
}

.profit-summary-grid span,
.profit-summary-grid strong {
  display: block;
}

.profit-summary-grid span {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 750;
}

.profit-summary-grid strong {
  margin-top: 9px;
  overflow: hidden;
  color: var(--ink);
  font-size: clamp(21px, 3vw, 30px);
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profit-summary-grid .profit-primary {
  border-color: #d9a7e8;
  background: linear-gradient(145deg, #fff, #f7ddf5);
}

[data-sign="positive"] {
  color: var(--success) !important;
}

[data-sign="negative"] {
  color: var(--danger) !important;
}

.table-shell {
  width: 100%;
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.table-shell table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.table-shell th,
.table-shell td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.table-shell th {
  background: var(--surface-muted);
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.table-shell th:first-child,
.table-shell td:first-child {
  text-align: left;
}

.table-shell tbody tr:last-child td {
  border-bottom: 0;
}

.table-shell td strong,
.table-shell td small {
  display: block;
}

.table-shell td strong {
  max-width: 320px;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
}

.table-shell td small {
  max-width: 320px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--ink-muted);
  text-overflow: ellipsis;
}

.table-shell .table-empty {
  padding: 28px;
  color: var(--ink-muted);
  text-align: center;
  white-space: normal;
}

.workspace-panel {
  min-height: 400px;
}

.workspace-empty {
  margin-top: 20px;
  padding: 34px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--ink-soft);
  text-align: center;
}

.workspace-empty strong,
.workspace-empty p {
  display: block;
}

.workspace-empty p {
  margin: 8px 0 0;
  color: var(--ink-muted);
}

.recommendation-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.recommendation-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.recommendation-card[data-status="accepted"] {
  border-color: #d3a8e0;
  background: #fff8fe;
}

.recommendation-card[data-status="completed"],
.recommendation-card[data-status="dismissed"] {
  opacity: 0.68;
}

.recommendation-meta {
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.recommendation-card h3 {
  margin: 5px 0 0;
  font-size: 17px;
}

.recommendation-card p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.recommendation-impact {
  display: block;
  margin-top: 9px;
  color: var(--danger);
  font-size: 12px;
}

.recommendation-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cost-dialog {
  width: min(500px, calc(100% - 28px));
}

@media (max-width: 760px) {
  .profit-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .recommendation-card {
    grid-template-columns: 1fr;
  }

  .recommendation-actions {
    justify-content: flex-start;
  }
}

.auth-text-button {
  display: block;
  margin: 12px auto 0;
  padding: 4px 8px;
  border: 0;
  background: transparent;
  color: #8b2bb5;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.consent-field {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin: 12px 0;
  color: #566174;
  font-size: 13px;
  line-height: 1.45;
}

.consent-field input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: #c120b9;
}

.consent-field a,
.legal-footer a {
  color: #8b2bb5;
}

.product-import-actions {
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.product-import-actions p {
  flex-basis: 100%;
  text-align: right;
}

.import-dialog {
  max-width: 640px;
}

.import-result {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #dfe4ee;
  border-radius: 12px;
  background: #f7f9fc;
  color: #273246;
  line-height: 1.45;
}

.import-result[data-kind="success"] {
  border-color: #9ee0bd;
  background: #effbf4;
  color: #157446;
}

.import-result[data-kind="warning"] {
  border-color: #f1d28f;
  background: #fff9ea;
  color: #8a5a08;
}

.import-result[data-kind="error"] {
  border-color: #f0a8ae;
  background: #fff2f3;
  color: #ad2632;
}

.legal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding: 16px 24px 92px;
  color: #778195;
  font-size: 12px;
}

@media (max-width: 760px) {
  .product-import-actions {
    justify-content: flex-start;
  }

  .product-import-actions p {
    text-align: left;
  }

  .legal-footer {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 640px) {
  .status-side {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .profit-summary-grid {
    gap: 8px;
  }

  .profit-summary-grid article {
    padding: 14px;
  }

  .profit-summary-grid strong {
    font-size: 20px;
  }

  .mobile-dock:not([hidden]) {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Compact commercial system — built from the supplied marketplace reference */
:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-muted: #f2f3f7;
  --ink: #171923;
  --ink-soft: #4f5565;
  --ink-muted: #767c8d;
  --line: #e2e4eb;
  --line-strong: #cfd3de;
  --brand: #c51ea5;
  --brand-dark: #7c25b8;
  --brand-soft: #f8e7f6;
  --success: #16845b;
  --success-soft: #e5f7ef;
  --warning: #ad6817;
  --warning-soft: #fff2dd;
  --danger: #b93645;
  --danger-soft: #ffe9ec;
  --shadow: 0 22px 55px rgba(36, 42, 76, .14);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  font-variant-numeric: tabular-nums;
  text-rendering: optimizeLegibility;
}

html,
body {
  background: var(--bg);
}

body {
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  background: #f5f6fa;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: calc(92px + var(--safe-top));
  align-items: center;
  gap: 28px;
  padding: calc(14px + var(--safe-top)) clamp(22px, 6vw, 86px) 14px;
  border-bottom: 1px solid #e3e5eb;
  background: rgba(255,255,255,.96);
  box-shadow: 0 3px 16px rgba(36,42,76,.06);
  backdrop-filter: blur(18px);
}

.brand {
  flex: 0 0 auto;
  gap: 11px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: linear-gradient(145deg, #e525b4, #8d26bd);
  box-shadow: 0 8px 20px rgba(176,31,162,.25);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
}

.brand strong {
  color: #191b24;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.025em;
}

.brand small {
  color: #777c89;
  font-size: 11px;
}

.brand-descriptor {
  display: block;
  padding-left: 28px;
  border-left: 1px solid #d7d9e1;
  color: #252733;
  font-size: 14px;
  line-height: 1.35;
}

.public-actions {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-left: auto;
}

.header-login,
.header-register {
  min-height: 48px;
  padding: 10px 28px;
  border-radius: 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.header-login {
  border: 1px solid #39415e;
  background: #fff;
  color: #343a50;
}

.header-register {
  border: 1px solid #252e54;
  background: #252e54;
  color: #fff;
}

.header-login:hover { background: #f2f3f7; }
.header-register:hover { background: #343f70; }

.auth-layout {
  display: grid;
  width: min(1740px, calc(100% - 44px));
  min-height: calc(100vh - 93px);
  margin: 0 auto;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
  align-items: start;
  gap: 24px;
  padding: 24px 0 58px;
}

.auth-copy {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 3.2vw, 52px) clamp(28px, 4vw, 66px) 0;
  border-radius: 26px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.17), transparent 20rem),
    linear-gradient(135deg, #b32bc1 0%, #7a20b9 54%, #5421a4 100%);
  box-shadow: 0 20px 50px rgba(76,31,145,.2);
  color: #fff;
}

.auth-copy .eyebrow {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.auth-copy h1 {
  max-width: 980px;
  margin: 20px 0 16px;
  color: #fff;
  font-size: clamp(32px, 3.2vw, 50px);
  font-weight: 790;
  line-height: 1.04;
  letter-spacing: -.035em;
  text-transform: uppercase;
  text-wrap: balance;
}

.auth-copy > p {
  max-width: 800px;
  margin: 0;
  color: rgba(255,255,255,.87);
  font-size: clamp(14px, 1.05vw, 17px);
  font-weight: 520;
  line-height: 1.48;
}

.hero-visual {
  position: relative;
  overflow: hidden;
  margin: 28px -22px 0;
  border: 5px solid rgba(255,255,255,.2);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  background: #7d22b7;
  box-shadow: 0 -8px 30px rgba(38,14,79,.18);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.proof-list {
  display: grid;
  margin: 0 -22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255,255,255,.18);
  background: rgba(35,18,86,.38);
}

.proof-list span {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 11px;
  font-weight: 720;
  text-align: center;
}

.proof-list span + span {
  border-left: 1px solid rgba(255,255,255,.18);
}

.auth-card {
  position: sticky;
  top: 116px;
  padding: 30px;
  border: 0;
  border-radius: 24px;
  background: #273052;
  box-shadow: 0 20px 48px rgba(34,42,78,.18);
  color: #fff;
}

.auth-card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-card-kicker span {
  color: #fff;
  font-size: 15px;
  font-weight: 820;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.auth-card-kicker small {
  color: #bac0d3;
  font-size: 10px;
}

.segmented-control {
  padding: 4px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 11px;
  background: rgba(8,12,31,.25);
}

.auth-card > .segmented-control {
  margin-bottom: 24px;
}

.segment {
  min-height: 37px;
  color: #bdc3d6;
  font-size: 12px;
  font-weight: 700;
}

.segment.is-active {
  background: #fff;
  color: #282f4c;
  box-shadow: 0 4px 12px rgba(10,14,34,.18);
}

.form-heading {
  margin-bottom: 20px;
}

.form-heading h2 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 21px;
  font-weight: 760;
  letter-spacing: -.025em;
}

.form-heading p {
  color: #c0c6d8;
  font-size: 12px;
}

.field > span {
  color: #d9ddeb;
  font-size: 11px;
  font-weight: 680;
}

.field small {
  color: #aeb5ca;
}

.auth-card input,
.auth-card select {
  min-height: 48px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 9px;
  background: #fff;
  color: #202331;
}

.auth-card input:focus,
.auth-card select:focus {
  border-color: #e23bb8;
  box-shadow: 0 0 0 4px rgba(226,59,184,.2);
}

.button {
  border-radius: 10px;
  font-size: 12px;
  font-weight: 760;
}

.button-primary {
  background: linear-gradient(135deg, #e429b3, #8828bd);
  box-shadow: 0 10px 24px rgba(198,28,165,.28);
  color: #fff;
}

.button-primary:hover {
  background: linear-gradient(135deg, #f036c1, #9b34ce);
}

.button-secondary {
  border-color: #d6d9e2;
  background: #fff;
  color: #2f3446;
}

.button-secondary:hover,
.button-quiet:hover {
  background: #f0f1f5;
}

.button-quiet { color: #646b7c; }

/* Signed-in product keeps the same compact visual language. */
.app-layout {
  min-height: calc(100vh - 93px);
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  top: 93px;
  height: calc(100vh - 93px);
  border-color: #e2e4eb;
  background: #fff;
}

.nav-item.is-active {
  background: #f7e8f6;
  color: #9b218e;
}

.sidebar-note {
  border-color: #ded6ef;
  background: #f7f1fb;
}

.sidebar-note strong,
.sidebar-note p { color: #65417e; }

.setup-panel,
.status-card,
.metric-card,
.blocker-item,
.data-quality-grid article,
.plan-card {
  border-color: #e3e5eb;
  background: #fff;
  box-shadow: 0 8px 24px rgba(36,42,76,.05);
}

.store-dialog {
  background: #fff;
  color: var(--ink);
}

.store-dialog .form-heading h2 { color: var(--ink); }
.store-dialog .form-heading p { color: var(--ink-muted); }
.store-dialog .field > span { color: var(--ink-soft); }

@media (max-width: 1120px) {
  .brand-descriptor { display: none; }
}

@media (max-width: 760px) {
  .auth-layout {
    width: min(920px, calc(100% - 34px));
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-card {
    position: static;
    width: min(100%, 620px);
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .topbar {
    min-height: calc(70px + var(--safe-top));
    gap: 10px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand strong { font-size: 16px; }
  .brand small { display: none; }

  .public-actions { gap: 6px; }

  .header-login,
  .header-register {
    min-height: 39px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 9px;
  }

  .auth-layout {
    width: min(100% - 20px, 560px);
    padding: 10px 0 42px;
  }

  .auth-copy {
    padding: 25px 18px 0;
    border-radius: 19px;
  }

  .auth-copy h1 {
    margin-top: 15px;
    font-size: clamp(27px, 8.2vw, 34px);
    line-height: 1.05;
  }

  .auth-copy > p {
    font-size: 13px;
  }

  .hero-visual {
    margin: 22px -9px 0;
    border-width: 3px;
    border-radius: 17px 17px 0 0;
  }

  .proof-list {
    margin: 0 -9px;
    grid-template-columns: 1fr;
  }

  .proof-list span {
    min-height: 38px;
    justify-content: flex-start;
    padding: 7px 14px;
    font-size: 10px;
    text-align: left;
  }

  .proof-list span + span {
    border-top: 1px solid rgba(255,255,255,.16);
    border-left: 0;
  }

  .auth-card {
    padding: 23px 19px;
    border-radius: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Sellable finance workspace: readable products and explicit net-profit composition. */
.section-heading-actions {
  display: flex;
  max-width: 620px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 9px;
}

.section-heading-actions p {
  flex: 1 1 260px;
  text-align: right;
}

.profit-config-notice,
.calculation-note {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #efc77e;
  border-radius: 13px;
  background: #fff8e9;
  color: #825018;
}

.profit-config-notice strong,
.profit-config-notice p {
  display: block;
}

.profit-config-notice p,
.calculation-note {
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.5;
}

.profit-config-notice p {
  margin-top: 4px;
}

.blocker-item.is-warning {
  border-color: #efcf98;
  background: #fffbf1;
}

.product-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.product-summary-grid article {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-muted);
}

.product-summary-grid span,
.product-summary-grid strong {
  display: block;
}

.product-summary-grid span {
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 750;
}

.product-summary-grid strong {
  margin-top: 7px;
  color: var(--ink);
  font-size: 25px;
}

.product-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(190px, 240px);
  gap: 10px;
  margin-top: 14px;
}

.product-toolbar input,
.product-toolbar select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.product-toolbar input {
  padding: 0 14px;
}

.product-toolbar select {
  padding: 0 36px 0 13px;
}

.product-toolbar input:focus,
.product-toolbar select:focus {
  border-color: var(--brand);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(197, 30, 165, .12);
}

#products-table-shell table {
  min-width: 850px;
  table-layout: fixed;
}

#products-table-shell th:first-child,
#products-table-shell td:first-child {
  width: 42%;
}

#products-table-shell td:first-child strong,
#products-table-shell td:first-child small {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

#products-table-shell td:first-child strong {
  font-size: 13px;
  line-height: 1.35;
}

#products-table-shell td:nth-child(2) small {
  margin-top: 5px;
}

.product-cost-status {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.product-cost-status[data-status="confirmed"] {
  background: var(--success-soft);
  color: var(--success);
}

.product-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  color: var(--ink-muted);
}

.product-pagination > div {
  display: flex;
  gap: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .section-heading-actions,
  .section-heading-actions p {
    justify-content: flex-start;
    text-align: left;
  }

  .product-summary-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .product-toolbar {
    grid-template-columns: 1fr;
  }

  #products-table-shell {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #products-table-shell table,
  #products-table-shell tbody,
  #products-table-shell tr,
  #products-table-shell td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #products-table-shell thead {
    display: none;
  }

  #products-table-shell tr {
    margin-bottom: 10px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
  }

  #products-table-shell td,
  #products-table-shell td:first-child {
    width: 100%;
    padding: 8px 0;
    border: 0;
    text-align: left;
    white-space: normal;
  }

  #products-table-shell td:last-child {
    padding-bottom: 0;
  }

  .product-pagination {
    align-items: flex-start;
  }
}

/* Ozon-style period picker: one range control, two-month calendar, quick presets. */
.period-picker-shell {
  position: relative;
  z-index: 35;
}

.period-picker-trigger {
  display: inline-flex;
  min-height: 44px;
  min-width: 262px;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.period-picker-trigger:hover {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line-strong));
}

.period-picker-trigger:focus-visible,
.period-picker-trigger[aria-expanded="true"] {
  border-color: var(--brand);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(197, 30, 165, .13);
}

.period-picker-prefix {
  color: var(--ink-muted);
  font-weight: 650;
}

.period-picker-chevron {
  margin-left: auto;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1;
  transition: transform .16s ease;
}

.period-picker-trigger[aria-expanded="true"] .period-picker-chevron {
  transform: rotate(180deg);
}

.period-picker-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  display: grid;
  width: min(760px, calc(100vw - 300px));
  min-width: 660px;
  grid-template-columns: minmax(0, 1fr) 154px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(16, 24, 40, .19);
}

.period-picker-popover[hidden] {
  display: none;
}

.period-calendar-panel {
  padding: 17px 18px 15px;
}

.period-calendar-toolbar {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.period-calendar-toolbar strong {
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.calendar-nav-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 23px;
  line-height: 1;
}

.calendar-nav-button:hover:not(:disabled) {
  background: var(--brand-soft);
  color: var(--brand);
}

.calendar-nav-button:disabled {
  opacity: .34;
  cursor: default;
}

.period-calendar-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.period-calendar-month h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
  text-align: center;
  text-transform: capitalize;
}

.period-calendar-weekdays,
.period-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.period-calendar-weekdays {
  margin-bottom: 5px;
}

.period-calendar-weekdays span {
  padding: 4px 0;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 750;
  text-align: center;
}

.period-calendar-day,
.period-calendar-blank {
  min-width: 0;
  height: 32px;
}

.period-calendar-day {
  position: relative;
  z-index: 1;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}

.period-calendar-day:hover:not(:disabled) {
  background: var(--brand-soft);
  color: var(--brand);
}

.period-calendar-day.is-in-range {
  border-radius: 0;
  background: rgba(197, 30, 165, .09);
  color: var(--brand);
}

.period-calendar-day.is-range-start,
.period-calendar-day.is-range-end {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 5px 13px rgba(197, 30, 165, .24);
}

.period-calendar-day.is-today:not(.is-range-start):not(.is-range-end) {
  box-shadow: inset 0 0 0 1px var(--brand);
}

.period-calendar-day:disabled {
  color: #cfd4dc;
  cursor: default;
  text-decoration: line-through;
}

.period-shortcuts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 13px;
  border-left: 1px solid var(--line);
  background: #fcfcfd;
}

.period-shortcuts > strong {
  margin: 0 8px 7px;
  color: var(--ink-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.period-shortcut {
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.period-shortcut:hover,
.period-shortcut.is-active {
  background: var(--brand-soft);
  color: var(--brand);
}

.period-picker-hint {
  grid-column: 1 / -1;
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--ink-muted);
  font-size: 11px;
}

@media (max-width: 980px) {
  .period-picker-popover {
    right: -180px;
    width: min(720px, calc(100vw - 40px));
    min-width: 620px;
  }
}

@media (max-width: 760px) {
  .period-picker-shell,
  .period-picker-trigger {
    width: 100%;
  }

  .period-picker-trigger {
    min-width: 0;
  }

  .period-picker-popover {
    position: fixed;
    top: 86px;
    right: 12px;
    left: 12px;
    width: auto;
    min-width: 0;
    max-height: calc(100vh - 104px);
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .period-calendar-months {
    grid-template-columns: 1fr;
  }

  .period-shortcuts {
    flex-flow: row wrap;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .period-shortcuts > strong {
    width: 100%;
  }

  .period-shortcut {
    flex: 1 1 90px;
    text-align: center;
  }
}
