/* ============================================================
   REVR — Stylesheet
   Dark / Industrial / Motorcycle aesthetic
   Font: Barlow + Barlow Condensed
============================================================ */

:root {
  --bg:        #08080F;
  --surface:   #111119;
  --card:      #18181F;
  --card2:     #1F1F2C;
  --border:    rgba(255,255,255,.07);
  --orange:    #FF6B00;
  --orange2:   #FF9A3C;
  --orange-glow: rgba(255,107,0,.25);
  --red:       #EF4444;
  --green:     #22C55E;
  --blue:      #3B82F6;
  --text:      #F0F0F0;
  --text2:     #888899;
  --text3:     #555566;
  --radius:    14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow:    0 4px 24px rgba(0,0,0,.5);
  --nav-h:     64px;
  --bn-h:      68px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* ── Layout ── */
.app-wrapper { padding-top: var(--nav-h); padding-bottom: var(--bn-h); }
.container    { max-width: 680px; margin: 0 auto; padding: 0 16px; }
.container-lg { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(8,8,15,.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}

.nav-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px; font-weight: 900;
  color: var(--orange);
  letter-spacing: 2px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.nav-center {
  display: flex; align-items: center; gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px;
}

.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 40px;
  color: var(--text2); font-size: 13px; font-weight: 600;
  transition: all .2s;
  white-space: nowrap;
}
.nav-link svg { width: 18px; height: 18px; }
.nav-link span { display: none; }
.nav-link:hover { color: var(--text); background: var(--card2); }
.nav-link.active { color: var(--orange); background: var(--orange-glow); }

.nav-record {
  background: var(--orange) !important;
  color: #fff !important;
  padding: 8px 12px;
  box-shadow: 0 0 20px var(--orange-glow);
}
.nav-record:hover { background: var(--orange2) !important; transform: scale(1.05); }
.nav-record svg { width: 22px; height: 22px; }

.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.nav-icon {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--text2);
  transition: all .2s;
}
.nav-icon:hover { color: var(--text); background: var(--card2); }
.nav-icon.has-badge::after {
  content: attr(data-count);
  position: absolute; top: 2px; right: 2px;
  background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 2px 5px; border-radius: 10px;
  min-width: 16px; text-align: center;
  border: 2px solid var(--bg);
}

.nav-avatar img {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--orange);
}

/* ── Bottom Nav (Mobile) ── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  height: var(--bn-h);
  background: rgba(8,8,15,.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 0 8px 8px;
  align-items: center; justify-content: space-around;
}

.bn-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 8px 12px;
  color: var(--text3); font-size: 10px; font-weight: 600;
  border-radius: 12px; transition: all .2s;
  min-width: 52px;
}
.bn-item svg { width: 22px; height: 22px; }
.bn-item.active { color: var(--orange); }
.bn-item.bn-record {
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  width: 52px; height: 52px;
  box-shadow: 0 0 24px var(--orange-glow);
  padding: 0;
}
.bn-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid var(--orange); }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-body { padding: 16px; }
.card-hover { transition: transform .2s, box-shadow .2s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.4); }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; letter-spacing: .3px;
  transition: all .2s; white-space: nowrap;
}
.btn-primary   { background: var(--orange); color: #fff; box-shadow: 0 4px 16px rgba(255,107,0,.3); }
.btn-primary:hover { background: var(--orange2); box-shadow: 0 4px 24px rgba(255,107,0,.5); transform: translateY(-1px); }
.btn-outline   { background: transparent; border: 1px solid var(--border); color: var(--text2); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn-ghost     { background: var(--card2); color: var(--text); }
.btn-ghost:hover { background: var(--card); }
.btn-danger    { background: var(--red); color: #fff; }
.btn-sm        { padding: 6px 14px; font-size: 12px; }
.btn-lg        { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }
.btn-full      { width: 100%; }
.btn-icon      { width: 40px; height: 40px; padding: 0; border-radius: 50%; }

/* ── Form ── */
.form-group   { margin-bottom: 16px; }
.form-label   { display: block; font-size: 12px; font-weight: 700; color: var(--text2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .8px; }
.form-control {
  width: 100%; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 15px;
  transition: border-color .2s;
  outline: none;
}
.form-control:focus { border-color: var(--orange); }
.form-control::placeholder { color: var(--text3); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }

/* ── Avatar ── */
.avatar      { border-radius: 50%; object-fit: cover; }
.avatar-xs   { width: 28px; height: 28px; }
.avatar-sm   { width: 36px; height: 36px; }
.avatar-md   { width: 48px; height: 48px; }
.avatar-lg   { width: 64px; height: 64px; }
.avatar-xl   { width: 80px; height: 80px; }
.avatar-xxl  { width: 100px; height: 100px; }
.avatar-border { border: 3px solid var(--orange); }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.badge-orange { background: rgba(255,107,0,.15); color: var(--orange); }
.badge-green  { background: rgba(34,197,94,.15); color: var(--green); }
.badge-red    { background: rgba(239,68,68,.15); color: var(--red); }
.badge-blue   { background: rgba(59,130,246,.15); color: var(--blue); }
.badge-gray   { background: var(--card2); color: var(--text2); }

/* ── Post Card ── */
.post-card { margin-bottom: 12px; }

.post-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 10px;
}
.post-user-info { flex: 1; }
.post-username   { font-weight: 700; font-size: 14px; }
.post-meta       { font-size: 12px; color: var(--text2); display: flex; align-items: center; gap: 6px; }

.post-body { padding: 0 16px 12px; }
.post-text { font-size: 15px; line-height: 1.6; }
.post-image { width: 100%; max-height: 480px; object-fit: cover; }
.post-location {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text2);
  background: var(--card2); padding: 4px 10px; border-radius: 20px;
  margin-top: 8px;
}

.post-actions {
  display: flex; align-items: center; gap: 4px;
  padding: 8px 12px 12px; border-top: 1px solid var(--border);
}
.post-action-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 10px;
  font-size: 13px; font-weight: 600; color: var(--text2);
  transition: all .2s;
}
.post-action-btn:hover { background: var(--card2); color: var(--text); }
.post-action-btn.liked  { color: var(--orange); }
.post-action-btn svg { width: 18px; height: 18px; }
.post-action-btn.liked svg { fill: var(--orange); stroke: var(--orange); }

/* ── Stories Strip ── */
.stories-strip {
  display: flex; gap: 12px; overflow-x: auto; padding: 16px;
  scrollbar-width: none;
}
.stories-strip::-webkit-scrollbar { display: none; }

.story-item {
  flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer;
}
.story-ring {
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #FF0080);
  padding: 2px;
}
.story-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); }
.story-add { background: var(--card2); display: flex; align-items: center; justify-content: center; }
.story-name { font-size: 11px; color: var(--text2); max-width: 60px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Compose Box ── */
.compose-box {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 12px;
}
.compose-input {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 16px; color: var(--text);
  font-size: 15px; resize: none; outline: none; min-height: 44px;
  transition: border-color .2s;
}
.compose-input:focus { border-color: var(--orange); }
.compose-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.compose-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--text2); transition: all .2s;
}
.compose-icon-btn:hover { color: var(--orange); background: var(--orange-glow); }

/* ── Profile ── */
.profile-cover {
  height: 220px; width: 100%; object-fit: cover; position: relative;
  background: linear-gradient(135deg, #1a1a2e, #FF6B00);
}
.profile-header {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin: -60px 16px 0; overflow: hidden;
  position: relative; z-index: 2;
}
.profile-avatar-wrap {
  position: absolute; left: 20px; bottom: 16px;
}
.profile-info { padding: 16px 20px 20px 136px; }
.profile-name  { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 900; }
.profile-handle { font-size: 13px; color: var(--text2); }
.profile-stats  { display: flex; gap: 24px; margin-top: 14px; }
.profile-stat   { text-align: center; }
.profile-stat-num  { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 900; color: var(--orange); }
.profile-stat-label { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; }

/* ── Tabs ── */
.tabs { display: flex; gap: 2px; background: var(--surface); border-radius: 12px; padding: 4px; }
.tab-btn {
  flex: 1; padding: 10px; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: var(--text2);
  text-align: center; transition: all .2s; cursor: pointer;
}
.tab-btn.active { background: var(--card); color: var(--orange); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Route Card ── */
.route-card { display: flex; flex-direction: column; }
.route-map-thumb { height: 160px; background: #1a1a2e; position: relative; overflow: hidden; }
.route-map-thumb img { width: 100%; height: 100%; object-fit: cover; }
.route-map-thumb .route-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 50%);
}
.route-stats-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px;
}
.route-stat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); }
.route-stat strong { color: var(--text); font-size: 15px; font-weight: 700; }

/* ── Trip Card ── */
.trip-card { display: flex; flex-direction: column; }
.trip-cover {
  height: 180px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0f0f1a, #FF6B00);
}
.trip-cover img { width: 100%; height: 100%; object-fit: cover; }
.trip-cover-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
}
.trip-status-badge {
  position: absolute; top: 12px; right: 12px;
}
.trip-riders { display: flex; align-items: center; }
.trip-riders img { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface); margin-left: -8px; object-fit: cover; }
.trip-riders:first-child { margin-left: 0; }

/* ── Map ── */
#record-map, .leaflet-map { width: 100%; border-radius: var(--radius); overflow: hidden; }
.leaflet-container { background: #1a1a2e !important; }
.leaflet-tile { filter: brightness(0.85) saturate(0.8); }

/* ── Chat ── */
.chat-layout { display: flex; height: calc(100vh - var(--nav-h) - var(--bn-h)); }
.conversations-panel {
  width: 320px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto; background: var(--surface);
}
.chat-panel { flex: 1; display: flex; flex-direction: column; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }

.convo-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; cursor: pointer; border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.convo-item:hover, .convo-item.active { background: var(--card); }
.convo-item.unread .convo-name { color: var(--text); font-weight: 700; }
.convo-name { font-weight: 600; font-size: 14px; }
.convo-preview { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-time { font-size: 11px; color: var(--text3); white-space: nowrap; }
.unread-dot { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; flex-shrink: 0; }

.msg-bubble {
  max-width: 68%; padding: 10px 14px; border-radius: 18px;
  font-size: 14px; line-height: 1.5;
}
.msg-mine { background: var(--orange); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.msg-theirs { background: var(--card2); color: var(--text); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg-wrap { display: flex; flex-direction: column; }
.msg-wrap.mine { align-items: flex-end; }
.msg-meta { font-size: 11px; color: var(--text3); margin-top: 3px; }

.chat-input-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--border);
  background: var(--surface);
}
.chat-input {
  flex: 1; background: var(--card2); border: 1px solid var(--border);
  border-radius: 24px; padding: 10px 18px; color: var(--text);
  font-size: 14px; outline: none; transition: border-color .2s;
}
.chat-input:focus { border-color: var(--orange); }

/* ── Notification Items ── */
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  transition: background .15s; cursor: pointer;
}
.notif-item:hover { background: var(--card2); }
.notif-item.unread { background: rgba(255,107,0,.04); }
.notif-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  background: var(--card2);
}
.notif-text { flex: 1; font-size: 14px; line-height: 1.5; }
.notif-text strong { color: var(--orange); }
.notif-time { font-size: 11px; color: var(--text3); flex-shrink: 0; }

/* ── Club Card ── */
.club-card { display: flex; gap: 16px; align-items: center; padding: 16px; }
.club-avatar-lg { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.club-name { font-weight: 800; font-size: 16px; }
.club-meta { font-size: 12px; color: var(--text2); }
.club-members-row { display: flex; align-items: center; gap: 4px; margin-top: 8px; }

/* ── Explore Grid ── */
.explore-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.explore-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.explore-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.explore-card:hover img { transform: scale(1.05); }
.explore-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 50%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 12px;
}
.explore-card-title { font-weight: 800; font-size: 14px; }
.explore-card-sub   { font-size: 11px; color: rgba(255,255,255,.7); }

/* ── Stats Widgets ── */
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-widget {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; text-align: center;
}
.stat-widget-num { font-family: 'Barlow Condensed', sans-serif; font-size: 32px; font-weight: 900; color: var(--orange); }
.stat-widget-label { font-size: 11px; color: var(--text2); text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }

/* ── Garage ── */
.bike-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px;
}
.bike-photo { width: 80px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface); flex-shrink: 0; }
.bike-info  { flex: 1; }
.bike-name  { font-weight: 800; font-size: 16px; }
.bike-model { font-size: 13px; color: var(--text2); }
.primary-badge { background: var(--orange); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }

/* ── Landing page ── */
.landing {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg);
  overflow: hidden;
}
.landing-hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; text-align: center; padding: 40px 20px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255,107,0,.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(255,107,0,.08) 0%, transparent 70%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: .06;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
}

.hero-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(80px, 20vw, 160px); font-weight: 900;
  color: var(--orange); letter-spacing: -4px;
  line-height: 1; text-transform: uppercase;
  position: relative; z-index: 1;
  text-shadow: 0 0 80px rgba(255,107,0,.4);
}
.hero-tagline {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(18px, 4vw, 28px); font-weight: 700;
  letter-spacing: 6px; text-transform: uppercase;
  color: var(--text2); position: relative; z-index: 1; margin-top: -8px;
}
.hero-desc {
  max-width: 520px; font-size: 16px; color: var(--text2);
  margin: 24px auto; line-height: 1.7; position: relative; z-index: 1;
}

.hero-actions { display: flex; gap: 12px; margin-top: 8px; position: relative; z-index: 1; flex-wrap: wrap; justify-content: center; }

.hero-features {
  display: flex; gap: 32px; margin-top: 48px; position: relative; z-index: 1; flex-wrap: wrap; justify-content: center;
}
.hero-feature {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text2);
}
.hero-feature-icon { font-size: 20px; }

/* Auth forms */
.auth-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  width: 100%; max-width: 420px;
}
.auth-logo { font-family: 'Barlow Condensed', sans-serif; font-size: 36px; font-weight: 900; color: var(--orange); letter-spacing: 2px; text-align: center; margin-bottom: 8px; }
.auth-subtitle { text-align: center; font-size: 14px; color: var(--text2); margin-bottom: 28px; }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--text3); font-size: 12px; margin: 16px 0; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background: var(--border); }
.auth-switch { text-align: center; font-size: 14px; color: var(--text2); margin-top: 20px; }
.auth-switch a { color: var(--orange); font-weight: 700; }

/* ── Section headers ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title  { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.section-link   { font-size: 13px; color: var(--orange); font-weight: 700; }

/* ── Leaderboard ── */
.leaderboard-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.lb-rank { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 900; width: 32px; text-align: center; }
.lb-rank.top3 { color: var(--orange); }
.lb-info { flex: 1; }
.lb-score { font-family: 'Barlow Condensed', sans-serif; font-size: 18px; font-weight: 900; color: var(--orange); }

/* ── GPS Record ── */
.record-page { padding: 0; }
.record-map  { height: calc(100vh - var(--nav-h) - var(--bn-h) - 160px); }
.record-panel {
  background: var(--card); border-top: 1px solid var(--border);
  padding: 16px; display: flex; flex-direction: column; gap: 16px;
}
.record-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.record-stat { text-align: center; }
.record-stat-val { font-family: 'Barlow Condensed', sans-serif; font-size: 28px; font-weight: 900; color: var(--orange); }
.record-stat-lbl { font-size: 10px; color: var(--text2); text-transform: uppercase; letter-spacing: .6px; }
.record-controls { display: flex; gap: 12px; justify-content: center; align-items: center; }
.record-btn {
  width: 72px; height: 72px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; transition: all .2s;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
.record-btn-start  { background: var(--orange); color: #fff; }
.record-btn-start:hover { transform: scale(1.08); box-shadow: 0 0 32px var(--orange-glow); }
.record-btn-pause  { background: #F59E0B; color: #fff; }
.record-btn-stop   { background: var(--red); color: #fff; }

/* ── Hazard map ── */
.hazard-marker { font-size: 24px; cursor: pointer; }

/* ── Toast ── */
.toast {
  position: fixed; bottom: calc(var(--bn-h) + 16px); left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 24px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  z-index: 999; transition: opacity .3s;
  white-space: nowrap;
}
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error   { border-color: var(--red); color: var(--red); }
.toast.hidden  { opacity: 0; pointer-events: none; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.75); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
}
.modal-title { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 900; margin-bottom: 20px; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--card2); color: var(--text2); cursor: pointer;
}
.modal-close:hover { color: var(--text); }

/* ── Misc ── */
.divider   { height: 1px; background: var(--border); margin: 16px 0; }
.spacer-sm { height: 8px; }
.spacer    { height: 16px; }
.spacer-lg { height: 24px; }
.flex      { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col  { display: flex; flex-direction: column; }
.gap-8     { gap: 8px; }
.gap-12    { gap: 12px; }
.gap-16    { gap: 16px; }
.text-orange { color: var(--orange); }
.text-muted  { color: var(--text2); }
.text-sm     { font-size: 13px; }
.text-xs     { font-size: 11px; }
.fw-bold     { font-weight: 700; }
.fw-black    { font-weight: 900; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-16  { padding: 16px; }
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text2);
}
.empty-state-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3   { font-size: 18px; color: var(--text); margin-bottom: 8px; }

/* ── Animated gradient accent line ── */
.accent-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  animation: shimmer 2s ease-in-out infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: .4; }
  50% { opacity: 1; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-center, .nav-right .nav-icon { display: none; }
  .bottom-nav { display: flex; }
  .navbar { padding: 0 16px; justify-content: space-between; }
  .nav-right { gap: 8px; }
  .nav-avatar img { width: 32px; height: 32px; }

  .conversations-panel { display: none; width: 100%; }
  .conversations-panel.show-mobile { display: block; }

  .profile-info { padding: 8px 16px 16px 110px; }
  .profile-cover { height: 160px; }
  .profile-avatar-wrap img { width: 80px; height: 80px; }
  .profile-stats { gap: 16px; }

  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .explore-grid { grid-template-columns: repeat(2, 1fr); }

  .record-map { height: calc(100vh - var(--nav-h) - var(--bn-h) - 200px); }

  .auth-panel { padding: 24px 20px; }

  .modal-box { padding: 20px; }
}

@media (min-width: 900px) {
  .nav-link span { display: inline; }
  .container { padding: 0 24px; }
}

/* ── Loading pulse ── */
.pulse { animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card2) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shine { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Side Panel (Desktop) ── */
.two-col { display: flex; gap: 24px; align-items: flex-start; max-width: 1100px; margin: 0 auto; padding: 24px 20px; }
.main-col { flex: 1; min-width: 0; }
.side-col { width: 300px; flex-shrink: 0; position: sticky; top: calc(var(--nav-h) + 16px); }

@media (max-width: 900px) {
  .two-col { flex-direction: column; }
  .side-col { width: 100%; position: static; }
}

/* ── Page header ── */
.page-header {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 20px; margin-bottom: 0;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: var(--nav-h); z-index: 50;
}
.page-title { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 900; text-transform: uppercase; }

/* ── PWA Install Banner ── */
.pwa-banner {
  position: fixed; bottom: calc(var(--bn-h) + 12px); left: 12px; right: 12px;
  background: var(--card); border: 1px solid var(--orange);
  border-radius: var(--radius); padding: 16px;
  display: flex; align-items: center; gap: 12px; z-index: 500;
  box-shadow: 0 8px 32px rgba(255,107,0,.2);
}
.pwa-banner.hidden { display: none; }

/* ═══════════════════════════════════════════════════════════
   PROFILE PAGE
═══════════════════════════════════════════════════════════ */
.profile-page { padding-bottom: 5rem; }

.profile-banner {
  height: 220px;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, var(--orange) 200%);
  background-size: cover;
  background-position: center;
  position: relative;
}
.profile-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(10,10,10,.8));
}

.profile-main { margin-top: -60px; position: relative; z-index: 2; }

.profile-info-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar-lg { width: 100px; height: 100px; border-radius: 50%; border: 4px solid var(--orange); object-fit: cover; }
.verified-badge {
  position: absolute; bottom: 0; right: 0;
  background: var(--orange); color: #000; width: 22px; height: 22px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .7rem;
}
.profile-meta { flex: 1; min-width: 200px; }
.profile-name-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .25rem; }
.profile-name-row h1 { font-size: 1.5rem; font-weight: 800; margin: 0; }
.rev-rank-badge { background: rgba(255,107,0,.15); border: 1px solid var(--orange); color: var(--orange); padding: .2rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.profile-username { color: var(--text-muted); font-size: .9rem; margin: 0 0 .25rem; }
.profile-location { color: var(--text-muted); font-size: .85rem; margin: 0 0 .5rem; }
.profile-bio { font-size: .9rem; color: var(--text-secondary); margin: .5rem 0; line-height: 1.5; }
.riding-style-tag { display: inline-block; background: var(--bg-card); border: 1px solid var(--border); padding: .2rem .6rem; border-radius: 99px; font-size: .8rem; }
.profile-rev { display: flex; align-items: baseline; gap: .4rem; margin-top: .75rem; }
.rev-score-big { font-size: 1.4rem; font-weight: 900; color: var(--orange); font-family: 'Barlow Condensed', sans-serif; }
.rev-label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; }
.profile-actions { display: flex; flex-direction: column; gap: .5rem; min-width: 130px; }

.profile-stats-bar {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem;
  display: flex; gap: 1rem; justify-content: space-around; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.pstat { text-align: center; }
.pstat-val { display: block; font-size: 1.3rem; font-weight: 800; color: var(--orange); }
.pstat-lbl { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; }
.pstat.clickable { cursor: pointer; }
.pstat.clickable:hover .pstat-val { text-decoration: underline; }

.profile-content-grid { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .profile-content-grid { grid-template-columns: 1fr; } }

.profile-sidebar .card { margin-bottom: 1rem; }
.bike-item { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.bike-item:last-of-type { border-bottom: none; }
.bike-icon { font-size: 1.5rem; }
.bike-info strong { display: block; font-size: .9rem; }
.bike-info span { font-size: .8rem; color: var(--text-muted); }
.bike-primary-badge { background: var(--orange); color: #000; font-size: .65rem; font-weight: 700; padding: .15rem .4rem; border-radius: 99px; white-space: nowrap; }
.card-link { display: block; padding: .5rem 0; font-size: .85rem; color: var(--orange); text-align: center; text-decoration: none; }
.club-mini { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; text-decoration: none; color: var(--text); font-size: .85rem; }
.club-mini-icon { font-size: 1.2rem; }
.club-mini img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

.profile-feed { min-width: 0; }
.post-menu { position: relative; margin-left: auto; }
.post-menu-btn { background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; padding: .25rem; }
.post-menu-dropdown { display: none; position: absolute; right: 0; top: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; min-width: 120px; z-index: 10; }
.post-menu-dropdown.open { display: block; }
.post-menu-dropdown button { display: block; width: 100%; padding: .5rem .75rem; background: none; border: none; color: var(--text); text-align: left; cursor: pointer; font-size: .85rem; }
.post-menu-dropdown button:hover { background: var(--bg-card); }

.followers-list { max-height: 400px; overflow-y: auto; }
.follower-item { display: flex; align-items: center; gap: .75rem; padding: .75rem; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); }
.follower-item:hover { background: var(--bg-card); }
.follower-item img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.follower-item strong { display: block; }
.follower-item span { font-size: .8rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   GARAGE
═══════════════════════════════════════════════════════════ */
.garage-page { padding-bottom: 5rem; }
.empty-garage { text-align: center; padding: 4rem 2rem; }
.empty-garage .empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-garage h2 { font-size: 1.5rem; margin-bottom: .5rem; }
.empty-garage p { color: var(--text-muted); margin-bottom: 1.5rem; }

.bikes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.bike-card { background: var(--surface); border-radius: 16px; overflow: hidden; border: 1px solid var(--border); position: relative; transition: transform .2s; }
.bike-card:hover { transform: translateY(-4px); }
.bike-card.primary { border-color: var(--orange); }
.bike-primary-ribbon { position: absolute; top: 12px; left: 12px; background: var(--orange); color: #000; font-size: .7rem; font-weight: 800; padding: .2rem .6rem; border-radius: 99px; z-index: 2; }
.bike-cover { height: 180px; background: var(--bg-card); position: relative; overflow: hidden; }
.bike-cover img { width: 100%; height: 100%; object-fit: cover; }
.bike-cover-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 4rem; }
.bike-type-chip { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,.7); padding: .2rem .5rem; border-radius: 99px; font-size: .7rem; }
.bike-body { padding: 1rem; }
.bike-body h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .2rem; }
.bike-year-color { font-size: .85rem; color: var(--text-muted); margin-bottom: 1rem; }
.bike-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: 1rem; }
.bstat { text-align: center; background: var(--bg-card); border-radius: 8px; padding: .5rem; }
.bstat-val { display: block; font-size: .9rem; font-weight: 700; color: var(--orange); }
.bstat-lbl { font-size: .65rem; color: var(--text-muted); text-transform: uppercase; }
.mileage-update { margin-bottom: .75rem; }
.mileage-update input { flex: 1; background: var(--bg-card); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: .35rem .6rem; font-size: .85rem; }
.bike-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-sm { font-size: .8rem; padding: .35rem .75rem; border-radius: 6px; cursor: pointer; border: none; font-weight: 600; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #e74c3c; }

.garage-stats-bar { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; }
.gstat { text-align: center; }
.gstat span { display: block; font-size: 1.5rem; font-weight: 800; color: var(--orange); }
.gstat label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════════
   NOTIFICATIONS
═══════════════════════════════════════════════════════════ */
.notifs-page { max-width: 700px; margin: 0 auto; padding-bottom: 5rem; }
.notifs-list { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.notif-item { display: flex; align-items: center; gap: .75rem; padding: .9rem 1rem; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); position: relative; transition: background .15s; }
.notif-item:hover { background: var(--bg-card); }
.notif-item.unread { background: rgba(255,107,0,.06); }
.notif-type-icon { font-size: 1.4rem; flex-shrink: 0; }
.notif-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.notif-body { flex: 1; font-size: .9rem; line-height: 1.4; }
.notif-time { display: block; font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }
.notif-dot { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   SETTINGS
═══════════════════════════════════════════════════════════ */
.settings-page { padding-bottom: 5rem; }
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .settings-grid { grid-template-columns: 1fr; } }

.settings-nav { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .5rem; height: fit-content; }
.snav-btn { display: block; width: 100%; text-align: left; background: none; border: none; color: var(--text); padding: .7rem 1rem; border-radius: 8px; cursor: pointer; font-size: .9rem; font-weight: 500; transition: background .15s; }
.snav-btn:hover { background: var(--bg-card); }
.snav-btn.active { background: rgba(255,107,0,.15); color: var(--orange); font-weight: 700; }

.settings-content { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; }
.settings-section { display: none; }
.settings-section.active { display: block; }
.settings-section h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.settings-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

.avatar-editor { display: flex; align-items: center; gap: 1.5rem; margin-bottom: 1.5rem; padding: 1rem; background: var(--bg-card); border-radius: 10px; }
.settings-avatar-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--orange); }

.form-check-group { display: flex; align-items: center; }
.form-check-group label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .9rem; }

.input-disabled { opacity: .5; cursor: not-allowed; }

.session-item { display: flex; justify-content: space-between; align-items: center; padding: .75rem; background: var(--bg-card); border-radius: 8px; }
.session-active { color: #2ecc71; font-size: .85rem; font-weight: 600; }

.danger-zone { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: rgba(192,57,43,.1); border: 1px solid rgba(192,57,43,.3); border-radius: 10px; flex-wrap: wrap; gap: 1rem; }
.danger-zone strong { display: block; margin-bottom: .25rem; }
.danger-zone p { font-size: .85rem; color: var(--text-muted); margin: 0; }

/* ═══════════════════════════════════════════════════════════
   ROUTES PAGE
═══════════════════════════════════════════════════════════ */
.routes-page { padding-bottom: 5rem; }
.my-route-stats { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1.5rem; }
.mrs-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1.5rem; text-align: center; }
.mrs-item span { display: block; font-size: 1.3rem; font-weight: 800; color: var(--orange); }
.mrs-item label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; }

.filters-bar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.filters-bar select { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: .45rem .75rem; border-radius: 8px; font-size: .85rem; }

.routes-grid-lg { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
@media (max-width: 480px) { .routes-grid-lg { grid-template-columns: 1fr; } }

.route-card-full { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: transform .2s; }
.route-card-full:hover { transform: translateY(-4px); }

.route-thumb-wrap { position: relative; height: 160px; overflow: hidden; }
.route-thumb { width: 100%; height: 100%; background-size: cover; background-position: center; }
.route-no-thumb { display: flex; align-items: center; justify-content: center; background: var(--bg-card); font-size: 3rem; height: 100%; }
.route-thumb-overlay { position: absolute; top: 8px; left: 8px; display: flex; gap: .4rem; }

.route-card-body { padding: 1rem; }
.route-user-row { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.route-user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.route-user-row a { text-decoration: none; }
.route-user-row strong { font-size: .85rem; color: var(--text); }
.route-user-row span { font-size: .75rem; color: var(--text-muted); }
.route-title { font-size: 1rem; font-weight: 700; margin: 0 0 .4rem; }
.route-desc { font-size: .82rem; color: var(--text-muted); margin: 0 0 .75rem; }
.route-stats-row { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .82rem; color: var(--text-secondary); margin-bottom: .5rem; }
.route-locations { display: flex; gap: .75rem; font-size: .8rem; color: var(--text-muted); margin-bottom: .5rem; flex-wrap: wrap; }
.route-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.route-saves { font-size: .8rem; color: var(--text-muted); }
.route-btns { display: flex; gap: .4rem; }
.save-btn.saved { border-color: var(--orange); color: var(--orange); }

.modal-xl .modal-box { max-width: 800px; width: 95vw; }

/* ═══════════════════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════════════════ */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert-error { background: rgba(192,57,43,.15); border: 1px solid rgba(192,57,43,.4); color: #e74c3c; }
.alert-success { background: rgba(46,204,113,.15); border: 1px solid rgba(46,204,113,.4); color: #2ecc71; }
