@import url("https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap");

:root {
  --orange: #0b0d10;
  --orange-dark: #000000;
  --amber: #8f98a3;
  --ink: #1e2228;
  --muted: #666d78;
  --line: #e9eaed;
  --soft: #f4f4f5;
  --panel: #ffffff;
  --success: #0b7a4b;
  --danger: #b3261e;
  --shadow: 0 24px 70px rgba(29, 33, 39, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none;
}

body {
  margin: 0;
  background: #f9f9f9;
  color: var(--ink);
  font-family: "Google Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.5px;
  overflow-x: hidden;
}

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

button,
input,
select {
  font: inherit;
}

body[data-page="how-it-works"] {
  background: #f9f9f9;
}

.topbar {
  align-items: center;
  background: white;
  border: 0;
  border-bottom: 1px solid #e7eaee;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin: 0;
  max-width: 100%;
  min-height: 70px;
  padding: 10px 18px;
  position: relative;
  width: 100%;
  z-index: 140;
}

.brand {
  align-items: flex-start;
  color: var(--orange);
  display: flex;
  gap: 12px;
  white-space: nowrap;
}

.brand-copy {
  display: block;
  line-height: 1;
  min-height: 38px;
  padding-bottom: 12px;
  position: relative;
}

.brand-name {
  align-items: center;
  display: flex;
  font-size: 20px;
  font-weight: 700;
  min-height: 38px;
}

.brand-badge {
  color: #98a2b3;
  font-size: 13px;
  font-weight: 600;
  left: 0;
  line-height: 1;
  position: absolute;
  top: 26px;
}

.brand-mark {
  align-items: center;
  display: inline-flex;
  height: 38px;
  justify-content: center;
  overflow: visible;
  width: 38px;
}

.brand-mark img {
  display: block;
  height: 100%;
  image-rendering: auto;
  object-fit: contain;
  width: 100%;
}

.desktop-nav {
  align-items: center;
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 18px 28px;
  justify-content: center;
  min-width: 0;
}

.desktop-nav a {
  color: #3d4148;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 0;
  position: relative;
}

.desktop-nav a.is-active {
  color: var(--orange);
  font-weight: 800;
}

.desktop-nav a.is-active::after {
  background: #16a34a;
  border-radius: 999px;
  bottom: -9px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  width: 100%;
}

.top-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.profile-pill {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-radius: 999px;
  color: #282c31;
  cursor: pointer;
  display: flex;
  gap: 10px;
  padding: 8px 12px 8px 8px;
}

#profileLabel {
  font-weight: 800;
}

.profile-pill.is-authenticated {
  background: #fff;
  box-shadow: none;
}

.profile-pill.is-guest {
  background: #111111;
  color: #ffffff;
  gap: 0;
  padding: 10px 16px;
}

.profile-pill.is-guest .avatar,
.profile-pill.is-guest .profile-caret {
  display: none;
}

.avatar {
  align-items: center;
  background: #e9f8ef;
  border-radius: 50%;
  color: #16a34a;
  display: inline-flex;
  font-weight: 700;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.token-icon-image {
  display: block;
  height: 18px;
  object-fit: contain;
  width: 18px;
}

.profile-caret {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

main {
  background: #f9f9f9;
  margin: 0;
  max-width: none;
  padding: 32px 20px 56px;
  width: 100%;
}

.page-shell {
  min-height: calc(100vh - 70px);
  position: relative;
}

.page-loading-overlay {
  align-items: center;
  background: rgba(249, 249, 249, 0.86);
  backdrop-filter: blur(6px);
  display: flex;
  inset: 70px 0 0;
  justify-content: center;
  opacity: 1;
  pointer-events: all;
  position: fixed;
  transition: opacity 180ms ease;
  z-index: 110;
}

.page-loading-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.page-loading-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid #e8ebef;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(17, 24, 39, 0.08);
  display: inline-flex;
  gap: 12px;
  min-height: 64px;
  padding: 0 18px;
}

.page-loading-spinner {
  animation: page-loading-spin 0.85s linear infinite;
  border: 2px solid #d8dee6;
  border-radius: 999px;
  border-top-color: #16a34a;
  display: inline-block;
  height: 18px;
  width: 18px;
}

.page-loading-text {
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

@keyframes page-loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.page {
  display: none;
}

.page.is-active {
  display: block;
}

.eyebrow {
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: 0;
  line-height: 1.03;
  margin-bottom: 26px;
}

h2 {
  font-size: 32px;
  letter-spacing: 0;
  line-height: 1.15;
  margin-bottom: 10px;
}

body:not([data-page="market"]) .eyebrow {
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 10px;
  text-transform: uppercase;
}

body:not([data-page="market"]) h2 {
  font-size: 32px;
  letter-spacing: 0;
  line-height: 1.15;
  margin: 0 0 10px;
}

body:not([data-page="market"]) .activity-card,
body:not([data-page="market"]) .sidebar-card,
body:not([data-page="market"]) .profile-card,
body:not([data-page="market"]) .deposit-step-card,
body:not([data-page="market"]) .withdraw-step-card,
body:not([data-page="market"]) .withdraw-history-card,
body:not([data-page="market"]) .transactions-archive-card,
body:not([data-page="market"]) .login-panel,
body:not([data-page="market"]) .login-aside,
body:not([data-page="market"]) .info-section,
body:not([data-page="market"]) .formula-card,
body:not([data-page="market"]) .deposit-method-card,
body:not([data-page="market"]) .deposit-personal-number-box,
body:not([data-page="market"]) .deposit-warning-banner {
  background: #fff;
  border: 1px solid #e8ebef;
  border-radius: 18px;
  box-shadow: none;
}

h3 {
  font-size: 22px;
  margin-bottom: 24px;
}

.primary-button,
.secondary-button {
  align-items: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 54px;
  padding: 0 26px;
}

.primary-button {
  background: #16c784;
  color: #fff;
}

.primary-button:hover {
  background: #11b67c;
}

.secondary-button {
  background: white;
  border: solid 1px #e8ebef;
  color: var(--ink);
}

.compact-button {
  min-height: 42px;
  padding: 0 16px;
}

#signOutButton {
  min-width: 42px;
  padding: 0;
}

#signOutButton svg {
  color: #ef4444;
  height: 18px;
  width: 18px;
}

.full-width {
  width: 100%;
}

.mobile-navbar {
  display: none;
}

.dashboard-head {
  align-items: end;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.input-label {
  color: #3f454d;
  display: block;
  font-weight: 800;
  margin-bottom: 10px;
}

.amount-input {
  align-items: center;
  border: 1px solid #d7d9dd;
  border-radius: 8px;
  display: flex;
  margin-bottom: 22px;
  min-height: 64px;
  padding: 0 18px;
}

.amount-input input {
  border: 0;
  color: var(--ink);
  flex: 1;
  font-size: 26px;
  font-weight: 800;
  min-width: 0;
  outline: 0;
}

.amount-input input::-webkit-outer-spin-button,
.amount-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.amount-input input[type="number"] {
  -moz-appearance: textfield;
}

.amount-input span {
  color: var(--muted);
  font-weight: 800;
}

.amount-stepper {
  display: none;
}

.auth-input input {
  font-size: 18px;
}

.form-message {
  color: var(--muted);
  font-weight: 700;
}

.form-message.success {
  color: var(--success);
}

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

.table-wrap {
  margin-top: 24px;
  overflow-x: auto;
}

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

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
  text-align: left;
}

th {
  color: #525962;
  font-size: 13px;
  text-transform: uppercase;
}

td {
  font-weight: 600;
}

.status {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.status.completed,
.status.approved {
  background: #e7f5ee;
  color: var(--success);
}

.status.pending {
  background: #fff5de;
  color: #9b5d00;
}

.status.rejected {
  background: #fdeceb;
  color: var(--danger);
}

.confirm-modal {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 1200;
}

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

.confirm-modal-backdrop {
  background: rgba(17, 24, 39, 0.42);
  inset: 0;
  position: absolute;
}

.confirm-dialog {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2);
  max-width: 420px;
  padding: 20px;
  position: relative;
  width: min(100%, 420px);
}

.confirm-dialog-head {
  align-items: flex-start;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 14px;
}

.confirm-dialog-head span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  grid-column: 1;
  text-transform: uppercase;
}

.confirm-dialog-head h3 {
  font-size: 24px;
  grid-column: 1;
  line-height: 1.15;
  margin: 0;
}

.confirm-close {
  align-items: center;
  background: #f4f5f7;
  border: 0;
  border-radius: 999px;
  color: #344054;
  cursor: pointer;
  display: inline-flex;
  font-size: 22px;
  grid-column: 2;
  grid-row: 1 / span 2;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.confirm-dialog-body p {
  color: #475467;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 14px;
}

.confirm-summary {
  display: grid;
  gap: 10px;
  margin: 0;
}

.confirm-summary div {
  align-items: baseline;
  border-bottom: 1px solid #eef0f3;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 10px;
}

.confirm-summary div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.confirm-summary dt {
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

.confirm-summary dd {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  text-align: right;
}

.confirm-dialog-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 18px;
}

.confirm-cancel,
.confirm-submit {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  min-height: 48px;
  padding: 0 16px;
}

.confirm-cancel {
  background: #eef1f4;
  color: #344054;
}

.confirm-submit {
  background: #111418;
  color: #ffffff;
}

.confirm-submit.is-buy {
  background: #16c784;
}

.confirm-submit.is-sell {
  background: #ea3943;
}

.quote-list {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
}

.quote-list div {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding-bottom: 12px;
}

.quote-list dt {
  color: var(--muted);
  flex: 1 1 auto;
  font-weight: 700;
  min-width: 0;
}

.quote-list dd {
  font-weight: 800;
  margin: 0;
  max-width: 50%;
  overflow-wrap: anywhere;
  text-align: right;
}

.quote-label-with-help {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  position: relative;
}

.help-tooltip-wrap {
  display: inline-flex;
  position: relative;
}

.help-indicator {
  align-items: center;
  background: #f3f4f6;
  border: 1px solid #d7dbe2;
  border-radius: 999px;
  color: #475467;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  height: 20px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 20px;
}

.help-indicator:hover {
  background: #e9edf3;
  color: var(--ink);
}

.help-tooltip {
  background: rgba(17, 24, 39, 0.96);
  border-radius: 10px;
  bottom: calc(100% + 10px);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  left: 50%;
  line-height: 1.45;
  opacity: 0;
  padding: 12px 14px;
  pointer-events: none;
  position: absolute;
  transform: translateX(-50%) translateY(4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  visibility: hidden;
  width: min(280px, calc(100vw - 32px));
  z-index: 30;
}

.help-tooltip::after {
  background: rgba(17, 24, 39, 0.96);
  bottom: -5px;
  content: "";
  height: 10px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
}

.help-tooltip strong {
  color: #ffffff;
  display: block;
  font-size: 12px;
  margin-bottom: 6px;
}

.help-tooltip-wrap:hover .help-tooltip,
.help-tooltip-wrap:focus-within .help-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  visibility: visible;
}

.empty-state {
  color: var(--muted);
  font-weight: 700;
  margin: 0;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 18px;
  }

  .desktop-nav {
    flex-wrap: nowrap;
    gap: 18px;
    order: 3;
    overflow-x: auto;
    width: 100%;
  }
}

@media (max-width: 700px) {
  th,
  td {
    padding-left: 10px;
    padding-right: 10px;
  }

  .confirm-dialog-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  :root {
    --mobile-page-gutter: 12px;
    --mobile-card-radius: 14px;
  }

  body {
    padding-bottom: 88px;
  }

  body {
    background: #ffffff;
    color: var(--ink);
  }

  .topbar {
    background: #ffffff;
    border: 0;
    border-bottom: 1px solid #e6e8ec;
    border-radius: 0;
    gap: 10px;
    justify-content: space-between;
    margin: 0;
    min-height: 58px;
    padding: 8px 12px;
    width: 100%;
  }

  .brand {
    color: var(--orange);
    flex: 1 1 auto;
    font-size: 14px;
    min-width: 0;
  }

  .brand-name {
    font-size: 17px;
    min-height: 32px;
  }

  .brand-badge {
    font-size: 11px;
    top: 22px;
  }

  .brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .brand-mark {
    height: 32px;
    width: 32px;
  }

  .desktop-nav {
    display: none;
  }

  .top-actions {
    flex: 0 0 auto;
    gap: 8px;
  }

  .profile-pill {
    background: #ffffff;
    border: 0;
    color: var(--ink);
    padding: 4px;
  }

  .profile-pill span:last-child {
    display: none;
  }

  .avatar {
    background: var(--orange);
    color: #ffffff;
    height: 28px;
    width: 28px;
  }

  .top-actions .compact-button {
    background: #ececee;
    border-radius: 8px;
    color: var(--ink);
    min-height: 34px;
    padding: 0 10px;
  }

  .top-actions #signOutButton {
    min-width: 34px;
    padding: 0;
  }

  .top-actions #signOutButton svg {
    height: 16px;
    width: 16px;
  }

  main {
    background: #ffffff;
    margin: 0px;
    padding: 15px;
  }

  main > *,
  main > .page > *,
  main > .terminal-page > *,
  main > .dashboard-page > *,
  main > .transactions-page > *,
  main > .deposit-page > *,
  main > .withdraw-page > *,
  main > .how-page > *,
  main > .legal-page > * {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    width: 100%;
  }

  main > section,
  main > article,
  main > aside,
  main > div,
  main > .page > section,
  main > .page > article,
  main > .page > aside,
  main > .page > div,
  main > .terminal-page > section,
  main > .terminal-page > article,
  main > .terminal-page > aside,
  main > .terminal-page > div,
  main > .dashboard-page > section,
  main > .dashboard-page > article,
  main > .dashboard-page > aside,
  main > .dashboard-page > div,
  main > .transactions-page > section,
  main > .transactions-page > article,
  main > .transactions-page > aside,
  main > .transactions-page > div,
  main > .deposit-page > section,
  main > .deposit-page > article,
  main > .deposit-page > aside,
  main > .deposit-page > div,
  main > .withdraw-page > section,
  main > .withdraw-page > article,
  main > .withdraw-page > aside,
  main > .withdraw-page > div,
  main > .how-page > section,
  main > .how-page > article,
  main > .how-page > aside,
  main > .how-page > div,
  main > .legal-page > section,
  main > .legal-page > article,
  main > .legal-page > aside,
  main > .legal-page > div {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page,
  .deposit-layout,
  .withdraw-layout,
  .deposit-panel,
  .withdraw-panel,
  .deposit-flow,
  .withdraw-flow,
  .withdraw-side,
  .transactions-layout,
  .dashboard-layout,
  .how-layout,
  .legal-layout {
    border: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
  }

  main > .page,
  main > .terminal-page,
  main > section,
  main > article,
  main > aside,
  main > div {
    margin-top: 10px !important;
  }

  .eyebrow {
    font-size: 12px;
    margin: 0 0 8px;
  }

  h2 {
    font-size: 22px !important;
    line-height: 1.18;
    margin-bottom: 8px;
  }

  h3 {
    font-size: 16px !important;
  }

  body:not([data-page="market"]) .eyebrow {
    font-size: 12px;
    margin: 0 0 8px;
  }

  body:not([data-page="market"]) h2 {
    font-size: 22px !important;
    line-height: 1.18;
    margin: 0 0 8px;
  }

  body:not([data-page="market"]) h3 {
    font-size: 16px !important;
  }

  .dashboard-head,
  .transactions-page-head,
  .withdraw-head,
  .deposit-head {
    gap: 12px;
    margin-bottom: 12px;
  }

  .activity-card,
  .sidebar-card,
  .profile-card,
  .deposit-step-card,
  .withdraw-step-card,
  .withdraw-history-card,
  .transactions-archive-card,
  .market-board,
  .order-panel,
  .metric-rail,
  .login-panel,
  .login-aside,
  .info-section,
  .formula-card,
  .deposit-method-card,
  .deposit-personal-number-box,
  .deposit-warning-banner {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    max-width: 100%;
    padding: 0 !important;
    width: 100%;
  }

  section {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100%;
    width: 100%;
  }

  main > section + section,
  main > .page > section + section,
  main > .page > div + div,
  main > .page > div + section,
  main > .page > section + div,
  main > .terminal-page > section + section,
  main > .terminal-page > div + div,
  main > .terminal-page > div + section,
  main > .terminal-page > section + div,
  main > .dashboard-page > section + section,
  main > .transactions-page > section + section,
  main > .deposit-page > section + section,
  main > .withdraw-page > section + section,
  main > .how-page > section + section,
  main > .legal-page > section + section,
  .profile-main-column > section + section,
  .profile-side-column > section + section,
  .deposit-flow > section + section,
  .withdraw-flow > section + section,
  .transactions-shell > section + section,
  .login-layout > section + aside,
  .login-layout > aside + section,
  .market-main-v2 > section + section,
  .dashboard-main > section + section,
  .transactions-layout > section + section {
    margin-top: 10px !important;
  }

  .mobile-navbar {
    align-items: stretch;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #e5e7eb;
    bottom: 0;
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    left: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 200;
  }

  .topbar {
    min-height: 58px;
    z-index: 140;
  }

  .page-shell {
    min-height: calc(100vh - 58px - 72px);
  }

  .page-loading-overlay {
    inset: 58px 0 72px;
    z-index: 110;
  }

  .mobile-navbar a {
    align-items: center;
    border-radius: 14px;
    color: #667085;
    display: grid;
    gap: 4px;
    justify-items: center;
    min-height: 56px;
    padding: 6px 4px;
    text-align: center;
  }

  .mobile-navbar a svg {
    height: 18px;
    width: 18px;
  }

  .mobile-navbar a span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
  }

  .mobile-navbar a.is-active {
    background: #f3f4f6;
    color: #111827;
  }

  .page-loading-card {
    border-radius: 14px;
    min-height: 56px;
    padding: 0 14px;
  }

  .page-loading-text {
    font-size: 13px;
  }

  .confirm-modal {
    padding: 12px;
  }

  .confirm-dialog {
    border-radius: 16px;
    padding: 16px;
  }

  .confirm-dialog-head h3 {
    font-size: 20px;
  }

  .input-label {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 0;
    opacity: 0.9;
  }

  .amount-input {
    background: #ffffff;
    border: 1px solid #d7dbe1;
    border-radius: 12px;
    gap: 8px;
    min-height: 56px;
    padding: 8px 10px 9px;
  }

  .amount-input input {
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
  }

  .amount-input span {
    color: #667085;
    font-size: 12px;
    font-weight: 700;
  }
}
