/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

:root {
  --primary: #667eea;
  --primary-dark: #5a6fd8;
  --secondary: #764ba2;
  --success: #11998e;
  --success-light: #38ef7d;
  --warning: #f093fb;
  --warning-dark: #f5576c;
  --info: #4facfe;
  --info-light: #00f2fe;
  --dark: #2c3e50;
  --dark-light: #34495e;
  --light: #f8f9fa;
  --gray: #6c757d;
  --gray-light: #dee2e6;
  --white: #ffffff;
  --danger: #dc3545;
  --border-radius: 8px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  background-color: var(--light);
  color: #333;
  line-height: 1.6;
}

/* ****************************** */
/*          Layout               */
/* ****************************** */

.container {
  display: flex;
  min-height: 100vh;
}

/* ****************************** */
/*          Navbar                */
/* ****************************** */
.sidebar {
  width: 250px;
  background: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);
  color: var(--white);
  transition: var(--transition);
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
  display: flex;
  align-items: center;
  font-size: 2.4rem;
  font-weight: 600;
}

.sidebar-header i {
  margin-right: 10px;
  font-size: 2rem;
}

.sidebar-nav {
  padding: 20px 0;
}

.nav-item {
  list-style: none;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.nav-link {
  font-size: 1.6rem;
}

.nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 15px 20px;
}

/* ****************************** */
/*          Dashboard             */
/* ****************************** */
.main-content {
  flex: 1;
  margin-left: 250px;
  padding: 20px;
  transition: var(--transition);
}

/* **********header************* */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 20px;
  border-bottom: 1px solid var(--gray-light);
  margin-bottom: 20px;
}

.header h1 {
  font-size: 3rem;
  font-weight: 600;
  color: var(--dark);
}

.user-info {
  display: flex;
  align-items: center;
}

.user-info span {
  font-size: 1.6rem;
  margin-right: 15px;
  font-weight: 500;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.6rem;
}




/************ Cards************ */
.card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--gray-light);
}

.card-header h3 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0;
}

.card-body {
  padding: 20px;
}




/* ***********Stat Cards ******************************/
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  border-radius: var(--border-radius);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card.success {
  background: linear-gradient(
    135deg,
    var(--success) 0%,
    var(--success-light) 100%
  );
}

.stat-card.warning {
  background: linear-gradient(
    135deg,
    var(--warning) 0%,
    var(--warning-dark) 100%
  );
}

.stat-card.info {
  background: linear-gradient(135deg, var(--info) 0%, var(--info-light) 100%);
}

.stat-content h4 {
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 5px;
  opacity: 0.9;
}

.stat-content h2 {
  font-size: 3.2rem;
  font-weight: 700;
  margin: 0;
}

.stat-icon {
  font-size: 4rem;
  opacity: 0.7;
}



/* *********Tables ********** */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background-color: #f4f6ff;
  color: #3b3b3b;
  text-align: left;
  font-weight: 600;
  padding: 14px 16px;
  font-size: 1.6rem;
  border-bottom: 2px solid #e5e8f0;
}

/* Table body cells */
td {
  padding: 14px 16px;
  font-size: 1.5rem;
  color: #444;
  border-bottom: 1px solid #eee;
}

/* Zebra stripes */
tbody tr:nth-child(even) {
  background-color: #fafbff;
}

/* Hover effect */
tbody tr:hover {
  background-color: #eef3ff;
  transition: background-color 0.3s ease;
}




/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1.6rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn i {
  margin-right: 5px;
}

.btn-primary {
  background:  rgba(40, 87, 152, 0.91);
  color: var(--white);
}

.btn-primary:hover {
  background:  rgba(31, 63, 108, 0.91);
}

.btn-secondary {
  background: var(--gray);
  color: var(--white);
}

.btn-secondary:hover {
  background: #5a6268;
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  background: #c82333;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}

.action-buttons {
  display: flex;
  gap: 5px;
}



/* Content Sections */
.content-section {
  display: none;
}

.content-section.active {
  display: block;
}


/* Status Badges */
.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 1.2rem;
  font-weight: 500;
}


/* Progress Bar */
.progress {
  height: 8px;
  background: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 4px;
}

/* Loading page */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 15, 15, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

/* Spinner animation */
.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #f3f3f3;
  border-top: 6px solid #0d6efd; /* Bootstrap primary color */
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Text under spinner */
.loading-content p {
  color: #fff;
  margin-top: 15px;
  font-size: 1.2rem;
  font-weight: 500;
}

.





/* Spin animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    width: 70px;
  }

  .sidebar-header h2 span,
  .nav-link span {
    display: none;
  }

  .nav-link i {
    margin-right: 0;
    font-size: 2rem;
  }

  .main-content {
    margin-left: 70px;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 10px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-info {
    margin-top: 10px;
  }
}
