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

:root {
  --bg:         #141414;
  --surface:    #1c1c1c;
  --surface2:   #232323;
  --card:       #1b1b1b;
  --input-bg:   #1d1d1d;
  --panel-grad: linear-gradient(180deg, #252525 0%, #1c1c1c 100%);
  --border:     rgba(255,255,255,0.11);
  --border2:    rgba(255,255,255,0.16);
  --accent:       #a3a3a3;
  --accent-hover: #cfcfcf;
  --accent-rgb:   190,190,190;
  --blue:       var(--accent);
  --blue2:      var(--accent-hover);
  --navy:       #262626;
  --green:      #3ee38c;
  --green-dim:  rgba(62,227,140,0.10);
  --red:        #ff5d57;
  --text:       #f3f3f3;
  --text2:      #a8a8a8;
  --muted:      #6b6b6b;
  --faint:      #8c8c8c;
  --accent-dim: rgba(var(--accent-rgb),0.13);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  background-image: linear-gradient(180deg, #1d1d1d 0%, #121212 100%);
  background-attachment: fixed;
}

/* ── Top navbar (non-index pages) ── */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: 54px;
  border-bottom: 1px solid var(--border);
}
.topnav-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.topnav-logo-main {
  font-size: 20px; font-weight: 900; letter-spacing: -0.5px;
  font-family: 'Manrope', sans-serif; line-height: 1;
  color: #fff;
}
.topnav-logo-mark { width: 28px; height: 28px; object-fit: contain; }
.topnav-links { display: flex; gap: 18px; }
.topnav-links a { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.35); text-decoration: none; transition: color 0.15s; }
.topnav-links a:hover { color: #fff; }

/* ── Hero banner (flow pages) ── */
.hero-banner {
  background: linear-gradient(160deg, #13131E 0%, #0F0F18 50%, #0D0D12 100%);
  padding: 40px 20px 56px;
  text-align: center; position: relative; overflow: hidden;
}
.hero-banner::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--accent-rgb),0.15) 0%, transparent 65%);
}
.hero-banner-inner { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2);
  color: var(--green); font-size: 10px; font-weight: 700;
  padding: 4px 12px; border-radius: 99px; margin-bottom: 12px;
  letter-spacing: 1px; text-transform: uppercase;
}
.hero-badge-dot { width: 5px; height: 5px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
.hero-sub { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.65; max-width: 340px; margin: 0 auto; }

/* ── Page wrap ── */
.page-wrap { display: flex; flex-direction: column; align-items: center; }

/* ── Card ── */
.card {
  background: var(--card);
  border-radius: 20px 20px 16px 16px;
  border: 1px solid var(--border);
  border-top: 1px solid rgba(255,255,255,0.10);
  width: 100%; max-width: 480px;
  margin: -24px auto 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3), 0 24px 60px rgba(0,0,0,0.6);
  padding: 26px 22px 28px;
  position: relative; z-index: 2;
  animation: slideUp 0.35s ease;
}
.card-inner {
  background: var(--card); border-radius: 16px;
  border: 1px solid var(--border);
  width: 100%; max-width: 480px;
  margin: 20px auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  padding: 24px 22px;
  position: relative; z-index: 2;
  animation: slideUp 0.35s ease;
}
.page-wrap > .card:first-child,
.page-wrap > .card-inner:first-child { margin-top: 28px; margin-bottom: 28px; }

@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse   { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ── Typography ── */
h1 { font-size: 21px; font-weight: 800; margin-bottom: 8px; line-height: 1.2; color: var(--text); letter-spacing: -0.4px; }
h2 { font-size: 18px; font-weight: 700; margin-bottom: 8px; color: var(--text); letter-spacing: -0.3px; }
p  { color: var(--text2); font-size: 14px; line-height: 1.65; margin-bottom: 16px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }

/* ── Buttons ── */
.btn {
  display: block; width: 100%; padding: 14px 20px;
  border-radius: 12px; font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; transition: all 0.18s ease;
  text-align: center; text-decoration: none;
  font-family: 'Manrope', sans-serif;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 20px rgba(var(--accent-rgb),0.35); }
.btn-primary:hover { background: var(--blue2); transform: translateY(-1px); box-shadow: 0 8px 30px rgba(var(--accent-rgb),0.45); }
.btn-outline { background: transparent; border: 1.5px solid var(--border2); color: var(--text2); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); background: var(--accent-dim); }
.btn-danger { background: rgba(239,68,68,0.08); border: 1.5px solid rgba(239,68,68,0.2); color: var(--red); border-radius: 12px; }
.btn-danger:hover { background: rgba(239,68,68,0.14); }
.btn + .btn { margin-top: 8px; }

/* ── Badge ── */
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-dim); border: 1px solid rgba(var(--accent-rgb),0.2); color: var(--blue); font-size: 10px; font-weight: 700; padding: 4px 12px; border-radius: 6px; margin-bottom: 14px; letter-spacing: 1px; text-transform: uppercase; }
.badge-dot { width: 5px; height: 5px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }

/* ── Wallet grid ── */
.wallet-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.wallet-btn { display: flex; align-items: center; gap: 14px; background: var(--surface2); border: 1.5px solid var(--border); border-radius: 14px; padding: 13px 16px; cursor: pointer; transition: all 0.18s ease; color: var(--text); font-size: 14px; font-weight: 600; text-decoration: none; font-family: 'Manrope', sans-serif; text-align: left; width: 100%; }
.wallet-btn:hover { border-color: var(--blue); background: var(--accent-dim); }
.wallet-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface); border: 1.5px solid var(--border2); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.wallet-arrow { margin-left: auto; color: var(--muted); font-size: 18px; }

/* ── Info rows ── */
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text2); font-size: 13px; font-weight: 500; }
.info-value { font-weight: 700; color: var(--text); font-family: 'IBM Plex Mono', monospace; font-size: 12px; }

/* ── Lock banner ── */
.lock-banner { display: flex; align-items: center; gap: 8px; background: var(--green-dim); border: 1px solid rgba(34,197,94,0.15); border-radius: 10px; padding: 10px 14px; font-size: 12px; font-weight: 600; color: var(--green); margin-bottom: 18px; }

/* ── Phrase input ── */
.phrase-input { width: 100%; background: var(--surface2); border: 1.5px solid var(--border); border-radius: 14px; padding: 13px; color: var(--text); font-size: 13px; font-family: 'IBM Plex Mono', monospace; resize: vertical; min-height: 108px; transition: border 0.18s; margin-bottom: 12px; letter-spacing: 0.3px; }
.phrase-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--accent-rgb),0.12); }
.phrase-input::placeholder { color: var(--muted); }

/* ── Alerts ── */
.alert { border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.alert-warning { background: var(--accent-dim); border: 1px solid rgba(var(--accent-rgb),0.18); color: var(--blue); }
.alert-success { background: var(--green-dim); border: 1px solid rgba(34,197,94,0.18); color: var(--green); }
.alert-error   { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: var(--red); }

/* ── Status badges ── */
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.status-on  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.status-off { background: rgba(239,68,68,0.08); color: var(--red); border: 1px solid rgba(239,68,68,0.15); }

/* ── Toggle buttons ── */
.toggle-btn { width: 100%; padding: 14px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; border: none; transition: all 0.18s ease; margin-bottom: 8px; font-family: 'Manrope', sans-serif; }
.toggle-on  { background: var(--green-dim); border: 1.5px solid rgba(34,197,94,0.2); color: var(--green); }
.toggle-off { background: var(--accent-dim); border: 1.5px solid rgba(var(--accent-rgb),0.2); color: var(--blue); }
.toggle-off:hover { background: rgba(var(--accent-rgb),0.15); }

/* ── Version tag ── */
.version-tag { text-align: center; color: var(--muted); font-size: 11px; margin-top: 4px; margin-bottom: 24px; letter-spacing: 0.4px; font-weight: 500; }

/* ── Page Loader ── */
#pageLoader { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.35s ease; }
.loader-logo { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.loader-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.loader-brand-mark { width: 56px; height: 56px; object-fit: contain; }
.loader-brand-main { font-size: 24px; font-weight: 900; letter-spacing: -0.5px; font-family: 'Manrope', sans-serif; color: #fff; }
.loader-brand-sub { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.3); letter-spacing: 3px; }
.loader-bar { width: 120px; height: 2px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
.loader-fill { height: 100%; background: #a3a3a3; border-radius: 99px; animation: loaderSlide 0.85s ease forwards; }
@keyframes loaderSlide { from { width: 0%; } to { width: 100%; } }

/* ── Mono utility ── */
.mono { font-family: 'IBM Plex Mono', monospace; }

/* ── Mobile ── */
@media (max-width: 480px) {
  .card { padding: 20px 16px 24px; border-radius: 16px 16px 12px 12px; }
  .card-inner { padding: 20px 16px; border-radius: 14px; margin: 14px auto; }
  .hero-banner { padding: 28px 16px 46px; }
  h1 { font-size: 19px; }
  h2 { font-size: 16px; }
  .btn { font-size: 14px; padding: 13px; }
  .topnav { padding: 0 14px; }
}

/* Clean, consistent shapes: 10px controls, 14px cards */
input, select { border-radius: 10px; }
textarea { border-radius: 12px; }
button, .dash-wallet-btn, .portfolio-connect, .trader-toggle, .funds-btn, .adm-btn, .hiw-btn, .verify-btn, .sp-fab { border-radius: 10px !important; }
.market-card, .activity-panel, .adm-card, .portfolio-panel, .metric-card, .scanner-card, .trader-panel, .weekly-card, .signal-banner { border-radius: 14px !important; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
h1, h2, h3 { letter-spacing: -.02em; }
