/* ========================================
   CSS RESET & BOX MODEL
   Stabilized for consistent cross-platform rendering
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px; /* Locked base font size - all rem units calculated from this */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  /* Prevent layout shift from OS scaling - with full browser support */
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Poppins', 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #202124;
  background: #f8f9fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========================================
   MODERN HEADER - STABILIZED LAYOUT
   Fixed units for consistent rendering across all displays
   ======================================== */
.site-header {
  background: rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(1.25rem);
  backdrop-filter: blur(1.25rem);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%; /* Force full viewport width */
  left: 0; /* Lock to left edge */
  right: 0; /* Lock to right edge */
  margin: 0; /* Remove any auto margins */
  padding: 0; /* Remove header padding, use container padding only */
}

.header-container {
  width: 100%; /* Full width of parent */
  max-width: none; /* Remove max-width constraint that could cause centering */
  margin: 0; /* Remove auto centering */
  padding: 16px 48px; /* Fixed px for stable layout across machines */
  display: grid;
  grid-template-columns: 1fr 2fr 1fr; /* Fixed proportions for consistent spacing */
  align-items: center;
  gap: 48px; /* Fixed gap to match reference layout */
  box-sizing: border-box; /* Ensure padding doesn't add to width */
}

/* ===== LOGO SECTION ===== */
.logo-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin: 0;
  padding: 0;
  transition: transform 0.3s ease;
}

.logo-link:hover {
  transform: translateY(-2px);
}

.logo-img {
  height: 44px;
  width: auto;
  display: block;
  margin: 0;
}

.logo-text {
  font-family: 'Poppins', 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #0d47a1 0%, #1a73e8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  margin: 0;
  padding: 0;
  line-height: 1;
  transition: all 0.3s ease;
}

.logo-link:hover .logo-text {
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== SEARCH CONTAINER ===== */
.search-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  justify-self: center;
}

.search-bar {
  width: 100%;
  background: #f8f9fa;
  border-radius: 28px;
  border: 2px solid transparent;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  margin: 0;
  padding: 0;
}

.search-bar:hover {
  background: #ffffff;
  border-color: #e8eaed;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-bar:focus-within {
  background: #ffffff;
  border-color: #1a73e8;
  box-shadow: 0 6px 20px rgba(26, 115, 232, 0.15);
  transform: translateY(-1px);
}

#global-search-form {
  width: 100%;
  display: flex;
  margin: 0;
  padding: 0;
}

.input-group {
  width: 100%;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  padding: 14px 24px;
  font-size: 0.95rem;
  background: transparent;
  outline: none;
  font-family: inherit;
  color: #202124;
  margin: 0;
  line-height: 1.5;
  font-weight: 400;
}

.search-bar input::placeholder {
  color: #5f6368;
  font-weight: 400;
}

.search-bar button {
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  color: white;
  border: none;
  padding: 14px 28px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 28px 28px 0;
  position: relative;
  overflow: hidden;
}

.search-bar button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.search-bar button:hover::before {
  opacity: 1;
}

.search-bar button:hover {
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
  transform: translateX(-2px);
}

.search-bar button:active {
  transform: scale(0.96);
}

.search-bar button i {
  font-size: 1rem;
}

/* ===== SEARCH RESULTS DROPDOWN ===== */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  max-height: 480px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-result-item {
  padding: 16px 20px;
  border-bottom: 1px solid #f1f3f4;
  display: block;
  color: #202124;
  text-decoration: none;
  transition: all 0.2s ease;
  margin: 0;
}

.search-result-item:hover {
  background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
  padding-left: 28px;
}

.search-result-item:last-child {
  border-bottom: none;
  border-radius: 0 0 16px 16px;
}

.search-result-item:first-child {
  border-radius: 16px 16px 0 0;
}

/* ===== HEADER ACTIONS ===== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-self: end;
  margin: 0;
  padding: 0;
}

.authenticated-actions,
.guest-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  flex-direction: row-reverse;
}

/* ===== ACTION BUTTONS - MODERN STYLE ===== */
.action-dropdown-container {
  position: relative;
  margin: 0;
  padding: 0;
}

/* Anchor badges and dropdowns to the trigger button itself */
.action-dropdown-container > .action-btn {
  position: relative;
}

.action-btn {
  padding: 0;
  font-size: 1rem;
  font-weight: 600;
  min-height: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.action-btn:hover {
  background: transparent;
  color: #1a73e8;
  box-shadow: none;
  transform: scale(1.15);
}

.action-btn:active {
  transform: scale(1.05);
}

.action-btn i {
  font-size: 1.6rem;
  margin: 0;
  transition: all 0.3s ease;
}

.btn-label {
  font-weight: 500;
  margin: 0;
}

.caret {
  font-size: 0.7rem;
  opacity: 0.6;
  transition: transform 0.3s ease;
  margin: 0;
}

.action-btn:hover .caret {
  transform: translateY(2px);
}

/* Icon-only buttons */
.icon-btn {
  padding: 0;
  min-width: auto;
  min-height: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn .btn-label {
  display: none;
}

.icon-btn .caret {
  display: none;
}

/* Notification button - consistent size */
.notification-bell {
  font-size: 1.3rem !important;
}

/* Profile button - consistent size */
.profile-icon-btn {
  font-size: 1.3rem;
}

/* Language button - show label inline with consistent height */
.language-icon-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px !important;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  height: 44px;
  min-width: auto;
  width: auto;
}

.language-icon-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.language-icon-btn i.fa-globe {
  font-size: 1.1rem;
}

.language-icon-btn .btn-label {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.language-icon-btn .caret {
  display: inline-block;
  font-size: 0.65rem;
  opacity: 0.6;
  margin-left: 2px;
}

/* ===== PRIMARY BUTTON (Sign Up) ===== */
.primary-btn {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #ffffff !important;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.35);
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease, box-shadow 0.3s ease,
    transform 0.3s ease, color 0.3s ease;
}

.primary-btn::before {
  content: '';
  position: absolute;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.primary-btn:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 100%);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 25px 45px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px) scale(1.01);
}

.primary-btn:hover::before {
  opacity: 1;
  transform: scale(1.05);
}

/* ===== GHOST BUTTON (Login) ===== */
.ghost-btn {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.2);
  color: #14213d;
  box-shadow: 0 10px 24px rgba(20, 33, 61, 0.08);
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, transform 0.3s ease;
}

.ghost-btn:hover {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.35);
  color: #1a73e8;
  box-shadow: 0 20px 35px rgba(37, 99, 235, 0.25);
  transform: translateY(-2px);
}

/* Modern pill style keeps auth CTAs consistent and readable */
.guest-actions .action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border-radius: 999px;
  border-width: 1px;
  border-style: solid;
  font-size: 0.95rem;
  font-weight: 600;
  min-width: max-content;
  text-decoration: none;
  transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease, transform 0.3s ease;
}

.guest-actions .action-btn i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.guest-actions .action-btn:hover {
  transform: translateY(-2px);
}

.guest-actions .action-btn:hover i {
  transform: scale(1.1);
}

.guest-actions .action-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.35);
  outline-offset: 4px;
}

/* ===== NOTIFICATION BADGE - IMPROVED ===== */
.action-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4), 0 0 0 2.5px #ffffff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  pointer-events: none;
  z-index: 10;
  transition: transform 0.2s ease;
}

.action-badge:empty {
  display: none;
}

/* ===== DROPDOWN PANELS ===== */
.dropdown-panel {
  position: absolute;
  top: calc(100% + 16px);
  min-width: 240px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1200;
  margin: 0;
}

html[dir='ltr'] .dropdown-panel {
  right: 0;
  left: auto;
}

html[dir='rtl'] .dropdown-panel {
  left: 0;
  right: auto;
}

.dropdown-panel.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel::before {
  content: '';
  position: absolute;
  top: -10px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  transform: rotate(45deg);
  border-radius: 3px;
}

html[dir='ltr'] .dropdown-panel::before {
  right: 20px;
}

html[dir='rtl'] .dropdown-panel::before {
  left: 20px;
}

/* ===== LANGUAGE DROPDOWN ===== */
.language-dropdown {
  min-width: 180px;
  padding: 8px;
}

.language-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: #202124;
  text-decoration: none;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.2s ease;
  margin: 0;
  font-size: 0.9rem;
}

.language-dropdown-item:hover {
  background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
  color: #1a73e8;
  transform: translateX(4px);
}

.language-dropdown-item.active {
  background: linear-gradient(135deg, #e8f0fe 0%, #f8fbff 100%);
  color: #1a73e8;
  font-weight: 600;
}

.language-dropdown-item i {
  color: #1a73e8;
  font-size: 0.9rem;
}

/* ===== PROFILE DROPDOWN ===== */
.profile-dropdown {
  min-width: 240px;
  padding: 8px;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: #202124;
  text-decoration: none;
  transition: all 0.2s ease;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.profile-dropdown-item i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  color: #5f6368;
  transition: color 0.2s ease;
}

.profile-dropdown-item:hover {
  background: linear-gradient(90deg, #f8f9fa 0%, #ffffff 100%);
  color: #1a73e8;
  transform: translateX(4px);
}

.profile-dropdown-item:hover i {
  color: #1a73e8;
}

.profile-dropdown-item.logout-item {
  color: #d32f2f;
}

.profile-dropdown-item.logout-item:hover {
  background: linear-gradient(90deg, #ffebee 0%, #ffffff 100%);
  color: #c62828;
}

.profile-dropdown-item.logout-item i {
  color: #d32f2f;
}

.profile-dropdown-item.logout-item:hover i {
  color: #c62828;
}

/* ===== NOTIFICATION DROPDOWN ===== */
.notification-dropdown {
  width: 420px; /* Fixed width for stable layout */
  padding: 0;
  max-height: 580px; /* Fixed height to prevent scaling */

  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notification-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid #f1f3f4;
  margin: 0;
  flex-shrink: 0;
  background: #ffffff;
}

.notification-header-left {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #202124;
  margin: 0;
  line-height: 1.2;
}

.notification-subtitle {
  font-size: 0.8rem;
  color: #5f6368;
  margin: 4px 0 0 0;
  font-weight: 400;
}

.mark-all-read {
  font-size: 0.8rem;
  text-decoration: none;
  color: #1a73e8;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.mark-all-read:hover {
  background: #e8f0fe;
  color: #1557b0;
}

.mark-all-read i {
  font-size: 0.75rem;
}

.notification-body {
  max-height: 400px; /* Fixed height for consistent notification area */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px;
  margin: 0;
  flex: 1;
  min-height: 0;
}

.notification-item {
  display: block;
  padding: 14px 16px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  margin: 4px 0;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  position: relative;
}

.notification-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #1a73e8;
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.notification-item:hover {
  background: linear-gradient(90deg, #f8f9fa 0%, #fafbfc 100%);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.notification-item:hover::before {
  height: 60%;
}

.notification-item.unread {
  background: linear-gradient(90deg, #e8f0fe 0%, #f0f6ff 100%);
}

.notification-item.unread::before {
  height: 70%;
}

.notification-item.unread:hover {
  background: linear-gradient(90deg, #d2e3fc 0%, #e8f0fe 100%);
  transform: translateX(6px);
}

.notification-item-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  pointer-events: none;
}

.notification-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.15rem;
  color: #5f6368;
  margin: 0;
  transition: all 0.2s ease;
}

.notification-item.unread .notification-icon {
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
}

.notification-item:hover .notification-icon {
  transform: scale(1.05);
}

.notification-content {
  flex: 1;
  min-width: 0;
  margin: 0;
  pointer-events: none;
}

.notification-content strong {
  font-size: 0.9rem;
  font-weight: 600;
  display: block;
  margin: 0 0 6px 0;
  color: #202124;
  word-break: break-word;
  line-height: 1.3;
}

.notification-content p {
  margin: 0 0 6px 0;
  font-size: 0.85rem;
  color: #5f6368;
  line-height: 1.4;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-content small {
  font-size: 0.75rem;
  color: #80868b;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.notification-content small i {
  font-size: 0.7rem;
}

.notification-footer {
  padding: 16px 20px;
  border-top: 1px solid #f1f3f4;
  text-align: center;
  margin: 0;
  flex-shrink: 0;
  background: #fafbfc;
}

.notification-footer a {
  color: #1a73e8;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 10px 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.notification-footer a:hover {
  background: #e8f0fe;
  color: #1557b0;
  transform: translateY(-1px);
}

.notification-footer a i {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.notification-footer a:hover i {
  transform: translateX(3px);
}

.empty-notifications {
  padding: 60px 20px;
  text-align: center;
  color: #80868b;
  margin: 0;
}

.empty-notifications i {
  font-size: 3.5rem;
  color: #dadce0;
  margin-bottom: 16px;
  display: block;
  opacity: 0.8;
}

.empty-notifications p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid #e8eaed;
  font-size: 1.3rem;
  color: #5f6368;
  cursor: pointer;
  padding: 10px;
  border-radius: 12px;
  transition: all 0.3s ease;
  margin: 0;
}

.mobile-menu-toggle:hover {
  background: #f8f9fa;
  border-color: #1a73e8;
  color: #1a73e8;
  transform: rotate(90deg);
}

/* ===== SCROLLBAR STYLING ===== */
.notification-body::-webkit-scrollbar,
.search-results-dropdown::-webkit-scrollbar {
  width: 6px;
}

.notification-body::-webkit-scrollbar-track,
.search-results-dropdown::-webkit-scrollbar-track {
  background: transparent;
}

.notification-body::-webkit-scrollbar-thumb,
.search-results-dropdown::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 3px;
}

.notification-body::-webkit-scrollbar-thumb:hover,
.search-results-dropdown::-webkit-scrollbar-thumb:hover {
  background: #bdc1c6;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .header-container {
    padding: 16px 24px;
    gap: 24px;
  }

  .search-container {
    max-width: 500px;
  }

  .btn-label {
    display: none !important;
  }

  .icon-btn .btn-label {
    display: none !important;
  }
}

@media (max-width: 992px) {
  .header-container {
    padding: 14px 20px;
    gap: 16px;
    flex-wrap: wrap;
  }

  .search-container {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
  }

  .header-actions {
    order: 2;
  }

  .logo-text {
    font-size: 1.3rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 12px 16px;
    gap: 12px;
  }

  .logo-img {
    height: 38px;
  }

  .logo-text {
    font-size: 1.2rem;
  }

  .action-btn {
    padding: 9px 14px;
  }

  .icon-btn {
    padding: 9px;
  }

  .notification-dropdown {
    width: 360px; /* Fixed width for tablet breakpoint */
    max-height: 500px; /* Fixed height for stable display */
    right: -10px;
  }

  html[dir='rtl'] .notification-dropdown {
    left: -10px;
    right: auto;
  }

  .notification-body {
    max-height: 340px; /* Fixed height for consistent content area */
  }

  .notification-header {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .notification-footer {
    padding: 12px 16px;
  }
}

@media (max-width: 576px) {
  .header-container {
    padding: 10px 12px;
  }

  .logo-img {
    height: 34px;
  }

  .logo-text {
    display: none;
  }

  .search-bar input {
    font-size: 0.85rem;
    padding: 12px 18px;
  }

  .search-bar button {
    padding: 12px 20px;
  }

  .action-btn {
    padding: 8px;
  }

  .notification-dropdown {
    width: 350px; /* Fixed width for mobile consistency */
    max-height: 520px; /* Fixed height for stable mobile layout */
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) translateY(0);
  }

  .notification-dropdown.show {
    transform: translateX(-50%) translateY(0);
  }

  .notification-dropdown::before {
    left: 50%;
    right: auto;
    transform: translateX(-50%) rotate(45deg);
  }

  .notification-body {
    max-height: 380px; /* Fixed height for mobile notification area */
  }

  .notification-item {
    padding: 12px;
  }

  .notification-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .notification-content strong {
    font-size: 0.85rem;
  }

  .notification-content p {
    font-size: 0.8rem;
  }

  .action-badge {
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    font-size: 0.6rem;
  }
}

/* ===== RTL SUPPORT ===== */
html[dir="rtl"] .logo-container {
  flex-direction: row-reverse;
}

html[dir="rtl"] .language-dropdown-item:hover,
html[dir="rtl"] .profile-dropdown-item:hover {
  transform: translateX(-4px);
}

html[dir="rtl"] .notification-item:hover {
  transform: translateX(-4px);
}

html[dir="rtl"] .notification-item::before {
  left: auto;
  right: 0;
  border-radius: 2px 0 0 2px;
}

html[dir="rtl"] .notification-item.unread:hover {
  transform: translateX(-6px);
}

html[dir="rtl"] .action-badge {
  right: auto;
  left: -6px;
}

html[dir="rtl"] .notification-footer a:hover i {
  transform: translateX(-3px);
}

/* ===== SMOOTH TRANSITIONS ===== */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* ===== MODERN SIDEBAR / MENU BAR ===== */
.main-container {
  display: flex;
  flex: 1;
  margin: 0;
  padding: 0;
}

.sidebar {
  width: 280px;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  height: calc(100vh - 80px);
  position: sticky;
  top: 80px;
  overflow-y: auto;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 900;
  margin: 0;
  padding: 0;
  box-shadow: 2px 0 12px rgba(0, 0, 0, 0.02);
}

html[dir="rtl"] .sidebar {
  border-right: none;
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.02);
}

.sidebar-nav {
  padding: 24px 0;
  margin: 0;
}

.sidebar-menu {
  list-style: none;
  padding: 0 16px;
  margin: 0;
}

.sidebar-menu li {
  margin-bottom: 4px;
  margin: 0 0 4px 0;
  padding: 0;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  text-decoration: none;
  color: #5f6368;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  margin: 0;
}

.sidebar-menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: linear-gradient(180deg, #1a73e8 0%, #4285f4 100%);
  transform: scaleY(0);
  transition: transform 0.3s ease;
  border-radius: 0 4px 4px 0;
}

html[dir="rtl"] .sidebar-menu a::before {
  left: auto;
  right: 0;
  border-radius: 4px 0 0 4px;
}

.sidebar-menu a i {
  width: 24px;
  text-align: center;
  font-size: 1.15rem;
  transition: all 0.3s ease;
  margin: 0;
}

html[dir="ltr"] .sidebar-menu a i {
  margin-right: 14px;
  margin-left: 0;
}

html[dir="rtl"] .sidebar-menu a i {
  margin-left: 14px;
  margin-right: 0;
}

.sidebar-menu a:hover {
  background: linear-gradient(90deg, #e8f0fe 0%, #f8fbff 100%);
  color: #1a73e8;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1);
}

html[dir="rtl"] .sidebar-menu a:hover {
  transform: translateX(-4px);
}

.sidebar-menu a:hover::before {
  transform: scaleY(1);
}

.sidebar-menu a:hover i {
  transform: scale(1.15);
  color: #1a73e8;
}

.sidebar-menu .active {
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
  transform: translateX(4px);
}

html[dir="rtl"] .sidebar-menu .active {
  transform: translateX(-4px);
}

.sidebar-menu .active::before {
  transform: scaleY(1);
  background: rgba(255, 255, 255, 0.3);
}

.sidebar-menu .active i {
  color: white;
  transform: scale(1.1);
}

.sidebar-menu .active:hover {
  background: linear-gradient(135deg, #1557b0 0%, #1a73e8 100%);
  color: white;
}

/* Sidebar Scrollbar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #bdc1c6;
}

/* ===== CONTENT AREA ===== */
.content {
  flex: 1;
  padding: 32px;
  min-height: calc(100vh - 80px);
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  margin: 0;
}

/* ===== MODERN FOOTER ===== */
.site-footer {
  background: linear-gradient(180deg, #1a1d29 0%, #0f1419 100%);
  color: #e8eaed;
  margin: 0;
  padding: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(26, 115, 232, 0.5) 50%, transparent 100%);
}

.footer-top {
  padding: 64px 0 48px;
  position: relative;
  margin: 0;
}

.footer-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin: 0;
  padding: 0;
}

.footer-column {
  margin: 0;
  padding: 0;
}

.footer-column:first-child {
  max-width: 400px;
}

.footer-column h4 {
  font-size: 1.25rem;
  margin: 0 0 24px 0;
  font-weight: 700;
  padding: 0;
  position: relative;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  background: linear-gradient(90deg, #1a73e8 0%, #4285f4 100%);
  height: 3px;
  width: 60px;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.4);
}

html[dir="ltr"] .footer-column h4::after {
  left: 0;
}

html[dir="rtl"] .footer-column h4::after {
  right: 0;
}

.footer-column:first-child p {
  line-height: 1.8;
  font-size: 0.95rem;
  color: #bdc1c6;
  margin: 0 0 24px 0;
  padding: 0;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 14px;
  margin: 0 0 14px 0;
  padding: 0;
}

.footer-links a {
  color: #bdc1c6;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 400;
  position: relative;
  padding: 4px 0;
}

.footer-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #1a73e8 0%, #4285f4 100%);
  transition: width 0.3s ease;
}

html[dir="ltr"] .footer-links a::before {
  left: 0;
}

html[dir="rtl"] .footer-links a::before {
  right: 0;
}

.footer-links a:hover {
  color: #ffffff;
  padding-left: 8px;
}

html[dir="rtl"] .footer-links a:hover {
  padding-left: 0;
  padding-right: 8px;
}

.footer-links a:hover::before {
  width: 100%;
}

/* ===== SOCIAL LINKS ===== */
.social-links {
  display: flex;
  gap: 12px;
  margin: 24px 0 0 0;
  padding: 0;
}

html[dir="rtl"] .social-links {
  justify-content: flex-start;
}

html[dir="ltr"] .social-links {
  justify-content: flex-start;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: #e8eaed;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-links a i {
  position: relative;
  z-index: 1;
}

.social-links a:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.4);
  border-color: #1a73e8;
  color: #ffffff;
}

.social-links a:hover::before {
  opacity: 1;
}

/* ===== CONTACT INFO ===== */
.contact-info {
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-info li {
  display: flex;
  align-items: center;
  margin: 0 0 16px 0;
  padding: 0;
  color: #bdc1c6;
  font-size: 0.95rem;
}

html[dir="ltr"] .contact-info li {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .contact-info li {
  direction: ltr;
  text-align: right;
  flex-direction: row-reverse;
}

.contact-info li i {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  color: #ffffff;
  flex-shrink: 0;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

html[dir="ltr"] .contact-info li i {
  margin-right: 14px;
  margin-left: 0;
}

html[dir="rtl"] .contact-info li i {
  margin-left: 14px;
  margin-right: 0;
}

/* ===== FOOTER BOTTOM ===== */
.footer-bottom {
  background: rgba(0, 0, 0, 0.3);
  padding: 24px 0;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.footer-bottom .footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.copyright {
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: #9aa0a6;
  font-weight: 400;
}

/* ===== CHATBOT BUTTON ===== */
.chatbot-button {
  position: fixed;
  bottom: 32px;
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  color: white;
  padding: 18px 20px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 26px;
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.4);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 3px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.chatbot-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s ease;
}

.chatbot-button:hover {
  transform: scale(1.12) rotate(10deg);
  box-shadow: 0 12px 32px rgba(26, 115, 232, 0.6);
  background: linear-gradient(135deg, #1557b0 0%, #1a73e8 100%);
}

.chatbot-button:hover::before {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 0;
}

.chatbot-button:active {
  transform: scale(1.05);
}

html[dir="ltr"] .chatbot-button {
  right: 32px;
  left: auto;
}

html[dir="rtl"] .chatbot-button {
  left: 32px;
  right: auto;
}

/* ===== ACCOUNT PAGES STYLING ===== */
/* Modern card styling for login, logout, signup, password reset pages */

/* Container spacing for account pages */
.container.mt-5,
.container.my-5 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* Card styling */
.card {
  border: none;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
}

.card.shadow-lg {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.card.shadow-sm {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12) !important;
}

/* Card header styling */
.card-header {
  border-bottom: none;
  padding: 2rem 2.5rem;
  border-radius: 20px 20px 0 0;
}

.card-header.bg-primary {
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%) !important;
  color: #ffffff;
}

.card-header.bg-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%) !important;
  color: #ffffff;
}

.card-header.bg-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
  color: #ffffff;
}

.card-header.bg-warning {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%) !important;
  color: #ffffff;
}

.card-header h2,
.card-header .card-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Card body styling */
.card-body {
  padding: 2.5rem;
}

.card-body.p-4 {
  padding: 2.5rem !important;
}

.card-body .lead {
  font-size: 1.1rem;
  font-weight: 400;
  color: #4b5563;
  line-height: 1.7;
}

/* Form styling for account pages */
.needs-validation .mb-4,
form .mb-4 {
  margin-bottom: 1.75rem !important;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form select,
.form-control,
.form-select {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #ffffff;
  color: #1f2937;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form select:focus,
.form-control:focus,
.form-select:focus {
  border-color: #1a73e8;
  outline: none;
  box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
  background: #ffffff;
}

form label,
.form-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

/* Button styling for account pages */
.btn {
  border-radius: 12px;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  line-height: 1.5;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 14px;
}

.btn.w-100 {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1557b0 0%, #1a73e8 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 115, 232, 0.4);
  color: #ffffff;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4);
  color: #ffffff;
}

.btn-success {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #047857 0%, #059669 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
  color: #ffffff;
}

.btn-secondary {
  background: #6b7280;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(107, 114, 128, 0.4);
  color: #ffffff;
}

.btn-outline-secondary {
  background: transparent;
  border: 2px solid #d1d5db;
  color: #4b5563;
  box-shadow: none;
}

.btn-outline-secondary:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #1f2937;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-outline-danger {
  background: transparent;
  border: 2px solid #ef4444;
  color: #dc2626;
  box-shadow: none;
}

.btn-outline-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid #1a73e8;
  color: #1a73e8;
  box-shadow: none;
}

.btn-outline-primary:hover {
  background: #1a73e8;
  border-color: #1a73e8;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

/* Link styling for account pages */
.text-decoration-none {
  text-decoration: none !important;
  color: #1a73e8;
  font-weight: 500;
  transition: all 0.2s ease;
}

.text-decoration-none:hover {
  color: #1557b0;
  text-decoration: underline !important;
}

.text-decoration-none.fw-bold {
  font-weight: 700 !important;
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-muted {
  color: #6b7280 !important;
}

.text-white {
  color: #ffffff !important;
}

.text-danger {
  color: #dc2626 !important;
}

.text-success {
  color: #059669 !important;
}

/* Spacing utilities */
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
.p-4 { padding: 1.5rem !important; }

/* Alert styling */
.alert {
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  border: none;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #7f1d1d;
  border-left: 4px solid #dc2626;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #064e3b;
  border-left: 4px solid #059669;
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e3a8a;
  border-left: 4px solid #1a73e8;
}

.alert-heading {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* Grid utilities for buttons */
.d-grid {
  display: grid;
}

.d-grid.gap-2 {
  gap: 0.75rem;
}

/* Divider with text */
.text-center.mt-4.mb-3 {
  position: relative;
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.text-center.mt-4.mb-3::before,
.text-center.mt-4.mb-3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e5e7eb 50%, transparent 100%);
}

.text-center.mt-4.mb-3 span {
  padding: 0 1rem;
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Icon spacing in buttons and links */
.btn i,
.text-decoration-none i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn i.me-1,
.text-decoration-none i.me-1 {
  margin-right: 0.375rem;
}

.btn i.me-2,
.text-decoration-none i.me-2 {
  margin-right: 0.5rem;
}

.btn i.ms-2 {
  margin-left: 0.5rem;
}

/* Border utilities */
.border-danger {
  border: 2px solid #ef4444 !important;
}

.rounded {
  border-radius: 12px !important;
}

/* Modal styling improvements */
.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem 2rem;
  border-radius: 20px 20px 0 0;
}

.modal-title {
  font-weight: 700;
  font-size: 1.25rem;
  color: #1f2937;
}

.modal-body {
  padding: 2rem;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.7;
}

.modal-footer {
  border-top: 1px solid #e5e7eb;
  padding: 1.5rem 2rem;
  border-radius: 0 0 20px 20px;
}

/* ===== PROFILE PAGE STYLING ===== */
/* Modern profile page design */

.profile-container {
  padding: 2.5rem 1rem;
  max-width: 100%;
  min-height: calc(100vh - 200px);
}

.profile-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.profile-card {
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  transition: all 0.3s ease;
}

.profile-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* Profile cover */
.profile-cover {
  height: 200px;
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 50%, #5e97f6 100%);
  position: relative;
  overflow: hidden;
}

.cover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
  opacity: 0.8;
}

/* Avatar */
.avatar-container {
  display: flex;
  justify-content: center;
  position: relative;
  margin-top: -80px;
  z-index: 10;
}

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 6px solid #ffffff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.16);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-icon {
  font-size: 5rem;
  color: #1a73e8;
}

/* Profile info */
.profile-info {
  padding: 1.5rem 2rem 0.5rem;
  text-align: center;
}

.user-name {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.user-institution {
  font-size: 1.1rem;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
}

/* Profile details */
.profile-details {
  padding: 1.5rem 2rem 2rem;
}

.details-card {
  background: #f9fafb;
  border-radius: 16px;
  overflow: hidden;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.2s ease;
}

.detail-item:last-child {
  border-bottom: none;
}

.detail-item:hover {
  background: rgba(26, 115, 232, 0.04);
}

.detail-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.25rem;
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.1);
  transition: all 0.3s ease;
}

.detail-item:hover .detail-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

.detail-icon i {
  font-size: 1.25rem;
  color: #1a73e8;
}

.detail-content {
  flex: 1;
}

.detail-content h6 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.375rem;
}

.detail-content p {
  font-size: 1.05rem;
  color: #1f2937;
  margin-bottom: 0;
  word-break: break-word;
  line-height: 1.6;
  font-weight: 500;
}

/* Social links in profile */
.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-size: 1.25rem;
}

.social-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.social-link.linkedin {
  background: linear-gradient(135deg, #0077b5 0%, #006097 100%);
}

.social-link.linkedin:hover {
  box-shadow: 0 8px 20px rgba(0, 119, 181, 0.4);
}

.social-link.twitter {
  background: linear-gradient(135deg, #1da1f2 0%, #1a8cd8 100%);
}

.social-link.twitter:hover {
  box-shadow: 0 8px 20px rgba(29, 161, 242, 0.4);
}

.social-link.facebook {
  background: linear-gradient(135deg, #4267b2 0%, #365899 100%);
}

.social-link.facebook:hover {
  box-shadow: 0 8px 20px rgba(66, 103, 178, 0.4);
}

/* Profile actions */
.profile-actions {
  padding: 2rem;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.btn-action {
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
}

.btn-action i {
  font-size: 1rem;
}

/* Project invite form */
.project-invite {
  margin-top: 1.5rem;
}

.project-invite .input-group {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.project-invite .form-select {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
  border: 2px solid #e5e7eb;
  padding: 0.875rem 1.25rem;
  font-size: 0.95rem;
  background: #ffffff;
}

.project-invite .form-select:focus {
  border-color: #1a73e8;
  box-shadow: none;
}

.project-invite .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  padding: 0.875rem 1.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 36px;
  }

  .sidebar {
    width: 260px;
  }
}

@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    left: -300px;
    width: 280px;
    height: 100vh;
    top: 0;
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    background: #ffffff;
  }

  .sidebar.active {
    left: 0;
  }

  html[dir="rtl"] .sidebar {
    left: auto;
    right: -300px;
  }

  html[dir="rtl"] .sidebar.active {
    right: 0;
  }

  body.sidebar-open::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1040;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .footer-column:first-child {
    grid-column: 1 / -1;
    max-width: 100%;
  }

  .content {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .footer-container {
    padding: 0 24px;
  }

  .footer-top {
    padding: 48px 0 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-column h4 {
    font-size: 1.15rem;
    margin-bottom: 20px;
  }

  .content {
    padding: 20px;
  }

  .chatbot-button {
    padding: 16px 18px;
    font-size: 22px;
    bottom: 24px;
  }

  html[dir="ltr"] .chatbot-button {
    right: 24px;
  }

  html[dir="rtl"] .chatbot-button {
    left: 24px;
  }

  /* Account pages responsive - tablet */
  .card-header {
    padding: 1.5rem 2rem;
  }

  .card-header h2,
  .card-header .card-title {
    font-size: 1.5rem;
  }

  .card-body {
    padding: 2rem;
  }

  .card-body.p-4 {
    padding: 2rem !important;
  }

  /* Profile page - tablet */
  .profile-container {
    padding: 2rem 1rem;
  }

  .profile-cover {
    height: 160px;
  }

  .avatar {
    width: 140px;
    height: 140px;
  }

  .avatar-container {
    margin-top: -70px;
  }

  .user-name {
    font-size: 1.75rem;
  }

  .detail-item {
    padding: 1.25rem;
  }

  .profile-actions {
    padding: 1.5rem;
  }

  .actions-primary {
    gap: 0.75rem;
  }
}

@media (max-width: 576px) {
  .footer-container {
    padding: 0 16px;
  }

  .footer-top {
    padding: 40px 0 28px;
  }

  .footer-bottom {
    padding: 20px 0;
  }

  .footer-bottom .footer-container {
    text-align: center;
    justify-content: center;
  }

  .copyright {
    font-size: 0.85rem;
  }

  .content {
    padding: 16px;
  }

  .chatbot-button {
    padding: 14px 16px;
    font-size: 20px;
    bottom: 20px;
  }

  html[dir="ltr"] .chatbot-button {
    right: 20px;
  }

  html[dir="rtl"] .chatbot-button {
    left: 20px;
  }

  /* Account pages responsive - mobile */
  .container.mt-5,
  .container.my-5 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .card {
    border-radius: 16px;
  }

  .card-header {
    padding: 1.25rem 1.5rem;
  }

  .card-header h2,
  .card-header .card-title {
    font-size: 1.35rem;
  }

  .card-body {
    padding: 1.5rem;
  }

  .card-body.p-4 {
    padding: 1.5rem !important;
  }

  .card-body .lead {
    font-size: 1rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }

  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }

  form input[type="text"],
  form input[type="email"],
  form input[type="password"],
  form select,
  .form-control,
  .form-select {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  /* Profile page - mobile */
  .profile-container {
    padding: 1.5rem 0.75rem;
  }

  .profile-card {
    border-radius: 20px;
  }

  .profile-cover {
    height: 140px;
  }

  .avatar {
    width: 120px;
    height: 120px;
    border-width: 4px;
  }

  .avatar-container {
    margin-top: -60px;
  }

  .avatar-icon {
    font-size: 4rem;
  }

  .profile-info {
    padding: 1.25rem 1.5rem 0.5rem;
  }

  .user-name {
    font-size: 1.5rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .user-institution {
    font-size: 1rem;
  }

  .profile-details {
    padding: 1.25rem 1.5rem 1.5rem;
  }

  .details-card {
    border-radius: 12px;
  }

  .detail-item {
    padding: 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    margin-right: 0;
    margin-bottom: 0.75rem;
  }

  .detail-icon i {
    font-size: 1.1rem;
  }

  .detail-content h6 {
    font-size: 0.8rem;
  }

  .detail-content p {
    font-size: 0.95rem;
  }

  .profile-actions {
    padding: 1.5rem;
  }

  .actions-primary {
    flex-direction: column;
    gap: 0.75rem;
  }

  .btn-action {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }

  .project-invite .input-group {
    flex-direction: column;
    border-radius: 12px;
  }

  .project-invite .form-select {
    border-radius: 12px;
    border-right: 2px solid #e5e7eb;
    margin-bottom: 0.5rem;
  }

  .project-invite .btn {
    border-radius: 12px;
    width: 100%;
  }

  .social-links {
    justify-content: center;
  }

  .social-link {
    width: 40px;
    height: 40px;
    font-size: 1.15rem;
  }

  .modal-content {
    border-radius: 16px;
  }

  .modal-header {
    padding: 1.25rem 1.5rem;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 1.5rem;
    font-size: 0.95rem;
  }

  .modal-footer {
    padding: 1.25rem 1.5rem;
  }
}

/* ===== SMOOTH ANIMATIONS ===== */
@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.sidebar.active {
  animation: slideInFromLeft 0.3s ease;
}

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 16px;
  }
}
