/* Mavida Design System & Premium Styling */

:root {
  /* Premium Blue Palette */
  --primary-color: #1e40af;       /* Deep Cobalt Blue */
  --primary-hover: #1d4ed8;       /* Bright Royal Blue */
  --primary-light: #eff6ff;       /* Light Ice Blue */
  --accent-color: #0ea5e9;        /* Sky Blue Accent */
  --accent-hover: #0284c7;
  --success-color: #10b981;       /* Emerald Green */
  --success-hover: #059669;
  --success-bg: #ecfdf5;
  --warning-color: #f59e0b;       /* Amber Gold */
  --warning-bg: #fffbeb;
  --danger-color: #ef4444;        /* Soft Crimson Rose */
  --danger-hover: #dc2626;
  --danger-bg: #fef2f2;
  
  /* Neutral Colors */
  --bg-gradient-start: #eef2f6;   /* Soft Cool Grey-Blue */
  --bg-gradient-end: #dbeafe;     /* Soft Pastel Blue */
  --text-main: #0f172a;           /* Near Black Navy */
  --text-muted: #64748b;          /* Cool Grey */
  --border-color: #e2e8f0;        /* Slate Light Border */
  --card-bg: rgba(255, 255, 255, 0.85); /* Semi-transparent for glassmorphism */
  
  /* Shadow & Blur */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  --shadow-premium: 0 20px 25px -5px rgba(30, 64, 175, 0.1), 0 8px 10px -6px rgba(30, 64, 175, 0.05);
  --backdrop-blur: blur(12px);
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  --border-radius-xl: 24px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  opacity: 0.7;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover);
}

/* Layout Utilities */
.container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.hidden {
  display: none !important;
}

/* App Header & Brand */
.app-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 20px;
  box-shadow: var(--shadow-md);
}

.logo-text h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: -0.5px;
}

.logo-text h1 span {
  color: var(--accent-color);
}

.logo-text p {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: -2px;
}

/* Profile Actions & Nav */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 50px;
  box-shadow: var(--shadow-sm);
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.username-display {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: var(--primary-light);
  border-color: rgba(30, 64, 175, 0.2);
  color: var(--primary-color);
}

.btn-accent {
  background: var(--accent-color);
  color: white;
}
.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

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

.btn-icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--border-radius-md);
}

/* Authentication Screen (Glassmorphic Card) */
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  background: var(--card-bg);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-premium);
  width: 100%;
  max-width: 440px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  display: inline-flex;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-radius: var(--border-radius-lg);
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
}

.auth-header h2 {
  font-size: 24px;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Inputs & Form Groups */
.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.form-control {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  background-color: white;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  background-color: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.auth-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  text-align: center;
}

.auth-link {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.auth-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Alert Boxes */
.alert-box {
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-danger {
  background: var(--danger-bg);
  color: var(--danger-color);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-hover);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Main Dashboard Panel */
.dashboard-wrapper {
  flex: 1;
  padding: 30px 0;
}

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

.stat-card {
  background: var(--card-bg);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform var(--transition-normal);
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-md);
  background: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-info h3 {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 4px;
}

/* Dashboard Controls (Search & Add) */
.controls-card {
  background: var(--card-bg);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--border-radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.search-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 600px;
}

.search-wrapper {
  position: relative;
  flex: 1;
}

.search-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 14px;
  font-weight: 500;
  background: white;
}

.filter-select {
  padding: 10px 34px 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  font-size: 14px;
  font-weight: 500;
  background: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  cursor: pointer;
  min-width: 130px;
}

.quick-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Students Grid */
.students-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.student-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.student-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(30, 64, 175, 0.2);
}

.student-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.student-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.student-school {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-grade {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-color);
  background: var(--primary-light);
  padding: 4px 10px;
  border-radius: 50px;
  text-transform: uppercase;
}

.student-quick-info {
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.student-lessons-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.student-payment-alert {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.text-danger {
  color: var(--danger-color);
}
.text-success {
  color: var(--success-color);
}

.no-students-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-lg);
  color: var(--text-muted);
}

.no-students-state i {
  font-size: 40px;
  color: var(--primary-color);
  opacity: 0.6;
  margin-bottom: 14px;
}

.no-students-state h3 {
  font-size: 18px;
  color: var(--text-main);
  margin-bottom: 6px;
}

/* Modals System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: white;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-premium);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-large {
  max-width: 900px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.close-btn:hover {
  background: var(--bg-gradient-start);
  color: var(--text-main);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
  border-bottom-left-radius: var(--border-radius-xl);
  border-bottom-right-radius: var(--border-radius-xl);
}

/* Student Card Design Layout (Split Screen) */
.student-card-details {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  max-height: 70vh;
}

@media (max-width: 768px) {
  .student-card-details {
    grid-template-columns: 1fr;
    max-height: none;
  }
}

.student-info-sidebar {
  background: var(--primary-light);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1px solid rgba(30, 64, 175, 0.05);
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.info-sidebar-group {
  background: white;
  border-radius: var(--border-radius-md);
  padding: 12px;
  border: 1px solid var(--border-color);
}

.info-sidebar-group span {
  display: block;
}

.sidebar-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}

.sidebar-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

/* Lesson Logs Module */
.lessons-timeline-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lessons-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.lessons-header-bar h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.lessons-list-container {
  overflow-y: auto;
  flex: 1;
  max-height: 480px;
  padding-right: 4px;
}

.lesson-item-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color var(--transition-fast);
}

.lesson-item-card:hover {
  border-color: rgba(30, 64, 175, 0.2);
}

.lesson-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.lesson-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
}

.lesson-subject-tag {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.lesson-topic {
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 8px;
}

.lesson-details-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #f8fafc;
  padding: 10px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  margin-bottom: 10px;
}

.lesson-detail-col strong {
  display: block;
  color: var(--text-muted);
  font-size: 10px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.lesson-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Toggle Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.status-paid {
  background: var(--success-bg);
  color: var(--success-hover);
}
.status-paid:hover {
  opacity: 0.8;
}

.status-unpaid {
  background: var(--danger-bg);
  color: var(--danger-color);
}
.status-unpaid:hover {
  opacity: 0.8;
}

/* Homework Checkbox Custom UI */
.homework-check-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.homework-check-wrapper input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.lesson-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.lesson-delete-btn:hover {
  color: var(--danger-color);
}

/* WhatsApp Share Button Box */
.whatsapp-share-widget {
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
  border-radius: var(--border-radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.whatsapp-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2e7d32;
}

.whatsapp-info i {
  font-size: 22px;
}

.whatsapp-text h5 {
  font-size: 13px;
  font-weight: 700;
}

.whatsapp-text p {
  font-size: 11px;
  opacity: 0.8;
}

/* App Footer */
.app-footer {
  text-align: center;
  padding: 24px 0;
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.4);
}

.app-footer p {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.app-footer strong {
  color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 640px) {
  .header-wrapper {
    flex-direction: column;
    gap: 12px;
  }
  
  .controls-card {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-filters {
    flex-direction: column;
    align-items: stretch;
  }
  
  .quick-actions {
    justify-content: space-between;
  }
  
  .modal-overlay {
    padding: 12px;
  }
}

/* Admin System Reports CSS */
.table-responsive-wrapper {
  width: 100%;
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
  background: white;
}

.reports-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.reports-table th {
  padding: 14px 16px;
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 700;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 5;
}

.reports-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.reports-table tr:last-child td {
  border-bottom: none;
}

.reports-table tr:hover td {
  background-color: var(--primary-light);
  opacity: 0.95;
  transition: background-color var(--transition-fast);
}

.reports-controls {
  margin-bottom: 16px;
}

.reports-controls .search-wrapper {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
}

.reports-controls .search-wrapper input {
  border: none;
  background: transparent;
  outline: none;
}

/* Reports Modal Tabs */
.reports-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 20px;
}

.reports-tab-btn {
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -2px;
}

.reports-tab-btn:hover {
  color: var(--primary-color);
}

.reports-tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.reports-panel {
  display: block;
}

.reports-panel.hidden {
  display: none !important;
}

/* User management specific controls */
.user-status-select {
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.user-status-select:focus {
  border-color: var(--primary-color);
}

.user-permission-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

/* Payment Sensitive Elements */
.payment-sensitive.hidden-sensitive {
  display: none !important;
}

/* Navigation Tabs under Header */
.main-tabs-nav {
  display: flex;
  gap: 6px;
  margin: 15px auto 25px auto;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0px;
}

.main-tab-btn {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -2px;
  outline: none;
}

.main-tab-btn:hover {
  color: var(--primary-color);
}

.main-tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.main-tab-btn svg {
  width: 18px;
  height: 18px;
}

/* Reminder Alert Banner */
.reminder-alert-banner {
  background: linear-gradient(135deg, var(--danger-color), #b91c1c);
  color: white;
  padding: 12px 20px;
  border-radius: var(--border-radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.3s ease-out;
}

.reminder-alert-banner-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
}

.reminder-alert-banner-close {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.reminder-alert-banner-close:hover {
  opacity: 1;
}

/* Weekly Agenda & Lesson Schedule */
.calendar-weekly-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-top: 15px;
}

.calendar-day-col {
  background: white;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  min-height: 450px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.calendar-day-col.today {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15), var(--shadow-md);
}

.calendar-day-header {
  padding: 10px;
  background: var(--primary-light);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.calendar-day-col.today .calendar-day-header {
  background: var(--primary-color);
  color: white;
}

.calendar-day-events {
  padding: 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.calendar-event-card {
  background: #f8fafc;
  border-left: 4px solid var(--primary-color);
  padding: 8px;
  border-radius: var(--border-radius-sm);
  font-size: 11px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.calendar-event-card:hover {
  transform: translateY(-2px);
}

.calendar-event-time {
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.calendar-event-title {
  font-weight: 600;
  color: var(--text-main);
  display: block;
  margin: 2px 0;
}

.calendar-event-desc {
  color: var(--text-muted);
  display: block;
}

.calendar-event-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-fast);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-event-card:hover .calendar-event-delete-btn {
  opacity: 1;
}

.calendar-event-delete-btn:hover {
  color: var(--danger-color);
}

.calendar-event-delete-btn svg {
  width: 12px;
  height: 12px;
}

/* Sticky Notes */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 15px;
}

.note-card {
  border-radius: var(--border-radius-md);
  padding: 16px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(0,0,0,0.05);
}

.note-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.note-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  margin: 0;
}

.note-body {
  font-size: 13px;
  color: var(--text-main);
  flex: 1;
  margin-top: 10px;
  white-space: pre-wrap;
  line-height: 1.5;
}

.note-footer {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(0,0,0,0.08);
  padding-top: 8px;
}

.note-date {
  font-size: 10px;
  color: var(--text-muted);
}

.note-actions {
  display: flex;
  gap: 8px;
}

.note-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px;
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.note-btn:hover {
  color: var(--primary-color);
}

.note-btn.delete:hover {
  color: var(--danger-color);
}

.note-btn svg {
  width: 14px;
  height: 14px;
}

.note-card.done {
  opacity: 0.6;
}

.note-card.done .note-title, .note-card.done .note-body {
  text-decoration: line-through;
}

.reminder-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  padding: 3px 6px;
  border-radius: var(--border-radius-sm);
  font-size: 10px;
  font-weight: 600;
}

.reminder-badge.expired {
  background: var(--danger-color);
  color: white;
}

/* Color palettes for notes */
.note-color-yellow { background-color: #fef9c3 !important; }
.note-color-blue { background-color: #dbeafe !important; }
.note-color-green { background-color: #dcfce7 !important; }
.note-color-pink { background-color: #fce7f3 !important; }
.note-color-purple { background-color: #f3e8ff !important; }

/* Responsive collapses */
@media (max-width: 900px) {
  .calendar-weekly-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .calendar-day-col {
    min-height: auto;
  }
}

/* Bulk Selection & Counter Toolbar styles */
.lessons-actions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--primary-light);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

#selected-lessons-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-color);
}

.selection-buttons {
  display: flex;
  gap: 8px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
}

.btn-xs i {
  width: 12px;
  height: 12px;
}

/* Smooth transition for copy feedback button */
#copy-report-btn {
  transition: all var(--transition-normal);
}

/* --- GEMINI HOMEWORK STYLING --- */
.gemini-dropzone {
  border: 2px dashed var(--border-color);
  padding: 25px 15px;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-body);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gemini-dropzone:hover, .gemini-dropzone.dragover {
  border-color: var(--primary-color);
  background: rgba(37, 99, 235, 0.04);
}

.gemini-dropzone.dragover .dropzone-icon {
  transform: translateY(-4px);
  color: var(--primary-color) !important;
}

.gemini-dropzone .dropzone-icon {
  transition: transform var(--transition-fast), color var(--transition-fast);
}

/* Spinner Loader */
.spinner-loader {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Markdown styling inside result boxes */
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--text-color);
}
.markdown-body h1 { font-size: 16px; border-bottom: 1px solid var(--border-color); padding-bottom: 4px; }
.markdown-body h2 { font-size: 14px; }
.markdown-body h3 { font-size: 13px; }
.markdown-body p {
  margin-bottom: 8px;
  line-height: 1.6;
}
.markdown-body ul, .markdown-body ol {
  margin-bottom: 10px;
  padding-left: 20px;
}
.markdown-body li {
  margin-bottom: 4px;
  list-style-type: disc;
}
.markdown-body strong {
  font-weight: 700;
  color: var(--primary-color);
}

/* History cards */
.gemini-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  transition: box-shadow var(--transition-fast);
  text-align: left;
}

.gemini-history-card:hover {
  box-shadow: var(--shadow-sm);
}

.gemini-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.gemini-history-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex: 1;
}

.gemini-history-subject {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-color);
}

.gemini-history-date {
  font-size: 11px;
  color: var(--text-muted);
}

.gemini-history-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.gemini-history-badge.ocr {
  background: rgba(107, 114, 128, 0.1);
  color: rgb(107, 114, 128);
}

.gemini-history-badge.eval {
  background: var(--primary-light);
  color: var(--primary-color);
}

.gemini-history-actions {
  display: flex;
  gap: 6px;
}

.gemini-history-content-box {
  margin-top: 10px;
  padding: 10px;
  background: var(--bg-body);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
}

