/* Improved Styles for Attendance System */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3a0ca3;
  --accent-color: #4cc9f0;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --info-color: #3498db;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  --gradient-primary: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  --gradient-secondary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
  --shadow-md: 0 8px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.12);
  --border-radius: 15px;
  --transition-speed: 0.3s;
}

/* Base Styles */
body { 
  background: linear-gradient(135deg, #f5f7fa 0%, #eef2f7 100%);
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: #333;
  position: relative;
  padding-bottom: 60px;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
  font-family: 'Poppins', sans-serif;
}

/* Navbar styling */
.navbar {
  background: var(--gradient-secondary) !important;
  padding: 12px 0;
  box-shadow: var(--shadow-md);
}

.navbar-brand { 
  font-weight: 700; 
  font-size: 1.5rem; 
  letter-spacing: 0.5px;
  background: linear-gradient(to right, #fff, #f0f0f0);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-link {
  font-weight: 500;
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.85) !important;
  position: relative;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 3px;
}

.nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

.nav-link i {
  margin-right: 6px;
  font-size: 1.1rem;
}

/* Card styling */
.card {
  border: none;
  border-radius: var(--border-radius) !important;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-speed) ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.card-header {
  font-weight: 600;
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 15px 20px;
}

/* Button styling */
.btn {
  border-radius: 10px;
  font-weight: 500;
  padding: 8px 20px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: linear-gradient(135deg, #20bf55, #01baef);
  border: none;
}

.btn-danger {
  background: linear-gradient(135deg, #ff6b6b, #ee5253);
  border: none;
}

/* Form controls */
.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  padding: 10px 15px;
  transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.15rem rgba(67, 97, 238, 0.25);
}

/* Table styling */
.table {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th {
  background-color: rgba(67, 97, 238, 0.1);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  border-top: none;
}

.table th, .table td {
  vertical-align: middle !important;
  padding: 12px 16px;
}

.table tbody tr:hover {
  background-color: rgba(76, 201, 240, 0.05);
}

/* Animation settings */
.animate__fadeIn { animation-duration: 0.8s; }
.animate__fadeInUp { animation-duration: 0.8s; }
.animate__fadeInDown { animation-duration: 0.8s; }

/* Dashboard widgets */
.dashboard-widget {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Progress bars */
.progress {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background-color: rgba(0,0,0,0.05);
}

.progress-bar-animated {
  animation: progress-bar-stripes 2s linear infinite;
}

/* Footer */
.footer {
  padding: 20px 0;
  font-size: 0.95rem;
  color: #666;
  text-align: center;
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(5px);
}

/* Toast notifications */
.toast {
  border: none;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.toast-header {
  border-bottom: none;
  background-color: rgba(255, 255, 255, 0.95);
}

/* Dashboard specific styles */
.stats-card {
  border-radius: var(--border-radius);
  border: none;
  overflow: hidden;
  transition: all 0.3s ease;
  height: 100%;
}

.stats-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stats-card .card-body {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.stats-card .card-header {
  border-bottom: none;
  padding: 1.2rem 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
}

.stats-icon {
  font-size: 3rem;
  opacity: 0.15;
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.stats-number {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-family: 'Poppins', sans-serif;
}

.status-badge {
  padding: 8px 12px;
  border-radius: 30px;
  font-weight: 500;
  margin: 5px;
  display: inline-block;
  font-size: 0.9rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Statistics page styles */
.stats-header {
  background: var(--gradient-secondary);
  color: white;
  border-radius: var(--border-radius);
  padding: 25px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-lg);
}

.filter-form {
  background: white;
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 25px;
}

.chart-container {
  position: relative;
  margin: auto;
  height: 280px;
  transition: all var(--transition-speed) ease;
}

.chart-container:hover {
  transform: scale(1.02);
}

.table-stats {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.table-stats thead th {
  background-color: rgba(67, 97, 238, 0.1);
  border-bottom: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table-stats tbody tr:hover {
  background-color: rgba(76, 201, 240, 0.05);
}

/* Attendance list styles */
.attendance-header {
  background: var(--gradient-primary);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  color: white;
  box-shadow: var(--shadow-md);
}

.filter-card {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  background-color: rgba(255, 255, 255, 0.9);
}

.attendance-table {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.attendance-table thead th {
  background: var(--gradient-secondary);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  padding: 15px 10px;
  border: none;
}

.action-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin: 0 3px;
  transition: all 0.2s;
  border: none;
}

.action-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .stats-number {
    font-size: 1.8rem;
  }
  
  .stats-icon {
    font-size: 2.5rem;
  }
}

@media (max-width: 992px) {
  .navbar-collapse {
    background-color: rgba(58, 12, 163, 0.98);
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    box-shadow: var(--shadow-md);
  }
  
  .stats-card .card-header {
    padding: 1rem 1.2rem;
  }
  
  .stats-card .card-body {
    padding: 1.2rem;
  }
  
  .chart-container {
    height: 240px;
  }
}

@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.3rem;
  }
  
  .stats-header {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .filter-form {
    padding: 15px;
  }
  
  .stats-number {
    font-size: 1.5rem;
  }
  
  .table th, .table td {
    padding: 10px 12px;
  }
  
  .card-header {
    padding: 12px 15px;
  }
}

@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .footer {
    font-size: 0.85rem;
    padding: 15px 0;
  }
  
  .card-header {
    padding: 10px 15px;
  }
  
  .btn {
    padding: 6px 14px;
  }
  
  .stats-number {
    font-size: 1.3rem;
  }
  
  .stats-icon {
    font-size: 2rem;
  }
  
  .chart-container {
    height: 200px;
  }
  
  .table-responsive {
    border-radius: var(--border-radius);
    overflow: hidden;
  }
}
