@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Mono:wght@400;500&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS Custom Property Animation (Animated border trick) ─────────────────── */
@property --border-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

/* ─── View Transitions API ──────────────────────────────────────────────────── */
@view-transition { navigation: auto; }
::view-transition-old(root) {
  animation: vt-out .25s cubic-bezier(.4,0,1,1) both;
}
::view-transition-new(root) {
  animation: vt-in .3s cubic-bezier(0,0,.2,1) both;
}
@keyframes vt-out {
  to { opacity: 0; transform: scale(.97) translateY(8px); filter: blur(2px); }
}
@keyframes vt-in {
  from { opacity: 0; transform: scale(.97) translateY(8px); filter: blur(2px); }
}

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

/* ─── Design Tokens — Dark Spatial ─────────────────────────────────────────── */
:root {
  /* Backgrounds — Golden Horizon (warm dark, jamais noir pur) */
  --bg:          #0d0b09;
  --surface:     #1e1a14;
  --surface-2:   #242019;
  --surface-3:   #2d2820;

  /* Depth levels (nappe de table) */
  --bg-deep:     #0d0b09;
  --bg-mid:      #15120e;
  --bg-surface:  #1e1a14;
  --bg-raised:   #26211a;

  /* Borders — warm white subtils */
  --border:        rgba(255,235,210,.08);
  --border-2:      rgba(255,235,210,.14);
  --border-bright: rgba(255,235,210,.25);
  --border-mid:    rgba(255,235,210,.14);

  /* Text — chaud parchment */
  --text-1:        #f5ede0;
  --text-2:        #a09080;
  --text-3:        #6b5d50;
  --text-4:        #3f342a;
  --text-muted:    #a09080;
  --text-tertiary: #6b5d50;

  /* Copper accent — coucher de soleil Golden Horizon */
  --accent:        #d4833a;
  --accent-dim:    rgba(212,131,58,.15);
  --accent-glow:   0 0 24px rgba(212,131,58,.35);
  --accent-bg:     rgba(212,131,58,.08);

  /* Semantic */
  --green:         #1AD98D;
  --green-dim:     rgba(26,217,141,.12);
  --green-glow:    0 0 20px rgba(26,217,141,.3);
  --red:           #FF5E6C;
  --red-dim:       rgba(255,94,108,.12);
  --blue:          #5B9CF6;
  --blue-dim:      rgba(91,156,246,.12);
  --purple:        #9D7EFF;
  --purple-dim:    rgba(157,126,255,.12);

  /* Radius */
  --r-xs: 4px;
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow:     0 2px 12px rgba(0,0,0,.5);
  --shadow-md:  0 8px 24px rgba(0,0,0,.5);
  --shadow-lg:  0 16px 48px rgba(0,0,0,.6);
  --shadow-xl:  0 32px 64px rgba(0,0,0,.7);

  /* ── Golden Horizon semantic tokens ── */
  --cyan:          #5bbcb8;
  --cyan-dim:      rgba(91,188,184,.12);
  --success:       #4caf82;
  --success-dim:   rgba(76,175,130,.12);
  --success-glow:  0 0 16px rgba(76,175,130,.25);
  --warning:       #e09b3d;
  --warning-dim:   rgba(224,155,61,.12);
  --danger:        #d96b5a;
  --danger-dim:    rgba(217,107,90,.12);
  --kids:          #8b7fd4;
  --kids-dim:      rgba(139,127,212,.12);

  /* Animation tokens */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 150ms;
  --t-mid:  250ms;
  --t-slow: 400ms;

  /* Spacing multiples de 4 */
  --s1: 4px;  --s2: 8px;  --s3: 12px;
  --s4: 16px; --s5: 20px; --s6: 24px;

  /* ── Roam aliases (backward compat) ── */
  --roam-bg: #0d0b09;
  --roam-surface: #1e1a14;
  --roam-border: #2d2820;
  --roam-accent: #d4833a;
  --roam-accent2: #5bbcb8;
  --roam-text: #f5ede0;
  --roam-muted: #6b5d50;
  --roam-success: #4caf82;
  --roam-warning: #e09b3d;
  --roam-danger: #d96b5a;
  --roam-kids: #8b7fd4;
  --font-display: 'Syne', system-ui, sans-serif;
  --font-mono: 'DM Mono', monospace;

  /* Legacy compat */
  --blue-dark:  #0F0A2A;
  --blue-light: var(--blue-dim);
  --amber:      var(--accent);
  --amber-bg:   var(--accent-bg);
  --green-bg:   var(--green-dim);
  --green-text: var(--green);
  --red-bg:     var(--red-dim);
  --red-text:   var(--red);
  --blue-bg:    var(--blue-dim);
  --blue-text:  var(--blue);
  --gray-50:    var(--surface);
  --gray-100:   var(--surface-2);
  --gray-200:   var(--border);
  --gray-400:   var(--text-3);
  --gray-500:   var(--text-2);
  --gray-600:   #7A768A;
  --gray-700:   var(--text-2);
  --gray-800:   var(--text-1);
  --gray-900:   var(--text-1);
  --radius:     var(--r);
  --shadow-md:  0 8px 24px rgba(0,0,0,.5);
}

/* ─── Base ──────────────────────────────────────────────────────────────────── */
html { font-size: 15px; -webkit-font-smoothing: antialiased; color-scheme: dark; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.5;
  min-height: 100vh;
  /* Subtle noise texture */
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--text-1); }
button { cursor: pointer; font-family: inherit; }

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: 1060px; margin: 0 auto; padding: 0 24px; }
.page-content { padding: 36px 0 80px; }

/* ─── Navigation ────────────────────────────────────────────────────────────── */
.nav {
  background: rgba(13,11,9,.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1060px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px; height: 54px;
}
.nav-brand {
  font-size: 15px; font-weight: 800; color: var(--text-1);
  letter-spacing: -0.5px; display: flex; align-items: center; gap: 10px;
  white-space: nowrap; text-decoration: none;
}
.nav-brand:hover { text-decoration: none; color: var(--text-1); }
.nav-brand-logo {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--accent), #F5C842);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
  box-shadow: 0 0 12px rgba(212,131,58,.4);
}
.nav-brand span { font-size: 11px; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.nav-sep { width: 1px; height: 18px; background: var(--border); margin: 0 6px; }
.nav-links { display: flex; gap: 2px; }
.nav-link {
  color: var(--text-3); padding: 5px 11px;
  border-radius: var(--r-sm); font-size: 13px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: var(--surface-2); color: var(--text-1); }
.nav-link.active { background: var(--surface-2); color: var(--text-1); font-weight: 600; }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-user { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 13px; padding: 5px 8px; }
.nav-role {
  background: var(--surface-2); border-radius: var(--r-xs);
  padding: 2px 7px; font-size: 11px; font-weight: 600; color: var(--text-2);
  border: 1px solid var(--border);
}

/* ─── Stats — Bento Grid ────────────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr 1fr;
  gap: 10px;
  margin-bottom: 36px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s;
}
.stat-card::before {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(ellipse at 0% 0%, rgba(255,255,255,.03), transparent 70%);
  pointer-events: none;
}
.stat-card:hover { border-color: var(--border-2); }

/* Colored accent per card */
.stat-card:nth-child(1) { border-top: 2px solid var(--blue); }
.stat-card:nth-child(2) { border-top: 2px solid var(--accent); }
.stat-card:nth-child(3) { border-top: 2px solid var(--green); }
.stat-card:nth-child(4) { border-top: 2px solid var(--purple); }
.stat-card:nth-child(5) { border-top: 2px solid var(--red); }

.stat-value {
  font-size: 32px; font-weight: 900; color: var(--text-1);
  line-height: 1; letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: 10px; color: var(--text-3); margin-top: 6px;
  font-weight: 600; text-transform: uppercase; letter-spacing: .8px;
}

/* ─── Section headers ───────────────────────────────────────────────────────── */
.section { margin-bottom: 36px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.section-title { font-size: 13px; font-weight: 700; color: var(--text-2); letter-spacing: .5px; text-transform: uppercase; }

/* ─── Page titles ───────────────────────────────────────────────────────────── */
.page-header { margin-bottom: 32px; }
.page-title { font-size: 22px; font-weight: 800; color: var(--text-1); letter-spacing: -0.5px; }
.page-subtitle { color: var(--text-3); font-size: 13px; margin-top: 4px; line-height: 1.6; }

/* ─── Stop cards — Timeline with Spotlight ──────────────────────────────────── */
.stops-grid {
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.stops-grid::before {
  content: '';
  position: absolute; left: 21px; top: 28px; bottom: 28px; width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border) 10%, var(--border) 90%, transparent);
  z-index: 0;
}

.stop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
  /* Entrance animation */
  opacity: 0;
  transform: translateY(12px);
}
.stop-card.visible {
  animation: card-in .4s cubic-bezier(0,0,.2,1) forwards;
}
@keyframes card-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Spotlight effect — follows mouse */
.stop-card::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(212,131,58,.07) 0%, transparent 55%);
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.stop-card:hover::after { opacity: 1; }
.stop-card:hover {
  border-color: var(--border-2);
  transform: translateX(3px);
  text-decoration: none; color: inherit;
}

/* Animated gradient border on hover using @property */
.stop-card.has-action {
  animation: rotate-border 3s linear infinite;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--border-angle), var(--accent), var(--purple), var(--green), var(--accent)) border-box;
}
@keyframes rotate-border { to { --border-angle: 360deg; } }

.stop-number {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
  border: 1px solid var(--border); position: relative; z-index: 1;
}

.stop-main { min-width: 0; }
.stop-city {
  font-size: 15px; font-weight: 700; color: var(--text-1);
  letter-spacing: -0.3px;
}
.stop-meta {
  font-size: 12px; color: var(--text-3); margin-top: 3px;
  display: flex; gap: 8px; flex-wrap: wrap; font-weight: 500;
}
.stop-meta-item { display: flex; align-items: center; gap: 3px; }

.stop-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.stop-price {
  font-size: 18px; font-weight: 900; color: var(--text-1);
  letter-spacing: -0.8px; font-variant-numeric: tabular-nums;
}
.stop-price-sub { font-size: 11px; color: var(--text-3); font-weight: 500; }

/* ROAM Score detail block */
.roam-score-block {
  margin-top: 14px; padding: 13px 15px;
  border-radius: var(--r); border-left: 2px solid;
  font-size: 13px; line-height: 1.6;
}
.roam-score-block.action-book_now { background: rgba(26,217,141,.05); border-color: var(--green); }
.roam-score-block.action-monitor  { background: var(--accent-dim);   border-color: var(--accent); }
.roam-score-block.action-wait     { background: var(--surface-2);    border-color: var(--border-2); }

.roam-score-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.roam-action-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; padding: 2px 8px; border-radius: 99px;
}
.action-book_now .roam-action-badge { background: var(--green-dim);  color: var(--green); }
.action-monitor  .roam-action-badge { background: var(--accent-dim); color: var(--accent); }
.action-wait     .roam-action-badge { background: var(--surface-2);  color: var(--text-3); }
.roam-score-number {
  font-size: 18px; font-weight: 900; letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}
.action-book_now .roam-score-number { color: var(--green); text-shadow: var(--green-glow); }
.action-monitor  .roam-score-number { color: var(--accent); }
.action-wait     .roam-score-number { color: var(--text-3); }

.roam-verdict {
  font-size: 13px; font-weight: 600; color: var(--text-1);
  margin-bottom: 8px; line-height: 1.4;
}
.roam-highlights {
  list-style: none; margin: 0 0 10px; padding: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.roam-highlights li {
  font-size: 12px; color: var(--text-2);
  display: flex; align-items: baseline; gap: 5px;
}
.roam-highlights li::before { content: '·'; color: var(--text-3); font-weight: 900; }

/* Sub-scores expandable */
.roam-sub { margin-top: 8px; }
.roam-sub summary {
  font-size: 11px; color: var(--text-3); cursor: pointer;
  list-style: none; display: flex; align-items: center; gap: 4px;
  user-select: none;
}
.roam-sub summary::-webkit-details-marker { display: none; }
.roam-sub summary::after { content: '↓'; transition: transform .2s; }
.roam-sub[open] summary::after { transform: rotate(180deg); }
.roam-sub-bars {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 10px;
}
.roam-sub-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--text-2);
}
.roam-sub-row > span:first-child { width: 72px; flex-shrink: 0; font-weight: 600; }
.roam-sub-row > span:last-child  { width: 24px; text-align: right; color: var(--text-3); font-weight: 700; }
.roam-bar {
  flex: 1; height: 4px; border-radius: 2px;
  background: var(--surface-2); overflow: hidden;
}
.roam-bar > div {
  height: 100%; border-radius: 2px;
  transition: width .6s cubic-bezier(0,0,.2,1);
}
.roam-bar-green  > div { background: var(--green); }
.roam-bar-amber  > div { background: var(--accent); }
.roam-bar-red    > div { background: var(--red); }

/* Loading placeholder */
.roam-detail-loading {
  margin-top: 14px; padding: 13px 15px;
  border-radius: var(--r); background: var(--surface-2);
  font-size: 12px; color: var(--text-3);
  display: flex; align-items: center; gap: 8px;
}

/* AI Score circle — legacy (kept for compatibility) */
.ai-score {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 900; flex-shrink: 0;
}
.ai-score-high   { background: var(--green-dim);  color: var(--green); box-shadow: var(--green-glow); }
.ai-score-medium { background: var(--accent-dim); color: var(--accent); box-shadow: var(--accent-glow); }
.ai-score-low    { background: var(--surface-2);  color: var(--text-3); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 99px;
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; white-space: nowrap;
}
.badge-critical   { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(255,94,108,.2); }
.badge-high       { background: rgba(251,146,60,.1); color: #FB923C;     border: 1px solid rgba(251,146,60,.2); }
.badge-normal     { background: var(--blue-dim);   color: var(--blue);   border: 1px solid rgba(91,156,246,.2); }
.badge-booked     { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(26,217,141,.2); }
.badge-watching   { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(212,131,58,.2); }
.badge-searching  { background: var(--surface-2);  color: var(--text-3); border: 1px solid var(--border); }
.badge-book-now   { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(26,217,141,.2); }
.badge-wait       { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(212,131,58,.2); }
.badge-skip       { background: var(--surface-2);  color: var(--text-3); border: 1px solid var(--border); }

/* ─── Hotel cards — Glass + Glow ────────────────────────────────────────────── */
.hotels-list { display: flex; flex-direction: column; gap: 16px; }

.hotel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s, transform .2s;
  opacity: 0; transform: translateY(16px);
}
.hotel-card.visible {
  animation: card-in .45s cubic-bezier(0,0,.2,1) forwards;
}
.hotel-card:hover {
  border-color: var(--border-2);
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  transform: translateY(-2px);
}
.hotel-card.is-booked {
  border-color: rgba(26,217,141,.25);
  box-shadow: 0 0 0 1px rgba(26,217,141,.1), inset 0 0 32px rgba(26,217,141,.03);
}

.hotel-card-header {
  padding: 18px 20px; display: flex; align-items: flex-start; gap: 14px;
}
.hotel-card-body { padding: 0 20px 18px; }

.hotel-name {
  font-size: 15px; font-weight: 700; color: var(--text-1);
  letter-spacing: -0.2px; line-height: 1.3; word-break: break-word;
}
.hotel-address { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.hotel-meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.hotel-platform {
  font-size: 10px; font-weight: 700; color: var(--blue);
  background: var(--blue-dim); padding: 2px 8px;
  border-radius: var(--r-xs); text-transform: uppercase; letter-spacing: .4px;
  border: 1px solid rgba(91,156,246,.2);
}

.hotel-price-block { text-align: right; margin-left: auto; flex-shrink: 0; }
.hotel-price {
  font-size: 24px; font-weight: 900; color: var(--text-1);
  letter-spacing: -1px; line-height: 1;
  font-variant-numeric: tabular-nums;
}
/* Glow on price when it's a good deal */
.hotel-price.good-deal { color: var(--accent); text-shadow: var(--accent-glow); }
.hotel-price-sub { font-size: 11px; color: var(--text-3); margin-top: 3px; font-weight: 500; }
.hotel-price-direct { font-size: 12px; font-weight: 700; color: var(--green); margin-top: 3px; }
.hotel-price-ota { font-size: 11px; color: var(--text-3); text-decoration: line-through; }

/* Stars */
.stars { color: var(--accent); font-size: 11px; letter-spacing: 1.5px; }

/* Amenity chips */
.amenities { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.amenity-chip {
  font-size: 11px; padding: 3px 9px;
  background: var(--surface-2); border-radius: var(--r-xs);
  color: var(--text-2); border: 1px solid var(--border); font-weight: 500;
}

/* AI Recommendation box */
.ai-box {
  margin-top: 14px; padding: 13px 15px;
  border-radius: var(--r); font-size: 13px; line-height: 1.6;
  border-left: 2px solid;
}
.ai-box-book  { background: rgba(26,217,141,.05); border-color: var(--green); }
.ai-box-wait  { background: var(--accent-dim); border-color: var(--accent); }
.ai-box-skip  { background: var(--surface-2); border-color: var(--border-2); }
.ai-box-title {
  font-weight: 700; margin-bottom: 5px;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
}
.ai-box-book .ai-box-title  { color: var(--green); }
.ai-box-wait .ai-box-title  { color: var(--accent); }
.ai-box-skip .ai-box-title  { color: var(--text-3); }

/* Hotel actions */
.hotel-actions { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }

/* ─── Buttons — Magnetic feel ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; border: none;
  transition: all .15s cubic-bezier(0,0,.2,1);
  white-space: nowrap; letter-spacing: -0.1px; position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--accent); color: #fff;
  font-family: var(--font-display, 'Syne', sans-serif);
  font-weight: 700;
  box-shadow: 0 2px 12px rgba(212,131,58,.3);
}
.btn-primary:hover { background: #e09245; box-shadow: 0 4px 20px rgba(212,131,58,.45); }
.btn-success { background: var(--green); color: #000; box-shadow: var(--green-glow); }
.btn-danger  { background: var(--red);   color: #fff; }
.btn-ghost {
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-3); border-color: var(--border-2); color: var(--text-1); }
.btn-amber {
  background: var(--accent); color: #000; font-weight: 700;
  box-shadow: var(--accent-glow);
}
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: var(--r-sm); }

/* ─── View toggle ───────────────────────────────────────────────────────────── */
.view-toggle {
  display: flex; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 3px;
}
.view-btn {
  padding: 5px 12px; border-radius: 5px; font-size: 12px; font-weight: 600;
  background: transparent; border: none; color: var(--text-3); cursor: pointer;
  transition: background .15s, color .15s;
}
.view-btn.active { background: var(--surface-3); color: var(--text-1); }

/* ─── Stop detail header — Aurora ──────────────────────────────────────────── */
.stop-header {
  color: #fff;
  padding: 48px 24px 40px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
/* Aurora animated gradient */
.stop-header::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 60%, rgba(157,126,255,.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(212,131,58,.18) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 80%, rgba(26,217,141,.1) 0%, transparent 40%);
  animation: aurora 8s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes aurora {
  0%   { opacity: .7; transform: scale(1) rotate(0deg); }
  33%  { opacity: 1;  transform: scale(1.05) rotate(1deg); }
  66%  { opacity: .8; transform: scale(.97) rotate(-1deg); }
  100% { opacity: 1;  transform: scale(1.03) rotate(.5deg); }
}
/* Noise overlay on header */
.stop-header::after {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.stop-header-inner { max-width: 1060px; margin: 0 auto; position: relative; z-index: 1; }
.stop-header-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.35); font-size: 11px; font-weight: 600;
  text-decoration: none; margin-bottom: 20px;
  transition: color .15s; letter-spacing: .5px; text-transform: uppercase;
}
.stop-header-back:hover { color: rgba(255,255,255,.7); }
.stop-header-city {
  font-size: 48px; font-weight: 900;
  letter-spacing: -2.5px; line-height: .95;
  background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,.6));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}
.stop-header-meta {
  color: rgba(255,255,255,.4); font-size: 13px;
  display: flex; gap: 20px; flex-wrap: wrap; font-weight: 500;
}
.stop-header-badges { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.stop-header .badge {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.75);
  border-color: rgba(255,255,255,.12);
}
.stop-header .badge-critical {
  background: rgba(255,94,108,.2); color: #FF9DA5;
  border-color: rgba(255,94,108,.3);
}
.stop-header .badge-booked {
  background: rgba(26,217,141,.2); color: #7DFFCB;
  border-color: rgba(26,217,141,.3);
}

/* ─── AI Suggestions ────────────────────────────────────────────────────────── */
.suggestion-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.suggestion-card:hover { border-color: var(--border-2); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.suggestion-name { font-size: 15px; font-weight: 700; color: var(--text-1); letter-spacing: -0.2px; }
.suggestion-address { font-size: 12px; color: var(--text-3); margin-top: 3px; }
.suggestion-why { font-size: 13px; color: var(--text-2); margin-top: 10px; line-height: 1.6; }
.suggestions-list { display: flex; flex-direction: column; gap: 10px; }

/* ─── Manual URL input ──────────────────────────────────────────────────────── */
.url-input-row { display: flex; gap: 8px; }
.url-input-row input {
  flex: 1; padding: 9px 13px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit; outline: none;
  background: var(--surface); color: var(--text-1);
  transition: border-color .15s, box-shadow .15s;
}
.url-input-row input::placeholder { color: var(--text-4); }
.url-input-row input:focus {
  border-color: var(--border-bright);
  box-shadow: 0 0 0 3px rgba(255,255,255,.04);
}

/* ─── Criteria page ─────────────────────────────────────────────────────────── */
.criteria-section {
  background: var(--surface); border-radius: var(--r-lg);
  border: 1px solid var(--border); padding: 24px; margin-bottom: 12px;
}
.criteria-section-title {
  font-size: 13px; font-weight: 700; color: var(--text-2);
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
  text-transform: uppercase; letter-spacing: .5px;
}

.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-size: 13px; color: var(--text-1); font-weight: 500; }
.toggle-controls { display: flex; align-items: center; gap: 12px; }

.toggle { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--surface-3);
  border-radius: 11px; cursor: pointer; transition: background .2s;
  border: 1px solid var(--border);
}
.toggle-slider::before {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 14px; height: 14px; background: var(--text-3); border-radius: 50%;
  transition: transform .2s, background .2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent-dim); border-color: rgba(212,131,58,.3); }
.toggle input:checked + .toggle-slider::before { transform: translateX(16px); background: var(--accent); }

.weight-slider { -webkit-appearance: none; appearance: none; width: 90px; height: 3px; border-radius: 2px; background: var(--surface-3); outline: none; }
.weight-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: var(--accent-glow); }
.weight-value { font-size: 13px; font-weight: 700; color: var(--accent); width: 16px; text-align: center; }

.range-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.range-label { font-size: 13px; color: var(--text-1); font-weight: 500; flex: 1; }
.range-value { font-size: 13px; font-weight: 700; color: var(--text-1); width: 40px; text-align: right; }
input[type="range"] { -webkit-appearance: none; appearance: none; height: 3px; border-radius: 2px; background: var(--surface-3); outline: none; flex: 1; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); cursor: pointer; box-shadow: var(--accent-glow); }

.budget-table { width: 100%; border-collapse: collapse; }
.budget-table th { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .6px; padding: 8px 0; text-align: left; border-bottom: 1px solid var(--border); }
.budget-table td { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.budget-table tr:last-child td { border-bottom: none; }
.budget-table td:last-child { text-align: right; }
.budget-input {
  width: 80px; padding: 5px 8px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; font-weight: 600; text-align: right; outline: none;
  font-family: inherit; background: var(--surface-2); color: var(--text-1);
}
.budget-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }

/* ─── Alerts log ────────────────────────────────────────────────────────────── */
.alert-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.alert-item:last-child { border-bottom: none; }
.alert-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.alert-text { color: var(--text-2); line-height: 1.5; }
.alert-date { color: var(--text-3); font-size: 11px; margin-top: 3px; font-weight: 500; }

/* ─── Empty states ──────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-3); }
.empty-state-icon { font-size: 32px; margin-bottom: 12px; opacity: .5; }
.empty-state-text { font-size: 13px; font-weight: 500; }

/* ─── Skeleton loader ───────────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-sm);
}
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px 20px;
  display: grid; grid-template-columns: 44px 1fr auto;
  gap: 16px; align-items: center;
}
.skeleton-circle { width: 44px; height: 44px; border-radius: 50%; }
.skeleton-line { height: 12px; margin-bottom: 8px; }
.skeleton-line:last-child { width: 60%; margin-bottom: 0; }

/* ─── Spinner (kept as fallback) ────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.15); border-top-color: rgba(255,255,255,.7);
  border-radius: 50%; animation: spin .6s linear infinite;
}
.spinner-dark {
  border-color: rgba(212,131,58,.2); border-top-color: var(--accent);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast ─────────────────────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text-1);
  padding: 12px 20px; border-radius: var(--r-lg);
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-xl);
  z-index: 9999;
  transform: translateY(80px) scale(.9);
  opacity: 0;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .2s;
  max-width: 320px; letter-spacing: -0.1px;
  backdrop-filter: blur(16px);
}
#toast.show { transform: translateY(0) scale(1); opacity: 1; }
#toast.toast-success { background: rgba(26,217,141,.15); border-color: rgba(26,217,141,.3); color: var(--green); }
#toast.toast-error   { background: rgba(255,94,108,.15); border-color: rgba(255,94,108,.3); color: var(--red); }

/* ─── Progress bar ──────────────────────────────────────────────────────────── */
.progress-bar { height: 3px; background: var(--surface-2); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; border-radius: 2px; transition: width .4s; }
.progress-blue   { background: var(--blue); }
.progress-green  { background: var(--green); }
.progress-amber  { background: var(--accent); }
.progress-red    { background: var(--red); }

/* ─── Modal ─────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
  backdrop-filter: blur(8px);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(16px) scale(.96);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text-1); letter-spacing: -0.2px; }
.modal-close {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: 13px; color: var(--text-3);
  cursor: pointer; padding: 5px 8px; transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--surface-3); color: var(--text-1); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  padding: 16px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl);
}

/* ─── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-3); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .5px; }
.form-input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 13px; font-family: inherit; outline: none;
  background: var(--surface-2); color: var(--text-1);
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

/* ─── Utilitaires ────────────────────────────────────────────────────────────── */
.modal-label { font-size: 12px; color: var(--text-3); display: block; margin-bottom: 4px; }
.modal-actions { display: flex; gap: 8px; }
.flex-1 { flex: 1; }
.text-muted-xs { font-size: 11px; color: var(--text-3); }

/* ─── Divider ───────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 20px 0; }

/* ─── Map ───────────────────────────────────────────────────────────────────── */
#map-container { display: none; }
#map { height: clamp(260px, 45vh, 520px); border-radius: var(--r-lg); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-md); }
.leaflet-popup-content-wrapper { border-radius: var(--r); box-shadow: var(--shadow-lg); background: var(--surface); border: 1px solid var(--border); }
.leaflet-popup-tip { background: var(--surface); }
.leaflet-popup-content { margin: 14px 16px; }
.popup-city { font-weight: 700; font-size: 14px; color: var(--text-1); margin-bottom: 3px; font-family: 'Inter', sans-serif; }
.popup-meta { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.popup-price { font-size: 14px; font-weight: 800; color: var(--text-1); margin-bottom: 4px; letter-spacing: -0.3px; }
.popup-status { font-size: 12px; margin-bottom: 10px; }
.popup-btn {
  display: block; text-align: center; background: var(--accent); color: #000;
  padding: 7px 14px; border-radius: var(--r-sm); font-size: 12px; font-weight: 700;
  text-decoration: none; font-family: 'Inter', sans-serif;
}
.popup-btn:hover { opacity: .85; text-decoration: none; }
.map-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--text-3); }
.legend-item { display: flex; align-items: center; gap: 5px; font-weight: 500; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ─── Trip selector cards ───────────────────────────────────────────────────── */
#trip-selector { display: none; }
.trips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.trip-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px;
  transition: border-color .2s, transform .2s; cursor: pointer;
  position: relative; overflow: hidden;
  opacity: 0; transform: translateY(14px);
}
.trip-card.visible {
  animation: card-in .45s cubic-bezier(0,0,.2,1) forwards;
}
.trip-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at var(--mx, 80%) var(--my, 20%), rgba(212,131,58,.06), transparent 60%);
  pointer-events: none;
}
.trip-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.trip-card-name { font-size: 17px; font-weight: 800; color: var(--text-1); letter-spacing: -0.4px; margin-bottom: 6px; }
.trip-card-meta { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* ─── Price chart ───────────────────────────────────────────────────────────── */
.price-chart-wrap { margin-top: 12px; }
.price-chart-label { font-size: 11px; color: var(--text-3); margin-bottom: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  html { font-size: 14px; }
  .container { padding: 0 16px; }
  .page-content { padding: 24px 0 80px; }
  .nav { display: none !important; }
  .nav-inner { height: 50px; }
  .nav-brand span { display: none; }
  .nav-sep { display: none; }
  .nav-links { gap: 1px; }
  .nav-link { padding: 5px 9px; font-size: 12px; }

  .stats-bar {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px; margin-bottom: 24px;
  }
  .stat-card { padding: 14px 14px; border-radius: var(--r); }
  .stat-value { font-size: 24px; }
  .stat-label { font-size: 9px; }

  .stops-grid::before { left: 18px; }
  .stop-card {
    grid-template-columns: 36px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 12px; padding: 14px 16px;
    align-items: start; border-radius: var(--r);
  }
  .stop-number { width: 36px; height: 36px; font-size: 13px; grid-row: 1/3; align-self: center; }
  .stop-city { font-size: 14px; }
  .stop-meta { gap: 6px; font-size: 11px; }
  .stop-right { flex-direction: row; align-items: center; gap: 8px; justify-content: flex-start; margin-top: 2px; }
  .stop-price { font-size: 15px; }
  .stop-price-sub { display: none; }
  .ai-score { width: 28px; height: 28px; font-size: 10px; }

  .hotel-card-header { padding: 14px 16px; gap: 10px; flex-wrap: wrap; }
  .hotel-price-block {
    flex: 0 0 100%; order: 3; margin-left: 0; text-align: left;
    border-top: 1px solid var(--border); padding-top: 12px;
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  }
  .hotel-price { font-size: 22px; }
  .hotel-card-body { padding: 0 16px 16px; }
  .hotel-actions { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; margin-top: 12px; gap: 6px; scrollbar-width: none; }
  .hotel-actions::-webkit-scrollbar { display: none; }
  .hotel-actions > * { flex-shrink: 0; }

  .stop-header { padding: 28px 16px 24px; }
  .stop-header-city { font-size: 32px; letter-spacing: -1.5px; }
  .stop-header-meta { font-size: 12px; gap: 12px; }

  .section { margin-bottom: 24px; }
  .url-input-row { flex-direction: column; }
  .criteria-section { padding: 16px; }
  .weight-slider { width: 70px; }
  .budget-input { width: 70px; }

  #toast { bottom: auto; top: 58px; left: 12px; right: 12px; max-width: none; text-align: center; border-radius: var(--r); }
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 88vh; max-width: 100%; }
  .modal-footer { border-radius: 0; padding-bottom: 28px; }
  #photo-carousel-modal { align-items: center; }

  .section-header { flex-wrap: wrap; gap: 8px; }
  canvas { max-width: 100%; }
}

@media (max-width: 480px) {
  .cat-breakdown { grid-template-columns: 1fr; }
  .chart-wrap { height: 180px; }
}

@media (max-width: 900px) and (min-width: 641px) {
  .stats-bar { grid-template-columns: repeat(3, 1fr); }
}

/* ─── Restaurants section ─────────────────────────────────────────────────── */
.filter-pill {
  font-size: 12px; padding: 5px 11px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-2); cursor: pointer; font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-pill.active {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
.restaurant-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin-top: 14px;
}
@media (max-width: 640px) {
  .restaurant-grid { grid-template-columns: 1fr; }
}
.restaurant-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.restaurant-card-name {
  font-size: 14px; font-weight: 600; color: var(--text-1); line-height: 1.3;
}
.restaurant-card-meta {
  font-size: 12px; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 6px;
}
.restaurant-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 500;
  background: var(--surface-3); color: var(--text-2);
}

/* ── Room target modal ── */
.room-target-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 14px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.room-target-card:hover {
  border-color: var(--blue); background: rgba(59,130,246,.04);
}
.room-target-card.room-target-selected {
  border-color: var(--blue); background: rgba(59,130,246,.08);
}

/* ── Micro-animations Apple Design Awards ── */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulseCritical {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(.95); }
}
@keyframes popIn {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); }
}
@keyframes recordPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248,113,113,.4); }
  50%       { box-shadow: 0 0 0 12px rgba(248,113,113,0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ── Hero Card ── */
.hero-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border-2);
  border-radius: var(--r-xl);
  padding: 28px 24px 24px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
  animation: slideUp .4s cubic-bezier(0,0,.2,1) both;
}
.hero-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(212,131,58,.12) 0%, transparent 60%);
  pointer-events: none;
}
.hero-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--accent); margin-bottom: 8px;
}
.hero-city {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 800;
  letter-spacing: -1px; line-height: 1;
  color: var(--text-1); margin-bottom: 6px;
}
.hero-meta { font-size: 13px; color: var(--text-2); display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.hero-meta span { display: flex; align-items: center; gap: 4px; }
.hero-progress-label {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-3); margin-bottom: 6px; font-weight: 600;
}
.hero-progress {
  height: 6px; background: var(--surface-3);
  border-radius: 3px; overflow: hidden;
}
.hero-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), #F5C842);
  transition: width .8s cubic-bezier(0,0,.2,1);
}
.hero-status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px;
}
.hero-status-dot.booked   { background: var(--green); box-shadow: 0 0 6px var(--green); }
.hero-status-dot.watching { background: var(--accent); }
.hero-status-dot.critical { background: var(--red); animation: pulseCritical 1.5s ease-in-out infinite; }
.hero-status-dot.searching { background: var(--text-3); }

/* ── Status pills sur les stop-cards ── */
.stop-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700;
}
.stop-status-pill.booked   { background: var(--green-dim);  color: var(--green); }
.stop-status-pill.watching { background: var(--accent-dim); color: var(--accent); }
.stop-status-pill.critical { background: var(--red-dim);    color: var(--red); animation: pulseCritical 1.5s ease-in-out infinite; }
.stop-status-pill.searching { background: var(--surface-2); color: var(--text-3); }

/* ── Bottom navigation ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(13,11,9,.93);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
  height: 60px; z-index: 150;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  font-size: 10px; font-weight: 600; color: var(--text-3);
  text-decoration: none; cursor: pointer; position: relative;
  transition: color .2s; padding: 4px 0;
}
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item.active::after {
  content: '';
  position: absolute; bottom: 6px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent);
}
.bottom-nav-item svg { width: 22px; height: 22px; stroke-width: 1.8; }
.bottom-nav-item span { font-size: 10px; }
/* Compensation pour la bottom nav */
body.has-bottom-nav .page-content { padding-bottom: 80px; }

/* ── Score ROAM badge physique (stop.html) ── */
.roam-score-badge {
  display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 14px;
  flex-shrink: 0;
}
.roam-score-badge .score-num {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 700; line-height: 1;
}
.roam-score-badge .score-lbl {
  font-size: 9px; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; margin-top: 2px;
}
.roam-score-badge.high   { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(26,217,141,.3); }
.roam-score-badge.medium { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(212,131,58,.3); }
.roam-score-badge.low    { background: var(--red-dim);    color: var(--red);    border: 1px solid rgba(255,94,108,.3); }

/* ── Accordion sections ── */
.accordion-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color .2s;
}
.accordion-section:hover { border-color: var(--border-2); }
.accordion-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; cursor: pointer; user-select: none;
}
.accordion-header-left { display: flex; align-items: center; gap: 10px; }
.accordion-title { font-size: 14px; font-weight: 700; color: var(--text-1); }
.accordion-chevron {
  color: var(--text-3); font-size: 16px;
  transition: transform .25s cubic-bezier(0,0,.2,1);
}
.accordion-section.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height .35s cubic-bezier(0,0,.2,1);
}
.accordion-section.open .accordion-body { max-height: 2000px; }
.accordion-inner { padding: 0 20px 18px; }

/* ── GPS banner contextuel ── */
#roam-nearby-banner {
  animation: slideDown .4s cubic-bezier(0,0,.2,1) both !important;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Kids redesign ── */
.kids-header-redesign {
  background: linear-gradient(160deg, #1a0a2e 0%, #0d1b4b 50%, #0a1628 100%);
  padding: 28px 20px 36px;
  position: relative; overflow: hidden;
}
.kids-header-redesign::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(167,139,250,.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(62,207,207,.15) 0%, transparent 45%);
  pointer-events: none;
}
.kids-header-redesign::after {
  content: ''; position: absolute; bottom: -20px; left: 0; right: 0;
  height: 40px; background: var(--bg, #F4F6FF); border-radius: 24px 24px 0 0;
  z-index: 1;
}
.kids-header-inner { position: relative; z-index: 2; }
.kids-header-title {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 2rem; font-weight: 800;
  color: #fff; letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.kids-header-subtitle { font-size: .85rem; color: rgba(255,255,255,.6); margin-bottom: 20px; }

/* Profils en duo */
.profiles-duo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-top: 8px;
}
.profile-duo-card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 16px; padding: 16px 12px;
  text-align: center; cursor: pointer;
  transition: transform .15s, background .15s;
  backdrop-filter: blur(8px);
}
.profile-duo-card:active { transform: scale(.95); }
.profile-duo-card.selected { background: rgba(167,139,250,.2); border-color: rgba(167,139,250,.5); }
.profile-duo-avatar {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin: 0 auto 8px;
  background: rgba(255,255,255,.12);
}
.profile-duo-name { font-size: .95rem; font-weight: 800; color: #fff; }
.profile-duo-level { font-size: .72rem; color: rgba(255,255,255,.6); margin-top: 2px; }
.profile-duo-xp-bar {
  height: 4px; background: rgba(255,255,255,.15);
  border-radius: 2px; overflow: hidden; margin-top: 8px;
}
.profile-duo-xp-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--roam-kids, #a78bfa), #c4b5fd);
  transition: width .6s cubic-bezier(0,0,.2,1);
}
.profile-duo-xp-total { font-size: .7rem; color: rgba(255,255,255,.5); margin-top: 4px; }

/* Badge grid redesignée */
.badges-grid-redesign {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.badge-card-redesign {
  background: white; border-radius: 14px;
  padding: 14px 8px; text-align: center;
  transition: transform .2s;
  position: relative; overflow: hidden;
}
.badge-card-redesign.unlocked { animation: popIn .4s cubic-bezier(.34,1.56,.64,1) both; }
.badge-card-redesign.locked { opacity: .4; filter: grayscale(1); }
.badge-card-redesign.locked .badge-emoji::after {
  content: '🔒'; position: absolute; font-size: .7rem;
  bottom: -2px; right: -2px;
}
.badge-card-redesign .badge-emoji { font-size: 1.8rem; display: block; position: relative; margin-bottom: 4px; }
.badge-card-redesign .badge-title { font-size: .72rem; font-weight: 800; color: #2C3E50; }
.badge-card-redesign .badge-desc { font-size: .65rem; color: #7F8C8D; margin-top: 2px; line-height: 1.3; }

/* Défi hero card */
.challenge-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 18px; padding: 22px 18px;
  color: #fff; position: relative; overflow: hidden;
  margin-bottom: 14px;
}
.challenge-hero.completed { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.challenge-hero::before {
  content: ''; position: absolute; top: -20px; right: -20px;
  width: 100px; height: 100px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.challenge-hero-emoji { font-size: 2.5rem; margin-bottom: 10px; display: block; }
.challenge-hero-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; line-height: 1.3; }
.challenge-hero-desc { font-size: .85rem; opacity: .85; line-height: 1.5; margin-bottom: 16px; }
.challenge-hero-footer { display: flex; align-items: center; gap: 10px; }
.challenge-hero-xp {
  background: rgba(255,255,255,.2); border-radius: 20px;
  padding: 4px 12px; font-size: .78rem; font-weight: 800;
}
.challenge-hero-photo-preview {
  width: 60px; height: 60px; border-radius: 10px;
  object-fit: cover; border: 2px solid rgba(255,255,255,.4);
  margin-left: auto;
}

/* Voice note bouton circulaire */
.voice-record-btn-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--red, #FC5C65); border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; cursor: pointer; color: white;
  transition: transform .15s;
  margin: 0 auto;
}
.voice-record-btn-circle:active { transform: scale(.92); }
.voice-record-btn-circle.recording { animation: recordPulse 1.2s ease-in-out infinite; }

/* ═══════════════════════════════════════════════════════════════════════════
   GOLDEN HORIZON — Design System Components
   Ajouté après la refonte UI/UX — ne pas supprimer
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Stat-cards : supprimer les 5 border-top simultanées (trop de bruit) ── */
.stat-card:nth-child(1),
.stat-card:nth-child(2),
.stat-card:nth-child(3),
.stat-card:nth-child(4),
.stat-card:nth-child(5) { border-top: none; }

/* ── Card surfaces (profondeur sans bordure) ── */
.card {
  background: var(--bg-surface, #1e1a14);
  border-radius: var(--r-lg, 16px);
  padding: var(--s4, 16px);
}
.card-raised {
  background: var(--bg-raised, #26211a);
  border-radius: var(--r-lg, 16px);
  padding: var(--s4, 16px);
}

/* ── Status border-left (sémantique, pas décoratif) ── */
.card-status-success { border-left: 3px solid var(--success, #4caf82); }
.card-status-warning  { border-left: 3px solid var(--warning, #e09b3d); }
.card-status-danger   { border-left: 3px solid var(--danger,  #d96b5a); }
.card-status-info     { border-left: 3px solid var(--cyan,    #5bbcb8); }
.card-status-kids     { border-left: 3px solid var(--kids,    #8b7fd4); }

/* ── btn-primary full-width CTA (Gold Horizon override) ── */
.btn-primary-cta {
  display: block; width: 100%;
  min-height: 52px; padding: 14px 20px;
  background: var(--accent, #d4833a); color: #fff;
  border: none; border-radius: 14px;
  font-family: var(--font-display, 'Syne', sans-serif);
  font-weight: 700; font-size: 15px;
  text-align: center; cursor: pointer;
  box-shadow: 0 2px 16px rgba(212,131,58,.28);
  transition: opacity 150ms var(--ease, ease),
              transform 150ms var(--ease, ease);
}
.btn-primary-cta:active { opacity: 0.85; transform: scale(0.99); }

/* ── Section label DM Mono ── */
.section-label {
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: 10px; color: var(--text-tertiary, #6b5d50);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: var(--s2, 8px);
}

/* ── Pills sémantiques ── */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
}
.pill-accent  { background: var(--accent-dim,  rgba(212,131,58,.15));  color: var(--accent,  #d4833a); }
.pill-success { background: var(--success-dim, rgba(76,175,130,.12));  color: var(--success, #4caf82); }
.pill-danger  { background: var(--danger-dim,  rgba(217,107,90,.12));  color: var(--danger,  #d96b5a); }
.pill-kids    { background: var(--kids-dim,    rgba(139,127,212,.12)); color: var(--kids,    #8b7fd4); }
.pill-cyan    { background: var(--cyan-dim,    rgba(91,188,184,.12));  color: var(--cyan,    #5bbcb8); }

/* ── Bottom nav Golden Horizon (override) ── */
.bottom-nav { height: calc(58px + env(safe-area-inset-bottom, 0px)); }
.bottom-nav-item { color: var(--text-tertiary, #6b5d50); }
.bottom-nav-item.active { color: var(--accent, #d4833a); }
.bottom-nav-item.active::after { background: var(--accent, #d4833a); }

/* ── Drawer bottom-sheet ── */
.drawer {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--bg-surface, #1e1a14);
  border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--border, rgba(255,235,210,.08));
  padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform var(--t-slow, 400ms) var(--ease, cubic-bezier(.16,1,.3,1));
  z-index: 200;
}
.drawer.open { transform: translateY(0); }
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-slow, 400ms) var(--ease, cubic-bezier(.16,1,.3,1));
  z-index: 199;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer-handle {
  width: 36px; height: 4px;
  background: var(--border-mid, rgba(255,235,210,.14));
  border-radius: 2px; margin: 0 auto 16px;
}

/* ── New keyframes ── */
@keyframes pulseDanger {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Mobile header (index.html + budget.html) ── */
.mobile-page-header {
  display: none;
  align-items: center; justify-content: space-between;
  padding: 14px 20px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: var(--bg-deep, #0d0b09);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--border, rgba(255,235,210,.08));
}
@media (max-width: 640px) { .mobile-page-header { display: flex; } }

.mobile-page-header-logo {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 17px; font-weight: 800; color: var(--text-1, #f5ede0);
  display: flex; align-items: center; gap: 8px; text-decoration: none;
}
.mobile-page-header-logo:hover { color: var(--text-1, #f5ede0); }
.mobile-page-header-logo .logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent, #d4833a);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  box-shadow: 0 0 10px rgba(212,131,58,.3);
}
.mobile-page-header-menu {
  width: 36px; height: 36px;
  background: var(--bg-surface, #1e1a14);
  border: 1px solid var(--border, rgba(255,235,210,.08));
  border-radius: 10px; font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2, #a09080);
}

/* ── Drawer menu items ── */
.drawer-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border, rgba(255,235,210,.06));
  font-size: 15px; font-weight: 500; color: var(--text-1, #f5ede0);
  text-decoration: none; cursor: pointer;
  transition: color var(--t-fast, 150ms);
  background: none; border-left: none; border-right: none; border-top: none;
  width: 100%; text-align: left;
}
.drawer-item:last-child { border-bottom: none; }
.drawer-item:hover, .drawer-item:active { color: var(--accent, #d4833a); }
.drawer-item-icon  { font-size: 20px; flex-shrink: 0; }
.drawer-item-label { flex: 1; }
.drawer-item-arrow { font-size: 14px; color: var(--text-tertiary, #6b5d50); }

/* ── Skeleton update (warm palette) ── */
.skeleton {
  background: linear-gradient(90deg,
    var(--bg-surface, #1e1a14) 25%,
    var(--bg-raised,  #26211a) 50%,
    var(--bg-surface, #1e1a14) 75%);
}

/* ── Budget sticky CTA ── */
.budget-sticky-cta {
  position: sticky; bottom: 0;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg, #0d0b09) 60%, transparent);
  z-index: 40;
}
.budget-sticky-cta .btn-primary-cta { margin: 0; }

/* ── Hero price DM Mono accent ── */
.hero-price-display {
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: 44px; font-weight: 700; color: var(--text-1, #f5ede0);
  letter-spacing: -2px; line-height: 1;
}
.hero-price-sub-display {
  font-size: 14px; color: var(--text-muted, #a09080); margin-top: 4px;
}

/* ── Stop card status (Golden Horizon bordure gauche) ── */
.stop-card[data-status="booked"]   {
  background: var(--bg-surface, #1e1a14);
  border-left: 3px solid var(--success, #4caf82) !important;
}
.stop-card[data-status="book_now"] {
  background: rgba(217,107,90,.04);
  border-left: 3px solid var(--danger, #d96b5a) !important;
  animation: pulseDanger 2.5s ease-in-out infinite;
}
.stop-card[data-status="watching"] {
  background: var(--bg-surface, #1e1a14);
  border-left: 3px solid var(--accent, #d4833a) !important;
}
.stop-card[data-status="searching"] {
  background: var(--bg-surface, #1e1a14);
  border-left: 3px solid var(--border-mid, rgba(255,235,210,.14)) !important;
}

/* ── Kids-entry dark mode ── */
.kids-entry-dark {
  background: #0f0b16;
  background-image: radial-gradient(circle, rgba(139,127,212,0.07) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* ── Family feed items Golden Horizon ── */
.feed-item.feed-item-accent   { border-left: 3px solid var(--accent, #d4833a); }
.feed-item.feed-item-cyan     { border-left: 3px solid var(--cyan,   #5bbcb8); }

/* ── hero-card warm gradient ── */
.hero-card::before {
  background: radial-gradient(ellipse at 80% 20%, rgba(212,131,58,.14) 0%, transparent 60%);
}

/* fin Golden Horizon */
