/* ═══════════════════════════════════════════
   Memoroam — Itinerary Tabs
   Tab bar, Overview, Notes, Map integration,
   and redesigned day detail layout.
   ═══════════════════════════════════════════ */

/* ── Route Trip Pills ────────────────────── */

.route-trip-pills{
  display:flex;gap:8px;padding:0 20px 16px;overflow-x:auto;
  scrollbar-width:none;-webkit-overflow-scrolling:touch;
}
.route-trip-pills::-webkit-scrollbar{display:none;}
.route-pill{
  display:flex;align-items:center;gap:6px;white-space:nowrap;
  padding:8px 16px;border-radius:20px;border:1px solid var(--border);
  background:var(--card);color:var(--text);font-family:'DM Sans',sans-serif;
  font-size:13px;font-weight:500;cursor:pointer;transition:all .2s;flex-shrink:0;
}
.route-pill.active{background:var(--accent,#4A8C8A);color:#fff;border-color:var(--accent,#4A8C8A);}
.route-pill-flag{font-size:15px;}
.route-empty{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:12px;padding:80px 24px;text-align:center;
  color:var(--muted);font-family:'DM Sans',sans-serif;font-size:14px;
}

/* ── Tab Bar ─────────────────────────────── */

.itin-tab-bar {
  display: flex;
  gap: 0;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
}
.itin-tab-bar::-webkit-scrollbar { display: none; }

.itin-tab {
  flex-shrink: 0;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}

.itin-tab.active {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--text);
}

.itin-tab--soon {
  opacity: 0.32;
  cursor: default;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
}
.itin-tab--soon svg { opacity: 0.6; }

/* ── Tab Content ─────────────────────────── */

.itin-tab-content {
  padding: 0 0 32px;
  min-height: 200px;
  touch-action: pan-y;
}

/* ── Shared fade-in animation ────────────── */

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

.itin-tab-fade {
  animation: itinTabFadeIn 0.7s cubic-bezier(0.22,0.61,0.36,1) forwards;
}


/* ═══════════════════════════════════════════
   OVERVIEW TAB — Trip Dashboard
   ═══════════════════════════════════════════ */

.ov-wrap {
  padding: 0 16px 32px;
}

/* ── Header ──────────────────────────────── */

.ov-header {
  padding: 4px 0 20px;
}

.ov-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.ov-header-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #B5604A;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-header-rename {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 50px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  flex-shrink: 0;
}

.ov-header-rename:hover {
  color: #3A6B64;
  border-color: rgba(58, 107, 100, 0.35);
  background: rgba(58, 107, 100, 0.05);
}

.ov-header-rename:active { transform: scale(.96); }

.ov-header-city {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  margin: 0 0 6px;
  /* Cap at 2 lines — prevents overflow for long custom names */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
}

.ov-header-dates {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── Section Labels (shared) ─────────────── */

.ov-section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.ov-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ov-section-action {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #B5604A;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ov-section-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

/* ── Weather Forecast ────────────────────── */

.ov-weather-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 6px;
  margin-bottom: 20px;
  margin-top: 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ov-weather-row::-webkit-scrollbar { display: none; }

.ov-weather-card {
  min-width: 72px;
  padding: 12px 10px 10px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--border);
  text-align: center;
  flex-shrink: 0;
  position: relative;
}

.ov-weather-card--active {
  background: #2C2C2E;
  box-shadow: none;
}

.ov-weather-card--active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: #E8763A;
}

.ov-weather-card--active .ov-weather-day { color: rgba(255,255,255,0.55); }
.ov-weather-card--active .ov-weather-temp { color: #FFFFFF; }
.ov-weather-card--active .ov-weather-range { color: rgba(255,255,255,0.4); }

.ov-weather-day {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-bottom: 6px;
}

.ov-weather-icon {
  font-size: 22px;
  line-height: 1;
  margin-bottom: 6px;
}

.ov-weather-temp {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.ov-weather-range {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--muted);
}

/* ── Trip at a Glance — split card matching countdown/planning ── */

.ov-glance {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: inset 0 0 0 1px var(--border);
  margin: 10px 0 20px;
}

.ov-glance-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 84px;
  padding-right: 18px;
}

.ov-glance-hero-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 4px;
}

.ov-glance-hero-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.ov-glance-div {
  width: 1px;
  background: var(--border);
  margin-right: 18px;
  flex-shrink: 0;
}

.ov-glance-cats {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.ov-glance-cat {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ov-glance-cat-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2.5px rgba(0, 0, 0, 0.04);
}
[data-theme="dark"] .ov-glance-cat-dot {
  box-shadow: 0 0 0 2.5px rgba(255, 255, 255, 0.05);
}

.ov-glance-cat-name {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.01em;
}

.ov-glance-cat-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 1.5em;
  text-align: right;
}

/* ── Legacy ledger styles (dead after redesign) ── */

.ov-ledger {
  margin: 8px 2px 22px;
  padding: 4px 0 2px;
}

.ov-ledger-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 2px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.09);
}
[data-theme="dark"] .ov-ledger-head {
  border-bottom-color: rgba(255, 255, 255, 0.09);
}

.ov-ledger-head-num {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}
.ov-ledger-head-word {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 2px;
}

.ov-ledger-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ov-ledger-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.ov-ledger-row:last-child {
  border-bottom: none;
}
[data-theme="dark"] .ov-ledger-row {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

.ov-ledger-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  transform: translateY(-1px);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.035);
}
[data-theme="dark"] .ov-ledger-dot {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.ov-ledger-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}

.ov-ledger-leader {
  flex: 1;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.14);
  height: 1px;
  transform: translateY(-5px);
  margin: 0 4px;
}
[data-theme="dark"] .ov-ledger-leader {
  border-bottom-color: rgba(255, 255, 255, 0.14);
}

.ov-ledger-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  min-width: 1.5em;
  text-align: right;
}

/* ── Legacy glance cards (kept for backward compat) ── */

.ov-glance-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 4px;
  margin: 10px 0 22px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ov-glance-row::-webkit-scrollbar { display: none; }

.ov-glance-card {
  position: relative;
  min-width: 96px;
  padding: 16px 16px 14px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--border);
  text-align: left;
  flex-shrink: 0;
}

.ov-glance-card--total {
  background: var(--text);
  box-shadow: none;
}
.ov-glance-card--total .ov-glance-num { color: var(--bg); }
.ov-glance-card--total .ov-glance-label { color: rgba(255, 255, 255, 0.55); }
[data-theme="dark"] .ov-glance-card--total .ov-glance-num { color: var(--bg); }
[data-theme="dark"] .ov-glance-card--total .ov-glance-label { color: rgba(255, 255, 255, 0.5); }

.ov-glance-dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-bottom: 14px;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}
[data-theme="dark"] .ov-glance-dot {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.ov-glance-num {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.ov-glance-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Countdown + Planning (side-by-side) ── */

.ov-duo-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.ov-countdown-card {
  flex: 1;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: inset 0 0 0 1px var(--border);
  display: flex;
  flex-direction: column;
}

.ov-countdown-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 4px;
}

.ov-countdown-number {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.ov-countdown-unit {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: auto;
}

.ov-countdown-date {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
}

.ov-planning-card {
  flex: 1;
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: inset 0 0 0 1px var(--border);
  display: flex;
  flex-direction: column;
}

.ov-planning-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ov-planning-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.ov-planning-counter {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.ov-planning-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 10px;
}

.ov-planning-fill {
  height: 100%;
  border-radius: 3px;
  background: #E8763A;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.ov-planning-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}

/* ── Route Timeline ──────────────────────── */

.ov-route-timeline {
  position: relative;
  padding-left: 24px;
  margin-bottom: 20px;
  /* --ov-line-top and --ov-line-height set at render time so the line
     spans exactly from the first dot's centre to the last dot's centre. */
  --ov-line-top: 24px;
  --ov-line-height: 0px;
}

.ov-route-timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: var(--ov-line-top);
  height: var(--ov-line-height);
  width: 2px;
  background: var(--border);
  z-index: 0;
}

.ov-route-card {
  position: relative;
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: inset 0 0 0 1px var(--border);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}

.ov-route-card:active {
  transform: scale(.985);
  box-shadow: inset 0 0 0 1px rgba(58, 107, 100, 0.35);
}

.ov-route-card--empty {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.08);
}

.ov-route-card--empty .ov-route-dates {
  color: #3A6B64;
  font-weight: 600;
}

/* Completed leg — soft green wash and subtle border */
.ov-route-card--past {
  background: linear-gradient(135deg, rgba(74, 158, 106, 0.10) 0%, rgba(74, 158, 106, 0.04) 100%);
  box-shadow: inset 0 0 0 1px rgba(74, 158, 106, 0.35);
}
.ov-route-card--past .ov-route-city { color: #2E6B45; }
.ov-route-card--past .ov-route-dates { color: rgba(46, 107, 69, 0.7); }
.ov-route-card--past .ov-route-nights {
  background: rgba(74, 158, 106, 0.15);
  color: #2E6B45;
}

/* Current leg — subtle accent ring with a pulse on the dot */
.ov-route-card--current {
  box-shadow: inset 0 0 0 1.5px rgba(58, 107, 100, 0.45);
}

.ov-route-dot {
  position: absolute;
  left: -24px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #3A6B64;
  background: var(--bg);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.ov-route-dot--empty {
  border-color: rgba(0,0,0,.2);
}

/* Completed — filled green circle with white check */
.ov-route-dot--done {
  width: 18px;
  height: 18px;
  left: -27px;
  top: 15px;
  border-color: #4A9E6A;
  background: #4A9E6A;
  box-shadow: 0 0 0 3px rgba(74, 158, 106, 0.2);
}
.ov-route-dot--done svg {
  width: 11px;
  height: 11px;
  display: block;
}

/* Currently travelling — solid teal with pulsing ring */
.ov-route-dot--now {
  background: #3A6B64;
  border-color: #3A6B64;
  box-shadow: 0 0 0 0 rgba(58, 107, 100, 0.45);
  animation: ovDotPulse 1.8s ease-out infinite;
}

@keyframes ovDotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(58, 107, 100, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(58, 107, 100, 0); }
  100% { box-shadow: 0 0 0 0 rgba(58, 107, 100, 0); }
}

.ov-route-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ov-route-city {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.ov-route-dates {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
}

.ov-route-nights {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
  padding: 3px 10px;
  border-radius: 8px;
  margin-top: 6px;
  align-self: flex-end;
}

.ov-route-transport {
  position: relative;
  display: flex;
  align-items: center;
  padding: 6px 0;
  cursor: pointer;
  transition: opacity .15s ease;
}

.ov-route-transport:active { opacity: .6; }

.ov-route-transport-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--text);
  padding: 4px 10px;
  border-radius: 50px;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.08);
}

.ov-route-transport-badge--empty {
  color: #3A6B64;
  background: transparent;
  border: 1px dashed rgba(58, 107, 100, 0.35);
  font-weight: 600;
}

.ov-route-transport-badge svg { opacity: 0.7; }
.ov-route-transport-badge--empty svg { opacity: 1; }

/* ── KPI Cards (2x2 Grid) ───────────────── */

.ov-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}

.ov-kpi-card {
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: inset 0 0 0 1px var(--border);
}

.ov-kpi-icon {
  margin-bottom: 8px;
  color: var(--muted);
  line-height: 1;
}

.ov-kpi-icon svg {
  display: block;
}

.ov-kpi-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 4px;
}

.ov-kpi-value {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.ov-kpi-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── Travel Tips ─────────────────────────── */

/* Category palette — restrained luxury */
.ov-tip-card[data-category="culture"]   { --tip-accent: #A66B4E; }
.ov-tip-card[data-category="transport"] { --tip-accent: #4A6FA5; }
.ov-tip-card[data-category="food"]      { --tip-accent: #B8874C; }
.ov-tip-card[data-category="money"]     { --tip-accent: #6B8E6B; }
.ov-tip-card[data-category="safety"]    { --tip-accent: #B86B6B; }
.ov-tip-card[data-category="tips"]      { --tip-accent: #8B6FA5; }
.ov-tip-card                            { --tip-accent: #8B6FA5; }

.ov-tip-card {
  position: relative;
  background:
    radial-gradient(
      ellipse 120px 100px at 28px 28px,
      color-mix(in srgb, var(--tip-accent) 10%, transparent),
      transparent 100%
    ),
    var(--card);
  border-radius: 16px;
  padding: 16px 18px 16px 18px;
  margin-bottom: 12px;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--tip-accent) 8%, var(--border)),
    0 1px 3px rgba(0,0,0,0.04),
    0 6px 16px rgba(0,0,0,0.04),
    0 10px 28px color-mix(in srgb, var(--tip-accent) 5%, transparent);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

/* Soft inner shimmer along top edge */
.ov-tip-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(
      168deg,
      color-mix(in srgb, var(--tip-accent) 6%, rgba(255,255,255,0.35)) 0%,
      transparent 35%
    );
  pointer-events: none;
}

.ov-tip-card:active {
  transform: scale(0.985);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--tip-accent) 12%, var(--border)),
    0 1px 2px rgba(0,0,0,0.06),
    0 3px 8px color-mix(in srgb, var(--tip-accent) 6%, transparent);
}

.ov-tip-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--tip-accent) 14%, transparent),
    color-mix(in srgb, var(--tip-accent) 8%, transparent)
  );
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--tip-accent) 18%, transparent),
    0 2px 6px color-mix(in srgb, var(--tip-accent) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.ov-tip-icon {
  font-size: 22px;
  line-height: 1;
  filter: saturate(1.05);
}

.ov-tip-body {
  flex: 1;
  min-width: 0;
}

.ov-tip-category {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tip-accent);
  margin-bottom: 4px;
  opacity: 0.95;
}

.ov-tip-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}

.ov-tip-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
}


/* ═══════════════════════════════════════════
   DAYS TAB — Day Selector
   ═══════════════════════════════════════════ */

.days-selector-wrap {
  padding: 0 16px;
}

.days-selector-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.days-selector-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}


/* ═══════════════════════════════════════════
   DAYS TAB — Map-Integrated Detail
   ═══════════════════════════════════════════ */

.days-detail {
  padding: 0;
}

.days-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  margin: 0 16px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s;
}
.days-back-btn:active { color: var(--text); }

.days-header {
  padding: 0 16px 12px;
}

.days-header-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.days-header-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
}

/* ── Map Container ───────────────────────── */

.days-map-container {
  width: calc(100% - 32px);
  margin: 0 16px 14px;
  height: 260px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  position: relative;
}

/* Override Leaflet controls for our aesthetic */
.days-map-container .leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12) !important;
  border-radius: 10px !important;
  overflow: hidden;
}
.days-map-container .leaflet-control-zoom a {
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  font-size: 14px !important;
  color: var(--text) !important;
  background: var(--card) !important;
  border-bottom: 1px solid var(--border) !important;
}

/* Map pins */
.itin-map-pin { background: none !important; border: none !important; }
.itin-map-pin-inner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  color: var(--card);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.itin-map-pin-inner.active,
.itin-map-pin-inner.itin-pin-highlight {
  transform: scale(1.35);
  background: #4A8B7F;
  box-shadow: 0 4px 16px rgba(74,139,127,0.45);
}

/* Category-colored pins */
.itin-map-pin-inner[data-cat="food"]       { background: #C96B72; }
.itin-map-pin-inner[data-cat="sights"]     { background: #4A78C9; }
.itin-map-pin-inner[data-cat="activities"] { background: #6B8F6B; }

.itin-map-pin-inner[data-cat="food"].active,
.itin-map-pin-inner[data-cat="food"].itin-pin-highlight       { background: #C96B72; box-shadow: 0 4px 16px rgba(201,107,114,0.45); }
.itin-map-pin-inner[data-cat="sights"].active,
.itin-map-pin-inner[data-cat="sights"].itin-pin-highlight     { background: #4A78C9; box-shadow: 0 4px 16px rgba(74,120,201,0.45); }
.itin-map-pin-inner[data-cat="activities"].active,
.itin-map-pin-inner[data-cat="activities"].itin-pin-highlight { background: #6B8F6B; box-shadow: 0 4px 16px rgba(107,143,107,0.45); }

/* ── Stop list below map ─────────────────── */

.days-stop-list-wrap {
  padding: 0 16px;
}

.days-summary-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  margin: -2px 2px 14px;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.7;
}

.ide-cap-count {
  color: var(--text);
  opacity: 0.82;
  font-variant-numeric: tabular-nums;
}

.ide-cap-cat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.ide-cap-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-1px);
  box-shadow: 0 0 0 2.5px rgba(0, 0, 0, 0.04);
}

.ide-cap-sep {
  margin: 0 9px;
  opacity: 0.35;
}

/* Highlight on card when map pin tapped */
.ide-card-wrapper.itin-map-highlight {
  box-shadow: 0 0 0 2px #4A8B7F, 0 4px 12px rgba(74,139,127,0.15);
  border-radius: 14px;
  transition: box-shadow 0.3s cubic-bezier(0.16,1,0.3,1);
}


/* ═══════════════════════════════════════════
   NOTES TAB
   ═══════════════════════════════════════════ */

.notes-wrap {
  padding: 0 16px;
}

.notes-title {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

/* ── Filter Pills ────────────────────────── */

.notes-filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.notes-filter-row::-webkit-scrollbar { display: none; }

.notes-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease;
}

.notes-filter-pill.active {
  background: var(--text);
  color: var(--card);
  border-color: var(--text);
}

/* ── Note Cards (shared) ─────────────────── */

.note-card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px 18px 14px;
  margin-bottom: 12px;
  box-shadow: inset 0 0 0 1px var(--border);
  position: relative;
  transition: transform 0.2s;
}

.note-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.note-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.note-type-badge {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
  padding: 3px 10px;
  border-radius: 6px;
}

/* ── Checklist: Progress ─────────────────── */

.note-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.note-progress-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.note-progress-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.note-progress-bar {
  height: 100%;
  background: #8B7355;
  border-radius: 3px;
  transition: width 0.45s cubic-bezier(0.16,1,0.3,1);
}

.note-progress-pct {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  min-width: 28px;
  text-align: right;
}

/* ── Checklist: Items ────────────────────── */

.note-check-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-top: 1px solid var(--border);
}
.note-check-item:first-of-type {
  border-top: none;
}

.note-check-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
  background: transparent;
}

.note-check-item.checked .note-check-circle {
  background: #8B7355;
  border-color: #8B7355;
}

.note-check-circle svg {
  opacity: 0;
  transition: opacity 0.15s;
}

.note-check-item.checked .note-check-circle svg {
  opacity: 1;
}

.note-check-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  line-height: 1.3;
  transition: all 0.2s;
}

.note-check-item.checked .note-check-text {
  text-decoration: line-through;
  color: var(--muted);
  opacity: 0.6;
}

/* ── Reminder ────────────────────────────── */

.note-reminder-datetime {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
  padding: 5px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.note-reminder-datetime svg {
  flex-shrink: 0;
}

.note-reminder-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  line-height: 1.55;
}

/* ── Info ─────────────────────────────────── */

.note-info-lines {
  display: flex;
  flex-direction: column;
}

.note-info-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.note-info-line:first-child {
  border-top: none;
}

/* ── Card Actions Row ────────────────────── */

.note-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  padding-top: 8px;
}

.note-edit-btn,
.note-delete-btn {
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.25;
  transition: opacity 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  color: var(--muted);
  border-radius: 6px;
}
.note-edit-btn:active { opacity: 0.6; }
.note-delete-btn:active {
  opacity: 1;
  color: #C96B72;
}

/* ── Delete Confirmation ─────────────────── */

.note-delete-confirm {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 0 2px;
  margin-top: 8px;
  border-top: 1px solid rgba(201,107,114,0.2);
}

.note-delete-confirm-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #C96B72;
  flex: 1;
}

.note-delete-confirm-cancel {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.note-delete-confirm-cancel:active { background: rgba(0,0,0,0.04); }

.note-delete-confirm-yes {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #C96B72;
  border: none;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}
.note-delete-confirm-yes:active { opacity: 0.8; }

/* Card pending-delete state */
.note-card--delete-pending {
  box-shadow: inset 0 0 0 1.5px rgba(201,107,114,0.4);
}

/* ── FAB (Floating Action Button) ────────── */

.notes-fab {
  position: fixed;
  right: calc(50% - 175px);
  bottom: 100px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--text);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: 50;
  -webkit-tap-highlight-color: transparent;
  animation: notesFabIn 0.3s cubic-bezier(0.16,1,0.3,1);
}
.notes-fab:active { transform: scale(0.92); }

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

.notes-fab svg {
  color: var(--card);
}

/* ── Add Note Sheet ──────────────────────── */

.note-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: noteFadeIn 0.2s ease;
}

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

.note-sheet {
  width: 100%;
  max-width: 390px;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 28px;
  animation: noteSlideUp 0.35s cubic-bezier(0.16,1,0.3,1);
}

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

.note-sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.note-sheet-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
  text-align: center;
}

/* Sheet type-picker option cards */

.note-sheet-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.note-sheet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--bg);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
  text-align: left;
}
.note-sheet-option:active { transform: scale(0.98); }

.note-sheet-option-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.note-sheet-option-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.note-sheet-option-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--muted);
}

.note-sheet-option-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.note-sheet-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--card);
  border: 1.5px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
  color: var(--muted);
}
.note-sheet-close:active { transform: scale(0.92); }

/* ── Note Edit Form ──────────────────────── */

.note-form-group {
  margin-bottom: 14px;
}

.note-form-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  margin-bottom: 6px;
  display: block;
}

.note-form-input {
  width: 100%;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.note-form-input:focus { border-color: var(--text); }

.note-form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.note-form-textarea:focus { border-color: var(--text); }

.note-form-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.note-form-cancel {
  flex: 1;
  padding: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.note-form-save {
  flex: 1;
  padding: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--card);
  background: var(--text);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.note-form-save:active { opacity: 0.85; }

/* ── Notes Empty State ───────────────────── */

.notes-empty {
  text-align: center;
  padding: 48px 24px;
}

.notes-empty-icon {
  margin-bottom: 12px;
  opacity: 0.3;
}

.notes-empty-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.notes-empty-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
}


/* ═══════════════════════════════════════════
   FINANCIALS TAB
   ═══════════════════════════════════════════ */

.fin-wrap {
  padding: 0 16px;
}

.fin-title {
  font-family: 'Playfair Display', serif;
  font-size: 34px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

/* ── Budget Summary Card ────────────────── */

.fin-budget-card {
  background: #2C2C2E;
  border-radius: 16px;
  padding: 20px 18px 16px;
  margin-bottom: 14px;
}

.fin-budget-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.fin-budget-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
}

.fin-budget-amount {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fin-budget-edit {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}
.fin-budget-edit:active { color: rgba(255,255,255,0.7); }

.fin-budget-right {
  text-align: right;
}

.fin-budget-remaining {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
}

.fin-budget-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.08);
}

.fin-budget-bar-seg {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.16,1,0.3,1);
}

.fin-budget-footer {
  display: flex;
  justify-content: space-between;
}

.fin-budget-spent {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.fin-budget-total {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

/* ── Currency Converter ─────────────────── */

.fin-converter-card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  box-shadow: inset 0 0 0 1px var(--border);
  margin-bottom: 18px;
}

.fin-converter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.fin-section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.fin-converter-swap-icon {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
}

.fin-converter-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.fin-converter-input {
  flex: 1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  outline: none;
  min-width: 0;
  -moz-appearance: textfield;
}
.fin-converter-input::-webkit-outer-spin-button,
.fin-converter-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.fin-converter-input:focus { border-color: var(--text); }

.fin-converter-output {
  flex: 1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
}

.fin-converter-select-wrap {
  position: relative;
  flex-shrink: 0;
}

.fin-converter-select {
  width: 80px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 28px 12px 12px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238A7D72' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.fin-converter-currency-lock {
  width: 80px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  flex-shrink: 0;
  cursor: pointer;
}

.fin-converter-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.fin-converter-cog {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  opacity: 0.5;
  transition: opacity 0.2s, color 0.2s;
}
.fin-converter-cog:hover,
.fin-converter-cog:active {
  opacity: 1;
  color: var(--text);
}
.fin-converter-reset {
  background: none;
  border: none;
  color: #4A8C8A;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  opacity: 0.7;
  transition: opacity 0.2s, transform 0.2s;
}
.fin-converter-reset:active {
  opacity: 1;
  transform: rotate(-45deg);
}

/* ── Currency Settings Sheet ──────────── */

.fin-currency-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1);
}
.fin-currency-sheet-overlay.open {
  opacity: 1;
}

.fin-currency-sheet {
  width: 100%;
  max-width: 390px;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 12px 24px 32px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
}
.fin-currency-sheet-overlay.open .fin-currency-sheet {
  transform: translateY(0);
}

.fin-currency-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 0 auto 16px;
}

.fin-currency-sheet-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 20px;
}

.fin-currency-sheet-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

.fin-currency-sheet-select {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238A7D72' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.fin-currency-sheet-select:focus {
  border-color: var(--text);
}

.fin-currency-sheet-save {
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent, #4A8C8A);
  border: none;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.2s;
}
.fin-currency-sheet-save:active {
  opacity: 0.85;
}

.fin-converter-swap-btn {
  display: flex;
  justify-content: center;
  padding: 6px 0;
}

.fin-converter-swap-btn button {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s;
}
.fin-converter-swap-btn button:active { transform: scale(0.9); }

.fin-converter-rate {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
}

/* ── View Toggle ────────────────────────── */

.fin-toggle-row {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.fin-toggle-pill {
  flex: 1;
  padding: 9px 0;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease;
}

.fin-toggle-pill.active {
  background: var(--text);
  color: var(--card);
  border-color: var(--text);
}

/* ── Breakdown View ─────────────────────── */

.fin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.fin-section-count {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
}

.fin-breakdown-item {
  margin-bottom: 16px;
}

.fin-breakdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.fin-breakdown-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fin-breakdown-name {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.fin-breakdown-amount {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.fin-breakdown-bar-wrap {
  height: 4px;
  border-radius: 2px;
  background: rgba(0,0,0,0.06);
  overflow: hidden;
}

.fin-breakdown-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s cubic-bezier(0.16,1,0.3,1);
}

/* ── Timeline View ──────────────────────── */

.fin-timeline-group {
  margin-bottom: 20px;
  position: relative;
  padding-left: 22px;
}

.fin-timeline-group::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 28px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
  border-radius: 1px;
}

.fin-timeline-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.fin-timeline-date {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.fin-timeline-day-total {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.fin-timeline-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  position: relative;
}

.fin-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  position: absolute;
  left: -22px;
  top: 13px;
  z-index: 1;
}

.fin-timeline-entry-body {
  flex: 1;
}

.fin-timeline-entry-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.fin-timeline-entry-cat {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.fin-timeline-entry-amount {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  flex-shrink: 0;
}

/* ── FAB ─────────────────────────────────── */

.fin-fab {
  position: fixed;
  right: calc(50% - 175px);
  bottom: 100px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--text);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: 50;
  -webkit-tap-highlight-color: transparent;
  animation: finFabIn 0.3s cubic-bezier(0.16,1,0.3,1);
}
.fin-fab:active { transform: scale(0.92); }
.fin-fab svg { color: var(--card); }

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

/* ── Expense Sheet ──────────────────────── */

.fin-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: noteFadeIn 0.2s ease;
}

.fin-sheet {
  width: 100%;
  max-width: 390px;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 12px 20px 32px;
  animation: noteSlideUp 0.35s cubic-bezier(0.16,1,0.3,1);
}

.fin-sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.fin-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.fin-sheet-cancel {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.fin-sheet-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.fin-sheet-save {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}
.fin-sheet-save:active { color: var(--text); }

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

.fin-form-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}

.fin-form-input {
  width: 100%;
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.fin-form-input:focus { border-color: var(--text); }

.fin-amount-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color 0.2s;
}
.fin-amount-input-wrap:focus-within { border-color: var(--text); }

.fin-amount-prefix {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
}

.fin-amount-input {
  flex: 1;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  outline: none;
  padding: 10px 8px;
  min-width: 0;
  -moz-appearance: textfield;
}
.fin-amount-input::-webkit-outer-spin-button,
.fin-amount-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.fin-exp-swap-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(0,0,0,0.04);
  border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.fin-exp-swap-btn:active {
  background: rgba(0,0,0,0.1);
}

.fin-exp-conv-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  min-height: 16px;
  margin-top: 6px;
  padding-left: 2px;
}

/* ── Category Chips ─────────────────────── */

.fin-cat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fin-cat-chip {
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s ease;
}

.fin-cat-chip.active {
  background: var(--cat-color);
  color: #fff;
  border-color: var(--cat-color);
}

/* ── Empty State ────────────────────────── */

.fin-empty {
  text-align: center;
  padding: 48px 24px;
}

.fin-empty-icon {
  margin-bottom: 12px;
  opacity: 0.3;
}

.fin-empty-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.fin-empty-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--muted);
}

/* ═══ Route Editor Bottom Sheet ═══ */

.rte-overlay {
  position: fixed; inset: 0;
  background: rgba(20,15,10,.55);
  backdrop-filter: blur(8px);
  z-index: 400;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
}
.rte-overlay.open { opacity: 1; pointer-events: all; }

.rte-sheet {
  width: 100%; max-width: 390px;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  transform: translateY(100%);
  transition: transform .38s cubic-bezier(.32,.72,0,1);
  max-height: 90vh;
  overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
.rte-overlay.open .rte-sheet { transform: translateY(0); }

.rte-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: rgba(0,0,0,.15);
  margin: 10px auto 8px;
}

.rte-body { padding: 4px 22px 22px; }

.rte-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.rte-title {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  line-height: 1.15;
}

/* Transport modes grid */
.rte-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.rte-mode {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 6px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 600;
  color: var(--text);
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}

.rte-mode:active { transform: scale(.97); }

.rte-mode--active {
  border-color: #3A6B64;
  background: rgba(58, 107, 100, 0.08);
  color: #3A6B64;
}

.rte-mode-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: inherit;
}

.rte-mode-icon svg { width: 20px; height: 20px; }

/* Field labels and inputs */
.rte-field-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px; font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.rte-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease;
  box-sizing: border-box;
}

.rte-input:focus { border-color: #3A6B64; }
.rte-input--date { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }

.rte-hint {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  margin-bottom: 8px;
}

/* Date range layout */
.rte-date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.rte-date-cell { display: flex; flex-direction: column; }

.rte-nights-row {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 600;
  color: #3A6B64;
  background: rgba(58, 107, 100, 0.1);
  padding: 5px 12px;
  border-radius: 50px;
  margin-bottom: 22px;
}

/* Action buttons */
.rte-actions {
  display: flex; gap: 10px;
  margin-top: 18px;
}

.rte-btn {
  flex: 1;
  padding: 13px 16px;
  border-radius: 12px;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: transform .1s ease, opacity .15s ease;
}

.rte-btn:active { transform: scale(.98); }

.rte-btn--secondary {
  background: rgba(0,0,0,.05);
  color: var(--text);
}

.rte-btn--primary {
  background: var(--text);
  color: var(--bg);
}
