
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: $header-height;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border-color);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: padding-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  @media (min-width: 992px) {
    padding-left: $sidebar-width;
  }

  html[data-toggled="close"] & {
    @media (min-width: 992px) {
      padding-left: $sidebar-collapsed-width;
    }
  }

  .main-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 1.25rem;
  }

  .header-content-left,
  .header-content-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
  }

  .horizontal-logo {
    display: none;
    align-items: center;

    .header-logo {
      display: inline-flex;
      align-items: center;

      img {
        max-height: 2rem;
        max-width: 130px;
        width: auto;
        height: auto;
        object-fit: contain;
        display: none;
      }

      .desktop-logo {
        display: block;
      }

      .desktop-dark,
      .toggle-logo,
      .toggle-dark {
        display: none !important;
      }
    }
  }

  @media (max-width: 991.98px) {
    .horizontal-logo {
      display: inline-flex !important;

      .header-logo {
        .desktop-logo,
        .desktop-dark,
        .toggle-dark {
          display: none !important;
        }

        .toggle-logo {
          display: block !important;
        }
      }
    }
  }

  @media (min-width: 992px) {
    .horizontal-logo {
      display: none !important;
    }
  }

  .sidemenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;

    span {
      display: block;
      width: 18px;
      height: 2px;
      background-color: currentColor;
      position: relative;
      transition: all 0.2s ease;

      &::before,
      &::after {
        content: "";
        position: absolute;
        width: 18px;
        height: 2px;
        background-color: currentColor;
        left: 0;
        transition: all 0.2s ease;
      }

      &::before {
        top: -6px;
      }

      &::after {
        bottom: -6px;
      }
    }

    &:hover {
      background-color: #f1f5f9;
      color: var(--primary-color);
    }
  }

  .header-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #64748b;
    text-decoration: none;
    position: relative;
    cursor: pointer;

    &:hover {
      background-color: #f1f5f9;
      color: var(--primary-color);
    }

    .header-link-icon {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      object-fit: cover;
    }

    .header-icon-pulse {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background-color: var(--primary-color);
    }
  }

  .notifications-dropdown {
    .header-link {
      &::after {
        display: none !important;
      }
    }

    .notif-badge-pill {
      top: 3px;
      right: 3px;
      min-width: 17px;
      height: 17px;
      padding: 0 4px;
      font-size: 10px;
      font-weight: 700;
      line-height: 1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 2px solid #ffffff;
      box-shadow: 0 2px 4px rgba(239, 68, 68, 0.35);
      z-index: 2;
    }
  }

  .main-header-dropdown {
    margin-top: 0.5rem !important;
    border-radius: 0.75rem !important;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12) !important;
    padding: 0;
  }

  .header-dropdown-banner {
    background: linear-gradient(135deg, #0f3625 0%, #204936 100%) !important;
    padding: 1.15rem 1.25rem;
    position: relative;
    overflow: hidden;

    &::after {
      content: '';
      position: absolute;
      top: -30px;
      right: -30px;
      width: 100px;
      height: 100px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(74, 222, 128, 0.18) 0%, transparent 70%);
      pointer-events: none;
    }

    .dropdown-banner-title {
      font-size: 0.95rem;
      font-weight: 700;
      color: #ffffff !important;
      margin-bottom: 0;
      display: flex;
      align-items: center;
      gap: 0.45rem;
      letter-spacing: -0.01em;
    }

    .dropdown-banner-subtitle {
      font-size: 0.75rem;
      color: rgba(255, 255, 255, 0.8) !important;
      margin-top: 0.25rem;
      margin-bottom: 0;
      font-weight: 400;
    }

    .dropdown-banner-btn,
    .dropdown-banner-action {
      color: #ffffff !important;
      opacity: 0.92;
      transition: all 0.2s ease;
      padding: 0.3rem 0.75rem;
      border-radius: 0.5rem;
      background: rgba(255, 255, 255, 0.16);
      border: 1px solid rgba(255, 255, 255, 0.28);
      font-size: 0.75rem;
      font-weight: 500;
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      white-space: nowrap;
      width: auto !important;
      height: auto !important;

      i {
        font-size: 0.9rem;
        color: #ffffff !important;
        line-height: 1;
      }

      &:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.28);
        border-color: rgba(255, 255, 255, 0.45);
        color: #ffffff !important;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
      }
    }

    .dropdown-banner-icon-btn {
      color: #ffffff !important;
      opacity: 0.95;
      transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
      width: 34px !important;
      height: 34px !important;
      min-width: 34px !important;
      padding: 0 !important;
      border-radius: 50% !important;
      background: rgba(255, 255, 255, 0.2);
      border: 1px solid rgba(255, 255, 255, 0.35);
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;

      i {
        color: #ffffff !important;
        font-size: 1.1rem;
        line-height: 1;
        display: inline-block;
      }

      &:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.35);
        border-color: rgba(255, 255, 255, 0.5);
        color: #ffffff !important;
        transform: rotate(45deg);
      }
    }
  }

  .header-profile-dropdown {
    min-width: 270px;

    .dropdown-item {
      padding: 0.65rem 1.15rem;
      font-size: 0.825rem;
      font-weight: 500;
      color: #334155;
      display: flex;
      align-items: center;
      transition: all 0.15s ease;

      i {
        font-size: 1.1rem;
        margin-right: 0.6rem;
        color: #64748b;
        transition: color 0.15s ease;
      }

      &:hover {
        background-color: #f1f5f9;
        color: var(--primary-color);

        i {
          color: var(--primary-color);
        }

        &.text-danger {
          color: #dc2626 !important;
          background-color: #fef2f2;

          i {
            color: #dc2626 !important;
          }
        }
      }
    }
  }
}

html[data-theme-mode="dark"] {
  .app-header .horizontal-logo .header-logo {
    .desktop-logo,
    .toggle-logo,
    .desktop-dark {
      display: none !important;
    }
    .toggle-dark {
      display: block !important;
    }
  }
}

