/* =========================
   Navbar
========================= */

.navbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

/* ขยายพื้นที่ให้สมดุลขึ้น */
.nav-inner{
  max-width: 1400px;          /* ⭐ เดิมแคบไป */
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ===== Brand ===== */

.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 550;
  color: #104b34;
  white-space: nowrap;        /* ⭐ กันแตกบรรทัด */
}

.brand-dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--green-2), var(--green));
  box-shadow: 0 6px 14px rgba(31,138,91,.25);
  flex-shrink: 0;
}

/* ===== Links ===== */

.nav-links{
  display: flex;
  align-items: center;
  gap: 6px;                   /* ⭐ ลดความอึดอัด */
  flex-wrap: nowrap;          /* ⭐ ไม่ให้แตกแถว */
}

.nav-link{
  padding: 6px 10px;
  border-radius: 10px;
  color: #124735;
  font-weight: 550;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link:hover{
  background: #f3fbf6;
}

/* ===== Right Side ===== */

.nav-right{
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.user-pill{
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

/* กันเส้นใต้ทั้งหมด */
.navbar a,
.navbar a:visited,
.navbar a:hover,
.navbar a:active{
  text-decoration: none;
}

/* =========================
   Responsive Navbar
========================= */

@media (max-width: 768px){

  .nav-inner{
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .nav-links{
    flex-wrap: wrap;          /* ⭐ มือถือให้แตกได้ */
    gap: 4px;
  }

  .nav-link{
    font-size: 13px;
    padding: 5px 8px;
  }

  .nav-right{
    width: 100%;
    justify-content: space-between;
  }
}
