:root {
  --nav-bg: #f0fdf4;
  --nav-border: #d1fae5;
  --nav-text: #1f2937;
  --nav-hover: #15803d;
  --nav-active: #166534;
  --nav-underline: #22c55e;
}

body.dark {
  --nav-bg: #0f2a1f;
  --nav-border: rgba(255,255,255,0.06);
  --nav-text: #e2e8f0;
  --nav-hover: #4ade80;
  --nav-active: #22c55e;
  --nav-underline: #22c55e;
}
/* ===============================
   NAV BASE
=================================*/
.mui-nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 70px;
  background: var(--accent);
  color: #e6f4ea;
  font-family: Inter, system-ui;
  z-index: 1000;
  transition: transform .3s ease;
}

.mui-nav.hide {
  transform: translateY(-100%);
}

.nav-inner {
  max-width: 950px;
  margin: auto;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-inner img {
  max-width: 50px;
  height: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1em;
}

/* ===============================
   RIGHT SIDE ACTIONS
=================================*/
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ===============================
   MENU
=================================*/
.nav-menu {
  list-style: none;
  display: flex;
  gap: 24px;
  align-items: center;
  margin: 0;
  padding: 0;
}
.nav-menu {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-left: auto;
}

/* Group kanan */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.nav-menu a {
  color: #edf3f0;
  text-decoration: none;
  font-weight: 500;
  font-size: .9em;
  transition: opacity .2s ease;
}

.nav-menu a:hover {
  color:#fff;
}

.nav-actions {
  margin-left: 32px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.25);
}
.nav-actions svg{color:#d1fae5}
.icon-moon,
.icon-sun {
  padding: 8px;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.icon-moon:hover,
.icon-sun:hover {
  background: rgba(255,255,255,0.1);
}

/* ===============================
   DROPDOWN
=================================*/
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chevron {
  transition: transform .25s ease;
}

.dropdown.open .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;

  background: #fff;
  border-radius: 8px;
  padding: 8px 0;
  display: none;
  box-shadow: 0 10px 25px rgba(0,0,0,.15);
  
  min-width: 180px;
  padding: 8px 0;
  border-radius: 10px;
  margin-top: 8px;
  border: 1px solid transparent;
  transition: background .25s ease, border .25s ease;
}

.dropdown-menu li {
  list-style: none;
}

/* LIGHT MODE */
body:not(.dark) .dropdown-menu {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

body:not(.dark) .dropdown-menu a {
  color: #1f2937;
  padding: 8px 14px;
  display: block;
}

body:not(.dark) .dropdown-menu a:hover {
  background: #f0fdf4;
  color: #166534;
}

/* DARK MODE */
body.dark .dropdown-menu {
  background: #123628;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}

body.dark .dropdown-menu a {
  color: #e2e8f0;
  padding: 8px 14px;
  display: block;
}

body.dark .dropdown-menu a:hover {
  background: #174533;
  color: #4ade80;
}

.dropdown-menu {
  display: none;
}

.dropdown.open .dropdown-menu {
  display: block;
}


/* ===============================
   BURGER
=================================*/
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 22px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

.burger span {
  width: 100%;
  height: 2px;
  background: #fff;
  transition: transform .3s ease, opacity .3s ease;
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===============================
   DARK MODE BUTTON
=================================*/
.dark-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-toggle svg {
  width: 24px;
  height: 24px;
}

/* Default icon */
.icon-sun { display: none; }

body.dark .icon-moon { display: none; }
body.dark .icon-sun { display: block; }


/* ===============================
   OVERLAY
=================================*/
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 900;
}

.nav-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===============================
   MOBILE
=================================*/
@media (max-width: 768px) {

  .burger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;

    flex-direction: column;
    align-items: flex-start;

    background: var(--card);
    padding: 0 20px;

    max-height: 0;
    overflow: hidden;

    transition: max-height .35s cubic-bezier(.4,0,.2,1),
                padding .3s ease;
  }

  .nav-menu.open {
    max-height: 400px;
    padding: 20px;
  }

  .nav-menu a {
    color: var(--text);
  }

  .dropdown:hover .dropdown-menu {
    display: none;
  }

  .dropdown.open .dropdown-menu {
    display: block;
    position: static;
    box-shadow: none;
	margin-top: 6px;
  margin-left: 10px;
  border-radius: 8px;
  }
}

/* ===============================
   MOBILE THEME FIX
=================================*/
@media (max-width: 768px) {

  /* LIGHT MODE */
  body:not(.dark) .nav-menu {
    background: #f0fdf4;
    border-bottom: 1px solid #d1fae5;
  }

  body:not(.dark) .nav-menu a {
    color: #1f2937;
  }

  body:not(.dark) .nav-menu a:hover {
    color: #15803d;
  }

  /* DARK MODE */
  body.dark .nav-menu {
    background: #0f2a1f;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  body.dark .nav-menu a {
    color: #e2e8f0;
  }

  body.dark .nav-menu a:hover {
    color: #4ade80;
  }
}

@media (max-width: 768px) {

  .nav-menu {
    margin-left: 0;
  }

}