* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a, #1e3a8a, #2563eb, #38bdf8);
  background-attachment: fixed;
  color: #1e293b;
  padding: 20px;
}

.dashboard-container {
  max-width: 1300px;
  margin: 0 auto;
}

.dashboard-header {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 28px;
  padding: 30px;
  color: white;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  margin-bottom: 25px;
}

.dashboard-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.dashboard-header p {
  font-size: 1.1rem;
  opacity: 0.95;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 25px 0;
  gap: 15px;
  flex-wrap: wrap;
}

.welcome-box {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  padding: 16px 24px;
  border-radius: 18px;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.logout-btn {
  border: none;
  padding: 13px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ff4d6d, #e11d48);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(225, 29, 72, 0.35);
  transition: 0.3s ease;
}

.logout-btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-bottom: 30px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 25px;
  color: white;
  min-height: 150px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.22);
  transition: 0.35s ease;
}

.stat-card::before {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  top: -35px;
  right: -35px;
}

.stat-card:hover {
  transform: translateY(-6px);
}

.students-card {
  background: linear-gradient(135deg, #7c3aed, #a855f7, #c084fc);
}

.courses-card {
  background: linear-gradient(135deg, #059669, #10b981, #34d399);
}

.stat-card h3 {
  font-size: 1.2rem;
  margin-bottom: 14px;
  font-weight: 700;
}

.stat-card p {
  font-size: 2.3rem;
  font-weight: 800;
}

.main-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.22);
  margin-bottom: 30px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 22px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  display: block;
  width: 60%;
  height: 5px;
  margin-top: 8px;
  border-radius: 20px;
  background: linear-gradient(90deg, #2563eb, #a855f7);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.input-field {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: #f1f5f9;
  font-size: 15px;
  transition: 0.3s ease;
  outline: none;
}

.input-field:focus {
  background: white;
  border-color: #3b82f6;
  box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.15);
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.add-btn,
.update-btn,
.clear-btn,
.search-btn,
.show-btn,
.edit-btn,
.delete-btn {
  border: none;
  outline: none;
  padding: 12px 20px;
  border-radius: 14px;
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s ease;
}

.add-btn {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

.update-btn {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 10px 20px rgba(124, 58, 237, 0.28);
}

.clear-btn {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 10px 20px rgba(245, 158, 11, 0.28);
}

.search-btn {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

.show-btn {
  background: linear-gradient(135deg, #10b981, #34d399);
}

.edit-btn {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  padding: 8px 12px;
  font-size: 13px;
  margin-right: 6px;
}

.delete-btn {
  background: linear-gradient(135deg, #ef4444, #f87171);
  padding: 8px 12px;
  font-size: 13px;
}

.add-btn:hover,
.update-btn:hover,
.clear-btn:hover,
.search-btn:hover,
.show-btn:hover,
.edit-btn:hover,
.delete-btn:hover {
  transform: translateY(-3px);
}

.search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.search-row input {
  flex: 1;
  min-width: 250px;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 20px;
}

.student-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 20px;
  background: white;
}

.student-table thead {
  background: linear-gradient(135deg, #1d4ed8, #2563eb, #3b82f6);
  color: white;
}

.student-table th {
  padding: 16px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
}

.student-table td {
  padding: 15px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.student-table tbody tr {
  transition: 0.25s ease;
}

.student-table tbody tr:hover {
  background: #eff6ff;
}

.empty-state {
  text-align: center;
  padding: 25px;
  font-size: 1rem;
  color: #64748b;
  font-weight: 600;
}

@media (max-width: 768px) {
  .dashboard-header h1 {
    font-size: 2.1rem;
  }

  .main-card {
    padding: 20px;
  }

  .section-title {
    font-size: 1.6rem;
  }
}