* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f5f7fa;
  color: #2d3748;
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 30px;
  border-radius: 12px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 2em;
}

.countdown {
  background: rgba(255, 255, 255, 0.2);
  padding: 15px 25px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 600;
}

/* Student Selector Dropdown */
#student-selector-container {
  display: flex;
  align-items: center;
}

.student-selector {
  display: flex;
  align-items: center;
}

.student-selector-dropdown {
  background: rgba(255, 255, 255, 0.95);
  color: #2d3748;
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 8px 32px 8px 12px;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 180px;
}

.student-selector-dropdown:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.student-selector-dropdown:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.student-selector-dropdown option {
  padding: 10px;
  background: white;
  color: #2d3748;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 12px 24px;
  border: none;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 500;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tab-btn.active {
  background: #667eea;
  color: white;
}

.tab-content {
  display: none;
}

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

.card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.card h2 {
  margin-bottom: 20px;
  color: #667eea;
  font-size: 1.3em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  color: #2d3748;
  font-size: 1.8em;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 500;
  transition: all 0.3s;
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

.btn-secondary {
  background: #e2e8f0;
  color: #2d3748;
}

.btn-secondary:hover {
  background: #cbd5e0;
}

.btn-danger {
  background: #f56565;
  color: white;
  padding: 6px 12px;
  font-size: 0.9em;
}

.btn-success {
  background: #48bb78;
  color: white;
  padding: 6px 12px;
  font-size: 0.9em;
}

/* Timetable Week Selector */
.timetable-week-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.week-btn {
  padding: 10px 20px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.week-btn:hover {
  border-color: #667eea;
}

.week-btn.active {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

/* Timetable Grid */
.timetable-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
}

.day-column {
  background: white;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.day-column h3 {
  margin-bottom: 15px;
  color: #667eea;
  text-align: center;
}

.time-slot {
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 6px;
  border-left: 4px solid;
  background: #f7fafc;
  position: relative;
}

.time-slot .time {
  font-size: 0.85em;
  color: #718096;
  font-weight: 600;
}

.time-slot .subject {
  font-weight: 600;
  margin-top: 5px;
}

.time-slot .delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #f56565;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.8em;
}

/* Assignments */
.assignments-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.filter-btn.active {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

.resources-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.resource-filter-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
}

.resource-filter-btn.active {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

.worklog-filter {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.worklog-filter-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.worklog-filter-btn:hover {
  border-color: #667eea;
}

.worklog-filter-btn.active {
  border-color: #667eea;
  background: #667eea;
  color: white;
}

.resource-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-left: 4px solid;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.resource-info {
  flex: 1;
}

.resource-title {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 8px;
}

.resource-title a {
  color: #667eea;
  text-decoration: none;
}

.resource-title a:hover {
  text-decoration: underline;
}

.resource-meta {
  color: #718096;
  font-size: 0.9em;
  margin-bottom: 8px;
}

.resource-type-badge {
  display: inline-block;
  background: #e2e8f0;
  color: #2d3748;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 500;
  margin-right: 10px;
}

.resource-description {
  color: #4a5568;
  margin-top: 8px;
}

.resource-actions {
  display: flex;
  gap: 10px;
}

.assignment-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-left: 4px solid;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.assignment-item.completed {
  opacity: 0.7;
}

.assignment-item.completed .assignment-title {
  text-decoration: line-through;
}

.assignment-info {
  flex: 1;
}

.assignment-title {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 8px;
}

.assignment-meta {
  color: #718096;
  font-size: 0.9em;
}

.assignment-actions {
  display: flex;
  gap: 10px;
}

/* Work Log */
.worklog-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-left: 4px solid;
}

.worklog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.worklog-subject {
  font-weight: 600;
  font-size: 1.1em;
}

.worklog-duration {
  background: #667eea;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9em;
}

.worklog-date {
  color: #718096;
  font-size: 0.9em;
  margin-bottom: 8px;
}

.worklog-notes {
  color: #4a5568;
}

/* Subjects */
.subject-item {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 6px solid;
}

.subject-name {
  font-size: 1.2em;
  font-weight: 600;
}

/* Calendar Styles */
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calendar-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.calendar-day-name {
  text-align: center;
  font-weight: 600;
  color: #667eea;
  padding: 10px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.calendar-day {
  min-height: 100px;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.calendar-day:hover {
  border-color: #667eea;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.calendar-day.other-month {
  background: #f7fafc;
  color: #a0aec0;
}

.calendar-day.today {
  border: 2px solid #667eea;
  background: #eef2ff;
}

.calendar-day.week1 {
  background: #fef3c7;
}

.calendar-day.week2 {
  background: #dbeafe;
}

.calendar-day-number {
  font-weight: 600;
  margin-bottom: 5px;
  font-size: 0.9em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.week-badge {
  font-size: 0.7em;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

.week-badge.week1 {
  background: #fbbf24;
  color: #78350f;
}

.week-badge.week2 {
  background: #60a5fa;
  color: #1e3a8a;
}

.calendar-event {
  font-size: 0.75em;
  padding: 3px 6px;
  margin-bottom: 3px;
  border-radius: 3px;
  background: #667eea;
  color: white;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event.assignment {
  background: #f59e0b;
}

.calendar-event.worklog {
  background: #10b981;
}

.calendar-legend {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  padding: 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}

/* Mini Calendar Widget */
.mini-calendar-widget {
  margin-top: 30px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 100%;
}

.mini-calendar-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.mini-calendar-header span {
  font-size: 1.2em;
  font-weight: 600;
  min-width: 200px;
  text-align: center;
}

#mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.mini-cal-day-name {
  text-align: center;
  font-weight: 600;
  color: #667eea;
  padding: 8px;
  font-size: 0.85em;
}

.mini-cal-day {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9em;
  transition: all 0.2s;
  position: relative;
  padding: 6px;
}

.mini-cal-day:hover {
  border-color: #667eea;
  background: #eef2ff;
}

.mini-cal-day.other-month {
  color: #cbd5e0;
  background: #f7fafc;
}

.mini-cal-day.today {
  border: 2px solid #667eea;
  background: #eef2ff;
  font-weight: 700;
}

.mini-cal-day.week1 {
  background: #fef3c7;
}

.mini-cal-day.week2 {
  background: #dbeafe;
}

.mini-cal-day.has-events::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  background: #667eea;
  border-radius: 50%;
}

#day-details-modal h3 {
  color: #2d3748;
  margin-bottom: 10px;
}

#day-details-modal h4 {
  color: #4a5568;
  font-size: 1em;
  margin-bottom: 10px;
  margin-top: 15px;
}

/* Modals */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.modal-overlay.active {
  display: block;
}

.modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  z-index: 1000;
  min-width: 400px;
  max-width: 500px;
}

.modal.active {
  display: block;
}

.modal h3 {
  margin-bottom: 20px;
  color: #2d3748;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1em;
  font-family: inherit;
}

.modal textarea {
  min-height: 100px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #a0aec0;
}

.empty-state p {
  font-size: 1.1em;
}

@media (max-width: 768px) {
  .timetable-grid {
    grid-template-columns: 1fr;
  }
  
  .modal {
    min-width: 90%;
    max-width: 90%;
  }
  
  header {
    flex-direction: column;
    gap: 15px;
  }
}

/* =========================================
   STUDENT MANAGEMENT STYLES
   ========================================= */

/* Student Card Styles */
.student-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.student-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.student-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.student-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: 600;
  flex-shrink: 0;
}

.student-info h3 {
  margin: 0 0 5px 0;
  color: #2d3748;
  font-size: 1.2em;
}

.student-info .student-year {
  color: #718096;
  font-size: 0.9em;
}

.student-details {
  margin: 16px 0;
  padding: 16px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.student-detail-row {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 0.9em;
}

.student-detail-row label {
  color: #718096;
  font-weight: 500;
}

.student-detail-row value {
  color: #2d3748;
  font-weight: 600;
}

.student-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.student-card-actions button {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
  font-size: 0.9em;
}

.btn-edit-student {
  background: #667eea;
  color: white;
}

.btn-edit-student:hover {
  background: #5568d3;
}

.btn-delete-student {
  background: #f56565;
  color: white;
}

.btn-delete-student:hover {
  background: #e53e3e;
}

/* Old Student Selector styles - REMOVED (conflicted with main student-selector-dropdown) */

/* Login Badge */
.login-badge {
  display: inline-block;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-size: 0.7em;
  padding: 4px 8px;
  border-radius: 12px;
  margin-left: 8px;
  font-weight: 600;
  vertical-align: middle;
}

/* Login Management Buttons */
.btn-create-login,
.btn-remove-login {
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-create-login {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-create-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-remove-login {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.btn-remove-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .student-card-header {
    flex-direction: column;
    text-align: center;
  }

  .student-avatar {
    margin: 0 auto;
  }

  .student-card-actions {
    flex-direction: column;
  }

  .student-card-actions button {
    width: 100%;
  }
}

/* Worklog Photo Previews in Modal */
#worklog-photo-previews {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 15px;
}

#worklog-photo-previews img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #e2e8f0;
}

#worklog-photo-previews .file-placeholder {
  width: 80px;
  height: 80px;
  background: #f7fafc;
  border: 2px dashed #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.8em;
  color: #a0aec0;
  padding: 5px;
  overflow: hidden;
}

/* Worklog Photos in List */
.worklog-photos {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.worklog-photos a {
  display: block;
}

.worklog-photos img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
  transition: transform 0.2s;
}

.worklog-photos img:hover {
  transform: scale(1.05);
  border-color: #667eea;
}

#quick-add-worklog {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  align-items: center;
}

#quick-add-worklog select,
#quick-add-worklog input {
  width: 100%;
  padding: 10px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9em;
}

#quick-add-worklog input[type="number"] {
  width: 80px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.gallery-item {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
  border-left: 4px solid;
  transition: transform 0.2s;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.gallery-info {
  padding: 15px;
}

.gallery-subject {
  font-weight: 600;
}

.gallery-date {
  font-size: 0.9em;
  color: #718096;
}
.day-details-photos {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.day-details-photos img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #a7f3d0;
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
}

.chart-card {
  min-height: 350px; /* Ensure enough height for charts */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chart-card h3 {
  margin-bottom: 15px;
  color: #2d3748;
}

.chart-card canvas {
  flex-grow: 1;
  max-height: 300px; /* Adjust as needed */
}

/* Enhanced Analytics Styles */
.analytics-date-filter {
  display: flex;
  gap: 8px;
}

.btn-filter {
  background: white;
  border: 2px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  color: #4a5568;
  transition: all 0.2s ease;
}

.btn-filter:hover {
  border-color: #667eea;
  color: #667eea;
  background: #f7fafc;
}

.btn-filter.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
}

.analytics-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  display: flex;
  gap: 16px;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.stat-icon {
  font-size: 2.5em;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.stat-content {
  flex: 1;
  color: white;
}

.stat-label {
  font-size: 0.85em;
  opacity: 0.9;
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-value {
  font-size: 2em;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-change {
  font-size: 0.8em;
  opacity: 0.85;
  font-weight: 500;
}

.stat-subvalue {
  font-size: 0.9em;
  opacity: 0.9;
  font-weight: 500;
}

.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
}

.chart-card-large {
  grid-column: 1 / -1;
  min-height: 400px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.chart-header h3 {
  margin: 0;
  color: #2d3748;
  font-size: 1.1em;
}

.chart-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85em;
}

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

  .analytics-charts-grid {
    grid-template-columns: 1fr;
  }

  .analytics-date-filter {
    flex-wrap: wrap;
  }

  .btn-filter {
    font-size: 0.85em;
    padding: 6px 12px;
  }
}

/* Heatmap for Calendar */
.calendar-day.heatmap-low {
  background-color: #d1fae5; /* Light green */
}

.calendar-day.heatmap-medium {
  background-color: #a7f3d0; /* Medium green */
}

.calendar-day.heatmap-high {
  background-color: #6ee7b7; /* Darker green */
}
