/* ===========================
   DASHBOARD LAYOUT
=========================== */
.dash-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.85);
  border-bottom: 1px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
}

.dash-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-logo {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 0 10px #FFD700);
}

.brand-text {
  color: #FFD700;
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 1.2rem;
}

.dash-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Action buttons */
.action-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 215, 0, 0.4);
  background: #FFD700;
  color: #111;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  transition: all 0.25s ease;
  font-size: 0.9rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: 'Orbitron', sans-serif;
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.action-btn.ghost {
  background: transparent;
  color: #fff;
}

.action-btn.ghost:hover {
  background: rgba(255, 215, 0, 0.12);
}

.action-btn.danger {
  background: linear-gradient(180deg, #ffd900, #b8860b);
}

.action-btn.danger:hover {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.7);
}

/* ===========================
   MAIN GRID
=========================== */
.dash-main {
  max-width: 1100px;
  margin: 30px auto 60px;
  padding: 0 20px;
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr;
}

/* ===========================
   CARDS
=========================== */
.stat-card {
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(255, 215, 0, 0.25);
  background: rgba(0, 0, 0, 0.65);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}

.card-title {
  color: #FFD700;
  font-size: 1.5rem;
  margin-bottom: 16px;
  text-shadow: 0 0 12px #FFD700;
  line-height: 1.3;
}

/* ===========================
   REFERRAL SECTION
=========================== */
.ref-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.ref-row label {
  color: #ddd;
  font-weight: 700;
  font-size: 1rem;
}

.ref-input {
  display: flex;
  gap: 10px;
}

.ref-input input {
  flex: 1;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  background: rgba(12, 12, 12, 0.8);
  color: #fff;
  outline: none;
  font-size: 0.9rem;
  min-height: 48px;
  transition: all 0.3s ease;
  font-family: 'Orbitron', sans-serif;
}

.ref-input input:focus {
  border-color: #FFD700;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.mini-btn {
  padding: 12px 16px;
  border-radius: 10px;
  background: #FFD700;
  color: #111;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.4);
  transition: all 0.25s ease;
  font-size: 0.9rem;
  min-height: 48px;
  min-width: 80px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
}

.mini-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.6);
}

.mini-btn.ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.mini-btn.ghost:hover {
  background: rgba(255, 215, 0, 0.15);
}

.muted {
  color: #aaa;
  font-size: 0.95rem;
  line-height: 1.4;
}

.ref-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.kpi {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex: 1;
  min-width: 120px;
}

.kpi-label {
  color: #bbb;
  font-weight: 700;
  font-size: 0.95rem;
}

.kpi-value {
  color: #FFD700;
  font-weight: 900;
  font-size: 2rem;
  text-shadow: 0 0 15px #FFD700;
  line-height: 1;
}

/* ===========================
   WALLET SECTION
=========================== */
.wallet-info {
  margin-top: 16px;
  color: #ddd;
  word-break: break-word;
  font-size: 1rem;
  line-height: 1.5;
  padding: 12px;
  background: rgba(255, 215, 0, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 215, 0, 0.1);
}

/* Hide site navbar on dashboard */
.navbar {
  display: none !important;
}

/* ===========================
   TOAST
=========================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(0, 0, 0, 0.92);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 215, 0, 0.4);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  max-width: 90vw;
  text-align: center;
  font-size: 1rem;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.5);
}

/* ===========================
   RESPONSIVE – TABLET
=========================== */
@media (max-width: 1024px) {
  .dash-main {
    padding: 0 20px;
    gap: 18px;
  }

  .stat-card {
    padding: 22px;
  }

  .card-title {
    font-size: 1.4rem;
  }

  .kpi-value {
    font-size: 1.8rem;
  }
}

/* ===========================
   RESPONSIVE – MOBILE
=========================== */
@media (max-width: 768px) {
  .dash-top {
    padding: 10px 15px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .dash-logo {
    width: 36px;
    height: 36px;
  }

  .brand-text {
    font-size: 1.1rem;
  }

  .dash-actions {
    gap: 8px;
    width: 100%;
    justify-content: flex-end;
    order: 3;
    margin-top: 4px;
  }

  .action-btn {
    padding: 8px 12px;
    font-size: 0.85rem;
    min-height: 40px;
    flex: 1;
  }

  .dash-main {
    grid-template-columns: 1fr;
    margin: 20px auto 40px;
    padding: 0 15px;
    gap: 16px;
  }

  .stat-card {
    padding: 20px;
    border-radius: 14px;
  }

  .card-title {
    font-size: 1.3rem;
    margin-bottom: 14px;
  }

  .ref-input {
    flex-direction: column;
    gap: 8px;
  }

  .ref-input input {
    min-height: 44px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .mini-btn {
    min-height: 44px;
    padding: 12px;
    font-size: 0.9rem;
    width: 100%;
  }

  .ref-stats {
    gap: 15px;
    justify-content: center;
    flex-direction: column;
  }

  .kpi {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    min-width: 100px;
  }

  .kpi-label {
    font-size: 0.9rem;
  }

  .kpi-value {
    font-size: 1.6rem;
  }

  .wallet-info {
    margin-top: 12px;
    padding: 10px;
    font-size: 0.95rem;
  }

  .muted {
    font-size: 0.9rem;
  }

  .toast {
    padding: 12px 18px;
    font-size: 0.95rem;
    bottom: 20px;
    max-width: 85vw;
  }
}

/* ===========================
   RESPONSIVE – SMALL MOBILE
=========================== */
@media (max-width: 480px) {
  .dash-top {
    padding: 8px 12px;
  }

  .dash-logo {
    width: 32px;
    height: 32px;
  }

  .brand-text {
    font-size: 1rem;
  }

  .action-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    min-height: 38px;
  }

  .dash-main {
    padding: 0 12px;
    margin: 15px auto 30px;
    gap: 14px;
  }

  .stat-card {
    padding: 18px;
    border-radius: 12px;
  }

  .card-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .kpi-value {
    font-size: 1.4rem;
  }

  .ref-input input {
    padding: 10px 12px;
    min-height: 42px;
  }

  .mini-btn {
    min-height: 42px;
    padding: 10px;
    font-size: 0.85rem;
  }

  .toast {
    padding: 10px 16px;
    font-size: 0.9rem;
    bottom: 16px;
    border-radius: 10px;
  }
}

/* ===========================
   LANDSCAPE / LOW HEIGHT
=========================== */
@media (max-height: 500px) and (orientation: landscape) {
  .dash-top {
    position: relative;
    padding: 8px 15px;
  }

  .dash-main {
    margin: 15px auto 30px;
  }
}

/* ===========================
   REDUCED MOTION
=========================== */
@media (prefers-reduced-motion: reduce) {
  .action-btn,
  .mini-btn,
  .toast {
    transition: none;
  }

  .action-btn:hover,
  .mini-btn:hover {
    transform: none;
  }
}
