/* ============================================================
   EcoLag AI — components.css
   Buttons · Cards · Inputs · Tags · Modals · Tabs · Misc UI
   ============================================================ */

/* ── BUTTONS ── */
.btn {
  border: none;
  border-radius: var(--r-md);
  padding: 13px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
}
.btn-full  { width: 100%; }
.btn-lg    { padding: 16px 28px; font-size: 15px; border-radius: var(--r-lg); }
.btn-sm    { padding: 7px 13px;  font-size: 11px; border-radius: var(--r-sm); }

.btn-g {
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: white;
  box-shadow: 0 6px 20px rgba(0, 135, 83, 0.3);
}
.btn-g:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0, 135, 83, 0.45); }
.btn-g:active { transform: translateY(0); }

.btn-o {
  background: transparent;
  color: var(--g2);
  border: 2px solid var(--g2);
}
.btn-o:hover { background: rgba(0, 168, 89, 0.1); }

.btn-r {
  background: linear-gradient(135deg, var(--red), #DC2626);
  color: white;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.25);
}
.btn-r:hover { transform: translateY(-1px); }

.btn-y {
  background: var(--y);
  color: #0A1628;
  font-weight: 700;
}
.btn-y:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255, 199, 44, 0.4); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: white; background: rgba(255, 255, 255, 0.08); }

.btn-danger-outline {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger-outline:hover { background: rgba(239, 68, 68, 0.08); }

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

/* ── CARDS ── */
.card {
  background: var(--card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: 20px;
}
.card2 {
  background: var(--card2);
  border-radius: var(--r-lg);
  border: 1px solid var(--border2);
  padding: 22px;
}
.card-hover {
  transition: all 0.2s;
}
.card-hover:hover {
  border-color: rgba(0, 168, 89, 0.3);
  transform: translateY(-2px);
}

/* ── STAT CARD ── */
.stat-card {
  background: var(--card);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  padding: 18px;
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: rgba(0, 168, 89, 0.3);
  transform: translateY(-2px);
}
.stat-val {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 24px;
  margin: 7px 0 4px;
}
.stat-lbl {
  font-size: 11px;
  color: var(--muted);
}
.stat-delta { font-size: 11px; margin-top: 4px; }

/* ── INPUTS ── */
.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-md);
  padding: 13px 16px;
  transition: border-color 0.2s;
}
.input-wrap:focus-within {
  border-color: rgba(0, 168, 89, 0.5);
}
.input-wrap input,
.input-wrap select,
.input-wrap textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 14px;
  color: white;
}
.input-wrap input::placeholder,
.input-wrap textarea::placeholder { color: #3D5475; }
.input-wrap select option         { background: var(--card); }
.input-wrap textarea              { resize: vertical; min-height: 70px; }

.lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px;
  display: block;
}

/* Input error state */
.input-wrap.error { border-color: rgba(239, 68, 68, 0.5); }

/* ── ERROR MESSAGE ── */
.err {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--r-md);
  padding: 11px 15px;
  font-size: 12px;
  color: var(--red);
}

/* ── SUCCESS MESSAGE ── */
.success-msg {
  background: rgba(0, 135, 83, 0.1);
  border: 1px solid rgba(0, 135, 83, 0.3);
  border-radius: var(--r-md);
  padding: 11px 15px;
  font-size: 12px;
  color: var(--g2);
}

/* ── TAGS ── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}
.tag-g { background: rgba(0, 135, 83, 0.15); color: var(--g2);     border: 1px solid rgba(0, 135, 83, 0.25); }
.tag-y { background: rgba(255,199,44, 0.12); color: var(--y);      border: 1px solid rgba(255,199,44, 0.25); }
.tag-r { background: rgba(239, 68, 68, 0.12); color: var(--red);   border: 1px solid rgba(239, 68, 68, 0.25); }
.tag-b { background: rgba(59, 130,246, 0.12); color: var(--blue);  border: 1px solid rgba(59, 130,246, 0.25); }
.tag-o { background: rgba(249,115, 22, 0.12); color: var(--orange);border: 1px solid rgba(249,115, 22, 0.25); }
.tag-p { background: rgba(139, 92,246, 0.12); color: var(--purple);border: 1px solid rgba(139, 92,246, 0.25); }
.tag-sm { font-size: 9px; padding: 2px 8px; }

/* ── PROGRESS BAR ── */
.prog-wrap {
  height: 8px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  overflow: hidden;
}
.prog-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s ease;
}
.prog-wrap.thin  { height: 5px; }
.prog-wrap.thick { height: 11px; }

/* ── MODAL ── */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: 500;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  padding: 20px;
}
.modal.open { display: flex; }
.modal-box {
  background: var(--card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border2);
  padding: 28px;
  max-width: 420px;
  width: 100%;
  animation: fadeUp 0.35s ease;
  max-height: 92vh;
  overflow-y: auto;
}
.modal-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 5px;
}
.modal-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

/* ── TAB BAR ── */
.tab-bar {
  display: flex;
  background: var(--card);
  border-radius: 13px;
  padding: 4px;
  border: 1px solid var(--border);
  width: 100%;
}
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  padding: 9px 6px;
  border-radius: 10px;
  transition: all 0.2s;
}
.tab-btn.active {
  background: var(--g1);
  color: white;
}

/* ── AUTH TABS ── */
.auth-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
}
.auth-tab {
  flex: 1;
  padding: 12px;
  border-radius: 13px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  transition: all 0.2s;
}
.auth-tab.active {
  background: var(--g1);
  color: white;
  box-shadow: 0 4px 14px rgba(0, 135, 83, 0.35);
}

/* ── STEP INDICATOR ── */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 20px;
}
.step-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12px;
  transition: all 0.3s;
  flex-shrink: 0;
}
.step-dot.done    { background: var(--g1);  color: white; }
.step-dot.active  { background: var(--g2);  color: white; box-shadow: 0 0 14px rgba(0, 168, 89, 0.4); }
.step-dot.pending { background: rgba(255, 255, 255, 0.08); color: var(--muted); }
.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.3s;
}
.step-line.done { background: var(--g1); }

/* ── ADDRESS AUTOCOMPLETE ── */
.addr-wrap { position: relative; }
.addr-suggestions {
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  margin-top: 4px;
  overflow: hidden;
  display: none;
  position: absolute;
  left: 0; right: 0;
  z-index: 50;
}
.addr-item {
  padding: 11px 16px;
  cursor: pointer;
  font-size: 13px;
  color: white;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.addr-item:last-child { border-bottom: none; }
.addr-item:hover { background: rgba(0, 135, 83, 0.15); }

/* ── UPLOAD ZONE ── */
.upload-zone {
  border: 2px solid rgba(0, 135, 83, 0.4);
  border-radius: var(--r-lg);
  background: rgba(0, 135, 83, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 200px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.upload-zone:hover {
  border-color: rgba(0, 168, 89, 0.7);
  background: rgba(0, 135, 83, 0.08);
}
.upload-zone.detected {
  border-color: var(--red);
  background: rgba(239, 68, 68, 0.05);
  cursor: default;
  border-style: solid;
}

/* ── LEADERBOARD ROW ── */
.lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 9px;
  transition: all 0.2s;
}
.lb-row:hover { border-color: rgba(0, 168, 89, 0.25); }
.lb-row.me    { border-color: rgba(0, 168, 89, 0.5); background: rgba(0, 135, 83, 0.08); }

/* ── SETTING ROW ── */
.setting-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.setting-row:hover { border-color: rgba(0, 168, 89, 0.3); }
.setting-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

/* ── PROFILE PIC ── */
.profile-pic-wrap { position: relative; width: 88px; height: 88px; margin: 0 auto 6px; }
.profile-pic {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 3px solid var(--g2);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--g1), var(--g2));
}
.profile-pic-btn {
  position: absolute; bottom: 0; right: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--g1);
  border: 2px solid var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

/* ── WALLET CARD ── */
.wallet-bal {
  background: linear-gradient(135deg, #006440, #008753, #00A859);
  border-radius: 22px;
  padding: 26px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 18px;
}
.wallet-bal::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255, 199, 44, 0.1);
}

/* ── REWARD CARD ── */
.reward-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: 10px;
  transition: all 0.2s;
  cursor: pointer;
}
.reward-card:hover     { border-color: rgba(0, 168, 89, 0.3); transform: translateY(-1px); }
.reward-card.disabled  { opacity: 0.5; cursor: not-allowed; }
.reward-card.disabled:hover { transform: none; }

/* ── HERO CARD ── */
.hero-card {
  background: linear-gradient(135deg, #008753 0%, #005a38 55%, #003d26 100%);
  border-radius: 22px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}
.hero-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255, 199, 44, 0.1);
}

/* ── COUNTDOWN ── */
.cd-wrap  { display: flex; gap: 10px; margin: 12px 0; }
.cd-box   { text-align: center; }
.cd-val {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 8px 11px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  color: var(--y);
  min-width: 50px;
  line-height: 1;
}
.cd-lbl {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
}

/* ── COMPLIANCE MINI ── */
.comp-mini {
  background: rgba(0, 135, 83, 0.08);
  border: 1px solid rgba(0, 135, 83, 0.25);
  border-radius: var(--r-md);
  padding: 18px;
  margin-bottom: 14px;
}

/* ── NIN BANNER ── */
.nin-banner {
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.nin-banner.unverified {
  background: rgba(255, 199, 44, 0.06);
  border: 1px solid rgba(255, 199, 44, 0.2);
}
.nin-banner.verified {
  background: rgba(0, 135, 83, 0.08);
  border: 1px solid rgba(0, 135, 83, 0.25);
}
.nin-banner.flagged {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* ── ALERT BOX ── */
.alert-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-md);
}
.alert-warning { background: rgba(255,199,44,0.07);  border: 1px solid rgba(255,199,44,0.18); }
.alert-danger  { background: rgba(239, 68,68,0.07);  border: 1px solid rgba(239, 68,68,0.2); }
.alert-info    { background: rgba( 59,130,246,0.07); border: 1px solid rgba( 59,130,246,0.18); }
.alert-success { background: rgba( 0,135, 83,0.08);  border: 1px solid rgba( 0,135, 83,0.25); }

/* ── AUTH FORM — full width inputs on mobile ── */
@media (max-width: 480px) {
  .auth-wrap { padding: 12px 12px 40px; }
  .auth-form { padding: 20px 16px; }
  .auth-brand { font-size: 20px; }
  .g2.name-grid { grid-template-columns: 1fr; }
}
