@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg: #07090f;
  --surface-1: #0d1117;
  --surface-2: #131b24;
  --surface-3: #1a2535;
  --surface-4: #1e2d40;
  --gold: #c9a84c;
  --gold-light: #e8c968;
  --gold-dark: #a88835;
  --gold-gradient: linear-gradient(135deg, #c9a84c 0%, #e8c968 50%, #c9a84c 100%);
  --gold-glow: 0 0 24px rgba(201, 168, 76, 0.3);
  --gold-a10: rgba(201, 168, 76, 0.10);
  --gold-a20: rgba(201, 168, 76, 0.20);
  --accent: #4f8ef7;
  --text-1: #eef0f8;
  --text-2: #8898a8;
  --text-3: #4a5568;
  --success: #00d4aa;
  --danger: #ff5252;
  --warning: #ffaa44;
  --border: rgba(255, 255, 255, 0.06);
  --border-gold: rgba(201, 168, 76, 0.20);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --sidebar-w: 228px;
  --topbar-h: 64px;
  --t-fast: 0.15s ease;
  --t-mid: 0.25s ease;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--surface-1);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* ── APP SHELL ── */
#app {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
#sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  transition: transform var(--t-mid);
  overflow-y: auto;
}

.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.sidebar-logo img {
  height: 30px;
  width: auto;
}

.sidebar-logo-text {
  font-size: 16px;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.01em;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: border-color var(--t-fast);
}

.sidebar-user:hover {
  border-color: var(--border-gold);
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold-a20);
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.sidebar-user-role {
  font-size: 11px;
  color: var(--text-3);
}

.sidebar-nav {
  flex: 1;
  padding: 8px 10px 16px;
}

.sidebar-nav ul {
  list-style: none;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-3);
  padding: 14px 8px 6px;
  display: block;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast);
  margin-bottom: 2px;
  white-space: nowrap;
}

.sidebar-link:hover {
  background: var(--gold-a10);
  color: var(--text-1);
}

.sidebar-link.active {
  background: var(--gold-a20);
  color: var(--gold-light);
}

.sidebar-link.danger {
  color: #ff7070;
}

.sidebar-link.danger:hover {
  background: rgba(255, 82, 82, 0.08);
  color: var(--danger);
}

.sidebar-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: .7;
}

.sidebar-link:hover .sidebar-icon, .sidebar-link.active .sidebar-icon {
  opacity: 1;
}

/* ── MAIN AREA ── */
#app-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── TOPBAR (mobile) ── */
#topbar {
  height: var(--topbar-h);
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo-text {
  font-size: 16px;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-menu {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px;
  cursor: pointer;
  color: var(--text-2);
  display: flex;
  align-items: center;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.btn-menu:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

.notif-bell {
  color: var(--text-2);
  cursor: pointer;
  padding: 4px;
  transition: color var(--t-fast);
}

.notif-bell:hover {
  color: var(--gold);
}

/* ── CONTENT ── */
#main {
  flex: 1;
  padding: 32px 36px;
  width: 100%;
}

/* ── BOTTOM NAV (mobile) ── */
#bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: var(--surface-1);
  border-top: 1px solid var(--border);
  z-index: 200;
}

.bottom-nav-inner {
  display: flex;
  height: 100%;
}

.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 500;
  transition: color var(--t-fast);
  padding: 6px 4px;
}

.bnav-item:hover, .bnav-item.active {
  color: var(--gold);
}

.bnav-icon {
  width: 20px;
  height: 20px;
}

/* ── SIDEBAR OVERLAY (mobile) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 150;
}

.sidebar-overlay.active {
  display: block;
}

/* ── TOAST ── */
#toast {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--text-1);
  max-width: 320px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t-mid), transform var(--t-mid);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

#toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── AUTH PAGES ── */
body.login-page #sidebar,
body.register-page #sidebar,
body.login-page #bottom-nav,
body.register-page #bottom-nav,
body.login-page #topbar,
body.register-page #topbar {
  display: none !important;
}

body.login-page #app,
body.register-page #app {
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(201, 168, 76, 0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 75%, rgba(79, 142, 247, 0.05) 0%, transparent 50%),
    var(--bg);
}

body.login-page #app-main,
body.register-page #app-main {
  margin-left: 0;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

body.login-page #main,
body.register-page #main {
  width: 100%;
  max-width: 440px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.auth-brand img {
  height: 44px;
  margin-bottom: 10px;
}

.auth-brand-name {
  font-size: 20px;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-brand-tagline {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
}

.auth-welcome {
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}

.auth-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-2);
}

.auth-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  width: 100%;
  transition: border-color var(--t-mid);
}

.auth-card:hover {
  border-color: var(--border-gold);
}

.form-group {
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 7px;
}

.auth-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}

.auth-input:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px var(--gold-a10);
}

.auth-input::placeholder {
  color: var(--text-3);
}

.password-wrap {
  position: relative;
}

.password-wrap .auth-input {
  padding-right: 46px;
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-3);
  font-size: 16px;
  padding: 2px;
}

.btn-toggle-password:hover {
  color: var(--text-2);
}

.auth-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  min-height: 16px;
}

.password-hint {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 5px;
}

.forgot-password {
  text-align: right;
  margin-bottom: 18px;
  margin-top: -6px;
}

.forgot-password a {
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
}

.forgot-password a:hover {
  color: var(--gold-light);
}

.btn-auth-primary {
  width: 100%;
  padding: 13px;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--r-md);
  color: #0d0a02;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: opacity var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.btn-auth-primary:hover:not(:disabled) {
  opacity: .9;
  box-shadow: var(--gold-glow);
  transform: translateY(-1px);
}

.btn-auth-primary:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.auth-divider {
  text-align: center;
  margin: 20px 0;
  color: var(--text-3);
  font-size: 13px;
  position: relative;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 72px);
  height: 1px;
  background: var(--border);
}

.auth-divider::before {
  left: 0;
}

.auth-divider::after {
  right: 0;
}

.btn-auth-secondary {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background var(--t-fast), box-shadow var(--t-fast);
}

.btn-auth-secondary:hover {
  background: var(--gold-a10);
  box-shadow: var(--gold-glow);
}

.auth-security {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-3);
}

.flash-message {
  padding: 11px 15px;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
}

.flash-success {
  background: rgba(0, 212, 170, .1);
  color: var(--success);
  border: 1px solid rgba(0, 212, 170, .2);
}

.flash-error, .flash-danger {
  background: rgba(255, 82, 82, .1);
  color: var(--danger);
  border: 1px solid rgba(255, 82, 82, .2);
}

.flash-warning {
  background: rgba(255, 170, 68, .1);
  color: var(--warning);
  border: 1px solid rgba(255, 170, 68, .2);
}

.flash-info {
  background: rgba(79, 142, 247, .1);
  color: var(--accent);
  border: 1px solid rgba(79, 142, 247, .2);
}

/* ── HOME DASHBOARD ── */
.profile-banner {
  display: none;
}

.profile-compact {
  display: none;
}

#left-sidebar {
  display: block;
  margin-bottom: 0;
}

.balance-section {
  margin-bottom: 24px;
}

.balance-card {
  background: linear-gradient(135deg, var(--surface-2) 0%, #111e14 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
}

.balance-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.balance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.balance-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-2);
}

.btn-hide-balance {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  color: var(--text-3);
  cursor: pointer;
  font-size: 13px;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.btn-hide-balance:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

.balance-display {
  margin: 4px 0 12px;
}

.balance-amount {
  font-size: 38px;
  font-weight: 700;
  color: var(--text-1);
  font-family: 'DM Mono', 'Courier New', monospace;
  letter-spacing: -.01em;
}

.balance-hidden {
  font-size: 38px;
  font-weight: 700;
  color: var(--text-2);
  display: none;
  letter-spacing: .1em;
}

.balance-change {
  display: flex;
  align-items: center;
  gap: 8px;
}

.change-percent {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
}

.change-percent.up {
  background: rgba(0, 212, 170, .12);
  color: var(--success);
}

.change-percent.down {
  background: rgba(255, 82, 82, .12);
  color: var(--danger);
}

.change-label {
  font-size: 12px;
  color: var(--text-3);
}

.quick-menu {
  margin-bottom: 28px;
}

.quick-menu-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 14px;
}

.quick-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.qm-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 14px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: border-color var(--t-mid), background var(--t-mid), transform var(--t-fast), box-shadow var(--t-mid);
}

.qm-card:hover {
  border-color: var(--border-gold);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .22);
}

.qm-icon {
  width: 44px;
  height: 44px;
  background: var(--gold-a10);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
}

.qm-icon svg {
  width: 20px;
  height: 20px;
}

.qm-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.qm-sub {
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
}

.news-ticker-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 16px;
  overflow: hidden;
  margin-bottom: 24px;
}

.ticker-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #fff;
  background: var(--danger);
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.ticker-track {
  display: flex;
  gap: 40px;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-item {
  font-size: 12px;
  color: var(--text-2);
  text-decoration: none;
  flex-shrink: 0;
  transition: color var(--t-fast);
}

.ticker-item:hover {
  color: var(--text-1);
}

.ticker-source {
  font-weight: 600;
  color: var(--gold);
  margin-right: 6px;
}

@keyframes ticker {
  0% {
    transform: translateX(0)
  }

  100% {
    transform: translateX(-50%)
  }
}

.market-widget-section {
  margin-bottom: 28px;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.widget-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
}

.widget-link {
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--t-fast);
}

.widget-link:hover {
  color: var(--gold-light);
}

.widget-pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.widget-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color var(--t-mid);
}

.widget-card:hover {
  border-color: var(--border-gold);
}

.widget-card-head {
  display: grid;
  grid-template-columns: 1fr 1fr 70px;
  gap: 8px;
  padding: 9px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
}

.widget-row {
  display: grid;
  grid-template-columns: 1fr 1fr 70px;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
  align-items: center;
}

.widget-row:last-child {
  border-bottom: none;
}

.widget-row:hover {
  background: var(--surface-2);
}

.coin-pair {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}

.coin-price {
  font-size: 13px;
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
  text-align: right;
}

.coin-chg {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  font-family: 'DM Mono', monospace;
}

.chg-up {
  color: var(--success);
}

.chg-down {
  color: var(--danger);
}

.watchlist-section {
  margin-bottom: 24px;
}

.watchlist-home {
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.watchlist-item {
  display: grid;
  grid-template-columns: 1fr 1fr 70px;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}

.watchlist-item:last-child {
  border-bottom: none;
}

.watchlist-item:hover {
  background: var(--surface-2);
}

.wl-pair {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.wl-price {
  font-size: 13px;
  font-family: 'DM Mono', monospace;
  color: var(--text-1);
  text-align: right;
}

.wl-chg {
  font-size: 12px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  text-align: right;
}

.alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error {
  background: rgba(255, 82, 82, .08);
  border: 1px solid rgba(255, 82, 82, .2);
  color: var(--danger);
}

.alert-warn {
  background: rgba(255, 170, 68, .08);
  border: 1px solid rgba(255, 170, 68, .2);
  color: var(--warning);
}

.alert-icon {
  font-size: 15px;
  flex-shrink: 0;
}

/* ── WALLET PAGE ── */
.wallet-page {
  max-width: 720px;
}

.wallet-balance-card {
  background: linear-gradient(135deg, var(--surface-2) 0%, #111e14 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  padding: 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}

.wallet-balance-card .balance-amount {
  font-size: 40px;
}

.balance-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.wallet-action-btn {
  flex: 1;
  padding: 10px;
  background: var(--gold-a10);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--t-fast), box-shadow var(--t-fast);
}

.wallet-action-btn:hover {
  background: var(--gold-a20);
  box-shadow: var(--gold-glow);
}

.wallet-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.wallet-section:hover {
  border-color: var(--border-gold);
}

.section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-2);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.holdings-list, .trades-list {
  display: flex;
  flex-direction: column;
}

.holding-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}

.holding-card:last-child {
  border-bottom: none;
}

.holding-card:hover {
  background: var(--surface-2);
}

.holding-icon {
  width: 40px;
  height: 40px;
  background: var(--gold-a10);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.holding-info {
  flex: 1;
}

.holding-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.holding-amount {
  font-size: 12px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
}

.holding-values {
  text-align: right;
}

.holding-usd {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
}

.holding-chg {
  font-size: 12px;
  font-weight: 600;
}

.trade-card {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
}

.trade-card:last-child {
  border-bottom: none;
}

.trade-card:hover {
  background: var(--surface-2);
}

.trade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.trade-pair {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.trade-side {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.trade-side.buy {
  background: rgba(0, 212, 170, .12);
  color: var(--success);
}

.trade-side.sell {
  background: rgba(255, 82, 82, .12);
  color: var(--danger);
}

.trade-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.trade-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.trade-label {
  color: var(--text-3);
}

.trade-value {
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
}

.trade-pnl {
  font-weight: 700;
  font-family: 'DM Mono', monospace;
}

.trade-pnl.up {
  color: var(--success);
}

.trade-pnl.down {
  color: var(--danger);
}

.pnl-row {
  grid-column: 1 / -1;
}

.trade-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.trade-time {
  font-size: 11px;
  color: var(--text-3);
}

.btn-close-trade {
  padding: 5px 14px;
  background: rgba(255, 82, 82, .1);
  border: 1px solid rgba(255, 82, 82, .25);
  border-radius: 6px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast);
}

.btn-close-trade:hover {
  background: rgba(255, 82, 82, .2);
}

/* ── SEND PAGE ── */
.send-page {
  max-width: 560px;
}

.send-header {
  margin-bottom: 24px;
}

.send-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
}

.send-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}

.send-step {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
}

.send-step.hidden {
  display: none;
}

.step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 20px;
}

.network-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 10px;
}

.network-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.network-tile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}

.network-tile:hover {
  border-color: var(--border-gold);
  background: var(--surface-3);
  transform: translateY(-1px);
}

.network-tile.selected {
  border-color: var(--gold);
  background: var(--gold-a10);
}

.network-symbol {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}

.network-name {
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 4px;
}

.network-fee {
  font-size: 10px;
  color: var(--text-3);
}

.network-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.network-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
}

.network-list-item:last-child {
  border-bottom: none;
}

.network-list-item:hover {
  background: var(--surface-2);
}

.network-list-icon {
  width: 34px;
  height: 34px;
  background: var(--gold-a10);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
}

.network-list-info {
  flex: 1;
}

.network-list-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.network-list-fee {
  font-size: 12px;
  color: var(--text-3);
}

.network-list-arrow {
  color: var(--text-3);
}

.balance-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-top: 16px;
  font-size: 13px;
}

.balance-bar .balance-label {
  color: var(--text-2);
}

.balance-bar .balance-value {
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
  font-weight: 600;
}

.balance-bar .balance-symbol {
  color: var(--text-3);
  font-size: 12px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 8px;
}

.field-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-left: 8px;
}

.send-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.send-input:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px var(--gold-a10);
}

.input-wrap {
  position: relative;
  margin-bottom: 4px;
}

.btn-paste {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-2);
  padding: 4px 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.btn-paste:hover {
  background: var(--gold-a10);
  color: var(--gold);
}

.field-error {
  font-size: 12px;
  color: var(--danger);
  min-height: 18px;
  margin-top: 4px;
}

.field-ok {
  font-size: 12px;
  color: var(--success);
  min-height: 18px;
  margin-top: 4px;
}

.amount-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.btn-max {
  background: var(--gold-a10);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
  transition: background var(--t-fast);
}

.btn-max:hover {
  background: var(--gold-a20);
}

.insufficient-box {
  background: rgba(255, 82, 82, .08);
  border: 1px solid rgba(255, 82, 82, .2);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-top: 12px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.insuf-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.insuf-title {
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
}

.insuf-msg {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}

.insuf-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-insuf-action {
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.btn-insuf-action:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

.btn-insuf-action.btn-buy {
  border-color: rgba(0, 212, 170, .25);
  color: var(--success);
}

.fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--r-sm);
  margin-top: 12px;
  font-size: 13px;
}

.fee-label {
  color: var(--text-2);
}

.fee-value {
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
  font-weight: 600;
}

.step-nav {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.btn-back {
  padding: 11px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.btn-back:hover {
  border-color: var(--border-gold);
  color: var(--text-1);
}

.btn-next {
  flex: 1;
  padding: 12px;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--r-md);
  color: #0d0a02;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity var(--t-fast), box-shadow var(--t-fast);
}

.btn-next:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.btn-next:hover:not(:disabled) {
  box-shadow: var(--gold-glow);
}

.btn-confirm {
  flex: 1;
  padding: 12px;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--r-md);
  color: #0d0a02;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity var(--t-fast), box-shadow var(--t-fast);
}

.btn-confirm:hover:not(:disabled) {
  box-shadow: var(--gold-glow);
}

.btn-confirm:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.review-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 16px;
}

.review-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}

.review-row:last-child {
  border-bottom: none;
}

.review-row.total {
  background: var(--gold-a10);
}

.review-label {
  font-size: 12px;
  color: var(--text-3);
}

.review-value {
  font-size: 13px;
  color: var(--text-1);
  font-weight: 500;
}

.review-value.mono {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
}

.review-value.highlight {
  color: var(--gold-light);
  font-weight: 700;
}

.confirm-warning {
  background: rgba(255, 170, 68, .08);
  border: 1px solid rgba(255, 170, 68, .2);
  border-radius: var(--r-md);
  padding: 12px 16px;
  font-size: 12px;
  color: var(--warning);
  margin-bottom: 4px;
}

.success-screen {
  text-align: center;
  padding: 16px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(0, 212, 170, .12);
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--success);
  margin: 0 auto 20px;
}

.success-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.success-msg {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 20px;
}

.success-tx {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-bottom: 24px;
  text-align: left;
}

.tx-label {
  font-size: 11px;
  color: var(--text-3);
  display: block;
  margin-bottom: 4px;
}

.tx-value {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  color: var(--text-1);
  word-break: break-all;
}

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ── MARKET PAGE ── */
.market-page {}

.market-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  width: fit-content;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;

}

.market-tab {
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.market-tab.active {
  background: var(--gold-gradient);
  color: #0d0a02;
}

.market-tab:not(.active):hover {
  background: var(--surface-2);
  color: var(--text-1);
}

.market-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.market-search {
  padding: 9px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 240px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.market-search:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px var(--gold-a10);
}

.market-search::placeholder {
  color: var(--text-3);
}

.market-stats {
  font-size: 12px;
  color: var(--text-3);
  margin-left: auto;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

.market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.market-table thead {
  background: var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 10;
}

.market-table th {
  padding: 12px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.market-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color var(--t-fast);
}

.market-table th.sortable:hover {
  color: var(--gold);
}

.market-table th.sort-asc::after {
  content: ' ▲';
  color: var(--gold);
}

.market-table th.sort-desc::after {
  content: ' ▼';
  color: var(--gold);
}

.market-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.market-table tr:last-child td {
  border-bottom: none;
}

.market-table tr:hover td {
  background: var(--surface-2);
}

.td-rank {
  color: var(--text-3);
  font-size: 12px;
}

.td-pair {
  font-weight: 700;
  color: var(--text-1);
}

.td-name {
  color: var(--text-2);
}

.td-price {
  font-family: 'DM Mono', monospace;
  font-weight: 600;
  color: var(--text-1);
}

.td-chg {
  font-family: 'DM Mono', monospace;
  font-weight: 600;
}

.td-vol, .td-mcap {
  font-family: 'DM Mono', monospace;
  color: var(--text-2);
}

.table-loading {
  text-align: center;
  padding: 40px;
  color: var(--text-3);
}

.btn-star {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-3);
  transition: color var(--t-fast);
  padding: 2px;
}

.btn-star:hover, .btn-star.starred {
  color: var(--gold);
}

.btn-chart, .btn-trade-btn {
  padding: 5px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 4px;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}

.btn-chart:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

.btn-trade {
  padding: 5px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  margin-right: 4px;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.btn-trade:hover {
  border-color: rgba(0, 212, 170, .25);
  color: var(--success);
}

/* ── CHART MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: var(--surface-1);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.modal-pair-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-pair-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
}

.modal-price {
  font-size: 18px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  color: var(--text-1);
}

.modal-chg {
  font-size: 13px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  padding: 3px 8px;
  border-radius: 6px;
}

.modal-chg.chg-up {
  background: rgba(0, 212, 170, .1);
  color: var(--success);
}

.modal-chg.chg-down {
  background: rgba(255, 82, 82, .1);
  color: var(--danger);
}

.modal-header-right {
  display: flex;
  gap: 8px;
}

.btn-trade-toggle {
  padding: 7px 14px;
  background: var(--gold-a10);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-sm);
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast);
}

.btn-trade-toggle:hover, .btn-trade-toggle.active {
  background: var(--gold-a20);
}

.modal-close {
  padding: 7px 10px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.modal-close:hover {
  background: rgba(255, 82, 82, .12);
  color: var(--danger);
}

.tf-bar {
  display: flex;
  gap: 4px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.tf-btn {
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
}

.tf-btn:hover {
  border-color: var(--border-gold);
  color: var(--gold);
}

.tf-btn.active {
  background: var(--gold-gradient);
  border-color: var(--gold);
  color: #0d0a02;
}

.modal-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
  min-height: 400px;
}

#chartContainer {
  flex: 1;
  overflow: hidden;
}

.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-3);
  font-size: 14px;
}

.chart-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--danger);
  font-size: 13px;
}

.trade-panel {
  width: 0;
  overflow: hidden;
  transition: width var(--t-mid);
  border-left: 1px solid var(--border);
  background: var(--surface-2);
}

.trade-panel.open {
  width: 260px;
}

.trade-panel-inner {
  padding: 20px;
  width: 260px;
}

.trade-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.trade-mode-note {
  margin-bottom: 14px;
}

.paper-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(255, 170, 68, .12);
  color: var(--warning);
  border: 1px solid rgba(255, 170, 68, .25);
  padding: 2px 8px;
  border-radius: 4px;
}

.live-badge {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 82, 82, .12);
  color: var(--danger);
  border: 1px solid rgba(255, 82, 82, .25);
  padding: 2px 8px;
  border-radius: 4px;
}

.trade-toggle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
}

.side-btn {
  padding: 9px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  color: var(--text-2);
}

.side-btn.buy.active {
  background: rgba(0, 212, 170, .12);
  border-color: rgba(0, 212, 170, .3);
  color: var(--success);
}

.side-btn.sell.active {
  background: rgba(255, 82, 82, .12);
  border-color: rgba(255, 82, 82, .3);
  color: var(--danger);
}

.trade-label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 6px;
  font-weight: 500;
}

.trade-input {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-1);
  font-size: 13px;
  font-family: 'DM Mono', monospace;
  outline: none;
  margin-bottom: 10px;
  transition: border-color var(--t-fast);
}

.trade-input:focus {
  border-color: var(--gold-dark);
}

.trade-estimate {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 14px;
  min-height: 20px;
}

.btn-confirm-trade {
  width: 100%;
  padding: 11px;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--r-sm);
  color: #0d0a02;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity var(--t-fast), box-shadow var(--t-fast);
}

.btn-confirm-trade:hover:not(:disabled) {
  box-shadow: var(--gold-glow);
}

.btn-confirm-trade:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.trade-result {
  margin-top: 12px;
  font-size: 12px;
}

.trade-success {
  background: rgba(0, 212, 170, .08);
  border: 1px solid rgba(0, 212, 170, .2);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  color: var(--success);
  line-height: 1.6;
}

.trade-err {
  color: var(--danger);
}

.paper-note {
  color: var(--text-3);
}

/* ── SETTINGS ── */
.settings-page {
  max-width: 680px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 24px;
}

.settings-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 20px;
  transition: border-color var(--t-mid);
}

.settings-section:hover {
  border-color: var(--border-gold);
}

.settings-section-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.settings-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-2);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-1);
}

.settings-row-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  border-radius: 24px;
  cursor: pointer;
  transition: background var(--t-mid);
  border: 1px solid var(--border);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  top: 3px;
  background: var(--text-3);
  border-radius: 50%;
  transition: transform var(--t-mid), background var(--t-mid);
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--gold-a20);
  border-color: var(--border-gold);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(20px);
  background: var(--gold);
}

/* ── RECEIVE ── */
.receive-page {
  max-width: 500px;
}

.receive-header {
  margin-bottom: 24px;
}

.receive-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-1);
}

.receive-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}

.receive-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  transition: border-color var(--t-mid);
}

.receive-card:hover {
  border-color: var(--border-gold);
}

.receive-network-select {
  margin-bottom: 22px;
}

.receive-select {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.receive-select:focus {
  border-color: var(--gold-dark);
}

.qr-container {
  display: flex;
  justify-content: center;
  margin: 22px 0;
}

.qr-container img {
  border-radius: var(--r-md);
  border: 3px solid var(--surface-3);
}

.address-display {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 16px;
  margin-bottom: 14px;
}

.address-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 7px;
}

.address-value {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--text-1);
  word-break: break-all;
  line-height: 1.5;
}

.btn-copy-address {
  width: 100%;
  padding: 12px;
  background: var(--gold-a10);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t-fast), box-shadow var(--t-fast);
}

.btn-copy-address:hover {
  background: var(--gold-a20);
  box-shadow: var(--gold-glow);
}

/* ── STATES ── */
.empty-state, .loading-state, .error-state {
  padding: 32px;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}

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

.mono {
  font-family: 'DM Mono', monospace;
}

/* ── FOOTER ── */
#footer {
  padding: 24px 32px 16px;
  border-top: 1px solid var(--border);
}

.split.contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.split.contact h3 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 8px;
}

.split.contact p, .split.contact a {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
}

.split.contact a:hover {
  color: var(--gold);
}

.icons.alt {
  list-style: none;
  display: flex;
  gap: 10px;
}

.icons.alt a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.icons.alt a:hover {
  color: var(--gold);
  border-color: var(--border-gold);
  background: var(--gold-a10);
}

#copyright {
  padding: 10px 32px;
  border-top: 1px solid var(--border);
}

#copyright ul {
  list-style: none;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-3);
}

#copyright a {
  color: var(--gold-dark);
  text-decoration: none;
}

/* ── WITHDRAW PAGE ── */
.withdraw-page {
  max-width: 560px;
}

/* ── SUPPORT PAGE ── */
.support-page {
  max-width: 680px;
}

/* ── FORMS (generic) ── */
input, select, textarea {
  font-family: inherit;
}

select option {
  background: var(--surface-2);
  color: var(--text-1);
}

/* ── ANIMATIONS ── */
.fade-in {
  animation: fadeIn .35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

/* ═══════════════════════════════
   RESPONSIVE — MOBILE ≤ 768px
═══════════════════════════════ */
@media (max-width: 768px) {
  #sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }

  #sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, .45);
  }

  #app-main {
    margin-left: 0;
  }

  #topbar {
    display: flex;
  }

  #bottom-nav {
    display: block;
  }

  #main {
    padding: 20px 16px 80px;
    max-width: 100%;
  }

  .quick-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .widget-pages {
    grid-template-columns: 1fr;
  }

  .balance-amount {
    font-size: 28px;
  }

  .market-table td:nth-child(n+7), .market-table th:nth-child(n+7) {
    display: none;
  }

  .modal-box {
    max-height: 95vh;
  }

  .trade-panel.open {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    width: 100% !important;
  }

  #footer {
    padding: 16px 16px 12px;
  }

  #copyright {
    padding: 10px 16px;
  }
}

/* ════════════════════════════════════════
   SETTINGS PAGE
════════════════════════════════════════ */
.settings-wrapper {
  max-width: 780px;
}

.settings-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 28px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}

.settings-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  cursor: pointer;
  transition: border-color var(--t-mid), background var(--t-mid), transform var(--t-fast), box-shadow var(--t-mid);
}

.settings-card:hover {
  border-color: var(--border-gold);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

.settings-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 5px;
}

.settings-card p {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
}

.settings-card.admin-card {
  border-color: rgba(255, 170, 68, .2);
}

.settings-card.admin-card:hover {
  border-color: rgba(255, 170, 68, .5);
}

.settings-card.admin-card h3 {
  color: var(--warning);
}

.settings-panel {
  display: none;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  margin-bottom: 20px;
  position: relative;
  animation: fadeIn .25s ease;
}

.settings-panel.active {
  display: block;
}

.settings-panel h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 20px;
}

.settings-panel h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  margin: 20px 0 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.settings-panel hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.settings-panel label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}

.settings-panel input:not([type=file]), .settings-panel select {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.settings-panel input:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px var(--gold-a10);
}

.settings-panel input[type=file] {
  color: var(--text-2);
  font-size: 13px;
  margin-bottom: 14px;
}

.settings-panel button {
  padding: 10px 20px;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--r-md);
  color: #0d0a02;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: opacity var(--t-fast), box-shadow var(--t-fast);
}

.settings-panel button:hover {
  opacity: .9;
  box-shadow: var(--gold-glow);
}

.settings-panel button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.btn-close-panel {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--surface-3) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  color: var(--text-2) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
  box-shadow: none !important;
}

.btn-close-panel:hover {
  border-color: var(--danger) !important;
  color: var(--danger) !important;
  box-shadow: none !important;
}

#profileMsg, #pwMsg, #twofaMsg {
  font-size: 12px;
  color: var(--success);
  margin-top: -8px;
  margin-bottom: 10px;
  min-height: 16px;
}

#twofaBox {
  margin-top: 14px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

#twofaSecret {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--gold);
  margin-bottom: 12px;
  word-break: break-all;
}

/* Notification list */
#notificationList .notif-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

#notificationList .notif-item:last-child {
  border-bottom: none;
}

#notificationList .notif-unread {
  font-weight: 600;
}

#notificationList .notif-title {
  font-size: 14px;
  color: var(--text-1);
}

#notificationList .notif-body {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

#notificationList .notif-time {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}

/* Wallet hash editor rows */
.wh-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
}

.wh-row label {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
}

.wh-input, .wh-note {
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-1);
  font-size: 13px;
  font-family: 'DM Mono', monospace;
  outline: none;
  margin: 0;
}

.wh-input:focus, .wh-note:focus {
  border-color: var(--gold-dark);
}

/* ════════════════════════════════════════
   RECEIVE PAGE
════════════════════════════════════════ */
.receive-page {
  max-width: 680px;
}

.selector-view {}

.address-view {}

.address-view.hidden, .selector-view.hidden {
  display: none;
}

.network-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.network-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-mid), background var(--t-mid), transform var(--t-fast), box-shadow var(--t-mid);
}

.network-card:hover {
  border-color: var(--border-gold);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.network-card-icon {
  width: 48px;
  height: 48px;
  background: var(--gold-a10);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -.01em;
}

.network-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 3px;
}

.network-card-net {
  font-size: 11px;
  color: var(--text-3);
}

.btn-back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  margin-bottom: 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
}

.btn-back-top:hover {
  border-color: var(--border-gold);
  color: var(--text-1);
}

.crypto-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.crypto-symbol-big {
  width: 56px;
  height: 56px;
  background: var(--gold-a20);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
}

.crypto-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
}

.crypto-network {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 2px;
}

.warning-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 170, 68, .08);
  border: 1px solid rgba(255, 170, 68, .25);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.warning-icon {
  font-size: 18px;
  flex-shrink: 0;
  color: var(--warning);
}

.warning-text {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.warning-text strong {
  color: var(--warning);
}

.qr-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
}

.qr-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 16px;
}

.qr-image {
  width: 180px;
  height: 180px;
  border-radius: var(--r-md);
  border: 3px solid var(--surface-3);
}

.address-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color var(--t-mid);
}

.address-card:hover {
  border-color: var(--border-gold);
}

.address-display {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: var(--text-1);
  word-break: break-all;
  line-height: 1.6;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 16px;
}

.address-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-action {
  flex: 1;
  padding: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t-fast), box-shadow var(--t-fast);
}

.btn-copy {
  background: var(--gold-gradient);
  border: none;
  color: #0d0a02;
}

.btn-copy:hover {
  box-shadow: var(--gold-glow);
}

.btn-share {
  background: transparent;
  border: 1px solid var(--border-gold);
  color: var(--gold);
}

.btn-share:hover {
  background: var(--gold-a10);
}

.copy-feedback {
  font-size: 12px;
  color: var(--success);
  opacity: 0;
  transition: opacity var(--t-mid);
  font-weight: 600;
}

.copy-feedback.show {
  opacity: 1;
}

.explorer-row {
  margin-bottom: 16px;
  text-align: center;
}

.explorer-link {
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
}

.explorer-link:hover {
  color: var(--gold-light);
}

.btn-exchange {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  text-decoration: none;
  transition: border-color var(--t-mid), background var(--t-mid);
}

.btn-exchange:hover {
  border-color: var(--border-gold);
  background: var(--surface-2);
}

.exchange-icon {
  font-size: 22px;
}

.exchange-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

.exchange-sub {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 2px;
}

/* ════════════════════════════════════════
   WITHDRAW PAGE
════════════════════════════════════════ */
.withdraw-page {
  max-width: 620px;
}

.withdraw-header {
  margin-bottom: 24px;
}

.page-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}

.method-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  width: fit-content;
}

.method-tab {
  padding: 9px 20px;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t-fast), color var(--t-fast);
}

.method-tab.active {
  background: var(--gold-gradient);
  color: #0d0a02;
}

.method-tab:not(.active):hover {
  background: var(--surface-2);
  color: var(--text-1);
}

.method-tab.p2p-tab {
  color: var(--accent);
}

.method-panel {
  display: none;
}

.method-panel.active {
  display: block;
  animation: fadeIn .2s ease;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 7px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-input:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px var(--gold-a10);
}

.form-input:read-only {
  color: var(--text-3);
  cursor: default;
}

.form-input::placeholder {
  color: var(--text-3);
}

.form-select {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--t-fast);
}

.form-select:focus {
  border-color: var(--gold-dark);
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
  min-height: 16px;
}

.bank-type-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
  width: fit-content;
}

.toggle-btn {
  padding: 8px 18px;
  background: transparent;
  border: none;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}

.toggle-btn.active {
  background: var(--surface-3);
  color: var(--text-1);
  border: 1px solid var(--border-gold);
}

.bank-dropdown {
  background: var(--surface-2);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  max-height: 200px;
  overflow-y: auto;
  margin-top: -10px;
  z-index: 50;
}

.bank-option {
  padding: 11px 14px;
  font-size: 13px;
  color: var(--text-1);
  cursor: pointer;
  transition: background var(--t-fast);
}

.bank-option:hover {
  background: var(--surface-3);
  color: var(--gold);
}

.account-name-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: -8px;
  margin-bottom: 10px;
  padding: 10px 14px;
  background: rgba(0, 212, 170, .06);
  border: 1px solid rgba(0, 212, 170, .2);
  border-radius: var(--r-md);
}

.check-icon {
  color: var(--success);
  font-size: 15px;
}

.account-name-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
}

.amount-input-wrap {
  position: relative;
}

.amount-input {
  padding-right: 70px;
  font-family: 'DM Mono', monospace;
  font-size: 16px;
}

.btn-max-amount {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gold-a10);
  border: 1px solid var(--border-gold);
  border-radius: 6px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  cursor: pointer;
}

.btn-max-amount:hover {
  background: var(--gold-a20);
}

.conversion-display {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 8px;
  min-height: 20px;
}

.btn-submit {
  width: 100%;
  padding: 13px;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--r-md);
  color: #0d0a02;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity var(--t-fast), box-shadow var(--t-fast);
}

.btn-submit:hover:not(:disabled) {
  box-shadow: var(--gold-glow);
}

.btn-submit:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.result-box {
  margin-top: 16px;
}

.result-success {
  background: rgba(0, 212, 170, .06);
  border: 1px solid rgba(0, 212, 170, .2);
  border-radius: var(--r-lg);
  padding: 20px;
  text-align: center;
}

.result-success .success-icon {
  width: 48px;
  height: 48px;
  background: rgba(0, 212, 170, .12);
  border: 2px solid var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--success);
  margin: 0 auto 12px;
}

.result-success .success-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 6px;
}

.result-success .success-msg {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 16px;
}

.success-details {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 12px 16px;
  text-align: left;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row span:first-child {
  color: var(--text-3);
}

.detail-row span:last-child {
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
}

.tx-id {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-2);
}

.result-error {
  background: rgba(255, 82, 82, .08);
  border: 1px solid rgba(255, 82, 82, .2);
  border-radius: var(--r-md);
  padding: 14px;
  color: var(--danger);
  font-size: 13px;
}

/* Linked bank card */
.linked-bank-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.linked-bank-icon {
  font-size: 28px;
}

.linked-bank-info {
  flex: 1;
}

.linked-bank-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.linked-bank-account {
  font-size: 12px;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  margin-top: 2px;
}

.btn-unlink {
  padding: 6px 14px;
  background: rgba(255, 82, 82, .1);
  border: 1px solid rgba(255, 82, 82, .25);
  border-radius: 6px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.balance-display-linked {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.balance-display-linked .balance-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.balance-display-linked .balance-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  font-family: 'DM Mono', monospace;
}

/* Link bank card */
.link-bank-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
}

.link-bank-icon {
  font-size: 40px;
  margin-bottom: 14px;
}

.link-bank-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.link-bank-desc {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 22px;
  line-height: 1.6;
}

.security-note {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════
   ABOUT PAGE — PREMIUM
════════════════════════════════════════ */
.about-page {
  width: 100%;
}

/* Hero */
.about-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-gold);
  padding: 64px 52px;
  margin-bottom: 4px;
  background: linear-gradient(145deg, #0d1420 0%, #0e1c10 60%, #0d1117 100%);
}

.about-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 50%, rgba(201, 168, 76, .13) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 20%, rgba(79, 142, 247, .07) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 80%, rgba(201, 168, 76, .06) 0%, transparent 40%);
}

.about-hero-content {
  position: relative;
  z-index: 1;
  max-width: 580px;
}

.about-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  background: var(--gold-a10);
  border: 1px solid var(--border-gold);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.about-hero-title {
  font-size: 42px;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -.02em;
}

.about-hero-highlight {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-hero-desc {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 32px;
}

.about-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.about-cta-primary {
  padding: 12px 28px;
  background: var(--gold-gradient);
  border-radius: var(--r-md);
  color: #0d0a02;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}

.about-cta-primary:hover {
  opacity: .9;
  box-shadow: var(--gold-glow);
  transform: translateY(-1px);
}

.about-cta-ghost {
  padding: 12px 24px;
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--t-fast), box-shadow var(--t-fast);
}

.about-cta-ghost:hover {
  background: var(--gold-a10);
  box-shadow: var(--gold-glow);
}

/* Stats row */
.about-stats-row {
  display: flex;
  align-items: center;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px 0;
  margin: 20px 0 28px;
}

.about-stat-item {
  flex: 1;
  text-align: center;
  padding: 0 24px;
}

.about-stat-number {
  font-size: 36px;
  font-weight: 800;
  font-family: 'DM Mono', monospace;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.about-stat-plus, .about-stat-suffix {
  font-size: 22px;
  font-weight: 700;
}

.about-stat-divider {
  width: 32px;
  height: 2px;
  background: var(--border-gold);
  margin: 10px auto 8px;
  border-radius: 2px;
}

.about-stat-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  letter-spacing: .02em;
}

.about-stat-sep {
  width: 1px;
  height: 56px;
  background: var(--border);
  flex-shrink: 0;
}

/* Features section */
.about-features-section {
  margin-bottom: 28px;
}

.about-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: 10px;
}

.about-section-heading {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.25;
  margin-bottom: 28px;
  letter-spacing: -.01em;
}

.about-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.about-feature-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-mid), transform var(--t-fast), box-shadow var(--t-mid);
}

.about-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity var(--t-mid);
}

.about-feature-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
}

.about-feature-card:hover::before {
  opacity: 1;
}

.about-feature-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  font-family: 'DM Mono', monospace;
  margin-bottom: 16px;
  letter-spacing: .06em;
}

.about-feature-icon-wrap {
  width: 44px;
  height: 44px;
  background: var(--gold-a10);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin-bottom: 16px;
  transition: background var(--t-fast);
}

.about-feature-card:hover .about-feature-icon-wrap {
  background: var(--gold-a20);
}

.about-feature-card h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 8px;
}

.about-feature-card p {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.65;
}

/* Two-col mission + team */
.about-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.about-mission-card, .about-team-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  transition: border-color var(--t-mid);
}

.about-mission-card:hover, .about-team-card:hover {
  border-color: var(--border-gold);
}

.about-mission-card h2, .about-team-card h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-1);
  line-height: 1.3;
  margin-bottom: 16px;
  letter-spacing: -.01em;
}

.about-mission-card p, .about-team-card p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 12px;
}

.about-mission-values {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-value {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  font-weight: 500;
}

.about-value-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

.about-team-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 8px;
  border-bottom: 1px solid var(--border-gold);
  padding-bottom: 2px;
  transition: color var(--t-fast), border-color var(--t-fast);
}

.about-team-cta:hover {
  color: var(--gold-light);
  border-color: var(--gold-light);
}

/* Contact section */
.about-contact-section {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 8px;
}

.about-contact-left {
  padding: 40px 36px;
  background: var(--surface-2);
  border-right: 1px solid var(--border);
}

.about-contact-left h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 12px;
  letter-spacing: -.01em;
}

.about-contact-left p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 24px;
}

.about-contact-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about-contact-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--t-fast);
}

.about-contact-link svg {
  color: var(--gold);
  flex-shrink: 0;
}

.about-contact-link:hover {
  color: var(--text-1);
}

.about-contact-form {
  padding: 40px 36px;
}

.contact-form-group {
  margin-bottom: 18px;
}

.contact-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 7px;
}

.about-contact-form input, .about-contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.about-contact-form input:focus, .about-contact-form textarea:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px var(--gold-a10);
}

.about-contact-form textarea {
  min-height: 110px;
  resize: vertical;
}

.about-contact-form input::placeholder, .about-contact-form textarea::placeholder {
  color: var(--text-3);
}

.btn-send-msg {
  width: 100%;
  padding: 13px;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--r-md);
  color: #0d0a02;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity var(--t-fast), box-shadow var(--t-fast);
}

.btn-send-msg:hover:not(:disabled) {
  opacity: .9;
  box-shadow: var(--gold-glow);
}

.btn-send-msg:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .about-hero {
    padding: 40px 28px;
  }

  .about-hero-title {
    font-size: 30px;
  }

  .about-stats-row {
    flex-wrap: wrap;
    padding: 24px 16px;
    gap: 24px;
  }

  .about-stat-sep {
    display: none;
  }

  .about-stat-item {
    min-width: calc(50% - 24px);
  }

  .about-features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-two-col {
    grid-template-columns: 1fr;
  }

  .about-contact-section {
    grid-template-columns: 1fr;
  }

  .about-contact-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 28px 24px;
  }

  .about-contact-form {
    padding: 28px 24px;
  }
}

@media (max-width: 500px) {
  .about-features-grid {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════
   SUPPORT / CHAT PAGE
════════════════════════════════════════ */
.support-page {
  max-width: 700px;
}

.support-header {
  margin-bottom: 24px;
}

.support-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
}

.support-header p {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}

.chat-container {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 560px;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.chat-agent-avatar {
  width: 36px;
  height: 36px;
  background: var(--gold-a20);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.chat-agent-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

.chat-agent-status {
  font-size: 11px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-agent-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

.chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 1.5;
}

.msg.user {
  align-self: flex-end;
  background: var(--gold-gradient);
  color: #0d0a02;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.msg.bot {
  align-self: flex-start;
  background: var(--surface-2);
  color: var(--text-1);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.msg-time {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 4px;
  align-self: flex-end;
}

.chat-form {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

#chatInput {
  flex: 1;
  padding: 11px 14px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-1);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

#chatInput:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px var(--gold-a10);
}

#chatInput::placeholder {
  color: var(--text-3);
}

.btn-chat-send {
  padding: 11px 20px;
  background: var(--gold-gradient);
  border: none;
  border-radius: var(--r-md);
  color: #0d0a02;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--t-fast), box-shadow var(--t-fast);
}

.btn-chat-send:hover {
  opacity: .9;
  box-shadow: var(--gold-glow);
}

.support-tickets {
  margin-top: 24px;
}

.support-tickets h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 14px;
}

.ticket-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color var(--t-mid);
}

.ticket-card:hover {
  border-color: var(--border-gold);
}

.ticket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.ticket-subject {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
}

.ticket-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 20px;
}

.ticket-badge.open {
  background: rgba(0, 212, 170, .12);
  color: var(--success);
}

.ticket-badge.closed {
  background: var(--surface-3);
  color: var(--text-3);
}

.ticket-preview {
  font-size: 12px;
  color: var(--text-3);
}
/* ════════════════════════════════════════
   COIN ICON SYSTEM
════════════════════════════════════════ */
.coin-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; letter-spacing: -.02em;
  flex-shrink: 0; font-family: 'DM Mono', monospace;
  border: 1px solid transparent;
}
.coin-icon.sm { width: 28px; height: 28px; font-size: 8px; }
.coin-icon.lg { width: 48px; height: 48px; font-size: 13px; }
.coin-icon.btc  { background: rgba(247,147,26,.15); color: #f7931a; border-color: rgba(247,147,26,.3); }
.coin-icon.eth  { background: rgba(98,126,234,.15);  color: #627eea; border-color: rgba(98,126,234,.3); }
.coin-icon.bnb  { background: rgba(243,186,47,.15);  color: #f3ba2f; border-color: rgba(243,186,47,.3); }
.coin-icon.sol  { background: rgba(153,69,255,.15);  color: #9945ff; border-color: rgba(153,69,255,.3); }
.coin-icon.usdt { background: rgba(38,161,123,.15);  color: #26a17b; border-color: rgba(38,161,123,.3); }
.coin-icon.usdc { background: rgba(39,117,202,.15);  color: #2775ca; border-color: rgba(39,117,202,.3); }
.coin-icon.xrp  { background: rgba(0,133,195,.15);   color: #0085c3; border-color: rgba(0,133,195,.3); }
.coin-icon.ada  { background: rgba(74,144,217,.15);  color: #4a90d9; border-color: rgba(74,144,217,.3); }
.coin-icon.doge { background: rgba(194,166,51,.15);  color: #c2a633; border-color: rgba(194,166,51,.3); }
.coin-icon.dot  { background: rgba(230,0,122,.15);   color: #e6007a; border-color: rgba(230,0,122,.3); }
.coin-icon.trx  { background: rgba(235,5,38,.15);    color: #eb0526; border-color: rgba(235,5,38,.3); }
.coin-icon.matic{ background: rgba(130,71,229,.15);  color: #8247e5; border-color: rgba(130,71,229,.3); }
.coin-icon.ltc  { background: rgba(191,191,191,.15); color: #bfbfbf; border-color: rgba(191,191,191,.3); }
.coin-icon.avax { background: rgba(232,65,66,.15);   color: #e84142; border-color: rgba(232,65,66,.3); }
.coin-icon.link { background: rgba(55,91,210,.15);   color: #375bd2; border-color: rgba(55,91,210,.3); }
.coin-icon.default { background: var(--gold-a10); color: var(--gold); border-color: var(--border-gold); }

/* ════════════════════════════════════════
   LIVE TICKER BAR
════════════════════════════════════════ */
#ticker-bar {
  height: 36px; background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  overflow: hidden; flex-shrink: 0;
}
.ticker-bar-inner {
  display: flex; align-items: center; gap: 0;
  animation: ticker-slide 60s linear infinite;
  white-space: nowrap;
}
.ticker-bar-inner:hover { animation-play-state: paused; }
.ticker-coin {
  display: flex; align-items: center; gap: 7px;
  padding: 0 20px; border-right: 1px solid var(--border);
  cursor: default; transition: background var(--t-fast);
}
.ticker-coin:hover { background: var(--surface-2); }
.ticker-coin-symbol { font-size: 12px; font-weight: 700; color: var(--text-1); }
.ticker-coin-price { font-size: 12px; font-family: 'DM Mono', monospace; color: var(--text-1); }
.ticker-coin-chg { font-size: 11px; font-weight: 600; font-family: 'DM Mono', monospace; }
@keyframes ticker-slide { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ════════════════════════════════════════
   Wallet Connect PAGE — FULLY RESPONSIVE
════════════════════════════════════════ */

.wc-page { max-width: 800px; }

.wc-header { margin-bottom: 24px; }
.wc-title  { font-size: 26px; font-weight: 700; color: var(--text-1); }
.wc-sub    { font-size: 14px; color: var(--text-2); margin-top: 4px; }

/* Wallet type picker grid */
.wc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}

.wc-wallet-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}

.wc-wallet-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

.wc-wallet-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  border: 1px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

.wc-wallet-name { font-size: 13px; font-weight: 700; color: var(--text-1); }
.wc-wallet-desc { font-size: 11px; color: var(--text-3); }

/* Connected wallets list */
.wc-connected-section { margin-top: 8px; }

.wc-section-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}

.wc-section-header h3 {
  font-size: 15px; font-weight: 700; color: var(--text-1); margin: 0;
}

.wc-count {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
}

.wc-connected-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
  transition: border-color .15s;
}

.wc-connected-card:hover { border-color: var(--border-gold); }

.wc-card-disabled {
  opacity: .6;
  border-color: rgba(239,68,68,.2) !important;
}

.wc-connected-icon {
  font-size: 24px;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.wc-connected-info { flex: 1; }
.wc-connected-name { font-size: 13px; font-weight: 700; color: var(--text-1); display: flex; align-items: center; gap: 6px; }
.wc-connected-address { font-size: 12px; font-family: 'DM Mono', monospace; color: var(--text-2); margin-top: 2px; }
.wc-connected-meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.wc-label-tag {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-3);
}

.wc-connected-actions {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}

.wc-status-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 10px;
  white-space: nowrap;
}
.wc-status-active   { color: #4ade80; background: rgba(74,222,128,.1); }
.wc-status-disabled { color: #ef4444; background: rgba(239,68,68,.1); }

.wc-remove-btn {
  background: none;
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 6px;
  color: #ef4444;
  padding: 5px 7px;
  cursor: pointer;
  display: flex; align-items: center;
  transition: background .15s;
}
.wc-remove-btn:hover { background: rgba(239,68,68,.1); }

.wc-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
}
.wc-empty-icon  { font-size: 36px; margin-bottom: 10px; }
.wc-empty-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.wc-empty-sub   { font-size: 12px; margin-top: 4px; }

/* ── Modal ── */
.wc-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.72); backdrop-filter: blur(4px);
  z-index: 700; align-items: center; justify-content: center; padding: 20px;
}
.wc-modal-overlay.open { display: flex; }

.wc-modal {
  background: var(--surface-1);
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  width: 100%; max-width: 480px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}

.wc-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.wc-modal-title-row { display: flex; align-items: center; gap: 10px; }
.wc-modal-icon  { font-size: 20px; }
.wc-modal-title { font-size: 15px; font-weight: 700; color: var(--text-1); }
.wc-modal-body  { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.wc-modal-foot  { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px 20px; }

.wc-form-group label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--text-2); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 8px;
}

/* Network grid */
.wc-network-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.wc-net-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-2);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.wc-net-btn:hover, .wc-net-btn.active {
  border-color: var(--net-color, var(--gold));
  color: var(--text-1);
  background: color-mix(in srgb, var(--net-color, var(--gold)) 12%, transparent);
}
.wc-net-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}

.wc-address-input {
  font-family: 'DM Mono', monospace;
  font-size: 12px !important;
  letter-spacing: .02em;
}
.wc-address-hint {
  font-size: 11px; color: var(--text-3); margin-top: 5px;
}

.wc-security-notice {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(74,222,128,.06);
  border: 1px solid rgba(74,222,128,.15);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px; color: var(--text-2);
}
.wc-security-notice svg { color: #4ade80; flex-shrink: 0; margin-top: 1px; }

.wc-connect-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 20px;
  background: var(--gold-gradient);
  border: none; border-radius: 8px;
  color: #0d0a02; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  transition: opacity .15s, box-shadow .15s;
}
.wc-connect-btn:hover { opacity: .9; box-shadow: var(--gold-glow); }
.wc-connect-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Responsive */
@media (max-width: 600px) {
  .wc-grid { grid-template-columns: repeat(2, 1fr); }
  .wc-modal { max-width: 100%; }
  .wc-modal-overlay { align-items: flex-end; padding: 0; }
  .wc-modal { border-radius: var(--r-xl) var(--r-xl) 0 0; }
}
@media (max-width: 380px) {
  .wc-grid { grid-template-columns: 1fr 1fr; }
}


/* Topbar logout button */
.topbar-logout {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-sm);
  border: 1px solid var(--border); color: var(--text-3); text-decoration: none;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.topbar-logout:hover { border-color: var(--danger); color: var(--danger); background: rgba(255,82,82,.08); }

/* Hide ticker on auth pages */
body.login-page #ticker-bar,
body.register-page #ticker-bar { display: none !important; }

/* ════════════════════════════════════════
   EXCHANGE THEME OVERRIDES
   These override the wallet defaults with
   Binance-standard trading app aesthetics.
════════════════════════════════════════ */
:root {
  --bg:        #0b0e11;
  --surface-1: #161a1e;
  --surface-2: #1e2329;
  --surface-3: #2b3139;
  --surface-4: #363c45;
  --text-1:    #eaecef;
  --text-2:    #848e9c;
  --text-3:    #474d57;
  --success:   #0ecb81;
  --danger:    #f6465d;
  --warning:   #f0b90b;
  --border:    rgba(255,255,255,0.08);
  --r-sm:  4px;
  --r-md:  6px;
  --r-lg:  8px;
  --r-xl:  12px;
  --topbar-h: 56px;
}

/* ── Exchange global stats bar ── */
.xstats-bar {
  display: flex; align-items: center; gap: 0;
  background: var(--surface-1); border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 40px; overflow-x: auto; scrollbar-width: none;
  flex-shrink: 0;
}
.xstats-bar::-webkit-scrollbar { display: none; }
.xstat {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px; border-right: 1px solid var(--border);
  white-space: nowrap; flex-shrink: 0;
}
.xstat:first-child { padding-left: 0; }
.xstat-label { font-size: 11px; color: var(--text-3); }
.xstat-value { font-size: 12px; font-weight: 600; color: var(--text-1); font-family: 'DM Mono', monospace; }

/* ── Dashboard layout ── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 12px;
  margin-bottom: 12px;
}
.dash-portfolio {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 24px; position: relative; overflow: hidden;
}
.dash-portfolio::before {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(201,168,76,.08) 0%, transparent 70%);
  pointer-events: none;
}
.dash-section-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-3); margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between;
}
.dash-section-label a { font-size: 11px; color: var(--gold); text-decoration: none; font-weight: 600; letter-spacing: 0; text-transform: none; }
.dash-section-label a:hover { color: var(--gold-light); }

.dash-balance { margin-bottom: 20px; }
.dash-balance-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dash-balance-lbl { font-size: 12px; color: var(--text-2); }
.dash-balance-amount { font-size: 32px; font-weight: 800; color: var(--text-1); font-family: 'DM Mono', monospace; letter-spacing: -.02em; line-height: 1.1; }
.dash-balance-hidden { font-size: 32px; font-weight: 800; color: var(--text-3); display: none; letter-spacing: .1em; }
.dash-pnl { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.dash-pnl-value { font-size: 13px; font-weight: 700; font-family: 'DM Mono', monospace; }
.dash-pnl-label { font-size: 12px; color: var(--text-3); }

.dash-actions { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.dash-action {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 700; font-family: inherit;
  text-decoration: none; cursor: pointer; border: none;
  transition: opacity var(--t-fast), box-shadow var(--t-fast);
}
.dash-action.primary { background: var(--gold-gradient); color: #0d0a02; }
.dash-action.primary:hover { opacity: .88; box-shadow: var(--gold-glow); }
.dash-action.buy  { background: rgba(14,203,129,.15); border: 1px solid rgba(14,203,129,.3); color: var(--success); }
.dash-action.buy:hover { background: rgba(14,203,129,.22); }
.dash-action.sell { background: rgba(246,70,93,.12); border: 1px solid rgba(246,70,93,.28); color: var(--danger); }
.dash-action.sell:hover { background: rgba(246,70,93,.2); }
.dash-action.ghost { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.dash-action.ghost:hover { border-color: var(--border-gold); color: var(--text-1); }

/* Right panel — movers / watchlist */
.dash-right {
  display: flex; flex-direction: column; gap: 12px;
}
.dash-card {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
}
.dash-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.dash-card-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.dash-tabs { display: flex; gap: 2px; }
.dash-tab {
  padding: 4px 10px; background: transparent; border: none;
  font-size: 11px; font-weight: 600; font-family: inherit;
  color: var(--text-3); cursor: pointer; border-radius: 4px;
  transition: background var(--t-fast), color var(--t-fast);
}
.dash-tab.active { background: var(--surface-3); color: var(--text-1); }
.mover-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  transition: background var(--t-fast); cursor: pointer; text-decoration: none;
}
.mover-row:last-child { border-bottom: none; }
.mover-row:hover { background: var(--surface-2); }
.mover-name { flex: 1; font-size: 13px; font-weight: 700; color: var(--text-1); }
.mover-price { font-size: 12px; font-family: 'DM Mono', monospace; color: var(--text-1); margin-right: 4px; }
.mover-chg {
  min-width: 64px; text-align: right;
  font-size: 12px; font-weight: 700; font-family: 'DM Mono', monospace;
}

/* Assets table */
.dash-assets { margin-bottom: 12px; }
.assets-wrap {
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.assets-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.assets-table thead { background: var(--surface-2); }
.assets-table th {
  padding: 10px 16px; text-align: left;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-3); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.assets-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.assets-table tr:last-child td { border-bottom: none; }
.assets-table tr:hover td { background: var(--surface-2); }
.asset-name-cell { display: flex; align-items: center; gap: 10px; }
.asset-symbol { font-size: 13px; font-weight: 700; color: var(--text-1); }
.asset-fullname { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.asset-price { font-family: 'DM Mono', monospace; font-weight: 600; color: var(--text-1); }
.asset-balance { font-family: 'DM Mono', monospace; color: var(--text-1); }
.asset-value { font-family: 'DM Mono', monospace; font-weight: 700; color: var(--text-1); }
.asset-actions { display: flex; gap: 6px; }
.btn-asset-trade, .btn-asset-send {
  padding: 5px 12px; border-radius: var(--r-sm);
  font-size: 11px; font-weight: 700; font-family: inherit; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
}
.btn-asset-trade { background: var(--gold-gradient); border: none; color: #0d0a02; }
.btn-asset-send  { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.btn-asset-send:hover { border-color: var(--border-gold); color: var(--gold); }

/* Market widget for dashboard */
.dash-market { margin-bottom: 12px; }
.dash-market .widget-pages { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.dash-market .widget-row { padding: 8px 16px; }
.dash-market .widget-card-head { padding: 8px 16px; }

/* News ticker on dashboard */
.dash-news { margin-bottom: 12px; }

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .xstats-bar { padding: 0 16px; }
}

/* ════════════════════════════════════════
   ADMIN DASHBOARD
════════════════════════════════════════ */
.adm-page { max-width: 1100px; }

/* Header */
.adm-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.adm-header-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--warning); background: rgba(240,185,11,.1); border: 1px solid rgba(240,185,11,.25);
  padding: 3px 10px; border-radius: 20px; margin-bottom: 8px;
}
.adm-title { font-size: 22px; font-weight: 800; color: var(--text-1); margin-bottom: 4px; }
.adm-subtitle { font-size: 13px; color: var(--text-2); }
.adm-refresh-all {
  display: flex; align-items: center; gap: 7px; padding: 9px 16px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-2); font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.adm-refresh-all:hover { border-color: var(--border-gold); color: var(--gold); }

/* Stats strip */
.adm-stats {
  display: flex; align-items: stretch; gap: 0;
  background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden; margin-bottom: 20px;
}
.adm-stat {
  flex: 1; padding: 16px 20px; border-right: 1px solid var(--border);
  min-width: 0;
}
.adm-stat:last-child { border-right: none; }
.adm-stat-value {
  font-size: 24px; font-weight: 800; font-family: 'DM Mono', monospace;
  color: var(--text-1); line-height: 1; margin-bottom: 4px;
}
.adm-stat-label { font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; }
.adm-stat-mode { display: flex; flex-direction: column; justify-content: center; }
.adm-mode-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-sm); font-size: 12px; font-weight: 700;
  font-family: inherit; cursor: pointer; border: 1px solid;
  transition: opacity var(--t-fast);
}
.adm-mode-btn:hover { opacity: .82; }
.adm-mode-btn.mode-live, .adm-mode-btn:not(.mode-soon) {
  background: rgba(14,203,129,.12); border-color: rgba(14,203,129,.3); color: var(--success);
}
.adm-mode-btn.mode-soon {
  background: rgba(240,185,11,.12); border-color: rgba(240,185,11,.3); color: var(--warning);
}

/* Section tabs */
.adm-tabs {
  display: flex; gap: 2px; margin-bottom: 0;
  background: var(--surface-1); border: 1px solid var(--border);
  border-bottom: none; border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 4px; width: fit-content; flex-wrap: wrap;
}
.adm-tab {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; background: transparent; border: none;
  font-size: 13px; font-weight: 600; font-family: inherit;
  color: var(--text-3); cursor: pointer; border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast); white-space: nowrap;
}
.adm-tab:hover { background: var(--surface-2); color: var(--text-1); }
.adm-tab.active { background: var(--surface-2); color: var(--text-1); }
.adm-tab-badge {
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 8px; min-width: 16px; text-align: center;
}
.adm-tab-badge:empty { display: none; }

/* Sections */
.adm-section { display: none; background: var(--surface-1); border: 1px solid var(--border); border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg); padding: 24px; }
.adm-section.active { display: block; }
.adm-section-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.adm-section-header h2 { font-size: 16px; font-weight: 700; color: var(--text-1); }

/* Buttons */
.adm-btn-ghost {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-2); font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.adm-btn-ghost:hover { border-color: var(--border-gold); color: var(--text-1); }
.adm-btn-sm { padding: 5px 10px; font-size: 11px; }
.adm-btn-primary {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px; background: var(--gold-gradient); border: none;
  border-radius: var(--r-sm); color: #0d0a02; font-size: 12px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  transition: opacity var(--t-fast), box-shadow var(--t-fast);
}
.adm-btn-primary:hover { opacity: .9; box-shadow: var(--gold-glow); }
.adm-btn-danger {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px; background: rgba(246,70,93,.15); border: 1px solid rgba(246,70,93,.3);
  border-radius: var(--r-sm); color: var(--danger); font-size: 12px; font-weight: 700;
  font-family: inherit; cursor: pointer;
  transition: background var(--t-fast);
}
.adm-btn-danger:hover { background: rgba(246,70,93,.25); }
.adm-btn-approve {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; background: rgba(14,203,129,.12); border: 1px solid rgba(14,203,129,.3);
  border-radius: var(--r-sm); color: var(--success); font-size: 11px; font-weight: 700;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast);
}
.adm-btn-approve:hover { background: rgba(14,203,129,.22); }
.adm-btn-reject {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; background: rgba(246,70,93,.1); border: 1px solid rgba(246,70,93,.25);
  border-radius: var(--r-sm); color: var(--danger); font-size: 11px; font-weight: 700;
  font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast);
}
.adm-btn-reject:hover { background: rgba(246,70,93,.2); }

/* Tables */
.adm-table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table thead { background: var(--surface-2); }
.adm-table th {
  padding: 10px 14px; text-align: left;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3); white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.adm-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: var(--surface-2); }
.adm-row-clickable { cursor: pointer; }
.adm-table-loading { text-align: center; padding: 32px; color: var(--text-3); }
.adm-table-empty   { text-align: center; padding: 32px; color: var(--text-3); font-size: 13px; }
.adm-table-error   { text-align: center; padding: 32px; color: var(--danger); font-size: 13px; }

/* Badges */
.adm-badge {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.badge-success { background: rgba(14,203,129,.12); color: var(--success); }
.badge-danger  { background: rgba(246,70,93,.12);  color: var(--danger); }
.badge-warning { background: rgba(240,185,11,.12); color: var(--warning); }
.badge-default { background: var(--surface-3); color: var(--text-2); }

/* Misc */
.adm-mono { font-family: 'DM Mono', monospace; font-size: 12px; }
.adm-date { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.adm-address { font-family: 'DM Mono', monospace; font-size: 11px; color: var(--text-2); }
.adm-address-full { font-size: 11px; word-break: break-all; color: var(--text-2); }
.adm-error { font-size: 12px; color: var(--danger); margin-top: 6px; min-height: 16px; }
.adm-user-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold-a20); border: 1px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--gold);
}
.adm-search {
  padding: 7px 12px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-1); font-size: 13px; font-family: inherit;
  outline: none; width: 220px; transition: border-color var(--t-fast);
}
.adm-search:focus { border-color: var(--gold-dark); }
.adm-search::placeholder { color: var(--text-3); }

/* User detail panel */
.adm-detail-panel {
  margin-top: 20px; background: var(--surface-2);
  border: 1px solid var(--border-gold); border-radius: var(--r-lg); overflow: hidden;
}
.adm-detail-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.adm-detail-header h3 { font-size: 15px; font-weight: 700; color: var(--text-1); }
.adm-user-info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; padding: 16px 20px; background: var(--surface-1); border-bottom: 1px solid var(--border);
}
.adm-info-item {}
.adm-info-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: 4px; }
.adm-info-value { font-size: 13px; font-weight: 600; color: var(--text-1); }
.adm-detail-tabs {
  display: flex; gap: 0; padding: 0 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.adm-detail-tab {
  padding: 10px 14px; background: transparent; border: none;
  border-bottom: 2px solid transparent; color: var(--text-3);
  font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.adm-detail-tab:hover { color: var(--text-1); }
.adm-detail-tab.active { color: var(--gold); border-bottom-color: var(--gold); }
.adm-detail-content { display: none; padding: 16px; }
.adm-detail-content.active { display: block; }
.adm-detail-content .adm-table-wrap { border-radius: var(--r-sm); }

/* Hash form */
.adm-form-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
}
.adm-form-card-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 700; color: var(--text-1); margin-bottom: 16px;
}
.adm-form {}
.adm-form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.adm-form-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 140px; }
.adm-form-group label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.adm-form-action { flex: 0 0 auto; }
.adm-input {
  padding: 9px 12px; background: var(--surface-1); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-1); font-size: 13px; font-family: inherit; outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.adm-input:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px var(--gold-a10); }
.adm-input::placeholder { color: var(--text-3); }
.adm-textarea {
  width: 100%; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-1); font-size: 13px; font-family: inherit;
  outline: none; resize: vertical; min-height: 90px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.adm-textarea:focus { border-color: var(--gold-dark); box-shadow: 0 0 0 3px var(--gold-a10); }

/* Modals */
.adm-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.72); backdrop-filter: blur(4px);
  z-index: 700; align-items: center; justify-content: center; padding: 20px;
}
.adm-modal-overlay.open { display: flex; }
.adm-modal {
  background: var(--surface-1); border: 1px solid var(--border-gold);
  border-radius: var(--r-xl); width: 100%; max-width: 520px;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.adm-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
}
.adm-modal-title { font-size: 15px; font-weight: 700; color: var(--text-1); }
.adm-modal-body { padding: 20px; }
.adm-modal-foot {
  display: flex; gap: 8px; justify-content: flex-end;
  padding: 12px 20px 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .adm-stats { flex-wrap: wrap; }
  .adm-stat  { flex: 1 1 calc(50% - 1px); }
  .adm-tabs  { border-radius: var(--r-md); }
  .adm-section { border-radius: var(--r-md); }
  .adm-form-row { flex-direction: column; }
  .adm-search { width: 100%; }
  .adm-section-header { flex-direction: column; align-items: flex-start; }
}

/* Admin trade summary strip */
.adm-trade-summary {
  display: flex; gap: 0; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-md);
  margin-bottom: 16px; overflow: hidden;
}
.adm-trade-stat {
  flex: 1; padding: 14px 20px; border-right: 1px solid var(--border); text-align: center;
}
.adm-trade-stat:last-child { border-right: none; }

/* ── Filter buttons ── */
.tx-filter-btn {
  background: var(--surface-2, #1c1f2e);
  border: 1px solid var(--border, #2a2d3a);
  border-radius: 20px;
  color: var(--text-3, #5a5e6e);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  cursor: pointer;
  transition: all .15s;
}
.tx-filter-btn.active,
.tx-filter-btn:hover {
  background: var(--accent, #6c63ff);
  color: #fff;
  border-color: var(--accent, #6c63ff);
}

/* ── TX history row ── */
.tx-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border, #2a2d3a);
}
.tx-history-row:last-child { border-bottom: none; }

.tx-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.tx-icon-receive  { background: rgba(74,222,128,.15); color: #4ade80; }
.tx-icon-send     { background: rgba(234,179,8,.15);  color: #eab308; }
.tx-icon-withdraw { background: rgba(239,68,68,.15);  color: #ef4444; }
.tx-icon-trade    { background: rgba(108,99,255,.15); color: #6c63ff; }

.tx-row-info  { flex: 1; }
.tx-row-type  { font-size: 13px; font-weight: 700; color: var(--text-1, #e8eaf0); text-transform: capitalize; }
.tx-row-sub   { font-size: 11px; color: var(--text-3, #5a5e6e); margin-top: 2px; }
.tx-row-right { text-align: right; flex-shrink: 0; }
.tx-row-amount { font-family: 'DM Mono', monospace; font-size: 14px; font-weight: 700; }
.tx-amount-pos { color: #4ade80; }
.tx-amount-neg { color: #ef4444; }
.tx-amount-neu { color: var(--text-2, #9296a5); }

.tx-status-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
}
.pill-completed { background: rgba(74,222,128,.15); color: #4ade80; }
.pill-pending   { background: rgba(234,179,8,.15);  color: #eab308; }
.pill-failed    { background: rgba(239,68,68,.15);  color: #ef4444; }

/* ═══ Support ticket table rows ════════════════════════════════ */
.sup-ticket-row {
  cursor: pointer;
  transition: background 0.12s;
}
.sup-ticket-row:hover  { background: var(--surface-2, #1c1f2e); }
.sup-row-active        { background: var(--surface-2, #1c1f2e); outline: 2px solid var(--accent, #6c63ff); outline-offset: -2px; }
.sup-row-unread td:first-child { border-left: 3px solid var(--accent, #6c63ff); }

.sup-unread-pill {
  display: inline-block;
  background: var(--accent, #6c63ff);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

/* ═══ Live badge on Support tab ════════════════════════════════ */
.adm-badge-live {
  background: #ef4444;
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  text-align: center;
}

/* ═══ Chat panel ═══════════════════════════════════════════════ */
.sup-chat-panel {
  margin-top: 20px;
  border: 1px solid var(--accent, #6c63ff);
  border-radius: 12px;
  background: var(--surface, #13151f);
  display: flex;
  flex-direction: column;
  height: 520px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(108,99,255,0.12);
}

.sup-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface-2, #1c1f2e);
  border-bottom: 1px solid var(--border, #2a2d3a);
  flex-shrink: 0;
}
.sup-chat-meta    { display: flex; flex-direction: column; gap: 2px; }
.sup-chat-user    { font-size: 14px; font-weight: 700; color: var(--text-1, #e8eaf0); }
.sup-chat-subject { font-size: 12px; color: var(--text-2, #9296a5); }
.sup-chat-ticket-id { font-size: 11px; color: var(--text-3, #5a5e6e); margin-top: 2px; }
.sup-chat-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.sup-close-btn    { color: #4ade80 !important; border-color: #4ade80 !important; font-size: 12px; }

/* ── Messages thread ── */
.sup-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.sup-loading { color: var(--text-3, #5a5e6e); font-size: 13px; text-align: center; margin: auto; }

.sup-msg               { display: flex; flex-direction: column; max-width: 68%; }
.sup-msg-user          { align-self: flex-start; }
.sup-msg-staff         { align-self: flex-end; }

.sup-msg-name {
  font-size: 11px;
  color: var(--text-3, #5a5e6e);
  margin-bottom: 3px;
  padding: 0 4px;
}
.sup-msg-staff .sup-msg-name { text-align: right; color: var(--accent, #6c63ff); }

.sup-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}
.sup-msg-user  .sup-msg-bubble { background: var(--surface-2, #1c1f2e); color: var(--text-1, #e8eaf0); border-bottom-left-radius: 4px; }
.sup-msg-staff .sup-msg-bubble { background: var(--accent, #6c63ff);    color: #fff;                  border-bottom-right-radius: 4px; }

.sup-msg-time {
  font-size: 10px;
  color: var(--text-3, #5a5e6e);
  margin-top: 4px;
  padding: 0 4px;
}
.sup-msg-staff .sup-msg-time { text-align: right; }

/* ── Typing indicator ── */
.sup-typing {
  display: flex;
  align-items: center;
  padding: 6px 18px;
  gap: 4px;
  flex-shrink: 0;
}
.sup-typing span {
  width: 6px; height: 6px;
  background: var(--text-3, #5a5e6e);
  border-radius: 50%;
  animation: supBounce 1.2s infinite;
}
.sup-typing span:nth-child(2) { animation-delay: 0.2s; }
.sup-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes supBounce {
  0%,60%,100% { transform: translateY(0); }
  30%         { transform: translateY(-5px); }
}

/* ── Reply form ── */
.sup-reply-form {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border, #2a2d3a);
  background: var(--surface-2, #1c1f2e);
  flex-shrink: 0;
  align-items: flex-end;
}
.sup-reply-input {
  flex: 1;
  background: var(--surface, #13151f);
  border: 1px solid var(--border, #2a2d3a);
  border-radius: 10px;
  color: var(--text-1, #e8eaf0);
  font-size: 13px;
  padding: 10px 14px;
  resize: none;
  font-family: inherit;
  transition: border-color 0.15s;
}
.sup-reply-input:focus { outline: none; border-color: var(--accent, #6c63ff); }
.sup-send-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ── Mobile ── */
@media (max-width: 680px) {
  .sup-chat-panel  { height: 480px; }
  .sup-msg         { max-width: 90%; }
}


/* ── Manual Deposit user dropdown ── */
.dep-user-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-2, #1c1f2e);
  border: 1px solid var(--accent, #6c63ff);
  border-radius: 8px;
  z-index: 100;
  max-height: 180px;
  overflow-y: auto;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.dep-user-option {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border, #2a2d3a);
  color: var(--text-1, #e8eaf0);
  transition: background 0.1s;
}
.dep-user-option:last-child { border-bottom: none; }
.dep-user-option:hover      { background: var(--surface, #13151f); }
.dep-user-option small      { color: var(--text-3, #5a5e6e); font-size: 11px; display:block; margin-top:2px; }

/* ── TX type badges ── */
.tx-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tx-type-send     { background: rgba(234,179,8,.15);  color: #eab308; }
.tx-type-withdraw { background: rgba(239,68,68,.15);  color: #ef4444; }
.tx-type-deposit  { background: rgba(74,222,128,.15); color: #4ade80; }
.tx-type-receive  { background: rgba(74,222,128,.15); color: #4ade80; }

/* ── Approve / Decline action buttons ── */
.btn-approve {
  background: rgba(74,222,128,.15);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,.3);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-approve:hover { background: rgba(74,222,128,.3); }

.btn-decline {
  background: rgba(239,68,68,.12);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.25);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-decline:hover { background: rgba(239,68,68,.25); }

.tx-actions-row { display: flex; gap: 6px; align-items: center; }

html, body {
  height: auto;
  min-height: 100vh;
  overflow-y: auto;          /* was missing — prevents content being clipped */
}

/* App shell must not clip overflow */
#app {
  min-height: 100vh;
  height: auto;
  align-items: flex-start;
}

/* Main content area: scrollable, respects sidebar */
#app-main {
  min-height: 100vh;
  height: auto;
  overflow-y: visible;
}

#main {
  min-height: calc(100vh - 64px);
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

/* ── 2. ADMIN PANEL SCROLL & OVERFLOW ────────────────────────── */
/* The admin page itself must scroll */
.adm-page {
  height: auto;
  min-height: 0;
  overflow: visible;
}

/* Section panels: no fixed height, let content breathe */
.adm-section {
  height: auto;
  overflow: visible;
}

/* Tables must scroll horizontally on small screens */
.adm-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

/* Support chat panel: fixed height only, inner scroll */
.sup-chat-panel,
#supportChatPanel {
  max-height: calc(100vh - 180px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sup-chat-messages,
#supChatMessages {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── 3. PORTFOLIO / WALLET TABLES ────────────────────────────── */
.portfolio-table-wrap,
.wallet-table-wrap,
.tx-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── 4. MODALS: always scrollable on small screens ───────────── */
.adm-modal-overlay,
.modal-overlay {
  overflow-y: auto;
  align-items: flex-start;
  padding: 20px;
}

.adm-modal,
.modal-box {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: auto;
}

/* ── 5. RESPONSIVE BREAKPOINTS ───────────────────────────────── */

/* Tablet — 1024px */
@media (max-width: 1024px) {
  #main {
    padding: 24px 20px;
  }

  .adm-tabs {
    flex-wrap: wrap;
    gap: 4px;
  }

  .adm-tab {
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Hide less-important table columns */
  .adm-table td:nth-child(6),
  .adm-table th:nth-child(6) {
    display: none;
  }
}

/* Mobile — 768px */
@media (max-width: 768px) {
  #main {
    padding: 16px 14px 80px;
  }

  /* Admin tabs scroll horizontally */
  .adm-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    gap: 0;
    border-radius: var(--r-md);
  }

  .adm-tab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 11px;
    padding: 8px 10px;
  }

  /* Stack form rows */
  .adm-form-row {
    flex-direction: column;
  }

  /* Section header stacks */
  .adm-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Stats strip wraps */
  .adm-stats {
    flex-wrap: wrap;
    gap: 8px;
  }

  .adm-stat {
    flex: 1 1 calc(50% - 8px);
    min-width: 120px;
  }

  /* Pending TX table — hide less critical columns */
  #pendingTxGrid td:nth-child(6),
  #pendingTxGrid th:nth-child(6),
  #pendingTxGrid td:nth-child(7),
  #pendingTxGrid th:nth-child(7) {
    display: none;
  }

  /* Support chat panel full height on mobile */
  #supportChatPanel {
    position: fixed;
    inset: 0;
    z-index: 500;
    max-height: 100vh;
    border-radius: 0;
  }

  /* TX action modal full-width */
  #txActionModal .adm-modal {
    max-width: 100%;
    margin: 0;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
  }

  #txActionModal {
    align-items: flex-end;
    padding: 0;
  }

  /* User detail panel full screen */
  #userDetailPanel {
    position: fixed;
    inset: 0;
    z-index: 500;
    border-radius: 0;
    overflow-y: auto;
  }

  /* Approve/decline buttons stack */
  .tx-actions-row {
    flex-direction: column;
    gap: 4px;
  }

  .btn-approve,
  .btn-decline {
    width: 100%;
    text-align: center;
    padding: 6px 8px;
  }

  /* Cards on home page */
  .widget-pages {
    grid-template-columns: 1fr;
  }

  /* Send/receive/withdraw forms */
  .send-page,
  .receive-page,
  .withdraw-page {
    max-width: 100%;
    padding: 0;
  }
}

/* Small mobile — 480px */
@media (max-width: 480px) {
  #main {
    padding: 12px 10px 80px;
  }

  .adm-stat {
    flex: 1 1 100%;
  }

  /* Full-width inputs */
  .adm-input,
  .adm-form-card input,
  .adm-form-card select {
    width: 100%;
    box-sizing: border-box;
  }

  /* Hide all but essential columns in admin tables */
  .adm-table td:nth-child(n+5),
  .adm-table th:nth-child(n+5) {
    display: none;
  }

  /* Show all columns in pending TX (only hide ref/date) */
  #pendingTxGrid td,
  #pendingTxGrid th {
    display: table-cell;
  }

  #pendingTxGrid td:nth-child(6),
  #pendingTxGrid th:nth-child(6),
  #pendingTxGrid td:nth-child(7),
  #pendingTxGrid th:nth-child(7) {
    display: none;
  }

  /* Toast bottom padding for bottom nav */
  .toast { bottom: 72px !important; }
}

/* ── 6. TX TYPE BADGES (used in pending table) ───────────────── */
.tx-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.tx-type-send     { background: rgba(234,179,8,.15);  color: #eab308; }
.tx-type-withdraw { background: rgba(239,68,68,.15);  color: #ef4444; }
.tx-type-receive  { background: rgba(74,222,128,.15); color: #4ade80; }
.tx-type-deposit  { background: rgba(74,222,128,.15); color: #4ade80; }
.tx-type-trade    { background: rgba(108,99,255,.15); color: #6c63ff; }

/* ── 7. APPROVE / DECLINE BUTTONS ────────────────────────────── */
.btn-approve {
  background: rgba(74,222,128,.12);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,.25);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-approve:hover { background: rgba(74,222,128,.25); }
.btn-approve:disabled { opacity: .5; cursor: not-allowed; }

.btn-decline {
  background: rgba(239,68,68,.10);
  color: #ef4444;
  border: 1px solid rgba(239,68,68,.22);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-decline:hover { background: rgba(239,68,68,.22); }
.btn-decline:disabled { opacity: .5; cursor: not-allowed; }

.tx-actions-row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* ── 8. MANUAL DEPOSIT USER DROPDOWN ────────────────────────── */
.dep-user-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-2, #1c1f2e);
  border: 1px solid var(--accent, #6c63ff);
  border-radius: 8px;
  z-index: 100;
  max-height: 180px;
  overflow-y: auto;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.dep-user-option {
  padding: 10px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border, #2a2d3a);
  color: var(--text-1, #e8eaf0);
  transition: background .1s;
}

.dep-user-option:last-child { border-bottom: none; }
.dep-user-option:hover      { background: var(--surface, #13151f); }
.dep-user-option small      { color: var(--text-3, #5a5e6e); font-size: 11px; display: block; margin-top: 2px; }

/* ── 1. VIEWPORT-LOCKED SHELL ────────────────────────────────────
   The entire app stays within the viewport.
   Only #main scrolls — nothing else.
──────────────────────────────────────────────────────────────── */
html {
  height: 100%;
  overflow: hidden;           /* html never scrolls — #main does */
}

body {
  height: 100%;
  overflow: hidden;           /* same — prevent double scrollbars  */
}

#app {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: row;
}

/* Sidebar: full height, scrolls its own nav if needed */
#sidebar {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  flex-shrink: 0;
}

/* Right-side column: fill remaining width, scroll vertically */
#app-main {
  flex: 1;
  height: 100vh;
  overflow: hidden;           /* clips ticker + main as a unit     */
  display: flex;
  flex-direction: column;
  min-width: 0;               /* prevent flex blowout on narrow screens */
}

/* Ticker bar: fixed height, never shrinks */
#ticker-bar {
  flex-shrink: 0;
}

/* ── #main: THE ONLY SCROLL CONTAINER ───────────────────────── */
#main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  min-height: 0;              /* critical: allows flex child to shrink */
  box-sizing: border-box;
}

/* ── 2. MARKET PAGE — FILLS #main, TABLE SCROLLS ─────────────── */
.market-page {
  display: flex;
  flex-direction: column;
  height: 100%;               /* fill the scrolling #main          */
  min-height: 0;
  overflow: visible;          /* let #main handle scroll           */
}

/* Fix: tabs were column layout — force horizontal */
.market-tabs {
  flex-direction: row !important;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: visible;
  flex-shrink: 0;
  align-items: center;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;      /* hide scrollbar on tabs — clean look */
}
.market-tabs::-webkit-scrollbar { display: none; }

/* Meta row (search + stats) never shrinks */
.market-meta {
  flex-shrink: 0;
}

/* Table wrapper: takes all remaining height, scrolls both axes */
.table-wrap {
  flex: 1;
  min-height: 0;              /* critical for flex shrink          */
  overflow-x: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

/* Sticky header stays put while table body scrolls */
.market-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface-2);
}

/* ── 3. ALL OTHER PAGES — CONSISTENT SCROLL BEHAVIOUR ────────── */
/* Every page section can grow and will scroll inside #main */
section,
.wallet-page,
.send-page,
.receive-page,
.withdraw-page,
.support-page,
.settings-wrapper,
.about-page,
.wc-page,
.adm-page {
  min-height: 0;
  overflow: visible;
}

/* ── 4. MOBILE — SIDEBAR OVERLAY, CONTENT FILLS SCREEN ─────────
   At 768px the sidebar slides over content.
   #main gets the full width and still scrolls.
──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }

  #app {
    height: 100vh;
    overflow: hidden;
  }

  /* Sidebar becomes an overlay — doesn't affect layout flow */
  #sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 300;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    width: var(--sidebar-w);
  }

  #sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.55);
  }

  /* app-main fills full width */
  #app-main {
    margin-left: 0;
    width: 100%;
    height: 100vh;
  }

  /* Topbar: fixed height at top */
  #topbar {
    display: flex;
    flex-shrink: 0;
  }

  /* Bottom nav: fixed, so pad #main bottom to compensate */
  #main {
    padding-bottom: 80px;
    padding-top: 16px;
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Market table: hide low-priority columns */
  .market-table td:nth-child(n+6),
  .market-table th:nth-child(n+6) {
    display: none;
  }

  /* Market tabs: compact on mobile */
  .market-tab {
    padding: 7px 14px;
    font-size: 12px;
  }
}

/* ── 5. TABLET 768–1280px ────────────────────────────────────── */
@media (min-width: 769px) and (max-width: 1280px) {
  #main {
    padding: 24px 24px;
  }

  /* Market table: hide least-important columns */
  .market-table td:nth-child(n+8),
  .market-table th:nth-child(n+8) {
    display: none;
  }
}

/* ── 6. SMALL MOBILE — 480px ─────────────────────────────────── */
@media (max-width: 480px) {
  #main {
    padding: 12px 10px 80px;
  }

  .market-search {
    width: 100%;
    box-sizing: border-box;
  }

  .market-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Show only the most important 4 columns */
  .market-table td:nth-child(n+5),
  .market-table th:nth-child(n+5) {
    display: none;
  }

  /* Always show rank, pair, price, change */
  .market-table td:nth-child(1),
  .market-table th:nth-child(1),
  .market-table td:nth-child(2),
  .market-table th:nth-child(2),
  .market-table td:nth-child(3),
  .market-table th:nth-child(3),
  .market-table td:nth-child(4),
  .market-table th:nth-child(4) {
    display: table-cell;
  }
}

/* ── 7. VERY TALL MARKET TABLE — prevent collapse ────────────── */
/* Ensures table area has at least some height even with few rows */
.table-wrap {
  min-height: 200px;
}

/* ── 8. MODAL SCROLL FIX ─────────────────────────────────────── */
/* Modals sit above the locked shell via fixed positioning */
.modal-overlay,
.adm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  overflow-y: auto;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.modal-overlay.open,
.adm-modal-overlay.open {
  display: flex;
}

.modal-box,
.adm-modal {
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: auto;
}

/* ── 9. FOOTER — only renders inside #main scroll ────────────── */
#footer {
  flex-shrink: 0;
}
