/* ============================================================
   TripCraft – Design System v2
   Warm light (Sunburnt Orange primary) + dark mode support
   ============================================================ */

/* ── Light Theme (default) ───────────────────────────────── */
:root {
  /* Surfaces */
  --bg-base:        #f8f6f5;
  --bg-surface:     #ffffff;
  --bg-elevated:    #fff1ed;
  --bg-card:        #ffffff;

  /* Borders */
  --border:         rgba(144,112,102,.18);
  --border-hover:   rgba(144,112,102,.35);

  /* Primary – Sunburnt Orange */
  --accent:         #f24a0d;
  --accent-hover:   #d63c00;
  --accent-muted:   rgba(242,74,13,.08);
  --accent-glow:    rgba(242,74,13,.22);

  /* Text – warm brown-black */
  --text-primary:   #281813;
  --text-secondary: #5c4038;
  --text-muted:     #907066;

  /* Semantic */
  --green:      #16a34a;
  --yellow:     #d97706;
  --red:        #dc2626;
  --red-muted:  rgba(220,38,38,.1);

  /* Radius */
  --radius-sm:  6px;
  --radius:     8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Shadows – subtle warm-tinted */
  --shadow-sm: 0 1px 3px rgba(171,47,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(171,47,0,.09), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 32px rgba(171,47,0,.12), 0 4px 8px rgba(0,0,0,.05);

  --blue:   #2563eb;

  --transition: .2s ease;
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  color-scheme: light;

  /* ── Hero section color tokens (light-mode defaults) ── */
  --tc-hero-bg:        var(--bg-base);
  --tc-hero-pill-bg:   rgba(0,0,0,.05);
  --tc-hero-pill-bd:   rgba(0,0,0,.14);
  --tc-hero-pill-clr:  var(--text-secondary);
  --tc-hero-sep-clr:   var(--text-muted);
  --tc-hero-tag-clr:   var(--text-muted);
  --tc-hero-desc-clr:  var(--text-secondary);
  --tc-term-bg:        rgba(20,20,28,.88);
  --tc-stat-bg:        var(--bg-surface);
  --tc-stat-bd:        var(--border);
  --tc-stat-bg-hov:    var(--bg-elevated);
  --tc-stat-bd-hov:    var(--border-hover);
  --tc-stat-lbl-clr:   var(--text-muted);
  --tc-ghost-bg:       transparent;
  --tc-ghost-clr:      var(--text-primary);
  --tc-ghost-bd:       var(--border-hover);
  --tc-ghost-bg-hov:   var(--bg-elevated);
  --tc-ghost-bd-hov:   var(--accent);
  --tc-blob-a-op:      .15;
  --tc-blob-b-op:      .12;
  --tc-blob-c-op:      .08;
}

/* ── Dark Theme ───────────────────────────────────────────── */
[data-theme="dark"] {
  /* Deeper base → cards stand out clearly (32+ unit diff vs bg-base) */
  --bg-base:        #0e0e10;
  --bg-surface:     #1a1a1d;
  --bg-elevated:    #242428;
  --bg-card:        #1a1a1d;

  --border:         rgba(255,255,255,.11);
  --border-hover:   rgba(255,255,255,.22);

  --accent:         #e8622a;
  --accent-hover:   #f07540;
  --accent-muted:   rgba(232,98,42,.18);
  --accent-glow:    rgba(232,98,42,.35);

  --text-primary:   #e2e2e6;
  --text-secondary: #a1a1aa;
  --text-muted:     #71717a;

  --green:      #4ade80;
  --yellow:     #fbbf24;
  --red:        #f87171;
  --red-muted:  rgba(248,113,113,.15);

  /* Visible ring-shadow separates card from background in dark */
  --shadow-sm: 0 1px 4px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.05);
  --shadow-md: 0 4px 18px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.07);
  --shadow-lg: 0 8px 36px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.08);

  --blue: #60a5fa;

  color-scheme: dark;

  /* ── Hero section color tokens (dark-mode overrides) ── */
  --tc-hero-bg:        #07070f;
  --tc-hero-pill-bg:   rgba(255,255,255,.07);
  --tc-hero-pill-bd:   rgba(255,255,255,.14);
  --tc-hero-pill-clr:  rgba(255,255,255,.78);
  --tc-hero-sep-clr:   rgba(255,255,255,.3);
  --tc-hero-tag-clr:   rgba(255,255,255,.5);
  --tc-hero-desc-clr:  rgba(255,255,255,.65);
  --tc-term-bg:        rgba(0,0,0,.55);
  --tc-stat-bg:        rgba(255,255,255,.05);
  --tc-stat-bd:        rgba(255,255,255,.1);
  --tc-stat-bg-hov:    rgba(255,255,255,.09);
  --tc-stat-bd-hov:    rgba(255,255,255,.18);
  --tc-stat-lbl-clr:   rgba(255,255,255,.5);
  --tc-ghost-bg:       rgba(255,255,255,.07);
  --tc-ghost-clr:      rgba(255,255,255,.85);
  --tc-ghost-bd:       rgba(255,255,255,.2);
  --tc-ghost-bg-hov:   rgba(255,255,255,.13);
  --tc-ghost-bd-hov:   rgba(255,255,255,.35);
  --tc-blob-a-op:      .55;
  --tc-blob-b-op:      .45;
  --tc-blob-c-op:      .35;
}

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

html { scroll-behavior: smooth; }

/* Remove focus outline on non-interactive elements (headings, divs etc.)
   that receive programmatic focus from Blazor navigation */
:focus:not(:focus-visible) { outline: none !important; }
h1, h2, h3, h4, h5, h6, p, div, section, main, article { outline: none !important; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color .3s ease, color .3s ease;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ── App Layout ──────────────────────────────────────────── */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  padding: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.app-footer {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
  border-top: 1px solid var(--border);
}

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .875rem 2rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  transition: background .3s ease, box-shadow .3s ease;
}

[data-theme="dark"] .navbar {
  background: rgba(37,37,38,.95);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary) !important;
}

.brand-logo {
  height: 34px;
  width: auto;
  display: block;
  transition: filter .2s ease;
}
/* Dark mode: invert+hue-rotate restores orange, brightens dark text */
[data-theme="dark"] .brand-logo,
[data-theme="dark"] .auth-logo-img {
  filter: invert(1) hue-rotate(180deg);
}
.brand-icon { display: none; }
.brand-text { display: none; }

.navbar-menu { display: flex; gap: .25rem; flex: 1; }

.nav-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .875rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary) !important;
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent) !important;
  background: var(--accent-muted);
}

.nav-link-accent {
  background: var(--accent) !important;
  color: #fff !important;
  border-radius: var(--radius-md);
}
.nav-link-accent:hover {
  background: var(--accent-hover) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px var(--accent-glow);
}
/* Prevent .nav-link.active from overriding text colour with accent on accent bg */
.nav-link.nav-link-accent,
.nav-link.nav-link-accent:hover,
.nav-link.nav-link-accent.active {
  color: #fff !important;
}

.navbar-user { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.user-name { font-size: .85rem; color: var(--text-secondary); }

/* Theme toggle */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover { background: var(--accent-muted); color: var(--accent); border-color: var(--accent); }

.navbar-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .5rem; }
.navbar-toggle span { display: block; width: 22px; height: 2px; background: var(--text-secondary); border-radius: 2px; transition: var(--transition); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .625rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
  white-space: nowrap;
  font-family: var(--font);
}

.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 4px 16px var(--accent-glow);
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-warning { background: var(--yellow); color: #fff; }
.btn-warning:hover:not(:disabled) { background: #c2771a; color: #fff; }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b91c1c; color: #fff; }

.btn-danger-ghost { background: transparent; color: var(--red); border: 1px solid rgba(220,38,38,.3); }
.btn-danger-ghost:hover { background: var(--red-muted); }

.btn-success { background: var(--green); color: #fff; }

.btn-sm { padding: .375rem .75rem; font-size: .8rem; }
.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
}
.btn-full { width: 100%; justify-content: center; }
.btn-star-active { color: var(--yellow) !important; }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.form-hint { font-weight: 400; color: var(--text-muted); text-transform: none; }

.form-input {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  padding: .75rem 1rem;
  border-radius: var(--radius-md);
  font-size: .95rem;
  font-family: var(--font);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input-lg { font-size: 1.15rem; padding: .9rem 1.1rem; }
.form-input option { background: var(--bg-surface); color: var(--text-primary); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 1rem; }
.form-checkbox { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--text-secondary); }

.password-field { position: relative; }
.toggle-password { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1.1rem; color: var(--text-muted); }

/* ── Cards & Surfaces ────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: .875rem 1rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .75rem 0;
}
.alert-error { background: var(--red-muted); border: 1px solid rgba(220,38,38,.25); color: var(--red); }
.alert-success { background: rgba(22,163,74,.08); border: 1px solid rgba(22,163,74,.25); color: var(--green); }

/* ── Page structure ──────────────────────────────────────── */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.page-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.section-title { font-size: 1.15rem; font-weight: 700; color: var(--text-secondary); margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 3rem;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--accent-muted); color: var(--accent);
  border: 1px solid rgba(242,74,13,.2);
  border-radius: 100px; padding: .3rem .9rem;
  font-size: .8rem; font-weight: 600; margin-bottom: 1.25rem;
}
.hero-title { font-size: 3.5rem; font-weight: 800; line-height: 1.15; margin-bottom: 1.25rem; letter-spacing: -.02em; }
.gradient-text { color: var(--accent); }
.hero-subtitle { font-size: 1.15rem; color: var(--text-secondary); margin-bottom: 2rem; max-width: 540px; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-visual { text-align: center; }
.hero-globe { font-size: 10rem; animation: float 4s ease-in-out infinite; }

@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-15px)} }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin: 3rem 0; }
.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature-icon { font-size: 2rem; margin-bottom: .75rem; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.feature-card p { font-size: .875rem; color: var(--text-secondary); line-height: 1.5; }

/* ── Auth ─────────────────────────────────────────────────── */
.auth-body { background: var(--bg-base); display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-container { width: 100%; max-width: 420px; padding: 1.5rem; }
.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}
.auth-logo { display: flex; justify-content: center; margin-bottom: 1.5rem; }
.auth-logo-img {
  height: 48px;
  width: auto;
}
.auth-logo-icon { display: none; }
.auth-logo-text { display: none; }
.auth-title { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: .4rem; }
.auth-subtitle { color: var(--text-secondary); text-align: center; margin-bottom: 2rem; font-size: .9rem; }
.auth-form { display: flex; flex-direction: column; gap: 1.25rem; }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
}
.spinner-overlay:not(.inline) {
  position: fixed; inset: 0;
  background: rgba(248,246,245,.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
}
[data-theme="dark"] .spinner-overlay:not(.inline) {
  background: rgba(30,30,30,.88);
}
.spinner-content { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-message { color: var(--text-secondary); font-size: .9rem; }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 5rem 2rem; text-align: center; gap: 1rem;
}
.empty-icon { font-size: 4rem; }
.empty-state h2 { font-size: 1.4rem; font-weight: 700; }
.empty-state p { color: var(--text-secondary); }

/* ── Table ───────────────────────────────────────────────── */
.table-container { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { padding: .875rem 1rem; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); background: var(--bg-elevated); border-bottom: 1px solid var(--border); }
.data-table td { padding: .875rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--accent-muted); }
.row-inactive td { opacity: .5; }

.user-cell { display: flex; align-items: center; gap: .75rem; }
.user-avatar { width: 32px; height: 32px; background: var(--accent-muted); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--accent); font-size: .85rem; }

.badge { display: inline-flex; padding: .25rem .625rem; border-radius: 100px; font-size: .75rem; font-weight: 600; }
.badge-admin { background: rgba(242,74,13,.12); color: var(--accent); }
.badge-user { background: var(--bg-elevated); color: var(--text-secondary); }
.badge-active { background: rgba(22,163,74,.1); color: var(--green); }
.badge-inactive { background: var(--red-muted); color: var(--red); }

.action-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.add-user-form { margin-bottom: 1.5rem; }

/* ── Trip Cards ──────────────────────────────────────────── */
.trips-section { margin-bottom: 3rem; }
.trips-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }

.trip-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.trip-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.trip-card-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.25rem .75rem; }
.trip-destination { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--text-secondary); }

.favorite-btn { background: none; border: none; font-size: 1.3rem; cursor: pointer; transition: transform var(--transition); line-height: 1; }
.favorite-btn:hover { transform: scale(1.3); }
.favorite-btn.active { filter: drop-shadow(0 0 6px rgba(215,119,6,.5)); }

.trip-card-body { padding: 0 1.25rem .75rem; flex: 1; }
.trip-name { font-size: 1.05rem; font-weight: 700; margin-bottom: .4rem; }
.trip-dates { font-size: .8rem; color: var(--text-secondary); display: flex; align-items: center; gap: .4rem; }
.trip-duration { color: var(--text-muted); }

.trip-weather-strip { display: flex; overflow-x: auto; padding: .5rem 1.25rem; gap: .5rem; border-top: 1px solid var(--border); scrollbar-width: none; }
.trip-weather-strip::-webkit-scrollbar { display: none; }

.weather-mini { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 36px; }
.temp-tiny { font-size: .7rem; color: var(--text-muted); }

.trip-card-footer { display: flex; justify-content: space-between; align-items: center; padding: .875rem 1.25rem; border-top: 1px solid var(--border); }
.trip-status { font-size: .75rem; font-weight: 600; }
.status-planned { color: var(--accent); }
.status-completed { color: var(--green); }
.status-draft { color: var(--text-muted); }

/* ── Trip Detail ─────────────────────────────────────────── */
.back-link { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-secondary); font-size: .9rem; margin-bottom: 1.5rem; cursor: pointer; background: none; border: none; font-family: var(--font); transition: color var(--transition); }
.back-link:hover { color: var(--accent); }

.trip-detail-header { margin-bottom: 2rem; }
.trip-detail-title h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; letter-spacing: -.02em; }
.trip-detail-meta { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--text-secondary); font-size: .9rem; margin-top: .5rem; }
.trip-detail-actions { margin-top: 1rem; }

.weather-forecast-strip { margin-bottom: 2.5rem; }
.weather-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ── Weather Card ─────────────────────────────────────────── */
.weather-card { display: flex; flex-direction: column; align-items: center; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .875rem; min-width: 80px; text-align: center; box-shadow: var(--shadow-sm); }
.day-weather { flex-direction: row; gap: .5rem; min-width: auto; }
.weather-icon { font-size: 1.5rem; }
.weather-date { font-size: .72rem; color: var(--text-muted); }
.weather-temp { display: flex; gap: 2px; align-items: baseline; }
.temp-max { font-weight: 700; }
.temp-min { font-size: .8rem; color: var(--text-muted); }
.weather-desc { font-size: .72rem; color: var(--text-secondary); margin-top: 2px; }
.weather-rain { font-size: .7rem; color: var(--blue); }

.weather-mini-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }

/* ── Day Groups ──────────────────────────────────────────── */
.trip-itinerary { display: flex; flex-direction: column; gap: 2.5rem; }
.day-group { }
.day-header { margin-bottom: 1.25rem; }
.day-badge {
  display: inline-flex;
  background: var(--accent-muted); color: var(--accent);
  border: 1px solid rgba(242,74,13,.2);
  border-radius: 100px; padding: .25rem .875rem;
  font-size: .8rem; font-weight: 700; margin-bottom: .4rem;
}
.day-title { font-size: 1.35rem; font-weight: 700; margin-bottom: .25rem; }
.day-date { font-size: .85rem; color: var(--text-secondary); }

.attractions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; }

/* ── Attraction Card ─────────────────────────────────────── */
.attraction-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.attraction-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }

.attraction-image { position: relative; height: 200px; background: var(--bg-elevated); overflow: hidden; }
.attraction-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.attraction-card:hover .attraction-image img { transform: scale(1.05); }
.attraction-image-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: var(--bg-elevated); }

.attraction-body { padding: 1.25rem; flex: 1; }
.attraction-date { font-size: .75rem; color: var(--text-muted); margin-bottom: .4rem; }
.attraction-title { font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.attraction-desc { font-size: .85rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.attraction-meta { margin-top: .75rem; }
.attraction-location { font-size: .78rem; color: var(--accent); display: flex; align-items: flex-start; gap: .3rem; }
.attraction-location:hover { color: var(--accent-hover); }

.attraction-weather { padding: .5rem 1rem; border-top: 1px solid var(--border); }

/* ── Attraction Detail ───────────────────────────────────── */
.attraction-detail {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}
.attraction-detail-nav { margin-bottom: 1.25rem; }
.attraction-detail-header { margin-bottom: 2rem; }
.attraction-detail-title { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; letter-spacing: -.02em; }
.attraction-detail-location { display: inline-flex; align-items: center; gap: .4rem; color: var(--text-secondary); font-size: .9rem; }
.maps-link { color: var(--accent); margin-left: .25rem; }

.attraction-detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; align-items: start; }
.attraction-detail-main { display: flex; flex-direction: column; gap: 1.5rem; }
.attraction-detail-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

.sidebar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-card h3 { font-size: .9rem; font-weight: 700; margin-bottom: .875rem; }

.gallery { border-radius: var(--radius-lg); overflow: hidden; }
.gallery-main { width: 100%; height: 420px; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .5rem; }
.gallery-thumb { width: 100px; height: 70px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: border-color var(--transition); }
.gallery-thumb.active { border-color: var(--accent); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 420px; background: var(--bg-elevated); font-size: 4rem; gap: .75rem; border-radius: var(--radius-lg); }

.attraction-description h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }
.attraction-description p { color: var(--text-secondary); margin-bottom: .875rem; line-height: 1.7; }
.description-placeholder { opacity: .5; font-style: italic; }
.wiki-source-link { display: inline-block; margin-top: .5rem; font-size: .8rem; color: var(--text-muted); }
.wiki-source-link:hover { color: var(--accent); }

.map-embed { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }

.info-list dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-top: .75rem; }
.info-list dd { font-size: .875rem; color: var(--text-primary); margin-top: .15rem; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(40,24,19,.45);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 500;
}
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem; max-width: 420px; width: 90%;
  box-shadow: var(--shadow-lg);
}
.modal h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: .75rem; }
.modal p { color: var(--text-secondary); margin-bottom: 1.5rem; }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; }

/* ── Not found ───────────────────────────────────────────── */
.not-found { text-align: center; padding: 5rem 2rem; }
.not-found-icon { font-size: 4rem; margin-bottom: 1rem; }

/* ── Wizard ──────────────────────────────────────────────── */
.wizard-container { max-width: 860px; margin: 0 auto; }

/* Progress bar style (design.md: slim pill bar) */
.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
  overflow-x: auto;
  padding-bottom: .5rem;
}

.wizard-step { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.step-circle {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700;
  transition: all var(--transition);
  color: var(--text-secondary);
}
.wizard-step.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px var(--accent-muted);
}
.wizard-step.done .step-circle {
  background: rgba(22,163,74,.12);
  border-color: var(--green);
  color: var(--green);
}
.step-label { font-size: .7rem; color: var(--text-muted); white-space: nowrap; font-weight: 500; }
.wizard-step.active .step-label { color: var(--accent); font-weight: 600; }
.wizard-step.done .step-label { color: var(--green); }

.step-connector { flex: 1; min-width: 24px; height: 2px; background: var(--border); margin: 0 .25rem; margin-bottom: 1.25rem; transition: background var(--transition); border-radius: 100px; }
.step-connector.done { background: var(--green); }

/* Progress track (thin bar) */
.wizard-progress-track {
  height: 6px;
  background: rgba(242,74,13,.15);
  border-radius: 100px;
  margin-bottom: 1rem;
  overflow: hidden;
}
.wizard-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 100px;
  transition: width .4s ease;
}

.wizard-content { min-height: 400px; }
.wizard-step-content { display: flex; flex-direction: column; gap: 1.5rem; }

.step-header { text-align: center; padding: .5rem 0; }
.step-emoji { font-size: 3rem; margin-bottom: .5rem; }
.step-header h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .4rem; letter-spacing: -.02em; }
.step-header p { color: var(--text-secondary); font-size: .95rem; }

.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.wizard-nav { display: flex; justify-content: space-between; align-items: center; padding-top: .5rem; }

.info-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  background: var(--accent-muted); color: var(--accent);
  border: 1px solid rgba(242,74,13,.2);
  border-radius: 100px; padding: .3rem .875rem;
  font-size: .85rem; font-weight: 500;
}

/* ── Counter ─────────────────────────────────────────────── */
.counter-row { display: flex; align-items: center; justify-content: space-between; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.counter-row:last-of-type { border-bottom: none; }
.counter-label { font-size: .95rem; font-weight: 500; }
.counter-control { display: flex; align-items: center; gap: .875rem; }
.counter-btn {
  width: 34px; height: 34px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: 50%; color: var(--text-primary);
  font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); font-family: var(--font);
}
.counter-btn:hover { background: var(--accent-muted); border-color: var(--accent); color: var(--accent); }
.counter-value { font-size: 1.15rem; font-weight: 700; min-width: 28px; text-align: center; color: var(--text-primary); }

/* ── Intensity Slider ─────────────────────────────────────── */
.intensity-slider { display: flex; flex-direction: column; gap: .5rem; }
.intensity-labels { display: flex; justify-content: space-between; font-size: .75rem; color: var(--text-muted); }
.intensity-badge {
  background: var(--accent-muted); color: var(--accent);
  border: 1px solid rgba(242,74,13,.2);
  border-radius: 100px; padding: .3rem 1rem;
  font-size: .85rem; font-weight: 600; display: inline-block;
}

/* ── Range ───────────────────────────────────────────────── */
input[type=range] {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}
.range-with-value { display: flex; align-items: center; gap: 1rem; }
.range-with-value input { flex: 1; }
.range-value { font-weight: 700; color: var(--accent); min-width: 52px; text-align: right; }
.range-labels { display: flex; justify-content: space-between; font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }

.radius-display { text-align: center; padding: 1.5rem 0 .5rem; }
.radius-value { font-size: 3rem; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.radius-value span { font-size: 1.5rem; color: var(--text-secondary); }
.radius-desc { font-size: .9rem; color: var(--text-secondary); margin-top: .25rem; }

/* ── Tiles ───────────────────────────────────────────────── */
.tiles-grid { display: flex; flex-wrap: wrap; gap: .625rem; }
.tile {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: .5rem .875rem;
  cursor: pointer; font-size: .875rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  font-family: var(--font); font-weight: 500;
  user-select: none;
}
/* Hover tylko na urządzeniach z prawdziwym kursorem (nie dotyk) */
@media (hover: hover) {
  .tile:hover:not(.tile-selected) {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-muted);
  }
}
/* Zaznaczony = pełne wypełnienie + biały tekst — wyraźnie różny od hover */
.tile-selected {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.tiles-grid-lg { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .875rem; }
.tile-lg {
  display: flex; flex-direction: column;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem; cursor: pointer; text-align: left;
  transition: all var(--transition);
  font-family: var(--font); color: var(--text-primary);
  gap: .3rem; box-shadow: var(--shadow-sm);
}
.tile-lg:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.tile-lg.tile-selected {
  border-color: var(--accent) !important;
  background: var(--accent-muted) !important;
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.tile-emoji { font-size: 1.5rem; line-height: 1; }
.tile-name { font-size: .875rem; font-weight: 700; }
.tile-desc { font-size: .75rem; color: var(--text-secondary); line-height: 1.4; }

.selection-hint { font-size: .8rem; color: var(--text-muted); text-align: right; }

/* ── Proposal Cards ──────────────────────────────────────── */
.proposals-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }

.proposals-empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 3rem 2rem; gap: 0.75rem;
}
.proposals-empty-state .empty-icon { font-size: 3rem; }
.proposals-empty-state h3 { font-size: 1.25rem; color: var(--text-primary); margin: 0; }
.proposals-empty-state p { color: var(--text-secondary); max-width: 420px; margin: 0; }

.proposal-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  cursor: pointer; transition: all var(--transition);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.proposal-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.proposal-selected {
  border-color: var(--accent) !important;
  background: var(--accent-muted) !important;
  box-shadow: 0 0 0 3px var(--accent-muted), var(--shadow-md) !important;
}

.proposal-image { width: 100%; height: 160px; overflow: hidden; flex-shrink: 0; }
.proposal-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.proposal-card:hover .proposal-image img { transform: scale(1.04); }
.proposal-emoji-banner { height: 100px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: var(--bg-elevated); flex-shrink: 0; }
.proposal-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; position: relative; }
.proposal-check-badge {
  position: absolute; top: .6rem; right: .6rem;
  width: 22px; height: 22px; background: var(--accent);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: #fff; font-weight: 700;
  opacity: 0; transition: opacity var(--transition);
}
.proposal-selected .proposal-check-badge { opacity: 1; }

.proposal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .75rem; }
.proposal-emoji { font-size: 1.75rem; }
.proposal-check { width: 22px; height: 22px; background: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .75rem; color: #fff; font-weight: 700; opacity: 0; transition: opacity var(--transition); }
.proposal-selected .proposal-check { opacity: 1; }

.proposal-title { font-size: .95rem; font-weight: 700; margin-bottom: .4rem; }
.proposal-desc { font-size: .8rem; color: var(--text-secondary); line-height: 1.4; }
.proposal-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem; }
.proposal-category { font-size: .7rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 100px; padding: .15rem .5rem; color: var(--text-muted); }
.proposal-duration { font-size: .75rem; color: var(--text-secondary); }

.proposal-info-btn {
  position: absolute; bottom: .55rem; right: .55rem;
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 50%;
  width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-style: normal; cursor: pointer; color: var(--text-muted);
  transition: all var(--transition); line-height: 1;
}
.proposal-info-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Must-see ribbon ─────────────────────────────────────── */
.must-see-ribbon {
  position: absolute; top: 10px; left: -28px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; font-size: .68rem; font-weight: 700;
  padding: .25rem 2.2rem; transform: rotate(-45deg);
  white-space: nowrap; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.proposal-must-see-card { border-color: #f59e0b !important; }
.proposal-must-see-card:hover { border-color: #d97706 !important; box-shadow: 0 4px 16px rgba(245,158,11,.2) !important; }

/* ── Popularity dots ─────────────────────────────────────── */
.proposal-popularity { display: flex; gap: 2px; margin-top: .35rem; align-items: center; }
.pop-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border);
  flex-shrink: 0; transition: background var(--transition);
}
.pop-dot-filled { background: var(--accent); border-color: var(--accent); }

/* ── Card info lines ─────────────────────────────────────── */
.proposal-info-line {
  font-size: .72rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: .3rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ticket-free  { color: var(--green); font-weight: 600; }
.ticket-paid  { color: var(--text-secondary); }

/* ── Proposal Preview Modal ──────────────────────────────── */
.proposal-modal {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-xl); width: 94%; max-width: 640px;
  overflow: hidden; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.proposal-modal-banner {
  height: 160px; display: flex; align-items: center; justify-content: center;
  font-size: 4.5rem; background: var(--bg-elevated);
}
.proposal-modal-body { padding: 1.5rem; display: flex; flex-direction: column; gap: .85rem; }

/* Modal title row */
.modal-title-row { display: flex; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.modal-title-row h2 { font-size: 1.4rem; font-weight: 800; margin: 0; flex: 1; letter-spacing: -.01em; }
.must-see-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; font-size: .72rem; font-weight: 700;
  padding: .2rem .6rem; border-radius: 100px; white-space: nowrap; flex-shrink: 0;
}

/* Popularity bar */
.modal-popularity { display: flex; align-items: center; gap: .6rem; }
.modal-pop-label { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }
.modal-pop-bar { flex: 1; height: 6px; background: var(--bg-elevated); border-radius: 100px; overflow: hidden; }
.modal-pop-fill { height: 100%; background: linear-gradient(90deg, var(--accent), #d97706); border-radius: 100px; transition: width .4s ease; }
.modal-pop-value { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }

/* Practical info grid */
.modal-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.modal-info-item {
  display: flex; align-items: flex-start; gap: .5rem;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: .6rem .75rem;
}
.modal-info-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.4; }
.modal-info-label { font-size: .65rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: .15rem; }
.modal-info-value { font-size: .82rem; color: var(--text-primary); font-weight: 600; }
.modal-info-value.ticket-free { color: var(--green); }

/* Meta tags */
.proposal-modal-meta { display: flex; gap: .4rem; flex-wrap: wrap; }
.proposal-modal-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .25rem; }

/* Description */
.modal-description p { color: var(--text-secondary); line-height: 1.75; margin-bottom: .6rem; font-size: .9rem; }
.modal-description p:last-child { margin-bottom: 0; }

/* Reviews */
.modal-reviews { border-top: 1px solid var(--border); padding-top: .85rem; }
.modal-reviews-title { font-size: .85rem; font-weight: 700; color: var(--text-secondary); margin-bottom: .6rem; }
.modal-review-quote {
  background: var(--bg-elevated); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: .65rem .9rem; margin: 0 0 .5rem 0;
  font-size: .83rem; color: var(--text-secondary); line-height: 1.6; font-style: italic;
}
.modal-review-quote:last-child { margin-bottom: 0; }
.modal-wiki-link { align-self: flex-start; }

/* ── Photo Carousel ──────────────────────────────────────── */
.modal-carousel {
  position: relative; width: 100%; height: 260px;
  background: var(--bg-elevated); overflow: hidden; flex-shrink: 0;
}
.modal-carousel-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(40,24,19,.55); color: #fff; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%;
  font-size: 1.4rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: background var(--transition); z-index: 2;
}
.carousel-nav:hover:not(:disabled) { background: rgba(40,24,19,.8); }
.carousel-nav:disabled { opacity: .35; cursor: default; }
.carousel-prev { left: .6rem; }
.carousel-next { right: .6rem; }
.carousel-counter {
  position: absolute; top: .6rem; right: .75rem;
  background: rgba(40,24,19,.55); color: #fff; border-radius: 100px;
  font-size: .72rem; padding: .15rem .5rem; z-index: 2;
}
.carousel-dots {
  position: absolute; bottom: .6rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 2;
}
.carousel-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,.45); cursor: pointer;
  transition: background var(--transition);
}
.carousel-dot.active { background: #fff; }

/* ── Loading spinners ────────────────────────────────────── */
.detail-loading { display: flex; align-items: center; gap: .6rem; color: var(--text-muted); font-size: .9rem; margin-bottom: 1rem; }
.detail-spinner {
  width: 16px; height: 16px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.description-placeholder { opacity: .5; font-style: italic; color: var(--text-secondary); }

/* ── Planning Type ───────────────────────────────────────── */
.planning-type-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.25rem; }
.planning-type-card {
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem; cursor: pointer; text-align: center;
  transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.planning-type-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.planning-type-card.selected {
  border-color: var(--accent);
  background: var(--accent-muted);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.pt-icon { font-size: 2rem; margin-bottom: .5rem; }
.planning-type-card h3 { font-weight: 700; margin-bottom: .3rem; }
.planning-type-card p { font-size: .82rem; color: var(--text-secondary); }

.planning-options { display: flex; flex-direction: column; gap: 1rem; padding-top: .5rem; border-top: 1px solid var(--border); }

.btn-generate {
  background: var(--accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}
.btn-generate:hover { background: var(--accent-hover); box-shadow: 0 6px 20px var(--accent-glow); transform: translateY(-1px); color: #fff; }

/* ── Wizard loading / AI thinking ───────────────────────── */
.wizard-loading, .wizard-error {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 400px; text-align: center;
}
.ai-thinking { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }

.ai-orb {
  width: 80px; height: 80px;
  background: radial-gradient(circle, var(--accent), #d63c00);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 40px var(--accent-glow);
}

@keyframes pulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 40px var(--accent-glow); }
  50% { transform: scale(1.1); box-shadow: 0 0 60px var(--accent-glow); }
}

.ai-thinking h2 { font-size: 1.4rem; font-weight: 700; }
.ai-thinking p { color: var(--text-secondary); }

.error-icon { font-size: 3.5rem; margin-bottom: .75rem; }
.wizard-error h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: .5rem; }
.wizard-error p { color: var(--text-secondary); margin-bottom: 1.5rem; max-width: 480px; }
.ai-error { color: var(--red); font-size: .9rem; text-align: center; padding: 1rem; background: var(--red-muted); border-radius: var(--radius-md); }

/* ── Wizard success ──────────────────────────────────────── */
.wizard-success { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 400px; text-align: center; }
.success-header { margin-bottom: 2.5rem; }
.success-icon { font-size: 4rem; margin-bottom: 1rem; }
.success-header h1 { font-size: 2rem; font-weight: 800; margin-bottom: .5rem; letter-spacing: -.02em; }
.success-header p { color: var(--text-secondary); }
.success-actions { display: flex; flex-direction: column; gap: .75rem; align-items: center; }

/* ── Utility ─────────────────────────────────────────────── */
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1080px) {
  .attraction-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .attraction-detail { padding: 1.25rem; border-radius: var(--radius-lg); }
  .main-content { padding: 1.25rem; }
  .hero { grid-template-columns: 1fr; gap: 1.5rem; padding: 2.5rem 0 1.5rem; }
  .hero-title { font-size: 2.25rem; }
  .hero-visual { display: none; }
  .features { grid-template-columns: 1fr 1fr; }
  .navbar-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(255,255,255,.97); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 1rem; box-shadow: var(--shadow-md); }
  [data-theme="dark"] .navbar-menu { background: rgba(37,37,38,.97); }
  .navbar-menu.open { display: flex; }
  .navbar { position: relative; flex-wrap: wrap; }
  .navbar-toggle { display: flex; }
  .form-grid, .form-row { grid-template-columns: 1fr; }
  .tiles-grid-lg { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .proposals-grid { grid-template-columns: 1fr 1fr; }
  .planning-type-cards { grid-template-columns: 1fr; }
  .wizard-steps { justify-content: flex-start; }
  .step-connector { min-width: 16px; }
}

@media (max-width: 480px) {
  .features { grid-template-columns: 1fr; }
  .proposals-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.9rem; }
  .modal-info-grid { grid-template-columns: 1fr; }
  .modal-carousel { height: 200px; }
}

/* ═══════════════════════════════════════════════════════════
   TRIP DETAIL ENHANCEMENTS
   ═══════════════════════════════════════════════════════════ */

/* ── Attraction Card — enriched fields ─────────────────── */
.attraction-badge-mustsee {
  position: absolute;
  top: .6rem; left: .6rem;
  background: var(--accent);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 99px;
  letter-spacing: .02em;
  pointer-events: none;
}

.attraction-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .3rem;
}
.attraction-header-row .attraction-title { margin-bottom: 0; }

.attraction-popularity {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
  padding-top: 2px;
}
.pop-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: transparent;
  flex-shrink: 0;
}
.pop-dot-full { background: var(--accent); }

.attraction-category-pill {
  display: inline-block;
  background: var(--accent-muted, rgba(242,74,13,.1));
  color: var(--accent);
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 99px;
  margin-bottom: .6rem;
  letter-spacing: .03em;
  text-transform: uppercase;
}
[data-theme="dark"] .attraction-category-pill { background: rgba(232,98,42,.15); }

.attraction-info-grid {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-top: .65rem;
  font-size: .8rem;
  color: var(--text-secondary);
}
.attraction-info-item {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  line-height: 1.4;
}
.info-icon { flex-shrink: 0; }
.attraction-location {
  display: flex; align-items: flex-start; gap: .4rem;
  color: var(--accent); text-decoration: none;
  font-size: .8rem;
}
.attraction-location:hover { color: var(--accent-hover); }

.attraction-distance {
  margin-top: .75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  font-size: .78rem;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-radius: var(--radius-md, .5rem);
  padding: .4rem .7rem;
}
.distance-km { font-weight: 700; color: var(--text-primary); }
.distance-sep { color: var(--text-muted); }
.distance-label { color: var(--text-muted); margin-left: auto; }

.attraction-reviews {
  margin-top: .75rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.attraction-review {
  margin: 0;
  font-size: .78rem;
  font-style: italic;
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  padding-left: .5rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Hotel section ──────────────────────────────────────── */
.hotel-section { margin-bottom: 1.5rem; }

.hotel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.hotel-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.hotel-icon { font-size: 2rem; flex-shrink: 0; line-height: 1; }
.hotel-card-header > div { flex: 1; min-width: 0; }
.hotel-title { font-size: 1rem; font-weight: 700; margin-bottom: .2rem; }
.hotel-address { font-size: .9rem; color: var(--text-secondary); margin: 0; }
.hotel-address-empty { color: var(--text-muted); font-style: italic; }
.hotel-edit-btn { flex-shrink: 0; margin-left: auto; }

.hotel-input-row {
  display: flex;
  gap: .6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.hotel-input { flex: 1; min-width: 220px; }
.hotel-error { font-size: .82rem; color: var(--red); margin: .5rem 0 0; }

/* ── Map section ────────────────────────────────────────── */
.trip-map-section { margin-bottom: 2rem; }
.trip-map-section .section-title { margin-bottom: .75rem; }

.tc-map-wrap {
  height: 440px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

/* Custom Leaflet markers */
.tc-map-pin {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  border: 2.5px solid rgba(255,255,255,.9);
}

.tc-map-pin-hotel {
  background: #1a73e8 !important;
  width: 38px; height: 38px;
  font-size: 18px;
  border-color: rgba(255,255,255,.95);
  box-shadow: 0 3px 10px rgba(0,0,0,.5);
}

/* Leaflet popup overrides */
.tc-map-popup { font-family: var(--font, Inter, sans-serif); font-size: .82rem; min-width: 150px; }
.tc-map-popup strong { display: block; font-weight: 700; margin-bottom: .2rem; font-size: .88rem; }
.tc-map-popup div { margin-top: .15rem; color: var(--text-secondary, #555); }
.tc-map-cat { font-size: .72rem; font-weight: 600; color: var(--accent, #f24a0d); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .1rem; }
.tc-map-day { font-size: .7rem; color: var(--text-muted, #888); margin-top: .3rem; }

[data-theme="dark"] .tc-map-popup div { color: #aaa; }
[data-theme="dark"] .leaflet-popup-content-wrapper { background: #252526; color: #d4d4d4; border: 1px solid rgba(255,255,255,.1); }
[data-theme="dark"] .leaflet-popup-tip { background: #252526; }

/* Leaflet attribution link — keep it subtle */
.leaflet-control-attribution { font-size: .65rem !important; }

/* ══════════════════════════════════════════════════════════════
   HOME PAGE — Cinematic Hero + Feature Cards
   Hero is ALWAYS dark (independent of light/dark theme toggle).
   Feature cards follow the current theme.
   ══════════════════════════════════════════════════════════════ */

/* ── Full-bleed escape from .main-content max-width ────────── */
.tc-hero-wrap {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  /* pull top flush with layout edge */
  margin-top: -2rem;
  overflow: hidden;
}

/* ── Hero canvas ────────────────────────────────────────────── */
.tc-hero {
  position: relative;
  background: var(--tc-hero-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6rem 1.5rem 5rem;
}

/* ── Ambient gradient blobs ─────────────────────────────────── */
.tc-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--tc-blob-a-op, .55);
  pointer-events: none;
  will-change: transform;
}

.tc-blob-orange {
  width: 620px; height: 620px;
  background: radial-gradient(circle, #f24a0d 0%, #ff7a3a 45%, transparent 70%);
  bottom: -160px; right: -120px;
  animation: blob-drift-a 18s ease-in-out infinite alternate;
}

.tc-blob-blue {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #3b4fd4 0%, #5b7ef5 45%, transparent 70%);
  top: -80px; left: -80px;
  opacity: var(--tc-blob-b-op, .45);
  animation: blob-drift-b 22s ease-in-out infinite alternate;
}

.tc-blob-violet {
  width: 380px; height: 380px;
  background: radial-gradient(circle, #7c3aed 0%, #a78bfa 50%, transparent 72%);
  top: 35%; left: 42%;
  opacity: var(--tc-blob-c-op, .35);
  animation: blob-drift-c 28s ease-in-out infinite alternate;
}

@keyframes blob-drift-a {
  from { transform: translate(0, 0)   scale(1);    }
  to   { transform: translate(-60px, -40px) scale(1.12); }
}
@keyframes blob-drift-b {
  from { transform: translate(0, 0)   scale(1);    }
  to   { transform: translate(50px,  60px)  scale(1.08); }
}
@keyframes blob-drift-c {
  from { transform: translate(0, 0)   scale(1);    }
  to   { transform: translate(-30px, 50px) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .tc-blob { animation: none !important; }
}

/* ── Floating globe illustration ────────────────────────────── */
.tc-globe-wrap {
  position: absolute;
  right: max(-80px, calc(50% - 610px));
  top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 34vw, 480px);
  z-index: 1;           /* behind tc-hero-inner (z-index: 2) */
  pointer-events: none;
}

/* Dual-colour glow matching hero blobs */
.tc-globe-glow {
  position: absolute;
  inset: -22%;
  background: radial-gradient(circle,
    rgba(242,74,13,.28)  0%,
    rgba(59,79,212,.18) 42%,
    transparent 68%);
  border-radius: 50%;
  filter: blur(36px);
  animation: globe-glow-pulse 7s ease-in-out infinite;
}

.tc-globe {
  position: relative;
  width: 100%;
  height: auto;
  animation: globe-float 10s ease-in-out infinite;
  filter:
    drop-shadow(0 28px 52px rgba(242,74,13,.32))
    drop-shadow(-6px 10px 28px rgba(59,79,212,.22));
  will-change: transform;
}

@keyframes globe-float {
  0%, 100% { transform: translateY(0px)   rotate(0deg)   scale(1);     }
  38%       { transform: translateY(-22px) rotate(3.5deg) scale(1.03);  }
  72%       { transform: translateY(-10px) rotate(-2deg)  scale(1.015); }
}

@keyframes globe-glow-pulse {
  0%, 100% { opacity: .6;  transform: scale(1);    }
  50%       { opacity: 1;   transform: scale(1.18); }
}

@media (prefers-reduced-motion: reduce) {
  .tc-globe, .tc-globe-glow { animation: none !important; }
}

/* Tablet – shrink + fade behind text */
@media (max-width: 1100px) {
  .tc-globe-wrap {
    right: -120px;
    width: clamp(200px, 38vw, 300px);
    opacity: .45;
  }
}

/* Mobile – hide entirely */
@media (max-width: 700px) {
  .tc-globe-wrap { display: none; }
}

/* ── Inner column ───────────────────────────────────────────── */
.tc-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 860px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
}

/* ── Powered-by pills ───────────────────────────────────────── */
.tc-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .4rem .6rem;
}

.tc-pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .75rem;
  background: var(--tc-hero-pill-bg);
  border: 1px solid var(--tc-hero-pill-bd);
  border-radius: 999px;
  color: var(--tc-hero-pill-clr);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .02em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.tc-pill-sep {
  padding: 0;
  background: none;
  border: none;
  color: var(--tc-hero-sep-clr);
  font-size: .9rem;
}

.tc-pill-icon {
  width: 13px; height: 13px;
  flex-shrink: 0;
  opacity: .75;
}

/* ── Headline ───────────────────────────────────────────────── */
.tc-hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  line-height: 1.1;
}

.tc-grad-text {
  font-size: clamp(3.6rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: -.03em;
  background: linear-gradient(135deg,
    #ff7a3a 0%,
    #f24a0d 28%,
    #ff6b9d 55%,
    #c77dff 78%,
    #7b91ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tc-hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.45rem);
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--tc-hero-tag-clr);
}

/* ── Descriptor ─────────────────────────────────────────────── */
.tc-hero-desc {
  font-size: clamp(.95rem, 1.8vw, 1.1rem);
  color: var(--tc-hero-desc-clr);
  line-height: 1.65;
  max-width: 640px;
}

.tc-br-lg { display: block; }
@media (max-width: 600px) { .tc-br-lg { display: none; } }

/* ── Terminal command box ───────────────────────────────────── */
.tc-terminal {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.25rem;
  background: var(--tc-term-bg);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md, 12px);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-family: 'SFMono-Regular', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  font-size: .85rem;
  color: rgba(255,255,255,.85);
  box-shadow: 0 4px 20px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07);
}

.tc-term-ps {
  color: #4ec994;
  font-weight: 700;
  user-select: none;
}

.tc-term-cmd { color: rgba(255,255,255,.9); }

.tc-term-cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: rgba(255,255,255,.75);
  border-radius: 1px;
  vertical-align: text-bottom;
  animation: cursor-blink 1.1s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ── CTA buttons ────────────────────────────────────────────── */
.tc-ctas {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.tc-cta-primary {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 2rem;
  background: linear-gradient(135deg, #f24a0d, #ff7a3a);
  color: #fff !important;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(242,74,13,.5);
  transition: transform .18s ease, box-shadow .18s ease;
  text-decoration: none;
}

.tc-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(242,74,13,.65);
  color: #fff !important;
}

.tc-cta-primary svg { flex-shrink: 0; }

.tc-cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 2rem;
  background: var(--tc-ghost-bg);
  color: var(--tc-ghost-clr) !important;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 999px;
  border: 1px solid var(--tc-ghost-bd);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
  text-decoration: none;
}

.tc-cta-ghost:hover {
  background: var(--tc-ghost-bg-hov);
  border-color: var(--tc-ghost-bd-hov);
  color: var(--tc-ghost-clr) !important;
}

/* ── Stat cards ─────────────────────────────────────────────── */
.tc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  width: 100%;
  max-width: 720px;
}

.tc-stat {
  background: var(--tc-stat-bg);
  border: 1px solid var(--tc-stat-bd);
  border-radius: var(--radius-lg, 16px);
  padding: 1.1rem .75rem .9rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  transition: background .2s ease, border-color .2s ease;
}

.tc-stat:hover {
  background: var(--tc-stat-bg-hov);
  border-color: var(--tc-stat-bd-hov);
}

.tc-stat-num {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #ff7a3a, #f24a0d);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tc-stat-icon {
  -webkit-text-fill-color: unset;
  background: none;
  color: var(--accent);
}

.tc-stat-sup {
  font-size: .95rem;
  font-weight: 700;
  /* inherits gradient from parent */
}

.tc-stat-lbl {
  font-size: .72rem;
  font-weight: 500;
  color: var(--tc-stat-lbl-clr);
  text-transform: uppercase;
  letter-spacing: .07em;
  text-align: center;
  line-height: 1.3;
}

/* ── Features section (follows current theme) ──────────────── */
.tc-features {
  padding: 4rem 0 3rem;
}

.tc-features-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}

.tc-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.tc-feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-md);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.tc-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-hover);
}

.tc-feat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tc-feat-icon svg {
  width: 22px; height: 22px;
  stroke: var(--accent);
}

.tc-feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tc-feature-card p {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Responsive adjustments ────────────────────────────────── */
@media (max-width: 700px) {
  .tc-hero { padding: 5rem 1.25rem 4rem; }

  .tc-stats {
    grid-template-columns: repeat(2, 1fr);
    max-width: 400px;
  }

  .tc-features-grid {
    grid-template-columns: 1fr;
  }

  .tc-terminal {
    font-size: .75rem;
    padding: .6rem 1rem;
    text-align: left;
    overflow-x: auto;
    max-width: calc(100vw - 2.5rem);
  }

  .tc-ctas { gap: .75rem; }
  .tc-cta-primary,
  .tc-cta-ghost { padding: .8rem 1.5rem; font-size: .95rem; }
}

@media (max-width: 420px) {
  .tc-stats { grid-template-columns: repeat(2, 1fr); }
  .tc-hero-tagline { letter-spacing: .1em; }
}

/* ══════════════════════════════════════════════════════════════
   COMPREHENSIVE DARK-MODE SUPPLEMENT
   Applied on top of the token system to cover native controls,
   smooth transitions, and edge cases that CSS vars alone miss.
   ══════════════════════════════════════════════════════════════ */

/* ── 1. Smooth theme-switch transitions on every major surface ── */
body,
.main-content,
.app-footer,
/* cards */
.trip-card, .trip-card-footer,
.form-card,
.proposal-card,
.planning-type-card,
.attraction-card,
.attraction-detail,
.attraction-detail-header,
.sidebar-card,
.weather-card,
.hotel-card,
/* modals */
.modal, .proposal-modal,
/* wizard */
.wizard-steps, .wizard-content, .step-circle, .step-connector,
/* inputs & controls */
.tile, .tile-lg, .counter-btn,
.form-input, .form-select, .form-textarea,
/* trip detail */
.day-group, .trip-detail-header,
.trip-weather-strip,
/* home feature cards */
.tc-feature-card,
/* map */
.tc-map-wrap {
  transition:
    background-color .3s ease,
    border-color     .3s ease,
    box-shadow       .3s ease,
    color            .3s ease;
}

/* ── 2. Scrollbars ─────────────────────────────────────────── */
[data-theme="dark"] {
  scrollbar-color: #3a3a40 #0e0e10;
  scrollbar-width: thin;
}
[data-theme="dark"] ::-webkit-scrollbar         { width: 8px; height: 8px; }
[data-theme="dark"] ::-webkit-scrollbar-track   { background: #0e0e10; }
[data-theme="dark"] ::-webkit-scrollbar-thumb   { background: #3a3a40; border-radius: 4px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #52525b; }

/* ── 3. Text selection ─────────────────────────────────────── */
::selection          { background: var(--accent-muted); color: var(--text-primary); }
::-moz-selection    { background: var(--accent-muted); color: var(--text-primary); }

/* ── 4. Native form controls ───────────────────────────────── */
/* Placeholder text */
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); opacity: 1; }

/* Date / time picker calendar icon → invert in dark mode */
[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(.8);
  cursor: pointer;
}

/* Range input track — browsers use system default, override here */
[data-theme="dark"] input[type=range]::-webkit-slider-runnable-track {
  background: #3a3a40;
}
[data-theme="dark"] input[type=range]::-moz-range-track {
  background: #3a3a40;
}

/* ── 5. Focus rings use accent token ──────────────────────── */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

/* ── 6. Navbar backdrop in dark mode ─────────────────────── */
[data-theme="dark"] .navbar {
  background: rgba(14,14,16,.95);
  border-bottom-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .navbar-menu {
  background: rgba(14,14,16,.97);
}

/* ── 7. Page-level surfaces ───────────────────────────────── */
[data-theme="dark"] .app-footer {
  border-top-color: rgba(255,255,255,.08);
}

[data-theme="dark"] .main-content {
  background: transparent;  /* shows body --bg-base */
}

/* ── 8. Cards — explicit dark mode ring for definition ─────── */
[data-theme="dark"] .trip-card,
[data-theme="dark"] .form-card,
[data-theme="dark"] .proposal-card,
[data-theme="dark"] .planning-type-card,
[data-theme="dark"] .attraction-card,
[data-theme="dark"] .attraction-detail,
[data-theme="dark"] .sidebar-card,
[data-theme="dark"] .weather-card,
[data-theme="dark"] .hotel-card,
[data-theme="dark"] .modal,
[data-theme="dark"] .proposal-modal,
[data-theme="dark"] .tc-feature-card {
  background: var(--bg-surface);
  border-color: var(--border);
}

/* ── 9. Wizard ─────────────────────────────────────────────── */
[data-theme="dark"] .step-circle {
  background: var(--bg-elevated);
  border-color: var(--border);
}
[data-theme="dark"] .wizard-step.active .step-circle {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
[data-theme="dark"] .step-connector {
  background: var(--border);
}
[data-theme="dark"] .step-connector.done {
  background: var(--green);
}

/* ── 10. Counter buttons ─────────────────────────────────── */
[data-theme="dark"] .counter-btn {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-primary);
}

/* ── 11. Tile selection ──────────────────────────────────── */
[data-theme="dark"] .tile {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-secondary);
}
[data-theme="dark"] .tile:hover:not(.tile-selected) {
  background: var(--accent-muted);
  border-color: var(--accent);
}

/* ── 12. Modal overlay scrim ────────────────────────────── */
[data-theme="dark"] .modal-overlay {
  background: rgba(0,0,0,.72);
}

/* ── 13. Attraction category pill ──────────────────────── */
[data-theme="dark"] .attraction-category-pill {
  background: var(--accent-muted);
}

/* ── 14. Attraction distance chip ──────────────────────── */
[data-theme="dark"] .attraction-distance {
  background: var(--bg-elevated);
}

/* ── 15. Info chip / intensity badge ────────────────────── */
[data-theme="dark"] .info-chip,
[data-theme="dark"] .intensity-badge {
  border-color: rgba(232,98,42,.25);
}

/* ── 16. Day badge ───────────────────────────────────────── */
[data-theme="dark"] .day-badge {
  border-color: rgba(232,98,42,.25);
}

/* ── 17. Proposal must-see card border ──────────────────── */
[data-theme="dark"] .proposal-must-see-card {
  border-color: #d97706 !important;
}
[data-theme="dark"] .proposal-must-see-card:hover {
  border-color: #b45309 !important;
}

/* ── 18. Modal popularity bar track ────────────────────── */
[data-theme="dark"] .modal-pop-bar {
  background: var(--bg-elevated);
}

/* ── 19. Pop dots ────────────────────────────────────────── */
[data-theme="dark"] .pop-dot {
  background: var(--bg-elevated);
  border-color: var(--border);
}

/* ── 20. Leaflet map dark mode (invert tiles, keep markers) */
[data-theme="dark"] .leaflet-tile-pane {
  filter: invert(100%) hue-rotate(180deg) brightness(.9) contrast(.85);
}
/* Re-invert custom HTML markers so they keep correct colors */
[data-theme="dark"] .tc-map-pin,
[data-theme="dark"] .tc-map-pin-hotel {
  filter: invert(100%) hue-rotate(180deg);
}
[data-theme="dark"] .leaflet-control-zoom a {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border);
}
[data-theme="dark"] .leaflet-control-zoom a:hover {
  background: var(--bg-elevated);
}
[data-theme="dark"] .leaflet-control-attribution {
  background: rgba(14,14,16,.8) !important;
  color: var(--text-muted) !important;
}

/* ── 21. Proposal info btn ───────────────────────────────── */
[data-theme="dark"] .proposal-info-btn {
  background: var(--bg-elevated);
  border-color: var(--border);
  color: var(--text-muted);
}

/* ── 22. Carousel overlays ───────────────────────────────── */
[data-theme="dark"] .carousel-nav {
  background: rgba(0,0,0,.6);
}
[data-theme="dark"] .carousel-nav:hover:not(:disabled) {
  background: rgba(0,0,0,.82);
}
[data-theme="dark"] .carousel-counter {
  background: rgba(0,0,0,.6);
}

/* ── 23. Home feature cards in dark mode ─────────────────── */
[data-theme="dark"] .tc-feature-card {
  background: var(--bg-surface);
}
[data-theme="dark"] .tc-feature-card:hover {
  border-color: var(--border-hover);
}

/* ── 24. Skeleton / empty states ────────────────────────── */
[data-theme="dark"] .empty-state {
  color: var(--text-secondary);
}

/* ── 25. Back / nav links ────────────────────────────────── */
[data-theme="dark"] .back-link {
  color: var(--text-secondary);
}
[data-theme="dark"] .back-link:hover {
  color: var(--accent);
}

/* ── 26. Section titles ──────────────────────────────────── */
[data-theme="dark"] .section-title {
  color: var(--text-primary);
}

/* ── 27. AI orb pulse in dark ────────────────────────────── */
[data-theme="dark"] .ai-orb {
  background: radial-gradient(circle, var(--accent), #b53200);
  box-shadow: 0 0 40px var(--accent-glow);
}

/* ── 28. Wiki source link ────────────────────────────────── */
[data-theme="dark"] .wiki-source-link {
  color: var(--text-muted);
}

/* ── 29. Gallery placeholder ─────────────────────────────── */
[data-theme="dark"] .gallery-placeholder {
  background: var(--bg-elevated);
}

/* ── 30. Sidebar card headers ────────────────────────────── */
[data-theme="dark"] .sidebar-card h3 {
  color: var(--text-primary);
}
