/* ── NAV AUTH AREA ─────────────────────────────────────────── */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 16px;
}

.nav-auth-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.91rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.22s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  line-height: 1;
}

.nav-login-btn {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.42);
}
.nav-login-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}
.header.scrolled .nav-login-btn {
  color: var(--primary);
  border-color: rgba(22,59,47,0.28);
}
.header.scrolled .nav-login-btn:hover {
  background: rgba(22,59,47,0.07);
}

.nav-signup-btn {
  background: var(--gradient-main);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(45,106,79,0.28);
}
.nav-signup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(45,106,79,0.38);
}

/* ── NAV USER DROPDOWN ─────────────────────────────────────── */
.nav-user-wrap { position: relative; }

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  padding: 5px 14px 5px 5px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.91rem;
  font-weight: 700;
  color: var(--white);
  transition: all 0.22s ease;
}
.header.scrolled .nav-user-btn {
  background: rgba(22,59,47,0.07);
  border-color: rgba(22,59,47,0.16);
  color: var(--primary);
}
.nav-user-btn:hover { background: rgba(255,255,255,0.2); }
.header.scrolled .nav-user-btn:hover { background: rgba(22,59,47,0.12); }

.nav-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gradient-main);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  flex-shrink: 0;
  overflow: hidden;
}
.nav-user-avatar img { width:100%; height:100%; border-radius:50%; object-fit:cover; }

.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 215px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.22s ease;
  z-index: 9999;
}
.nav-user-wrap.open .nav-user-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}
.nav-user-dropdown-head {
  padding: 10px 12px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.nav-user-dropdown-head strong { display:block; color:var(--primary); font-size:0.95rem; }
.nav-user-dropdown-head span   { color:var(--muted); font-size:0.83rem; }

.nav-dropdown-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.16s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-family: inherit;
  text-align: left;
}
.nav-dropdown-link:hover       { background: #f0faf3; color: var(--primary); }
.nav-dropdown-link i           { width:18px; text-align:center; color:var(--secondary); }
.nav-dropdown-divider          { height:1px; background:var(--border); margin:6px 0; }
.nav-dropdown-link.logout-link { color:#b4232f; }
.nav-dropdown-link.logout-link i { color:#b4232f; }
.nav-dropdown-link.logout-link:hover { background:#fff5f5; }

/* ── AUTH MODAL OVERLAY ────────────────────────────────────── */
.auth-overlay {
  position: fixed; inset:0; z-index:99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.auth-overlay.active { opacity:1; pointer-events:all; }

.auth-backdrop {
  position: absolute; inset:0;
  background: rgba(11,34,27,0.7);
  backdrop-filter: blur(5px);
}

.auth-modal {
  position: relative; z-index:1;
  width: 100%; max-width: 480px;
  background: #fff;
  border-radius: 30px;
  padding: 36px 34px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.22);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.auth-overlay.active .auth-modal { transform: translateY(0) scale(1); }

.auth-modal-close {
  position:absolute; top:16px; right:16px;
  width:36px; height:36px;
  border-radius:50%; border:none;
  background:#f2f6f3; color:var(--primary);
  font-size:0.95rem; cursor:pointer;
  display:grid; place-items:center;
  transition:background 0.18s;
}
.auth-modal-close:hover { background:#e0f0e5; }

.auth-modal-logo { text-align:center; margin-bottom:18px; }
.auth-modal-logo .logo-text {
  font-size:1.5rem; font-weight:800;
  color:var(--primary); letter-spacing:-0.5px;
}
.auth-modal-logo .logo-text span { color:var(--secondary); }

.auth-modal-title { text-align:center; margin-bottom:22px; }
.auth-modal-title h2 { color:var(--primary); font-size:1.65rem; margin-bottom:5px; }
.auth-modal-title p  { color:var(--muted); font-size:0.94rem; }

/* Form */
.auth-form { display:flex; flex-direction:column; gap:14px; }

.auth-field { display:flex; flex-direction:column; gap:7px; }
.auth-field label { color:var(--primary); font-weight:600; font-size:0.91rem; }

.auth-field.has-icon { position:relative; }
.auth-field.has-icon input { padding-left:42px; }
.auth-field-icon {
  position:absolute; left:14px; top:50%;
  transform:translateY(-50%);
  color:var(--secondary); font-size:0.9rem;
  pointer-events:none;
}
/* fix for label above input */
.auth-field.has-icon .auth-field-icon { top:auto; bottom:15px; }

.auth-field input {
  height:50px;
  border:1.5px solid rgba(22,59,47,0.12);
  border-radius:14px;
  padding:0 16px;
  font-family:inherit; font-size:0.95rem; color:var(--text);
  outline:none; transition:all 0.2s ease;
  background:#fafcfb;
}
.auth-field input:focus {
  border-color:#52b788;
  box-shadow:0 0 0 4px rgba(116,198,157,0.14);
  background:#fff;
}

.auth-field-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }

.auth-submit-btn {
  width:100%; height:50px;
  border-radius:14px;
  background:var(--gradient-main);
  color:#fff; border:none;
  font-family:inherit; font-size:0.98rem; font-weight:700;
  cursor:pointer;
  transition:all 0.22s ease;
  box-shadow:0 6px 20px rgba(45,106,79,0.28);
  margin-top:4px;
  display:flex; align-items:center; justify-content:center; gap:10px;
}
.auth-submit-btn:hover   { transform:translateY(-2px); box-shadow:0 10px 28px rgba(45,106,79,0.36); }
.auth-submit-btn:disabled{ opacity:0.65; cursor:not-allowed; transform:none; }

.auth-switch {
  text-align:center; color:var(--muted);
  font-size:0.92rem; margin-top:6px;
}
.auth-switch button {
  color:var(--secondary); font-weight:700;
  cursor:pointer; background:none; border:none;
  font-family:inherit; font-size:inherit;
  text-decoration:underline; padding:0;
}

.auth-message {
  padding:11px 14px; border-radius:12px;
  font-size:0.91rem; font-weight:600; display:none;
}
.auth-message.error   { background:#fff5f5; color:#b4232f; border:1px solid rgba(180,35,47,0.14); display:block; }
.auth-message.success { background:#f0faf3; color:#2d6a4f; border:1px solid rgba(45,106,79,0.14); display:block; }

.auth-forgot { text-align:right; margin-top:-6px; }
.auth-forgot button {
  background:none; border:none; color:var(--secondary);
  font-size:0.87rem; font-weight:600; cursor:pointer; font-family:inherit;
}

/* ── PROFILE PAGE HERO ─────────────────────────────────────── */
.profile-hero {
  min-height: 36vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 130px 0 0;
  background:
    linear-gradient(135deg, rgba(11,34,27,0.92), rgba(45,106,79,0.80)),
    url('../assets/hero.jpg');
  background-size:cover; background-position:center;
}
.profile-hero-inner { width:100%; position:relative; z-index:2; }

.profile-hero-card {
  display:flex; align-items:flex-end; gap:22px;
  padding:26px 40px;
  background:rgba(255,255,255,0.09);
  backdrop-filter:blur(12px);
  border-top:1px solid rgba(255,255,255,0.12);
  flex-wrap:wrap;
}

.profile-avatar-wrap { position:relative; flex-shrink:0; }
.profile-avatar-large {
  width:96px; height:96px; border-radius:50%;
  background:var(--gradient-main); color:#fff;
  font-size:2rem; font-weight:800;
  display:grid; place-items:center;
  border:4px solid rgba(255,255,255,0.28);
  overflow:hidden;
}
.profile-avatar-large img { width:100%; height:100%; object-fit:cover; }

.profile-hero-info { flex:1; }
.profile-hero-info h1 { color:var(--white); font-size:1.9rem; margin-bottom:4px; }
.profile-hero-info p  { color:rgba(255,255,255,0.76); }

.profile-hero-actions {
  margin-left:auto; display:flex; gap:12px;
  flex-wrap:wrap; align-items:center;
}

/* ── PROFILE BODY ──────────────────────────────────────────── */
.profile-body {
  background:linear-gradient(to bottom,#f5fbf6,#edf7ef);
  padding:36px 0 80px;
}

.profile-layout {
  display:grid;
  grid-template-columns:280px 1fr;
  gap:26px;
  align-items:start;
}

/* Sidebar */
.profile-sidebar { display:flex; flex-direction:column; gap:16px; }

.profile-sidebar-card {
  background:#fff; border:1px solid var(--border);
  border-radius:22px; padding:22px;
  box-shadow:var(--shadow-sm);
}
.profile-sidebar-card h3 {
  color:var(--primary); font-size:1rem;
  margin-bottom:14px;
  display:flex; align-items:center; gap:9px;
}

.profile-stat-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.profile-stat {
  background:linear-gradient(180deg,#f6fbf7,#eef8f0);
  border:1px solid rgba(22,59,47,0.08);
  border-radius:14px; padding:14px; text-align:center;
}
.profile-stat strong { display:block; font-size:1.55rem; color:var(--primary); font-weight:800; }
.profile-stat span   { color:var(--muted); font-size:0.82rem; }

.profile-nav-link {
  display:flex; align-items:center; gap:11px;
  padding:11px 13px; border-radius:13px;
  color:var(--text); font-size:0.93rem; font-weight:600;
  cursor:pointer; border:none; background:none;
  width:100%; font-family:inherit;
  transition:all 0.18s; text-align:left; text-decoration:none;
}
.profile-nav-link:hover, .profile-nav-link.active {
  background:#f0faf3; color:var(--primary);
}
.profile-nav-link i { width:18px; color:var(--secondary); text-align:center; }

/* Content panels */
.profile-content { display:flex; flex-direction:column; gap:22px; }

.profile-panel {
  background:#fff; border:1px solid var(--border);
  border-radius:24px; padding:26px;
  box-shadow:var(--shadow-sm); display:none;
}
.profile-panel.active { display:block; }

.profile-panel-head {
  margin-bottom:22px; padding-bottom:16px;
  border-bottom:1px solid var(--border);
  display:flex; justify-content:space-between;
  align-items:flex-start; flex-wrap:wrap; gap:12px;
}
.profile-panel-head h2  { color:var(--primary); font-size:1.4rem; margin-bottom:4px; }
.profile-panel-head p   { color:var(--muted); font-size:0.92rem; }

/* Edit form */
.profile-form-grid {
  display:grid; grid-template-columns:1fr 1fr;
  gap:16px; margin-bottom:16px;
}
.profile-field { display:flex; flex-direction:column; gap:7px; }
.profile-field.full-width { grid-column:1/-1; }
.profile-field label { color:var(--primary); font-weight:600; font-size:0.91rem; }
.profile-field input,
.profile-field select,
.profile-field textarea {
  border:1.5px solid rgba(22,59,47,0.11);
  border-radius:13px; padding:12px 15px;
  font-family:inherit; font-size:0.95rem; color:var(--text);
  outline:none; transition:all 0.2s; background:#fafcfb;
}
.profile-field input:focus,
.profile-field select:focus,
.profile-field textarea:focus {
  border-color:#52b788;
  box-shadow:0 0 0 4px rgba(116,198,157,0.14);
  background:#fff;
}

/* Saved itineraries */
.saved-itinerary-list { display:grid; gap:16px; }

.saved-itinerary-card {
  background:linear-gradient(135deg,#f6fbf7,#eef8f0);
  border:1px solid rgba(22,59,47,0.09);
  border-radius:20px; padding:20px;
  display:flex; align-items:flex-start; gap:16px;
  transition:var(--transition);
}
.saved-itinerary-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); }

.saved-itinerary-icon {
  width:50px; height:50px; min-width:50px;
  border-radius:14px;
  background:var(--gradient-main); color:#fff;
  display:grid; place-items:center;
  font-size:1.3rem;
}

.saved-itinerary-info { flex:1; }
.saved-itinerary-info h4 { color:var(--primary); margin-bottom:5px; font-size:1.05rem; }
.saved-itinerary-info span { color:var(--muted); font-size:0.87rem; }

.saved-itinerary-badge {
  display:inline-flex; align-items:center; gap:6px;
  background:rgba(64,145,108,0.12); color:var(--secondary);
  border-radius:999px; padding:5px 11px;
  font-size:0.82rem; font-weight:700;
  margin-top:8px;
}

.saved-itinerary-actions { display:flex; gap:8px; align-items:center; flex-shrink:0; }

.itin-delete-btn {
  width:36px; height:36px; border-radius:10px;
  border:none; background:#fff5f5; color:#b4232f;
  cursor:pointer; display:grid; place-items:center;
  font-size:0.88rem; transition:background 0.18s;
}
.itin-delete-btn:hover { background:#fde8e8; }

/* User reviews list */
.user-review-card {
  background:#f8fcf9; border:1px solid rgba(22,59,47,0.08);
  border-radius:18px; padding:18px;
  margin-bottom:14px;
}
.user-review-card h4 { color:var(--primary); margin-bottom:5px; }
.user-review-card .review-meta { color:var(--muted); font-size:0.87rem; margin-bottom:8px; }
.user-review-card .review-stars { color:#f4a261; margin-bottom:6px; }
.user-review-card p { color:var(--text); font-size:0.94rem; }

/* Empty states */
.profile-empty-state {
  text-align:center; padding:50px 20px;
  color:var(--muted);
}
.profile-empty-state i {
  font-size:2.5rem; color:#c8e6d0;
  display:block; margin-bottom:14px;
}

/* Success / error message in profile forms */
.profile-form-message {
  padding:11px 14px; border-radius:12px;
  font-size:0.91rem; font-weight:600;
  display:none; margin-top:8px;
}
.profile-form-message.success { background:#f0faf3; color:#2d6a4f; border:1px solid rgba(45,106,79,0.14); display:block; }
.profile-form-message.error   { background:#fff5f5; color:#b4232f; border:1px solid rgba(180,35,47,0.14); display:block; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .profile-layout { grid-template-columns:1fr; }
  .profile-sidebar { flex-direction:row; flex-wrap:wrap; }
  .profile-sidebar-card { flex:1; min-width:200px; }
}

@media (max-width: 600px) {
  .auth-modal { padding:26px 20px; }
  .auth-field-row { grid-template-columns:1fr; }
  .profile-hero-card { padding:20px; }
  .profile-hero-info h1 { font-size:1.5rem; }
  .profile-form-grid { grid-template-columns:1fr; }
  .nav-auth { margin-left:8px; }
  .nav-signup-btn span { display:none; }
}
