/* Merchant Console design system. Loaded only by the customer-facing admin. */
.merchant-body {
  --bg: #f5f5f9;
  --bg-soft: #fafafe;
  --surface: #ffffff;
  --surface-soft: #f7f6fb;
  --ink: #181820;
  --ink-soft: #3f404c;
  --muted: #737482;
  --line: #e7e5ee;
  --line-strong: #d9d6e4;
  --sidebar: #171429;
  --sidebar-soft: #241d43;
  --primary: #7357e8;
  --primary-strong: #5e42d4;
  --primary-soft: #f0ecff;
  --primary-faint: #f8f6ff;
  --mint: #229b7b;
  --mint-soft: #e8f7f2;
  --blue: #3478c7;
  --blue-soft: #ebf3fd;
  --coral: #cb5d6a;
  --coral-soft: #fbecef;
  --amber: #a9781e;
  --amber-soft: #fff5df;
  --danger: #b83d4c;
  --danger-soft: #fcebed;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(25, 20, 45, .025), 0 10px 30px rgba(25, 20, 45, .05);
  --shadow: 0 28px 74px rgba(24, 19, 43, .16);
  --motion: 350ms cubic-bezier(.2, .8, .2, 1);
  background:
    radial-gradient(circle at 88% -12%, rgba(115, 87, 232, .09), transparent 30rem),
    radial-gradient(circle at 8% 104%, rgba(34, 155, 123, .045), transparent 28rem),
    var(--bg);
  overflow-x: clip;
}

.merchant-body,
.merchant-body button,
.merchant-body input,
.merchant-body select,
.merchant-body textarea {
  -webkit-font-smoothing: antialiased;
}

.merchant-body .admin-shell { transition: grid-template-columns var(--motion); }
.merchant-body .admin-sidebar {
  gap: 18px;
  padding: 18px 14px;
  background:
    radial-gradient(circle at 0 -2%, rgba(139, 111, 255, .34), transparent 18rem),
    linear-gradient(180deg, #211a3d 0%, #15131f 55%, #111118 100%);
  box-shadow: inset -1px 0 rgba(255, 255, 255, .05);
  transition: width var(--motion), transform var(--motion);
}

.merchant-body .brand { min-height: 48px; }
.merchant-body .brand-mark {
  border-radius: 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .3), 0 0 0 1px rgba(255, 255, 255, .1);
}
.merchant-body .brand-copy strong { font-size: .92rem; font-weight: 780; }
.merchant-body .brand-copy small { margin-top: 1px; color: rgba(255, 255, 255, .52); letter-spacing: .025em; }
.merchant-body .nav-list { gap: 5px; }
.merchant-body .nav-list a {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding-inline: 13px;
  color: rgba(255, 255, 255, .65);
  font-size: .81rem;
  font-weight: 680;
  transition: color var(--motion), background-color var(--motion), border-color var(--motion);
}
.merchant-body .nav-list a:hover,
.merchant-body .nav-list a:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .07);
  transform: none;
}
.merchant-body .nav-list a.active {
  color: #fff;
  border-color: rgba(178, 157, 255, .16);
  background: linear-gradient(110deg, rgba(125, 91, 240, .38), rgba(125, 91, 240, .16));
}
.merchant-body .nav-list a.active::before { width: 3px; height: 24px; background: #b1a2ff; }
.merchant-body .sidebar-support {
  display: grid;
  min-width: 0;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 13px;
  padding: 10px;
  color: #fff;
  background: rgba(255, 255, 255, .055);
  transition: border-color var(--motion), background-color var(--motion);
}
.merchant-body .sidebar-support:hover,
.merchant-body .sidebar-support:focus-visible { border-color: rgba(97, 232, 143, .35); background: rgba(37, 211, 102, .1); }
.merchant-body .sidebar-support-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: #fff; background: #1fa855; box-shadow: 0 8px 22px rgba(20, 131, 65, .28); }
.merchant-body .sidebar-support-icon img { display: block; width: 20px; height: 20px; object-fit: contain; }
.merchant-body .sidebar-support-copy { display: grid; min-width: 0; gap: 1px; }
.merchant-body .sidebar-support-copy strong { font-size: .73rem; font-weight: 780; }
.merchant-body .sidebar-support-copy small { overflow-wrap: anywhere; color: rgba(255, 255, 255, .57); font-size: .61rem; line-height: 1.35; }
.merchant-body .sidebar-profile { border-color: rgba(255, 255, 255, .09); }
.merchant-body .sidebar-profile .avatar { background: linear-gradient(135deg, #8169ec, #5c40cc); }
.merchant-body .admin-shell.sidebar-collapsed .sidebar-support { width: 46px; min-height: 46px; grid-template-columns: 1fr; justify-items: center; margin-inline: auto; padding: 4px; }
.merchant-body .admin-shell.sidebar-collapsed .sidebar-support-copy { display: none; }

.merchant-body .topbar {
  min-height: 88px;
  padding: 17px clamp(20px, 3vw, 44px);
  border-color: rgba(219, 216, 229, .88);
  background: rgba(250, 250, 252, .92);
  box-shadow: 0 8px 28px rgba(24, 19, 43, .035);
  backdrop-filter: blur(22px) saturate(150%);
}
.merchant-body .topbar h1 { font-size: clamp(1.55rem, 2vw, 1.9rem); font-weight: 820; letter-spacing: -.045em; }
.merchant-body .page-subtitle { margin-top: 5px; font-size: .82rem; }
.merchant-body .location-picker { width: min(310px, 34vw); }
.merchant-body .location-picker-trigger {
  min-height: 44px;
  border-radius: 12px;
  box-shadow: none;
  transition: border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
}
.merchant-body .location-picker-trigger:hover,
.merchant-body .location-picker-trigger:focus-visible {
  border-color: #c9bff6;
  background: var(--primary-faint);
  box-shadow: 0 0 0 3px rgba(115, 87, 232, .08);
  transform: none;
}
.merchant-body .location-picker-menu { border-radius: 14px; padding: 7px; box-shadow: var(--shadow); }
.merchant-body .location-picker-option,
.merchant-body .location-picker-action { border-radius: 10px; transition: color var(--motion), background-color var(--motion); }

.merchant-body .page-content {
  gap: 18px;
  width: min(1480px, 100%);
  padding: clamp(22px, 2.8vw, 38px) clamp(18px, 3vw, 44px) 72px;
}

.merchant-body .panel {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow-sm);
}
.merchant-body .panel-header { margin-bottom: 16px; }
.merchant-body .panel-header h2,
.merchant-body .settings-section-header h2 { font-size: 1.02rem; font-weight: 790; letter-spacing: -.03em; }
.merchant-body .panel-header p:not(.eyebrow),
.merchant-body .settings-section-header p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }

.merchant-body .button {
  min-height: 42px;
  border-radius: 11px;
  font-size: .77rem;
  transition: color var(--motion), background-color var(--motion), border-color var(--motion), box-shadow var(--motion), opacity var(--motion);
}
.merchant-body .button:hover:not(:disabled),
.merchant-body .button:active:not(:disabled) { transform: none; }
.merchant-body .button.primary {
  background: linear-gradient(135deg, #8067ed, var(--primary-strong));
  box-shadow: 0 8px 18px rgba(94, 66, 212, .18);
}
.merchant-body .button.primary:hover:not(:disabled),
.merchant-body .button.primary:focus-visible {
  background: linear-gradient(135deg, #6f55df, #5033bd);
  box-shadow: 0 10px 24px rgba(94, 66, 212, .25);
}
.merchant-body .button.secondary:hover:not(:disabled),
.merchant-body .button.quiet:hover:not(:disabled) {
  color: var(--primary-strong);
  border-color: #c8bdf5;
  background: var(--primary-faint);
}
.merchant-body .icon-button { transition: color var(--motion), background-color var(--motion); }
.merchant-body .text-link,
.merchant-body .text-button { transition: color var(--motion); }

.merchant-body input,
.merchant-body select,
.merchant-body textarea {
  border-color: var(--line-strong);
  border-radius: 11px;
  background: #fff;
  transition: border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
}
.merchant-body input:hover,
.merchant-body select:hover,
.merchant-body textarea:hover { border-color: #bbb7c8; }
.merchant-body input:focus,
.merchant-body select:focus,
.merchant-body textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(115, 87, 232, .1);
}
.merchant-body .field > span,
.merchant-body .field legend { color: var(--ink-soft); font-size: .73rem; font-weight: 720; }
.merchant-body .field > small { font-size: .68rem; }

.merchant-body .metric-grid { gap: 12px; }
.merchant-body .metric-card {
  min-height: 120px;
  flex: 1 1 190px;
  border-radius: 15px;
  padding: 17px;
  box-shadow: none;
  transition: border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
}
.merchant-body .metric-card:hover { border-color: #d5cffa; background: var(--primary-faint); box-shadow: var(--shadow-sm); }
.merchant-body .metric-card::after { right: -34px; bottom: -42px; width: 104px; height: 104px; opacity: .55; }
.merchant-body .metric-card strong { max-width: 100%; font-size: clamp(1.35rem, 2vw, 1.85rem); overflow-wrap: anywhere; word-break: break-word; }
.merchant-body .metric-card span { font-size: .68rem; }
.merchant-body .metric-card small { font-size: .65rem; }

.merchant-body .responsive-table {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset -24px 0 20px -28px rgba(23, 20, 39, .24);
}
.merchant-body th { color: #858592; background: #fafafe; }
.merchant-body th,
.merchant-body td { padding: 13px 12px; }
.merchant-body tbody tr { transition: background-color var(--motion); }
.merchant-body tbody tr:hover { background: var(--primary-faint); }

.merchant-body .app-dialog { border-radius: 20px; }
.merchant-body .app-dialog::backdrop { background: rgba(17, 14, 29, .58); backdrop-filter: blur(8px); }
.merchant-body .dialog-shell { border: 1px solid rgba(255, 255, 255, .7); }
.merchant-body .dialog-header { padding: 20px 22px 17px; }
.merchant-body .dialog-header h2 { font-size: 1.15rem; }
.merchant-body .dialog-body { padding: 22px; }
.merchant-body .dialog-footer { padding: 14px 22px; background: #faf9fc; }

/* Authentication: a single premium shell for registration, sign-in and recovery. */
.merchant-body .auth-panel {
  width: 100%;
  max-width: 100vw;
  grid-template-columns: minmax(360px, .78fr) minmax(520px, 1.22fr);
  overflow: hidden;
  background: #f7f7fa;
}
.merchant-body .auth-visual {
  position: relative;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  padding: clamp(28px, 3.2vw, 52px);
  background:
    radial-gradient(circle at 18% 20%, rgba(158, 139, 255, .23), transparent 20rem),
    radial-gradient(circle at 92% 78%, rgba(65, 194, 159, .12), transparent 24rem),
    linear-gradient(145deg, #151321 0%, #211a3a 50%, #30245e 100%);
}
.merchant-body .auth-visual::before {
  inset: -16% -28%;
  opacity: .65;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 28%, rgba(255, 255, 255, .045) 28.2% 28.5%, transparent 28.8% 45%, rgba(255, 255, 255, .035) 45.2% 45.45%, transparent 45.8%);
  mask-image: none;
  animation: merchant-auth-drift 18s ease-in-out infinite alternate;
}
.merchant-body .auth-visual::after {
  position: absolute;
  inset: 0;
  opacity: .1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  mask-image: linear-gradient(135deg, transparent 12%, #000 64%, transparent);
}
.merchant-body .auth-visual-header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}
.merchant-body .auth-product,
.merchant-body .auth-mobile-product {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}
.merchant-body .auth-product > span:last-child,
.merchant-body .auth-mobile-product > span:last-child {
  display: grid;
  min-width: 0;
}
.merchant-body .auth-product strong,
.merchant-body .auth-mobile-product strong { font-size: .82rem; font-weight: 790; letter-spacing: -.02em; }
.merchant-body .auth-product small,
.merchant-body .auth-mobile-product small { font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; }
.merchant-body .auth-product small { color: rgba(255, 255, 255, .48); }
.merchant-body .auth-secure-badge {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: 0 11px;
  color: rgba(255, 255, 255, .66);
  background: rgba(255, 255, 255, .055);
  font-size: .62rem;
  font-weight: 680;
  backdrop-filter: blur(10px);
}
.merchant-body .auth-secure-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #68d6b5;
  box-shadow: 0 0 0 4px rgba(104, 214, 181, .12);
}
.merchant-body .auth-visual-stage {
  position: relative;
  z-index: 2;
  display: grid;
  flex: 1;
  align-content: end;
  gap: clamp(38px, 6vh, 72px);
  padding-top: 80px;
}
.merchant-body .auth-visual-mode { display: none; max-width: 580px; animation: merchant-auth-reveal var(--motion) both; }
.merchant-body .auth-panel[data-auth-mode="login"] [data-auth-visual="login"],
.merchant-body .auth-panel[data-auth-mode="register"] [data-auth-visual="register"],
.merchant-body .auth-panel[data-auth-mode="forgot"] [data-auth-visual="recovery"],
.merchant-body .auth-panel[data-auth-mode="reset"] [data-auth-visual="recovery"],
.merchant-body .auth-panel[data-auth-mode="verify"] [data-auth-visual="recovery"] { display: block; }
.merchant-body .auth-visual-mode h2 {
  max-width: 600px;
  margin: 0;
  font-size: clamp(2.25rem, 4.1vw, 4.4rem);
  font-weight: 800;
  line-height: .98;
  letter-spacing: -.065em;
}
.merchant-body .auth-visual-mode p {
  max-width: 530px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .63);
  font-size: clamp(.82rem, 1.1vw, .96rem);
  line-height: 1.65;
}
.merchant-body .auth-capabilities {
  display: grid;
  max-width: 720px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .13);
}
.merchant-body .auth-capabilities > span {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 17px 16px 0 0;
}
.merchant-body .auth-capabilities b { color: #9f8df6; font-size: .58rem; letter-spacing: .08em; }
.merchant-body .auth-capabilities strong { color: rgba(255, 255, 255, .88); font-size: .68rem; }
.merchant-body .auth-capabilities small { color: rgba(255, 255, 255, .43); font-size: .57rem; line-height: 1.4; }

.merchant-body .auth-content {
  position: relative;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  justify-content: center;
  padding: clamp(28px, 5vw, 72px);
  background:
    radial-gradient(circle at 100% 0, rgba(115, 87, 232, .075), transparent 25rem),
    #fbfbfd;
}
.merchant-body .auth-content::before {
  position: absolute;
  top: -170px;
  right: -170px;
  width: 340px;
  height: 340px;
  border: 1px solid rgba(115, 87, 232, .08);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.merchant-body .auth-mobile-product { display: none; color: var(--ink); }
.merchant-body .auth-mobile-product small { color: var(--muted); }
.merchant-body .auth-card {
  position: relative;
  z-index: 1;
  width: min(450px, 100%);
  margin: auto;
}
.merchant-body .auth-card > section { min-width: 0; }
.merchant-body .auth-panel[data-auth-mode="register"] .auth-content { justify-content: flex-start; }
.merchant-body .auth-panel[data-auth-mode="register"] .auth-card {
  width: min(720px, 100%);
  padding-block: 12px 30px;
}
.merchant-body .auth-card > section:not([hidden]) { animation: merchant-auth-reveal var(--motion) both; }
.merchant-body .auth-heading { margin-bottom: 28px; }
.merchant-body .auth-heading h1 {
  margin: 0 0 9px;
  font-size: clamp(1.9rem, 3.2vw, 2.55rem);
  font-weight: 820;
  letter-spacing: -.052em;
}
.merchant-body .auth-heading > p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.6;
}
.merchant-body .auth-form { gap: 17px; }
.merchant-body .auth-form .field,
.merchant-body .registration-section .field,
.merchant-body .settings-fields > .field,
.merchant-body .contract-fields > .field {
  grid-template-rows: minmax(1.15rem, auto) auto auto;
  align-content: start;
}
.merchant-body .auth-form input,
.merchant-body .auth-form select {
  min-height: 49px;
  border-radius: 12px;
  padding-inline: 14px;
  background: rgba(255, 255, 255, .96);
}
.merchant-body .auth-form .field > span,
.merchant-body .auth-form .field > legend {
  color: #42424d;
  font-size: .7rem;
  font-weight: 750;
}
.merchant-body .auth-form input:user-invalid,
.merchant-body .auth-form select:user-invalid { border-color: rgba(184, 61, 76, .6); }
.merchant-body .auth-form .large-button { min-height: 50px; }
.merchant-body .auth-inline-link { margin-top: -8px; font-size: .7rem; }
.merchant-body .auth-switch { margin-top: 21px; font-size: .75rem; }
.merchant-body .auth-switch a { text-decoration: none; }
.merchant-body .auth-switch a:hover,
.merchant-body .auth-switch a:focus-visible { text-decoration: underline; }
.merchant-body .auth-security-note {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(450px, 100%);
  justify-content: center;
  gap: 7px;
  margin: 28px auto 0;
  color: #8a8994;
  font-size: .62rem;
  text-align: center;
}
.merchant-body .auth-security-note span { color: var(--mint); font-weight: 900; }
.merchant-body .auth-panel[data-auth-mode="register"] .auth-security-note { width: min(720px, 100%); }
.merchant-body .registration-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.merchant-body .registration-progress li {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  color: #94939d;
  font-size: .62rem;
  font-weight: 690;
}
.merchant-body .registration-progress li:not(:last-child)::after {
  position: absolute;
  z-index: -1;
  right: 12px;
  left: 35px;
  height: 1px;
  background: var(--line);
  content: "";
}
.merchant-body .registration-progress li > span {
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
  font-size: .6rem;
}
.merchant-body .registration-progress li.active { color: var(--primary-strong); }
.merchant-body .registration-progress li.active > span { color: #fff; border-color: var(--primary); background: var(--primary); }
.merchant-body .registration-form { gap: 22px; }
.merchant-body .registration-section {
  display: grid;
  gap: 14px;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
  padding: 20px 0 0;
}
.merchant-body .registration-section > legend {
  display: grid;
  width: 100%;
  gap: 2px;
  padding: 0;
}
.merchant-body .registration-section > legend strong { color: var(--ink); font-size: .8rem; }
.merchant-body .registration-section > legend small { color: var(--muted); font-size: .66rem; font-weight: 500; }
.merchant-body .registration-footprint { border: 0; margin: 0; padding: 0; }
.merchant-body .registration-footprint > legend { margin-bottom: 7px; }
.merchant-body .footprint-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.merchant-body .footprint-options label { min-width: 0; cursor: pointer; }
.merchant-body .footprint-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.merchant-body .footprint-options label > span {
  position: relative;
  display: grid;
  min-height: 62px;
  align-content: center;
  gap: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 10px 34px 10px 12px;
  color: var(--ink-soft);
  background: #fff;
  transition: color var(--motion), border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
}
.merchant-body .footprint-options label > span::after {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 16px;
  height: 16px;
  border: 1px solid #c9c6d1;
  border-radius: 50%;
  content: "";
  transform: translateY(-50%);
}
.merchant-body .footprint-options strong { font-size: .7rem; }
.merchant-body .footprint-options small { color: var(--muted); font-size: .59rem; }
.merchant-body .footprint-options label:hover > span { border-color: #bcaef4; background: var(--primary-faint); }
.merchant-body .footprint-options input:focus-visible + span { outline: 3px solid rgba(115, 87, 232, .2); outline-offset: 2px; }
.merchant-body .footprint-options input:checked + span {
  color: var(--primary-strong);
  border-color: #a894f0;
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(115, 87, 232, .08);
}
.merchant-body .footprint-options input:checked + span::after {
  border: 4px solid var(--primary);
  background: #fff;
}
.merchant-body .registration-trial-note {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid #d6cff7;
  border-left: 1px solid #d6cff7;
  border-radius: 12px;
  padding: 11px 13px;
  background: linear-gradient(100deg, #f7f4ff, #fff);
}
.merchant-body .registration-trial-note > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  color: var(--primary-strong);
  background: #e9e2ff;
  font-size: .7rem;
  font-weight: 900;
}
.merchant-body .registration-trial-note div { display: grid; gap: 1px; }
.merchant-body .registration-trial-note strong { color: var(--ink); font-size: .69rem; }
.merchant-body .registration-trial-note small { color: var(--muted); font-size: .61rem; line-height: 1.45; }
.merchant-body .consent-check { align-items: start; }
.merchant-body .auth-form .consent-check input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  flex: 0 0 17px;
  padding: 0;
}
.merchant-body .registration-support { margin: -7px 0 0; text-align: center; }
.merchant-body .auth-state-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #d8d0fa;
  border-radius: 15px;
  margin-bottom: 22px;
  color: var(--primary-strong);
  background: linear-gradient(135deg, #fff, var(--primary-soft));
  font-size: .8rem;
  font-weight: 850;
  box-shadow: var(--shadow-sm);
}
.merchant-body [data-auth-view="verify"] > .button,
.merchant-body .account-recovery-fallback { margin-top: 16px; }
.merchant-body [data-auth-view="verify"] .auth-switch { margin-top: 20px; }

@keyframes merchant-auth-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(.98); }
  to { transform: translate3d(1.5%, 1%, 0) scale(1.03); }
}
@keyframes merchant-auth-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Overview and onboarding */
.merchant-body .onboarding-strip {
  gap: 14px;
  border: 1px solid #ddd6fb;
  border-radius: var(--radius-lg);
  padding: 20px;
  background: linear-gradient(135deg, #fff 0%, #f8f5ff 100%);
  box-shadow: var(--shadow-sm);
}
.merchant-body .onboarding-strip__header { align-items: center; }
.merchant-body .onboarding-strip__header span { color: var(--primary-strong); font-size: .63rem; }
.merchant-body .onboarding-strip__header h2 { font-size: 1.18rem; }
.merchant-body .onboarding-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.merchant-body .onboarding-step {
  display: grid;
  min-width: 0;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  background: rgba(255, 255, 255, .86);
  transition: border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
}
.merchant-body .onboarding-step:hover,
.merchant-body .onboarding-step:focus-within { border-color: #c9bff6; background: #fff; box-shadow: var(--shadow-sm); transform: none; }
.merchant-body .onboarding-step > span:first-child { width: 30px; height: 30px; }
.merchant-body .onboarding-step > span:nth-child(2) { display: grid; gap: 3px; }
.merchant-body .onboarding-step strong { font-size: .72rem; }
.merchant-body .onboarding-step small { color: var(--muted); font-size: .62rem; line-height: 1.4; }
.merchant-body .onboarding-step.is-next { border-color: #ae9df3; background: var(--primary-soft); box-shadow: none; }
.merchant-body .onboarding-step.is-complete { opacity: .72; }
.merchant-body .onboarding-step-actions { display: flex; grid-column: 2; flex-wrap: wrap; gap: 8px 12px; }
.merchant-body .onboarding-step-actions a { color: var(--primary-strong); font-size: .62rem; font-weight: 760; text-decoration: none; }
.merchant-body .onboarding-step-actions a:hover { text-decoration: underline; text-underline-offset: 3px; }
.merchant-body .status-banner,
.merchant-body .devices-summary {
  border-color: #ded8f8;
  border-radius: var(--radius-lg);
  background: linear-gradient(115deg, #fff, #faf8ff);
}
.merchant-body .action-row,
.merchant-body .quick-action {
  transition: color var(--motion), background-color var(--motion);
}
.merchant-body .action-row:hover,
.merchant-body .quick-action:hover { color: var(--primary-strong); background: var(--primary-faint); }
.merchant-body .action-row:hover .action-arrow { color: var(--primary); transform: none; }

/* Catalog */
.merchant-body .catalog-toolbar { border-radius: 15px; padding: 12px; }
.merchant-body .catalog-toolbar input,
.merchant-body .catalog-toolbar select { background: #f8f7fb; }
.merchant-body .catalog-ai-status {
  border-color: #d3ebe4;
  background: #f7fcfa;
}
.merchant-body .catalog-table { border-radius: 15px; padding-inline: 8px; }
.merchant-body .catalog-summary > * { transition: border-color var(--motion), background-color var(--motion); }
.merchant-body .product-thumb,
.merchant-body .image-dropzone { border-radius: 13px; }
.merchant-body .image-dropzone { transition: border-color var(--motion), background-color var(--motion); }
.merchant-body .image-dropzone:hover { border-color: #bcaef3; background: var(--primary-faint); }
.merchant-body .form-section { border-color: var(--line); }
.merchant-body .advanced-section { border-radius: 13px; }

/* Locations, devices and billing */
.merchant-body .location-directory { border-radius: var(--radius-lg); }
.merchant-body .location-row { transition: background-color var(--motion), box-shadow var(--motion); }
.merchant-body .location-row:hover { background: var(--primary-faint); }
.merchant-body .location-row.active { background: #faf8ff; box-shadow: inset 3px 0 var(--primary); }
.merchant-body .billing-status { border-color: #ddd6fb; background: linear-gradient(115deg, #fff, #faf8ff); }
.merchant-body .billing-facts article,
.merchant-body .usage-summary-card,
.merchant-body .usage-surface,
.merchant-body .usage-breakdown-card,
.merchant-body .pricing-card {
  border-radius: 14px;
  box-shadow: none;
  transition: border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
}
.merchant-body .billing-facts article:hover,
.merchant-body .usage-summary-card:hover,
.merchant-body .usage-breakdown-card:hover,
.merchant-body .pricing-card:hover { border-color: #d2c8f8; box-shadow: var(--shadow-sm); }
.merchant-body .pricing-card.featured { border-color: #bfaef7; background: linear-gradient(180deg, #fff, #fbf9ff); }
.merchant-body .segmented-control button,
.merchant-body .range-button { transition: color var(--motion), background-color var(--motion), box-shadow var(--motion); }

/* Settings: one level of surfaces, progressive disclosure and curated presets. */
.merchant-body .settings-page { align-content: start; }
.merchant-body .settings-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 7px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--shadow-sm);
}
.merchant-body .settings-tabs > button {
  display: grid;
  min-width: 0;
  min-height: 60px;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 9px 11px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  transition: color var(--motion), border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
}
.merchant-body .settings-tabs > button:hover { color: var(--ink); background: #f7f6fb; }
.merchant-body .settings-tabs > button.active {
  color: var(--primary-strong);
  border-color: #ddd5fc;
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(115, 87, 232, .04);
}
.merchant-body .settings-tabs button > span:last-child { display: grid; gap: 2px; }
.merchant-body .settings-tabs strong { overflow-wrap: anywhere; font-size: .75rem; }
.merchant-body .settings-tabs small { overflow-wrap: anywhere; color: var(--muted); font-size: .61rem; }
.merchant-body .settings-tab-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #f2f1f6; }
.merchant-body .settings-tabs .active .settings-tab-icon { color: var(--primary); background: rgba(255, 255, 255, .85); }
.merchant-body .settings-tab-icon svg { width: 17px; height: 17px; }
.merchant-body .settings-form,
.merchant-body .settings-view { gap: 16px; }
.merchant-body .settings-view { display: grid; }
.merchant-body .settings-view[hidden],
.merchant-body .settings-form[hidden] { display: none; }
.merchant-body .settings-section { display: grid; gap: 20px; padding: 22px; }
.merchant-body .settings-section > form { display: grid; gap: 20px; min-width: 0; }
.merchant-body .settings-section-header { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.merchant-body .settings-section-header h2 { margin: 0; }
.merchant-body .settings-section-header.with-action { align-items: center; }
.merchant-body .settings-fields { display: grid; align-items: start; gap: 16px; }
.merchant-body .settings-fields.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.merchant-body .settings-fields.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.merchant-body .settings-fields .span-2 { grid-column: span 2; }
.merchant-body .settings-block { border-top: 1px solid var(--line); padding-top: 18px; }
.merchant-body .field-description { margin: -3px 0 9px; color: var(--muted); font-size: .69rem; }
.merchant-body .checkbox-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.merchant-body .checkbox-cards label > span {
  position: relative;
  min-height: 62px;
  border-radius: 12px;
  padding: 11px 42px 11px 13px;
  transition: color var(--motion), border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
}
.merchant-body .checkbox-cards label > span::after {
  position: absolute;
  top: 50%;
  right: 13px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid #cbc8d3;
  border-radius: 6px;
  color: #fff;
  background: #fff;
  font-size: .63rem;
  font-weight: 800;
  content: "";
  transform: translateY(-50%);
  transition: border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
}
.merchant-body .checkbox-cards label:hover > span { border-color: #cfc4f7; background: var(--primary-faint); }
.merchant-body .checkbox-cards input:checked + span { border-color: #aa97f1; background: var(--primary-soft); box-shadow: inset 0 0 0 1px rgba(115, 87, 232, .08); }
.merchant-body .checkbox-cards input:checked + span::after { border-color: var(--mint); background: var(--mint); box-shadow: 0 0 0 3px rgba(43, 168, 135, .1); content: "✓"; }
.merchant-body .language-options { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.merchant-body .language-options label > span { min-height: 48px; }
.merchant-body .preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 8px;
  margin-bottom: 9px;
}
.merchant-body .preset-grid label { min-width: 0; cursor: pointer; }
.merchant-body .preset-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.merchant-body .preset-grid span {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 34px 9px 12px;
  color: var(--ink-soft);
  background: #fff;
  font-size: .7rem;
  font-weight: 690;
  line-height: 1.3;
  transition: color var(--motion), border-color var(--motion), background-color var(--motion), box-shadow var(--motion);
}
.merchant-body .preset-grid span::after {
  position: absolute;
  right: 11px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #cbc8d3;
  border-radius: 6px;
  color: #fff;
  font-size: .62rem;
  content: "";
}
.merchant-body .preset-grid label:hover span { border-color: #c8bdf5; background: var(--primary-faint); }
.merchant-body .preset-grid input:focus-visible + span { outline: 3px solid rgba(115, 87, 232, .2); outline-offset: 2px; }
.merchant-body .preset-grid input:checked + span { color: var(--primary-strong); border-color: #ac9af1; background: var(--primary-soft); }
.merchant-body .preset-grid input:checked + span::after { border-color: var(--primary); background: var(--primary); content: "✓"; }
.merchant-body .selection-count { flex: none; border-radius: 999px; padding: 5px 9px; color: var(--primary-strong); background: var(--primary-soft); font-size: .64rem; font-weight: 760; }
.merchant-body .settings-advanced { padding: 0; overflow: hidden; }
.merchant-body .settings-advanced summary {
  display: flex;
  min-height: 68px;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
}
.merchant-body .settings-advanced summary::-webkit-details-marker { display: none; }
.merchant-body .settings-advanced summary > span:first-child { display: grid; gap: 3px; }
.merchant-body .settings-advanced summary strong { font-size: .78rem; }
.merchant-body .settings-advanced summary small { color: var(--muted); font-size: .66rem; }
.merchant-body .settings-advanced summary > span:last-child { transition: transform var(--motion); }
.merchant-body .settings-advanced[open] summary > span:last-child { transform: rotate(180deg); }
.merchant-body .settings-advanced-body { border-top: 1px solid var(--line); padding: 18px 20px 20px; }
.merchant-body .settings-advanced-body .field { max-width: 420px; }
.merchant-body .accent-control { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.merchant-body .accent-control > input[type="color"] { width: 52px; height: 44px; flex: 0 0 52px; }
.merchant-body .accent-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.merchant-body .accent-swatch { width: 31px; height: 31px; border: 3px solid #fff; border-radius: 50%; padding: 0; box-shadow: 0 0 0 1px var(--line-strong); transition: box-shadow var(--motion), opacity var(--motion); }
.merchant-body .accent-swatch:hover { opacity: .78; }
.merchant-body .accent-swatch.active { box-shadow: 0 0 0 2px var(--primary); }
.merchant-body .accent-swatch.violet { background: #7357e8; }
.merchant-body .accent-swatch.indigo { background: #4f46e5; }
.merchant-body .accent-swatch.blue { background: #2563eb; }
.merchant-body .accent-swatch.emerald { background: #059669; }
.merchant-body .accent-swatch.rose { background: #e11d48; }
.merchant-body .accent-swatch.charcoal { background: #25262d; }
.merchant-body .settings-save-bar {
  bottom: 14px;
  border-radius: 14px;
  border-color: var(--line);
  padding: 11px 12px 11px 16px;
  box-shadow: 0 16px 42px rgba(22, 18, 39, .13);
}
.merchant-body .settings-save-bar.dirty { border-color: #bfaef7; }
.merchant-body .team-row { min-height: 64px; }

@media (max-width: 1100px) {
  .merchant-body .onboarding-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merchant-body .settings-fields.three-columns { grid-template-columns: 1fr 1fr; }
  .merchant-body .settings-fields.three-columns .field:first-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .merchant-body .admin-sidebar { width: min(88vw, 304px); }
  .merchant-body .admin-shell.sidebar-collapsed .sidebar-support { width: auto; min-height: 0; grid-template-columns: 38px minmax(0, 1fr); justify-items: initial; margin-inline: 0; padding: 10px; }
  .merchant-body .admin-shell.sidebar-collapsed .sidebar-support-copy { display: grid; }
  .merchant-body .topbar { min-height: 80px; padding: 13px 15px; }
  .merchant-body .page-content { padding: 18px 14px 52px; }
  .merchant-body .page-subtitle { display: none; }
  .merchant-body .settings-tabs { position: sticky; z-index: 20; top: 80px; }
  .merchant-body .auth-panel { display: block; overflow-y: auto; background: #fbfbfd; }
  .merchant-body .auth-visual { display: none; }
  .merchant-body .auth-content {
    min-height: 100dvh;
    justify-content: flex-start;
    padding: 28px clamp(20px, 6vw, 54px) 34px;
    background:
      radial-gradient(circle at 100% 0, rgba(115, 87, 232, .1), transparent 24rem),
      #fbfbfd;
  }
  .merchant-body .auth-mobile-product {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(720px, 100%);
    margin: 0 auto 54px;
  }
  .merchant-body .auth-card,
  .merchant-body .auth-panel[data-auth-mode="register"] .auth-card {
    width: min(720px, 100%);
    margin: auto;
  }
  .merchant-body .auth-panel[data-auth-mode="login"] .auth-card,
  .merchant-body .auth-panel[data-auth-mode="forgot"] .auth-card,
  .merchant-body .auth-panel[data-auth-mode="reset"] .auth-card,
  .merchant-body .auth-panel[data-auth-mode="verify"] .auth-card { width: min(460px, 100%); }
}

@media (max-width: 720px) {
  .merchant-body .panel { border-radius: 15px; padding: 17px; }
  .merchant-body .settings-tabs {
    display: flex;
    overflow-x: auto;
    padding: 6px;
    scrollbar-width: none;
    box-shadow: inset -28px 0 20px -32px rgba(21, 17, 38, .45), var(--shadow-sm);
  }
  .merchant-body .settings-tabs::-webkit-scrollbar { display: none; }
  .merchant-body .settings-tabs > button { min-width: 190px; }
  .merchant-body .settings-section { gap: 18px; padding: 17px; }
  .merchant-body .settings-fields.two-columns,
  .merchant-body .settings-fields.three-columns { grid-template-columns: 1fr; }
  .merchant-body .settings-fields .span-2,
  .merchant-body .settings-fields.three-columns .field:first-child { grid-column: auto; }
  .merchant-body .settings-section-header.with-action { display: grid; }
  .merchant-body .settings-section-header.with-action .button { width: 100%; }
  .merchant-body .onboarding-steps { grid-template-columns: 1fr; }
  .merchant-body .onboarding-strip { padding: 16px; }
  .merchant-body .onboarding-strip__header { align-items: flex-start; }
  .merchant-body .app-dialog { border-radius: 20px; }
  .merchant-body .dialog-footer { gap: 9px; }
  .merchant-body .dialog-footer > .button { flex: 1; }
  .merchant-body .auth-content { padding: 24px 18px 30px; }
  .merchant-body .auth-content::before { width: 260px; height: 260px; }
  .merchant-body .auth-mobile-product { margin-bottom: 44px; }
  .merchant-body .auth-card,
  .merchant-body .auth-panel[data-auth-mode="register"] .auth-card {
    border: 0;
    border-radius: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
  .merchant-body .auth-heading { margin-bottom: 24px; }
  .merchant-body .auth-heading h1 { font-size: clamp(1.85rem, 8vw, 2.3rem); }
  .merchant-body .registration-progress { margin-bottom: 22px; }
  .merchant-body .registration-form { gap: 20px; }
  .merchant-body .registration-section { padding-top: 18px; }
  .merchant-body .registration-section .form-grid { gap: 13px; }
  .merchant-body .auth-security-note { margin-top: 24px; }
}

@media (max-width: 620px) {
  .merchant-body .metric-card { flex-basis: calc(50% - 6px); min-height: 108px; }
  .merchant-body .catalog-toolbar { grid-template-columns: 1fr; }
  .merchant-body .catalog-toolbar .search-field,
  .merchant-body .catalog-toolbar .button { grid-column: auto; width: 100%; }
  .merchant-body .catalog-toolbar .catalog-more-actions { grid-column: auto; width: 100%; }
  .merchant-body .catalog-toolbar .button { justify-self: stretch; }
  .merchant-body .pricing-toolbar,
  .merchant-body .locations-header,
  .merchant-body .billing-status { gap: 14px; }
  .merchant-body .settings-save-bar { bottom: max(10px, env(safe-area-inset-bottom)); }
}

@media (max-width: 480px) {
  .merchant-body .topbar:not(.superadmin-topbar) { gap: 8px; }
  .merchant-body .topbar h1 { font-size: 1.12rem; }
  .merchant-body .topbar-actions { margin-top: 2px; }
  .merchant-body .location-picker-trigger { min-height: 42px; }
  .merchant-body .metric-card { flex-basis: 100%; }
  .merchant-body .preset-grid { grid-template-columns: 1fr 1fr; }
  .merchant-body .settings-section-header { display: grid; }
  .merchant-body .selection-count { justify-self: start; }
  .merchant-body .settings-save-bar { gap: 10px; }
  .merchant-body .settings-save-bar > div { display: none; }
  .merchant-body .settings-save-bar .button { width: 100%; }
  .merchant-body .dialog-footer { display: grid; grid-template-columns: 1fr 1fr; }
  .merchant-body .auth-content { padding-inline: 16px; }
  .merchant-body .auth-mobile-product { margin-bottom: 38px; }
  .merchant-body .auth-mobile-product .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .merchant-body .registration-progress li { gap: 5px; font-size: .56rem; }
  .merchant-body .registration-progress li > span { width: 23px; height: 23px; flex-basis: 23px; }
  .merchant-body .registration-progress li:not(:last-child)::after { right: 8px; left: 30px; }
  .merchant-body .footprint-options { grid-template-columns: 1fr; }
  .merchant-body .footprint-options label > span { min-height: 56px; }
  .merchant-body .registration-trial-note { align-items: start; }
  .merchant-body .auth-security-note { align-items: flex-start; text-align: left; }
}

@media (max-width: 370px) {
  .merchant-body .preset-grid { grid-template-columns: 1fr; }
}

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