:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --text: #101828;
  --muted: #667085;
  --line: #e6ebf2;
  --primary: #0f62fe;
  --primary-pressed: #0b4fd1;
  --danger: #b42318;
  --danger-surface: #fff1f0;
  --success: #067647;
  --focus: #84c5ff;
  --shadow: 0 18px 60px rgba(16, 24, 40, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card,
.dashboard {
  width: min(100%, 480px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-card {
  padding: 32px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #175cd3;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.14;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.subtle {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

fieldset.field {
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field label,
.fieldset-label {
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

.fieldset-label {
  margin-bottom: 7px;
  padding: 0;
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 14px;
}

.field input::placeholder {
  color: #98a2b3;
}

.helper {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.error,
.notice {
  display: none;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  line-height: 1.45;
}

.error {
  background: var(--danger-surface);
  color: var(--danger);
  border: 1px solid #ffd2cc;
}

.notice {
  background: #eff8ff;
  color: #175cd3;
  border: 1px solid #b2ddff;
}

.error.is-visible,
.notice.is-visible {
  display: block;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  font-weight: 800;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.primary-button:hover {
  background: var(--primary-pressed);
}

.secondary-button {
  background: #fff;
  border-color: #cfd7e3;
  color: #344054;
}

.dashboard {
  overflow: hidden;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.dashboard-body {
  padding: 22px 24px 24px;
}

.dashboard-title {
  display: grid;
  gap: 3px;
}

.dashboard-title h1 {
  margin: 0;
  font-size: 24px;
}

.dashboard-title span {
  color: var(--muted);
  font-size: 14px;
}

.logout-button {
  min-height: 40px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  padding: 0 12px;
  font-weight: 700;
}

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

.segment {
  min-height: 54px;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  background: #fff;
  color: #344054;
  font-weight: 800;
}

.segment[aria-pressed="true"] {
  border-color: var(--primary);
  background: #eff6ff;
  color: #0b4fd1;
}

.summary-strip {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.summary-strip strong {
  color: var(--text);
}

.receive-shell {
  width: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: start center;
  background: #191a1c;
}

.receive-page {
  width: min(100%, 430px);
  min-height: 100dvh;
  background: #191a1c;
  color: #f5f5f5;
  padding: max(12px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
}

.receive-topbar {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  align-items: center;
  min-height: 78px;
}

.icon-button {
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #26272a;
  color: #aeb0b4;
  padding: 0;
}

.topbar-title {
  margin: 0;
  text-align: center;
  color: #ffffff;
  font-size: 28px;
  font-weight: 850;
}

.warning {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
  padding: 22px 22px;
  border-radius: 16px;
  background: #39321c;
  color: #ffffff;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.22;
}

.warning-mark {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  color: #f1b82d;
  margin-top: 2px;
}

.asset-heading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 42px;
}

.token-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: contain;
}

.asset-name {
  color: #ffffff;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

.network-pill {
  border-radius: 6px;
  background: #25262a;
  color: #d4d4d8;
  padding: 8px 12px;
  font-size: 20px;
  font-weight: 650;
}

.qr-card {
  width: min(100%, 310px);
  margin: 42px auto 0;
  padding: 22px 16px 20px;
  border-radius: 17px;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.qr-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
}

.qr-wrap img {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-center {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 78px;
  height: 78px;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 21px;
  background: #fff;
}

.qr-center img {
  width: 25px;
  height: 33px;
  display: block;
  object-fit: contain;
}

.address-display {
  width: 100%;
  margin: 18px auto 0;
  color: #242529;
  font-size: 20px;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
}

.amount-display {
  display: none;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin: 38px 6px 0;
}

.receive-action {
  min-height: 122px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  padding: 0;
}

.receive-action span:last-child {
  white-space: nowrap;
}

.receive-action:hover {
  background: transparent;
}

.action-glyph {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #252629;
  color: #c2c3c7;
}

.deposit-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 44px;
  padding: 32px 28px;
  border-radius: 16px;
  background: #242527;
  border: 0;
}

.deposit-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #5d866f;
  color: #4dff94;
}

.deposit-title {
  margin: 0;
  color: #ffffff;
  font-size: 25px;
  font-weight: 850;
  line-height: 1.15;
}

.deposit-subtitle {
  margin: 10px 0 0;
  color: #b7b7bc;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.18;
}

.share-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  background: rgba(0, 0, 0, 0.58);
  padding: 18px;
}

.share-panel {
  width: min(100%, 430px);
  border-radius: 18px;
  background: #242527;
  color: #ffffff;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.share-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 22px;
}

.share-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #303135;
  color: #d8d9dd;
}

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

.share-options a,
.share-options button {
  min-height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid #383a3f;
  border-radius: 12px;
  background: #191a1c;
  color: #ffffff;
  text-decoration: none;
  font: inherit;
  font-weight: 750;
}

@media (min-width: 768px) {
  .receive-shell {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    background: #f4f7fb;
    padding: 32px;
  }

  .receive-page {
    width: min(100%, 760px);
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    background: #ffffff;
    color: #101828;
    border: 1px solid #e6ebf2;
    border-radius: 8px;
    box-shadow: 0 18px 60px rgba(16, 24, 40, 0.12);
    padding: 28px;
  }

  .receive-topbar {
    grid-template-columns: 48px 1fr 48px;
    min-height: 52px;
  }

  .icon-button {
    width: 44px;
    height: 44px;
    background: #ffffff;
    color: #1d2939;
    border: 1px solid #e6ebf2;
  }

  .info-button {
    justify-self: end;
    color: #d0d5dd;
  }

  .topbar-title {
    color: #101828;
    font-size: 22px;
    font-weight: 850;
  }

  .warning {
    width: min(100%, 600px);
    justify-self: center;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #fff6ed;
    color: #7a2e0e;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.4;
  }

  .warning-mark {
    width: 22px;
    height: 22px;
    color: #b54708;
    margin-top: 0;
  }

  .asset-heading {
    margin-top: 30px;
    gap: 12px;
  }

  .token-logo {
    width: 34px;
    height: 34px;
  }

  .asset-name {
    color: #101828;
    font-size: 30px;
  }

  .network-pill {
    background: #edf2f7;
    color: #475467;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 800;
  }

  .qr-card {
    width: 330px;
    margin-top: 24px;
    padding: 18px 16px 18px;
    border: 1px solid #e6ebf2;
    border-radius: 14px;
    box-shadow: none;
  }

  .qr-center {
    width: 66px;
    height: 66px;
    border-radius: 18px;
  }

  .qr-center img {
    width: 23px;
    height: 31px;
  }

  .address-display {
    color: #344054;
    font-size: 16px;
    line-height: 1.35;
  }

  .action-row {
    width: min(100%, 420px);
    justify-self: center;
    gap: 18px;
    margin: 28px 0 0;
  }

  .receive-action {
    min-height: 86px;
    color: #344054;
    font-size: 15px;
    gap: 10px;
  }

  .action-glyph {
    width: 50px;
    height: 50px;
    background: #f2f4f7;
    color: #667085;
  }

  .deposit-card {
    width: min(100%, 600px);
    justify-self: center;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    margin-top: 28px;
    padding: 18px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
  }

  .deposit-icon {
    width: 48px;
    height: 48px;
    background: #e8f5ee;
    color: #16a363;
  }

  .deposit-title {
    color: #101828;
    font-size: 18px;
    font-weight: 850;
  }

  .deposit-subtitle {
    margin-top: 3px;
    color: #667085;
    font-size: 14px;
    font-weight: 600;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 30;
  max-width: min(92vw, 360px);
  transform: translateX(-50%) translateY(16px);
  border-radius: 8px;
  background: #101828;
  color: #fff;
  padding: 11px 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 14px;
}

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

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

@media (max-width: 480px) {
  .app-shell {
    padding: 14px;
  }

  .auth-card,
  .dashboard {
    box-shadow: none;
  }

  .auth-card,
  .dashboard-body {
    padding: 22px 18px;
  }

  .dashboard-header {
    padding: 20px 18px 16px;
  }

  h1 {
    font-size: 27px;
  }

  .receive-page {
    padding-left: 18px;
    padding-right: 18px;
  }

  .warning {
    font-size: 16px;
    padding: 18px 18px;
  }

  .topbar-title {
    font-size: 24px;
  }

  .asset-name {
    font-size: 30px;
  }

  .network-pill {
    font-size: 16px;
  }

  .qr-card {
    width: min(100%, 286px);
    padding: 18px 14px 18px;
  }

  .qr-center {
    width: 66px;
    height: 66px;
  }

  .address-display {
    font-size: 17px;
  }

  .action-row {
    gap: 10px;
  }

  .action-glyph {
    width: 78px;
    height: 78px;
  }

  .receive-action {
    min-height: 106px;
    font-size: 16px;
  }

  .deposit-card {
    grid-template-columns: 54px 1fr;
    gap: 14px;
    padding: 24px 20px;
  }

  .deposit-icon {
    width: 54px;
    height: 54px;
  }

  .deposit-title {
    font-size: 20px;
  }

  .deposit-subtitle {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}
