/* ======================================================
   NAIRATAG HUB — GLOBAL DESIGN SYSTEM & COMPONENT STYLES
   Light Editorial Theme (Linear / ENS / Raycast Aesthetic)
   ====================================================== */

@font-face {
  font-family: 'Poppins Rounded';
  src: url('/hub/PoppinsRounded-Rounded.ttf') format('truetype'),
       url('./PoppinsRounded-Rounded.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('/hub/PoppinsRounded-Rounded.ttf') format('truetype'),
       url('./PoppinsRounded-Rounded.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Core Surface Tokens (Light Editorial) */
  --bg: #f5f4f0;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --bg-inset: #f8f8f6;
  --bg-glass: rgba(255, 255, 255, 0.85);

  /* Borders & Dividers */
  --border: #e4e4e0;
  --border-subtle: #eeeee9;
  --border-focus: #7a45e5;

  /* Typography Colors */
  --text-main: #141414;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  /* Brand & Status Accents */
  --primary: #7a45e5;
  --primary-hover: #6835d0;
  --primary-glow: rgba(122, 69, 229, 0.18);
  --primary-dark: #141414;

  --accent-green: #10b981;
  --accent-green-bg: #e6f9f2;
  --accent-blue: #0284c7;
  --accent-blue-bg: #e0f2fe;
  --accent-gold: #d97706;
  --accent-gold-bg: #fef3c7;
  --accent-purple-bg: #f3e8ff;
  --accent-pink-bg: #fce7f3;
  --red: #ef4444;
  --cyan: #0284c7;
  --gold: #d97706;

  /* Pastel Tag Tokens */
  --tag-blue: #d4e5ff;
  --tag-green: #d8f3d0;
  --tag-pink: #fce4e9;
  --tag-purple: #e6dcfb;
  --tag-peach: #fde8d7;
  --tag-mint: #d0f3ea;
  --tag-lemon: #fef9c3;
  --tag-rose: #fde0f0;

  /* Geometry & Typography */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --font-ui: 'Poppins Rounded', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Poppins Rounded', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Shadows & Transitions */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 12px 32px -4px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-floating: 0 20px 48px -8px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET & BASE ──────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  background-image: none;
  color: var(--text-main);
  font-family: var(--font-ui);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

/* ── MAIN TAB BAR (PILL DOCK) ────────────────────────── */
.tab-bar-wrap {
  display: flex;
  justify-content: center;
  margin: 2.25rem auto 2.5rem auto;
  max-width: 1280px;
  padding: 0 1.5rem;
}

.tab-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  padding: 0.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.tab-btn svg {
  stroke-width: 2.2;
}

.tab-btn:hover {
  color: var(--text-main);
  background: #f5f4f0;
}

.tab-btn.active {
  background: var(--primary-dark);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
  font-weight: 700;
}

.tab-btn.active svg {
  stroke: #ffffff;
}

/* ── MAIN VIEW CONTAINER ───────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 4rem 1.5rem;
}

.tab-pane {
  display: none;
  animation: tabFadeIn 0.28s ease-out forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CARDS & PANELS ────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.card:hover {
  border-color: #d8d8d2;
  box-shadow: var(--shadow-card-hover);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.35rem;
  gap: 1rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.015em;
}

.card-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.45;
}

/* ── SUB-NAVIGATION (MANAGER & EXPLORER) ─────────────── */
.manager-subnav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  overflow-x: auto;
  padding-bottom: 4px;
}

.subnav-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.subnav-btn:hover {
  background: #f8f8f6;
  color: var(--text-main);
  border-color: #d8d8d2;
  transform: translateY(-1px);
}

.subnav-btn.active {
  background: var(--primary-dark);
  color: #ffffff;
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  font-weight: 700;
}

.manager-pane, .explorer-pane {
  display: none;
  animation: tabFadeIn 0.22s ease-out forwards;
}

.manager-pane.active, .explorer-pane.active {
  display: block;
}

/* ── FORM CONTROLS & INPUTS ─────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.45rem;
}

.form-input, .form-select, input[type="text"], input[type="number"] {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  color: var(--text-main);
  font-family: var(--font-ui);
  transition: var(--transition);
  outline: none;
}

.form-input:focus, .form-select:focus, input[type="text"]:focus, input[type="number"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 69, 229, 0.14);
}

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

.input-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* Input with Prefix (₦) */
.input-with-prefix {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.input-with-prefix:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 69, 229, 0.14);
}

.input-prefix-icon {
  padding: 0 0.85rem 0 1.1rem;
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  user-select: none;
}

.input-with-prefix input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  padding: 0.8rem 1rem 0.8rem 0;
  font-size: 1rem;
  color: var(--text-main);
  font-family: var(--font-ui);
  outline: none;
}

/* ── PASTEL TAG CHIPS ───────────────────────────────── */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.chip-tag {
  background: var(--tag-purple);
  color: var(--text-main);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.chip-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.chip-tag[data-tag="alice"], .chip-tag[data-sendtag="asake"] { background: var(--tag-blue); }
.chip-tag[data-tag="bob"], .chip-tag[data-sendtag="bisi"]     { background: var(--tag-green); }
.chip-tag[data-tag="fintech"], .chip-tag[data-sendtag="dev"]  { background: var(--tag-purple); }
.chip-tag[data-tag="micheal"]                                 { background: var(--tag-pink); }

/* ── INSPECT & TELEMETRY BOX ────────────────────────── */
.inspect-box {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}

.inspect-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  gap: 1rem;
}

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

.inspect-label {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.inspect-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
  text-align: right;
}

/* ── BUTTONS ────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  background: var(--primary-dark);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.85rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary:hover:not(:disabled) {
  background: #2d2d2d;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.btn-sm {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-main);
}

.btn-sm:hover {
  background: #f8f8f6;
  border-color: #d8d8d2;
  transform: translateY(-1px);
}

.btn-secondary-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary-link:hover {
  background: #f8f8f6;
  color: var(--text-main);
  border-color: #d8d8d2;
}

/* ── SWAP CONTAINER & DOCK ─────────────────────────── */
.swap-wrapper {
  max-width: 520px;
  margin: 0 auto;
}

.swap-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.85rem;
  box-shadow: var(--shadow-floating);
}

.token-input-card {
  background: #fafaf9;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  transition: var(--transition);
}

.token-input-card:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(122, 69, 229, 0.12);
}

.token-input-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.token-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.token-amount-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: var(--font-mono);
  width: 100%;
}

.token-amount-input::placeholder {
  color: var(--text-dim);
}

.token-select-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.5rem 0.95rem;
  color: var(--text-main);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.token-select-btn:hover {
  background: #f8f8f6;
  border-color: #d8d8d2;
}

.swap-switch-wrap {
  display: flex;
  justify-content: center;
  margin: -0.75rem auto;
  position: relative;
  z-index: 2;
}

.swap-switch-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.swap-switch-btn:hover {
  transform: rotate(180deg) scale(1.08);
  border-color: var(--primary);
  color: var(--primary-hover);
  box-shadow: 0 6px 18px rgba(122, 69, 229, 0.2);
}

.quick-pct-group {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.quick-pct-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font-display);
  transition: var(--transition);
}

.quick-pct-btn:hover {
  background: var(--primary-dark);
  color: #ffffff;
  border-color: var(--primary-dark);
}

.swap-details-box {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  margin: 1.15rem 0;
  font-size: 0.82rem;
}

.swap-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.3rem 0;
  color: var(--text-muted);
}

.swap-detail-val {
  color: var(--text-main);
  font-family: var(--font-mono);
  font-weight: 600;
}

.impact-good { color: var(--accent-green); font-weight: 700; }
.impact-med  { color: var(--accent-gold); font-weight: 700; }
.impact-bad  { color: var(--red); font-weight: 700; }

/* ── LAUNCHPAD GRID & CARDS ─────────────────────────── */
.launchpad-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.75rem;
}

@media (max-width: 960px) {
  .launchpad-grid {
    grid-template-columns: 1fr;
  }
}

.launch-preview-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}

.preview-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.84rem;
}

.preview-stat-label {
  color: var(--text-muted);
}

.preview-stat-val {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
}

/* ── EXPLORER METRICS ROW & TABLES ──────────────────── */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.15rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.metric-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.eco-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: #ffffff;
}

.eco-table th {
  background: var(--bg-inset);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.85rem 1.15rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.eco-table td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.eco-table tr:hover td {
  background: #fafaf9;
}

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

/* Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.activity-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  gap: 1rem;
}

.activity-item:hover {
  background: #fafaf9;
  border-color: #d8d8d2;
  transform: translateY(-1px);
}

/* ── MODALS & TOASTS ────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.16);
  animation: tabFadeIn 0.22s ease-out;
}

#toast-container {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  background: var(--primary-dark);
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: toastIn 0.25s ease-out;
  pointer-events: all;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── BADGES & STATUS INDICATORS ─────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.status-badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  background: #f0f0ee;
  color: var(--text-muted);
}

.status-badge.confirmed, .status-badge.success {
  background: var(--accent-green-bg);
  color: var(--accent-green);
  border: 1px solid rgba(16, 185, 129, 0.25);
}


.status-badge.failed, .status-badge.error {
  background: #fee2e2;
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ── FOOTER ─────────────────────────────────────────── */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.25rem 2rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
}

/* ── DANGER ZONE CARD ───────────────────────────────── */
.danger-card {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-top: 1.25rem;
}

.danger-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 0.75rem;
}

.btn-danger {
  width: 100%;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--red);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-danger:hover {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

/* ============================================================
   SPA PAGE-SWITCH LAYOUT
   Hero and App are two distinct full-page views, not sections.
   ============================================================ */

/* Both pages fill the whole viewport */
#page-hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

#page-app {
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  /* shown via JS: display: flex */
}

/* ── APP TOP BAR ─────────────────────────────────────── */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(245, 244, 240, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  height: 48px;
  flex-shrink: 0;
}

.app-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Back arrow button */
.app-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.app-back-btn:hover {
  background: #f8f8f6;
  color: var(--text-main);
  border-color: #d8d8d2;
  transform: translateX(-2px);
}

/* Brand in app topbar */
.app-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

/* Embedded tab bar inside topbar */
.app-tab-bar {
  flex: 1;
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 0;
  overflow-x: auto;
  /* hide scrollbar on overflow */
  scrollbar-width: none;
}

.app-tab-bar::-webkit-scrollbar { display: none; }

/* Tab buttons when inside app-topbar */
.app-tab-bar .tab-btn {
  background: transparent !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  color: var(--text-muted) !important;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  padding: 0 0.9rem !important;
  height: 100%;
  margin-bottom: -1px;
  box-shadow: none !important;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: var(--transition);
  flex-shrink: 0;
}

.app-tab-bar .tab-btn:hover {
  color: var(--text-main) !important;
  background: rgba(0,0,0,0.03) !important;
}

.app-tab-bar .tab-btn.active {
  color: var(--text-main) !important;
  border-bottom-color: var(--primary) !important;
  font-weight: 700 !important;
}

/* Right side controls in topbar */
.app-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.app-topbar-right .nt-wallet-select {
  height: 30px;
  font-size: 0.75rem;
  padding: 0 0.65rem;
  max-width: 125px;
}

.app-topbar-right .nt-net-pill {
  font-size: 0.68rem;
  padding: 0.22rem 0.6rem;
  gap: 0.35rem;
}

/* Main content scrollable area under topbar */
#page-app .main-content {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* Tab pane animation */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.tab-pane {
  display: none;
  animation: pageFadeIn 0.2s ease-out forwards;
}

.tab-pane.active {
  display: block;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .app-topbar-inner { padding: 0 1rem; }
  .app-tab-bar .tab-btn { padding: 0 0.75rem !important; font-size: 0.82rem !important; }
  .launchpad-grid, .main-content > .grid-2col { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .app-topbar-right .nt-net-pill { display: none; }
  .nt-brand-badge { display: none; }
}

/* ── STEPPER MODAL STYLES ──────────────────────────────── */
.modal-backdrop {
  display: none !important;
}

.stepper {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}
.step-row.active {
  opacity: 1;
}
.step-row.completed {
  opacity: 1;
}
.step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e4e4e7;
  color: #71717a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.step-row.active .step-icon {
  background: #7a45e5;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(122, 69, 229, 0.15);
}
.step-row.completed .step-icon {
  background: #10b981;
  color: #ffffff;
}
.step-row.error .step-icon {
  background: #ef4444;
  color: #ffffff;
}
.step-content {
  display: flex;
  flex-direction: column;
}
.step-heading {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text, #09090b);
}
.step-detail {
  font-size: 0.78rem;
  color: var(--text-muted, #71717a);
}

