:root {
  --bg: #0B0E14;
  --surface: #161B22;
  --surface-2: #1E2430;
  --border: rgba(255, 255, 255, 0.08);
  --text: #F5F7FA;
  --text-muted: #8B94A3;
  --green: #22C55E;
  --blue: #3B82F6;
  --purple: #8B5CF6;
  --amber: #F59E0B;
  --red: #EF4444;
  --radius: 14px;
  --radius-sm: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px; /* leave room for bottom nav */
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }

.container { max-width: 480px; margin: 0 auto; padding: 0 var(--space-4); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-weight: 600;
  width: 100%;
}
.btn-primary { background: var(--green); color: #06280F; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-danger-outline { background: transparent; border: 1px solid var(--red); color: var(--red); }

.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.pill-blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.pill-amber { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.pill-purple { background: rgba(139, 92, 246, 0.15); color: var(--purple); }

.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #06280F;
}

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.bottom-nav__item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none;
  color: var(--text-muted);
  font-size: 11px;
  padding: 6px 0;
}
.bottom-nav__item.active { color: var(--green); }

.tab-section { padding-bottom: var(--space-6); }
.day-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-4);
}
.day-nav__label { font-weight: 700; font-size: 16px; }
.day-nav__arrow {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.stats-row {
  display: flex; gap: var(--space-2); margin-bottom: var(--space-4);
}
.stats-row .card { flex: 1; text-align: center; padding: var(--space-3); }
.stats-row .card .value { font-weight: 700; font-size: 15px; }
.stats-row .card .label { color: var(--text-muted); font-size: 11px; }

.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border);
}
.timeline-point {
  position: relative; margin-bottom: var(--space-4);
}
.timeline-point::before {
  content: ''; position: absolute; left: -28px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--green);
  border: 2px solid var(--bg);
}
.timeline-point__time { font-weight: 700; font-size: 15px; }
.timeline-point__title { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.leg-route-info {
  margin: var(--space-2) 0 var(--space-4) 0;
  padding-left: var(--space-2);
  color: var(--text-muted); font-size: 12px;
}
.fab {
  position: fixed; right: 20px; bottom: 84px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--green); color: #06280F;
  font-size: 24px; border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-end; z-index: 100;
}
.modal-sheet {
  background: var(--surface); width: 100%; max-height: 90vh; overflow-y: auto;
  border-radius: var(--radius) var(--radius) 0 0; padding: var(--space-5);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.field label { display: block; font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.field input, .field textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px;
}

.activity-card { display: flex; gap: var(--space-3); align-items: center; margin-bottom: var(--space-3); }
.activity-card__icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--purple);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; font-size: 20px;
}
.activity-photo { width: 100%; height: 200px; object-fit: cover; border-radius: var(--radius); }

.expense-card { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-3); }
.expense-card__title { font-weight: 700; }
.expense-card__meta { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.expense-day-group { color: var(--text-muted); font-size: 13px; margin: var(--space-4) 0 var(--space-2) 0; text-transform: uppercase; letter-spacing: 0.05em; }
