:root {
  --bg: #101717;
  --bg-top: #182223;
  --panel: rgba(34, 42, 45, 0.94);
  --panel-soft: rgba(43, 52, 56, 0.92);
  --panel-deep: #1c2326;
  --line: rgba(173, 196, 183, 0.14);
  --line-strong: rgba(77, 255, 165, 0.34);
  --ink: #f3f7f2;
  --ink-soft: #c3cec8;
  --ink-muted: #93a39a;
  --accent: #2be27e;
  --accent-strong: #14c667;
  --accent-warm: #ff8f1f;
  --accent-warm-deep: #ef5a12;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 143, 31, 0.22), transparent 26%),
    radial-gradient(circle at right center, rgba(43, 226, 126, 0.14), transparent 24%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
  overflow-x: hidden;
}

button,
input,
textarea,
a {
  font: inherit;
}

code,
pre {
  font-family: "Consolas", "Courier New", monospace;
}

.background-glow {
  position: fixed;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  filter: blur(50px);
  opacity: 0.28;
  pointer-events: none;
}

.glow-left {
  top: -4rem;
  left: -5rem;
  background: rgba(255, 143, 31, 0.78);
}

.glow-right {
  right: -6rem;
  bottom: -5rem;
  background: rgba(43, 226, 126, 0.4);
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100% - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 2.75rem;
}

.single-checkout .page-shell {
  width: min(620px, calc(100% - 1.5rem));
  padding-top: 1.35rem;
}

.single-checkout .topbar,
.single-checkout .sidebar,
.single-checkout .dev-panel,
.single-checkout .deposit-card-header {
  display: none;
}

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

.single-checkout .payment-panel {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  gap: 1.15rem;
}

.panel,
.topbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.1rem;
}

.topbar-copy {
  display: grid;
  gap: 0.65rem;
  max-width: 43rem;
}

.eyebrow,
.section-label,
.trace-label {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #86f2b4;
}

.topbar h1,
.panel h2,
.note-card h3 {
  margin: 0;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  letter-spacing: -0.04em;
}

.topbar h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 0.96;
}

.hero-text,
.builder-copy,
.inline-note,
.note-card p,
.launch-copy {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.topbar-meta {
  display: grid;
  gap: 0.8rem;
  justify-items: end;
  max-width: 20rem;
}

.dashboard-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.dashboard-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.dashboard-link-admin {
  border-color: rgba(255, 143, 31, 0.28);
  background: rgba(255, 143, 31, 0.14);
}

.dashboard-link-primary {
  border-color: rgba(43, 226, 126, 0.26);
  background: rgba(43, 226, 126, 0.14);
}

.auth-logout-button {
  cursor: pointer;
  appearance: none;
}

.session-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-link:hover {
  transform: translateY(-1px);
  border-color: rgba(43, 226, 126, 0.4);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(43, 226, 126, 0.22);
  background: rgba(43, 226, 126, 0.08);
  color: #a6f7c4;
  font-size: 0.92rem;
  font-weight: 800;
}

.status-pill::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0.22rem rgba(43, 226, 126, 0.12);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 470px) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.payment-panel,
.summary-panel,
.trace-panel,
.dev-panel {
  padding: 1.35rem;
}

.payment-panel {
  display: grid;
  gap: 1rem;
}

.deposit-card-header,
.panel-header,
.actions-row,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.deposit-card-header {
  align-items: flex-start;
}

.promo-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-warm-deep) 0%, var(--accent-warm) 100%);
  color: white;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(239, 90, 18, 0.24);
}

.promo-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.field {
  display: grid;
  gap: 0.6rem;
}

.field span {
  color: var(--ink-soft);
  font-size: 0.97rem;
  font-weight: 700;
}

.selector,
.text-input,
textarea,
.preset-chip,
.ghost-action,
.primary-small,
.secondary-small,
.app-button {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-deep);
  color: var(--ink);
}

.selector {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.75rem;
  padding: 0.75rem 0.95rem;
  text-align: left;
}

.selector[disabled] {
  opacity: 1;
  cursor: default;
}

.selector-wide {
  justify-content: space-between;
}

.selector-symbol,
.method-badge,
.selector-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.selector-symbol {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f46a1f 0%, #ff8f1f 100%);
  color: white;
  font-size: 1.2rem;
  font-weight: 800;
}

.method-badge {
  min-width: 3.1rem;
  height: 2.2rem;
  padding: 0 0.7rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: white;
  font-weight: 800;
}

.selector-copy {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.selector-caret {
  width: 2rem;
  height: 2rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.guide-link,
.share-link {
  color: white;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.guide-link {
  justify-self: end;
  font-size: 0.96rem;
}

.amount-field .text-input {
  min-height: 4.1rem;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.text-input,
textarea {
  padding: 1rem 1.1rem;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.text-input::placeholder,
textarea::placeholder {
  color: #6d7a75;
}

.text-input:focus,
textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 0.22rem rgba(43, 226, 126, 0.12);
}

textarea {
  min-height: 10.5rem;
  resize: vertical;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.preset-grid .preset-chip:last-child {
  grid-column: span 1;
}

.preset-chip {
  min-height: 3.6rem;
  padding: 0.85rem 0.95rem;
  cursor: pointer;
  color: white;
  font-size: 1rem;
  font-weight: 800;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.preset-chip:hover,
.app-button:hover,
.ghost-action:hover,
.primary-action:hover,
.primary-small:hover,
.secondary-small:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.preset-chip.active {
  border-color: var(--accent);
  background: rgba(43, 226, 126, 0.08);
  box-shadow: inset 0 0 0 1px rgba(43, 226, 126, 0.18);
}

.primary-action,
.primary-small {
  border: 0;
  background: linear-gradient(180deg, #33ea87 0%, #1ed973 100%);
  color: #03150b;
  font-weight: 800;
  box-shadow: 0 18px 30px rgba(30, 217, 115, 0.22);
}

.primary-action {
  min-height: 3.65rem;
  border-radius: 18px;
  font-size: 1.12rem;
}

.ghost-action,
.secondary-small,
.app-button {
  padding: 0.9rem 1rem;
  color: var(--ink);
  font-weight: 700;
}

.primary-small,
.secondary-small {
  padding: 0.85rem 1rem;
  border-radius: 16px;
}

.secondary-small {
  color: var(--ink);
}

.rules-card {
  padding: 1rem 1rem 0.9rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(43, 226, 126, 0.1), rgba(43, 226, 126, 0.04));
  border: 1px solid rgba(43, 226, 126, 0.12);
}

.rule-list {
  margin: 0.55rem 0 0;
  padding-left: 1.25rem;
  color: var(--ink-soft);
  line-height: 1.65;
  font-weight: 700;
}

.sidebar {
  display: grid;
  gap: 1.1rem;
}

.panel h2 {
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
}

.amount-chip-readout {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  padding: 0.8rem 0.95rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(43, 226, 126, 0.12), rgba(43, 226, 126, 0.04));
  border: 1px solid rgba(43, 226, 126, 0.14);
}

.amount-chip-readout span {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9cb7a6;
}

.amount-chip-readout strong {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1;
}

.summary-grid,
.payment-meta,
.trace-grid,
.notes-grid {
  display: grid;
  gap: 0.8rem;
}

.summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.summary-card,
.trace-card,
.note-card {
  padding: 1rem;
  border-radius: 20px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.summary-card strong,
.summary-card code,
.trace-card code {
  display: block;
  word-break: break-word;
}

.summary-card strong {
  font-size: 0.98rem;
  color: white;
}

.payment-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1rem 0 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.payment-meta div {
  min-width: 0;
}

.payment-meta dt {
  margin-bottom: 0.28rem;
  color: var(--ink-muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.payment-meta dd {
  margin: 0;
  color: white;
  font-size: 0.98rem;
  font-weight: 800;
  word-break: break-word;
}

.app-launcher {
  margin-top: 1rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.actions-row {
  margin-top: 1rem;
  flex-wrap: wrap;
}

.ghost-action {
  border-radius: 16px;
  flex: 1 1 11rem;
}

.trace-panel .panel-header.compact,
.dev-panel summary {
  margin-bottom: 1rem;
}

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

.share-box {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 143, 31, 0.08), rgba(255, 143, 31, 0.03));
  border: 1px solid rgba(255, 143, 31, 0.12);
}

.share-link,
.trace-card code {
  display: block;
  word-break: break-all;
}

.form-actions {
  margin-top: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.inline-note {
  flex: 1 1 16rem;
  min-height: 3rem;
}

.inline-note code,
.builder-copy code,
.note-card code {
  color: #d6f9e5;
}

.dev-panel {
  margin-top: 1.1rem;
}

.dev-panel summary {
  cursor: pointer;
  list-style: none;
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.dev-panel summary::-webkit-details-marker {
  display: none;
}

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

.notes-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1rem;
}

.note-card h3 {
  margin-bottom: 0.45rem;
  font-size: 1.12rem;
}

.payload-preview {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.payload-preview summary {
  cursor: pointer;
  font-weight: 800;
}

.payload-preview pre {
  margin: 0.8rem 0 0;
  padding: 1rem;
  overflow: auto;
  border-radius: 20px;
  background: #0a1111;
  color: #effbf1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%) translateY(120%);
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  background: rgba(4, 10, 7, 0.94);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.34);
  transition: transform 200ms ease;
  z-index: 40;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 620ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.layout .reveal:nth-child(1) {
  animation-delay: 70ms;
}

.layout .reveal:nth-child(2) {
  animation-delay: 130ms;
}

.dev-panel.reveal {
  animation-delay: 190ms;
}

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

@media (max-width: 1040px) {
  .layout,
  .dev-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-meta {
    justify-items: start;
    max-width: none;
  }

  .dashboard-links {
    justify-content: flex-start;
  }

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 0.85rem, 100%);
    padding-top: 0.5rem;
  }

  .single-checkout .page-shell {
    width: min(100% - 0.85rem, 100%);
    padding-top: 0.35rem;
  }

  .topbar,
  .payment-panel,
  .summary-panel,
  .trace-panel,
  .dev-panel {
    padding: 1rem;
    border-radius: 24px;
  }

  .panel-header,
  .deposit-card-header,
  .actions-row,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .amount-chip-readout {
    justify-items: start;
  }

  .summary-grid,
  .payment-meta,
  .notes-grid,
  .app-grid {
    grid-template-columns: 1fr;
  }

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

  .guide-link {
    justify-self: start;
  }
}

@media (max-width: 560px) {
  .single-checkout .page-shell {
    width: min(100% - 0.7rem, 100%);
    padding-top: 0.25rem;
  }

  .single-checkout .payment-panel {
    gap: 0.9rem;
  }

  .single-checkout .field span {
    font-size: 0.92rem;
  }

  .single-checkout .selector {
    min-height: 3.45rem;
    padding: 0.75rem 0.85rem;
    gap: 0.7rem;
  }

  .single-checkout .selector-symbol {
    width: 2.15rem;
    height: 2.15rem;
    font-size: 1.05rem;
  }

  .single-checkout .method-badge {
    min-width: 2.85rem;
    height: 2rem;
    padding: 0 0.6rem;
  }

  .single-checkout .selector-copy {
    font-size: 0.96rem;
    line-height: 1.25;
  }

  .single-checkout .selector-caret {
    width: 1.9rem;
    height: 1.9rem;
  }

  .single-checkout .guide-link {
    font-size: 0.92rem;
  }

  .single-checkout .amount-field .text-input {
    min-height: 3.8rem;
    padding: 0.9rem 1rem;
    font-size: clamp(1.45rem, 8.8vw, 1.95rem);
  }

  .single-checkout .preset-grid {
    gap: 0.65rem;
  }

  .single-checkout .preset-chip {
    min-height: 3.25rem;
    padding: 0.75rem 0.8rem;
    font-size: 0.95rem;
  }

  .single-checkout .primary-action {
    min-height: 3.35rem;
    font-size: 1rem;
  }

  .single-checkout .rules-card {
    padding: 0.95rem;
    border-radius: 18px;
  }

  .single-checkout .rule-list {
    padding-left: 1.1rem;
    font-size: 0.96rem;
    line-height: 1.55;
  }

  .single-checkout .toast {
    width: min(calc(100% - 1rem), 24rem);
    border-radius: 20px;
    text-align: center;
  }
}

@media (max-width: 400px) {
  .single-checkout .preset-grid {
    grid-template-columns: 1fr;
  }

  .single-checkout .selector {
    align-items: flex-start;
  }

  .single-checkout .selector-caret {
    align-self: center;
  }
}
