/* Modern Navigation Styles */
.modern-nav {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 70px;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-brand a {
  text-decoration: none;
}

.nav-logo {
  height: 45px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: all 0.3s ease;
  filter: brightness(1.1);
}

.nav-logo:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

.nav-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-search {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8 !important;
  pointer-events: none;
  font-size: 1rem !important;
  z-index: 10;
  display: block !important;
  width: 1rem;
  height: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-notifications {
  position: relative;
}

.notification-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.75rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  backdrop-filter: blur(10px);
  font-size: 1rem;
}

.notification-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  border: 2px solid #1e3c72;
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  min-width: 320px;
  max-width: 400px;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  overflow: hidden;
}

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

.notification-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notification-header h3 {
  margin: 0;
  color: #1e293b;
  font-size: 1.1rem;
  font-weight: 600;
}

.mark-all-read {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.mark-all-read:hover {
  background: #f1f5f9;
  color: #2563eb;
}

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

.notification-content {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.notification-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: background-color 0.2s ease;
  cursor: pointer;
}

.notification-item:hover {
  background: #f8fafc;
}

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

.notification-item.unread {
  background: #fef3c7;
  border-left: 3px solid #f59e0b;
}

.notification-item.unread:hover {
  background: #fde68a;
}

.notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.notification-icon.info {
  background: #dbeafe;
  color: #3b82f6;
}

.notification-icon.success {
  background: #d1fae5;
  color: #10b981;
}

.notification-icon.warning {
  background: #fef3c7;
  color: #f59e0b;
}

.notification-icon.error {
  background: #fee2e2;
  color: #ef4444;
}

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

.notification-title {
  font-weight: 600;
  color: #1e293b;
  font-size: 0.9rem;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.notification-message {
  color: #64748b;
  font-size: 0.85rem;
  margin: 0 0 0.25rem 0;
  line-height: 1.4;
}

.notification-time {
  color: #94a3b8;
  font-size: 0.75rem;
  margin: 0;
}

.notification-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.view-all-notifications {
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.view-all-notifications:hover {
  color: #2563eb;
  text-decoration: none;
}

.view-all-notifications i {
  font-size: 0.8rem;
}

.no-notifications {
  padding: 2rem 1.5rem;
  text-align: center;
  color: #64748b;
}

.no-notifications i {
  font-size: 2rem;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
  display: block;
}

.no-notifications p {
  margin: 0;
  font-size: 0.9rem;
}

.nav-user-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  padding: 0.5rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.nav-user-menu:hover {
  background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.user-name {
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

.user-role {
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 400;
}

.user-dropdown-btn {
  background: none;
  border: none;
  color: #cbd5e1;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.user-dropdown-btn:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.user-dropdown-btn i {
  font-size: 0.8rem;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.05);
  min-width: 280px;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  overflow: hidden;
}

/* Mobile dropdown positioning */
@media (max-width: 768px) {
  .user-dropdown {
    position: fixed !important;
    top: 70px !important; /* Position below header */
    right: 1rem !important; /* Align to right edge with margin */
    left: auto !important;
    min-width: 260px;
    max-width: calc(100vw - 2rem); /* Don't exceed screen width */
    transform: translateY(-10px);
    z-index: 1002; /* Higher z-index for fixed positioning */
  }
  
  .user-dropdown.show {
    transform: translateY(0);
  }
  
  .notification-dropdown {
    position: fixed !important;
    top: 70px !important; /* Position below header */
    right: 1rem !important; /* Align to right edge with margin */
    left: auto !important;
    min-width: 260px;
    max-width: calc(100vw - 2rem); /* Don't exceed screen width */
    transform: translateY(-10px);
    z-index: 1002; /* Higher z-index for fixed positioning */
  }
  
  .notification-dropdown.show {
    transform: translateY(0);
  }
}

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

.dropdown-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dropdown-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.dropdown-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 1rem;
}

.dropdown-email {
  color: #64748b;
  font-size: 0.85rem;
}

.dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #475569;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
}

.dropdown-item:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.dropdown-item i {
  color: #64748b;
  transition: color 0.2s ease;
  width: 16px;
  text-align: center;
}

.dropdown-item:hover i {
  color: #3b82f6;
}

.admin-item {
  color: #7c3aed;
  font-weight: 600;
}

.admin-item:hover {
  background: #f3e8ff;
  color: #5b21b6;
}

.admin-item i {
  color: #7c3aed;
}

.admin-item:hover i {
  color: #5b21b6;
}

.logout-item {
  color: #dc2626;
}

.logout-item:hover {
  background: #fef2f2;
  color: #dc2626;
}

.logout-item i {
  color: #dc2626;
}

.logout-form {
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 1rem;
    gap: 1rem;
  }
  
  .nav-center {
    display: none; /* Hide search on mobile */
  }
  
  .nav-actions {
    gap: 1rem;
  }
  
  .user-info {
    display: none; /* Hide user name/role on mobile */
  }
  
  .user-dropdown-btn {
    display: none; /* Hide dropdown arrow on mobile */
  }
  
  .nav-user-menu {
    padding: 0.25rem;
  }
  
  .notification-btn {
    padding: 0.5rem;
  }
  
  .notification-btn i {
    font-size: 0.9rem;
  }
}

@media (max-width: 640px) {
  .nav-container {
    padding: 0 0.75rem;
    gap: 0.75rem;
  }
  
  .nav-logo {
    height: 35px;
    max-width: 140px;
  }
  
  .nav-actions {
    gap: 0.75rem;
  }
  
  .user-avatar {
    width: 35px;
    height: 35px;
    font-size: 0.8rem;
  }
  
  .notification-btn {
    padding: 0.4rem;
  }
  
  .notification-btn i {
    font-size: 0.8rem;
  }
}
