/* ================= RESET ================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: auto;
  min-height: 100%;
  font-family: Inter, system-ui, sans-serif;
  background: #0b0f1a;
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  overflow: auto;   /* 🔥 kill body scroll */
  display: block;
  flex-direction: column;
}

/* ================= AUTH ================= */
#auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

#auth input,
#auth button {
  width: 100%;
  max-width: 320px;
}

.link {
  color: #22d3ee;
  cursor: pointer;
}

/* ================= INPUTS ================= */
input, button {
  padding: 12px;
  margin: 8px 0;
  border-radius: 8px;
  border: none;
  font-size: 16px;
}

button {
  background: linear-gradient(135deg,#4f46e5,#06b6d4);
  color: #fff;
  cursor: pointer;
}

/* ================= DASHBOARD ================= */
#dashboard {
  display: none;
  min-height: 100vh;
}

/* ================= SIDEBAR ================= */
aside {
  width: 260px;
  background: #0f172a;
  padding: 16px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: visible;
  transition: left 0.3s ease;
  z-index: 1000;
}

aside h2 {
  color: #22d3ee;
}

nav button {
  width: 100%;
  margin-bottom: 8px;
}

.wallet-mini {
  margin-top: 20px;
  background: #020617;
  padding: 12px;
  border-radius: 10px;
}



/* ================= MAIN ================= */
main {
  margin-left: 260px;
  height: auto;
   min-height: 100vh;            /* 🔥 critical */
  position: relative;
  overflow-y: visible;         /* 🔥 main owns scroll */
}

/* ================= TABS ================= */
.tab {
  position: absolute;
  inset: 0;                 /* 🔥 fills main */
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
  padding-bottom: 80px;     /* footer + mobile nav safety */
  overflow: visible; /* 🔥 no scroll */
}

.tab.active {
  position: absolute;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ================= WALKTHROUGH CARD ================= */
.walkthrough {
  min-height: auto;
}

.walkthrough-card {
  overflow: visible;
  position: center;
}


#continueBtn {
  outline: 2px solid lime;
  position: center;
}




/* ================= CARDS ================= */
.card {
  background: #020617;
  padding: 20px;
  border-radius: 14px;
  margin-bottom: 20px;
}

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

.stat {
  background: #020617;
  padding: 14px;
  border-radius: 12px;
  text-align: center;
}

/* ================= TASK ================= */
.task {
  background: #020617;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 10px;
}

.task.done {
  opacity: 0.6;
  text-decoration: line-through;
}

/* ================= MODAL ================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
}

.hidden {
  display: none;
}

/* ================= CHART ================= */
canvas {
  width: 100% !important;
  height: 260px !important;
}

/* ================= TOGGLE ================= */
.toggleNav {
  display: block;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 1100;
  background: #020617;
  border-radius: 8px;
  padding: 10px 12px;
}

/* ================= MOBILE ================= */
@media (max-width: 900px) {
  aside {
    left: -260px;
  }

  aside.open {
    left: 0;
  }

  main {
    margin-left: 0;
  }

  .toggleNav {
    display: block;
  }
}

@media (max-width: 900px) {
  main {
    margin-left: 0;
    padding-top: 60px;
  }
}

@media (max-width: 900px) {
  .toggleNav {
    display: block;
  }
}



nav button.active {
  background: linear-gradient(135deg,#06b6d4,#4f46e5);
}

.tab {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
}

#node .card {
  border: 1px solid #1f2937;
}

#node .card:hover {
  box-shadow: 0 0 0 1px #22d3ee;
}

/* ================= PRE ================= */
pre {
  background: #020617;
  padding: 15px;
  height: 150px;
  overflow: auto;
}
pre {
  font-size: 12px;
  color: #22c55e;
}

.tab > .task:first-child {
  margin-top: 0;
}


.tab h3 {
  margin-top: 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.tab > .card:first-child {
  margin-top: 0;
}

.footer {
  background: #020617;
  padding: 12px;
  text-align: center;
  border-top: 1px solid #1f2937;
  width: 100%;

  /* make it stick to bottom if content is short */
  position: sticky;
  bottom: 0;
  z-index: 5;
}


/* ================= TAB CONTENT NORMALIZATION ================= */

/* Give all tabs a consistent inner content width */
.tab {
  padding: 19px;
}

/* If a tab does NOT start with a card, visually align it */
.tab > h3,
.tab > .task,
.tab > .grid,
.tab > pre,
.tab > p {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* Ensure tasks sections align vertically like cards */
#tasks,
#referral,
#settings {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Give task items the same horizontal rhythm as cards */
.task {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}


/* Desktop sidebar toggle */
@media (min-width: 901px) {
  aside {
    left: 0;           /* normally visible */
    transition: left 0.3s ease;
  }

  aside.open {
    left: -260px;      /* hides sidebar when toggled */
  }

  main {
    margin-left: 260px;
    transition: margin-left 0.3s ease;
  }

  main.shifted {       /* shift main when sidebar collapsed */
    margin-left: 0;
  }

  .toggleNav {
    left: 270px;       /* keeps toggle button accessible */
  }
}
