/* travel2/assets/css/travel.css */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f1a;
  --surface: #1a1a2e;
  --surface2: #16213e;
  --accent: #3a7bd5;
  --text: #f0f0f0;
  --text-muted: #888;
  --border: rgba(255,255,255,0.08);
  --radius: 12px;
  --header-h: 56px;
  --tabs-h: 48px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body { height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 15px; overflow: hidden; }

/* ── PIN screen ──────────────────────────────────────────────────────────── */
#pin-screen { position:fixed; inset:0; background:var(--bg); display:flex; align-items:center; justify-content:center; z-index:1000; }
.pin-wrap { display:flex; flex-direction:column; align-items:center; gap:14px; padding:40px 24px; width:100%; max-width:340px; }
.pin-logo { font-size:52px; }
.pin-wrap h1 { font-size:26px; font-weight:700; margin-bottom:2px; }
.login-subtitle { font-size:14px; color:var(--text-muted); margin-bottom:8px; }
.pin-wrap input[type=email],
.pin-wrap input[type=text],
.pin-wrap input[type=password] { width:100%; padding:14px 16px; border-radius:12px; border:1px solid var(--border); background:var(--surface2); color:var(--text-primary); font-size:16px; box-sizing:border-box; }
.pin-wrap input:focus { outline:none; border-color:var(--accent); }
.btn-login { width:100%; padding:15px; border-radius:12px; background:var(--accent); color:#fff; border:none; font-size:16px; font-weight:700; cursor:pointer; margin-top:4px; }
.btn-login:disabled { opacity:0.6; cursor:not-allowed; }
.pin-wrap input { width:100%; padding:14px; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface2); color:var(--text); font-size:18px; text-align:center; letter-spacing:4px; }
.pin-error { color:#e05; font-size:13px; min-height:18px; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.app-header { position:fixed; top:0; left:0; right:0; height:var(--header-h); background:var(--surface); border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; padding:0 12px; z-index:100; }
.header-left { display:flex; align-items:center; gap:8px; }
#header-trip-name { font-weight:600; font-size:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:160px; }
.header-right { display:flex; gap:4px; }
.icon-btn { background:none; border:none; color:var(--text); font-size:20px; padding:8px; cursor:pointer; border-radius:8px; }
.icon-btn:active { background:var(--border); }

/* ── Date tabs ───────────────────────────────────────────────────────────── */
.date-tabs { position:fixed; top:var(--header-h); left:0; right:0; height:var(--tabs-h); background:var(--surface); border-bottom:1px solid var(--border); display:flex; align-items:center; gap:4px; padding:0 8px; overflow-x:auto; z-index:99; scrollbar-width:none; }
.date-tabs::-webkit-scrollbar { display:none; }
.date-tab { flex-shrink:0; padding:6px 12px; border-radius:20px; border:none; background:transparent; color:var(--text-muted); font-size:13px; cursor:pointer; white-space:nowrap; transition:background 0.15s; }
.date-tab.active { background:var(--accent); color:#fff; font-weight:600; }
.date-tab.today { border:1px solid var(--accent); color:var(--accent); }

/* ── Feed ────────────────────────────────────────────────────────────────── */
.feed-list { position:fixed; top:calc(var(--header-h) + var(--tabs-h)); bottom:calc(72px + var(--safe-bottom)); left:0; right:0; overflow-y:auto; padding:8px 12px 16px; }
.feed-empty { color:var(--text-muted); text-align:center; margin-top:40px; font-size:15px; }

/* ── Timeline rows ───────────────────────────────────────────────────────── */
.tl-row { background:var(--surface); border-radius:var(--radius); margin-bottom:6px; overflow:hidden; cursor:pointer; transition:opacity 0.15s; }
.tl-row:active { opacity:0.7; }
.tl-row.auto-moment { opacity:0.75; }
.tl-row.planned { border:1px dashed var(--border); }
.tl-row.today { border:1px solid #f0a500; }
.tl-row.overdue { border:1px solid #e05; }

.tl-content { display:flex; align-items:stretch; padding:10px 12px 10px 0; position:relative; }
.tl-accent-bar { width:4px; flex-shrink:0; margin-right:10px; background:var(--accent); border-radius:2px; }
.tl-left { flex:1; min-width:0; }
.tl-right { display:flex; flex-direction:column; align-items:flex-end; justify-content:center; gap:2px; flex-shrink:0; padding-left:8px; }

.tl-line1 { display:flex; align-items:center; gap:6px; margin-bottom:2px; }
.tl-icon { font-size:18px; flex-shrink:0; }
.tl-name { font-weight:600; font-size:14px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tl-line2 { font-size:12px; color:var(--text-muted); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.tl-meta { font-size:12px; color:var(--text-muted); display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-top:2px; }
.tl-chip { background:rgba(255,255,255,0.08); border-radius:10px; padding:1px 7px; font-size:11px; }
.tl-time { font-size:12px; color:var(--text-muted); white-space:nowrap; }
.tl-tz { font-size:10px; color:#6af; background:rgba(100,170,255,0.12); border-radius:8px; padding:1px 5px; }
.tl-note-prev { font-size:11px; color:var(--text-muted); font-style:italic; }
.tl-dir-label { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.5px; }
.tl-dir-time { font-size:13px; font-weight:600; }
.tl-status-chip { font-size:10px; border-radius:8px; padding:1px 7px; background:#f0a500; color:#000; }
.tl-status-chip.overdue { background:#e05; color:#fff; }

/* ── Flight connector ────────────────────────────────────────────────────── */
.tl-flight-connector { text-align:center; padding:4px 0; color:var(--text-muted); font-size:12px; }
.tl-flight-stats { background:var(--surface2); border-radius:10px; padding:2px 10px; }

/* ── Arrow connector ─────────────────────────────────────────────────────── */
.tl-arrow { text-align:center; color:var(--border); font-size:16px; padding:2px 0; }

/* ── FAB ─────────────────────────────────────────────────────────────────── */
.fab { position:fixed; bottom:calc(20px + var(--safe-bottom)); right:20px; width:56px; height:56px; border-radius:50%; background:var(--accent); border:none; color:#fff; font-size:28px; cursor:pointer; box-shadow:0 4px 20px rgba(58,123,213,0.5); z-index:200; display:flex; align-items:center; justify-content:center; }
.fab:active { transform:scale(0.93); }
.fab-gps { bottom:calc(88px + var(--safe-bottom)); background:#2ecc71; box-shadow:0 4px 20px rgba(46,204,113,0.5); font-size:22px; }

/* ── Overlays ────────────────────────────────────────────────────────────── */
.overlay { position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:300; display:flex; align-items:flex-end; justify-content:center; opacity:0; pointer-events:none; transition:opacity 0.2s; }
.overlay.open { opacity:1; pointer-events:all; }
.overlay-card { background:var(--surface); border-radius:var(--radius) var(--radius) 0 0; width:100%; max-width:600px; max-height:80vh; overflow-y:auto; padding:16px; }
.overlay-header { display:flex; align-items:center; justify-content:space-between; font-weight:600; font-size:16px; margin-bottom:12px; }

/* ── Type picker grid ────────────────────────────────────────────────────── */
.type-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; padding:4px 0; }
.type-tile { background:var(--surface2); border-radius:var(--radius); padding:16px 8px; text-align:center; cursor:pointer; border:1px solid var(--border); transition:border-color 0.15s; }
.type-tile:active { border-color:var(--accent); }
.type-tile-icon { font-size:28px; display:block; margin-bottom:6px; }
.type-tile-label { font-size:12px; color:var(--text-muted); }

/* ── Bottom sheet — full screen ──────────────────────────────────────────── */
.bottom-sheet { position:fixed; inset:0; background:var(--surface); transform:translateY(100%); transition:transform 0.35s cubic-bezier(.32,.72,0,1); z-index:400; display:flex; flex-direction:column; }
.bottom-sheet.open { transform:translateY(0); }
.sheet-handle { display:none; }
/* Sticky header */
.sheet-header { flex-shrink:0; display:flex; align-items:center; gap:10px; padding:calc(env(safe-area-inset-top,0px) + 14px) 16px 14px; background:var(--surface); border-bottom:1px solid var(--border); }
.sh-header-left { display:flex; flex-direction:column; flex:1; min-width:0; }
.sh-subtype-badge { font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:0.6px; color:var(--text-muted); margin-bottom:2px; }
#sh-title { font-size:18px; font-weight:700; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.close-btn { background:none; border:none; color:var(--text-muted); font-size:22px; cursor:pointer; padding:4px; flex-shrink:0; line-height:1; }
/* Scrollable body */
.sheet-body { flex:1; overflow-y:auto; padding:16px 16px 0; -webkit-overflow-scrolling:touch; }
/* Core fields section heading */
.sh-section-title { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.8px; color:var(--text-muted); margin:4px 0 12px; padding-bottom:6px; border-bottom:1px solid var(--border); }
/* Collapsible modules */
.sh-module { border-radius:var(--radius); overflow:hidden; margin-bottom:6px; }
.sh-module summary { display:flex; align-items:center; gap:10px; padding:13px 14px; cursor:pointer; list-style:none; background:var(--surface2); font-size:14px; font-weight:600; user-select:none; -webkit-tap-highlight-color:transparent; }
.sh-module summary::-webkit-details-marker { display:none; }
.sh-module-arrow { margin-left:auto; color:var(--text-muted); font-size:12px; transition:transform 0.2s; }
.sh-module[open] .sh-module-arrow { transform:rotate(90deg); }
.sh-module-body { background:var(--surface2); border-top:1px solid var(--border); padding:12px 14px 14px; }
.sh-modules-wrap { padding-bottom:16px; }

/* ── Form fields ─────────────────────────────────────────────────────────── */
.field-group { margin-bottom:12px; }
.field-group label { display:block; font-size:12px; color:var(--text-muted); margin-bottom:4px; text-transform:uppercase; letter-spacing:0.5px; }
.field-row { display:flex; gap:8px; }
.field-group.half { flex:1; }
input[type=text], input[type=url], input[type=datetime-local], input[type=date], input[type=password], textarea, select {
  width:100%; padding:10px 12px; border-radius:var(--radius); border:1px solid var(--border);
  background:var(--surface2); color:var(--text); font-size:14px; outline:none;
}
input:focus, textarea:focus { border-color:var(--accent); }
textarea { resize:none; }

.suggestions { background:var(--surface2); border-radius:var(--radius); overflow:hidden; }
.suggestion-item { padding:10px 12px; cursor:pointer; font-size:13px; border-bottom:1px solid var(--border); }
.suggestion-item:last-child { border-bottom:none; }
.suggestion-item:active { background:var(--border); }

.chip-row { display:flex; flex-wrap:wrap; gap:6px; }
.chip { padding:5px 12px; border-radius:20px; border:1px solid var(--border); background:transparent; color:var(--text-muted); font-size:13px; cursor:pointer; }
.chip.sel, .chip.selected { background:var(--accent); border-color:var(--accent); color:#fff; }

.star-row { display:flex; gap:4px; }
.star { font-size:24px; cursor:pointer; color:var(--border); }
.star.on { color:#f0a500; }

.tz-badge { background:rgba(100,170,255,0.15); color:#6af; border-radius:8px; padding:3px 8px; font-size:11px; display:inline-block; margin-top:4px; }

/* ── Sheet actions — sticky footer ──────────────────────────────────────── */
.sheet-actions { flex-shrink:0; display:flex; gap:8px; padding:12px 16px calc(12px + var(--safe-bottom)); background:var(--surface); border-top:1px solid var(--border); }
.btn-primary { flex:1; padding:13px; border-radius:var(--radius); border:none; background:var(--accent); color:#fff; font-size:15px; font-weight:600; cursor:pointer; }
.btn-primary:active { opacity:0.85; }
.btn-danger { padding:13px 20px; border-radius:var(--radius); border:1px solid #e05; background:transparent; color:#e05; font-size:15px; cursor:pointer; }

/* ── Links ───────────────────────────────────────────────────────────────── */
.link-add-row { display:flex; gap:6px; margin-bottom:6px; }
.link-add-row input { flex:1; }
.link-add-row button { padding:10px 14px; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface2); color:var(--text); cursor:pointer; }
.link-entry { display:flex; align-items:center; justify-content:space-between; background:var(--surface2); border-radius:8px; padding:6px 10px; margin-bottom:4px; font-size:12px; }
.link-entry a { color:#6af; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; flex:1; }
.link-remove-btn { background:none; border:none; color:var(--text-muted); cursor:pointer; padding:0 0 0 8px; font-size:16px; }

/* ── Trip list ───────────────────────────────────────────────────────────── */
.trip-item { padding:12px; border-radius:var(--radius); background:var(--surface2); margin-bottom:8px; cursor:pointer; display:flex; align-items:center; justify-content:space-between; }
.trip-item.active { border:1px solid var(--accent); }
.trip-item-name { font-weight:600; }
.trip-item-sub { font-size:12px; color:var(--text-muted); }

/* ── Budget panel ────────────────────────────────────────────────────────── */
#budget-panel { align-items:flex-end; }
.cost-row { display:flex; gap:8px; margin-bottom:8px; align-items:center; }
.cost-row input { flex:1; }
.cost-total { font-size:18px; font-weight:700; color:var(--accent); padding:8px 0; }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast { position:fixed; bottom:calc(80px + var(--safe-bottom)); left:50%; transform:translateX(-50%) translateY(20px); background:rgba(30,30,50,0.95); color:#fff; padding:10px 20px; border-radius:20px; font-size:13px; opacity:0; transition:opacity 0.2s, transform 0.2s; pointer-events:none; z-index:999; white-space:nowrap; }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* ── New trip form ───────────────────────────────────────────────────────── */
#new-trip-form { display:flex; flex-direction:column; gap:8px; margin-top:12px; padding-top:12px; border-top:1px solid var(--border); }
/* ── Split date/time row ─────────────────────────── */
.dt-row { display:flex; gap:8px; }
.dt-date { flex:1.4; }
.dt-time { flex:1; }
.dt-date, .dt-time {
    font-size:16px;
    padding:10px 12px;
}

/* ── Moment card prefix label ────────────────────── */
.tl-prefix {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.85em;
}
.tl-muted { color: var(--text-muted); }
/* ── Trip wizard collapsible sections ──────────────────────────────────── */
.nt-collapsible-hdr { display:flex; align-items:center; gap:8px; padding:10px 0; font-size:14px; font-weight:600; cursor:pointer; border-top:1px solid var(--border); user-select:none; }
.nt-optional { font-size:11px; color:var(--text-muted); font-weight:400; }
.nt-collapsible-hdr span:last-child { margin-left:auto; color:var(--text-muted); }
.nt-sub-label { font-size:11px; color:var(--text-muted); margin-bottom:4px; margin-top:4px; }
.nt-checkbox-row { display:flex; align-items:center; gap:8px; font-size:13px; cursor:pointer; padding:4px 0; }
.nt-night-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.nt-night-date { font-size:12px; color:var(--text-muted); min-width:54px; }
.nt-night-place { position:relative; flex:1; }
/* flight_dep readonly arrival summary */
.sh-arr-summary {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 10px 14px;
}
.sh-arr-summary-place {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.sh-arr-summary-dt {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
/* ── Swipe-left actions ───────────────────────────────────────── */
.swipe-row {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  margin-bottom: 8px;
}
.swipe-inner {
  position: relative;
  z-index: 2;
  transform: translateX(0);
  will-change: transform;
}
.swipe-inner .tl-row {
  margin-bottom: 0;
  border-radius: 14px;
}
.swipe-action-btn {
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}
.swipe-action-label {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.3;
  white-space: nowrap;
}
.tl-actioned-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}
/* actioned warning banner in edit sheet */
.sh-actioned-warning {
  background: #FF9500;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 16px;
  text-align: center;
  flex-shrink: 0;
}
/* actioned warning banner in edit sheet */
.sh-actioned-warning {
  margin: 12px 16px 0;
  padding: 10px 14px;
  background: rgba(255,149,0,0.15);
  border: 1px solid rgba(255,149,0,0.4);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #c87000;
  text-align: center;
}
/* ── Nearby map picker ───────────────────────────────────────────────────── */
.place-input-row { display:flex; gap:6px; align-items:center; }
.place-input-row .form-input { flex:1; }
.nearby-map-btn {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.nearby-map-btn:active { background: var(--border); }
.nearby-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top,0px) + 14px) 16px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 17px; font-weight: 700;
  flex-shrink: 0;
}
.nearby-map {
  flex: 1;
  min-height: 0;
}
.nearby-list {
  flex-shrink: 0;
  height: 45vh;
  overflow-y: auto;
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}
.nearby-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.nearby-item:active { background: var(--surface); }
.nearby-item-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.nearby-item-sub { font-size: 12px; color: var(--text-muted); display:flex; gap:8px; }
.nearby-dist { color: var(--accent); font-weight: 600; }
.nearby-loading { padding: 24px 16px; text-align: center; color: var(--text-muted); font-size: 14px; }
/* ── Voice Memo ──────────────────────────────────────────────────────────── */
.btn-record { width:100%; padding:11px; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:14px; cursor:pointer; text-align:center; }
.btn-record:active { opacity:0.8; }
#vm-status { font-size:12px; color:var(--text-muted); margin-top:6px; min-height:16px; }
#vm-playback { margin-top:8px; }
.vm-del-btn { margin-top:6px; background:none; border:none; color:#e05; cursor:pointer; font-size:13px; padding:0; }
.vm-badge { display:inline-block; border-radius:20px; padding:2px 8px; font-size:11px; font-weight:600; margin-bottom:4px; }
.vm-badge--local  { background:rgba(240,165,0,0.2); color:#f0a500; }
.vm-badge--synced { background:rgba(0,200,100,0.15); color:#00c864; }
.vm-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:8px 10px; margin-top:8px; }

/* ── Media logging ───────────────────────────────────────────────────────── */
.media-log-row { display:flex; align-items:center; gap:8px; margin-bottom:10px; }
.btn-log-media { padding:9px 14px; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:13px; cursor:pointer; }
.media-phone-sel { padding:9px 8px; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface2); color:var(--text); font-size:13px; }
.media-summary { font-size:12px; color:var(--text-muted); margin-bottom:6px; }
.media-item { display:flex; align-items:center; gap:6px; padding:6px 0; border-bottom:1px solid var(--border); font-size:12px; }
.media-fname { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.media-phone { color:var(--text-muted); font-size:11px; flex-shrink:0; }
.media-del-btn { background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:14px; padding:0 2px; }

/* ── Music ───────────────────────────────────────────────────────────────── */
.music-identify-row { display:flex; align-items:center; gap:10px; margin-top:8px; }
.btn-music-identify { flex:1; padding:11px; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:14px; cursor:pointer; }
.btn-music-identify:disabled { opacity:0.5; }
.music-countdown { font-size:13px; color:var(--text-muted); flex-shrink:0; }
.music-track-card { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid var(--border); }
.music-cover { width:48px; height:48px; border-radius:6px; object-fit:cover; flex-shrink:0; }
.music-cover-placeholder { width:48px; height:48px; border-radius:6px; background:var(--surface); display:flex; align-items:center; justify-content:center; font-size:24px; flex-shrink:0; }
.music-track-info { flex:1; min-width:0; }
.music-track-title  { font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.music-track-artist { font-size:12px; color:var(--text-muted); }
.music-track-album  { font-size:11px; color:var(--text-muted); font-style:italic; }
.music-track-links  { display:flex; gap:6px; margin-top:4px; }
.music-link { font-size:11px; padding:2px 7px; border-radius:20px; text-decoration:none; }
.music-link-spot  { background:#1db954; color:#fff; }
.music-link-apple { background:#fc3c44; color:#fff; }
.music-track-remove { background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:16px; padding:0 2px; flex-shrink:0; }

/* ── Weather ─────────────────────────────────────────────────────────────── */
.wx-note { font-size:12px; color:var(--text-muted); padding:6px 0; }
.wx-scroll { display:flex; gap:6px; overflow-x:auto; padding-bottom:4px; scrollbar-width:none; }
.wx-scroll::-webkit-scrollbar { display:none; }
.wx-card { flex-shrink:0; display:flex; flex-direction:column; align-items:center; gap:2px; padding:6px 8px; border-radius:10px; background:var(--surface2); min-width:46px; position:relative; }
.wx-card.wx-now { background:var(--accent); }
.wx-time  { font-size:10px; color:var(--text-muted); }
.wx-card.wx-now .wx-time { color:rgba(255,255,255,0.8); }
.wx-icon  { font-size:18px; line-height:1; }
.wx-temp  { font-size:12px; font-weight:600; }
.wx-precip { font-size:10px; color:#6af; }
.wx-sun   { font-size:10px; position:absolute; top:-8px; left:50%; transform:translateX(-50%); }
/* ── Weather v2 — day summary + enhanced cards ── */
.wx-day-summary {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
    padding: 8px 12px; background: var(--card-bg,#1e1e2e); border-radius: 10px;
    margin-bottom: 8px; font-size: 0.78rem;
}
.wx-hist-badge {
    background: #555; color: #fff; padding: 2px 6px; border-radius: 10px; font-size: 0.7rem;
}
.wx-day-range { font-weight: 700; font-size: 0.9rem; color: var(--text-primary,#e0e0e0); }
.wx-sun-times { color: #f5a623; font-size: 0.75rem; }
.wx-uv-badge, .wx-aqi-badge {
    color: #fff; padding: 2px 7px; border-radius: 10px; font-size: 0.7rem; font-weight: 600;
}
.wx-precip-sum { color: #7ecff4; font-size: 0.75rem; }
.wx-wind-max   { color: #a0cfff; font-size: 0.75rem; }
.wx-feels  { font-size: 0.62rem; color: #aaa; margin-top: 1px; }
.wx-uv-dot { font-size: 0.6rem; color: #fff; padding: 1px 4px; border-radius: 8px; margin-top: 2px; font-weight: 600; }
.wx-wind   { font-size: 0.6rem; color: #a0cfff; margin-top: 2px; white-space: nowrap; }
.wx-hum    { font-size: 0.6rem; color: #7ecff4; margin-top: 2px; }

/* ── Time gap connector between moments ── */
.tl-gap-connector {
    display: flex; align-items: center; gap: 0;
    padding: 0 16px; margin: 2px 0;
    position: relative;
}
.tl-gap-connector::before {
    content: ''; flex: 1;
    border-top: 1px dashed var(--border, #333);
    opacity: 0.4;
}
.tl-gap-label {
    font-size: 0.68rem;
    color: var(--text-muted, #888);
    padding: 0 8px;
    white-space: nowrap;
}
.tl-gap-connector::after {
    content: ''; flex: 1;
    border-top: 1px dashed var(--border, #333);
    opacity: 0.4;
}

/* ── Budget panel + costs ── */
#budget-panel { display:none; }
#budget-panel.open { display:flex !important; }
.budget-banner-badge {
    font-size: 0.65rem; font-weight: 700; color: #4caf50;
    vertical-align: middle; margin-left: 2px;
}
.budget-gbp-total {
    background: var(--surface2,#2a2a3e); border-radius: 10px;
    padding: 10px 14px; margin-bottom: 12px; font-size: 0.9rem;
    color: var(--text-primary,#e0e0e0); text-align: center;
}
.budget-currency-group { margin-bottom: 14px; }
.budget-cur-header {
    display: flex; justify-content: space-between;
    font-weight: 700; font-size: 0.8rem; color: var(--text-muted,#888);
    border-bottom: 1px solid var(--border,#333); padding-bottom: 4px; margin-bottom: 6px;
    text-transform: uppercase;
}
.budget-row {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 4px 0; font-size: 0.85rem;
}
.budget-label { color: var(--text-primary,#e0e0e0); flex: 1; }
.budget-place { color: var(--text-muted,#888); font-size: 0.75rem; }
.budget-amount { color: var(--text-primary,#e0e0e0); font-weight: 600; white-space: nowrap; }
.budget-gbp-note { color: #888; font-size: 0.72rem; font-weight: 400; margin-left: 4px; }
.budget-rate-note { color: #4caf50; font-size: 0.68rem; font-weight: 400; margin-left: 6px; opacity: 0.8; }
/* ── Receipt overlay ────────────────────────────────────────────────── */
.receipt-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px 10px; background: var(--surface,#1e1e2e);
    border-bottom: 1px solid var(--border,#333); flex-shrink: 0;
}
.receipt-back-btn {
    background: none; border: none; color: var(--text-primary,#e0e0e0);
    font-size: 1.3rem; cursor: pointer; padding: 4px 8px 4px 0; line-height: 1;
}
.receipt-title { font-weight: 700; font-size: 1rem; flex: 1; }
.receipt-sub { font-size: 0.75rem; color: var(--text-muted,#888); }

.receipt-rates-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    padding: 8px 16px; background: var(--surface2,#2a2a3e);
    border-bottom: 1px solid var(--border,#333); flex-shrink: 0;
    font-size: 0.72rem; color: var(--text-muted,#888);
}
.rates-label { font-weight: 600; color: var(--text-primary,#e0e0e0); margin-right: 2px; }
.rates-chip {
    background: var(--surface,#1e1e2e); border-radius: 6px;
    padding: 2px 7px; color: var(--text-primary,#e0e0e0);
}
.rates-chip strong { color: #4caf50; }
.rates-date { margin-left: auto; font-size: 0.68rem; opacity: 0.6; }

.receipt-group { border-bottom: 1px solid var(--border,#333); padding: 12px 16px; }
.receipt-group-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 8px;
}
.receipt-group-place {
    font-weight: 700; font-size: 0.85rem; color: var(--text-primary,#e0e0e0);
}
.receipt-group-total {
    font-size: 0.8rem; font-weight: 700; color: #4caf50;
}

.receipt-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: opacity 0.2s;
}
.receipt-item:last-child { border-bottom: none; }
.receipt-item--paid { opacity: 0.5; }
.receipt-item--paid .receipt-item-label { text-decoration: line-through; }

.receipt-paid-wrap {
    display: flex; align-items: center; cursor: pointer; flex-shrink: 0;
}
.receipt-paid-wrap input[type=checkbox] { display: none; }
.receipt-paid-box {
    width: 20px; height: 20px; border-radius: 6px;
    border: 2px solid var(--border,#444); background: transparent;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.receipt-paid-wrap input:checked + .receipt-paid-box {
    background: #4caf50; border-color: #4caf50;
}
.receipt-paid-wrap input:checked + .receipt-paid-box::after {
    content: '\2713'; color: #fff; font-size: 0.8rem; line-height: 1;
}

.receipt-item-label {
    flex: 1; font-size: 0.85rem; color: var(--text-primary,#e0e0e0);
}
.receipt-item-amount {
    font-size: 0.82rem; font-weight: 600; color: var(--text-primary,#e0e0e0);
    white-space: nowrap; text-align: right;
}
.receipt-gbp-note {
    display: block; font-size: 0.68rem; color: #888; font-weight: 400;
}

.receipt-footer {
    border-top: 2px solid var(--border,#333); background: var(--surface,#1e1e2e);
    padding: 12px 16px; flex-shrink: 0;
}
.receipt-footer-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 4px 0; font-size: 0.88rem;
}
.receipt-footer-total { font-size: 1.1rem; font-weight: 800; color: var(--text-primary,#e0e0e0); }
.receipt-footer-paid { color: #4caf50; font-size: 0.82rem; }
.receipt-footer-owed { color: #ff7043; font-weight: 700; }

/* ── Trip Map overlay ──────────────────────────────────────────────────────── */
.trip-map-header { display:flex; align-items:center; gap:12px; padding:12px 16px; background:var(--surface); border-bottom:1px solid var(--border); flex-shrink:0; }
.trip-map-canvas { flex:1; min-height:0; width:100%; }
.trip-map-msg { display:flex; align-items:center; justify-content:center; height:100%; color:var(--text-muted); font-size:15px; padding:32px; text-align:center; }
/* ── Swipe buttons container (replaces single swipe-action-btn absolute) ─── */
.swipe-btns {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: row;
  z-index: 1;
}
.swipe-btns > button {
  flex: 1;
  min-width: 70px;
  border: none;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 4px;
}
.swipe-dir-btn  { background: #007AFF; font-size: 20px; }
.swipe-action-btn { /* background set inline */ }
.swipe-action-label { font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; }

/* ── Directions modal ────────────────────────────────────────────────── */
.dir-modal-card {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 32px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: slideUp 0.25s ease;
}
.dir-modal-icon  { font-size: 40px; margin-bottom: 4px; }
.dir-modal-title { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.dir-modal-dest  { font-size: 18px; font-weight: 700; text-align: center; }
.dir-modal-hint  { font-size: 13px; color: var(--text-muted); text-align: center; line-height: 1.5; margin: 6px 0 12px; }
.dir-modal-btns  { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.dir-modal-btns .btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.dir-modal-btns .btn-ghost {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  padding: 10px;
  cursor: pointer;
  width: 100%;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
/* Receipt delete button */
.receipt-del-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  padding: 2px 4px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 6px;
  line-height: 1;
  margin-left: 4px;
}
.receipt-del-btn:hover, .receipt-del-btn:active { color: #e05; background: rgba(220,0,80,0.1); }

/* ── Voice sync panel ─────────────────────────────────────────────────── */
.vsync-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.vsync-info { flex: 1; min-width: 0; }
.vsync-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vsync-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.vsync-btns { display: flex; gap: 8px; flex-shrink: 0; }
.vsync-btn-upload {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.vsync-btn-del {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 15px;
    cursor: pointer;
    color: var(--text-muted);
}

/* ── Users admin panel ───────────────────────────────────────────────────── */
.user-row { padding:16px; border-bottom:1px solid var(--border); }
.user-info { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
.user-role-badge { font-size:11px; padding:2px 8px; border-radius:20px; background:var(--surface2); color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; }
.user-pin-form { display:flex; gap:8px; align-items:center; }
.user-pin-form input { padding:10px 12px; border-radius:10px; border:1px solid var(--border); background:var(--surface2); color:var(--text-primary); font-size:15px; width:130px; box-sizing:border-box; }
.btn-sm { padding:9px 14px; border-radius:10px; background:var(--accent); color:#fff; border:none; font-size:14px; font-weight:600; cursor:pointer; white-space:nowrap; }
.user-msg { font-size:12px; min-height:16px; margin-top:6px; }
