:root {
  --topbar-height: 58px;
  --sidebar-width: 240px;
  --page-min-width: 940px;
  --page-max-width: 1600px;

  --color-brand: #7c3aed;
  --color-brand-strong: #6d28d9;
  --color-bg: #f5f6fa;
  --color-surface: #ffffff;
  --color-text: #1a1a2e;
  --color-muted: #6b7280;
  --color-line: #e8eaf3;
  --color-line-soft: #ede9fe;
  --color-brand-soft: #f5f3ff;

  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 14px;

  --space-2xs: 4px;
  --space-xs: 8px;
  --space-s: 12px;
  --space-m: 18px;
  --space-l: 22px;
  --space-xl: 30px;

  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.04);
  --shadow-topbar: 0 1px 6px rgba(0, 0, 0, 0.04);
}

:where(:root),
.wa-light {
  --wa-color-brand-50: var(--color-brand);
  --wa-color-brand-60: var(--color-brand-strong);
  --wa-color-brand-40: #8b5cf6;
  --wa-color-brand-95: var(--color-brand-soft);
}

.no-select {
  -webkit-user-select: none;
  user-select: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  line-height: 1.6;
}

:where(wa-button, wa-input, wa-dropdown-item) {
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

/* Prevent fallback dialog content from affecting layout before web components upgrade. */
wa-dialog:not(:defined) {
  display: none;
}

#app-totp-success-ok::part(base) {
  min-width: 84px;
}

.auth-page {
  min-width: 660px;
  min-height: 100%;
  background: var(--color-bg);
  color: var(--color-text);
}

.auth-shell {
  position: relative;
  isolation: isolate;
}

.auth-shell {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: var(--space-xl);
  overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

.auth-shell::before {
  background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--color-brand) 9%, transparent) 0, transparent 38%),
    radial-gradient(circle at 82% 78%, color-mix(in srgb, var(--wa-color-brand-40) 10%, transparent) 0, transparent 34%);
}

.auth-shell::after {
  background-image:
    linear-gradient(color-mix(in srgb, var(--color-brand) 4.5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--color-brand) 4.5%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.55;
}

body.auth-page.merchant-shell::before,
body.auth-page.merchant-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body.auth-page.merchant-shell::before {
  background:
    radial-gradient(circle at 18% 22%, color-mix(in srgb, var(--color-brand) 9%, transparent) 0, transparent 38%),
    radial-gradient(circle at 82% 78%, color-mix(in srgb, var(--wa-color-brand-40) 10%, transparent) 0, transparent 34%);
}

body.auth-page.merchant-shell::after {
  background-image:
    linear-gradient(color-mix(in srgb, var(--color-brand) 4.5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--color-brand) 4.5%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.55;
}

.auth-card {
  width: min(346px, 100%);
  border-radius: var(--radius-l);
  border: 1px solid var(--color-line-soft);
  border-top: 3px solid var(--color-brand);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  padding: 32px;
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-m);
  margin-bottom: var(--space-xl);
}

.auth-brand__logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-s);
  display: block;
  background-color: #CCC;
}

.auth-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0.2px;
  text-align: center;
  padding-top: var(--space-s);
}

.auth-form,
.auth-step {
  display: grid;
  gap: var(--space-s);
}

.auth-form wa-input[data-invalid="true"]::part(base),
.totp-setup-card wa-input[data-invalid="true"]::part(base) {
  outline-color: var(--wa-color-danger-fill-loud, #b42318);
}

.auth-step wa-input,
.auth-actions {
  width: 280px;
  justify-self: center;
}

.auth-totp {
  width: 280px;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.auth-totp__slot {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0;
  border: 1px solid #d8deec;
  border-radius: 10px;
  box-sizing: border-box;
  background: #ffffff;
  color: #2d3552;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  line-height: 1;
  caret-color: var(--color-brand);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.auth-totp__slot:focus {
  outline: none;
  border-color: #7c6fe4;
  box-shadow: 0 0 0 3px rgba(124, 111, 228, 0.18);
  transform: translateY(-1px);
}

.auth-totp.is-invalid .auth-totp__slot,
.auth-totp__slot.is-invalid {
  border-color: #d86f87;
}

.auth-totp__help {
  width: 280px;
  justify-self: center;
  margin: 2px 0 0;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 1.4;
}

.auth-links {
  width: 280px;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-muted);
}

.auth-link {
  color: var(--color-muted);
  text-decoration: none;
  border-bottom: 1px solid #FFF;
}

.auth-link:hover {
  color: var(--color-brand);
  border-bottom: 1px solid var(--color-brand);
}

.auth-actions {
  margin-top: var(--space-xs);
}

.auth-actions wa-button {
  width: 100%;
  --wa-form-control-height: 42px;
}

.auth-actions wa-button::part(base) {
  font-weight: 700;
}

.totp-setup-card {
  width: 556px;
  min-width: 556px;
  max-width: 556px;
  border-radius: 24px;
  border: 1px solid var(--color-line-soft);
  border-top: 3px solid var(--color-brand);
  background: var(--color-surface);
  box-shadow: 0 20px 64px rgba(27, 24, 42, 0.08);
  padding: 40px 44px;
  position: relative;
  z-index: 1;
}

.totp-setup {
  display: grid;
  gap: 32px;
}

.totp-setup__header {
  display: grid;
  gap: 12px;
}

.totp-setup__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

.totp-setup__description,
.totp-setup__verify-label,
.totp-setup__eyebrow,
.totp-setup__apps-label {
  margin: 0;
}

.totp-setup__description {
  color: #8a5b00;
  font-size: 13px;
  line-height: 1.6;
  background: #fff7e8;
  border: 1px solid #ffe0ac;
  border-radius: 12px;
  padding: 10px 14px;
}

.totp-setup__section {
  display: grid;
  gap: 18px;
}

.totp-setup__step-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.totp-setup__step-badge {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #f59e0b;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  flex: 0 0 auto;
}

.totp-setup__section-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 700;
}

.totp-setup__scan-grid {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding: 0 20px;
}

.totp-setup__qr-panel {
  display: grid;
  justify-items: start;
}

.totp-setup__qr,
.totp-setup__qr-image,
.totp-setup__qr-placeholder {
  width: 180px;
  min-width: 180px;
  min-height: 180px;
}

.totp-setup__qr-image {
  display: block;
  border: 2px solid #31344b;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  object-fit: contain;
}

.totp-setup__qr {
  color: #25233d;
  background-color: #ffffff;
  border: 2px solid #31344b;
  border-radius: 14px;
  padding: 12px;
}

.totp-setup__qr::part(base) {
  display: block;
}

.totp-setup__qr-placeholder {
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.6;
  border: 1px dashed #c9c2dc;
  border-radius: 14px;
  background: #faf8ff;
}

.totp-setup__scan-details {
  display: grid;
  gap: 14px;
}

.totp-setup__eyebrow,
.totp-setup__apps-label,
.totp-setup__verify-label {
  color: #55586f;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 600;
}

.totp-setup__secret-box {
  border: 1px solid #d9dff0;
  border-radius: 14px;
  background: #f7f8fc;
  padding: 18px 20px;
}

.totp-setup__secret {
  display: block;
  margin: 0;
  color: #22243a;
  font-size: 15px;
  line-height: 1.8;
  word-break: break-all;
  white-space: pre-wrap;
  font-family: Consolas, "SFMono-Regular", Monaco, monospace;
}

.totp-setup__copy-row {
  display: flex;
  align-items: center;
}

.totp-setup__copy-row wa-button::part(base) {
  padding-inline: 0;
  color: var(--color-brand);
  font-weight: 600;
}

.totp-setup__apps {
  display: grid;
  gap: 12px;
}

.totp-setup__app-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.totp-setup__app-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid #d4ddef;
  background: #f8fbff;
  color: #38455f;
  font-size: 14px;
  line-height: 1.3;
}

.totp-setup__app-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
  background-color: #FFF;
  border: 1px solid #CCC;
  border-radius: 4px;
}

.totp-setup__form {
  display: block;
}

.totp-setup__verify-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 0 20px;
}

.totp-setup__form wa-input,
.totp-setup__actions {
  width: 100%;
}

.totp-setup__verify-row .totp-setup__actions {
  width: auto;
  margin-top: 0;
}

.totp-setup__form wa-input::part(base) {
  min-height: 42px;
}

.totp-setup__form wa-input::part(input) {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.36em;
  color: #111738;
}

#totp-setup-code::part(input)::placeholder {
  color: #c4cad9;
}

.totp-setup__actions {
  margin-top: 4px;
}

.totp-setup__actions wa-button {
  width: 100%;
  --wa-form-control-height: 42px;
}

.totp-setup__verify-row .totp-setup__actions wa-button {
  width: auto;
  min-width: 190px;
  --wa-form-control-height: 42px;
}

.totp-setup__actions wa-button::part(base) {
  font-weight: 700;
}

.totp-setup__footer-link {
  display: flex;
  justify-content: flex-start;
  font-size: 13px;
}

.panel {
  min-width: var(--page-min-width);
}

body.auth-page.merchant-shell {
  min-height: 100%;
  position: relative;
  isolation: isolate;
  background: transparent;
  overflow-x: auto;
  overflow-y: auto;
}

body.auth-page.merchant-shell > :not(.shell-loading) {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-height);
  border-bottom: 1px solid var(--color-line);
  background-color: var(--color-surface);
  box-shadow: var(--shadow-topbar);
}

.topbar__inner {
  width: 100%;
  min-width: var(--page-min-width);
  max-width: var(--page-max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--space-l);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

.topbar__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
}

.topbar__logo img {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: var(--radius-s);
  background-color: #CCC;
}

.topbar__action::part(base) {
  min-width: 70px;
}

.topbar__merchant {
  min-width: 244px;
  max-width: 320px;
  height: 32px;
  padding: 0 var(--space-s);
  border: 1px solid var(--color-line-soft);
  border-radius: var(--radius-s);
  background: #fcfbff;
  color: #555555;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
}

.topbar__merchant:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.topbar__merchant-icon {
  color: var(--color-brand);
  flex: 0 0 auto;
  margin-right: var(--space-2xs);
}

.topbar__merchant-label {
  flex: 1 1 auto;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: var(--space-2xs);
}

.topbar__merchant-caret {
  color: var(--color-brand);
  flex: 0 0 auto;
}

.topbar__merchant-popover::part(body) {
  padding: 0;
}

.topbar__merchant-menu {
  width: 242px;
  padding: var(--space-2xs) 0 var(--space-xs) 0;
  display: flex;
  flex-direction: column;
}

.topbar__account {
  display: grid;
  gap: 6px;
  padding: 10px 14px 12px;
  font-size: 12px;
  color: var(--color-muted);
}

.topbar__account-divider {
  --spacing: 2px;
  width: calc(100% + 28px);
  margin-inline: -14px;
}

.topbar__account p {
  margin: 0;
}

.topbar__account-id-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8773b1;
  font-size: 12px;
  font-weight: 600;
}

.topbar__account-copy {
  margin-left: auto;
  color: inherit;
  cursor: pointer;
}

.topbar__account-id-value {
  font-size: 12px;
  color: #8773b1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__account-user {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6d6884;
  min-width: 0;
}

.topbar__account-user wa-icon {
  color: var(--color-brand);
  flex: 0 0 auto;
}

.topbar__account-user-value {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.topbar__account-email-row {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #6d6884;
  min-width: 0;
}

.topbar__account-email-row wa-icon {
  color: var(--color-brand);
  flex: 0 0 auto;
}

.topbar__account-email {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}

.topbar__account .topbar__account-role {
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.topbar__role-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border: 1px solid #d6ccf1;
  border-radius: 999px;
  background: #f5f1ff;
  color: #583f86;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.topbar__merchant-menu wa-divider {
  --spacing: 4px;
}

.topbar__merchant-item {
  appearance: none;
  border: 0;
  background: transparent;
  color: #6d6884;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  padding: 4px 12px;
  width: 100%;
  cursor: pointer;
  height: 30px;
  margin-top: 2px;
}

.topbar__merchant-item:hover,
.topbar__merchant-item:focus-visible {
  background: #f6f6f6;
  outline: none;
  border-radius: 0;
}

.topbar__merchant-item--danger {
  color: #b05572;
  margin-top: 0;
}

.topbar__merchant-item--danger:hover,
.topbar__merchant-item--danger:focus-visible {
  background: #f6f6f6;
  color: #943a58;
}

.panel-action-dialog {
  --width: 380px;
  position: fixed;
}

.panel-action-dialog--compact {
  --width: 380px;
}

.panel-action-dialog::part(header) {
  padding: 8px 22px 4px;
  border-bottom: 1px solid #eceaf5;
  background: #f7f9ff;
}

.panel-action-dialog::part(title) {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #4f4a7f;
  -webkit-user-select: none;
  user-select: none;
}

.panel-action-dialog::part(body) {
  padding: 20px 24px;
}

.panel-action-dialog::part(close-button__base):hover {
  background: #dbe1f0;
}

.panel-action {
  display: grid;
  gap: 24px;
}

.panel-action__step {
  display: grid;
  gap: 12px;
}

.panel-action__step--success {
  gap: 12px;
}

.panel-action__form {
  display: grid;
  row-gap: 16px;
}

.panel-action__field {
  display: grid;
  position: relative;
  gap: 8px;
}

.panel-action__field--full {
  grid-column: 1 / -1;
}

.panel-action__field label {
  color: #6f669f;
  font-size: 14px;
  font-weight: 600;
  padding-left: 2px;
}

.panel-action__control {
  width: 100%;
  height: 38px;
  border: 1px solid #d8deec;
  border-radius: 10px;
  padding: 0 12px;
  color: #2d3552;
  font: inherit;
  font-size: 14px;
  background: #ffffff;
}

.panel-action__control:focus {
  outline: none;
  border-color: #7c6fe4;
  box-shadow: 0 0 0 2px rgba(124, 111, 228, 0.15);
}

.panel-action__control.is-invalid {
  border-color: #d86f87;
}

.panel-action__inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.panel-action__send-code {
  width: 120px;
  white-space: nowrap;
}

#merchant-reset-2fa-code {
  text-align: center;
}

.panel-action__hint {
  margin: 0;
  color: #6f669f;
  font-size: 12px;
  line-height: 1.5;
}

.panel-action__rules {
  display: grid;
  gap: 6px;
}

.panel-action__hint--title {
  margin: 0;
}

.panel-action__rules-list {
  margin: 0;
  padding-left: 18px;
  color: #6f669f;
  font-size: 12px;
  line-height: 1.5;
}

.panel-action__rules-list strong {
  font-weight: 700;
}

.panel-action__success {
  margin: 0;
  color: #1f7a38;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
}

.panel-action__otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.panel-action__otp-slot {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: 1px solid #d8deec;
  border-radius: 12px;
  box-sizing: border-box;
  background: #ffffff;
  color: #2d3552;
  font: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  caret-color: var(--color-brand);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.panel-action__otp-slot:focus {
  outline: none;
  border-color: #7c6fe4;
  box-shadow: 0 0 0 3px rgba(124, 111, 228, 0.18);
  transform: translateY(-1px);
}

.panel-action__otp.is-invalid .panel-action__otp-slot,
.panel-action__otp-slot.is-invalid {
  border-color: #d86f87;
}

.panel-action__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.panel-action__submit {
  height: 38px;
  min-width: 128px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #ffffff;
  background-color: #0d9a74;
  border-color: #0d9a74;
}

.panel-action__submit:hover {
  background-color: #0a855f;
  border-color: #0a855f;
}

.panel-action__submit:disabled,
.panel-action__secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.panel-action__submit:disabled,
.panel-action__submit:disabled:hover {
  background-color: #0d9a74;
  border-color: #0d9a74;
}

.panel-action__secondary:disabled,
.panel-action__secondary:disabled:hover {
  background-color: #ffffff;
  border-color: #d8deec;
}

.panel-action__submit:focus-visible {
  outline: 2px solid #a391f0;
  outline-offset: 2px;
}

.panel-action__secondary {
  height: 38px;
  min-width: 88px;
  border: 1px solid #d8deec;
  border-radius: 10px;
  padding: 0 16px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #4f5575;
  background: #ffffff;
}

.panel-action__secondary:hover {
  background: #f4f6ff;
  border-color: #c7d1e8;
}

.panel-action__secondary:focus-visible {
  outline: 2px solid #a391f0;
  outline-offset: 2px;
}

.layout {
  width: 100%;
  min-width: var(--page-min-width);
  max-width: var(--page-max-width);
  margin: var(--space-m) auto;
  padding: 0 var(--space-l) var(--space-m) var(--space-l);
  display: grid;
  grid-template-columns: var(--sidebar-width) auto;
  gap: var(--space-m);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: calc(var(--topbar-height) + var(--space-m));
  z-index: 2;
  background-color: var(--color-surface);
  border: 1px solid var(--color-line-soft);
  border-top: 3px solid var(--color-brand);
  border-radius: var(--radius-l);
  padding: var(--space-xs) var(--space-s) var(--space-xl);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.wallet-menu {
  margin: calc(var(--space-xl) * -1) calc(var(--space-s) * -1) 28px;
  padding: var(--space-s) var(--space-s) var(--space-s);
  border-radius: calc(var(--radius-l) - 1px) calc(var(--radius-l) - 1px) 0 0;
  border: 0;
  border-bottom: 1px solid #c7d5e6;
}

.wallet-menu__list {
  margin-top: var(--space-xs);
}

.wallet-menu .sidebar__menu-item::part(base) {
  background: #eff4fb;
  color: #2a4362;
  border: 1px solid #ccd9ea;
}

.wallet-menu .sidebar__menu-item wa-icon {
  color: #5378a7;
}

.wallet-menu .sidebar__menu-item:hover::part(base) {
  background: #e5edf8;
  color: #1f3959;
  border-color: #b8cbe1;
}

.wallet-menu .sidebar__menu-item.is-active::part(base) {
  background: linear-gradient(135deg, #3f648c, #2f4f73);
  color: #ffffff;
  border-color: transparent;
}

.sidebar__heading {
  margin: 22px 12px var(--space-xs);
  color: #9b8bc4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.sidebar__heading__wallet {
  margin: 4px 4px 2px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #405f86;
}

.sidebar__heading__wallet wa-icon {
  margin-left: auto;
  font-size: 22px;
  color: #5378a7;
}

.sidebar__heading__wallet span {
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid #bfd0e3;
  background: #e7eff9;
  color: #315378;
  margin-left: var(--space-2xs);
}

.sidebar__menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.sidebar__menu-item {
  width: 180px;
  --wa-form-control-height: 38px;
}

.sidebar__menu-item::part(base) {
  justify-content: flex-start;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding-inline: 10px;
  background: transparent;
  color: #555555;
  font-size: 14px;
}

.sidebar__menu-item wa-icon {
  margin-right: 10px;
  color: #9b8bc4;
}

.sidebar__menu-item.is-active wa-icon {
  color: inherit;
}

.sidebar__menu-item:hover::part(base) {
  background: var(--color-brand-soft);
  color: var(--color-brand-strong);
}

.sidebar__menu-item.is-active::part(base) {
  background: linear-gradient(135deg, var(--color-brand), var(--color-brand-strong));
  color: #ffffff;
  font-weight: 600;
}

.sidebar__menu-item .sidebar__menu-icon--end {
  margin-left: auto;
  margin-right: 0;
  font-size: 12px;
  opacity: 0.8;
}

.content {
  position: relative;
  z-index: 1;
  --content-page-min-width: 0px;
  background: var(--color-surface);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  border: 1px solid #f0f1f6;
  min-height: 480px;
  padding: 26px 30px;
  overflow: visible;
}

.content__body {
  min-height: 100%;
}

.content-page {
  display: grid;
  gap: 22px;
  color: var(--color-text);
  min-width: var(--content-page-min-width);
}

.content-page__header {
  display: flex;
  align-items: baseline;
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #eceaf5;
  margin-bottom: 4px;
}

.content-page__title {
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  line-height: 1.2;
  letter-spacing: -0.01em;
  min-width: 0;
  -webkit-user-select: none;
  user-select: none;
}

.content-page__title-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9b8bc4;
  font-size: 32px;
  font-weight: 700;
}

.content-page__title-main wa-icon {
  color: #9b8bc4;
  font-size: 0.9em;
}

.content-page__title-sub {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

.content-page__title-sub::before {
  content: "|";
  color: #c2c8d9;
  line-height: 1;
}

.content-page__title-main,
.content-page__title-sub,
.content-page__title-main wa-icon {
  -webkit-user-select: none;
  user-select: none;
}

.content.is-loading .content__body {
  opacity: 0;
  visibility: hidden;
}

.content__loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-s);
  background: #ffffff;
  color: var(--color-muted);
  pointer-events: auto;
}

.content[data-loading-mask-tone="soft"] .content__loading {
  background: rgba(255, 255, 255, 0.72);
}

.content__loading-spinner {
  position: relative;
  width: 40px;
  height: 40px;
  font-size: 40px;
  --indicator-color: transparent;
  --track-color: transparent;
  --track-width: 0;
}

.content__loading-spinner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid #e9ddff;
  border-top-color: var(--color-brand);
  animation: shell-spin 0.8s linear infinite;
}

.content__loading-text {
  font-size: 13px;
  letter-spacing: 0.2px;
}

.shell-loading {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--space-s);
  background: rgba(245, 246, 250, 0.92);
  color: var(--color-muted);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 0s linear 160ms;
}

body > :not(.shell-loading) {
  opacity: 1;
}

body.auth-page.merchant-shell.is-hydrating {
  overflow: hidden;
}


body.is-hydrating .panel,
body.is-hydrating .auth-shell {
  opacity: 0;
  pointer-events: none;
}

.panel,
.auth-shell {
  opacity: 1;
  transition: opacity 160ms ease;
}

body.is-hydrating .shell-loading {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.shell-loading__spinner {
  position: relative;
  font-size: 64px;
  width: 64px;
  height: 64px;
  --indicator-color: transparent;
  --track-color: transparent;
  --track-width: 0;
}

.shell-loading__spinner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 6px solid #e9ddff;
  border-top-color: var(--color-brand);
  animation: shell-spin 0.8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .shell-loading,
  .panel,
  .auth-shell,
  .shell-loading__spinner::before,
  .content__loading-spinner::before {
    transition: none;
    animation: none;
  }
}

.shell-loading__text {
  font-size: 13px;
  letter-spacing: 0.2px;
}

@keyframes shell-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1199px) {
  .panel,
  .topbar__inner,
  .layout {
    min-width: var(--page-min-width);
  }

  .layout {
    --sidebar-width: 92px;
  }

  .sidebar {
    padding: var(--space-m) var(--space-2xs);
    overflow: visible;
  }

  .sidebar__heading,
  .sidebar__heading__wallet,
  .wallet-menu,
  .wallet-menu-list {
    display: none;
  }

  .sidebar__menu {
    align-items: center;
  }

  .sidebar__menu > li {
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
  }

  .sidebar__menu-item {
    width: 52px;
    --wa-form-control-height: 52px;
  }

  .sidebar__menu-item::part(base) {
    width: 52px;
    height: 52px;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding-inline: 0;
    font-size: 0;
  }

  .sidebar__menu-item .sidebar__menu-text {
    display: none;
  }

  .sidebar__menu-item wa-icon {
    margin-right: 0;
    font-size: 20px;
  }

  .sidebar__menu-item .sidebar__menu-icon--end {
    display: none;
  }

  body.is-collapsed-sidebar .sidebar__menu > li::after {
    content: attr(data-collapsed-label);
    position: absolute;
    left: calc(100% - 4px);
    top: 50%;
    transform: translateY(-50%);
    padding: 8px 16px;
    border-radius: 4px;
    background: #2e2a3d;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 20;
    transition: opacity 0.12s ease;
  }

  body.is-collapsed-sidebar.is-collapsed-sidebar-hover-ready .sidebar__menu > li:hover::after,
  body.is-collapsed-sidebar.is-collapsed-sidebar-focus-ready .sidebar__menu > li:focus-within::after {
    opacity: 1;
    visibility: visible;
  }

}

