@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap");

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

:root {
  --background: #F5F7FA;
  --foreground: #1C2B4A;
  --card: #FFFFFF;
  --card-foreground: #1C2B4A;
  --popover: #FFFFFF;
  --popover-foreground: #1C2B4A;
  --primary: #1E5EFF;
  --primary-foreground: #FFFFFF;
  --secondary: #F5F7FA;
  --secondary-foreground: #1C2B4A;
  --muted: #E5E7EB;
  --muted-foreground: #6B7280;
  --accent: #1E5EFF;
  --accent-foreground: #FFFFFF;
  --destructive: #EF4444;
  --destructive-foreground: #FFFFFF;
  --border: #E5E7EB;
  --input: #FFFFFF;
  --ring: #1E5EFF;
  --chart-1: #22C55E;
  --chart-2: #F59E0B;
  --chart-3: #EF4444;
  --chart-4: #3B82F6;
  --chart-5: #8B5CF6;
  --radius: 0.75rem;
  --sidebar: #1E5EFF;
  --sidebar-foreground: #FFFFFF;
  --sidebar-primary: #1748CC;
  --sidebar-primary-foreground: #FFFFFF;
  --sidebar-accent: rgba(255,255,255,0.1);
  --sidebar-accent-foreground: #FFFFFF;
  --sidebar-border: rgba(255,255,255,0.1);
  --sidebar-ring: #FFFFFF;

  /* Legacy variables for compatibility */
  --primary-blue: #1E5EFF;
  --light-gray: #F5F7FA;
  --border-gray: #E5E7EB;
  --text-dark: #1C2B4A;
  --text-light: #6B7280;
  --white: #FFFFFF;
  --table-bg: #FFFFFF;
  --table-header-bg: #F8F9FB;
  --table-border: #E8ECF1;
  --table-text: #071F43;
  --table-heading: #333333;
  --table-muted-badge-bg: #FFF3E0;
  --table-muted-badge-text: #FF8A00;
}

.dark {
  --background: #0F172A;
  --foreground: #FFFFFF;
  --card: #1E293B;
  --card-foreground: #FFFFFF;
  --popover: #1E293B;
  --popover-foreground: #FFFFFF;
  --primary: #1E5EFF;
  --primary-foreground: #FFFFFF;
  --secondary: #1E293B;
  --secondary-foreground: #FFFFFF;
  --muted: #334155;
  --muted-foreground: #CBD5E1;
  --accent: #1E5EFF;
  --accent-foreground: #FFFFFF;
  --destructive: #EF4444;
  --destructive-foreground: #FFFFFF;
  --border: #334155;
  --input: #1E293B;
  --ring: #1E5EFF;
  --chart-1: #22C55E;
  --chart-2: #F59E0B;
  --chart-3: #EF4444;
  --chart-4: #3B82F6;
  --chart-5: #8B5CF6;
  --sidebar: #0F172A;
  --sidebar-foreground: #FFFFFF;
  --sidebar-primary: #1E5EFF;
  --sidebar-primary-foreground: #FFFFFF;
  --sidebar-accent: rgba(30,94,255,0.1);
  --sidebar-accent-foreground: #FFFFFF;
  --sidebar-border: #334155;
  --sidebar-ring: #1E5EFF;

  /* Legacy variables for compatibility */
  --primary-blue: #1E5EFF;
  --light-gray: #1E293B;
  --border-gray: #334155;
  --text-dark: #FFFFFF;
  --text-light: #CBD5E1;
  --white: #0F172A;
  --table-bg: #1E293B;
  --table-header-bg: #273449;
  --table-border: #334155;
  --table-text: #E2E8F0;
  --table-heading: #F8FAFC;
  --table-muted-badge-bg: rgba(245, 158, 11, 0.16);
  --table-muted-badge-text: #FBBF24;
}

body {
  font-family: "Cairo", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-gray);
  color: var(--text-dark);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(30, 94, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s ease-in-out infinite;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  background: white;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.loading-content .loading-spinner {
  margin: 0 auto 20px;
}

.loading-text {
  color: var(--text-dark);
  font-size: 16px;
  font-weight: 500;
}

/* Form Validation Styles */
input.error,
textarea.error,
select.error {
  border-color: var(--destructive) !important;
  background-color: rgba(239, 68, 68, 0.05);
}

input.error:focus,
textarea.error:focus,
select.error:focus {
  outline: none;
  border-color: var(--destructive);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 94, 255, 0.1);
}

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

.password-input {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 16px;
  padding: 5px;
  transition: color 0.3s ease;
}

.toggle-password:hover {
  color: var(--primary);
}

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

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 20px;
  position: fixed;
  height: 100vh;
  right: 0;
  overflow-y: auto;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: bold;
}

.sidebar-logo-mark {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

.logo i {
  font-size: 24px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 30px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
}

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

.nav-item i {
  font-size: 18px;
  width: 20px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  font-family: "Cairo", sans-serif;
}

.logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-right: 280px;
  background-color: var(--light-gray);
}

.top-bar {
  background-color: var(--white);
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  gap: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--light-gray);
  padding: 10px 15px;
  border-radius: 6px;
  flex: 1;
  max-width: 400px;
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  font-family: "Cairo", sans-serif;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.notification-btn,
.settings-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
  transition: color 0.3s ease;
}

.notification-btn:hover,
.settings-btn:hover {
  color: var(--primary-blue);
}

.topbar-notification-wrap {
  position: relative;
}

.topbar-notification-panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 0;
  z-index: 1200;
  width: min(554px, calc(100vw - 48px));
  max-height: calc(100vh - 140px);
  display: none;
  overflow-y: auto;
  border: 1px solid #dfe5ed;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 18px 60px rgba(17, 24, 39, 0.28);
  color: #1f2937;
}

.topbar-notification-wrap.open .topbar-notification-panel {
  display: block;
}

.topbar-notification-head {
  min-height: 90px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 22px 0;
}

.topbar-notification-head h2 {
  margin: 8px 0 0;
  color: #242a32;
  font-size: 18px;
  font-weight: 700;
}

.topbar-notification-head a {
  min-width: 132px;
  height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--teacher-blue);
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
}

.topbar-mark-read {
  display: inline-flex;
  margin: -14px 22px 16px 0;
  border: 0;
  background: transparent;
  color: var(--teacher-blue);
  font-family: "Cairo", sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.topbar-notification-section {
  border-top: 1px solid #e5eaf0;
}

.topbar-notification-section.new {
  background: #edf4ff;
}

.topbar-notification-section > strong {
  display: block;
  padding: 18px 22px 0;
  color: var(--teacher-blue);
  font-size: 15px;
  font-weight: 600;
}

.topbar-notification-section:not(.new) > strong {
  color: #2f3640;
}

.topbar-notification-item {
  position: relative;
  min-height: 112px;
  display: grid;
  grid-template-columns: 48px 1fr 16px;
  gap: 16px;
  align-items: start;
  padding: 20px 22px 18px;
  color: #252b33;
  text-decoration: none;
  border-bottom: 1px solid #e5eaf0;
}

.topbar-notification-item:hover {
  background: rgba(0, 93, 214, 0.04);
}

.topbar-notification-media {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  align-self: start;
  border-radius: 50%;
  overflow: hidden;
  background: var(--teacher-blue);
  color: #ffffff;
  font-size: 16px;
}

.topbar-notification-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-notification-body {
  display: block;
  color: #252b33;
  font-size: 16px;
  line-height: 1.65;
}

.topbar-notification-body b {
  font-weight: 800;
}

.topbar-notification-body em {
  display: block;
  margin-top: 12px;
  color: #6b7280;
  font-size: 13px;
  font-style: normal;
}

.topbar-unread-dot {
  width: 10px;
  height: 10px;
  margin-top: 18px;
  border-radius: 50%;
  background: #f26522;
  order: 3;
}

.topbar-notification-empty {
  padding: 24px 22px 34px;
  color: #6b7280;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-approved {
  background-color: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #81c784;
}

.badge-rejected {
  background-color: #ffebee;
  color: #c62828;
  border: 1px solid #ef5350;
}

.badge-pending {
  background-color: #fff3e0;
  color: #e65100;
  border: 1px solid #ffb74d;
}

.badge i {
  font-size: 14px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.page-content {
  padding: 30px;
}

/* Statistics Section */
.stats-section {
  margin-bottom: 40px;
}

.stats-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--text-dark);
  font-weight: 600;
}

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

.stat-card {
  background-color: var(--white);
  padding: 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--white);
  flex-shrink: 0;
}

.stat-icon.teachers {
  background-color: #4caf50;
}

.stat-icon.students {
  background-color: #2196f3;
}

.stat-icon.courses {
  background-color: #ff9800;
}

.stat-icon.revenue {
  background-color: #9c27b0;
}

.stat-icon.financial-stat-icon {
  color: var(--teacher-blue);
  background: #eef5ff;
}

.stat-icon.financial-stat-icon.green {
  color: #079455;
  background: #e7f8ee;
}

.stat-icon.financial-stat-icon.purple {
  color: #7a5af8;
  background: #f0edff;
}

.stat-icon.financial-stat-icon.orange {
  color: #f79009;
  background: #fff4df;
}

.financial-stat-icon svg {
  display: block;
  flex: 0 0 auto;
}

.stat-content h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
}

.stat-content p {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 5px;
}

/* Filters Section */
.filters-section {
  background-color: var(--white);
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--light-gray);
  padding: 10px 15px;
  border-radius: 6px;
  flex: 1;
  min-width: 250px;
}

.search-bar input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 14px;
  font-family: "Cairo", sans-serif;
}

.filter-dropdowns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 10px 15px;
  border: 1px solid var(--border-gray);
  border-radius: 6px;
  background-color: var(--white);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-dark);
  font-family: "Cairo", sans-serif;
}

.filter-select:hover {
  border-color: var(--primary-blue);
}

/* Table */
.table-container,
.table-responsive {
  background-color: var(--table-bg);
  border: 1px solid var(--table-border);
  border-radius: 14px;
  box-shadow: none;
  margin-bottom: 20px;
  overflow-x: auto;
  overflow-y: hidden;
}

.table-section {
  margin-bottom: 26px;
}

.table-section h2,
.recent-section h2 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: #111827;
  font-size: 19px;
  font-weight: 600;
}

.data-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  background-color: var(--table-bg);
  color: var(--table-text);
}

.data-table thead {
  background-color: var(--table-header-bg);
}

.data-table th {
  padding: 12px 24px;
  text-align: right;
  font-weight: 500;
  color: var(--table-heading);
  font-size: 15px;
  line-height: 1.5;
  white-space: nowrap;
  border-bottom: 1px solid var(--table-border);
}

.data-table td {
  height: 72px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--table-border);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--table-text);
  vertical-align: middle;
  background-color: var(--table-bg);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover td {
  background-color: rgba(15, 42, 77, 0.025);
}

.data-table a:not(.action-btn) {
  color: var(--table-text);
  text-decoration: none;
}

.data-table a:not(.action-btn):hover {
  color: var(--primary-blue);
}

.table-container + .pagination,
.table-responsive + .pagination {
  margin-top: 24px;
}

.table-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background-color: var(--table-muted-badge-bg);
  color: var(--table-muted-badge-text);
  font-size: 13px;
  font-weight: 700;
}

.page-content div[style*="overflow-x"] {
  background-color: var(--table-bg) !important;
  border: 1px solid var(--table-border) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
  margin-bottom: 20px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.page-content table {
  width: 100% !important;
  min-width: 1120px;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background-color: var(--table-bg) !important;
  color: var(--table-text) !important;
}

.page-content table thead,
.page-content table thead tr {
  background-color: var(--table-header-bg) !important;
}

.page-content table th {
  padding: 12px 24px !important;
  text-align: right !important;
  font-weight: 500 !important;
  color: var(--table-heading) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  white-space: nowrap !important;
  border-bottom: 1px solid var(--table-border) !important;
}

.page-content table td {
  height: 72px;
  padding: 14px 24px !important;
  border-bottom: 1px solid var(--table-border) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  color: var(--table-text) !important;
  vertical-align: middle !important;
  background-color: var(--table-bg) !important;
}

.page-content table tbody tr:last-child td {
  border-bottom: 0 !important;
}

.page-content table tbody tr:hover td {
  background-color: rgba(15, 42, 77, 0.025) !important;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-light);
  margin: 0 5px;
  transition: color 0.3s ease;
}

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

.action-btn.delete:hover {
  color: #ff4444;
}

.action-btn.approve {
  color: #2e7d32;
}

.action-btn.approve:hover {
  color: #1b5e20;
}

.action-btn.reject {
  color: #c62828;
}

.action-btn.reject:hover {
  color: #b71c1c;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.page-link {
  padding: 8px 12px;
  border: 1px solid var(--border-gray);
  border-radius: 4px;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.3s ease;
  font-size: 14px;
  font-family: "Cairo", sans-serif;
}

.page-link:hover {
  background-color: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

.page-link.active {
  background-color: var(--primary-blue);
  color: var(--white);
  border-color: var(--primary-blue);
}

/* Recent Section */
.recent-section {
  background-color: var(--white);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.recent-section h2 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-dark);
  font-weight: 600;
}

/* Modal Styles */
.modal {
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--white);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 500px;
  width: 90%;
  position: relative;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  color: var(--text-light);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: var(--text-dark);
}

.modal-content h2 {
  margin-bottom: 20px;
  color: var(--text-dark);
  font-size: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 14px;
}

.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-gray);
  border-radius: 6px;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  resize: vertical;
  transition: border-color 0.3s ease;
}

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

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-family: "Cairo", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

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

.btn-primary:hover {
  background-color: #003d99;
}

.btn-secondary {
  background-color: var(--light-gray);
  color: var(--text-dark);
  border: 1px solid var(--border-gray);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }

  .main-content {
    margin-right: 240px;
  }

  .page-content {
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 200px;
    padding: 15px;
  }

  .main-content {
    margin-right: 200px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .top-bar {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .search-box {
    max-width: 100%;
  }

  .filters-section {
    flex-direction: column;
  }

  .search-bar {
    min-width: 100%;
  }

  .filter-dropdowns {
    width: 100%;
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
  }

  .data-table th,
  .data-table td {
    padding: 12px;
    font-size: 13px;
  }

  .logo span {
    display: none;
  }

  .nav-item span {
    display: none;
  }

  .logout-btn span {
    display: none;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 70px;
    padding: 10px;
  }

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

  .page-content {
    padding: 10px;
  }

  .top-bar {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .data-table th,
  .data-table td {
    padding: 8px;
    font-size: 11px;
  }

  .stat-card {
    flex-direction: column;
    text-align: center;
    padding: 15px;
  }

  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .stat-content h3 {
    font-size: 20px;
  }

  .filters-section {
    padding: 10px;
  }

  .search-bar {
    min-width: 100%;
  }

  .page-link {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Support Feature Styles */
.support-tickets-container {
  padding: 20px;
  background-color: var(--white);
  border-radius: 8px;
  margin-bottom: 20px;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-gray);
}

.page-header h1 {
  font-size: 28px;
  color: var(--text-dark);
  margin: 0;
}

.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

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

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover {
  background-color: #218838;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

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

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-weight: 600;
}

.alert-success {
  background-color: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-danger {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.page-subtitle {
  color: var(--text-light);
  margin-top: 6px;
}

.admin-management-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.admin-panel {
  background-color: var(--white);
  border: 1px solid var(--border-gray);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.admin-panel h2 {
  font-size: 18px;
  margin-bottom: 18px;
}

.admin-form small {
  display: block;
  margin-top: 6px;
  color: var(--text-light);
}

.admins-list-panel {
  padding-bottom: 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading span {
  color: var(--text-light);
  font-weight: 600;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-main {
  background-color: #eff6ff;
  color: #1d4ed8;
}

.status-admin {
  background-color: #f3f4f6;
  color: #374151;
}

.status-active {
  background-color: #ecfdf3;
  color: #166534;
}

.status-blocked {
  background-color: #fef2f2;
  color: #991b1b;
}

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

.admin-actions form {
  margin: 0;
}

.admin-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .admin-management-grid {
    grid-template-columns: 1fr;
  }
}

.filters-section {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  padding: 15px;
  background-color: var(--light-gray);
  border-radius: 6px;
}

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border-gray);
  border-radius: 4px;
  background-color: var(--white);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.filter-select:hover,
.filter-select:focus {
  border-color: var(--primary-blue);
  outline: none;
}

/* .data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: var(--white);
} */

/* .data-table thead {
  background-color: var(--light-gray);
}

.data-table th {
  padding: 12px 15px;
  text-align: right;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-gray);
}

.data-table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-gray);
}

.data-table tbody tr:hover {
  background-color: var(--light-gray);
} */

.ticket-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-open {
  background-color: #e8f4f8;
  color: #0c7ca2;
}

.status-in-progress {
  background-color: #fff3e0;
  color: #f57c00;
}

.status-resolved {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.status-closed {
  background-color: #f3e5f5;
  color: #6a1b9a;
}

.priority-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.priority-low {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.priority-medium {
  background-color: #fff3e0;
  color: #f57c00;
}

.priority-high {
  background-color: #ffebee;
  color: #c62828;
}

.ticket-details-container {
  padding: 20px;
  background-color: var(--white);
  border-radius: 8px;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-gray);
}

.ticket-info {
  flex: 1;
}

.ticket-info h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.ticket-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.meta-item {
  padding: 10px;
  background-color: var(--light-gray);
  border-radius: 6px;
}

.meta-label {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 5px;
}

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

.user-profile-card {
  background-color: var(--light-gray);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.user-profile-header {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 15px;
}

.user-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info h3 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: var(--text-dark);
}

.user-info p {
  margin: 2px 0;
  font-size: 12px;
  color: var(--text-light);
}

.messages-section {
  margin-top: 30px;
}

.messages-section h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text-dark);
}

.message-item {
  padding: 15px;
  background-color: var(--light-gray);
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid var(--primary-blue);
}

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

.message-sender {
  font-weight: 600;
  color: var(--text-dark);
}

.message-type {
  display: inline-block;
  padding: 2px 8px;
  background-color: var(--primary-blue);
  color: white;
  border-radius: 4px;
  font-size: 11px;
}

.message-time {
  font-size: 12px;
  color: var(--text-light);
}

.message-content {
  margin: 10px 0;
  line-height: 1.6;
  color: var(--text-dark);
}

.message-image {
  max-width: 300px;
  max-height: 300px;
  margin-top: 10px;
  border-radius: 6px;
  cursor: pointer;
}

.reply-form {
  margin-top: 30px;
  padding: 20px;
  background-color: var(--light-gray);
  border-radius: 8px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group textarea,
.form-group input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-gray);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.form-group textarea {
  min-height: 120px;
}

.form-group textarea:focus,
.form-group input[type="file"]:focus {
  border-color: var(--primary-blue);
  outline: none;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.create-ticket-form {
  background-color: var(--white);
  padding: 30px;
  border-radius: 8px;
  max-width: 600px;
  margin: 0 auto;
}

.create-ticket-form h2 {
  font-size: 24px;
  margin-bottom: 30px;
  color: var(--text-dark);
}

.image-preview-container {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.image-preview {
  position: relative;
  width: 100px;
  height: 100px;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.image-remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  margin-top: 30px;
}

.page-link {
  padding: 8px 12px;
  border: 1px solid var(--border-gray);
  border-radius: 4px;
  text-decoration: none;
  color: var(--primary-blue);
  cursor: pointer;
  transition: all 0.3s ease;
}

.page-link:hover {
  background-color: var(--primary-blue);
  color: white;
}

.page-link.active {
  background-color: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.page-link.disabled {
  color: var(--text-light);
  cursor: not-allowed;
  opacity: 0.5;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.empty-state p {
  color: var(--text-light);
  margin-bottom: 20px;
}
.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #0052cc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-card h4 {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 14px;
}

.summary-card h3 {
    margin: 0;
    color: #0052cc;
    font-size: 24px;
}

.commission {
    color: #c62828;
    font-weight: 600;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Additional styles for cleaned-up pages */

/* Page header styling */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  gap: 20px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 28px;
  color: var(--text-dark);
  font-weight: 600;
  margin: 0;
}

.page-header a,
.page-header .btn {
  white-space: nowrap;
}

/* Filters form styling */
.filters-form {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.filters-form button {
  flex-shrink: 0;
}

/* Button search styling */
.btn-search {
  padding: 10px 15px;
  background-color: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Cairo', sans-serif;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-search:hover {
  background-color: #1748CC;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 94, 255, 0.3);
}

.btn-search:active {
  transform: translateY(0);
}

/* Table link styling */
.table-link {
  color: var(--primary-blue);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.table-link:hover {
  color: #1748CC;
  text-decoration: underline;
}

/* Empty result styling */
.empty-result {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}

/* Result counter styling */
.result-counter {
  text-align: center;
  margin-top: 20px;
  color: #666;
  font-size: 14px;
}

/* Login page body override */
body.login-page {
  background: linear-gradient(135deg, #1E5EFF 0%, #1748CC 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-container {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  padding: 40px;
}

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

.login-header i {
  font-size: 48px;
  color: var(--primary-blue);
  margin-bottom: 15px;
  display: block;
}

.login-header h1 {
  font-size: 28px;
  color: var(--text-dark);
  margin: 0 0 10px 0;
  font-weight: 600;
}

.login-header p {
  color: var(--text-light);
  font-size: 14px;
  margin: 0;
}

/* Login form styling */
.login-container .form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Cairo', sans-serif;
  transition: border-color 0.3s;
}

.login-container .form-group input:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.login-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--primary-blue);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  font-family: 'Cairo', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-btn:hover {
  background-color: #1748CC;
}

.login-btn:active {
  transform: scale(0.98);
}

.error-message {
  background-color: #ffebee;
  color: #c62828;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--destructive);
}

.error-message i {
  font-size: 18px;
  flex-shrink: 0;
}

/* Modal support */
.modal.show {
  display: flex !important;
}

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

.form-actions .btn {
  flex: 1;
}

.cancel {
  background-color: var(--light-gray);
  color: var(--text-dark);
  border: 1px solid var(--border-gray);
}

.cancel:hover {
  background-color: var(--border-gray);
}

.modal-content textarea,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-gray);
  border-radius: 6px;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.3s ease;
}

.modal-content textarea:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header h1 {
    width: 100%;
  }

  .page-header a,
  .page-header .btn {
    width: 100%;
  }

  .filters-form {
    flex-direction: column;
  }

  .filters-form .btn-search {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 30px 20px;
  }

  .login-header h1 {
    font-size: 24px;
  }

  .login-header i {
    font-size: 40px;
  }

  .modal-content {
    width: 95%;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn,
  .cancel {
    width: 100%;
  }
}

/* Education Management Page Styles */
.education-management-container {
  padding: 20px;
}

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

.education-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.panel-header {
  background: var(--secondary);
  padding: 15px;
  border-bottom: 2px solid var(--border);
}

.panel-header h2 {
  margin: 0;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 600;
}

.panel-content {
  padding: 15px;
  min-height: 400px;
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.items-list.hidden {
  display: none;
}

.list-item {
  padding: 12px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.list-item:hover {
  background: var(--muted);
  border-color: var(--primary);
}

.list-item.active {
  background: rgba(30, 94, 255, 0.1);
  border-color: var(--primary);
  font-weight: 600;
  color: var(--primary);
}

.list-item-text {
  flex: 1;
}

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

.item-action-btn {
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 14px;
  transition: color 0.3s ease;
}

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

.item-action-btn.delete:hover {
  color: var(--destructive);
}

.no-selection-message {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted-foreground);
}

.no-selection-message p {
  margin: 0;
  font-size: 14px;
}

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

  .panel-content {
    min-height: auto;
  }
}

/* Subject Form Styles */
#newSubjectFields textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  resize: vertical;
}

#newSubjectFields textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(30, 94, 255, 0.1);
}

.form-group label input[type="radio"] {
  margin-right: 8px;
  cursor: pointer;
}

.form-group label {
  display: flex;
  align-items: center;
  cursor: pointer;
  margin-bottom: 10px;
}

/* Teachers dashboard screenshot layout */
.teachers-dashboard-page {
  --teacher-blue: #095bd7;
  --teacher-navy: #071f43;
  --teacher-shell: #f4f5f7;
  --teacher-line: #e7ebf0;
  --teacher-muted: #7d8794;
}

.teachers-dashboard-page .dashboard-container {
  background: var(--teacher-shell);
}

.teachers-dashboard-page .main-content {
  min-height: 100vh;
  background: var(--teacher-shell);
}

.teachers-dashboard-page .top-bar {
  height: 82px;
  margin: 24px 32px 0;
  padding: 0 28px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: none;
}

.teachers-dashboard-page .search-box,
.teachers-dashboard-page .settings-btn {
  display: none;
}

.teachers-dashboard-page .top-bar-right {
  margin-right: auto;
  flex-direction: row-reverse;
  gap: 18px;
}

.teachers-dashboard-page .notification-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2f7;
  color: var(--teacher-navy);
  font-size: 18px;
}

.teachers-dashboard-page .notification-btn .badge {
  position: absolute;
  top: -7px;
  left: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  justify-content: center;
  background: #ff6877;
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 11px;
}

.teachers-dashboard-page .user-profile {
  flex-direction: row-reverse;
  gap: 10px;
  color: var(--teacher-navy);
  font-weight: 700;
}

.teachers-dashboard-page .user-profile::before {
  content: "اهلا 👋";
  display: block;
  color: #111827;
  font-size: 13px;
  font-weight: 400;
}

.teachers-dashboard-page .user-profile img {
  width: 46px;
  height: 46px;
  box-shadow: 0 8px 18px rgba(7, 31, 67, 0.12);
}

.teachers-dashboard-page .page-content {
  padding: 48px 32px 24px;
}

.teachers-dashboard {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.dashboard-filters,
.teacher-filters {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.dashboard-search,
.dashboard-filter-toggle,
.teacher-search,
.teacher-filter-toggle {
  height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e7ebf0;
  border-radius: 7px;
  background: #ffffff;
  color: var(--teacher-navy);
  font-family: "Cairo", sans-serif;
  font-size: 16px;
  line-height: 1;
}

.dashboard-search,
.teacher-search {
  flex: 1 1 310px;
  max-width: 360px;
  padding: 0 16px;
}

.dashboard-search input,
.teacher-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--teacher-navy);
  font: inherit;
}

.dashboard-filter-menu,
.teacher-filter-menu {
  position: relative;
}

.dashboard-filter-toggle,
.teacher-filter-toggle {
  min-width: 104px;
  justify-content: space-between;
  padding: 0 16px;
  cursor: pointer;
}

.dashboard-filter-toggle span,
.teacher-filter-toggle span {
  white-space: nowrap;
}

.dashboard-filter-panel,
.teacher-filter-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  min-width: 220px;
  display: none;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(7, 31, 67, 0.12);
}

.dashboard-filter-menu.open .dashboard-filter-panel,
.teacher-filter-menu.open .teacher-filter-panel {
  display: block;
}

.dashboard-filter-panel strong,
.teacher-filter-panel strong {
  display: block;
  margin-bottom: 12px;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.dashboard-filter-panel.compact button,
.teacher-filter-panel.compact button,
.sort-panel button {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #111827;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  text-align: right;
  cursor: pointer;
}

.dashboard-filter-panel.compact button:hover,
.teacher-filter-panel.compact button:hover,
.sort-panel button:hover {
  background: #f4f8ff;
}

.amount-panel,
.sort-panel {
  width: 376px;
}

.amount-panel label {
  display: block;
  margin-bottom: 16px;
  color: #111827;
  font-size: 14px;
}

.amount-panel label span {
  display: block;
  margin-bottom: 8px;
}

.amount-panel input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  outline: 0;
  color: var(--teacher-navy);
  font-family: "Cairo", sans-serif;
}

.amount-panel input:focus {
  border-color: var(--teacher-blue);
  box-shadow: 0 0 0 3px rgba(9, 91, 215, 0.1);
}

.sort-panel button {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e0ebfb;
  margin-bottom: 12px;
  background: #ffffff;
}

.sort-panel button:hover {
  border-color: var(--teacher-blue);
}

.radio-dot {
  width: 16px;
  height: 16px;
  border: 2px solid #b8bec7;
  border-radius: 50%;
  flex: 0 0 auto;
}

.radio-dot.active {
  border-color: #00c9b7;
  box-shadow: inset 0 0 0 3px #ffffff;
  background: #00c9b7;
}

.teacher-panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.panel-submit,
.panel-clear {
  height: 40px;
  border: 0;
  border-radius: 7px;
  font-family: "Cairo", sans-serif;
  font-weight: 600;
  cursor: pointer;
}

.panel-submit {
  flex: 1;
  background: var(--teacher-blue);
  color: #ffffff;
}

.panel-clear {
  min-width: 108px;
  background: transparent;
  color: #111827;
}

.teacher-table-card {
  overflow: hidden;
  border: 1px solid #e8ecf1;
  border-radius: 14px;
  background: #ffffff;
}

.teacher-table-header {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 28px;
}

.teacher-table-header h1 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #111827;
  font-size: 19px;
  font-weight: 600;
}

.teacher-table-header h1 span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fff2df;
  color: #ff8a00;
  font-size: 13px;
  font-weight: 700;
}

.teacher-table-wrap {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--table-border);
  border-radius: 0;
}

.teachers-table {
  min-width: 1120px;
}

.teachers-table th {
  padding: 12px 24px;
  color: #333333;
  font-size: 15px;
}

.teachers-table td {
  height: 72px;
  padding: 14px 24px;
  color: var(--teacher-navy);
  font-size: 15px;
}

.teacher-name-cell a {
  color: var(--teacher-navy);
  font-weight: 600;
}

.teacher-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  min-width: 58px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.teacher-status.pending {
  background: #ffe8bd;
  color: #ff8a00;
}

.teacher-status.accepted {
  background: #91f5af;
  color: #069c3d;
}

.teacher-status.rejected {
  background: #ffc2c8;
  color: #f0444f;
}

.teacher-actions-cell,
.dashboard-actions-cell {
  position: relative;
  width: 86px;
  text-align: center;
}

.teacher-row-menu-toggle,
.dashboard-row-menu-toggle {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d8dde6;
  border-radius: 50%;
  background: #eef1f6;
  color: #8490a3;
  cursor: pointer;
}

.teacher-row-menu,
.dashboard-row-menu {
  position: absolute;
  left: 18px;
  top: 52px;
  z-index: 20;
  width: 148px;
  display: none;
  padding: 10px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(7, 31, 67, 0.14);
}

.teacher-actions-cell.open .teacher-row-menu,
.dashboard-actions-cell.open .dashboard-row-menu {
  display: block;
  position: fixed;
  top: var(--row-menu-top, 0);
  left: var(--row-menu-left, 0);
  z-index: 1000;
}

.teacher-row-menu a,
.teacher-row-menu button,
.dashboard-row-menu a,
.dashboard-row-menu button {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #111827;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.teacher-row-menu form,
.dashboard-row-menu form {
  margin: 0;
}

.teacher-row-menu .approve,
.dashboard-row-menu .approve {
  margin-bottom: 6px;
  background: var(--teacher-blue);
  color: #ffffff;
}

.teacher-row-menu .reject:hover,
.teacher-row-menu .view:hover,
.dashboard-row-menu .reject:hover,
.dashboard-row-menu .view:hover {
  background: #f3f6fa;
}

.withdrawals-dashboard .dashboard-students-table {
  min-width: 1120px;
}

.withdrawals-table td small,
.withdrawals-table td strong {
  display: block;
}

.withdrawals-table td small {
  margin-top: 4px;
  color: var(--teacher-muted);
  font-size: 12px;
  font-weight: 600;
}

.support-dashboard .dashboard-filters {
  justify-content: flex-start;
}

.support-withdrawals-table {
  min-width: 1060px;
}

.support-withdrawals-table td small,
.support-withdrawals-table td strong {
  display: block;
}

.support-withdrawals-table td small {
  margin-top: 4px;
  color: var(--teacher-muted);
  font-size: 12px;
  font-weight: 600;
}

.support-ticket-title-cell {
  min-width: 280px;
}

.support-user-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f3f6fa;
  color: var(--teacher-navy);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.support-user-type-student {
  background: #f5f9ff;
  color: #0058d2;
}

.support-user-type-teacher {
  background: #b2ffc6;
  color: #008722;
}

.support-user-type-admin,
.support-user-type-developer {
  background: #ffebc6;
  color: #f97907;
}

.teacher-status.support-status-open {
  background: #f5f9ff;
  color: #0058d2;
}

.teacher-status.support-status-progress {
  background: #ffe8bd;
  color: #ff8a00;
}

.teacher-status.support-status-resolved {
  background: #91f5af;
  color: #069c3d;
}

.teacher-status.support-status-closed {
  background: #ffc2c8;
  color: #f0444f;
}

.teacher-status.support-priority-low {
  background: #b2ffc6;
  color: #008722;
}

.teacher-status.support-priority-medium {
  background: #ffebc6;
  color: #f97907;
}

.teacher-status.support-priority-high {
  background: #ffc7c7;
  color: #ff0707;
}

.support-create-link {
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  background: var(--teacher-blue);
  color: #ffffff;
  font-family: "Cairo", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.support-create-link.secondary {
  background: #ffffff;
  color: var(--teacher-navy);
  border: 1px solid #e7ebf0;
}

.support-detail-actions {
  display: flex;
  justify-content: flex-start;
}

.support-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.support-detail-main,
.support-detail-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.support-detail-card-header {
  justify-content: space-between;
}

.support-detail-card-header small {
  color: var(--table-muted-badge-text);
  font-size: 13px;
  font-weight: 800;
}

.support-detail-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 28px;
  border-top: 1px solid var(--table-border);
  background: #ffffff;
}

.support-detail-title h1 {
  margin: 0 0 8px;
  color: var(--teacher-navy);
  font-size: 25px;
  line-height: 1.45;
}

.support-detail-title p {
  margin: 0;
  color: var(--teacher-muted);
  font-size: 14px;
  font-weight: 700;
}

.support-detail-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.support-message-block {
  padding: 22px 28px;
  border-top: 1px solid var(--table-border);
  background: #ffffff;
}



/* .support-message-block.admin {
  border-right: 4px solid;
  background: #fcfffd;
} */

.support-message-block.user {
  border-right: 4px solid #ffe8bd;
  background: #fffdf8;
}

.support-message-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.support-message-block-head time {
  color: var(--teacher-muted);
  font-size: 12px;
  font-weight: 700;
}

.support-message-block p {
  margin: 0;
  color: var(--teacher-navy);
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
}

.support-sender {
  display: flex;
  align-items: center;
  gap: 12px;
}

.support-sender-avatar,
.support-requester-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 800;
}

.support-sender-avatar {
  width: 42px;
  height: 42px;
  background: #eef2f7;
  color: var(--teacher-navy);
}

.support-sender-avatar.admin {
  background: #eaf2ff;
  color: var(--teacher-blue);
}

.support-thread-list {
  border-top: 1px solid var(--table-border);
}

.support-detail-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.support-detail-image-thumb {
  width: 92px;
  height: 92px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #ffffff;
  display: block;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.support-detail-image-thumb:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(7, 31, 67, 0.12);
}

.support-reply-form,
.support-side-content {
  display: grid;
  gap: 18px;
  padding: 24px 28px;
  border-top: 1px solid var(--table-border);
}

.support-reply-form input[type="file"],
.support-reply-form textarea,
.support-side-content select {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  color: var(--teacher-navy);
  font-family: "Cairo", sans-serif;
}

.support-reply-form textarea {
  min-height: 140px;
  resize: vertical;
}

.support-file-field {
  gap: 10px;
}

.support-file-picker {
  position: relative;
  min-height: 86px;
  display: grid;
  margin-top: 10px ;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px dashed #b8c7dc;
  border-radius: 10px;
  background: #f8fbff;
  color: var(--teacher-navy);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.support-file-picker:hover,
.support-file-picker:focus-within {
  border-color: var(--teacher-blue);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(9, 91, 215, 0.08);
}

.support-file-picker input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.support-file-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #eaf2ff;
  color: var(--teacher-blue);
  font-size: 20px;
}

.support-file-copy strong,
.support-file-copy small {
  display: block;
}

.support-file-copy strong {
  color: var(--teacher-navy);
  font-size: 15px;
  font-weight: 800;
}

.support-file-copy small {
  margin-top: 5px;
  color: var(--teacher-muted);
  font-size: 12px;
  font-weight: 600;
}

.support-file-action {
  min-width: 92px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: var(--teacher-blue);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.support-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.support-requester-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--table-border);
}

.support-requester-avatar {
  width: 52px;
  height: 52px;
  background: var(--teacher-blue);
  color: #ffffff;
  font-size: 20px;
}

.support-side-meta {
  display: grid;
  gap: 14px;
  margin: 0;
}

.support-side-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background: #f8fafc;
}

.support-side-meta dt {
  color: var(--teacher-muted);
  font-size: 13px;
  font-weight: 700;
}

.support-side-meta dd {
  margin: 0;
  max-width: 170px;
  overflow: hidden;
  color: var(--teacher-navy);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-detail-empty {
  display: grid;
  place-items: center;
  border-top: 1px solid var(--table-border);
}

.support-image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
}

.support-image-modal.open {
  display: flex;
}

.support-image-modal .modal-content {
  position: relative;
  max-width: min(92vw, 980px);
  max-height: 90vh;
}

.support-image-modal .modal-image {
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
}

.support-image-modal .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #111827;
  font-size: 22px;
  cursor: pointer;
}

.support-status-hint {
  color: var(--teacher-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.7;
}

.withdrawal-modal-content {
  max-width: 460px;
}

.withdrawal-reason-field {
  gap: 8px;
  color: var(--teacher-navy);
  font-weight: 700;
}

.withdrawal-reason-field textarea {
  min-height: 120px;
}

.withdrawal-modal-content .submit-btn,
.withdrawal-modal-content .cancel {
  min-width: 130px;
  height: 42px;
  border: 0;
  border-radius: 8px;
  font-family: "Cairo", sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.withdrawal-modal-content .submit-btn {
  background: var(--teacher-blue);
  color: #ffffff;
}

.withdrawal-modal-content .submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.teacher-empty-state {
  height: 180px;
  text-align: center;
  color: var(--teacher-muted);
}

.teacher-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  color: #111827;
}

.teacher-page-numbers {
  display: flex;
  align-items: center;
  gap: 18px;
}

.teacher-page-numbers a,
.teacher-page-edge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  color: #111827;
  text-decoration: none;
  font-size: 16px;
}

.teacher-page-numbers a.active {
  border-radius: 50%;
  background: var(--teacher-blue);
  color: #ffffff;
}

.teacher-page-edge {
  gap: 10px;
}

.teacher-page-edge:first-child {
  justify-self: end;
}

.teacher-page-edge:last-child {
  justify-self: start;
}

.teacher-page-edge.disabled {
  pointer-events: none;
  opacity: 0.45;
}

@media (max-width: 1200px) {
  .dashboard-filters,
  .teacher-filters {
    gap: 10px;
  }

  .dashboard-filter-toggle,
  .teacher-filter-toggle {
    min-width: 96px;
    padding: 0 12px;
    font-size: 14px;
  }

  .support-detail-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .teachers-dashboard-page .top-bar {
    margin: 12px 12px 0;
  }

  .teachers-dashboard-page .page-content {
    padding: 28px 12px 20px;
  }

  .dashboard-search,
  .teacher-search {
    max-width: none;
  }

  .dashboard-filter-menu,
  .dashboard-filter-toggle,
  .teacher-filter-menu,
  .teacher-filter-toggle {
    width: 100%;
  }

  .dashboard-filter-panel,
  .teacher-filter-panel,
  .amount-panel,
  .sort-panel {
    width: 100%;
    min-width: 0;
  }

  .support-create-link,
  .support-detail-actions,
  .support-form-actions .support-create-link {
    width: 100%;
  }

  .support-detail-summary,
  .support-message-block-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .support-detail-pills {
    justify-content: flex-start;
  }

  .support-file-picker {
    grid-template-columns: auto 1fr;
  }

  .support-file-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .teacher-pagination {
    grid-template-columns: 1fr;
  }

  .teacher-page-edge:first-child,
.teacher-page-edge:last-child {
  justify-self: center;
  }
}

/* Dashboard home redesign */
.dashboard-home {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.dashboard-home-header {
  position: relative;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.dashboard-home-header h1 {
  margin: 0;
  color: var(--teacher-navy);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-period-form {
  position: relative;
  order: -1;
  z-index: 45;
}

.dashboard-period-menu {
  position: relative;
  display: inline-flex;
}

.dashboard-period-toggle,
.dashboard-governorate-toggle,
.dashboard-student-search {
  height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e7ebf0;
  border-radius: 7px;
  background: #ffffff;
  color: var(--teacher-navy);
  font-family: "Cairo", sans-serif;
  font-size: 16px;
}

.dashboard-period-toggle,
.dashboard-governorate-toggle {
  padding: 0 16px;
  cursor: pointer;
}

.dashboard-period-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  z-index: 40;
  width: 376px;
  display: none;
  overflow: hidden;
  border: 1px solid #e0e4ea;
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(7, 31, 67, 0.16);
}

.dashboard-period-menu.open .dashboard-period-panel {
  display: block;
}

.dashboard-period-panel h3 {
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid #edf0f4;
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  text-align: right;
}

.dashboard-period-panel label {
  display: block;
  padding: 16px 20px 0;
  color: #111827;
  font-size: 14px;
}

.dashboard-period-panel label span {
  display: block;
  margin-bottom: 8px;
}

.dashboard-period-panel input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d7dce3;
  border-radius: 8px;
  color: var(--teacher-navy);
  font-family: "Cairo", sans-serif;
}

.dashboard-period-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.period-apply,
.period-clear {
  height: 42px;
  border: 0;
  border-radius: 8px;
  font-family: "Cairo", sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.period-apply {
  flex: 1;
  background: var(--teacher-blue);
  color: #ffffff;
}

.period-clear {
  min-width: 110px;
  background: transparent;
  color: #111827;
}

.dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 24px;
}

.dashboard-metric-card {
  position: relative;
  min-height: 152px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  gap: 14px 18px;
  padding: 24px;
  border: 1px solid #edf0f4;
  border-radius: 10px;
  background: #ffffff;
}

.metric-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(7, 31, 67, 0.08);
  color: #12a66a;
  background: #f4fff9;
  font-size: 22px;
}

.metric-icon.coral {
  color: #ff5138;
  background: #fff5f2;
}

.metric-content {
  grid-column: 2;
  text-align: left;
}

.metric-content strong {
  display: block;
  color: var(--teacher-navy);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.metric-content span {
  display: block;
  margin-top: 22px;
  color: #111827;
  font-size: 17px;
}

.metric-trend {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  color: #12b76a;
  background: #d7f8e9;
  font-size: 13px;
  font-weight: 700;
  direction: ltr;
}

.metric-trend.down {
  color: #ff5138;
  background: #ffe4dd;
}

.dashboard-student-filters {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
}

.dashboard-student-search {
  flex: 0 1 356px;
  padding: 0 16px;
}

.dashboard-student-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--teacher-navy);
  font: inherit;
}

.dashboard-governorate-menu {
  position: relative;
}

.dashboard-governorate-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 34;
  min-width: 220px;
  display: none;
  padding: 12px;
  border: 1px solid #e0e4ea;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(7, 31, 67, 0.14);
}

.dashboard-governorate-menu.open .dashboard-governorate-panel {
  display: block;
}

.dashboard-governorate-panel button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #111827;
  font-family: "Cairo", sans-serif;
  font-size: 14px;
  text-align: right;
  cursor: pointer;
}

.dashboard-governorate-panel button:hover {
  background: #f4f8ff;
}

.dashboard-students-card {
  overflow: hidden;
  border: 1px solid var(--table-border);
  border-radius: 14px;
  background: #ffffff;
}

.dashboard-students-header {
  height: 66px;
  display: flex;
  align-items: center;
  padding: 0 28px;
}

.dashboard-students-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #111827;
  font-size: 19px;
  font-weight: 600;
}

.dashboard-students-header h2 span {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--table-muted-badge-bg);
  color: var(--table-muted-badge-text);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-students-table-wrap {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--table-border);
  border-radius: 0;
}

.dashboard-students-table {
  min-width: 820px;
}

.dashboard-home-empty {
  height: 180px;
  text-align: center;
  color: var(--teacher-muted);
}

.dashboard-home-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.dashboard-home-pagination a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #111827;
  text-decoration: none;
  font-size: 15px;
}

.dashboard-home-pagination a.active {
  background: var(--teacher-blue);
  color: #ffffff;
}

/* Governments and cities dashboard */
.geo-dashboard {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.geo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.geo-header h1 {
  margin: 0;
  color: var(--teacher-navy);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}

.geo-tabs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid #e7ebf0;
  border-radius: 10px;
  background: #ffffff;
}

.geo-tab-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--teacher-navy);
  font-family: "Cairo", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.geo-tab-btn.active {
  background: var(--teacher-blue);
  color: #ffffff;
}

.geo-tab-content {
  display: none;
  flex-direction: column;
  gap: 22px;
}

.geo-tab-content.active {
  display: flex;
}

.geo-tab-content[hidden] {
  display: none;
}

.geo-filters {
  justify-content: flex-start;
}

.geo-primary-btn {
  height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  background: var(--teacher-blue);
  color: #ffffff;
  font-family: "Cairo", sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.geo-select-control {
  height: 46px;
  min-width: 210px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #e7ebf0;
  border-radius: 7px;
  background: #ffffff;
  color: var(--teacher-navy);
}

.geo-select-control select {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--teacher-navy);
  font-family: "Cairo", sans-serif;
  font-size: 15px;
}

.geo-table {
  min-width: 940px;
}

.geo-pagination {
  margin-top: 0;
}

.geo-pagination button {
  border: 0;
  background: transparent;
  font-family: "Cairo", sans-serif;
  cursor: pointer;
}

.geo-pagination button:disabled {
  cursor: default;
  opacity: 0.45;
}

.geo-pagination .teacher-page-numbers button {
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #111827;
}

.geo-pagination .teacher-page-numbers button.active {
  background: var(--teacher-blue);
  color: #ffffff;
}

.geo-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(7, 31, 67, 0.38);
}

.geo-modal.open {
  display: flex;
}

.geo-modal-dialog {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(7, 31, 67, 0.22);
}

.geo-modal-header {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 22px;
  border-bottom: 1px solid #edf0f4;
}

.geo-modal-header h2 {
  margin: 0;
  color: #111827;
  font-size: 19px;
  font-weight: 700;
}

.geo-modal-close {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f3f6fa;
  color: var(--teacher-navy);
  cursor: pointer;
}

.geo-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}

.geo-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.geo-field input,
.geo-field select {
  height: 44px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid #d7dce3;
  border-radius: 8px;
  outline: 0;
  background: #ffffff;
  color: var(--teacher-navy);
  font-family: "Cairo", sans-serif;
  font-size: 15px;
  font-weight: 500;
}

.geo-field input:focus,
.geo-field select:focus {
  border-color: var(--teacher-blue);
  box-shadow: 0 0 0 3px rgba(9, 91, 215, 0.1);
}

.geo-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.geo-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}

.geo-checkbox input {
  width: 18px;
  height: 18px;
  accent-color: var(--teacher-blue);
}

.geo-modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 6px;
}

/* Admin financial analytics */
.financial-analytics-dashboard {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.financial-analytics-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.financial-analytics-header h1 {
  margin: 0;
  color: var(--teacher-navy);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
}

.financial-analytics-header p {
  margin: 8px 0 0;
  color: var(--teacher-muted);
  font-size: 15px;
}

.financial-export-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.geo-primary-btn.secondary {
  background: #ffffff;
  color: var(--teacher-blue);
  border: 1px solid #d7e4fb;
}

.financial-filter-bar {
  align-items: end;
}

.financial-filter-field {
  min-width: 170px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
}

.financial-filter-field input,
.financial-filter-field select {
  height: 46px;
  padding: 0 12px;
  border: 1px solid #e7ebf0;
  border-radius: 7px;
  outline: 0;
  background: #ffffff;
  color: var(--teacher-navy);
  font-family: "Cairo", sans-serif;
  font-size: 15px;
}

.financial-filter-field input:focus,
.financial-filter-field select:focus {
  border-color: var(--teacher-blue);
  box-shadow: 0 0 0 3px rgba(9, 91, 215, 0.1);
}

.financial-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 18px;
}

.financial-metric-card {
  min-height: 126px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid #edf0f4;
  border-radius: 10px;
  background: #ffffff;
}

.financial-metric-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--teacher-blue);
  background: #eef5ff;
  font-size: 20px;
  flex: 0 0 auto;
}

.financial-metric-icon svg {
  display: block;
  flex: 0 0 auto;
}

.financial-metric-card.green .financial-metric-icon {
  color: #079455;
  background: #e7f8ee;
}

.financial-metric-card.red .financial-metric-icon {
  color: #d92d20;
  background: #ffe9e7;
}

.financial-metric-card.orange .financial-metric-icon {
  color: #f79009;
  background: #fff4df;
}

.financial-metric-card.purple .financial-metric-icon {
  color: #7a5af8;
  background: #f0edff;
}

.financial-metric-card strong {
  display: block;
  color: var(--teacher-navy);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.financial-metric-card span {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.financial-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.financial-panel {
  min-width: 0;
}

.financial-table {
  min-width: 780px;
}

.financial-table.compact {
  min-width: 620px;
}

.financial-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--teacher-blue);
  font-size: 12px;
  font-weight: 800;
}

.financial-status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 22px 22px;
}

.financial-status-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #fbfcfe;
}

.financial-status-row span {
  color: #111827;
  font-weight: 700;
}

.financial-status-row strong {
  color: var(--teacher-navy);
  font-size: 18px;
}

.financial-status-row em {
  color: var(--teacher-muted);
  font-style: normal;
  font-weight: 700;
}

.financial-chart {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0 22px 22px;
}

.financial-chart-row {
  display: grid;
  grid-template-columns: 110px 1fr 130px;
  align-items: center;
  gap: 14px;
  color: var(--teacher-navy);
  font-size: 14px;
  font-weight: 700;
}

.financial-chart-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.financial-chart-row i {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--teacher-blue);
}

.financial-chart-row strong {
  text-align: left;
}

@media (min-width: 1600px) {
  .financial-metric-grid {
    grid-template-columns: repeat(5, minmax(200px, 1fr));
  }
}

@media (max-width: 1200px) {
  .dashboard-metric-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .financial-metric-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .financial-grid-two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-home-header,
  .dashboard-student-filters {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-home-header h1 {
    font-size: 26px;
  }

  .dashboard-period-panel {
    right: 0;
    left: auto;
    width: min(360px, calc(100vw - 120px));
  }

  .dashboard-metric-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-student-search,
  .dashboard-governorate-menu,
  .dashboard-governorate-toggle {
    width: 100%;
  }

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

  .geo-tabs,
  .geo-primary-btn,
  .geo-select-control {
    width: 100%;
  }

  .geo-tab-btn {
    flex: 1;
    justify-content: center;
  }

  .geo-field-grid {
    grid-template-columns: 1fr;
  }

  .geo-modal-actions {
    flex-direction: column;
  }

  .geo-modal-actions .panel-submit,
  .geo-modal-actions .panel-clear {
    width: 100%;
  }

  .financial-analytics-header,
  .financial-export-actions,
  .financial-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .financial-filter-field,
  .financial-export-actions .geo-primary-btn {
    width: 100%;
  }

  .financial-metric-grid {
    grid-template-columns: 1fr;
  }

  .financial-chart-row,
  .financial-status-row {
    grid-template-columns: 1fr;
  }

  .financial-chart-row strong {
    text-align: right;
  }
}
