:root {
  --nav-glass-bg:
    radial-gradient(circle at 14% 18%, rgba(214, 248, 220, 0.52), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(245, 255, 222, 0.38), transparent 24%),
    linear-gradient(145deg, rgba(240, 251, 242, 0.58), rgba(223, 244, 228, 0.46));
  --nav-surface: rgba(255, 255, 255, 0.28);
  --nav-surface-strong: rgba(255, 255, 255, 0.48);
  --nav-border: rgba(255, 255, 255, 0.72);
  --nav-shadow: rgba(28, 66, 42, 0.14);
  --nav-text: #1f4d35;
  --nav-text-soft: #476755;
  --nav-green: #2f8b58;
  --nav-green-strong: #216e45;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 14px 22px;
  border-radius: 0 0 28px 28px;
  border: 1px solid var(--nav-border);
  background: var(--nav-glass-bg);
  box-shadow:
    0 20px 46px var(--nav-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(32px) saturate(180%) brightness(1.04);
  -webkit-backdrop-filter: blur(32px) saturate(180%) brightness(1.04);
  overflow: visible;
}

body {
  padding-top: 92px;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.06));
  pointer-events: none;
}

.navbar-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  box-sizing: border-box;
  gap: 22px;
  width: 100%;
  min-height: 64px;
}

.navbar-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  text-decoration: none;
  font-size: clamp(2rem, 2.4vw, 2.9rem);
  font-weight: 700;
  color: #113b28;
  letter-spacing: -0.04em;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.navbar-logo:hover,
.navbar-logo.hover-scale:hover {
  transform: translateY(-1px);
}

.navbar-logo img,
.navbar-logo .logo {
  width: 50px;
  height: 50px;
  flex: 0 0 52px;
  padding: 0;
  border-radius: 0;
  object-fit: contain;
  background: none;
  border: none;
  box-shadow: none;
  transform: scale(5);
  transform-origin: left center;
  position: relative;
  right: 65px;
  top:5px;
}

.navbar-menu {
  grid-column: 2;
  display: flex;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}

.navbar-links {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.navbar-links > li {
  display: flex;
  align-items: center;
  min-width: 0;
}

/* ── Auth items inside navbar-links (hidden by session.js when logged in) ── */
#user-nav:empty {
  display: none;
}

#user-nav,
#login-nav {
  margin-left: 0 !important;
  min-width: auto !important;
}

.navbar-account-slot {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.navbar-account-slot:empty {
  display: none;
}

.navbar-account-slot .user-nav-inline {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.navbar-roadmap-bell-slot {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-roadmap-shell {
  position: relative;
}

.navbar-roadmap-bell {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(236, 247, 240, 0.5));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 12px 24px rgba(25, 58, 37, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.navbar-roadmap-bell:hover {
  transform: translateY(-1px);
  border-color: rgba(94, 245, 140, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 16px 28px rgba(36, 114, 63, 0.12);
}

.navbar-roadmap-bell-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.navbar-roadmap-badge {
  position: absolute;
  top: -5px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f8b58, #216e45);
  color: #f7fff7;
  font-size: 0.7rem;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(33, 110, 69, 0.18);
}

.navbar-roadmap-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 1400;
  width: min(340px, calc(100vw - 22px));
  box-sizing: border-box;
  padding: 14px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(218, 232, 223, 0.88);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(235, 246, 239, 0.94));
  box-shadow:
    0 26px 54px rgba(28, 55, 38, 0.18),
    0 8px 18px rgba(29, 72, 48, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.navbar-roadmap-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.navbar-roadmap-panel-head h3 {
  margin: 4px 0 0;
  color: var(--nav-text);
  font-size: 0.98rem;
}

.navbar-roadmap-kicker {
  margin: 0;
  color: var(--nav-green-strong);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.navbar-roadmap-panel-state,
.navbar-roadmap-text-btn {
  color: var(--nav-text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.navbar-roadmap-panel-state {
  flex: 0 0 auto;
  max-width: 132px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(220, 235, 225, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar-roadmap-text-btn {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
}

.navbar-roadmap-text-btn:hover {
  color: var(--nav-green-strong);
}

.navbar-roadmap-list {
  display: grid;
  gap: 10px;
  min-height: 280px;
  max-height: min(64vh, 520px);
  margin: 14px 0 0;
  padding: 2px 2px 8px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.navbar-roadmap-list::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.navbar-roadmap-item {
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(218, 234, 223, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 252, 248, 0.76)),
    #f8fcf9;
  font: inherit;
  text-align: left;
  cursor: default;
  box-shadow:
    0 12px 24px rgba(35, 72, 48, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.navbar-roadmap-item:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(238, 248, 241, 0.86)),
    #eef7f1;
  border-color: rgba(165, 211, 180, 0.94);
  box-shadow:
    0 16px 28px rgba(35, 72, 48, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.navbar-roadmap-item.is-unread {
  background:
    radial-gradient(circle at 12% 0%, rgba(237, 255, 243, 0.98), transparent 38%),
    linear-gradient(180deg, rgba(242, 251, 245, 0.96), rgba(226, 244, 232, 0.92));
  border-color: rgba(136, 201, 160, 0.78);
}

.navbar-roadmap-item-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.navbar-roadmap-item-copy strong,
.navbar-roadmap-item-copy p {
  margin: 0;
}

.navbar-roadmap-item-copy strong {
  color: var(--nav-text);
  font-size: 0.85rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.navbar-roadmap-item-copy p {
  color: var(--nav-text-soft);
  line-height: 1.35;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.navbar-roadmap-item-kicker {
  color: var(--nav-green-strong) !important;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.navbar-roadmap-item-meta {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--nav-text-soft);
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar-roadmap-item-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.navbar-roadmap-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.navbar-roadmap-open,
.navbar-roadmap-dismiss {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.navbar-roadmap-open {
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(219, 233, 224, 0.88);
  color: #41634d;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.navbar-roadmap-dismiss {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #77897d;
  font-size: 0.95rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.navbar-roadmap-open:hover,
.navbar-roadmap-dismiss:hover {
  background: rgba(233, 245, 236, 0.98);
  color: var(--nav-green-strong);
}

.navbar-roadmap-empty {
  min-height: 220px;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  padding: 22px 16px;
  border-radius: 18px;
  background: rgba(248, 252, 249, 0.78);
  border: 1px dashed rgba(183, 220, 194, 0.86);
  color: var(--nav-text-soft);
  line-height: 1.55;
  text-align: center;
}

.navbar-links .nav-link,
.navbar-account-slot .nav-link,
.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(238, 248, 241, 0.34));
  color: var(--nav-text);
  text-decoration: none;
  font-size: 0.97rem;
  font-weight: 700;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 10px 24px rgba(25, 58, 37, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.navbar-links .nav-link:hover,
.navbar-links .nav-link.hover-scale:hover,
.navbar-account-slot .nav-link:hover,
.navbar-account-slot .nav-link.hover-scale:hover,
.logout-btn:hover {
  transform: translateY(-1px);
  color: #173d2b;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(232, 247, 237, 0.52));
  border-color: rgba(94, 245, 140, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 16px 28px rgba(36, 114, 63, 0.12);
}

.user-nav .nav-link,
.navbar-account-slot .nav-link {
  max-width: min(380px, 38vw);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-inline: 16px;
  font-size: 0.94rem;
  color: var(--nav-text-soft);
}

.logout-btn {
  cursor: pointer;
  min-height: 46px;
  padding-inline: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 24px rgba(176, 44, 44, 0.12);
}

.logout-btn.logout-btn-icon {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 90px;
}

.logout-btn-image {
  display: block;
  width: 35px;
  height: 35px;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.45));
}

.logout-btn:hover {
  color: #a50101;
  background:
    linear-gradient(180deg, rgba(255, 249, 249, 0.98), rgba(255, 210, 210, 0.92));
  border-color: rgba(179, 0, 0, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 14px 28px rgba(176, 44, 44, 0.18);
}

.logout-btn:focus-visible {
  outline: none;
  border-color: rgba(208, 67, 67, 0.74);
  box-shadow:
    0 0 0 4px rgba(219, 84, 84, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 14px 28px rgba(176, 44, 44, 0.16);
}

.dropdown {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: -12px;
}

.dropdown::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: max(100%, 240px);
  height: 16px;
}

.dropdown-menu {
  display: grid;
  gap: 8px;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 240px;
  margin: 0;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f2f8f3);
  border: 1px solid rgba(223, 234, 226, 0.96);
  box-shadow:
    0 22px 38px rgba(24, 55, 35, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease,
    transform 0.22s ease;
  z-index: 1300;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--nav-text);
  font-weight: 700;
  background: #f8fcf9;
  border: 1px solid rgba(223, 234, 226, 0.94);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.dropdown-link::after {
  content: "";
}

.dropdown-link:hover {
  transform: translateX(2px);
  color: var(--nav-green-strong);
  background: #e7f4ea;
  border-color: rgba(184, 223, 196, 0.96);
}

.dropdown-link.is-disabled {
  opacity: 0.56;
  color: rgba(31, 77, 53, 0.64);
  background: #eef3ef;
  border-color: rgba(210, 223, 214, 0.92);
  cursor: not-allowed;
}

.dropdown-link.is-disabled:hover {
  transform: none;
  color: rgba(31, 77, 53, 0.64);
  background: #eef3ef;
  border-color: rgba(210, 223, 214, 0.92);
}

.dropdown-context-note {
  list-style: none;
  padding: 10px 12px 2px;
  color: var(--nav-text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.navbar-category-toast {
  position: fixed;
  top: 100px;
  left: 50%;
  z-index: 1600;
  width: min(460px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(236, 248, 240, 0.82));
  box-shadow:
    0 18px 34px rgba(24, 55, 35, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--nav-text);
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.45;
  opacity: 0;
  transform: translate(-50%, -8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.navbar-category-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.navbar-toggle {
  display: none !important;
}

@media (max-width: 1220px) {
  .navbar {
    width: 100%;
    padding: 14px 18px;
  }

  .navbar-container {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .navbar-menu {
    grid-column: 2;
    width: 100%;
  }

  .navbar-links {
    justify-content: center;
  }

  .user-nav .nav-link,
  .navbar-account-slot .nav-link {
    max-width: none;
  }
}

@media (max-width: 760px) {
  body {
    padding-top: 72px;
  }

  .navbar {
    top: 0;
    width: 100%;
    margin-top: 0;
    padding: 12px;
    border-radius: 0 0 22px 22px;
  }

  .navbar-container {
    gap: 14px;
    grid-template-columns: 1fr;
  }

  .navbar-menu,
  .navbar-account-slot {
    grid-column: 1;
  }

  .navbar-logo {
    font-size: 2rem;
  }

  .navbar-logo img,
  .navbar-logo .logo {
    width: 54px;
    height: 54px;
    flex-basis: 54px;
    border-radius: 16px;
  }

  .navbar-links {
    gap: 8px;
    justify-content: center;
  }

  .navbar-links .nav-link,
  .navbar-account-slot .nav-link,
  .logout-btn {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.9rem;
  }

  .navbar-links > li,
  .user-nav,
  .navbar-account-slot,
  .navbar-account-slot .user-nav-inline {
    width: 100%;
    justify-content: center;
  }

  .user-nav .nav-link,
  .navbar-account-slot .nav-link,
  .logout-btn {
    max-width: none;
  }

  .logout-btn.logout-btn-icon {
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
  }

  .navbar-roadmap-panel {
    right: 50%;
    transform: translateX(50%);
    width: min(360px, calc(100vw - 20px));
  }

  .dropdown-menu {
    position: static;
    min-width: 0;
    width: 100%;
    margin-top: 8px;
    transform: none;
  }

  .dropdown {
    padding-bottom: 0;
    margin-bottom: 0;
  }

  .dropdown::after {
    display: none;
  }
}

html[data-travel-ai-visibility="hidden"] .navbar-links li:has(> a[href="tr-aivel.html"]),
html[data-travel-ai-visibility="hidden"] .navbar-links li:has(> a[href="../tr-aivel.html"]) {
  display: none !important;
}

html[data-travel-ai-visibility="hidden"] .navbar-links a[href="tr-aivel.html"],
html[data-travel-ai-visibility="hidden"] .navbar-links a[href="../tr-aivel.html"] {
  display: none !important;
}
