:root {
  --bg-deep: #07080c;
  --bg-mid: #0e1118;
  --surface: rgba(20, 24, 32, 0.74);
  --surface-strong: rgba(17, 21, 29, 0.88);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(255, 255, 255, 0.14);
  --text: #f0f2f5;
  --muted: rgba(240, 242, 245, 0.64);
  --gold: #d4b978;
  --gold-dim: rgba(212, 185, 120, 0.22);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --shell-width: min(1220px, calc(100vw - 40px));
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button,
input {
  font: inherit;
}

.shell-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(212, 185, 120, 0.16), transparent 45%),
    radial-gradient(ellipse at 80% 18%, rgba(80, 119, 153, 0.16), transparent 42%),
    radial-gradient(ellipse at 50% 100%, rgba(120, 58, 160, 0.12), transparent 48%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 52%, #0a0c10 100%);
}

.shell-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.shell-header {
  width: var(--shell-width);
  margin: 20px auto 0;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(7, 8, 12, 0.64);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  backdrop-filter: blur(18px);
  position: sticky;
  top: 16px;
  z-index: 20;
}

.shell-brand {
  display: grid;
  gap: 4px;
}

.shell-brand__eyebrow,
.eyebrow,
.hero__stat-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.shell-brand__title {
  font-size: 1.12rem;
  font-weight: 800;
}

.shell-nav,
.shell-auth,
.stack-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.shell-nav a,
.text-link {
  color: var(--muted);
  transition: color 0.2s ease;
}

.shell-nav a:hover,
.text-link:hover {
  color: var(--text);
}

.shell-user {
  color: var(--gold);
  font-weight: 700;
}

.page-shell {
  width: var(--shell-width);
  margin: 28px auto 72px;
  display: grid;
  gap: 28px;
}

.hero,
.wallet-hero,
.detail-hero,
.success-panel,
.auth-card,
.account-panel,
.wallet-panel,
.app-list__item,
.app-rail__item,
.hero-panel {
  border: 1px solid var(--stroke);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero {
  min-height: min(78svh, 760px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: stretch;
  padding: 44px;
}

.hero__copy {
  display: grid;
  align-content: center;
  gap: 18px;
}

.hero h1,
.section-head h1,
.detail-hero h1,
.success-panel h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5.3rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero__lead,
.detail-hero p,
.success-panel p,
.auth-copy p {
  margin: 0;
  max-width: 50ch;
  color: var(--muted);
  font-size: 1.04rem;
}

.hero__cta,
.detail-hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.provider-button,
.topup-chip {
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button,
.topup-chip {
  padding: 14px 22px;
  background: linear-gradient(180deg, rgba(212, 185, 120, 0.22), rgba(212, 185, 120, 0.08));
  border-color: var(--gold-dim);
  color: var(--text);
  font-weight: 800;
}

.ghost-button,
.provider-button {
  padding: 13px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--stroke);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.provider-button:hover,
.topup-chip:hover {
  transform: translateY(-1px);
  border-color: var(--stroke-strong);
}

.provider-button.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

.hero__stats,
.denomination-rail,
.wallet-grid,
.account-grid,
.section-grid,
.section-grid--compact {
  display: grid;
  gap: 18px;
}

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

.hero__stats > div,
.denomination,
.surface-notice {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.04);
}

.hero__stats strong,
.wallet-hero h1 {
  display: block;
  margin-top: 6px;
  font-size: 1.28rem;
}

.hero__visual {
  display: grid;
  align-items: stretch;
}

.hero-panel {
  padding: 28px;
  display: grid;
  align-content: space-between;
  min-height: 100%;
  background:
    radial-gradient(ellipse at top, rgba(212, 185, 120, 0.18), transparent 54%),
    linear-gradient(180deg, rgba(12, 14, 19, 0.86), rgba(17, 21, 29, 0.92));
}

.hero-panel__header {
  color: var(--muted);
}

.hero-panel__money {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
}

.section-grid,
.section-head,
.wallet-hero,
.detail-hero,
.success-panel,
.wallet-panel,
.account-panel {
  padding: 28px;
}

.section-grid__intro h2,
.wallet-panel h2,
.account-panel h2,
.auth-card h2 {
  margin: 8px 0 0;
  font-size: clamp(1.4rem, 2vw, 2.1rem);
  letter-spacing: -0.03em;
}

.app-rail,
.app-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.app-rail__item,
.app-list__item {
  padding: 24px;
  display: grid;
  gap: 10px;
}

.app-rail__item h3,
.app-list__item h2 {
  margin: 0;
  font-size: 1.35rem;
}

.app-rail__item p,
.app-list__item p,
.app-rail__meta,
.detail-hero__hint {
  margin: 0;
  color: var(--muted);
}

.app-list__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.denomination-rail {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.denomination {
  display: grid;
  gap: 8px;
}

.auth-shell {
  min-height: calc(100svh - 180px);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: center;
}

.auth-card {
  padding: 28px;
  display: grid;
  gap: 18px;
}

.auth-form,
.inline-form {
  display: grid;
  gap: 12px;
}

.auth-form label,
.passkey-box label {
  display: grid;
  gap: 7px;
}

input {
  width: 100%;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 14px 16px;
}

.auth-divider {
  position: relative;
  text-align: center;
  color: var(--muted);
}

.auth-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stroke), transparent);
}

.auth-divider span {
  position: relative;
  padding: 0 12px;
  background: var(--surface-strong);
}

.provider-grid,
.topup-grid {
  display: grid;
  gap: 10px;
}

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

.simple-list,
.ledger-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.simple-list li,
.ledger-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.simple-list strong,
.ledger-list strong {
  color: var(--text);
}

.topup-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.topup-chip {
  width: 100%;
  display: grid;
  gap: 6px;
  text-align: left;
}

.surface-notice {
  color: var(--gold);
}

@media (max-width: 960px) {
  .shell-header,
  .page-shell {
    width: min(100vw - 24px, 1220px);
  }

  .hero,
  .auth-shell,
  .wallet-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding: 28px;
  }

  .shell-header {
    border-radius: 28px;
    display: grid;
    justify-content: stretch;
  }
}

@media (max-width: 640px) {
  .shell-header {
    margin-top: 12px;
    top: 10px;
  }

  .page-shell {
    margin-top: 18px;
  }

  .hero h1,
  .section-head h1,
  .detail-hero h1,
  .success-panel h1 {
    font-size: clamp(2.1rem, 11vw, 3.6rem);
  }

  .section-grid,
  .section-head,
  .wallet-hero,
  .detail-hero,
  .success-panel,
  .wallet-panel,
  .account-panel,
  .auth-card {
    padding: 22px;
  }
}
