:root {
  --bg: #090914;
  --bg-elevated: rgba(17, 17, 31, 0.86);
  --bg-soft: rgba(24, 24, 44, 0.78);
  --line: rgba(168, 154, 255, 0.18);
  --line-strong: rgba(168, 154, 255, 0.34);
  --text: #f5f7ff;
  --text-muted: #a6acd1;
  --primary: #9a7cff;
  --primary-strong: #7a5cff;
  --success: #2cd79a;
  --warning: #ffb54d;
  --danger: #ff6e87;
  --shadow: 0 24px 80px rgba(5, 8, 20, 0.45);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1240px;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 124, 255, 0.75) rgba(255, 255, 255, 0.06);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(181, 154, 255, 0.92), rgba(122, 92, 255, 0.92));
  border-radius: 999px;
  border: 2px solid rgba(9, 9, 20, 0.55);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(196, 174, 255, 0.98), rgba(138, 108, 255, 0.98));
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(122, 92, 255, 0.22), transparent 26%),
    radial-gradient(circle at top right, rgba(44, 215, 154, 0.12), transparent 22%),
    linear-gradient(180deg, #0a0b17 0%, #070811 100%);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overflow-y: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  overflow-y: visible;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 85%);
}

.container {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
}

@supports (-webkit-touch-callout: none) {
  @media (max-width: 900px) and (hover: none) and (pointer: coarse) {
    .page-shell[data-page="payment"] .container {
      padding-top: calc(env(safe-area-inset-top, 0px) + 36px);
    }
  }
}

.topbar-welcome {
  justify-content: flex-end;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-badge img {
  display: block;
  width: 38px;
  height: 38px;
}

.icon-button {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.profile-button svg {
  width: 22px;
  height: 22px;
}

.topbar-actions,
.lang-switch {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-select,
.chip,
.tab-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 10px 16px;
  transition: 180ms ease;
  cursor: pointer;
}

.chip.is-active,
.tab-button.is-active,
.lang-select:hover,
.chip:hover,
.tab-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(154, 124, 255, 0.16);
}

.lang-select {
  min-width: 78px;
  appearance: none;
  color: var(--text);
  text-align: left;
  padding-left: 14px;
  padding-right: 38px;
  background-position: right 12px center;
}

.lang-select,
.select,
select {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f7ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

select option {
  color: var(--text);
  background: #111321;
}

.hero {
  padding: 56px 0 112px;
}

.hero-welcome {
  min-height: calc(100vh - 96px);
}

.hero-centered {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0 96px;
}

.hero-focus {
  width: min(100%, 900px);
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
}

.hero-focus-wide {
  width: 100%;
  gap: 30px;
}

.hero-title-line {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
}

.hero-title-logo {
  width: clamp(72px, 8vw, 122px);
  height: clamp(72px, 8vw, 122px);
  flex: 0 0 auto;
}

.hero-title-text {
  font-size: clamp(46px, 6.25vw, 118px);
  line-height: 0.94;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.hero-subtitle {
  margin-top: 0;
}

.hero-logo {
  width: 96px;
  height: 96px;
}

.hero-actions {
  justify-content: center;
}

.hero-grid,
.two-column {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: stretch;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 28px;
  background: linear-gradient(180deg, rgba(19, 20, 38, 0.92), rgba(10, 11, 22, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel.soft {
  background: linear-gradient(180deg, rgba(24, 26, 46, 0.88), rgba(14, 16, 29, 0.88));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

h2 {
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 18px;
  line-height: 1.2;
}

.lead,
.muted {
  color: var(--text-muted);
  line-height: 1.7;
}

.lead {
  margin-top: 24px;
  max-width: 52ch;
  font-size: 18px;
}

.stack,
.metric-grid,
.card-grid,
.list-stack {
  display: grid;
  gap: 16px;
}

.cta-row,
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cta-row {
  margin-top: 28px;
}

.button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 22px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.button-primary {
  color: #0e1023;
  background: linear-gradient(135deg, #b59aff, #7a5cff);
  box-shadow: 0 18px 40px rgba(122, 92, 255, 0.35);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.tab-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

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

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

.metric,
.table-card,
.status-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: var(--bg-soft);
}

.metric-value {
  font-size: 34px;
  font-weight: 700;
  margin-top: 12px;
  letter-spacing: -0.04em;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}

.table th {
  color: var(--text-muted);
  font-weight: 500;
}

.input,
.select,
.textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 8px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(181, 154, 255, 0.9);
  outline-offset: 2px;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(154, 124, 255, 0.14);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.copy-box,
.accent-box {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  padding: 18px;
}

.copy-value {
  word-break: break-all;
  font-family: "Consolas", "Courier New", monospace;
}

.status-success {
  color: var(--success);
}

.status-warning {
  color: var(--warning);
}

.status-danger {
  color: var(--danger);
}

.footer-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.payment-layout {
  display: flex;
  justify-content: center;
}

.page-shell[data-page="payment"] {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: pan-x pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.page-shell[data-page="welcome"] {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.page-shell[data-page="welcome"] .hero-title-line,
.page-shell[data-page="welcome"] .hero-subtitle,
.page-shell[data-page="welcome"] .hero-title-logo {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.page-shell[data-page="welcome"] .hero-title-logo {
  pointer-events: none;
}

.payment-main-card,
.payment-side-card {
  min-height: 100%;
}

.payment-single-card {
  width: min(100%, 710px);
}

.payment-main-card {
  padding: 24px;
}

.payment-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.payment-meta-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.payment-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.payment-step {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.035);
  font-weight: 700;
  font-size: 11px;
}

.payment-step.is-active,
.payment-step.is-complete {
  color: #0e1023;
  background: linear-gradient(135deg, #b59aff, #7a5cff);
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(122, 92, 255, 0.25);
}

.payment-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

[data-payment-network-picker],
[data-payment-asset-picker] {
  position: relative;
}

.payment-select-trigger {
  position: relative;
  width: 100%;
  min-height: 58px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 14px 48px 14px 16px;
  text-align: left;
  cursor: pointer;
}

.payment-select-trigger::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f5f7ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

.payment-select-value,
.payment-select-option {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-select-placeholder {
  color: var(--text-muted);
}

.payment-select-menu {
  position: absolute;
  z-index: 30;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(14, 16, 29, 0.98);
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
}

.payment-select-menu[hidden] {
  display: none !important;
}

.payment-select-option {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.payment-select-option:hover,
.payment-select-option.is-active {
  border-color: var(--line-strong);
  background: rgba(154, 124, 255, 0.14);
}

.payment-select-empty {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-muted);
}

.payment-option-logo {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  object-fit: contain;
  flex: 0 0 auto;
}

.page-shell[data-page="payment"] img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.payment-summary-box {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.payment-send-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.payment-send-summary-grid .payment-summary-line {
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.payment-summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.payment-amount-emphasis,
.payment-timer-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.payment-amount-stack {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  text-align: right;
}

.payment-amount-asset {
  font-size: 0.8em;
  line-height: 1.05;
}

.payment-amount-asset-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.payment-amount-asset:empty {
  display: none;
}

.payment-amount-logo {
  width: 1em;
  height: 1em;
  object-fit: contain;
  flex: 0 0 auto;
}

.payment-amount-logo[hidden] {
  display: none !important;
}

.payment-copy-row {
  display: grid;
  gap: 10px;
}

.payment-copy-value {
  width: 100%;
  font-size: 12.5px;
  line-height: 1.45;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

.payment-address-edge {
  color: #b59aff;
}

.payment-send-amount {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

[data-payment-send-amount] {
  font-size: 25px;
  line-height: 1.2;
  font-weight: 700;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

.payment-inline-button {
  min-width: 96px;
  padding: 8px 12px;
  font-size: 13px;
  margin-top: 2px;
  justify-self: start;
}

.payment-copy-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.payment-copy-hint {
  font-size: 11px;
  line-height: 1.3;
  color: var(--text-muted);
}

.payment-qr-shell {
  display: flex;
  justify-content: center;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.payment-send-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.payment-send-meta {
  display: grid;
  gap: 16px;
}

.payment-qr-frame {
  position: relative;
  width: min(100%, 340px);
  aspect-ratio: 1;
  border-radius: 32px;
  background: #ffffff;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.payment-qr-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.payment-qr-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  border-radius: 20px;
  background: #ffffff;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.payment-qr-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-confirmations {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  padding: 16px 18px;
}

.payment-processing-state {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  padding: 12px 0 4px;
}

.payment-processing-indicator {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(100%, 560px);
  text-align: center;
  padding: 20px 24px;
}

.payment-processing-indicator--success {
  gap: 18px;
}

.payment-processing-spinner {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 4px solid rgba(154, 124, 255, 0.16);
  border-top-color: var(--primary);
  border-right-color: var(--success);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 14px 34px rgba(5, 8, 20, 0.26);
  animation: payment-spinner-rotate 0.9s linear infinite;
}

.payment-processing-copy {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.payment-processing-title {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.payment-processing-title--success {
  color: var(--success);
}

.payment-processing-text {
  margin: 0;
  max-width: 420px;
  line-height: 1.5;
}

.payment-paid-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2), transparent 45%),
    linear-gradient(180deg, rgba(44, 215, 154, 0.26), rgba(44, 215, 154, 0.12));
  border: 1px solid rgba(44, 215, 154, 0.4);
  color: var(--success);
  font-size: 42px;
  font-weight: 800;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 18px 40px rgba(12, 120, 84, 0.22);
}

@keyframes payment-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.payment-status-strip {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payment-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 10px 14px;
  border-radius: 999px;
}

.payment-status-pill .muted {
  line-height: 1.2;
}

.payment-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.payment-status-panel {
  display: grid;
  gap: 14px;
}

.payment-section-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.payment-section-footer--select {
  display: grid;
  align-items: start;
  justify-content: stretch;
  gap: 8px;
  margin-top: 0;
}

.payment-section-actions {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.payment-invoice-id-note {
  text-align: right;
}

.payment-external-meta {
  width: min(calc(100% - 32px), var(--max-width));
  margin: -24px auto 32px;
  display: flex;
  justify-content: center;
  text-align: center;
}

.payment-invoice-id-note--external {
  margin-top: 0;
  max-width: min(100%, 710px);
  width: fit-content;
  margin-inline: auto;
  word-break: break-all;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  text-align: center;
}

.payment-invoice-id-button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 160ms ease, transform 160ms ease;
}

.payment-invoice-id-button:hover {
  color: var(--text);
}

.payment-invoice-id-button:active {
  transform: translateY(1px);
}

.payment-invoice-id-button:focus-visible {
  outline: 2px solid rgba(181, 154, 255, 0.9);
  outline-offset: 6px;
  border-radius: 10px;
}

.payment-toast-stack {
  position: fixed;
  top: auto;
  right: 18px;
  bottom: 18px;
  z-index: 220;
  display: grid;
  gap: 8px;
  pointer-events: none;
  justify-items: end;
}

.payment-toast {
  min-width: 0;
  max-width: min(300px, calc(100vw - 32px));
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(168, 154, 255, 0.18);
  background: rgba(17, 20, 36, 0.94);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 14px 34px rgba(4, 6, 14, 0.34);
  opacity: 0;
  transform: translateY(8px);
  animation: payment-toast-in 180ms ease forwards;
}

.payment-toast--danger {
  border-color: rgba(255, 110, 135, 0.34);
  color: #ffd8e0;
}

.payment-toast--success {
  border-color: rgba(110, 241, 197, 0.28);
}

.payment-toast.is-leaving {
  animation: payment-toast-out 180ms ease forwards;
}

@keyframes payment-toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes payment-toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

.withdraw-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.withdraw-main-card,
.withdraw-side-card {
  min-height: 100%;
}

.withdraw-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.withdraw-summary-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(168, 154, 255, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

.withdraw-summary-card strong {
  font-size: 18px;
  line-height: 1.3;
}

.withdraw-form-shell {
  gap: 18px;
}

.withdraw-form-section {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(168, 154, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.withdraw-section-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
}

.withdraw-footer {
  margin-top: 4px;
}

.withdraw-status-card {
  display: grid;
  gap: 10px;
}

.withdraw-status-card .status-box {
  min-height: 120px;
}

.withdraw-queue-card {
  display: grid;
  gap: 16px;
}

.withdraw-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.withdraw-queue-refresh {
  padding-inline: 18px;
}

.withdraw-requests {
  display: grid;
  gap: 12px;
  word-break: break-word;
}

.withdraw-requests .accent-box {
  margin-bottom: 0 !important;
}

.workspace-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 12px;
  min-height: calc(100vh - 120px);
  padding-bottom: 32px;
  align-items: start;
}

.workspace-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;
  max-height: calc(100vh - 48px);
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

.workspace-content {
  min-width: 0;
  max-height: none;
  overflow: visible;
  padding-right: 8px;
}

.workspace-section {
  scroll-margin-top: 24px;
}

.api-docs-main {
  padding-bottom: 56px;
}

.api-docs-layout {
  display: grid;
  gap: 24px;
}

.api-docs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.api-docs-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.7;
}

.api-docs-list li + li {
  margin-top: 10px;
}

.swagger-panel {
  overflow: hidden;
}

#swagger-ui {
  margin-top: 12px;
}

#swagger-ui .swagger-ui {
  color: var(--text);
}

#swagger-ui .topbar {
  display: none;
}

#swagger-ui .info .title,
#swagger-ui .opblock-tag,
#swagger-ui .opblock-summary-path,
#swagger-ui .response-col_status {
  color: #11131f;
}

#swagger-ui .scheme-container,
#swagger-ui .information-container,
#swagger-ui .opblock,
#swagger-ui .responses-inner,
#swagger-ui .response,
#swagger-ui .model-box,
#swagger-ui .microlight,
#swagger-ui .highlight-code {
  border-radius: 18px;
}

#swagger-ui .scheme-container,
#swagger-ui .opblock,
#swagger-ui .model-box,
#swagger-ui .responses-inner {
  box-shadow: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 14, 0.72);
  backdrop-filter: blur(14px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(680px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-close-button {
  flex: 0 0 auto;
}

.modal-close-button svg {
  width: 20px;
  height: 20px;
}

.modal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.modal-metric-value {
  font-size: clamp(24px, 3vw, 32px);
}

.pricing-plan-card {
  position: relative;
  display: grid;
  gap: 22px;
  text-align: center;
  padding: 6px;
}

.pricing-plan-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-xl) - 2px);
  background: radial-gradient(circle at top, rgba(154, 124, 255, 0.22), transparent 48%);
  pointer-events: none;
}

.pricing-plan-head {
  justify-items: center;
  gap: 10px;
}

.pricing-plan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(181, 154, 255, 0.34);
  background: rgba(154, 124, 255, 0.16);
  color: #efe9ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.pricing-plan-title-group {
  display: grid;
  gap: 8px;
  justify-items: center;
}

.pricing-plan-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.pricing-plan-subtitle {
  max-width: 42ch;
  color: var(--text-muted);
  line-height: 1.65;
}

.pricing-plan-price {
  font-size: clamp(34px, 5vw, 54px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.05em;
  text-shadow: 0 0 24px rgba(154, 124, 255, 0.18);
}

.pricing-plan-price-note {
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.pricing-plan-features {
  display: grid;
  gap: 12px;
}

.pricing-plan-feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(154, 124, 255, 0.05));
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.pricing-plan-check {
  color: var(--success);
  font-size: 18px;
  line-height: 1;
}

.pricing-plan-meta {
  display: grid;
  gap: 10px;
  text-align: left;
}

.pricing-plan-note {
  color: var(--text-muted);
  line-height: 1.7;
}

.pricing-plan-link {
  text-align: left;
}

.pricing-plan-action {
  display: flex;
  justify-content: center;
}

.pricing-plan-pay-button {
  min-width: 220px;
  padding-inline: 34px;
  min-height: 54px;
  font-size: 15px;
  letter-spacing: 0.16em;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .hero-grid,
  .two-column,
  .metric-grid,
  .card-grid,
  .field-grid,
  .workspace-shell,
  .api-docs-grid,
  .modal-summary,
  .payment-layout,
  .payment-select-grid {
    grid-template-columns: 1fr;
  }

  .workspace-sidebar,
  .workspace-content {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .hero-title-line {
    flex-direction: column;
    gap: 16px;
  }

  .hero-title-text {
    white-space: normal;
    text-align: center;
  }

  .payment-header {
    grid-template-columns: 1fr;
  }

  .payment-copy-row,
  .payment-status-head,
  .payment-section-footer {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .payment-inline-button {
    width: 100%;
    min-width: 0;
  }

  .payment-processing-indicator {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(calc(100% - 20px), var(--max-width));
  }

  .panel {
    padding: 22px;
    border-radius: 22px;
  }

  .topbar {
    padding: 18px 0;
  }

  .button,
  .lang-select,
  .chip,
  .tab-button {
    width: 100%;
    justify-content: center;
  }

  .cta-row,
  .row,
  .topbar-actions,
  .lang-switch {
    width: 100%;
  }

  .page-shell[data-page="payment"] .topbar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .page-shell[data-page="payment"] .brand [data-i18n="payment.title"] {
    display: none;
  }

  .page-shell[data-page="payment"] .topbar .row,
  .page-shell[data-page="payment"] .topbar .lang-switch {
    width: auto;
    flex-wrap: nowrap;
  }

  .page-shell[data-page="payment"] .topbar .lang-select,
  .page-shell[data-page="payment"] .topbar .chip {
    width: auto;
    min-width: 0;
    padding: 8px 12px;
    font-size: 12px;
  }

  .page-shell[data-page="payment"] .topbar .lang-select {
    min-width: 64px;
    padding-left: 12px;
    padding-right: 34px;
    background-position: right 10px center;
  }

  .page-shell[data-page="payment"] .payment-meta-strip {
    width: 100%;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .page-shell[data-page="payment"] .payment-meta-strip .chip {
    width: auto;
    min-width: 0;
    margin-right: auto;
    white-space: nowrap;
  }

  .page-shell[data-page="payment"] .payment-stepper {
    margin-left: auto;
    flex: 0 0 auto;
  }

  .page-shell[data-page="payment"] .payment-send-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-shell[data-page="payment"] .payment-summary-line {
    gap: 4px;
  }

  .page-shell[data-page="welcome"] .topbar-welcome {
    justify-content: flex-end;
  }

  .page-shell[data-page="welcome"] .topbar-welcome .topbar-actions,
  .page-shell[data-page="welcome"] .topbar-welcome .lang-switch {
    width: auto;
    flex-wrap: nowrap;
  }

  .page-shell[data-page="welcome"] .topbar-welcome .lang-select {
    width: auto;
    min-width: 64px;
    padding: 8px 12px;
    padding-right: 34px;
    font-size: 12px;
    background-position: right 10px center;
  }

  .page-shell[data-page="welcome"] .hero-title-line {
    gap: 12px;
  }

  .page-shell[data-page="welcome"] .hero-title-text {
    font-size: clamp(34px, 11vw, 54px);
    line-height: 0.98;
    letter-spacing: -0.04em;
    text-wrap: balance;
  }

  .page-shell[data-page="welcome"] .hero-actions {
    align-items: center;
  }

  .page-shell[data-page="welcome"] .hero-actions .button {
    width: 80%;
    max-width: 280px;
  }


  .page-shell[data-page="payment"] .payment-status-strip {
    align-items: flex-start;
  }

  .page-shell[data-page="payment"] .payment-header h2 {
    font-size: 22px;
  }

  .page-shell[data-page="payment"] .payment-amount-stack {
    display: inline-grid;
    justify-items: end;
    gap: 2px;
  }

  .page-shell[data-page="payment"] .payment-amount-asset {
    width: 100%;
    text-align: right;
  }

  .page-shell[data-page="payment"] .payment-send-summary-grid .payment-summary-line {
    min-height: 78px;
  }

  .page-shell[data-page="payment"] .payment-processing-title {
    font-size: 22px;
  }

  .page-shell[data-page="payment"] .payment-processing-spinner,
  .page-shell[data-page="payment"] .payment-paid-check {
    width: 72px;
    height: 72px;
  }

  .page-shell[data-page="payment"] .payment-section-actions,
  .page-shell[data-page="payment"] .payment-invoice-id-note {
    width: 100%;
  }

  .page-shell[data-page="payment"] .payment-section-actions {
    justify-items: stretch;
  }

  .page-shell[data-page="payment"] .payment-toast-stack {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    justify-items: stretch;
  }

  .page-shell[data-page="payment"] .payment-toast {
    max-width: none;
  }

  .payment-external-meta {
    width: min(calc(100% - 20px), var(--max-width));
    margin-top: -16px;
    margin-bottom: 24px;
  }

  .withdraw-layout,
  .withdraw-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .withdraw-queue-head {
    align-items: stretch;
    flex-direction: column;
  }
}

.profile-menu {
  position: relative;
}

.profile-menu > summary {
  list-style: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: 180ms ease;
}

.profile-menu > summary::-webkit-details-marker {
  display: none;
}

.profile-menu > summary:hover,
.profile-menu[open] > summary {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(154, 124, 255, 0.16);
}

.profile-menu > summary svg {
  width: 22px;
  height: 22px;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 40;
  width: min(288px, calc(100vw - 32px));
  padding: 14px;
  gap: 4px;
}

.profile-dropdown-head {
  padding: 6px 12px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.profile-dropdown-head h3 {
  margin-top: 4px;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: 160ms ease;
}

.profile-menu-item:hover {
  color: var(--text);
  background: rgba(154, 124, 255, 0.16);
}

button.profile-menu-item {
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

@media (max-width: 680px) {
  .profile-menu {
    width: auto;
  }
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.grid-two .stack > span {
  color: var(--text-muted);
  font-size: 14px;
}

.admin-login-modal {
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top, rgba(122, 92, 255, 0.2), transparent 55%),
    rgba(5, 6, 14, 0.9);
  backdrop-filter: blur(12px);
}

body:has([data-admin-secured]:not([style*="none"])) .admin-login-modal {
  display: none;
}

.admin-login-card {
  width: min(440px, 100%);
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.support-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
}

.support-widget__fab {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 45%),
    linear-gradient(180deg, rgba(28, 31, 53, 0.98), rgba(13, 15, 28, 0.98));
  color: #fff;
  box-shadow:
    0 18px 48px rgba(7, 11, 26, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.support-widget__fab:hover {
  transform: translateY(-1px);
  border-color: rgba(181, 154, 255, 0.62);
  box-shadow:
    0 22px 52px rgba(7, 11, 26, 0.5),
    0 0 0 4px rgba(154, 124, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.support-widget__fab.is-open {
  border-color: rgba(95, 214, 255, 0.42);
}

.support-widget__fab::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #5fd6ff, #2cd79a);
  box-shadow: 0 0 0 4px rgba(8, 10, 20, 0.72);
}

.support-widget__fab-icon {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(154, 124, 255, 0.9), rgba(95, 214, 255, 0.84));
  box-shadow:
    0 14px 28px rgba(95, 214, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.support-widget__fab-icon svg {
  width: 23px;
  height: 23px;
}

.support-widget__panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(380px, calc(100vw - 24px));
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(18, 20, 34, 0.96), rgba(8, 10, 20, 0.97));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.support-widget__header,
.support-widget__actions,
.support-widget__footer,
.support-widget__message-head {
  display: flex;
  align-items: center;
}

.support-widget__header,
.support-widget__footer {
  justify-content: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.support-widget__footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.support-widget__header-button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.support-widget__title-block {
  display: grid;
  gap: 0;
}

.support-widget__message-head span,
.support-widget__attachment span,
.support-widget__empty {
  color: var(--text-muted);
}

.support-widget__body,
.support-widget__messages,
.support-widget__composer,
.support-widget__message {
  display: grid;
  gap: 12px;
}

.support-widget__body {
  padding: 18px;
}

.support-widget__messages {
  max-height: 360px;
  overflow: auto;
}

.support-widget__composer {
  gap: 14px;
}

.support-widget__notice {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  line-height: 1.5;
}

.support-widget__notice.is-danger {
  border-color: rgba(255, 110, 135, 0.34);
  color: #ffd7de;
  background: rgba(255, 110, 135, 0.08);
}

.support-widget__notice.is-info {
  border-color: rgba(95, 214, 255, 0.24);
  color: #d8f6ff;
  background: rgba(95, 214, 255, 0.08);
}

.support-widget__message {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.support-widget__message.is-admin {
  border-color: rgba(95, 214, 255, 0.18);
}

.support-widget__message-head {
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.support-widget__message-body {
  white-space: pre-wrap;
  line-height: 1.55;
}

.support-widget__attachment {
  display: grid;
  gap: 8px;
}

.support-widget__attachment img {
  width: min(100%, 220px);
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.support-widget__composer[hidden] {
  display: none;
}

.support-widget__textarea {
  width: 100%;
  min-height: 88px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  resize: vertical;
}

.support-widget__actions {
  justify-content: space-between;
  gap: 12px;
}

.support-widget__attach {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}
.support-widget__attach svg {
  width: 20px;
  height: 20px;
}


.support-widget__attach input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.support-widget__send {
  margin-left: auto;
}

.support-widget__file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.support-widget__file-name {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.support-widget__file-clear {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
}

.support-widget__send,
.support-widget__start,
.support-widget__finish {
  min-width: 0;
}

.support-widget__send:disabled,
.support-widget__start:disabled,
.support-widget__finish:disabled {
  opacity: 0.6;
  cursor: wait;
}

@media (max-width: 680px) {
  .grid-two {
    grid-template-columns: 1fr;
  }

  .support-widget {
    right: 12px;
    bottom: 12px;
  }

  .support-widget__panel {
    width: min(360px, calc(100vw - 12px));
  }
}

.api-docs-content {
  display: grid;
  gap: 18px;
  align-content: start;
}

.page-shell[data-page="api-docs"] .workspace-section.panel,
.page-shell[data-page="api-docs"] .api-docs-operation-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(180deg, rgba(14, 16, 28, 0.98), rgba(9, 11, 20, 0.98));
  contain: paint;
}

.page-shell[data-page="api-docs"] .workspace-shell {
  grid-template-columns: minmax(0, 212px) minmax(0, 1fr);
  gap: 12px;
}

.page-shell[data-page="api-docs"] .workspace-sidebar {
  max-height: calc(100vh - 88px);
}

.api-docs-sidebar {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
  max-height: calc(100vh - 48px);
  overflow: hidden;
}

.api-docs-page-title {
  font-size: clamp(20px, 2.9vw, 40px);
  line-height: 1.05;
  margin: 0;
}

.api-docs-page-lead {
  max-width: 78ch;
}

.page-shell[data-page="api-docs"] .api-docs-hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px;
}

.page-shell[data-page="api-docs"] .api-docs-hero-box--base-url {
  grid-column: 1 / -1;
}

.page-shell[data-page="api-docs"] .api-docs-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.page-shell[data-page="api-docs"] .api-docs-openapi-button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 14px;
}

.page-shell[data-page="api-docs"] .api-docs-openapi-button.is-copied {
  border-color: rgba(44, 215, 154, 0.32);
  background: rgba(44, 215, 154, 0.12);
  color: #8ff2b8;
}

.page-shell[data-page="api-docs"] .api-docs-credential-section {
  gap: 12px;
}

.page-shell[data-page="api-docs"] .api-docs-credential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.page-shell[data-page="api-docs"] .api-docs-credential-card {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.page-shell[data-page="api-docs"] .api-docs-payout-guide-section {
  gap: 12px;
}

.page-shell[data-page="api-docs"] .api-docs-payout-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.page-shell[data-page="api-docs"] .api-docs-payout-guide-card {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.page-shell[data-page="api-docs"] .api-docs-credential-value {
  display: block;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  word-break: break-word;
  color: var(--text);
}

.api-docs-hero-box {
  min-width: 0;
}

.api-docs-hero-box--wide .copy-value {
  word-break: break-all;
}

.page-shell[data-page="api-docs"] .topbar .topbar-actions,
.page-shell[data-page="api-docs"] .topbar .lang-switch {
  width: auto;
  flex-wrap: nowrap;
}

.page-shell[data-page="api-docs"] .topbar .lang-select {
  width: auto;
  min-width: 64px;
  padding: 8px 12px;
  padding-right: 34px;
  font-size: 12px;
  background-position: right 10px center;
}

.page-shell[data-page="api-docs"] .topbar .profile-button {
  width: 44px;
  height: 44px;
}

.api-docs-summary,
.api-docs-sections {
  display: grid;
  gap: 14px;
}

.api-docs-auth-card,
.api-docs-header-card,
.api-docs-param-card,
.api-docs-field-card {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.api-docs-auth-note {
  color: var(--text);
  line-height: 1.6;
}

.api-docs-param-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.api-docs-field-list {
  display: grid;
  gap: 8px;
}

.api-docs-param-head,
.api-docs-field-head,
.api-docs-response-head,
.api-docs-code-head,
.api-docs-operation-summary,
.api-docs-operation-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.api-docs-code-head,
.api-docs-operation-summary {
  align-items: flex-start;
}

.api-docs-code-shell,
.api-docs-response-card {
  display: grid;
  gap: 8px;
}

.api-docs-operation-card {
  overflow: hidden;
  padding: 14px 16px;
}

.api-docs-operation-summary {
  list-style: none;
  cursor: pointer;
}

.api-docs-operation-summary::-webkit-details-marker {
  display: none;
}

.api-docs-operation-main,
.api-docs-operation-body,
.api-docs-operation-actions {
  min-width: 0;
}

.api-docs-operation-main {
  display: grid;
  gap: 4px;
}

.api-docs-operation-body {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.api-docs-operation-body > .stack,
.api-docs-response-card > .stack,
.api-docs-code-shell > .stack {
  gap: 8px;
}

.api-docs-operation-body h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

.api-docs-operation-body .muted {
  line-height: 1.45;
}

.api-docs-operation-body .copy-box {
  padding: 12px 14px;
  background: rgba(17, 19, 33, 0.96);
  contain: paint;
}

.page-shell[data-page="api-docs"] .api-docs-copy-button {
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  white-space: nowrap;
  flex: 0 0 auto;
  align-self: flex-start;
  margin-left: auto;
  line-height: 0;
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.page-shell[data-page="api-docs"] .api-docs-copy-button__icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.page-shell[data-page="api-docs"] .api-docs-copy-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: block !important;
}

.page-shell[data-page="api-docs"] .api-docs-copy-button:hover {
  border-color: rgba(168, 154, 255, 0.3);
  background: rgba(154, 124, 255, 0.12);
}

.page-shell[data-page="api-docs"] .api-docs-copy-button:active {
  transform: translateY(1px) scale(0.96);
}

.api-docs-copy-button.is-copied {
  border-color: rgba(44, 215, 154, 0.32);
  background: rgba(44, 215, 154, 0.12);
  color: #8ff2b8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 0 4px rgba(44, 215, 154, 0.12);
}

.api-docs-response-card {
  padding-top: 2px;
}

.api-docs-operation-title-row {
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
}

.api-docs-operation-path {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
  word-break: break-all;
}

.api-docs-operation-name {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.api-docs-field-path {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  word-break: break-word;
}

.method-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  background: rgba(154, 124, 255, 0.16);
  color: var(--primary);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

.code-block {
  margin: 0;
  padding: 11px 13px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(11, 13, 24, 0.98);
  overflow-x: auto;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text);
  contain: paint;
}

.code-block code {
  font-family: inherit;
  white-space: pre;
}

.api-docs-burger {
  display: none !important;
}

.api-docs-sidebar-overlay {
  display: none;
}

.api-docs-burger svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.page-shell[data-page="api-docs"] .api-docs-sidebar .tab-button {
  width: 100%;
  display: block;
  padding: 6px 9px;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-shell[data-page="api-docs"] .api-docs-sidebar .stack {
  gap: 8px;
}

.page-shell[data-page="api-docs"] .api-docs-sidebar [data-api-docs-nav] {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.page-shell[data-page="api-docs"] .api-docs-sidebar .input {
  padding: 8px 10px;
  font-size: 11px;
}

.api-docs-sidebar .footer-note {
  margin-top: 0;
  font-size: 11px;
}

.page-shell[data-page="api-docs"] .api-docs-response-card,
.page-shell[data-page="api-docs"] .api-docs-code-shell {
  contain: paint;
}

.api-docs-list {
  padding-left: 16px;
  line-height: 1.5;
}

.api-docs-list li + li {
  margin-top: 6px;
}

.api-docs-operation-body .footer-note,
.api-docs-response-card .footer-note,
.api-docs-code-shell .footer-note {
  margin-top: 0;
  font-size: 12px;
}

@media (max-width: 980px) {
  .workspace-shell,
  .page-shell[data-page="api-docs"] .workspace-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .api-docs-hero-grid,
  .page-shell[data-page="api-docs"] .api-docs-hero-grid {
    grid-template-columns: 1fr;
  }

  .api-docs-param-list {
    grid-template-columns: 1fr;
  }

  .page-shell[data-page="api-docs"] .api-docs-credential-grid {
    grid-template-columns: 1fr;
  }

  .page-shell[data-page="api-docs"] .api-docs-payout-guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .page-shell[data-page="api-docs"] .topbar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .page-shell[data-page="api-docs"] .topbar .topbar-actions {
    width: auto;
    margin-left: auto;
  }

  .page-shell[data-page="api-docs"] .topbar .lang-switch {
    width: auto;
  }

  .page-shell[data-page="api-docs"] .topbar .lang-select {
    min-width: 64px;
  }

  .api-docs-operation-title-row {
    align-items: stretch;
  }

  .api-docs-operation-summary,
  .api-docs-code-head,
  .api-docs-response-head,
  .api-docs-param-head,
  .api-docs-field-head {
    flex-wrap: wrap;
  }
}
