/* =============================================================================
   dashboard — the account surface.

   Same language as the site, tuned for an app: the page ground stays, the
   content sits on white cards, and the nav is a single floating pill holding
   the sections. No block colour here; the work is the colour.
   ========================================================================== */

.dash-body {
  background:
    radial-gradient(60% 40% at 84% -6%, rgba(63, 187, 249, 0.16) 0%, rgba(63,187,249,0) 62%),
    radial-gradient(46% 34% at 6% -4%, rgba(11, 91, 239, 0.12) 0%, rgba(11,91,239,0) 60%),
    var(--page);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ---------------------------------- nav ----------------------------------- */
.dash-nav { position: fixed; inset: 14px 0 auto 0; z-index: 100; padding-inline: var(--inset); }
.dash-nav-in {
  height: 60px; width: fit-content; max-width: calc(100% - 8px); margin-inline: auto;
  display: flex; align-items: center; gap: 8px; padding: 0 8px 0 18px;
  border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 14px 34px -18px rgba(9, 30, 66, 0.34), inset 0 0 0 1px rgba(255,255,255,0.7);
}
.dash-nav .brand { margin-right: 6px; }
.dash-nav .brand-name { font-size: 19px; }
.dash-div { width: 1px; height: 24px; background: var(--line); flex: none; }
.dash-tabs { display: flex; gap: 4px; }
.dash-tab {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  color: var(--muted); transition: background .16s, color .16s;
}
.dash-tab svg { width: 21px; height: 21px; }
.dash-tab:hover { background: #f1f3f7; color: var(--ink); }
.dash-tab.on { background: var(--ink); color: #fff; }
.dash-connect { margin-left: 4px; gap: 8px; }
.dash-connect .cx-dot {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.55);
}
.dash-connect.on .cx-dot { background: #7dfcc0; box-shadow: 0 0 0 3px rgba(125,252,192,0.28); }

/* --------------------------------- layout --------------------------------- */
.dash-main {
  max-width: var(--maxw); margin-inline: auto;
  padding: calc(60px + 46px) var(--gutter, clamp(20px, 5vw, 44px)) 60px;
}
.dash-panel[hidden] { display: none; }
.dash-kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 14px;
}
.dash-kicker span { width: 26px; height: 1.5px; background: var(--blue); border-radius: 2px; }
.dash-panel h1 { font-size: clamp(34px, 4.6vw, 58px); letter-spacing: -0.05em; }
.dash-lede { margin-top: 16px; max-width: 54ch; font-size: 16.5px; color: var(--muted); }

/* --------------------------------- stats ---------------------------------- */
.stat-grid {
  margin-top: clamp(28px, 3.4vw, 44px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
}
.stat {
  background: #fff; border-radius: var(--r-card); padding: 22px;
  border: 1px solid var(--line); box-shadow: 0 12px 26px -22px rgba(9,30,66,0.4);
}
.stat-icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: #f1f4f9; color: var(--ink-2); margin-bottom: 18px;
}
.stat-icon svg { width: 19px; height: 19px; }
.stat-label { font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); }
.stat-value {
  font-family: var(--font-display); font-size: clamp(28px, 3vw, 38px); font-weight: 500;
  letter-spacing: -0.05em; margin-top: 6px;
}
.stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.stat-sub.up { color: var(--up); }

/* --------------------------------- cards ---------------------------------- */
.dash-split {
  margin-top: 14px; display: grid; gap: 14px;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start;
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-card);
  padding: clamp(20px, 2vw, 26px); box-shadow: 0 12px 26px -22px rgba(9,30,66,0.4);
}
.card-wide { margin-top: 14px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-kicker { font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 7px; }
.card h2 { font-size: clamp(19px, 1.8vw, 23px); letter-spacing: -0.04em; }
.card-note { margin-top: 12px; font-size: 14px; color: var(--muted); }
.card-side .btn { margin-top: 18px; }
.pill-live {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  font-size: 11.5px; font-family: var(--font-mono); color: var(--muted);
  background: #f1f4f9; padding: 6px 12px; border-radius: var(--r-pill);
}
.pill-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted-2); }
.pill-live.on i { background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }

/* the checkout card is already a card here — strip its own chrome */
.ck-flat { padding: 0; border: 0; box-shadow: none; background: transparent; border-radius: 0; }

.wallet-detail { margin-top: 20px; border-top: 1px solid var(--line); }
.wallet-detail[hidden] { display: none; }
.wd-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.wd-row:last-child { border-bottom: 0; }
.wd-row b, .wd-row a { font-family: var(--font-mono); font-weight: 500; font-size: 12.5px; color: var(--ink-2); }
.wd-row a { color: var(--blue); }
.wd-row a:hover { text-decoration: underline; }

/* --------------------------------- steps ---------------------------------- */
.steps { margin-top: clamp(28px, 3.4vw, 44px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; }
.step-no { font-family: var(--font-mono); font-size: 11.5px; color: var(--blue); margin-bottom: 14px; }
.steps h3 { margin-bottom: 9px; }
.steps p { font-size: 14.5px; color: var(--muted); }
.steps code, .dash-lede code {
  font-family: var(--font-mono); font-size: 0.92em;
  background: #f1f4f9; padding: 1px 5px; border-radius: 5px;
}
.dash-panel > .btn { margin-top: 26px; }

/* --------------------------------- orders --------------------------------- */
.orders-bar { display: flex; gap: 10px; margin-top: clamp(24px, 3vw, 36px); }
.orders-bar input {
  flex: 1 1 auto; height: 46px; padding: 0 16px; border-radius: var(--r-md);
  background: #fff; border: 1px solid var(--line); font-size: 14px;
}
.orders-bar input:focus { outline: none; border-color: var(--blue-line); box-shadow: 0 0 0 4px var(--blue-soft); }
.orders-bar .btn { flex: none; }
.ord-wide { grid-template-columns: minmax(0, 1fr) auto auto auto auto; }
.ord-usd { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-2); }
.ord-state {
  font-style: normal; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--up); background: var(--up-soft); padding: 4px 9px; border-radius: var(--r-pill);
}

/* -------------------------------- balances -------------------------------- */
.bal-list { border-top: 1px solid var(--line); }
.bal {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto 20px;
  gap: 16px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.bal:last-child { border-bottom: 0; }
.bal-empty { color: var(--muted-2); }
.bal-empty .bal-sym { color: var(--muted); }
.bal-sym { font-weight: 500; letter-spacing: -0.02em; }
.bal-sym i { font-style: normal; font-weight: 400; color: var(--muted-2); font-size: 12px; margin-left: 8px; }
.bal-amt, .bal-px, .bal-val { font-family: var(--font-mono); font-size: 12.5px; text-align: right; }
.bal-px { color: var(--muted); }
.bal-val { color: var(--ink); min-width: 84px; }
.bal-link { color: var(--muted-2); }
.bal-link:hover { color: var(--blue); }

/* --------------------------------- footer --------------------------------- */
.dash-foot {
  max-width: var(--maxw); margin-inline: auto;
  padding: 0 var(--gutter, clamp(20px, 5vw, 44px)) 46px;
  font-size: 12px; color: var(--muted-2);
}
.dash-foot a { color: var(--blue); }
.dash-foot .disc { margin-top: 8px; max-width: 76ch; line-height: 1.55; }

/* ------------------------------- responsive -------------------------------- */
@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-split { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .dash-nav-in { width: 100%; padding-left: 12px; gap: 4px; }
  .dash-nav .brand-name { display: none; }
  .dash-connect span:not(.cx-dot) { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
  .dash-main { padding-top: 118px; }
  .ord-wide { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .ord-wide .ord-state, .ord-wide i { display: none; }
  .bal { grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; }
  .bal-px, .bal-link { display: none; }
}

/* --------------------------------- profile -------------------------------- */
.profile-card .btn { margin-top: 18px; }
.dash-tab svg[fill="currentColor"] { width: 17px; height: 17px; }
