/* =====================
   NAVBAR
===================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}

/* ---- Logo ---- */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 36px;
  width: 36px;
  object-fit: contain;
}

.nav-logo-text {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.3px;
}

.nav-logo-text span {
  color: var(--green-dark);
}

/* ---- Desktop links ---- */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--green-pale);
  color: var(--green-darker);
}

/* ---- Desktop actions ---- */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ---- Hamburger ---- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1.5px solid var(--border-2);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px 10px;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.hamburger:hover {
  border-color: var(--green);
  background: var(--green-pale);
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}

/* Animated X when open */
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile menu ---- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 2px solid var(--border);
  z-index: 998;
  box-shadow: 0 8px 32px rgba(10,31,18,0.12);
  overflow: hidden;
}

.mobile-menu.open {
  display: block;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-menu-links {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
  background: var(--green-pale);
  color: var(--green-darker);
  border-left-color: var(--green);
}

.mobile-menu-links a .link-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.mobile-menu-btns {
  display: flex;
  gap: 10px;
  padding: 16px 24px;
}

.mobile-menu-btns .btn {
  flex: 1;
  justify-content: center;
}

/* ---- Responsive breakpoint ---- */
@media (max-width: 900px) {
  .nav-links,
  .nav-actions {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

/* =====================
   AUTH STATE — User Avatar & Dropdown
===================== */
.nav-user-wrap {
  position: relative;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--green-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.nav-avatar:hover {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 3px rgba(46,204,113,0.15);
}

.nav-avatar span {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Dropdown menu */
.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  min-width: 210px;
  z-index: 999;
  overflow: hidden;
  animation: dropIn 0.15s ease;
}

.nav-dropdown.open { display: block; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown-user {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.nav-dropdown-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 2px;
}

.nav-dropdown-email {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
}

.nav-dropdown-item:hover {
  background: var(--bg);
  color: var(--text);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.nav-dropdown-logout {
  color: #dc2626;
}

.nav-dropdown-logout:hover {
  background: #fef2f2;
  color: #b91c1c;
}

/* =====================
   GUEST LIMIT MODAL
===================== */
.glm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 31, 18, 0.65);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.glm-box {
  background: var(--white);
  border-radius: 24px;
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.glm-icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

.glm-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.glm-desc {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.glm-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.glm-btn-full {
  width: 100%;
  justify-content: center;
}

.glm-close {
  background: none;
  border: none;
  font-size: 13px;
  color: var(--text-3);
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: underline;
  padding: 4px;
  transition: color 0.15s;
}

.glm-close:hover { color: var(--text); }

@media (max-width: 480px) {
  .glm-box { padding: 28px 20px; }
  .glm-title { font-size: 19px; }
}
/* =====================
   MOBILE APP BANNER
===================== */
.app-banner {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1.5px solid var(--border);
  z-index: 2000;
  box-shadow: 0 -4px 20px rgba(10,31,18,0.1);
  animation: slideUpBanner 0.3s ease;
}

@keyframes slideUpBanner {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.app-banner-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  max-width: 480px;
  margin: 0 auto;
}

.app-banner-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-3);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
}

.app-banner-icon img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.app-banner-text {
  flex: 1;
  min-width: 0;
}

.app-banner-title {
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-banner-subtitle {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

.app-banner-btn {
  background: var(--green);
  color: white;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.app-banner-btn:hover {
  background: var(--green-dark);
}

/* Only show on mobile */
@media (max-width: 768px) {
  .app-banner { display: block; }
}