* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Poppins", sans-serif;
  background: #f3f6fb;
  color: #333;
}

/* Login Page */
.login-body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #3f8efc, #004aad);
}

.login-container {
  width: 100%;
  max-width: 380px;
  background: #fff;
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-box h2 {
  text-align: center;
  color: #004aad;
  margin-bottom: 0.5rem;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.input-group input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  outline: none;
  transition: 0.2s;
}

.input-group input:focus {
  border-color: #3f8efc;
  box-shadow: 0 0 0 3px rgba(63,142,252,0.1);
}

.btn {
  width: 100%;
  padding: 0.7rem;
  background: #004aad;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}

.btn:hover {
  background: #003a8c;
}

.error-box {
  background: #ffe5e5;
  color: #c00;
  padding: 0.6rem;
  border-radius: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

.footer {
  text-align: center;
  font-size: 0.8rem;
  color: #777;
  margin-top: 1rem;
}


* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: #f3f6fb;
  color: #333;
}

/* ============ DASHBOARD ============ */
.dashboard-body {
  display: flex;
  background: #f4f7fc;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 250px;
  background: #004aad;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  text-align: center;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  flex: 1;
}

.sidebar-menu li a {
  display: block;
  padding: 0.9rem 1.2rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s;
}

.sidebar-menu li a i {
  width: 25px;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  background: rgba(255,255,255,0.15);
}

.sidebar .logout {
  background: #e63946;
  text-align: center;
}

/* Main Content */
.main-content {
  margin-left: 250px;
  padding: 1rem 2rem;
  width: calc(100% - 250px);
  transition: margin-left 0.3s ease;
}

/* Topbar */
.topbar {
  display: none; /* hidden on desktop */
  justify-content: space-between;
  align-items: center;
  background: #004aad;
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 0;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.topbar h1 {
  font-size: 1.2rem;
  color: #fff;
}

.topbar-menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.topbar-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.topbar-menu a i {
  margin-right: 4px;
}

.topbar-menu a:hover,
.topbar-menu a.active {
  text-decoration: underline;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.2rem;
}

.card {
  background: #fff;
  border-radius: 0.8rem;
  padding: 1.5rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  text-align: center;
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card h3 {
  color: #004aad;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 1.5rem;
  font-weight: 700;
  color: #333;
}

.welcome-box {
  margin-top: 2rem;
  background: #004aad;
  color: #fff;
  padding: 1.5rem;
  border-radius: 0.8rem;
  text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .dashboard-body {
    flex-direction: column;
  }

  /* Hide Sidebar */
  .sidebar {
    display: none;
  }

  /* Show Topbar as main nav */
  .topbar {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    padding: 1rem;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .welcome-box {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .cards {
    grid-template-columns: 1fr;
  }
}
