:root {
  --bg: #0f0f11;
  --panel: #1c1c1f;
  --panel-alt: #121215;
  --text: #ffffff;
  --muted: #a8a8b2;
  --gold: #f3c562;
  --gold-strong: #d8a94a;
  --danger: #ff7272;
  --ok: #7de29f;
  --border: rgba(255, 255, 255, 0.08);
  --app-height: 100dvh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: var(--app-height);
  height: var(--app-height);
  font-family: Inter, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: pan-x pan-y;
}

body {
  min-height: var(--app-height);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

#app {
  width: 100%;
  min-height: var(--app-height);
  height: var(--app-height);
}

.screen {
  display: none;
  position: relative;
  min-height: var(--app-height);
  overflow: hidden;
}

.screen.active {
  display: block;
}

.screen-content {
  max-width: 460px;
  margin: 0 auto;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-right: calc(20px + env(safe-area-inset-right));
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  padding-left: calc(20px + env(safe-area-inset-left));
  min-height: var(--app-height);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen-onboarding {
  background: linear-gradient(180deg, #000 0%, #050505 44%, #b47a18 100%);
}

.overlay-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero-spacer {
  height: 26vh;
}

.plane-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.wlfi-logo {
  display: block;
  object-fit: contain;
}

.wlfi-logo-lg {
  width: 160px;
  height: 160px;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.55));
  transform: rotate(-10deg);
}

.onboarding-title {
  margin: 0 auto 22px;
  text-align: center;
  font-weight: 700;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1.15;
  max-width: 14ch;
}

.pager-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.dot.active {
  background: var(--gold);
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(243, 197, 98, 0.7);
}

.screen-create {
  background: radial-gradient(circle at 50% -30%, rgba(243, 197, 98, 0.28), transparent 42%),
    var(--bg);
}

.create-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.text-btn {
  background: transparent;
  border: 0;
  color: var(--muted);
  font: inherit;
  text-align: left;
  padding: 6px 0;
}

.logo-wrap {
  margin-top: 12px;
  display: grid;
  place-items: center;
}

.wlfi-logo-sm {
  width: min(148px, 72vw);
  height: auto;
  filter: none;
}

.create-title {
  margin: 0;
  text-align: center;
  font-size: 31px;
  font-weight: 800;
}

.create-form {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 14px 14px;
  background: #26262b;
  color: var(--text);
  font-size: 16px;
  outline: none;
}

.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(243, 197, 98, 0.15);
}

.btn {
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--gold);
  color: #151515;
  padding: 14px 18px;
}

.btn-primary:hover {
  background: var(--gold-strong);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
}

.onboarding-cta {
  display: block;
  width: min(320px, 100%);
  margin: 0 auto;
  text-align: center;
}

.btn-continue-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-continue-shine::after {
  content: "";
  position: absolute;
  top: -140%;
  left: -35%;
  width: 36%;
  height: 380%;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.12) 35%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.12) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-260%) rotate(8deg);
  animation: continue-gold-shine 2s ease-in-out infinite;
}

@keyframes continue-gold-shine {
  0%,
  50%,
  100% {
    transform: translateX(-260%) rotate(8deg);
    opacity: 0;
  }
  57% {
    opacity: 0.9;
  }
  72% {
    transform: translateX(340%) rotate(8deg);
    opacity: 0;
  }
}

.btn-continue-shine:disabled::after {
  animation-play-state: paused;
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .btn-continue-shine::after {
    animation: none;
  }
}

.status {
  min-height: 24px;
  margin: 4px 0 0;
  color: var(--muted);
}

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

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

.auth-divider {
  position: relative;
  margin-top: 2px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--border);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: var(--bg);
}

.social-auth {
  display: grid;
  gap: 10px;
}

.social-btn {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.social-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.screen-dashboard {
  background: #0f0f11;
  color: #fff;
}

.screen-dashboard .material-symbols-rounded {
  font-variation-settings: "FILL" 1, "wght" 320, "GRAD" 0, "opsz" 24;
  line-height: 1;
}

.dashboard-shell {
  position: relative;
  width: 100%;
  height: var(--app-height);
  overflow: hidden;
  background: #0f0f11;
}

.dashboard-top-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: radial-gradient(circle at 50% -20%, #e66d1c 0%, #0f0f11 62%);
  opacity: 0.86;
  pointer-events: none;
  z-index: 0;
}

.dashboard-scroll {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: calc(72px + env(safe-area-inset-top));
  padding-right: calc(20px + env(safe-area-inset-right));
  padding-bottom: calc(150px + env(safe-area-inset-bottom));
  padding-left: calc(20px + env(safe-area-inset-left));
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 42px;
  background: linear-gradient(145deg, #ef9538, #d0602b);
}

.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.user-text .label {
  margin: 0;
  color: #adb0b8;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.user-text .value {
  margin: 2px 0 0;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.dashboard-logout {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  padding: 0;
  display: grid;
  place-items: center;
}

.dashboard-logout .material-symbols-rounded {
  font-size: 20px;
}

.dashboard-balance {
  margin-top: 6px;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.balance-head {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #a3a6ae;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 8px;
}

.balance-visibility {
  font-size: 16px;
  opacity: 0.9;
}

.total-balance {
  margin: 0 0 24px;
  color: #fff;
  font-size: clamp(40px, 11vw, 54px);
  font-weight: 600;
  letter-spacing: -0.03em;
  text-align: center;
}

.balance-actions {
  width: 100%;
  display: flex;
  gap: 12px;
}

.action-btn {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 13px 14px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.action-btn-primary {
  background: #ffc857;
  color: #161616;
}

.action-btn-muted {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dashboard-tab {
  display: none;
}

.dashboard-tab.is-active {
  display: block;
}

.accounts-section h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.accounts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-radius: 16px;
  padding: 7px 2px;
  transition: background-color 0.18s ease;
}

.account-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.account-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.account-symbol {
  font-size: 21px;
}

.account-icon.type-cash {
  background: rgba(249, 115, 22, 0.15);
  color: #f59e0b;
}

.account-icon.type-crypto {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
}

.account-icon.type-earn {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.account-icon.type-loyalty {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
}

.account-name {
  color: #fff;
  font-size: 18px;
  font-weight: 400;
}

.account-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.loyalty-badge {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ffc857;
  color: #171717;
  font-size: 9px;
  font-weight: 700;
  display: none;
  place-items: center;
}

.account-row.is-loyalty .loyalty-badge {
  display: grid;
}

.account-value {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}

.dashboard-scroll-spacer {
  height: 8px;
}

.dashboard-section {
  margin-bottom: 18px;
}

.dashboard-section h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-card {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  min-height: 72px;
  color: #fff;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 6px;
  padding: 12px 14px;
  cursor: pointer;
}

.quick-card .material-symbols-rounded {
  font-size: 22px;
}

.quick-card span:last-child {
  font-size: 14px;
  font-weight: 400;
}

.quick-card:hover {
  background: rgba(255, 255, 255, 0.09);
}

.market-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.market-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.market-name {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.market-code {
  margin: 2px 0 0;
  font-size: 12px;
  color: #9ea2aa;
}

.market-price {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
}

.settings-list {
  display: grid;
  gap: 8px;
}

.settings-row {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 400;
}

.settings-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.settings-row .material-symbols-rounded {
  font-size: 21px;
}

.dashboard-hint {
  min-height: 22px;
  margin: 10px 0 2px;
  color: #9fa3ab;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-align: center;
}

.dashboard-bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: end;
  column-gap: 8px;
  padding-top: 12px;
  padding-right: calc(20px + env(safe-area-inset-right));
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  padding-left: calc(20px + env(safe-area-inset-left));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(21, 21, 23, 0.96);
  backdrop-filter: blur(10px);
}

.bottom-item {
  border: 0;
  background: transparent;
  color: #8f939c;
  display: grid;
  justify-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 400;
  cursor: pointer;
}

.bottom-item .material-symbols-rounded {
  font-size: 24px;
  font-variation-settings: "FILL" 0, "wght" 320, "GRAD" 0, "opsz" 24;
}

.bottom-item.active {
  color: #ffc857;
}

.bottom-item.active .material-symbols-rounded {
  font-variation-settings: "FILL" 1, "wght" 380, "GRAD" 0, "opsz" 24;
}

.bottom-item:active {
  transform: scale(0.98);
}

.bottom-fab-wrap {
  display: flex;
  justify-content: center;
  transform: translateY(-22px);
}

.bottom-fab {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: #ffc857;
  color: #111;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(243, 197, 98, 0.34);
  cursor: pointer;
}

.bottom-fab .material-symbols-rounded {
  color: #111;
  font-size: 31px;
  font-variation-settings: "FILL" 1, "wght" 360, "GRAD" 0, "opsz" 24;
}

@media (max-width: 360px) {
  .hero-spacer {
    height: 20vh;
  }
}
