/* Reset và Base */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8fafc;
  color: #1e293b;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  font-size: 14px;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40vh;
  max-height: 500px;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  pointer-events: none;
  z-index: 0;
}

body > * {
  position: relative;
  z-index: 1;
}

/* Layout chính */
.sidebar-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar - Modern Blue Design */
.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #1976d2 0%, #1565c0 100%);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  box-shadow: 2px 0 12px rgba(13, 71, 161, 0.2);
}

.sidebar-header {
  padding: 28px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #42a5f5 0%, #1976d2 100%);
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(25, 118, 210, 0.4);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.sidebar-title {
  color: #f8fafc;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 16px 12px;
  flex: 1;
}

.sidebar-menu li {
  margin: 0 0 4px 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-menu a .sidebar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.sidebar-menu a.active {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
  border-left: 4px solid #fff;
  font-weight: 600;
}

.sidebar-menu a:hover:not(.active) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateX(4px);
}

.sidebar-menu a.active .sidebar-icon {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
  z-index: 3;
  position: relative;
  transform: scale(1.1);
}

.sidebar-menu a.active .sidebar-icon svg {
  color: #ffffff !important;
  z-index: 4;
  position: relative;
}

.sidebar-menu a .sidebar-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  opacity: 1;
  transition: all 0.2s ease;
  display: block;
  position: relative;
  z-index: 1;
}

.sidebar-menu a:hover .sidebar-icon svg {
  opacity: 1;
  transform: none;
  z-index: 2;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #f8fafc;
  margin-left: 280px;
  transition: margin-left 0.3s ease;
}

.main-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
}

.user-info {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

main {
  padding: 32px;
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cards - Modern Design */
.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1976d2 0%, #1565c0 100%);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(25, 118, 210, 0.2);
}

.card-header {
  padding: 24px 28px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-actions {
  display: flex;
  gap: 10px;
}

.card-body {
  padding: 28px;
  background: #ffffff;
}

/* Buttons - Modern Blue Design */
.btn-main, .btn-add-student {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1976d2;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 24px;
  text-decoration: none;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
  letter-spacing: 0.3px;
}

.btn-main:hover, .btn-add-student:hover {
  background: #1565c0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}

.btn-main:active, .btn-add-student:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.3);
}

.btn-main.back {
  background: #1976d2;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
}

.btn-main.back:hover {
  background: #1565c0;
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4);
}

.btn-main svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s ease;
}

.btn-main:hover svg {
  transform: scale(1.1);
}

/* Button Variants */
.btn-success {
  background: #10b981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
  background: #ef4444;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
  background: #64748b;
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
  background: #475569;
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4);
}

/* Tables - Unified Modern Design (matching eligible_students.php) */
.student-table, table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.student-table thead, table thead {
  background: #1976d2;
}

.student-table th, table th {
  background: #1976d2;
  color: #ffffff;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 1px solid #e0e0e0;
  text-transform: none;
  letter-spacing: normal;
  position: relative;
}

.student-table td, table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
  color: #1e293b;
  vertical-align: middle;
  transition: all 0.2s ease;
}

.student-table tbody tr, table tbody tr {
  transition: all 0.2s ease;
  background: #ffffff;
}

.student-table tbody tr:nth-child(even), table tbody tr:nth-child(even) {
  background: #fafafa;
}

.student-table tbody tr:hover, table tbody tr:hover {
  background: #f5f5f5;
}

.student-table tbody tr:last-child td, table tbody tr:last-child td {
  border-bottom: 1px solid #e0e0e0;
}

/* Action buttons - Modern Design */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.action-btn.edit-btn {
  background: #1976d2;
  color: #fff;
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.3);
}

.action-btn.edit-btn:hover {
  background: #1565c0;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(25, 118, 210, 0.4);
}

.action-btn.delete-btn {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.action-btn.delete-btn:hover {
  background: #dc2626;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

.action-btn:active {
  transform: scale(0.95);
}

.action-btn svg {
  width: 18px;
  height: 18px;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.action-btn:hover svg {
  transform: scale(1.2);
}

.action-btn.delete-btn svg {
  stroke: #fff !important;
  color: #fff !important;
  fill: none;
}

/* Forms - Modern Design */
.form-edit {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-edit label {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
  color: #374151;
  font-size: 14px;
  position: relative;
}

.form-edit input,
.form-edit select,
.form-edit textarea {
  padding: 14px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
  background: #ffffff;
  color: #1e293b;
  font-weight: 500;
}

.form-edit input::placeholder,
.form-edit textarea::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.form-edit input:focus,
.form-edit select:focus,
.form-edit textarea:focus {
  outline: none;
  border-color: #1976d2;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.form-edit input:hover,
.form-edit select:hover,
.form-edit textarea:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

/* Status badges - Modern Design */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.status-badge.success {
  background: #10b981;
  color: #fff;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.status-badge.success:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}

.status-badge.danger {
  background: #ef4444;
  color: #fff;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.status-badge.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

.status-badge.warning {
  background: #f59e0b;
  color: #fff;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.status-badge.warning:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

.status-badge.info {
  background: #1976d2;
  color: #fff;
  box-shadow: 0 2px 6px rgba(25, 118, 210, 0.3);
}

.status-badge.info:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(25, 118, 210, 0.4);
}

/* Grade colors */
.grade-excellent {
  color: #059669;
  font-weight: 600;
}

.grade-good {
  color: #0d9488;
  font-weight: 600;
}

.grade-average {
  color: #d97706;
  font-weight: 600;
}

.grade-poor {
  color: #dc2626;
  font-weight: 600;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* Stats cards - Modern Design */
.stats-card {
  background: #ffffff;
  padding: 28px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1976d2 0%, #1565c0 100%);
}

.stats-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.stats-card .number {
  font-size: 42px;
  font-weight: 800;
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.stats-card .label {
  font-size: 14px;
  color: #64748b;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Alerts - Modern Design */
.alert {
  padding: 18px 24px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: currentColor;
  opacity: 0.8;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #f59e0b;
}

.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #1976d2;
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }

/* Responsive */
@media (max-width: 1024px) {
  .sidebar {
      width: 240px;
  }
  
  main {
      padding: 20px;
  }
  
  .card-header,
  .card-body {
      padding: 16px 20px;
  }
}

@media (max-width: 768px) {
  /* Sidebar ẩn mặc định trên mobile, chỉ hiện khi mở */
  .sidebar {
      transform: translateX(-100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      width: 280px;
      box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
  }
  
  .sidebar.mobile-open {
      transform: translateX(0);
  }
  
  .sidebar-menu a {
      padding: 10px 12px;
      font-size: 13px;
  }
  
  .sidebar-menu a .sidebar-icon {
      width: 28px;
      height: 28px;
  }
  
  /* Main content không có margin-left trên mobile */
  .main-content {
      margin-left: 0 !important;
      padding-top: 20px;
      padding-left: 16px;
      padding-right: 16px;
  }
  
  .main-header {
      padding: 12px 16px;
      padding-left: 70px; /* Space for menu toggle button */
  }
  
  main {
      padding: 16px;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
      grid-template-columns: 1fr;
  }
  
  .form-actions {
      flex-direction: column;
  }
  
  .btn-main {
      width: 100%;
      justify-content: center;
  }
}

@media (max-width: 640px) {
  .sidebar {
      width: 280px; /* Giữ nguyên width để dễ sử dụng */
  }
  
  .sidebar-header {
      padding: 16px 12px;
  }
  
  .sidebar-avatar {
      width: 40px;
      height: 40px;
      font-size: 16px;
  }
  
  .sidebar-title {
      font-size: 14px;
  }
  
  .student-table {
      font-size: 13px;
  }
  
  .student-table th,
  .student-table td {
      padding: 12px 16px;
  }
  
  .card-header,
  .card-body {
      padding: 16px;
  }
}

/* Footer */
footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 16px 24px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #e2e8f0;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
} 

/* Sidebar toggle button (hamburger) hiện đại */
.sidebar-toggle {
display: none;
position: fixed;
top: 18px;
left: 18px;
z-index: 2001;
background: #fff;
border-radius: 50%;
box-shadow: 0 2px 12px rgba(30,41,59,0.15);
padding: 10px;
border: none;
cursor: pointer;
width: 48px;
height: 48px;
display: flex;
align-items: center;
justify-content: center;
transition: box-shadow 0.2s, background 0.2s;
}
.sidebar-toggle:active {
background: #e0e7ef;
box-shadow: 0 4px 16px rgba(30,41,59,0.18);
}
.sidebar-toggle svg {
width: 28px;
height: 28px;
stroke: #222;
transition: transform 0.2s ease;
}
body.menu-open .sidebar-toggle svg {
transform: rotate(90deg);
}

/* Sidebar overlay hiện đại */
#sidebarOverlay {
display: none;
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(30,41,59,0.45);
z-index: 1100;
transition: opacity 0.2s;
opacity: 0;
}
body.menu-open #sidebarOverlay {
display: block;
opacity: 1;
}

/* Tab menu - Modern Design */
.tab-menu {
  display: flex;
  gap: 8px;
  margin-bottom: 0;
  border-bottom: 2px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 12px 12px 0 0;
  padding: 8px 12px 0 12px;
  position: relative;
}

.tab-link {
  padding: 14px 32px;
  border-radius: 16px 16px 0 0;
  background: transparent;
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
  border: none;
  outline: none;
  position: relative;
  top: 0;
  box-shadow: none;
  cursor: pointer;
}

.tab-link::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1976d2 0%, #1565c0 100%);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-link.active::before,
.tab-link:hover::before {
  transform: scaleX(1);
}

.tab-link.active, .tab-link:hover {
  background: #ffffff;
  color: #1e293b;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
  border-bottom: 2px solid transparent;
  z-index: 2;
  transform: translateY(-1px);
}

.tab-link.active {
  background: rgba(255, 255, 255, 1);
  color: #1976d2;
  font-weight: 700;
}
@media (max-width: 600px) {
  .tab-link { padding: 10px 12px; font-size: 14px; }
  .tab-menu { gap: 4px; padding: 0 2px; }
} 

/* Pagination - Modern Design */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 32px 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination button,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  border: 2px solid transparent;
  background: #ffffff;
  color: #475569;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.pagination a:hover,
.pagination button:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  color: #1976d2;
}

.pagination .active,
.pagination span.active {
  background: #1976d2;
  color: #fff;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3);
  border-color: transparent;
}

.pagination .disabled,
.pagination span.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Inline buttons in tables and forms */
button[style*="background"],
a[style*="background"] {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

button[style*="background"]:hover,
a[style*="background"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Table responsive cho mobile */
@media (max-width: 900px) {
.student-table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}
.student-table thead, .student-table tbody, .student-table tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.student-table th, .student-table td {
  white-space: nowrap;
  min-width: 100px;
  padding: 12px 10px;
  font-size: 13px;
}
}

/* Form chia 2 cột chuyển thành 1 cột trên mobile */
@media (max-width: 700px) {
.card-body > div[style*="grid-template-columns"] {
  display: flex !important;
  flex-direction: column !important;
  gap: 18px !important;
}
}

/* Tăng padding input, select, button trên mobile */
@media (max-width: 700px) {
input, select, textarea, .btn-main, .btn-add-student {
  font-size: 15px !important;
  padding: 14px 16px !important;
  min-height: 44px;
}
}

/* Tab menu cuộn ngang trên mobile */
@media (max-width: 600px) {
.tab-menu {
  overflow-x: auto;
  flex-wrap: nowrap;
  gap: 4px !important;
  padding: 0 2px !important;
}
.tab-link {
  min-width: 120px;
  font-size: 14px !important;
  padding: 10px 12px !important;
  white-space: nowrap;
}
} 

/* Tăng width input[type=number] trong bảng nhập điểm trên mobile */
@media (max-width: 700px) {
input[type=number] {
  width: 90px !important;
  min-width: 70px;
  font-size: 16px !important;
  padding: 10px 8px !important;
}
}

/* Card thống kê padding lớn hơn trên mobile */
@media (max-width: 700px) {
.card-body > div[style*="grid-template-columns"] > div {
  padding: 18px 8px !important;
}
}

/* Form chọn lớp/môn: tăng padding/font-size cho select/input trên mobile */
@media (max-width: 700px) {
select, input[type=text], input[type=search] {
  font-size: 15px !important;
  padding: 14px 16px !important;
  min-width: 120px;
}
} 

/* Hiệu ứng cho button */
.btn-main, .btn-add-student, .action-btn {
transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
box-shadow: 0 1px 3px rgba(30,41,59,0.07);
}
.btn-main:active, .btn-add-student:active, .action-btn:active {
transform: scale(0.97);
box-shadow: 0 2px 8px rgba(30,41,59,0.12);
}
.btn-main:focus, .btn-add-student:focus, .action-btn:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

/* Hiệu ứng hover cho action-btn */
.action-btn:hover {
filter: brightness(1.08);
box-shadow: 0 2px 8px rgba(30,41,59,0.13);
}

/* Hiệu ứng cho input, select, textarea */
input, select, textarea {
transition: border 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
border-color: #3b82f6;
box-shadow: 0 0 0 3px rgba(59,130,246,0.10);
outline: none;
}

/* Card animations - Already updated above */

/* Alert hiệu ứng xuất hiện */
.alert {
animation: fadeInAlert 0.3s ease;
}
@keyframes fadeInAlert {
from { opacity: 0; transform: translateY(-8px); }
to { opacity: 1; transform: none; }
}

/* Table hover dòng */
.student-table tbody tr {
transition: background 0.18s;
}
.student-table tbody tr:hover {
background: #f1f5fa;
}

/* Sidebar overlay hiệu ứng mượt hơn */
#sidebarOverlay {
transition: opacity 0.2s ease, visibility 0.2s ease;
}

/* Modal - Modern Design */
.modal,
[style*="position: fixed"][style*="background: rgba"] {
  background: rgba(0, 0, 0, 0.5) !important;
}

.modal > div,
[style*="position: fixed"] > div {
  background: #ffffff !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
  border: 1px solid #e2e8f0 !important;
  animation: modalSlideIn 0.3s ease !important;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Input file - Modern Design */
input[type="file"] {
  padding: 12px 16px !important;
  border: 2px dashed #cbd5e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  transition: border 0.2s ease, box-shadow 0.2s ease !important;
  cursor: pointer !important;
}

input[type="file"]:hover {
  border-color: #1976d2 !important;
  background: #ffffff !important;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15) !important;
}

input[type="file"]:focus {
  outline: none !important;
  border-color: #1976d2 !important;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1) !important;
}

/* Tăng khoảng cách UX cho mobile */
@media (max-width: 700px) {
.form-edit label, .form-edit input, .form-edit select, .form-edit textarea {
  margin-bottom: 12px !important;
}
.form-actions {
  gap: 16px !important;
  margin-top: 28px !important;
}
} 

/* Sidebar overlay chuẩn mobile */
@media (max-width: 900px) {
.sidebar-layout {
  flex-direction: row !important;
}
.sidebar-modern {
  position: fixed !important;
  left: 0; top: 0; bottom: 0;
  width: 80vw;
  max-width: 320px;
  z-index: 1200;
  transform: translateX(-100%);
  transition: transform 0.2s ease;
  display: flex !important;
  flex-direction: column;
  background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
  box-shadow: 4px 0 24px rgba(0,0,0,0.18);
  height: 100vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.sidebar-modern:not(.sidebar-collapsed) {
  transform: translateX(0) !important;
}
.sidebar-section, .sidebar-submenu {
  z-index: 1210;
}
.main-content {
  margin-left: 0 !important;
  transition: none;
  padding-top: 12px;
  filter: none !important;
}
body.menu-open .main-content {
  filter: none !important;
  pointer-events: auto;
  user-select: auto;
}
#sidebarOverlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30,41,59,0.18);
  z-index: 1100;
  transition: opacity 0.2s;
  opacity: 0;
}
body.menu-open #sidebarOverlay {
  display: block;
  opacity: 1;
}
.sidebar-toggle {
  display: flex !important;
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 2001;
}
body.menu-open .sidebar-toggle {
  opacity: 0;
  pointer-events: none;
}
} 

/* Table responsive mạnh cho mobile */
@media (max-width: 900px) {
.student-table, table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  background: #fff;
}
.student-table thead, .student-table tbody, .student-table tr,
table thead, table tbody, table tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}
.student-table th, .student-table td,
table th, table td {
  min-width: 90px;
  white-space: nowrap;
  font-size: 13px;
  padding: 10px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
}
}

@media (max-width: 600px) {
.student-table th, .student-table td,
table th, table td {
  min-width: 80px;
  font-size: 12px;
  padding: 8px 6px;
}
} 

/* Icon Picker Styles */
.icon-picker {
  position: absolute;
  z-index: 1000;
  background: white;
  border: 2px solid #e1e8ed;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  width: 300px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
  left: 0;
  bottom: 100%;
}

/* Emoji Picker Styles */
.emoji-picker {
  position: absolute;
  z-index: 1000;
  background: white;
  border: 2px solid #e1e8ed;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  width: 300px;
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 10px;
  left: 0;
  bottom: 100%;
}

.icon-picker.show,
.emoji-picker.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.icon-picker.hide,
.emoji-picker.hide {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(10px) !important;
}

.icon-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e1e8ed;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.icon-picker-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
}

.close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: #e2e8f0;
  color: #475569;
}

.icon-categories {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #e1e8ed;
  background: #f8f9fa;
}

.icon-category {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
}

.icon-category:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.icon-category.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 16px;
}

.icon-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  font-size: 20px;
}

.icon-item:hover {
  background: #f1f5f9;
  border-color: #3b82f6;
  transform: scale(1.05);
}

.icon-item.selected {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1d4ed8;
}

/* Icon button styles */
.icon-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: #f1f5f9;
  color: #3b82f6;
}

.icon-btn:active {
  transform: scale(0.95);
} 

/* Emoji Picker Components */
.emoji-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e1e8ed;
  background: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.emoji-picker-header h4 {
  font-weight: 600;
  color: #1e293b;
  font-size: 14px;
  margin: 0;
}

.emoji-categories {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid #e1e8ed;
  background: #f8f9fa;
}

.emoji-category {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #64748b;
}

.emoji-category:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.emoji-category.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  padding: 16px;
}

.emoji-grid button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
  font-size: 18px;
  padding: 0;
}

.emoji-grid button:hover {
  background: #f1f5f9;
  border-color: #3b82f6;
  transform: scale(1.05);
}

/* Emoji button styles */
.emoji-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-btn:hover {
  background: #f1f5f9;
  color: #3b82f6;
}

.emoji-btn:active {
  transform: scale(0.95);
}

/* Toast Notifications - Modern Design */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border-left: 4px solid #1976d2;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
  pointer-events: auto;
  min-width: 300px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
}

.toast-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.toast-success {
  border-left-color: #10b981;
}

.toast-success .toast-icon {
  background: #d1fae5;
  color: #065f46;
}

.toast-error {
  border-left-color: #ef4444;
}

.toast-error .toast-icon {
  background: #fee2e2;
  color: #991b1b;
}

.toast-warning {
  border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
  background: #fef3c7;
  color: #92400e;
}

.toast-info {
  border-left-color: #1976d2;
}

.toast-info .toast-icon {
  background: #dbeafe;
  color: #1e40af;
}

@media (max-width: 640px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
}

/* Command Palette - VS Code Style */
.command-palette {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

.command-palette.active {
  display: flex;
}

.command-palette-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.command-palette-container {
  position: relative;
  width: 100%;
  max-width: 640px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  z-index: 1;
  animation: commandPaletteSlideDown 0.2s ease;
}

@keyframes commandPaletteSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.command-palette-header {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  gap: 12px;
}

.command-palette-header input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-weight: 500;
  color: #1e293b;
  background: transparent;
}

.command-palette-header input::placeholder {
  color: #94a3b8;
}

.command-palette-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #f1f5f9;
  border-radius: 6px;
  cursor: pointer;
  font-size: 20px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.command-palette-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.command-palette-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px;
}

.command-palette-category {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.command-palette-item {
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.command-palette-item:hover,
.command-palette-item.selected {
  background: #f1f5f9;
}

.command-palette-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  margin-bottom: 4px;
}

.command-palette-item-desc {
  font-size: 12px;
  color: #64748b;
}

.command-palette-empty {
  padding: 40px;
  text-align: center;
  color: #94a3b8;
}


/* Global Search Bar */
.global-search-container {
  position: relative;
  flex: 1;
  max-width: 400px;
  margin-right: 24px;
}

.global-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.global-search-icon {
  position: absolute;
  left: 12px;
  color: #94a3b8;
  pointer-events: none;
}

.global-search-input {
  width: 100%;
  padding: 10px 40px 10px 40px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.global-search-input:focus {
  outline: none;
  border-color: #1976d2;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.global-search-shortcut {
  position: absolute;
  right: 8px;
  padding: 4px 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 11px;
  font-family: monospace;
  color: #64748b;
  cursor: pointer;
  user-select: none;
}

.global-search-shortcut:hover {
  background: #f1f5f9;
}

@media (max-width: 768px) {
  .global-search-container {
    display: none;
  }
}

/* Enterprise Dashboard Redesign */
.app-shell {
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.14), transparent 30%),
    linear-gradient(180deg, #eef4fb 0%, #f5f7fb 100%);
}

.app-topbar {
  background: linear-gradient(135deg, #0f2748 0%, #102f59 45%, #153868 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  padding: 18px 28px;
  min-height: 96px;
  box-shadow: 0 20px 45px rgba(15, 39, 72, 0.24);
  gap: 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}

.topbar-brand-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  color: #0f2748;
  padding: 14px 18px;
  border-radius: 20px;
  min-width: 240px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(191, 219, 254, 0.85);
}

.topbar-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.3);
}

.topbar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.topbar-brand-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #64748b;
  font-weight: 700;
}

.topbar-brand-title {
  font-size: 17px;
  line-height: 1.2;
  color: #0f172a;
}

/* Breadcrumbs Navigation */
.breadcrumbs {
  margin-bottom: 24px;
  padding: 0;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  pointer-events: none;
  cursor: default;
}

.breadcrumb-text {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 8px;
  display: inline-block;
  user-select: none;
}

.breadcrumb-item.current .breadcrumb-current-text {
  color: #1e293b;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
  padding: 4px 8px;
  display: inline-block;
}

.breadcrumb-separator {
  color: #cbd5e1;
  font-size: 14px;
  user-select: none;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(226, 232, 240, 0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 11px 16px;
  border-radius: 14px;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.topbar-nav-link:hover,
.topbar-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(148, 163, 184, 0.2);
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
}

.topbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(12px);
}

.topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #fff;
  min-width: 220px;
}

.topbar-avatar {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  box-shadow: 0 14px 24px rgba(37, 99, 235, 0.28);
}

.topbar-profile-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-profile-copy strong {
  color: #fff;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-profile-copy span,
.topbar-chevron {
  color: rgba(226, 232, 240, 0.8);
  font-size: 12px;
}

.topbar-logout {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.26) 100%);
  border-color: rgba(248, 113, 113, 0.28);
}

.workspace-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px 0;
  overflow-x: auto;
}

.workspace-tab,
.workspace-tab-utility {
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 16px 16px 0 0;
  font-weight: 600;
}

.workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  color: #4b5563;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(203, 213, 225, 0.75);
  border-bottom: none;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.workspace-tab.active {
  color: #0f2748;
  background: #ffffff;
}

.workspace-tab-utility {
  width: 46px;
  height: 46px;
  margin-left: auto;
  color: #0f2748;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(203, 213, 225, 0.75);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.dashboard-shell-card {
  border-radius: 0 24px 24px 24px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.09);
  overflow: visible;
}

.dashboard-shell-card::before {
  display: none;
}

.dashboard-shell-body {
  padding: 28px;
  background: linear-gradient(180deg, #f9fbff 0%, #f3f6fb 100%);
}

.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  border-radius: 26px;
  background: linear-gradient(135deg, #0f2748 0%, #123764 55%, #155e75 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 28px 50px rgba(15, 39, 72, 0.24);
}

.dashboard-hero::after {
  content: '';
  position: absolute;
  inset: auto -60px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.28) 0%, transparent 68%);
}

.dashboard-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(191, 219, 254, 0.92);
}

.dashboard-hero h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  color: #fff;
}

.dashboard-hero p {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: 15px;
  color: rgba(226, 232, 240, 0.86);
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.dashboard-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.25s ease;
}

.dashboard-hero-btn.primary {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 14px 26px rgba(239, 68, 68, 0.32);
}

.dashboard-hero-btn.secondary {
  color: #fff;
  border: 1px solid rgba(191, 219, 254, 0.36);
  background: rgba(255, 255, 255, 0.08);
}

.dashboard-hero-btn:hover {
  transform: translateY(-2px);
}

.executive-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.executive-stat-card {
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.executive-stat-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.executive-stat-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #94a3b8;
}

.executive-stat-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  box-shadow: 0 0 0 7px rgba(148, 163, 184, 0.14);
}

.executive-stat-value {
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
}

.executive-stat-label {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.executive-stat-meta {
  margin-top: 6px;
  color: #64748b;
  font-size: 13px;
}

.admin-command-board,
.user-dashboard-grid {
  margin-top: 24px;
}

.admin-command-grid,
.dashboard-dual-grid,
.user-dashboard-grid {
  display: grid;
  gap: 20px;
}

.admin-command-grid {
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
}

.dashboard-dual-grid,
.user-dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-dashboard-grid {
  align-items: start;
}

.user-activity-panel {
  grid-column: 1 / -1;
}

.dashboard-panel {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

.panel-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-heading-split {
  align-items: center;
}

.panel-eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #94a3b8;
}

.panel-title {
  margin: 0;
  font-size: 22px;
  color: #0f172a;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.panel-description {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 14px;
}

.panel-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.panel-chip.danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.panel-chip.info {
  color: #0f3b66;
  background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
}

.enterprise-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.field-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-shell span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.field-shell input,
.field-shell select,
.enterprise-table input[type="number"] {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid #dbe3ee;
  background: #f8fbff;
  padding: 0 14px;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field-shell input:focus,
.field-shell select:focus,
.enterprise-table input[type="number"]:focus {
  outline: none;
  border-color: #38bdf8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.selection-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.selection-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.selection-tag button {
  border: none;
  background: transparent;
  color: #1d4ed8;
  font-size: 16px;
  cursor: pointer;
}

.panel-actions-row,
.action-toolbar,
.quick-link-grid,
.teacher-spotlight-grid,
.toolbar-legend,
.user-timeline,
.activity-header-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-actions-row {
  margin-top: 18px;
}

.dashboard-action-btn,
.toolbar-btn {
  min-height: 46px;
  padding: 0 18px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.dashboard-action-btn:hover,
.toolbar-btn:hover {
  transform: translateY(-2px);
}

.dashboard-action-btn.search,
.toolbar-btn.save {
  color: #fff;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 14px 24px rgba(239, 68, 68, 0.26);
}

.dashboard-action-btn.ghost {
  color: #0f2748;
  background: #edf4ff;
}

.toolbar-btn.import {
  color: #0f2748;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

.toolbar-btn.export {
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
}

.toolbar-btn.advanced {
  color: #fff;
  background: linear-gradient(135deg, #0f766e 0%, #0ea5a4 100%);
}

.tree-shell {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tree-node,
.tree-leaf {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tree-node {
  background: #f8fafc;
  color: #0f172a;
  padding: 14px 16px;
}

.tree-node.active {
  background: linear-gradient(135deg, #0f2748 0%, #1d4ed8 100%);
  color: #fff;
}

.tree-children {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tree-leaf {
  background: #eef6ff;
  color: #1e3a8a;
  padding: 12px 14px;
}

.tree-leaf.current,
.tree-node:hover,
.tree-leaf:hover {
  border-color: rgba(56, 189, 248, 0.36);
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.12);
}

.data-panel {
  margin-top: 20px;
}

.toolbar-legend {
  align-items: center;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  margin-right: 6px;
}

.legend-dot.red { background: #ef4444; }
.legend-dot.blue { background: #0ea5e9; }
.legend-dot.green { background: #10b981; }

.action-toolbar {
  margin: 22px 0 18px;
}

.enterprise-table-wrap {
  overflow-x: auto;
  border-radius: 20px;
  border: 1px solid #dbe6f1;
}

.enterprise-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 860px;
  background: #fff;
}

.enterprise-table thead tr:first-child th {
  background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 100%);
  color: #0f2748;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.enterprise-table thead tr:nth-child(2) th {
  background: #e0f2fe;
  color: #164e63;
}

.enterprise-table th,
.enterprise-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
}

.enterprise-table tbody tr:hover {
  background: #f8fbff;
}

.enterprise-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.enterprise-table input[type="number"] {
  min-width: 74px;
  min-height: 40px;
  padding: 0 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill.success {
  color: #065f46;
  background: #d1fae5;
}

.status-pill.warning {
  color: #92400e;
  background: #fef3c7;
}

.status-pill.info {
  color: #0c4a6e;
  background: #dbeafe;
}

.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  text-decoration: none;
  color: #0f172a;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe6f1;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.quick-link-card strong {
  font-size: 15px;
}

.quick-link-card span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.quick-link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.09);
  border-color: #93c5fd;
}

.activity-header-shell,
.activity-stream-body {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.activity-header-meta {
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
}

.activity-scroll-shell {
  max-height: 560px;
  overflow-y: auto;
  padding-right: 4px;
}

.activity-stream-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
  animation: slideIn 0.3s ease-out;
}

.activity-item-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.activity-item-copy {
  width: 100%;
  min-width: 0;
}

.activity-item-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.activity-role-badge,
.activity-item-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}

.activity-item-type {
  color: #1e3a8a;
  background: #dbeafe;
}

.activity-item-detail {
  margin-top: 8px;
  color: #334155;
  line-height: 1.65;
}

.activity-item-time {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.empty-state-block {
  text-align: center;
  padding: 56px 24px 36px;
  color: #64748b;
}

.empty-state-icon {
  font-size: 54px;
  margin-bottom: 12px;
}

.user-quick-grid,
.teacher-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spotlight-card {
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
  border: 1px solid #dbeafe;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.spotlight-card span {
  color: #64748b;
  font-weight: 600;
}

.spotlight-card strong {
  font-size: 32px;
  color: #0f2748;
}

.student-chart-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 12px 0 6px;
}

.student-chart-shell canvas {
  max-width: 320px;
}

.student-chart-legend {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-weight: 700;
}

.dashboard-safe-shell {
  display: grid;
  gap: 24px;
}

.dashboard-safe-hero {
  overflow: hidden;
  border: 1px solid #dbe6f1;
  background: linear-gradient(135deg, #ffffff 0%, #f6faff 48%, #eef6ff 100%);
  box-shadow: 0 16px 40px rgba(15, 39, 72, 0.08);
}

.dashboard-safe-hero .card-body {
  padding: 28px 32px;
}

.dashboard-safe-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  color: #0f2748;
}

.dashboard-safe-subtitle {
  margin: 12px 0 0;
  max-width: 760px;
  color: #475569;
  font-size: 15px;
  line-height: 1.7;
}

.dashboard-safe-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.stats-card-safe {
  border: 1px solid #dbe6f1;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.stats-card-safe .card-body {
  padding: 22px 20px;
}

.stats-card-safe-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.stats-card-safe-value {
  margin-top: 14px;
  font-size: 38px;
  line-height: 1;
  font-weight: 800;
}

.stats-card-safe-title {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.dashboard-safe-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 24px;
}

.dashboard-safe-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-safe-form-grid label {
  display: block;
  margin-bottom: 8px;
  color: #142850;
}

.dashboard-safe-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.dashboard-safe-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-safe-links.two-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-safe-link {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid #dbe6f1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #0f2748;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard-safe-link:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 14px 28px rgba(25, 118, 210, 0.12);
}

.dashboard-safe-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-safe-mini-card {
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px solid #dbe6f1;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  text-align: center;
}

.dashboard-safe-mini-card span {
  display: block;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.dashboard-safe-mini-card strong {
  display: block;
  margin-top: 10px;
  color: #0f2748;
  font-size: 28px;
  font-weight: 800;
}

.dashboard-safe-timeline {
  display: grid;
  gap: 14px;
}

.dashboard-safe-timeline-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe6f1;
}

.dashboard-safe-timeline-item strong {
  color: #0f2748;
}

.dashboard-safe-timeline-item span {
  color: #475569;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .dashboard-safe-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-safe-hero .card-body {
    padding: 22px 20px;
  }

  .dashboard-safe-title {
    font-size: 24px;
  }

  .dashboard-safe-form-grid,
  .dashboard-safe-links,
  .dashboard-safe-links.two-columns,
  .dashboard-safe-mini-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-safe-actions .btn,
  .dashboard-safe-actions .btn-main {
    width: 100%;
  }

  .dashboard-safe-timeline-item {
    grid-template-columns: 1fr;
  }
}


.students-page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.students-page-toolbar .card-title {
  margin: 0;
}

.students-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-main.btn-violet {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.22);
}

.btn-main.btn-violet:hover {
  background: linear-gradient(135deg, #5b5ff4 0%, #4338ca 100%);
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.3);
}

.page-filter-shell {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.page-filter-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 980px;
}

.page-filter-field {
  flex: 1 1 220px;
  min-width: 180px;
}

.page-filter-field.page-filter-field--compact {
  flex: 0 1 180px;
}

.page-filter-input,
.page-filter-select {
  width: 100%;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  font-size: 14px;
  background: #ffffff;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.page-filter-input:focus,
.page-filter-select:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.12);
}

.page-filter-input:hover,
.page-filter-select:hover {
  border-color: #b8c7d9;
}

.page-filter-reset {
  display: flex;
  justify-content: flex-start;
}

.page-table-shell {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid #dbe5f0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.page-table-shell .student-table {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.page-table-shell .student-table thead {
  background: #1976d2;
}

.page-table-shell .student-table th {
  background: #1976d2;
  color: #ffffff;
}

.page-table-shell .student-table th,
.page-table-shell .student-table td {
  border-bottom: 1px solid #e0e0e0;
}

.page-table-shell .student-table td:first-child,
.page-table-shell .student-table th:first-child {
  padding-left: 12px;
}

.page-table-shell .student-table td:last-child,
.page-table-shell .student-table th:last-child {
  padding-right: 12px;
}

.row-index {
  font-weight: 700;
  color: #1976d2;
}

.cell-strong {
  font-weight: 700;
  color: #0f172a;
}

.checkbox-center {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1976d2;
}

.status-badge.special {
  background: #fef08a;
  color: #713f12;
  box-shadow: 0 2px 6px rgba(234, 179, 8, 0.24);
}

.bulk-action-bar {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
  border: 1px solid #dbe5f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bulk-action-meta {
  font-size: 14px;
  color: #475569;
  font-weight: 600;
}

.empty-state-block {
  text-align: center;
  padding: 44px 24px;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.empty-state-block strong {
  display: block;
  font-size: 17px;
  color: #0f172a;
  margin-bottom: 8px;
}

.page-pagination {
  margin-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.page-pagination-meta {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.page-pagination-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-chip,
.page-chip-static {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.page-chip {
  background: #ffffff;
  color: #1976d2;
  border: 1px solid #cfe0f2;
  box-shadow: 0 6px 16px rgba(15, 39, 72, 0.08);
}

.page-chip:hover {
  background: #eff6ff;
}

.page-chip-static {
  background: transparent;
  color: #64748b;
}

.page-chip-static.current {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(25, 118, 210, 0.24);
}

.page-chip-static.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-total-note {
  margin-top: 16px;
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.sort-link:hover {
  color: #1976d2;
}

.sort-icon {
  font-weight: 700;
  color: #1976d2;
  font-size: 11px;
}

.student-table th.sortable:hover {
  background-color: rgba(25, 118, 210, 0.08);
}

@media (max-width: 768px) {
  .students-page-toolbar,
  .bulk-action-bar,
  .page-pagination {
    align-items: stretch;
  }

  .students-page-actions,
  .page-pagination-actions,
  .page-filter-form {
    width: 100%;
  }

  .students-page-actions .btn-main,
  .page-pagination-actions .btn-main,
  .bulk-action-bar .btn-main,
  .page-filter-form .btn-main {
    width: 100%;
  }
}

.grade-row-inactive {
  background: #fff8d6;
}

.grade-row-inactive td {
  background: #fff8d6;
}

.entity-stack {
  display: grid;
  gap: 4px;
}

.entity-stack-title {
  font-weight: 600;
  color: #1e293b;
}

.entity-stack-title strong {
  color: #0f172a;
}

.entity-stack-meta {
  font-size: 12px;
  color: #64748b;
}

.grade-column-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.grade-chip-muted {
  color: #94a3b8;
  font-size: 13px;
}

.table-action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-section-gap {
  margin-bottom: 24px;
}

.page-inline-form {
  margin-bottom: 24px;
}

.page-inline-form .btn-main {
  width: auto;
}


.grade-entry-filter {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 32px;
}

.grade-entry-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 220px;
}

.grade-entry-label {
  font-weight: 600;
  color: #142850;
}

.grade-entry-select {
  width: 100%;
  min-width: 220px;
}

.grade-entry-summary {
  margin-bottom: 18px;
  padding: 18px 20px 14px;
  border-radius: 16px;
  border: 1px solid #dbe5f0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
}

.grade-entry-summary-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1976d2;
}

.grade-entry-summary-meta {
  margin-top: 8px;
  font-size: 0.96rem;
  color: #334155;
}

.grade-entry-student-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.grade-entry-student-lookup {
  justify-content: center;
}

.grade-entry-student-lookup .page-filter-field {
  flex: 0 1 280px;
}

.grade-entry-student-info {
  margin-bottom: 18px;
  padding: 16px 18px 14px;
  border-radius: 16px;
  border: 1px solid #dbe5f0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
}

.grade-entry-student-name {
  margin-bottom: 8px;
  color: #334155;
}

.grade-entry-student-meta {
  color: #475569;
}

.grade-entry-empty {
  text-align: center;
  padding: 24px;
  color: #64748b;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.grade-entry-empty strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
}

.grade-entry-save {
  margin-top: 24px;
}

.grade-entry-save .btn-main {
  width: auto;
}

.grade-entry-col-disabled {
  background: #f3f6fa;
}

.grade-entry-col-disabled .grade-input {
  background: #eef2f7;
}

.grade-edit-shell {
  max-width: 1080px;
  margin: 0 auto;
}

.grade-edit-alert {
  margin-bottom: 18px;
}

.grade-edit-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.grade-edit-readonly {
  background: #f3f6fa;
}

.grade-edit-config,
.grade-edit-current,
.grade-entry-admin-panel,
.grade-entry-admin-import {
  margin-bottom: 20px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid #dbe5f0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
}

.grade-entry-admin-panel--warm,
.grade-entry-admin-import {
  background: linear-gradient(180deg, #fffaf0 0%, #fff4da 100%);
  border-color: #fde3a7;
}

.grade-edit-section-title,
.grade-entry-admin-panel-title,
.grade-entry-admin-import-title {
  margin: 0 0 12px;
  color: #142850;
  font-size: 1.02rem;
  font-weight: 700;
}

.grade-entry-admin-panel-title--warm,
.grade-entry-admin-import-title {
  color: #b45309;
}

.grade-edit-config-grid,
.grade-edit-current-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.grade-edit-section {
  margin-bottom: 20px;
}

.grade-edit-grade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.grade-edit-locked {
  background: #f3f6fa !important;
  cursor: not-allowed;
  opacity: 0.7;
}

.grade-edit-current-score {
  font-weight: 700;
  color: #1976d2;
}

.grade-entry-admin-shell {
  max-width: 1280px;
  margin: 0 auto;
}

.grade-entry-admin-filter {
  margin-bottom: 24px;
}

.grade-entry-admin-filter .page-filter-field {
  flex: 1 1 240px;
}

.grade-entry-admin-filter .page-filter-select {
  width: 100%;
}

.grade-entry-admin-inline-alert {
  margin-bottom: 20px;
}

.grade-entry-admin-export {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.grade-entry-admin-export-copy {
  flex: 1;
  min-width: 260px;
}

.grade-entry-admin-export-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.grade-entry-admin-multi-select {
  min-width: 220px;
  min-height: 112px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
}

.grade-entry-admin-table-wrap {
  margin-top: 18px;
}

.grade-entry-admin-table-wrap .student-table td,
.grade-entry-admin-table-wrap .student-table th {
  text-align: center;
  vertical-align: middle;
}

.grade-entry-admin-table-wrap .student-table td:nth-child(2),
.grade-entry-admin-table-wrap .student-table td:nth-child(3),
.grade-entry-admin-table-wrap .student-table td:nth-child(4) {
  text-align: left;
}

.grade-entry-admin-code {
  font-weight: 700;
  color: #0f172a;
}

.grade-entry-admin-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
}

.grade-entry-admin-empty {
  color: #64748b;
  padding: 24px;
  text-align: center;
}

.grade-entry-admin-import-tools {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.grade-entry-admin-file-form {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.grade-entry-admin-file-input {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 9px 12px;
  background: #fff;
  color: #334155;
}

.grade-entry-admin-help {
  font-size: 0.92rem;
  color: #6b7280;
  line-height: 1.7;
}

.grade-entry-admin-help strong {
  color: #92400e;
}

.grade-entry-admin-download.loading {
  position: relative;
  pointer-events: none;
}

.grade-entry-admin-download.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.grade-entry-admin-download.loading span {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .grade-entry-admin-export-actions,
  .grade-entry-admin-import-tools,
  .grade-entry-admin-file-form {
    width: 100%;
  }

  .grade-entry-admin-multi-select,
  .grade-entry-admin-file-input {
    width: 100%;
  }
}

.grade-entry-average-text {
  font-weight: 700;
  color: #1976d2;
}

.grade-entry-result-cell {
  text-align: center;
}

.grade-entry-result-cell .grade-result-pill {
  white-space: nowrap;
}

.grade-entry-col {
  min-width: 80px;
}

.grade-entry-col-header,
.grade-entry-col-cell {
  background: #f8fafc;
  color: #17629c;
  text-align: center;
}

.grade-input {
  width: 60px !important;
  min-height: 38px;
  padding: 6px 8px;
  text-align: center;
  border-radius: 8px;
  border: 1.5px solid #b0bec5;
  background: #ffffff;
  font-weight: 600;
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.grade-input:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.12);
}

.grade-row-inactive .grade-input {
  background: #fff8d6;
}

.grade-average-cell {
  font-weight: 700;
  color: #1976d2;
  background: #f3f6fa;
  text-align: center;
}

.grade-average-hint {
  color: #ff9800;
  font-size: 0.9em;
  margin-left: 4px;
}

.grade-result-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.95em;
  font-weight: 600;
}

.grade-save-actions {
  margin-top: 24px;
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}

.grade-save-actions .btn-main {
  width: auto;
  padding: 12px 32px;
  font-size: 1.05rem;
}

.grade-edit-lockbox {
  margin-bottom: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  border-left: 4px solid #d32f2f;
  background: #ffebee;
}

.grade-edit-lockbox-title {
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #d32f2f;
}

.grade-edit-lockbox-note {
  color: #64748b;
  font-size: 0.94rem;
}

.grade-edit-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.grade-edit-readonly {
  background: #f5f5f5 !important;
}

.grade-edit-readonly.is-disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.grade-edit-panel {
  margin-bottom: 20px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #dbe5f0;
  background: #f8f9fa;
}

.grade-edit-panel.is-summary {
  background: #e3f2fd;
  border-color: #bfdbfe;
}

.grade-edit-panel-title {
  margin: 0 0 12px;
  color: #142850;
  font-size: 1.02rem;
  font-weight: 700;
}

.grade-edit-panel.is-summary .grade-edit-panel-title {
  color: #1976d2;
}

.grade-edit-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.grade-edit-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.grade-edit-score-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
  color: #142850;
}

.grade-edit-score-field .grade-input {
  width: 100% !important;
}

.grade-edit-summary-value {
  font-weight: 700;
  color: #1976d2;
}

.user-timeline {
  display: grid;
  gap: 14px;
}

.user-timeline-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe6f1;
}

.user-timeline-item strong {
  color: #0f2748;
}

.user-timeline-item span {
  color: #475569;
}

@media (max-width: 1280px) {
  .app-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-tools {
    justify-content: space-between;
  }

  .admin-command-grid,
  .dashboard-dual-grid,
  .user-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .main-content.app-shell {
    margin-left: 0;
  }

  .workspace-tabs,
  .app-topbar,
  main,
  .dashboard-shell-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .dashboard-shell-card {
    border-radius: 22px;
  }

  .dashboard-hero,
  .topbar-left {
    flex-direction: column;
    align-items: flex-start;
  }

  .enterprise-filter-grid,
  .quick-link-grid,
  .user-quick-grid,
  .teacher-spotlight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-topbar {
    padding-top: 78px;
  }

  .topbar-brand-card,
  .topbar-profile {
    min-width: 100%;
  }

  .topbar-nav {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .topbar-nav-link {
    white-space: nowrap;
  }

  .dashboard-hero {
    padding: 22px 18px;
  }

  .dashboard-hero h1 {
    font-size: 28px;
  }

  .dashboard-panel,
  .executive-stat-card {
    padding: 18px;
    border-radius: 20px;
  }

  .panel-heading-row,
  .panel-heading-split {
    flex-direction: column;
    align-items: flex-start;
  }

  .workspace-tab-utility {
    display: none;
  }

  .activity-item,
  .user-timeline-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .workspace-tabs {
    padding-left: 14px;
    padding-right: 14px;
  }

  .dashboard-shell-body {
    padding: 16px;
  }

  .dashboard-hero-actions,
  .panel-actions-row,
  .action-toolbar,
  .toolbar-legend,
  .activity-header-meta {
    width: 100%;
  }

  .dashboard-hero-btn,
  .dashboard-action-btn,
  .toolbar-btn {
    width: 100%;
  }

  .activity-filter-btn {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }
}
