* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body {
  background: #0b0b0b;
  color: #fff;
}
a {
  text-decoration: none;
  color: inherit;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: #000;
  border-right: 1px solid #222;
  padding: 30px 20px;
}
.logo {
  color: #00ffcc;
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 40px;
}
.menu a {
  display: block;
  padding: 14px 18px;
  margin-bottom: 10px;
  border-radius: 8px;
  color: #ccc;
}
.menu a:hover,
.menu a.active {
  background: #111;
  color: #00ffcc;
}

/* Main */
.main {
  padding: 30px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}
.topbar h2 {
  font-size: 24px;
}
.user {
  background: #111;
  padding: 10px 18px;
  border-radius: 30px;
  color: #00ffcc;
  font-size: 14px;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-bottom: 40px;
}
.card {
  background: #111;
  padding: 25px;
  border-radius: 14px;
  border: 1px solid #222;
}
.card p {
  color: #aaa;
  font-size: 14px;
}
.card h3 {
  margin-top: 10px;
  color: #00ffcc;
  font-size: 26px;
}

/* Sections */
.section {
  background: #111;
  padding: 30px;
  border-radius: 14px;
  border: 1px solid #222;
  margin-bottom: 30px;
}
.section h3 {
  margin-bottom: 20px;
}

table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 14px;
  text-align: left;
  border-bottom: 1px solid #222;
  color: #bbb;
}
th {
  color: #00ffcc;
  font-weight: 500;
}

.btn {
  display: inline-block;
  padding: 10px 22px;
  background: #00ffcc;
  color: #000;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
}
.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-btn {
  padding: 8px 14px;
  border-radius: 20px;
  background: #111;
  color: #00ffcc;
  font-size: 13px;
  border: 1px solid #222;
}

.nav-btn.danger {
  color: #ff4d4d;
}

@media (max-width: 1000px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* ===== DASHBOARD MOBILE FIX ===== */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 20px;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
}

@media (max-width: 600px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 13px;
  }

  th,
  td {
    padding: 10px;
  }
}


/* MOBILE NAVBAR */
/* ===== MOBILE NAVBAR ===== */
.mobile-nav{
    display:none;
    background:#000;
    padding:15px 20px;
    border-bottom:1px solid #222;
    align-items:center;
    justify-content:space-between;
}

.mobile-logo{
    color:#00ffcc;
    font-size:20px;
    font-weight:700;
}

.hamburger{
    font-size:26px;
    cursor:pointer;
    color:#00ffcc;
}

/* ===== MOBILE SLIDE MENU ===== */
.mobile-menu{
    position:fixed;
    top:0;
    left:-100%;
    width:260px;
    height:100%;
    background:#000;
    padding:30px 20px;
    transition:0.3s ease;
    z-index:1000;
}

.mobile-menu a{
    display:block;
    padding:14px;
    margin-bottom:10px;
    border-radius:8px;
    color:#ccc;
}

.mobile-menu a:hover{
    background:#111;
    color:#00ffcc;
}

.mobile-menu.show{
    left:0;
}

/* ===== RESPONSIVE SWITCH ===== */
@media(max-width:900px){
    .sidebar{
        display:none;
    }

    .mobile-nav{
        display:flex;
    }
}


/* Referral box */
.ref-box{
    background:#0b0b0b;
    border:1px dashed #00ffcc;
    padding:20px;
    border-radius:12px;
}

.ref-link{
    color:#00ffcc;
    word-break:break-all;
    font-size:14px;
}

.copy-ref{
    margin-top:12px;
    display:inline-block;
    padding:10px 18px;
    background:#00ffcc;
    color:#000;
    border-radius:8px;
    font-weight:600;
    cursor:pointer;
}

/* HISTORY SCROLL */
  .layout,.main,.history{
    min-width: 0;
    }
    .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

/* TABLE */
.table-wrap table {
  min-width: 700px;
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th, td {
  white-space: nowrap;
}


.pending{
    color:#856404;
    background:#fff3cd;
    padding:3px 8px;
    border-radius:12px;
    font-size:12px;
}

.approved{
    color:#155724;
    background:#d4edda;
    padding:3px 8px;
    border-radius:12px;
    font-size:12px;
}

.rejected{
    color:#721c24;
    background:#f8d7da;
    padding:3px 8px;
    border-radius:12px;
    font-size:12px;
}