body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--surface);
  color: var(--text);
  line-height: 1.5;
}

/* ── Header ── */
.app-header {
  border-bottom: 1px solid var(--surface-3);
  background: rgba(17, 24, 39, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 110;
  padding-top: var(--safe-top);
  transform: translateZ(0);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: max(1rem, var(--safe-left));
  padding-right: max(1rem, var(--safe-right));
}

.text-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: clamp(0.9rem, 2.5vw, 1.125rem);
  letter-spacing: -0.02em;
  color: #fff;
  text-decoration: none;
  min-width: 0;
  flex-shrink: 1;
}

.text-logo:hover {
  color: var(--btc);
}

.text-logo [data-logo-text] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: var(--btc);
  color: #111;
  font-size: 1rem;
  font-weight: 900;
}

.header-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.2;
  padding: 0.35rem 0.65rem;
  border-radius: 0.5rem;
  background: rgba(247, 147, 26, 0.08);
  border: 1px solid rgba(247, 147, 26, 0.2);
  flex-shrink: 0;
}

.header-balance-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.header-balance-usd {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
}

.header-balance-btc {
  font-size: 0.7rem;
  color: var(--btc);
  font-weight: 600;
}

.header-balance-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: flex-end;
}

.header-balance-row img {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Desktop nav — show from 900px (overrides Tailwind sm:) */
header .desktop-nav {
  display: none !important;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  header .desktop-nav {
    display: flex !important;
  }

  .dash-menu-btn {
    display: none !important;
  }

  .dash-mobile-nav {
    display: none !important;
  }

  .hide-on-xs {
    display: flex !important;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .hide-on-xs {
    display: flex !important;
  }
}

@media (max-width: 639px) {
  .hide-on-xs {
    display: none !important;
  }
}

.dash-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  color: #fff;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}

.dash-menu-btn:hover,
.dash-menu-btn[aria-expanded="true"] {
  border-color: var(--btc);
  background: rgba(247, 147, 26, 0.1);
}

.dash-mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem max(1rem, var(--safe-right)) 1rem max(1rem, var(--safe-left));
  border-top: 1px solid var(--surface-3);
  background: var(--surface);
}

.dash-mobile-nav.open {
  display: flex;
}

.dash-mobile-nav .nav-link,
.dash-mobile-nav button.nav-link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  background: transparent;
  border: none;
  cursor: pointer;
}

.dash-mobile-nav .nav-link:hover,
.dash-mobile-nav .nav-link.active {
  background: rgba(247, 147, 26, 0.08);
}

.dash-mobile-nav .header-balance {
  align-items: flex-start;
  width: 100%;
  margin-bottom: 0.5rem;
}

body.nav-open {
  overflow: hidden;
}

/* ── Nav links & buttons ── */
.nav-link {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color 0.15s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.nav-link.active {
  color: var(--btc);
}

@media (min-width: 900px) {
  header .desktop-nav .nav-link {
    padding: 0.4rem 0.55rem;
  }
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-size: 0.9375rem;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.btn-primary {
  background: var(--btc);
  color: #111;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
}

.btn-primary:hover {
  background: var(--btc-dark);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-ghost {
  border: 1px solid #374151;
  color: #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: transparent;
}

.btn-ghost:hover {
  border-color: #6b7280;
  background: rgba(255, 255, 255, 0.03);
}

.action-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .action-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .action-row .btn-primary,
  .action-row .btn-ghost {
    flex: 1 1 auto;
    min-width: 8rem;
  }
}

/* ── Cards ── */
.app-card {
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 1rem;
}

.app-card--hover:hover {
  border-color: rgba(247, 147, 26, 0.25);
}

.stat-value {
  color: var(--btc);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.stat-card {
  padding: 1rem 1.25rem;
}

@media (min-width: 640px) {
  .stat-card {
    padding: 1.25rem 1.5rem;
  }
}

.dashboard-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
  .dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .dashboard-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Balance ── */
.balance-hero {
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.12), rgba(17, 24, 39, 0.95));
  border: 1px solid rgba(247, 147, 26, 0.25);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .balance-hero {
    padding: 2rem;
    margin-bottom: 2rem;
  }
}

.balance-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 640px) {
  .balance-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

.balance-amount-usd {
  font-size: clamp(1.125rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  word-break: normal;
  overflow-wrap: normal;
}

.balance-amount-btc {
  font-size: clamp(0.9375rem, 3vw, 1.25rem);
  font-weight: 600;
  color: var(--btc);
  word-break: normal;
  overflow-wrap: anywhere;
}

.balance-with-icon {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.balance-with-icon > div {
  min-width: 0;
  flex: 1;
}

.coin-icon {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
}

.coin-icon-sm {
  width: 1.75rem;
  height: 1.75rem;
}

.coin-icon-lg {
  width: clamp(2.75rem, 10vw, 4rem);
  height: clamp(2.75rem, 10vw, 4rem);
}

.coin-icon-xl {
  width: clamp(4rem, 14vw, 5.5rem);
  height: clamp(4rem, 14vw, 5.5rem);
}

/* ── Forms ── */
.form-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  background: #0f1419;
  border: 1px solid #374151;
  border-radius: 0.5rem;
  padding: 0.8rem 1rem;
  color: var(--text);
  font-size: 1rem;
  min-height: 2.75rem;
  transition: border-color 0.15s;
}

.form-input::placeholder {
  color: #6b7280;
}

.form-input:focus {
  outline: none;
  border-color: var(--btc);
  box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.15);
}

.form-input.flex-1 {
  flex: 1;
  min-width: 0;
}

.password-field {
  position: relative;
}

.password-field .form-input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 0.375rem;
}

.password-toggle:hover {
  color: #f3f4f6;
}

.password-toggle:focus-visible {
  outline: 2px solid var(--btc);
  outline-offset: 2px;
}

.password-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  padding: 1rem;
  border-radius: 1rem;
  transition: border-color 0.15s;
}

.payment-option img {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: contain;
  border-radius: 50%;
  background: #0f1419;
  padding: 0.25rem;
  flex-shrink: 0;
}

.payment-option > div {
  flex: 1;
  min-width: 0;
}

.payment-grid {
  display: grid;
  gap: 0.75rem;
}

.wallet-box {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: clamp(0.75rem, 2.8vw, 0.875rem);
  word-break: break-all;
  line-height: 1.5;
  color: var(--btc);
  background: #0a0d12;
  border: 1px solid var(--surface-3);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
}

.page-heading {
  margin-bottom: 1.5rem;
}

.page-heading h1 {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem;
}

.page-heading p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.balance-amount-usd,
.balance-amount-btc,
.dash-balance-card__amount,
.dash-balance-card__btc,
[data-btc-price],
.stat-value {
  font-variant-numeric: tabular-nums;
}

.price-pulse {
  transition: color 0.25s;
}

.live-tick {
  animation: liveTick 0.45s ease;
}

@keyframes liveTick {
  0% { opacity: 0.82; }
  100% { opacity: 1; }
}

.page-heading h1 {
  word-break: break-word;
}

@media (max-width: 479px) {
  .page-heading p {
    font-size: 0.8125rem;
    line-height: 1.5;
  }

  .balance-hero .coin-icon-lg {
    width: 2.25rem;
    height: 2.25rem;
  }

  .balance-amount-usd {
    font-size: 1.2rem;
    letter-spacing: -0.02em;
  }

  .balance-amount-btc {
    font-size: 0.9375rem;
  }

  .balance-hero .balance-with-icon {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .balance-hero .balance-with-icon:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
  }

  .dashboard-stats .stat-card {
    min-height: 4.5rem;
  }

  .dashboard-grid .app-card h2 {
    font-size: 1rem;
  }

  .recent-tx-row {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.25rem;
  }
}

@media (max-width: 359px) {
  .text-logo [data-logo-text] {
    max-width: 6.5rem;
  }
}

.sparkline {
  height: 48px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.sparkline span {
  flex: 1;
  background: linear-gradient(to top, var(--btc), rgba(247, 147, 26, 0.35));
  border-radius: 2px 2px 0 0;
  min-height: 4px;
}

/* Login page offset for fixed nav */
.page-login main {
  padding-top: calc(var(--header-h) + var(--safe-top) + 2rem);
  padding-bottom: calc(2rem + var(--safe-bottom));
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrap {
  width: 100%;
  max-width: 28rem;
  padding: 0 max(1rem, var(--safe-left)) 0 max(1rem, var(--safe-right));
}

@media (min-width: 768px) {
  .page-main {
    padding-top: 2rem;
    padding-bottom: 2.5rem;
  }
}

@media (min-width: 1280px) {
  .page-main {
    padding-top: 2.5rem;
  }
}

/* ── Wallet modal ── */
.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wallet-modal.hidden {
  display: none;
}

body.wallet-modal-open {
  overflow: hidden;
}

.wallet-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

.wallet-modal-card {
  position: relative;
  width: 100%;
  max-width: 26rem;
  padding: 1.5rem;
  z-index: 1;
}

.wallet-modal-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.75rem;
}

.wallet-modal-body {
  margin: 0 0 1rem;
  line-height: 1.6;
}

.wallet-modal-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.wallet-modal-actions .btn-ghost,
.wallet-modal-actions .btn-primary {
  flex: 1;
  justify-content: center;
  padding: 0.75rem 1rem;
}

.wallet-modal-fee {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 1rem;
  background: #0f1419;
  border: 1px solid rgba(247, 147, 26, 0.25);
  border-radius: 0.5rem;
}

.wallet-modal-fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.wallet-modal-fee-row strong {
  font-weight: 700;
}

/* ── Mobile dashboard chrome ── */
.dash-mobile-only {
  display: block;
}

.dash-desktop-only {
  display: none;
}

@media (min-width: 900px) {
  .dash-mobile-only {
    display: none !important;
  }

  .dash-desktop-only {
    display: block;
  }

  .dashboard-stats.dash-desktop-only {
    display: grid;
  }
}

@media (max-width: 899px) {
  body.dash-app .dash-menu-btn,
  body.dash-app .dash-mobile-nav {
    display: none !important;
  }

  body.dash-app .page-main {
    padding-top: calc(var(--header-h) + var(--safe-top) + 1rem);
    padding-bottom: calc(5.75rem + var(--safe-bottom));
  }

  body.dash-app .page-footer {
    display: none;
  }

  body.dash-app .app-header {
    border-bottom-color: rgba(255, 255, 255, 0.06);
  }
}

body.dash-app .page-main {
  padding-top: calc(var(--header-h) + var(--safe-top) + 1.25rem);
}

.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  position: relative;
}

.dash-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 2px solid rgba(247, 147, 26, 0.45);
  background: rgba(247, 147, 26, 0.12);
  color: var(--btc);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.dash-profile-btn:hover,
.dash-profile-btn[aria-expanded="true"] {
  background: rgba(247, 147, 26, 0.2);
}

/* Profile dropdown menu */
.dash-profile-menu {
  position: fixed;
  z-index: 120;
  min-width: 12.5rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 0.85rem;
  padding: 0.5rem 0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  animation: profileMenuIn 0.16s ease;
}

.dash-profile-menu.hidden {
  display: none;
}

.dash-profile-menu[data-anchor="header"] {
  top: calc(var(--header-h) + var(--safe-top) + 0.35rem);
  right: max(0.75rem, var(--safe-right));
}

.dash-profile-menu[data-anchor="bottom"] {
  bottom: calc(5.25rem + var(--safe-bottom));
  right: max(0.75rem, var(--safe-right));
}

@keyframes profileMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dash-profile-menu__user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.85rem 0.65rem;
  border-bottom: 1px solid var(--surface-3);
  margin-bottom: 0.25rem;
}

.dash-profile-menu__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(247, 147, 26, 0.15);
  border: 1px solid rgba(247, 147, 26, 0.35);
  color: var(--btc);
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-profile-menu__meta {
  min-width: 0;
}

.dash-profile-menu__name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-profile-menu__email {
  display: block;
  font-size: 0.6875rem;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-profile-menu__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: none;
  background: transparent;
  color: #e5e7eb;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.dash-profile-menu__item svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  color: #9ca3af;
}

.dash-profile-menu__item:hover,
.dash-profile-menu__item:focus-visible {
  background: rgba(247, 147, 26, 0.08);
  color: #fff;
}

.dash-profile-menu__item:hover svg {
  color: var(--btc);
}

.dash-profile-menu__item--danger {
  color: #f87171;
  border-top: 1px solid var(--surface-3);
  margin-top: 0.2rem;
  padding-top: 0.8rem;
}

.dash-profile-menu__item--danger svg {
  color: #f87171;
}

.dash-profile-menu__item--danger:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

/* Welcome block */
.dash-welcome {
  margin-bottom: 1.25rem;
}

.dash-welcome h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem;
  line-height: 1.25;
}

.dash-welcome-meta {
  font-size: 0.8125rem;
  color: var(--btc);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.dash-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.dash-market-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  color: #d1d5db;
}

.dash-market-badge .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.dash-invest-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--btc);
  color: #111;
  font-size: 0.8125rem;
  font-weight: 600;
}

.dash-invest-cta:hover {
  background: var(--btc-dark);
}

/* Mobile balance card */
.dash-balance-card {
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 1rem;
  padding: 1.15rem 1.15rem 1rem;
  margin-bottom: 1rem;
}

.dash-balance-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.dash-balance-card__title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
}

.dash-balance-card__title svg {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--btc);
}

.dash-balance-hide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  border-radius: 0.375rem;
}

.dash-balance-hide svg {
  width: 1.15rem;
  height: 1.15rem;
}

.dash-balance-card__amount {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.2rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.dash-balance-card__btc {
  font-size: 0.875rem;
  color: var(--btc);
  font-weight: 600;
  margin: 0 0 0.85rem;
}

.dash-available-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ade80;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.65rem;
}

.dash-updated {
  font-size: 0.6875rem;
  color: #6b7280;
  margin: 0 0 1rem;
}

.dash-balance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.dash-bal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--surface-3);
  background: #0f1419;
  color: #e5e7eb;
  font-size: 0.875rem;
  font-weight: 600;
}

.dash-bal-btn:hover {
  border-color: rgba(247, 147, 26, 0.35);
  background: rgba(247, 147, 26, 0.06);
}

body.balance-hidden .dash-balance-card__amount,
body.balance-hidden .dash-balance-card__btc,
body.balance-hidden [data-balance-usd],
body.balance-hidden [data-balance-btc] {
  filter: blur(6px);
  user-select: none;
}

/* Mobile metrics grid */
.dash-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.dash-metric {
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 0.85rem;
  padding: 0.85rem;
  min-height: 5.5rem;
}

.dash-metric__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.dash-metric__label {
  font-size: 0.6875rem;
  color: #9ca3af;
  line-height: 1.3;
}

.dash-metric__icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.dash-metric__icon--green { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.dash-metric__icon--yellow { background: rgba(234, 179, 8, 0.15); color: #facc15; }
.dash-metric__icon--blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.dash-metric__icon--red { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.dash-metric__value {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.dash-metric__sub {
  font-size: 0.625rem;
  color: #6b7280;
  margin: 0.2rem 0 0;
}

/* Bottom tab bar */
.dash-bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  padding: 0.35rem max(0.5rem, var(--safe-right)) calc(0.35rem + var(--safe-bottom)) max(0.5rem, var(--safe-left));
  background: rgba(11, 15, 20, 0.96);
  border-top: 1px solid var(--surface-3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  grid-template-columns: 1fr 1fr auto 1fr 1fr;
  align-items: flex-end;
  gap: 0.15rem;
}

@media (max-width: 899px) {
  .dash-bottom-nav {
    display: grid;
  }
}

.dash-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem;
  padding: 0.35rem 0.15rem 0.15rem;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 0.625rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  min-height: 3rem;
}

.dash-tab svg {
  width: 1.35rem;
  height: 1.35rem;
}

.dash-tab.is-active {
  color: var(--btc);
}

.dash-tab.is-active svg {
  stroke: var(--btc);
}

.dash-tab-fab-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin-top: -1.35rem;
  color: #9ca3af;
  font-size: 0.625rem;
}

.dash-tab-fab {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: none;
  background: var(--btc);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(247, 147, 26, 0.45);
  cursor: pointer;
}

.dash-tab-fab svg {
  width: 1.35rem;
  height: 1.35rem;
}

.dash-tab-fab-wrap.is-active {
  color: var(--btc);
}

.dash-tab-fab:active {
  transform: scale(0.96);
}

.dash-tab--profile .dash-tab-profile-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--btc);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-tab--profile .dash-tab-profile-icon svg {
  width: 1rem;
  height: 1rem;
}

.dash-tab--profile.is-active {
  color: var(--btc);
}

/* Sheets */
.dash-sheet {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.dash-sheet.hidden {
  display: none;
}

body.dash-sheet-open {
  overflow: hidden;
}

.dash-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.dash-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 1.25rem 1.25rem 0 0;
  padding: 1.25rem 1.25rem calc(1.25rem + var(--safe-bottom));
  z-index: 1;
  animation: dashSheetUp 0.22s ease;
}

@keyframes dashSheetUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.dash-sheet-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 1rem;
  text-align: center;
}

.dash-sheet-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.dash-sheet-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--surface-3);
  background: #0f1419;
  color: #e5e7eb;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.dash-sheet-link span:first-child {
  width: 1.5rem;
  text-align: center;
  color: var(--btc);
}

.dash-sheet-link--danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
  margin-bottom: 0.5rem;
}

.dash-sheet-cancel {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 0.875rem;
  cursor: pointer;
}

.dash-profile-card {
  text-align: center;
  margin-bottom: 1rem;
}

.dash-profile-avatar-lg {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: rgba(247, 147, 26, 0.15);
  border: 2px solid rgba(247, 147, 26, 0.4);
  color: var(--btc);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dash-profile-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.25rem;
}

.dash-profile-email {
  font-size: 0.8125rem;
  color: #9ca3af;
  margin: 0;
}

@media (max-width: 899px) {
  .dash-home .dashboard-grid {
    gap: 1rem;
  }
}
