.modern-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  padding: 0.75rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
}

.header-right {
  gap: 0.75rem;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-right: 0.5rem;
}

.header-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  opacity: 0.78;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.header-link:hover {
  color: var(--color-primary);
  opacity: 1;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  padding-right: 1.5rem;
  position: relative;
  transition: transform 0.2s ease;
}

.header-brand:hover {
  transform: translateY(-2px);
}

.header-brand::after {
  content: "";
  position: absolute;
  right: 0;
  width: 1px;
  height: 28px;
  background: var(--color-border);
}

.header-brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 4px 8px rgba(15, 23, 42, 0.12));
}

.header-brand span {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modern-search {
  position: relative;
  margin-left: 1rem;
}

.search-input {
  width: 260px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 0.55rem 1rem 0.55rem 2.6rem;
  background: rgba(245, 247, 251, 0.9);
  color: var(--color-text);
  font-size: 0.9rem;
  transition: box-shadow 0.2s ease, width 0.2s ease;
}

.search-input:focus {
  outline: none;
  width: 300px;
  box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.12);
  border-color: rgba(58, 123, 213, 0.5);
}

.search-input::placeholder {
  color: var(--color-muted);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
}

.action-buttons-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.action-button {
  background: rgba(245, 247, 251, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
  background: rgba(58, 123, 213, 0.08);
  border-color: rgba(58, 123, 213, 0.2);
}

.action-button img {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(45deg, #ff6b6b, #ff8f5f);
  border: 2px solid #fff;
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.75rem 0.3rem 0.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(245, 247, 251, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease;
}

.profile-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
  border-color: rgba(58, 123, 213, 0.25);
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.profile-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-role {
  font-size: 0.7rem;
  color: var(--color-muted);
}

.profile-arrow {
  color: var(--color-muted);
  transition: transform 0.2s ease, color 0.2s ease;
}

.profile-button:hover .profile-arrow {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.auth-button {
  height: 42px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0 1.3rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-login {
  background: #fff;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(58, 123, 213, 0.16);
}

.btn-signup {
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  border: none;
}

.btn-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(58, 123, 213, 0.24);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  position: relative;
  color: var(--color-text);
}

.modern-offcanvas {
  box-shadow: -6px 0 24px rgba(15, 23, 42, 0.1);
  border: none;
}

.offcanvas-header {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem;
}

.offcanvas-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.offcanvas-body {
  padding: 1.25rem;
}

.mobile-user-profile {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  background: rgba(245, 247, 251, 0.8);
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.mobile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-search {
  position: relative;
  margin-bottom: 1.25rem;
}

.mobile-search .search-input {
  width: 100%;
}

.mobile-section {
  margin-bottom: 1.25rem;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: background 0.2s ease;
}

.mobile-menu-item:hover {
  background: rgba(58, 123, 213, 0.08);
}

.mobile-menu-item .icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 247, 251, 0.9);
  border-radius: 50%;
}

.mobile-menu-item .icon img {
  width: 18px;
  height: 18px;
}

.mobile-menu-item .icon i {
  font-size: 1rem;
  color: var(--color-primary);
}

.modern-dropdown {
  width: 520px;
  min-width: 520px;
  border-radius: 18px;
  overflow: hidden;
  border: none;
  padding: 0;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.15);
}

.dropdown-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: #f8fafc;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.dropdown-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-user-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1f2a44;
}

.dropdown-menu-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
  padding: 1.25rem 1.5rem 1.5rem;
}

.dropdown-menu-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.5rem 0.6rem;
  border-radius: 12px;
  color: #1f2a44;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.dropdown-menu-item:hover {
  background: rgba(58, 123, 213, 0.08);
  transform: translateY(-1px);
}

.dropdown-menu-item .icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dropdown-menu-item .icon img {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

.dropdown-menu-item .label {
  font-weight: 600;
  font-size: 0.95rem;
}

@media (max-width: 992px) {
  .header-brand::after {
    display: none;
  }

  .modern-search,
  .action-buttons-container,
  .profile-button,
  .header-right .d-lg-block,
  .header-right .d-lg-flex {
    display: none !important;
  }

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