/* Modern dashboard styles for EduPilot */
:root {
  /* Teal theme to match login page */
  --primary: #12b8ad; /* main accent */
  --primary-light: #7feee7;
  --text-primary: #063737;
  --text-secondary: #4a7b76;
  --bg-main: #f7f7f7; /* light grayish background #f7fffe */
  --card-shadow: 0 8px 24px rgba(6,55,55,0.04);
}

* {
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  margin: 0;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
}

.main {
  margin-left: 92px;
  padding: 32px;
  min-height: 100vh;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.greeting h1 {
  margin: 0 0 4px;
  font-size: 24px;
  font-weight: 600;
}

.date {
  color: var(--text-secondary);
  font-size: 14px;
}

.profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 8px 16px;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  padding: 2px;
}

.profile .name {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}

.profile .email {
  color: var(--text-secondary);
  font-size: 12px;
}

.notification-dot {
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  margin-left: 8px;
}

.notification-dot .dot {
  display: block;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: relative;
}

.notification-dot .dot::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: rgba(18,184,173,0.18);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.overview-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  position: relative;
  background: #fff;
  padding: 20px;
  border-radius: 24px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.03);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: var(--primary);
  opacity: 0.03;
  border-radius: 50%;
  transform: translate(20px, -20px);
}

.stat-card .more-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--primary);
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.stat-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.stat-content {
  flex: 1;
  min-width: 0;
}

.stat-content h3 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-content p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.content-grid {
  display: flex;
  gap: 24px;
}

.left-panel {
  flex: 1;
}

.right-panel {
  width: 360px;
}

.card-block {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2,
.section-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.performance-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.student-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.student-item + .student-item {
  margin-top: 8px;
}

.student-item:hover {
  background: linear-gradient(180deg, rgba(18,184,173,0.03), rgba(18,184,173,0.01));
}

.student-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.student-meta {
  display: flex;
  flex-direction: column;
}

.student-name {
  font-weight: 600;
  font-size: 14px;
}

.student-class {
  font-size: 12px;
  color: var(--text-secondary);
}

.student-percent {
  margin-left: auto;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 13px;
}

.students-performance {
  padding: 16px;
  border-radius: 12px;
}

.students-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.students-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.students-title h2 {
  margin: 0;
  font-size: 16px;
}

.students-filters {
  display: flex;
  gap: 8px;
}

.filter-select {
  background: transparent;
  border: none;
  font-size: 12px;
  color: var(--text-secondary);
}

.card-menu {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
}

.lesson-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #F4F4F4;
}

.lesson-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary);
  opacity: 0.1;
}

.lesson-details {
  flex: 1;
}

.reminder-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 14px;
  cursor: pointer;
}

.chart-controls .period-select.small {
  background: #fff;
  border: 1px solid #f1f3f6;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
}

.chart-area {
  margin-top: 8px;
  background: linear-gradient(180deg, #fbfdff, #ffffff);
  border-radius: 12px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 8px 18px rgba(0,0,0,0.03);
}

.chart-svg {
  width: 100%;
  height: 220px;
  display: block;
}

.chart-area .tooltip {
  position: absolute;
  background: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  font-size: 12px;
}

.calendar-widget {
  padding: 24px;
  background: #fff;
}

.calendar-widget h3 {
  margin: 0 0 20px 0;
  font-size: 16px;
  font-weight: 600;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.weekday {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 4px;
  font-weight: 500;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cal-day:hover {
  background: rgba(18,184,173,0.08);
}

.cal-day.today {
  background: var(--primary);
  color: white;
  font-weight: 500;
}

.cal-day.other-month {
  color: var(--text-secondary);
  opacity: 0.5;
}

.events-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.event-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #F4F4F4;
}

.event-time {
  color: var(--primary);
  font-weight: 500;
}

.event-details h4 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 500;
}

.event-details p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.footer {
  margin-top: 32px;
  color: var(--text-secondary);
  text-align: center;
}

@media (max-width: 1200px) {
  .overview-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .right-panel {
    display: none;
  }
  .main {
    margin-left: 84px;
    padding: 20px;
  }
}
