@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- Reset & Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #f4f6f9;
  color: #333;
}

/* --- Navigation Bar --- */
.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  height: 60px;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1200px;
  height: 100%;
  /* <--- YE LINE ADD KAREIN */
  margin: 0 auto;
  padding: 0 1.5rem;
  /* <--- PADDING CHANGE KAREIN (0.8rem HATA DEIN) */
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-greeting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #1f2937;
  font-size: 1rem;
}

.user-icon {
  font-size: 1.1rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: #4b5563;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #2563eb;
}

.nav-link.logout-btn {
  color: #dc2626;
}

.nav-link.logout-btn:hover {
  color: #991b1b;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.credit-badge {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.admin-credit-btn {
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: background-color 0.2s ease;
}

.admin-credit-btn:hover {
  background-color: #1d4ed8;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 22px;
  height: 2.5px;
  background-color: #374151;
  border-radius: 2px;
}

/* --- Dashboard Layout & Sidebar --- */
.dashboard-container {
  display: flex;
  min-height: calc(100vh - 60px);
}

.sidebar {
  width: 250px;
  background: #2c3e50;
  padding: 20px 0;
  flex-shrink: 0;
}

.nav-links {
  list-style: none;
}

.nav-links li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 25px;
  color: #ecf0f1;
  text-decoration: none;
  font-size: 15px;
  transition: 0.3s;
}

.nav-links li.active a,
.nav-links li a:hover {
  background: #27ae60;
  color: #ffffff;
}

/* --- Main Content & Cards --- */
.main-content {
  flex: 1;
  padding: 30px;
}

.welcome-box {
  margin-bottom: 25px;
}

.welcome-box h1 {
  font-size: 26px;
  color: #2c3e50;
}

.welcome-box p {
  color: #7f8c8d;
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.credit-card .card-icon {
  background: #e8f8f5;
  color: #27ae60;
}

.pass-card .card-icon {
  background: #eaf2f8;
  color: #2980b9;
}

.status-card .card-icon {
  background: #fef9e7;
  color: #f39c12;
}

.card-info h3 {
  font-size: 14px;
  color: #7f8c8d;
  font-weight: 500;
}

.card-info .count {
  font-size: 24px;
  font-weight: 700;
  color: #2c3e50;
  margin-top: 5px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 5px;
}

.active-status {
  background: #e8f8f5;
  color: #27ae60;
}

/* --- Action Section --- */
.action-section {
  background: #ffffff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.action-section h2 {
  font-size: 18px;
  color: #2c3e50;
  margin-bottom: 15px;
}

.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}

.primary-btn {
  background: #27ae60;
  color: #ffffff;
}

.primary-btn:hover {
  background: #219150;
}

.secondary-btn {
  background: #2980b9;
  color: #ffffff;
}

.secondary-btn:hover {
  background: #1f6391;
}

/* --- Form & Center Box --- */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 70px);
  /* 70px Navbar/Header ki height minus karke poori screen vertical height */
  padding: 20px;
  width: 100%;
}

.center {
  width: 320px;
  margin: 40px auto;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.center .header {
  text-align: center;
  margin: 20px 0 10px;
}

.center h1 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #2c3e50;
}

.inputElement {
  display: flex;
  flex-direction: column;
  padding: 0 25px 20px;
}

.inputText {
  padding: 10px;
  font-size: 13px;
  margin-top: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  outline: none;
}

.inputText:focus {
  border-color: #2563eb;
}

input[type="file"] {
  display: none;
}

label {
  display: block;
  text-transform: uppercase;
  color: #ffffff;
  background: #2563eb;
  text-align: center;
  padding: 10px;
  margin-top: 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

label:hover {
  background-color: #1d4ed8;
}

.inputButton {
  cursor: pointer;
  background-color: #111827;
  color: #ffffff;
  font-size: 13px;
  padding: 10px;
  border-radius: 4px;
  margin-top: 15px;
  border: none;
  font-weight: 500;
  transition: 0.2s;
}

.inputButton:hover {
  background-color: #1f2937;
}

/* Borderless Login Link Styling */
.linkText {
  display: block;
  text-align: center;
  text-decoration: none;
  color: #4b5563;
  font-size: 11px;
  margin-top: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.linkText:hover {
  color: #2563eb;
  text-decoration: underline;
}

/* --- Alert & Progress Bar --- */
.alert {
  padding: 10px 15px;
  font-size: 13px;
  color: #ffffff;
}

.progress-container {
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  transition: width 3s linear;
}

/* --- Modals --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: #ffffff;
  position: relative;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.25s ease-in-out;
}

.close-modal-btn {
  position: absolute;
  top: 8px;
  right: 15px;
  font-size: 22px;
  font-weight: bold;
  color: #6b7280;
  cursor: pointer;
}

.close-modal-btn:hover {
  color: #111827;
}

.radio-group {
  display: flex;
  justify-content: space-around;
  margin-top: 12px;
}

.radio-label {
  background: none !important;
  color: #374151 !important;
  font-size: 12px !important;
  text-transform: none !important;
  padding: 0 !important;
  margin-top: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Mobile Responsiveness (768px & below) --- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background-color: #ffffff;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1.2rem;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .user-greeting {
    font-size: 0.9rem;
  }

  .credit-badge,
  .admin-credit-btn {
    font-size: 0.7rem;
  }

  .dashboard-container {
    flex-direction: column;
  }

  .nav-links {
    display: flex;
    overflow-x: auto;
  }

  .nav-links li a {
    white-space: nowrap;
    padding: 10px 15px;
  }

  .sidebar {
    display: none;
    /* Hide sidebar completely on small screens */
  }

  /* Main content ko full width dene ke liye */
  .main-content {
    padding: 15px;
    width: 100%;
  }
}