/* Schoonrit — premium / professioneel thema */
@font-face { font-family:'Inter'; font-style:normal; font-weight:400; font-display:swap; src:url('/vendor/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:500; font-display:swap; src:url('/vendor/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:600; font-display:swap; src:url('/vendor/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family:'Inter'; font-style:normal; font-weight:700; font-display:swap; src:url('/vendor/fonts/inter-700.woff2') format('woff2'); }

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --ink: #111419;
  --ink-2: #58606e;
  --ink-3: #9aa1ad;
  --border: #e6e8ec;
  --border-2: #eef0f3;
  --accent: #fc4c02;
  --accent-d: #df4200;
  --accent-soft: #fff2ec;
  --good: #0f9d58;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  /* Zachtere, meer gelaagde schaduwen (negatieve spread → 'zwevend', premium i.p.v. plat). */
  --shadow-sm: 0 1px 2px rgba(16,24,40,.04), 0 1px 3px rgba(16,24,40,.05);
  --shadow: 0 8px 24px -10px rgba(16,24,40,.14), 0 3px 8px -3px rgba(16,24,40,.06);
  --shadow-lg: 0 24px 56px -16px rgba(16,24,40,.22), 0 8px 20px -8px rgba(16,24,40,.10);
  --ease: cubic-bezier(.2,.7,.2,1);
  --ring: 0 0 0 3px rgba(252,76,2,.18);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overscroll-behavior-y: contain; } /* browser-eigen pull-to-refresh uit; we doen 't zelf */
/* pull-to-refresh-indicator (mobiel) */
.ptr { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); opacity: 0; z-index: 4000; pointer-events: none; will-change: transform, opacity; }
.ptr-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--surface, #fff); box-shadow: 0 3px 12px rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center; color: var(--ink-3, #999); }
.ptr-ready .ptr-circle, .ptr-loading .ptr-circle { color: var(--accent, #fc4c02); }
.ptr-loading .ptr-circle svg { animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

/* ---------- premium detail-polish ---------- */
html { scroll-behavior: smooth; }
::selection { background: rgba(252,76,2,.16); }
/* Nette focus-ring bij toetsenbordnavigatie (niet bij muisklik); inputs houden hun eigen ring. */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible, summary:focus-visible,
.btn:focus-visible, .btn-secondary:focus-visible, .btn-ghost:focus-visible, .nav > a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm);
}
/* Subtiele, dunne scrollbars i.p.v. de standaard-browserbalk (premium detail). */
* { scrollbar-width: thin; scrollbar-color: #cbd2db transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd2db; border-radius: 8px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #aeb6c2; border: 3px solid transparent; background-clip: padding-box; }

h1 { font-size: 1.55rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .15em; }
h2 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; margin: 0 0 .5em; }
h3 { font-size: .95rem; font-weight: 600; margin: 0 0 .4em; }

/* ---------- header ---------- */
/* Voorkom een flits van de inhoud vóór de auth-check: verberg tot requireAuth de class weghaalt. */
body.gated #site-header, body.gated main { visibility: hidden; }

#site-header {
  position: sticky; top: 0; z-index: 1100; /* boven Leaflet-kaartknoppen (z-index 1000) */
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(16,24,40,.02), 0 8px 20px -14px rgba(16,24,40,.16);
}
.header-inner {
  max-width: 1480px; margin: 0 auto; padding: 0 24px; height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.bike-logo { color: var(--accent); display: block; }
.brand-name { font-weight: 700; font-size: 1.18rem; letter-spacing: -.03em; }
.brand-slogan { font-size: .7rem; color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav > a {
  padding: 7px 11px; border-radius: var(--radius-sm); color: var(--ink-2);
  font-weight: 500; font-size: .9rem; transition: background .12s, color .12s;
}
.nav > a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav > a.active { color: var(--ink); font-weight: 600; }
.nav-profile { display: flex; align-items: center; gap: 8px; padding-left: 6px !important; }
.nav-name { font-size: .88rem; }

/* ---------- meldingen (inbox) ---------- */
.notif-wrap { position: relative; display: flex; }
.nav-bell { position: relative; background: none; border: 0; cursor: pointer; color: var(--ink-2); padding: 7px; border-radius: 8px; display: inline-flex; align-items: center; }
.nav-bell:hover { background: var(--surface-2); color: var(--ink); }
.notif-badge { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; box-sizing: border-box; border-radius: 8px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 700; display: flex; align-items: center; justify-content: center; line-height: 1; }
.notif-panel { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; max-width: 92vw; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 1200; overflow: hidden; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border-2); font-weight: 700; font-size: .9rem; }
.notif-readall { background: none; border: 0; color: var(--accent-d); font-size: .78rem; cursor: pointer; font-weight: 600; padding: 0; }
.notif-readall:hover { text-decoration: underline; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border-2); color: var(--ink); }
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item.unread { background: #fff6f1; }
.notif-item.unread:hover { background: #ffeee5; }
.notif-text { font-size: .84rem; line-height: 1.35; min-width: 0; }
.notif-snippet { color: var(--ink-2); font-size: .8rem; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-time { color: var(--ink-3); font-size: .72rem; margin-top: 2px; }
.notif-actions { display: flex; gap: 8px; margin-top: 8px; }
.notif-empty { padding: 22px 14px; text-align: center; color: var(--ink-3); font-size: .85rem; }

/* ---------- layout ---------- */
main { max-width: 1480px; margin: 0 auto; padding: 28px 24px 80px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); font-size: .9rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  padding: 8px 15px; font-size: .9rem; font-weight: 600; font-family: inherit;
  background: var(--accent); color: #fff; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease), transform .12s var(--ease);
}
.btn:hover { background: var(--accent-d); border-color: var(--accent-d); box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-ghost {
  background: transparent; color: var(--ink-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 12px; font-weight: 500; cursor: pointer;
  font-family: inherit; font-size: .88rem; transition: background .12s, color .12s;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--surface); color: #d92d20; border: 1px solid var(--border); }
.btn-danger:hover { background: #fef3f2; border-color: #fda29b; }
.btn-sm { padding: 5px 10px; font-size: .82rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- cards / panels ---------- */
.card, .panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel { padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow-sm); }

/* ---------- forms ---------- */
label { font-weight: 500; font-size: .85rem; color: var(--ink); display: block; margin-bottom: 6px; }
input:not([type]), input[type=text], input[type=password], input[type=url], input[type=search],
input[type=email], input[type=number], input[type=date], textarea, select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .92rem; color: var(--ink); background: var(--surface);
  transition: border-color .12s, box-shadow .12s; -webkit-appearance: none; appearance: none;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2358606e' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px;
}
select:disabled { background-color: var(--surface-2); color: var(--ink-3); cursor: not-allowed; }
textarea { resize: vertical; min-height: 84px; }
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.hint { font-size: .8rem; color: var(--ink-2); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 4px; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.form-row > .field { flex: 1; min-width: 150px; margin-bottom: 0; }
.preview-card { display: flex; gap: 14px; align-items: center; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 12px; margin-top: 10px; }
.preview-card .route-svg { width: 130px; height: 78px; flex: 0 0 auto; background: #fff; border: 1px solid var(--border-2); border-radius: 6px; }
.preview-stats { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; color: var(--ink-2); }
.preview-stats .name { font-weight: 600; font-size: 1rem; color: var(--ink); margin-bottom: 3px; }
.preview-stats .nums b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* chips-invoerveld (steden) */
.chips-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); min-height: 42px; cursor: text; }
.chips-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chips-input .chips { display: contents; }
.chip-item { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--ink); border-radius: 6px; padding: 3px 4px 3px 9px; font-size: .85rem; white-space: nowrap; }
.chip-x { border: none; background: none; cursor: pointer; color: var(--ink-3); font-size: 1.05rem; line-height: 1; padding: 0 3px; border-radius: 4px; }
.chip-x:hover { color: #d92d20; background: #fef3f2; }
.chips-entry { flex: 1 1 120px; width: auto; min-width: 120px; border: none; outline: none; padding: 4px 2px; background: transparent; font-size: .92rem; box-shadow: none !important; }
.chips-entry:focus { box-shadow: none; border: none; }

/* ---------- avatars ---------- */
.avatar { border-radius: 50%; object-fit: cover; vertical-align: middle; background: var(--surface-2); display: inline-block; }
.avatar-fallback { display: inline-grid; place-items: center; background: var(--ink); color: #fff; font-weight: 600; }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 600;
  padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--border-2); white-space: nowrap;
}
.badge.badge-warn { background: #fffaeb; color: #b54708; border-color: #fedf89; }
.badge.badge-sq { background: #f3e8ff; color: #7c3aed; border-color: #d8b4fe; }
/* Ontdekken: zoeken + tijdlijn-feed + vrienden + profiel */
.disc-searchwrap { position: relative; margin-bottom: 22px; }
.disc-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface, #fff); border: 1px solid var(--border-2, #e5e7eb); border-radius: 12px; box-shadow: var(--shadow, 0 10px 30px rgba(0,0,0,.12)); z-index: 30; max-height: 62vh; overflow-y: auto; }
.disc-group { padding: 7px 14px; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); background: var(--surface-2, #f2f4f6); }
.disc-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; text-decoration: none; color: var(--ink); }
.disc-item:hover { background: var(--surface-2, #f2f4f6); }
.disc-name { flex: 1; }
.disc-ride { flex: 1; }
/* ---------- homepagina (hero + feed + connect-kolom) ---------- */
.home { max-width: 1040px; }
.hero { margin-bottom: 20px; }
.hero-inner { padding: 22px 20px 4px; max-width: 620px; margin: 0 auto; text-align: center; }
.hero-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: 0 0 16px; }
.hero-searchwrap { position: relative; }
.hero-search { display: flex; align-items: center; gap: 11px; background: var(--surface, #fff); border: 1px solid var(--border, #e5e7eb); border-radius: 40px; padding: 12px 20px; box-shadow: 0 2px 10px rgba(0,0,0,.06); color: var(--ink-3); }
.hero-search:focus-within { border-color: var(--accent, #fc4c02); box-shadow: 0 0 0 3px rgba(252,76,2,.12); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: 1rem; background: none; color: var(--ink); }
.hero-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface, #fff); border: 1px solid var(--border-2, #e5e7eb); border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.18); z-index: 40; max-height: 60vh; overflow-y: auto; text-align: left; color: var(--ink); }
.disc-loc { color: var(--accent-d); }
.hero-actions { display: flex; gap: 20px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.hero-link { color: var(--accent-d, #b93815); font-weight: 600; text-decoration: none; font-size: .95rem; }
.hero-link:hover { text-decoration: underline; text-underline-offset: 3px; }
/* kop staat boven het grid en lijnt met de linkerrand ervan; zo lijnt de Ontdek-kaart met het eerste feed-kaartje */
.home-body { max-width: 984px; margin: 0 auto; }
.home-heading { font-size: 1.35rem; font-weight: 800; margin: 0 0 18px; color: var(--ink); }
.home-grid { display: grid; grid-template-columns: minmax(0, 640px) 320px; gap: 24px; align-items: start; }
.home-main { min-width: 0; }
.home-connect { position: sticky; top: 74px; }
.connect-card { background: var(--surface, #fff); border: 1px solid var(--border-2, #e5e7eb); border-radius: 16px; padding: 18px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.08)); }
.connect-title { margin: 0 0 12px; font-size: 1.3rem; }
.connect-searchwrap { position: relative; margin-bottom: 16px; }
.connect-search { display: flex; align-items: center; gap: 8px; background: var(--surface-2, #f2f4f6); border-radius: 10px; padding: 9px 12px; color: var(--ink-3); }
.connect-search input { flex: 1; min-width: 0; border: 0; outline: none; font: inherit; font-size: .9rem; background: none; color: var(--ink); }
.connect-results { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface, #fff); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; max-height: 50vh; overflow-y: auto; }
.connect-sub { font-size: .78rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }
.connect-list { display: flex; flex-direction: column; }
.sug-row, .mem-row { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-top: 1px solid var(--border-2, #eee); }
.connect-list .sug-row:first-child { border-top: none; }
.mem-row { padding: 9px 12px; }
.sug-user { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.sug-txt { display: flex; flex-direction: column; min-width: 0; }
.sug-txt b { font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-txt small { font-size: .76rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-add, .sug-sent { flex: 0 0 auto; }
.sug-sent { font-size: .82rem; color: var(--ink-3); }
.sug-x { flex: 0 0 auto; background: none; border: 0; color: var(--ink-3); font-size: 1rem; cursor: pointer; padding: 2px 6px; border-radius: 6px; line-height: 1; }
.sug-x:hover { background: var(--surface-2); color: var(--ink); }
.mem-empty { padding: 10px 12px; }
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-connect { position: static; }
}
.disc-empty { padding: 14px; color: var(--ink-3); }
.feed-title { font-size: 1.2rem; margin: 4px 0 16px; }
.feed-card { background: var(--surface, #fff); border: 1px solid var(--border-2, #e5e7eb); border-radius: 16px; overflow: hidden; margin-bottom: 18px; box-shadow: var(--shadow-sm); transition: box-shadow .25s var(--ease); }
.feed-card:hover { box-shadow: var(--shadow); }
/* Strava-stijl kop: avatar + naam met het uur eronder */
.feed-head { display: flex; align-items: center; padding: 12px 14px 4px; }
.feed-head-solo { padding-bottom: 2px; }
.feed-user { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.feed-user-txt { display: flex; flex-direction: column; line-height: 1.25; }
.feed-user-txt b { font-weight: 600; }
.feed-date { color: var(--ink-3); font-size: .78rem; white-space: nowrap; }
/* type-icoon + titel, daaronder de statistieken in kolommen (afstand/hoogte/tijd) */
.feed-titlewrap { display: block; padding: 4px 14px 10px; text-decoration: none; color: inherit; }
.feed-title { font-size: 1.12rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.feed-type-ico { font-size: 1.05rem; margin-right: 3px; }
.feed-titlewrap:hover .feed-title { color: var(--accent, #fc4c02); }
/* geen lelijke onderstreping bij hover op de titel of de naam (overschrijft de globale a:hover) */
.feed-titlewrap:hover, .feed-user:hover { text-decoration: none; }
.feed-statrow { display: flex; gap: 26px; margin-top: 8px; }
.feed-stat { display: flex; flex-direction: column; }
.feed-stat-l { font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .02em; }
.feed-stat-v { font-size: 1.02rem; font-weight: 700; color: var(--ink); }
.feed-body { display: block; text-decoration: none; color: inherit; }
.vis-ico { font-size: .82em; margin-left: 5px; cursor: help; opacity: .8; vertical-align: baseline; }
.feed-map { height: 230px; background: var(--surface-2, #eef0f2); pointer-events: none; }
.feed-map.feed-map-empty::after { content: 'geen kaartdata'; display: flex; align-items: center; justify-content: center; height: 100%; color: var(--ink-3); font-size: .85rem; }
/* like + reactie-knoppen onder een feed-kaartje */
.feed-actions { display: flex; gap: 6px; padding: 4px 8px 8px; border-top: 1px solid var(--border, #eee); }
.feed-act { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; background: none; border: 0; border-radius: 8px; color: var(--ink-2, #555); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.feed-act:hover { background: var(--surface-2, #f2f4f6); }
.feed-act.liked { color: #e0245e; }
.feed-act.liked svg { fill: #e0245e; stroke: #e0245e; }
.feed-act-n { min-width: 8px; }
.feed-comments { padding: 4px 14px 14px; border-top: 1px solid var(--border, #eee); }
.feed-cmt-load { margin: 8px 0; }
.feed-cmt-list { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 12px; }
.feed-cmt { display: flex; gap: 9px; }
.feed-cmt-body { font-size: .9rem; line-height: 1.35; }
.feed-cmt-del { display: inline-block; margin-left: 8px; padding: 0; background: none; border: 0; color: var(--ink-3, #999); font-size: .78rem; cursor: pointer; text-decoration: underline; }
.feed-cmt-form { display: flex; gap: 8px; }
.feed-cmt-form input { flex: 1; padding: 8px 12px; border: 1px solid var(--border, #ddd); border-radius: 8px; font: inherit; }
/* profiel-tabs + doorzoekbare ritten-lijst */
/* profielpagina: hero + tijdlijn leesbaar-smal, de Ritten-tab op volle breedte (zoals je eigen overzicht) */
/* de leeskolom (kop + tabs + tijdlijn) gecentreerd op de pagina; de Ritten-tab blijft op volle breedte */
.user-profile > .muted, .user-profile #user-head, .user-profile .prof-tabs, .user-profile #tab-feed, .user-profile .friends-panel { max-width: 700px; margin-left: auto; margin-right: auto; }
.prof-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border, #e5e7eb); margin-bottom: 16px; }
.prof-tab { padding: 10px 16px; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; font: inherit; font-size: .95rem; font-weight: 600; color: var(--ink-3, #888); cursor: pointer; }
.prof-tab.active { color: var(--accent, #fc4c02); border-bottom-color: var(--accent, #fc4c02); }
.prof-search { max-width: none; margin-bottom: 12px; }
.prof-ride-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-2, #e5e7eb); border-radius: 10px; margin-bottom: 8px; text-decoration: none; color: var(--ink); }
.prof-ride-row:hover { border-color: var(--accent, #fc4c02); }
.prof-ride-title { font-weight: 600; }
.fr-reqs { margin-bottom: 14px; }
.fr-h { font-size: .76rem; color: var(--ink-3); margin-bottom: 4px; }
.fr-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.fr-row .grow { flex: 1; text-decoration: none; color: var(--ink); }
.fr-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.fr-card { position: relative; display: flex; flex-direction: column; align-items: center; width: 100px; padding: 12px 8px; border: 1px solid var(--border-2, #e5e7eb); border-radius: 12px; }
.fr-card a { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); font-size: .82rem; text-align: center; }
.fr-x { position: absolute; top: 3px; right: 3px; padding: 1px 6px; line-height: 1.2; }
.user-hero { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.user-stats { color: var(--ink-3, #888); line-height: 1.5; }
/* klikbaar aantal vrienden op het profiel → opent de vrienden-pop-up */
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2, #555); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--accent, #fc4c02); }
.fc-badge { display: inline-block; min-width: 17px; padding: 1px 5px; border-radius: 9px; background: var(--accent, #fc4c02); color: #fff; font-size: .7rem; font-weight: 700; text-align: center; text-decoration: none; vertical-align: 1px; }
/* vrienden-pop-up */
.fr-modal { max-width: 460px; width: 92vw; }
.fr-modal-h { margin: 0 0 12px; font-size: 1.15rem; }
.fr-modal-body { max-height: 60vh; overflow-y: auto; }
.fr-modal-body .fr-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border-2, #eee); }
.fr-modal-body .fr-row:first-child { border-top: none; }
.fr-modal-body .fr-row .grow { flex: 1; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
/* "Mijn vrienden" = scrollbare lijst (zoekbalk + verzoeken blijven staan, de lijst scrolt) */
.fr-count { font-size: .82rem; margin: 6px 0 2px; }
.fr-scroll { max-height: 42vh; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.fr-lrow { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid var(--border-2, #eee); }
.fr-lrow:first-child { border-top: none; }
.fr-lrow .grow { flex: 1; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.fr-act { flex: 0 0 auto; }
.badge.mtb { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.badge.gravel { background: #fef6ee; color: #b93815; border-color: #f9dbaf; }
.badge.race { background: #eff4ff; color: #2d4fb3; border-color: #c7d7fe; }
.tag-chip { display: inline-flex; align-items: center; font-size: .8rem; color: var(--ink-2); }
.tag-chip b { color: var(--ink); font-weight: 600; }

/* ---------- toolbar ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 380px; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-box input { padding-left: 34px; }
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.segmented button {
  padding: 8px 13px; border: none; border-left: 1px solid var(--border); background: transparent;
  font: inherit; font-size: .86rem; font-weight: 500; cursor: pointer; color: var(--ink-2);
}
.segmented button:first-child { border-left: none; }
.segmented button:hover { background: var(--surface-2); color: var(--ink); }
.segmented button.active { background: var(--accent); color: #fff; }
.toolbar select { width: auto; min-width: 150px; }

/* weergave-schakelaar (lijst ↔ tegels) */
.view-bar { margin: 4px 0 14px; }
.view-toggle.segmented { width: auto; display: inline-flex; }
.view-toggle.segmented button { flex: 0 0 auto; padding: 8px 15px; font-weight: 600; }

/* tegel-weergave van de ritten */
.rides-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 16px; }
.ride-tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.ride-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.rt-map { position: relative; overflow: hidden; height: 168px; background: var(--surface-2); border-bottom: 1px solid var(--border-2); }
.rt-mapcanvas { position: absolute; inset: 0; z-index: 0; }
.rt-map .leaflet-container { width: 100%; height: 100%; background: var(--surface-2); pointer-events: none; font: inherit; }
.rt-nomap { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--ink-3); font-size: .85rem; }
.rt-owner { position: absolute; top: 8px; right: 8px; z-index: 2; border-radius: 50%; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.rt-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.rt-title { font-weight: 700; font-size: 1rem; line-height: 1.3; color: var(--ink); }
.rt-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rt-stats { display: flex; gap: 24px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border-2); }
.rt-stats span { display: flex; flex-direction: column; }
.rt-stats b { font-size: 1.02rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.rt-stats i { font-size: .68rem; font-style: normal; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-top: 1px; }

/* Squadrats-profielkoppeling (profielpagina) */
.sq-results { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow-y: auto; }
.sq-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); cursor: pointer; font: inherit; color: var(--ink); }
.sq-item:hover { border-color: #7b2d8e; background: var(--surface-2); }
.sq-photo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #e8dff0; border: 2px solid #7b2d8e; }
.sq-iname { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq-count { flex: 0 0 auto; font-size: .8rem; font-weight: 700; color: #7b2d8e; background: #f0e6f6; padding: 2px 9px; border-radius: 20px; font-variant-numeric: tabular-nums; }
.sq-empty { padding: 12px; color: var(--ink-3); font-size: .88rem; }
.sq-connected { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sq-badge { font-weight: 700; color: #16a34a; }
.sq-cname { font-weight: 700; }
/* Squadrats-knop op de kaarten */
.sq-map-toggle { background: #fff; border: 2px solid rgba(0,0,0,.2); border-radius: 6px; padding: 5px 10px; font: inherit; font-size: .8rem; font-weight: 700; color: #7b2d8e; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.2); display: inline-flex; align-items: center; gap: 6px; }
.sq-map-toggle::before { content: ''; width: 12px; height: 12px; border-radius: 2px; background: #7b2d8e; opacity: .35; }
.sq-map-toggle.on { background: #7b2d8e; color: #fff; border-color: #7b2d8e; }
.sq-map-toggle.on::before { background: #fff; opacity: 1; }
.sq-map-toggle::before { background: #7b2d8e; }
/* Schuifknop "Toon squadrats" op de rit-detail (rechterkolom) */
.sq-switch { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 12px 14px; margin-bottom: 14px; user-select: none; }
.sq-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.sq-switch-msg { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--border-2); font-size: .9rem; color: var(--ink-2); line-height: 1.4; }
.sq-switch-msg[hidden] { display: none; }
.sq-switch-msg b { color: #9a52c2; font-weight: 800; font-size: 1.05rem; }
.sq-switch-label { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--ink); }
.sq-switch .sq-dot { width: 14px; height: 14px; border-radius: 3px; background: #7b2d8e; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.sq-switch-track { position: relative; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px; background: var(--border); transition: background .15s; }
.sq-switch-track input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sq-switch-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; pointer-events: none; }
.sq-switch.on .sq-switch-track { background: #7b2d8e; }
.sq-switch.on .sq-switch-thumb { transform: translateX(18px); }
/* "Nieuw"-kolom in de lijst: aantal squadrats dat een rit zou opleveren */
.sq-col { text-align: right; white-space: nowrap; }
.sq-new { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .88rem; color: var(--ink-3); }
.sq-new.sq-pos { color: #9a52c2; background: #f4ebfb; padding: 2px 9px; border-radius: 20px; }
.sq-new.sq-zero { color: var(--ink-3); }
.owner-filter { max-width: 220px; }
/* eigenaar-filter (Fase 6): dropdown met 'Mij' + vrienden */
.owner-multi { position: relative; }
.owner-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; }
.owner-btn:hover { border-color: var(--accent); }
.owner-btn svg:first-child { color: var(--ink-3); }
.owner-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.14); padding: 8px; }
.owner-quick { display: block; width: 100%; text-align: left; padding: 7px 10px; background: none; border: 0; border-radius: 8px; font: inherit; font-size: .85rem; font-weight: 600; color: var(--accent); cursor: pointer; }
.owner-quick:hover { background: var(--surface-2); }
.owner-list { max-height: 260px; overflow-y: auto; margin-top: 4px; border-top: 1px solid var(--border); padding-top: 6px; }
.owner-opt { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: .9rem; }
.owner-opt:hover { background: var(--surface-2); }
.owner-opt input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.owner-opt .owner-me { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border-radius: 50%; font-size: .8rem; }
.toolbar .spacer { flex: 1; }
/* geavanceerde filters (tweede rij) + "toon concepten" */
.toolbar-2 { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; align-items: flex-end; }

/* ---------- weersvoorspelling (compact, in de paginakop) ---------- */
.weather-strip:not([hidden]) { display: flex; align-items: center; gap: 10px; min-width: 0; }
.weather-strip .w-loc { display: inline-flex; align-items: center; gap: 3px; font-weight: 600; font-size: .78rem; color: var(--ink-2); white-space: nowrap; background: none; border: none; cursor: pointer; font-family: inherit; padding: 3px 5px; border-radius: var(--radius-sm); }
.weather-strip .w-loc:hover { background: var(--surface-2); color: var(--ink); }
.w-locchev { opacity: .5; flex: 0 0 auto; }
.weather-strip .w-days { display: flex; gap: 30px; min-width: 0; }
.w-day { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 3px 8px; line-height: 1.24; border-radius: var(--radius-sm); background: none; border: none; font: inherit; color: inherit; cursor: pointer; }
.w-day:hover { background: var(--surface-2); }
.w-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.w-name { font-size: .66rem; font-weight: 600; color: var(--ink-3); text-transform: capitalize; }
.w-tl { display: inline-flex; align-items: baseline; gap: 3px; }
.w-icon { font-size: .9rem; }
.w-temp { font-size: .76rem; white-space: nowrap; }
.w-temp b { font-weight: 700; }
.w-temp span { color: var(--ink-3); margin-left: 2px; font-size: .9em; }
.w-wind { display: inline-flex; align-items: center; gap: 2px; font-size: .68rem; font-weight: 700; color: var(--accent-d); white-space: nowrap; }
.w-wind svg { color: var(--accent); flex: 0 0 auto; }
.w-wind .w-spd { font-weight: 600; margin-left: 4px; }
.w-wind .w-spd i { font-style: normal; font-weight: 500; opacity: .65; font-size: .85em; margin-left: 1px; }
@media (max-width: 820px) {
  #weather-strip { order: 3; flex-basis: 100%; margin-top: 2px; }
  .weather-strip .w-days { gap: 20px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* deel-statistieken: detail-tijdlijn */
.ev-list { max-height: 264px; overflow-y: auto; border-top: 1px solid var(--border); }
.ev-row { display: flex; align-items: center; gap: 9px; padding: 7px 2px; border-bottom: 1px solid var(--border-2); font-size: .85rem; }
.ev-row:last-child { border-bottom: none; }
.ev-ic { flex: 0 0 auto; }
.ev-lbl { flex: 1; color: var(--ink); }
.ev-time { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* uur-popup */
.wx-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(16,24,40,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.wx-dialog { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); width: 90vw; max-width: 96vw; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.wx-close { position: absolute; top: 6px; right: 10px; background: none; border: none; font-size: 1.5rem; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 4px; }
.wx-close:hover { color: var(--ink); }
.wx-head { padding: 14px 18px 11px; border-bottom: 1px solid var(--border); }
.wx-title { font-size: 1.05rem; font-weight: 700; text-transform: capitalize; }
.wx-title .wx-date { font-weight: 500; color: var(--ink-2); text-transform: none; font-size: .9em; margin-left: 5px; }
.wx-sum { margin-top: 3px; font-size: .85rem; color: var(--ink-2); }
.wx-sum b { color: var(--ink); }
.wx-sum span { color: var(--ink-3); margin-left: 3px; }
.wx-chart-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 10px 12px 18px; scrollbar-width: none; -ms-overflow-style: none; }
.wx-chart-scroll::-webkit-scrollbar { display: none; }
.wx-chart-wrap { position: relative; }
.wx-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,.92); color: var(--ink-2); font-size: 1.2rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; transition: opacity .15s; }
.wx-nav:hover { background: #fff; color: var(--ink); }
.wx-nav-l { left: 6px; }
.wx-nav-r { right: 6px; }
.wx-chart-inner { position: relative; margin: 0 auto; }
.wx-hover { position: absolute; inset: 0; }
.wx-hb { position: absolute; top: 0; bottom: 0; border-radius: 8px; transition: background .1s; }
.wx-hb:hover { background: rgba(16,24,40,.06); }
.wx-chart { display: block; }
.wx-chart .tc-line { stroke: #3b9ae0; stroke-width: 2; fill: none; }
.wx-chart .tc-grid { stroke: #cdd1d6; stroke-width: 1; stroke-dasharray: 2 4; }
.wx-chart .tc-dot { fill: #3b9ae0; }
.wx-chart .tc-now { fill: #fff; stroke: #3b9ae0; stroke-width: 2; }
.wx-chart .tc-lbl { fill: var(--ink-2); font-size: 12px; font-weight: 600; text-anchor: middle; }
.wx-hrow { display: flex; }
.wx-hc { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; padding-top: 4px; }
.wx-hc + .wx-hc { border-left: 1px solid var(--border-2); }
.hc-dir { font-size: .66rem; font-weight: 700; color: var(--ink-2); }
.hc-arr { line-height: 0; color: var(--ink-2); }
.hc-spd { font-size: .66rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.hc-spd i { font-style: normal; font-weight: 500; color: var(--ink-3); font-size: .9em; margin-left: 1px; }
.hc-ic { font-size: 1.3rem; line-height: 1; }
.hc-pr { font-size: .62rem; font-weight: 600; color: #2c83c7; min-height: 10px; line-height: 1; white-space: nowrap; }
.hc-pr i { font-style: normal; font-weight: 500; opacity: .7; margin-left: 1px; }
.hc-pr:empty::after { content: '·'; color: var(--ink-3); opacity: .4; font-weight: 400; }
.hc-hr { font-size: .72rem; font-weight: 600; color: var(--ink-3); margin-top: 1px; }

/* locatie-kiezer popover */
.w-locpop { position: fixed; z-index: 2100; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; width: 246px; }
.w-locpop .wlp-form { display: flex; gap: 6px; }
.w-locpop .wlp-input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .85rem; font-family: inherit; color: var(--ink); }
.w-locpop .wlp-input:focus { outline: none; border-color: var(--accent); }
.w-locpop .wlp-msg { font-size: .76rem; color: var(--ink-2); margin-top: 6px; }
.w-locpop .wlp-msg:empty { display: none; }
.w-locpop .wlp-msg.err { color: var(--accent-d); }
.w-locpop .wlp-reset { margin-top: 8px; background: none; border: none; color: var(--ink-2); font-size: .76rem; cursor: pointer; padding: 2px 0; font-family: inherit; }
.w-locpop .wlp-reset:hover { color: var(--accent-d); text-decoration: underline; }
.adv-field { display: flex; flex-direction: column; gap: 4px; font-size: .68rem; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.adv-field .range { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); }
.adv-field input { width: 86px; font-weight: 500; text-transform: none; padding: 7px 9px; }
.adv-field input[type=date] { width: 138px; }
.concept-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.concept-toggle input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* waarschuwingsvak (bv. dubbele rit) */
.warn-box { background: #fff8eb; border: 1px solid #fde68a; color: #92400e; border-radius: var(--radius-sm); padding: 12px 14px; font-size: .88rem; margin-bottom: 12px; }
.warn-box ul { margin: 6px 0 10px 18px; }
.warn-box a { color: #92400e; font-weight: 600; }
/* concept-badge (nog niet gepubliceerd) */
.concept-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 700; color: #92400e; background: #fff8eb; border: 1px solid #fde68a; border-radius: 999px; padding: 1px 9px; text-transform: uppercase; letter-spacing: .02em; }
/* lader/spinner (bv. GPX inlezen) */
.loading-row { display: flex; align-items: center; gap: 8px; color: var(--ink-2); margin-top: 12px; font-weight: 500; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* versie-vergelijking (geschiedenis) */
.ver-pick { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.ver-pick input { cursor: pointer; }
.ver-dot { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.hist-compare-map { height: 760px; margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.hist-compare-map:fullscreen { height: 100% !important; border: 0; border-radius: 0; }
.hist-compare-map:-webkit-full-screen { height: 100% !important; }
.map-fs-btn { width: 32px; height: 32px; background: #fff; border: 0; border-radius: 4px; box-shadow: 0 1px 5px rgba(0, 0, 0, .3); cursor: pointer; font-size: 17px; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.map-fs-btn:hover { background: var(--surface-2); }
.cmp-legend { background: rgba(255, 255, 255, .93); padding: 7px 10px; border-radius: 7px; box-shadow: 0 1px 5px rgba(0, 0, 0, .2); display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--ink); }
.cmp-leg-item { display: inline-flex; align-items: center; gap: 7px; }

/* ---------- print: nette rit-fiche ---------- */
@media print {
  #site-header, main > a.muted, #ride-head .btn, #comments-panel, #admin-panel,
  #history-panel, #meta-panel, #desc-panel:empty, .leaflet-control-container { display: none !important; }
  body { background: #fff !important; }
  main { max-width: 100% !important; margin: 0 !important; padding: 0 !important; }
  /* volgorde voor print: stats (afstand+HM) → kaart → hoogteprofiel → beschrijving */
  .detail-grid { display: flex !important; flex-direction: column !important; gap: 14px !important; }
  .detail-grid > div { display: contents !important; } /* kolom-wrappers opheffen */
  #stat-panel { order: 1 !important; }
  #map { order: 2 !important; height: 300px !important; }
  #elev-panel { order: 3 !important; margin: 0 !important; }
  #desc-panel { order: 4 !important; margin: 0 !important; }
  .stat-tiles { margin-bottom: 0 !important; }
  .panel, .card, #map, .elev-wrap, #stat-panel { box-shadow: none !important; break-inside: avoid; }
}
/* op het scherm tijdens het printen → kaart krijgt de print-grootte (juiste tegels) */
body.printing main { max-width: 800px !important; }
body.printing .detail-grid { display: block !important; }
body.printing .detail-grid > div { width: 100% !important; }
body.printing #meta-panel { display: none !important; }
body.printing #map { height: 300px !important; }

/* privé-rit: checkbox-rij + badges */
.check-row { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-weight: 500; }
.check-row input[type=checkbox] { width: 17px; height: 17px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--accent); cursor: pointer; }
.check-row span { line-height: 1.4; }
.priv-eye { vertical-align: -0.15em; color: var(--ink-2); }
/* dubbele "Vertrek"-label in formulieren verbergen (de cascade toont al een eigen label) */
.tag-selectors .cat-label { display: none; }
/* eigenaar-avatar achteraan elke rij in het overzicht */
.col-owner { width: 44px; text-align: center; }
.col-owner .avatar { vertical-align: middle; }
#tag-filter .tag-cascade { display: flex; gap: 8px; align-items: center; margin: 0; }
#tag-filter .tag-cascade .cat-label { display: none; }
#tag-filter .tag-cascade select { width: auto; min-width: 140px; }
.result-count { color: var(--ink-3); font-size: .82rem; white-space: nowrap; }

/* ---------- rides table ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; overflow-y: hidden; box-shadow: var(--shadow-sm); }
.rides-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.rides-table th {
  text-align: left; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .045em;
  color: var(--ink-3); padding: 11px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; white-space: nowrap;
}
.rides-table th:hover { color: var(--ink-2); }
.rides-table th.active { color: var(--accent); }
.rides-table th.num { text-align: right; }
.rides-table th .arr { margin-left: 4px; opacity: 0; font-size: .7rem; }
.rides-table th.active .arr { opacity: 1; }
.rides-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-2); font-size: .9rem; vertical-align: middle; }
.rides-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.rides-table tbody tr { cursor: pointer; transition: background .1s; }
.rides-table tbody tr:hover { background: var(--surface-2); }
.rides-table tbody tr:last-child td { border-bottom: none; }
.rt-title { font-weight: 600; color: var(--ink); }
.rides-table td.col-name { white-space: nowrap; }
.rt-sub { color: var(--ink-3); font-size: .8rem; margin-top: 1px; }
.rt-strong { font-weight: 600; }
.surface-pct { font-size: .68rem; color: var(--ink-3); margin-top: 3px; white-space: nowrap; }
.cities-cell { color: var(--ink-2); font-size: .85rem; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rides-table th.col-x, .rides-table td.col-x { width: 36px; padding-left: 14px; padding-right: 0; text-align: center; }
.row-chevron { display: inline-flex; color: var(--ink-2); transform: rotate(0deg); transition: transform .15s, color .15s; }
.rides-table tr.expanded td { background: var(--surface-2); }
.rides-table tr.expanded .row-chevron { transform: rotate(180deg); color: var(--accent); }
.rt-title-link { color: var(--ink); font-weight: 600; }
.rt-title-link:hover { color: var(--accent-d); text-decoration: underline; }
.ride-expand td { padding: 0 !important; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.expand-map { height: 300px; width: 100%; }

/* ---------- detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
#map { height: clamp(480px, 66vh, 760px); border-radius: var(--radius); border: 1px solid var(--border); }
#map:fullscreen, #map:-webkit-full-screen { width: 100%; height: 100%; border-radius: 0; }
#map.map-maximized { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 4000; border-radius: 0; }
.map-fs-btn a { display: grid; place-items: center; color: var(--ink-2); }
.map-fs-btn a:hover { color: var(--ink); }
.preview-map { height: 260px; border-radius: var(--radius-sm); border: 1px solid var(--border); margin-top: 10px; }
.stat-tiles { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.stat-tile { background: var(--surface); padding: 14px 6px; text-align: center; }
.stat-tile .v { font-size: 1.1rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-tile .l { font-size: .64rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; margin-top: 3px; white-space: nowrap; }
.meta-list { display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.meta-list a { color: var(--accent-d); }
.elev-svg { width: 100%; height: 150px; display: block; cursor: crosshair; }
.elev-chart { position: relative; margin-top: 10px; }
.elev-yaxis span { position: absolute; left: 4px; transform: translateY(-50%); font-size: .68rem; color: var(--ink-2); background: rgba(255, 255, 255, .72); padding: 0 3px; border-radius: 3px; pointer-events: none; font-variant-numeric: tabular-nums; }
.elev-xaxis { display: flex; justify-content: space-between; font-size: .7rem; color: var(--ink-3); margin-top: 4px; font-variant-numeric: tabular-nums; }
.elev-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transform: translate(-50%, -50%); pointer-events: none; z-index: 4; }
.elev-tip { position: absolute; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 4px 9px; border-radius: 7px; font-size: .72rem; pointer-events: none; white-space: nowrap; z-index: 5; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.elev-tip b { font-size: .82rem; font-variant-numeric: tabular-nums; }
.elev-tip span { opacity: .82; font-size: .68rem; font-variant-numeric: tabular-nums; }
.elev-surface { display: flex; height: 7px; border-radius: 4px; overflow: hidden; margin-top: 10px; }
.elev-surface .seg { display: block; min-width: 0; }
.elev-surface .seg.paved { background: var(--accent); }
.elev-surface .seg.unpaved { background: repeating-linear-gradient(90deg, var(--accent) 0 5px, #fff 5px 10px); }
.elev-surface-legend { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: var(--ink-3); margin-top: 6px; }
.elev-surface-legend .dot { width: 12px; height: 8px; border-radius: 2px; display: inline-block; }
.elev-surface-legend .dot.paved { background: var(--accent); }
.elev-surface-legend .dot.unpaved { background: repeating-linear-gradient(90deg, var(--accent) 0 3px, #fff 3px 6px); border: 1px solid var(--border-2); }
/* Genummerde klim-markers op het hoogteprofiel + klim-detail-pop-up */
.climb-badge { position: absolute; transform: translate(-50%, -50%); width: 23px; height: 23px; border-radius: 50%; border: 2px solid #fff; background: var(--accent); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1; cursor: pointer; padding: 0; z-index: 3; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.climb-badge:hover { transform: translate(-50%, -50%) scale(1.18); }
.climb-modal { position: fixed; inset: 0; z-index: 5000; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cm-card { position: relative; background: var(--surface, #fff); border-radius: 16px; box-shadow: 0 16px 50px rgba(0, 0, 0, .35); width: min(960px, 94vw); max-height: 92vh; overflow-y: auto; padding: 20px 22px; }
.cm-close { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--ink-3); }
.cm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.cm-num { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.cm-title { margin: 0; font-size: 1.05rem; }
.cm-sub { margin: 2px 0 0; font-size: .78rem; color: var(--ink-3); }
.cm-profile { position: relative; border-radius: 10px; overflow: hidden; background: var(--surface-2, #f2f4f6); margin-bottom: 12px; }
.cm-svg { width: 100%; height: auto; display: block; cursor: crosshair; }
.cm-cursor { position: absolute; top: 0; height: 100%; width: 1px; background: rgba(0, 0, 0, .5); pointer-events: none; display: none; }
.cm-tip { position: absolute; top: 6px; transform: translateX(-50%); background: var(--ink, #1a1a1a); color: #fff; padding: 3px 9px; border-radius: 7px; font-size: .74rem; white-space: nowrap; pointer-events: none; display: none; z-index: 3; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.cm-tip b { font-variant-numeric: tabular-nums; }
.cm-stats { display: grid; grid-template-columns: 1fr; max-width: 680px; margin: 6px auto 0; }
.cm-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 10px 0 2px; font-size: .74rem; color: var(--ink-3); }
.cm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cm-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.cm-stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 2px; border-top: 1px solid var(--border-2, #e5e7eb); font-size: .9rem; }
.cm-stat:first-child { border-top: none; }
.cm-lbl { color: var(--ink-2); display: inline-flex; align-items: center; min-width: 0; }
.cm-ico { width: 15px; height: 15px; color: var(--ink-3); margin-right: 9px; flex: 0 0 auto; }
.cm-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
/* laptop: 3 links + 3 rechts (2 kolommen), pop-up wordt korter → meer kaart; mobiel blijft 1 kolom */
@media (min-width: 641px) {
  .cm-stats { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; column-gap: 40px; max-width: 800px; }
  .cm-stat:nth-child(4) { border-top: none; }
}
.cm-nav { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.dir-arrow { background: transparent; border: 0; }
.cities-list { display: flex; flex-wrap: wrap; gap: 6px; }
.city-tag { font-size: .8rem; background: var(--surface-2); border: 1px solid var(--border-2); color: var(--ink-2); padding: 2px 9px; border-radius: 6px; }

.comment { display: flex; gap: 11px; padding: 14px 0; border-top: 1px solid var(--border-2); }
.comment:first-of-type { border-top: none; }
.comment-body { flex: 1; }
.comment-meta { font-size: .82rem; color: var(--ink-3); margin-bottom: 2px; }
.comment-meta b { color: var(--ink); font-weight: 600; }
.comment-text { white-space: pre-wrap; word-break: break-word; }
.comment-del { color: #d92d20; cursor: pointer; font-size: .8rem; background: none; border: none; margin-left: 6px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; padding: 36px 32px; text-align: center; box-shadow: var(--shadow); }
.login-logo { color: var(--accent); margin-bottom: 6px; display: inline-block; }
.login-card .brand-name { font-size: 1.7rem; font-weight: 700; letter-spacing: -.03em; display: block; }
.login-card .brand-slogan { color: var(--ink-3); margin: 2px 0 22px; display: block; font-size: .85rem; }
.login-card .pw-title { font-size: 1.15rem; font-weight: 700; margin: 2px 0 8px; letter-spacing: -.02em; }
.login-card .pw-intro { color: var(--ink-3); font-size: .85rem; line-height: 1.5; margin: 0 0 20px; }
.link-btn { background: none; border: 0; color: var(--ink-3); font-size: .82rem; cursor: pointer; margin-top: 14px; text-decoration: underline; padding: 4px; }
.link-btn:hover { color: var(--ink); }

/* ---------- tag selector (cascade) ---------- */
.tag-selectors { display: flex; flex-direction: column; gap: 12px; }
.tag-cascade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.tag-cascade .cat-label { grid-column: 1 / -1; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: -4px; }

/* ---------- tag tree editor ---------- */
.tree { list-style: none; padding-left: 0; margin: 10px 0 0; }
.tree ul { list-style: none; padding-left: 18px; border-left: 1px solid var(--border); margin-left: 10px; }
.tree li { position: relative; }
.tree-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; }
.tree-row:hover { background: var(--surface-2); }
.tree-row .name { flex: 1; font-weight: 500; }
.tree-actions { display: inline-flex; gap: 3px; opacity: .5; transition: opacity .12s; }
.tree-row:hover .tree-actions { opacity: 1; }
.icon-btn {
  width: 26px; height: 26px; display: inline-grid; place-items: center; padding: 0; line-height: 1;
  border: 1px solid var(--border); background: var(--surface); border-radius: 6px; cursor: pointer;
  color: var(--ink-2); font-size: .85rem; font-family: inherit;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-3); }
.icon-btn.danger:hover { background: #fef3f2; color: #d92d20; border-color: #fda29b; }

/* ---------- users ---------- */
.user-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--border-2); }
.user-row:first-child { border-top: none; }
.user-row .grow { flex: 1; min-width: 0; }
.user-sub { font-size: .76rem; color: var(--ink-3); margin-top: 2px; }
/* rechten-tabel (Beheer): vinkjes per feature */
.perm-wrap { overflow-x: auto; margin-top: 8px; }
.perm-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.perm-table th { text-align: center; font-size: .74rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .02em; padding: 0 10px 10px; white-space: nowrap; cursor: help; }
.perm-table th:first-child { text-align: left; }
.perm-table td { border-top: 1px solid var(--border-2); padding: 12px 10px; vertical-align: middle; }
.perm-user { display: flex; align-items: center; gap: 11px; min-width: 200px; }
.perm-c { text-align: center; }
.perm-c input { width: 19px; height: 19px; accent-color: var(--accent, #fc4c02); cursor: pointer; }
.perm-c input:disabled { cursor: not-allowed; opacity: .45; }
.perm-act { text-align: right; white-space: nowrap; }

/* ---------- rit vernieuwen + geschiedenis ---------- */
.url-refresh { display: flex; gap: 8px; align-items: center; }
.url-refresh input { flex: 1; min-width: 0; }
.url-refresh .btn { flex: 0 0 auto; white-space: nowrap; }
.hist-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.hist-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.hist-table td { padding: 9px 10px; border-bottom: 1px solid var(--border-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hist-table tr:last-child td { border-bottom: 0; }
.hist-table .hist-current td { background: #fff6f1; }
.hist-table a { color: var(--accent-d); }

/* ---------- route-editor ---------- */
.draw-route-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; font-size: .9rem; }
.route-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
body.gated .editor { visibility: hidden; }
.editor-body { overflow: hidden; }
.editor { display: flex; height: 100vh; }
.editor-panel { width: 340px; flex: 0 0 340px; padding: 18px 20px; overflow-y: auto; border-right: 1px solid var(--border); background: var(--surface); }
.editor-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.editor-map { flex: 1; min-height: 0; }
.editor-elev { max-height: 310px; overflow: hidden; border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; margin: 0; }
.ed-seg { display: flex; gap: 0; }
.ed-seg button { flex: 1; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); cursor: pointer; font-size: .85rem; font-weight: 600; }
.ed-seg button:first-child { border-radius: 8px 0 0 8px; }
.ed-seg button:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.ed-seg button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.ed-stats { display: flex; gap: 6px; margin: 16px 0; padding: 12px 0; border-top: 1px solid var(--border-2); border-bottom: 1px solid var(--border-2); }
.ed-stats > div { flex: 1; text-align: center; display: flex; flex-direction: column; }
.ed-stats .v { font-size: 1.1rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ed-stats .l { font-size: .64rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-3); font-weight: 600; margin-top: 2px; }
.ed-busy { font-size: .8rem; color: var(--accent-d); margin: -8px 0 12px; font-weight: 600; }
.ed-tools { display: flex; gap: 6px; margin-bottom: 12px; }
.ed-tools button { flex: 1; }
.ed-help { font-size: .78rem; color: var(--ink-3); line-height: 1.5; margin: 0 0 12px; }
.ed-note { font-size: .8rem; line-height: 1.45; color: #b54708; background: #fffaeb; border: 1px solid #fedf89; border-radius: 8px; padding: 9px 11px; margin-bottom: 12px; }
.ed-actions { display: flex; gap: 8px; margin-top: 4px; }
.ed-actions .btn { flex: 1; justify-content: center; }
.wp-icon, .mid-icon { background: none; border: 0; }
.wp-dot { width: 16px; height: 16px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); cursor: pointer; box-sizing: border-box; background: var(--accent); }
.wp-dot.wp-start { background: #16a34a; }
.wp-dot.wp-end { background: #dc2626; }
.wp-dot:hover { transform: scale(1.25); }
.mid-dot { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .92); border: 1.5px solid var(--accent); color: var(--accent); font-size: 13px; font-weight: 700; line-height: 13px; text-align: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.mid-dot:hover { background: var(--accent); color: #fff; }
.km-icon { background: none; border: 0; }
.km-flag { display: inline-block; background: var(--ink); color: #fff; font-size: .66rem; font-weight: 700; padding: 1px 6px; border-radius: 5px; border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.5; }
@media (max-width: 760px) {
  .editor { flex-direction: column; height: auto; min-height: 100vh; }
  .editor-panel { width: 100%; flex: none; border-right: 0; border-bottom: 1px solid var(--border); max-height: none; }
  .editor-map { height: 60vh; flex: none; }
}

/* ---------- misc ---------- */
.empty { text-align: center; color: var(--ink-2); padding: 70px 20px; }
.empty .big { color: var(--ink-3); margin-bottom: 12px; }
.error-msg { background: #fef3f2; color: #b42318; padding: 10px 14px; border-radius: var(--radius-sm); font-size: .88rem; margin: 12px 0; border: 1px solid #fecdca; }
.ok-msg { background: #ecfdf3; color: #067647; padding: 10px 14px; border-radius: var(--radius-sm); font-size: .88rem; margin: 12px 0; border: 1px solid #abefc6; }
.muted { color: var(--ink-2); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* Garmin-koppeling status-badge */
.g-status { font-size: .85rem; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.g-status.connected { color: #067647; }
.g-status.expired { color: #b42318; }
.g-status.never { color: var(--ink-3); }
.g-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.g-dot.ok { background: #17b26a; }
.g-dot.bad { background: #f04438; }
.g-dot.none { background: var(--ink-3); }

/* Routes zonder Garmin-URL (per-rit course aanmaken) */
.g-cr-head { font-size: .9rem; font-weight: 600; margin-bottom: 8px; }
.g-cr-list { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.g-cr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); }
.g-cr-title { font-size: .88rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-cr-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.g-cr-link { font-size: .85rem; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* "Garmin-course wordt aangemaakt…" placeholder op de rit-detailpagina */
.g-course-pending { color: var(--ink-2); font-size: .86rem; display: flex; align-items: center; gap: 8px; }
.g-course-pending .spinner { width: 14px; height: 14px; }

hr.sep { border: none; border-top: 1px solid var(--border-2); margin: 16px 0; }
.back-link { color: var(--ink-2); font-size: .88rem; font-weight: 500; }
.back-link:hover { color: var(--ink); text-decoration: none; }

.dropzone {
  border: 1.5px dashed var(--border); border-radius: var(--radius-sm); padding: 22px; text-align: center;
  background: var(--surface-2); color: var(--ink-2); cursor: pointer; font-weight: 500; font-size: .9rem; transition: border-color .12s, background .12s;
}
.dropzone:hover { border-color: var(--ink-3); }
.dropzone.drag { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-d); }
.dropzone small { display: block; color: var(--ink-3); font-weight: 400; margin-top: 5px; font-size: .8rem; }

/* toast */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast-item { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--radius-sm); box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .25s; font-size: .88rem; font-weight: 500; }
.toast-item.show { opacity: 1; transform: translateY(0); }
.toast-ok { background: var(--good); }
.toast-error { background: #d92d20; }

/* ---------- publieke deelpagina ---------- */
.share-body { background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; }
.share-top { background: var(--surface); border-bottom: 1px solid var(--border); }
.share-top .brand { max-width: 920px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.share-top .brand-name { font-weight: 700; font-size: 1.2rem; letter-spacing: -.03em; }
.share-top .brand-slogan { font-size: .72rem; color: var(--ink-3); font-style: italic; }
.share-main { max-width: 920px; width: 100%; margin: 0 auto; padding: 28px 24px 48px; flex: 1; }
.share-hero { margin-bottom: 18px; }
.share-hero h1 { font-size: 1.95rem; }
.share-sub { color: var(--ink-2); font-size: .95rem; }
.share-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.share-footer { text-align: center; color: var(--ink-3); font-size: .85rem; padding: 22px; border-top: 1px solid var(--border); }

/* ---------- modal (deel-dialoog) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 5000; display: grid; place-items: center; padding: 20px; animation: overlay-in .18s var(--ease); }
.modal-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 480px; width: 100%; padding: 24px; position: relative; animation: modal-in .22s var(--ease); }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; } }
.modal-x { position: absolute; top: 10px; right: 12px; border: none; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink-3); }
.modal-x:hover { color: var(--ink); }

/* ---------- kaart-verkenner (map.html, AllTrails-stijl, volledige breedte) ---------- */
.map-page { max-width: none; margin: 0; padding: 0; }
.explore { display: flex; height: calc(100dvh - 57px); overflow: hidden; }
.explore-side { flex: 0 0 400px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border-2); min-width: 0; }
.explore-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--border-2); }
.explore-head h1 { font-size: 1.4rem; margin: 0; }
.explore-subrow { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; gap: 10px; }
.explore-count { font-size: .82rem; font-weight: 600; color: var(--ink-3); }
.explore-sort { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.explore-sort select { padding: 5px 8px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: .82rem; background: var(--surface); color: var(--ink); cursor: pointer; }
.explore-sort select:disabled { opacity: .5; cursor: not-allowed; }
.explore-list { flex: 1; overflow-y: auto; padding: 10px; }
.explore-empty { padding: 24px 16px; color: var(--ink-3); text-align: center; }
.explore-card { display: block; border: 1px solid var(--border-2); border-radius: 14px; overflow: hidden; margin-bottom: 12px; text-decoration: none; color: var(--ink); background: var(--surface); transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); }
.explore-card:hover { border-color: var(--rc, var(--accent)); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.ec-thumb { height: 128px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border-2); }
.ec-thumb svg { width: 100%; height: 100%; display: block; }
.ec-body { padding: 11px 13px 13px; }
.ec-title { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 7px; }
.ec-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: var(--rc, var(--accent)); }
.ec-sub { font-size: .82rem; color: var(--ink-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-stats { font-size: .84rem; color: var(--ink-2); font-weight: 600; margin-top: 5px; }
.ec-near { display: inline-block; margin-top: 6px; font-size: .78rem; font-weight: 600; color: var(--accent-d); }
.explore-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border-2); }
.explore-pager:empty { display: none; }
.ep-btn { padding: 7px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font: inherit; font-size: .85rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.ep-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.ep-btn:disabled { opacity: .4; cursor: not-allowed; }
.ep-info { font-size: .82rem; color: var(--ink-3); }
.explore-mapwrap { flex: 1; position: relative; min-width: 0; }
/* id-zware selector + height:auto zodat de #map-hoogte van de rit-detailpagina (line ~603) hier niet lekt en de kaart de hele wrapper vult */
#map.explore-map, .explore-map { position: absolute; inset: 0; height: auto; }
.explore-filters { position: absolute; z-index: 500; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; pointer-events: none; }
.explore-filters > * { pointer-events: auto; }
.mf-geo { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; box-shadow: 0 2px 8px rgba(0,0,0,.12); color: var(--ink-3); }
.mf-geo input { border: 0; outline: none; font: inherit; font-size: .9rem; background: none; color: var(--ink); width: 180px; }
.mf-pill select { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: .88rem; font-weight: 600; color: var(--ink); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.mf-clear { background: #111; color: #fff; border: 0; border-radius: 10px; padding: 9px 13px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.mf-status { background: var(--surface); border-radius: 8px; padding: 5px 10px; font-size: .8rem; color: var(--ink-2); box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.mf-status:empty { display: none; }
.mf-status.err { color: #d92d20; }
.ms-pin { background: none; border: 0; }

/* ---------- events (bv. Tour de France) ---------- */
.event-page { max-width: 1040px; }
.event-banner { height: 260px; border-radius: var(--radius-lg); background: var(--surface-2) center/cover no-repeat; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.event-head { margin-bottom: 16px; }
.event-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.event-head h1 { font-size: 1.7rem; }
.event-meta { font-size: .95rem; margin-top: 5px; font-weight: 600; color: var(--ink-2); }
.event-desc { color: var(--ink-2); margin: 12px 0 0; max-width: 72ch; line-height: 1.55; }
.event-map { height: 460px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; margin: 6px 0 26px; box-shadow: var(--shadow-sm); }
.event-stages-h { font-size: 1.15rem; margin: 0 0 14px; }
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.stage-card { display: flex; flex-direction: column; }
.stage-map { height: 150px; background: var(--surface-2); pointer-events: none; }
.event-banner-prev { height: 160px; border-radius: var(--radius); background: var(--surface-2) center/cover no-repeat; border: 1px solid var(--border); }
.share-linkrow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.share-linkrow input { flex: 1; min-width: 220px; font-size: .85rem; }
.stage-gpx { margin-top: 10px; align-self: flex-start; }

/* inschrijvings-knop */
.event-signup-btn { margin-top: 14px; }

/* fotogalerij op de event-pagina (ingelogd + publieke deelpagina) */
.event-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 4px 0 26px; }
.ev-gphoto { margin: 0; cursor: zoom-in; }
.ev-gphoto-img { height: 150px; border-radius: var(--radius); background: var(--surface-2) center/cover no-repeat; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.ev-gphoto:hover .ev-gphoto-img { transform: translateY(-2px); box-shadow: var(--shadow); }
.ev-gphoto figcaption { font-size: .82rem; color: var(--ink-2); margin-top: 7px; line-height: 1.45; }

/* lightbox (klik op een foto) */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(10,12,16,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; cursor: zoom-out; animation: lbfade .15s var(--ease); }
.lightbox img { max-width: 94vw; max-height: 84vh; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-cap { color: #fff; font-size: .95rem; text-align: center; max-width: 70ch; }
@keyframes lbfade { from { opacity: 0; } to { opacity: 1; } }

/* beheer: fotogalerij bewerken */
.ev-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.ev-photo { display: flex; flex-direction: column; gap: 8px; }
.ev-photo-img { height: 130px; border-radius: var(--radius); background: var(--surface-2) center/cover no-repeat; border: 1px solid var(--border); }
.ev-photo-cap { font-size: .85rem; }

@media (max-width: 640px) { .event-map { height: 320px; } .event-banner { height: 180px; } .event-gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); } }
@media (max-width: 820px) {
  .explore { flex-direction: column; height: auto; }
  .explore-side { flex: none; order: 2; border-right: none; border-top: 1px solid var(--border-2); }
  .explore-list { max-height: 52vh; }
  .explore-mapwrap { order: 1; height: 56vh; min-height: 340px; }
  .mf-geo input { width: 130px; }
}

/* ---------- responsive / mobiel ---------- */
/* hamburger + mobiel menu (verborgen op desktop) */
.nav-burger { display: none; background: none; border: 0; color: var(--ink-2); padding: 7px; border-radius: 8px; cursor: pointer; align-items: center; }
.nav-burger:hover { background: var(--surface-2); color: var(--ink); }
.mobile-menu { position: absolute; top: calc(100% + 6px); right: 10px; min-width: 232px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 1300; padding: 6px; }
.mobile-menu[hidden] { display: none !important; }
.mobile-menu a, .mobile-menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 12px 14px; border: 0; background: none; font: inherit; font-weight: 500; font-size: .95rem; color: var(--ink); border-radius: 8px; cursor: pointer; }
.mobile-menu a:hover, .mobile-menu button:hover { background: var(--surface-2); text-decoration: none; }
.mobile-menu a.active { font-weight: 700; color: var(--accent-d); }
.mobile-menu .mm-sep { border-top: 1px solid var(--border-2); margin: 6px 0; }
.mobile-menu .mm-logout { color: #d92d20; }

/* --- foto's bij een rit (ledengalerij) --- */
.ph-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 14px; }
.ph-item { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2, #eef0f2); }
.ph-item img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.ph-del { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; padding: 0; border: none; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: .78rem; line-height: 24px; text-align: center; cursor: pointer; opacity: 0; transition: opacity .12s; }
.ph-item:hover .ph-del { opacity: 1; }
@media (hover: none) { .ph-del { opacity: .9; } }
.ph-lightbox { position: fixed; inset: 0; z-index: 5000; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 20px; }
.ph-stage { margin: 0; max-width: 92vw; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ph-stage img { max-width: 92vw; max-height: 78vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.ph-cap { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 600; font-size: .95rem; }
.ph-cap .avatar { border: 2px solid rgba(255,255,255,.55); }
.ph-cap-date { color: rgba(255,255,255,.72); font-weight: 500; margin-left: 4px; }
.ph-cap-date::before { content: "· "; color: rgba(255,255,255,.4); }
.ph-cap-count { color: rgba(255,255,255,.55); font-weight: 500; margin-left: 8px; }
.ph-close { position: absolute; top: 14px; right: 20px; background: none; border: none; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; z-index: 2; }
.ph-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: none; background: rgba(255,255,255,.15); color: #fff; font-size: 1.9rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.ph-nav:hover { background: rgba(255,255,255,.3); }
.ph-nav[hidden] { display: none; }
.ph-prev { left: 14px; }
.ph-next { right: 14px; }
.ph-nearby { margin-top: 18px; border-top: 1px solid var(--border-2, #eceef1); padding-top: 12px; }
.ph-nearby-h { font-size: .95rem; margin: 0 0 2px; font-weight: 700; }
/* klikbaar fotothumbnailtje op de kaart, op z'n GPS-locatie */
.photo-pin img { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 7px rgba(0,0,0,.4); display: block; cursor: pointer; transition: transform .1s; }
.photo-pin:hover img { transform: scale(1.14); }
/* "mijn foto's"-overzicht op het profiel: slotje-badge (privé) of open slot (openbaar) */
.mp-item { display: block; }
.mp-badge { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.mp-badge svg { width: 12px; height: 12px; }
.mp-badge.is-priv { background: #dc2626; }
.mp-badge.is-pub { background: #16a34a; }
.mp-grid { grid-template-columns: repeat(4, 1fr); }
.mp-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.mp-pager button[disabled] { opacity: .4; cursor: default; }
.mp-link { display: block; width: 100%; height: 100%; }
.mp-del { position: absolute; top: 5px; left: 5px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; padding: 0; opacity: 0; transition: opacity .12s; z-index: 2; }
.mp-item:hover .mp-del, .mp-item:focus-within .mp-del { opacity: 1; }
@media (hover: none) { .mp-del { opacity: .85; } }

@media (max-width: 920px) {
  /* detailpagina in één kolom, in mobiele leesvolgorde: stats → kaart → profiel → gegevens → rest */
  .detail-grid { display: flex; flex-direction: column; align-items: stretch; }
  .detail-grid > div { display: contents; }
  #stat-panel { order: 1; }
  #map { order: 2; }
  #elev-panel { order: 3; }
  #photos-panel { order: 3; }
  #meta-panel { order: 4; }
  #desc-panel { order: 5; }
  #comments-panel { order: 6; }
  .brand-slogan { display: none; }
  .nav-name { display: none; }
}

/* onder ~1130px passen Type + Steden niet meer naast de andere kolommen (o.a. iPad) */
@media (max-width: 1130px) {
  .rides-table .hide-sm { display: none; }
}

/* tablet & gsm: compacte header met hamburger + scrollbare tabellen */
@media (max-width: 760px) {
  .header-inner { padding: 0 12px; height: 52px; gap: 10px; }
  .nav > a, .nav > #logout-btn { display: none; }
  .nav-burger { display: inline-flex; }
  #map { height: 340px; }
  .hist-compare-map { height: 440px; }
  .hist-table { min-width: 560px; }
  .wx-dialog { width: 96vw; }
  .wx-head { padding: 12px 42px 10px 14px; }
  .share-hero h1 { font-size: 1.45rem; }
  .share-main { padding: 20px 14px 40px; }
}

/* gsm: alles stapelen, grotere invoervelden (iOS zoomt bij <16px), compacte spacing */
@media (max-width: 640px) {
  html { -webkit-tap-highlight-color: transparent; }
  main { padding: 16px 12px 64px; }
  h1 { font-size: 1.32rem; }
  .panel { padding: 16px 14px; }
  .page-head { margin-bottom: 14px; row-gap: 8px; }
  input:not([type=checkbox]):not([type=radio]), textarea, select { font-size: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .tag-cascade { grid-template-columns: 1fr; }
  .form-row > .field { flex: 1 1 100%; }
  .form-actions { flex-wrap: wrap; }
  /* toolbar: filters netjes stapelen */
  .toolbar { gap: 8px; }
  .search-box { flex: 1 1 44%; min-width: 130px; max-width: none; }
  .segmented { display: flex; width: 100%; }
  .segmented button { flex: 1; padding: 9px 4px; }
  #tag-filter { width: 100%; }
  #tag-filter .tag-cascade { width: 100%; }
  #tag-filter .tag-cascade select { flex: 1; min-width: 0; }
  .owner-filter { flex: 1 1 100%; max-width: none; }
  .owner-multi { flex: 1 1 100%; }
  .owner-btn { width: 100%; justify-content: flex-start; }
  .owner-panel { width: 100%; }
  .result-count { display: none; }
  .toolbar-2 .adv-field { flex: 1 1 100%; }
  .adv-field input { width: 100%; }
  .adv-field .range { width: 100%; }
  .adv-field .range input { width: auto; flex: 1; min-width: 0; }
  .adv-field input[type=date] { width: auto; flex: 1; }
  /* modals, meldingen & beheer-rijen */
  .modal-card { padding: 20px 16px; }
  .stat-tile .l { white-space: normal; }
  .weather-strip .w-days { gap: 12px; }
  .user-row { flex-wrap: wrap; }
  .user-row .grow { min-width: 58%; }
  .row-between { flex-wrap: wrap; }
  .g-cr-row { flex-wrap: wrap; }
  .expand-map { height: 220px; }
  .notif-panel { position: fixed; top: 56px; left: 10px; right: 10px; width: auto; max-width: none; }
}

/* smal gsm-scherm: compacte rittentabel (chevron · naam · afstand · hoogte) */
@media (max-width: 620px) {
  .rides-table th:nth-child(3), .rides-table td:nth-child(3),
  .rides-table th:nth-child(6), .rides-table td:nth-child(6),
  .rides-table th.col-owner, .rides-table td.col-owner { display: none; }
  .rides-table th { padding: 10px 8px; }
  .rides-table td { padding: 11px 8px; font-size: .88rem; }
  .rides-table td.num { white-space: nowrap; }
  .rides-table th.col-x, .rides-table td.col-x { width: 28px; padding-left: 8px; }
  .rides-table td.col-name { white-space: normal; word-break: break-word; }
}

/* touch-apparaten: hover-verborgen acties altijd tonen + grotere raakvlakken */
@media (hover: none) and (pointer: coarse) {
  .tree-actions { opacity: 1; }
  .icon-btn { width: 32px; height: 32px; }
  .nav-bell { padding: 9px; }
  .btn, .btn-ghost { padding-top: 9px; padding-bottom: 9px; }
  .wx-nav { width: 36px; height: 36px; }
}
