html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Sidebar styling */
#sidebar {
  min-height: calc(100vh - 56px);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

#sidebar .nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, .75);
  padding: .75rem 1rem;
  border-radius: .25rem;
  margin-bottom: .25rem;
}

#sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, .1);
}

#sidebar .nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, .2);
}

/* Dashboard card styling */
.dashboard-card {
  border-radius: .75rem;
  transition: all .3s ease;
  border-left: 4px solid;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
  overflow: hidden;
  position: relative;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.dashboard-card:hover::before {
  transform: translateX(100%);
}

.dashboard-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.dashboard-card .card-body {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.dashboard-card .icon {
  font-size: 2.5rem;
  opacity: 0.8;
  transition: all 0.3s ease;
  background: linear-gradient(45deg, currentColor, rgba(255,255,255,0.3));
  -webkit-background-clip: text;
  background-clip: text;
}

.dashboard-card:hover .icon {
  opacity: 1;
  transform: scale(1.1) rotate(5deg);
}

.dashboard-card .card-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 0.5px;
}

.dashboard-card .card-value {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0;
  background: linear-gradient(45deg, #333, #666);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.dashboard-card .card-footer {
  background: rgba(0,0,0,0.02);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.dashboard-card .card-footer a {
  transition: all 0.2s ease;
  font-weight: 500;
}

.dashboard-card .card-footer a:hover {
  transform: translateX(3px);
}

/* Card color variants */
.border-primary {
  border-left-color: var(--bs-primary) !important;
}

.border-success {
  border-left-color: var(--bs-success) !important;
}

.border-info {
  border-left-color: var(--bs-info) !important;
}

.border-warning {
  border-left-color: var(--bs-warning) !important;
}

.border-danger {
  border-left-color: var(--bs-danger) !important;
}

.border-secondary {
  border-left-color: var(--bs-secondary) !important;
}

.border-dark {
  border-left-color: var(--bs-dark) !important;
}

.border-purple {
  border-left-color: #6f42c1 !important;
}

.border-teal {
  border-left-color: #20c997 !important;
}

/* Text color variants */
.text-purple {
  color: #6f42c1 !important;
}

.text-teal {
  color: #20c997 !important;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Student form UI polish */
.section-block { border: 1px solid #e9ecef; border-radius: 8px; background: #fff; padding: 16px; margin-bottom: 16px; }
.section-block h5 { margin-bottom: 12px; font-weight: 600; }
.form-section .row { row-gap: 12px; }
.form-label { font-weight: 500; color: #495057; }
.btn-success { min-width: 160px; }

/* Enhanced Dashboard Styling */
.dashboard-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 1rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dashboard-header .btn {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.dashboard-header .btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Enhanced Table Styling */
.table-responsive {
  border-radius: 0.5rem;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.table {
  margin-bottom: 0;
}

.table thead th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  padding: 1rem 0.75rem;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.05);
  transform: scale(1.01);
}

.table tbody td {
  padding: 0.875rem 0.75rem;
  border-color: rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

/* Enhanced Badge Styling */
.badge {
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
}

/* Enhanced List Group Styling */
.list-group-item {
  border: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background-color: rgba(0, 123, 255, 0.03);
  transform: translateX(5px);
}

.list-group-item:last-child {
  border-bottom: none;
}

/* Enhanced Button Styling */
.btn {
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Header Enhancement */
.card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

/* Animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-card {
  animation: fadeInUp 0.6s ease forwards;
}

.dashboard-card:nth-child(1) { animation-delay: 0.1s; }
.dashboard-card:nth-child(2) { animation-delay: 0.2s; }
.dashboard-card:nth-child(3) { animation-delay: 0.3s; }
.dashboard-card:nth-child(4) { animation-delay: 0.4s; }
.dashboard-card:nth-child(5) { animation-delay: 0.5s; }
.dashboard-card:nth-child(6) { animation-delay: 0.6s; }
.dashboard-card:nth-child(7) { animation-delay: 0.7s; }
.dashboard-card:nth-child(8) { animation-delay: 0.8s; }
.dashboard-card:nth-child(9) { animation-delay: 0.9s; }

/* Required field styling */
.form-label.required::after {
  content: " *";
  color: #dc3545;
  font-weight: bold;
}