/* LANDRADL PWA — no framework, no remote assets */
:root {
  color-scheme: light;
  --brand: #95c11f;
  --brand-strong: #729b0c;
  --brand-soft: #edf6d5;
  --brand-ink: #263600;
  --yellow: #f2df00;
  --ink: #1d1d1b;
  --ink-soft: #5e625b;
  --canvas: #f7f8f4;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-muted: #eef0e9;
  --line: #dfe3d9;
  --line-strong: #c9cfc1;
  --danger: #c8393b;
  --danger-soft: #fdebec;
  --warning: #a66200;
  --warning-soft: #fff1d7;
  --info: #176e91;
  --info-soft: #e2f4fb;
  --success: #397b1f;
  --success-soft: #e8f5df;
  --shadow-sm: 0 2px 10px rgba(25, 31, 19, .06);
  --shadow-md: 0 14px 40px rgba(25, 31, 19, .12);
  --shadow-lg: 0 24px 70px rgba(25, 31, 19, .18);
  --radius-sm: .7rem;
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --sidebar-width: 17.5rem;
  --topbar-height: 4.75rem;
  --bottom-nav-height: calc(4.25rem + env(safe-area-inset-bottom));
  --focus: 0 0 0 3px rgba(149, 193, 31, .36);
  --ease: cubic-bezier(.2, .75, .25, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --brand: #a8d52a;
  --brand-strong: #b7e33d;
  --brand-soft: #26360f;
  --brand-ink: #e7ffc0;
  --ink: #f3f5ef;
  --ink-soft: #adb5a7;
  --canvas: #0d100c;
  --surface: #151914;
  --surface-raised: #1b2019;
  --surface-muted: #20261e;
  --line: #30372d;
  --line-strong: #424b3d;
  --danger: #ff8789;
  --danger-soft: #3b2022;
  --warning: #ffc464;
  --warning-soft: #3a2b13;
  --info: #70c9ee;
  --info-soft: #15303b;
  --success: #93d875;
  --success-soft: #1b3216;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, .22);
  --shadow-md: 0 16px 44px rgba(0, 0, 0, .34);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, .48);
}

@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --brand: #a8d52a;
    --brand-strong: #b7e33d;
    --brand-soft: #26360f;
    --brand-ink: #e7ffc0;
    --ink: #f3f5ef;
    --ink-soft: #adb5a7;
    --canvas: #0d100c;
    --surface: #151914;
    --surface-raised: #1b2019;
    --surface-muted: #20261e;
    --line: #30372d;
    --line-strong: #424b3d;
    --danger: #ff8789;
    --danger-soft: #3b2022;
    --warning: #ffc464;
    --warning-soft: #3a2b13;
    --info: #70c9ee;
    --info-soft: #15303b;
    --success: #93d875;
    --success-soft: #1b3216;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .22);
    --shadow-md: 0 16px 44px rgba(0, 0, 0, .34);
    --shadow-lg: 0 24px 70px rgba(0, 0, 0, .48);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--brand-strong); text-underline-offset: .16em; }
img, svg { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { background: var(--brand); color: #101500; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { line-height: 1.14; letter-spacing: -.025em; }
h1 { margin-bottom: .5rem; font-size: clamp(1.45rem, 3vw, 2rem); }
h2 { margin-bottom: .65rem; font-size: clamp(1.3rem, 2.5vw, 1.65rem); }
h3 { margin-bottom: .4rem; font-size: 1.05rem; }
.small { font-size: .86rem; }
.micro { font-size: .75rem; }
.muted { color: var(--ink-soft); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
}
.skip-link {
  position: fixed; z-index: 1000; top: .75rem; left: .75rem; padding: .7rem 1rem;
  border-radius: var(--radius-sm); background: var(--ink); color: var(--surface); transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

/* Startup and authentication */
.app-root { min-height: 100vh; min-height: 100dvh; }
.boot-view { min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 2rem; }
.boot-mark {
  width: 6rem; height: 6rem; display: grid; place-items: center; margin-bottom: 1rem;
  border: 1px solid var(--line); border-radius: 2rem; background: var(--surface); box-shadow: var(--shadow-md);
  animation: boot-in .65s var(--ease) both;
}
.wordmark, .brand-text { margin: 0; color: var(--ink); font-weight: 350; letter-spacing: .025em; }
.wordmark { font-size: 1.5rem; }
.wordmark strong, .brand-text strong { font-weight: 850; }
.loading-dots { display: flex; gap: .32rem; margin: 1.6rem 0 .8rem; }
.loading-dots i { width: .45rem; height: .45rem; border-radius: 999px; background: var(--brand); animation: pulse-dot 1s ease-in-out infinite; }
.loading-dots i:nth-child(2) { animation-delay: .16s; }.loading-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes pulse-dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-.25rem); } }
@keyframes boot-in { from { opacity: 0; transform: scale(.86) rotate(-5deg); } }

.auth-view { min-height: 100vh; min-height: 100dvh; background: var(--surface); }
.auth-art { display: none; }
.auth-panel { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.25rem, env(safe-area-inset-bottom)); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; }
.brand img { object-fit: contain; }
.brand-text { font-size: 1.15rem; }
.auth-brand { margin-bottom: clamp(2rem, 8vh, 5rem); }
#auth-outlet { width: 100%; max-width: 28rem; margin: 0 auto; }
#auth-outlet.is-legal { max-width: 48rem; }
.auth-intro { margin-bottom: 1.75rem; }
.auth-intro p { margin-bottom: 0; }
.auth-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .5rem; margin-top: auto; padding-top: 2rem; color: var(--ink-soft); font-size: .78rem; }
.auth-footer a, .text-button { color: inherit; }
.text-button { padding: 0; border: 0; background: transparent; text-decoration: underline; text-underline-offset: .15em; }
.auth-separator { display: flex; align-items: center; gap: .75rem; margin: 1.15rem 0; color: var(--ink-soft); font-size: .8rem; }
.auth-separator::before, .auth-separator::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Forms and buttons */
.form-stack { display: grid; gap: 1rem; }
.form-grid { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; min-width: 0; }
.field > span, .field-label { font-size: .84rem; font-weight: 720; }
.field-hint { margin: 0; color: var(--ink-soft); font-size: .77rem; }
.field-error { color: var(--danger); font-size: .78rem; }
input, select, textarea {
  width: 100%; min-height: 3rem; border: 1px solid var(--line-strong); border-radius: .8rem;
  background: var(--surface); padding: .72rem .85rem; transition: border-color .15s, box-shadow .15s, background .15s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 2.6rem;
  background-repeat: no-repeat; background-position: right .9rem center; background-size: 1.05rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235e625b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
html[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23adb5a7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23adb5a7' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); } }
textarea { min-height: 7.5rem; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-strong); box-shadow: var(--focus); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
input[type="checkbox"], input[type="radio"] { width: 1.2rem; min-height: 1.2rem; accent-color: var(--brand-strong); }
.check-row { display: flex; align-items: flex-start; gap: .65rem; font-size: .85rem; }
.check-row input { flex: 0 0 auto; margin-top: .15rem; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 3rem; }
.input-action { position: absolute; right: .3rem; top: 50%; width: 2.4rem; height: 2.4rem; transform: translateY(-50%); border: 0; border-radius: .6rem; background: transparent; }

.button {
  min-height: 2.85rem; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .7rem 1rem; border: 1px solid transparent; border-radius: .85rem; background: var(--brand); color: #152000;
  font-weight: 760; text-decoration: none; box-shadow: 0 5px 14px rgba(114, 155, 12, .13); transition: transform .15s var(--ease), background .15s, border-color .15s, opacity .15s;
}
.button:hover { background: var(--brand-strong); color: #fff; transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button[disabled], .button.is-loading { cursor: not-allowed; opacity: .55; transform: none; }
.button svg { width: 1.25rem; height: 1.25rem; }
.button.secondary { border-color: var(--line-strong); background: var(--surface); color: var(--ink); box-shadow: none; }
.button.secondary:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.button.ghost { border-color: transparent; background: transparent; color: var(--ink); box-shadow: none; }
.button.ghost:hover { background: var(--surface-muted); }
.button.danger { background: var(--danger); color: #fff; }
.button.warning { background: var(--warning); color: #fff; }
.button.full { width: 100%; }
.button.small-button { min-height: 2.25rem; padding: .4rem .7rem; border-radius: .65rem; font-size: .82rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .65rem; }
.icon-button {
  position: relative; width: 2.65rem; height: 2.65rem; display: inline-grid; place-items: center; flex: 0 0 auto;
  border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); color: var(--ink); transition: .15s;
}
.icon-button:hover { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.icon-button svg { width: 1.25rem; height: 1.25rem; }

/* Shell */
.shell { min-height: 100vh; min-height: 100dvh; }
.sidebar { display: none; }
.app-column { min-width: 0; min-height: 100vh; min-height: 100dvh; }
.topbar {
  position: sticky; z-index: 30; top: 0; height: var(--topbar-height); display: flex; align-items: center; gap: .7rem;
  padding: env(safe-area-inset-top) 1rem 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.mobile-brand .brand-text { display: none; }
.topbar-context { display: none; min-width: 0; }
.topbar-context h1 { margin: 0; overflow: hidden; font-size: 1.2rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow { margin: 0 0 .16rem; color: var(--brand-strong); font-size: .68rem; font-weight: 850; letter-spacing: .115em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.avatar {
  width: 2.65rem; height: 2.65rem; display: inline-grid; place-items: center; flex: 0 0 auto;
  border-radius: .9rem; background: var(--brand-soft); color: var(--brand-ink); font-size: .78rem; font-weight: 850;
}
.avatar-button { border: 1px solid color-mix(in srgb, var(--brand) 55%, var(--line)); }
.avatar img, .avatar-image { width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.language-button { min-width: 2.9rem; padding: 0 .55rem; font-size: .72rem; font-weight: 850; letter-spacing: .04em; }
.notification-dot { position: absolute; top: .45rem; right: .45rem; width: .48rem; height: .48rem; border: 2px solid var(--surface); border-radius: 99px; background: var(--danger); }
.main-content { min-height: calc(100vh - var(--topbar-height)); min-height: calc(100dvh - var(--topbar-height)); padding: 1rem 1rem calc(var(--bottom-nav-height) + 1.2rem); }
.route-outlet { width: 100%; max-width: 90rem; margin: 0 auto; animation: route-in .28s var(--ease); }
@keyframes route-in { from { opacity: 0; transform: translateY(.4rem); } }
.mobile-nav {
  position: fixed; z-index: 35; right: 0; bottom: 0; left: 0; height: var(--bottom-nav-height);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start;
  padding: .45rem max(.45rem, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(.45rem, env(safe-area-inset-left));
  border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 -8px 30px rgba(20, 25, 16, .08);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.nav-item {
  position: relative; min-width: 0; height: 3.4rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
  padding: .2rem; border: 0; border-radius: .8rem; background: transparent; color: var(--ink-soft); text-decoration: none; font-size: .66rem; font-weight: 650;
}
.nav-item svg { width: 1.35rem; height: 1.35rem; }
.nav-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-item[aria-current="page"] { color: var(--brand-strong); }
.nav-item[aria-current="page"]::before { content: ""; position: absolute; top: -.46rem; width: 1.7rem; height: .2rem; border-radius: 0 0 5px 5px; background: var(--brand); }

.status-banner {
  position: fixed; z-index: 110; top: 0; right: 0; left: 0; display: flex; justify-content: center; align-items: center; gap: .55rem;
  min-height: 2rem; padding: .35rem 1rem; background: var(--warning-soft); color: var(--warning); font-size: .77rem; font-weight: 700; text-align: center;
}
.status-banner:not([hidden]) ~ .app-root .topbar { top: 2rem; }
.status-dot { width: .5rem; height: .5rem; flex: 0 0 auto; border-radius: 99px; background: currentColor; }

/* Shared layout and cards */
.page-head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1rem; }
.page-head-copy p:last-child { margin-bottom: 0; }
.page-head .button-row { flex: 0 0 auto; }
.card {
  min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 1rem; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.card-head h2, .card-head h3, .card-head p { margin-bottom: 0; }
.card-subtle { background: var(--surface-muted); box-shadow: none; }
.section { margin-top: 1.35rem; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: .75rem; }
.section-title h2 { margin-bottom: 0; font-size: 1.15rem; }
.section-title a, .section-title button { font-size: .82rem; }
.stack { display: grid; gap: .8rem; }
.split-grid, .content-grid, .metric-grid, .tile-grid { display: grid; gap: .8rem; }
.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metric-card { padding: .9rem; }
.metric-card .metric-icon { width: 2.2rem; height: 2.2rem; display: grid; place-items: center; margin-bottom: .65rem; border-radius: .65rem; background: var(--brand-soft); color: var(--brand-ink); }
.metric-card .metric-icon svg { width: 1.15rem; height: 1.15rem; }
.metric-value { display: block; font-size: 1.45rem; font-weight: 850; letter-spacing: -.04em; }
.metric-label { color: var(--ink-soft); font-size: .78rem; }
.metric-trend { display: inline-flex; margin-top: .4rem; color: var(--success); font-size: .72rem; font-weight: 700; }
.badge, .status-pill {
  display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .25rem .52rem;
  border-radius: 99px; background: var(--surface-muted); color: var(--ink-soft); font-size: .7rem; font-weight: 760; white-space: nowrap;
}
.badge.brand, .status-pill.success { background: var(--success-soft); color: var(--success); }
.status-pill.warning { background: var(--warning-soft); color: var(--warning); }
.status-pill.danger { background: var(--danger-soft); color: var(--danger); }
.status-pill.info { background: var(--info-soft); color: var(--info); }
.status-pill::before { content: ""; width: .38rem; height: .38rem; flex: 0 0 auto; border-radius: 99px; background: currentColor; }
.chip-row { display: flex; gap: .5rem; padding-bottom: .2rem; overflow-x: auto; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { min-height: 2.3rem; flex: 0 0 auto; padding: .45rem .75rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-soft); font-size: .8rem; font-weight: 700; }
.chip[aria-pressed="true"], .chip.active { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.list-row { display: flex; align-items: center; gap: .8rem; min-width: 0; padding: .85rem; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-icon { width: 2.7rem; height: 2.7rem; display: grid; place-items: center; flex: 0 0 auto; border-radius: .8rem; background: var(--surface-muted); color: var(--ink); }
.list-icon.brand { background: var(--brand-soft); color: var(--brand-ink); }
.list-icon svg { width: 1.3rem; height: 1.3rem; }
.list-copy { min-width: 0; flex: 1; }
.list-copy strong, .list-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-copy small { color: var(--ink-soft); }
.list-meta { flex: 0 0 auto; text-align: right; }
.list-meta strong, .list-meta small { display: block; }
.list-meta small { color: var(--ink-soft); }
.empty-state, .error-state { display: grid; place-items: center; min-height: 17rem; padding: 2rem 1rem; text-align: center; }
.state-icon { width: 4rem; height: 4rem; display: grid; place-items: center; margin: 0 auto 1rem; border-radius: 1.3rem; background: var(--surface-muted); color: var(--ink-soft); }
.state-icon svg { width: 2rem; height: 2rem; }
.error-state .state-icon { background: var(--danger-soft); color: var(--danger); }
.empty-state p, .error-state p { max-width: 30rem; color: var(--ink-soft); }

/* Discovery */
.welcome-strip {
  position: relative; overflow: hidden; padding: 1.1rem; border-radius: var(--radius-lg);
  background: linear-gradient(125deg, var(--brand) 0%, #c2df46 100%); color: #172000; box-shadow: 0 12px 32px rgba(114, 155, 12, .18);
}
.welcome-strip::after { content: ""; position: absolute; width: 11rem; height: 11rem; right: -4rem; bottom: -6rem; border: 2rem solid rgba(255, 255, 255, .24); border-radius: 50%; }
.welcome-strip p { margin-bottom: .3rem; opacity: .78; }
.welcome-strip h2 { max-width: 20rem; margin-bottom: .85rem; }
.welcome-strip .button { position: relative; z-index: 1; background: #1d1d1b; color: #fff; box-shadow: none; }
.search-bar { display: flex; gap: .5rem; margin-top: 1rem; }
.search-bar label { position: relative; flex: 1; }
.search-bar label svg { position: absolute; top: 50%; left: .85rem; width: 1.15rem; height: 1.15rem; color: var(--ink-soft); transform: translateY(-50%); }
.search-bar input { padding-left: 2.6rem; background: var(--surface); box-shadow: var(--shadow-sm); }
.search-bar .icon-button { width: 3rem; height: 3rem; }
.map-card { position: relative; min-height: 21rem; overflow: hidden; background-color: #dfe6d6; cursor: grab; touch-action: none; }
.map-card.is-dragging { cursor: grabbing; }
html[data-theme="dark"] .map-card { background-color: #1a221a; }
@media (prefers-color-scheme: dark) { html[data-theme="auto"] .map-card { background-color: #1a221a; } }
.map-layer { position: absolute; inset: 0; }
.map-tile { position: absolute; width: 256px; height: 256px; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.map-attribution { position: absolute; z-index: 4; right: .35rem; bottom: .35rem; padding: .1rem .4rem; border-radius: .4rem; background: rgba(255,255,255,.82); color: #22332a; font-size: .62rem; font-weight: 600; text-decoration: none; }
.map-toolbar { position: absolute; z-index: 3; top: .75rem; right: .75rem; display: grid; gap: .4rem; }
.map-pin { position: absolute; z-index: 2; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border: 3px solid #fff; border-radius: 1rem 1rem 1rem .25rem; background: var(--brand); color: #152000; box-shadow: var(--shadow-md); transform: translate(-50%, -50%) rotate(-45deg); }
.map-pin svg, .map-pin span { transform: rotate(45deg); }.map-pin span { font-size: .75rem; font-weight: 850; }
.map-pin.active { background: var(--ink); color: var(--surface); transform: translate(-50%, -50%) rotate(-45deg) scale(1.14); }
.bike-card { display: grid; grid-template-columns: 4.8rem minmax(0, 1fr); gap: .85rem; padding: .85rem; }
.bike-visual { display: grid; place-items: center; min-height: 4.8rem; border-radius: .9rem; background: var(--brand-soft); color: var(--brand-ink); }
.bike-visual svg { width: 2.5rem; height: 2.5rem; }
.bike-card h3 { margin: .2rem 0 .2rem; }
.bike-meta { display: flex; flex-wrap: wrap; gap: .35rem .7rem; margin-top: .45rem; color: var(--ink-soft); font-size: .77rem; }
.price { font-weight: 850; color: var(--ink); }

/* Ride, scanner, wallet */
.ride-hero { overflow: hidden; border: 0; background: linear-gradient(145deg, #1d2418, #303c22); color: #f8fbf3; box-shadow: var(--shadow-lg); }
.ride-hero-top { padding: 1rem 1rem .4rem; }
.ride-bike-art { position: relative; height: 10rem; display: grid; place-items: center; overflow: hidden; color: var(--brand); }
.ride-bike-art::before { content: ""; position: absolute; width: 16rem; height: 16rem; border: 2.5rem solid rgba(149, 193, 31, .08); border-radius: 50%; }
.ride-bike-art svg { position: relative; width: 8rem; height: 8rem; stroke-width: 1.25; }
.ride-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.12); }
.ride-stat { padding: .85rem .4rem; text-align: center; }
.ride-stat + .ride-stat { border-left: 1px solid rgba(255,255,255,.12); }
.ride-stat strong, .ride-stat small { display: block; }.ride-stat strong { font-size: 1.1rem; }.ride-stat small { color: rgba(255,255,255,.65); font-size: .68rem; }
.ride-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: 1rem; }
.ride-actions .button:first-child { grid-column: 1 / -1; min-height: 3.4rem; }
.lock-state { display: flex; align-items: center; gap: .8rem; min-width: 0; padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.lock-state-icon { width: 2.8rem; height: 2.8rem; display: grid; place-items: center; border-radius: .85rem; background: var(--success-soft); color: var(--success); }
.lock-state-icon svg { width: 1.35rem; height: 1.35rem; }
.simulator-note { display: flex; gap: .65rem; padding: .75rem; border: 1px solid color-mix(in srgb, var(--info) 32%, var(--line)); border-radius: .8rem; background: var(--info-soft); color: var(--info); font-size: .8rem; }
.simulator-note svg { width: 1.2rem; height: 1.2rem; flex: 0 0 auto; margin-top: .05rem; }
.scanner-shell { position: relative; min-height: 24rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem; padding: 2rem 1rem; overflow: hidden; border-radius: var(--radius-lg); background: #0b0d0a; color: #fff; }
.scanner-shell video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-shade { position: absolute; inset: 0; background: radial-gradient(closest-side at center, transparent 0 65%, rgba(0,0,0,.58) 66%); }
.scanner-frame { position: relative; z-index: 2; width: min(68vw, 16rem); aspect-ratio: 1; border: 2px solid rgba(255,255,255,.25); border-radius: 1.4rem; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.scanner-frame::before, .scanner-frame::after { content: ""; position: absolute; inset: -.2rem; border: .25rem solid var(--brand); border-radius: 1.5rem; clip-path: polygon(0 0, 23% 0, 23% 4%, 4% 4%, 4% 23%, 0 23%, 0 0, 100% 0, 100% 23%, 96% 23%, 96% 4%, 77% 4%, 77% 0, 100% 0, 100% 100%, 77% 100%, 77% 96%, 96% 96%, 96% 77%, 100% 77%, 100% 100%, 0 100%, 0 77%, 4% 77%, 4% 96%, 23% 96%, 23% 100%); }
.scanner-line { position: absolute; z-index: 3; right: .7rem; left: .7rem; height: 2px; top: 12%; background: var(--brand); box-shadow: 0 0 10px var(--brand); animation: scan-line 2.2s ease-in-out infinite alternate; }
@keyframes scan-line { to { top: 88%; } }
.scanner-copy { position: relative; z-index: 4; max-width: 22rem; text-align: center; text-shadow: 0 1px 4px #000; }
.wallet-balance { position: relative; overflow: hidden; padding: 1.2rem; border: 0; background: linear-gradient(130deg, #20251e, #3b4d29); color: #fff; }
.wallet-balance::after { content: ""; position: absolute; width: 10rem; height: 10rem; right: -4rem; bottom: -5rem; border: 1.8rem solid rgba(149,193,31,.25); border-radius: 50%; }
.wallet-balance .amount { display: block; margin: .4rem 0 .8rem; font-size: 2.15rem; font-weight: 850; letter-spacing: -.05em; }

/* Admin */
.admin-hero { padding: 1rem; border-radius: var(--radius-lg); background: linear-gradient(125deg, var(--ink), #38402f); color: var(--surface); }
.admin-hero .eyebrow { color: var(--brand); }
.admin-hero p { max-width: 45rem; margin-bottom: 0; color: color-mix(in srgb, var(--surface) 70%, transparent); }
.toolbar { display: flex; flex-direction: column; gap: .65rem; margin-bottom: .85rem; }
.toolbar-search { position: relative; flex: 1; }
.toolbar-search svg { position: absolute; top: 50%; left: .8rem; width: 1rem; height: 1rem; color: var(--ink-soft); transform: translateY(-50%); }
.toolbar-search input { min-height: 2.6rem; padding-left: 2.35rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th { padding: .7rem .8rem; border-bottom: 1px solid var(--line-strong); background: var(--surface-muted); color: var(--ink-soft); font-size: .69rem; letter-spacing: .055em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: .78rem .8rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--brand-soft) 40%, transparent); }
.data-table .actions { display: flex; justify-content: flex-end; gap: .35rem; }
.data-table .actions .icon-button { width: 2.1rem; height: 2.1rem; border-radius: .6rem; }
.data-table .actions svg { width: 1rem; height: 1rem; }
.mobile-records { display: grid; gap: .65rem; }
.record-card { padding: .85rem; }
.record-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .7rem; margin-bottom: .7rem; }
.record-head h3 { margin-bottom: .1rem; }
.record-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.record-value small, .record-value strong { display: block; }.record-value small { color: var(--ink-soft); font-size: .68rem; }.record-value strong { font-size: .82rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-top: .85rem; color: var(--ink-soft); font-size: .78rem; }
.progress { height: .45rem; overflow: hidden; border-radius: 99px; background: var(--surface-muted); }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.audit-row { display: grid; grid-template-columns: 2.2rem minmax(0,1fr); gap: .7rem; padding: .85rem 0; border-bottom: 1px solid var(--line); }
.audit-row:last-child { border-bottom: 0; }
.audit-marker { width: 2.1rem; height: 2.1rem; display: grid; place-items: center; border-radius: 50%; background: var(--surface-muted); }
.audit-marker svg { width: 1rem; height: 1rem; }
.audit-copy p { margin: .18rem 0; font-size: .82rem; }.audit-copy small { color: var(--ink-soft); }

/* Profile, settings and workspace */
.profile-head { display: flex; align-items: center; gap: 1rem; padding: 1rem; }
.profile-avatar { width: 4rem; height: 4rem; font-size: 1.25rem; border-radius: 1.25rem; }
.profile-avatar-button { position: relative; flex: 0 0 auto; padding: 0; border: 0; border-radius: 1.25rem; background: transparent; }
.profile-avatar-button::after { content: "+"; position: absolute; right: -.3rem; bottom: -.3rem; width: 1.55rem; height: 1.55rem; display: grid; place-items: center; border: 2px solid var(--surface); border-radius: .55rem; background: var(--brand); color: #172000; font-size: 1rem; font-weight: 900; }
.profile-avatar-button.has-avatar::after { content: "✎"; font-size: .78rem; }
.avatar-editor { display: grid; gap: 1rem; }
.avatar-crop-frame { position: relative; width: min(100%, 31rem); margin-inline: auto; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 1.25rem; background: #0d100c; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); touch-action: none; }
.avatar-crop-frame::before, .avatar-crop-frame::after { content: ""; position: absolute; z-index: 2; pointer-events: none; opacity: .45; }
.avatar-crop-frame::before { inset: 33.333% 0 auto; height: 33.333%; border-top: 1px solid #fff; border-bottom: 1px solid #fff; }
.avatar-crop-frame::after { inset: 0 auto 0 33.333%; width: 33.333%; border-right: 1px solid #fff; border-left: 1px solid #fff; }
.avatar-crop-canvas { width: 100%; height: auto; display: block; cursor: grab; }
.avatar-crop-canvas.is-dragging { cursor: grabbing; }
.avatar-editor-controls { display: grid; gap: .75rem; }
.avatar-editor-controls input[type="range"] { width: 100%; accent-color: var(--brand); }
.avatar-privacy-note { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.settings-list { overflow: hidden; }
.setting-row { width: 100%; min-height: 3.7rem; display: flex; align-items: center; gap: .8rem; padding: .75rem .85rem; border: 0; border-bottom: 1px solid var(--line); background: var(--surface); text-align: left; }
.settings-list .setting-row, .settings-list .list-copy { min-width: 0; }
.settings-list .list-copy strong, .settings-list .list-copy small { overflow-wrap: anywhere; }
.setting-row:is(a) { color: inherit; text-decoration: none; }
.setting-row:last-child { border-bottom: 0; }.setting-row:hover { background: var(--surface-muted); }
.setting-row .list-icon { width: 2.35rem; height: 2.35rem; }.setting-row .list-icon svg { width: 1.1rem; height: 1.1rem; }
.setting-row > svg { width: 1rem; height: 1rem; margin-left: auto; color: var(--ink-soft); }
.workspace-switcher { margin: 1rem .75rem .5rem; }
.workspace-label { display: block; margin: 0 0 .3rem; color: var(--ink-soft); font-size: .66rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.workspace-select { width: 100%; min-height: 2.8rem; padding: .5rem .65rem; border-color: var(--line); background-color: var(--surface-muted); font-size: .8rem; font-weight: 700; }

/* Legal (in-app), rating chips, toolbar */
.legal-content { line-height: 1.65; }
.legal-content h2 { margin-top: 1.4rem; font-size: 1.1rem; }
.legal-content h3 { margin-top: 1rem; font-size: .98rem; }
.legal-content p, .legal-content li { color: var(--ink-soft); }
.legal-content a { color: var(--brand-strong); }
.legal-content .legal-meta { font-size: .8rem; opacity: .78; }
.legal-content .legal-notice { padding: .85rem 1rem; border-left: .3rem solid var(--brand); border-radius: .55rem; background: var(--brand-soft); color: var(--ink); }
.legal-code { display: inline-block; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: .6rem; background: var(--surface-muted); font-family: ui-monospace, "Cascadia Code", monospace; font-size: .85rem; }
.chip:has(:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.toolbar .button { min-height: 2.6rem; }

/* Dialog and notifications */
.app-dialog { width: min(100% - 1rem, 38rem); max-height: min(90vh, 48rem); padding: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.app-dialog::backdrop { background: rgba(10, 12, 9, .55); backdrop-filter: blur(3px); }
.dialog-frame { display: flex; max-height: inherit; flex-direction: column; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; }
.dialog-body { padding: 1rem; overflow-y: auto; overscroll-behavior: contain; }
.toast-region { position: fixed; z-index: 200; right: .75rem; bottom: calc(var(--bottom-nav-height) + .75rem); left: .75rem; display: grid; justify-items: center; gap: .5rem; pointer-events: none; }
.toast { width: min(100%, 28rem); display: flex; align-items: flex-start; gap: .7rem; padding: .8rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--surface-raised); color: var(--ink); box-shadow: var(--shadow-md); pointer-events: auto; animation: toast-in .28s var(--ease); }
.toast.out { animation: toast-out .2s ease forwards; }.toast-icon { width: 1.5rem; height: 1.5rem; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); }.toast-icon svg { width: .85rem; height: .85rem; }.toast-copy { flex: 1; min-width: 0; font-size: .82rem; }.toast-copy strong { display: block; }.toast-copy p { margin: .15rem 0 0; color: var(--ink-soft); }.toast-close { padding: .1rem; border: 0; background: transparent; color: var(--ink-soft); }
@keyframes toast-in { from { opacity: 0; transform: translateY(1rem) scale(.97); } } @keyframes toast-out { to { opacity: 0; transform: translateY(.5rem); } }

/* Loading */
.skeleton-page { display: grid; gap: 1rem; }
.skeleton { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--surface-muted); }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 15%, color-mix(in srgb, var(--surface) 68%, transparent) 45%, transparent 75%); transform: translateX(-100%); animation: shimmer 1.35s infinite; }
.skeleton-hero { height: 11rem; }.skeleton-card { height: 6.8rem; }.skeleton-list { height: 4rem; }
@keyframes shimmer { to { transform: translateX(100%); } }
.spinner { width: 1.1rem; height: 1.1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript-card { position: fixed; z-index: 500; inset: 1rem; display: grid; place-content: center; padding: 2rem; border-radius: 1.5rem; background: var(--surface); text-align: center; box-shadow: var(--shadow-lg); }

/* Responsive */
@media (min-width: 35rem) {
  .mobile-brand .brand-text { display: inline; }
  .topbar-context { display: block; margin-left: .6rem; }
  .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-head { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .toolbar { flex-direction: row; align-items: center; }
  .toolbar-search { max-width: 25rem; }
  .auth-panel { padding-right: max(2rem, 7vw); padding-left: max(2rem, 7vw); }
}

@media (min-width: 58rem) {
  .auth-view { display: grid; grid-template-columns: minmax(25rem, 1.05fr) minmax(27rem, .95fr); }
  .auth-art { position: relative; display: flex; flex-direction: column; justify-content: end; overflow: hidden; min-height: 100vh; padding: 4rem; background: linear-gradient(145deg, #20251d, #3d4d2c); color: #fff; }
  .auth-art::before { content: ""; position: absolute; width: 40rem; height: 40rem; top: -13rem; left: -17rem; border: 7rem solid rgba(149,193,31,.11); border-radius: 50%; }
  .auth-art p { position: relative; z-index: 2; margin: 0; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1.02; letter-spacing: -.055em; }
  .auth-art p strong { color: var(--brand); }
  .auth-signet { position: absolute; z-index: 1; top: 12%; right: 8%; width: min(43%, 19rem); opacity: .88; filter: drop-shadow(0 24px 40px rgba(0,0,0,.2)); transform: rotate(4deg); }
  .auth-orbit { position: absolute; border: 3px solid rgba(255,255,255,.12); border-radius: 50%; }.orbit-one { width: 23rem; height: 23rem; top: 8%; right: 0; }.orbit-two { width: 35rem; height: 35rem; top: -1%; right: -12rem; }
  .auth-panel { min-height: 100vh; padding: 3rem clamp(3rem, 7vw, 7rem); }
  .shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
  .sidebar { position: sticky; z-index: 40; top: 0; height: 100vh; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface); }
  .sidebar-brand { margin: 1.1rem 1.15rem .35rem; }
  .desktop-nav { display: grid; gap: .2rem; padding: .5rem .75rem; overflow-y: auto; }
  .desktop-nav .nav-item { width: 100%; height: auto; min-height: 2.85rem; flex-direction: row; justify-content: flex-start; gap: .75rem; padding: .65rem .75rem; border-radius: .75rem; font-size: .84rem; }
  .desktop-nav .nav-item svg { width: 1.2rem; height: 1.2rem; }
  .desktop-nav .nav-item[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
  .desktop-nav .nav-item[aria-current="page"]::before { top: 50%; left: -.76rem; width: .22rem; height: 1.5rem; border-radius: 0 .3rem .3rem 0; transform: translateY(-50%); }
  .sidebar-footer { margin-top: auto; padding: .75rem; border-top: 1px solid var(--line); }
  .user-chip { width: 100%; display: flex; align-items: center; gap: .65rem; padding: .55rem; border: 0; border-radius: .8rem; background: transparent; text-align: left; }
  .user-chip:hover { background: var(--surface-muted); }.user-chip-copy { min-width: 0; flex: 1; }.user-chip-copy strong, .user-chip-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.user-chip-copy small { color: var(--ink-soft); }
  .mobile-brand { display: none; }
  .topbar { padding: 0 clamp(1.25rem, 3vw, 2.5rem); }
  .topbar-context { display: block; margin-left: 0; }
  .main-content { padding: clamp(1.25rem, 2.5vw, 2.2rem); }
  .mobile-nav { display: none; }
  .content-grid { grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .65fr); }
  .split-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .welcome-strip { padding: 1.5rem; }
  .toast-region { right: 1.25rem; bottom: 1.25rem; left: auto; }
  .toast { width: 25rem; }
}

@media (min-width: 78rem) {
  .tile-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-card { padding: 1rem; }
  .desktop-only { display: block; }
  .mobile-records { display: none; }
}
@media (max-width: 77.99rem) { .wide-table { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .button, .status-pill, .badge, .map-pin { border: 1px solid currentColor; }
  .scanner-frame::before, .scanner-frame::after { border-color: Highlight; }
}
@media print {
  .sidebar, .topbar, .mobile-nav, .button, .toolbar, .toast-region { display: none !important; }
  .shell { display: block; }.main-content { padding: 0; }.card, .table-wrap { break-inside: avoid; box-shadow: none; }
}
