:root {
  --primary-color: #3a506b;
  --secondary-color: #5e6572;
  --accent-color: #0b5563;
  --light-color: #f8f9fa;
  --dark-color: #1c2541;
  --success-color: #43aa8b;
  --warning-color: #f8961e;
  --danger-color: #f94144;
  --info-color: #90e0ef;
  --border-radius: 10px;
  --box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

body {
  background-color: #f5f5f5;
  font-family: "Roboto", sans-serif;
  color: var(--secondary-color);
  position: relative;
  min-height: 100vh;
  padding-bottom: 60px;
}

/* Castle Background Effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://images.unsplash.com/photo-1533154683836-84ea7a0bc310?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.04;
  z-index: -1;
}

.header {
  background-color: var(--primary-color);
  color: white;
  padding: 30px 0;
  margin-bottom: 40px;
  border-bottom: 5px solid var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.header::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 150px;
  height: 100%;
  background-image: url("https://cdn-icons-png.flaticon.com/512/3304/3304567.png");
  background-size: contain;
  background-position: bottom right;
  background-repeat: no-repeat;
  opacity: 0.1;
}

.header h1 {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  margin: 0;
  font-size: 2.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  margin-top: 10px;
  opacity: 0.8;
  font-weight: 300;
  font-size: 1.1rem;
}

.logo {
  width: 50px;
  height: 50px;
  margin-right: 15px;
  vertical-align: middle;
}

.search-container {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin-bottom: 30px;
  border-top: 5px solid var(--accent-color);
  transition: var(--transition);
  position: relative;
  z-index: 1020;
}

.search-container:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.student-container {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin-bottom: 30px;
  display: none;
  border-top: 5px solid var(--accent-color);
  position: relative;
  z-index: 1010;
}

.search-input {
  position: relative;
  z-index: 1030;
}

.search-input input {
  border-radius: 50px;
  padding-left: 20px;
  border: 2px solid #e9ecef;
  transition: var(--transition);
}

.search-input input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(11, 85, 99, 0.25);
}

#search-btn {
  border-radius: 50px;
  padding-left: 25px;
  padding-right: 25px;
  background-color: var(--accent-color);
  border: none;
  font-weight: 500;
  transition: var(--transition);
}

#search-btn:hover {
  background-color: var(--primary-color);
  transform: translateY(-2px);
}

.search-suggestions {
  position: absolute;
  width: 100%;
  background: white;
  border: 1px solid #ddd;
  border-radius: 0 0 15px 15px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 1040;
  display: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  top: 100%;
  left: 0;
}

.search-suggestions.active {
  display: block !important;
  z-index: 9999 !important;
}

.suggestion-item {
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 1px solid #f2f2f2;
  transition: var(--transition);
}

.suggestion-item:hover {
  background-color: #f8f9fa;
  padding-left: 25px;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.student-info {
  margin-bottom: 30px;
  position: relative;
  z-index: 1000;
}

.info-card {
  border-radius: var(--border-radius);
  border: none;
  margin-bottom: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  z-index: 1000;
}

.info-card .card-body {
  padding: 25px;
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.profile-img:hover {
  transform: scale(1.05);
}

.student-name {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 15px;
}

.student-meta {
  color: #6c757d;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.student-meta i {
  width: 20px;
  color: var(--accent-color);
}

.nav-tabs {
  border-bottom: 2px solid #dee2e6;
  margin-bottom: 25px;
  position: relative;
  z-index: 1000;
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--secondary-color);
  font-weight: 500;
  padding: 12px 20px;
  transition: var(--transition);
}

.nav-tabs .nav-link:hover {
  border-color: rgba(11, 85, 99, 0.3);
}

.nav-tabs .nav-link.active {
  color: var(--accent-color);
  border-bottom: 3px solid var(--accent-color);
  font-weight: 600;
}

.tab-content {
  padding: 20px 0;
  position: relative;
  z-index: 1000;
}

.attendance-progress {
  height: 12px;
  border-radius: 50px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  position: relative;
  z-index: 1000;
}

.table thead th {
  background-color: rgba(58, 80, 107, 0.05);
  color: var(--primary-color);
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background-color: rgba(58, 80, 107, 0.03);
}

.table td,
.table th {
  padding: 15px;
  vertical-align: middle;
}

.avg-attendance-card {
  border-radius: var(--border-radius);
  border: none;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  background-color: #f8f9fa;
  position: relative;
  z-index: 1000;
}

.avg-attendance-card .card-body {
  padding: 25px;
}

.status-badge {
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 50px;
  display: inline-block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-pass {
  background-color: rgba(67, 170, 139, 0.15);
  color: var(--success-color);
}

.status-fail {
  background-color: rgba(249, 65, 68, 0.15);
  color: var(--danger-color);
}

.course-card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  z-index: 1000;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.course-card .card-header {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  padding: 15px 20px;
  border-bottom: none;
}

.course-card .card-body {
  padding: 20px;
}

.attendance-detail {
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.attendance-detail .value {
  font-weight: 700;
  font-size: 1.2rem;
}

.attendance-detail.present {
  background-color: rgba(67, 170, 139, 0.1);
}

.attendance-detail.absent {
  background-color: rgba(249, 65, 68, 0.1);
}

.attendance-detail.late {
  background-color: rgba(248, 150, 30, 0.1);
}

.attendance-detail.excused {
  background-color: rgba(144, 224, 239, 0.1);
}

.loading {
  display: none;
  text-align: center;
  padding: 50px 0;
}

.loading .spinner-border {
  width: 3rem;
  height: 3rem;
  color: var(--accent-color);
}

.loading p {
  margin-top: 15px;
  color: var(--accent-color);
  font-weight: 500;
}

.language-switch {
  position: absolute;
  top: 20px;
  z-index: 100;
}

.language-btn {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  padding: 8px 15px;
  font-size: 0.9rem;
  transition: var(--transition);
}

.language-btn:hover {
  background-color: white;
  color: var(--primary-color);
}

.footer {
  text-align: center;
  padding: 20px;
  background-color: var(--primary-color);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  position: absolute;
  bottom: 0;
  width: 100%;
  border-top: 5px solid var(--accent-color);
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .header h1 {
    font-size: 1.8rem;
  }

  .profile-img {
    width: 90px;
    height: 90px;
    margin-bottom: 15px;
  }

  .language-switch {
    top: 10px;
    right: 10px;
  }
}

html[dir="rtl"] .language-switch {
  left: 10px;
  right: auto;
}

html[dir="rtl"] .logo {
  margin-right: 0;
  margin-left: 15px;
}

/*By Tasneem , Logout */
.header-actions {
  position: absolute;
  top: 20px;
  display: flex;
  gap: 10px;
}
.logout-btn {
  background-color: #dc3545;
  color: white;
  border: none;
}
.logout-btn:hover {
  background-color: #c82333;
  color: white;
}