/* ============ NAVBAR ============ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .navbar {
    background: rgba(7, 11, 23, 0.75);
}

.navbar__inner {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 76px;
}

.logo {
    font-family: "Sora", sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: var(--text);
    letter-spacing: -0.02em;
    flex-shrink: 0;

    display: flex;

    align-items: center;

    gap: 8px;
}

.logo > span span {

    color: var(--primary);

}

.logo-img {

    width: 60px;

    height: 60px;

    object-fit: contain;

}

/* Logo Text */

.logo > span {
    color: var(--text);
}

.logo > span span {
    color: var(--primary);
}



.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 40px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.18s ease, background-color 0.18s ease;
}
.nav-link:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}
.nav-link--dropdown .chev {
    transition: transform 0.2s ease;
}
.nav-dropdown:hover .nav-link--dropdown,
.nav-dropdown.is-open .nav-link--dropdown {
    color: var(--primary);
    background: var(--primary-soft);
}
.nav-dropdown:hover .nav-link--dropdown .chev,
.nav-dropdown.is-open .nav-link--dropdown .chev {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 280px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.2s ease, visibility 0.18s;
    z-index: 100;
}
[data-theme="dark"] .dropdown-menu {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
/* invisible hover bridge to prevent flicker between trigger and menu */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-soft);
    font-weight: 500;
    font-size: 14px;
    transition: background 0.15s ease, color 0.15s ease;
}
.dropdown-item:hover,
.dropdown-item.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item.is-active {
    color: var(--primary-600);
}
.dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
}
[data-theme="dark"] .dropdown-icon {
    background: var(--primary-soft-2) !important;
    color: var(--primary-600) !important;
}
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 4px;
}
.dropdown-view-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    border-radius: 10px;
    transition: background 0.15s ease;
}
.dropdown-view-all:hover {
    background: var(--primary-soft);
}

/* Search */
.search-wrap {
    position: relative;
    flex: 1;
    max-width: 340px;
    margin-left: auto;
}
.search-ico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.search-input {
    width: 100%;
    height: 44px;
    padding: 0 14px 0 42px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.search-input:focus {
    border-color: var(--primary);
    background: var(--card);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.search-input::placeholder {
    color: var(--text-muted);
}

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    background: var(--toggle-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    gap: 2px;
}
.theme-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.theme-btn.is-active {
    background: var(--toggle-active);
    color: var(--primary);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
[data-theme="dark"] .theme-btn.is-active {
    color: var(--primary-600);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition: transform 0.15s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.45);
}
.btn--primary:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px -4px rgba(37, 99, 235, 0.55);
}
.btn--primary:active {
    transform: translateY(0);
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;  
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border)
}



/* --- Navbar layout overrides --- */
.navbar__inner {
    gap: 14px;
}
.nav-links {
    margin-left: 32px;
    flex-wrap: wrap;
}
.nav-link.is-active {
    color: var(--primary);
    background: var(--primary-soft);
    position: relative;
}
.nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: -2px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.navbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}
.search-wrap {
    position: relative;
    flex: 1;
    max-width: 340px;
    margin-left: auto;
    display: block;
}

/* Single-button theme toggle */
.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-soft);
    transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s;
    flex-shrink: 0;
}
.icon-btn:hover {
    color: var(--primary);
    border-color: var(--primary-soft-2);
    background: var(--primary-soft);
}
.theme-single-btn .ico-moon { display: none; }
.theme-single-btn .ico-sun { display: inline-block; }
[data-theme="dark"] .theme-single-btn .ico-moon { display: inline-block; }
[data-theme="dark"] .theme-single-btn .ico-sun { display: none; }

/* Account dropdown */
.account-dropdown {
    position: relative;
    flex-shrink: 0;
}
.account-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 14px 0 8px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 13.5px;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.account-btn:hover,
.account-dropdown.is-open .account-btn {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.account-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.18s;
}
.account-btn:hover .account-avatar,
.account-dropdown.is-open .account-avatar {
    background: rgba(255, 255, 255, 0.22);
}
.account-btn .chev {
    transition: transform 0.2s ease;
}
.account-dropdown.is-open .account-btn .chev {
    transform: rotate(180deg);
}
.account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 260px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.18s, transform 0.2s, visibility 0.18s;
    z-index: 100;
}
[data-theme="dark"] .account-menu {
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.6);
}
.account-dropdown.is-open .account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.account-menu__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--primary-soft);
    border-radius: 12px;
    margin-bottom: 6px;
}
.account-menu__avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.account-menu__name {
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
    line-height: 1.2;
}
.account-menu__sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.account-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-soft);
    font-weight: 500;
    font-size: 13.5px;
    transition: background 0.15s, color 0.15s;
}
.account-menu__item:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.account-menu__divider {
    height: 1px;
    background: var(--border);
    margin: 6px 8px;
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px 24px 20px;
  background: var(--card);
  border-top: 1px solid var(--border);
  gap: 2px
}
.mobile-nav__link {
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-soft);
  transition: background .15s, color .15s
}
.mobile-nav__link:hover {
  background: var(--primary-soft);
  color: var(--primary)
}

.mobile-nav.is-open {
  display: flex;
  animation: slideDown .2s ease
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}





/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width:900px) {

  .nav-links,
  .search-wrap {
    display: none;
  }

  .account-btn__label,
  .account-btn .chev {
    display: none;
  }

  .account-btn {
    padding: 0 10px 0 8px;
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

}

@media (max-width:640px) {

  .navbar__inner {
    gap: 10px;
  }

}
