/* 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 - Modern Design */
.student-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.student-table thead {
  background: #f1f5f9;
}

.student-table th {
  padding: 18px 24px;
  text-align: left;
  font-weight: 700;
  font-size: 12px;
  color: #475569;
  border-bottom: 2px solid rgba(102, 126, 234, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.student-table th {
  border-bottom: 2px solid #1976d2;
}

.student-table td {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(241, 245, 249, 0.8);
  font-size: 14px;
  color: #1e293b;
  vertical-align: middle;
  transition: all 0.2s ease;
}

.student-table tbody tr {
  transition: all 0.2s ease;
  position: relative;
}

.student-table tbody tr:nth-child(even) {
  background: rgba(248, 250, 252, 0.5);
}

.student-table tbody tr:hover {
  background: #f1f5f9;
}

.student-table tbody tr:last-child td {
  border-bottom: none;
}

/* 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;
  }
}

/* Quick Actions FAB */

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: 16px;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton {
  background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
  background-size: 200% 100%;
}

/* Stats Cards Enhancement */
.stats-card {
  position: relative;
  overflow: hidden;
}

.stats-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(25, 118, 210, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.stats-card:hover::after {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.3;
  }
}

/* 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;
}

.breadcrumb-text {
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 8px;
  display: inline-block;
  user-select: none;
}

.breadcrumb-item {
  pointer-events: none;
  cursor: default;
}

.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;
}
