:root {
  --bg: #0a0a0b;
  --surface-1: #101012;
  --surface-2: #16161a;
  --surface-3: #1c1c21;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f6f8;
  --muted: #9b9ea7;
  --muted-dim: #63666f;
  --accent: #34d399;
  --accent-dim: rgba(52, 211, 153, 0.14);
  --amber: #f5c451;
  --danger: #f87171;
  /* Light input like the Summit platform sign-in (slightly muted) */
  --field: #d3d6e4;
  --field-focus: #dde0ec;
  --radius: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
.hidden { display: none !important; }
.screen { position: relative; min-height: 100vh; }
.screen-center { display: flex; align-items: center; justify-content: center; padding: 24px; }

/* ───────── Login: card + fog glow ───────── */
.auth-wrap { position: relative; width: 100%; max-width: 430px; }
.auth-fog {
  position: absolute; inset: -80px -60px; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 45%, rgba(210, 220, 255, 0.10), transparent 70%),
    radial-gradient(45% 40% at 50% 50%, rgba(255, 255, 255, 0.06), transparent 75%);
  filter: blur(24px);
}
.auth-card {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, #131316, #0e0e10);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px 34px 32px;
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.85);
}
.auth-logo { display: block; height: 40px; margin: 0 auto; }
.portal-label {
  text-align: center; font-size: 11.5px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--muted-dim); margin-top: 18px;
}
.auth-divider { height: 1px; background: var(--line); margin: 24px 0 22px; }
.auth-sub { position: relative; z-index: 1; text-align: center; margin-top: 20px; font-size: 12px; color: var(--muted-dim); }

/* ───────── Payment-first flow steps ───────── */
.flow-wrap { position: relative; width: 100%; max-width: 460px; }
/* Give the card checkout more room. */
.flow-wrap:has(#payment-view:not(.hidden)) { max-width: 560px; }
#payment-view { padding: 20px; }
.card-step {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, #131316, #0e0e10);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 34px 30px 30px; box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.85);
}
.step-title { text-align: center; font-size: 21px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.01em; }
.step-sub { text-align: center; font-size: 14px; color: var(--muted); margin: 0 0 22px; }
.step-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.step-head-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; }
.paid-badge {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 auto 18px; padding: 6px 14px;
  background: var(--accent-dim); border: 1px solid rgba(52,211,153,0.35); color: var(--accent);
  border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.02em;
}
.card-step .paid-badge { display: flex; width: fit-content; }
.center-btn { display: block; margin: 14px auto 0; }
.card-step.result { text-align: center; }
.card-step.result .result-icon { margin-top: 6px; }
.card-step .account-list { margin-bottom: 18px; }

/* ───────── Fields (light, platform-style) ───────── */
.field-label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin: 16px 0 8px; }
.label-row { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.label-row .field-label { margin: 0 0 8px; }
.forgot { font-size: 12.5px; color: #cfd3e6; text-decoration: none; }
.forgot:hover { color: #fff; }
.input {
  width: 100%; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--field); color: #14141a; padding: 13px 15px; font-size: 15px; font-family: inherit;
  outline: none; transition: box-shadow .15s, background .15s;
}
.input::placeholder { color: #8b8fa6; }
.input:focus { background: var(--field-focus); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25); }

/* ───────── Buttons ───────── */
.btn-white {
  width: 100%; border: none; cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 600; border-radius: var(--radius-sm);
  background: #fff; color: #08080b; padding: 14px; margin-top: 22px;
  transition: background .15s, transform .1s;
}
.btn-white:hover { background: #eceef5; }
.btn-white:active { transform: translateY(1px); }
.btn-white:disabled { opacity: .45; cursor: not-allowed; }
.btn-lg { margin-top: 0; padding: 15px; font-size: 15.5px; }
.btn-text { background: none; border: none; color: var(--muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.btn-text:hover { color: var(--text); }

.error {
  margin-top: 16px; border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5; font-size: 13.5px; padding: 11px 14px;
}

/* ───────── Deposit page ───────── */
.page-fog {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 40% at 50% -5%, rgba(52, 211, 153, 0.08), transparent 70%);
}
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: 15px 22px; border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 11, 0.75); backdrop-filter: blur(14px);
}
.topbar-logo { height: 24px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user { font-size: 13px; color: var(--muted); }
.container { position: relative; z-index: 1; max-width: 560px; margin: 0 auto; padding: 36px 20px 64px; }
.page-head { margin-bottom: 26px; }
.page-title { font-size: 27px; font-weight: 800; margin: 0 0 8px; letter-spacing: -0.02em; }
.page-sub { font-size: 14.5px; color: var(--muted); margin: 0; }
.section-label { font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; margin: 0 0 12px; }

/* ───────── Account selection cards ───────── */
.account-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
.acct-option {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: var(--surface-1); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px; transition: border-color .15s, background .15s;
  color: var(--text); font-family: inherit; /* buttons don't inherit these by default */
}
.acct-option:hover { border-color: var(--line-strong); background: var(--surface-2); }
.acct-option.selected { border-color: var(--accent); background: var(--accent-dim); }
.acct-radio {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-strong);
  flex-shrink: 0; display: grid; place-items: center; transition: border-color .15s;
}
.acct-option.selected .acct-radio { border-color: var(--accent); }
.acct-option.selected .acct-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.acct-main { flex: 1; min-width: 0; }
.acct-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.badge { font-size: 10.5px; font-weight: 700; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 5px; }
.badge-live { background: var(--accent-dim); color: var(--accent); }
.badge-demo { background: rgba(245, 196, 81, 0.16); color: var(--amber); }
.acct-sub { font-size: 12px; color: var(--muted-dim); }
.acct-bal { text-align: right; }
.acct-bal-val { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.acct-bal-cur { font-size: 11px; color: var(--muted-dim); margin-left: 3px; }

/* ───────── Panels ───────── */
.panel { position: relative; z-index: 1; background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 60px -28px rgba(0,0,0,0.8); }
.panel-pad { padding: 22px; }
.panel-foot { padding: 18px 22px 22px; border-top: 1px solid var(--line); background: rgba(255,255,255,0.012); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-head-title { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-dim); }

/* ───────── Amount ───────── */
.amount-wrap { display: flex; align-items: center; background: var(--field); border-radius: 12px; padding: 14px 18px; }
.amount-cur { font-size: 28px; font-weight: 700; color: #6a6e86; margin-right: 6px; }
.amount-input { flex: 1; min-width: 0; border: none; background: none; outline: none; color: #14141a; font-family: inherit; font-size: 34px; font-weight: 700; letter-spacing: -0.02em; }
.amount-input::placeholder { color: #a7abbf; }
.amount-usd { font-size: 12.5px; font-weight: 700; color: #6a6e86; letter-spacing: 0.05em; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin: 14px 0 20px; }
.chip { padding: 10px 0; text-align: center; font-size: 14px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; cursor: pointer; transition: all .12s; }
.chip:hover { border-color: var(--line-strong); background: var(--surface-3); }
.chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.trust-row { display: flex; gap: 14px; justify-content: center; margin-top: 15px; font-size: 11.5px; font-weight: 600; color: var(--muted-dim); }

/* Test-mode banner + bypass button */
.test-banner { background: rgba(245,196,81,0.1); border: 1px solid rgba(245,196,81,0.35); color: var(--amber); font-size: 12.5px; font-weight: 600; padding: 10px 14px; border-radius: 10px; margin-bottom: 20px; text-align: center; }
.btn-test { width: 100%; margin-top: 12px; padding: 12px; border: 1px dashed rgba(245,196,81,0.55); background: rgba(245,196,81,0.08); color: var(--amber); border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; transition: background .12s; }
.btn-test:hover { background: rgba(245,196,81,0.15); }
.btn-test:disabled { opacity: .5; cursor: not-allowed; }

/* ───────── Embed / status / result ───────── */
.embed { width: 100%; min-height: 900px; }
.embed iframe { width: 100% !important; min-height: 900px !important; border: none; }
.pay-status { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); }
.result-pad { text-align: center; padding: 44px 24px; }
.result-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 20px; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.result-icon.ok { background: var(--accent-dim); color: var(--accent); box-shadow: 0 0 0 8px rgba(52,211,153,0.06); }
.result-icon.fail { background: rgba(248,113,113,0.14); color: var(--danger); box-shadow: 0 0 0 8px rgba(248,113,113,0.05); }
.result-title { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.result .muted { margin-bottom: 24px; }
.result-balance { background: linear-gradient(180deg, rgba(52,211,153,0.08), rgba(52,211,153,0.03)); border: 1px solid rgba(52,211,153,0.28); border-radius: 14px; padding: 20px; margin-bottom: 26px; }
.result-balance-label { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.result-balance-val { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; color: var(--text); font-variant-numeric: tabular-nums; }
.result-balance-cur { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.result-account { font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--accent); margin-top: 8px; }
.result .btn-white { max-width: 280px; margin: 0 auto; }
.muted { color: var(--muted); font-size: 14.5px; }
.page-foot { margin-top: 26px; text-align: center; font-size: 12.5px; color: var(--muted-dim); line-height: 1.6; }

.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.2); border-top-color: var(--accent); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ───────── Secure connection loader ───────── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(60% 50% at 50% 45%, rgba(52,211,153,0.06), rgba(6,6,8,0.96));
  backdrop-filter: blur(8px);
}
.loading-box { text-align: center; padding: 24px; }
.loading-mark { position: relative; width: 88px; height: 88px; margin: 0 auto 26px; }
.loading-mark img { position: absolute; inset: 0; margin: auto; width: 40px; height: 40px; opacity: .95; animation: mark-pulse 1.8s ease-in-out infinite; }
.loading-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.08); border-top-color: var(--accent); border-right-color: var(--accent);
  animation: spin 1s linear infinite;
}
.loading-text { font-size: 15.5px; font-weight: 600; color: var(--text); letter-spacing: 0.01em; }
.loading-sub { font-size: 12.5px; color: var(--muted-dim); margin-top: 9px; }
.loading-dots::after { content: ""; animation: dots 1.4s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } 100% { content: ""; } }
@keyframes mark-pulse { 0%, 100% { opacity: .55; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.04); } }

@media (max-width: 520px) {
  .page-title { font-size: 23px; }
  .amount-input { font-size: 28px; }
  .chips { grid-template-columns: repeat(2, 1fr); }
}
