/* ==========================================
   GWALNET STUDENT DASHBOARD
   ========================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
  background-color: #f4f7fc;
  color: #1e293b;
}

/* MAIN LAYOUT WRAPPER */
.main {
  margin-left: 260px; /* Aligns with Sidebar width */
  width: calc(100% - 260px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 120px; /* Space for sticky/fixed header & navigation */
  transition: margin-left 0.3s ease, width 0.3s ease;
}

/* CONTENT CONTAINER */
.content {
  flex: 1;
  padding: 30px;
  padding-bottom: 80px; /* Ensures footer does not hide table content */
  width: 100%;
}

/* DASHBOARD STAT CARDS */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.12);
}

.card i {
  font-size: 38px;
  color: #2563eb;
  margin-bottom: 12px;
}

.card h2 {
  font-size: 32px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.card p {
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.user-welcome-card p {
  color: #2563eb;
  font-weight: 700;
  text-transform: uppercase;
}

/* TABLE SECTION */
.table-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.table-box h2 {
  margin-bottom: 20px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: #2563eb;
  color: #ffffff;
  padding: 12px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 4px 4px 0 0;
}

td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.925rem;
  color: #334155;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background-color: #f8fafc;
}

td a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

td a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.badge {
  background-color: #eff6ff;
  color: #2563eb;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ========================================== */

@media (max-width: 992px) {
  .main {
    margin-left: 0;
    width: 100%;
  }

  .content {
    padding: 20px;
    padding-bottom: 100px;
  }

  .cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 15px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .card h2 {
    font-size: 28px;
  }

  .table-box h2 {
    font-size: 1.15rem;
  }

  table {
    min-width: 550px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 18px;
  }

  .card i {
    font-size: 30px;
  }
}