/* ============================================================
   1. PUBLIC NAVBAR (Premium SaaS Style)
   ============================================================ */

  .moa-public-nav {
      background: rgba(5, 8, 22, 0.85); /* subtle transparency */
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      padding: 14px 0;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      transition: background 0.3s ease, box-shadow 0.3s ease;
  }

  /* Sticky shadow on scroll (optional) */
  .moa-public-nav.scrolled {
      background: rgba(5, 8, 22, 0.95);
      box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  }

  /* Brand */
  .moa-public-brand {
      color: #fff !important;
      text-decoration: none;
      transition: opacity 0.2s ease;
  }

  .moa-public-brand:hover {
      opacity: 0.85;
  }

  .moa-public-logo {
      height: 32px;
  }

  /* Nav links */
  .moa-public-menu .nav-link {
      color: rgba(255,255,255,0.75);
      font-weight: 500;
      transition: color 0.25s ease, transform 0.2s ease;
  }

  .moa-public-menu .nav-link:hover {
      color: #fff;
      transform: translateY(-1px);
  }

  /* Icon button */
  .moa-public-icon-btn {
      color: rgba(255,255,255,0.75);
      padding: 6px 10px;
      border-radius: 8px;
      transition: background 0.2s ease, color 0.2s ease;
  }

  .moa-public-icon-btn:hover {
      background: rgba(255,255,255,0.1);
      color: #fff;
  }

  /* CTA button */
  .moa-public-cta {
      background: var(--moa-bg-pastel-blue);
      border: none;
      padding: 8px 18px;
      font-weight: 400;
      border-radius: 12px;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .moa-public-cta:hover {
      background: var(--moa-bg-pastel-blue);
      color: var(--moa-brand-secondary);
      border: 0.5px white;
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  }

  /* Mobile toggle */
  .moa-public-toggler {
      border: none;
      padding: 0;
      width: 30px;
      height: 24px;
      position: relative;
  }

  .moa-public-toggler .toggler-icon {
      display: block;
      position: absolute;
      height: 3px;
      width: 100%;
      background: #fff;
      border-radius: 2px;
      transition: all 0.3s ease;
  }

  .top-bar { top: 0; }
  .middle-bar { top: 10px; }
  .bottom-bar { top: 20px; }

  .moa-public-toggler:not(.collapsed) .top-bar {
      transform: rotate(45deg);
      top: 10px;
  }
  .moa-public-toggler:not(.collapsed) .middle-bar {
      opacity: 0;
  }
  .moa-public-toggler:not(.collapsed) .bottom-bar {
      transform: rotate(-45deg);
      top: 10px;
  }

  /* Navbar must be fixed so it can slide out/in */
  .moa-public-nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1030;
      transition: transform 0.25s ease;
  }

  /* Hidden state */
  .moa-public-nav.nav-hide {
      transform: translateY(-100%);
  }

/* ============================================================
   2. ANIMATED HAMBURGER TOGGLE
   ============================================================ */
  .navbar-toggler {
      border: none;
      padding: 0;
      width: 30px;
      height: 24px;
      position: relative;
  }
  .toggler-icon {
      display: block;
      position: absolute;
      height: 3px;
      width: 100%;
      background: #fff;
      border-radius: 2px;
      transition: all 0.3s ease;
  }
  .top-bar { top: 0; }
  .middle-bar { top: 10px; }
  .bottom-bar { top: 20px; }

  .navbar-toggler:not(.collapsed) .top-bar {
      transform: rotate(45deg);
      top: 10px;
  }
  .navbar-toggler:not(.collapsed) .middle-bar {
      opacity: 0;
  }
  .navbar-toggler:not(.collapsed) .bottom-bar {
      transform: rotate(-45deg);
      top: 10px;
  }


/* ============================================================
   3. CONSOLE NAVBAR
   ============================================================ */
  .moa-console-nav {
    background: #fff;
    border-bottom: 1px solid var(--moa-border-light);
    box-shadow: var(--moa-shadow-soft);
    padding: 14px 0;
    position: relative;
    z-index: 100;
  }

  .moa-console-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Brand */
  .moa-console-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
  }

  .moa-console-brand-logo {
    height: 28px;
  }

  .moa-console-brand-name {
    font-weight: 600;
    color: var(--moa-text-primary);
  }

  /* Menu */
  .moa-console-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .moa-console-menu a {
    text-decoration: none;
    color: var(--moa-text-secondary);
    font-weight: 500;
    transition: color .2s var(--moa-ease);
  }

  .moa-console-menu a:hover {
    color: var(--moa-brand-primary);
  }

  .moa-nav-active {
    color: var(--moa-brand-primary) !important;
  }

  /* DROPDOWNS */
  .moa-console-dropdown {
    position: relative;
  }

  .moa-console-dropdown button {
    background: none;
    border: none;
    font: inherit;
    color: var(--moa-text-secondary);
    cursor: pointer;
    font-weight: 500;
    padding: 6px 0;
  }

  /* hover colour */
  .moa-console-dropdown:hover > button {
    color: var(--moa-brand-primary);
  }

  /* KEY FIX: menu sits directly under button, no gap */
  .moa-console-dropdown-menu {
    position: absolute;
    top: calc(100% + 0px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid var(--moa-border-light);
    border-radius: 10px;
    box-shadow: var(--moa-shadow-medium);
    padding: 10px 0;
    display: none;
    z-index: 50;
  }

  /* Keep open while hovering menu */
  .moa-console-dropdown:hover .moa-console-dropdown-menu,
  .moa-console-dropdown-menu:hover {
    display: block;
  }

  .moa-console-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--moa-text-secondary);
    text-decoration: none;
    transition: background .2s ease;
  }

  .moa-console-dropdown-menu a:hover {
    background: var(--moa-bg-section);
    color: var(--moa-brand-primary);
  }

  .moa-console-dropdown-label {
    display: block;
    padding: 6px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--moa-text-muted);
  }

  /* Profile */
  .moa-console-profile-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--moa-text-secondary);
  }

  .moa-console-dropdown-right {
    right: 0;
    left: auto;
  }

  .moa-console-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--moa-border-light);
    font-weight: 600;
  }

  .moa-console-logout {
    color: #d00 !important;
  }

  /* MOBILE TOGGLE */
  .moa-console-toggle {
    display: none;
    border: none;
    background: none;
    width: 32px;
    height: 24px;
    position: relative;
    cursor: pointer;
  }

  .moa-console-toggle span {
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--moa-text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .moa-console-toggle .bar1 { top: 0; }
  .moa-console-toggle .bar2 { top: 10px; }
  .moa-console-toggle .bar3 { top: 20px; }

  .moa-console-toggle.active .bar1 {
    transform: rotate(45deg);
    top: 10px;
  }
  .moa-console-toggle.active .bar2 {
    opacity: 0;
  }
  .moa-console-toggle.active .bar3 {
    transform: rotate(-45deg);
    top: 10px;
  }

  /* Mobile behaviour */
  @media (max-width: 900px) {
    .moa-console-nav-inner {
      gap: 16px;
    }

    .moa-console-menu {
      display: none;
      position: absolute;
      top: 64px;
      right: 16px;
      background: #fff;
      width: 260px;
      padding: 20px;
      flex-direction: column;
      gap: 16px;
      border: 1px solid var(--moa-border-light);
      border-radius: 12px;
      box-shadow: var(--moa-shadow-medium);
    }

    .moa-console-menu.open {
      display: flex;
    }

    .moa-console-toggle {
      display: block;
    }
  }