/* Typography */
:root {
  --font-head: 'Sarabun', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans Thai', sans-serif;
  --font-body: 'Sarabun', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans Thai', sans-serif;
  --primary: #5b21b6;
  --secondary: #7c3aed;
  --accent: #f59e0b;
  --dark: #0b1020;
}

html, body { height: 100%; }
body { 
  font-family: var(--font-body); 
  background-color: #0f1224; 
  color: #ffffff; 
  letter-spacing: .1px; 
}

/* Navbar */
.navbar.bg-gradient-primary {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}
.navbar .nav-link { 
  font-weight: 700; 
  opacity: .95; 
  color: #ffffff !important; 
}
.navbar .nav-link:hover { 
  opacity: 1; 
  text-decoration: underline; 
}

/* Hero Section */
.hero {
  position: relative;
  padding: 80px 0 60px;
  background-image: url('../images/hero-bg.png');
  background-size: cover; 
  background-position: center; 
  background-repeat: no-repeat;
}
.hero::before {
  content: '';
  position: absolute; 
  inset: 0;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(124,58,237,.15), rgba(16,18,40,.15)),
              radial-gradient(1200px 600px at 80% 0%, rgba(91,33,182,.18), rgba(16,18,40,.15));
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 { 
  font-family: var(--font-head); 
  font-weight: 800; 
  letter-spacing: .5px; 
  color: #ffffff; 
}
.hero p.lead { 
  font-size: 1.1rem; 
  color: #ffffff; 
  opacity: 1; 
}
.hero .btn { 
  padding: .75rem 1.25rem; 
  border-radius: 12px; 
}

/* Glass Panel */
.glass {
  background: rgba(17,25,40,0.15);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 18px;
  color: #ffffff;
}

/* Cards */
.stat-card, .search-card, .card-detail, .card {
  border: none; 
  border-radius: 16px; 
  box-shadow: 0 12px 36px rgba(2, 6, 23, 0.35);
  background-color: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.22);
  color: #ffffff;
}

/* Graduate Detail Page */
.card-detail h1.h4 {
  font-size: 2.2rem !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  text-shadow: 0 3px 6px rgba(251, 191, 36, 0.4);
  letter-spacing: 1px;
  line-height: 1.2;
  margin-bottom: 1rem;
}

/* Graduate Page Specific - White Text */
.card-detail {
  color: #ffffff !important;
}

.card-detail .small.text-muted {
  color: rgba(255, 255, 255, 0.8) !important;
}

.card-detail .fw-semibold {
  color: #ffffff !important;
  font-weight: 600 !important;
}

.card-detail .text-muted {
  color: rgba(255, 255, 255, 0.8) !important;
}

.card-detail .badge {
  color: #ffffff !important;
}

.card-detail .btn {
  color: #ffffff !important;
}

.graduate-id-dot-section {
  background: linear-gradient(135deg, #059669, #047857);
  border: 3px solid #10b981;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(5, 150, 105, 0.4);
  position: relative;
  overflow: hidden;
}

.graduate-id-dot-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

.id-dot-item {
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 2;
}

.id-dot-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.id-dot-value {
  font-size: 2.5rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
  line-height: 1;
  letter-spacing: 2px;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
  text-stroke: 1px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

/* Mobile Graduate Cards */
.mobile-graduate-card {
  background-color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(2,6,23,0.25);
  transition: all 0.3s ease;
}

.mobile-graduate-card:hover {
  background-color: rgba(255,255,255,0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2,6,23,0.35);
}

.mobile-graduate-card .card-body { color: #1a1a1a; }
.mobile-graduate-card h6 { 
  color: #1a1a1a; 
  font-weight: 700; 
  margin-bottom: 0.5rem; 
  font-size: 1rem; 
}

.mobile-graduate-card .graduate-info {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
  color: #ffffff;
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.mobile-graduate-card .btn {
  margin-top: 0.5rem;
  width: 100%;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 0.8rem;
  background: linear-gradient(135deg, #f59e0b, #f97316);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
  transition: all 0.3s ease;
}

/* Tables */
.table-responsive { overflow-x: auto; }
.table-results { 
  background: rgba(255,255,255,0.15); 
  border-radius: 14px; 
  overflow: hidden; 
  box-shadow: 0 10px 28px rgba(2,6,23,0.35); 
  border: 1px solid rgba(255,255,255,0.22); 
}
.table-results thead th { 
  background: rgba(124,58,237,.75); 
  color: #ffffff; 
  font-weight: 800; 
  font-size: 0.9rem; 
}
.table { color: #000000; }
.table td, .table th { color: #000000; font-weight: 700; }
.table-hover tbody tr:hover { background-color: rgba(255,255,255,0.25); }

/* Badges */
.badge-honor { 
  background: linear-gradient(45deg, #8b5cf6, #7c3aed); 
  color: #ffffff; 
  font-weight: 900;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 1rem;
  border: 3px solid rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  min-width: 3rem;
  text-align: center;
  display: inline-block;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.badge-honor:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

/* Fix honor badge visibility in highlighted rows */
.table-hover tbody tr:hover .badge-honor,
.table-hover tbody tr:focus .badge-honor,
.table-hover tbody tr.active .badge-honor {
  color: #ffffff !important;
  background: linear-gradient(45deg, #dc2626, #b91c1c) !important;
  border: 3px solid rgba(255, 255, 255, 0.8) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

/* Second Class Honors Badge - Distinct from First Class */
.badge-honor-2 {
  background: linear-gradient(45deg, #059669, #10b981);
  color: #ffffff !important;
  font-weight: 900;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 1rem;
  border: 3px solid rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  min-width: 3rem;
  text-align: center;
  display: inline-block;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.badge-honor-2:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}
 
/* Fix honor badge visibility in highlighted rows */
.table-hover tbody tr:hover .badge-honor-2,
.table-hover tbody tr:focus .badge-honor-2,
.table-hover tbody tr.active .badge-honor-2 {
  color: #ffffff !important;
  background: linear-gradient(45deg, #45c123, #11aa19) !important;
  border: 3px solid rgba(255, 255, 255, 0.8) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  box-shadow: 0 6px 20px rgba(15, 161, 73, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}
/* Buttons */
.btn-primary { background: #7c3aed; border-color: #7c3aed; }
.btn-primary:hover { background: #6d28d9; border-color: #6d28d9; }
.btn-outline-primary { color: #000000; border-color: #a78bfa; font-weight: 600; }
.btn-outline-primary:hover { background: #a78bfa; color: #111827; }
.btn-warning { background: #f59e0b; border-color: #f59e0b; color: #111827; }

/* Footer */
.footer { 
  box-shadow: 0 -8px 20px rgba(2,6,23,0.35); 
  background: rgba(255,255,255,0.08); 
  border-top: 1px solid rgba(255,255,255,0.22); 
  color: #ffffff; 
}

/* Utilities */
.text-gradient { 
  background: linear-gradient(90deg, #fbbf24, #fff); 
  -webkit-background-clip: text; 
  background-clip: text; 
  color: transparent; 
}

/* Pagination */
.pagination .page-link { 
  border-radius: 10px; 
  background: rgba(255,255,255,0.15); 
  border-color: rgba(255,255,255,0.22); 
  color: #ffffff; 
}
.pagination .page-item.active .page-link { 
  background: #7c3aed; 
  border-color: #7c3aed; 
}

/* Statistics Page - Compact Design */
.stat-card-faculty {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  border: 3px solid #3b82f6;
  box-shadow: 0 12px 40px rgba(30, 64, 175, 0.5);
  position: relative;
  overflow: hidden;
}

.stat-card-program {
  background: linear-gradient(135deg, #047857, #065f46);
  border: 3px solid #10b981;
  box-shadow: 0 12px 40px rgba(4, 120, 87, 0.5);
  position: relative;
  overflow: hidden;
}

.stat-card-curriculum {
  background: linear-gradient(135deg, #b45309, #92400e);
  border: 3px solid #f59e0b;
  box-shadow: 0 12px 40px rgba(180, 83, 9, 0.5);
  position: relative;
  overflow: hidden;
}

.stat-card-honor {
  background: linear-gradient(135deg, #6d28d9, #581c87);
  border: 3px solid #8b5cf6;
  box-shadow: 0 12px 40px rgba(109, 40, 217, 0.5);
  position: relative;
  overflow: hidden;
}

/* Statistics Headers */
.stat-card-faculty h2, .stat-card-program h2, .stat-card-curriculum h2, .stat-card-honor h2 {
  color: #ffffff;
  font-weight: 900;
  font-size: 1.1rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 0.5rem;
}

/* Statistics Tables - Black text on white background */
.stat-card-faculty .table, .stat-card-program .table, .stat-card-curriculum .table, .stat-card-honor .table {
  color: #000000;
  margin-bottom: 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
}

.stat-card-faculty .table th, .stat-card-program .table th, .stat-card-curriculum .table th, .stat-card-honor .table th {
  color: #000000;
  font-weight: 900;
  font-size: 0.9rem;
  border-bottom: 3px solid #d1d5db;
  padding: 0.8rem 1rem;
  text-shadow: none;
  background: #f9fafb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card-faculty .table td, .stat-card-program .table td, .stat-card-curriculum .table td, .stat-card-honor .table td {
  color: #000000;
  font-weight: 700;
  font-size: 0.85rem;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.6rem 1rem;
  text-shadow: none;
  vertical-align: middle;
  line-height: 1.3;
  background: #ffffff;
}

.stat-card-faculty .table tbody tr:hover, .stat-card-program .table tbody tr:hover, 
.stat-card-curriculum .table tbody tr:hover, .stat-card-honor .table tbody tr:hover {
  background-color: #f3f4f6;
  transform: scale(1.01);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Statistics Badges - Enhanced for Better Visibility */
.badge-faculty, .badge-program, .badge-curriculum {
  font-weight: 900;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 1rem;
  border: 3px solid rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  min-width: 3rem;
  text-align: center;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.badge-faculty {
  background: linear-gradient(45deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.badge-program {
  background: linear-gradient(45deg, #059669, #047857);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.badge-curriculum {
  background: linear-gradient(45deg, #d97706, #b45309);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Badge hover effects for better interaction */
.badge-faculty:hover, .badge-program:hover, .badge-curriculum:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

/* Honor Statistics */
.honor-stats {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.honor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.honor-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  animation: shimmer 3s ease-in-out infinite;
}

.honor-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.honor-label {
  font-weight: 800;
  color: #ffffff;
  font-size: 0.9rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
}

.honor-value {
  font-size: 1.8rem;
  font-weight: 900;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 2;
}

.honor-first {
  color: #fbbf24;
  text-shadow: 0 3px 6px rgba(251, 191, 36, 0.7);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
  text-stroke: 1px rgba(255, 255, 255, 0.3);
}

.honor-second {
  color: #fca5a5;
  text-shadow: 0 3px 6px rgba(252, 165, 165, 0.7);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
  text-stroke: 1px rgba(255, 255, 255, 0.3);
}

.honor-regular {
  color: #a78bfa;
  text-shadow: 0 3px 6px rgba(167, 139, 250, 0.7);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
  text-stroke: 1px rgba(255, 255, 255, 0.3);
}

/* Animations */
@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero { padding: 60px 0 40px; }
  .hero h1 { font-size: 2rem; }
  .hero p.lead { font-size: 1rem; }
  
  .table-results { font-size: 0.8rem; }
  .table-results thead th { font-size: 0.75rem; padding: 0.3rem 0.15rem; }
  .table td, .table th { padding: 0.3rem 0.15rem; }
  
  .stat-card-faculty h2, .stat-card-program h2, .stat-card-curriculum h2, .stat-card-honor h2 {
    font-size: 1rem;
  }
  
  .honor-value { font-size: 1.5rem; }
  .honor-label { font-size: 0.8rem; }
}

@media (max-width: 576px) {
  .hero { padding: 40px 0 30px; }
  .hero h1 { font-size: 1.5rem; }
  
  .table { min-width: 600px; }
  .table-results { font-size: 0.7rem; }
  
  .badge-faculty, .badge-program, .badge-curriculum {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
  }
}

/* Statistics page - Compact layout */
.stat-card-faculty,
.stat-card-program,
.stat-card-curriculum,
.stat-card-honor {
  margin-bottom: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}

.stat-card-faculty {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  border: 3px solid #3b82f6;
  border-bottom: 1px solid #3b82f6;
  box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

.stat-card-program {
  background: linear-gradient(135deg, #047857, #065f46);
  border: 3px solid #10b981;
  border-bottom: 1px solid #10b981;
  box-shadow: 0 8px 25px rgba(4, 120, 87, 0.4);
}

.stat-card-curriculum {
  background: linear-gradient(135deg, #b45309, #92400e);
  border: 3px solid #f59e0b;
  border-bottom: 1px solid #f59e0b;
  box-shadow: 0 8px 25px rgba(180, 83, 9, 0.4);
}

.stat-card-honor {
  background: linear-gradient(135deg, #6d28d9, #581c87);
  border: 3px solid #8b5cf6;
  border-bottom: 1px solid #8b5cf6;
  box-shadow: 0 8px 25px rgba(109, 40, 217, 0.4);
}

/* Remove row gaps */
.stats-page .row {
  --bs-gutter-x: 0;
  --bs-gutter-y: 0;
}

.stats-page .col-lg-6 {
  padding: 0;
}

/* Adjust card padding */
.stat-card-faculty,
.stat-card-program,
.stat-card-curriculum,
.stat-card-honor {
  padding: 1.5rem;
  margin: 0;
}

/* Table styling for better connection */
.stat-card-faculty .table,
.stat-card-program .table,
.stat-card-curriculum .table {
  margin-bottom: 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-card-faculty .table thead th,
.stat-card-program .table thead th,
.stat-card-curriculum .table thead th {
  background: #f9fafb;
  color: #000000;
  font-weight: 700;
  border-bottom: 2px solid #d1d5db;
  padding: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card-faculty .table tbody td,
.stat-card-program .table tbody td,
.stat-card-curriculum .table tbody td {
  background: #ffffff;
  color: #000000;
  font-weight: 500;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem;
  font-size: 0.9rem;
}

.stat-card-faculty .table tbody tr:hover td,
.stat-card-program .table tbody tr:hover td,
.stat-card-curriculum .table tbody tr:hover td {
  background: #f3f4f6;
  transition: background 0.2s ease;
}

/* Badge styling */
.badge-faculty {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  letter-spacing: 0.5px;
}

.badge-program {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  letter-spacing: 0.5px;
}

.badge-curriculum {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
  letter-spacing: 0.5px;
}

/* Honor section styling */
.honor-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.honor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.1);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
}

.honor-label {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.honor-value {
  font-weight: 900;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.honor-first {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000000;
}

.honor-second {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #ffffff;
}

.honor-regular {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .stat-card-faculty,
  .stat-card-program,
  .stat-card-curriculum,
  .stat-card-honor {
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 3px solid;
  }
  
  .stats-page .col-lg-6 {
    padding: 0 0.5rem;
  }
}

/* Statistics page - New container layout */
.stats-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.stats-row {
  display: flex;
  gap: 0;
  width: 100%;
}

.stats-card {
  flex: 1;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.stats-card-faculty {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  border-right: 2px solid rgba(255,255,255,0.1);
}

.stats-card-curriculum {
  background: linear-gradient(135deg, #b45309, #92400e);
  border-left: 2px solid rgba(255,255,255,0.1);
}

.stats-card-program {
  background: linear-gradient(135deg, #047857, #065f46);
  border-right: 2px solid rgba(255,255,255,0.1);
}

.stats-card-honor {
  background: linear-gradient(135deg, #6d28d9, #581c87);
  border-left: 2px solid rgba(255,255,255,0.1);
}

.stats-header {
  color: #ffffff;
  font-weight: 900;
  font-size: 1.1rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  margin: 0;
}

.stats-table {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.stats-card .table {
  margin: 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-card .table thead th {
  background: #f9fafb;
  color: #000000;
  font-weight: 700;
  border-bottom: 2px solid #d1d5db;
  padding: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-card .table tbody td {
  background: #ffffff;
  color: #000000;
  font-weight: 500;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem;
  font-size: 0.9rem;
}

.stats-card .table tbody tr:hover td {
  background: #f3f4f6;
  transition: background 0.2s ease;
}

/* Honor section styling */
.stats-card-honor .honor-stats {
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stats-card-honor .honor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.1);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
}

.stats-card-honor .honor-label {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.stats-card-honor .honor-value {
  font-weight: 900;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.honor-first {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000000;
}

.honor-second {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #ffffff;
}

.honor-regular {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #ffffff;
}

/* Badge styling */
.badge-faculty {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  letter-spacing: 0.5px;
}

.badge-program {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  letter-spacing: 0.5px;
}

.badge-curriculum {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
  letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .stats-row {
    flex-direction: column;
  }
  
  .stats-card {
    border-radius: 8px;
    margin-bottom: 1rem;
  }
}

/* Statistics page - Seamless connected layout */
.stats-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 0;
}

.stats-row {
  display: flex;
  width: 100%;
  margin: 0;
  padding: 0;
}

.stats-card {
  flex: 1;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.stats-card-faculty {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
}

.stats-card-curriculum {
  background: linear-gradient(135deg, #b45309, #92400e);
}

.stats-card-program {
  background: linear-gradient(135deg, #047857, #065f46);
}

.stats-card-honor {
  background: linear-gradient(135deg, #6d28d9, #581c87);
}

.stats-header {
  color: #ffffff;
  font-weight: 900;
  font-size: 1.1rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  margin: 0;
}

.stats-table {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.stats-card .table {
  margin: 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stats-card .table thead th {
  background: #f9fafb;
  color: #000000;
  font-weight: 700;
  border-bottom: 2px solid #d1d5db;
  padding: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-card .table tbody td {
  background: #ffffff;
  color: #000000;
  font-weight: 500;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem;
  font-size: 0.9rem;
}

.stats-card .table tbody tr:hover td {
  background: #f3f4f6;
  transition: background 0.2s ease;
}

/* Honor section styling */
.stats-card-honor .honor-stats {
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stats-card-honor .honor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.1);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
}

.stats-card-honor .honor-label {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.stats-card-honor .honor-value {
  font-weight: 900;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.honor-first {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000000;
}

.honor-second {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #ffffff;
}

.honor-regular {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #ffffff;
}

/* Badge styling */
.badge-faculty {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  letter-spacing: 0.5px;
}

.badge-program {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  letter-spacing: 0.5px;
}

.badge-curriculum {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
  letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .stats-row {
    flex-direction: column;
  }
  
  .stats-card {
    border-radius: 8px;
    margin-bottom: 1rem;
  }
}

/* Statistics page - Complete rewrite for mobile compatibility */
.stats-page {
  background-color: #0f1224;
  min-height: 100vh;
  padding: 2rem 0;
}

.stats-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.stats-page h1 {
  color: #ffffff;
  font-weight: 900;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Stats Container */
.stats-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.stats-row {
  display: flex;
  gap: 0;
  width: 100%;
}

.stats-card {
  flex: 1;
  border-radius: 0;
  margin: 0;
  border: none;
  position: relative;
  overflow: hidden;
  min-height: 300px;
}

.stats-card-faculty {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
}

.stats-card-curriculum {
  background: linear-gradient(135deg, #b45309, #92400e);
}

.stats-card-program {
  background: linear-gradient(135deg, #047857, #065f46);
}

.stats-card-honor {
  background: linear-gradient(135deg, #6d28d9, #581c87);
}

.stats-header {
  color: #ffffff;
  font-weight: 900;
  font-size: 1.1rem;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
  margin: 0;
}

.stats-table {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.stats-card .table {
  margin: 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 100%;
}

.stats-card .table thead th {
  background: #f9fafb;
  color: #000000 !important;
  font-weight: 700;
  border-bottom: 2px solid #d1d5db;
  padding: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-card .table tbody td {
  background: #ffffff;
  color: #000000 !important;
  font-weight: 500;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem;
  font-size: 0.9rem;
}

.stats-card .table tbody tr:hover td {
  background: #f3f4f6;
  transition: background 0.2s ease;
}

/* Honor section styling */
.stats-card-honor .honor-stats {
  padding: 0 1.5rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stats-card-honor .honor-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.1);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.2);
}

.stats-card-honor .honor-label {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
}

.stats-card-honor .honor-value {
  font-weight: 900;
  font-size: 1.2rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.honor-first {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #000000;
}

.honor-second {
  background: linear-gradient(135deg, #ec4899, #db2777);
  color: #ffffff;
}

.honor-regular {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #ffffff;
}

/* Badge styling */
.badge-faculty {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  letter-spacing: 0.5px;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.badge-program {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
  letter-spacing: 0.5px;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.badge-curriculum {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  font-weight: 700;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
  letter-spacing: 0.5px;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Responsive adjustments - Fixed for mobile */
@media (max-width: 991.98px) {
  .stats-row {
    flex-direction: column;
    gap: 0;
  }
  
  .stats-card {
    border-radius: 0;
    margin: 0;
    border: none;
    min-height: auto;
  }
  
  .stats-header {
    font-size: 1rem;
    padding: 1rem 1rem 0.5rem 1rem;
  }
  
  .stats-table {
    padding: 0 1rem 1rem 1rem;
  }
  
  .stats-card .table {
    width: 100%;
    min-width: 100%;
  }
  
  .stats-card .table thead th {
    font-size: 0.8rem;
    padding: 0.6rem;
    color: #000000 !important;
    white-space: nowrap;
  }
  
  .stats-card .table tbody td {
    font-size: 0.8rem;
    padding: 0.6rem;
    color: #000000 !important;
    white-space: nowrap;
  }
  
  .stats-card-honor .honor-stats {
    padding: 0 1rem 1rem 1rem;
  }
  
  .stats-card-honor .honor-item {
    padding: 0.8rem;
  }
  
  .stats-card-honor .honor-label {
    font-size: 0.85rem;
  }
  
  .stats-card-honor .honor-value {
    font-size: 1rem;
    padding: 0.4rem 0.8rem;
  }
  
  .badge-faculty,
  .badge-program,
  .badge-curriculum {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #ffffff !important;
  }
}

@media (max-width: 576px) {
  .stats-page .container {
    padding: 0 0.5rem;
  }
  
  .stats-page h1 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .stats-header {
    font-size: 0.9rem;
    padding: 0.8rem 0.8rem 0.4rem 0.8rem;
  }
  
  .stats-table {
    padding: 0 0.8rem 0.8rem 0.8rem;
  }
  
  .stats-card .table {
    width: 100%;
    min-width: 100%;
    font-size: 0.75rem;
  }
  
  .stats-card .table thead th {
    font-size: 0.75rem;
    padding: 0.5rem;
    color: #000000 !important;
    white-space: nowrap;
  }
  
  .stats-card .table tbody td {
    font-size: 0.75rem;
    padding: 0.5rem;
    color: #000000 !important;
    white-space: nowrap;
  }
  
  .stats-card-honor .honor-stats {
    padding: 0 0.8rem 0.8rem 0.8rem;
  }
  
  .stats-card-honor .honor-item {
    padding: 0.6rem;
  }
  
  .stats-card-honor .honor-label {
    font-size: 0.8rem;
  }
  
  .stats-card-honor .honor-value {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
  }
  
  .badge-faculty,
  .badge-program,
  .badge-curriculum {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #ffffff !important;
  }
}

/* PDF Viewer Section */
.pdf-viewer-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 3rem 0;
}

.pdf-viewer-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.pdf-viewer-header {
  text-align: center;
  margin-bottom: 2rem;
}

.pdf-viewer-title {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pdf-viewer-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  margin: 0;
}

.pdf-option-card {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.pdf-option-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.pdf-option-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.pdf-option-icon {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.pdf-option-text h5 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.pdf-option-text p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-size: 0.9rem;
}

.pdf-viewer-frame {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.pdf-viewer-toolbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.pdf-viewer-toolbar .btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.5rem 1rem;
}

.pdf-viewer-toolbar .btn-outline-secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.pdf-viewer-toolbar .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.pdf-viewer-toolbar .btn-primary {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: none;
}

.pdf-viewer-toolbar .btn-primary:hover {
  background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
  transform: translateY(-1px);
}

/* Responsive PDF Viewer */
@media (max-width: 768px) {
  .pdf-viewer-section {
    padding: 2rem 0;
  }
  
  .pdf-viewer-card {
    padding: 1.5rem;
  }
  
  .pdf-viewer-title {
    font-size: 1.5rem;
  }
  
  .pdf-viewer-subtitle {
    font-size: 1rem;
  }
  
  .pdf-option-card {
    padding: 1rem;
  }
  
  .pdf-option-icon {
    font-size: 2rem;
  }
  
  .pdf-option-text h5 {
    font-size: 1rem;
  }
  
  .pdf-option-text p {
    font-size: 0.8rem;
  }
  
  .pdf-viewer-toolbar {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .pdf-viewer-toolbar .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .pdf-viewer-section {
    padding: 1.5rem 0;
  }
  
  .pdf-viewer-card {
    padding: 1rem;
  }
  
  .pdf-viewer-title {
    font-size: 1.3rem;
  }
  
  .pdf-viewer-subtitle {
    font-size: 0.9rem;
  }
  
  .pdf-option-card {
    padding: 0.8rem;
  }
  
  .pdf-option-icon {
    font-size: 1.8rem;
  }
  
  .pdf-option-text h5 {
    font-size: 0.9rem;
  }
  
  .pdf-option-text p {
    font-size: 0.75rem;
  }
}

/* Statistics Tables - Black text on white background with word wrapping */
.stat-card-faculty .table, .stat-card-program .table, .stat-card-curriculum .table, .stat-card-honor .table {
  color: #000000;
  margin-bottom: 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  table-layout: fixed;
}

.stat-card-faculty .table th, .stat-card-program .table th, .stat-card-curriculum .table th, .stat-card-honor .table th {
  color: #000000;
  font-weight: 900;
  font-size: 0.9rem;
  border-bottom: 3px solid #d1d5db;
  padding: 0.8rem 1rem;
  text-shadow: none;
  background: #f9fafb;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: normal;
  word-wrap: break-word;
  vertical-align: middle;
}

.stat-card-faculty .table td, .stat-card-program .table td, .stat-card-curriculum .table td, .stat-card-honor .table td {
  color: #000000;
  font-weight: 700;
  font-size: 0.85rem;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.6rem 1rem;
  text-shadow: none;
  vertical-align: middle;
  line-height: 1.3;
  background: #ffffff;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Column widths for better text handling */
.stat-card-faculty .table th:first-child,
.stat-card-program .table th:first-child,
.stat-card-curriculum .table th:first-child {
  width: 70%;
  min-width: 120px;
}

.stat-card-faculty .table th:last-child,
.stat-card-program .table th:last-child,
.stat-card-curriculum .table th:last-child {
  width: 30%;
  min-width: 80px;
}

.stat-card-faculty .table td:first-child,
.stat-card-program .table td:first-child,
.stat-card-curriculum .table td:first-child {
  width: 70%;
  min-width: 120px;
  padding-right: 0.5rem;
}

.stat-card-faculty .table td:last-child,
.stat-card-program .table td:last-child,
.stat-card-curriculum .table td:last-child {
  width: 30%;
  min-width: 80px;
  padding-left: 0.5rem;
}

/* Stats card table specific styling */
.stats-card .table {
  margin: 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 100%;
  table-layout: auto;
}

.stats-card .table thead th {
  background: #f9fafb;
  color: #000000 !important;
  font-weight: 700;
  border-bottom: 2px solid #d1d5db;
  padding: 0.75rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: normal;
  word-wrap: break-word;
  vertical-align: middle;
}

.stats-card .table tbody td {
  background: #ffffff;
  color: #000000 !important;
  font-weight: 500;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.75rem;
  font-size: 0.9rem;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  vertical-align: middle;
  line-height: 1.4;
}

/* Column widths for stats card tables */
.stats-card .table th:first-child,
.stats-card .table td:first-child {
  width: 70%;
  min-width: 120px;
  padding-right: 0.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.stats-card .table th:last-child,
.stats-card .table td:last-child {
  width: 30%;
  min-width: 80px;
  padding-left: 0.5rem;
  text-align: right;
}

/* Responsive adjustments for mobile */
@media (max-width: 991.98px) {
  .stats-card .table {
    width: 100%;
    min-width: 100%;
    font-size: 0.8rem;
  }
  
  .stats-card .table thead th {
    font-size: 0.75rem;
    padding: 0.6rem 0.5rem;
    color: #000000 !important;
    white-space: normal;
    word-wrap: break-word;
  }
  
  .stats-card .table tbody td {
    font-size: 0.75rem;
    padding: 0.6rem 0.5rem;
    color: #000000 !important;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.3;
  }
  
  /* Adjust column widths for mobile */
  .stats-card .table th:first-child,
  .stats-card .table td:first-child {
    width: 60%;
    min-width: 80px;
    padding-right: 0.3rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
  }
  
  .stats-card .table th:last-child,
  .stats-card .table td:last-child {
    width: 40%;
    min-width: 70px;
    padding-left: 0.3rem;
  }
}

@media (max-width: 576px) {
  .stats-card .table {
    width: 100%;
    min-width: 100%;
    font-size: 0.7rem;
  }
  
  .stats-card .table thead th {
    font-size: 0.7rem;
    padding: 0.5rem 0.4rem;
    color: #000000 !important;
    white-space: normal;
    word-wrap: break-word;
  }
  
  .stats-card .table tbody td {
    font-size: 0.7rem;
    padding: 0.5rem 0.4rem;
    color: #000000 !important;
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.2;
  }
  
  /* Further adjust column widths for small mobile */
  .stats-card .table th:first-child,
  .stats-card .table td:first-child {
    width: 55%;
    min-width: 60px;
    padding-right: 0.2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.1;
    font-size: 0.65rem;
  }
  
  .stats-card .table th:last-child,
  .stats-card .table td:last-child {
    width: 45%;
    min-width: 50px;
    padding-left: 0.2rem;
  }
  
  /* Make badges smaller on mobile */
  .badge-faculty,
  .badge-program,
  .badge-curriculum {
    padding: 0.2rem 0.4rem;
    font-size: 0.65rem;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #ffffff !important;
  }
  
  /* Ensure text wrapping works properly on mobile */
  .stats-card .table td:first-child {
    max-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Additional table improvements for better text handling */
.table {
  table-layout: fixed;
  width: 100%;
}

.table th,
.table td {
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  white-space: normal;
  vertical-align: middle;
}

/* Ensure table containers are responsive */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Improve badge display in tables */
.table .badge {
  white-space: nowrap;
  display: inline-block;
  min-width: 2.5em;
  text-align: center;
}

/* Better spacing for wrapped text */
.table td {
  line-height: 1.4;
  padding: 0.75rem 0.5rem;
}

.table th {
  line-height: 1.3;
  padding: 0.75rem 0.5rem;
}

/* Ensure text doesn't overflow on small screens */
@media (max-width: 768px) {
  .table {
    font-size: 0.8rem;
  }
  
  .table td,
  .table th {
    padding: 0.5rem 0.3rem;
    line-height: 1.3;
  }
  
  .table .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
}

@media (max-width: 576px) {
  .table {
    font-size: 0.75rem;
  }
  
  .table td,
  .table th {
    padding: 0.4rem 0.2rem;
    line-height: 1.2;
  }
  
  .table .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

/* Enhanced Statistics Numbers Visibility */
.stat-card-faculty .table .badge,
.stat-card-program .table .badge,
.stat-card-curriculum .table .badge,
.stat-card-honor .table .badge {
  font-weight: 900 !important;
  font-size: 1.1rem !important;
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
  border: 2px solid rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  min-width: 3.5rem !important;
  text-align: center !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 10 !important;
}

/* Specific badge colors for better contrast */
.stat-card-faculty .table .badge {
  background: linear-gradient(45deg, #1e40af, #1d4ed8) !important;
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.6) !important;
}

.stat-card-program .table .badge {
  background: linear-gradient(45deg, #047857, #065f46) !important;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.6) !important;
}

.stat-card-curriculum .table .badge {
  background: linear-gradient(45deg, #b45309, #92400e) !important;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.6) !important;
}

.stat-card-honor .table .badge {
  background: linear-gradient(45deg, #6d28d9, #581c87) !important;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.6) !important;
}

/* Mobile optimization for statistics badges */
@media (max-width: 768px) {
  .stat-card-faculty .table .badge,
  .stat-card-program .table .badge,
  .stat-card-curriculum .table .badge,
  .stat-card-honor .table .badge {
    font-size: 0.9rem !important;
    padding: 0.4rem 0.8rem !important;
    min-width: 3rem !important;
  }
}

@media (max-width: 576px) {
  .stat-card-faculty .table .badge,
  .stat-card-program .table .badge,
  .stat-card-curriculum .table .badge,
  .stat-card-honor .table .badge {
    font-size: 0.8rem !important;
    padding: 0.3rem 0.6rem !important;
    min-width: 2.5rem !important;
    border-width: 1px !important;
  }
}

/* Ensure table cells with badges have proper alignment */
.stat-card-faculty .table td:last-child,
.stat-card-program .table td:last-child,
.stat-card-curriculum .table td:last-child,
.stat-card-honor .table td:last-child {
  text-align: center !important;
  vertical-align: middle !important;
  padding: 0.75rem 0.5rem !important;
}

/* Add subtle animation to make numbers more noticeable */
@keyframes numberPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.stat-card-faculty .table .badge,
.stat-card-program .table .badge,
.stat-card-curriculum .table .badge,
.stat-card-honor .table .badge {
  animation: numberPulse 2s ease-in-out infinite;
}