/* ============================================================
   TRIPGENIE — Premium Design System v2
   Futuristic · Clean · Professional
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand */
  --teal:          #063937;
  --teal-mid:      #0a4a47;
  --blue:          #068cdf;
  --blue-dim:      rgba(6,140,223,0.12);
  --blue-glow:     rgba(6,140,223,0.25);

  /* Light surfaces */
  --bg:            #f5f7fa;
  --surface:       #ffffff;
  --surface-2:     #f8fafc;
  --border:        rgba(0,0,0,0.07);
  --border-strong: rgba(0,0,0,0.12);

  /* Text */
  --text-1:        #0a0f1e;
  --text-2:        #3d4a5c;
  --text-3:        #7c8fa6;

  /* Functional */
  --primary:       #068cdf;
  --primary-dark:  #0578c4;
  --dark:          #0a0f1e;
  --mid:           #3d4a5c;
  --text-muted:    #7c8fa6;
  --light-blue:    #8ec0e0;

  /* Layout */
  --sidebar-w:     244px;
  --topbar-h:      58px;
  --radius:        14px;
  --radius-sm:     9px;
  --radius-lg:     20px;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:     0 12px 40px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-blue:   0 4px 24px rgba(6,140,223,0.2);
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  font-size: 14.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  color: var(--text-1);
  letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ── LAYOUT ─────────────────────────────────────────────── */
.app { display: flex; min-height: 100vh; }

/* ── SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--teal);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  border-right: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo { display: flex; align-items: center; gap: 10px; }

.logo-text {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: white;
  letter-spacing: -0.01em;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  font-size: 18px;
  color: rgba(255,255,255,0.6);
  padding: 4px 8px;
}

.nav {
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  font-size: 13.5px;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}

.nav-link svg { flex-shrink: 0; transition: stroke 0.15s; }

.nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.9);
}

.nav-link.active {
  background: rgba(255,255,255,0.12);
  color: white;
  font-weight: 600;
}

.nav-link.active svg { stroke: white; }

.nav-link.nav-logout {
  color: rgba(255,100,100,0.7) !important;
  margin-top: auto;
}
.nav-link.nav-logout:hover {
  background: rgba(239,68,68,0.15) !important;
  color: #ff8080 !important;
}

/* ── OVERLAY ─────────────────────────────────────────────── */
.overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:90; backdrop-filter:blur(2px); }
.overlay.show { display: block; }

/* ── MAIN ────────────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-2);
  transition: background 0.15s;
}
.menu-btn:hover { background: var(--surface-2); }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  box-shadow: 0 0 0 2px white, 0 0 0 3px rgba(6,140,223,0.3);
  transition: box-shadow 0.2s;
  overflow: hidden;
}
.avatar:hover { box-shadow: 0 0 0 2px white, 0 0 0 4px rgba(6,140,223,0.5); }

/* ── PAGES ───────────────────────────────────────────────── */
.pages { flex: 1; }
.page { display: none; }
.page.active { display: block; }

.page-content {
  padding: 32px 40px 56px;
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
}

.page-content.narrow { max-width: 720px; margin: 0 auto; }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-header h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 3px;
  letter-spacing: -0.03em;
}
.page-header p { color: var(--text-3); font-size: 14px; }

.flex-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── SECTION ─────────────────────────────────────────────── */
.section { margin-bottom: 32px; }
.card.section { margin-bottom: 20px; }
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.view-all { color: var(--blue); font-size: 13px; font-weight: 600; }
.view-all:hover { opacity: 0.8; }

/* ── STATS ───────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--blue-dim);
}

.stat-label { font-size: 12px; color: var(--text-3); margin-bottom: 2px; font-weight: 500; }
.stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.02em;
}
.stat-value.green { color: #16a34a; }

/* ── QUICK ACTIONS ───────────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  color: white;
  transition: all 0.2s;
  border: none;
  letter-spacing: -0.01em;
}
.action-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.action-blue  { background: linear-gradient(135deg, #068cdf, #0578c4); box-shadow: 0 4px 16px rgba(6,140,223,0.25); }
.action-green { background: linear-gradient(135deg, #063937, #0a5c58); box-shadow: 0 4px 16px rgba(6,57,55,0.25); }
.action-light { background: linear-gradient(135deg, #5ba8d4, #068cdf); box-shadow: 0 4px 16px rgba(91,168,212,0.25); }

/* ── TRIP CARDS ──────────────────────────────────────────── */
.trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  padding: 4px 2px;
}

.trip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-sm);
}
.trip-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: rgba(6,140,223,0.2);
}

.past-card { opacity: 0.8; }
.past-card:hover { opacity: 1; }

.trip-img {
  height: 185px;
  overflow: hidden;
  position: relative;
}
.trip-img img { width:100%; height:100%; object-fit:cover; display:block; transition: transform 0.3s; }
.trip-card:hover .trip-img img { transform: scale(1.03); }

.trip-body { padding: 18px 20px 20px; }
.trip-body h3 { font-size: 17px; margin-bottom: 5px; font-weight: 700; letter-spacing: -0.02em; }
.trip-dates { font-size: 13px; color: var(--text-3); margin-bottom: 14px; }

.progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 5px;
  color: var(--text-3);
}
.progress-row span:last-child { font-weight: 700; color: var(--text-1); }

.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(0,0,0,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), #0ab5f5);
  border-radius: 99px;
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}
.progress-fill::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: progressShine 2s infinite;
}
@keyframes progressShine { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }

.progress-bar.flex1 { flex: 1; margin-bottom: 0; }

.trip-budget {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-3);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-bottom: 14px;
}
.trip-budget span:last-child { font-weight: 600; color: var(--text-1); }

.more-btn {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(4px);
  border: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.more-btn:hover { background: white; box-shadow: var(--shadow-md); }

.completed-badge {
  position: absolute; top: 10px; right: 10px;
  background: #22c55e; color: white;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--blue), #0578c4);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13.5px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(6,140,223,0.2);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(6,140,223,0.3); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; filter: none; }
.btn-primary.full-width { width: 100%; justify-content: center; }
.btn-primary.large-btn { padding: 13px 20px; font-size: 15px; }
.btn-primary.small-btn { padding: 6px 13px; font-size: 12.5px; box-shadow: none; }

.btn-outline {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border-strong);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 13.5px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-outline:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }
.btn-outline.full-width { width: 100%; justify-content: center; }
.btn-outline.small-btn { padding: 6px 13px; font-size: 12.5px; }
.btn-outline.large-btn { padding: 13px 20px; font-size: 15px; }

.btn-green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white; border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 13.5px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(34,197,94,0.2);
}
.btn-green:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-green.small-btn { padding: 6px 13px; font-size: 12.5px; box-shadow: none; }

.btn-white {
  background: white; color: var(--blue);
  border: none; padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 13.5px;
  transition: all 0.15s;
}
.btn-white:hover { background: #f0f7ff; }

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.btn-row.centered { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }

/* ── CARD ────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-header h2 { font-size: 15.5px; font-weight: 700; letter-spacing: -0.01em; }

/* ── FORM ────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group > label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.sub-label { display:block; font-size:12px; color:var(--text-3); margin-bottom:6px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

input[type=text], input[type=date], input[type=number], input[type=email], input[type=password], select, textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-1);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(6,140,223,0.1);
}

label { font-size: 13px; font-weight: 600; color: var(--text-2); }

.interests-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:8px; }

.interest-btn, .pace-btn {
  padding: 9px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.15s;
}
.interest-btn:hover, .pace-btn:hover { border-color: var(--blue); color: var(--blue); }
.interest-btn.active, .pace-btn.active {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue), #0578c4);
  color: white;
  box-shadow: 0 2px 8px rgba(6,140,223,0.25);
}

.pace-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; }

.generating-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}
.generating-icon { font-size: 40px; margin-bottom: 14px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.generating-card h3 { font-size: 16px; margin-bottom: 6px; }
.generating-card p { color: var(--text-3); font-size: 13px; }

/* ── BUDGET ──────────────────────────────────────────────── */
.three-col { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.budget-list { display:flex; flex-direction:column; gap:16px; }
.budget-item { padding-bottom:16px; border-bottom:1px solid var(--border); }
.budget-item:last-child { border-bottom:none; padding-bottom:0; }
.budget-item-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.budget-label { display:flex; align-items:center; gap:9px; font-weight:600; font-size:13.5px; }
.dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.budget-meta { display:flex; align-items:center; gap:9px; font-size:12.5px; color:var(--text-3); }
.edit-btn { background:none; border:none; font-size:13px; padding:4px; border-radius:6px; transition:background 0.15s; }
.edit-btn:hover { background: var(--surface-2); }
.budget-progress-row { display:flex; align-items:center; gap:10px; }
.pct { font-size:12px; font-weight:700; color:var(--text-1); min-width:32px; text-align:right; }
.expense-list { display:flex; flex-direction:column; gap:8px; }
.expense-item {
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.expense-item:hover { background: #f0f7ff; border-color: rgba(6,140,223,0.2); }
.expense-item h4 { font-size:13.5px; margin-bottom:2px; font-weight:600; }
.expense-item p { font-size:12px; color:var(--text-3); }
.expense-amount { font-weight:700; font-size:14px; color:var(--text-1); }

/* ── CHECKLISTS ──────────────────────────────────────────── */
.checklists-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:16px; }
.checklist-card { padding:18px; }
.checklist-header { display:flex; align-items:center; gap:12px; margin-bottom:12px; }
.checklist-icon {
  font-size:24px; width:44px; height:44px;
  background: var(--blue-dim);
  border-radius:10px;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.checklist-header h2 { font-size:15px; margin-bottom:2px; font-weight:700; }
.checklist-header p { font-size:12.5px; color:var(--text-3); }
.checklist-items { display:flex; flex-direction:column; gap:2px; }
.check-item {
  display:flex; align-items:flex-start; gap:9px;
  padding:8px 10px;
  border-radius: var(--radius-sm);
  cursor:pointer; transition:background 0.12s;
  font-size:13.5px;
}
.check-item:hover { background: var(--surface-2); }
.check-item input[type=checkbox] { width:16px; height:16px; margin-top:2px; accent-color:var(--blue); cursor:pointer; flex-shrink:0; }
.check-item span { color:var(--text-1); }
.check-item span.checked { text-decoration:line-through; color:var(--text-3); }

/* ── REMINDERS ───────────────────────────────────────────── */
.reminder-list { display:flex; flex-direction:column; }
.reminder-item {
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:14px; padding:16px 20px;
  border-bottom:1px solid var(--border);
  transition: background 0.12s;
}
.reminder-item:last-child { border-bottom:none; }
.reminder-item:hover { background: var(--surface-2); }
.reminder-info { flex:1; }
.reminder-title-row { display:flex; align-items:center; gap:8px; margin-bottom:4px; }
.reminder-title-row h4 { font-size:14px; font-weight:600; }

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-high     { background: #fee2e2; color: #b91c1c; }
.badge-medium   { background: #fef3c7; color: #92400e; }
.badge-low      { background: #dbeafe; color: #1e40af; }
.badge-upcoming { background: rgba(6,140,223,0.1); color: var(--blue); }
.badge-ongoing  { background: rgba(34,197,94,0.1); color: #16a34a; }
.badge-completed{ background: rgba(100,116,139,0.1); color: #64748b; }

.reminder-info > p { font-size:13px; color:var(--text-2); margin-bottom:6px; }
.reminder-meta { display:flex; flex-wrap:wrap; gap:12px; font-size:12px; color:var(--text-3); }

.tag {
  background: var(--surface-2);
  color: var(--text-2);
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11.5px;
  border: 1px solid var(--border);
}

.reminder-actions { display:flex; gap:7px; flex-shrink:0; align-items:flex-start; }

/* ── GRADIENT BANNERS ────────────────────────────────────── */
.gradient-banner {
  background: linear-gradient(135deg, var(--teal), var(--teal-mid));
  border-radius: var(--radius);
  padding: 26px;
  color: white;
  display: flex; align-items: flex-start; gap: 18px;
}
.green-banner { background: linear-gradient(135deg, var(--teal), #0a5c58); }
.banner-icon {
  font-size:26px; width:48px; height:48px;
  background: rgba(255,255,255,0.12);
  border-radius:10px;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.gradient-banner h3 { font-size:16px; margin-bottom:5px; }
.gradient-banner p { font-size:13px; opacity:0.85; margin-bottom:14px; }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10,15,30,0.5);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 480px;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  animation: modalIn 0.22s cubic-bezier(0.4,0,0.2,1);
}
@keyframes modalIn { from{opacity:0;transform:scale(0.96) translateY(8px)} to{opacity:1;transform:scale(1) translateY(0)} }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.modal-close {
  background: none; border: none; font-size: 16px;
  color: var(--text-3); padding: 6px;
  border-radius: 7px; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
}
.modal-close:hover { background: var(--surface-2); color: var(--text-1); }

.modal-body { padding: 20px 24px; }
.modal-body label { display:block; font-size:12.5px; font-weight:600; color:var(--text-2); margin-bottom:6px; margin-top:14px; }
.modal-body label:first-child { margin-top:0; }
.modal-body input, .modal-body select, .modal-body textarea { margin-bottom: 4px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ── ITINERARY ───────────────────────────────────────────── */
.itinerary-day { border:1px solid var(--border); border-radius:12px; margin-bottom:14px; overflow:hidden; }
.itinerary-day-header {
  background: linear-gradient(135deg, rgba(6,57,55,0.05), rgba(6,140,223,0.05));
  padding: 10px 16px;
  font-weight: 700; font-size: 14px;
  color: var(--teal);
  border-bottom: 1px solid var(--border);
}
.itinerary-activity {
  padding: 10px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  display: flex; align-items: flex-start; gap: 10px;
}
.itinerary-activity:last-child { border-bottom: none; }
.itinerary-activity span { font-weight: 700; color: var(--blue); min-width: 70px; font-size: 12px; flex-shrink: 0; font-family: 'JetBrains Mono', monospace; }

/* ── HUB ─────────────────────────────────────────────────── */
.hub-tab { padding:9px 16px; border-bottom:2px solid transparent; color:var(--text-3); font-weight:500; font-size:14px; transition:all 0.15s; cursor:pointer; }
.hub-tab.active { color:var(--blue); border-bottom-color:var(--blue); }

/* ── VOICE ASSISTANT ─────────────────────────────────────── */
.voice-fab {
  position: fixed; bottom: 28px; right: 28px;
  width: 54px; height: 54px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(6,57,55,0.3), 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer; z-index: 200;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}
.voice-fab:hover { transform: scale(1.08); box-shadow: 0 10px 32px rgba(6,57,55,0.4); }
.voice-fab.active { background: linear-gradient(135deg, #dc2626, #b91c1c); animation: voicePulse 1.5s infinite; }
@keyframes voicePulse { 0%,100%{box-shadow:0 0 0 0 rgba(220,38,38,0.4)} 50%{box-shadow:0 0 0 12px rgba(220,38,38,0)} }

.voice-panel {
  position: fixed; bottom: 96px; right: 28px;
  width: 360px; max-height: 520px;
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  z-index: 199;
  overflow: hidden;
}

.voice-panel-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--teal), var(--teal-mid));
  display: flex; align-items: center; justify-content: space-between;
}
.voice-panel-header h3 { font-size:14px; color:white; font-weight:700; }

.voice-messages {
  flex: 1; overflow-y: auto;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}

.voice-msg { display:flex; align-items:flex-start; gap:9px; }
.voice-msg.user { flex-direction: row-reverse; }

.voice-msg-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.voice-msg.user .voice-msg-avatar { background: var(--surface-2); }

.voice-msg-bubble {
  max-width: 78%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--surface-2);
  color: var(--text-1);
  border: 1px solid var(--border);
}
.voice-msg.user .voice-msg-bubble {
  background: linear-gradient(135deg, var(--blue), #0578c4);
  color: white; border-color: transparent;
}

.voice-status {
  padding: 10px 14px;
  font-size: 12px; color: var(--text-3);
  text-align: center;
  border-top: 1px solid var(--border);
}

.voice-panel-footer {
  display: flex; gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.voice-text-input {
  flex: 1; padding: 9px 13px;
  border: 1px solid var(--border-strong); border-radius: 9px;
  font-size: 13px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.voice-text-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(6,140,223,0.1); }

.voice-send-btn {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue), #0578c4);
  border: none; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(6,140,223,0.25);
}
.voice-send-btn:hover { filter: brightness(1.1); transform: scale(1.05); }

/* ── CALENDAR ────────────────────────────────────────────── */
.cal-day {
  min-height: 90px; padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background 0.12s;
}
.cal-day:hover { background: var(--surface-2); }
.cal-day.today { background: rgba(6,140,223,0.05); border-color: rgba(6,140,223,0.3); }
.cal-event {
  background: linear-gradient(135deg, var(--blue), #0578c4);
  color: white;
  font-size: 11px; font-weight: 600;
  padding: 3px 7px;
  border-radius: 5px;
  margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; transition: filter 0.15s;
}
.cal-event:hover { filter: brightness(1.1); }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px; color: var(--text-3);
}
.empty-state .empty-icon { font-size: 40px; margin-bottom: 14px; opacity: 0.6; }
.empty-state h3 { font-size: 16px; color: var(--text-2); margin-bottom: 6px; font-weight: 700; }
.empty-state p { font-size: 13px; margin-bottom: 18px; }

/* ── LOADING STATES ──────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e8ecf0 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.skeleton-card { border-radius:18px; overflow:hidden; border:1px solid var(--border); }
.skeleton-img  { height:185px; }
.skeleton-body { padding:18px; }
.skeleton-line { height:13px; margin-bottom:10px; }
.skeleton-line.short { width:55%; }
.skeleton-line.medium { width:75%; }

.ai-loading-overlay {
  position: fixed; inset: 0;
  background: rgba(6,57,55,0.7);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px; color: white;
}
.ai-loading-spinner {
  width: 52px; height: 52px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-loading-text { font-size:17px; font-weight:700; font-family:'Sora',sans-serif; letter-spacing:-0.01em; }
.ai-loading-sub  { font-size:13px; opacity:0.7; }
.ai-loading-dots { display:flex; gap:6px; margin-top:6px; }
.ai-loading-dots span {
  width:7px; height:7px; background:rgba(255,255,255,0.6); border-radius:50%;
  animation: dotBounce 1.2s infinite;
}
.ai-loading-dots span:nth-child(2) { animation-delay:0.15s; }
.ai-loading-dots span:nth-child(3) { animation-delay:0.3s; }
@keyframes dotBounce { 0%,80%,100%{transform:scale(0.6);opacity:0.3} 40%{transform:scale(1);opacity:1} }

/* ── CHECKLIST CSS CLASSES ───────────────────────────────── */
.cl-card { border:1px solid var(--border); border-radius:12px; margin-bottom:12px; overflow:hidden; box-shadow:var(--shadow-sm); }
.cl-header { background:var(--surface-2); padding:12px 16px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px; }
.cl-title { font-size:14.5px; font-weight:700; color:var(--text-1); display:block; margin-bottom:1px; }
.cl-meta { font-size:12px; color:var(--text-3); margin:0; }
.cl-items { padding:4px 0; background:var(--surface); }
.cl-item { display:flex; align-items:center; gap:10px; padding:9px 16px; border-bottom:1px solid var(--border); cursor:pointer; background:var(--surface); transition:background 0.12s; }
.cl-item:hover { background:var(--surface-2); }
.cl-item-label { flex:1; color:var(--text-1); font-size:13.5px; }
.cl-item-done .cl-item-label { text-decoration:line-through; color:var(--text-3); }
.cl-empty { text-align:center; color:var(--text-3); font-size:13px; padding:12px; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .main { margin-left: 0; }
  .menu-btn { display: flex; }
  .page-content { padding: 20px 16px 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .three-col { grid-template-columns: repeat(2, 1fr); }
  .trips-grid { grid-template-columns: 1fr; }
  .checklists-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .interests-grid { grid-template-columns: repeat(2, 1fr); }
  .pace-grid { grid-template-columns: 1fr 1fr 1fr; }
  #page-tripHub .page-content > div[style*="grid-template-columns"] { display:block !important; }
  #page-tripHub .page-content > div[style*="grid-template-columns"] > div:last-child { position:static !important; margin-top:16px; }
}

@media (max-width: 480px) {
  .stats-grid, .three-col { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
  .reminder-item { flex-direction: column; }
  .reminder-actions { flex-direction: row; }
  .flex-header { flex-direction: column; align-items: flex-start; }
  .page-header h1 { font-size: 22px; }
  .voice-panel { width: calc(100vw - 32px); right: 16px; }
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE
═══════════════════════════════════════════════════════════ */
body.dark {
  --bg:            #0c0e14;
  --surface:       #141720;
  --surface-2:     #1c2030;
  --border:        rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.1);
  --text-1:        #f0f4f8;
  --text-2:        #94a3b8;
  --text-3:        #5a6a80;
  --dark:          #f0f4f8;
  --mid:           #94a3b8;
  --text-muted:    #5a6a80;
  --blue-dim:      rgba(6,140,223,0.15);
  --blue-glow:     rgba(6,140,223,0.3);
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.3);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg:     0 12px 40px rgba(0,0,0,0.5);
}

body.dark .sidebar { background: #0e1117; border-right: 1px solid rgba(255,255,255,0.05); }
body.dark .logo-text { color: white; }
body.dark .nav-link { color: rgba(255,255,255,0.4); }
body.dark .nav-link:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.8); }
body.dark .nav-link.active { background: rgba(6,140,223,0.15); color: rgba(255,255,255,0.95); }

body.dark .topbar { background: var(--surface); border-bottom-color: var(--border); }
body.dark .card { background: var(--surface); border-color: var(--border); }
body.dark .stat-card { background: var(--surface); border-color: var(--border); }
body.dark .stat-label { color: var(--text-3); }
body.dark .stat-value { color: var(--text-1); }

body.dark .trip-card { background: var(--surface); border-color: var(--border); }
body.dark .trip-card:hover { border-color: rgba(6,140,223,0.3); box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(6,140,223,0.2); }
body.dark .trip-body h3 { color: var(--text-1); }
body.dark .trip-dates { color: var(--text-3); }
body.dark .progress-bar { background: rgba(255,255,255,0.08); }

body.dark .page-header h1 { color: var(--text-1); }
body.dark .page-header p { color: var(--text-3); }
body.dark .page-header { border-bottom-color: var(--border); }
body.dark .section-title { color: var(--text-1); }
body.dark .card-header h2 { color: var(--text-1); }

body.dark .btn-outline { border-color: var(--border-strong); color: var(--text-2); }
body.dark .btn-outline:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }

body.dark input, body.dark select, body.dark textarea {
  background: var(--surface-2); border-color: var(--border-strong); color: var(--text-1);
}
body.dark input::placeholder, body.dark textarea::placeholder { color: var(--text-3); }
body.dark input:focus, body.dark select:focus, body.dark textarea:focus { border-color: var(--blue); }
body.dark input[readonly] { background: var(--surface) !important; color: var(--text-3) !important; }

body.dark .modal { background: var(--surface); border-color: var(--border); }
body.dark .modal-header { border-bottom-color: var(--border); }
body.dark .modal-header h3 { color: var(--text-1); }
body.dark .modal-footer { border-top-color: var(--border); }
body.dark .modal-close { color: var(--text-3); }
body.dark .modal-close:hover { background: var(--surface-2); color: var(--text-1); }
body.dark label { color: var(--text-2); }

body.dark .expense-item { background: var(--surface-2); border-color: var(--border); }
body.dark .expense-item h4 { color: var(--text-1); }
body.dark .expense-item p { color: var(--text-3); }
body.dark .expense-amount { color: var(--text-1); }
body.dark .expense-item:hover { background: rgba(6,140,223,0.08); border-color: rgba(6,140,223,0.2); }

body.dark .reminder-item { border-bottom-color: var(--border); }
body.dark .reminder-item:hover { background: var(--surface-2); }
body.dark .tag { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }

body.dark .checklist-card { background: var(--surface); border-color: var(--border); }
body.dark .checklist-header { background: var(--surface-2) !important; }
body.dark .check-item { color: var(--text-1); }
body.dark .check-item:hover { background: var(--surface-2); }

body.dark .generating-card { background: var(--surface); border-color: var(--border); }
body.dark .generating-card h3 { color: var(--text-1); }
body.dark .generating-card p { color: var(--text-3); }

body.dark .itinerary-day { border-color: var(--border); }
body.dark .itinerary-day-header { background: rgba(6,140,223,0.08); color: rgba(6,140,223,0.9); border-bottom-color: var(--border); }
body.dark .itinerary-activity { border-bottom-color: var(--border); color: var(--text-2); }

body.dark .voice-panel { background: var(--surface); border-color: var(--border); }
body.dark .voice-msg.ai .voice-msg-bubble { background: var(--surface-2); color: var(--text-1); border-color: var(--border); }
body.dark .voice-text-input { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-1); }
body.dark .voice-status { color: var(--text-3); border-top-color: var(--border); }

body.dark .interest-btn, body.dark .pace-btn { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-2); }
body.dark .interest-btn:hover, body.dark .pace-btn:hover { border-color: var(--blue); color: var(--blue); }
body.dark .interest-btn.active, body.dark .pace-btn.active { color: white; }

body.dark .gradient-banner { background: linear-gradient(135deg, #0e1a1a, #0a2035); }
body.dark .overlay { background: rgba(0,0,0,0.75); }
body.dark .skeleton { background: linear-gradient(90deg, #1c2030 25%, #252d3d 50%, #1c2030 75%); background-size:200% 100%; }

body.dark .cl-card { border-color: var(--border); }
body.dark .cl-header { background: var(--surface-2); }
body.dark .cl-title { color: var(--text-1); }
body.dark .cl-meta { color: var(--text-3); }
body.dark .cl-items { background: var(--surface); }
body.dark .cl-item { background: var(--surface); border-bottom-color: var(--border); }
body.dark .cl-item:hover { background: var(--surface-2); }
body.dark .cl-item-label { color: var(--text-1); }
body.dark .cl-item-done .cl-item-label { color: var(--text-3); }

body.dark .action-btn { opacity: 0.95; }
body.dark h1, body.dark h2, body.dark h3, body.dark h4 { color: var(--text-1); }
body.dark p { color: var(--text-2); }

/* Dark mode specific inline override system */
body.dark *[style*="color:#063937"], body.dark *[style*="color: #063937"] { color: var(--text-1) !important; }
body.dark *[style*="color:#475569"], body.dark *[style*="color: #475569"] { color: var(--text-2) !important; }
body.dark *[style*="color:#64748b"], body.dark *[style*="color: #64748b"] { color: var(--text-3) !important; }
body.dark *[style*="background:white"], body.dark *[style*="background: white"] { background: var(--surface) !important; }
body.dark *[style*="background:#f8fafc"], body.dark *[style*="background: #f8fafc"] { background: var(--surface-2) !important; }
body.dark *[style*="border:1px solid #e8ecf0"], body.dark *[style*="border: 1px solid #e8ecf0"],
body.dark *[style*="border:1.5px solid #e8ecf0"], body.dark *[style*="border: 1.5px solid #e8ecf0"] { border-color: var(--border-strong) !important; }

/* Notes dark mode */
body.dark #hubNotesView { color: var(--text-2) !important; }
body.dark #hubTripNotesEdit { background: var(--surface-2) !important; border-color: var(--border-strong) !important; color: var(--text-1) !important; }

/* AI tip dark */
body.dark #hubAiTip { background: rgba(6,140,223,0.06) !important; border-color: rgba(6,140,223,0.15) !important; }
body.dark #hubAiTipText { color: var(--text-2) !important; }

/* Countdown dark */
body.dark #hubCountdown { background: rgba(6,140,223,0.05) !important; border-color: rgba(6,140,223,0.15) !important; }
body.dark #hubCountdownText { color: var(--text-1) !important; }
body.dark #hubCountdownSub { color: var(--text-3) !important; }

/* Trip status badges dark */
body.dark .badge-upcoming  { background: rgba(6,140,223,0.15); color: #60c8f5; }
body.dark .badge-ongoing   { background: rgba(34,197,94,0.12); color: #4ade80; }
body.dark .badge-completed { background: rgba(100,116,139,0.15); color: #94a3b8; }

/* Voice plan dark */
body.dark #voicePlanBtn { background: var(--surface-2) !important; border-color: var(--border-strong) !important; }
body.dark #voicePlanBtn:hover { border-color: var(--blue) !important; }
body.dark #voicePlanBanner { background: rgba(6,140,223,0.06) !important; border-color: rgba(6,140,223,0.25) !important; }
body.dark #voicePlanStatus { color: var(--text-1) !important; }

/* Dashboard search dark */
body.dark #dashSearch { background: var(--surface-2) !important; border-color: var(--border-strong) !important; color: var(--text-1) !important; }
body.dark #dashSearch::placeholder { color: var(--text-3) !important; }

/* Currency converter dark */
body.dark #convAmount, body.dark #convFrom, body.dark #convTo { background: var(--surface-2) !important; border-color: var(--border-strong) !important; color: var(--text-1) !important; }
body.dark #convResult { background: var(--surface-2) !important; color: var(--text-1) !important; border-color: var(--border-strong) !important; }

/* Trip hub two-column */
body.dark .card.section { background: var(--surface); border-color: var(--border); }

/* Budget item borders */
body.dark .budget-item { border-bottom-color: var(--border); }

/* Dark mode toggle */
body.dark #darkModeBtn { border-color: var(--border); color: var(--text-1); }

/* Badge dark */
body.dark .badge-high   { background: rgba(185,28,28,0.15); color: #fca5a5; }
body.dark .badge-medium { background: rgba(146,64,14,0.15); color: #fcd34d; }
body.dark .badge-low    { background: rgba(30,64,175,0.15); color: #93c5fd; }

/* Reco interest buttons dark */
body.dark .reco-interest { background: var(--surface-2) !important; border-color: var(--border-strong) !important; color: var(--text-2) !important; }
body.dark .reco-interest.active { background: var(--blue) !important; color: white !important; border-color: var(--blue) !important; }

/* Reminder done */
.reminder-done { opacity: 0.5; }
.reminder-done .reminder-title { text-decoration: line-through; }

