/* ══════════════════════════════════════════
   SPLITAWAY — DESIGN SYSTEM v3
   ══════════════════════════════════════════ */

:root {
  --ink:              #f4f6fa;
  --paper:            #08090d;
  --sand:             #1e212b;
  --amber:            #ffaa00;
  --amber-dim:        #e69500;
  --amber-light:      #ffdd88;
  --teal:             #00f0ff;
  --teal-dim:         #00d0dd;
  --coral:            #ff4b72;
  --coral-soft:       #ff8ca1;
  --radius:           24px;
  --radius-sm:        16px;
  --radius-xs:        12px;

  --surface:          rgba(255, 255, 255, 0.02);
  --surface-dim:      rgba(255, 255, 255, 0.03);
  --surface-low:      rgba(255, 255, 255, 0.04);
  --surface-mid:      rgba(255, 255, 255, 0.06);
  --surface-high:     rgba(255, 255, 255, 0.08);
  --surface-highest:  rgba(255, 255, 255, 0.12);

  --ghost:            rgba(255, 255, 255, 0.08);
  --ghost-hover:      rgba(255, 255, 255, 0.12);
  --glow-amber:       rgba(255, 170, 0, 0.15);
  --glow-teal:        rgba(0, 240, 255, 0.15);

  --text-secondary:   #b4b9c5;
  --text-muted:       #8a8f9c;

  --shadow-sm:   0 4px 12px rgba(0,0,0,0.4);
  --shadow-md:   0 12px 32px rgba(0,0,0,0.5);
  --shadow-lg:   0 24px 64px rgba(0,0,0,0.6);
  --shadow-glow: 0 8px 32px rgba(255, 170, 0, 0.3);
}

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

body {
  font-family: 'Manrope', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% -10%, rgba(255, 170, 0, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 80% 70% at 80% 110%, rgba(0, 240, 255, 0.08) 0%, transparent 60%);
}

/* ══════════════════════════════════════════
   LAYOUT
   ══════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.app-container { padding-bottom: 60px; }

/* ── HEADER ── */
header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(8, 9, 13, 0.75);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--ghost);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── LOGO ── */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  user-select: none;
}

.logo:hover { opacity: 0.85; }

.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--amber), #e6900a);
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(255,191,0,0.3);
}

.logo-wordmark {
  font-family: 'Noto Serif', serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}

.logo-wordmark em {
  font-style: normal;
  background: linear-gradient(135deg, var(--amber), #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── HEADER ACTIONS ── */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

/* Save indicator */
.save-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--surface-low);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--ghost);
  transition: all 0.2s;
  letter-spacing: 0.03em;
}

.save-indicator:hover { border-color: rgba(255,191,0,0.3); color: var(--ink); }

.save-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  transition: background 0.3s;
  flex-shrink: 0;
}

/* My Trips button in header */
.header-trips-btn {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

/* Avatar circle */
.avatar-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
  color: #1a1209;
  border: 2px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.avatar-circle:hover { transform: scale(1.05); box-shadow: 0 0 0 3px rgba(255,191,0,0.25); }

/* Profile dropdown */
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px); right: 0;
  background: rgba(22, 24, 30, 0.85);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--ghost);
  border-radius: var(--radius-sm);
  width: 220px;
  padding: 6px;
  display: none; flex-direction: column; gap: 2px;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

.profile-dropdown.open { display: flex; animation: slideDown 0.25s cubic-bezier(0.34,1.56,0.64,1); }

.dropdown-header {
  padding: 10px 14px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.profile-dropdown button {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: none;
  color: var(--ink); padding: 10px 14px;
  text-align: left; border-radius: 10px;
  font-family: inherit; font-weight: 600;
  cursor: pointer; font-size: 13px;
  transition: all 0.15s;
}

.profile-dropdown button:hover { background: var(--ghost); }
.profile-dropdown button.danger { color: var(--coral-soft); }
.profile-dropdown button.danger:hover { background: rgba(255,100,100,0.1); }

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

/* ══════════════════════════════════════════
   VIEWS (LANDING / AUTH)
   ══════════════════════════════════════════ */

#landingView, #authView, #appSection {
  display: none; opacity: 0;
  transition: opacity 0.35s ease;
  position: relative; z-index: 1;
}

.landing-view.active,
.auth-view.active { display: flex; opacity: 1; }

#appSection.active { display: block; opacity: 1; }

/* ── HERO ── */
.landing-view {
  flex-direction: column;
  width: 100%;
}

.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  max-width: 700px;
  margin: 0 auto;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--amber);
  background: var(--glow-amber);
  border: 1px solid rgba(255,191,0,0.2);
  padding: 5px 14px; border-radius: 20px;
  margin-bottom: 28px;
}

.hero-title {
  font-family: 'Noto Serif', serif;
  font-size: clamp(2.8rem, 8vw, 4.8rem);
  line-height: 1.05; font-weight: 900;
  margin-bottom: 22px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--amber), #ff8c00);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 17px; line-height: 1.7;
  max-width: 560px; margin: 0 auto 36px;
}

.hero-actions-container { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }

.hero-pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.pill {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-low);
  border: 1px solid var(--ghost);
  padding: 4px 12px; border-radius: 20px;
  letter-spacing: 0.03em;
}

/* ── FEATURES SECTION ── */
.features {
  max-width: 1000px;
  margin: 40px auto 80px;
  padding: 0 24px;
  text-align: center;
}

.section-title {
  font-family: 'Noto Serif', serif;
  font-size: 28px;
  color: var(--amber);
  margin-bottom: 40px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface-low);
  border: 1px solid var(--ghost);
  border-radius: var(--radius);
  padding: 30px;
  text-align: left;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.feature-card:hover {
  transform: translateY(-5px);
  background: var(--surface-mid);
  border-color: rgba(255, 191, 0, 0.2);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.feature-icon {
  font-size: 32px;
  margin-bottom: 16px;
  background: var(--surface-mid);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--ghost);
}

.feature-card h4 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--ink);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--ghost);
  padding: 60px 24px 24px;
  background: var(--surface-low);
  width: 100%;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 10px;
}

.footer-links {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
}

.footer-links h4 {
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--amber);
}

.footer-bottom {
  max-width: 1000px;
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--ghost);
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}

/* ── AUTH ── */
.auth-view {
  min-height: calc(100vh - 64px);
  align-items: center; justify-content: center;
  padding: 40px 24px;
}

.auth-box {
  width: 100%; max-width: 420px;
  background: var(--surface-mid);
  border: 1px solid var(--ghost);
  border-radius: var(--radius);
  padding: 44px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.auth-logo-mark {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--amber), #e6900a);
  border-radius: 16px;
  display: grid; place-items: center;
  color: #1a1209;
  margin: 0 auto 24px;
  box-shadow: var(--shadow-glow);
}

.auth-heading {
  font-family: 'Noto Serif', serif;
  font-size: 2rem; font-weight: 900;
  margin-bottom: 8px; line-height: 1.2;
}

.auth-sub { color: var(--text-muted); margin-bottom: 28px; font-size: 14px; }

.auth-link {
  color: var(--text-muted); font-size: 13px;
  text-decoration: none; display: block; margin-top: 4px;
  transition: color 0.2s;
}

.auth-link:hover { color: var(--amber); }

/* ══════════════════════════════════════════
   APP GRID
   ══════════════════════════════════════════ */

#app {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  padding: 36px 0;
}

.left-col, .right-col { display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 1024px) {
  #app { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   CARD
   ══════════════════════════════════════════ */

.card {
  background: var(--surface-mid);
  border: 1px solid var(--ghost);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), border-color 0.4s, box-shadow 0.4s;
  position: relative; overflow: hidden;
}

.card::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,170,0,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,170,0,0.3);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-title {
  font-family: 'Noto Serif', serif;
  font-size: 18px; font-weight: 700;
  margin-bottom: 22px;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
}

.card-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}

.amber-icon { background: linear-gradient(135deg, var(--amber), #e6900a); }
.teal-icon  { background: linear-gradient(135deg, var(--teal-dim), #3dbdbc); }

.card-emoji { font-size: 18px; line-height: 1; }

.count-badge {
  margin-left: auto;
  background: var(--glow-amber);
  border: 1px solid rgba(255,191,0,0.2);
  color: var(--amber);
  font-size: 11px; font-weight: 800;
  padding: 2px 8px; border-radius: 10px;
  font-family: 'Manrope', sans-serif;
}

.divider { height: 1px; background: var(--ghost); margin: 20px 0; }

.total-row { display: flex; justify-content: space-between; align-items: center; }

.total-amount {
  font-size: 26px; font-weight: 800;
  color: var(--amber);
  letter-spacing: -0.02em;
}

.card-footer-actions {
  display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap;
}

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Manrope', sans-serif;
  font-weight: 800; font-size: 14px;
  cursor: pointer; border: none;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  letter-spacing: 0.03em;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(255,255,255,0.2), transparent);
  opacity: 0; transition: opacity 0.3s;
}

.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.4); }
.btn:active { transform: translateY(1px); }

.btn-full { width: 100%; }

.btn-amber {
  background: linear-gradient(135deg, var(--amber), var(--amber-dim));
  color: #1a1209;
  box-shadow: 0 4px 16px rgba(255,191,0,0.25);
}

.btn-coral:hover { background: #ff4d4d; box-shadow: 0 8px 24px rgba(255, 71, 71, 0.4); }

.icon-btn {
  background: transparent; border: none;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); padding: 4px; border-radius: 8px;
  cursor: pointer; transition: all 0.2s;
}
.icon-btn:hover { background: var(--ghost); color: var(--amber); }

.divider { height: 1px; background: var(--ghost); width: 100%; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--ghost);
  color: var(--ink);
}

.btn-outline:hover { background: var(--ghost-hover); border-color: rgba(255,191,0,0.4); }

.btn-ghost {
  background: var(--surface-high);
  border: 1px solid var(--ghost);
  color: var(--ink);
  font-size: 13px;
  flex: 1;
}

.btn-ghost:hover { background: var(--ghost-hover); }

.btn-coral {
  background: rgba(255,107,107,0.12);
  border: 1.5px solid rgba(255,107,107,0.25);
  color: var(--coral-soft);
}

.btn-coral:hover { background: rgba(255,107,107,0.2); }

/* ══════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════ */

.form-group { margin-bottom: 18px; }

.form-label {
  display: block; font-size: 11px; font-weight: 800;
  color: var(--amber); text-transform: uppercase;
  letter-spacing: 0.12em; margin-bottom: 8px;
}

.auth-link {
  display: block; text-align: center; margin-top: 20px;
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  text-decoration: none; transition: 0.2s;
}
.auth-link:hover { color: var(--amber); }

.form-input, .form-select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--ghost);
  border-radius: var(--radius-sm);
  background: var(--surface-dim);
  color: var(--ink);
  outline: none;
  font-family: 'Manrope', sans-serif;
  font-size: 14px; font-weight: 600;
  transition: all 0.2s;
  -webkit-appearance: none;
}

.form-input::placeholder { color: var(--text-muted); font-weight: 500; }

.form-input:focus, .form-select:focus {
  border-color: var(--amber);
  background: var(--surface-low);
  box-shadow: 0 0 0 4px rgba(255,191,0,0.08);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237c7060' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ══════════════════════════════════════════
   FRIENDS GRID
   ══════════════════════════════════════════ */

.add-friend-row {
  display: flex; gap: 10px;
}

.add-friend-row .form-input { flex: 1; margin: 0; }

.friends-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  min-height: 0;
}

/* Friend chip — the missing styles */
.friend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-high);
  border: 1px solid var(--ghost);
  border-radius: 40px;
  padding: 6px 10px 6px 6px;
  transition: all 0.2s;
  animation: chipIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes chipIn {
  from { opacity: 0; transform: scale(0.75); }
  to   { opacity: 1; transform: scale(1); }
}

.friend-chip:hover { border-color: rgba(255,191,0,0.35); background: var(--surface-highest); }

.friend-chip .f-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.friend-chip .f-name {
  font-size: 13px; font-weight: 700;
  color: var(--ink); line-height: 1;
  max-width: 90px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.friend-chip .f-remove {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: transparent; border: none;
  color: var(--text-muted);
  cursor: pointer; font-size: 10px;
  display: grid; place-items: center;
  transition: all 0.15s; flex-shrink: 0;
  line-height: 1;
}

.friend-chip .f-remove:hover { background: rgba(255,107,107,0.2); color: var(--coral-soft); }

/* ══════════════════════════════════════════
   SPLIT GRID
   ══════════════════════════════════════════ */

.split-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); gap: 8px; }

.split-check {
  background: var(--surface-low);
  border: 1.5px solid var(--ghost);
  border-radius: var(--radius-xs);
  padding: 10px 8px;
  font-weight: 700; font-size: 13px;
  cursor: pointer; text-align: center;
  transition: all 0.2s;
  color: var(--text-secondary);
  user-select: none;
}

.split-check:hover { border-color: rgba(255,191,0,0.3); }

.split-check.selected {
  background: linear-gradient(135deg, var(--amber), var(--amber-dim));
  border-color: transparent;
  color: #1a1209;
  box-shadow: 0 4px 14px rgba(255,191,0,0.35);
  transform: translateY(-1px);
}

.split-actions { display: flex; gap: 10px; margin-top: 12px; }

/* ══════════════════════════════════════════
   EXPENSE ITEMS
   ══════════════════════════════════════════ */

.expenses-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.expense-item {
  background: var(--surface-low);
  border: 1px solid var(--ghost);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

.expense-item:hover {
  transform: scale(1.02);
  border-color: rgba(255, 170, 0, 0.4);
  background: var(--surface-high);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.expense-desc  { font-weight: 700; font-size: 14px; }
.expense-meta  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.expense-amt   { font-weight: 800; color: var(--amber); font-size: 15px; white-space: nowrap; }

.expense-delete {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer; padding: 4px;
  border-radius: 6px; transition: all 0.15s;
  font-size: 14px; line-height: 1;
}

.expense-delete:hover { color: var(--coral-soft); background: rgba(255,100,100,0.1); }

/* ══════════════════════════════════════════
   BALANCES
   ══════════════════════════════════════════ */

.balances-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.balance-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px;
  background: var(--surface-dim);
  border-radius: var(--radius-xs);
  font-size: 13px;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}

.balance-row:hover { border-color: var(--ghost); }

/* ══════════════════════════════════════════
   SETTLEMENT
   ══════════════════════════════════════════ */

.settle-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.settle-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600;
  background: var(--glow-amber);
  padding: 12px 14px; border-radius: var(--radius-xs);
  border: 1px solid rgba(255,191,0,0.12);
}

.settle-arrow { color: var(--amber); font-size: 16px; flex-shrink: 0; }
.settle-amt   { margin-left: auto; font-weight: 800; color: var(--amber); }

/* ══════════════════════════════════════════
   SIDE PANEL (My Trips)
   ══════════════════════════════════════════ */

/* ══════════════════════════════════════════
   APP VIEW (WIZARD)
   ══════════════════════════════════════════ */

.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: none; z-index: 900;
}

.side-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(380px, 92vw);
  z-index: 1000;
  background: var(--surface-mid);
  border-left: 1px solid var(--ghost);
  padding: 0;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.32,0,0.15,1);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.side-panel-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--ghost);
  flex-shrink: 0;
}

.panel-title {
  font-family: 'Noto Serif', serif;
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  color: var(--amber);
}

.panel-body {
  flex: 1; overflow-y: auto;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 10px;
}

.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }
.panel-body::-webkit-scrollbar-thumb { background: var(--ghost); border-radius: 2px; }

.panel-footer {
  padding: 16px 20px 24px;
  border-top: 1px solid var(--ghost);
  flex-shrink: 0;
}

.icon-btn {
  width: 34px; height: 34px;
  background: var(--ghost); border: none;
  border-radius: 8px; color: var(--ink);
  cursor: pointer; display: grid; place-items: center;
  transition: all 0.15s;
}

.icon-btn:hover { background: var(--ghost-hover); }

/* Trip saved items */
.trip-saved-item {
  padding: 14px 16px;
  background: var(--surface-low);
  border: 1px solid var(--ghost);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trip-saved-item:hover { background: var(--surface-high); border-color: rgba(255,191,0,0.3); }

.trip-item-name { font-weight: 700; font-size: 14px; }
.trip-item-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.trip-delete-btn {
  background: transparent;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trip-delete-btn:hover { background: rgba(255, 71, 71, 0.1); color: #ff4747; border-color: transparent; }


/* ══════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(14px);
  display: none; /* toggled to flex */
  align-items: center; justify-content: center;
  z-index: 9999;
  padding: 24px;
}

.modal-box {
  background: var(--surface-high);
  border: 1px solid var(--ghost);
  border-radius: var(--radius);
  padding: 40px 36px;
  max-width: 380px; width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalPop 0.3s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

.modal-icon-wrap {
  font-size: 36px; line-height: 1;
  margin-bottom: 16px;
}

.modal-title {
  font-family: 'Noto Serif', serif;
  font-size: 1.4rem; font-weight: 900;
  margin-bottom: 10px;
}

.modal-desc { color: var(--text-secondary); font-size: 14px; line-height: 1.6; }

.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }

/* ══════════════════════════════════════════
   TOAST
   ══════════════════════════════════════════ */

#toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: var(--surface-highest);
  border: 1px solid rgba(255,191,0,0.35);
  color: var(--ink);
  padding: 11px 22px; border-radius: 12px;
  font-weight: 700; font-size: 13px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 99999;
  box-shadow: var(--shadow-md);
  max-width: 90vw; text-align: center;
  transform: translateX(-50%) translateY(8px);
}

#toast.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }

/* ══════════════════════════════════════════
   CURSOR GLOW (desktop)
   ══════════════════════════════════════════ */

#cursor-glow {
  position: fixed;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(255,191,0,0.07) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: left 0.08s ease, top 0.08s ease;
}

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */

@media (max-width: 640px) {
  .header-inner { padding: 0 16px; height: 58px; }
  .header-trips-btn span { display: none; }
  .auth-box { padding: 32px 24px; }
  #app { padding: 20px 0; }
  .card { padding: 20px; }
  .two-col-grid { grid-template-columns: 1fr; }
  .save-indicator { display: none !important; }
}

/* ══════════════════════════════════════════
   STATIC PAGES (About, Privacy, etc.)
   ══════════════════════════════════════════ */

.page-layout {
  min-height: calc(100vh - 64px);
  padding: 60px 24px;
  display: flex;
  justify-content: center;
}

.page-content {
  width: 100%;
  max-width: 800px;
  background: var(--surface-low);
  border: 1px solid var(--ghost);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.page-content h1 {
  font-family: 'Noto Serif', serif;
  font-size: 2.5rem;
  color: var(--amber);
  margin-bottom: 24px;
}

.page-content h2 {
  font-size: 1.5rem;
  color: var(--ink);
  margin-top: 32px;
  margin-bottom: 16px;
}

.page-content p, .page-content ul, .page-content li {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
}

.page-content ul {
  padding-left: 24px;
}

.page-content a {
  color: var(--amber);
  text-decoration: none;
}

.page-content a:hover {
  text-decoration: underline;
}
