body {
  color-scheme: light;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1117;
  --panel: #161a24;
  --glass: #1e2430;
  --text: #f2f5ff;
  --muted: #c8d0ea;
  --accent: #5a7bff;
  --accent-2: #8ba3ff;
}

body[data-theme="dark"] .modal-content,
body[data-theme="dark"] .onboarding-button,
body[data-theme="dark"] .onboarding-nav {
  background: #161a24;
  color: #f2f5ff;
  border-color: #2e3650;
}

body[data-theme="dark"] .bottom-nav {
  background: #131826;
}

body[data-theme="dark"] .balance-button.deposit {
  background: #242c3f;
  color: #f2f5ff;
}

button:not(.onboarding-dot),
.icon-button,
.nav-item,
.balance-button,
.onboarding-button,
.onboarding-nav,
.theme-toggle,
input,
select {
  min-height: 44px;
}

.topbar {
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.theme-toggle {
  justify-self: end;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #d6dcee;
  border-radius: 999px;
  background: #ffffff;
  color: #1b1f2a;
  font-size: 18px;
  font-weight: 600;
}

body[data-theme="dark"] .theme-toggle {
  background: #161a24;
  color: #f2f5ff;
  border-color: #2e3650;
}

.bottom-nav {
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.nav-item {
  min-width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-item span {
  font-size: 11px;
  line-height: 1;
  font-weight: 600;
}

.onboarding-dot {
  min-height: 8px;
  min-width: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.header-icon-row .onboarding-button,
.header-icon-row .theme-toggle {
  min-height: 22px;
  min-width: 22px;
  width: 22px;
  height: 22px;
  padding: 0;
}

.home-center p {
  height: auto;
  text-align: center;
}

.global-loader {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 13, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.global-loader.hidden {
  display: none;
}

.global-loader-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #111827;
  color: #f8fafc;
  font-size: 14px;
  font-weight: 600;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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